diff --git a/build/classic/core.css b/build/classic/core.css index 4ce6dec26..ab4e233eb 100644 --- a/build/classic/core.css +++ b/build/classic/core.css @@ -24,25 +24,51 @@ ========================================================================== */ .cf-association__bar { position: relative; - z-index: 1; } + z-index: 1; + display: flex; + justify-content: space-between; + align-items: center; + flex-direction: row; + border-color: #e2e4e7; + border-style: solid; + border-width: 1px 1px 0; + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07); } + .cf-association__bar .cf-search-input { + flex: 1 1 auto; } + .cf-association__bar .cf-search-input__inner { + border: 0; + box-shadow: none; } + .cf-association__bar .cf-search-input__inner:focus { + border-color: none; + box-shadow: none; + outline: none; } + .cf-association__bar[focus-within] { + border-color: #5b9dd9; + box-shadow: 0 0 2px rgba(30, 140, 190, 0.8); + outline: 2px solid transparent; } + .cf-association__bar:focus-within { + border-color: #5b9dd9; + box-shadow: 0 0 2px rgba(30, 140, 190, 0.8); + outline: 2px solid transparent; } .cf-association__counter { - position: absolute; - top: 50%; - right: 8px; font-size: 12px; - line-height: 1; color: #23282d; - -webkit-transform: translateY(-50%); - transform: translateY(-50%); - pointer-events: none; } + pointer-events: none; + margin-right: 5px; + margin-left: 5px; } + +.cf-association__spinner { + float: none; + margin: 0; + margin-left: 5px; } .cf-association__cols { background: #fff; position: relative; z-index: 0; display: flex; - border-width: 0 1px 1px; + border-width: 1px; border-style: solid; border-color: #e2e4e7; } .cf-association__cols::before { @@ -89,15 +115,25 @@ margin-right: 8px; } .cf-association__option-title { - overflow: hidden; + flex: 1; + position: relative; + margin-right: 4px; } + .cf-association__option--selected .cf-association__option-title { + color: #82878c; } + +.cf-association__option-title-inner { + position: absolute; + top: 0; + left: 0; + width: 100%; font-size: 13px; line-height: 1.4; color: #32373c; + overflow: hidden; white-space: nowrap; text-overflow: ellipsis; - margin-right: 4px; } - .cf-association__option--selected .cf-association__option-title { - color: #82878c; } + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } .cf-association__option-type { font-size: 9px; diff --git a/build/classic/core.js b/build/classic/core.js index de35a6bf9..bdda8c729 100644 --- a/build/classic/core.js +++ b/build/classic/core.js @@ -3119,7 +3119,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/association/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\nvar AssociationField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(AssociationField, _Component);\n\n function AssociationField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, AssociationField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(AssociationField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"selectedList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSearchChange\", function (queryTerm) {\n var _this$props = _this.props,\n fetchOptions = _this$props.fetchOptions,\n setState = _this$props.setState;\n setState({\n queryTerm: queryTerm\n });\n fetchOptions({\n queryTerm: queryTerm\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddItem\", function (option) {\n var _this$props2 = _this.props,\n field = _this$props2.field,\n id = _this$props2.id,\n value = _this$props2.value,\n onChange = _this$props2.onChange,\n setState = _this$props2.setState,\n selectedOptions = _this$props2.selectedOptions; // Don't do anything if the duplicates aren't allowed and\n // the item is already selected.\n\n if (!field.duplicates_allowed && option.disabled) {\n return;\n } // Don't do anything, because the maximum is reached.\n\n\n if (field.max > 0 && value.length >= field.max) {\n // eslint-disable-next-line no-alert\n alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Maximum number of items reached (%s items)', 'carbon-fields-ui'), Number(field.max)));\n return;\n }\n\n onChange(id, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(value).concat([Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"pick\"])(option, 'id', 'type', 'subtype')]));\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat([option])\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveItem\", function (option) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n id = _this$props3.id,\n onChange = _this$props3.onChange,\n setState = _this$props3.setState,\n selectedOptions = _this$props3.selectedOptions;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(value, option));\n setState({\n selectedOptions: Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(selectedOptions, option)\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSort\", function (items) {\n var _this$props4 = _this.props,\n id = _this$props4.id,\n onChange = _this$props4.onChange;\n onChange(id, items);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(AssociationField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props5 = this.props,\n fetchSelectedOptions = _this$props5.fetchSelectedOptions,\n field = _this$props5.field,\n value = _this$props5.value,\n setState = _this$props5.setState;\n setState({\n options: field.options.options,\n totalOptionsCount: field.options.total_options\n });\n\n if (value) {\n fetchSelectedOptions();\n }\n }\n /**\n * Handles the change of search.\n *\n * @param {string} queryTerm\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props6 = this.props,\n name = _this$props6.name,\n value = _this$props6.value,\n field = _this$props6.field,\n totalOptionsCount = _this$props6.totalOptionsCount,\n selectedOptions = _this$props6.selectedOptions,\n queryTerm = _this$props6.queryTerm;\n var options = this.props.options;\n\n if (!field.duplicates_allowed) {\n options = immer__WEBPACK_IMPORTED_MODULE_10___default()(options, function (draft) {\n draft.map(function (option) {\n option.disabled = !!Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"find\"])(value, function (selectedOption) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isMatch\"])(selectedOption, {\n id: option.id,\n type: option.type,\n subtype: option.subtype\n });\n });\n return option;\n });\n });\n }\n\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Fragment\"], null, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__bar\"\n }, __webpack_provided_wp_dot_element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n value: queryTerm,\n onChange: this.handleSearchChange\n }), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__counter\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Showing %1$d of %2$d results', 'carbon-fields-ui'), Number(options.length), Number(totalOptionsCount)))), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__cols\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__col\"\n }, options.map(function (option, index) {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_16___default()('cf-association__option', {\n 'cf-association__option--selected': option.disabled\n }),\n key: index\n }, option.thumbnail && __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: option.thumbnail\n }), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, option.title), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, option.type)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, __webpack_provided_wp_dot_element.createElement(\"a\", {\n className: \"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit\",\n href: option.edit_link.replace('&', '&', 'g'),\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }), !option.disabled && (field.max < 0 || value.length < field.max) && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-plus-alt\",\n onClick: function onClick() {\n return _this2.handleAddItem(option);\n }\n })));\n })), __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n forwardedRef: this.selectedList,\n items: value,\n options: {\n axis: 'y',\n forceHelperSize: true,\n forcePlaceholderSize: true,\n scroll: true,\n handle: '.cf-association__option-sort'\n },\n onUpdate: this.handleSort\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__col\",\n ref: this.selectedList\n }, !!selectedOptions.length && value.map(function (option, index) {\n var optionData = selectedOptions.find(function (selectedOption) {\n return selectedOption.id === option.id && selectedOption.type === option.type && selectedOption.subtype === option.subtype;\n });\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option\",\n key: index\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-sort dashicons dashicons-menu\"\n }), optionData.thumbnail && __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: optionData.thumbnail\n }), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, optionData.title), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, optionData.type)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-dismiss\",\n onClick: function onClick() {\n return _this2.handleRemoveItem(option);\n }\n })), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[\").concat(index, \"]\"),\n value: \"\".concat(optionData.type, \":\").concat(optionData.subtype, \":\").concat(optionData.id),\n readOnly: true\n }));\n })))));\n }\n }]);\n\n return AssociationField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var actions = [{\n event: 'fetchOptionsEvent',\n prop: 'fetchOptions',\n type: 'FETCH_OPTIONS'\n }, {\n event: 'fetchSelectedOptionsEvent',\n prop: 'fetchSelectedOptions',\n type: 'FETCH_SELECTED_OPTIONS'\n }].map(function (actionData) {\n var _component$useEvent = component.useEvent(actionData.event),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_component$useEvent, 2),\n actionChannel$ = _component$useEvent2[0],\n action = _component$useEvent2[1];\n\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, actionData, {\n action: action,\n channel$: actionChannel$\n });\n });\n var combined$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"combine\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref) {\n var action = _ref.action,\n prop = _ref.prop;\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_19__[\"default\"])({\n action: action,\n prop: prop\n });\n }))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (combinedActions) {\n return Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"toProps\"])(combinedActions.reduce(function (acc, curr) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, acc, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()({}, curr.prop, curr.action));\n }, {}));\n }));\n return callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"merge\"].apply(void 0, [combined$].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref2) {\n var channel$ = _ref2.channel$,\n type = _ref2.type;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(channel$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (payload) {\n return {\n type: type,\n payload: payload\n };\n }));\n }))));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var setState = props.setState,\n selectedOptions = props.selectedOptions,\n hierarchyResolver = props.hierarchyResolver;\n\n switch (type) {\n case 'FETCH_OPTIONS':\n // eslint-disable-next-line\n var request = window.jQuery.get(window.ajaxurl, {\n action: 'carbon_fields_fetch_association_options',\n term: payload.queryTerm,\n container_id: props.containerId,\n field_name: hierarchyResolver()\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('An error occurred while trying to fetch association options.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n setState({\n options: response.data.options,\n totalOptionsCount: response.data.total_options\n });\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n break;\n\n case 'FETCH_SELECTED_OPTIONS':\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/association/\"), 'get', {\n container_id: props.containerId,\n options: props.value,\n field_id: hierarchyResolver()\n }).then(function (response) {\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(response))\n });\n });\n break;\n }\n };\n}\n\nvar applyWithState = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"withState\"])({\n options: [],\n selectedOptions: [],\n totalOptionsCount: 0,\n queryTerm: ''\n});\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"withEffects\"])(aperture, {\n handler: handler\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__[\"addFilter\"])('carbon-fields.association.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('This field is required.', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Minimum number of items not reached (%s items)', 'carbon-fields-ui'), [field.min]);\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"compose\"])(applyWithState, applyWithEffects)(AssociationField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/association/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/association/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\nvar AssociationField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(AssociationField, _Component);\n\n function AssociationField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, AssociationField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(AssociationField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"selectedList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"sourceList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSourceListScroll\", function () {\n var _this$props = _this.props,\n fetchOptions = _this$props.fetchOptions,\n setState = _this$props.setState,\n options = _this$props.options,\n page = _this$props.page,\n queryTerm = _this$props.queryTerm;\n var sourceList = _this.sourceList.current;\n\n if (sourceList.offsetHeight + sourceList.scrollTop === sourceList.scrollHeight) {\n setState({\n page: page + 1\n });\n fetchOptions({\n type: 'append',\n options: options,\n queryTerm: queryTerm,\n page: page + 1\n });\n }\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSearchChange\", function (queryTerm) {\n var _this$props2 = _this.props,\n fetchOptions = _this$props2.fetchOptions,\n setState = _this$props2.setState;\n setState({\n page: 1,\n queryTerm: queryTerm\n });\n fetchOptions({\n type: 'replace',\n page: 1,\n queryTerm: queryTerm\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddItem\", function (option) {\n var _this$props3 = _this.props,\n field = _this$props3.field,\n id = _this$props3.id,\n value = _this$props3.value,\n onChange = _this$props3.onChange,\n setState = _this$props3.setState,\n selectedOptions = _this$props3.selectedOptions; // Don't do anything if the duplicates aren't allowed and\n // the item is already selected.\n\n if (!field.duplicates_allowed && option.disabled) {\n return;\n } // Don't do anything, because the maximum is reached.\n\n\n if (field.max > 0 && value.length >= field.max) {\n // eslint-disable-next-line no-alert\n alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Maximum number of items reached (%s items)', 'carbon-fields-ui'), Number(field.max)));\n return;\n }\n\n onChange(id, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(value).concat([Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"pick\"])(option, 'id', 'type', 'subtype')]));\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat([option])\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveItem\", function (option) {\n var _this$props4 = _this.props,\n value = _this$props4.value,\n id = _this$props4.id,\n onChange = _this$props4.onChange,\n setState = _this$props4.setState,\n selectedOptions = _this$props4.selectedOptions;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(value, option));\n setState({\n selectedOptions: Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(selectedOptions, option)\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSort\", function (items) {\n var _this$props5 = _this.props,\n id = _this$props5.id,\n onChange = _this$props5.onChange;\n onChange(id, items);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(AssociationField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props6 = this.props,\n fetchSelectedOptions = _this$props6.fetchSelectedOptions,\n field = _this$props6.field,\n value = _this$props6.value,\n setState = _this$props6.setState;\n setState({\n options: field.options.options,\n totalOptionsCount: field.options.total_options\n });\n\n if (value) {\n fetchSelectedOptions();\n }\n\n this.sourceList.current.addEventListener('scroll', this.handleSourceListScroll);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.sourceList.current.removeEventListener('scroll', this.handleSourceListScroll);\n }\n /**\n * Handles the scroll event of the source list.\n *\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props7 = this.props,\n name = _this$props7.name,\n value = _this$props7.value,\n field = _this$props7.field,\n totalOptionsCount = _this$props7.totalOptionsCount,\n selectedOptions = _this$props7.selectedOptions,\n queryTerm = _this$props7.queryTerm,\n isLoading = _this$props7.isLoading;\n var options = this.props.options;\n\n if (!field.duplicates_allowed) {\n options = immer__WEBPACK_IMPORTED_MODULE_10___default()(options, function (draft) {\n draft.map(function (option) {\n option.disabled = !!Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"find\"])(value, function (selectedOption) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isMatch\"])(selectedOption, {\n id: option.id,\n type: option.type,\n subtype: option.subtype\n });\n });\n return option;\n });\n });\n }\n\n return __webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Fragment\"], null, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__bar\"\n }, __webpack_provided_wp_dot_element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n value: queryTerm,\n onChange: this.handleSearchChange\n }), isLoading ? __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__spinner spinner is-active\"\n }) : '', __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__counter\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Showing %1$d of %2$d results', 'carbon-fields-ui'), Number(options.length), Number(totalOptionsCount)))), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__cols\"\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__col\",\n ref: this.sourceList\n }, options.map(function (option, index) {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_16___default()('cf-association__option', {\n 'cf-association__option--selected': option.disabled\n }),\n key: index\n }, option.thumbnail && __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: option.thumbnail\n }), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-title-inner\"\n }, option.title)), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, option.type)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, __webpack_provided_wp_dot_element.createElement(\"a\", {\n className: \"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit\",\n href: option.edit_link.replace('&', '&', 'g'),\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }), !option.disabled && (field.max < 0 || value.length < field.max) && __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-plus-alt\",\n onClick: function onClick() {\n return _this2.handleAddItem(option);\n }\n })));\n })), __webpack_provided_wp_dot_element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n forwardedRef: this.selectedList,\n items: value,\n options: {\n axis: 'y',\n forceHelperSize: true,\n forcePlaceholderSize: true,\n scroll: true,\n handle: '.cf-association__option-sort'\n },\n onUpdate: this.handleSort\n }, __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__col\",\n ref: this.selectedList\n }, !!selectedOptions.length && value.map(function (option, index) {\n var optionData = selectedOptions.find(function (selectedOption) {\n return selectedOption.id === option.id && selectedOption.type === option.type && selectedOption.subtype === option.subtype;\n });\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option\",\n key: index\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-sort dashicons dashicons-menu\"\n }), optionData.thumbnail && __webpack_provided_wp_dot_element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: optionData.thumbnail\n }), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, optionData.title), __webpack_provided_wp_dot_element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, optionData.type)), __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, __webpack_provided_wp_dot_element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-dismiss\",\n onClick: function onClick() {\n return _this2.handleRemoveItem(option);\n }\n })), __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[\").concat(index, \"]\"),\n value: \"\".concat(optionData.type, \":\").concat(optionData.subtype, \":\").concat(optionData.id),\n readOnly: true\n }));\n })))));\n }\n }]);\n\n return AssociationField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var actions = [{\n event: 'fetchOptionsEvent',\n prop: 'fetchOptions',\n type: 'FETCH_OPTIONS'\n }, {\n event: 'fetchSelectedOptionsEvent',\n prop: 'fetchSelectedOptions',\n type: 'FETCH_SELECTED_OPTIONS'\n }].map(function (actionData) {\n var _component$useEvent = component.useEvent(actionData.event),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_component$useEvent, 2),\n actionChannel$ = _component$useEvent2[0],\n action = _component$useEvent2[1];\n\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, actionData, {\n action: action,\n channel$: actionChannel$\n });\n });\n var combined$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"combine\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref) {\n var action = _ref.action,\n prop = _ref.prop;\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_19__[\"default\"])({\n action: action,\n prop: prop\n });\n }))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (combinedActions) {\n return Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"toProps\"])(combinedActions.reduce(function (acc, curr) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, acc, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()({}, curr.prop, curr.action));\n }, {}));\n }));\n return callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"merge\"].apply(void 0, [combined$].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref2) {\n var channel$ = _ref2.channel$,\n type = _ref2.type;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(channel$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (payload) {\n return {\n type: type,\n payload: payload\n };\n }));\n }))));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var setState = props.setState,\n selectedOptions = props.selectedOptions,\n hierarchyResolver = props.hierarchyResolver;\n\n switch (type) {\n case 'FETCH_OPTIONS':\n setState({\n isLoading: true\n }); // eslint-disable-next-line\n\n var request = window.jQuery.get(window.ajaxurl, {\n action: 'carbon_fields_fetch_association_options',\n term: payload.queryTerm,\n page: payload.page || 1,\n container_id: props.containerId,\n field_name: hierarchyResolver()\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('An error occurred while trying to fetch association options.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n setState({\n options: payload.type === 'replace' ? response.data.options : _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(payload.options).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(response.data.options)),\n totalOptionsCount: response.data.total_options\n });\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n request.always(function () {\n setState({\n isLoading: false\n });\n });\n break;\n\n case 'FETCH_SELECTED_OPTIONS':\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/association/\"), 'get', {\n container_id: props.containerId,\n options: props.value.map(function (option) {\n return \"\".concat(option.id, \":\").concat(option.type, \":\").concat(option.subtype);\n }).join(';'),\n field_id: hierarchyResolver()\n }).then(function (response) {\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(response))\n });\n });\n break;\n }\n };\n}\n\nvar applyWithState = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"withState\"])({\n options: [],\n selectedOptions: [],\n totalOptionsCount: 0,\n queryTerm: '',\n page: 1,\n isLoading: false\n});\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"withEffects\"])(aperture, {\n handler: handler\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__[\"addFilter\"])('carbon-fields.association.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('This field is required.', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Minimum number of items not reached (%s items)', 'carbon-fields-ui'), [field.min]);\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"compose\"])(applyWithState, applyWithEffects)(AssociationField));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/association/index.js?"); /***/ }), diff --git a/build/classic/core.min.css b/build/classic/core.min.css index 531aca832..daf0e4355 100644 --- a/build/classic/core.min.css +++ b/build/classic/core.min.css @@ -1 +1 @@ -.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{flex:1;position:relative;z-index:0}.cf-complex--tabbed-vertical>.cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex__group--grid>.cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex__tabs--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex__tabs--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%);z-index:1}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--grid{position:absolute;top:12px;right:12px}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex__tabs--tabbed-horizontal{display:inline-flex;margin-bottom:-5px}.cf-complex__tabs--tabbed-vertical{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex__tabs--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex__tabs--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal{margin:0 4px 4px 0}.cf-complex__tabs-item--tabbed-vertical~.cf-complex__tabs-item--tabbed-vertical{border-top-width:0}.cf-complex__tabs-item--current{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal.cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex__tabs-item--tabbed-vertical.cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label.cf-complex__placeholder-label{margin:8px 0 12px}.cf-container-term-meta .cf-complex__placeholder-label{font-style:normal;color:inherit}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%!important;margin:0}.cf-textarea__input{display:block;width:100%!important;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file +.cf-association__bar{position:relative;z-index:1;display:flex;justify-content:space-between;align-items:center;flex-direction:row;border:solid #e2e4e7;border-width:1px 1px 0;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.cf-association__bar .cf-search-input{flex:1 1 auto}.cf-association__bar .cf-search-input__inner{border:0;box-shadow:none}.cf-association__bar .cf-search-input__inner:focus{border-color:none;box-shadow:none;outline:none}.cf-association__bar[focus-within]{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8);outline:2px solid transparent}.cf-association__bar:focus-within{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8);outline:2px solid transparent}.cf-association__counter{font-size:12px;color:#23282d;pointer-events:none;margin-right:5px;margin-left:5px}.cf-association__spinner{float:none;margin:0 0 0 5px}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{flex:1;position:relative;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-title-inner{position:absolute;top:0;left:0;width:100%;font-size:13px;line-height:1.4;color:#32373c;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{flex:1;position:relative;z-index:0}.cf-complex--tabbed-vertical>.cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex__group--grid>.cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex__tabs--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex__tabs--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%);z-index:1}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--grid{position:absolute;top:12px;right:12px}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex__tabs--tabbed-horizontal{display:inline-flex;margin-bottom:-5px}.cf-complex__tabs--tabbed-vertical{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex__tabs--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex__tabs--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal{margin:0 4px 4px 0}.cf-complex__tabs-item--tabbed-vertical~.cf-complex__tabs-item--tabbed-vertical{border-top-width:0}.cf-complex__tabs-item--current{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal.cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex__tabs-item--tabbed-vertical.cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label.cf-complex__placeholder-label{margin:8px 0 12px}.cf-container-term-meta .cf-complex__placeholder-label{font-style:normal;color:inherit}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%!important;margin:0}.cf-textarea__input{display:block;width:100%!important;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file diff --git a/build/classic/core.min.js b/build/classic/core.min.js index 8016a3d68..1004f57fe 100644 --- a/build/classic/core.min.js +++ b/build/classic/core.min.js @@ -1,10 +1,10 @@ -this.cf=this.cf||{},this.cf.core=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=323)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.cf.vendor.react}()},function(e,t){!function(){e.exports=this.cf.vendor["@wordpress/element"]}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.cf.vendor.lodash}()},function(e,t){!function(){e.exports=this.cf.vendor["@wordpress/i18n"]}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n1?t-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(o,a){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){o(e)}),i.fail(function(){a(Object(r.__)("An error occured.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";var r=n(1),o=n(30);function a(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var i,u,s=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}},c=(void 0===i&&(i=0),function(){return++i}),l={},f={},p=["touchstart","touchmove"];function d(e,t){var n=null;return-1!==p.indexOf(t)&&u&&(n={passive:!e.props.preventDefault}),n}t.a=function(e,t){var n,i;return i=n=function(n){var i,p;function h(e){var t;return(t=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof t.__clickOutsideHandlerProp){var n=t.getInstance();if("function"!=typeof n.props.handleClickOutside){if("function"!=typeof n.handleClickOutside)throw new Error("WrappedComponent lacks a handleClickOutside(event) function for processing outside click events.");n.handleClickOutside(e)}else n.props.handleClickOutside(e)}else t.__clickOutsideHandlerProp(e)},t.enableOnClickOutside=function(){if("undefined"!=typeof document&&!f[t._uid]){void 0===u&&(u=s()),f[t._uid]=!0;var e=t.props.eventTypes;e.forEach||(e=[e]),l[t._uid]=function(e){var n;t.props.disableOnClickOutside||null!==t.componentNode&&(t.props.preventDefault&&e.preventDefault(),t.props.stopPropagation&&e.stopPropagation(),t.props.excludeScrollbar&&(n=e,document.documentElement.clientWidth<=n.clientX||document.documentElement.clientHeight<=n.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode;){if(a(e,t,n))return!0;e=e.parentNode}return e}(e.target,t.componentNode,t.props.outsideClickIgnoreClass)===document&&t.__outsideClickHandler(e))},e.forEach(function(e){document.addEventListener(e,l[t._uid],d(t,e))})}},t.disableOnClickOutside=function(){delete f[t._uid];var e=l[t._uid];if(e&&"undefined"!=typeof document){var n=t.props.eventTypes;n.forEach||(n=[n]),n.forEach(function(n){return document.removeEventListener(n,e,d(t,n))}),delete l[t._uid]}},t.getRef=function(e){return t.instanceRef=e},t._uid=c(),t}p=n,(i=h).prototype=Object.create(p.prototype),i.prototype.constructor=i,i.__proto__=p;var m=h.prototype;return m.getInstance=function(){if(!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},m.componentDidMount=function(){if("undefined"!=typeof document&&document.createElement){var e=this.getInstance();if(t&&"function"==typeof t.handleClickOutside&&(this.__clickOutsideHandlerProp=t.handleClickOutside(e),"function"!=typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=Object(o.findDOMNode)(this.getInstance()),this.enableOnClickOutside()}},m.componentDidUpdate=function(){this.componentNode=Object(o.findDOMNode)(this.getInstance())},m.componentWillUnmount=function(){this.disableOnClickOutside()},m.render=function(){var t=this.props,n=(t.excludeScrollbar,function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},h}(r.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},i}},function(e,t,n){"use strict";var r=n(16),o=n.n(r),a=n(14),i=n(17),u=n(11),s=n(26),c=Object(i.withEffects)(function(e){var t=e.mount,n=e.unmount,r=e.useEvent("openMediaBrowserEvent"),a=o()(r,2),c=a[0],l=a[1];return Object(u.merge)(Object(u.pipe)(t,Object(u.map)(function(){return{type:"INIT"}})),Object(u.pipe)(n,Object(u.map)(function(){return{type:"DESTROY"}})),Object(u.pipe)(Object(s.a)({openMediaBrowser:l}),Object(u.map)(i.toProps)),Object(u.pipe)(c,Object(u.map)(function(e){return{type:"OPEN",payload:e}})))},{handler:function(e){var t=null;return function(n){switch(n.type){case"INIT":var r=e.onSelect,o=e.typeFilter;(t=wp.media({title:e.title,library:{type:o},button:{text:e.buttonLabel},multiple:e.multiple})).on("select",function(){var e=t.state().get("selection").toJSON();r(e)});break;case"OPEN":t&&t.open();break;case"DESTROY":t=null}}}});t.a=Object(a.compose)(c)(function(e){return(0,e.children)({openMediaBrowser:e.openMediaBrowser})})},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(313),n(31)),w=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():e.createElement(E.a,null)}}]),n}(y.Component);t.a=w}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(3),g=n.n(m),v=n(55),b=function(t){function n(){var e,t;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i1?t.setState(function(e){return{menuVisible:!e.menuVisible}}):r(n[0])}),g()(h()(h()(t)),"handleItemClick",function(e){t.setState({menuVisible:!1}),t.props.onSelect(e)}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.buttonText,o=n.groups;return e.createElement("div",{className:"cf-complex__inserter"},e.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},r),o.length>1&&e.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},o.map(function(n,r){return e.createElement("li",{className:"cf-complex__inserter-item",key:r,onClick:function(){return t.handleItemClick(n)}},n.label)})))}}]),n}(n(2).Component);t.a=Object(v.a)(b)}).call(this,n(2))},function(e,t,n){"use strict";var r=u(n(305)),o=u(n(310)),a=u(n(116)),i=u(n(113));function u(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:a.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(319),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(80),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(63)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(86)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(44),o=n(190),a=n(191),i=n(192),u=n(193),s=n(194);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(33)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(199),o=n(206),a=n(208),i=n(209),u=n(210);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0?e.createElement("select",{id:n,name:r,value:o||Object(b.get)(a.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},a.options.map(function(t){return e.createElement("option",{key:t.value,value:t.value},t.label)})):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return i});var r=n(2),o=Object(r.createContext)(!1),a=o.Provider,i=o.Consumer},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(37))},function(e,t,n){var r=n(172),o=n(42);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(174),o=n(83),a=n(23),i=n(62),u=n(84),s=n(85),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,h=d?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||h.push(g);return h}},function(e,t,n){var r=n(175),o=n(27),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&el))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=l}function E(){var e=o();if(y(e))return w(e);p=setTimeout(E,function(e){var n=t-(e-d);return g?u(n,l-(e-h)):n}(e))}function w(e){return p=void 0,v&&s?b(e):(s=c=void 0,f)}function x(){var e=o(),n=y(e);if(s=arguments,c=this,d=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(E,t),m?b(e):f}(d);if(g)return p=setTimeout(E,t),b(d)}return void 0===p&&(p=setTimeout(E,t)),f}return t=a(t)||0,r(n)&&(m=!!n.leading,l=(g="maxWait"in n)?i(a(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,s=d=c=p=void 0},x.flush=function(){return void 0===p?f:w(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(284)),o=a(n(286));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,i.polyfill)(p);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(114),i=n(311);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";(function(e){var r=n(19),o=n.n(r),a=n(20),i=n.n(a),u=n(14),s=n(22),c=n(4),l=(n(320),n(148)),f=n(35);t.a=Object(u.compose)(Object(s.withSelect)(function(e,t){var n=e("carbon-fields/core"),r=n.getValidationError,o=n.isFieldVisible;return{error:r(t.id),hidden:!o(t.id)}}),Object(f.a)("carbon-fields.field-wrapper"))(function(t){var n=t.id,r=t.field,a=t.error,u=t.hidden,s=t.className,f=t.children,p=r.width?{flexBasis:"".concat(r.width,"%")}:null,d=["cf-field","cf-".concat(Object(c.kebabCase)(r.type)),{"cf-field--has-width":!!r.width,"cf-field--invalid":!!a},s].concat(o()(r.classes));return e.createElement("div",{className:i()(d),style:p,hidden:u},e.createElement("div",{className:"cf-field__head"},r.label&&e.createElement("label",{className:"cf-field__label",htmlFor:n},r.label,r.required&&e.createElement("span",{className:"cf-field__asterisk"},"*"))),!u&&e.createElement("div",{className:"cf-field__body"},f),u&&e.createElement(l.a,{className:"cf-field__body"},f),r.help_text&&e.createElement("em",{className:"cf-field__help",dangerouslySetInnerHTML:{__html:r.help_text}}),a&&e.createElement("span",{className:"cf-field__error"},a))})}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(16),i=n.n(a),u=n(19),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(10),b=n.n(v),y=n(0),E=n.n(y),w=n(3),x=n.n(w),O=n(38),_=n.n(O),C=n(5),k=n(2),S=n(14),j=n(18),D=n(17),A=n(20),M=n.n(A),F=n(4),T=n(11),P=n(26),N=(n(160),n(39)),I=n(36),L=n(54),R=function(t){function n(){var e,t;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&a.length>=r.max?alert(Object(C.sprintf)(Object(C.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(i(o,s()(a).concat([Object(F.pick)(e,"id","type","subtype")])),u({selectedOptions:s()(c).concat([e])})))}),x()(E()(E()(t)),"handleRemoveItem",function(e){var n=t.props,r=n.value,o=n.id,a=n.onChange,i=n.setState,u=n.selectedOptions;a(o,Object(F.without)(r,e)),i({selectedOptions:Object(F.without)(u,e)})}),x()(E()(E()(t)),"handleSort",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),t}return b()(n,t),p()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var t=this,n=this.props,r=n.name,o=n.value,a=n.field,i=n.totalOptionsCount,u=n.selectedOptions,s=n.queryTerm,c=this.props.options;return a.duplicates_allowed||(c=_()(c,function(e){e.map(function(e){return e.disabled=!!Object(F.find)(o,function(t){return Object(F.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),e.createElement(k.Fragment,null,e.createElement("div",{className:"cf-association__bar"},e.createElement(N.a,{value:s,onChange:this.handleSearchChange}),e.createElement("span",{className:"cf-association__counter"},Object(C.sprintf)(Object(C.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(c.length),Number(i)))),e.createElement("div",{className:"cf-association__cols"},e.createElement("div",{className:"cf-association__col"},c.map(function(n,r){return e.createElement("div",{className:M()("cf-association__option",{"cf-association__option--selected":n.disabled}),key:r},n.thumbnail&&e.createElement("img",{className:"cf-association__option-thumb",src:n.thumbnail}),e.createElement("div",{className:"cf-association__option-content"},e.createElement("span",{className:"cf-association__option-title"},n.title),e.createElement("span",{className:"cf-association__option-type"},n.type)),e.createElement("div",{className:"cf-association__option-actions"},e.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:n.edit_link.replace("&","&","g"),target:"_blank",rel:"noopener noreferrer"}),!n.disabled&&(a.max<0||o.length0&&t.length=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(163),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;t.setState({currentTab:Object(k.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),x()(E()(E()(t)),"handleToggleAllClick",function(){var e=t.props,n=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!n)}),x()(E()(E()(t)),"handleGroupsSortStart",function(e,n){var r=t.props,o=r.value,a=r.groupIdKey,i=n.item.index(),u=Object(k.get)(o,"".concat(i,".").concat(a),null);t.setState({currentDraggedGroup:u})}),x()(E()(E()(t)),"handleGroupsSortUpdate",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),x()(E()(E()(t)),"handleGroupsSortStop",function(){t.setState({currentDraggedGroup:null})}),x()(E()(E()(t)),"handleTabsChange",function(e){t.setState({currentTab:e})}),t}return b()(n,t),p()(n,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(k.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=s()(e,2),o=r[0],a=r[1],u=Object(k.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(k.isString)(u.label_template))return u.label;try{return Object(k.template)(u.label_template)(i()({$_index:n},a))||u.label}catch(e){return console.error(Object(C.sprintf)(Object(C.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var t=this,n=this.state,r=n.currentDraggedGroup,a=n.currentTab,i=this.props,u=i.value,s=i.field,c=i.groupIdKey,l=i.groupFilterKey,f=i.allGroupsAreCollapsed,p=i.onGroupSetup,d=i.onGroupFieldSetup,h=i.onToggleGroup,m=this.getAvailableGroups(l),g=this.getGroupLabels(),v=u.map(function(e,t){return{id:e[c],label:g[t]}});return e.createElement(_.Fragment,null,this.isTabbed&&!!u.length&&e.createElement(S.a,{items:u,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===s.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},e.createElement(j.a,{ref:this.tabsList,items:v,current:a,layout:s.layout,onChange:this.handleTabsChange},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:"+",groups:m,onSelect:this.handleAddGroup}))),!u.length&&e.createElement(M.a,{label:"There are no entries yet."},e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup})),!!u.length&&e.createElement(S.a,{items:u,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},e.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},u.map(function(n,i){return e.createElement(A.a,o()({key:"".concat(n[l],"-").concat(i)},p(n,{index:i,label:g[i],dragged:n[c]===r,tabbed:t.isTabbed,hidden:t.isTabbed&&n[c]!==a,allowClone:s.duplicate_groups_allowed&&!t.isMaximumReached,onFieldSetup:d,onClone:t.handleCloneGroup,onRemove:t.handleRemoveGroup,onToggle:h})))}))),!this.isTabbed&&!!u.length&&e.createElement("div",{className:"cf-complex__actions"},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup}),e.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},f?Object(C.__)("Expand All","carbon-fields-ui"):Object(C.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(C.sprintf)(Object(C.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),n}(_.Component);Object(O.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(t){return function(n){var r=n.field;return"complex"!==r.type?e.createElement(t,n):e.createElement(t,o()({className:"cf-complex--".concat(r.layout)},n))}}),Object(O.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(k.isEmpty)(t))return Object(C.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===l.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);l.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return l.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();f.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},f.defaultProps={options:{}},t.default=f},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=function(t){function n(){return i()(this,n),l()(this,p()(n).apply(this,arguments))}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.value,a=t.field;return e.createElement("input",o()({type:"hidden",name:n,value:r,className:"hidden-text"},a.attributes))}}]),n}(n(2).Component);t.a=m}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(2);t.a=function(t){var n=t.field;return e.createElement(r.RawHTML,{className:"cf-html__content"},n.html)}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(26),x=n(2),O=n(5),_=n(17),C=n(4),k=n(11),S=(n(295),n(39)),j=n(132),D=function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1})}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?e.createElement(b.a,{id:n,name:r,value:this.filterValues(o),options:a.options,delimiter:a.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){(function(t){for(var r=n(304),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],c=0;!u&&c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(14),w=n(5),x=n(17),O=n(11),_=n(26),C=n(4),k=(n(312),n(39)),S=n(141),j=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.embedCode,i=t.embedType,u=t.provider;return e.createElement("div",{ref:this.node},e.createElement(k.a,{id:n,value:o,onChange:this.handleChange}),a?e.createElement(S.a,{html:a,type:i,provider:u}):null,e.createElement("input",{type:"hidden",name:r,value:o,readOnly:!0}))}}]),n}(y.Component),D=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),A=Object(x.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=o()(t,2),r=n[0],a=n[1],i=Object(O.pipe)(Object(_.a)({onFetchEmbedCode:a}),Object(O.map)(x.toProps)),u=Object(O.pipe)(r,Object(O.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(O.merge)(i,u)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(w.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(w.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}});t.a=Object(E.compose)(D,A)(j)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(2),g=function(t){function n(){var e;return o()(this,n),(e=s()(this,l()(n).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(h()(h()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(h()(h()(e))),e}return p()(n,t),i()(n,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,c=u.height;"resize"!==o||s===a&&c===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var t=this;return e.createElement("div",{className:"cf-oembed__preview"},e.createElement("iframe",{ref:function(e){return t.iframe=e},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var t="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",n="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(t,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),r=e.createElement("html",{lang:document.documentElement.lang},e.createElement("head",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),e.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},e.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),e.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:n}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(m.renderToString)(r)),this.iframe.contentWindow.document.close()}}}]),n}(m.Component);t.a=g}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(29),i=n(57);n(314),t.a=Object(a.a)(function(t){return o()({},t,{field:o()({},t.field,{options:t.field.options.map(function(t){return o()({},t,{label:e.createElement("img",{className:"cf-radio-image__image",src:t.label})})})})})})(i.a)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(5),O=n(4),_=n(20),C=n.n(_),k=function(t){function n(){var e;return s()(this,n),e=p()(this,h()(n).call(this)),E()(b()(b()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(O.isString)(t)?t:t.target.value)}),E()(b()(b()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=i()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=i()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return g()(n,t),l()(n,[{key:"componentDidMount",value:function(){this.props.visible&&(this.timer=setTimeout(this.initEditor,250))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.destroyEditor()}},{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field,s=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":u.rich_editing},{"html-active":!u.rich_editing}],c=u.media_buttons?Object(O.template)(u.media_buttons)({id:r}):null;return e.createElement("div",{id:"wp-".concat(r,"-wrap"),className:C()(s),ref:function(e){return t.editorNode=e}},u.media_buttons&&e.createElement("div",{id:"wp-".concat(r,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},e.createElement("span",{dangerouslySetInnerHTML:{__html:c}})),u.rich_editing&&e.createElement("div",{className:"wp-editor-tabs"},e.createElement("button",{type:"button",id:"".concat(r,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":r},Object(x.__)("Visual","carbon-fields-ui")),e.createElement("button",{type:"button",id:"".concat(r,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":r},Object(x.__)("Text","carbon-fields-ui"))),e.createElement("div",{id:"wp-".concat(r,"-editor-container"),className:"wp-editor-container"},e.createElement("textarea",o()({style:{width:"100%"},className:"regular-text",id:r,name:a,value:i,onChange:this.handleChange},u.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),n}(w.Component);t.a=k}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(2),h=(n(316),function(t){function n(){return o()(this,n),s()(this,l()(n).apply(this,arguments))}return p()(n,t),i()(n,[{key:"render",value:function(){return e.createElement("h3",null,this.props.field.label)}}]),n}(d.Component));t.a=h}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(4),w=(n(317),n(31)),x=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1}),t}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field;return u.options.length>0?e.createElement("ul",{className:"cf-set__list"},u.options.map(function(n,s){return e.createElement("li",{className:"cf-set__list-item",key:s},e.createElement("input",o()({type:"checkbox",id:"".concat(r,"-").concat(n.value),name:"".concat(a,"[]"),checked:t.isChecked(i,n),value:n.value,className:"cf-set__input",onChange:t.handleChange},u.attributes)),e.createElement("label",{className:"cf-set__label",htmlFor:"".concat(r,"-").concat(n.value)},n.label))})):e.createElement(w.a,null)}}]),n}(y.Component);t.a=x}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(26),E=n(2),w=n(5),x=n(17),O=n(4),_=n(11),C=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;ar&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===f.inserted[v]&&(n="",h(e,t),f.inserted[v]=n)}var O=function(){var e=w.apply(this,arguments),t=a+"-"+v;return void 0===f.registered[t]&&(f.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){f.inserted[e]=!0}if(l){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){l&&(d.flush(),d.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},C=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function A(e){return D(e)?window.pageYOffset:e.scrollTop}function M(e,t){D(e)?window.scrollTo(0,t):e.scrollTop=t}function F(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k,a=A(e),i=t-a,u=0;!function t(){var s,c=i*((s=(s=u+=10)/n-1)*s*s+1)+a;M(e,c),u=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&F(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&w>=r)return a&&F(s,_,160),{placement:"bottom",maxHeight:i?w-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&E>=r)&&(k=i?E-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return M(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&F(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&E>=r){var S=t;return(!i&&x>=r||i&&E>=r)&&(S=i?E-y:x-y),a&&F(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!l,isFixedPosition:l,theme:s});c&&c(f),r.setState(f)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||P(e);return E({},r.props,{placement:t,maxHeight:r.state.maxHeight})},O(r,n)}return w(t,e),b(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(a.Component);N.contextTypes={getPortalPlacement:l.a.func};var I=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},L=I,R=I,H=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};H.defaultProps={children:"No options"};var V=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};V.defaultProps={children:"Loading..."};var B=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=l-f-c,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),p.scrollTop=l,m=!0,r.isBottom=!0):!d&&-t>c&&(i&&!r.isTop&&i(e),p.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},O(r,n)}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return i.a.createElement(Z,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(a.Component),le=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=x(e,["isEnabled"]);return t?i.a.createElement(ce,n):this.props.children}}]),t}(a.Component);le.defaultProps={isEnabled:!0};var fe=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,s=e.hasValue;return i.a.createElement("div",{className:r(Object(u.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s},n)},t)}}]),t}(a.Component),pe=function(e){var t=e.size,n=x(e,["size"]);return i.a.createElement("svg",E({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(u.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},de=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},he=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},me=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},ge=me,ve=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};ve.defaultProps={children:i.a.createElement(he,null)};var be=me,ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};ye.defaultProps={children:i.a.createElement(de,null)};var Ee=function(e){var t=e.color,n=e.delay,r=e.offset;return i.a.createElement("span",{className:Object(u.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(u.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var we=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,s=e.isRtl,c=e.theme.colors,l=a?c.neutral80:c.neutral20;return i.a.createElement("div",E({},o,{className:n(Object(u.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),i.a.createElement(Ee,{color:l,delay:0,offset:s}),i.a.createElement(Ee,{color:l,delay:160,offset:!0}),i.a.createElement(Ee,{color:l,delay:320,offset:!s}))};we.defaultProps={size:4};var xe=function(e){var t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)},Oe=xe,_e=xe,Ce=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)}}]),t}(a.Component);Ce.defaultProps={children:i.a.createElement(de,{size:14})};var ke=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,s=e.getStyles,c=e.innerProps,l=e.isDisabled,f=e.removeProps,p=e.selectProps,d=r.Container,h=r.Label,m=r.Remove,g=E({className:o(Object(u.a)(s("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":l},n)},c),v={className:o(Object(u.a)(s("multiValueLabel",this.props)),{"multi-value__label":!0},n)},b=E({className:o(Object(u.a)(s("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},f);return i.a.createElement(d,{data:a,innerProps:g,selectProps:p},i.a.createElement(h,{data:a,innerProps:v,selectProps:p},t),i.a.createElement(m,{data:a,innerProps:b,selectProps:p}))}}]),t}(a.Component);ke.defaultProps={cropWithEllipsis:!0};var Se={ClearIndicator:ye,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,c=e.innerRef,l=e.innerProps;return i.a.createElement("div",E({ref:c,className:n(Object(u.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":s},o)},l),t)},DropdownIndicator:ve,DownChevron:he,CrossIcon:de,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,c=e.label,l=e.theme;return i.a.createElement("div",{className:r(Object(u.a)(o("group",e)),{group:!0},n)},i.a.createElement(a,E({},s,{theme:l,getStyles:o,cx:r}),c),i.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=x(e,["className","cx","getStyles","theme"]);return i.a.createElement("div",E({className:n(Object(u.a)(r("groupHeading",E({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return i.a.createElement("div",{className:r(Object(u.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return i.a.createElement("span",E({},o,{className:n(Object(u.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,s=e.isDisabled,c=e.theme,l=x(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return i.a.createElement("div",{className:Object(u.a)(r("input",E({theme:c},l)))},i.a.createElement(p.a,E({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:s},l)))},LoadingIndicator:we,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps,c=r(Object(u.a)(o("menu",e)),{menu:!0},n);return i.a.createElement("div",E({className:c},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef;return i.a.createElement("div",{className:r(Object(u.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:s},t)},MenuPortal:B,LoadingMessage:V,NoOptionsMessage:H,MultiValue:ke,MultiValueContainer:Oe,MultiValueLabel:_e,MultiValueRemove:Ce,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,c=e.isSelected,l=e.innerRef,f=e.innerProps;return i.a.createElement("div",E({ref:l,className:r(Object(u.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":c},n)},f),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,c=e.isRtl;return i.a.createElement("div",E({className:r(Object(u.a)(o("container",e)),{"--is-disabled":s,"--is-rtl":c},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:fe},je=function(e){return E({},Se,e.components)},De={clearIndicator:be,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:ge,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:R,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return y(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),y(t,"backgroundColor",i.neutral0),y(t,"borderRadius",o),y(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),y(t,"marginBottom",a.menuGutter),y(t,"marginTop",a.menuGutter),y(t,"position","absolute"),y(t,"width","100%"),y(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:L,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ae={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Me={backspaceRemovesValue:!0,blurInputOnSelect:T(),captureMenuScroll:!T(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=E({ignoreCase:!0,ignoreAccents:!0,stringify:K,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?$(t):t,c=i?$(a(e)):a(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=q(s),c=q(c)),"start"===u?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Fe=1,Te=function(e){function t(e){v(this,t);var n=O(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pe.call(n);var r=e.value;n.cacheComponents=h(n.cacheComponents,Y).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Fe);var o=j(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=j(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!u&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?M(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,c=-1;if(a.length){switch(e){case"previous":c=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ae):E({},Ae,this.props.theme):Ae}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,c=this.state.selectValue,l=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+S(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:l,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var c=a?void 0:function(){return n.onOptionHover(e)},l=a?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:l,onMouseMove:c,onMouseOver:c,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:f,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,c=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,c=r||this.getElementId("input");if(!n)return i.a.createElement(J,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:k,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,d=f.theme;return i.a.createElement(u,E({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,f=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,h=l.inputValue,m=l.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue;if(!this.hasValue()||!f)return h?null:i.a.createElement(s,E({},c,{key:"placeholder",isDisabled:p}),m);if(d)return v.map(function(t){var u=t===b;return i.a.createElement(n,E({},c,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var y=v[0];return i.a.createElement(u,E({},c,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:u,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?i.a.createElement(e,E({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.a.createElement(n,E({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,O=m.maxMenuHeight,_=m.menuIsOpen,C=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,j=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,A=m.noOptionsMessage,M=m.onMenuScrollToTop,F=m.onMenuScrollToBottom;if(!_)return null;var T=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,i.a.createElement(l,E({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},P=void 0;if(this.hasOptions())P=h.render.map(function(t){if("group"===t.type){t.type;var o=x(t,["type"]),a=t.key+"-heading";return i.a.createElement(n,E({},f,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return T(e)}))}if("option"===t.type)return T(t)});else if(b){var I=y({inputValue:v});if(null===I)return null;P=i.a.createElement(s,f,I)}else{var L=A({inputValue:v});if(null===L)return null;P=i.a.createElement(c,f,L)}var R={minMenuHeight:w,maxMenuHeight:O,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:D},H=i.a.createElement(N,E({},f,R),function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return i.a.createElement(o,E({},f,R,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),i.a.createElement(le,{isEnabled:g,onTopArrive:M,onBottomArrive:F},i.a.createElement(se,{isEnabled:j},i.a.createElement(a,E({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),P))))});return S||"fixed"===k?i.a.createElement(u,E({},f,{appendTo:S,controlElement:this.controlRef,menuPlacement:C,menuPosition:k}),H):H}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(o){if(n){var s=u.map(function(t){return e.getOptionValue(t)}).join(n);return i.a.createElement("input",{name:a,type:"hidden",value:s})}var c=u.length>0?u.map(function(t,n){return i.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):i.a.createElement("input",{name:a,type:"hidden"});return i.a.createElement("div",null,c)}var l=u[0]?this.getOptionValue(u[0]):"";return i.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?i.a.createElement(X,{"aria-live":"assertive"},i.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),i.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,u=a.className,s=a.id,c=a.isDisabled,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.a.createElement(r,E({},f,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:l}),this.renderLiveRegion(),i.a.createElement(t,E({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:l}),i.a.createElement(o,E({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),i.a.createElement(n,E({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(a.Component);Te.defaultProps=Me;var Pe=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=je({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(C(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=De[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,E({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=_(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=_(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof l&&(l(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!c||!f||!m||p&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(c){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":c?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!c){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":c?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":c?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!c)return;e.focusOption("pageup");break;case"PageDown":if(!c)return;e.focusOption("pagedown");break;case"Home":if(!c)return;e.focusOption("first");break;case"End":if(!c)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Ne=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;v(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=c(n(1)),o=c(n(21)),a=c(n(25)),i=n(52),u=c(n(289)),s=c(n(290));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,c=e.hsv,l=e.hsl,f=e.onChange,p=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:l,hsv:c,onChange:f})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:l,onChange:f})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:l,renderers:m,onChange:f}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:l,hex:o,onChange:f,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:f,onSwatchHover:p}))};l.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},l.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(l)},function(e,t,n){"use strict";var r=n(167);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(169)),o=u(n(61)),a=u(n(180)),i=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(32),o=n(23),a=n(27);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(41),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(173)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(45);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(44);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(44),o=n(71),a=n(72);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(87),o=n(196),a=n(28),i=n(91),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t,n){var r,o=n(197),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(200),o=n(44),a=n(71);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(201),o=n(202),a=n(203),i=n(204),u=n(205);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(244);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(69),o=n(104),a=n(105),i=n(246),u=n(247),s=n(250),c=n(251),l=n(252),f=n(253),p=n(95),d=n(254),h=n(48),m=n(255),g=n(256),v=n(261),b=n(23),y=n(62),E=n(263),w=n(28),x=n(265),O=n(42),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var F,T=1&n,P=2&n,N=4&n;if(j&&(F=A?j(t,D,A,M):j(t)),void 0!==F)return F;if(!w(t))return t;var I=b(t);if(I){if(F=m(t),!T)return c(t,F)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,T);if(L==k||L==_||R&&!A){if(F=P||R?{}:v(t),!T)return P?f(t,u(F,t)):l(t,i(F,t))}else{if(!S[L])return A?t:{};F=g(t,L,T)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,F),x(t))return t.forEach(function(r){F.add(e(r,n,j,r,t,M))}),F;if(E(t))return t.forEach(function(r,o){F.set(o,e(r,n,j,o,t,M))}),F;var V=N?P?d:p:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(F,o,e(r,n,j,o,t,M))}),F}},function(e,t,n){var r=n(33),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(51),o=n(42);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(51),o=n(107);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(28),o=n(67),a=n(249),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(63)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*c/a)/100,n.hsl.a!==l)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:l,source:"rgb"}}else{var f;if(f=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==f)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*c/a+100)/100,n.hsl.h!==l)return{h:l,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==f)return{h:f,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?c=a:l<0?l=0:l>i&&(l=i);var f=100*c/a,p=-100*l/i+100;return{h:n.hsl.h,s:f,v:p,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=T(e,360),t=T(t,100),n=T(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,f,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=F(s),{ok:h,format:e.format||m,r:c(255,l(u.r,0)),g:c(255,l(u.g,0)),b:c(255,l(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r,o,a=l(e,t,n),i=c(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(p(r));return a}function D(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(p({h:r,s:o,v:a})),a=(a+u)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*T(this._r,255))+"%",g:s(100*T(this._g,255))+"%",b:s(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%)":"rgba("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),a=n/100;return p({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,a=p.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},p.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;cs&&(s=r,u=p(t[c]));return p.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var A=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,l(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:l.fields,className:"flexbox-fix"},r.default.createElement("div",{style:l.double},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"hex",value:s.replace("#",""),onChange:f})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.alpha},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:f,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t1?t-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(o,a){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){o(e)}),i.fail(function(){a(Object(r.__)("An error occured.","carbon-fields-ui"))})})}},function(e,t,n){"use strict";var r=n(1),o=n(30);function a(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var i,u,s=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}},c=(void 0===i&&(i=0),function(){return++i}),l={},f={},p=["touchstart","touchmove"];function d(e,t){var n=null;return-1!==p.indexOf(t)&&u&&(n={passive:!e.props.preventDefault}),n}t.a=function(e,t){var n,i;return i=n=function(n){var i,p;function h(e){var t;return(t=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof t.__clickOutsideHandlerProp){var n=t.getInstance();if("function"!=typeof n.props.handleClickOutside){if("function"!=typeof n.handleClickOutside)throw new Error("WrappedComponent lacks a handleClickOutside(event) function for processing outside click events.");n.handleClickOutside(e)}else n.props.handleClickOutside(e)}else t.__clickOutsideHandlerProp(e)},t.enableOnClickOutside=function(){if("undefined"!=typeof document&&!f[t._uid]){void 0===u&&(u=s()),f[t._uid]=!0;var e=t.props.eventTypes;e.forEach||(e=[e]),l[t._uid]=function(e){var n;t.props.disableOnClickOutside||null!==t.componentNode&&(t.props.preventDefault&&e.preventDefault(),t.props.stopPropagation&&e.stopPropagation(),t.props.excludeScrollbar&&(n=e,document.documentElement.clientWidth<=n.clientX||document.documentElement.clientHeight<=n.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode;){if(a(e,t,n))return!0;e=e.parentNode}return e}(e.target,t.componentNode,t.props.outsideClickIgnoreClass)===document&&t.__outsideClickHandler(e))},e.forEach(function(e){document.addEventListener(e,l[t._uid],d(t,e))})}},t.disableOnClickOutside=function(){delete f[t._uid];var e=l[t._uid];if(e&&"undefined"!=typeof document){var n=t.props.eventTypes;n.forEach||(n=[n]),n.forEach(function(n){return document.removeEventListener(n,e,d(t,n))}),delete l[t._uid]}},t.getRef=function(e){return t.instanceRef=e},t._uid=c(),t}p=n,(i=h).prototype=Object.create(p.prototype),i.prototype.constructor=i,i.__proto__=p;var m=h.prototype;return m.getInstance=function(){if(!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},m.componentDidMount=function(){if("undefined"!=typeof document&&document.createElement){var e=this.getInstance();if(t&&"function"==typeof t.handleClickOutside&&(this.__clickOutsideHandlerProp=t.handleClickOutside(e),"function"!=typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=Object(o.findDOMNode)(this.getInstance()),this.enableOnClickOutside()}},m.componentDidUpdate=function(){this.componentNode=Object(o.findDOMNode)(this.getInstance())},m.componentWillUnmount=function(){this.disableOnClickOutside()},m.render=function(){var t=this.props,n=(t.excludeScrollbar,function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(e,n)},h}(r.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},i}},function(e,t,n){"use strict";var r=n(17),o=n.n(r),a=n(14),i=n(18),u=n(11),s=n(26),c=Object(i.withEffects)(function(e){var t=e.mount,n=e.unmount,r=e.useEvent("openMediaBrowserEvent"),a=o()(r,2),c=a[0],l=a[1];return Object(u.merge)(Object(u.pipe)(t,Object(u.map)(function(){return{type:"INIT"}})),Object(u.pipe)(n,Object(u.map)(function(){return{type:"DESTROY"}})),Object(u.pipe)(Object(s.a)({openMediaBrowser:l}),Object(u.map)(i.toProps)),Object(u.pipe)(c,Object(u.map)(function(e){return{type:"OPEN",payload:e}})))},{handler:function(e){var t=null;return function(n){switch(n.type){case"INIT":var r=e.onSelect,o=e.typeFilter;(t=wp.media({title:e.title,library:{type:o},button:{text:e.buttonLabel},multiple:e.multiple})).on("select",function(){var e=t.state().get("selection").toJSON();r(e)});break;case"OPEN":t&&t.open();break;case"DESTROY":t=null}}}});t.a=Object(a.compose)(c)(function(e){return(0,e.children)({openMediaBrowser:e.openMediaBrowser})})},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(313),n(31)),w=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():e.createElement(E.a,null)}}]),n}(y.Component);t.a=w}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(3),g=n.n(m),v=n(55),b=function(t){function n(){var e,t;o()(this,n);for(var r=arguments.length,a=new Array(r),i=0;i1?t.setState(function(e){return{menuVisible:!e.menuVisible}}):r(n[0])}),g()(h()(h()(t)),"handleItemClick",function(e){t.setState({menuVisible:!1}),t.props.onSelect(e)}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.buttonText,o=n.groups;return e.createElement("div",{className:"cf-complex__inserter"},e.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},r),o.length>1&&e.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},o.map(function(n,r){return e.createElement("li",{className:"cf-complex__inserter-item",key:r,onClick:function(){return t.handleItemClick(n)}},n.label)})))}}]),n}(n(2).Component);t.a=Object(v.a)(b)}).call(this,n(2))},function(e,t,n){"use strict";var r=u(n(305)),o=u(n(310)),a=u(n(116)),i=u(n(113));function u(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:a.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(319),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(80),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(63)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(86)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(44),o=n(190),a=n(191),i=n(192),u=n(193),s=n(194);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(33)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(199),o=n(206),a=n(208),i=n(209),u=n(210);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0?e.createElement("select",{id:n,name:r,value:o||Object(b.get)(a.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},a.options.map(function(t){return e.createElement("option",{key:t.value,value:t.value},t.label)})):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return i});var r=n(2),o=Object(r.createContext)(!1),a=o.Provider,i=o.Consumer},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(37))},function(e,t,n){var r=n(172),o=n(42);e.exports=function(e,t){return e&&r(e,t,o)}},function(e,t,n){var r=n(174),o=n(83),a=n(23),i=n(62),u=n(84),s=n(85),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),l=!n&&o(e),f=!n&&!l&&i(e),p=!n&&!l&&!f&&s(e),d=n||l||f||p,h=d?r(e.length,String):[],m=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||u(g,m))||h.push(g);return h}},function(e,t,n){var r=n(175),o=n(27),a=Object.prototype,i=a.hasOwnProperty,u=a.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!u.call(e,"callee")};e.exports=s},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&el))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=l}function E(){var e=o();if(y(e))return w(e);p=setTimeout(E,function(e){var n=t-(e-d);return g?u(n,l-(e-h)):n}(e))}function w(e){return p=void 0,v&&s?b(e):(s=c=void 0,f)}function x(){var e=o(),n=y(e);if(s=arguments,c=this,d=e,n){if(void 0===p)return function(e){return h=e,p=setTimeout(E,t),m?b(e):f}(d);if(g)return p=setTimeout(E,t),b(d)}return void 0===p&&(p=setTimeout(E,t)),f}return t=a(t)||0,r(n)&&(m=!!n.leading,l=(g="maxWait"in n)?i(a(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,s=d=c=p=void 0},x.flush=function(){return void 0===p?f:w(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(284)),o=a(n(286));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}p.contextTypes={transitionGroup:r.object},p.childContextTypes={transitionGroup:function(){}},p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},p.UNMOUNTED=0,p.EXITED=1,p.ENTERING=2,p.ENTERED=3,p.EXITING=4;var h=(0,i.polyfill)(p);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var l=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;l.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(114),i=n(311);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=l(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);f.childContextTypes={transitionGroup:r.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(f);t.default=p,e.exports=t.default},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),a=n(20),i=n.n(a),u=n(14),s=n(22),c=n(4),l=(n(320),n(148)),f=n(35);t.a=Object(u.compose)(Object(s.withSelect)(function(e,t){var n=e("carbon-fields/core"),r=n.getValidationError,o=n.isFieldVisible;return{error:r(t.id),hidden:!o(t.id)}}),Object(f.a)("carbon-fields.field-wrapper"))(function(t){var n=t.id,r=t.field,a=t.error,u=t.hidden,s=t.className,f=t.children,p=r.width?{flexBasis:"".concat(r.width,"%")}:null,d=["cf-field","cf-".concat(Object(c.kebabCase)(r.type)),{"cf-field--has-width":!!r.width,"cf-field--invalid":!!a},s].concat(o()(r.classes));return e.createElement("div",{className:i()(d),style:p,hidden:u},e.createElement("div",{className:"cf-field__head"},r.label&&e.createElement("label",{className:"cf-field__label",htmlFor:n},r.label,r.required&&e.createElement("span",{className:"cf-field__asterisk"},"*"))),!u&&e.createElement("div",{className:"cf-field__body"},f),u&&e.createElement(l.a,{className:"cf-field__body"},f),r.help_text&&e.createElement("em",{className:"cf-field__help",dangerouslySetInnerHTML:{__html:r.help_text}}),a&&e.createElement("span",{className:"cf-field__error"},a))})}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(17),i=n.n(a),u=n(16),s=n.n(u),c=n(6),l=n.n(c),f=n(7),p=n.n(f),d=n(8),h=n.n(d),m=n(9),g=n.n(m),v=n(10),b=n.n(v),y=n(0),E=n.n(y),w=n(3),x=n.n(w),O=n(38),_=n.n(O),C=n(5),k=n(2),S=n(14),j=n(19),D=n(18),A=n(20),M=n.n(A),T=n(4),F=n(11),P=n(26),N=(n(160),n(39)),I=n(36),L=n(54),R=function(t){function n(){var e,t;l()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&a.length>=r.max?alert(Object(C.sprintf)(Object(C.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(i(o,s()(a).concat([Object(T.pick)(e,"id","type","subtype")])),u({selectedOptions:s()(c).concat([e])})))}),x()(E()(E()(t)),"handleRemoveItem",function(e){var n=t.props,r=n.value,o=n.id,a=n.onChange,i=n.setState,u=n.selectedOptions;a(o,Object(T.without)(r,e)),i({selectedOptions:Object(T.without)(u,e)})}),x()(E()(E()(t)),"handleSort",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),t}return b()(n,t),p()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t(),this.sourceList.current.addEventListener("scroll",this.handleSourceListScroll)}},{key:"componentWillUnmount",value:function(){this.sourceList.current.removeEventListener("scroll",this.handleSourceListScroll)}},{key:"render",value:function(){var t=this,n=this.props,r=n.name,o=n.value,a=n.field,i=n.totalOptionsCount,u=n.selectedOptions,s=n.queryTerm,c=n.isLoading,l=this.props.options;return a.duplicates_allowed||(l=_()(l,function(e){e.map(function(e){return e.disabled=!!Object(T.find)(o,function(t){return Object(T.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),e.createElement(k.Fragment,null,e.createElement("div",{className:"cf-association__bar"},e.createElement(N.a,{value:s,onChange:this.handleSearchChange}),c?e.createElement("span",{className:"cf-association__spinner spinner is-active"}):"",e.createElement("span",{className:"cf-association__counter"},Object(C.sprintf)(Object(C.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(l.length),Number(i)))),e.createElement("div",{className:"cf-association__cols"},e.createElement("div",{className:"cf-association__col",ref:this.sourceList},l.map(function(n,r){return e.createElement("div",{className:M()("cf-association__option",{"cf-association__option--selected":n.disabled}),key:r},n.thumbnail&&e.createElement("img",{className:"cf-association__option-thumb",src:n.thumbnail}),e.createElement("div",{className:"cf-association__option-content"},e.createElement("span",{className:"cf-association__option-title"},e.createElement("span",{className:"cf-association__option-title-inner"},n.title)),e.createElement("span",{className:"cf-association__option-type"},n.type)),e.createElement("div",{className:"cf-association__option-actions"},e.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:n.edit_link.replace("&","&","g"),target:"_blank",rel:"noopener noreferrer"}),!n.disabled&&(a.max<0||o.length0&&t.length=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=(n(163),function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;t.setState({currentTab:Object(k.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),x()(E()(E()(t)),"handleToggleAllClick",function(){var e=t.props,n=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!n)}),x()(E()(E()(t)),"handleGroupsSortStart",function(e,n){var r=t.props,o=r.value,a=r.groupIdKey,i=n.item.index(),u=Object(k.get)(o,"".concat(i,".").concat(a),null);t.setState({currentDraggedGroup:u})}),x()(E()(E()(t)),"handleGroupsSortUpdate",function(e){var n=t.props,r=n.id;(0,n.onChange)(r,e)}),x()(E()(E()(t)),"handleGroupsSortStop",function(){t.setState({currentDraggedGroup:null})}),x()(E()(E()(t)),"handleTabsChange",function(e){t.setState({currentTab:e})}),t}return b()(n,t),p()(n,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(k.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=s()(e,2),o=r[0],a=r[1],u=Object(k.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(k.isString)(u.label_template))return u.label;try{return Object(k.template)(u.label_template)(i()({$_index:n},a))||u.label}catch(e){return console.error(Object(C.sprintf)(Object(C.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var t=this,n=this.state,r=n.currentDraggedGroup,a=n.currentTab,i=this.props,u=i.value,s=i.field,c=i.groupIdKey,l=i.groupFilterKey,f=i.allGroupsAreCollapsed,p=i.onGroupSetup,d=i.onGroupFieldSetup,h=i.onToggleGroup,m=this.getAvailableGroups(l),g=this.getGroupLabels(),v=u.map(function(e,t){return{id:e[c],label:g[t]}});return e.createElement(_.Fragment,null,this.isTabbed&&!!u.length&&e.createElement(S.a,{items:u,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===s.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},e.createElement(j.a,{ref:this.tabsList,items:v,current:a,layout:s.layout,onChange:this.handleTabsChange},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:"+",groups:m,onSelect:this.handleAddGroup}))),!u.length&&e.createElement(M.a,{label:"There are no entries yet."},e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup})),!!u.length&&e.createElement(S.a,{items:u,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},e.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},u.map(function(n,i){return e.createElement(A.a,o()({key:"".concat(n[l],"-").concat(i)},p(n,{index:i,label:g[i],dragged:n[c]===r,tabbed:t.isTabbed,hidden:t.isTabbed&&n[c]!==a,allowClone:s.duplicate_groups_allowed&&!t.isMaximumReached,onFieldSetup:d,onClone:t.handleCloneGroup,onRemove:t.handleRemoveGroup,onToggle:h})))}))),!this.isTabbed&&!!u.length&&e.createElement("div",{className:"cf-complex__actions"},!!m.length&&!this.isMaximumReached&&e.createElement(D.a,{buttonText:this.inserterButtonText,groups:m,onSelect:this.handleAddGroup}),e.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},f?Object(C.__)("Expand All","carbon-fields-ui"):Object(C.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(C.sprintf)(Object(C.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),n}(_.Component);Object(O.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(t){return function(n){var r=n.field;return"complex"!==r.type?e.createElement(t,n):e.createElement(t,o()({className:"cf-complex--".concat(r.layout)},n))}}),Object(O.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(k.isEmpty)(t))return Object(C.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===l.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);l.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return l.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();f.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},f.defaultProps={options:{}},t.default=f},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=function(t){function n(){return i()(this,n),l()(this,p()(n).apply(this,arguments))}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this.props,n=t.name,r=t.value,a=t.field;return e.createElement("input",o()({type:"hidden",name:n,value:r,className:"hidden-text"},a.attributes))}}]),n}(n(2).Component);t.a=m}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(2);t.a=function(t){var n=t.field;return e.createElement(r.RawHTML,{className:"cf-html__content"},n.html)}}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(26),x=n(2),O=n(5),_=n(18),C=n(4),k=n(11),S=(n(295),n(39)),j=n(132),D=function(t){function n(){var e,t;s()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1})}),t}return p()(n,t),i()(n,[{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?e.createElement(b.a,{id:n,name:r,value:this.filterValues(o),options:a.options,delimiter:a.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):e.createElement(y.a,null)}}]),n}(v.Component);t.a=E}).call(this,n(2))},function(e,t,n){(function(t){for(var r=n(304),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],c=0;!u&&c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){l.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(14),w=n(5),x=n(18),O=n(11),_=n(26),C=n(4),k=(n(312),n(39)),S=n(141),j=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var t=this.props,n=t.id,r=t.name,o=t.value,a=t.embedCode,i=t.embedType,u=t.provider;return e.createElement("div",{ref:this.node},e.createElement(k.a,{id:n,value:o,onChange:this.handleChange}),a?e.createElement(S.a,{html:a,type:i,provider:u}):null,e.createElement("input",{type:"hidden",name:r,value:o,readOnly:!0}))}}]),n}(y.Component),D=Object(E.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),A=Object(x.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=o()(t,2),r=n[0],a=n[1],i=Object(O.pipe)(Object(_.a)({onFetchEmbedCode:a}),Object(O.map)(x.toProps)),u=Object(O.pipe)(r,Object(O.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(O.merge)(i,u)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(w.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(w.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}});t.a=Object(E.compose)(D,A)(j)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(0),h=n.n(d),m=n(2),g=function(t){function n(){var e;return o()(this,n),(e=s()(this,l()(n).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(h()(h()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(h()(h()(e))),e}return p()(n,t),i()(n,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,c=u.height;"resize"!==o||s===a&&c===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var t=this;return e.createElement("div",{className:"cf-oembed__preview"},e.createElement("iframe",{ref:function(e){return t.iframe=e},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var t="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",n="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(t,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),r=e.createElement("html",{lang:document.documentElement.lang},e.createElement("head",null,e.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),e.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},e.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),e.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:n}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(m.renderToString)(r)),this.iframe.contentWindow.document.close()}}}]),n}(m.Component);t.a=g}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(13),o=n.n(r),a=n(29),i=n(57);n(314),t.a=Object(a.a)(function(t){return o()({},t,{field:o()({},t.field,{options:t.field.options.map(function(t){return o()({},t,{label:e.createElement("img",{className:"cf-radio-image__image",src:t.label})})})})})})(i.a)}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(13),i=n.n(a),u=n(6),s=n.n(u),c=n(7),l=n.n(c),f=n(8),p=n.n(f),d=n(9),h=n.n(d),m=n(10),g=n.n(m),v=n(0),b=n.n(v),y=n(3),E=n.n(y),w=n(2),x=n(5),O=n(4),_=n(20),C=n.n(_),k=function(t){function n(){var e;return s()(this,n),e=p()(this,h()(n).call(this)),E()(b()(b()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(O.isString)(t)?t:t.target.value)}),E()(b()(b()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=i()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=i()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return g()(n,t),l()(n,[{key:"componentDidMount",value:function(){this.props.visible&&(this.timer=setTimeout(this.initEditor,250))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.destroyEditor()}},{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field,s=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":u.rich_editing},{"html-active":!u.rich_editing}],c=u.media_buttons?Object(O.template)(u.media_buttons)({id:r}):null;return e.createElement("div",{id:"wp-".concat(r,"-wrap"),className:C()(s),ref:function(e){return t.editorNode=e}},u.media_buttons&&e.createElement("div",{id:"wp-".concat(r,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},e.createElement("span",{dangerouslySetInnerHTML:{__html:c}})),u.rich_editing&&e.createElement("div",{className:"wp-editor-tabs"},e.createElement("button",{type:"button",id:"".concat(r,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":r},Object(x.__)("Visual","carbon-fields-ui")),e.createElement("button",{type:"button",id:"".concat(r,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":r},Object(x.__)("Text","carbon-fields-ui"))),e.createElement("div",{id:"wp-".concat(r,"-editor-container"),className:"wp-editor-container"},e.createElement("textarea",o()({style:{width:"100%"},className:"regular-text",id:r,name:a,value:i,onChange:this.handleChange},u.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),n}(w.Component);t.a=k}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(6),o=n.n(r),a=n(7),i=n.n(a),u=n(8),s=n.n(u),c=n(9),l=n.n(c),f=n(10),p=n.n(f),d=n(2),h=(n(316),function(t){function n(){return o()(this,n),s()(this,l()(n).apply(this,arguments))}return p()(n,t),i()(n,[{key:"render",value:function(){return e.createElement("h3",null,this.props.field.label)}}]),n}(d.Component));t.a=h}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(15),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(2),E=n(4),w=(n(317),n(31)),x=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;a-1}),t}return h()(n,t),s()(n,[{key:"render",value:function(){var t=this,n=this.props,r=n.id,a=n.name,i=n.value,u=n.field;return u.options.length>0?e.createElement("ul",{className:"cf-set__list"},u.options.map(function(n,s){return e.createElement("li",{className:"cf-set__list-item",key:s},e.createElement("input",o()({type:"checkbox",id:"".concat(r,"-").concat(n.value),name:"".concat(a,"[]"),checked:t.isChecked(i,n),value:n.value,className:"cf-set__input",onChange:t.handleChange},u.attributes)),e.createElement("label",{className:"cf-set__label",htmlFor:"".concat(r,"-").concat(n.value)},n.label))})):e.createElement(w.a,null)}}]),n}(y.Component);t.a=x}).call(this,n(2))},function(e,t,n){"use strict";(function(e){var r=n(17),o=n.n(r),a=n(6),i=n.n(a),u=n(7),s=n.n(u),c=n(8),l=n.n(c),f=n(9),p=n.n(f),d=n(10),h=n.n(d),m=n(0),g=n.n(m),v=n(3),b=n.n(v),y=n(26),E=n(2),w=n(5),x=n(18),O=n(4),_=n(11),C=function(t){function n(){var e,t;i()(this,n);for(var r=arguments.length,o=new Array(r),a=0;ar&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===f.inserted[v]&&(n="",h(e,t),f.inserted[v]=n)}var O=function(){var e=w.apply(this,arguments),t=a+"-"+v;return void 0===f.registered[t]&&(f.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==f.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){f.inserted[e]=!0}if(l){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){l&&(d.flush(),d.inject()),f.inserted={},f.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},O=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},C=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function A(e){return D(e)?window.pageYOffset:e.scrollTop}function M(e,t){D(e)?window.scrollTo(0,t):e.scrollTop=t}function T(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:k,a=A(e),i=t-a,u=0;!function t(){var s,c=i*((s=(s=u+=10)/n-1)*s*s+1)+a;M(e,c),u=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&T(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&w>=r)return a&&T(s,_,160),{placement:"bottom",maxHeight:i?w-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&E>=r)&&(k=i?E-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return M(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(E>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&T(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&E>=r){var S=t;return(!i&&x>=r||i&&E>=r)&&(S=i?E-y:x-y),a&&T(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return c}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!l,isFixedPosition:l,theme:s});c&&c(f),r.setState(f)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||P(e);return E({},r.props,{placement:t,maxHeight:r.state.maxHeight})},O(r,n)}return w(t,e),b(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(a.Component);N.contextTypes={getPortalPlacement:l.a.func};var I=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},L=I,R=I,H=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};H.defaultProps={children:"No options"};var V=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};V.defaultProps={children:"Loading..."};var B=function(e){function t(){var e,n,r;v(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=l-f-c,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),p.scrollTop=l,m=!0,r.isBottom=!0):!d&&-t>c&&(i&&!r.isTop&&i(e),p.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},O(r,n)}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return i.a.createElement(Z,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(a.Component),le=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=x(e,["isEnabled"]);return t?i.a.createElement(ce,n):this.props.children}}]),t}(a.Component);le.defaultProps={isEnabled:!0};var fe=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,s=e.hasValue;return i.a.createElement("div",{className:r(Object(u.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s},n)},t)}}]),t}(a.Component),pe=function(e){var t=e.size,n=x(e,["size"]);return i.a.createElement("svg",E({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(u.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},de=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},he=function(e){return i.a.createElement(pe,E({size:20},e),i.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},me=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},ge=me,ve=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};ve.defaultProps={children:i.a.createElement(he,null)};var be=me,ye=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({},a,{className:r(Object(u.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};ye.defaultProps={children:i.a.createElement(de,null)};var Ee=function(e){var t=e.color,n=e.delay,r=e.offset;return i.a.createElement("span",{className:Object(u.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(u.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var we=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,s=e.isRtl,c=e.theme.colors,l=a?c.neutral80:c.neutral20;return i.a.createElement("div",E({},o,{className:n(Object(u.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),i.a.createElement(Ee,{color:l,delay:0,offset:s}),i.a.createElement(Ee,{color:l,delay:160,offset:!0}),i.a.createElement(Ee,{color:l,delay:320,offset:!s}))};we.defaultProps={size:4};var xe=function(e){var t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)},Oe=xe,_e=xe,Ce=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return i.a.createElement("div",n,t)}}]),t}(a.Component);Ce.defaultProps={children:i.a.createElement(de,{size:14})};var ke=function(e){function t(){return v(this,t),O(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w(t,e),b(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,s=e.getStyles,c=e.innerProps,l=e.isDisabled,f=e.removeProps,p=e.selectProps,d=r.Container,h=r.Label,m=r.Remove,g=E({className:o(Object(u.a)(s("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":l},n)},c),v={className:o(Object(u.a)(s("multiValueLabel",this.props)),{"multi-value__label":!0},n)},b=E({className:o(Object(u.a)(s("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},f);return i.a.createElement(d,{data:a,innerProps:g,selectProps:p},i.a.createElement(h,{data:a,innerProps:v,selectProps:p},t),i.a.createElement(m,{data:a,innerProps:b,selectProps:p}))}}]),t}(a.Component);ke.defaultProps={cropWithEllipsis:!0};var Se={ClearIndicator:ye,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,s=e.isFocused,c=e.innerRef,l=e.innerProps;return i.a.createElement("div",E({ref:c,className:n(Object(u.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":s},o)},l),t)},DropdownIndicator:ve,DownChevron:he,CrossIcon:de,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,s=e.headingProps,c=e.label,l=e.theme;return i.a.createElement("div",{className:r(Object(u.a)(o("group",e)),{group:!0},n)},i.a.createElement(a,E({},s,{theme:l,getStyles:o,cx:r}),c),i.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=x(e,["className","cx","getStyles","theme"]);return i.a.createElement("div",E({className:n(Object(u.a)(r("groupHeading",E({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return i.a.createElement("div",{className:r(Object(u.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return i.a.createElement("span",E({},o,{className:n(Object(u.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,s=e.isDisabled,c=e.theme,l=x(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return i.a.createElement("div",{className:Object(u.a)(r("input",E({theme:c},l)))},i.a.createElement(p.a,E({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:s},l)))},LoadingIndicator:we,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,s=e.innerProps,c=r(Object(u.a)(o("menu",e)),{menu:!0},n);return i.a.createElement("div",E({className:c},s,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,s=e.innerRef;return i.a.createElement("div",{className:r(Object(u.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:s},t)},MenuPortal:B,LoadingMessage:V,NoOptionsMessage:H,MultiValue:ke,MultiValueContainer:Oe,MultiValueLabel:_e,MultiValueRemove:Ce,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.isFocused,c=e.isSelected,l=e.innerRef,f=e.innerProps;return i.a.createElement("div",E({ref:l,className:r(Object(u.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":c},n)},f),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,s=e.isDisabled,c=e.isRtl;return i.a.createElement("div",E({className:r(Object(u.a)(o("container",e)),{"--is-disabled":s,"--is-rtl":c},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,s=e.innerProps;return i.a.createElement("div",E({className:r(Object(u.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},s),t)},ValueContainer:fe},je=function(e){return E({},Se,e.components)},De={clearIndicator:be,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:ge,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:R,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return y(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),y(t,"backgroundColor",i.neutral0),y(t,"borderRadius",o),y(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),y(t,"marginBottom",a.menuGutter),y(t,"marginTop",a.menuGutter),y(t,"position","absolute"),y(t,"width","100%"),y(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:L,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ae={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Me={backspaceRemovesValue:!0,blurInputOnSelect:F(),captureMenuScroll:!F(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=E({ignoreCase:!0,ignoreAccents:!0,stringify:K,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?$(t):t,c=i?$(a(e)):a(e);return r&&(s=s.toLowerCase(),c=c.toLowerCase()),o&&(s=q(s),c=q(c)),"start"===u?c.substr(0,s.length)===s:c.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Te=1,Fe=function(e){function t(e){v(this,t);var n=O(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pe.call(n);var r=e.value;n.cacheComponents=h(n.cacheComponents,Y).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Te);var o=j(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return w(t,e),b(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=j(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!u&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?M(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,c=-1;if(a.length){switch(e){case"previous":c=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ae):E({},Ae,this.props.theme):Ae}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,c=this.state.selectValue,l=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+S(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:l,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var c=a?void 0:function(){return n.onOptionHover(e)},l=a?void 0:function(){return n.selectOption(e)},f=n.getElementId("option")+"-"+r;return{innerProps:{id:f,onClick:l,onMouseMove:c,onMouseOver:c,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:f,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,c=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,u=this.components.Input,s=this.state.inputIsHidden,c=r||this.getElementId("input");if(!n)return i.a.createElement(J,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:k,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,d=f.theme;return i.a.createElement(u,E({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:d,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,u=t.SingleValue,s=t.Placeholder,c=this.commonProps,l=this.props,f=l.controlShouldRenderValue,p=l.isDisabled,d=l.isMulti,h=l.inputValue,m=l.placeholder,g=this.state,v=g.selectValue,b=g.focusedValue;if(!this.hasValue()||!f)return h?null:i.a.createElement(s,E({},c,{key:"placeholder",isDisabled:p}),m);if(d)return v.map(function(t){var u=t===b;return i.a.createElement(n,E({},c,{components:{Container:r,Label:o,Remove:a},isFocused:u,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var y=v[0];return i.a.createElement(u,E({},c,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var u={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:u,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?i.a.createElement(e,E({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return i.a.createElement(n,E({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return i.a.createElement(e,E({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,u=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,l=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,h=p.menuOptions,m=this.props,g=m.captureMenuScroll,v=m.inputValue,b=m.isLoading,y=m.loadingMessage,w=m.minMenuHeight,O=m.maxMenuHeight,_=m.menuIsOpen,C=m.menuPlacement,k=m.menuPosition,S=m.menuPortalTarget,j=m.menuShouldBlockScroll,D=m.menuShouldScrollIntoView,A=m.noOptionsMessage,M=m.onMenuScrollToTop,T=m.onMenuScrollToBottom;if(!_)return null;var F=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,i.a.createElement(l,E({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},P=void 0;if(this.hasOptions())P=h.render.map(function(t){if("group"===t.type){t.type;var o=x(t,["type"]),a=t.key+"-heading";return i.a.createElement(n,E({},f,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return F(e)}))}if("option"===t.type)return F(t)});else if(b){var I=y({inputValue:v});if(null===I)return null;P=i.a.createElement(s,f,I)}else{var L=A({inputValue:v});if(null===L)return null;P=i.a.createElement(c,f,L)}var R={minMenuHeight:w,maxMenuHeight:O,menuPlacement:C,menuPosition:k,menuShouldScrollIntoView:D},H=i.a.createElement(N,E({},f,R),function(t){var n=t.ref,r=t.placerProps,u=r.placement,s=r.maxHeight;return i.a.createElement(o,E({},f,R,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:u}),i.a.createElement(le,{isEnabled:g,onTopArrive:M,onBottomArrive:T},i.a.createElement(se,{isEnabled:j},i.a.createElement(a,E({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),P))))});return S||"fixed"===k?i.a.createElement(u,E({},f,{appendTo:S,controlElement:this.controlRef,menuPlacement:C,menuPosition:k}),H):H}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,u=this.state.selectValue;if(a&&!r){if(o){if(n){var s=u.map(function(t){return e.getOptionValue(t)}).join(n);return i.a.createElement("input",{name:a,type:"hidden",value:s})}var c=u.length>0?u.map(function(t,n){return i.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):i.a.createElement("input",{name:a,type:"hidden"});return i.a.createElement("div",null,c)}var l=u[0]?this.getOptionValue(u[0]):"";return i.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?i.a.createElement(X,{"aria-live":"assertive"},i.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),i.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,u=a.className,s=a.id,c=a.isDisabled,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return i.a.createElement(r,E({},f,{className:u,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:l}),this.renderLiveRegion(),i.a.createElement(t,E({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:l}),i.a.createElement(o,E({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),i.a.createElement(n,E({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(a.Component);Fe.defaultProps=Me;var Pe=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=je({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(C(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=De[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,E({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&D(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=_(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=_(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,c=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof l&&(l(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!c||!f||!m||p&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(c){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":c?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!c){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":c?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":c?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!c)return;e.focusOption("pageup");break;case"PageDown":if(!c)return;e.focusOption("pagedown");break;case"Home":if(!c)return;e.focusOption("first");break;case"End":if(!c)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Ne=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;v(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=c(n(1)),o=c(n(21)),a=c(n(25)),i=n(52),u=c(n(289)),s=c(n(290));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,c=e.hsv,l=e.hsl,f=e.onChange,p=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:l,hsv:c,onChange:f})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:l,onChange:f})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:l,renderers:m,onChange:f}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:l,hex:o,onChange:f,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:f,onSwatchHover:p}))};l.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},l.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(l)},function(e,t,n){"use strict";var r=n(167);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(169)),o=u(n(61)),a=u(n(180)),i=u(n(181));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(32),o=n(23),a=n(27);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(41),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(173)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(45);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(44);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(44),o=n(71),a=n(72);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(87),o=n(196),a=n(28),i=n(91),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t,n){var r,o=n(197),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(200),o=n(44),a=n(71);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(201),o=n(202),a=n(203),i=n(204),u=n(205);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(244);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(69),o=n(104),a=n(105),i=n(246),u=n(247),s=n(250),c=n(251),l=n(252),f=n(253),p=n(95),d=n(254),h=n(48),m=n(255),g=n(256),v=n(261),b=n(23),y=n(62),E=n(263),w=n(28),x=n(265),O=n(42),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var T,F=1&n,P=2&n,N=4&n;if(j&&(T=A?j(t,D,A,M):j(t)),void 0!==T)return T;if(!w(t))return t;var I=b(t);if(I){if(T=m(t),!F)return c(t,T)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,F);if(L==k||L==_||R&&!A){if(T=P||R?{}:v(t),!F)return P?f(t,u(T,t)):l(t,i(T,t))}else{if(!S[L])return A?t:{};T=g(t,L,F)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,T),x(t))return t.forEach(function(r){T.add(e(r,n,j,r,t,M))}),T;if(E(t))return t.forEach(function(r,o){T.set(o,e(r,n,j,o,t,M))}),T;var V=N?P?d:p:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(T,o,e(r,n,j,o,t,M))}),T}},function(e,t,n){var r=n(33),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(51),o=n(42);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(51),o=n(107);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(28),o=n(67),a=n(249),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(63)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var c=arguments.length,l=Array(c),f=0;f1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*c/a)/100,n.hsl.a!==l)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:l,source:"rgb"}}else{var f;if(f=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==f)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:f,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*c/a+100)/100,n.hsl.h!==l)return{h:l,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var f=void 0;if(f=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==f)return{h:f,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?c=a:l<0?l=0:l>i&&(l=i);var f=100*c/a,p=-100*l/i+100;return{h:n.hsl.h,s:f,v:p,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=F(e,360),t=F(t,100),n=F(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,f,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=T(s),{ok:h,format:e.format||m,r:c(255,l(u.r,0)),g:c(255,l(u.g,0)),b:c(255,l(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r,o,a=l(e,t,n),i=c(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(p(r));return a}function D(e,t){t=t||6;for(var n=p(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(p({h:r,s:o,v:a})),a=(a+u)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*F(this._r,255))+"%",g:s(100*F(this._g,255))+"%",b:s(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%)":"rgba("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=p(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:f(),g:f(),b:f()})},p.mix=function(e,t,n){n=0===n?0:n||50;var r=p(e).toRgb(),o=p(t).toRgb(),a=n/100;return p({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},p.readability=function(e,t){var n=p(e),r=p(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},p.isReadable=function(e,t,n){var r,o,a=p.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},p.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;cs&&(s=r,u=p(t[c]));return p.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var A=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return c(1,l(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(r=function(){return p}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:l.fields,className:"flexbox-fix"},r.default.createElement("div",{style:l.double},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"hex",value:s.replace("#",""),onChange:f})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"r",value:n.r,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"g",value:n.g,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.single},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"b",value:n.b,onChange:f,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:l.alpha},r.default.createElement(i.EditableInput,{style:{input:l.input,label:l.label},label:"a",value:Math.round(100*n.a),onChange:f,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},c={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},l=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},f=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r,a){if(0===e||e){var s,c=a||o,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var f=t||(n||g).dateFormat,p=String(e).trim();if("today"===p)s=new Date,r=!0;else if(/Z$/.test(p)||/GMT$/.test(p))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,f);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function E(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(l=o===s.hourElement?l-i-t(!s.amPM):a,p&&N(void 0,1,s.hourElement)),s.amPM&&f&&(1===u?l+c===23:Math.abs(l-c)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(l)}}(n);var r=s._input.value;C(),ge(),s._input.value!==r&&s._debouncedChange()}}function C(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var c=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,c.getHours()))===c.getHours()&&(o=Math.max(o,c.getMinutes())),o===c.getMinutes()&&(a=Math.max(a,c.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function F(){fe("onChange")}function T(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function L(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===p(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===p(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===p(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&p(e,s.selectedDates[0])>=0&&p(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),fe("onDayCreate",a),a}function R(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var c=o.children[u];if(-1===c.className.indexOf("hidden")&&J(c.dateObj))return c}}function V(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,c=i.children.length,l=u;l>=0&&l0?c:-1);l+=o){var f=i.children[l];if(-1===f.className.indexOf("hidden")&&J(f.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return R(f)}s.changeMonth(o),V(H(o),0)}(r,t):R(r)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",c=i?"nextMonthDay hidden":"nextMonthDay",l=r+1-n,f=0;l<=r;l++,f++)a.appendChild(L(u,new Date(e,t-1,l),l,f));for(l=1;l<=o;l++,f++)a.appendChild(L("",new Date(e,t,l),l,f));for(var p=o+1;p<=42-n&&(1===s.config.showMonths||f%7!=0);p++,f++)a.appendChild(L(c,new Date(e,t+1,p%o),p,f));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,fe("onYearChange")),U(),fe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),fe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&p(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&p(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),V(H(1),0)):V(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),V(H(1),0)):a||V(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var c=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),l=c.indexOf(e.target);if(-1!==l){var f=c[l+(e.shiftKey?-1:1)];void 0!==f?(e.preventDefault(),f.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],C(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],C(),ge()}fe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,c=0,l=r;lr&&lu)?u=l:l>n&&(!c||l0&&l0&&l>c;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=l||(nt&&l===n&&a.classList.add("endRange"),l>=u&&(0===c||l<=c)&&d(l,n,t)&&a.classList.add("inRange")))))},v=0,b=p.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===_.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},_.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?_.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=l(s),s.parseDate=f({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){fe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),c=window.innerHeight-u.bottom,l="above"===a||"below"!==a&&cn,f=window.pageYOffset+u.top+(l?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!l),v(s.calendarContainer,"arrowBottom",l),!s.config.inline){var p=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=p+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=f+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=p+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==p(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&fe("onYearChange"),fe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():R(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,c="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||c)&&ie()}F()}}s.parseDate=f({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&fe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),fe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&fe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=T,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void fe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),fe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),T(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);ce(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),T(),k(),ge(t),t&&fe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function ce(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function le(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function fe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&fe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=le(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=le(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):_.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):_.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var c=0;c-1?s.config[p]=r(f[p]).map(g).concat(s.config[p]):void 0===t[p]&&(s.config[p]=f[p])}fe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&ce(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),fe("onChange"),fe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(F,w),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),F()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),fe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},c={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},l=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},f=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?c:r;return function(e,t,r,a){if(0===e||e){var s,c=a||o,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var f=t||(n||g).dateFormat,p=String(e).trim();if("today"===p)s=new Date,r=!0;else if(/Z$/.test(p)||/GMT$/.test(p))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,f);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function E(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(l=o===s.hourElement?l-i-t(!s.amPM):a,p&&N(void 0,1,s.hourElement)),s.amPM&&f&&(1===u?l+c===23:Math.abs(l-c)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(l)}}(n);var r=s._input.value;C(),ge(),s._input.value!==r&&s._debouncedChange()}}function C(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===p(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var c=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,c.getHours()))===c.getHours()&&(o=Math.max(o,c.getMinutes())),o===c.getMinutes()&&(a=Math.max(a,c.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function T(){fe("onChange")}function F(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function L(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===p(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===p(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===p(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&p(e,s.selectedDates[0])>=0&&p(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),fe("onDayCreate",a),a}function R(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var c=o.children[u];if(-1===c.className.indexOf("hidden")&&J(c.dateObj))return c}}function V(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,c=i.children.length,l=u;l>=0&&l0?c:-1);l+=o){var f=i.children[l];if(-1===f.className.indexOf("hidden")&&J(f.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return R(f)}s.changeMonth(o),V(H(o),0)}(r,t):R(r)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",c=i?"nextMonthDay hidden":"nextMonthDay",l=r+1-n,f=0;l<=r;l++,f++)a.appendChild(L(u,new Date(e,t-1,l),l,f));for(l=1;l<=o;l++,f++)a.appendChild(L("",new Date(e,t,l),l,f));for(var p=o+1;p<=42-n&&(1===s.config.showMonths||f%7!=0);p++,f++)a.appendChild(L(c,new Date(e,t+1,p%o),p,f));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,fe("onYearChange")),U(),fe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),fe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&p(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&p(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),V(H(1),0)):V(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),V(H(1),0)):a||V(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var c=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),l=c.indexOf(e.target);if(-1!==l){var f=c[l+(e.shiftKey?-1:1)];void 0!==f?(e.preventDefault(),f.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],C(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],C(),ge()}fe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,c=0,l=r;lr&&lu)?u=l:l>n&&(!c||l0&&l0&&l>c;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=l||(nt&&l===n&&a.classList.add("endRange"),l>=u&&(0===c||l<=c)&&d(l,n,t)&&a.classList.add("inRange")))))},v=0,b=p.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===_.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},_.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?_.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=l(s),s.parseDate=f({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){fe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),c=window.innerHeight-u.bottom,l="above"===a||"below"!==a&&cn,f=window.pageYOffset+u.top+(l?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!l),v(s.calendarContainer,"arrowBottom",l),!s.config.inline){var p=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=p+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=f+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=p+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==p(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&fe("onYearChange"),fe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():R(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,c="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||c)&&ie()}T()}}s.parseDate=f({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&fe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),fe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&fe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=F,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void fe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),fe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),F(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);ce(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),F(),k(),ge(t),t&&fe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function ce(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function le(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function fe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&fe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=le(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=le(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):_.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):_.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var c=0;c-1?s.config[p]=r(f[p]).map(g).concat(s.config[p]):void 0===t[p]&&(s.config[p]=f[p])}fe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&ce(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),fe("onChange"),fe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(T,w),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),T()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),fe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(e[s=l[c]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&E(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!E(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=g,f.ok=v,f.equal=function(e,t,n){e!=t&&g(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(37))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var c,E="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(E=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(E=" "+RegExp.prototype.toString.call(n)),w(n)&&(E=" "+Date.prototype.toUTCString.call(n)),x(n)&&(E=" "+f(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,C)):C[0]+E+C[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return E(e)&&"[object RegExp]"===_(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===_(e)}function x(e){return E(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=E,t.isDate=w,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(299);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(300),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(37),n(112))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(112))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(306)),o=u(n(309)),a=u(n(1)),i=u(n(113));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var c=o in t,l=o in u,f=t[o],p=(0,r.isValidElement)(f)&&!f.props.in;!l||c&&!p?l||!c||p?l&&c&&(0,r.isValidElement)(f)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:f.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(p.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return f()({},e,c()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(p.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function h(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function m(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function g(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function v(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function b(e,t){return e.validation[t]||null}function y(e,t){return-1===e.hiddenFields.indexOf(t)}Object(u.registerStore)("carbon-fields/core",{reducer:d,actions:r,selectors:o});var E=n(19),w=n.n(E),x=n(14),O=n(35),_=n(34),C=n(118),k=n(120),S=n(121),j=n(124),D=n(29),A=n(40),M=Object(D.a)(function(e){return f()({},e,{buttonText:Object(a.__)("Select Date","carbon-fields-ui")})})(A.a),F=n(77),T=n(129),P=n(130),N=n(131),I=n(134),L=n(136),R=n(140),H=n(57),V=n(142),B=n(143),U=n(78),z=n(144),W=n(145),Y=n(146),G=n(147),q=n(60),$=Object(D.a)(function(e){return f()({},e,{icon:"clock",buttonText:Object(a.__)("Select Time","carbon-fields-ui")})})(A.a);Object(i.addFilter)("carbon-fields.register-field-type","carbon-fields/core",function(e,t,n){return Object(x.compose)(Object(O.a)("carbon-fields.field-edit.".concat(t)),Object(O.a)("carbon-fields.".concat(e,".").concat(t)))(n)}),[["association",C.a],["checkbox",k.a],["color",S.a],["complex",j.a],["date",M],["date_time",A.a],["file",F.a],["footer_scripts",q.a],["gravity_form",U.a],["header_scripts",q.a],["hidden",T.a],["html",P.a],["image",F.a],["map",N.a],["multiselect",L.a],["media_gallery",I.a],["oembed",R.a],["radio",H.a],["radio_image",V.a],["rich_text",B.a],["select",U.a],["separator",z.a],["set",W.a],["sidebar",Y.a],["text",G.a],["textarea",q.a],["time",$]].forEach(function(e){return _.b.apply(void 0,w()(e))});var K=n(53),X=n(117),J=n(16),Z=n.n(J),Q=function(e,t){return e===t},ee=n(17),te=n(11),ne=Object(ee.withEffects)(function(e,t){if(t.field.required){var n=e.mount,r=e.unmount,o=e.observe("value"),a=e.observe("visible");return Object(te.merge)(Object(te.pipe)(Object(te.combine)(o,a,n),Object(te.filter)(function(e){return Z()(e,2)[1]}),Object(te.take)(1),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:Z()(e,1)[0],transient:!0}}})),Object(te.pipe)(o,function(e){return function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(o=n,e(0,function(e,t){0===e?(a=t)(1):1===e&&(i=!0,a(2))})),1===t?i?r(1,n):o(1):r(t,n)})}}}}(n),function(e){return void 0===e&&(e=Q),function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(a=n),1===t?i&&e(o,n)?a(1):(i=!0,o=n,r(1,n)):r(t,n)})}}}}(),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:e,transient:!1}}})),Object(te.pipe)(r,Object(te.map)(function(){return{type:"RESET"}})))}},{handler:function(e){return function(t){var n=e.id,r=e.field,o=e.markAsInvalid,u=e.markAsValid,s=e.lockSaving,c=e.unlockSaving;switch(t.type){case"VALIDATE":var l=t.payload,f=l.value,d=l.transient,h="carbon-fields.".concat(r.type,".validate"),m=Object(i.hasFilter)(h)?Object(i.applyFilters)(h,r,f):function(e){var t=Object(p.isObject)(e);return t&&!Object(p.isEmpty)(e)||!t&&e?null:Object(a.__)("This field is required.","carbon-fields-ui")}(f);m?(d||o(n,m),s(n)):(d||u(n),c(n));break;case"RESET":u(n),c(n)}}}}),re=Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{markAsValid:t.markAsValid,markAsInvalid:t.markAsInvalid}}),oe=Object(x.compose)(re,ne);function ae(e,t){function n(t,n){if(!Object(p.isEmpty)(n.field.conditional_logic))return e(n,t)}function r(e){return function(n){var r=e.field.conditional_logic,o=r.relation,i=r.rules,u=t(e,n),s=i.reduce(function(e,t){if(!Object(p.has)(u,t.field))return console.error(Object(a.sprintf)(Object(a.__)('An unknown field is used in condition - "%s"',"carbon-fields-ui"),t.field)),e.concat(!1);var n=function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;case">":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(p.some)(n,function(t){return t==e});case"NOT IN":return Object(p.every)(n,function(t){return t!=e});case"INCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),c=!1;switch(o){case"AND":c=Object(p.every)(s);break;case"OR":c=Object(p.some)(s)}c?e.showField(e.id):e.hideField(e.id)}}return Object(x.createHigherOrderComponent)(function(e){return Object(x.compose)(Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(u.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(ee.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var ie=n(149),ue=n.n(ie),se="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function ce(){return"cf-".concat(ue()(se,21))}function le(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(e[s=l[c]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function E(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function w(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&E(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!E(o,n)||!e&&o)throw o}f.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(f.AssertionError,Error),f.fail=g,f.ok=v,f.equal=function(e,t,n){e!=t&&g(e,t,n,"==",f.equal)},f.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",f.notEqual)},f.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",f.strictEqual)},f.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",f.notStrictEqual)},f.throws=function(e,t,n){w(!0,e,t,n)},f.doesNotThrow=function(e,t,n){w(!1,e,t,n)},f.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(37))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=l(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return f(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var c,E="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(E=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(E=" "+RegExp.prototype.toString.call(n)),w(n)&&(E=" "+Date.prototype.toUTCString.call(n)),x(n)&&(E=" "+f(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,E,C)):C[0]+E+C[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return E(e)&&"[object RegExp]"===_(e)}function E(e){return"object"==typeof e&&null!==e}function w(e){return E(e)&&"[object Date]"===_(e)}function x(e){return E(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=E,t.isDate=w,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(299);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(300),t._extend=function(e,t){if(!t||!E(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(37),n(112))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(112))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(306)),o=u(n(309)),a=u(n(1)),i=u(n(113));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var c=o in t,l=o in u,f=t[o],p=(0,r.isValidElement)(f)&&!f.props.in;!l||c&&!p?l||!c||p?l&&c&&(0,r.isValidElement)(f)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:f.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(p.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return f()({},e,c()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(p.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function h(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function m(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function g(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function v(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function b(e,t){return e.validation[t]||null}function y(e,t){return-1===e.hiddenFields.indexOf(t)}Object(u.registerStore)("carbon-fields/core",{reducer:d,actions:r,selectors:o});var E=n(16),w=n.n(E),x=n(14),O=n(35),_=n(34),C=n(118),k=n(120),S=n(121),j=n(124),D=n(29),A=n(40),M=Object(D.a)(function(e){return f()({},e,{buttonText:Object(a.__)("Select Date","carbon-fields-ui")})})(A.a),T=n(77),F=n(129),P=n(130),N=n(131),I=n(134),L=n(136),R=n(140),H=n(57),V=n(142),B=n(143),U=n(78),z=n(144),W=n(145),Y=n(146),G=n(147),q=n(60),$=Object(D.a)(function(e){return f()({},e,{icon:"clock",buttonText:Object(a.__)("Select Time","carbon-fields-ui")})})(A.a);Object(i.addFilter)("carbon-fields.register-field-type","carbon-fields/core",function(e,t,n){return Object(x.compose)(Object(O.a)("carbon-fields.field-edit.".concat(t)),Object(O.a)("carbon-fields.".concat(e,".").concat(t)))(n)}),[["association",C.a],["checkbox",k.a],["color",S.a],["complex",j.a],["date",M],["date_time",A.a],["file",T.a],["footer_scripts",q.a],["gravity_form",U.a],["header_scripts",q.a],["hidden",F.a],["html",P.a],["image",T.a],["map",N.a],["multiselect",L.a],["media_gallery",I.a],["oembed",R.a],["radio",H.a],["radio_image",V.a],["rich_text",B.a],["select",U.a],["separator",z.a],["set",W.a],["sidebar",Y.a],["text",G.a],["textarea",q.a],["time",$]].forEach(function(e){return _.b.apply(void 0,w()(e))});var K=n(53),X=n(117),J=n(17),Z=n.n(J),Q=function(e,t){return e===t},ee=n(18),te=n(11),ne=Object(ee.withEffects)(function(e,t){if(t.field.required){var n=e.mount,r=e.unmount,o=e.observe("value"),a=e.observe("visible");return Object(te.merge)(Object(te.pipe)(Object(te.combine)(o,a,n),Object(te.filter)(function(e){return Z()(e,2)[1]}),Object(te.take)(1),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:Z()(e,1)[0],transient:!0}}})),Object(te.pipe)(o,function(e){return function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(o=n,e(0,function(e,t){0===e?(a=t)(1):1===e&&(i=!0,a(2))})),1===t?i?r(1,n):o(1):r(t,n)})}}}}(n),function(e){return void 0===e&&(e=Q),function(t){return function(n,r){if(0===n){var o,a,i=!1;t(0,function(t,n){0===t&&(a=n),1===t?i&&e(o,n)?a(1):(i=!0,o=n,r(1,n)):r(t,n)})}}}}(),(250,function(e){return function(t,n){var r;0===t&&e(0,function(e,t){if(1===e||2===e&&void 0===t){if(!r&&2===e)return n(e,t);r&&clearTimeout(r),r=setTimeout(function(){n(e,t),r=void 0},250)}else n(e,t)})}}),Object(te.map)(function(e){return{type:"VALIDATE",payload:{value:e,transient:!1}}})),Object(te.pipe)(r,Object(te.map)(function(){return{type:"RESET"}})))}},{handler:function(e){return function(t){var n=e.id,r=e.field,o=e.markAsInvalid,u=e.markAsValid,s=e.lockSaving,c=e.unlockSaving;switch(t.type){case"VALIDATE":var l=t.payload,f=l.value,d=l.transient,h="carbon-fields.".concat(r.type,".validate"),m=Object(i.hasFilter)(h)?Object(i.applyFilters)(h,r,f):function(e){var t=Object(p.isObject)(e);return t&&!Object(p.isEmpty)(e)||!t&&e?null:Object(a.__)("This field is required.","carbon-fields-ui")}(f);m?(d||o(n,m),s(n)):(d||u(n),c(n));break;case"RESET":u(n),c(n)}}}}),re=Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{markAsValid:t.markAsValid,markAsInvalid:t.markAsInvalid}}),oe=Object(x.compose)(re,ne);function ae(e,t){function n(t,n){if(!Object(p.isEmpty)(n.field.conditional_logic))return e(n,t)}function r(e){return function(n){var r=e.field.conditional_logic,o=r.relation,i=r.rules,u=t(e,n),s=i.reduce(function(e,t){if(!Object(p.has)(u,t.field))return console.error(Object(a.sprintf)(Object(a.__)('An unknown field is used in condition - "%s"',"carbon-fields-ui"),t.field)),e.concat(!1);var n=function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;case">":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(p.some)(n,function(t){return t==e});case"NOT IN":return Object(p.every)(n,function(t){return t!=e});case"INCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(p.every)(Object(p.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),c=!1;switch(o){case"AND":c=Object(p.every)(s);break;case"OR":c=Object(p.some)(s)}c?e.showField(e.id):e.hideField(e.id)}}return Object(x.createHigherOrderComponent)(function(e){return Object(x.compose)(Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(u.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(ee.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var ie=n(149),ue=n.n(ie),se="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function ce(){return"cf-".concat(ue()(se,21))}function le(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r (start, sink) => {\n if (start !== 0) return;\n if (typeof prod !== 'function') {\n sink(0, () => {});\n sink(2);\n return;\n }\n let end;\n let unsub;\n const maybeDispose = t => {\n end = end || t === 2;\n if (end && typeof unsub === 'function') unsub();\n };\n sink(0, maybeDispose);\n unsub = prod((t, d) => {\n if (end || t === 0) return;\n sink(t, d);\n maybeDispose(t);\n });\n};\n\nmodule.exports = create;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-create/index.js?"); +eval("const create = prod => (start, sink) => {\n if (start !== 0) return;\n if (typeof prod !== 'function') {\n sink(0, () => {});\n sink(2);\n return;\n }\n let end;\n let unsub;\n const maybeDispose = t => {\n end = end || t === 2;\n if (end && typeof unsub === 'function') unsub();\n };\n sink(0, maybeDispose);\n unsub = prod((t, d) => {\n if (end || t === 0) return;\n sink(t, d);\n maybeDispose(t);\n });\n};\n\nmodule.exports = create;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-create/index.js?"); /***/ }), @@ -314,7 +315,7 @@ eval("const create = prod => (start, sink) => {\n if (start !== 0) return;\n i /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\nvar is = function is(previous, current) {\n return previous === current;\n};\n\nfunction distinctUntilChanged(compare) {\n if (compare === void 0) {\n compare = is;\n }\n\n return function (source) {\n return function (start, sink) {\n if (start !== 0) return;\n var inited = false;\n var prev;\n var talkback;\n source(0, function (type, data) {\n if (type === 0) {\n talkback = data;\n }\n\n if (type !== 1) {\n sink(type, data);\n return;\n }\n\n if (inited && compare(prev, data)) {\n talkback(1);\n return;\n }\n\n inited = true;\n prev = data;\n sink(1, data);\n });\n };\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (distinctUntilChanged);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\nvar is = function is(previous, current) {\n return previous === current;\n};\n\nfunction distinctUntilChanged(compare) {\n if (compare === void 0) {\n compare = is;\n }\n\n return function (source) {\n return function (start, sink) {\n if (start !== 0) return;\n var inited = false;\n var prev;\n var talkback;\n source(0, function (type, data) {\n if (type === 0) {\n talkback = data;\n }\n\n if (type !== 1) {\n sink(type, data);\n return;\n }\n\n if (inited && compare(prev, data)) {\n talkback(1);\n return;\n }\n\n inited = true;\n prev = data;\n sink(1, data);\n });\n };\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (distinctUntilChanged);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js?"); /***/ }), @@ -325,7 +326,7 @@ eval("__webpack_require__.r(__webpack_exports__);\nvar is = function is(previous /*! no static exports found */ /***/ (function(module, exports) { -eval("/**\n * callbag-filter\n * --------------\n *\n * Callbag operator that conditionally lets data pass through. Works on either\n * pullable or listenable sources.\n *\n * `npm install callbag-filter`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const filter = require('callbag-filter');\n *\n * const source = filter(x => x % 2)(fromIter([1,2,3,4,5]));\n *\n * iterate(x => console.log(x))(source); // 1\n * // 3\n * // 5\n */\n\nconst filter = condition => source => (start, sink) => {\n if (start !== 0) return;\n let talkback;\n source(0, (t, d) => {\n if (t === 0) {\n talkback = d;\n sink(t, d);\n } else if (t === 1) {\n if (condition(d)) sink(t, d);\n else talkback(1);\n }\n else sink(t, d);\n });\n};\n\nmodule.exports = filter;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-filter/readme.js?"); +eval("/**\n * callbag-filter\n * --------------\n *\n * Callbag operator that conditionally lets data pass through. Works on either\n * pullable or listenable sources.\n *\n * `npm install callbag-filter`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const filter = require('callbag-filter');\n *\n * const source = filter(x => x % 2)(fromIter([1,2,3,4,5]));\n *\n * iterate(x => console.log(x))(source); // 1\n * // 3\n * // 5\n */\n\nconst filter = condition => source => (start, sink) => {\n if (start !== 0) return;\n let talkback;\n source(0, (t, d) => {\n if (t === 0) {\n talkback = d;\n sink(t, d);\n } else if (t === 1) {\n if (condition(d)) sink(t, d);\n else talkback(1);\n }\n else sink(t, d);\n });\n};\n\nmodule.exports = filter;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-filter/readme.js?"); /***/ }), @@ -337,7 +338,7 @@ eval("/**\n * callbag-filter\n * --------------\n *\n * Callbag operator that co /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_from_event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-from-event */ \"./node_modules/callbag-from-delegated-event/node_modules/callbag-from-event/index.js\");\n/* harmony import */ var callbag_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-filter */ \"./node_modules/callbag-filter/readme.js\");\n/* harmony import */ var callbag_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(callbag_filter__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nconst fromDelegatedEvent = (root, sel, evt) => callbag_filter__WEBPACK_IMPORTED_MODULE_1___default()(e => {\n let at = e.target;\n while(at !== root){\n if (at.matches(sel)) {\n return true;\n }\n at = at.parentElement;\n }\n return false;\n})(Object(callbag_from_event__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(root, evt));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (fromDelegatedEvent);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-delegated-event/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_from_event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-from-event */ \"./node_modules/callbag-from-delegated-event/node_modules/callbag-from-event/index.js\");\n/* harmony import */ var callbag_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-filter */ \"./node_modules/callbag-filter/readme.js\");\n/* harmony import */ var callbag_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(callbag_filter__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nconst fromDelegatedEvent = (root, sel, evt) => callbag_filter__WEBPACK_IMPORTED_MODULE_1___default()(e => {\n let at = e.target;\n while(at !== root){\n if (at.matches(sel)) {\n return true;\n }\n at = at.parentElement;\n }\n return false;\n})(Object(callbag_from_event__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(root, evt));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (fromDelegatedEvent);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-from-delegated-event/index.js?"); /***/ }), @@ -349,7 +350,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var call /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\nconst fromEvent = (node, name, options) => (start, sink) => {\n if (start !== 0) return;\n let disposed = false;\n const handler = ev => {\n sink(1, ev)\n };\n\n sink(0, t => {\n if (t !== 2) {\n return;\n }\n disposed = true;\n node.removeEventListener(name, handler, options);\n });\n\n if (disposed) {\n return;\n }\n\n node.addEventListener(name, handler, options);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (fromEvent);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-delegated-event/node_modules/callbag-from-event/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\nconst fromEvent = (node, name, options) => (start, sink) => {\n if (start !== 0) return;\n let disposed = false;\n const handler = ev => {\n sink(1, ev)\n };\n\n sink(0, t => {\n if (t !== 2) {\n return;\n }\n disposed = true;\n node.removeEventListener(name, handler, options);\n });\n\n if (disposed) {\n return;\n }\n\n node.addEventListener(name, handler, options);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (fromEvent);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-from-delegated-event/node_modules/callbag-from-event/index.js?"); /***/ }), @@ -361,7 +362,7 @@ eval("__webpack_require__.r(__webpack_exports__);\nconst fromEvent = (node, name /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\nfunction of() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return function (start, sink) {\n if (start !== 0) return;\n var disposed = false;\n sink(0, function (type) {\n if (type !== 2) return;\n disposed = true;\n values.length = 0;\n });\n\n while (values.length !== 0) {\n sink(1, values.shift());\n }\n\n if (disposed) return;\n sink(2);\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (of);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-of/dist/callbag-of.esm.js?"); +eval("__webpack_require__.r(__webpack_exports__);\nfunction of() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return function (start, sink) {\n if (start !== 0) return;\n var disposed = false;\n sink(0, function (type) {\n if (type !== 2) return;\n disposed = true;\n values.length = 0;\n });\n\n while (values.length !== 0) {\n sink(1, values.shift());\n }\n\n if (disposed) return;\n sink(2);\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (of);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-of/dist/callbag-of.esm.js?"); /***/ }), @@ -373,7 +374,7 @@ eval("__webpack_require__.r(__webpack_exports__);\nfunction of() {\n for (var _ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n\nconst startWith = (...xs) => inputSource => (start, outputSink) => {\n if (start !== 0) return;\n let disposed = false;\n let inputTalkback;\n let trackPull = false;\n let lastPull;\n\n outputSink(0, (ot, od) => {\n if (trackPull && ot === 1) {\n lastPull = [1, od];\n }\n\n if (ot === 2) {\n disposed = true;\n xs.length = 0;\n }\n\n if (!inputTalkback) return;\n inputTalkback(ot, od);\n });\n\n while (xs.length !== 0) {\n if (xs.length === 1) {\n trackPull = true;\n }\n outputSink(1, xs.shift());\n }\n\n if (disposed) return;\n\n inputSource(0, (it, id) => {\n if (it === 0) {\n inputTalkback = id;\n trackPull = false;\n\n if (lastPull) {\n inputTalkback(...lastPull);\n lastPull = null;\n }\n return;\n }\n outputSink(it, id);\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (startWith);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-start-with/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n\nconst startWith = (...xs) => inputSource => (start, outputSink) => {\n if (start !== 0) return;\n let disposed = false;\n let inputTalkback;\n let trackPull = false;\n let lastPull;\n\n outputSink(0, (ot, od) => {\n if (trackPull && ot === 1) {\n lastPull = [1, od];\n }\n\n if (ot === 2) {\n disposed = true;\n xs.length = 0;\n }\n\n if (!inputTalkback) return;\n inputTalkback(ot, od);\n });\n\n while (xs.length !== 0) {\n if (xs.length === 1) {\n trackPull = true;\n }\n outputSink(1, xs.shift());\n }\n\n if (disposed) return;\n\n inputSource(0, (it, id) => {\n if (it === 0) {\n inputTalkback = id;\n trackPull = false;\n\n if (lastPull) {\n inputTalkback(...lastPull);\n lastPull = null;\n }\n return;\n }\n outputSink(it, id);\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (startWith);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-start-with/index.js?"); /***/ }), @@ -385,7 +386,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n\nconst startWith = (...xs) = /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/container/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../field */ \"./packages/metaboxes/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar Container =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(Container, _Component);\n\n function Container() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Container);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Container)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n currentTab: null\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"renderField\", function (field) {\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, 'metabox');\n\n if (!FieldEdit) {\n return null;\n }\n\n return __webpack_provided_wp_dot_element.createElement(_field__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n key: field.id,\n id: field.id\n }, __webpack_provided_wp_dot_element.createElement(FieldEdit, {\n id: field.id,\n containerId: _this.props.id\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleTabClick\", function (tab) {\n _this.setState({\n currentTab: tab\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Container, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var container = this.props.container;\n\n if (this.isTabbed(container)) {\n this.setState({\n currentTab: Object.keys(container.settings.tabs)[0]\n });\n }\n }\n /**\n * Returns whether the container uses tabs.\n *\n * @param {Object} container\n * @return {boolean}\n */\n\n }, {\n key: \"isTabbed\",\n value: function isTabbed(container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"isPlainObject\"])(container.settings.tabs);\n }\n /**\n * Renders the given field.\n *\n * @param {Object} field\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var container = this.props.container;\n var hasTabs = this.isTabbed(container);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()(['cf-container', \"cf-container-\".concat(container.id), \"cf-container-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"kebabCase\"])(container.type))].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(container.classes), [{\n 'cf-container--plain': !hasTabs\n }]));\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: classes\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: container.nonce.name,\n value: container.nonce.value\n }), hasTabs && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__tabs\"\n }, __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-container__tabs-list\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n // eslint-disable-next-line no-shadow\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-container__tabs-item', {\n 'cf-container__tabs-item--current': tabName === currentTab\n });\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n key: tabName,\n className: classes,\n onClick: function onClick() {\n return _this2.handleTabClick(tabName);\n }\n }, tabName);\n }))), hasTabs && Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__fields\",\n key: tabName,\n hidden: tabName !== currentTab\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(fieldNames, function (fieldName) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"find\"])(container.fields, ['name', fieldName]);\n return _this2.renderField(field);\n }));\n }), !hasTabs && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__fields\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.fields, this.renderField)));\n }\n }]);\n\n return Container;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Container);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/components/container/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/container/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../field */ \"./packages/metaboxes/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar Container =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(Container, _Component);\n\n function Container() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Container);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Container)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n currentTab: null\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"renderField\", function (field) {\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, 'metabox');\n\n if (!FieldEdit) {\n return null;\n }\n\n return __webpack_provided_wp_dot_element.createElement(_field__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n key: field.id,\n id: field.id\n }, __webpack_provided_wp_dot_element.createElement(FieldEdit, {\n id: field.id,\n containerId: _this.props.id\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleTabClick\", function (tab) {\n _this.setState({\n currentTab: tab\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Container, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var container = this.props.container;\n\n if (this.isTabbed(container)) {\n this.setState({\n currentTab: Object.keys(container.settings.tabs)[0]\n });\n }\n }\n /**\n * Returns whether the container uses tabs.\n *\n * @param {Object} container\n * @return {boolean}\n */\n\n }, {\n key: \"isTabbed\",\n value: function isTabbed(container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"isPlainObject\"])(container.settings.tabs);\n }\n /**\n * Renders the given field.\n *\n * @param {Object} field\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var container = this.props.container;\n var hasTabs = this.isTabbed(container);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()(['cf-container', \"cf-container-\".concat(container.id), \"cf-container-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"kebabCase\"])(container.type))].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(container.classes), [{\n 'cf-container--plain': !hasTabs\n }]));\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: classes\n }, __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: container.nonce.name,\n value: container.nonce.value\n }), hasTabs && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__tabs\"\n }, __webpack_provided_wp_dot_element.createElement(\"ul\", {\n className: \"cf-container__tabs-list\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n // eslint-disable-next-line no-shadow\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-container__tabs-item', {\n 'cf-container__tabs-item--current': tabName === currentTab\n });\n return __webpack_provided_wp_dot_element.createElement(\"li\", {\n key: tabName,\n className: classes,\n onClick: function onClick() {\n return _this2.handleTabClick(tabName);\n }\n }, tabName);\n }))), hasTabs && Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n return __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__fields\",\n key: tabName,\n hidden: tabName !== currentTab\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(fieldNames, function (fieldName) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"find\"])(container.fields, ['name', fieldName]);\n return _this2.renderField(field);\n }));\n }), !hasTabs && __webpack_provided_wp_dot_element.createElement(\"div\", {\n className: \"cf-container__fields\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.fields, this.renderField)));\n }\n }]);\n\n return Container;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Container);\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/components/container/index.js?"); /***/ }), @@ -396,7 +397,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/components/container/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/components/container/style.scss?"); /***/ }), @@ -408,7 +409,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/field/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"withFilters\"])('carbon-fields.field-wrapper.metabox'))(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"Field\"]));\n\n//# sourceURL=webpack:///./packages/metaboxes/components/field/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/field/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"withFilters\"])('carbon-fields.field-wrapper.metabox'))(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"Field\"]));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/components/field/index.js?"); /***/ }), @@ -419,7 +420,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/components/field/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/components/field/style.scss?"); /***/ }), @@ -431,7 +432,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hocs/with-container */ \"./packages/metaboxes/hocs/with-container/index.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Extends the containers with necessary hooks.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.register-container-type', 'carbon-fields/metaboxes', function (type, context, component) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_container__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__[\"withFilters\"])(\"carbon-fields.\".concat(type, \".\").concat(context)))(component);\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/hooks.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hocs/with-container */ \"./packages/metaboxes/hocs/with-container/index.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Extends the containers with necessary hooks.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.register-container-type', 'carbon-fields/metaboxes', function (type, context, component) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_container__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__[\"withFilters\"])(\"carbon-fields.\".concat(type, \".\").concat(context)))(component);\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/hooks.js?"); /***/ }), @@ -443,7 +444,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderContainer\", function() { return renderContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeContainers; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks */ \"./packages/metaboxes/containers/hooks.js\");\n/* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./widget */ \"./packages/metaboxes/containers/widget/index.js\");\n/* harmony import */ var _term_meta__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./term-meta */ \"./packages/metaboxes/containers/term-meta/index.js\");\n/* harmony import */ var _theme_options__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-options */ \"./packages/metaboxes/containers/theme-options/index.js\");\n/* harmony import */ var _user_meta__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./user-meta */ \"./packages/metaboxes/containers/user-meta/index.js\");\n/* harmony import */ var _components_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/container */ \"./packages/metaboxes/components/container/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./registry */ \"./packages/metaboxes/containers/registry.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n/**\n * Registers the containers.\n */\n\n['post_meta', 'term_meta', 'user_meta', 'comment_meta', 'network', 'theme_options', 'nav_menu_item', 'widget'].forEach(function (type) {\n return Object(_registry__WEBPACK_IMPORTED_MODULE_10__[\"registerContainerType\"])(type, _components_container__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\n});\n/**\n * Renders the given container.\n *\n * @param {Object} container\n * @param {string} context\n * @return {void}\n */\n\nfunction renderContainer(container, context) {\n var node = document.querySelector(\".container-\".concat(container.id));\n var Component = Object(_registry__WEBPACK_IMPORTED_MODULE_10__[\"getContainerType\"])(container.type, context);\n\n if (node) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(__webpack_provided_wp_dot_element.createElement(Component, {\n id: container.id\n }), node);\n } else {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Could not find DOM element for container \"%1$s\".', 'carbon-fields-ui'), container.id));\n }\n}\n/**\n * Initializes the containers.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeContainers(context) {\n var containers = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getContainers();\n Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"forEach\"])(containers, function (container) {\n renderContainer(container, context);\n });\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderContainer\", function() { return renderContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeContainers; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks */ \"./packages/metaboxes/containers/hooks.js\");\n/* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./widget */ \"./packages/metaboxes/containers/widget/index.js\");\n/* harmony import */ var _term_meta__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./term-meta */ \"./packages/metaboxes/containers/term-meta/index.js\");\n/* harmony import */ var _theme_options__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-options */ \"./packages/metaboxes/containers/theme-options/index.js\");\n/* harmony import */ var _user_meta__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./user-meta */ \"./packages/metaboxes/containers/user-meta/index.js\");\n/* harmony import */ var _components_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/container */ \"./packages/metaboxes/components/container/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./registry */ \"./packages/metaboxes/containers/registry.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n/**\n * Registers the containers.\n */\n\n['post_meta', 'term_meta', 'user_meta', 'comment_meta', 'network', 'theme_options', 'nav_menu_item', 'widget'].forEach(function (type) {\n return Object(_registry__WEBPACK_IMPORTED_MODULE_10__[\"registerContainerType\"])(type, _components_container__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\n});\n/**\n * Renders the given container.\n *\n * @param {Object} container\n * @param {string} context\n * @return {void}\n */\n\nfunction renderContainer(container, context) {\n var node = document.querySelector(\".container-\".concat(container.id));\n var Component = Object(_registry__WEBPACK_IMPORTED_MODULE_10__[\"getContainerType\"])(container.type, context);\n\n if (node) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(__webpack_provided_wp_dot_element.createElement(Component, {\n id: container.id\n }), node, function () {\n node.dataset.mounted = true;\n });\n } else {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Could not find DOM element for container \"%1$s\".', 'carbon-fields-ui'), container.id));\n }\n}\n/**\n * Initializes the containers.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeContainers(context) {\n var containers = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getContainers();\n Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"forEach\"])(containers, function (container) {\n renderContainer(container, context);\n });\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/index.js?"); /***/ }), @@ -455,7 +456,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerContainerType\", function() { return registerContainerType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainerType\", function() { return getContainerType; });\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n\nvar _createRegistry = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__[\"createRegistry\"])('container', ['classic', 'gutenberg']),\n registerContainerType = _createRegistry.registerContainerType,\n getContainerType = _createRegistry.getContainerType;\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/registry.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerContainerType\", function() { return registerContainerType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainerType\", function() { return getContainerType; });\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n\nvar _createRegistry = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__[\"createRegistry\"])('container', ['classic', 'gutenberg']),\n registerContainerType = _createRegistry.registerContainerType,\n getContainerType = _createRegistry.getContainerType;\n\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/registry.js?"); /***/ }), @@ -467,7 +468,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/from-event-pattern */ \"./packages/metaboxes/utils/from-event-pattern.js\");\n/* harmony import */ var _store_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../store/helpers */ \"./packages/metaboxes/store/helpers.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (handler) {\n return window.jQuery(document).on('ajaxSuccess', handler);\n }, function (handler) {\n return window.jQuery(document).off('ajaxSuccess', handler);\n }, function (e, xhr, options, data) {\n return {\n options: options,\n data: data\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var options = _ref.options,\n data = _ref.data;\n return options.data.indexOf('carbon_fields_container') > -1 && options.data.indexOf('add-tag') > -1 && !data.documentElement.querySelector('wp_error');\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function () {\n // Collects identifiers of current fields so we can remove them later.\n var oldFieldIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(props.container.fields, 'id'); // Get a fresh copy of the container and fields.\n\n\n var _normalizePreloadedSt = Object(_store_helpers__WEBPACK_IMPORTED_MODULE_6__[\"normalizePreloadedState\"])(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\n var container = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(containers, ['id', props.id]);\n\n var containerFields = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(fields, ['container_id', props.id]); // Replace the container and add the new fields.\n\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"dispatch\"])('carbon-fields/metaboxes'),\n updateState = _dispatch.updateState,\n removeFields = _dispatch.removeFields;\n\n updateState(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy([container], 'id'), lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy(containerFields, 'id'));\n removeFields(oldFieldIds);\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.term_meta.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/term-meta/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/from-event-pattern */ \"./packages/metaboxes/utils/from-event-pattern.js\");\n/* harmony import */ var _store_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../store/helpers */ \"./packages/metaboxes/store/helpers.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (handler) {\n return window.jQuery(document).on('ajaxSuccess', handler);\n }, function (handler) {\n return window.jQuery(document).off('ajaxSuccess', handler);\n }, function (e, xhr, options, data) {\n return {\n options: options,\n data: data\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var options = _ref.options,\n data = _ref.data;\n return options.data.indexOf('carbon_fields_container') > -1 && options.data.indexOf('add-tag') > -1 && !data.documentElement.querySelector('wp_error');\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function () {\n // Collects identifiers of current fields so we can remove them later.\n var oldFieldIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(props.container.fields, 'id'); // Get a fresh copy of the container and fields.\n\n\n var _normalizePreloadedSt = Object(_store_helpers__WEBPACK_IMPORTED_MODULE_6__[\"normalizePreloadedState\"])(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\n var container = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(containers, ['id', props.id]);\n\n var containerFields = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(fields, ['container_id', props.id]); // Replace the container and add the new fields.\n\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"dispatch\"])('carbon-fields/metaboxes'),\n updateState = _dispatch.updateState,\n removeFields = _dispatch.removeFields;\n\n updateState(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy([container], 'id'), lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy(containerFields, 'id'));\n removeFields(oldFieldIds);\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.term_meta.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/term-meta/index.js?"); /***/ }), @@ -479,7 +480,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var loda /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/theme-options/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"fromEvent\"])(window, 'scroll'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(function () {\n return window.jQuery(window).scrollTop();\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (windowTopOffset) {\n var $container = window.jQuery('.carbon-box:first');\n var $panel = window.jQuery('#postbox-container-1');\n var $bar = window.jQuery('#wpadminbar');\n var offset = $bar.height() + 10;\n var threshold = $container.offset().top - offset; // In some situations the threshold is negative number because\n // the container element isn't rendered yet.\n\n if (threshold > 0) {\n $panel.toggleClass('fixed', windowTopOffset >= threshold).css('top', offset);\n }\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.theme_options.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_1__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/theme-options/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/theme-options/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"fromEvent\"])(window, 'scroll'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(function () {\n return window.jQuery(window).scrollTop();\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (windowTopOffset) {\n var $container = window.jQuery('.carbon-box:first');\n var $panel = window.jQuery('#postbox-container-1');\n var $bar = window.jQuery('#wpadminbar');\n var offset = $bar.height() + 10;\n var threshold = $container.offset().top - offset; // In some situations the threshold is negative number because\n // the container element isn't rendered yet.\n\n if (threshold > 0) {\n $panel.toggleClass('fixed', windowTopOffset >= threshold).css('top', offset);\n }\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.theme_options.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_1__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/theme-options/index.js?"); /***/ }), @@ -490,7 +491,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/theme-options/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/theme-options/style.scss?"); /***/ }), @@ -502,7 +503,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/user-meta/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/user-meta/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/user-meta/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/user-meta/index.js?"); /***/ }), @@ -513,7 +514,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sty /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/user-meta/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/user-meta/style.scss?"); /***/ }), @@ -525,7 +526,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/widget/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\nfunction aperture(component) {\n var mount$ = component.mount;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"pipe\"])(mount$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(function () {\n return {\n type: 'COMPONENT_MOUNTED'\n };\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n switch (effect.type) {\n case 'COMPONENT_MOUNTED':\n var container = props.container;\n var $carbonContainer = window.jQuery(\".container-\".concat(container.id)); // trigger change immediately after save, since the container is expanded\n\n $carbonContainer.trigger('change'); // trigger change when the expand button is clicked\n\n $carbonContainer.closest('.widget').find('.widget-action').on('click', function () {\n setTimeout(function () {\n $carbonContainer.trigger('change');\n }, 500);\n });\n break;\n }\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.widget.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_1__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/widget/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/widget/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\nfunction aperture(component) {\n var mount$ = component.mount;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"pipe\"])(mount$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(function () {\n return {\n type: 'COMPONENT_MOUNTED'\n };\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n switch (effect.type) {\n case 'COMPONENT_MOUNTED':\n var container = props.container;\n var $carbonContainer = window.jQuery(\".container-\".concat(container.id)); // trigger change immediately after save, since the container is expanded\n\n $carbonContainer.trigger('change'); // trigger change when the expand button is clicked\n\n $carbonContainer.closest('.widget').find('.widget-action').on('click', function () {\n setTimeout(function () {\n $carbonContainer.trigger('change');\n }, 500);\n });\n break;\n }\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.widget.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_1__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/widget/index.js?"); /***/ }), @@ -536,7 +537,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/widget/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/widget/style.scss?"); /***/ }), @@ -548,7 +549,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_strip_compact_input_prefix__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/strip-compact-input-prefix */ \"./packages/metaboxes/utils/strip-compact-input-prefix.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Returns a field with the given name.\n *\n * @param {Object[]} fields\n * @param {string} name\n * @return {?Object}\n */\n\nfunction findFieldByName(fields, name) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"find\"])(fields, function (field) {\n return field.name === name;\n });\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.association.metabox', 'carbon-fields/metaboxes', Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withProps\"])(function (props) {\n return {\n hierarchyResolver: function hierarchyResolver() {\n // Get all fields.\n var fields = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getFieldsByContainerId(props.containerId); // Get a clean version of field's name.\n\n var fieldName = Object(_utils_strip_compact_input_prefix__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(props.name); // Get the path.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove chunks that are empty.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Get the root field.\n\n var rootFieldName = path.shift();\n var rootField = findFieldByName(fields, rootFieldName); // Get the hierarchy.\n\n var accessor = fields.indexOf(rootField);\n var hierarchy = rootField.base_name; // Visit every branch in the tree so we can get the full hierarchy.\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isSameField = chunk === props.field.base_name;\n var isNestedComplex = !isGroup && !isSameField;\n\n if (isGroup) {\n accessor = \"\".concat(accessor, \".value.\").concat(chunk, \".name\");\n hierarchy = \"\".concat(hierarchy, \"[\").concat(chunk, \"]:\").concat(Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(fields, accessor), \"/\");\n }\n\n if (isNestedComplex) {\n var field = findFieldByName(fields, chunk);\n accessor = fields.indexOf(field);\n hierarchy = \"\".concat(hierarchy).concat(field.base_name);\n }\n\n if (isSameField) {\n hierarchy = \"\".concat(hierarchy).concat(chunk);\n }\n }\n\n return hierarchy;\n }\n };\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/association/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_strip_compact_input_prefix__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/strip-compact-input-prefix */ \"./packages/metaboxes/utils/strip-compact-input-prefix.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Returns a field with the given name.\n *\n * @param {Object[]} fields\n * @param {string} name\n * @return {?Object}\n */\n\nfunction findFieldByName(fields, name) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"find\"])(fields, function (field) {\n return field.name === name;\n });\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.association.metabox', 'carbon-fields/metaboxes', Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withProps\"])(function (props) {\n return {\n hierarchyResolver: function hierarchyResolver() {\n // Get all fields.\n var fields = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getFieldsByContainerId(props.containerId); // Get a clean version of field's name.\n\n var fieldName = Object(_utils_strip_compact_input_prefix__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(props.name); // Get the path.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove chunks that are empty.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Get the root field.\n\n var rootFieldName = path.shift();\n var rootField = findFieldByName(fields, rootFieldName); // Get the hierarchy.\n\n var accessor = fields.indexOf(rootField);\n var hierarchy = rootField.base_name; // Visit every branch in the tree so we can get the full hierarchy.\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isSameField = chunk === props.field.base_name;\n var isNestedComplex = !isGroup && !isSameField;\n\n if (isGroup) {\n accessor = \"\".concat(accessor, \".value.\").concat(chunk, \".name\");\n hierarchy = \"\".concat(hierarchy, \"[\").concat(chunk, \"]:\").concat(Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(fields, accessor), \"/\");\n }\n\n if (isNestedComplex) {\n var field = findFieldByName(fields, chunk);\n accessor = fields.indexOf(field);\n hierarchy = \"\".concat(hierarchy).concat(field.base_name);\n }\n\n if (isSameField) {\n hierarchy = \"\".concat(hierarchy).concat(chunk);\n }\n }\n\n return hierarchy;\n }\n };\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/association/index.js?"); /***/ }), @@ -560,7 +561,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/field */ \"./packages/metaboxes/components/field/index.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n field = _this$props.field,\n value = _this$props.value,\n addFields = _this$props.addFields,\n onChange = _this$props.onChange; // Create a copy of the group to prevent\n // incidentally modifications.\n\n group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group); // Get a flat list of all fields for this group.\n\n var fields = [];\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n group.container_id = field.container_id;\n group.fields = group.fields.map(function (groupField) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(groupField, field.container_id, fields);\n }); // Make sure that the group is expanded even\n // `set_collapsed(true)` is used.\n\n group.collapsed = false; // Push the group to the field.\n\n addFields(fields);\n onChange(id, value.concat(group));\n callback(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n cloneFields = _this$props2.cloneFields,\n onChange = _this$props2.onChange;\n var originFieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n var cloneFieldIds = originFieldIds.map(function () {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n });\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group);\n clonedGroup.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n clonedGroup.fields.forEach(function (groupField, index) {\n groupField.id = cloneFieldIds[index];\n });\n cloneFields(originFieldIds, cloneFieldIds);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.splice(value.indexOf(group) + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n removeFields = _this$props3.removeFields,\n onChange = _this$props3.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"without\"])(value, group)); // Delay removal of fields because React will complain\n // about missing objects.\n // TODO: Investigate why this is necessary.\n\n setTimeout(function () {\n var fieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n removeFields(fieldIds);\n }, 1);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleGroup\", function (groupId) {\n var _this$props4 = _this.props,\n field = _this$props4.field,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"find\"])(draft, ['id', groupId]);\n group.collapsed = !group.collapsed;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleAllGroups\", function (collapsed) {\n var _this$props5 = _this.props,\n field = _this$props5.field,\n value = _this$props5.value,\n onChange = _this$props5.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.forEach(function (group) {\n group.collapsed = collapsed;\n });\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupSetup\", function (group, props) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n id: group.id,\n name: group.name,\n prefix: \"\".concat(_this.props.name, \"[\").concat(props.index, \"]\"),\n fields: group.fields,\n collapsed: group.collapsed,\n context: 'metabox'\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n return [_components_field__WEBPACK_IMPORTED_MODULE_15__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n key: field.id,\n id: field.id,\n containerId: _this.props.containerId,\n name: \"\".concat(groupProps.prefix, \"[\").concat(field.name, \"]\")\n })];\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ComplexField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props6 = this.props,\n value = _this$props6.value,\n children = _this$props6.children;\n var allGroupsAreCollapsed = value.every(function (_ref) {\n var collapsed = _ref.collapsed;\n return collapsed;\n });\n return children({\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withSelect\"])(function (select, props) {\n var _select = select('carbon-fields/metaboxes'),\n getComplexGroupValues = _select.getComplexGroupValues;\n\n var groupValues = props.value.map(function (group) {\n var fieldIds = group.fields.map(function (field) {\n return field.id;\n });\n return [group.name, getComplexGroupValues(fieldIds)];\n });\n return {\n groupValues: groupValues\n };\n});\nvar applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n addFields = _dispatch.addFields,\n cloneFields = _dispatch.cloneFields,\n removeFields = _dispatch.removeFields;\n\n return {\n addFields: addFields,\n cloneFields: cloneFields,\n removeFields: removeFields\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"addFilter\"])('carbon-fields.complex.metabox', 'carbon-fields/metaboxes', function (OriginalComplexField) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[\"compose\"])(applyWithSelect, applyWithDispatch)(function (props) {\n var id = props.id,\n field = props.field,\n name = props.name,\n value = props.value,\n groupValues = props.groupValues;\n return __webpack_provided_wp_dot_element.createElement(ComplexField, props, function (_ref2) {\n var allGroupsAreCollapsed = _ref2.allGroupsAreCollapsed,\n handleGroupSetup = _ref2.handleGroupSetup,\n handleGroupFieldSetup = _ref2.handleGroupFieldSetup,\n handleAddGroup = _ref2.handleAddGroup,\n handleCloneGroup = _ref2.handleCloneGroup,\n handleRemoveGroup = _ref2.handleRemoveGroup,\n handleToggleGroup = _ref2.handleToggleGroup,\n handleToggleAllGroups = _ref2.handleToggleAllGroups;\n return __webpack_provided_wp_dot_element.createElement(OriginalComplexField, {\n groupIdKey: \"id\",\n groupFilterKey: \"name\",\n id: id,\n field: field,\n name: name,\n value: value,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n });\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/complex/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/field */ \"./packages/metaboxes/components/field/index.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n field = _this$props.field,\n value = _this$props.value,\n addFields = _this$props.addFields,\n onChange = _this$props.onChange; // Create a copy of the group to prevent\n // incidentally modifications.\n\n group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group); // Get a flat list of all fields for this group.\n\n var fields = [];\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n group.container_id = field.container_id;\n group.fields = group.fields.map(function (groupField) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(groupField, field.container_id, fields);\n }); // Make sure that the group is expanded even\n // `set_collapsed(true)` is used.\n\n group.collapsed = false; // Push the group to the field.\n\n addFields(fields);\n onChange(id, value.concat(group));\n callback(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n cloneFields = _this$props2.cloneFields,\n onChange = _this$props2.onChange;\n var originFieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n var cloneFieldIds = originFieldIds.map(function () {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n });\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group);\n clonedGroup.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n clonedGroup.fields.forEach(function (groupField, index) {\n groupField.id = cloneFieldIds[index];\n });\n cloneFields(originFieldIds, cloneFieldIds);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.splice(value.indexOf(group) + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n removeFields = _this$props3.removeFields,\n onChange = _this$props3.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"without\"])(value, group)); // Delay removal of fields because React will complain\n // about missing objects.\n // TODO: Investigate why this is necessary.\n\n setTimeout(function () {\n var fieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n removeFields(fieldIds);\n }, 1);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleGroup\", function (groupId) {\n var _this$props4 = _this.props,\n field = _this$props4.field,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"find\"])(draft, ['id', groupId]);\n group.collapsed = !group.collapsed;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleAllGroups\", function (collapsed) {\n var _this$props5 = _this.props,\n field = _this$props5.field,\n value = _this$props5.value,\n onChange = _this$props5.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.forEach(function (group) {\n group.collapsed = collapsed;\n });\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupSetup\", function (group, props) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n id: group.id,\n name: group.name,\n prefix: \"\".concat(_this.props.name, \"[\").concat(props.index, \"]\"),\n fields: group.fields,\n collapsed: group.collapsed,\n context: 'metabox'\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n return [_components_field__WEBPACK_IMPORTED_MODULE_15__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n key: field.id,\n id: field.id,\n containerId: _this.props.containerId,\n name: \"\".concat(groupProps.prefix, \"[\").concat(field.name, \"]\")\n })];\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ComplexField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props6 = this.props,\n value = _this$props6.value,\n children = _this$props6.children;\n var allGroupsAreCollapsed = value.every(function (_ref) {\n var collapsed = _ref.collapsed;\n return collapsed;\n });\n return children({\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withSelect\"])(function (select, props) {\n var _select = select('carbon-fields/metaboxes'),\n getComplexGroupValues = _select.getComplexGroupValues;\n\n var groupValues = props.value.map(function (group) {\n var fieldIds = group.fields.map(function (field) {\n return field.id;\n });\n return [group.name, getComplexGroupValues(fieldIds)];\n });\n return {\n groupValues: groupValues\n };\n});\nvar applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n addFields = _dispatch.addFields,\n cloneFields = _dispatch.cloneFields,\n removeFields = _dispatch.removeFields;\n\n return {\n addFields: addFields,\n cloneFields: cloneFields,\n removeFields: removeFields\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"addFilter\"])('carbon-fields.complex.metabox', 'carbon-fields/metaboxes', function (OriginalComplexField) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[\"compose\"])(applyWithSelect, applyWithDispatch)(function (props) {\n var id = props.id,\n field = props.field,\n name = props.name,\n value = props.value,\n groupValues = props.groupValues;\n return __webpack_provided_wp_dot_element.createElement(ComplexField, props, function (_ref2) {\n var allGroupsAreCollapsed = _ref2.allGroupsAreCollapsed,\n handleGroupSetup = _ref2.handleGroupSetup,\n handleGroupFieldSetup = _ref2.handleGroupFieldSetup,\n handleAddGroup = _ref2.handleAddGroup,\n handleCloneGroup = _ref2.handleCloneGroup,\n handleRemoveGroup = _ref2.handleRemoveGroup,\n handleToggleGroup = _ref2.handleToggleGroup,\n handleToggleAllGroups = _ref2.handleToggleAllGroups;\n return __webpack_provided_wp_dot_element.createElement(OriginalComplexField, {\n groupIdKey: \"id\",\n groupFilterKey: \"name\",\n id: id,\n field: field,\n name: name,\n value: value,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n });\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/complex/index.js?"); /***/ }), @@ -571,7 +572,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/complex/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/complex/style.scss?"); /***/ }), @@ -583,7 +584,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.date_time.metabox', 'carbon-fields/metaboxes', function (OriginalDatetimeField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalDatetimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Date', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/datetime/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.date_time.metabox', 'carbon-fields/metaboxes', function (OriginalDatetimeField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalDatetimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Date', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/datetime/index.js?"); /***/ }), @@ -595,7 +596,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.file.metabox', 'carbon-fields/metaboxes', function (OriginalFileField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalFileField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select File', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use File', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select File', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/file/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.file.metabox', 'carbon-fields/metaboxes', function (OriginalFileField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalFileField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select File', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use File', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select File', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/file/index.js?"); /***/ }), @@ -607,7 +608,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.image.metabox', 'carbon-fields/metaboxes', function (OriginalImageField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalImageField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Image', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use Image', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Image', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/image/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.image.metabox', 'carbon-fields/metaboxes', function (OriginalImageField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalImageField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Image', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use Image', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Image', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/image/index.js?"); /***/ }), @@ -619,7 +620,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./association */ \"./packages/metaboxes/fields/association/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./multiselect */ \"./packages/metaboxes/fields/multiselect/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./association */ \"./packages/metaboxes/fields/association/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./multiselect */ \"./packages/metaboxes/fields/multiselect/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/index.js?"); /***/ }), @@ -631,7 +632,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/media-gallery/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * The internal dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.media_gallery.metabox', 'carbon-fields/metaboxes', function (OriginalMediaGalleryField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalMediaGalleryField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Attachments', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use Attachments', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Attachments', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/media-gallery/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/media-gallery/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * The internal dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.media_gallery.metabox', 'carbon-fields/metaboxes', function (OriginalMediaGalleryField) {\n return function (props) {\n return __webpack_provided_wp_dot_element.createElement(OriginalMediaGalleryField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Attachments', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use Attachments', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Attachments', 'carbon-fields-ui')\n }, props));\n };\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/media-gallery/index.js?"); /***/ }), @@ -642,7 +643,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/media-gallery/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/media-gallery/style.scss?"); /***/ }), @@ -654,7 +655,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/multiselect/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/multiselect/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/multiselect/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/multiselect/index.js?"); /***/ }), @@ -665,7 +666,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sty /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/multiselect/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/multiselect/style.scss?"); /***/ }), @@ -677,7 +678,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/radio/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * The internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/radio/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/radio/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * The internal dependencies.\n */\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/radio/index.js?"); /***/ }), @@ -688,7 +689,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sty /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/radio/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/radio/style.scss?"); /***/ }), @@ -700,7 +701,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.sidebar.metabox', 'carbon-fields/metaboxes', Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n receiveSidebar = _dispatch.receiveSidebar;\n\n return {\n onAdded: receiveSidebar\n };\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/sidebar/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.sidebar.metabox', 'carbon-fields/metaboxes', Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n receiveSidebar = _dispatch.receiveSidebar;\n\n return {\n onAdded: receiveSidebar\n };\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/sidebar/index.js?"); /***/ }), @@ -712,7 +713,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.containerId)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"fromSelector\"])(getFieldsByContainerId, props.containerId)), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.containerId);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(fields, function (field) {\n return field.container_id === props.containerId && Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-conditional-logic/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.containerId)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"fromSelector\"])(getFieldsByContainerId, props.containerId)), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.containerId);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(fields, function (field) {\n return field.container_id === props.containerId && Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/hocs/with-conditional-logic/index.js?"); /***/ }), @@ -724,7 +725,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Creates a high-order component which adds connection\n * to the store.\n *\n * @param {Function} Component\n * @return {Function}\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"createHigherOrderComponent\"])(function (Component) {\n var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select, _ref) {\n var id = _ref.id;\n var container = select('carbon-fields/metaboxes').getContainerById(id);\n return {\n container: container\n };\n });\n return applyWithSelect(Component);\n}, 'withContainer'));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-container/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Creates a high-order component which adds connection\n * to the store.\n *\n * @param {Function} Component\n * @return {Function}\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"createHigherOrderComponent\"])(function (Component) {\n var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select, _ref) {\n var id = _ref.id;\n var container = select('carbon-fields/metaboxes').getContainerById(id);\n return {\n container: container\n };\n });\n return applyWithSelect(Component);\n}, 'withContainer'));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/hocs/with-container/index.js?"); /***/ }), @@ -736,7 +737,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Creates a high-order component which adds connection\n * to the store.\n *\n * @param {Function} Component\n * @return {Function}\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"createHigherOrderComponent\"])(function (Component) {\n var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select, props) {\n var _window$cf$config = window.cf.config,\n compactInput = _window$cf$config.compactInput,\n compactInputKey = _window$cf$config.compactInputKey;\n var field = select('carbon-fields/metaboxes').getFieldById(props.id);\n var value = field.value;\n var name = props.name || field.name;\n /**\n * Wrap top-level field names in compact input key.\n *\n * The fields in widgets don't need this prefix because\n * their input is already compacted by the `widget` namespace.\n */\n\n if (compactInput && !props.name && name.indexOf('widget-carbon_fields') === -1) {\n name = \"\".concat(compactInputKey, \"[\").concat(name, \"]\");\n }\n\n return {\n field: field,\n name: name,\n value: value\n };\n });\n var applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n updateFieldValue = _dispatch.updateFieldValue;\n\n return {\n onChange: updateFieldValue\n };\n });\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"compose\"])(applyWithSelect, applyWithDispatch)(Component);\n}, 'withField'));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-field/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Creates a high-order component which adds connection\n * to the store.\n *\n * @param {Function} Component\n * @return {Function}\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"createHigherOrderComponent\"])(function (Component) {\n var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select, props) {\n var _window$cf$config = window.cf.config,\n compactInput = _window$cf$config.compactInput,\n compactInputKey = _window$cf$config.compactInputKey;\n var field = select('carbon-fields/metaboxes').getFieldById(props.id);\n var value = field.value;\n var name = props.name || field.name;\n /**\n * Wrap top-level field names in compact input key.\n *\n * The fields in widgets don't need this prefix because\n * their input is already compacted by the `widget` namespace.\n */\n\n if (compactInput && !props.name && name.indexOf('widget-carbon_fields') === -1) {\n name = \"\".concat(compactInputKey, \"[\").concat(name, \"]\");\n }\n\n return {\n field: field,\n name: name,\n value: value\n };\n });\n var applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n updateFieldValue = _dispatch.updateFieldValue;\n\n return {\n onChange: updateFieldValue\n };\n });\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"compose\"])(applyWithSelect, applyWithDispatch)(Component);\n}, 'withField'));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/hocs/with-field/index.js?"); /***/ }), @@ -744,11 +745,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /*!*************************************!*\ !*** ./packages/metaboxes/index.js ***! \*************************************/ -/*! no exports provided */ +/*! exports provided: registerContainerType, getContainerType */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./store */ \"./packages/metaboxes/store/index.js\");\n/* harmony import */ var _fields__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fields */ \"./packages/metaboxes/fields/index.js\");\n/* harmony import */ var _monitors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./monitors */ \"./packages/metaboxes/monitors/index.js\");\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n/**\n * Sets the locale data for the package type\n */\n\nObject(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"setLocaleData\"])(window.cf.config.locale, 'carbon-fields-ui');\n/**\n * Determines the rendering context.\n *\n * @type {string}\n */\n\nvar context = Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])() ? 'gutenberg' : 'classic';\n/**\n * Abracadabra! Poof! Containers everywhere ...\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addAction\"])('carbon-fields.init', 'carbon-fields/metaboxes', function () {\n Object(_containers__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(context);\n Object(_monitors__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(context);\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./store */ \"./packages/metaboxes/store/index.js\");\n/* harmony import */ var _fields__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fields */ \"./packages/metaboxes/fields/index.js\");\n/* harmony import */ var _monitors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./monitors */ \"./packages/metaboxes/monitors/index.js\");\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _containers_registry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./containers/registry */ \"./packages/metaboxes/containers/registry.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"registerContainerType\", function() { return _containers_registry__WEBPACK_IMPORTED_MODULE_7__[\"registerContainerType\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getContainerType\", function() { return _containers_registry__WEBPACK_IMPORTED_MODULE_7__[\"getContainerType\"]; });\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n/**\n * Public API.\n */\n\n\n/**\n * Sets the locale data for the package type\n */\n\nObject(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"setLocaleData\"])(window.cf.config.locale, 'carbon-fields-ui');\n/**\n * Determines the rendering context.\n *\n * @type {string}\n */\n\nvar context = Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])() ? 'gutenberg' : 'classic';\n/**\n * Abracadabra! Poof! Containers everywhere ...\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addAction\"])('carbon-fields.init', 'carbon-fields/metaboxes', function () {\n Object(_containers__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(context);\n Object(_monitors__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(context);\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/index.js?"); /***/ }), @@ -760,7 +761,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PAGE_NOW_WIDGETS\", function() { return PAGE_NOW_WIDGETS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PAGE_NOW_CUSTOMIZE\", function() { return PAGE_NOW_CUSTOMIZE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CARBON_FIELDS_CONTAINER_ID_PREFIX\", function() { return CARBON_FIELDS_CONTAINER_ID_PREFIX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX\", function() { return CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX; });\nvar PAGE_NOW_WIDGETS = 'widgets.php';\nvar PAGE_NOW_CUSTOMIZE = 'customize.php';\nvar CARBON_FIELDS_CONTAINER_ID_PREFIX = 'carbon_fields_container_';\nvar CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX = 'carbon_fields_';\n\n//# sourceURL=webpack:///./packages/metaboxes/lib/constants.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PAGE_NOW_WIDGETS\", function() { return PAGE_NOW_WIDGETS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PAGE_NOW_CUSTOMIZE\", function() { return PAGE_NOW_CUSTOMIZE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CARBON_FIELDS_CONTAINER_ID_PREFIX\", function() { return CARBON_FIELDS_CONTAINER_ID_PREFIX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX\", function() { return CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX; });\nvar PAGE_NOW_WIDGETS = 'widgets.php';\nvar PAGE_NOW_CUSTOMIZE = 'customize.php';\nvar CARBON_FIELDS_CONTAINER_ID_PREFIX = 'carbon_fields_container_';\nvar CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX = 'carbon_fields_';\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/lib/constants.js?"); /***/ }), @@ -772,7 +773,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return aperture; });\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _post_parent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./post-parent */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-parent.js\");\n/* harmony import */ var _post_format__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./post-format */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-format.js\");\n/* harmony import */ var _post_template__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./post-template */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-template.js\");\n/* harmony import */ var _post_term__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./post-term */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-term.js\");\n/* harmony import */ var _term_parent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./term-parent */ \"./packages/metaboxes/monitors/conditional-display/aperture/term-parent.js\");\n/* harmony import */ var _user_role__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./user-role */ \"./packages/metaboxes/monitors/conditional-display/aperture/user-role.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @param {Object} props\n * @param {string} props.context\n * @return {Object}\n */\n// eslint-disable-next-line no-unused-vars\n\nfunction aperture(component, _ref) {\n var context = _ref.context;\n var postParent$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-parent.\".concat(context));\n var postFormat$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-format.\".concat(context));\n var postTemplate$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-template.\".concat(context));\n var postTerm$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-term.\".concat(context));\n var termParent$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-term-parent.\".concat(context));\n var userRole$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-user-role.\".concat(context));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(postParent$, postFormat$, postTemplate$, postTerm$, termParent$, userRole$), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"scan\"])(function (previous, current) {\n return immer__WEBPACK_IMPORTED_MODULE_0___default()(previous, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"assign\"])(draft, current);\n });\n }));\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return aperture; });\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _post_parent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./post-parent */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-parent.js\");\n/* harmony import */ var _post_format__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./post-format */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-format.js\");\n/* harmony import */ var _post_template__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./post-template */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-template.js\");\n/* harmony import */ var _post_term__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./post-term */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-term.js\");\n/* harmony import */ var _term_parent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./term-parent */ \"./packages/metaboxes/monitors/conditional-display/aperture/term-parent.js\");\n/* harmony import */ var _user_role__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./user-role */ \"./packages/metaboxes/monitors/conditional-display/aperture/user-role.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @param {Object} props\n * @param {string} props.context\n * @return {Object}\n */\n// eslint-disable-next-line no-unused-vars\n\nfunction aperture(component, _ref) {\n var context = _ref.context;\n var postParent$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-parent.\".concat(context));\n var postFormat$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-format.\".concat(context));\n var postTemplate$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-template.\".concat(context));\n var postTerm$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-term.\".concat(context));\n var termParent$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-term-parent.\".concat(context));\n var userRole$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-user-role.\".concat(context));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(postParent$, postFormat$, postTemplate$, postTerm$, termParent$, userRole$), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"scan\"])(function (previous, current) {\n return immer__WEBPACK_IMPORTED_MODULE_0___default()(previous, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"assign\"])(draft, current);\n });\n }));\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/index.js?"); /***/ }), @@ -784,7 +785,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-from-delegated-event */ \"./node_modules/callbag-from-delegated-event/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_format: 'standard'\n};\n/**\n * Extracts `post_format` from the input.\n *\n * @param {Object} input\n * @return {Object}\n */\n\nfunction getPostFormatFromRadioInput(input) {\n var value = input.value; // Normalize the value of \"Standard\" input.\n\n if (value === '0') {\n value = 'standard';\n }\n\n return {\n post_format: value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-format.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('div#post-formats-select');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(node, 'input.post-format', 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getPostFormatFromRadioInput(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getPostFormatFromRadioInput(node.querySelector('input.post-format:checked'))));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-format.gutenberg', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'format'), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(Boolean), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (postFormat) {\n return {\n post_format: postFormat\n };\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/post-format.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-from-delegated-event */ \"./node_modules/callbag-from-delegated-event/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_format: 'standard'\n};\n/**\n * Extracts `post_format` from the input.\n *\n * @param {Object} input\n * @return {Object}\n */\n\nfunction getPostFormatFromRadioInput(input) {\n var value = input.value; // Normalize the value of \"Standard\" input.\n\n if (value === '0') {\n value = 'standard';\n }\n\n return {\n post_format: value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-format.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('div#post-formats-select');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(node, 'input.post-format', 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getPostFormatFromRadioInput(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getPostFormatFromRadioInput(node.querySelector('input.post-format:checked'))));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-format.gutenberg', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'format'), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(Boolean), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (postFormat) {\n return {\n post_format: postFormat\n };\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/post-format.js?"); /***/ }), @@ -796,7 +797,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var call /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/get-parent-id-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js\");\n/* harmony import */ var _utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/* harmony import */ var _utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/get-ancestors-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_ancestors: [],\n post_parent_id: 0,\n post_level: 1\n};\n/**\n * Extracts the `post_ancestors`, `post_parent_id` & `post_level` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getParentIdAncestorsAndLevelFromSelect(node) {\n var option = node.options[node.selectedIndex];\n var ancestors = Object(_utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(option);\n var parentId = Object(_utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(option);\n var level = Object(_utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(option) + 1;\n return {\n post_ancestors: ancestors,\n post_parent_id: parentId,\n post_level: level\n };\n}\n/**\n * Extracts `post_ancestors` from the list.\n *\n * @param {number} parentId\n * @param {Object[]} posts\n * @param {Array} ancestors\n * @return {number[]}\n */\n\n\nfunction getAncestorsFromPostsList(parentId, posts) {\n var ancestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var parent = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"find\"])(posts, ['id', parentId]);\n\n if (!parent) {\n return ancestors;\n }\n\n ancestors.unshift(parent.id);\n\n if (parent.parent) {\n return getAncestorsFromPostsList(parent.parent, posts, ancestors);\n }\n\n return ancestors;\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-parent.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#parent_id');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getParentIdAncestorsAndLevelFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(getParentIdAncestorsAndLevelFromSelect(node)));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-parent.gutenberg', 'carbon-fields/metaboxes', function () {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core'),\n getPostType = _select.getPostType,\n getEntityRecords = _select.getEntityRecords;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"combine\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getCurrentPostId), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'type'), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'parent')), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_6__[\"isEqual\"]), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"map\"])(function (_ref2) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref2, 3),\n postId = _ref3[0],\n postTypeSlug = _ref3[1],\n parentId = _ref3[2];\n\n parentId = parseInt(parentId, 10);\n\n if (isNaN(parentId)) {\n return INITIAL_STATE;\n }\n\n var postType = getPostType(postTypeSlug);\n var isHierarchical = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(postType, ['hierarchical'], false);\n\n if (!isHierarchical) {\n return INITIAL_STATE;\n } // Borrowed from https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/page-attributes/parent.js\n\n\n var items = getEntityRecords('postType', postTypeSlug, {\n per_page: -1,\n exclude: postId,\n parent_exclude: postId,\n orderby: 'menu_order',\n order: 'asc'\n }) || [];\n var ancestors = getAncestorsFromPostsList(parentId, items);\n var level = ancestors.length + 1;\n return {\n post_ancestors: ancestors,\n post_parent_id: parentId,\n post_level: level\n };\n }));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/post-parent.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/get-parent-id-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js\");\n/* harmony import */ var _utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/* harmony import */ var _utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/get-ancestors-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_ancestors: [],\n post_parent_id: 0,\n post_level: 1\n};\n/**\n * Extracts the `post_ancestors`, `post_parent_id` & `post_level` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getParentIdAncestorsAndLevelFromSelect(node) {\n var option = node.options[node.selectedIndex];\n var ancestors = Object(_utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(option);\n var parentId = Object(_utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(option);\n var level = Object(_utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(option) + 1;\n return {\n post_ancestors: ancestors,\n post_parent_id: parentId,\n post_level: level\n };\n}\n/**\n * Extracts `post_ancestors` from the list.\n *\n * @param {number} parentId\n * @param {Object[]} posts\n * @param {Array} ancestors\n * @return {number[]}\n */\n\n\nfunction getAncestorsFromPostsList(parentId, posts) {\n var ancestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var parent = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"find\"])(posts, ['id', parentId]);\n\n if (!parent) {\n return ancestors;\n }\n\n ancestors.unshift(parent.id);\n\n if (parent.parent) {\n return getAncestorsFromPostsList(parent.parent, posts, ancestors);\n }\n\n return ancestors;\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-parent.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#parent_id');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getParentIdAncestorsAndLevelFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(getParentIdAncestorsAndLevelFromSelect(node)));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-parent.gutenberg', 'carbon-fields/metaboxes', function () {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core'),\n getPostType = _select.getPostType,\n getEntityRecords = _select.getEntityRecords;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"combine\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getCurrentPostId), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'type'), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'parent')), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_6__[\"isEqual\"]), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"map\"])(function (_ref2) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref2, 3),\n postId = _ref3[0],\n postTypeSlug = _ref3[1],\n parentId = _ref3[2];\n\n parentId = parseInt(parentId, 10);\n\n if (isNaN(parentId)) {\n return INITIAL_STATE;\n }\n\n var postType = getPostType(postTypeSlug);\n var isHierarchical = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(postType, ['hierarchical'], false);\n\n if (!isHierarchical) {\n return INITIAL_STATE;\n } // Borrowed from https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/page-attributes/parent.js\n\n\n var items = getEntityRecords('postType', postTypeSlug, {\n per_page: -1,\n exclude: postId,\n parent_exclude: postId,\n orderby: 'menu_order',\n order: 'asc'\n }) || [];\n var ancestors = getAncestorsFromPostsList(parentId, items);\n var level = ancestors.length + 1;\n return {\n post_ancestors: ancestors,\n post_parent_id: parentId,\n post_level: level\n };\n }));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/post-parent.js?"); /***/ }), @@ -808,7 +809,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_template: ''\n};\n/**\n * Extracts `post_template` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getPostTemplateFromSelect(node) {\n return {\n post_template: node.value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__[\"addFilter\"])('carbon-fields.conditional-display-post-template.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#page_template');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getPostTemplateFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getPostTemplateFromSelect(node)));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__[\"addFilter\"])('carbon-fields.conditional-display-post-template.gutenberg', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('core/editor').getEditedPostAttribute, 'template'), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isString\"]), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (postTemplate) {\n return {\n post_template: postTemplate\n };\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/post-template.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_template: ''\n};\n/**\n * Extracts `post_template` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getPostTemplateFromSelect(node) {\n var value = node.value; // In Gutenberg for the \"Default\" template is used an empty string.\n\n if (value === 'default') {\n value = '';\n }\n\n return {\n post_template: value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__[\"addFilter\"])('carbon-fields.conditional-display-post-template.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#page_template');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getPostTemplateFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getPostTemplateFromSelect(node)));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__[\"addFilter\"])('carbon-fields.conditional-display-post-template.gutenberg', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('core/editor').getEditedPostAttribute, 'template'), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isString\"]), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (postTemplate) {\n return {\n post_template: postTemplate\n };\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/post-template.js?"); /***/ }), @@ -820,7 +821,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var call /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! callbag-from-delegated-event */ \"./node_modules/callbag-from-delegated-event/index.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Applies a monkey patch to the specified method of `window.tagBox` API\n * so we can detect changes of the non-hierarchical taxonomies.\n *\n * @param {Object} tagBox\n * @param {string} method\n * @return {void}\n */\n\nfunction patchWordPressTagBoxAPI(tagBox, method) {\n tagBox[\"original_\".concat(method)] = tagBox[method];\n\n tagBox[method] = function () {\n var event = new Event('change');\n var textarea = window.jQuery(arguments.length <= 0 ? undefined : arguments[0]).closest('.postbox').find('textarea.the-tags').get(0);\n var result = tagBox[\"original_\".concat(method)].apply(tagBox, arguments);\n textarea.dispatchEvent(event);\n return result;\n };\n}\n\nif (window.tagBox) {\n patchWordPressTagBoxAPI(window.tagBox, 'parseTags');\n patchWordPressTagBoxAPI(window.tagBox, 'flushTags');\n}\n/**\n * Extracts the terms of a hierarchical taxonomy.\n *\n * @param {string} taxonomy\n * @return {Object}\n */\n\n\nfunction getTermsFromChecklist(taxonomy) {\n var inputs = document.querySelectorAll(\"#\".concat(taxonomy, \"checklist input[type=\\\"checkbox\\\"]:checked\"));\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(inputs).reduce(function (memo, input) {\n var value = parseInt(input.value, 10);\n memo[taxonomy].push(value);\n return memo;\n }, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, []));\n}\n/**\n * Extracts the terms of a non-hierarchical taxonomy.\n *\n * @param {string} taxonomy\n * @return {Object}\n */\n\n\nfunction getTermsFromText(taxonomy) {\n var node = document.querySelector(\"#tagsdiv-\".concat(taxonomy, \" textarea.the-tags\"));\n var terms = node.value ? node.value.split(window.tagsSuggestL10n.tagDelimiter) : [];\n return _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, terms);\n}\n/**\n * Keeps track of the hierarchical taxonomies like `categories`.\n *\n * @return {Function}\n */\n\n\nfunction trackHierarchicalTaxonomies() {\n var nodes = document.querySelectorAll('div[id^=\"taxonomy-\"]');\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(nodes).map(function (node) {\n var taxonomy = node.id.replace('taxonomy-', '');\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(node.querySelector(\"#\".concat(taxonomy, \"checklist\")), 'input[type=\"checkbox\"]', 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"scan\"])(function (stack, _ref2) {\n var target = _ref2.target;\n return immer__WEBPACK_IMPORTED_MODULE_3___default()(stack, function (draft) {\n var value = parseInt(target.value, 10);\n\n if (target.checked) {\n draft[taxonomy].push(value);\n } else {\n Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"pull\"])(draft[taxonomy], value);\n }\n });\n }, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, [])), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(getTermsFromChecklist(taxonomy)));\n });\n}\n/**\n * Keeps track of the non-hierarchical taxonomies like `tags`.\n *\n * @return {Function}\n */\n\n\nfunction trackNonHierarchicalTaxonomies() {\n var nodes = document.querySelectorAll('div[id^=\"tagsdiv-\"]');\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(nodes).map(function (node) {\n var taxonomy = node.id.replace('tagsdiv-', '');\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"fromEvent\"])(node.querySelector('textarea.the-tags'), 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref3) {\n var target = _ref3.target;\n return _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, target.value ? target.value.split(window.tagsSuggestL10n.tagDelimiter) : []);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(getTermsFromText(taxonomy)));\n });\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__[\"addFilter\"])('carbon-fields.conditional-display-post-term.classic', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"merge\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(trackHierarchicalTaxonomies()).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(trackNonHierarchicalTaxonomies()))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"scan\"])(function (previous, current) {\n return {\n post_term: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, previous.post_term, current)\n };\n }, {\n post_term: {}\n }));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__[\"addFilter\"])('carbon-fields.conditional-display-post-term.gutenberg', 'carbon-fields/metaboxes', function () {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__[\"select\"])('core'),\n getTaxonomies = _select.getTaxonomies;\n\n var _select2 = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__[\"select\"])('core/editor'),\n getEditedPostAttribute = _select2.getEditedPostAttribute; // Borrowed from https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/post-taxonomies/index.js\n\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__[\"fromSelector\"])(getTaxonomies, {\n per_page: -1\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(Boolean), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (taxonomies) {\n var pairs = taxonomies.map(function (taxonomy) {\n return [taxonomy.slug, getEditedPostAttribute(taxonomy.rest_base) || []];\n });\n return {\n post_term: Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"fromPairs\"])(pairs)\n };\n }));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/post-term.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! callbag-from-delegated-event */ \"./node_modules/callbag-from-delegated-event/index.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Applies a monkey patch to the specified method of `window.tagBox` API\n * so we can detect changes of the non-hierarchical taxonomies.\n *\n * @param {Object} tagBox\n * @param {string} method\n * @return {void}\n */\n\nfunction patchWordPressTagBoxAPI(tagBox, method) {\n tagBox[\"original_\".concat(method)] = tagBox[method];\n\n tagBox[method] = function () {\n var event = new Event('change');\n var textarea = window.jQuery(arguments.length <= 0 ? undefined : arguments[0]).closest('.postbox').find('textarea.the-tags').get(0);\n var result = tagBox[\"original_\".concat(method)].apply(tagBox, arguments);\n textarea.dispatchEvent(event);\n return result;\n };\n}\n\nif (window.tagBox) {\n patchWordPressTagBoxAPI(window.tagBox, 'parseTags');\n patchWordPressTagBoxAPI(window.tagBox, 'flushTags');\n}\n/**\n * Extracts the terms of a hierarchical taxonomy.\n *\n * @param {string} taxonomy\n * @return {Object}\n */\n\n\nfunction getTermsFromChecklist(taxonomy) {\n var inputs = document.querySelectorAll(\"#\".concat(taxonomy, \"checklist input[type=\\\"checkbox\\\"]:checked\"));\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(inputs).reduce(function (memo, input) {\n var value = parseInt(input.value, 10);\n memo[taxonomy].push(value);\n return memo;\n }, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, []));\n}\n/**\n * Extracts the terms of a non-hierarchical taxonomy.\n *\n * @param {string} taxonomy\n * @return {Object}\n */\n\n\nfunction getTermsFromText(taxonomy) {\n var node = document.querySelector(\"#tagsdiv-\".concat(taxonomy, \" textarea.the-tags\"));\n var terms = node.value ? node.value.split(window.tagsSuggestL10n.tagDelimiter) : [];\n return _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, terms);\n}\n/**\n * Keeps track of the hierarchical taxonomies like `categories`.\n *\n * @return {Function}\n */\n\n\nfunction trackHierarchicalTaxonomies() {\n var nodes = document.querySelectorAll('div[id^=\"taxonomy-\"]');\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(nodes).map(function (node) {\n var taxonomy = node.id.replace('taxonomy-', '');\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(node.querySelector(\"#\".concat(taxonomy, \"checklist\")), 'input[type=\"checkbox\"]', 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"scan\"])(function (stack, _ref2) {\n var target = _ref2.target;\n return immer__WEBPACK_IMPORTED_MODULE_3___default()(stack, function (draft) {\n var value = parseInt(target.value, 10);\n\n if (target.checked) {\n draft[taxonomy].push(value);\n } else {\n Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"pull\"])(draft[taxonomy], value);\n }\n });\n }, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, [])), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(getTermsFromChecklist(taxonomy)));\n });\n}\n/**\n * Keeps track of the non-hierarchical taxonomies like `tags`.\n *\n * @return {Function}\n */\n\n\nfunction trackNonHierarchicalTaxonomies() {\n var nodes = document.querySelectorAll('div[id^=\"tagsdiv-\"]');\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(nodes).map(function (node) {\n var taxonomy = node.id.replace('tagsdiv-', '');\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"fromEvent\"])(node.querySelector('textarea.the-tags'), 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref3) {\n var target = _ref3.target;\n return _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, target.value ? target.value.split(window.tagsSuggestL10n.tagDelimiter) : []);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(getTermsFromText(taxonomy)));\n });\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__[\"addFilter\"])('carbon-fields.conditional-display-post-term.classic', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"merge\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(trackHierarchicalTaxonomies()).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(trackNonHierarchicalTaxonomies()))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"scan\"])(function (previous, current) {\n return {\n post_term: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, previous.post_term, current)\n };\n }, {\n post_term: {}\n }));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__[\"addFilter\"])('carbon-fields.conditional-display-post-term.gutenberg', 'carbon-fields/metaboxes', function () {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__[\"select\"])('core'),\n getTaxonomies = _select.getTaxonomies;\n\n var _select2 = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__[\"select\"])('core/editor'),\n getEditedPostAttribute = _select2.getEditedPostAttribute; // Borrowed from https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/post-taxonomies/index.js\n\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__[\"fromSelector\"])(getTaxonomies, {\n per_page: -1\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(Boolean), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (taxonomies) {\n var pairs = taxonomies.map(function (taxonomy) {\n return [taxonomy.slug, getEditedPostAttribute(taxonomy.rest_base) || []];\n });\n return {\n post_term: Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"fromPairs\"])(pairs)\n };\n }));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/post-term.js?"); /***/ }), @@ -832,7 +833,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/get-parent-id-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js\");\n/* harmony import */ var _utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/* harmony import */ var _utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/get-ancestors-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n term_ancestors: [],\n term_parent: 0,\n term_level: 1\n};\n/**\n * Extracts the `term_ancestors`, `term_parent` & `term_level` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getParentIdAncestorsAndLevelFromSelect(node) {\n var option = node.options[node.selectedIndex];\n var ancestors = Object(_utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(option);\n var parentId = Object(_utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(option);\n var level = Object(_utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(option) + 1;\n return {\n term_ancestors: ancestors,\n term_parent: parentId,\n term_level: level\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.conditional-display-term-parent.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#parent');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getParentIdAncestorsAndLevelFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getParentIdAncestorsAndLevelFromSelect(node)));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/term-parent.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/get-parent-id-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js\");\n/* harmony import */ var _utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/* harmony import */ var _utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/get-ancestors-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n term_ancestors: [],\n term_parent: 0,\n term_level: 1\n};\n/**\n * Extracts the `term_ancestors`, `term_parent` & `term_level` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getParentIdAncestorsAndLevelFromSelect(node) {\n var option = node.options[node.selectedIndex];\n var ancestors = Object(_utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(option);\n var parentId = Object(_utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(option);\n var level = Object(_utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(option) + 1;\n return {\n term_ancestors: ancestors,\n term_parent: parentId,\n term_level: level\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.conditional-display-term-parent.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#parent');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getParentIdAncestorsAndLevelFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getParentIdAncestorsAndLevelFromSelect(node)));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/term-parent.js?"); /***/ }), @@ -844,7 +845,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var call /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n user_role: ''\n};\n/**\n * Extracts `user_role` from a select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getRoleFromSelect(node) {\n return {\n user_role: node.value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.conditional-display-user-role.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#role');\n\n if (!node) {\n var fieldset = document.querySelector('fieldset[data-profile-role]'); // The selectbox doesn't exist on the \"Profile\" page.\n // So we need to read the role from the container in DOM.\n\n if (fieldset) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n user_role: fieldset.dataset.profileRole\n });\n }\n\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getRoleFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getRoleFromSelect(node)));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/user-role.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n user_role: ''\n};\n/**\n * Extracts `user_role` from a select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getRoleFromSelect(node) {\n return {\n user_role: node.value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.conditional-display-user-role.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#role');\n\n if (!node) {\n var fieldset = document.querySelector('fieldset[data-profile-role]'); // The selectbox doesn't exist on the \"Profile\" page.\n // So we need to read the role from the container in DOM.\n\n if (fieldset) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n user_role: fieldset.dataset.profileRole\n });\n }\n\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getRoleFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getRoleFromSelect(node)));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/user-role.js?"); /***/ }), @@ -856,7 +857,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var call /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['IN', 'NOT IN'],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case 'IN':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"intersection\"])(a, b).length > 0;\n\n case 'NOT IN':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"intersection\"])(a, b).length === 0;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['IN', 'NOT IN'],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case 'IN':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"intersection\"])(a, b).length > 0;\n\n case 'NOT IN':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"intersection\"])(a, b).length === 0;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js?"); /***/ }), @@ -868,7 +869,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['=', '!='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '=':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"includes\"])(a, b);\n\n case '!=':\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"includes\"])(a, b);\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['=', '!='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '=':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"includes\"])(a, b);\n\n case '!=':\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"includes\"])(a, b);\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js?"); /***/ }), @@ -880,7 +881,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n /**\n * The supported operators.\n *\n * @type {string[]}\n */\n operators: [],\n\n /**\n * Checks if the operator is supported.\n *\n * @param {string} operator\n * @return {boolean}\n */\n isOperatorSupported: function isOperatorSupported(operator) {\n return this.operators.indexOf(operator) > -1;\n },\n\n /**\n * Performs the comparison.\n *\n * @param {mixed} a\n * @param {string} operator\n * @param {mixed} b\n * @return {boolean}\n */\n evaluate: function evaluate() {\n return false;\n }\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/base.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n /**\n * The supported operators.\n *\n * @type {string[]}\n */\n operators: [],\n\n /**\n * Checks if the operator is supported.\n *\n * @param {string} operator\n * @return {boolean}\n */\n isOperatorSupported: function isOperatorSupported(operator) {\n return this.operators.indexOf(operator) > -1;\n },\n\n /**\n * Performs the comparison.\n *\n * @param {mixed} a\n * @param {string} operator\n * @param {mixed} b\n * @return {boolean}\n */\n evaluate: function evaluate() {\n return false;\n }\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/comparers/base.js?"); /***/ }), @@ -892,7 +893,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['IN', 'NOT IN'],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case 'IN':\n return b.indexOf(a) > -1;\n\n case 'NOT IN':\n return b.indexOf(a) === -1;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/contain.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['IN', 'NOT IN'],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case 'IN':\n return b.indexOf(a) > -1;\n\n case 'NOT IN':\n return b.indexOf(a) === -1;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/comparers/contain.js?"); /***/ }), @@ -904,7 +905,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/* eslint eqeqeq: \"off\" */\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['=', '!='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '=':\n return a == b;\n\n case '!=':\n return a != b;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/equality.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/* eslint eqeqeq: \"off\" */\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['=', '!='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '=':\n return a == b;\n\n case '!=':\n return a != b;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/comparers/equality.js?"); /***/ }), @@ -916,7 +917,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['>', '>=', '<', '<='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '>':\n return a > b;\n\n case '>=':\n return a >= b;\n\n case '<':\n return a < b;\n\n case '<=':\n return a <= b;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/scalar.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['>', '>=', '<', '<='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '>':\n return a > b;\n\n case '>=':\n return a >= b;\n\n case '<':\n return a < b;\n\n case '<=':\n return a <= b;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/comparers/scalar.js?"); /***/ }), @@ -928,7 +929,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/equality.js\");\n/* harmony import */ var _comparers_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/contain.js\");\n/* harmony import */ var _comparers_scalar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../comparers/scalar */ \"./packages/metaboxes/monitors/conditional-display/comparers/scalar.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n /**\n * The supported comparers.\n *\n * @type {Function[]}\n */\n comparers: [_comparers_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _comparers_scalar__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n\n /**\n * Checks if the condition is fulfiled.\n *\n * @param {Object} definition\n * @param {Object} values\n * @return {boolean}\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare,\n value = definition.value;\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * Checks if any comparer is correct for `a` and `b`.\n *\n * @param {mixed} a\n * @param {string} operator\n * @param {mixed} b\n * @return {boolean}\n */\n firstComparerIsCorrect: function firstComparerIsCorrect(a, operator, b) {\n var comparer = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"find\"])(this.comparers, function (item) {\n return item.isOperatorSupported(operator);\n });\n\n if (!comparer) {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('Unsupported container condition comparison operator used - \"%1$s\".', 'carbon-fields-ui'), operator));\n return false;\n }\n\n return comparer.evaluate(a, operator, b);\n },\n\n /**\n * Returns the value from the environment.\n *\n * @param {Object} definition\n * @param {Object} values\n * @return {Object}\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return values[definition.type];\n }\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/base.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/equality.js\");\n/* harmony import */ var _comparers_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/contain.js\");\n/* harmony import */ var _comparers_scalar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../comparers/scalar */ \"./packages/metaboxes/monitors/conditional-display/comparers/scalar.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n /**\n * The supported comparers.\n *\n * @type {Function[]}\n */\n comparers: [_comparers_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _comparers_scalar__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n\n /**\n * Checks if the condition is fulfiled.\n *\n * @param {Object} definition\n * @param {Object} values\n * @return {boolean}\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare,\n value = definition.value;\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * Checks if any comparer is correct for `a` and `b`.\n *\n * @param {mixed} a\n * @param {string} operator\n * @param {mixed} b\n * @return {boolean}\n */\n firstComparerIsCorrect: function firstComparerIsCorrect(a, operator, b) {\n var comparer = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"find\"])(this.comparers, function (item) {\n return item.isOperatorSupported(operator);\n });\n\n if (!comparer) {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('Unsupported container condition comparison operator used - \"%1$s\".', 'carbon-fields-ui'), operator));\n return false;\n }\n\n return comparer.evaluate(a, operator, b);\n },\n\n /**\n * Returns the value from the environment.\n *\n * @param {Object} definition\n * @param {Object} values\n * @return {Object}\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return values[definition.type];\n }\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/base.js?"); /***/ }), @@ -940,7 +941,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue() {\n return true;\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/boolean.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue() {\n return true;\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/boolean.js?"); /***/ }), @@ -952,7 +953,19 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/any-contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, 'post_ancestors', []);\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/post-ancestor-id.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/any-contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, 'post_ancestors', []);\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/post-ancestor-id.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/conditions/post-template.js": +/*!*************************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/conditions/post-template.js ***! + \*************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n definition = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, definition); // In Gutenberg for the \"Default\" template is used an empty string.\n\n if (definition.value === 'default') {\n definition.value = '';\n }\n\n return _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isFulfiled(definition, values);\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/post-template.js?"); /***/ }), @@ -964,7 +977,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var _this = this;\n\n var compare = definition.compare,\n value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n var method;\n\n switch (compare) {\n case 'IN':\n compare = '=';\n method = 'some';\n break;\n\n case 'NOT IN':\n compare = '!=';\n method = 'every';\n break;\n\n default:\n return false;\n }\n\n var results = value.map(function (descriptor) {\n return _this.isFulfiled(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, definition, {\n compare: compare,\n value: descriptor\n }), values);\n });\n return results[method](Boolean);\n } // TODO: Improve value resolution in context of Gutenberg\n\n\n value = value.taxonomy_object.hierarchical ? value.term_object.term_id : value.term_object.name;\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, \"post_term.\".concat(definition.value.taxonomy), []);\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/post-term.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var _this = this;\n\n var compare = definition.compare,\n value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n var method;\n\n switch (compare) {\n case 'IN':\n compare = '=';\n method = 'some';\n break;\n\n case 'NOT IN':\n compare = '!=';\n method = 'every';\n break;\n\n default:\n return false;\n }\n\n var results = value.map(function (descriptor) {\n return _this.isFulfiled(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, definition, {\n compare: compare,\n value: descriptor\n }), values);\n });\n return results[method](Boolean);\n } // TODO: Improve value resolution in context of Gutenberg\n\n\n value = value.taxonomy_object.hierarchical ? value.term_object.term_id : value.term_object.name;\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, \"post_term.\".concat(definition.value.taxonomy), []);\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/post-term.js?"); /***/ }), @@ -976,7 +989,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/any-contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare;\n var value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n value = value.map(function (item) {\n return item.term_object.term_id;\n });\n } else if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isPlainObject\"])(value)) {\n value = value.term_object.term_id;\n }\n\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, 'term_ancestors', []);\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/term-ancestor-id.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/any-contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare;\n var value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n value = value.map(function (item) {\n return item.term_object.term_id;\n });\n } else if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isPlainObject\"])(value)) {\n value = value.term_object.term_id;\n }\n\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, 'term_ancestors', []);\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/term-ancestor-id.js?"); /***/ }), @@ -988,7 +1001,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare;\n var value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n value = value.map(function (item) {\n return item.term_object.term_id;\n });\n } else if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isPlainObject\"])(value)) {\n value = value.term_object.term_id;\n }\n\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/term-parent-id.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare;\n var value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n value = value.map(function (item) {\n return item.term_object.term_id;\n });\n } else if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isPlainObject\"])(value)) {\n value = value.term_object.term_id;\n }\n\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/term-parent-id.js?"); /***/ }), @@ -1000,7 +1013,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return handler; });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _conditions_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../conditions/base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n/* harmony import */ var _conditions_boolean__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../conditions/boolean */ \"./packages/metaboxes/monitors/conditional-display/conditions/boolean.js\");\n/* harmony import */ var _conditions_post_term__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../conditions/post-term */ \"./packages/metaboxes/monitors/conditional-display/conditions/post-term.js\");\n/* harmony import */ var _conditions_post_ancestor_id__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../conditions/post-ancestor-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/post-ancestor-id.js\");\n/* harmony import */ var _conditions_term_parent_id__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../conditions/term-parent-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/term-parent-id.js\");\n/* harmony import */ var _conditions_term_ancestor_id__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../conditions/term-ancestor-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/term-ancestor-id.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n/**\n * Keeps track of supported conditions.\n *\n * @type {Object}\n */\n\nvar conditions = {\n boolean: _conditions_boolean__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n post_term: _conditions_post_term__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n post_ancestor_id: _conditions_post_ancestor_id__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n post_parent_id: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n post_level: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n post_format: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n post_template: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n term_level: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n term_parent: _conditions_term_parent_id__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n term_ancestor: _conditions_term_ancestor_id__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n user_role: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n};\n/**\n * Walks through the definitions and evaluates the conditions.\n *\n * @param {Object[]} definitions\n * @param {Object} values\n * @param {string} relation\n * @return {boolean}\n */\n\nfunction evaluate(definitions, values, relation) {\n var results = definitions.map(function (definition) {\n if (!definition.relation) {\n var condition = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"get\"])(conditions, definition.type);\n\n if (condition) {\n return condition.isFulfiled(definition, values);\n } else {\n // eslint-disable-line no-else-return\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Unsupported container condition - \"%1$s\".', 'carbon-fields-ui'), definition.type));\n return false;\n }\n } else {\n // eslint-disable-line no-else-return\n return evaluate(definition.conditions, values, definition.relation);\n }\n });\n\n switch (relation) {\n case 'AND':\n return results.every(Boolean);\n\n case 'OR':\n return results.some(Boolean);\n\n default:\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Unsupported container condition relation used - \"%1$s\".', 'carbon-fields-ui'), relation));\n return false;\n }\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @param {Object} props.containers\n * @param {string} props.context\n * @return {Function}\n */\n\n\nfunction handler(_ref) {\n var containers = _ref.containers,\n context = _ref.context;\n return function (effect) {\n var results = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(containers, function (container, id) {\n return [id, evaluate(container.conditions.conditions, effect, container.conditions.relation)];\n });\n results.forEach(function (_ref2) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref2, 2),\n id = _ref3[0],\n result = _ref3[1];\n\n var postboxNode = document.getElementById(id);\n var containerNode = document.querySelector(\".container-\".concat(id));\n\n if (postboxNode) {\n postboxNode.hidden = !result;\n }\n\n if (containerNode) {\n if (result && !containerNode.dataset.mounted) {\n containerNode.dataset.mounted = true;\n Object(_containers__WEBPACK_IMPORTED_MODULE_4__[\"renderContainer\"])(containers[id], context);\n }\n\n if (!result && containerNode.dataset.mounted) {\n delete containerNode.dataset.mounted;\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"])(containerNode);\n }\n }\n });\n };\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/handler/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return handler; });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _conditions_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../conditions/base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n/* harmony import */ var _conditions_boolean__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../conditions/boolean */ \"./packages/metaboxes/monitors/conditional-display/conditions/boolean.js\");\n/* harmony import */ var _conditions_post_term__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../conditions/post-term */ \"./packages/metaboxes/monitors/conditional-display/conditions/post-term.js\");\n/* harmony import */ var _conditions_post_template__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../conditions/post-template */ \"./packages/metaboxes/monitors/conditional-display/conditions/post-template.js\");\n/* harmony import */ var _conditions_post_ancestor_id__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../conditions/post-ancestor-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/post-ancestor-id.js\");\n/* harmony import */ var _conditions_term_parent_id__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../conditions/term-parent-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/term-parent-id.js\");\n/* harmony import */ var _conditions_term_ancestor_id__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../conditions/term-ancestor-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/term-ancestor-id.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n\n/**\n * Keeps track of supported conditions.\n *\n * @type {Object}\n */\n\nvar conditions = {\n boolean: _conditions_boolean__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n post_term: _conditions_post_term__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n post_ancestor_id: _conditions_post_ancestor_id__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n post_parent_id: _conditions_base__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n post_level: _conditions_base__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n post_format: _conditions_base__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n post_template: _conditions_post_template__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n term_level: _conditions_base__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n term_parent: _conditions_term_parent_id__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n term_ancestor: _conditions_term_ancestor_id__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n user_role: _conditions_base__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n};\n/**\n * Walks through the definitions and evaluates the conditions.\n *\n * @param {Object[]} definitions\n * @param {Object} values\n * @param {string} relation\n * @return {boolean}\n */\n\nfunction evaluate(definitions, values, relation) {\n var results = definitions.map(function (definition) {\n if (!definition.relation) {\n var condition = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(conditions, definition.type);\n\n if (condition) {\n return condition.isFulfiled(definition, values);\n } else {\n // eslint-disable-line no-else-return\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Unsupported container condition - \"%1$s\".', 'carbon-fields-ui'), definition.type));\n return false;\n }\n } else {\n // eslint-disable-line no-else-return\n return evaluate(definition.conditions, values, definition.relation);\n }\n });\n\n switch (relation) {\n case 'AND':\n return results.every(Boolean);\n\n case 'OR':\n return results.some(Boolean);\n\n default:\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Unsupported container condition relation used - \"%1$s\".', 'carbon-fields-ui'), relation));\n return false;\n }\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @param {Object} props.containers\n * @param {string} props.context\n * @return {Function}\n */\n\n\nfunction handler(_ref) {\n var containers = _ref.containers,\n context = _ref.context;\n return function (effect) {\n var results = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(containers, function (container, id) {\n return [id, evaluate(container.conditions.conditions, effect, container.conditions.relation)];\n });\n results.forEach(function (_ref2) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref2, 2),\n id = _ref3[0],\n result = _ref3[1];\n\n var postboxNode = document.getElementById(id);\n var containerNode = document.querySelector(\".container-\".concat(id));\n var isMounted = !!containerNode.dataset.mounted;\n\n if (postboxNode) {\n postboxNode.hidden = !result;\n }\n\n if (containerNode) {\n if (result && !isMounted) {\n Object(_containers__WEBPACK_IMPORTED_MODULE_3__[\"renderContainer\"])(containers[id], context);\n }\n\n if (!result && isMounted) {\n delete containerNode.dataset.mounted; // Rely on React's internals instead of `unmountComponentAtNode`\n // due to https://github.com/facebook/react/issues/13690.\n // TODO: Conditionally render the fields in the container, this way\n // we can move away from mount/unmount cycles.\n\n containerNode._reactRootContainer.unmount();\n }\n }\n });\n };\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/handler/index.js?"); /***/ }), @@ -1012,7 +1025,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _aperture__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./aperture */ \"./packages/metaboxes/monitors/conditional-display/aperture/index.js\");\n/* harmony import */ var _handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./handler */ \"./packages/metaboxes/monitors/conditional-display/handler/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * Performs the evaluation of conditions.\n *\n * @return {null}\n */\n\nfunction ConditionalDisplay() {\n return null;\n}\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withSelect\"])(function (select) {\n var containers = select('carbon-fields/metaboxes').getContainers();\n return {\n containers: containers\n };\n});\nvar applyWitEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"withEffects\"])(_aperture__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n handler: _handler__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(applyWithSelect, applyWitEffects)(ConditionalDisplay));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _aperture__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./aperture */ \"./packages/metaboxes/monitors/conditional-display/aperture/index.js\");\n/* harmony import */ var _handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./handler */ \"./packages/metaboxes/monitors/conditional-display/handler/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * Performs the evaluation of conditions.\n *\n * @return {null}\n */\n\nfunction ConditionalDisplay() {\n return null;\n}\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withSelect\"])(function (select) {\n var containers = select('carbon-fields/metaboxes').getContainers();\n return {\n containers: containers\n };\n});\nvar applyWitEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"withEffects\"])(_aperture__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n handler: _handler__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(applyWithSelect, applyWitEffects)(ConditionalDisplay));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/index.js?"); /***/ }), @@ -1024,7 +1037,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getAncestorsFromOption; });\n/* harmony import */ var _get_level_from_option__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/**\n * Internal dependencies.\n */\n\n/**\n * Extracts the ancestors of the post/term from an option.\n *\n * @param {Object} option\n * @return {number[]}\n */\n\nfunction getAncestorsFromOption(option) {\n var ancestors = [];\n var previousOption = option;\n var level = Object(_get_level_from_option__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(option);\n\n while (level > 0 && previousOption) {\n if (Object(_get_level_from_option__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(previousOption) !== level) {\n previousOption = previousOption.previousSibling; // Skip this iteration because the option isn't an ancestor.\n\n continue;\n }\n\n var id = parseInt(previousOption.value, 10);\n\n if (id > 0) {\n ancestors.unshift(id);\n }\n\n previousOption = previousOption.previousSibling;\n level--;\n }\n\n return ancestors;\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getAncestorsFromOption; });\n/* harmony import */ var _get_level_from_option__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/**\n * Internal dependencies.\n */\n\n/**\n * Extracts the ancestors of the post/term from an option.\n *\n * @param {Object} option\n * @return {number[]}\n */\n\nfunction getAncestorsFromOption(option) {\n var ancestors = [];\n var previousOption = option;\n var level = Object(_get_level_from_option__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(option);\n\n while (level > 0 && previousOption) {\n if (Object(_get_level_from_option__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(previousOption) !== level) {\n previousOption = previousOption.previousSibling; // Skip this iteration because the option isn't an ancestor.\n\n continue;\n }\n\n var id = parseInt(previousOption.value, 10);\n\n if (id > 0) {\n ancestors.unshift(id);\n }\n\n previousOption = previousOption.previousSibling;\n level--;\n }\n\n return ancestors;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js?"); /***/ }), @@ -1036,7 +1049,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getLevelFromOption; });\n/**\n * Extracts the level from an option.\n *\n * @param {Object} option\n * @return {number}\n */\nfunction getLevelFromOption(option) {\n var level = 0;\n\n if (option.className) {\n var matches = option.className.match(/^level-(\\d+)/);\n\n if (matches) {\n level = parseInt(matches[1], 10) + 1;\n }\n }\n\n return level;\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getLevelFromOption; });\n/**\n * Extracts the level from an option.\n *\n * @param {Object} option\n * @return {number}\n */\nfunction getLevelFromOption(option) {\n var level = 0;\n\n if (option.className) {\n var matches = option.className.match(/^level-(\\d+)/);\n\n if (matches) {\n level = parseInt(matches[1], 10) + 1;\n }\n }\n\n return level;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js?"); /***/ }), @@ -1048,7 +1061,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getParentIdFromOption; });\n/**\n * Extracts the id of the post/term parent from an option.\n *\n * @param {Object} option\n * @return {number}\n */\nfunction getParentIdFromOption(option) {\n var value = parseInt(option.value, 10);\n return !isNaN(value) && value >= 0 ? value : 0;\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getParentIdFromOption; });\n/**\n * Extracts the id of the post/term parent from an option.\n *\n * @param {Object} option\n * @return {number}\n */\nfunction getParentIdFromOption(option) {\n var value = parseInt(option.value, 10);\n return !isNaN(value) && value >= 0 ? value : 0;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js?"); /***/ }), @@ -1060,7 +1073,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeMonitors; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _save_lock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./save-lock */ \"./packages/metaboxes/monitors/save-lock/index.js\");\n/* harmony import */ var _conditional_display__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conditional-display */ \"./packages/metaboxes/monitors/conditional-display/index.js\");\n/* harmony import */ var _widget_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./widget-handler */ \"./packages/metaboxes/monitors/widget-handler/index.js\");\n/* harmony import */ var _revisions_flag__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./revisions-flag */ \"./packages/metaboxes/monitors/revisions-flag/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _lib_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../lib/constants */ \"./packages/metaboxes/lib/constants.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Initializes the monitors.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeMonitors(context) {\n var pagenow = window.cf.config.pagenow;\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(__webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, !Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_5__[\"default\"])() && __webpack_provided_wp_dot_element.createElement(_save_lock__WEBPACK_IMPORTED_MODULE_1__[\"default\"], null), (pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_6__[\"PAGE_NOW_WIDGETS\"] || pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_6__[\"PAGE_NOW_CUSTOMIZE\"]) && __webpack_provided_wp_dot_element.createElement(_widget_handler__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null), __webpack_provided_wp_dot_element.createElement(_conditional_display__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n context: context\n })), document.createElement('div'));\n var postStuffNode = document.querySelector('#poststuff');\n\n if (postStuffNode) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(__webpack_provided_wp_dot_element.createElement(_revisions_flag__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null), postStuffNode.appendChild(document.createElement('div')));\n }\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeMonitors; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _save_lock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./save-lock */ \"./packages/metaboxes/monitors/save-lock/index.js\");\n/* harmony import */ var _conditional_display__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conditional-display */ \"./packages/metaboxes/monitors/conditional-display/index.js\");\n/* harmony import */ var _widget_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./widget-handler */ \"./packages/metaboxes/monitors/widget-handler/index.js\");\n/* harmony import */ var _revisions_flag__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./revisions-flag */ \"./packages/metaboxes/monitors/revisions-flag/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _lib_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../lib/constants */ \"./packages/metaboxes/lib/constants.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Initializes the monitors.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeMonitors(context) {\n var pagenow = window.cf.config.pagenow;\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(__webpack_provided_wp_dot_element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, !Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_5__[\"default\"])() && __webpack_provided_wp_dot_element.createElement(_save_lock__WEBPACK_IMPORTED_MODULE_1__[\"default\"], null), (pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_6__[\"PAGE_NOW_WIDGETS\"] || pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_6__[\"PAGE_NOW_CUSTOMIZE\"]) && __webpack_provided_wp_dot_element.createElement(_widget_handler__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null), __webpack_provided_wp_dot_element.createElement(_conditional_display__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n context: context\n })), document.createElement('div'));\n var postStuffNode = document.querySelector('#poststuff');\n\n if (postStuffNode) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(__webpack_provided_wp_dot_element.createElement(_revisions_flag__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null), postStuffNode.appendChild(document.createElement('div')));\n }\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/index.js?"); /***/ }), @@ -1072,7 +1085,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Renders the input used to notify the backend about the changes.\n *\n * @param {Object} props\n * @param {boolean} props.isDirty\n * @return {mixed}\n */\n\nfunction RevisionsFlag(props) {\n return __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: window.cf.config.revisionsInputKey,\n disabled: !props.isDirty,\n value: \"1\"\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select) {\n return {\n isDirty: select('carbon-fields/metaboxes').isDirty()\n };\n})(RevisionsFlag));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/revisions-flag/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(__webpack_provided_wp_dot_element) {/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Renders the input used to notify the backend about the changes.\n *\n * @param {Object} props\n * @param {boolean} props.isDirty\n * @return {mixed}\n */\n\nfunction RevisionsFlag(props) {\n return __webpack_provided_wp_dot_element.createElement(\"input\", {\n type: \"hidden\",\n name: window.cf.config.revisionsInputKey,\n disabled: !props.isDirty,\n value: \"1\"\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select) {\n return {\n isDirty: select('carbon-fields/metaboxes').isDirty()\n };\n})(RevisionsFlag));\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\")))\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/revisions-flag/index.js?"); /***/ }), @@ -1084,7 +1097,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Toggles the ability to save the page.\n *\n * @return {null}\n */\n\nfunction SaveLock() {\n return null;\n}\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\n\nfunction aperture() {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').isSavingLocked);\n}\n/**\n * The function that causes the side effects.\n *\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (isLocked) {\n var nodes = document.querySelectorAll(\"\\n\\t\\t\\t#publishing-action input#publish,\\n\\t\\t\\t#publishing-action input#save,\\n\\t\\t\\t#addtag input#submit,\\n\\t\\t\\t#edittag input[type=\\\"submit\\\"],\\n\\t\\t\\t#your-profile input#submit\\n\\t\\t\");\n nodes.forEach(function (node) {\n node.disabled = isLocked;\n });\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_0__[\"withEffects\"])(aperture, {\n handler: handler\n})(SaveLock));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/save-lock/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Toggles the ability to save the page.\n *\n * @return {null}\n */\n\nfunction SaveLock() {\n return null;\n}\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\n\nfunction aperture() {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').isSavingLocked);\n}\n/**\n * The function that causes the side effects.\n *\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (isLocked) {\n var nodes = document.querySelectorAll(\"\\n\\t\\t\\t#publishing-action input#publish,\\n\\t\\t\\t#publishing-action input#save,\\n\\t\\t\\t#addtag input#submit,\\n\\t\\t\\t#edittag input[type=\\\"submit\\\"],\\n\\t\\t\\t#your-profile input#submit\\n\\t\\t\");\n nodes.forEach(function (node) {\n node.disabled = isLocked;\n });\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_0__[\"withEffects\"])(aperture, {\n handler: handler\n})(SaveLock));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/save-lock/index.js?"); /***/ }), @@ -1096,7 +1109,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var refr /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_urldecode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/urldecode */ \"./packages/metaboxes/utils/urldecode.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n/* harmony import */ var _utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/from-event-pattern */ \"./packages/metaboxes/utils/from-event-pattern.js\");\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _lib_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../lib/constants */ \"./packages/metaboxes/lib/constants.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n/**\n * Performs the re-initialization of widgets.\n *\n * @return {null}\n */\n\nfunction WidgetHandler() {\n return null;\n}\n/**\n * Returns whether the widget is created by Carbon Fields.\n *\n * @param {string} identifier\n * @return {boolean}\n */\n\n\nfunction isCarbonFieldsWidget(identifier) {\n return identifier.indexOf(_lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX\"]) > -1;\n}\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function (handler) {\n return window.jQuery(document).on('widget-added widget-updated', handler);\n }, function (handler) {\n return window.jQuery(document).off('widget-added widget-updated', handler);\n }, function (event, $widget) {\n return {\n event: event,\n $widget: $widget\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var $widget = _ref.$widget;\n return isCarbonFieldsWidget($widget[0].id);\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"map\"])(function (payload) {\n return {\n type: 'WIDGET_CREATED_OR_UPDATED',\n payload: payload\n };\n })), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function (handler) {\n return window.jQuery(document).on('ajaxSuccess', handler);\n }, function (handler) {\n return window.jQuery(document).off('ajaxSuccess', handler);\n }, function (event, xhr, options, data) {\n return {\n event: event,\n xhr: xhr,\n options: options,\n data: data\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref2) {\n var data = _ref2.data;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"startsWith\"])(data, 'deleted:') && isCarbonFieldsWidget(data);\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"map\"])(function (payload) {\n return {\n type: 'WIDGET_DELETED',\n payload: payload\n };\n })));\n}\n/**\n * The function that causes the side effects.\n *\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (effect) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('carbon-fields/metaboxes'),\n getContainerById = _select.getContainerById;\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])('carbon-fields/metaboxes'),\n addContainer = _dispatch.addContainer,\n removeContainer = _dispatch.removeContainer,\n addFields = _dispatch.addFields,\n removeFields = _dispatch.removeFields;\n\n switch (effect.type) {\n case 'WIDGET_CREATED_OR_UPDATED':\n {\n var _effect$payload = effect.payload,\n event = _effect$payload.event,\n $widget = _effect$payload.$widget;\n var container = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"flow\"])(_utils_urldecode__WEBPACK_IMPORTED_MODULE_5__[\"default\"], JSON.parse)($widget.find('[data-json]').data('json'));\n var fields = [];\n var oldFieldIds;\n\n if (event.type === 'widget-updated') {\n oldFieldIds = getContainerById(container.id).fields.map(function (_ref3) {\n var id = _ref3.id;\n return id;\n });\n }\n\n container.fields = container.fields.map(function (field) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(field, container, fields);\n });\n addFields(fields);\n addContainer(container);\n\n if (event.type === 'widget-updated') {\n removeFields(oldFieldIds);\n }\n\n Object(_containers__WEBPACK_IMPORTED_MODULE_8__[\"renderContainer\"])(container, 'classic'); // WARNING: This piece of code manipulates the core behavior of WordPress Widgets.\n // Some day this code will stop to work and we'll need to find another workaround.\n //\n // * Disable the submit { handler } since it breaks our validation logic.\n // * Disable live preview mode because we can't detect when the widget is updated/synced.\n // * Show the \"Apply\" button because it's hidden by the live mode.\n\n if (window.cf.config.pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"PAGE_NOW_CUSTOMIZE\"] && event.type === 'widget-added') {\n var widgetId = $widget.find('[name=\"widget-id\"]').val();\n $widget.find('[name=\"savewidget\"]').show().end().find('.widget-content:first').off('keydown', 'input').off('change input propertychange', ':input');\n var instance = wp.customize.Widgets.getWidgetFormControlForWidget(widgetId); // Change the flag for 'live mode' so we can receive proper `widget-updated` events.\n\n instance.liveUpdateMode = false;\n }\n\n break;\n }\n\n case 'WIDGET_DELETED':\n {\n var _widgetId = effect.payload.data.replace('deleted:', '');\n\n var containerId = \"\".concat(_lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"CARBON_FIELDS_CONTAINER_ID_PREFIX\"]).concat(_widgetId); // Get the container from the store.\n\n var _container = getContainerById(containerId); // Remove the current instance from DOM.\n\n\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"])(document.querySelector(\".container-\".concat(containerId))); // Get the fields that belongs to the container.\n\n var fieldsIds = _.map(_container.fields, 'id'); // Remove everything from the store.\n\n\n removeContainer(containerId);\n removeFields(fieldsIds);\n break;\n }\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n})(WidgetHandler));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/widget-handler/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_urldecode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/urldecode */ \"./packages/metaboxes/utils/urldecode.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n/* harmony import */ var _utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/from-event-pattern */ \"./packages/metaboxes/utils/from-event-pattern.js\");\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _lib_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../lib/constants */ \"./packages/metaboxes/lib/constants.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n/**\n * Performs the re-initialization of widgets.\n *\n * @return {null}\n */\n\nfunction WidgetHandler() {\n return null;\n}\n/**\n * Returns whether the widget is created by Carbon Fields.\n *\n * @param {string} identifier\n * @return {boolean}\n */\n\n\nfunction isCarbonFieldsWidget(identifier) {\n return identifier.indexOf(_lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX\"]) > -1;\n}\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function (handler) {\n return window.jQuery(document).on('widget-added widget-updated', handler);\n }, function (handler) {\n return window.jQuery(document).off('widget-added widget-updated', handler);\n }, function (event, $widget) {\n return {\n event: event,\n $widget: $widget\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var $widget = _ref.$widget;\n return isCarbonFieldsWidget($widget[0].id);\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"map\"])(function (payload) {\n return {\n type: 'WIDGET_CREATED_OR_UPDATED',\n payload: payload\n };\n })), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function (handler) {\n return window.jQuery(document).on('ajaxSuccess', handler);\n }, function (handler) {\n return window.jQuery(document).off('ajaxSuccess', handler);\n }, function (event, xhr, options, data) {\n return {\n event: event,\n xhr: xhr,\n options: options,\n data: data\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref2) {\n var data = _ref2.data;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"startsWith\"])(data, 'deleted:') && isCarbonFieldsWidget(data);\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"map\"])(function (payload) {\n return {\n type: 'WIDGET_DELETED',\n payload: payload\n };\n })));\n}\n/**\n * The function that causes the side effects.\n *\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (effect) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('carbon-fields/metaboxes'),\n getContainerById = _select.getContainerById;\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])('carbon-fields/metaboxes'),\n addContainer = _dispatch.addContainer,\n removeContainer = _dispatch.removeContainer,\n addFields = _dispatch.addFields,\n removeFields = _dispatch.removeFields;\n\n switch (effect.type) {\n case 'WIDGET_CREATED_OR_UPDATED':\n {\n var _effect$payload = effect.payload,\n event = _effect$payload.event,\n $widget = _effect$payload.$widget;\n var container = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"flow\"])(_utils_urldecode__WEBPACK_IMPORTED_MODULE_5__[\"default\"], JSON.parse)($widget.find('[data-json]').data('json'));\n var fields = [];\n var oldFieldIds;\n\n if (event.type === 'widget-updated') {\n oldFieldIds = getContainerById(container.id).fields.map(function (_ref3) {\n var id = _ref3.id;\n return id;\n });\n }\n\n container.fields = container.fields.map(function (field) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(field, container, fields);\n });\n addFields(fields);\n addContainer(container);\n\n if (event.type === 'widget-updated') {\n removeFields(oldFieldIds);\n }\n\n Object(_containers__WEBPACK_IMPORTED_MODULE_8__[\"renderContainer\"])(container, 'classic'); // WARNING: This piece of code manipulates the core behavior of WordPress Widgets.\n // Some day this code will stop to work and we'll need to find another workaround.\n //\n // * Disable the submit { handler } since it breaks our validation logic.\n // * Disable live preview mode because we can't detect when the widget is updated/synced.\n // * Show the \"Apply\" button because it's hidden by the live mode.\n\n if (window.cf.config.pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"PAGE_NOW_CUSTOMIZE\"] && event.type === 'widget-added') {\n var widgetId = $widget.find('[name=\"widget-id\"]').val();\n $widget.find('[name=\"savewidget\"]').show().end().find('.widget-content:first').off('keydown', 'input').off('change input propertychange', ':input');\n var instance = wp.customize.Widgets.getWidgetFormControlForWidget(widgetId); // Change the flag for 'live mode' so we can receive proper `widget-updated` events.\n\n instance.liveUpdateMode = false;\n }\n\n break;\n }\n\n case 'WIDGET_DELETED':\n {\n var _widgetId = effect.payload.data.replace('deleted:', '');\n\n var containerId = \"\".concat(_lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"CARBON_FIELDS_CONTAINER_ID_PREFIX\"]).concat(_widgetId); // Get the container from the store.\n\n var _container = getContainerById(containerId); // Remove the current instance from DOM.\n\n\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"])(document.querySelector(\".container-\".concat(containerId))); // Get the fields that belongs to the container.\n\n var fieldsIds = _.map(_container.fields, 'id'); // Remove everything from the store.\n\n\n removeContainer(containerId);\n removeFields(fieldsIds);\n break;\n }\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n})(WidgetHandler));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/widget-handler/index.js?"); /***/ }), @@ -1108,7 +1121,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setupState\", function() { return setupState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateState\", function() { return updateState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateFieldValue\", function() { return updateFieldValue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addFields\", function() { return addFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cloneFields\", function() { return cloneFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeFields\", function() { return removeFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addContainer\", function() { return addContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeContainer\", function() { return removeContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"receiveSidebar\", function() { return receiveSidebar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lockSaving\", function() { return lockSaving; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unlockSaving\", function() { return unlockSaving; });\n/**\n * Returns an action object used to setup the state when first opening an editor.\n *\n * @param {Object[]} containers\n * @param {Object} fields\n * @return {Object}\n */\nfunction setupState(containers, fields) {\n return {\n type: 'SETUP_STATE',\n payload: {\n containers: containers,\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to update the state.\n *\n * @param {Object[]} containers\n * @param {Object} fields\n * @return {Object}\n */\n\nfunction updateState(containers, fields) {\n return {\n type: 'UPDATE_STATE',\n payload: {\n containers: containers,\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to update the field's value.\n *\n * @param {string} fieldId\n * @param {mixed} value\n * @return {Object}\n */\n\nfunction updateFieldValue(fieldId, value) {\n return {\n type: 'UPDATE_FIELD_VALUE',\n payload: {\n fieldId: fieldId,\n value: value\n }\n };\n}\n/**\n * Returns an action object used to add the fields.\n *\n * @param {Object[]} fields\n * @return {Object}\n */\n\nfunction addFields(fields) {\n return {\n type: 'ADD_FIELDS',\n payload: {\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to clone the fields.\n *\n * @param {string[]} originFieldIds\n * @param {string[]} cloneFieldIds\n * @return {Object}\n */\n\nfunction cloneFields(originFieldIds, cloneFieldIds) {\n return {\n type: 'CLONE_FIELDS',\n payload: {\n originFieldIds: originFieldIds,\n cloneFieldIds: cloneFieldIds\n }\n };\n}\n/**\n * Returns an action object used to remove the fields.\n *\n * @param {string[]} fieldIds\n * @return {Object}\n */\n\nfunction removeFields(fieldIds) {\n return {\n type: 'REMOVE_FIELDS',\n payload: {\n fieldIds: fieldIds\n }\n };\n}\n/**\n * Returns an action object used to add a container to all containers.\n *\n * @param {Object} container\n * @return {Object}\n */\n\nfunction addContainer(container) {\n return {\n type: 'ADD_CONTAINER',\n payload: container\n };\n}\n/**\n * Returns an action object used to remove a container from all containers.\n *\n * @param {Object} container\n * @return {Object}\n */\n\nfunction removeContainer(container) {\n return {\n type: 'REMOVE_CONTAINER',\n payload: container\n };\n}\n/**\n * Returns an action object used to add the created sidebar to all fields.\n *\n * @param {Object} sidebar\n * @return {Object}\n */\n\nfunction receiveSidebar(sidebar) {\n return {\n type: 'RECEIVE_SIDEBAR',\n payload: sidebar\n };\n}\n/**\n * Returns an action object used to signal that saving is locked.\n *\n * @param {string} lockName\n * @return {Object}\n */\n\nfunction lockSaving(lockName) {\n return {\n type: 'LOCK_SAVING',\n payload: {\n lockName: lockName\n }\n };\n}\n/**\n * Returns an action object used to signal that saving is unlocked.\n *\n * @param {string} lockName\n * @return {Object}\n */\n\nfunction unlockSaving(lockName) {\n return {\n type: 'UNLOCK_SAVING',\n payload: {\n lockName: lockName\n }\n };\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/store/actions.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setupState\", function() { return setupState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateState\", function() { return updateState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateFieldValue\", function() { return updateFieldValue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addFields\", function() { return addFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cloneFields\", function() { return cloneFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeFields\", function() { return removeFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addContainer\", function() { return addContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeContainer\", function() { return removeContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"receiveSidebar\", function() { return receiveSidebar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lockSaving\", function() { return lockSaving; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unlockSaving\", function() { return unlockSaving; });\n/**\n * Returns an action object used to setup the state when first opening an editor.\n *\n * @param {Object[]} containers\n * @param {Object} fields\n * @return {Object}\n */\nfunction setupState(containers, fields) {\n return {\n type: 'SETUP_STATE',\n payload: {\n containers: containers,\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to update the state.\n *\n * @param {Object[]} containers\n * @param {Object} fields\n * @return {Object}\n */\n\nfunction updateState(containers, fields) {\n return {\n type: 'UPDATE_STATE',\n payload: {\n containers: containers,\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to update the field's value.\n *\n * @param {string} fieldId\n * @param {mixed} value\n * @return {Object}\n */\n\nfunction updateFieldValue(fieldId, value) {\n return {\n type: 'UPDATE_FIELD_VALUE',\n payload: {\n fieldId: fieldId,\n value: value\n }\n };\n}\n/**\n * Returns an action object used to add the fields.\n *\n * @param {Object[]} fields\n * @return {Object}\n */\n\nfunction addFields(fields) {\n return {\n type: 'ADD_FIELDS',\n payload: {\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to clone the fields.\n *\n * @param {string[]} originFieldIds\n * @param {string[]} cloneFieldIds\n * @return {Object}\n */\n\nfunction cloneFields(originFieldIds, cloneFieldIds) {\n return {\n type: 'CLONE_FIELDS',\n payload: {\n originFieldIds: originFieldIds,\n cloneFieldIds: cloneFieldIds\n }\n };\n}\n/**\n * Returns an action object used to remove the fields.\n *\n * @param {string[]} fieldIds\n * @return {Object}\n */\n\nfunction removeFields(fieldIds) {\n return {\n type: 'REMOVE_FIELDS',\n payload: {\n fieldIds: fieldIds\n }\n };\n}\n/**\n * Returns an action object used to add a container to all containers.\n *\n * @param {Object} container\n * @return {Object}\n */\n\nfunction addContainer(container) {\n return {\n type: 'ADD_CONTAINER',\n payload: container\n };\n}\n/**\n * Returns an action object used to remove a container from all containers.\n *\n * @param {Object} container\n * @return {Object}\n */\n\nfunction removeContainer(container) {\n return {\n type: 'REMOVE_CONTAINER',\n payload: container\n };\n}\n/**\n * Returns an action object used to add the created sidebar to all fields.\n *\n * @param {Object} sidebar\n * @return {Object}\n */\n\nfunction receiveSidebar(sidebar) {\n return {\n type: 'RECEIVE_SIDEBAR',\n payload: sidebar\n };\n}\n/**\n * Returns an action object used to signal that saving is locked.\n *\n * @param {string} lockName\n * @return {Object}\n */\n\nfunction lockSaving(lockName) {\n return {\n type: 'LOCK_SAVING',\n payload: {\n lockName: lockName\n }\n };\n}\n/**\n * Returns an action object used to signal that saving is unlocked.\n *\n * @param {string} lockName\n * @return {Object}\n */\n\nfunction unlockSaving(lockName) {\n return {\n type: 'UNLOCK_SAVING',\n payload: {\n lockName: lockName\n }\n };\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/store/actions.js?"); /***/ }), @@ -1120,7 +1133,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"normalizePreloadedState\", function() { return normalizePreloadedState; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Transform the shape of the given state to be more Redux friendly.\n *\n * @param {Object} state\n * @return {Object}\n */\n\nfunction normalizePreloadedState(state) {\n var fields = [];\n var containers = state.filter(function (_ref) {\n var id = _ref.id;\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"endsWith\"])(id, '__i__');\n }).map(function (container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"assign\"])({}, container, {\n fields: container.fields.map(function (field) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(field, container.id, fields);\n })\n });\n });\n return {\n containers: containers,\n fields: fields\n };\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/store/helpers.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"normalizePreloadedState\", function() { return normalizePreloadedState; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Transform the shape of the given state to be more Redux friendly.\n *\n * @param {Object} state\n * @return {Object}\n */\n\nfunction normalizePreloadedState(state) {\n var fields = [];\n var containers = state.filter(function (_ref) {\n var id = _ref.id;\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"endsWith\"])(id, '__i__');\n }).map(function (container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"assign\"])({}, container, {\n fields: container.fields.map(function (field) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(field, container.id, fields);\n })\n });\n });\n return {\n containers: containers,\n fields: fields\n };\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/store/helpers.js?"); /***/ }), @@ -1132,7 +1145,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _reducer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reducer */ \"./packages/metaboxes/store/reducer.js\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions */ \"./packages/metaboxes/store/actions.js\");\n/* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./selectors */ \"./packages/metaboxes/store/selectors.js\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers */ \"./packages/metaboxes/store/helpers.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n/**\n * Register the store.\n */\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"registerStore\"])('carbon-fields/metaboxes', {\n reducer: _reducer__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n actions: _actions__WEBPACK_IMPORTED_MODULE_3__,\n selectors: _selectors__WEBPACK_IMPORTED_MODULE_4__\n});\n/**\n * Hydrate the store's state.\n */\n\nvar _normalizePreloadedSt = Object(_helpers__WEBPACK_IMPORTED_MODULE_5__[\"normalizePreloadedState\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])('carbon-fields/metaboxes').setupState(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"keyBy\"])(containers, 'id'), Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"keyBy\"])(fields, 'id'));\n\n//# sourceURL=webpack:///./packages/metaboxes/store/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _reducer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reducer */ \"./packages/metaboxes/store/reducer.js\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions */ \"./packages/metaboxes/store/actions.js\");\n/* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./selectors */ \"./packages/metaboxes/store/selectors.js\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers */ \"./packages/metaboxes/store/helpers.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n/**\n * Register the store.\n */\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"registerStore\"])('carbon-fields/metaboxes', {\n reducer: _reducer__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n actions: _actions__WEBPACK_IMPORTED_MODULE_3__,\n selectors: _selectors__WEBPACK_IMPORTED_MODULE_4__\n});\n/**\n * Hydrate the store's state.\n */\n\nvar _normalizePreloadedSt = Object(_helpers__WEBPACK_IMPORTED_MODULE_5__[\"normalizePreloadedState\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])('carbon-fields/metaboxes').setupState(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"keyBy\"])(containers, 'id'), Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"keyBy\"])(fields, 'id'));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/store/index.js?"); /***/ }), @@ -1144,7 +1157,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"containers\", function() { return containers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fields\", function() { return fields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"savingLock\", function() { return savingLock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDirty\", function() { return isDirty; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The reducer that keeps track of the containers.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction containers() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_STATE':\n return action.payload.containers;\n\n case 'UPDATE_STATE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(action.payload.containers).forEach(function (container) {\n draft[container.id] = container;\n });\n });\n\n case 'ADD_CONTAINER':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n draft[action.payload.id] = action.payload;\n });\n\n case 'REMOVE_CONTAINER':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, action.payload);\n\n default:\n return state;\n }\n}\n/**\n * Clones a field.\n *\n * @param {string} originId\n * @param {string} cloneId\n * @param {Object} fields\n * @param {Object[]} accumulator\n * @return {Object[]}\n */\n\nfunction cloneField(originId, cloneId, fields, accumulator) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"cloneDeep\"])(fields[originId]);\n field.id = cloneId;\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__[\"uniqueId\"])();\n accumulator = group.fields.reduce(function (groupAccumulator, groupField) {\n var originGroupFieldId = groupField.id;\n var cloneGroupFieldId = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__[\"uniqueId\"])();\n groupField.id = cloneGroupFieldId;\n return cloneField(originGroupFieldId, cloneGroupFieldId, fields, groupAccumulator);\n }, accumulator);\n });\n }\n\n return accumulator.concat(field);\n}\n/**\n * Returns a list of field ids by a given root id.\n *\n * @param {string} fieldId\n * @param {Object} fields\n * @param {string[]} accumulator\n * @return {string[]}\n */\n\n\nfunction getFieldIdsByRootId(fieldId, fields, accumulator) {\n var field = fields[fieldId];\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n accumulator = group.fields.reduce(function (groupAccumulator, groupField) {\n return getFieldIdsByRootId(groupField.id, fields, groupAccumulator);\n }, accumulator);\n });\n }\n\n return accumulator.concat(fieldId);\n}\n/**\n * The reducer that keeps track of the fields.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\n\nfunction fields() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_STATE':\n return action.payload.fields;\n\n case 'UPDATE_STATE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(action.payload.fields).forEach(function (field) {\n draft[field.id] = field;\n });\n });\n\n case 'UPDATE_FIELD_VALUE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n var _action$payload = action.payload,\n fieldId = _action$payload.fieldId,\n value = _action$payload.value;\n draft[fieldId].value = value;\n });\n\n case 'ADD_FIELDS':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n action.payload.fields.forEach(function (field) {\n draft[field.id] = field;\n });\n });\n\n case 'CLONE_FIELDS':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n var _action$payload2 = action.payload,\n originFieldIds = _action$payload2.originFieldIds,\n cloneFieldIds = _action$payload2.cloneFieldIds;\n var clonedFields = originFieldIds.reduce(function (accumulator, originFieldId, index) {\n return cloneField(originFieldId, cloneFieldIds[index], draft, accumulator);\n }, []);\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"assign\"])(draft, Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"keyBy\"])(clonedFields, 'id'));\n });\n\n case 'REMOVE_FIELDS':\n var fieldIds = action.payload.fieldIds.reduce(function (accumulator, fieldId) {\n return getFieldIdsByRootId(fieldId, state, accumulator);\n }, []);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, fieldIds);\n\n case 'RECEIVE_SIDEBAR':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"forEach\"])(draft, function (field) {\n if (field.type === 'sidebar') {\n field.options.unshift(action.payload);\n }\n });\n });\n\n default:\n return state;\n }\n}\n/**\n * The reducer that keeps track of the save locks.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction savingLock() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'LOCK_SAVING':\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, state, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, action.payload.lockName, true));\n\n case 'UNLOCK_SAVING':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, [action.payload.lockName]);\n\n default:\n return state;\n }\n}\n/**\n * The reducer that keeps track if there is dirty fields.\n *\n * @param {boolean} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction isDirty() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'UPDATE_FIELD_VALUE':\n return true;\n\n default:\n return state;\n }\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__[\"combineReducers\"])({\n containers: containers,\n fields: fields,\n savingLock: savingLock,\n isDirty: isDirty\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/store/reducer.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"containers\", function() { return containers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fields\", function() { return fields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"savingLock\", function() { return savingLock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDirty\", function() { return isDirty; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The reducer that keeps track of the containers.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction containers() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_STATE':\n return action.payload.containers;\n\n case 'UPDATE_STATE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(action.payload.containers).forEach(function (container) {\n draft[container.id] = container;\n });\n });\n\n case 'ADD_CONTAINER':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n draft[action.payload.id] = action.payload;\n });\n\n case 'REMOVE_CONTAINER':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, action.payload);\n\n default:\n return state;\n }\n}\n/**\n * Clones a field.\n *\n * @param {string} originId\n * @param {string} cloneId\n * @param {Object} fields\n * @param {Object[]} accumulator\n * @return {Object[]}\n */\n\nfunction cloneField(originId, cloneId, fields, accumulator) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"cloneDeep\"])(fields[originId]);\n field.id = cloneId;\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__[\"uniqueId\"])();\n accumulator = group.fields.reduce(function (groupAccumulator, groupField) {\n var originGroupFieldId = groupField.id;\n var cloneGroupFieldId = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__[\"uniqueId\"])();\n groupField.id = cloneGroupFieldId;\n return cloneField(originGroupFieldId, cloneGroupFieldId, fields, groupAccumulator);\n }, accumulator);\n });\n }\n\n return accumulator.concat(field);\n}\n/**\n * Returns a list of field ids by a given root id.\n *\n * @param {string} fieldId\n * @param {Object} fields\n * @param {string[]} accumulator\n * @return {string[]}\n */\n\n\nfunction getFieldIdsByRootId(fieldId, fields, accumulator) {\n var field = fields[fieldId];\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n accumulator = group.fields.reduce(function (groupAccumulator, groupField) {\n return getFieldIdsByRootId(groupField.id, fields, groupAccumulator);\n }, accumulator);\n });\n }\n\n return accumulator.concat(fieldId);\n}\n/**\n * The reducer that keeps track of the fields.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\n\nfunction fields() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_STATE':\n return action.payload.fields;\n\n case 'UPDATE_STATE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(action.payload.fields).forEach(function (field) {\n draft[field.id] = field;\n });\n });\n\n case 'UPDATE_FIELD_VALUE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n var _action$payload = action.payload,\n fieldId = _action$payload.fieldId,\n value = _action$payload.value;\n draft[fieldId].value = value;\n });\n\n case 'ADD_FIELDS':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n action.payload.fields.forEach(function (field) {\n draft[field.id] = field;\n });\n });\n\n case 'CLONE_FIELDS':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n var _action$payload2 = action.payload,\n originFieldIds = _action$payload2.originFieldIds,\n cloneFieldIds = _action$payload2.cloneFieldIds;\n var clonedFields = originFieldIds.reduce(function (accumulator, originFieldId, index) {\n return cloneField(originFieldId, cloneFieldIds[index], draft, accumulator);\n }, []);\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"assign\"])(draft, Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"keyBy\"])(clonedFields, 'id'));\n });\n\n case 'REMOVE_FIELDS':\n var fieldIds = action.payload.fieldIds.reduce(function (accumulator, fieldId) {\n return getFieldIdsByRootId(fieldId, state, accumulator);\n }, []);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, fieldIds);\n\n case 'RECEIVE_SIDEBAR':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"forEach\"])(draft, function (field) {\n if (field.type === 'sidebar') {\n field.options.unshift(action.payload);\n }\n });\n });\n\n default:\n return state;\n }\n}\n/**\n * The reducer that keeps track of the save locks.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction savingLock() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'LOCK_SAVING':\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, state, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, action.payload.lockName, true));\n\n case 'UNLOCK_SAVING':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, [action.payload.lockName]);\n\n default:\n return state;\n }\n}\n/**\n * The reducer that keeps track if there is dirty fields.\n *\n * @param {boolean} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction isDirty() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'UPDATE_FIELD_VALUE':\n return true;\n\n default:\n return state;\n }\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__[\"combineReducers\"])({\n containers: containers,\n fields: fields,\n savingLock: savingLock,\n isDirty: isDirty\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/store/reducer.js?"); /***/ }), @@ -1156,7 +1169,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainers\", function() { return getContainers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainerById\", function() { return getContainerById; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFields\", function() { return getFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldsByContainerId\", function() { return getFieldsByContainerId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldById\", function() { return getFieldById; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isSavingLocked\", function() { return isSavingLocked; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDirty\", function() { return isDirty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getComplexGroupValues\", function() { return getComplexGroupValues; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Returns the containers.\n *\n * @param {Object} state\n * @return {Object[]}\n */\n\nfunction getContainers(state) {\n return state.containers;\n}\n/**\n * Returns a container by an id.\n *\n * @param {Object} state\n * @param {string} containerId\n * @return {?Object}\n */\n\nfunction getContainerById(state, containerId) {\n return state.containers[containerId];\n}\n/**\n * Returns the fields.\n *\n * @param {Object} state\n * @return {Object}\n */\n\nfunction getFields(state) {\n return state.fields;\n}\n/**\n * Returns the fields that belong to the specified container.\n *\n * @param {Object} state\n * @param {string} containerId\n * @return {Object[]}\n */\n\nfunction getFieldsByContainerId(state, containerId) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"filter\"])(state.fields, ['container_id', containerId]);\n}\n/**\n * Returns a field by an id.\n *\n * @param {Object} state\n * @param {string} fieldId\n * @return {?Object}\n */\n\nfunction getFieldById(state, fieldId) {\n return state.fields[fieldId];\n}\n/**\n * Returns whether saving is locked.\n *\n * @param {Object} state\n * @return {boolean}\n */\n\nfunction isSavingLocked(state) {\n return Object.keys(state.savingLock).length > 0;\n}\n/**\n * Returns whether the metaboxes fields contain unsaved changed.\n *\n * @param {Object} state\n * @return {boolean}\n */\n\nfunction isDirty(state) {\n return state.isDirty;\n}\n/**\n * Returns a map of field values for a given group.\n *\n * @param {Object} state\n * @param {string[]} fieldIds\n * @return {Object}\n */\n\nfunction getComplexGroupValues(state, fieldIds) {\n var fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"pick\"])(getFields(state), fieldIds);\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"mapKeys\"])(fields, function (field) {\n return field.base_name.replace(/\\-/g, '_');\n });\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"mapValues\"])(fields, function (field) {\n return field.value;\n });\n return fields;\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/store/selectors.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainers\", function() { return getContainers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainerById\", function() { return getContainerById; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFields\", function() { return getFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldsByContainerId\", function() { return getFieldsByContainerId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldById\", function() { return getFieldById; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isSavingLocked\", function() { return isSavingLocked; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDirty\", function() { return isDirty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getComplexGroupValues\", function() { return getComplexGroupValues; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Returns the containers.\n *\n * @param {Object} state\n * @return {Object[]}\n */\n\nfunction getContainers(state) {\n return state.containers;\n}\n/**\n * Returns a container by an id.\n *\n * @param {Object} state\n * @param {string} containerId\n * @return {?Object}\n */\n\nfunction getContainerById(state, containerId) {\n return state.containers[containerId];\n}\n/**\n * Returns the fields.\n *\n * @param {Object} state\n * @return {Object}\n */\n\nfunction getFields(state) {\n return state.fields;\n}\n/**\n * Returns the fields that belong to the specified container.\n *\n * @param {Object} state\n * @param {string} containerId\n * @return {Object[]}\n */\n\nfunction getFieldsByContainerId(state, containerId) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"filter\"])(state.fields, ['container_id', containerId]);\n}\n/**\n * Returns a field by an id.\n *\n * @param {Object} state\n * @param {string} fieldId\n * @return {?Object}\n */\n\nfunction getFieldById(state, fieldId) {\n return state.fields[fieldId];\n}\n/**\n * Returns whether saving is locked.\n *\n * @param {Object} state\n * @return {boolean}\n */\n\nfunction isSavingLocked(state) {\n return Object.keys(state.savingLock).length > 0;\n}\n/**\n * Returns whether the metaboxes fields contain unsaved changed.\n *\n * @param {Object} state\n * @return {boolean}\n */\n\nfunction isDirty(state) {\n return state.isDirty;\n}\n/**\n * Returns a map of field values for a given group.\n *\n * @param {Object} state\n * @param {string[]} fieldIds\n * @return {Object}\n */\n\nfunction getComplexGroupValues(state, fieldIds) {\n var fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"pick\"])(getFields(state), fieldIds);\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"mapKeys\"])(fields, function (field) {\n return field.base_name.replace(/\\-/g, '_');\n });\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"mapValues\"])(fields, function (field) {\n return field.value;\n });\n return fields;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/store/selectors.js?"); /***/ }), @@ -1168,7 +1181,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return flattenField; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Flattens a field.\n *\n * @param {Object} field\n * @param {string} containerId\n * @param {Object[]} accumulator\n * @return {Object}\n */\n\nfunction flattenField(field, containerId, accumulator) {\n field = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"cloneDeep\"])(field); // Replace the id of the field.\n\n field.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"uniqueId\"])(); // Keep reference to the container.\n\n field.container_id = containerId; // The complex fields represent a nested structure of fields.\n // So we need to flat them as well.\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"uniqueId\"])();\n group.container_id = containerId;\n group.fields = group.fields.map(function (groupField) {\n return flattenField(groupField, containerId, accumulator);\n });\n });\n }\n\n accumulator.push(field);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"pick\"])(field, ['id', 'type', 'name', 'base_name']);\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/flatten-field.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return flattenField; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Flattens a field.\n *\n * @param {Object} field\n * @param {string} containerId\n * @param {Object[]} accumulator\n * @return {Object}\n */\n\nfunction flattenField(field, containerId, accumulator) {\n field = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"cloneDeep\"])(field); // Replace the id of the field.\n\n field.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"uniqueId\"])(); // Keep reference to the container.\n\n field.container_id = containerId; // The complex fields represent a nested structure of fields.\n // So we need to flat them as well.\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"uniqueId\"])();\n group.container_id = containerId;\n group.fields = group.fields.map(function (groupField) {\n return flattenField(groupField, containerId, accumulator);\n });\n });\n }\n\n accumulator.push(field);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"pick\"])(field, ['id', 'type', 'name', 'base_name']);\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/utils/flatten-field.js?"); /***/ }), @@ -1180,7 +1193,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return fromEventPattern; });\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-create */ \"./node_modules/callbag-create/index.js\");\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(callbag_create__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Callbag source factory from `addHandler` and `removeHandler` pair.\n *\n * @see https://github.com/Andarist/callbag-from-event-pattern\n * @param {Function} addHandler\n * @param {Function} removeHandler\n * @param {Function} argsTransformer\n * @return {Function}\n */\n\nfunction fromEventPattern(addHandler, removeHandler) {\n var argsTransformer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return args;\n };\n return callbag_create__WEBPACK_IMPORTED_MODULE_0___default()(function (sink) {\n var handler = function handler() {\n return sink(1, argsTransformer.apply(void 0, arguments));\n };\n\n addHandler(handler);\n return function () {\n return removeHandler(handler);\n };\n });\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/from-event-pattern.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return fromEventPattern; });\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-create */ \"./node_modules/callbag-create/index.js\");\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(callbag_create__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Callbag source factory from `addHandler` and `removeHandler` pair.\n *\n * @see https://github.com/Andarist/callbag-from-event-pattern\n * @param {Function} addHandler\n * @param {Function} removeHandler\n * @param {Function} argsTransformer\n * @return {Function}\n */\n\nfunction fromEventPattern(addHandler, removeHandler) {\n var argsTransformer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return args;\n };\n return callbag_create__WEBPACK_IMPORTED_MODULE_0___default()(function (sink) {\n var handler = function handler() {\n return sink(1, argsTransformer.apply(void 0, arguments));\n };\n\n addHandler(handler);\n return function () {\n return removeHandler(handler);\n };\n });\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/utils/from-event-pattern.js?"); /***/ }), @@ -1192,7 +1205,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return isGutenberg; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Returns true if Gutenberg is presented.\n *\n * For some reason the Gutenberg package uses `_wpLoadGutenbergEditor`\n * while WordPress@5 uses `_wpLoadBlockEditor`.\n *\n * @return {boolean}\n */\n\nfunction isGutenberg() {\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isUndefined\"])(window._wpLoadGutenbergEditor) || !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isUndefined\"])(window._wpLoadBlockEditor);\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/is-gutenberg.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return isGutenberg; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Returns true if Gutenberg is presented.\n *\n * @return {boolean}\n */\n\nfunction isGutenberg() {\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isUndefined\"])(window._wpLoadBlockEditor);\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/utils/is-gutenberg.js?"); /***/ }), @@ -1204,7 +1217,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return stripCompactInputPrefix; });\n/**\n * Removes the prefix used to compact the input of Carbon Fields.\n *\n * @param {string} str\n * @return {string}\n */\nfunction stripCompactInputPrefix(str) {\n var _window$cf$config = window.cf.config,\n compactInput = _window$cf$config.compactInput,\n compactInputKey = _window$cf$config.compactInputKey;\n\n if (!compactInput || str.indexOf(compactInputKey) !== 0) {\n return str;\n }\n\n return str.replace(new RegExp(\"^\".concat(compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1');\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/strip-compact-input-prefix.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return stripCompactInputPrefix; });\n/**\n * Removes the prefix used to compact the input of Carbon Fields.\n *\n * @param {string} str\n * @return {string}\n */\nfunction stripCompactInputPrefix(str) {\n var _window$cf$config = window.cf.config,\n compactInput = _window$cf$config.compactInput,\n compactInputKey = _window$cf$config.compactInputKey;\n\n if (!compactInput || str.indexOf(compactInputKey) !== 0) {\n return str;\n }\n\n return str.replace(new RegExp(\"^\".concat(compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/utils/strip-compact-input-prefix.js?"); /***/ }), @@ -1216,7 +1229,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return urldecode; });\n/**\n * Source: https://github.com/kvz/locutus/blob/master/src/php/url/urldecode.js\n *\n * @param {string} str\n * @return {string}\n */\nfunction urldecode(str) {\n return decodeURIComponent((str + '').replace(/%(?![\\da-f]{2})/gi, function () {\n // PHP tolerates poorly formed escape sequences\n return '%25';\n }).replace(/\\+/g, '%20'));\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/urldecode.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return urldecode; });\n/**\n * Source: https://github.com/kvz/locutus/blob/master/src/php/url/urldecode.js\n *\n * @param {string} str\n * @return {string}\n */\nfunction urldecode(str) {\n return decodeURIComponent((str + '').replace(/%(?![\\da-f]{2})/gi, function () {\n // PHP tolerates poorly formed escape sequences\n return '%25';\n }).replace(/\\+/g, '%20'));\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/utils/urldecode.js?"); /***/ }), @@ -1227,7 +1240,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"core\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22core%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"core\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22core%22%5D?"); /***/ }), @@ -1238,7 +1251,7 @@ eval("module.exports = cf[\"core\"];\n\n//# sourceURL=webpack:///external_%5B%22 /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"@wordpress/compose\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22@wordpress/compose%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"@wordpress/compose\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22@wordpress/compose%22%5D?"); /***/ }), @@ -1249,7 +1262,7 @@ eval("module.exports = cf[\"vendor\"][\"@wordpress/compose\"];\n\n//# sourceURL= /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"@wordpress/data\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22@wordpress/data%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"@wordpress/data\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22@wordpress/data%22%5D?"); /***/ }), @@ -1260,7 +1273,7 @@ eval("module.exports = cf[\"vendor\"][\"@wordpress/data\"];\n\n//# sourceURL=web /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"@wordpress/element\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22@wordpress/element%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"@wordpress/element\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22@wordpress/element%22%5D?"); /***/ }), @@ -1271,7 +1284,7 @@ eval("module.exports = cf[\"vendor\"][\"@wordpress/element\"];\n\n//# sourceURL= /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"@wordpress/hooks\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22@wordpress/hooks%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"@wordpress/hooks\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22@wordpress/hooks%22%5D?"); /***/ }), @@ -1282,7 +1295,7 @@ eval("module.exports = cf[\"vendor\"][\"@wordpress/hooks\"];\n\n//# sourceURL=we /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"@wordpress/i18n\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22@wordpress/i18n%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"@wordpress/i18n\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22@wordpress/i18n%22%5D?"); /***/ }), @@ -1293,7 +1306,7 @@ eval("module.exports = cf[\"vendor\"][\"@wordpress/i18n\"];\n\n//# sourceURL=web /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"callbag-basics\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22callbag-basics%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"callbag-basics\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22callbag-basics%22%5D?"); /***/ }), @@ -1304,7 +1317,7 @@ eval("module.exports = cf[\"vendor\"][\"callbag-basics\"];\n\n//# sourceURL=webp /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"classnames\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22classnames%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"classnames\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22classnames%22%5D?"); /***/ }), @@ -1315,7 +1328,7 @@ eval("module.exports = cf[\"vendor\"][\"classnames\"];\n\n//# sourceURL=webpack: /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"immer\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22immer%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"immer\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22immer%22%5D?"); /***/ }), @@ -1326,7 +1339,7 @@ eval("module.exports = cf[\"vendor\"][\"immer\"];\n\n//# sourceURL=webpack:///ex /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"lodash\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22lodash%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"lodash\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22lodash%22%5D?"); /***/ }), @@ -1337,7 +1350,7 @@ eval("module.exports = cf[\"vendor\"][\"lodash\"];\n\n//# sourceURL=webpack:///e /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"refract-callbag\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22refract-callbag%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"refract-callbag\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22refract-callbag%22%5D?"); /***/ }) diff --git a/build/classic/metaboxes.min.js b/build/classic/metaboxes.min.js index 95f37ab9c..d9a1952c2 100644 --- a/build/classic/metaboxes.min.js +++ b/build/classic/metaboxes.min.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=67)}([function(e,t){e.exports=cf.vendor.lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=cf.vendor["@wordpress/hooks"]},function(e,t){e.exports=cf.vendor["@wordpress/data"]},function(e,t){e.exports=cf.core},function(e,t){e.exports=cf.vendor["@wordpress/i18n"]},function(e,t,n){var r=n(9);e.exports=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;nt=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const c=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,c),o=e((e,t)=>{r||0===e||(n(e,t),c(e))})})},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),c=n(25),i=n.n(c),a=n(26),u=n.n(a),s=n(27),l=n.n(s),d=n(28),f=n.n(d),p=n(29),b=n.n(p),m=n(8),v=n.n(m),O=n(9),j=n.n(O),g=n(31),y=n.n(g),h=n(7),_=n(0),w=n(4),E=(n(66),n(30)),x=function(t){function n(){var t,r;i()(this,n);for(var o=arguments.length,c=new Array(o),a=0;at=>(n,r)=>{if(0!==n)return;let o,c,i=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(c=[1,n]),2===t&&(i=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());i||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(c&&(o(...c),c=null));r(e,t)})},m=n(14),v=n(4);function O(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function j(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function g(e){for(var t=[],n=e,r=j(e);r>0&&n;)if(j(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var y={post_ancestors:[],post_parent_id:0,post_level:1};function h(e){var t=e.options[e.selectedIndex];return{post_ancestors:g(t),post_parent_id:O(t),post_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return h(e.target)}),b(h(e))):Object(p.a)(y)}),Object(u.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(l.pipe)(Object(l.combine)(Object(v.fromSelector)(Object(o.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"parent")),Object(m.a)(s.isEqual),Object(l.map)(function(e){var r=f()(e,3),o=r[0],c=r[1],i=r[2];if(i=parseInt(i,10),isNaN(i))return y;var a=t(c);if(!Object(s.get)(a,["hierarchical"],!1))return y;var u=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(s.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(i,n("postType",c,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:u,post_parent_id:i,post_level:u.length+1}}))});var _=n(35),w=n.n(_),E=(e,t,n)=>w()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let c=!1;const i=e=>{o(1,e)};o(0,r=>{2===r&&(c=!0,e.removeEventListener(t,i,n))}),c||e.addEventListener(t,i,n)})(e,n)),x={post_format:"standard"};function S(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(u.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(l.pipe)(E(e,"input.post-format","change"),Object(l.map)(function(e){return S(e.target)}),b(S(e.querySelector("input.post-format:checked")))):Object(p.a)(x)}),Object(u.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"format"),Object(m.a)(),Object(l.filter)(Boolean),Object(l.map)(function(e){return{post_format:e}}),b(x))});var I={post_template:""};function F(e){return{post_template:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return F(e.target)}),b(F(e))):Object(p.a)(I)}),Object(u.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"template"),Object(m.a)(),Object(l.filter)(s.isString),Object(l.map)(function(e){return{post_template:e}}),b(I))});var T=n(6),C=n.n(T),A=n(9),D=n.n(A),N=n(16),k=n.n(N);function G(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(G(window.tagBox,"parseTags"),G(window.tagBox,"flushTags")),Object(u.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(l.pipe)(l.merge.apply(void 0,k()((e=document.querySelectorAll('div[id^="taxonomy-"]'),k()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(l.pipe)(E(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(l.scan)(function(e,n){var r=n.target;return a()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(s.pull)(e[t],n)})},D()({},t,[])),b(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return k()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},D()({},e,[]))}(t)))}))).concat(k()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return k()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(l.pipe)(Object(l.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(l.map)(function(e){var n=e.target;return D()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),b(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return D()({},e,n)}(t)))})}()))),Object(l.scan)(function(e,t){return{post_term:C()({},e.post_term,t)}},{post_term:{}}));var e}),Object(u.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core").getTaxonomies,t=Object(o.select)("core/editor").getEditedPostAttribute;return Object(l.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(l.filter)(Boolean),Object(l.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(s.fromPairs)(n)}}))});var L={term_ancestors:[],term_parent:0,term_level:1};function P(e){var t=e.options[e.selectedIndex];return{term_ancestors:g(t),term_parent:O(t),term_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return P(e.target)}),b(P(e))):Object(p.a)(L)});var R={user_role:""};function V(e){return{user_role:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return t?Object(p.a)({user_role:t.dataset.profileRole}):Object(p.a)(R)}return Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return V(e.target)}),b(V(e)))});var B=n(7),q=n(5),U=n(21),M={operators:[],isOperatorSupported:function(e){return this.operators.indexOf(e)>-1},evaluate:function(){return!1}},Q={comparers:[C()({},M,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),C()({},M,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),C()({},M,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(s.intersection)(e,n).length;default:return!1}}}),H={boolean:K,post_term:$,post_ancestor_id:C()({},Q,{comparers:[W,z],getEnvironmentValue:function(e,t){return Object(s.get)(t,"post_ancestors",[])}}),post_parent_id:Q,post_level:Q,post_format:Q,post_template:Q,term_level:Q,term_parent:C()({},Q,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:C()({},Q,{comparers:[W,z],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(s.get)(t,"term_ancestors",[])}}),user_role:Q},J=Object(o.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),X=Object(c.withEffects)(function(e,t){var n=t.context,r=Object(u.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(u.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),c=Object(u.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),i=Object(u.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),d=Object(u.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),f=Object(u.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(l.pipe)(Object(l.merge)(r,o,c,i,d,f),Object(l.scan)(function(e,t){return a()(e,function(e){Object(s.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(s.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(s.get)(H,t.type);return r?r.isFulfiled(t,n):(console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(q.sprintf)(Object(q.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=f()(e,2),o=r[0],c=r[1],i=document.getElementById(o),a=document.querySelector(".container-".concat(o));i&&(i.hidden=!c),a&&(c&&!a.dataset.mounted&&(a.dataset.mounted=!0,Object(U.b)(t[o],n)),!c&&a.dataset.mounted&&(delete a.dataset.mounted,Object(B.unmountComponentAtNode)(a)))})}}});t.a=Object(r.compose)(J,X)(function(){return null})},function(e,t,n){"use strict";var r=n(3),o=n(7),c=n(0),i=n(13),a=n(1);function u(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var s=n(18),l=n(22),d=n(21),f=n(17);function p(e){return e.indexOf(f.b)>-1}t.a=Object(i.withEffects)(function(){return Object(a.merge)(Object(a.pipe)(Object(l.a)(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(a.filter)(function(e){return p(e.$widget[0].id)}),Object(a.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(a.pipe)(Object(l.a)(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(a.filter)(function(e){var t=e.data;return Object(c.startsWith)(t,"deleted:")&&p(t)}),Object(a.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(r.select)("carbon-fields/metaboxes").getContainerById,n=Object(r.dispatch)("carbon-fields/metaboxes"),i=n.addContainer,a=n.removeContainer,l=n.addFields,p=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var b,m=e.payload,v=m.event,O=m.$widget,j=Object(c.flow)(u,JSON.parse)(O.find("[data-json]").data("json")),g=[];if("widget-updated"===v.type&&(b=t(j.id).fields.map(function(e){return e.id})),j.fields=j.fields.map(function(e){return Object(s.a)(e,j,g)}),l(g),i(j),"widget-updated"===v.type&&p(b),Object(d.b)(j,"classic"),window.cf.config.pagenow===f.c&&"widget-added"===v.type){var y=O.find('[name="widget-id"]').val();O.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(y).liveUpdateMode=!1}break;case"WIDGET_DELETED":var h=e.payload.data.replace("deleted:",""),w="".concat(f.a).concat(h),E=t(w);Object(o.unmountComponentAtNode)(document.querySelector(".container-".concat(w)));var x=_.map(E.fields,"id");a(w),p(x)}}}})(function(){return null})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";(function(e){var t=n(25),r=n.n(t),o=n(26),c=n.n(o),i=n(27),a=n.n(i),u=n(28),s=n.n(u),l=n(29),d=n.n(l),f=n(8),p=n.n(f),b=n(9),m=n.n(b),v=n(10),O=n.n(v),j=n(7),g=n(2),y=n(11),h=n(3),_=n(0),w=n(4),E=(n(47),n(30)),x=n(18),S=function(e){function t(){var e,n;r()(this,t);for(var o=arguments.length,c=new Array(o),i=0;i-1&&t.data.indexOf("add-tag")>-1&&!n.documentElement.querySelector("wp_error")}))},{handler:function(e){return function(){var t=o.a.map(e.container.fields,"id"),n=Object(l.a)(o.a.get(window.cf,"preloaded.containers",[])),r=n.containers,c=n.fields,a=o.a.find(r,["id",e.id]),u=o.a.filter(c,["container_id",e.id]),s=Object(i.dispatch)("carbon-fields/metaboxes"),d=s.updateState,f=s.removeFields;d(o.a.keyBy([a],"id"),o.a.keyBy(u,"id")),f(t)}}}))},function(e,t,n){"use strict";var r=n(2),o=n(13),c=n(1);n(63),Object(r.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(o.withEffects)(function(){return Object(c.pipe)(Object(c.fromEvent)(window,"scroll"),Object(c.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}}))},function(e,t,n){},function(e,t,n){"use strict";n(65)},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupState",function(){return O}),n.d(r,"updateState",function(){return j}),n.d(r,"updateFieldValue",function(){return g}),n.d(r,"addFields",function(){return y}),n.d(r,"cloneFields",function(){return h}),n.d(r,"removeFields",function(){return _}),n.d(r,"addContainer",function(){return w}),n.d(r,"removeContainer",function(){return E}),n.d(r,"receiveSidebar",function(){return x}),n.d(r,"lockSaving",function(){return S}),n.d(r,"unlockSaving",function(){return I});var o={};n.r(o),n.d(o,"getContainers",function(){return F}),n.d(o,"getContainerById",function(){return T}),n.d(o,"getFields",function(){return C}),n.d(o,"getFieldsByContainerId",function(){return A}),n.d(o,"getFieldById",function(){return D}),n.d(o,"isSavingLocked",function(){return N}),n.d(o,"isDirty",function(){return k}),n.d(o,"getComplexGroupValues",function(){return G});var c=n(5),i=n(2),a=n(3),u=n(0),s=n(9),l=n.n(s),d=n(6),f=n.n(d),p=n(10),b=n.n(p),m=n(4),v=Object(a.combineReducers)({containers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return b()(e,function(e){Object(u.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return b()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(u.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return b()(e,function(e){Object(u.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return b()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return b()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return b()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,c=r.reduce(function(t,n,r){return function e(t,n,r,o){var c=Object(u.cloneDeep)(r[t]);return c.id=n,"complex"===c.type&&c.value.forEach(function(t){t.id=Object(m.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,c=Object(m.uniqueId)();return n.id=c,e(o,c,r,t)},o)}),o.concat(c)}(n,o[r],e,t)},[]);Object(u.assign)(e,Object(u.keyBy)(c,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(u.omit)(e,n);case"RECEIVE_SIDEBAR":return b()(e,function(e){Object(u.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return f()({},e,l()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(u.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function O(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function g(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function y(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function h(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function _(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function w(e){return{type:"ADD_CONTAINER",payload:e}}function E(e){return{type:"REMOVE_CONTAINER",payload:e}}function x(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function S(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function I(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function F(e){return e.containers}function T(e,t){return e.containers[t]}function C(e){return e.fields}function A(e,t){return Object(u.filter)(e.fields,["container_id",t])}function D(e,t){return e.fields[t]}function N(e){return Object.keys(e.savingLock).length>0}function k(e){return e.isDirty}function G(e,t){var n=Object(u.pick)(C(e),t);return n=Object(u.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(u.mapValues)(n,function(e){return e.value})}var L=n(23);Object(a.registerStore)("carbon-fields/metaboxes",{reducer:v,actions:r,selectors:o});var P=Object(L.a)(Object(u.get)(window.cf,"preloaded.containers",[])),R=P.containers,V=P.fields;Object(a.dispatch)("carbon-fields/metaboxes").setupState(Object(u.keyBy)(R,"id"),Object(u.keyBy)(V,"id"));var B=n(11),q=n(24),U=n(19),M=n.n(U),Q=n(12),K=n(14),W=n(1);function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Object(u.pick)(t,Object(u.difference)(Object(u.map)(e.fields,"id"),n))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(u.map)(e,function(e){return[e.id,"".concat(Object(u.repeat)("parent.",t)).concat(e.base_name)]})}var H=Object(m.withConditionalLogic)(function(e){var t=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(W.pipe)(Object(W.merge)(Object(Q.a)(t(e.containerId)),Object(m.fromSelector)(t,e.containerId)),Object(K.a)(u.isEqual))},function(e,t){t=Object(u.keyBy)(t,"id");var n=Object(a.select)("carbon-fields/metaboxes").getContainerById(e.containerId),r=[];if(Object(u.some)(n.fields,["id",e.id]))r=z(r=$(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),c=Object(u.find)(t,function(t){return t.container_id===e.containerId&&Object(u.startsWith)(o,t.name)}),i=o.split(/\[|\]/g);i.shift(),(i=i.filter(function(e){return""!==e})).pop();var s=i.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=z(r=$(n,t,[c.id]),s+1);for(var l="".concat(c.id,".value");i.length>0;){var d=i.shift(),f=!isNaN(d),p=!f;if(f){l="".concat(l,"[").concat(d,"]");var b=$(Object(u.get)(t,l),t,[e.id]);r=r.concat(z(b,s)),l="".concat(l,".fields")}if(p){var m=Object(u.find)(Object(u.get)(t,l),["name",d]);l="".concat(m.id,".value"),s--}}}return r=r.map(function(e){var n=M()(e,2),r=n[0];return[n[1],Object(u.get)(t,"".concat(r,".value"))]}),Object(u.fromPairs)(r)}),J=n(20);function X(e,t){return Object(u.find)(e,function(e){return e.name===t})}Object(i.addFilter)("carbon-fields.association.metabox","carbon-fields/metaboxes",Object(m.withProps)(function(e){return{hierarchyResolver:function(){for(var t,n,r,o,c=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId(e.containerId),i=(t=e.name,n=window.cf.config,r=n.compactInput,o=n.compactInputKey,r&&0===t.indexOf(o)?t.replace(new RegExp("^".concat(o,"\\[(.+?)\\]")),"$1"):t).split(/\[|\]/g),s=X(c,(i=i.filter(function(e){return""!==e})).shift()),l=c.indexOf(s),d=s.base_name;i.length>0;){var f=i.shift(),p=!isNaN(f),b=f===e.field.base_name,m=!p&&!b;if(p&&(l="".concat(l,".value.").concat(f,".name"),d="".concat(d,"[").concat(f,"]:").concat(Object(u.get)(c,l),"/")),m){var v=X(c,f);l=c.indexOf(v),d="".concat(d).concat(v.base_name)}b&&(d="".concat(d).concat(f))}return d}}})),n(44),n(49),n(50),n(51),n(52),n(53),n(55),Object(i.addFilter)("carbon-fields.sidebar.metabox","carbon-fields/metaboxes",Object(a.withDispatch)(function(e){return{onAdded:e("carbon-fields/metaboxes").receiveSidebar}})),Object(i.addFilter)("carbon-fields.field-edit.metabox","carbon-fields/metaboxes",Object(B.compose)(q.a,H,Object(a.withDispatch)(function(e){if(Object(J.a)()){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}var n=e("carbon-fields/metaboxes");return{lockSaving:n.lockSaving,unlockSaving:n.unlockSaving}}),m.withValidation));var Y=n(33),Z=n(21);Object(c.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var ee=Object(J.a)()?"gutenberg":"classic";Object(i.addAction)("carbon-fields.init","carbon-fields/metaboxes",function(){Object(Z.a)(ee),Object(Y.a)(ee)})},function(e,t,n){"use strict";var r=n(11),o=n(2),c=n(4),i=n(3),a=Object(r.createHigherOrderComponent)(function(e){return Object(i.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(o.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(r.compose)(a,Object(c.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)})}]); \ No newline at end of file +this.cf=this.cf||{},this.cf.metaboxes=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=67)}([function(e,t){!function(){e.exports=this.cf.vendor.lodash}()},function(e,t){!function(){e.exports=this.cf.vendor["callbag-basics"]}()},function(e,t){!function(){e.exports=this.cf.vendor["@wordpress/hooks"]}()},function(e,t){!function(){e.exports=this.cf.vendor["@wordpress/data"]}()},function(e,t){!function(){e.exports=this.cf.core}()},function(e,t,n){var r=n(9);e.exports=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;nt=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t,n){"use strict";(function(e){var r=n(16),o=n.n(r),i=n(26),c=n.n(i),a=n(27),u=n.n(a),s=n(28),l=n.n(s),d=n(29),f=n.n(d),p=n(30),b=n.n(p),m=n(7),v=n.n(m),O=n(9),j=n.n(O),g=n(32),y=n.n(g),h=n(8),_=n(0),w=n(4),x=(n(66),n(31)),E=function(t){function n(){var t,r;c()(this,n);for(var o=arguments.length,i=new Array(o),a=0;at=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})},m=n(14),v=n(4);function O(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function j(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function g(e){for(var t=[],n=e,r=j(e);r>0&&n;)if(j(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var y={post_ancestors:[],post_parent_id:0,post_level:1};function h(e){var t=e.options[e.selectedIndex];return{post_ancestors:g(t),post_parent_id:O(t),post_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return h(e.target)}),b(h(e))):Object(p.a)(y)}),Object(u.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(l.pipe)(Object(l.combine)(Object(v.fromSelector)(Object(o.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"parent")),Object(m.a)(s.isEqual),Object(l.map)(function(e){var r=f()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return y;var a=t(i);if(!Object(s.get)(a,["hierarchical"],!1))return y;var u=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(s.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:u,post_parent_id:c,post_level:u.length+1}}))});var _=n(35),w=n.n(_),x=(e,t,n)=>w()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),E={post_format:"standard"};function S(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(u.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(l.pipe)(x(e,"input.post-format","change"),Object(l.map)(function(e){return S(e.target)}),b(S(e.querySelector("input.post-format:checked")))):Object(p.a)(E)}),Object(u.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"format"),Object(m.a)(),Object(l.filter)(Boolean),Object(l.map)(function(e){return{post_format:e}}),b(E))});var I={post_template:""};function F(e){var t=e.value;return"default"===t&&(t=""),{post_template:t}}Object(u.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return F(e.target)}),b(F(e))):Object(p.a)(I)}),Object(u.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(l.pipe)(Object(v.fromSelector)(Object(o.select)("core/editor").getEditedPostAttribute,"template"),Object(m.a)(),Object(l.filter)(s.isString),Object(l.map)(function(e){return{post_template:e}}),b(I))});var T=n(5),C=n.n(T),A=n(9),D=n.n(A),N=n(16),k=n.n(N);function G(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(G(window.tagBox,"parseTags"),G(window.tagBox,"flushTags")),Object(u.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(l.pipe)(l.merge.apply(void 0,k()((e=document.querySelectorAll('div[id^="taxonomy-"]'),k()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(l.pipe)(x(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(l.scan)(function(e,n){var r=n.target;return a()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(s.pull)(e[t],n)})},D()({},t,[])),b(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return k()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},D()({},e,[]))}(t)))}))).concat(k()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return k()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(l.pipe)(Object(l.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(l.map)(function(e){var n=e.target;return D()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),b(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return D()({},e,n)}(t)))})}()))),Object(l.scan)(function(e,t){return{post_term:C()({},e.post_term,t)}},{post_term:{}}));var e}),Object(u.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(o.select)("core").getTaxonomies,t=Object(o.select)("core/editor").getEditedPostAttribute;return Object(l.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(l.filter)(Boolean),Object(l.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(s.fromPairs)(n)}}))});var L={term_ancestors:[],term_parent:0,term_level:1};function P(e){var t=e.options[e.selectedIndex];return{term_ancestors:g(t),term_parent:O(t),term_level:j(t)+1}}Object(u.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return P(e.target)}),b(P(e))):Object(p.a)(L)});var R={user_role:""};function V(e){return{user_role:e.value}}Object(u.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return t?Object(p.a)({user_role:t.dataset.profileRole}):Object(p.a)(R)}return Object(l.pipe)(Object(l.fromEvent)(e,"change"),Object(l.map)(function(e){return V(e.target)}),b(V(e)))});var B=n(6),q=n(22),U={operators:[],isOperatorSupported:function(e){return this.operators.indexOf(e)>-1},evaluate:function(){return!1}},M={comparers:[C()({},U,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),C()({},U,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),C()({},U,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(s.intersection)(e,n).length;default:return!1}}}),H=C()({},M,{comparers:[K,z],getEnvironmentValue:function(e,t){return Object(s.get)(t,"post_ancestors",[])}}),J=C()({},M,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),X=C()({},M,{comparers:[K,z],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(s.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(s.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(s.get)(t,"term_ancestors",[])}}),Y={boolean:Q,post_term:W,post_ancestor_id:H,post_parent_id:M,post_level:M,post_format:M,post_template:$,term_level:M,term_parent:J,term_ancestor:X,user_role:M},Z=Object(o.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),ee=Object(i.withEffects)(function(e,t){var n=t.context,r=Object(u.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(u.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(u.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),c=Object(u.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),d=Object(u.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),f=Object(u.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(l.pipe)(Object(l.merge)(r,o,i,c,d,f),Object(l.scan)(function(e,t){return a()(e,function(e){Object(s.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(s.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(s.get)(Y,t.type);return r?r.isFulfiled(t,n):(console.error(Object(B.sprintf)(Object(B.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(B.sprintf)(Object(B.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=f()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o)),u=!!a.dataset.mounted;c&&(c.hidden=!i),a&&(i&&!u&&Object(q.b)(t[o],n),!i&&u&&(delete a.dataset.mounted,a._reactRootContainer.unmount()))})}}});t.a=Object(r.compose)(Z,ee)(function(){return null})},function(e,t,n){"use strict";var r=n(3),o=n(8),i=n(0),c=n(13),a=n(1);function u(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var s=n(19),l=n(23),d=n(22),f=n(17);function p(e){return e.indexOf(f.b)>-1}t.a=Object(c.withEffects)(function(){return Object(a.merge)(Object(a.pipe)(Object(l.a)(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(a.filter)(function(e){return p(e.$widget[0].id)}),Object(a.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(a.pipe)(Object(l.a)(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(a.filter)(function(e){var t=e.data;return Object(i.startsWith)(t,"deleted:")&&p(t)}),Object(a.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(r.select)("carbon-fields/metaboxes").getContainerById,n=Object(r.dispatch)("carbon-fields/metaboxes"),c=n.addContainer,a=n.removeContainer,l=n.addFields,p=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var b,m=e.payload,v=m.event,O=m.$widget,j=Object(i.flow)(u,JSON.parse)(O.find("[data-json]").data("json")),g=[];if("widget-updated"===v.type&&(b=t(j.id).fields.map(function(e){return e.id})),j.fields=j.fields.map(function(e){return Object(s.a)(e,j,g)}),l(g),c(j),"widget-updated"===v.type&&p(b),Object(d.b)(j,"classic"),window.cf.config.pagenow===f.c&&"widget-added"===v.type){var y=O.find('[name="widget-id"]').val();O.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(y).liveUpdateMode=!1}break;case"WIDGET_DELETED":var h=e.payload.data.replace("deleted:",""),w="".concat(f.a).concat(h),x=t(w);Object(o.unmountComponentAtNode)(document.querySelector(".container-".concat(w)));var E=_.map(x.fields,"id");a(w),p(E)}}}})(function(){return null})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";(function(e){var t=n(26),r=n.n(t),o=n(27),i=n.n(o),c=n(28),a=n.n(c),u=n(29),s=n.n(u),l=n(30),d=n.n(l),f=n(7),p=n.n(f),b=n(9),m=n.n(b),v=n(10),O=n.n(v),j=n(8),g=n(2),y=n(11),h=n(3),_=n(0),w=n(4),x=(n(47),n(31)),E=n(19),S=function(e){function t(){var e,n;r()(this,t);for(var o=arguments.length,i=new Array(o),c=0;c-1&&t.data.indexOf("add-tag")>-1&&!n.documentElement.querySelector("wp_error")}))},{handler:function(e){return function(){var t=o.a.map(e.container.fields,"id"),n=Object(l.a)(o.a.get(window.cf,"preloaded.containers",[])),r=n.containers,i=n.fields,a=o.a.find(r,["id",e.id]),u=o.a.filter(i,["container_id",e.id]),s=Object(c.dispatch)("carbon-fields/metaboxes"),d=s.updateState,f=s.removeFields;d(o.a.keyBy([a],"id"),o.a.keyBy(u,"id")),f(t)}}}))},function(e,t,n){"use strict";var r=n(2),o=n(13),i=n(1);n(63),Object(r.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(o.withEffects)(function(){return Object(i.pipe)(Object(i.fromEvent)(window,"scroll"),Object(i.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}}))},function(e,t,n){},function(e,t,n){"use strict";n(65)},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupState",function(){return O}),n.d(r,"updateState",function(){return j}),n.d(r,"updateFieldValue",function(){return g}),n.d(r,"addFields",function(){return y}),n.d(r,"cloneFields",function(){return h}),n.d(r,"removeFields",function(){return _}),n.d(r,"addContainer",function(){return w}),n.d(r,"removeContainer",function(){return x}),n.d(r,"receiveSidebar",function(){return E}),n.d(r,"lockSaving",function(){return S}),n.d(r,"unlockSaving",function(){return I});var o={};n.r(o),n.d(o,"getContainers",function(){return F}),n.d(o,"getContainerById",function(){return T}),n.d(o,"getFields",function(){return C}),n.d(o,"getFieldsByContainerId",function(){return A}),n.d(o,"getFieldById",function(){return D}),n.d(o,"isSavingLocked",function(){return N}),n.d(o,"isDirty",function(){return k}),n.d(o,"getComplexGroupValues",function(){return G});var i=n(6),c=n(2),a=n(3),u=n(0),s=n(9),l=n.n(s),d=n(5),f=n.n(d),p=n(10),b=n.n(p),m=n(4),v=Object(a.combineReducers)({containers:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return b()(e,function(e){Object(u.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return b()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(u.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return b()(e,function(e){Object(u.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return b()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return b()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return b()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(u.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(m.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(m.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(u.assign)(e,Object(u.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(u.omit)(e,n);case"RECEIVE_SIDEBAR":return b()(e,function(e){Object(u.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return f()({},e,l()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(u.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function O(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function j(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function g(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function y(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function h(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function _(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function w(e){return{type:"ADD_CONTAINER",payload:e}}function x(e){return{type:"REMOVE_CONTAINER",payload:e}}function E(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function S(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function I(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function F(e){return e.containers}function T(e,t){return e.containers[t]}function C(e){return e.fields}function A(e,t){return Object(u.filter)(e.fields,["container_id",t])}function D(e,t){return e.fields[t]}function N(e){return Object.keys(e.savingLock).length>0}function k(e){return e.isDirty}function G(e,t){var n=Object(u.pick)(C(e),t);return n=Object(u.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(u.mapValues)(n,function(e){return e.value})}var L=n(24);Object(a.registerStore)("carbon-fields/metaboxes",{reducer:v,actions:r,selectors:o});var P=Object(L.a)(Object(u.get)(window.cf,"preloaded.containers",[])),R=P.containers,V=P.fields;Object(a.dispatch)("carbon-fields/metaboxes").setupState(Object(u.keyBy)(R,"id"),Object(u.keyBy)(V,"id"));var B=n(11),q=n(25),U=n(20),M=n.n(U),Q=n(12),K=n(14),W=n(1);function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return Object(u.pick)(t,Object(u.difference)(Object(u.map)(e.fields,"id"),n))}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(u.map)(e,function(e){return[e.id,"".concat(Object(u.repeat)("parent.",t)).concat(e.base_name)]})}var H=Object(m.withConditionalLogic)(function(e){var t=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(W.pipe)(Object(W.merge)(Object(Q.a)(t(e.containerId)),Object(m.fromSelector)(t,e.containerId)),Object(K.a)(u.isEqual))},function(e,t){t=Object(u.keyBy)(t,"id");var n=Object(a.select)("carbon-fields/metaboxes").getContainerById(e.containerId),r=[];if(Object(u.some)(n.fields,["id",e.id]))r=z(r=$(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(u.find)(t,function(t){return t.container_id===e.containerId&&Object(u.startsWith)(o,t.name)}),c=o.split(/\[|\]/g);c.shift(),(c=c.filter(function(e){return""!==e})).pop();var s=c.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=z(r=$(n,t,[i.id]),s+1);for(var l="".concat(i.id,".value");c.length>0;){var d=c.shift(),f=!isNaN(d),p=!f;if(f){l="".concat(l,"[").concat(d,"]");var b=$(Object(u.get)(t,l),t,[e.id]);r=r.concat(z(b,s)),l="".concat(l,".fields")}if(p){var m=Object(u.find)(Object(u.get)(t,l),["name",d]);l="".concat(m.id,".value"),s--}}}return r=r.map(function(e){var n=M()(e,2),r=n[0];return[n[1],Object(u.get)(t,"".concat(r,".value"))]}),Object(u.fromPairs)(r)}),J=n(21);function X(e,t){return Object(u.find)(e,function(e){return e.name===t})}Object(c.addFilter)("carbon-fields.association.metabox","carbon-fields/metaboxes",Object(m.withProps)(function(e){return{hierarchyResolver:function(){for(var t,n,r,o,i=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId(e.containerId),c=(t=e.name,n=window.cf.config,r=n.compactInput,o=n.compactInputKey,r&&0===t.indexOf(o)?t.replace(new RegExp("^".concat(o,"\\[(.+?)\\]")),"$1"):t).split(/\[|\]/g),s=X(i,(c=c.filter(function(e){return""!==e})).shift()),l=i.indexOf(s),d=s.base_name;c.length>0;){var f=c.shift(),p=!isNaN(f),b=f===e.field.base_name,m=!p&&!b;if(p&&(l="".concat(l,".value.").concat(f,".name"),d="".concat(d,"[").concat(f,"]:").concat(Object(u.get)(i,l),"/")),m){var v=X(i,f);l=i.indexOf(v),d="".concat(d).concat(v.base_name)}b&&(d="".concat(d).concat(f))}return d}}})),n(44),n(49),n(50),n(51),n(52),n(53),n(55),Object(c.addFilter)("carbon-fields.sidebar.metabox","carbon-fields/metaboxes",Object(a.withDispatch)(function(e){return{onAdded:e("carbon-fields/metaboxes").receiveSidebar}})),Object(c.addFilter)("carbon-fields.field-edit.metabox","carbon-fields/metaboxes",Object(B.compose)(q.a,H,Object(a.withDispatch)(function(e){if(Object(J.a)()){var t=e("core/editor");return{lockSaving:t.lockPostSaving,unlockSaving:t.unlockPostSaving}}var n=e("carbon-fields/metaboxes");return{lockSaving:n.lockSaving,unlockSaving:n.unlockSaving}}),m.withValidation));var Y=n(33),Z=n(22),ee=n(18);n.d(t,"registerContainerType",function(){return ee.b}),n.d(t,"getContainerType",function(){return ee.a}),Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var te=Object(J.a)()?"gutenberg":"classic";Object(c.addAction)("carbon-fields.init","carbon-fields/metaboxes",function(){Object(Z.a)(te),Object(Y.a)(te)})},function(e,t,n){"use strict";var r=n(11),o=n(2),i=n(4),c=n(3),a=Object(r.createHigherOrderComponent)(function(e){return Object(c.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(o.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(r.compose)(a,Object(i.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)})}]); \ No newline at end of file diff --git a/build/gutenberg/core.css b/build/gutenberg/core.css index 4ce6dec26..ab4e233eb 100644 --- a/build/gutenberg/core.css +++ b/build/gutenberg/core.css @@ -24,25 +24,51 @@ ========================================================================== */ .cf-association__bar { position: relative; - z-index: 1; } + z-index: 1; + display: flex; + justify-content: space-between; + align-items: center; + flex-direction: row; + border-color: #e2e4e7; + border-style: solid; + border-width: 1px 1px 0; + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07); } + .cf-association__bar .cf-search-input { + flex: 1 1 auto; } + .cf-association__bar .cf-search-input__inner { + border: 0; + box-shadow: none; } + .cf-association__bar .cf-search-input__inner:focus { + border-color: none; + box-shadow: none; + outline: none; } + .cf-association__bar[focus-within] { + border-color: #5b9dd9; + box-shadow: 0 0 2px rgba(30, 140, 190, 0.8); + outline: 2px solid transparent; } + .cf-association__bar:focus-within { + border-color: #5b9dd9; + box-shadow: 0 0 2px rgba(30, 140, 190, 0.8); + outline: 2px solid transparent; } .cf-association__counter { - position: absolute; - top: 50%; - right: 8px; font-size: 12px; - line-height: 1; color: #23282d; - -webkit-transform: translateY(-50%); - transform: translateY(-50%); - pointer-events: none; } + pointer-events: none; + margin-right: 5px; + margin-left: 5px; } + +.cf-association__spinner { + float: none; + margin: 0; + margin-left: 5px; } .cf-association__cols { background: #fff; position: relative; z-index: 0; display: flex; - border-width: 0 1px 1px; + border-width: 1px; border-style: solid; border-color: #e2e4e7; } .cf-association__cols::before { @@ -89,15 +115,25 @@ margin-right: 8px; } .cf-association__option-title { - overflow: hidden; + flex: 1; + position: relative; + margin-right: 4px; } + .cf-association__option--selected .cf-association__option-title { + color: #82878c; } + +.cf-association__option-title-inner { + position: absolute; + top: 0; + left: 0; + width: 100%; font-size: 13px; line-height: 1.4; color: #32373c; + overflow: hidden; white-space: nowrap; text-overflow: ellipsis; - margin-right: 4px; } - .cf-association__option--selected .cf-association__option-title { - color: #82878c; } + -webkit-transform: translateY(-50%); + transform: translateY(-50%); } .cf-association__option-type { font-size: 9px; diff --git a/build/gutenberg/core.js b/build/gutenberg/core.js index e5152d7e6..d4ac2ccc8 100644 --- a/build/gutenberg/core.js +++ b/build/gutenberg/core.js @@ -3119,7 +3119,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/association/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\nvar AssociationField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(AssociationField, _Component);\n\n function AssociationField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, AssociationField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(AssociationField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"selectedList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSearchChange\", function (queryTerm) {\n var _this$props = _this.props,\n fetchOptions = _this$props.fetchOptions,\n setState = _this$props.setState;\n setState({\n queryTerm: queryTerm\n });\n fetchOptions({\n queryTerm: queryTerm\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddItem\", function (option) {\n var _this$props2 = _this.props,\n field = _this$props2.field,\n id = _this$props2.id,\n value = _this$props2.value,\n onChange = _this$props2.onChange,\n setState = _this$props2.setState,\n selectedOptions = _this$props2.selectedOptions; // Don't do anything if the duplicates aren't allowed and\n // the item is already selected.\n\n if (!field.duplicates_allowed && option.disabled) {\n return;\n } // Don't do anything, because the maximum is reached.\n\n\n if (field.max > 0 && value.length >= field.max) {\n // eslint-disable-next-line no-alert\n alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Maximum number of items reached (%s items)', 'carbon-fields-ui'), Number(field.max)));\n return;\n }\n\n onChange(id, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(value).concat([Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"pick\"])(option, 'id', 'type', 'subtype')]));\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat([option])\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveItem\", function (option) {\n var _this$props3 = _this.props,\n value = _this$props3.value,\n id = _this$props3.id,\n onChange = _this$props3.onChange,\n setState = _this$props3.setState,\n selectedOptions = _this$props3.selectedOptions;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(value, option));\n setState({\n selectedOptions: Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(selectedOptions, option)\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSort\", function (items) {\n var _this$props4 = _this.props,\n id = _this$props4.id,\n onChange = _this$props4.onChange;\n onChange(id, items);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(AssociationField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props5 = this.props,\n fetchSelectedOptions = _this$props5.fetchSelectedOptions,\n field = _this$props5.field,\n value = _this$props5.value,\n setState = _this$props5.setState;\n setState({\n options: field.options.options,\n totalOptionsCount: field.options.total_options\n });\n\n if (value) {\n fetchSelectedOptions();\n }\n }\n /**\n * Handles the change of search.\n *\n * @param {string} queryTerm\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props6 = this.props,\n name = _this$props6.name,\n value = _this$props6.value,\n field = _this$props6.field,\n totalOptionsCount = _this$props6.totalOptionsCount,\n selectedOptions = _this$props6.selectedOptions,\n queryTerm = _this$props6.queryTerm;\n var options = this.props.options;\n\n if (!field.duplicates_allowed) {\n options = immer__WEBPACK_IMPORTED_MODULE_10___default()(options, function (draft) {\n draft.map(function (option) {\n option.disabled = !!Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"find\"])(value, function (selectedOption) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isMatch\"])(selectedOption, {\n id: option.id,\n type: option.type,\n subtype: option.subtype\n });\n });\n return option;\n });\n });\n }\n\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Fragment\"], null, wp.element.createElement(\"div\", {\n className: \"cf-association__bar\"\n }, wp.element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n value: queryTerm,\n onChange: this.handleSearchChange\n }), wp.element.createElement(\"span\", {\n className: \"cf-association__counter\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Showing %1$d of %2$d results', 'carbon-fields-ui'), Number(options.length), Number(totalOptionsCount)))), wp.element.createElement(\"div\", {\n className: \"cf-association__cols\"\n }, wp.element.createElement(\"div\", {\n className: \"cf-association__col\"\n }, options.map(function (option, index) {\n return wp.element.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_16___default()('cf-association__option', {\n 'cf-association__option--selected': option.disabled\n }),\n key: index\n }, option.thumbnail && wp.element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: option.thumbnail\n }), wp.element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, option.title), wp.element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, option.type)), wp.element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, wp.element.createElement(\"a\", {\n className: \"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit\",\n href: option.edit_link.replace('&', '&', 'g'),\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }), !option.disabled && (field.max < 0 || value.length < field.max) && wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-plus-alt\",\n onClick: function onClick() {\n return _this2.handleAddItem(option);\n }\n })));\n })), wp.element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n forwardedRef: this.selectedList,\n items: value,\n options: {\n axis: 'y',\n forceHelperSize: true,\n forcePlaceholderSize: true,\n scroll: true,\n handle: '.cf-association__option-sort'\n },\n onUpdate: this.handleSort\n }, wp.element.createElement(\"div\", {\n className: \"cf-association__col\",\n ref: this.selectedList\n }, !!selectedOptions.length && value.map(function (option, index) {\n var optionData = selectedOptions.find(function (selectedOption) {\n return selectedOption.id === option.id && selectedOption.type === option.type && selectedOption.subtype === option.subtype;\n });\n return wp.element.createElement(\"div\", {\n className: \"cf-association__option\",\n key: index\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-sort dashicons dashicons-menu\"\n }), optionData.thumbnail && wp.element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: optionData.thumbnail\n }), wp.element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, optionData.title), wp.element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, optionData.type)), wp.element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-dismiss\",\n onClick: function onClick() {\n return _this2.handleRemoveItem(option);\n }\n })), wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[\").concat(index, \"]\"),\n value: \"\".concat(optionData.type, \":\").concat(optionData.subtype, \":\").concat(optionData.id),\n readOnly: true\n }));\n })))));\n }\n }]);\n\n return AssociationField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var actions = [{\n event: 'fetchOptionsEvent',\n prop: 'fetchOptions',\n type: 'FETCH_OPTIONS'\n }, {\n event: 'fetchSelectedOptionsEvent',\n prop: 'fetchSelectedOptions',\n type: 'FETCH_SELECTED_OPTIONS'\n }].map(function (actionData) {\n var _component$useEvent = component.useEvent(actionData.event),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_component$useEvent, 2),\n actionChannel$ = _component$useEvent2[0],\n action = _component$useEvent2[1];\n\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, actionData, {\n action: action,\n channel$: actionChannel$\n });\n });\n var combined$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"combine\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref) {\n var action = _ref.action,\n prop = _ref.prop;\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_19__[\"default\"])({\n action: action,\n prop: prop\n });\n }))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (combinedActions) {\n return Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"toProps\"])(combinedActions.reduce(function (acc, curr) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, acc, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()({}, curr.prop, curr.action));\n }, {}));\n }));\n return callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"merge\"].apply(void 0, [combined$].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref2) {\n var channel$ = _ref2.channel$,\n type = _ref2.type;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(channel$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (payload) {\n return {\n type: type,\n payload: payload\n };\n }));\n }))));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var setState = props.setState,\n selectedOptions = props.selectedOptions,\n hierarchyResolver = props.hierarchyResolver;\n\n switch (type) {\n case 'FETCH_OPTIONS':\n // eslint-disable-next-line\n var request = window.jQuery.get(window.ajaxurl, {\n action: 'carbon_fields_fetch_association_options',\n term: payload.queryTerm,\n container_id: props.containerId,\n field_name: hierarchyResolver()\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('An error occurred while trying to fetch association options.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n setState({\n options: response.data.options,\n totalOptionsCount: response.data.total_options\n });\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n break;\n\n case 'FETCH_SELECTED_OPTIONS':\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/association/\"), 'get', {\n container_id: props.containerId,\n options: props.value,\n field_id: hierarchyResolver()\n }).then(function (response) {\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(response))\n });\n });\n break;\n }\n };\n}\n\nvar applyWithState = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"withState\"])({\n options: [],\n selectedOptions: [],\n totalOptionsCount: 0,\n queryTerm: ''\n});\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"withEffects\"])(aperture, {\n handler: handler\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__[\"addFilter\"])('carbon-fields.association.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('This field is required.', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Minimum number of items not reached (%s items)', 'carbon-fields-ui'), [field.min]);\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"compose\"])(applyWithState, applyWithEffects)(AssociationField));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/association/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./style.scss */ \"./packages/core/fields/association/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _components_search_input__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/search-input */ \"./packages/core/components/search-input/index.js\");\n/* harmony import */ var _components_sortable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/sortable */ \"./packages/core/components/sortable/index.js\");\n/* harmony import */ var _utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../utils/api-fetch */ \"./packages/core/utils/api-fetch.js\");\n\n\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\nvar AssociationField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_7___default()(AssociationField, _Component);\n\n function AssociationField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, AssociationField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6___default()(AssociationField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"selectedList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"sourceList\", Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"createRef\"])());\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSourceListScroll\", function () {\n var _this$props = _this.props,\n fetchOptions = _this$props.fetchOptions,\n setState = _this$props.setState,\n options = _this$props.options,\n page = _this$props.page,\n queryTerm = _this$props.queryTerm;\n var sourceList = _this.sourceList.current;\n\n if (sourceList.offsetHeight + sourceList.scrollTop === sourceList.scrollHeight) {\n setState({\n page: page + 1\n });\n fetchOptions({\n type: 'append',\n options: options,\n queryTerm: queryTerm,\n page: page + 1\n });\n }\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSearchChange\", function (queryTerm) {\n var _this$props2 = _this.props,\n fetchOptions = _this$props2.fetchOptions,\n setState = _this$props2.setState;\n setState({\n page: 1,\n queryTerm: queryTerm\n });\n fetchOptions({\n type: 'replace',\n page: 1,\n queryTerm: queryTerm\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleAddItem\", function (option) {\n var _this$props3 = _this.props,\n field = _this$props3.field,\n id = _this$props3.id,\n value = _this$props3.value,\n onChange = _this$props3.onChange,\n setState = _this$props3.setState,\n selectedOptions = _this$props3.selectedOptions; // Don't do anything if the duplicates aren't allowed and\n // the item is already selected.\n\n if (!field.duplicates_allowed && option.disabled) {\n return;\n } // Don't do anything, because the maximum is reached.\n\n\n if (field.max > 0 && value.length >= field.max) {\n // eslint-disable-next-line no-alert\n alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Maximum number of items reached (%s items)', 'carbon-fields-ui'), Number(field.max)));\n return;\n }\n\n onChange(id, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(value).concat([Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"pick\"])(option, 'id', 'type', 'subtype')]));\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat([option])\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleRemoveItem\", function (option) {\n var _this$props4 = _this.props,\n value = _this$props4.value,\n id = _this$props4.id,\n onChange = _this$props4.onChange,\n setState = _this$props4.setState,\n selectedOptions = _this$props4.selectedOptions;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(value, option));\n setState({\n selectedOptions: Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"without\"])(selectedOptions, option)\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_8___default()(_this)), \"handleSort\", function (items) {\n var _this$props5 = _this.props,\n id = _this$props5.id,\n onChange = _this$props5.onChange;\n onChange(id, items);\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(AssociationField, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var _this$props6 = this.props,\n fetchSelectedOptions = _this$props6.fetchSelectedOptions,\n field = _this$props6.field,\n value = _this$props6.value,\n setState = _this$props6.setState;\n setState({\n options: field.options.options,\n totalOptionsCount: field.options.total_options\n });\n\n if (value) {\n fetchSelectedOptions();\n }\n\n this.sourceList.current.addEventListener('scroll', this.handleSourceListScroll);\n }\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.sourceList.current.removeEventListener('scroll', this.handleSourceListScroll);\n }\n /**\n * Handles the scroll event of the source list.\n *\n * @return {void}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Render the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var _this$props7 = this.props,\n name = _this$props7.name,\n value = _this$props7.value,\n field = _this$props7.field,\n totalOptionsCount = _this$props7.totalOptionsCount,\n selectedOptions = _this$props7.selectedOptions,\n queryTerm = _this$props7.queryTerm,\n isLoading = _this$props7.isLoading;\n var options = this.props.options;\n\n if (!field.duplicates_allowed) {\n options = immer__WEBPACK_IMPORTED_MODULE_10___default()(options, function (draft) {\n draft.map(function (option) {\n option.disabled = !!Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"find\"])(value, function (selectedOption) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isMatch\"])(selectedOption, {\n id: option.id,\n type: option.type,\n subtype: option.subtype\n });\n });\n return option;\n });\n });\n }\n\n return wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Fragment\"], null, wp.element.createElement(\"div\", {\n className: \"cf-association__bar\"\n }, wp.element.createElement(_components_search_input__WEBPACK_IMPORTED_MODULE_21__[\"default\"], {\n value: queryTerm,\n onChange: this.handleSearchChange\n }), isLoading ? wp.element.createElement(\"span\", {\n className: \"cf-association__spinner spinner is-active\"\n }) : '', wp.element.createElement(\"span\", {\n className: \"cf-association__counter\"\n }, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Showing %1$d of %2$d results', 'carbon-fields-ui'), Number(options.length), Number(totalOptionsCount)))), wp.element.createElement(\"div\", {\n className: \"cf-association__cols\"\n }, wp.element.createElement(\"div\", {\n className: \"cf-association__col\",\n ref: this.sourceList\n }, options.map(function (option, index) {\n return wp.element.createElement(\"div\", {\n className: classnames__WEBPACK_IMPORTED_MODULE_16___default()('cf-association__option', {\n 'cf-association__option--selected': option.disabled\n }),\n key: index\n }, option.thumbnail && wp.element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: option.thumbnail\n }), wp.element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-title-inner\"\n }, option.title)), wp.element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, option.type)), wp.element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, wp.element.createElement(\"a\", {\n className: \"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit\",\n href: option.edit_link.replace('&', '&', 'g'),\n target: \"_blank\",\n rel: \"noopener noreferrer\"\n }), !option.disabled && (field.max < 0 || value.length < field.max) && wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-plus-alt\",\n onClick: function onClick() {\n return _this2.handleAddItem(option);\n }\n })));\n })), wp.element.createElement(_components_sortable__WEBPACK_IMPORTED_MODULE_22__[\"default\"], {\n forwardedRef: this.selectedList,\n items: value,\n options: {\n axis: 'y',\n forceHelperSize: true,\n forcePlaceholderSize: true,\n scroll: true,\n handle: '.cf-association__option-sort'\n },\n onUpdate: this.handleSort\n }, wp.element.createElement(\"div\", {\n className: \"cf-association__col\",\n ref: this.selectedList\n }, !!selectedOptions.length && value.map(function (option, index) {\n var optionData = selectedOptions.find(function (selectedOption) {\n return selectedOption.id === option.id && selectedOption.type === option.type && selectedOption.subtype === option.subtype;\n });\n return wp.element.createElement(\"div\", {\n className: \"cf-association__option\",\n key: index\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-sort dashicons dashicons-menu\"\n }), optionData.thumbnail && wp.element.createElement(\"img\", {\n className: \"cf-association__option-thumb\",\n src: optionData.thumbnail\n }), wp.element.createElement(\"div\", {\n className: \"cf-association__option-content\"\n }, wp.element.createElement(\"span\", {\n className: \"cf-association__option-title\"\n }, optionData.title), wp.element.createElement(\"span\", {\n className: \"cf-association__option-type\"\n }, optionData.type)), wp.element.createElement(\"div\", {\n className: \"cf-association__option-actions\"\n }, wp.element.createElement(\"button\", {\n type: \"button\",\n className: \"cf-association__option-action dashicons dashicons-dismiss\",\n onClick: function onClick() {\n return _this2.handleRemoveItem(option);\n }\n })), wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: \"\".concat(name, \"[\").concat(index, \"]\"),\n value: \"\".concat(optionData.type, \":\").concat(optionData.subtype, \":\").concat(optionData.id),\n readOnly: true\n }));\n })))));\n }\n }]);\n\n return AssociationField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_12__[\"Component\"]);\n/**\n * The function that controls the stream of side-effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\n\nfunction aperture(component) {\n var actions = [{\n event: 'fetchOptionsEvent',\n prop: 'fetchOptions',\n type: 'FETCH_OPTIONS'\n }, {\n event: 'fetchSelectedOptionsEvent',\n prop: 'fetchSelectedOptions',\n type: 'FETCH_SELECTED_OPTIONS'\n }].map(function (actionData) {\n var _component$useEvent = component.useEvent(actionData.event),\n _component$useEvent2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_component$useEvent, 2),\n actionChannel$ = _component$useEvent2[0],\n action = _component$useEvent2[1];\n\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, actionData, {\n action: action,\n channel$: actionChannel$\n });\n });\n var combined$ = Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"combine\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref) {\n var action = _ref.action,\n prop = _ref.prop;\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_19__[\"default\"])({\n action: action,\n prop: prop\n });\n }))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (combinedActions) {\n return Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"toProps\"])(combinedActions.reduce(function (acc, curr) {\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, acc, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_9___default()({}, curr.prop, curr.action));\n }, {}));\n }));\n return callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"merge\"].apply(void 0, [combined$].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(actions.map(function (_ref2) {\n var channel$ = _ref2.channel$,\n type = _ref2.type;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"pipe\"])(channel$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_18__[\"map\"])(function (payload) {\n return {\n type: type,\n payload: payload\n };\n }));\n }))));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n var payload = effect.payload,\n type = effect.type;\n var setState = props.setState,\n selectedOptions = props.selectedOptions,\n hierarchyResolver = props.hierarchyResolver;\n\n switch (type) {\n case 'FETCH_OPTIONS':\n setState({\n isLoading: true\n }); // eslint-disable-next-line\n\n var request = window.jQuery.get(window.ajaxurl, {\n action: 'carbon_fields_fetch_association_options',\n term: payload.queryTerm,\n page: payload.page || 1,\n container_id: props.containerId,\n field_name: hierarchyResolver()\n }, null, 'json');\n /* eslint-disable-next-line no-alert */\n\n var errorHandler = function errorHandler() {\n return alert(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('An error occurred while trying to fetch association options.', 'carbon-fields-ui'));\n };\n\n request.done(function (response) {\n if (response && response.success) {\n setState({\n options: payload.type === 'replace' ? response.data.options : _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(payload.options).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(response.data.options)),\n totalOptionsCount: response.data.total_options\n });\n } else {\n errorHandler();\n }\n });\n request.fail(errorHandler);\n request.always(function () {\n setState({\n isLoading: false\n });\n });\n break;\n\n case 'FETCH_SELECTED_OPTIONS':\n Object(_utils_api_fetch__WEBPACK_IMPORTED_MODULE_23__[\"default\"])(\"\".concat(window.wpApiSettings.root, \"carbon-fields/v1/association/\"), 'get', {\n container_id: props.containerId,\n options: props.value.map(function (option) {\n return \"\".concat(option.id, \":\").concat(option.type, \":\").concat(option.subtype);\n }).join(';'),\n field_id: hierarchyResolver()\n }).then(function (response) {\n setState({\n selectedOptions: _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(selectedOptions).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(response))\n });\n });\n break;\n }\n };\n}\n\nvar applyWithState = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"withState\"])({\n options: [],\n selectedOptions: [],\n totalOptionsCount: 0,\n queryTerm: '',\n page: 1,\n isLoading: false\n});\nvar applyWithEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_15__[\"withEffects\"])(aperture, {\n handler: handler\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_14__[\"addFilter\"])('carbon-fields.association.validate', 'carbon-fields/core', function (field, value) {\n var min = field.min,\n required = field.required;\n\n if (required && Object(lodash__WEBPACK_IMPORTED_MODULE_17__[\"isEmpty\"])(value)) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('This field is required.', 'carbon-fields-ui');\n }\n\n if (min > 0 && value.length < min) {\n return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_11__[\"__\"])('Minimum number of items not reached (%s items)', 'carbon-fields-ui'), [field.min]);\n }\n\n return null;\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_13__[\"compose\"])(applyWithState, applyWithEffects)(AssociationField));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/core/fields/association/index.js?"); /***/ }), diff --git a/build/gutenberg/core.min.css b/build/gutenberg/core.min.css index 531aca832..daf0e4355 100644 --- a/build/gutenberg/core.min.css +++ b/build/gutenberg/core.min.css @@ -1 +1 @@ -.cf-association__bar{position:relative;z-index:1}.cf-association__counter{position:absolute;top:50%;right:8px;font-size:12px;line-height:1;color:#23282d;-webkit-transform:translateY(-50%);transform:translateY(-50%);pointer-events:none}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{overflow:hidden;font-size:13px;line-height:1.4;color:#32373c;white-space:nowrap;text-overflow:ellipsis;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{flex:1;position:relative;z-index:0}.cf-complex--tabbed-vertical>.cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex__group--grid>.cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex__tabs--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex__tabs--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%);z-index:1}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--grid{position:absolute;top:12px;right:12px}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex__tabs--tabbed-horizontal{display:inline-flex;margin-bottom:-5px}.cf-complex__tabs--tabbed-vertical{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex__tabs--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex__tabs--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal{margin:0 4px 4px 0}.cf-complex__tabs-item--tabbed-vertical~.cf-complex__tabs-item--tabbed-vertical{border-top-width:0}.cf-complex__tabs-item--current{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal.cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex__tabs-item--tabbed-vertical.cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label.cf-complex__placeholder-label{margin:8px 0 12px}.cf-container-term-meta .cf-complex__placeholder-label{font-style:normal;color:inherit}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%!important;margin:0}.cf-textarea__input{display:block;width:100%!important;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file +.cf-association__bar{position:relative;z-index:1;display:flex;justify-content:space-between;align-items:center;flex-direction:row;border:solid #e2e4e7;border-width:1px 1px 0;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.cf-association__bar .cf-search-input{flex:1 1 auto}.cf-association__bar .cf-search-input__inner{border:0;box-shadow:none}.cf-association__bar .cf-search-input__inner:focus{border-color:none;box-shadow:none;outline:none}.cf-association__bar[focus-within]{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8);outline:2px solid transparent}.cf-association__bar:focus-within{border-color:#5b9dd9;box-shadow:0 0 2px rgba(30,140,190,.8);outline:2px solid transparent}.cf-association__counter{font-size:12px;color:#23282d;pointer-events:none;margin-right:5px;margin-left:5px}.cf-association__spinner{float:none;margin:0 0 0 5px}.cf-association__cols{background:#fff;position:relative;z-index:0;display:flex;border:1px solid #e2e4e7}.cf-association__cols:before{position:absolute;top:0;left:50%;width:1px;height:100%;background-color:#e2e4e7;content:""}.cf-association__col{width:50%;max-height:160px;overflow-y:auto}.cf-association__option{display:flex;align-items:center;padding:4px 8px;height:32px;box-sizing:border-box}.cf-association__option--selected{background-color:#fbfbfc}.cf-association__option+.cf-association__option{border-top:1px solid #e2e4e7}.cf-association__option.ui-sortable-helper{border-top:0;background-color:#fbfbfc}.cf-association__option-thumb{flex:none;display:block;width:24px;height:24px;margin-right:8px}.cf-association__option-content{display:flex;align-items:center;justify-content:space-between;flex:1;min-width:0;margin-right:8px}.cf-association__option-title{flex:1;position:relative;margin-right:4px}.cf-association__option--selected .cf-association__option-title{color:#82878c}.cf-association__option-title-inner{position:absolute;top:0;left:0;width:100%;font-size:13px;line-height:1.4;color:#32373c;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cf-association__option-type{font-size:9px;line-height:1;text-transform:uppercase;color:#82878c}.cf-association__option-actions{display:flex;align-items:center;justify-content:space-between}.cf-association__col:first-child .cf-association__option-actions{min-width:48px}.cf-association__option-sort{margin-right:4px;color:#82878c;cursor:move}.cf-association__option-action{padding:0;border:0;outline:none;color:#82878c;transition:color .1s linear;cursor:pointer}.cf-association__option-action:focus{color:#82878c;box-shadow:none}.cf-association__option-action:hover{color:#23282d}.cf-search-input{position:relative}.cf-search-input:before{position:absolute;top:50%;left:9px;margin-top:-10px}.postbox .cf-search-input:before{color:#32373c}.wp-block .cf-search-input:before{color:#555d66}.cf-search-input__inner{display:block;width:100%;margin:0}.block-editor .cf-field .cf-search-input__inner,.cf-container .cf-search-input__inner{padding-left:35px}.cf-container .cf-search-input__inner{padding-top:8px;padding-bottom:8px;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner{border-radius:0;border-color:#e2e4e7}.wp-block .cf-field .cf-search-input__inner:focus{box-shadow:none}.cf-field .cf-checkbox__input{margin-top:0}.cf-color__inner{display:flex;align-items:center}.cf-color__toggle{position:relative;overflow:hidden}.cf-color__toggle-text{margin-left:27px}.cf-color__preview{position:absolute;top:0;left:0;width:26px;height:100%;border-right:1px solid #ccc}.cf-color__toggle:active .cf-color__preview,.cf-color__toggle:hover .cf-color__preview{border-color:#999}.cf-color .cf-color__reset{margin-left:5px;text-decoration:none}.cf-color .cf-color__reset:focus{box-shadow:none}.cf-color__picker{position:absolute;z-index:9999}.cf-complex__groups{flex:1;position:relative;z-index:0}.cf-complex--tabbed-vertical>.cf-complex__groups{flex:0 0 80%}.cf-complex__group{box-sizing:border-box}.cf-complex--grid .cf-complex__group{position:relative;margin-bottom:12px}.cf-complex--grid .cf-complex__group:last-child{margin-bottom:0}.cf-complex__group-placeholder{position:relative}.cf-complex__group-placeholder:not(:last-child){margin-bottom:12px}.cf-complex__group-placeholder:before{position:absolute;top:0;left:0;width:100%;height:100%;border:1px dashed #e2e4e7;box-sizing:border-box;content:""}.cf-complex__group-head{position:relative;display:flex;border:1px solid #e2e4e7;background-color:#fbfbfc;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;line-height:1.4;color:#23282d;cursor:move;transition:border-color .1s linear}.cf-complex__group-head:hover{border-color:#82878c}.cf-complex__group-index{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-right:1px solid #e2e4e7}.cf-complex__group-title{display:flex;align-items:center;padding:0 12px}.cf-complex__group-body{display:flex;flex-wrap:wrap;border-color:#e2e4e7;border-style:solid;border-width:0 0 1px 1px;background-color:#fff}.cf-complex__group-body[hidden]{display:none}.cf-complex__group--grid>.cf-complex__group-body{margin-top:-1px}.cf-complex__actions{display:flex;align-items:center;margin-top:12px}.cf-complex__actions .cf-complex__toggler{margin-left:auto}.cf-complex__inserter{position:relative;display:inline-block}.cf-complex__tabs .cf-complex__inserter{height:36px}.cf-complex__tabs--tabbed-horizontal .cf-complex__inserter{width:36px;align-self:flex-end;margin-bottom:4px}.cf-complex__tabs--tabbed-vertical .cf-complex__inserter{display:block}.cf-complex__tabs .cf-complex__inserter-button{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px solid #e2e4e7;border-radius:0;margin:0;background-color:#fbfbfc;box-shadow:none;font-size:18px;line-height:1;transition:background-color .1s linear}.cf-complex__tabs .cf-complex__inserter-button:active,.cf-complex__tabs .cf-complex__inserter-button:focus,.cf-complex__tabs .cf-complex__inserter-button:hover{border-color:#e2e4e7;background-color:#fff}.cf-complex__tabs .cf-complex__inserter-button:focus{box-shadow:none}.cf-complex__tabs .cf-complex__inserter-button:active{box-shadow:none;-webkit-transform:none;transform:none}.cf-complex__inserter-menu{position:absolute;top:50%;left:100%;min-width:180px;margin:0;-webkit-transform:translate(10px,-50%);transform:translate(10px,-50%);z-index:1}.cf-complex__inserter-item{padding:8px 12px;margin:0;cursor:pointer;transition:color .1s linear}.cf-complex__group-actions{display:flex;align-items:center}.cf-complex__group-actions--grid{position:absolute;top:12px;right:12px}.cf-complex__group-actions--tabbed{justify-content:flex-end;padding:8px 12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#fbfbfc}.cf-complex__group-action{display:inline-flex;padding:0;border:0;margin-left:12px;outline:none;background-color:transparent;color:#82878c;cursor:pointer;transition:color .1s linear}.cf-complex__group-action:first-child{margin-left:0}.cf-complex__group-action:hover{color:#23282d}.cf-complex__group-action-text{display:none}.cf-complex__tabs{position:relative;z-index:1}.cf-complex__tabs--tabbed-horizontal{display:inline-flex;margin-bottom:-5px}.cf-complex__tabs--tabbed-vertical{flex:0 0 20%;margin-right:-1px}.cf-complex__tabs-list{margin:0}.cf-complex__tabs--tabbed-horizontal .cf-complex__tabs-list{display:flex;flex-wrap:wrap}.cf-complex__tabs--tabbed-vertical .cf-complex__tabs-list{margin-bottom:-1px}.cf-complex__tabs-item{display:flex;align-items:center;padding:8px 12px;border:1px solid #e2e4e7;margin:0;background-color:#fbfbfc;font-size:12px;cursor:pointer;transition:background-color .1s linear,border-color .1s linear}.cf-complex__tabs-item:hover{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal{margin:0 4px 4px 0}.cf-complex__tabs-item--tabbed-vertical~.cf-complex__tabs-item--tabbed-vertical{border-top-width:0}.cf-complex__tabs-item--current{background-color:#fff}.cf-complex__tabs-item--tabbed-horizontal.cf-complex__tabs-item--current{border-bottom-color:#fff!important}.cf-complex__tabs-item--tabbed-vertical.cf-complex__tabs-item--current{border-right-color:#fff!important}.cf-complex__placeholder-label.cf-complex__placeholder-label{margin:8px 0 12px}.cf-container-term-meta .cf-complex__placeholder-label{font-style:normal;color:inherit}.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,.08)}.flatpickr-calendar.inline,.flatpickr-calendar.open{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasTime .dayContainer,.flatpickr-calendar .hasWeeks .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:after,.flatpickr-calendar:before{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:after,.flatpickr-calendar.rightMost:before{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowTop:before{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:after,.flatpickr-calendar.arrowBottom:before{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9);height:28px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-next-month,.flatpickr-months .flatpickr-prev-month{text-decoration:none;cursor:pointer;position:absolute;top:0;line-height:16px;height:28px;padding:10px;z-index:3;color:rgba(0,0,0,.9);fill:rgba(0,0,0,.9)}.flatpickr-months .flatpickr-next-month.disabled,.flatpickr-months .flatpickr-prev-month.disabled{display:none}.flatpickr-months .flatpickr-next-month i,.flatpickr-months .flatpickr-prev-month i{position:relative}.flatpickr-months .flatpickr-next-month.flatpickr-prev-month,.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-next-month.flatpickr-next-month,.flatpickr-months .flatpickr-prev-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover{color:#959ea9}.flatpickr-months .flatpickr-next-month:hover svg,.flatpickr-months .flatpickr-prev-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-next-month svg,.flatpickr-months .flatpickr-prev-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-next-month svg path,.flatpickr-months .flatpickr-prev-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,.5)}.numInputWrapper:hover{background:rgba(0,0,0,.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:6.16px 0 0;line-height:1;height:28px;display:inline-block;text-align:center;-webkit-transform:translateZ(0);transform:translateZ(0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:baseline;vertical-align:initial}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,.5);background:transparent;pointer-events:none}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays,.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-weekdays .flatpickr-weekdaycontainer,span.flatpickr-weekday{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,.54);line-height:1;margin:0;text-align:center;display:block;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translateZ(0);transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day.nextMonthDay:focus,.flatpickr-day.nextMonthDay:hover,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.today.inRange,.flatpickr-day:focus,.flatpickr-day:hover{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:focus,.flatpickr-day.today:hover{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.endRange,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.endRange:focus,.flatpickr-day.endRange:hover,.flatpickr-day.selected,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.selected:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.startRange:focus,.flatpickr-day.startRange:hover{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.endRange.startRange,.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.endRange.endRange,.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.endRange.startRange.endRange,.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.disabled,.flatpickr-day.disabled:hover,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.nextMonthDay,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.prevMonthDay{color:rgba(57,57,57,.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.disabled,.flatpickr-day.disabled:hover{cursor:not-allowed;color:rgba(57,57,57,.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{display:inline-block;float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden}.flatpickr-innerContainer,.flatpickr-rContainer{-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-rContainer{display:inline-block;padding:0}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-am-pm,.flatpickr-time .flatpickr-time-separator{height:inherit;display:inline-block;float:left;line-height:inherit;color:#393939;font-weight:700;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time .flatpickr-am-pm:focus,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time input:hover{background:#f3f3f3}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes fpFadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.cf-datetime__inner{display:flex;align-items:stretch}.cf-datetime__inner:before{display:none}.cf-datetime__input{flex:1;margin:0}.cf-datetime__button{flex:0 0 auto}.cf-field .cf-datetime__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-bottom:0;box-shadow:none}.cf-file__inner{position:relative;display:flex;align-items:center;justify-content:center;width:130px;height:130px;border:1px dashed #b5bcc2;box-sizing:border-box}.cf-file__content{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border:1px solid #b5bcc2}.cf-file__preview{position:absolute;top:0;left:0;bottom:28px;width:100%;overflow:hidden;background-color:#e2e4e7;box-shadow:inset 0 0 15px rgba(0,0,0,.1)}.cf-file__image{position:absolute;top:50%;left:50%;height:auto;max-width:100%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-file__name{position:absolute;bottom:0;left:0;right:0;padding:5px;border-top:1px solid #b5bcc2;overflow:hidden;background-color:#f3f4f5;white-space:nowrap;text-overflow:ellipsis}.cf-file__browse{position:relative}.cf-file__content~.cf-file__browse{margin-bottom:29px;visibility:hidden;opacity:0;transition:visibility .1s linear,opacity .1s linear}.cf-file__inner:hover .cf-file__content~.cf-file__browse{visibility:visible;opacity:1}.cf-file__remove{position:absolute;top:5px;right:5px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer;transition:opacity .1s linear}.cf-file__remove:hover{opacity:.8}.cf-file__remove:before{border-radius:50%;background-color:#191e23;color:#fff}.cf-map__search{position:relative;z-index:1}.cf-map__canvas{position:relative;z-index:0;height:300px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7;background-color:#f3f4f5}.cf-media-gallery__list{display:flex;flex-wrap:wrap;max-height:400px;padding:4px;margin:0;overflow-y:auto;list-style:none outside none}.cf-media-gallery__list:empty{display:none}.cf-media-gallery__actions{padding:8px}.cf-media-gallery__list:empty~.cf-media-gallery__actions{border-top-width:0}.cf-media-gallery__item{flex:0 0 100%;min-width:0;padding:4px;margin:0;box-sizing:border-box}@media (min-width:320px){.cf-media-gallery__item{flex-basis:50%}}@media (min-width:480px){.cf-media-gallery__item{flex-basis:33.3333%}}@media (min-width:640px){.cf-media-gallery__item{flex-basis:25%}}@media (min-width:768px){.cf-media-gallery__item{flex-basis:20%}}@media (min-width:1280px){.cf-media-gallery__item{flex-basis:16.66667%}}@media (min-width:1440px){.cf-media-gallery__item{flex-basis:12.5%}}@media (min-width:1680px){.cf-media-gallery__item{flex-basis:10%}}.cf-media-gallery__item-inner{position:relative;display:flex;flex-direction:column;height:100%}.cf-media-gallery__item-preview{position:relative;overflow:hidden;padding-top:100%;flex:1}.cf-media-gallery__item-thumb{min-width:100%;min-height:100%;max-width:150%;pointer-events:none}.cf-media-gallery__item-icon,.cf-media-gallery__item-thumb{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.cf-media-gallery__item-icon{max-width:100%;max-height:50%}.cf-media-gallery__item-name{display:block;padding:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:move}.cf-media-gallery__item-remove{position:absolute;top:4px;right:4px;padding:0;border:0;outline:none;background-color:transparent;cursor:pointer}.cf-media-gallery__item-remove:before{border-radius:50%;background-color:#191e23;color:#fff;transition:color .1s linear}.cf-media-gallery__item-remove:hover:before{color:#b5bcc2}.cf-multiselect__control{height:30px;min-height:0;border-color:#e2e4e7}.cf-multiselect__control:hover{border-color:#e2e4e7}.cf-multiselect__control--is-focused,.cf-multiselect__control--is-focused:hover{border-color:#00a0d2!important;box-shadow:none}.cf-multiselect__placeholder{color:#b5bcc2}.cf-multiselect__value-container{padding-left:4px;padding-right:4px}.cf-multiselect__multi-value{align-items:center;margin:0;background-color:transparent}.cf-multiselect__multi-value__label{padding-left:3px;font-size:12px;line-height:1}.cf-multiselect__multi-value__remove{padding:0}.cf-multiselect__multi-value__remove:hover{background-color:transparent}.cf-multiselect__input input[id],.cf-multiselect__input input[id]:focus{box-shadow:none}.cf-multiselect__menu{z-index:9999}.cf-multiselect__option{padding:4px}.cf-multiselect__option--is-focused{background-color:#00a0d2;color:#fff}.cf-oembed__preview{padding:12px;border:1px solid #e2e4e7;border-top:0 solid #e2e4e7}.cf-oembed__frame{display:block;width:100%;max-width:600px;margin:0 auto}.cf-radio__list{margin:0}.cf-radio-image .cf-radio__list{display:flex;flex-wrap:wrap}.cf-radio__list-item:last-child{margin-bottom:0}.cf-radio-image .cf-radio__list-item{flex:0 0 20%;position:relative;padding:4px}.cf-container-term-meta .cf-radio__label{display:inline}.cf-radio-image .cf-radio__label{display:inline-block}.cf-field .cf-radio__input{margin-top:0}.cf-radio-image .cf-radio__input{position:absolute;z-index:-1;top:50%;left:50%;width:0;height:0;margin:0;outline:0;opacity:0}.cf-radio-image__image{display:block;max-width:100%;padding:5px;box-sizing:border-box}.wp-block .cf-radio__list{list-style:none outside none}.cf-radio__list-item{box-sizing:border-box}.cf-container-term-meta .cf-radio__list-item{flex:0 0 20%}.cf-container-theme-options .cf-radio__list-item{flex:0 0 10%}.cf-radio-image__image{border:1px solid #e2e4e7}.cf-radio__input:checked~.cf-radio__label .cf-radio-image__image,.cf-radio__input:focus~.cf-radio__label .cf-radio-image__image{outline:4px solid #00a0d2}.cf-select__input{display:block;width:100%;margin:0}.cf-container-term-meta .cf-separator .cf-field__head{display:none}.cf-container-term-meta .cf-separator .cf-field__body{position:absolute;left:0}.cf-set__list{margin:0}.cf-set__list-item:last-child{margin-bottom:0}.cf-field .cf-set__input{margin-top:0}.cf-container-term-meta .cf-set__label{display:inline}.cf-text__input{display:block;width:100%!important;margin:0}.cf-textarea__input{display:block;width:100%!important;resize:vertical}.cf-field,.cf-field__body,.cf-field__head{box-sizing:border-box;flex:1 1 100%}@media (max-width:1024px){.cf-field{flex-basis:100%!important}}.cf-rich-text .cf-field__body{box-sizing:content-box}.cf-complex--tabbed-vertical>.cf-field__body{display:flex;align-items:flex-start}.cf-field__label{display:block}.cf-html .cf-field__label,.cf-separator .cf-field__label{display:none}.cf-field__asterisk{color:#dc3232}.cf-field__error{display:block;margin-top:4px;color:#dc3232} \ No newline at end of file diff --git a/build/gutenberg/core.min.js b/build/gutenberg/core.min.js index b493775ff..74eff5565 100644 --- a/build/gutenberg/core.min.js +++ b/build/gutenberg/core.min.js @@ -1,10 +1,10 @@ -this.cf=this.cf||{},this.cf.core=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=278)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.cf.vendor.react}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n1?t-1:0),i=1;i-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(61),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(48)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(67)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(36),o=n(145),a=n(146),i=n(147),u=n(148),s=n(149);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(30)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(154),o=n(161),a=n(163),i=n(164),u=n(165);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&ec))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=c}function w(){var e=o();if(y(e))return E(e);f=setTimeout(w,function(e){var n=t-(e-d);return g?u(n,c-(e-h)):n}(e))}function E(e){return f=void 0,v&&s?b(e):(s=l=void 0,p)}function x(){var e=o(),n=y(e);if(s=arguments,l=this,d=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,t),m?b(e):p}(d);if(g)return f=setTimeout(w,t),b(d)}return void 0===f&&(f=setTimeout(w,t)),p}return t=a(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?i(a(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=d=l=f=void 0},x.flush=function(){return void 0===f?p:E(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(239)),o=a(n(241));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],c=!1,p=-1;function f(){c&&s&&(c=!1,s.length?l=s.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=u(f);c=!0;for(var t=l.length;t;){for(s=l,l=[];++p1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,i.polyfill)(f);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(95),i=n(266);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,a.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){var r=n(116);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(120))&&r.__esModule?r:{default:r};t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===c.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);c.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return c.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();p.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},p.defaultProps={options:{}},t.default=p},function(e,t,n){var r=n(251),o=n(252),a=n(256);r(".__observe-resize__ { position: absolute; left: 0; top: -100%; width: 100%; height: 100%; margin: 1px 0 0; border: none; opacity: 0; visibility: hidden; pointer-events: none; }"),e.exports=function(e,t){if(o.ok(a(e),"observe-resize: el should be a valid DOM element"),o.equal(typeof t,"function","observe-resize: cb should be type function"),"object"==typeof window){var n=!1,r=document.createElement("iframe");return r.setAttribute("class","__observe-resize__"),e.appendChild(r),o.ok(r.contentWindow,"observe-resize: no contentWindow detected - cannot start observing"),r.contentWindow.onresize=function(){n||(n=!0,window.requestAnimationFrame(function(){n=!1,t(e)}))},function(){r.parentNode&&r.parentNode.removeChild(r)}}}},function(e,t,n){(function(t){for(var r=n(259),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],l=0;!u&&l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){var r=n(276),o=n(277);e.exports=function(e,t){return o(r,e,t)}},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var u=0;for(e=0===i?"":e[0]+" ";ur&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===p.inserted[v]&&(n="",h(e,t),p.inserted[v]=n)}var O=function(){var e=E.apply(this,arguments),t=a+"-"+v;return void 0===p.registered[t]&&(p.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){p.inserted[e]=!0}if(c){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){c&&(d.flush(),d.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=l(n(1)),o=l(n(21)),a=l(n(25)),i=n(44),u=l(n(244)),s=l(n(245));function l(e){return e&&e.__esModule?e:{default:e}}var c=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,l=e.hsv,c=e.hsl,p=e.onChange,f=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:c,hsv:l,onChange:p})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:c,onChange:p})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:c,renderers:m,onChange:p}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:c,hex:o,onChange:p,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:p,onSwatchHover:f}))};c.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},c.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(c)},function(e,t,n){"use strict";var r=n(122);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(124)),o=u(n(46)),a=u(n(135)),i=u(n(136));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(29),o=n(23),a=n(26);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(33),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(128)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(37);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(36);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(36),o=n(56),a=n(57);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(68),o=n(151),a=n(27),i=n(72),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,p=l.hasOwnProperty,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:u).test(i(e))}},function(e,t,n){var r,o=n(152),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(155),o=n(36),a=n(56);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(156),o=n(157),a=n(158),i=n(159),u=n(160);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(199);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(54),o=n(85),a=n(86),i=n(201),u=n(202),s=n(205),l=n(206),c=n(207),p=n(208),f=n(76),d=n(209),h=n(40),m=n(210),g=n(211),v=n(216),b=n(23),y=n(47),w=n(218),E=n(27),x=n(220),O=n(34),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var F,T=1&n,P=2&n,N=4&n;if(j&&(F=A?j(t,D,A,M):j(t)),void 0!==F)return F;if(!E(t))return t;var I=b(t);if(I){if(F=m(t),!T)return l(t,F)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,T);if(L==k||L==_||R&&!A){if(F=P||R?{}:v(t),!T)return P?p(t,u(F,t)):c(t,i(F,t))}else{if(!S[L])return A?t:{};F=g(t,L,T)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,F),x(t))return t.forEach(function(r){F.add(e(r,n,j,r,t,M))}),F;if(w(t))return t.forEach(function(r,o){F.set(o,e(r,n,j,o,t,M))}),F;var V=N?P?d:f:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(F,o,e(r,n,j,o,t,M))}),F}},function(e,t,n){var r=n(30),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(43),o=n(34);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(43),o=n(88);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(27),o=n(52),a=n(204),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(48)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*l/a)/100,n.hsl.a!==c)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:c,source:"rgb"}}else{var p;if(p=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==p)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:p,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*l/a+100)/100,n.hsl.h!==c)return{h:c,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var p=void 0;if(p=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==p)return{h:p,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?l=a:c<0?c=0:c>i&&(c=i);var p=100*l/a,f=-100*c/i+100;return{h:n.hsl.h,s:p,v:f,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=T(e,360),t=T(t,100),n=T(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,p,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=F(s),{ok:h,format:e.format||m,r:l(255,c(u.r,0)),g:l(255,c(u.g,0)),b:l(255,c(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r,o,a=c(e,t,n),i=l(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(f(r));return a}function D(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(f({h:r,s:o,v:a})),a=(a+u)%1;return i}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*T(this._r,255))+"%",g:s(100*T(this._g,255))+"%",b:s(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%)":"rgba("+s(100*T(this._r,255))+"%, "+s(100*T(this._g,255))+"%, "+s(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:p(),g:p(),b:p()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),a=n/100;return f({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,a=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},f.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var l=0;ls&&(s=r,u=f(t[l]));return f.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var A=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function F(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return l(1,c(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:c.fields,className:"flexbox-fix"},r.default.createElement("div",{style:c.double},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:s.replace("#",""),onChange:p})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.alpha},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:p,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t1?t-1:0),i=1;i-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(61),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(48)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(67)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(36),o=n(145),a=n(146),i=n(147),u=n(148),s=n(149);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=o,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=u,l.prototype.set=s,e.exports=l},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(30)(n(24),"Map");e.exports=r},function(e,t,n){var r=n(154),o=n(161),a=n(163),i=n(164),u=n(165);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&ec))return!1;var f=s.get(e);if(f&&s.get(t))return f==t;var d=-1,h=!0,m=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d=t||n<0||g&&e-h>=c}function w(){var e=o();if(y(e))return E(e);f=setTimeout(w,function(e){var n=t-(e-d);return g?u(n,c-(e-h)):n}(e))}function E(e){return f=void 0,v&&s?b(e):(s=l=void 0,p)}function x(){var e=o(),n=y(e);if(s=arguments,l=this,d=e,n){if(void 0===f)return function(e){return h=e,f=setTimeout(w,t),m?b(e):p}(d);if(g)return f=setTimeout(w,t),b(d)}return void 0===f&&(f=setTimeout(w,t)),p}return t=a(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?i(a(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==f&&clearTimeout(f),h=0,s=d=l=f=void 0},x.flush=function(){return void 0===f?p:E(o())},x}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=void 0;var r=a(n(239)),o=a(n(241));function a(e){return e&&e.__esModule?e:{default:e}}t.default={simpleCheckForValidColor:function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],function(r){e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)&&/^\d+%$/.test(e[r])&&(n+=1)}),t===n&&e},toState:function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),a=n.toHsv(),i=n.toRgb(),u=n.toHex();return 0===r.s&&(r.h=t||0,a.h=t||0),{hsl:r,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||r.h,source:e.source}},isValidHex:function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},getContrastingColor:function(e){if(!e)return"#fff";var t=this.toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"}},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,l=[],c=!1,p=-1;function f(){c&&s&&(c=!1,s.length?l=s.concat(l):p=-1,l.length&&d())}function d(){if(!c){var e=u(f);c=!0;for(var t=l.length;t;){for(s=l,l=[];++p1)for(var n=1;n=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var a=o.default.Children.only(n);return o.default.cloneElement(a,r)},r}(o.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,i.polyfill)(f);t.default=h},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==u){var s=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return i}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r,o=(r=n(21))&&r.__esModule?r:{default:r},a=o.default.oneOfType([o.default.number,o.default.shape({enter:o.default.number,exit:o.default.number}).isRequired]);t.timeoutsShape=a;var i=o.default.oneOfType([o.default.string,o.default.shape({enter:o.default.string,exit:o.default.string,active:o.default.string}),o.default.shape({enter:o.default.string,enterDone:o.default.string,enterActive:o.default.string,exit:o.default.string,exitDone:o.default.string,exitActive:o.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=u(n(21)),o=u(n(1)),a=n(95),i=n(266);function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),a=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?a:o.default.createElement(t,r,a)},r}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,a.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){var r=n(116);e.exports=function(e,t){if(null==e)return{};var n,o,a=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(120))&&r.__esModule?r:{default:r};t.default=o.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0;a--){var i=o[a],u=n[i];u!==r[i]&&(-1===c.indexOf(i)||Array.isArray(u)||(u=[u]),this.flatpickr.set(i,u))}e.hasOwnProperty("value")&&e.value!==this.props.value&&this.flatpickr.setDate(e.value,!1)}},{key:"componentDidMount",value:function(){var e=this,t=r({onClose:function(){e.node.blur&&e.node.blur()}},this.props.options);c.forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.flatpickr=new s.default(this.node,t),this.props.hasOwnProperty("value")&&this.flatpickr.setDate(this.props.value,!1)}},{key:"componentWillUnmount",value:function(){this.flatpickr.destroy()}},{key:"render",value:function(){var e=this,t=this.props,n=t.options,o=t.defaultValue,a=(t.value,t.children),u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["options","defaultValue","value","children"]);return c.forEach(function(e){delete u[e]}),n.wrap?i.default.createElement("div",r({},u,{ref:function(t){e.node=t}}),a):i.default.createElement("input",r({},u,{defaultValue:o,ref:function(t){e.node=t}}))}}]),t}();p.propTypes={defaultValue:u.default.string,options:u.default.object,onChange:u.default.func,onOpen:u.default.func,onClose:u.default.func,onMonthChange:u.default.func,onYearChange:u.default.func,onReady:u.default.func,onValueUpdate:u.default.func,onDayCreate:u.default.func,value:u.default.oneOfType([u.default.string,u.default.array,u.default.object,u.default.number]),children:u.default.node},p.defaultProps={options:{}},t.default=p},function(e,t,n){var r=n(251),o=n(252),a=n(256);r(".__observe-resize__ { position: absolute; left: 0; top: -100%; width: 100%; height: 100%; margin: 1px 0 0; border: none; opacity: 0; visibility: hidden; pointer-events: none; }"),e.exports=function(e,t){if(o.ok(a(e),"observe-resize: el should be a valid DOM element"),o.equal(typeof t,"function","observe-resize: cb should be type function"),"object"==typeof window){var n=!1,r=document.createElement("iframe");return r.setAttribute("class","__observe-resize__"),e.appendChild(r),o.ok(r.contentWindow,"observe-resize: no contentWindow detected - cannot start observing"),r.contentWindow.onresize=function(){n||(n=!0,window.requestAnimationFrame(function(){n=!1,t(e)}))},function(){r.parentNode&&r.parentNode.removeChild(r)}}}},function(e,t,n){(function(t){for(var r=n(259),o="undefined"==typeof window?t:window,a=["moz","webkit"],i="AnimationFrame",u=o["request"+i],s=o["cancel"+i]||o["cancelRequest"+i],l=0;!u&&l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){c.forEach(function(t){return delete e[t]})}(o),o.className=this.props.inputClassName,o.id=this.state.inputId,o.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",r({},o,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:l},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:l},this.props.placeholder):null)}}]),t}();h.propTypes={className:u.default.string,defaultValue:u.default.any,extraWidth:u.default.oneOfType([u.default.number,u.default.string]),id:u.default.string,injectStyles:u.default.bool,inputClassName:u.default.string,inputRef:u.default.func,inputStyle:u.default.object,minWidth:u.default.oneOfType([u.default.number,u.default.string]),onAutosize:u.default.func,onChange:u.default.func,placeholder:u.default.string,placeholderIsMinWidth:u.default.bool,style:u.default.object,value:u.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.default=h},function(e,t,n){var r=n(276),o=n(277);e.exports=function(e,t){return o(r,e,t)}},function(e,t,n){"use strict";var r={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=function(e){function t(e,t,r){var o=t.trim().split(h);t=o;var a=o.length,i=e.length;switch(i){case 0:case 1:var u=0;for(e=0===i?"":e[0]+" ";ur&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(H=(U=U.replace(" ",":")).length),01?o-1:0),i=1;i=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)}(n+t)+t}(0,r),n};function x(e,t){void 0===p.inserted[v]&&(n="",h(e,t),p.inserted[v]=n)}var O=function(){var e=E.apply(this,arguments),t=a+"-"+v;return void 0===p.registered[t]&&(p.registered[t]=b),x("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach(function(t){void 0!==p.registered[t]?e.push(t):n+=t+" "}),n}function C(e,t){var n=[],r=_(n,e);return n.length<2?e:r+O(n,t)}function k(e){p.inserted[e]=!0}if(c){var S=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(S,function(e){d.tags[0].parentNode.insertBefore(e,d.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(k)})}var j={flush:function(){c&&(d.flush(),d.inject()),p.inserted={},p.registered={}},hydrate:function(e){e.forEach(k)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n=0||(o[n]=e[n]);return o}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sketch=void 0;var r=l(n(1)),o=l(n(21)),a=l(n(25)),i=n(44),u=l(n(244)),s=l(n(245));function l(e){return e&&e.__esModule?e:{default:e}}var c=t.Sketch=function(e){var t=e.width,n=e.rgb,o=e.hex,l=e.hsv,c=e.hsl,p=e.onChange,f=e.onSwatchHover,d=e.disableAlpha,h=e.presetColors,m=e.renderers,g=e.className,v=void 0===g?"":g,b=(0,a.default)({default:{picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+n.r+","+n.g+","+n.b+","+n.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},{disableAlpha:d});return r.default.createElement("div",{style:b.picker,className:"sketch-picker "+v},r.default.createElement("div",{style:b.saturation},r.default.createElement(i.Saturation,{style:b.Saturation,hsl:c,hsv:l,onChange:p})),r.default.createElement("div",{style:b.controls,className:"flexbox-fix"},r.default.createElement("div",{style:b.sliders},r.default.createElement("div",{style:b.hue},r.default.createElement(i.Hue,{style:b.Hue,hsl:c,onChange:p})),r.default.createElement("div",{style:b.alpha},r.default.createElement(i.Alpha,{style:b.Alpha,rgb:n,hsl:c,renderers:m,onChange:p}))),r.default.createElement("div",{style:b.color},r.default.createElement(i.Checkboard,null),r.default.createElement("div",{style:b.activeColor}))),r.default.createElement(u.default,{rgb:n,hsl:c,hex:o,onChange:p,disableAlpha:d}),r.default.createElement(s.default,{colors:h,onClick:p,onSwatchHover:f}))};c.propTypes={disableAlpha:o.default.bool,width:o.default.oneOfType([o.default.string,o.default.number])},c.defaultProps={disableAlpha:!1,width:200,presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},t.default=(0,i.ColorWrap)(c)},function(e,t,n){"use strict";var r=n(122);function o(){}e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var r=u(n(124)),o=u(n(46)),a=u(n(135)),i=u(n(136));function u(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,function(t){Array.isArray(t)?e(t).map(function(e){return n.push(e)}):(0,a.default)(t)?(0,o.default)(t,function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)}):(0,r.default)(t)&&n.push(t)}),n};t.default=s},function(e,t,n){var r=n(29),o=n(23),a=n(26);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(33),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(128)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(37);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(36);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(36),o=n(56),a=n(57);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(68),o=n(151),a=n(27),i=n(72),u=/^\[object .+?Constructor\]$/,s=Function.prototype,l=Object.prototype,c=s.toString,p=l.hasOwnProperty,f=RegExp("^"+c.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:u).test(i(e))}},function(e,t,n){var r,o=n(152),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(24)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(155),o=n(36),a=n(56);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(156),o=n(157),a=n(158),i=n(159),u=n(160);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,r.default)(o,function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])}),t}),n};t.default=u},function(e,t,n){var r=n(199);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(54),o=n(85),a=n(86),i=n(201),u=n(202),s=n(205),l=n(206),c=n(207),p=n(208),f=n(76),d=n(209),h=n(40),m=n(210),g=n(211),v=n(216),b=n(23),y=n(47),w=n(218),E=n(27),x=n(220),O=n(34),_="[object Arguments]",C="[object Function]",k="[object Object]",S={};S[_]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S[k]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S[C]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,D,A,M){var T,F=1&n,P=2&n,N=4&n;if(j&&(T=A?j(t,D,A,M):j(t)),void 0!==T)return T;if(!E(t))return t;var I=b(t);if(I){if(T=m(t),!F)return l(t,T)}else{var L=h(t),R=L==C||"[object GeneratorFunction]"==L;if(y(t))return s(t,F);if(L==k||L==_||R&&!A){if(T=P||R?{}:v(t),!F)return P?p(t,u(T,t)):c(t,i(T,t))}else{if(!S[L])return A?t:{};T=g(t,L,F)}}M||(M=new r);var H=M.get(t);if(H)return H;if(M.set(t,T),x(t))return t.forEach(function(r){T.add(e(r,n,j,r,t,M))}),T;if(w(t))return t.forEach(function(r,o){T.set(o,e(r,n,j,o,t,M))}),T;var V=N?P?d:f:P?keysIn:O,B=I?void 0:V(t);return o(B||t,function(r,o){B&&(r=t[o=r]),a(T,o,e(r,n,j,o,t,M))}),T}},function(e,t,n){var r=n(30),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){var r=n(43),o=n(34);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(43),o=n(88);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(27),o=n(52),a=n(204),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var u in e)("constructor"!=u||!t&&i.call(e,u))&&n.push(u);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(24),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,u=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=u?u(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(48)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,u,s;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var l=arguments.length,c=Array(l),p=0;p1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var r=Object.assign||function(e){for(var t=1;ta?1:Math.round(100*l/a)/100,n.hsl.a!==c)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:c,source:"rgb"}}else{var p;if(p=s<0?0:s>o?1:Math.round(100*s/o)/100,n.a!==p)return{h:n.hsl.h,s:n.hsl.s,l:n.hsl.l,a:p,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={},o=t.render=function(e,t,n,r){if("undefined"==typeof document&&!r)return null;var o=r?new r:document.createElement("canvas");o.width=2*n,o.height=2*n;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,n,n),a.translate(n,n),a.fillRect(0,0,n,n),o.toDataURL()):null};t.get=function(e,t,n,a){var i=e+"-"+t+"-"+n+(a?"-server":""),u=o(e,t,n,a);return r[i]?r[i]:(r[i]=u,u)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var r=function(){function e(e,t){for(var n=0;n-1,o=Number(t.replace(/%/g,""));if(!isNaN(o)){var a=n.props.arrowOffset||1;38===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o+a),e):n.props.onChange&&n.props.onChange(o+a,e),r?n.setState({value:o+a+"%"}):n.setState({value:o+a})),40===e.keyCode&&(null!==n.props.label?n.props.onChange&&n.props.onChange(s({},n.props.label,o-a),e):n.props.onChange&&n.props.onChange(o-a,e),r?n.setState({value:o-a+"%"}):n.setState({value:o-a}))}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(s({},n.props.label,t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,o.PureComponent||o.Component),r(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return a.default.createElement("div",{style:t.wrap},a.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?a.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var r=function(){function e(e,t){for(var n=0;na?0:360*(-100*l/a+100)/100,n.hsl.h!==c)return{h:c,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}else{var p=void 0;if(p=s<0?0:s>o?359:100*s/o*360/100,n.hsl.h!==p)return{h:p,s:n.hsl.s,l:n.hsl.l,a:n.hsl.a,source:"rgb"}}return null}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var r=i(n(1)),o=i(n(21)),a=i(n(25));function i(e){return e&&e.__esModule?e:{default:e}}var u=t.Raised=function(e){var t=e.zDepth,n=e.radius,o=e.background,i=e.children,u=(0,a.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},{"zDepth-1":1===t});return r.default.createElement("div",{style:u.wrap},r.default.createElement("div",{style:u.bg}),r.default.createElement("div",{style:u.content},i))};u.propTypes={background:o.default.string,zDepth:o.default.oneOf([0,1,2,3,4,5]),radius:o.default.number},u.defaultProps={background:"#fff",zDepth:1,radius:2},t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var r=function(){function e(e,t){for(var n=0;na?l=a:c<0?c=0:c>i&&(c=i);var p=100*l/a,f=-100*c/i+100;return{h:n.hsl.h,s:p,v:f,a:n.hsl.a,source:"rgb"}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var r=Object.assign||function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=F(e,360),t=F(t,100),n=F(n,100),0===t)r=o=a=n;else{var u=n<.5?n*(1+t):n+t-n*t,s=2*n-u;r=i(s,u,e+1/3),o=i(s,u,e),a=i(s,u,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,p,d),h=!0,m="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=T(s),{ok:h,format:e.format||m,r:l(255,c(u.r,0)),g:l(255,c(u.g,0)),b:l(255,c(u.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=u++}function d(e,t,n){e=F(e,255),t=F(t,255),n=F(n,255);var r,o,a=c(e,t,n),i=l(e,t,n),u=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=u>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(f(r));return a}function D(e,t){t=t||6;for(var n=f(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],u=1/t;t--;)i.push(f({h:r,s:o,v:a})),a=(a+u)%1;return i}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=T(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),r=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[I(s(e).toString(16)),I(s(t).toString(16)),I(s(n).toString(16)),I(R(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*F(this._r,255))+"%",g:s(100*F(this._g,255))+"%",b:s(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%)":"rgba("+s(100*F(this._r,255))+"%, "+s(100*F(this._g,255))+"%, "+s(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=f(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(O,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(j,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:L(e[r]));e=n}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:p(),g:p(),b:p()})},f.mix=function(e,t,n){n=0===n?0:n||50;var r=f(e).toRgb(),o=f(t).toRgb(),a=n/100;return f({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},f.readability=function(e,t){var n=f(e),r=f(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},f.isReadable=function(e,t,n){var r,o,a=f.readability(e,t);switch(o=!1,(r=function(e){var t,n;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(n=(e.size||"small").toLowerCase())&&"large"!==n&&(n="small"),{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},f.mostReadable=function(e,t,n){var r,o,a,i,u=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var l=0;ls&&(s=r,u=f(t[l]));return f.isReadable(e,u,{level:a,size:i})||!o?u:(n.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],n))};var A=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=f.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(A);function T(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=l(t,c(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return l(1,c(0,e))}function N(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function R(e){return o.round(255*parseFloat(e)).toString(16)}function H(e){return N(e)/255}var V,B,U,z=(B="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",U="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(r=function(){return f}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}(this);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:u.h,s:u.s,l:u.l,a:e.a,source:"rgb"},r))};return r.default.createElement("div",{style:c.fields,className:"flexbox-fix"},r.default.createElement("div",{style:c.double},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:s.replace("#",""),onChange:p})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:n.r,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:n.g,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.single},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:n.b,onChange:p,dragLabel:"true",dragMax:"255"})),r.default.createElement("div",{style:c.alpha},r.default.createElement(i.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*n.a),onChange:p,dragLabel:"true",dragMax:"100"})))};t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SketchPresetColors=void 0;var r=Object.assign||function(e){for(var t=1;t11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},c=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},p=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r,a){if(0===e||e){var s,l=a||o,c=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var p=t||(n||g).dateFormat,f=String(e).trim();if("today"===f)s=new Date,r=!0;else if(/Z$/.test(f)||/GMT$/.test(f))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,p);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function w(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(c=o===s.hourElement?c-i-t(!s.amPM):a,f&&N(void 0,1,s.hourElement)),s.amPM&&p&&(1===u?c+l===23:Math.abs(c-l)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(c)}}(n);var r=s._input.value;C(),ge(),s._input.value!==r&&s._debouncedChange()}}function C(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var l=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,l.getHours()))===l.getHours()&&(o=Math.max(o,l.getMinutes())),o===l.getMinutes()&&(a=Math.max(a,l.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function F(){pe("onChange")}function T(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function L(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===f(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===f(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===f(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&f(e,s.selectedDates[0])>=0&&f(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),pe("onDayCreate",a),a}function R(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var l=o.children[u];if(-1===l.className.indexOf("hidden")&&J(l.dateObj))return l}}function V(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,l=i.children.length,c=u;c>=0&&c0?l:-1);c+=o){var p=i.children[c];if(-1===p.className.indexOf("hidden")&&J(p.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return R(p)}s.changeMonth(o),V(H(o),0)}(r,t):R(r)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",l=i?"nextMonthDay hidden":"nextMonthDay",c=r+1-n,p=0;c<=r;c++,p++)a.appendChild(L(u,new Date(e,t-1,c),c,p));for(c=1;c<=o;c++,p++)a.appendChild(L("",new Date(e,t,c),c,p));for(var f=o+1;f<=42-n&&(1===s.config.showMonths||p%7!=0);f++,p++)a.appendChild(L(l,new Date(e,t+1,f%o),f,p));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,pe("onYearChange")),U(),pe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),pe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&f(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&f(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),V(H(1),0)):V(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),V(H(1),0)):a||V(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var l=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),c=l.indexOf(e.target);if(-1!==c){var p=l[c+(e.shiftKey?-1:1)];void 0!==p?(e.preventDefault(),p.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],C(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],C(),ge()}pe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,l=0,c=r;cr&&cu)?u=c:c>n&&(!l||c0&&c0&&c>l;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=c||(nt&&c===n&&a.classList.add("endRange"),c>=u&&(0===l||c<=l)&&d(c,n,t)&&a.classList.add("inRange")))))},v=0,b=f.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===_.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},_.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?_.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=c(s),s.parseDate=p({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){pe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),l=window.innerHeight-u.bottom,c="above"===a||"below"!==a&&ln,p=window.pageYOffset+u.top+(c?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!c),v(s.calendarContainer,"arrowBottom",c),!s.config.inline){var f=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=f+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=p+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=f+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==f(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&pe("onYearChange"),pe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():R(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,l="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||l)&&ie()}F()}}s.parseDate=p({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&pe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),pe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&pe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=T,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void pe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),pe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),T(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);le(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),T(),k(),ge(t),t&&pe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function le(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ce(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function pe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&pe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=ce(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=ce(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):_.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):_.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var l=0;l-1?s.config[f]=r(p[f]).map(g).concat(s.config[f]):void 0===t[f]&&(s.config[f]=p[f])}pe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&le(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),pe("onChange"),pe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(F,E),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),F()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),pe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o11)]},M:function(e,t){return a(e.getMonth(),!0,t)},S:function(t){return e(t.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(t){return e(t.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(t){return e(t.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(t){return e(t.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},c=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r){var a=r||o;return void 0!==n.formatDate?n.formatDate(e,t,a):t.split("").map(function(t,r,o){return s[t]&&"\\"!==o[r-1]?s[t](e,a,n):"\\"!==t?t:""}).join("")}},p=function(e){var t=e.config,n=void 0===t?g:t,r=e.l10n,o=void 0===r?l:r;return function(e,t,r,a){if(0===e||e){var s,l=a||o,c=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e);else if("string"==typeof e){var p=t||(n||g).dateFormat,f=String(e).trim();if("today"===f)s=new Date,r=!0;else if(/Z$/.test(f)||/GMT$/.test(f))s=new Date(e);else if(n&&n.parseDate)s=n.parseDate(e,p);else{s=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var d,h=[],m=0,v=0,b="";mMath.min(t,n)&&e",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};function v(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function b(e,t,n){var r=window.document.createElement(e);return t=t||"",n=n||"",r.className=t,void 0!==n&&(r.textContent=n),r}function y(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function w(e,t){var n=b("div","numInputWrapper"),r=b("input","numInput "+e),o=b("span","arrowUp"),a=b("span","arrowDown");if(r.type="text",r.pattern="\\d*",void 0!==t)for(var i in t)r.setAttribute(i,t[i]);return n.appendChild(r),n.appendChild(o),n.appendChild(a),n}"function"!=typeof Object.assign&&(Object.assign=function(e){if(!e)throw TypeError("Cannot convert undefined or null to object");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;ri&&(c=o===s.hourElement?c-i-t(!s.amPM):a,f&&N(void 0,1,s.hourElement)),s.amPM&&p&&(1===u?c+l===23:Math.abs(c-l)>u)&&(s.amPM.textContent=s.l10n.amPM[t(s.amPM.textContent===s.l10n.amPM[0])]),o.value=e(c)}}(n);var r=s._input.value;C(),ge(),s._input.value!==r&&s._debouncedChange()}}function C(){if(void 0!==s.hourElement&&void 0!==s.minuteElement){var e,n,r=(parseInt(s.hourElement.value.slice(-2),10)||0)%24,o=(parseInt(s.minuteElement.value,10)||0)%60,a=void 0!==s.secondElement?(parseInt(s.secondElement.value,10)||0)%60:0;void 0!==s.amPM&&(e=r,n=s.amPM.textContent,r=e%12+12*t(n===s.l10n.amPM[1]));var i=void 0!==s.config.minTime||s.config.minDate&&s.minDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.minDate,!0);if(void 0!==s.config.maxTime||s.config.maxDate&&s.maxDateHasTime&&s.latestSelectedDateObj&&0===f(s.latestSelectedDateObj,s.config.maxDate,!0)){var u=void 0!==s.config.maxTime?s.config.maxTime:s.config.maxDate;(r=Math.min(r,u.getHours()))===u.getHours()&&(o=Math.min(o,u.getMinutes())),o===u.getMinutes()&&(a=Math.min(a,u.getSeconds()))}if(i){var l=void 0!==s.config.minTime?s.config.minTime:s.config.minDate;(r=Math.max(r,l.getHours()))===l.getHours()&&(o=Math.max(o,l.getMinutes())),o===l.getMinutes()&&(a=Math.max(a,l.getSeconds()))}j(r,o,a)}}function k(e){var t=e||s.latestSelectedDateObj;t&&j(t.getHours(),t.getMinutes(),t.getSeconds())}function S(){var e=s.config.defaultHour,t=s.config.defaultMinute,n=s.config.defaultSeconds;if(void 0!==s.config.minDate){var r=s.config.minDate.getHours(),o=s.config.minDate.getMinutes();(e=Math.max(e,r))===r&&(t=Math.max(o,t)),e===r&&t===o&&(n=s.config.minDate.getSeconds())}if(void 0!==s.config.maxDate){var a=s.config.maxDate.getHours(),i=s.config.maxDate.getMinutes();(e=Math.min(e,a))===a&&(t=Math.min(i,t)),e===a&&t===i&&(n=s.config.maxDate.getSeconds())}j(e,t,n)}function j(n,r,o){void 0!==s.latestSelectedDateObj&&s.latestSelectedDateObj.setHours(n%24,r,o||0,0),s.hourElement&&s.minuteElement&&!s.isMobile&&(s.hourElement.value=e(s.config.time_24hr?n:(12+n)%12+12*t(n%12==0)),s.minuteElement.value=e(r),void 0!==s.amPM&&(s.amPM.textContent=s.l10n.amPM[t(n>=12)]),void 0!==s.secondElement&&(s.secondElement.value=e(o)))}function D(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&X(t)}function A(e,t,n,r){return t instanceof Array?t.forEach(function(t){return A(e,t,n,r)}):e instanceof Array?e.forEach(function(e){return A(e,t,n,r)}):(e.addEventListener(t,n,r),void s._handlers.push({element:e,event:t,handler:n,options:r}))}function M(e){return function(t){1===t.which&&e(t)}}function T(){pe("onChange")}function F(e){var t=void 0!==e?s.parseDate(e):s.latestSelectedDateObj||(s.config.minDate&&s.config.minDate>s.now?s.config.minDate:s.config.maxDate&&s.config.maxDate11)]),s.amPM.title=s.l10n.toggleTitle,s.amPM.tabIndex=-1,s.timeContainer.appendChild(s.amPM)),s.timeContainer}()),v(s.calendarContainer,"rangeMode","range"===s.config.mode),v(s.calendarContainer,"animate",!0===s.config.animate),v(s.calendarContainer,"multiMonth",s.config.showMonths>1),s.calendarContainer.appendChild(n);var i=void 0!==s.config.appendTo&&void 0!==s.config.appendTo.nodeType;if((s.config.inline||s.config.static)&&(s.calendarContainer.classList.add(s.config.inline?"inline":"static"),s.config.inline&&(!i&&s.element.parentNode?s.element.parentNode.insertBefore(s.calendarContainer,s._input.nextSibling):void 0!==s.config.appendTo&&s.config.appendTo.appendChild(s.calendarContainer)),s.config.static)){var u=b("div","flatpickr-wrapper");s.element.parentNode&&s.element.parentNode.insertBefore(u,s.element),u.appendChild(s.element),s.altInput&&u.appendChild(s.altInput),u.appendChild(s.calendarContainer)}s.config.static||s.config.inline||(void 0!==s.config.appendTo?s.config.appendTo:window.document.body).appendChild(s.calendarContainer)}function L(e,t,n,r){var o=J(t,!0),a=b("span","flatpickr-day "+e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",s.formatDate(t,s.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===f(t,s.now)&&(s.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),o?(a.tabIndex=-1,de(t)&&(a.classList.add("selected"),s.selectedDateElem=a,"range"===s.config.mode&&(v(a,"startRange",s.selectedDates[0]&&0===f(t,s.selectedDates[0],!0)),v(a,"endRange",s.selectedDates[1]&&0===f(t,s.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("disabled"),"range"===s.config.mode&&function(e){return!("range"!==s.config.mode||s.selectedDates.length<2)&&f(e,s.selectedDates[0])>=0&&f(e,s.selectedDates[1])<=0}(t)&&!de(t)&&a.classList.add("inRange"),s.weekNumbers&&1===s.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&s.weekNumbers.insertAdjacentHTML("beforeend",""+s.config.getWeek(t)+""),pe("onDayCreate",a),a}function R(e){e.focus(),"range"===s.config.mode&&ee(e)}function H(e){for(var t=e>0?0:s.config.showMonths-1,n=e>0?s.config.showMonths:-1,r=t;r!=n;r+=e)for(var o=s.daysContainer.children[r],a=e>0?0:o.children.length-1,i=e>0?o.children.length:-1,u=a;u!=i;u+=e){var l=o.children[u];if(-1===l.className.indexOf("hidden")&&J(l.dateObj))return l}}function V(e,t){var n=Z(document.activeElement||document.body),r=void 0!==e?e:n?document.activeElement:void 0!==s.selectedDateElem&&Z(s.selectedDateElem)?s.selectedDateElem:void 0!==s.todayDateElem&&Z(s.todayDateElem)?s.todayDateElem:H(t>0?1:-1);return void 0===r?s._input.focus():n?void function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():s.currentMonth,r=t>0?s.config.showMonths:-1,o=t>0?1:-1,a=n-s.currentMonth;a!=r;a+=o)for(var i=s.daysContainer.children[a],u=n-s.currentMonth===a?e.$i+t:t<0?i.children.length-1:0,l=i.children.length,c=u;c>=0&&c0?l:-1);c+=o){var p=i.children[c];if(-1===p.className.indexOf("hidden")&&J(p.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return R(p)}s.changeMonth(o),V(H(o),0)}(r,t):R(r)}function B(e,t){for(var n=(new Date(e,t,1).getDay()-s.l10n.firstDayOfWeek+7)%7,r=s.utils.getDaysInMonth((t-1+12)%12),o=s.utils.getDaysInMonth(t),a=window.document.createDocumentFragment(),i=s.config.showMonths>1,u=i?"prevMonthDay hidden":"prevMonthDay",l=i?"nextMonthDay hidden":"nextMonthDay",c=r+1-n,p=0;c<=r;c++,p++)a.appendChild(L(u,new Date(e,t-1,c),c,p));for(c=1;c<=o;c++,p++)a.appendChild(L("",new Date(e,t,c),c,p));for(var f=o+1;f<=42-n&&(1===s.config.showMonths||p%7!=0);f++,p++)a.appendChild(L(l,new Date(e,t+1,f%o),f,p));var d=b("div","dayContainer");return d.appendChild(a),d}function U(){if(void 0!==s.daysContainer){y(s.daysContainer),s.weekNumbers&&y(s.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t0&&e\n "+t.join("")+"\n \n "}function q(e,t){void 0===t&&(t=!0);var n=t?e:e-s.currentMonth;n<0&&!0===s._hidePrevMonthArrow||n>0&&!0===s._hideNextMonthArrow||(s.currentMonth+=n,(s.currentMonth<0||s.currentMonth>11)&&(s.currentYear+=s.currentMonth>11?1:-1,s.currentMonth=(s.currentMonth+12)%12,pe("onYearChange")),U(),pe("onMonthChange"),he())}function $(e){return!(!s.config.appendTo||!s.config.appendTo.contains(e))||s.calendarContainer.contains(e)}function K(e){if(s.isOpen&&!s.config.inline){var t=$(e.target),n=e.target===s.input||e.target===s.altInput||s.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(s.input)||~e.path.indexOf(s.altInput)),r="blur"===e.type?n&&e.relatedTarget&&!$(e.relatedTarget):!n&&!t,o=!s.config.ignoredFocusElements.some(function(t){return t.contains(e.target)});r&&o&&(s.close(),"range"===s.config.mode&&1===s.selectedDates.length&&(s.clear(!1),s.redraw()))}}function X(e){if(!(!e||s.config.minDate&&es.config.maxDate.getFullYear())){var t=e,n=s.currentYear!==t;s.currentYear=t||s.currentYear,s.config.maxDate&&s.currentYear===s.config.maxDate.getFullYear()?s.currentMonth=Math.min(s.config.maxDate.getMonth(),s.currentMonth):s.config.minDate&&s.currentYear===s.config.minDate.getFullYear()&&(s.currentMonth=Math.max(s.config.minDate.getMonth(),s.currentMonth)),n&&(s.redraw(),pe("onYearChange"))}}function J(e,t){void 0===t&&(t=!0);var n=s.parseDate(e,void 0,t);if(s.config.minDate&&n&&f(n,s.config.minDate,void 0!==t?t:!s.minDateHasTime)<0||s.config.maxDate&&n&&f(n,s.config.maxDate,void 0!==t?t:!s.maxDateHasTime)>0)return!1;if(0===s.config.enable.length&&0===s.config.disable.length)return!0;if(void 0===n)return!1;for(var r,o=s.config.enable.length>0,a=o?s.config.enable:s.config.disable,i=0;i=r.from.getTime()&&n.getTime()<=r.to.getTime())return o}return!o}function Z(e){return void 0!==s.daysContainer&&-1===e.className.indexOf("hidden")&&s.daysContainer.contains(e)}function Q(e){var t=e.target===s._input,n=s.config.allowInput,r=s.isOpen&&(!n||!t),o=s.config.inline&&t&&!n;if(13===e.keyCode&&t){if(n)return s.setDate(s._input.value,!0,e.target===s.altInput?s.config.altFormat:s.config.dateFormat),e.target.blur();s.open()}else if($(e.target)||r||o){var a=!!s.timeContainer&&s.timeContainer.contains(e.target);switch(e.keyCode){case 13:a?O():ue(e);break;case 27:e.preventDefault(),ie();break;case 8:case 46:t&&!s.config.allowInput&&(e.preventDefault(),s.clear());break;case 37:case 39:if(a)s.hourElement&&s.hourElement.focus();else if(e.preventDefault(),void 0!==s.daysContainer&&(!1===n||Z(document.activeElement))){var i=39===e.keyCode?1:-1;e.ctrlKey?(q(i),V(H(1),0)):V(void 0,i)}break;case 38:case 40:e.preventDefault();var u=40===e.keyCode?1:-1;s.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(X(s.currentYear-u),V(H(1),0)):a||V(void 0,7*u):s.config.enableTime&&(!a&&s.hourElement&&s.hourElement.focus(),O(e),s._debouncedChange());break;case 9:if(!a){s.element.focus();break}var l=[s.hourElement,s.minuteElement,s.secondElement,s.amPM].filter(function(e){return e}),c=l.indexOf(e.target);if(-1!==c){var p=l[c+(e.shiftKey?-1:1)];void 0!==p?(e.preventDefault(),p.focus()):s.element.focus()}}}if(void 0!==s.amPM&&e.target===s.amPM)switch(e.key){case s.l10n.amPM[0].charAt(0):case s.l10n.amPM[0].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[0],C(),ge();break;case s.l10n.amPM[1].charAt(0):case s.l10n.amPM[1].charAt(0).toLowerCase():s.amPM.textContent=s.l10n.amPM[1],C(),ge()}pe("onKeyDown",e)}function ee(e){if(1===s.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled"))){for(var t=e?e.dateObj.getTime():s.days.firstElementChild.dateObj.getTime(),n=s.parseDate(s.selectedDates[0],void 0,!0).getTime(),r=Math.min(t,s.selectedDates[0].getTime()),o=Math.max(t,s.selectedDates[0].getTime()),a=s.daysContainer.lastChild.lastChild.dateObj.getTime(),i=!1,u=0,l=0,c=r;cr&&cu)?u=c:c>n&&(!l||c0&&c0&&c>l;return h?(a.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){a.classList.remove(e)}),"continue"):i&&!h?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){a.classList.remove(e)}),void(void 0!==e&&(e.classList.add(t0&&m&&m.lastChild.dateObj.getTime()>=c||(nt&&c===n&&a.classList.add("endRange"),c>=u&&(0===l||c<=l)&&d(c,n,t)&&a.classList.add("inRange")))))},v=0,b=f.children.length;v0||n.getMinutes()>0||n.getSeconds()>0),s.selectedDates&&(s.selectedDates=s.selectedDates.filter(function(e){return J(e)}),s.selectedDates.length||"min"!==e||k(n),ge()),s.daysContainer&&(ae(),void 0!==n?s.currentYearElement[e]=n.getFullYear().toString():s.currentYearElement.removeAttribute(e),s.currentYearElement.disabled=!!r&&void 0!==n&&r.getFullYear()===n.getFullYear())}}function re(){"object"!=typeof s.config.locale&&void 0===_.l10ns[s.config.locale]&&s.config.errorHandler(new Error("flatpickr: invalid locale "+s.config.locale)),s.l10n=Object.assign({},_.l10ns.default,"object"==typeof s.config.locale?s.config.locale:"default"!==s.config.locale?_.l10ns[s.config.locale]:void 0),u.K="("+s.l10n.amPM[0]+"|"+s.l10n.amPM[1]+"|"+s.l10n.amPM[0].toLowerCase()+"|"+s.l10n.amPM[1].toLowerCase()+")",s.formatDate=c(s),s.parseDate=p({config:s.config,l10n:s.l10n})}function oe(e){if(void 0!==s.calendarContainer){pe("onPreCalendarPosition");var t=e||s._positionElement,n=Array.prototype.reduce.call(s.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),r=s.calendarContainer.offsetWidth,o=s.config.position.split(" "),a=o[0],i=o.length>1?o[1]:null,u=t.getBoundingClientRect(),l=window.innerHeight-u.bottom,c="above"===a||"below"!==a&&ln,p=window.pageYOffset+u.top+(c?-n-2:t.offsetHeight+2);if(v(s.calendarContainer,"arrowTop",!c),v(s.calendarContainer,"arrowBottom",c),!s.config.inline){var f=window.pageXOffset+u.left-(null!=i&&"center"===i?(r-u.width)/2:0),d=window.document.body.offsetWidth-u.right,h=f+r>window.document.body.offsetWidth;v(s.calendarContainer,"rightMost",h),s.config.static||(s.calendarContainer.style.top=p+"px",h?(s.calendarContainer.style.left="auto",s.calendarContainer.style.right=d+"px"):(s.calendarContainer.style.left=f+"px",s.calendarContainer.style.right="auto"))}}}function ae(){s.config.noCalendar||s.isMobile||(he(),U())}function ie(){s._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(s.close,0):s.close()}function ue(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(e.target,function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,r=s.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(r.getMonth()s.currentMonth+s.config.showMonths-1)&&"range"!==s.config.mode;if(s.selectedDateElem=n,"single"===s.config.mode)s.selectedDates=[r];else if("multiple"===s.config.mode){var a=de(r);a?s.selectedDates.splice(parseInt(a),1):s.selectedDates.push(r)}else"range"===s.config.mode&&(2===s.selectedDates.length&&s.clear(!1),s.selectedDates.push(r),0!==f(r,s.selectedDates[0],!0)&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(C(),o){var i=s.currentYear!==r.getFullYear();s.currentYear=r.getFullYear(),s.currentMonth=r.getMonth(),i&&pe("onYearChange"),pe("onMonthChange")}if(he(),U(),ge(),s.config.enableTime&&setTimeout(function(){return s.showTimeInput=!0},50),o||"range"===s.config.mode||1!==s.config.showMonths?s.selectedDateElem&&s.selectedDateElem.focus():R(n),void 0!==s.hourElement&&setTimeout(function(){return void 0!==s.hourElement&&s.hourElement.select()},451),s.config.closeOnSelect){var u="single"===s.config.mode&&!s.config.enableTime,l="range"===s.config.mode&&2===s.selectedDates.length&&!s.config.enableTime;(u||l)&&ie()}T()}}s.parseDate=p({config:s.config,l10n:s.l10n}),s._handlers=[],s._bind=A,s._setHoursFromDate=k,s._positionCalendar=oe,s.changeMonth=q,s.changeYear=X,s.clear=function(e){void 0===e&&(e=!0),s.input.value="",void 0!==s.altInput&&(s.altInput.value=""),void 0!==s.mobileInput&&(s.mobileInput.value=""),s.selectedDates=[],s.latestSelectedDateObj=void 0,s.showTimeInput=!1,!0===s.config.enableTime&&S(),s.redraw(),e&&pe("onChange")},s.close=function(){s.isOpen=!1,s.isMobile||(s.calendarContainer.classList.remove("open"),s._input.classList.remove("active")),pe("onClose")},s._createElement=b,s.destroy=function(){void 0!==s.config&&pe("onDestroy");for(var e=s._handlers.length;e--;){var t=s._handlers[e];t.element.removeEventListener(t.event,t.handler,t.options)}if(s._handlers=[],s.mobileInput)s.mobileInput.parentNode&&s.mobileInput.parentNode.removeChild(s.mobileInput),s.mobileInput=void 0;else if(s.calendarContainer&&s.calendarContainer.parentNode)if(s.config.static&&s.calendarContainer.parentNode){var n=s.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else s.calendarContainer.parentNode.removeChild(s.calendarContainer);s.altInput&&(s.input.type="text",s.altInput.parentNode&&s.altInput.parentNode.removeChild(s.altInput),delete s.altInput),s.input&&(s.input.type=s.input._type,s.input.classList.remove("flatpickr-input"),s.input.removeAttribute("readonly"),s.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete s[e]}catch(e){}})},s.isEnabled=J,s.jumpToDate=F,s.open=function(e,t){if(void 0===t&&(t=s._positionElement),!0===s.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==s.mobileInput&&(s.mobileInput.focus(),s.mobileInput.click()),void pe("onOpen");if(!s._input.disabled&&!s.config.inline){var n=s.isOpen;s.isOpen=!0,n||(s.calendarContainer.classList.add("open"),s._input.classList.add("active"),pe("onOpen"),oe(t)),!0===s.config.enableTime&&!0===s.config.noCalendar&&(0===s.selectedDates.length&&(s.setDate(void 0!==s.config.minDate?new Date(s.config.minDate.getTime()):new Date,!1),S(),ge()),!1!==s.config.allowInput||void 0!==e&&s.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return s.hourElement.select()},50))}},s.redraw=ae,s.set=function(e,t){null!==e&&"object"==typeof e?Object.assign(s.config,e):(s.config[e]=t,void 0!==se[e]?se[e].forEach(function(e){return e()}):m.indexOf(e)>-1&&(s.config[e]=r(t))),s.redraw(),F(),ge(!1)},s.setDate=function(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=s.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return s.clear(t);le(e,n),s.showTimeInput=s.selectedDates.length>0,s.latestSelectedDateObj=s.selectedDates[0],s.redraw(),F(),k(),ge(t),t&&pe("onChange")},s.toggle=function(e){if(!0===s.isOpen)return s.close();s.open(e)};var se={locale:[re,G],showMonths:[W,x,Y]};function le(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return s.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[s.parseDate(e,t)];else if("string"==typeof e)switch(s.config.mode){case"single":case"time":n=[s.parseDate(e,t)];break;case"multiple":n=e.split(s.config.conjunction).map(function(e){return s.parseDate(e,t)});break;case"range":n=e.split(s.l10n.rangeSeparator).map(function(e){return s.parseDate(e,t)})}else s.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));s.selectedDates=n.filter(function(e){return e instanceof Date&&J(e,!1)}),"range"===s.config.mode&&s.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function ce(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?s.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:s.parseDate(e.from,void 0),to:s.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function pe(e,t){if(void 0!==s.config){var n=s.config[e];if(void 0!==n&&n.length>0)for(var r=0;n[r]&&rs.config.maxDate.getMonth():s.currentYear>s.config.maxDate.getFullYear()))}function me(e){return s.selectedDates.map(function(t){return s.formatDate(t,e)}).filter(function(e,t,n){return"range"!==s.config.mode||s.config.enableTime||n.indexOf(e)===t}).join("range"!==s.config.mode?s.config.conjunction:s.l10n.rangeSeparator)}function ge(e){if(void 0===e&&(e=!0),0===s.selectedDates.length)return s.clear(e);void 0!==s.mobileInput&&s.mobileFormatStr&&(s.mobileInput.value=void 0!==s.latestSelectedDateObj?s.formatDate(s.latestSelectedDateObj,s.mobileFormatStr):""),s.input.value=me(s.config.dateFormat),void 0!==s.altInput&&(s.altInput.value=me(s.config.altFormat)),!1!==e&&pe("onValueUpdate")}function ve(e){e.preventDefault();var t=s.prevMonthNav.contains(e.target),n=s.nextMonthNav.contains(e.target);t||n?q(t?-1:1):s.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?s.changeYear(s.currentYear+1):e.target.classList.contains("arrowDown")&&s.changeYear(s.currentYear-1)}return function(){s.element=s.input=o,s.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=Object.assign({},i,JSON.parse(JSON.stringify(o.dataset||{}))),n={};s.config.parseDate=t.parseDate,s.config.formatDate=t.formatDate,Object.defineProperty(s.config,"enable",{get:function(){return s.config._enable},set:function(e){s.config._enable=ce(e)}}),Object.defineProperty(s.config,"disable",{get:function(){return s.config._disable},set:function(e){s.config._disable=ce(e)}});var a="time"===t.mode;t.dateFormat||!t.enableTime&&!a||(n.dateFormat=t.noCalendar||a?"H:i"+(t.enableSeconds?":S":""):_.defaultConfig.dateFormat+" H:i"+(t.enableSeconds?":S":"")),t.altInput&&(t.enableTime||a)&&!t.altFormat&&(n.altFormat=t.noCalendar||a?"h:i"+(t.enableSeconds?":S K":" K"):_.defaultConfig.altFormat+" h:i"+(t.enableSeconds?":S":"")+" K"),Object.defineProperty(s.config,"minDate",{get:function(){return s.config._minDate},set:ne("min")}),Object.defineProperty(s.config,"maxDate",{get:function(){return s.config._maxDate},set:ne("max")});var u=function(e){return function(t){s.config["min"===e?"_minTime":"_maxTime"]=s.parseDate(t,"H:i")}};Object.defineProperty(s.config,"minTime",{get:function(){return s.config._minTime},set:u("min")}),Object.defineProperty(s.config,"maxTime",{get:function(){return s.config._maxTime},set:u("max")}),"time"===t.mode&&(s.config.noCalendar=!0,s.config.enableTime=!0),Object.assign(s.config,n,t);for(var l=0;l-1?s.config[f]=r(p[f]).map(g).concat(s.config[f]):void 0===t[f]&&(s.config[f]=p[f])}pe("onParseConfig")}(),re(),s.input=s.config.wrap?o.querySelector("[data-input]"):o,s.input?(s.input._type=s.input.type,s.input.type="text",s.input.classList.add("flatpickr-input"),s._input=s.input,s.config.altInput&&(s.altInput=b(s.input.nodeName,s.input.className+" "+s.config.altInputClass),s._input=s.altInput,s.altInput.placeholder=s.input.placeholder,s.altInput.disabled=s.input.disabled,s.altInput.required=s.input.required,s.altInput.tabIndex=s.input.tabIndex,s.altInput.type="text",s.input.setAttribute("type","hidden"),!s.config.static&&s.input.parentNode&&s.input.parentNode.insertBefore(s.altInput,s.input.nextSibling)),s.config.allowInput||s._input.setAttribute("readonly","readonly"),s._positionElement=s.config.positionElement||s._input):s.config.errorHandler(new Error("Invalid input element specified")),function(){s.selectedDates=[],s.now=s.parseDate(s.config.now)||new Date;var e=s.config.defaultDate||("INPUT"!==s.input.nodeName&&"TEXTAREA"!==s.input.nodeName||!s.input.placeholder||s.input.value!==s.input.placeholder?s.input.value:null);e&&le(e,s.config.dateFormat);var t=s.selectedDates.length>0?s.selectedDates[0]:s.config.minDate&&s.config.minDate.getTime()>s.now.getTime()?s.config.minDate:s.config.maxDate&&s.config.maxDate.getTime()0&&(s.latestSelectedDateObj=s.selectedDates[0]),void 0!==s.config.minTime&&(s.config.minTime=s.parseDate(s.config.minTime,"H:i")),void 0!==s.config.maxTime&&(s.config.maxTime=s.parseDate(s.config.maxTime,"H:i")),s.minDateHasTime=!!s.config.minDate&&(s.config.minDate.getHours()>0||s.config.minDate.getMinutes()>0||s.config.minDate.getSeconds()>0),s.maxDateHasTime=!!s.config.maxDate&&(s.config.maxDate.getHours()>0||s.config.maxDate.getMinutes()>0||s.config.maxDate.getSeconds()>0),Object.defineProperty(s,"showTimeInput",{get:function(){return s._showTimeInput},set:function(e){s._showTimeInput=e,s.calendarContainer&&v(s.calendarContainer,"showTimeInput",e),s.isOpen&&oe()}})}(),s.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=s.currentMonth),void 0===t&&(t=s.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:s.l10n.daysInMonth[e]}},s.isMobile||I(),function(){if(s.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(s.element.querySelectorAll("[data-"+e+"]"),function(t){return A(t,"click",s[e])})}),s.isMobile)!function(){var e=s.config.enableTime?s.config.noCalendar?"time":"datetime-local":"date";s.mobileInput=b("input",s.input.className+" flatpickr-mobile"),s.mobileInput.step=s.input.getAttribute("step")||"any",s.mobileInput.tabIndex=1,s.mobileInput.type=e,s.mobileInput.disabled=s.input.disabled,s.mobileInput.required=s.input.required,s.mobileInput.placeholder=s.input.placeholder,s.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",s.selectedDates.length>0&&(s.mobileInput.defaultValue=s.mobileInput.value=s.formatDate(s.selectedDates[0],s.mobileFormatStr)),s.config.minDate&&(s.mobileInput.min=s.formatDate(s.config.minDate,"Y-m-d")),s.config.maxDate&&(s.mobileInput.max=s.formatDate(s.config.maxDate,"Y-m-d")),s.input.type="hidden",void 0!==s.altInput&&(s.altInput.type="hidden");try{s.input.parentNode&&s.input.parentNode.insertBefore(s.mobileInput,s.input.nextSibling)}catch(e){}A(s.mobileInput,"change",function(e){s.setDate(e.target.value,!1,s.mobileFormatStr),pe("onChange"),pe("onClose")})}();else{var e=n(te,50);s._debouncedChange=n(T,E),s.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&A(s.daysContainer,"mouseover",function(e){"range"===s.config.mode&&ee(e.target)}),A(window.document.body,"keydown",Q),s.config.static||A(s._input,"keydown",Q),s.config.inline||s.config.static||A(window,"resize",e),void 0!==window.ontouchstart?A(window.document,"click",K):A(window.document,"mousedown",M(K)),A(window.document,"focus",K,{capture:!0}),!0===s.config.clickOpens&&(A(s._input,"focus",s.open),A(s._input,"mousedown",M(s.open))),void 0!==s.daysContainer&&(A(s.monthNav,"mousedown",M(ve)),A(s.monthNav,["keyup","increment"],D),A(s.daysContainer,"mousedown",M(ue))),void 0!==s.timeContainer&&void 0!==s.minuteElement&&void 0!==s.hourElement&&(A(s.timeContainer,["increment"],O),A(s.timeContainer,"blur",O,{capture:!0}),A(s.timeContainer,"mousedown",M(P)),A([s.hourElement,s.minuteElement],["focus","click"],function(e){return e.target.select()}),void 0!==s.secondElement&&A(s.secondElement,"focus",function(){return s.secondElement&&s.secondElement.select()}),void 0!==s.amPM&&A(s.amPM,"mousedown",M(function(e){O(e),T()})))}}(),(s.selectedDates.length||s.config.noCalendar)&&(s.config.enableTime&&k(s.config.noCalendar?s.latestSelectedDateObj||s.config.minDate:void 0),ge(!1)),x(),s.showTimeInput=s.selectedDates.length>0||s.config.noCalendar;var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!s.isMobile&&e&&oe(),pe("onReady")}(),s}function O(e,t){for(var n=Array.prototype.slice.call(e),r=[],o=0;o * @license MIT */ -function r(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o=0;l--)if(c[l]!==p[l])return!1;for(l=c.length-1;l>=0;l--)if(!b(e[s=c[l]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&w(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(p.AssertionError,Error),p.fail=g,p.ok=v,p.equal=function(e,t,n){e!=t&&g(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){E(!0,e,t,n)},p.doesNotThrow=function(e,t,n){E(!1,e,t,n)},p.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(31))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),c(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=c(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return p(n)}var l,w="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(w=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),x(n)&&(w=" "+p(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,w,C)):C[0]+w+C[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?c(e,s.value,null):c(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function x(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=w,t.isDate=E,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(254);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(255),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(31),n(93))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(93))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(261)),o=u(n(264)),a=u(n(1)),i=u(n(94));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var l=o in t,c=o in u,p=t[o],f=(0,r.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,r.isValidElement)(p)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:p.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(f.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return p()({},e,l()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(f.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function h(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function m(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function g(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function v(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function b(e,t){return e.validation[t]||null}function y(e,t){return-1===e.hiddenFields.indexOf(t)}Object(u.registerStore)("carbon-fields/core",{reducer:d,actions:r,selectors:o});var w=n(19),E=n.n(w),x=n(14),O=n(6),_=n.n(O),C=n(7),k=n.n(C),S=n(8),j=n.n(S),D=n(9),A=n.n(D),M=n(10),F=n.n(M),T=n(0),P=n.n(T),N=n(3),I=16;function L(e){return Object(x.createHigherOrderComponent)(function(t){return function(n){function r(n){var o;return _()(this,r),(o=j()(this,A()(r).call(this,n))).onHooksUpdated=o.onHooksUpdated.bind(P()(P()(o))),o.Component=Object(i.applyFilters)(e,t),o.namespace=Object(f.uniqueId)("core/with-filters/component-"),o.throttledForceUpdate=Object(f.debounce)(function(){o.Component=Object(i.applyFilters)(e,t),o.forceUpdate()},I),Object(i.addAction)("hookRemoved",o.namespace,o.onHooksUpdated),Object(i.addAction)("hookAdded",o.namespace,o.onHooksUpdated),o}return F()(r,n),k()(r,[{key:"componentWillUnmount",value:function(){this.throttledForceUpdate.cancel(),Object(i.removeAction)("hookRemoved",this.namespace),Object(i.removeAction)("hookAdded",this.namespace)}},{key:"onHooksUpdated",value:function(t){t===e&&this.throttledForceUpdate()}},{key:"render",value:function(){return wp.element.createElement(this.Component,this.props)}}]),r}(N.Component)},"withFilters")}function R(e,t){var n,r=Object(f.startCase)(e),o={};return n={},l()(n,"register".concat(r,"Type"),function(n,u){return Object(f.isString)(n)?o[n]?(console.error(Object(a.sprintf)(Object(a.__)("%1$s %2$s is already registered.","carbon-fields-ui"),r,n)),!1):u&&Object(f.isFunction)(u)?(o[n]=t.reduce(function(t,r){return p()({},t,l()({},r,Object(i.applyFilters)("carbon-fields.register-".concat(e,"-type"),n,r,u)))},{}),!0):(console.error(Object(a.__)('The "component" param must be a function.',"carbon-fields-ui")),!1):(console.error(Object(a.sprintf)(Object(a.__)("%1$s type must be a string.","carbon-fields-ui"),r)),!1)}),l()(n,"get".concat(r,"Type"),function(e,n){if(t.includes(n)){if(o[e])return o[e][n];console.error(Object(a.sprintf)(Object(a.__)("%s %s isn't registered.","carbon-fields-ui"),r,e))}else console.error(Object(a.sprintf)(Object(a.__)("The provided context isn't a valid one. Must be one of - %s .","carbon-fields-ui"),t.join(", ")))}),n}var H=R("field",["metabox","block"]),V=H.registerFieldType,B=H.getFieldType,U=n(16),z=n.n(U),W=n(32),Y=n.n(W),G=n(17),q=n(20),K=n.n(q),X=n(11),J=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(r,o){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){r(e)}),i.fail(function(){o(Object(a.__)("An error occured.","carbon-fields-ui"))})})},ue=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&i.length>=r.max?alert(Object(a.sprintf)(Object(a.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(u(o,E()(i).concat([Object(f.pick)(e,"id","type","subtype")])),s({selectedOptions:E()(l).concat([e])})))}),l()(P()(P()(n)),"handleRemoveItem",function(e){var t=n.props,r=t.value,o=t.id,a=t.onChange,i=t.setState,u=t.selectedOptions;a(o,Object(f.without)(r,e)),i({selectedOptions:Object(f.without)(u,e)})}),l()(P()(P()(n)),"handleSort",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),n}return F()(t,e),k()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t()}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.value,o=t.field,i=t.totalOptionsCount,u=t.selectedOptions,s=t.queryTerm,l=this.props.options;return o.duplicates_allowed||(l=Y()(l,function(e){e.map(function(e){return e.disabled=!!Object(f.find)(r,function(t){return Object(f.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),wp.element.createElement(N.Fragment,null,wp.element.createElement("div",{className:"cf-association__bar"},wp.element.createElement(oe,{value:s,onChange:this.handleSearchChange}),wp.element.createElement("span",{className:"cf-association__counter"},Object(a.sprintf)(Object(a.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(l.length),Number(i)))),wp.element.createElement("div",{className:"cf-association__cols"},wp.element.createElement("div",{className:"cf-association__col"},l.map(function(t,n){return wp.element.createElement("div",{className:K()("cf-association__option",{"cf-association__option--selected":t.disabled}),key:n},t.thumbnail&&wp.element.createElement("img",{className:"cf-association__option-thumb",src:t.thumbnail}),wp.element.createElement("div",{className:"cf-association__option-content"},wp.element.createElement("span",{className:"cf-association__option-title"},t.title),wp.element.createElement("span",{className:"cf-association__option-type"},t.type)),wp.element.createElement("div",{className:"cf-association__option-actions"},wp.element.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:t.edit_link.replace("&","&","g"),target:"_blank",rel:"noopener noreferrer"}),!t.disabled&&(o.max<0||r.length0&&t.length=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(he.createElement)(e,n)},a}(he.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r},Se=ke(function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a1?n.setState(function(e){return{menuVisible:!e.menuVisible}}):r(t[0])}),l()(P()(P()(n)),"handleItemClick",function(e){n.setState({menuVisible:!1}),n.props.onSelect(e)}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.buttonText,r=t.groups;return wp.element.createElement("div",{className:"cf-complex__inserter"},wp.element.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},n),r.length>1&&wp.element.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},r.map(function(t,n){return wp.element.createElement("li",{className:"cf-complex__inserter-item",key:n,onClick:function(){return e.handleItemClick(t)}},t.label)})))}}]),t}(N.Component)),Ie=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;n.setState({currentTab:Object(f.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),l()(P()(P()(n)),"handleToggleAllClick",function(){var e=n.props,t=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!t)}),l()(P()(P()(n)),"handleGroupsSortStart",function(e,t){var r=n.props,o=r.value,a=r.groupIdKey,i=t.item.index(),u=Object(f.get)(o,"".concat(i,".").concat(a),null);n.setState({currentDraggedGroup:u})}),l()(P()(P()(n)),"handleGroupsSortUpdate",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),l()(P()(P()(n)),"handleGroupsSortStop",function(){n.setState({currentDraggedGroup:null})}),l()(P()(P()(n)),"handleTabsChange",function(e){n.setState({currentTab:e})}),n}return F()(t,e),k()(t,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(f.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=z()(e,2),o=r[0],i=r[1],u=Object(f.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(f.isString)(u.label_template))return u.label;try{return Object(f.template)(u.label_template)(p()({$_index:n},i))||u.label}catch(e){return console.error(Object(a.sprintf)(Object(a.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var e=this,t=this.state,n=t.currentDraggedGroup,r=t.currentTab,o=this.props,i=o.value,u=o.field,s=o.groupIdKey,l=o.groupFilterKey,c=o.allGroupsAreCollapsed,p=o.onGroupSetup,f=o.onGroupFieldSetup,d=o.onToggleGroup,h=this.getAvailableGroups(l),m=this.getGroupLabels(),g=i.map(function(e,t){return{id:e[s],label:m[t]}});return wp.element.createElement(N.Fragment,null,this.isTabbed&&!!i.length&&wp.element.createElement(ae,{items:i,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===u.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},wp.element.createElement(Pe,{ref:this.tabsList,items:g,current:r,layout:u.layout,onChange:this.handleTabsChange},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Ne,{buttonText:"+",groups:h,onSelect:this.handleAddGroup}))),!i.length&&wp.element.createElement(Le,{label:"There are no entries yet."},wp.element.createElement(Ne,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup})),!!i.length&&wp.element.createElement(ae,{items:i,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},wp.element.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},i.map(function(t,o){return wp.element.createElement(Ie,Q()({key:"".concat(t[l],"-").concat(o)},p(t,{index:o,label:m[o],dragged:t[s]===n,tabbed:e.isTabbed,hidden:e.isTabbed&&t[s]!==r,allowClone:u.duplicate_groups_allowed&&!e.isMaximumReached,onFieldSetup:f,onClone:e.handleCloneGroup,onRemove:e.handleRemoveGroup,onToggle:d})))}))),!this.isTabbed&&!!i.length&&wp.element.createElement("div",{className:"cf-complex__actions"},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Ne,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup}),wp.element.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},c?Object(a.__)("Expand All","carbon-fields-ui"):Object(a.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(a.sprintf)(Object(a.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),t}(N.Component);Object(i.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(e){return function(t){var n=t.field;return"complex"!==n.type?wp.element.createElement(e,t):wp.element.createElement(e,Q()({className:"cf-complex--".concat(n.layout)},t))}}),Object(i.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(f.isEmpty)(t))return Object(a.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},xt=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},Ot=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},_t=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function Dt(e){return jt(e)?window.pageYOffset:e.scrollTop}function At(e,t){jt(e)?window.scrollTo(0,t):e.scrollTop=t}function Mt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ct,o=Dt(e),a=t-o,i=0;!function t(){var u,s=a*((u=(u=i+=10)/n-1)*u*u+1)+o;At(e,s),i=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&Mt(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&E>=r)return a&&Mt(s,_,160),{placement:"bottom",maxHeight:i?E-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&w>=r)&&(k=i?w-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return At(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&Mt(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&w>=r){var S=t;return(!i&&x>=r||i&&w>=r)&&(S=i?w-y:x-y),a&&Mt(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!c,isFixedPosition:c,theme:s});l&&l(p),r.setState(p)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||Tt(e);return yt({},r.props,{placement:t,maxHeight:r.state.maxHeight})},xt(r,n)}return wt(t,e),vt(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(he.Component);Pt.contextTypes={getPortalPlacement:lt.a.func};var Nt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},It=Nt,Lt=Nt,Rt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",yt({className:r(Object(ut.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};Rt.defaultProps={children:"No options"};var Ht=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",yt({className:r(Object(ut.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};Ht.defaultProps={children:"Loading..."};var Vt=function(e){function t(){var e,n,r;gt(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=c-p-l,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),f.scrollTop=c,m=!0,r.isBottom=!0):!d&&-t>l&&(i&&!r.isTop&&i(e),f.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},xt(r,n)}return wt(t,e),vt(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return me.a.createElement(Jt,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(he.Component),cn=function(e){function t(){return gt(this,t),xt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return wt(t,e),vt(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=Et(e,["isEnabled"]);return t?me.a.createElement(ln,n):this.props.children}}]),t}(he.Component);cn.defaultProps={isEnabled:!0};var pn=function(e){function t(){return gt(this,t),xt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return wt(t,e),vt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,i=e.hasValue;return me.a.createElement("div",{className:r(Object(ut.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i},n)},t)}}]),t}(he.Component),fn=function(e){var t=e.size,n=Et(e,["size"]);return me.a.createElement("svg",yt({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(ut.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},dn=function(e){return me.a.createElement(fn,yt({size:20},e),me.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},hn=function(e){return me.a.createElement(fn,yt({size:20},e),me.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},mn=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},gn=mn,vn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",yt({},a,{className:r(Object(ut.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};vn.defaultProps={children:me.a.createElement(hn,null)};var bn=mn,yn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",yt({},a,{className:r(Object(ut.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};yn.defaultProps={children:me.a.createElement(dn,null)};var wn=function(e){var t=e.color,n=e.delay,r=e.offset;return me.a.createElement("span",{className:Object(ut.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(ut.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var En=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,i=e.isRtl,u=e.theme.colors,s=a?u.neutral80:u.neutral20;return me.a.createElement("div",yt({},o,{className:n(Object(ut.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),me.a.createElement(wn,{color:s,delay:0,offset:i}),me.a.createElement(wn,{color:s,delay:160,offset:!0}),me.a.createElement(wn,{color:s,delay:320,offset:!i}))};En.defaultProps={size:4};var xn=function(e){var t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)},On=xn,_n=xn,Cn=function(e){function t(){return gt(this,t),xt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return wt(t,e),vt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)}}]),t}(he.Component);Cn.defaultProps={children:me.a.createElement(dn,{size:14})};var kn=function(e){function t(){return gt(this,t),xt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return wt(t,e),vt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,i=e.getStyles,u=e.innerProps,s=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove,h=yt({className:o(Object(ut.a)(i("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),m={className:o(Object(ut.a)(i("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=yt({className:o(Object(ut.a)(i("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return me.a.createElement(p,{data:a,innerProps:h,selectProps:c},me.a.createElement(f,{data:a,innerProps:m,selectProps:c},t),me.a.createElement(d,{data:a,innerProps:g,selectProps:c}))}}]),t}(he.Component);kn.defaultProps={cropWithEllipsis:!0};var Sn={ClearIndicator:yn,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,i=e.isFocused,u=e.innerRef,s=e.innerProps;return me.a.createElement("div",yt({ref:u,className:n(Object(ut.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":i},o)},s),t)},DropdownIndicator:vn,DownChevron:hn,CrossIcon:dn,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,i=e.headingProps,u=e.label,s=e.theme;return me.a.createElement("div",{className:r(Object(ut.a)(o("group",e)),{group:!0},n)},me.a.createElement(a,yt({},i,{theme:s,getStyles:o,cx:r}),u),me.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=Et(e,["className","cx","getStyles","theme"]);return me.a.createElement("div",yt({className:n(Object(ut.a)(r("groupHeading",yt({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return me.a.createElement("div",{className:r(Object(ut.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return me.a.createElement("span",yt({},o,{className:n(Object(ut.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,i=e.isDisabled,u=e.theme,s=Et(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return me.a.createElement("div",{className:Object(ut.a)(r("input",yt({theme:u},s)))},me.a.createElement(pt.a,yt({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:i},s)))},LoadingIndicator:En,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,i=e.innerProps,u=r(Object(ut.a)(o("menu",e)),{menu:!0},n);return me.a.createElement("div",yt({className:u},i,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,i=e.innerRef;return me.a.createElement("div",{className:r(Object(ut.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:i},t)},MenuPortal:Vt,LoadingMessage:Ht,NoOptionsMessage:Rt,MultiValue:kn,MultiValueContainer:On,MultiValueLabel:_n,MultiValueRemove:Cn,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.isFocused,u=e.isSelected,s=e.innerRef,l=e.innerProps;return me.a.createElement("div",yt({ref:s,className:r(Object(ut.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":i,"option--is-selected":u},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",yt({className:r(Object(ut.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,i=e.isDisabled,u=e.isRtl;return me.a.createElement("div",yt({className:r(Object(ut.a)(o("container",e)),{"--is-disabled":i,"--is-rtl":u},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.innerProps;return me.a.createElement("div",yt({className:r(Object(ut.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},i),t)},ValueContainer:pn},jn=function(e){return yt({},Sn,e.components)},Dn={clearIndicator:bn,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:gn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Lt,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return bt(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),bt(t,"backgroundColor",i.neutral0),bt(t,"borderRadius",o),bt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),bt(t,"marginBottom",a.menuGutter),bt(t,"marginTop",a.menuGutter),bt(t,"position","absolute"),bt(t,"width","100%"),bt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:It,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},An={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Mn={backspaceRemovesValue:!0,blurInputOnSelect:Ft(),captureMenuScroll:!Ft(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=yt({ignoreCase:!0,ignoreAccents:!0,stringify:$t,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?qt(t):t,l=i?qt(a(e)):a(e);return r&&(s=s.toLowerCase(),l=l.toLowerCase()),o&&(s=Gt(s),l=Gt(l)),"start"===u?l.substr(0,s.length)===s:l.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Fn=1,Tn=function(e){function t(e){gt(this,t);var n=xt(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pn.call(n);var r=e.value;n.cacheComponents=dt(n.cacheComponents,Wt).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Fn);var o=St(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return wt(t,e),vt(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=St(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,l=this.state.isFocused;(l&&!u&&e.isDisabled||l&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?At(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,l=-1;if(a.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(An):yt({},An,this.props.theme):An}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+kt(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var l=a?void 0:function(){return n.onOptionHover(e)},c=a?void 0:function(){return n.selectOption(e)},p=n.getElementId("option")+"-"+r;return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:p,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,l=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:l({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=this.components.Input,u=this.state.inputIsHidden,s=r||this.getElementId("input");if(!n)return me.a.createElement(Xt,{id:s,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ct,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps,p=c.cx,f=c.theme;return me.a.createElement(i,yt({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:s,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:f,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,u=t.Placeholder,s=this.commonProps,l=this.props,c=l.controlShouldRenderValue,p=l.isDisabled,f=l.isMulti,d=l.inputValue,h=l.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue;if(!this.hasValue()||!c)return d?null:me.a.createElement(u,yt({},s,{key:"placeholder",isDisabled:p}),h);if(f)return g.map(function(t){var i=t===v;return me.a.createElement(n,yt({},s,{components:{Container:r,Label:o,Remove:a},isFocused:i,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(d)return null;var b=g[0];return me.a.createElement(i,yt({},s,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,yt({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?me.a.createElement(e,yt({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return me.a.createElement(n,yt({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,yt({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,u=t.LoadingMessage,s=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,f=p.focusedOption,d=p.menuOptions,h=this.props,m=h.captureMenuScroll,g=h.inputValue,v=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,E=h.menuIsOpen,x=h.menuPlacement,O=h.menuPosition,_=h.menuPortalTarget,C=h.menuShouldBlockScroll,k=h.menuShouldScrollIntoView,S=h.noOptionsMessage,j=h.onMenuScrollToTop,D=h.onMenuScrollToBottom;if(!E)return null;var A=function(t){var n=f===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,me.a.createElement(l,yt({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},M=void 0;if(this.hasOptions())M=d.render.map(function(t){if("group"===t.type){t.type;var o=Et(t,["type"]),a=t.key+"-heading";return me.a.createElement(n,yt({},c,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return A(e)}))}if("option"===t.type)return A(t)});else if(v){var F=b({inputValue:g});if(null===F)return null;M=me.a.createElement(u,c,F)}else{var T=S({inputValue:g});if(null===T)return null;M=me.a.createElement(s,c,T)}var P={minMenuHeight:y,maxMenuHeight:w,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:k},N=me.a.createElement(Pt,yt({},c,P),function(t){var n=t.ref,r=t.placerProps,i=r.placement,u=r.maxHeight;return me.a.createElement(o,yt({},c,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:i}),me.a.createElement(cn,{isEnabled:m,onTopArrive:j,onBottomArrive:D},me.a.createElement(sn,{isEnabled:C},me.a.createElement(a,yt({},c,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:u}),M))))});return _||"fixed"===O?me.a.createElement(i,yt({},c,{appendTo:_,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=this.state.selectValue;if(a&&!r){if(o){if(n){var u=i.map(function(t){return e.getOptionValue(t)}).join(n);return me.a.createElement("input",{name:a,type:"hidden",value:u})}var s=i.length>0?i.map(function(t,n){return me.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):me.a.createElement("input",{name:a,type:"hidden"});return me.a.createElement("div",null,s)}var l=i[0]?this.getOptionValue(i[0]):"";return me.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?me.a.createElement(Kt,{"aria-live":"assertive"},me.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),me.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,u=a.id,s=a.isDisabled,l=this.state.isFocused,c=this.commonProps=this.getCommonProps();return me.a.createElement(r,yt({},c,{className:i,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),me.a.createElement(t,yt({},c,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l}),me.a.createElement(o,yt({},c,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),me.a.createElement(n,yt({},c,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(he.Component);Tn.defaultProps=Mn;var Pn=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=jn({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(_t(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=Dn[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,yt({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&jt(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=Ot(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=Ot(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof c&&(c(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!l||!p||!m||f&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(l){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":l?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!l){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":l?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":l?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!l)return;e.focusOption("pageup");break;case"PageDown":if(!l)return;e.focusOption("pagedown");break;case"Home":if(!l)return;e.focusOption("first");break;case"End":if(!l)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Nn=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;gt(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o-1})}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.field;return o.options.length>0?wp.element.createElement(Gn,{id:t,name:n,value:this.filterValues(r),options:o.options,delimiter:o.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):wp.element.createElement(qn,null)}}]),t}(N.Component),Kn=(n(267),function(e){function t(){var e;return _()(this,t),(e=j()(this,A()(t).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(P()(P()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(P()(P()(e))),e}return F()(t,e),k()(t,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,l=u.height;"resize"!==o||s===a&&l===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"cf-oembed__preview"},wp.element.createElement("iframe",{ref:function(t){return e.iframe=t},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var e="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",t="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(e,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),n=wp.element.createElement("html",{lang:document.documentElement.lang},wp.element.createElement("head",null,wp.element.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),wp.element.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),wp.element.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:t}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(N.renderToString)(n)),this.iframe.contentWindow.document.close()}}}]),t}(N.Component)),Xn=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.embedCode,a=e.embedType,i=e.provider;return wp.element.createElement("div",{ref:this.node},wp.element.createElement(oe,{id:t,value:r,onChange:this.handleChange}),o?wp.element.createElement(Kn,{html:o,type:a,provider:i}):null,wp.element.createElement("input",{type:"hidden",name:n,value:r,readOnly:!0}))}}]),t}(N.Component),Jn=Object(x.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),Zn=Object(G.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=z()(t,2),r=n[0],o=n[1],a=Object(X.pipe)(J({onFetchEmbedCode:o}),Object(X.map)(G.toProps)),i=Object(X.pipe)(r,Object(X.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(X.merge)(a,i)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(a.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(a.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}}),Qn=Object(x.compose)(Jn,Zn)(Xn),er=(n(268),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():wp.element.createElement(qn,null)}}]),t}(N.Component)),tr=(n(269),Ve(function(e){return p()({},e,{field:p()({},e.field,{options:e.field.options.map(function(e){return p()({},e,{label:wp.element.createElement("img",{className:"cf-radio-image__image",src:e.label})})})})})})(er)),nr=function(e){function t(){var e;return _()(this,t),e=j()(this,A()(t).call(this)),l()(P()(P()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(f.isString)(t)?t:t.target.value)}),l()(P()(P()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=p()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=p()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return F()(t,e),k()(t,[{key:"componentDidMount",value:function(){this.props.visible&&(this.timer=setTimeout(this.initEditor,250))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.destroyEditor()}},{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,i=t.field,u=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":i.rich_editing},{"html-active":!i.rich_editing}],s=i.media_buttons?Object(f.template)(i.media_buttons)({id:n}):null;return wp.element.createElement("div",{id:"wp-".concat(n,"-wrap"),className:K()(u),ref:function(t){return e.editorNode=t}},i.media_buttons&&wp.element.createElement("div",{id:"wp-".concat(n,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:s}})),i.rich_editing&&wp.element.createElement("div",{className:"wp-editor-tabs"},wp.element.createElement("button",{type:"button",id:"".concat(n,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":n},Object(a.__)("Visual","carbon-fields-ui")),wp.element.createElement("button",{type:"button",id:"".concat(n,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":n},Object(a.__)("Text","carbon-fields-ui"))),wp.element.createElement("div",{id:"wp-".concat(n,"-editor-container"),className:"wp-editor-container"},wp.element.createElement("textarea",Q()({style:{width:"100%"},className:"regular-text",id:n,name:r,value:o,onChange:this.handleChange},i.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),t}(N.Component),rr=(n(270),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?wp.element.createElement("select",{id:t,name:n,value:r||Object(f.get)(o.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},o.options.map(function(e){return wp.element.createElement("option",{key:e.value,value:e.value},e.label)})):wp.element.createElement(qn,null)}}]),t}(N.Component)),or=(n(271),function(e){function t(){return _()(this,t),j()(this,A()(t).apply(this,arguments))}return F()(t,e),k()(t,[{key:"render",value:function(){return wp.element.createElement("h3",null,this.props.field.label)}}]),t}(N.Component)),ar=(n(272),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a-1}),n}return F()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?wp.element.createElement("ul",{className:"cf-set__list"},a.options.map(function(t,i){return wp.element.createElement("li",{className:"cf-set__list-item",key:i},wp.element.createElement("input",Q()({type:"checkbox",id:"".concat(n,"-").concat(t.value),name:"".concat(r,"[]"),checked:e.isChecked(o,t),value:t.value,className:"cf-set__input",onChange:e.handleChange},a.attributes)),wp.element.createElement("label",{className:"cf-set__label",htmlFor:"".concat(n,"-").concat(t.value)},t.label))})):wp.element.createElement(qn,null)}}]),t}(N.Component)),ir=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(f.some)(n,function(t){return t==e});case"NOT IN":return Object(f.every)(n,function(t){return t!=e});case"INCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),l=!1;switch(o){case"AND":l=Object(f.every)(s);break;case"OR":l=Object(f.some)(s)}l?e.showField(e.id):e.hideField(e.id)}}return Object(x.createHigherOrderComponent)(function(e){return Object(x.compose)(Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(u.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(G.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var Or=n(105),_r=n.n(Or),Cr="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function kr(){return"cf-".concat(_r()(Cr,21))}function Sr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0;l--)if(c[l]!==p[l])return!1;for(l=c.length-1;l>=0;l--)if(!b(e[s=c[l]],t[s],n,r))return!1;return!0}(e,t,n,i))}return n?e===t:e==t}function y(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&g(o,n,"Missing expected exception"+r);var i="string"==typeof r,u=!e&&o&&!n;if((!e&&a.isError(o)&&i&&w(o,n)||u)&&g(o,n,"Got unwanted exception"+r),e&&o&&n&&!w(o,n)||!e&&o)throw o}p.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=h(m(this.actual),128)+" "+this.operator+" "+h(m(this.expected),128),this.generatedMessage=!0);var t=e.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,o=d(t),a=r.indexOf("\n"+o);if(a>=0){var i=r.indexOf("\n",a+1);r=r.substring(i+1)}this.stack=r}}},a.inherits(p.AssertionError,Error),p.fail=g,p.ok=v,p.equal=function(e,t,n){e!=t&&g(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&g(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){b(e,t,!1)||g(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){b(e,t,!0)||g(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){b(e,t,!1)&&g(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,n,r){b(t,n,!0)&&g(t,n,r,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,n){e!==t&&g(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&g(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){E(!0,e,t,n)},p.doesNotThrow=function(e,t,n){E(!1,e,t,n)},p.ifError=function(e){if(e)throw e};var x=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t}}).call(this,n(31))},function(e,t,n){(function(e,r){var o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),c(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function l(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=c(e,o,r)),o}var a=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(a)return a;var i=Object.keys(n),u=function(e){var t={};return i.forEach(function(e,n){t[e]=!0}),t}();if(e.showHidden&&(i=Object.getOwnPropertyNames(n)),x(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return p(n);if(0===i.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(E(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return p(n)}var l,w="",_=!1,C=["{","}"];return d(n)&&(_=!0,C=["[","]"]),O(n)&&(w=" [Function"+(n.name?": "+n.name:"")+"]"),y(n)&&(w=" "+RegExp.prototype.toString.call(n)),E(n)&&(w=" "+Date.prototype.toUTCString.call(n)),x(n)&&(w=" "+p(n)),0!==i.length||_&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=_?function(e,t,n,r,o){for(var a=[],i=0,u=t.length;i60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,w,C)):C[0]+w+C[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,o,a){var i,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),S(r,o)||(i="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=m(n)?c(e,s.value,null):c(e,s.value,n-1)).indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),b(i)){if(a&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===_(e)}function w(e){return"object"==typeof e&&null!==e}function E(e){return w(e)&&"[object Date]"===_(e)}function x(e){return w(e)&&("[object Error]"===_(e)||e instanceof Error)}function O(e){return"function"==typeof e}function _(e){return Object.prototype.toString.call(e)}function C(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(b(a)&&(a=r.env.NODE_DEBUG||""),e=e.toUpperCase(),!i[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=r.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=h,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=w,t.isDate=E,t.isError=x,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(254);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[C((e=new Date).getHours()),C(e.getMinutes()),C(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(255),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,n(31),n(93))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){e.exports=function(e){return!(!e||"object"!=typeof e)&&("object"==typeof window&&"object"==typeof window.Node?e instanceof window.Node:"number"==typeof e.nodeType&&"string"==typeof e.nodeName)}},function(e,t,n){},function(e,t,n){},function(e,t,n){(function(t){(function(){var n,r,o,a,i,u;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-i)/1e6},r=t.hrtime,a=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})(),u=1e9*t.uptime(),i=a-u):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,n(93))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(21));var r=u(n(261)),o=u(n(264)),a=u(n(1)),i=u(n(94));function u(e){return e&&e.__esModule?e:{default:e}}function s(){return(s=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,["children","in"]),i=r.default.Children.toArray(t),u=i[0],s=i[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(a.default,o,n?r.default.cloneElement(u,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(r.default.Component);u.propTypes={};var s=u;t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var u=o(e.children),s=a(t,u);return Object.keys(s).forEach(function(o){var a=s[o];if((0,r.isValidElement)(a)){var l=o in t,c=o in u,p=t[o],f=(0,r.isValidElement)(p)&&!p.props.in;!c||l&&!f?c||!l||f?c&&l&&(0,r.isValidElement)(p)&&(s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:p.props.in,exit:i(a,"exit",e),enter:i(a,"enter",e)})):s[o]=(0,r.cloneElement)(a,{in:!1}):s[o]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:i(a,"exit",e),enter:i(a,"enter",e)})}}),s};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var u={};for(var s in t){if(o[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"MARK_AS_VALID":return Object(f.omit)(e,[t.payload.fieldId]);case"MARK_AS_INVALID":var n=t.payload,r=n.fieldId,o=n.error;return p()({},e,l()({},r,o));default:return e}},hiddenFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_FIELD":return-1===e.indexOf(t.payload.fieldId)?e:Object(f.without)(e,t.payload.fieldId);case"HIDE_FIELD":return e.indexOf(t.payload.fieldId)>-1?e:e.concat(t.payload.fieldId);default:return e}}});function h(e){return{type:"MARK_AS_VALID",payload:{fieldId:e}}}function m(e,t){return{type:"MARK_AS_INVALID",payload:{fieldId:e,error:t}}}function g(e){return{type:"SHOW_FIELD",payload:{fieldId:e}}}function v(e){return{type:"HIDE_FIELD",payload:{fieldId:e}}}function b(e,t){return e.validation[t]||null}function y(e,t){return-1===e.hiddenFields.indexOf(t)}Object(u.registerStore)("carbon-fields/core",{reducer:d,actions:r,selectors:o});var w=n(16),E=n.n(w),x=n(14),O=n(6),_=n.n(O),C=n(7),k=n.n(C),S=n(8),j=n.n(S),D=n(9),A=n.n(D),M=n(10),T=n.n(M),F=n(0),P=n.n(F),N=n(3),I=16;function L(e){return Object(x.createHigherOrderComponent)(function(t){return function(n){function r(n){var o;return _()(this,r),(o=j()(this,A()(r).call(this,n))).onHooksUpdated=o.onHooksUpdated.bind(P()(P()(o))),o.Component=Object(i.applyFilters)(e,t),o.namespace=Object(f.uniqueId)("core/with-filters/component-"),o.throttledForceUpdate=Object(f.debounce)(function(){o.Component=Object(i.applyFilters)(e,t),o.forceUpdate()},I),Object(i.addAction)("hookRemoved",o.namespace,o.onHooksUpdated),Object(i.addAction)("hookAdded",o.namespace,o.onHooksUpdated),o}return T()(r,n),k()(r,[{key:"componentWillUnmount",value:function(){this.throttledForceUpdate.cancel(),Object(i.removeAction)("hookRemoved",this.namespace),Object(i.removeAction)("hookAdded",this.namespace)}},{key:"onHooksUpdated",value:function(t){t===e&&this.throttledForceUpdate()}},{key:"render",value:function(){return wp.element.createElement(this.Component,this.props)}}]),r}(N.Component)},"withFilters")}function R(e,t){var n,r=Object(f.startCase)(e),o={};return n={},l()(n,"register".concat(r,"Type"),function(n,u){return Object(f.isString)(n)?o[n]?(console.error(Object(a.sprintf)(Object(a.__)("%1$s %2$s is already registered.","carbon-fields-ui"),r,n)),!1):u&&Object(f.isFunction)(u)?(o[n]=t.reduce(function(t,r){return p()({},t,l()({},r,Object(i.applyFilters)("carbon-fields.register-".concat(e,"-type"),n,r,u)))},{}),!0):(console.error(Object(a.__)('The "component" param must be a function.',"carbon-fields-ui")),!1):(console.error(Object(a.sprintf)(Object(a.__)("%1$s type must be a string.","carbon-fields-ui"),r)),!1)}),l()(n,"get".concat(r,"Type"),function(e,n){if(t.includes(n)){if(o[e])return o[e][n];console.error(Object(a.sprintf)(Object(a.__)("%s %s isn't registered.","carbon-fields-ui"),r,e))}else console.error(Object(a.sprintf)(Object(a.__)("The provided context isn't a valid one. Must be one of - %s .","carbon-fields-ui"),t.join(", ")))}),n}var H=R("field",["metabox","block"]),V=H.registerFieldType,B=H.getFieldType,U=n(17),z=n.n(U),W=n(32),Y=n.n(W),G=n(18),q=n(20),K=n.n(q),X=n(11),J=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:null;return new Promise(function(r,o){var i=window.jQuery.ajax({url:e,type:t,data:n});i.done(function(e){r(e)}),i.fail(function(){o(Object(a.__)("An error occured.","carbon-fields-ui"))})})},ue=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&i.length>=r.max?alert(Object(a.sprintf)(Object(a.__)("Maximum number of items reached (%s items)","carbon-fields-ui"),Number(r.max))):(u(o,E()(i).concat([Object(f.pick)(e,"id","type","subtype")])),s({selectedOptions:E()(l).concat([e])})))}),l()(P()(P()(n)),"handleRemoveItem",function(e){var t=n.props,r=t.value,o=t.id,a=t.onChange,i=t.setState,u=t.selectedOptions;a(o,Object(f.without)(r,e)),i({selectedOptions:Object(f.without)(u,e)})}),l()(P()(P()(n)),"handleSort",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),n}return T()(t,e),k()(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.fetchSelectedOptions,n=e.field,r=e.value;(0,e.setState)({options:n.options.options,totalOptionsCount:n.options.total_options}),r&&t(),this.sourceList.current.addEventListener("scroll",this.handleSourceListScroll)}},{key:"componentWillUnmount",value:function(){this.sourceList.current.removeEventListener("scroll",this.handleSourceListScroll)}},{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.value,o=t.field,i=t.totalOptionsCount,u=t.selectedOptions,s=t.queryTerm,l=t.isLoading,c=this.props.options;return o.duplicates_allowed||(c=Y()(c,function(e){e.map(function(e){return e.disabled=!!Object(f.find)(r,function(t){return Object(f.isMatch)(t,{id:e.id,type:e.type,subtype:e.subtype})}),e})})),wp.element.createElement(N.Fragment,null,wp.element.createElement("div",{className:"cf-association__bar"},wp.element.createElement(oe,{value:s,onChange:this.handleSearchChange}),l?wp.element.createElement("span",{className:"cf-association__spinner spinner is-active"}):"",wp.element.createElement("span",{className:"cf-association__counter"},Object(a.sprintf)(Object(a.__)("Showing %1$d of %2$d results","carbon-fields-ui"),Number(c.length),Number(i)))),wp.element.createElement("div",{className:"cf-association__cols"},wp.element.createElement("div",{className:"cf-association__col",ref:this.sourceList},c.map(function(t,n){return wp.element.createElement("div",{className:K()("cf-association__option",{"cf-association__option--selected":t.disabled}),key:n},t.thumbnail&&wp.element.createElement("img",{className:"cf-association__option-thumb",src:t.thumbnail}),wp.element.createElement("div",{className:"cf-association__option-content"},wp.element.createElement("span",{className:"cf-association__option-title"},wp.element.createElement("span",{className:"cf-association__option-title-inner"},t.title)),wp.element.createElement("span",{className:"cf-association__option-type"},t.type)),wp.element.createElement("div",{className:"cf-association__option-actions"},wp.element.createElement("a",{className:"cf-association__option-action cf-association__option-action--edit dashicons dashicons-edit",href:t.edit_link.replace("&","&","g"),target:"_blank",rel:"noopener noreferrer"}),!t.disabled&&(o.max<0||r.length0&&t.length=0||(o[n]=e[n]);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,["excludeScrollbar"]));return e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(he.createElement)(e,n)},a}(he.Component),n.displayName="OnClickOutside("+(e.displayName||e.name||"Component")+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},r},Se=ke(function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a1?n.setState(function(e){return{menuVisible:!e.menuVisible}}):r(t[0])}),l()(P()(P()(n)),"handleItemClick",function(e){n.setState({menuVisible:!1}),n.props.onSelect(e)}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.buttonText,r=t.groups;return wp.element.createElement("div",{className:"cf-complex__inserter"},wp.element.createElement("button",{type:"button",className:"button cf-complex__inserter-button",onClick:this.handleAddClick},n),r.length>1&&wp.element.createElement("ul",{className:"cf-complex__inserter-menu",hidden:!this.state.menuVisible},r.map(function(t,n){return wp.element.createElement("li",{className:"cf-complex__inserter-item",key:n,onClick:function(){return e.handleItemClick(t)}},t.label)})))}}]),t}(N.Component)),Ie=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?u-1:1;n.setState({currentTab:Object(f.get)(r,"".concat(s,".").concat(o),null)})}a(i)}),l()(P()(P()(n)),"handleToggleAllClick",function(){var e=n.props,t=e.allGroupsAreCollapsed;(0,e.onToggleAllGroups)(!t)}),l()(P()(P()(n)),"handleGroupsSortStart",function(e,t){var r=n.props,o=r.value,a=r.groupIdKey,i=t.item.index(),u=Object(f.get)(o,"".concat(i,".").concat(a),null);n.setState({currentDraggedGroup:u})}),l()(P()(P()(n)),"handleGroupsSortUpdate",function(e){var t=n.props,r=t.id;(0,t.onChange)(r,e)}),l()(P()(P()(n)),"handleGroupsSortStop",function(){n.setState({currentDraggedGroup:null})}),l()(P()(P()(n)),"handleTabsChange",function(e){n.setState({currentTab:e})}),n}return T()(t,e),k()(t,[{key:"findGroup",value:function(e){var t=this.props,n=t.value,r=t.groupIdKey;return Object(f.find)(n,[r,e])}},{key:"getAvailableGroups",value:function(e){var t=this.props,n=t.field,r=t.value;if(n.duplicate_groups_allowed)return n.groups;var o=r.map(function(t){return t[e]});return n.groups.filter(function(e){var t=e.name;return-1===o.indexOf(t)})}},{key:"getGroupLabels",value:function(){var e=this.props,t=e.field;return e.groupValues.map(function(e,n){var r=z()(e,2),o=r[0],i=r[1],u=Object(f.find)(t.groups,["name",o]);if(!u)return"N/A";if(!Object(f.isString)(u.label_template))return u.label;try{return Object(f.template)(u.label_template)(p()({$_index:n},i))||u.label}catch(e){return console.error(Object(a.sprintf)(Object(a.__)("Couldn't create the label of group - %s","carbon-fields-ui"),e.message)),"N/A"}})}},{key:"render",value:function(){var e=this,t=this.state,n=t.currentDraggedGroup,r=t.currentTab,o=this.props,i=o.value,u=o.field,s=o.groupIdKey,l=o.groupFilterKey,c=o.allGroupsAreCollapsed,p=o.onGroupSetup,f=o.onGroupFieldSetup,d=o.onToggleGroup,h=this.getAvailableGroups(l),m=this.getGroupLabels(),g=i.map(function(e,t){return{id:e[s],label:m[t]}});return wp.element.createElement(N.Fragment,null,this.isTabbed&&!!i.length&&wp.element.createElement(ae,{items:i,forwardedRef:this.tabsList,options:{axis:"tabbed-vertical"===u.layout?"y":"x",forcePlaceholderSize:!0},onUpdate:this.handleGroupsSortUpdate},wp.element.createElement(Pe,{ref:this.tabsList,items:g,current:r,layout:u.layout,onChange:this.handleTabsChange},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Ne,{buttonText:"+",groups:h,onSelect:this.handleAddGroup}))),!i.length&&wp.element.createElement(Le,{label:"There are no entries yet."},wp.element.createElement(Ne,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup})),!!i.length&&wp.element.createElement(ae,{items:i,options:{helper:"clone",handle:".cf-complex__group-head",placeholder:"cf-complex__group-placeholder",forceHelperSize:!0,forcePlaceholderSize:!0},forwardedRef:this.groupsList,onStart:this.handleGroupsSortStart,onUpdate:this.handleGroupsSortUpdate,onStop:this.handleGroupsSortStop},wp.element.createElement("div",{className:"cf-complex__groups",ref:this.groupsList},i.map(function(t,o){return wp.element.createElement(Ie,Q()({key:"".concat(t[l],"-").concat(o)},p(t,{index:o,label:m[o],dragged:t[s]===n,tabbed:e.isTabbed,hidden:e.isTabbed&&t[s]!==r,allowClone:u.duplicate_groups_allowed&&!e.isMaximumReached,onFieldSetup:f,onClone:e.handleCloneGroup,onRemove:e.handleRemoveGroup,onToggle:d})))}))),!this.isTabbed&&!!i.length&&wp.element.createElement("div",{className:"cf-complex__actions"},!!h.length&&!this.isMaximumReached&&wp.element.createElement(Ne,{buttonText:this.inserterButtonText,groups:h,onSelect:this.handleAddGroup}),wp.element.createElement("button",{type:"button",className:"button cf-complex__toggler",onClick:this.handleToggleAllClick},c?Object(a.__)("Expand All","carbon-fields-ui"):Object(a.__)("Collapse All","carbon-fields-ui"))))}},{key:"isTabbed",get:function(){return this.props.field.layout.indexOf("tabbed")>-1}},{key:"isMaximumReached",get:function(){var e=this.props,t=e.field,n=e.value;return t.max>0&&n.length>=t.max}},{key:"inserterButtonText",get:function(){var e=this.props.field;return Object(a.sprintf)(Object(a.__)("Add %s","carbon-fields-ui"),e.labels.singular_name)}}]),t}(N.Component);Object(i.addFilter)("carbon-fields.field-wrapper","carbon-fields/core",function(e){return function(t){var n=t.field;return"complex"!==n.type?wp.element.createElement(e,t):wp.element.createElement(e,Q()({className:"cf-complex--".concat(n.layout)},t))}}),Object(i.addFilter)("carbon-fields.complex.validate","carbon-fields/core",function(e,t){var n=e.min,r=e.labels;if(e.required&&Object(f.isEmpty)(t))return Object(a.__)("This field is required.","carbon-fields-ui");if(n>0&&t.length=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},xt=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},Ot=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},_t=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t-1}function Dt(e){return jt(e)?window.pageYOffset:e.scrollTop}function At(e,t){jt(e)?window.scrollTo(0,t):e.scrollTop=t}function Mt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ct,o=Dt(e),a=t-o,i=0;!function t(){var u,s=a*((u=(u=i+=10)/n-1)*u*u+1)+o;At(e,s),i=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!i)return a&&Mt(s,_,160),{placement:"bottom",maxHeight:t};if(!i&&O>=r||i&&E>=r)return a&&Mt(s,_,160),{placement:"bottom",maxHeight:i?E-b:O-b};if("auto"===o||i){var k=t;return(!i&&x>=r||i&&w>=r)&&(k=i?w-b-u.controlHeight:x-b-u.controlHeight),{placement:"top",maxHeight:k}}if("bottom"===o)return At(s,_),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(x>=d&&!i)return a&&Mt(s,C,160),{placement:"top",maxHeight:t};if(!i&&x>=r||i&&w>=r){var S=t;return(!i&&x>=r||i&&w>=r)&&(S=i?w-y:x-y),a&&Mt(s,C,160),{placement:"top",maxHeight:S}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'+o+'".')}return l}({maxHeight:o,menuEl:e,minHeight:n,placement:a,shouldScroll:u&&!c,isFixedPosition:c,theme:s});l&&l(p),r.setState(p)}},r.getUpdatedProps=function(){var e=r.props.menuPlacement,t=r.state.placement||Ft(e);return yt({},r.props,{placement:t,maxHeight:r.state.maxHeight})},xt(r,n)}return wt(t,e),vt(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(he.Component);Pt.contextTypes={getPortalPlacement:lt.a.func};var Nt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:2*n+"px "+3*n+"px",textAlign:"center"}},It=Nt,Lt=Nt,Rt=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",yt({className:r(Object(ut.a)(o("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};Rt.defaultProps={children:"No options"};var Ht=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",yt({className:r(Object(ut.a)(o("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};Ht.defaultProps={children:"Loading..."};var Vt=function(e){function t(){var e,n,r;gt(this,t);for(var o=arguments.length,a=Array(o),i=0;i0,h=c-p-l,m=!1;h>t&&r.isBottom&&(a&&a(e),r.isBottom=!1),d&&r.isTop&&(u&&u(e),r.isTop=!1),d&&t>h?(o&&!r.isBottom&&o(e),f.scrollTop=c,m=!0,r.isBottom=!0):!d&&-t>l&&(i&&!r.isTop&&i(e),f.scrollTop=0,m=!0,r.isTop=!0),m&&r.cancelScroll(e)},r.onWheel=function(e){r.handleEventDelta(e,e.deltaY)},r.onTouchStart=function(e){r.touchStart=e.changedTouches[0].clientY},r.onTouchMove=function(e){var t=r.touchStart-e.changedTouches[0].clientY;r.handleEventDelta(e,t)},r.getScrollTarget=function(e){r.scrollTarget=e},xt(r,n)}return wt(t,e),vt(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return me.a.createElement(Jt,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(he.Component),cn=function(e){function t(){return gt(this,t),xt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return wt(t,e),vt(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=Et(e,["isEnabled"]);return t?me.a.createElement(ln,n):this.props.children}}]),t}(he.Component);cn.defaultProps={isEnabled:!0};var pn=function(e){function t(){return gt(this,t),xt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return wt(t,e),vt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.cx,o=e.isMulti,a=e.getStyles,i=e.hasValue;return me.a.createElement("div",{className:r(Object(ut.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":i},n)},t)}}]),t}(he.Component),fn=function(e){var t=e.size,n=Et(e,["size"]);return me.a.createElement("svg",yt({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:Object(ut.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},dn=function(e){return me.a.createElement(fn,yt({size:20},e),me.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},hn=function(e){return me.a.createElement(fn,yt({size:20},e),me.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},mn=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},gn=mn,vn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",yt({},a,{className:r(Object(ut.a)(o("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t)};vn.defaultProps={children:me.a.createElement(hn,null)};var bn=mn,yn=function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",yt({},a,{className:r(Object(ut.a)(o("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t)};yn.defaultProps={children:me.a.createElement(dn,null)};var wn=function(e){var t=e.color,n=e.delay,r=e.offset;return me.a.createElement("span",{className:Object(ut.a)({animationDuration:"1s",animationDelay:n+"ms",animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})};Object(ut.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};");var En=function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps,a=e.isFocused,i=e.isRtl,u=e.theme.colors,s=a?u.neutral80:u.neutral20;return me.a.createElement("div",yt({},o,{className:n(Object(ut.a)(r("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),me.a.createElement(wn,{color:s,delay:0,offset:i}),me.a.createElement(wn,{color:s,delay:160,offset:!0}),me.a.createElement(wn,{color:s,delay:320,offset:!i}))};En.defaultProps={size:4};var xn=function(e){var t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)},On=xn,_n=xn,Cn=function(e){function t(){return gt(this,t),xt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return wt(t,e),vt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return me.a.createElement("div",n,t)}}]),t}(he.Component);Cn.defaultProps={children:me.a.createElement(dn,{size:14})};var kn=function(e){function t(){return gt(this,t),xt(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return wt(t,e),vt(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.components,o=e.cx,a=e.data,i=e.getStyles,u=e.innerProps,s=e.isDisabled,l=e.removeProps,c=e.selectProps,p=r.Container,f=r.Label,d=r.Remove,h=yt({className:o(Object(ut.a)(i("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":s},n)},u),m={className:o(Object(ut.a)(i("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=yt({className:o(Object(ut.a)(i("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},l);return me.a.createElement(p,{data:a,innerProps:h,selectProps:c},me.a.createElement(f,{data:a,innerProps:m,selectProps:c},t),me.a.createElement(d,{data:a,innerProps:g,selectProps:c}))}}]),t}(he.Component);kn.defaultProps={cropWithEllipsis:!0};var Sn={ClearIndicator:yn,Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.className,a=e.isDisabled,i=e.isFocused,u=e.innerRef,s=e.innerProps;return me.a.createElement("div",yt({ref:u,className:n(Object(ut.a)(r("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":i},o)},s),t)},DropdownIndicator:vn,DownChevron:hn,CrossIcon:dn,Group:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.Heading,i=e.headingProps,u=e.label,s=e.theme;return me.a.createElement("div",{className:r(Object(ut.a)(o("group",e)),{group:!0},n)},me.a.createElement(a,yt({},i,{theme:s,getStyles:o,cx:r}),u),me.a.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.theme,a=Et(e,["className","cx","getStyles","theme"]);return me.a.createElement("div",yt({className:n(Object(ut.a)(r("groupHeading",yt({theme:o},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles;return me.a.createElement("div",{className:r(Object(ut.a)(o("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerProps;return me.a.createElement("span",yt({},o,{className:n(Object(ut.a)(r("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,o=e.innerRef,a=e.isHidden,i=e.isDisabled,u=e.theme,s=Et(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme"]);return me.a.createElement("div",{className:Object(ut.a)(r("input",yt({theme:u},s)))},me.a.createElement(pt.a,yt({className:n(null,{input:!0},t),inputRef:o,inputStyle:{background:0,border:0,fontSize:"inherit",opacity:a?0:1,outline:0,padding:0,color:"inherit"},disabled:i},s)))},LoadingIndicator:En,Menu:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerRef,i=e.innerProps,u=r(Object(ut.a)(o("menu",e)),{menu:!0},n);return me.a.createElement("div",yt({className:u},i,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isMulti,i=e.innerRef;return me.a.createElement("div",{className:r(Object(ut.a)(o("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:i},t)},MenuPortal:Vt,LoadingMessage:Ht,NoOptionsMessage:Rt,MultiValue:kn,MultiValueContainer:On,MultiValueLabel:_n,MultiValueRemove:Cn,Option:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.isFocused,u=e.isSelected,s=e.innerRef,l=e.innerProps;return me.a.createElement("div",yt({ref:s,className:r(Object(ut.a)(o("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":i,"option--is-selected":u},n)},l),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps;return me.a.createElement("div",yt({className:r(Object(ut.a)(o("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.innerProps,i=e.isDisabled,u=e.isRtl;return me.a.createElement("div",yt({className:r(Object(ut.a)(o("container",e)),{"--is-disabled":i,"--is-rtl":u},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,o=e.getStyles,a=e.isDisabled,i=e.innerProps;return me.a.createElement("div",yt({className:r(Object(ut.a)(o("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},i),t)},ValueContainer:pn},jn=function(e){return yt({},Sn,e.components)},Dn={clearIndicator:bn,container:function(e){var t=e.isDisabled;return{direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,a=r.borderRadius,i=r.spacing;return{alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px "+o.primary:null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},dropdownIndicator:gn,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,a=r.spacing.baseUnit;return{color:t?o.neutral60:o.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Lt,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,a=r.spacing,i=r.colors;return bt(t={},n?{bottom:"top",top:"bottom"}[n]:"bottom","100%"),bt(t,"backgroundColor",i.neutral0),bt(t,"borderRadius",o),bt(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),bt(t,"marginBottom",a.menuGutter),bt(t,"marginTop",a.menuGutter),bt(t,"position","absolute"),bt(t,"width","100%"),bt(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},noOptionsMessage:It,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,a=o.spacing,i=o.colors;return{backgroundColor:r?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:r?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:2*a.baseUnit+"px "+3*a.baseUnit+"px",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:r?i.primary:i.primary50}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - "+2*r.baseUnit+"px)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:t.baseUnit/2+"px "+2*t.baseUnit+"px",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},An={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Mn={backspaceRemovesValue:!0,blurInputOnSelect:Tt(),captureMenuScroll:!Tt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=yt({ignoreCase:!0,ignoreAccents:!0,stringify:$t,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,u=n.matchFrom,s=i?qt(t):t,l=i?qt(a(e)):a(e);return r&&(s=s.toLowerCase(),l=l.toLowerCase()),o&&(s=Gt(s),l=Gt(l)),"start"===u?l.substr(0,s.length)===s:l.indexOf(s)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return t+" result"+(1!==t?"s":"")+" available"},styles:{},tabIndex:"0",tabSelectsValue:!0},Tn=1,Fn=function(e){function t(e){gt(this,t);var n=xt(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));Pn.call(n);var r=e.value;n.cacheComponents=dt(n.cacheComponents,Wt).bind(n),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++Tn);var o=St(r),a=n.buildMenuOptions(e,o);return n.state.menuOptions=a,n.state.selectValue=o,n}return wt(t,e),vt(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var a=St(e.value),i=this.buildMenuOptions(e,a),u=this.getNextFocusedValue(a),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:a,focusedOption:s,focusedValue:u})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,r,o,a,i=this.props,u=i.isDisabled,s=i.menuIsOpen,l=this.state.isFocused;(l&&!u&&e.isDisabled||l&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=n.offsetHeight/3,o.bottom+a>r.bottom?At(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):o.top-a-1&&(a=i)}this.scrollToFocusedOptionOnUpdate=!0,this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,a=o.selectValue,i=o.focusedValue;if(n){this.setState({focusedOption:null});var u=a.indexOf(i);i||(u=-1,this.announceAriaLiveContext({event:"value"}));var s=a.length-1,l=-1;if(a.length){switch(e){case"previous":l=0===u?0:-1===u?s:u-1;break;case"next":u>-1&&u0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions.focusable;if(o.length){var a=0,i=o.indexOf(r);r||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=i>0?i-1:o.length-1:"down"===e?a=(i+1)%o.length:"pageup"===e?(a=i-t)<0&&(a=0):"pagedown"===e?(a=i+t)>o.length-1&&(a=o.length-1):"last"===e&&(a=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(An):yt({},An,this.props.theme):An}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,a=o.classNamePrefix,i=o.isMulti,u=o.isRtl,s=o.options,l=this.state.selectValue,c=this.hasValue();return{cx:function(e,t,n,r){var o=[t,r];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&o.push(""+kt(e,a));return o.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return l},hasValue:c,isMulti:i,isRtl:u,options:s,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue.indexOf(n);if(r>-1){if(e.indexOf(n)>-1)return n;if(r-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,a=e.options,i=function(e,r){var a=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),u=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:u,value:s,data:e},o))){var l=a?void 0:function(){return n.onOptionHover(e)},c=a?void 0:function(){return n.selectOption(e)},p=n.getElementId("option")+"-"+r;return{innerProps:{id:p,onClick:c,onMouseMove:l,onMouseOver:l,role:"option",tabIndex:-1},data:e,isDisabled:a,isSelected:i,key:p,label:u,type:"option",value:s}}};return a.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options.map(function(t,n){var o=i(t,r+"-"+n);return o&&!o.isDisabled&&e.focusable.push(t),o}).filter(Boolean);if(o.length){var a=n.getElementId("group")+"-"+r;e.render.push({type:"group",key:a,data:t,options:o})}}else{var u=i(t,""+r);u&&(e.render.push(u),u.isDisabled||e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,a=this.props,i=a.options,u=a.menuIsOpen,s=a.inputValue,l=a.screenReaderStatus;return(r?function(e){var t=e.focusedValue,n=e.selectValue;return"value "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"")+" "+(o&&u?function(e){var t=e.focusedOption,n=e.options;return"option "+(0,e.getOptionLabel)(t)+" focused, "+(n.indexOf(t)+1)+" of "+n.length+"."}({focusedOption:o,getOptionLabel:this.getOptionLabel,options:i}):"")+" "+function(e){var t=e.inputValue;return e.screenReaderMessage+(t?" for search term "+t:"")+"."}({inputValue:s,screenReaderMessage:l({count:this.countOptions()})})+" "+t}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=this.components.Input,u=this.state.inputIsHidden,s=r||this.getElementId("input");if(!n)return me.a.createElement(Xt,{id:s,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ct,onFocus:this.onInputFocus,readOnly:!0,tabIndex:a,value:""});var l={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},c=this.commonProps,p=c.cx,f=c.theme;return me.a.createElement(i,yt({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:s,innerRef:this.getInputRef,isDisabled:t,isHidden:u,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,theme:f,type:"text",value:o},l))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,u=t.Placeholder,s=this.commonProps,l=this.props,c=l.controlShouldRenderValue,p=l.isDisabled,f=l.isMulti,d=l.inputValue,h=l.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue;if(!this.hasValue()||!c)return d?null:me.a.createElement(u,yt({},s,{key:"placeholder",isDisabled:p}),h);if(f)return g.map(function(t){var i=t===v;return me.a.createElement(n,yt({},s,{components:{Container:r,Label:o,Remove:a},isFocused:i,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))});if(d)return null;var b=g[0];return me.a.createElement(i,yt({},s,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,yt({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?me.a.createElement(e,yt({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return me.a.createElement(n,yt({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return me.a.createElement(e,yt({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,u=t.LoadingMessage,s=t.NoOptionsMessage,l=t.Option,c=this.commonProps,p=this.state,f=p.focusedOption,d=p.menuOptions,h=this.props,m=h.captureMenuScroll,g=h.inputValue,v=h.isLoading,b=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,E=h.menuIsOpen,x=h.menuPlacement,O=h.menuPosition,_=h.menuPortalTarget,C=h.menuShouldBlockScroll,k=h.menuShouldScrollIntoView,S=h.noOptionsMessage,j=h.onMenuScrollToTop,D=h.onMenuScrollToBottom;if(!E)return null;var A=function(t){var n=f===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,me.a.createElement(l,yt({},c,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))},M=void 0;if(this.hasOptions())M=d.render.map(function(t){if("group"===t.type){t.type;var o=Et(t,["type"]),a=t.key+"-heading";return me.a.createElement(n,yt({},c,o,{Heading:r,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return A(e)}))}if("option"===t.type)return A(t)});else if(v){var T=b({inputValue:g});if(null===T)return null;M=me.a.createElement(u,c,T)}else{var F=S({inputValue:g});if(null===F)return null;M=me.a.createElement(s,c,F)}var P={minMenuHeight:y,maxMenuHeight:w,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:k},N=me.a.createElement(Pt,yt({},c,P),function(t){var n=t.ref,r=t.placerProps,i=r.placement,u=r.maxHeight;return me.a.createElement(o,yt({},c,P,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:i}),me.a.createElement(cn,{isEnabled:m,onTopArrive:j,onBottomArrive:D},me.a.createElement(sn,{isEnabled:C},me.a.createElement(a,yt({},c,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:u}),M))))});return _||"fixed"===O?me.a.createElement(i,yt({},c,{appendTo:_,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),N):N}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=this.state.selectValue;if(a&&!r){if(o){if(n){var u=i.map(function(t){return e.getOptionValue(t)}).join(n);return me.a.createElement("input",{name:a,type:"hidden",value:u})}var s=i.length>0?i.map(function(t,n){return me.a.createElement("input",{key:"i-"+n,name:a,type:"hidden",value:e.getOptionValue(t)})}):me.a.createElement("input",{name:a,type:"hidden"});return me.a.createElement("div",null,s)}var l=i[0]?this.getOptionValue(i[0]):"";return me.a.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?me.a.createElement(Kt,{"aria-live":"assertive"},me.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),me.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,u=a.id,s=a.isDisabled,l=this.state.isFocused,c=this.commonProps=this.getCommonProps();return me.a.createElement(r,yt({},c,{className:i,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),me.a.createElement(t,yt({},c,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l}),me.a.createElement(o,yt({},c,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),me.a.createElement(n,yt({},c,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(he.Component);Fn.defaultProps=Mn;var Pn=function(){var e=this;this.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,isComposing:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},this.blockOptionHover=!1,this.clearFocusValueOnUpdate=!1,this.hasGroups=!1,this.initialTouchX=0,this.initialTouchY=0,this.instancePrefix="",this.openAfterFocus=!1,this.scrollToFocusedOptionOnUpdate=!1,this.controlRef=null,this.getControlRef=function(t){e.controlRef=t},this.focusedOptionRef=null,this.getFocusedOptionRef=function(t){e.focusedOptionRef=t},this.menuListRef=null,this.getMenuListRef=function(t){e.menuListRef=t},this.inputRef=null,this.getInputRef=function(t){e.inputRef=t},this.cacheComponents=function(t){e.components=jn({components:t})},this.focus=this.focusInput,this.blur=this.blurInput,this.setValue=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments[2],o=e.props,a=o.closeMenuOnSelect,i=o.isMulti,u=o.onChange;e.onInputChange("",{action:"set-value"}),a&&(e.inputIsHiddenAfterUpdate=!i,e.onMenuClose()),e.clearFocusValueOnUpdate=!0,u(t,{action:n,option:r})},this.selectOption=function(t){var n=e.props,r=n.blurInputOnSelect;if(n.isMulti){var o=e.state.selectValue;if(e.isOptionSelected(t,o)){var a=e.getOptionValue(t);e.setValue(o.filter(function(t){return e.getOptionValue(t)!==a}),"deselect-option",t),e.announceAriaLiveSelection({event:"deselect-option",context:{value:e.getOptionLabel(t)}})}else e.setValue([].concat(_t(o),[t]),"select-option",t),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}})}else e.setValue(t,"select-option"),e.announceAriaLiveSelection({event:"select-option",context:{value:e.getOptionLabel(t)}});r&&e.blurInput()},this.removeValue=function(t){var n=e.props.onChange,r=e.state.selectValue,o=e.getOptionValue(t);n(r.filter(function(t){return e.getOptionValue(t)!==o}),{action:"remove-value",removedValue:t}),e.announceAriaLiveSelection({event:"remove-value",context:{value:t?e.getOptionLabel(t):void 0}}),e.focusInput()},this.clearValue=function(){var t=e.props,n=t.isMulti;(0,t.onChange)(n?[]:null,{action:"clear"})},this.popValue=function(){var t=e.props.onChange,n=e.state.selectValue,r=n[n.length-1];e.announceAriaLiveSelection({event:"pop-value",context:{value:r?e.getOptionLabel(r):void 0}}),t(n.slice(0,n.length-1),{action:"pop-value",removedValue:r})},this.getOptionLabel=function(t){return e.props.getOptionLabel(t)},this.getOptionValue=function(t){return e.props.getOptionValue(t)},this.getStyles=function(t,n){var r=Dn[t](n);r.boxSizing="border-box";var o=e.props.styles[t];return o?o(r,n):r},this.getElementId=function(t){return e.instancePrefix+"-"+t},this.getActiveDescendentId=function(){var t=e.props.menuIsOpen,n=e.state,r=n.menuOptions,o=n.focusedOption;if(o&&t){var a=r.focusable.indexOf(o),i=r.render[a];return i&&i.key}},this.announceAriaLiveSelection=function(t){var n=t.event,r=t.context;e.setState({ariaLiveSelection:function(e,t){var n=r.value;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option "+n+", deselected.";case"select-option":return"option "+n+", selected."}}(n)})},this.announceAriaLiveContext=function(t){var n=t.event,r=t.context;e.setState({ariaLiveContext:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label;switch(e){case"menu":return"Use Up and Down to choose options, press Backspace to select the currently focused option, press Escape to exit the menu, press Tab to select the option and exit the menu.";case"input":return(o||"Select")+" is focused "+(n?",type to refine list":"")+", press Down to open the menu, "+(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Enter to remove the currently focused value"}}(n,yt({},r,{label:e.props["aria-label"]}))})},this.onMenuMouseDown=function(t){0===t.button&&(t.stopPropagation(),t.preventDefault(),e.focusInput())},this.onMenuMouseMove=function(t){e.blockOptionHover=!1},this.onControlMouseDown=function(t){var n=e.props.openMenuOnClick;e.state.isFocused?e.props.menuIsOpen?e.onMenuClose():e.openMenu("first"):(n&&(e.openAfterFocus=!0),e.focusInput()),"INPUT"!==t.target.tagName&&t.preventDefault()},this.onDropdownIndicatorMouseDown=function(t){if(!(t&&"mousedown"===t.type&&0!==t.button||e.props.isDisabled)){var n=e.props,r=n.isMulti,o=n.menuIsOpen;e.focusInput(),o?(e.inputIsHiddenAfterUpdate=!r,e.onMenuClose()):e.openMenu("first"),t.preventDefault(),t.stopPropagation()}},this.onClearIndicatorMouseDown=function(t){t&&"mousedown"===t.type&&0!==t.button||(e.clearValue(),t.stopPropagation(),e.openAfterFocus=!1,setTimeout(function(){return e.focusInput()}))},this.onScroll=function(t){"boolean"==typeof e.props.closeMenuOnScroll?t.target instanceof HTMLElement&&jt(t.target)&&e.props.onMenuClose():"function"==typeof e.props.closeMenuOnScroll&&e.props.closeMenuOnScroll(t)&&e.props.onMenuClose()},this.onCompositionStart=function(){e.setState({isComposing:!0})},this.onCompositionEnd=function(){e.setState({isComposing:!1})},this.onTouchStart=function(t){var n=Ot(t.touches,1)[0];e.initialTouchX=n.clientX,e.initialTouchY=n.clientY,e.userIsDragging=!1},this.onTouchMove=function(t){var n=Ot(t.touches,1)[0],r=Math.abs(n.clientX-e.initialTouchX),o=Math.abs(n.clientY-e.initialTouchY);e.userIsDragging=r>5||o>5},this.onTouchEnd=function(t){if(!e.userIsDragging){var n=t.target;e.controlRef&&!e.controlRef.contains(n)&&e.menuListRef&&!e.menuListRef.contains(n)&&e.blurInput(),e.initialTouchX=0,e.initialTouchY=0}},this.onControlTouchEnd=function(t){e.userIsDragging||e.onControlMouseDown(t)},this.onClearIndicatorTouchEnd=function(t){e.userIsDragging||e.onClearIndicatorMouseDown(t)},this.onDropdownIndicatorTouchEnd=function(t){e.userIsDragging||e.onDropdownIndicatorMouseDown(t)},this.handleInputChange=function(t){var n=t.currentTarget.value;e.inputIsHiddenAfterUpdate=!1,e.onInputChange(n,{action:"input-change"}),e.onMenuOpen()},this.onInputFocus=function(t){var n=e.props,r=n.isSearchable,o=n.isMulti;e.props.onFocus&&e.props.onFocus(t),e.inputIsHiddenAfterUpdate=!1,e.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:o}}),e.setState({isFocused:!0}),(e.openAfterFocus||e.props.openMenuOnFocus)&&e.openMenu("first"),e.openAfterFocus=!1},this.onInputBlur=function(t){e.props.onBlur&&e.props.onBlur(t),e.onInputChange("",{action:"input-blur"}),e.onMenuClose(),e.setState({focusedValue:null,isFocused:!1})},this.onOptionHover=function(t){e.blockOptionHover||e.state.focusedOption===t||e.setState({focusedOption:t})},this.shouldHideSelectedOptions=function(){var t=e.props,n=t.hideSelectedOptions,r=t.isMulti;return void 0===n?r:n},this.onKeyDown=function(t){var n=e.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,u=n.isClearable,s=n.isDisabled,l=n.menuIsOpen,c=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=e.state,h=d.isComposing,m=d.focusedOption,g=d.focusedValue,v=d.selectValue;if(!(s||"function"==typeof c&&(c(t),t.defaultPrevented))){switch(e.blockOptionHover=!0,t.key){case"ArrowLeft":if(!r||i)return;e.focusValue("previous");break;case"ArrowRight":if(!r||i)return;e.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(g)e.removeValue(g);else{if(!o)return;e.popValue()}break;case"Tab":if(t.shiftKey||!l||!p||!m||f&&e.isOptionSelected(m,v))return;e.selectOption(m);break;case"Enter":if(l){if(!m)return;if(h)return;e.selectOption(m)}else e.focusOption("first");break;case"Escape":l?(e.inputIsHiddenAfterUpdate=!1,e.onInputChange("",{action:"menu-close"}),e.onMenuClose()):u&&a&&e.clearValue();break;case" ":if(i)return;if(!l){e.openMenu("first");break}if(!m)return;e.selectOption(m);break;case"ArrowUp":l?e.focusOption("up"):e.openMenu("last");break;case"ArrowDown":l?e.focusOption("down"):e.openMenu("first");break;case"PageUp":if(!l)return;e.focusOption("pageup");break;case"PageDown":if(!l)return;e.focusOption("pagedown");break;case"Home":if(!l)return;e.focusOption("first");break;case"End":if(!l)return;e.focusOption("last");break;default:return}t.preventDefault()}}},Nn=function(e){var t,n;return n=t=function(t){function n(){var e,t,r;gt(this,n);for(var o=arguments.length,a=Array(o),i=0;i1?n-1:0),o=1;o-1})}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.field;return o.options.length>0?wp.element.createElement(Gn,{id:t,name:n,value:this.filterValues(r),options:o.options,delimiter:o.valueDelimiter,onChange:this.handleChange,className:"cf-multiselect__select",classNamePrefix:"cf-multiselect",isMulti:!0}):wp.element.createElement(qn,null)}}]),t}(N.Component),Kn=(n(267),function(e){function t(){var e;return _()(this,t),(e=j()(this,A()(t).apply(this,arguments))).state={width:0,height:0},e.renderIframe=e.renderIframe.bind(P()(P()(e))),e.checkMessageForResize=e.checkMessageForResize.bind(P()(P()(e))),e}return T()(t,e),k()(t,[{key:"isFrameAccessible",value:function(){try{return!!this.iframe.contentDocument.body}catch(e){return!1}}},{key:"componentDidMount",value:function(){window.addEventListener("message",this.checkMessageForResize,!1),this.renderIframe()}},{key:"componentDidUpdate",value:function(){this.renderIframe()}},{key:"checkMessageForResize",value:function(e){var t=this.iframe,n=e.data||{};if("string"==typeof n)try{n=JSON.parse(n)}catch(e){}if(t&&t.contentWindow===e.source){var r=n,o=r.action,a=r.width,i=r.height,u=this.state,s=u.width,l=u.height;"resize"!==o||s===a&&l===i||this.setState({width:a,height:i})}}},{key:"render",value:function(){var e=this;return wp.element.createElement("div",{className:"cf-oembed__preview"},wp.element.createElement("iframe",{ref:function(t){return e.iframe=t},scrolling:"no",className:"cf-oembed__frame",onLoad:this.renderIframe,width:Math.ceil(this.state.width),height:Math.ceil(this.state.height)}))}},{key:"renderIframe",value:function(){if(this.isFrameAccessible()&&null===this.iframe.contentDocument.body.getAttribute("data-resizable-iframe-connected")){var e="video"===this.props.type?"clientBoundingRect.width / 16 * 9":"clientBoundingRect.height",t="\n\t\t\t( function() {\n\t\t\t\tvar observer;\n\n\t\t\t\tif ( ! window.MutationObserver || ! document.body || ! window.parent ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction sendResize() {\n\t\t\t\t\tvar clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t\t\twindow.parent.postMessage( {\n\t\t\t\t\t\taction: 'resize',\n\t\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\t\theight: ".concat(e,"\n\t\t\t\t\t}, '*' );\n\t\t\t\t}\n\n\t\t\t\tobserver = new MutationObserver( sendResize );\n\t\t\t\tobserver.observe( document.body, {\n\t\t\t\t\tattributes: true,\n\t\t\t\t\tattributeOldValue: false,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t\tcharacterDataOldValue: false,\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true\n\t\t\t\t} );\n\n\t\t\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t\t\t// the iframe root and interfere with our mechanism for\n\t\t\t\t// determining the unconstrained page bounds.\n\n\t\t\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function( style ) {\n\t\t\t\t\t\tif ( /^\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] ) ) {\n\t\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tArray.prototype.forEach.call( document.querySelectorAll( '[style]' ), removeViewportStyles );\n\t\t\t\tArray.prototype.forEach.call( document.styleSheets, function( stylesheet ) {\n\t\t\t\t\tArray.prototype.forEach.call( stylesheet.cssRules || stylesheet.rules, removeViewportStyles );\n\t\t\t\t} );\n\t\t\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\t\t\t\tsendResize();\n\t\t} )();"),n=wp.element.createElement("html",{lang:document.documentElement.lang},wp.element.createElement("head",null,wp.element.createElement("style",{dangerouslySetInnerHTML:{__html:"\n\t\t\tbody { margin: 0; }\n\n\t\t\tbody > div { max-width: 600px; }\n\n\t\t\tbody.Kickstarter > div,\n\t\t\tbody.video > div { position: relative; height: 0; padding-bottom: 56.25%; }\n\t\t\tbody.Kickstarter > div > iframe,\n\t\t\tbody.video > div > iframe { position: absolute; width: 100%; height: 100%; top: 0; left: 0; }\n\n\t\t\tbody > div > * { margin: 0 !important;/* has to have !important to override inline styles */ max-width: 100%; }\n\n\t\t\tbody.Flickr > div > a { display: block; }\n\t\t\tbody.Flickr > div > a > img { width: 100%; height: auto; }\n\t\t"}})),wp.element.createElement("body",{"data-resizable-iframe-connected":"data-resizable-iframe-connected",className:this.props.type+" "+this.props.provider},wp.element.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.html}}),wp.element.createElement("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:t}})));this.iframe.contentWindow.document.open(),this.iframe.contentWindow.document.write(""+Object(N.renderToString)(n)),this.iframe.contentWindow.document.close()}}}]),t}(N.Component)),Xn=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0&&(clearInterval(n),e.handleSearch(t))},100)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.name,r=e.value,o=e.embedCode,a=e.embedType,i=e.provider;return wp.element.createElement("div",{ref:this.node},wp.element.createElement(oe,{id:t,value:r,onChange:this.handleChange}),o?wp.element.createElement(Kn,{html:o,type:a,provider:i}):null,wp.element.createElement("input",{type:"hidden",name:n,value:r,readOnly:!0}))}}]),t}(N.Component),Jn=Object(x.withState)({embedCode:"",embedType:"",provider:"",error:"",isLoading:!1}),Zn=Object(G.withEffects)(function(e){var t=e.useEvent("fetchEmbedCode"),n=z()(t,2),r=n[0],o=n[1],a=Object(X.pipe)(J({onFetchEmbedCode:o}),Object(X.map)(G.toProps)),i=Object(X.pipe)(r,Object(X.map)(function(e){return{type:"FETCH_EMBED_CODE",payload:e}}));return Object(X.merge)(a,i)},{handler:function(e){return function(t){var n=t.payload;switch(t.type){case"FETCH_EMBED_CODE":var r=$.get(window.wpApiSettings.root+"oembed/1.0/proxy",{url:n,_wpnonce:window.wpApiSettings.nonce});r.done(function(t){e.setState({embedCode:t.html,embedType:t.type,provider:t.provider_name,isLoading:!1})}),r.fail(function(){alert(Object(a.__)("An error occurred while trying to fetch oembed preview.","carbon-fields-ui")),e.setState({error:Object(a.__)("Not Found","carbon-fields-ui"),isLoading:!1})})}}}}),Qn=Object(x.compose)(Jn,Zn)(Xn),er=(n(268),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?this.renderOptions():wp.element.createElement(qn,null)}}]),t}(N.Component)),tr=(n(269),Ve(function(e){return p()({},e,{field:p()({},e.field,{options:e.field.options.map(function(e){return p()({},e,{label:wp.element.createElement("img",{className:"cf-radio-image__image",src:e.label})})})})})})(er)),nr=function(e){function t(){var e;return _()(this,t),e=j()(this,A()(t).call(this)),l()(P()(P()(e)),"handleChange",function(t){var n=e.props,r=n.id;(0,n.onChange)(r,Object(f.isString)(t)?t:t.target.value)}),l()(P()(P()(e)),"initEditor",function(){var t=e.props,n=t.id;if(t.field.rich_editing){var r=p()({},window.tinyMCEPreInit.mceInit.carbon_settings,{selector:"#".concat(n),setup:function(t){e.editor=t,t.on("blur Change",function(){t.save(),e.handleChange(t.getContent())})}});window.tinymce.init(r)}var o=p()({},window.tinyMCEPreInit,{id:n});window.quicktags(o),window.QTags._buttonsInit()}),e.node=null,e.editor=null,e.cancelResizeObserver=null,e}return T()(t,e),k()(t,[{key:"componentDidMount",value:function(){this.props.visible&&(this.timer=setTimeout(this.initEditor,250))}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.destroyEditor()}},{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,i=t.field,u=["carbon-wysiwyg","wp-editor-wrap",{"tmce-active":i.rich_editing},{"html-active":!i.rich_editing}],s=i.media_buttons?Object(f.template)(i.media_buttons)({id:n}):null;return wp.element.createElement("div",{id:"wp-".concat(n,"-wrap"),className:K()(u),ref:function(t){return e.editorNode=t}},i.media_buttons&&wp.element.createElement("div",{id:"wp-".concat(n,"-media-buttons"),className:"hide-if-no-js wp-media-buttons"},wp.element.createElement("span",{dangerouslySetInnerHTML:{__html:s}})),i.rich_editing&&wp.element.createElement("div",{className:"wp-editor-tabs"},wp.element.createElement("button",{type:"button",id:"".concat(n,"-tmce"),className:"wp-switch-editor switch-tmce","data-wp-editor-id":n},Object(a.__)("Visual","carbon-fields-ui")),wp.element.createElement("button",{type:"button",id:"".concat(n,"-html"),className:"wp-switch-editor switch-html","data-wp-editor-id":n},Object(a.__)("Text","carbon-fields-ui"))),wp.element.createElement("div",{id:"wp-".concat(n,"-editor-container"),className:"wp-editor-container"},wp.element.createElement("textarea",Q()({style:{width:"100%"},className:"regular-text",id:n,name:r,value:o,onChange:this.handleChange},i.attributes))))}},{key:"destroyEditor",value:function(){this.editor&&(this.editor.remove(),this.node=null,this.editor=null),delete window.QTags.instances[this.props.id]}}]),t}(N.Component),rr=(n(270),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0?wp.element.createElement("select",{id:t,name:n,value:r||Object(f.get)(o.options,"[0].value",""),className:"cf-select__input",onChange:this.handleChange},o.options.map(function(e){return wp.element.createElement("option",{key:e.value,value:e.value},e.label)})):wp.element.createElement(qn,null)}}]),t}(N.Component)),or=(n(271),function(e){function t(){return _()(this,t),j()(this,A()(t).apply(this,arguments))}return T()(t,e),k()(t,[{key:"render",value:function(){return wp.element.createElement("h3",null,this.props.field.label)}}]),t}(N.Component)),ar=(n(272),function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a-1}),n}return T()(t,e),k()(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.id,r=t.name,o=t.value,a=t.field;return a.options.length>0?wp.element.createElement("ul",{className:"cf-set__list"},a.options.map(function(t,i){return wp.element.createElement("li",{className:"cf-set__list-item",key:i},wp.element.createElement("input",Q()({type:"checkbox",id:"".concat(n,"-").concat(t.value),name:"".concat(r,"[]"),checked:e.isChecked(o,t),value:t.value,className:"cf-set__input",onChange:e.handleChange},a.attributes)),wp.element.createElement("label",{className:"cf-set__label",htmlFor:"".concat(n,"-").concat(t.value)},t.label))})):wp.element.createElement(qn,null)}}]),t}(N.Component)),ir=function(e){function t(){var e,n;_()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"IN":return Object(f.some)(n,function(t){return t==e});case"NOT IN":return Object(f.every)(n,function(t){return t!=e});case"INCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return e.indexOf(t)>-1});case"EXCLUDES":return Object(f.every)(Object(f.castArray)(n),function(t){return-1===e.indexOf(t)})}return!1}(u[t.field],t.compare,t.value);return e.concat(n)},[]),l=!1;switch(o){case"AND":l=Object(f.every)(s);break;case"OR":l=Object(f.some)(s)}l?e.showField(e.id):e.hideField(e.id)}}return Object(x.createHigherOrderComponent)(function(e){return Object(x.compose)(Object(u.withDispatch)(function(e){var t=e("carbon-fields/core");return{showField:t.showField,hideField:t.hideField}}),Object(u.withSelect)(function(e,t){return{visible:e("carbon-fields/core").isFieldVisible(t.id)}}),Object(G.withEffects)(n,{handler:r}))(e)},"withConditionalLogic")}var Or=n(105),_r=n.n(Or),Cr="Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";function kr(){return"cf-".concat(_r()(Cr,21))}function Sr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r (start, sink) => {\n if (start !== 0) return;\n if (typeof prod !== 'function') {\n sink(0, () => {});\n sink(2);\n return;\n }\n let end;\n let unsub;\n const maybeDispose = t => {\n end = end || t === 2;\n if (end && typeof unsub === 'function') unsub();\n };\n sink(0, maybeDispose);\n unsub = prod((t, d) => {\n if (end || t === 0) return;\n sink(t, d);\n maybeDispose(t);\n });\n};\n\nmodule.exports = create;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-create/index.js?"); +eval("const create = prod => (start, sink) => {\n if (start !== 0) return;\n if (typeof prod !== 'function') {\n sink(0, () => {});\n sink(2);\n return;\n }\n let end;\n let unsub;\n const maybeDispose = t => {\n end = end || t === 2;\n if (end && typeof unsub === 'function') unsub();\n };\n sink(0, maybeDispose);\n unsub = prod((t, d) => {\n if (end || t === 0) return;\n sink(t, d);\n maybeDispose(t);\n });\n};\n\nmodule.exports = create;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-create/index.js?"); /***/ }), @@ -314,7 +315,7 @@ eval("const create = prod => (start, sink) => {\n if (start !== 0) return;\n i /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\nvar is = function is(previous, current) {\n return previous === current;\n};\n\nfunction distinctUntilChanged(compare) {\n if (compare === void 0) {\n compare = is;\n }\n\n return function (source) {\n return function (start, sink) {\n if (start !== 0) return;\n var inited = false;\n var prev;\n var talkback;\n source(0, function (type, data) {\n if (type === 0) {\n talkback = data;\n }\n\n if (type !== 1) {\n sink(type, data);\n return;\n }\n\n if (inited && compare(prev, data)) {\n talkback(1);\n return;\n }\n\n inited = true;\n prev = data;\n sink(1, data);\n });\n };\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (distinctUntilChanged);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js?"); +eval("__webpack_require__.r(__webpack_exports__);\nvar is = function is(previous, current) {\n return previous === current;\n};\n\nfunction distinctUntilChanged(compare) {\n if (compare === void 0) {\n compare = is;\n }\n\n return function (source) {\n return function (start, sink) {\n if (start !== 0) return;\n var inited = false;\n var prev;\n var talkback;\n source(0, function (type, data) {\n if (type === 0) {\n talkback = data;\n }\n\n if (type !== 1) {\n sink(type, data);\n return;\n }\n\n if (inited && compare(prev, data)) {\n talkback(1);\n return;\n }\n\n inited = true;\n prev = data;\n sink(1, data);\n });\n };\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (distinctUntilChanged);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js?"); /***/ }), @@ -325,7 +326,7 @@ eval("__webpack_require__.r(__webpack_exports__);\nvar is = function is(previous /*! no static exports found */ /***/ (function(module, exports) { -eval("/**\n * callbag-filter\n * --------------\n *\n * Callbag operator that conditionally lets data pass through. Works on either\n * pullable or listenable sources.\n *\n * `npm install callbag-filter`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const filter = require('callbag-filter');\n *\n * const source = filter(x => x % 2)(fromIter([1,2,3,4,5]));\n *\n * iterate(x => console.log(x))(source); // 1\n * // 3\n * // 5\n */\n\nconst filter = condition => source => (start, sink) => {\n if (start !== 0) return;\n let talkback;\n source(0, (t, d) => {\n if (t === 0) {\n talkback = d;\n sink(t, d);\n } else if (t === 1) {\n if (condition(d)) sink(t, d);\n else talkback(1);\n }\n else sink(t, d);\n });\n};\n\nmodule.exports = filter;\n\n\n//# sourceURL=webpack:///./node_modules/callbag-filter/readme.js?"); +eval("/**\n * callbag-filter\n * --------------\n *\n * Callbag operator that conditionally lets data pass through. Works on either\n * pullable or listenable sources.\n *\n * `npm install callbag-filter`\n *\n * Example:\n *\n * const fromIter = require('callbag-from-iter');\n * const iterate = require('callbag-iterate');\n * const filter = require('callbag-filter');\n *\n * const source = filter(x => x % 2)(fromIter([1,2,3,4,5]));\n *\n * iterate(x => console.log(x))(source); // 1\n * // 3\n * // 5\n */\n\nconst filter = condition => source => (start, sink) => {\n if (start !== 0) return;\n let talkback;\n source(0, (t, d) => {\n if (t === 0) {\n talkback = d;\n sink(t, d);\n } else if (t === 1) {\n if (condition(d)) sink(t, d);\n else talkback(1);\n }\n else sink(t, d);\n });\n};\n\nmodule.exports = filter;\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-filter/readme.js?"); /***/ }), @@ -337,7 +338,7 @@ eval("/**\n * callbag-filter\n * --------------\n *\n * Callbag operator that co /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_from_event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-from-event */ \"./node_modules/callbag-from-delegated-event/node_modules/callbag-from-event/index.js\");\n/* harmony import */ var callbag_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-filter */ \"./node_modules/callbag-filter/readme.js\");\n/* harmony import */ var callbag_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(callbag_filter__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nconst fromDelegatedEvent = (root, sel, evt) => callbag_filter__WEBPACK_IMPORTED_MODULE_1___default()(e => {\n let at = e.target;\n while(at !== root){\n if (at.matches(sel)) {\n return true;\n }\n at = at.parentElement;\n }\n return false;\n})(Object(callbag_from_event__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(root, evt));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (fromDelegatedEvent);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-delegated-event/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_from_event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-from-event */ \"./node_modules/callbag-from-delegated-event/node_modules/callbag-from-event/index.js\");\n/* harmony import */ var callbag_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-filter */ \"./node_modules/callbag-filter/readme.js\");\n/* harmony import */ var callbag_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(callbag_filter__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nconst fromDelegatedEvent = (root, sel, evt) => callbag_filter__WEBPACK_IMPORTED_MODULE_1___default()(e => {\n let at = e.target;\n while(at !== root){\n if (at.matches(sel)) {\n return true;\n }\n at = at.parentElement;\n }\n return false;\n})(Object(callbag_from_event__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(root, evt));\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (fromDelegatedEvent);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-from-delegated-event/index.js?"); /***/ }), @@ -349,7 +350,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var call /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\nconst fromEvent = (node, name, options) => (start, sink) => {\n if (start !== 0) return;\n let disposed = false;\n const handler = ev => {\n sink(1, ev)\n };\n\n sink(0, t => {\n if (t !== 2) {\n return;\n }\n disposed = true;\n node.removeEventListener(name, handler, options);\n });\n\n if (disposed) {\n return;\n }\n\n node.addEventListener(name, handler, options);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (fromEvent);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-from-delegated-event/node_modules/callbag-from-event/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\nconst fromEvent = (node, name, options) => (start, sink) => {\n if (start !== 0) return;\n let disposed = false;\n const handler = ev => {\n sink(1, ev)\n };\n\n sink(0, t => {\n if (t !== 2) {\n return;\n }\n disposed = true;\n node.removeEventListener(name, handler, options);\n });\n\n if (disposed) {\n return;\n }\n\n node.addEventListener(name, handler, options);\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (fromEvent);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-from-delegated-event/node_modules/callbag-from-event/index.js?"); /***/ }), @@ -361,7 +362,7 @@ eval("__webpack_require__.r(__webpack_exports__);\nconst fromEvent = (node, name /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\nfunction of() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return function (start, sink) {\n if (start !== 0) return;\n var disposed = false;\n sink(0, function (type) {\n if (type !== 2) return;\n disposed = true;\n values.length = 0;\n });\n\n while (values.length !== 0) {\n sink(1, values.shift());\n }\n\n if (disposed) return;\n sink(2);\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (of);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-of/dist/callbag-of.esm.js?"); +eval("__webpack_require__.r(__webpack_exports__);\nfunction of() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return function (start, sink) {\n if (start !== 0) return;\n var disposed = false;\n sink(0, function (type) {\n if (type !== 2) return;\n disposed = true;\n values.length = 0;\n });\n\n while (values.length !== 0) {\n sink(1, values.shift());\n }\n\n if (disposed) return;\n sink(2);\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (of);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-of/dist/callbag-of.esm.js?"); /***/ }), @@ -373,7 +374,7 @@ eval("__webpack_require__.r(__webpack_exports__);\nfunction of() {\n for (var _ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n\nconst startWith = (...xs) => inputSource => (start, outputSink) => {\n if (start !== 0) return;\n let disposed = false;\n let inputTalkback;\n let trackPull = false;\n let lastPull;\n\n outputSink(0, (ot, od) => {\n if (trackPull && ot === 1) {\n lastPull = [1, od];\n }\n\n if (ot === 2) {\n disposed = true;\n xs.length = 0;\n }\n\n if (!inputTalkback) return;\n inputTalkback(ot, od);\n });\n\n while (xs.length !== 0) {\n if (xs.length === 1) {\n trackPull = true;\n }\n outputSink(1, xs.shift());\n }\n\n if (disposed) return;\n\n inputSource(0, (it, id) => {\n if (it === 0) {\n inputTalkback = id;\n trackPull = false;\n\n if (lastPull) {\n inputTalkback(...lastPull);\n lastPull = null;\n }\n return;\n }\n outputSink(it, id);\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (startWith);\n\n\n//# sourceURL=webpack:///./node_modules/callbag-start-with/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n\nconst startWith = (...xs) => inputSource => (start, outputSink) => {\n if (start !== 0) return;\n let disposed = false;\n let inputTalkback;\n let trackPull = false;\n let lastPull;\n\n outputSink(0, (ot, od) => {\n if (trackPull && ot === 1) {\n lastPull = [1, od];\n }\n\n if (ot === 2) {\n disposed = true;\n xs.length = 0;\n }\n\n if (!inputTalkback) return;\n inputTalkback(ot, od);\n });\n\n while (xs.length !== 0) {\n if (xs.length === 1) {\n trackPull = true;\n }\n outputSink(1, xs.shift());\n }\n\n if (disposed) return;\n\n inputSource(0, (it, id) => {\n if (it === 0) {\n inputTalkback = id;\n trackPull = false;\n\n if (lastPull) {\n inputTalkback(...lastPull);\n lastPull = null;\n }\n return;\n }\n outputSink(it, id);\n });\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (startWith);\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./node_modules/callbag-start-with/index.js?"); /***/ }), @@ -385,7 +386,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n\nconst startWith = (...xs) = /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/container/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../field */ \"./packages/metaboxes/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar Container =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(Container, _Component);\n\n function Container() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Container);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Container)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n currentTab: null\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"renderField\", function (field) {\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, 'metabox');\n\n if (!FieldEdit) {\n return null;\n }\n\n return wp.element.createElement(_field__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n key: field.id,\n id: field.id\n }, wp.element.createElement(FieldEdit, {\n id: field.id,\n containerId: _this.props.id\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleTabClick\", function (tab) {\n _this.setState({\n currentTab: tab\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Container, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var container = this.props.container;\n\n if (this.isTabbed(container)) {\n this.setState({\n currentTab: Object.keys(container.settings.tabs)[0]\n });\n }\n }\n /**\n * Returns whether the container uses tabs.\n *\n * @param {Object} container\n * @return {boolean}\n */\n\n }, {\n key: \"isTabbed\",\n value: function isTabbed(container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"isPlainObject\"])(container.settings.tabs);\n }\n /**\n * Renders the given field.\n *\n * @param {Object} field\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var container = this.props.container;\n var hasTabs = this.isTabbed(container);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()(['cf-container', \"cf-container-\".concat(container.id), \"cf-container-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"kebabCase\"])(container.type))].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(container.classes), [{\n 'cf-container--plain': !hasTabs\n }]));\n return wp.element.createElement(\"div\", {\n className: classes\n }, wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: container.nonce.name,\n value: container.nonce.value\n }), hasTabs && wp.element.createElement(\"div\", {\n className: \"cf-container__tabs\"\n }, wp.element.createElement(\"ul\", {\n className: \"cf-container__tabs-list\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n // eslint-disable-next-line no-shadow\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-container__tabs-item', {\n 'cf-container__tabs-item--current': tabName === currentTab\n });\n return wp.element.createElement(\"li\", {\n key: tabName,\n className: classes,\n onClick: function onClick() {\n return _this2.handleTabClick(tabName);\n }\n }, tabName);\n }))), hasTabs && Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n return wp.element.createElement(\"div\", {\n className: \"cf-container__fields\",\n key: tabName,\n hidden: tabName !== currentTab\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(fieldNames, function (fieldName) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"find\"])(container.fields, ['name', fieldName]);\n return _this2.renderField(field);\n }));\n }), !hasTabs && wp.element.createElement(\"div\", {\n className: \"cf-container__fields\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.fields, this.renderField)));\n }\n }]);\n\n return Container;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Container);\n\n//# sourceURL=webpack:///./packages/metaboxes/components/container/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ \"classnames\");\n/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/container/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../field */ \"./packages/metaboxes/components/field/index.js\");\n\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\nvar Container =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(Container, _Component);\n\n function Container() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1___default()(this, Container);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4___default()(Container)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"state\", {\n currentTab: null\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"renderField\", function (field) {\n var FieldEdit = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_11__[\"getFieldType\"])(field.type, 'metabox');\n\n if (!FieldEdit) {\n return null;\n }\n\n return wp.element.createElement(_field__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n key: field.id,\n id: field.id\n }, wp.element.createElement(FieldEdit, {\n id: field.id,\n containerId: _this.props.id\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_6___default()(_this)), \"handleTabClick\", function (tab) {\n _this.setState({\n currentTab: tab\n });\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2___default()(Container, [{\n key: \"componentDidMount\",\n\n /**\n * Lifecycle hook.\n *\n * @return {void}\n */\n value: function componentDidMount() {\n var container = this.props.container;\n\n if (this.isTabbed(container)) {\n this.setState({\n currentTab: Object.keys(container.settings.tabs)[0]\n });\n }\n }\n /**\n * Returns whether the container uses tabs.\n *\n * @param {Object} container\n * @return {boolean}\n */\n\n }, {\n key: \"isTabbed\",\n value: function isTabbed(container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"isPlainObject\"])(container.settings.tabs);\n }\n /**\n * Renders the given field.\n *\n * @param {Object} field\n * @return {Object}\n */\n\n }, {\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var _this2 = this;\n\n var currentTab = this.state.currentTab;\n var container = this.props.container;\n var hasTabs = this.isTabbed(container);\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()(['cf-container', \"cf-container-\".concat(container.id), \"cf-container-\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"kebabCase\"])(container.type))].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(container.classes), [{\n 'cf-container--plain': !hasTabs\n }]));\n return wp.element.createElement(\"div\", {\n className: classes\n }, wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: container.nonce.name,\n value: container.nonce.value\n }), hasTabs && wp.element.createElement(\"div\", {\n className: \"cf-container__tabs\"\n }, wp.element.createElement(\"ul\", {\n className: \"cf-container__tabs-list\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n // eslint-disable-next-line no-shadow\n var classes = classnames__WEBPACK_IMPORTED_MODULE_8___default()('cf-container__tabs-item', {\n 'cf-container__tabs-item--current': tabName === currentTab\n });\n return wp.element.createElement(\"li\", {\n key: tabName,\n className: classes,\n onClick: function onClick() {\n return _this2.handleTabClick(tabName);\n }\n }, tabName);\n }))), hasTabs && Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.settings.tabs, function (fieldNames, tabName) {\n return wp.element.createElement(\"div\", {\n className: \"cf-container__fields\",\n key: tabName,\n hidden: tabName !== currentTab\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(fieldNames, function (fieldName) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"find\"])(container.fields, ['name', fieldName]);\n return _this2.renderField(field);\n }));\n }), !hasTabs && wp.element.createElement(\"div\", {\n className: \"cf-container__fields\"\n }, Object(lodash__WEBPACK_IMPORTED_MODULE_10__[\"map\"])(container.fields, this.renderField)));\n }\n }]);\n\n return Container;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_9__[\"Component\"]);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Container);\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/components/container/index.js?"); /***/ }), @@ -396,7 +397,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/components/container/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/components/container/style.scss?"); /***/ }), @@ -408,7 +409,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/field/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"withFilters\"])('carbon-fields.field-wrapper.metabox'))(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"Field\"]));\n\n//# sourceURL=webpack:///./packages/metaboxes/components/field/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/components/field/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"withFilters\"])('carbon-fields.field-wrapper.metabox'))(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"Field\"]));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/components/field/index.js?"); /***/ }), @@ -419,7 +420,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/components/field/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/components/field/style.scss?"); /***/ }), @@ -431,7 +432,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hocs/with-container */ \"./packages/metaboxes/hocs/with-container/index.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Extends the containers with necessary hooks.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.register-container-type', 'carbon-fields/metaboxes', function (type, context, component) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_container__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__[\"withFilters\"])(\"carbon-fields.\".concat(type, \".\").concat(context)))(component);\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/hooks.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _hocs_with_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hocs/with-container */ \"./packages/metaboxes/hocs/with-container/index.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Extends the containers with necessary hooks.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.register-container-type', 'carbon-fields/metaboxes', function (type, context, component) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_container__WEBPACK_IMPORTED_MODULE_3__[\"default\"], Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__[\"withFilters\"])(\"carbon-fields.\".concat(type, \".\").concat(context)))(component);\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/hooks.js?"); /***/ }), @@ -443,7 +444,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderContainer\", function() { return renderContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeContainers; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks */ \"./packages/metaboxes/containers/hooks.js\");\n/* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./widget */ \"./packages/metaboxes/containers/widget/index.js\");\n/* harmony import */ var _term_meta__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./term-meta */ \"./packages/metaboxes/containers/term-meta/index.js\");\n/* harmony import */ var _theme_options__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-options */ \"./packages/metaboxes/containers/theme-options/index.js\");\n/* harmony import */ var _user_meta__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./user-meta */ \"./packages/metaboxes/containers/user-meta/index.js\");\n/* harmony import */ var _components_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/container */ \"./packages/metaboxes/components/container/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./registry */ \"./packages/metaboxes/containers/registry.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n/**\n * Registers the containers.\n */\n\n['post_meta', 'term_meta', 'user_meta', 'comment_meta', 'network', 'theme_options', 'nav_menu_item', 'widget'].forEach(function (type) {\n return Object(_registry__WEBPACK_IMPORTED_MODULE_10__[\"registerContainerType\"])(type, _components_container__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\n});\n/**\n * Renders the given container.\n *\n * @param {Object} container\n * @param {string} context\n * @return {void}\n */\n\nfunction renderContainer(container, context) {\n var node = document.querySelector(\".container-\".concat(container.id));\n var Component = Object(_registry__WEBPACK_IMPORTED_MODULE_10__[\"getContainerType\"])(container.type, context);\n\n if (node) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(wp.element.createElement(Component, {\n id: container.id\n }), node);\n } else {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Could not find DOM element for container \"%1$s\".', 'carbon-fields-ui'), container.id));\n }\n}\n/**\n * Initializes the containers.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeContainers(context) {\n var containers = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getContainers();\n Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"forEach\"])(containers, function (container) {\n renderContainer(container, context);\n });\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"renderContainer\", function() { return renderContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeContainers; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks */ \"./packages/metaboxes/containers/hooks.js\");\n/* harmony import */ var _widget__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./widget */ \"./packages/metaboxes/containers/widget/index.js\");\n/* harmony import */ var _term_meta__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./term-meta */ \"./packages/metaboxes/containers/term-meta/index.js\");\n/* harmony import */ var _theme_options__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./theme-options */ \"./packages/metaboxes/containers/theme-options/index.js\");\n/* harmony import */ var _user_meta__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./user-meta */ \"./packages/metaboxes/containers/user-meta/index.js\");\n/* harmony import */ var _components_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../components/container */ \"./packages/metaboxes/components/container/index.js\");\n/* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./registry */ \"./packages/metaboxes/containers/registry.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n/**\n * Registers the containers.\n */\n\n['post_meta', 'term_meta', 'user_meta', 'comment_meta', 'network', 'theme_options', 'nav_menu_item', 'widget'].forEach(function (type) {\n return Object(_registry__WEBPACK_IMPORTED_MODULE_10__[\"registerContainerType\"])(type, _components_container__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\n});\n/**\n * Renders the given container.\n *\n * @param {Object} container\n * @param {string} context\n * @return {void}\n */\n\nfunction renderContainer(container, context) {\n var node = document.querySelector(\".container-\".concat(container.id));\n var Component = Object(_registry__WEBPACK_IMPORTED_MODULE_10__[\"getContainerType\"])(container.type, context);\n\n if (node) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(wp.element.createElement(Component, {\n id: container.id\n }), node, function () {\n node.dataset.mounted = true;\n });\n } else {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Could not find DOM element for container \"%1$s\".', 'carbon-fields-ui'), container.id));\n }\n}\n/**\n * Initializes the containers.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeContainers(context) {\n var containers = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getContainers();\n Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"forEach\"])(containers, function (container) {\n renderContainer(container, context);\n });\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/index.js?"); /***/ }), @@ -455,7 +456,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerContainerType\", function() { return registerContainerType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainerType\", function() { return getContainerType; });\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n\nvar _createRegistry = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__[\"createRegistry\"])('container', ['classic', 'gutenberg']),\n registerContainerType = _createRegistry.registerContainerType,\n getContainerType = _createRegistry.getContainerType;\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/registry.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerContainerType\", function() { return registerContainerType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainerType\", function() { return getContainerType; });\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n\nvar _createRegistry = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_0__[\"createRegistry\"])('container', ['classic', 'gutenberg']),\n registerContainerType = _createRegistry.registerContainerType,\n getContainerType = _createRegistry.getContainerType;\n\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/registry.js?"); /***/ }), @@ -467,7 +468,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/from-event-pattern */ \"./packages/metaboxes/utils/from-event-pattern.js\");\n/* harmony import */ var _store_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../store/helpers */ \"./packages/metaboxes/store/helpers.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (handler) {\n return window.jQuery(document).on('ajaxSuccess', handler);\n }, function (handler) {\n return window.jQuery(document).off('ajaxSuccess', handler);\n }, function (e, xhr, options, data) {\n return {\n options: options,\n data: data\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var options = _ref.options,\n data = _ref.data;\n return options.data.indexOf('carbon_fields_container') > -1 && options.data.indexOf('add-tag') > -1 && !data.documentElement.querySelector('wp_error');\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function () {\n // Collects identifiers of current fields so we can remove them later.\n var oldFieldIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(props.container.fields, 'id'); // Get a fresh copy of the container and fields.\n\n\n var _normalizePreloadedSt = Object(_store_helpers__WEBPACK_IMPORTED_MODULE_6__[\"normalizePreloadedState\"])(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\n var container = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(containers, ['id', props.id]);\n\n var containerFields = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(fields, ['container_id', props.id]); // Replace the container and add the new fields.\n\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"dispatch\"])('carbon-fields/metaboxes'),\n updateState = _dispatch.updateState,\n removeFields = _dispatch.removeFields;\n\n updateState(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy([container], 'id'), lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy(containerFields, 'id'));\n removeFields(oldFieldIds);\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.term_meta.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/term-meta/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/from-event-pattern */ \"./packages/metaboxes/utils/from-event-pattern.js\");\n/* harmony import */ var _store_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../store/helpers */ \"./packages/metaboxes/store/helpers.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (handler) {\n return window.jQuery(document).on('ajaxSuccess', handler);\n }, function (handler) {\n return window.jQuery(document).off('ajaxSuccess', handler);\n }, function (e, xhr, options, data) {\n return {\n options: options,\n data: data\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var options = _ref.options,\n data = _ref.data;\n return options.data.indexOf('carbon_fields_container') > -1 && options.data.indexOf('add-tag') > -1 && !data.documentElement.querySelector('wp_error');\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function () {\n // Collects identifiers of current fields so we can remove them later.\n var oldFieldIds = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.map(props.container.fields, 'id'); // Get a fresh copy of the container and fields.\n\n\n var _normalizePreloadedSt = Object(_store_helpers__WEBPACK_IMPORTED_MODULE_6__[\"normalizePreloadedState\"])(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.get(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\n var container = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.find(containers, ['id', props.id]);\n\n var containerFields = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.filter(fields, ['container_id', props.id]); // Replace the container and add the new fields.\n\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"dispatch\"])('carbon-fields/metaboxes'),\n updateState = _dispatch.updateState,\n removeFields = _dispatch.removeFields;\n\n updateState(lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy([container], 'id'), lodash__WEBPACK_IMPORTED_MODULE_0___default.a.keyBy(containerFields, 'id'));\n removeFields(oldFieldIds);\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.term_meta.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/term-meta/index.js?"); /***/ }), @@ -479,7 +480,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var loda /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/theme-options/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"fromEvent\"])(window, 'scroll'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(function () {\n return window.jQuery(window).scrollTop();\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (windowTopOffset) {\n var $container = window.jQuery('.carbon-box:first');\n var $panel = window.jQuery('#postbox-container-1');\n var $bar = window.jQuery('#wpadminbar');\n var offset = $bar.height() + 10;\n var threshold = $container.offset().top - offset; // In some situations the threshold is negative number because\n // the container element isn't rendered yet.\n\n if (threshold > 0) {\n $panel.toggleClass('fixed', windowTopOffset >= threshold).css('top', offset);\n }\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.theme_options.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_1__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/theme-options/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/theme-options/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"fromEvent\"])(window, 'scroll'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(function () {\n return window.jQuery(window).scrollTop();\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (windowTopOffset) {\n var $container = window.jQuery('.carbon-box:first');\n var $panel = window.jQuery('#postbox-container-1');\n var $bar = window.jQuery('#wpadminbar');\n var offset = $bar.height() + 10;\n var threshold = $container.offset().top - offset; // In some situations the threshold is negative number because\n // the container element isn't rendered yet.\n\n if (threshold > 0) {\n $panel.toggleClass('fixed', windowTopOffset >= threshold).css('top', offset);\n }\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.theme_options.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_1__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/theme-options/index.js?"); /***/ }), @@ -490,7 +491,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/theme-options/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/theme-options/style.scss?"); /***/ }), @@ -502,7 +503,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/user-meta/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/user-meta/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/user-meta/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/user-meta/index.js?"); /***/ }), @@ -513,7 +514,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sty /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/user-meta/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/user-meta/style.scss?"); /***/ }), @@ -525,7 +526,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/widget/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\nfunction aperture(component) {\n var mount$ = component.mount;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"pipe\"])(mount$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(function () {\n return {\n type: 'COMPONENT_MOUNTED'\n };\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n switch (effect.type) {\n case 'COMPONENT_MOUNTED':\n var container = props.container;\n var $carbonContainer = window.jQuery(\".container-\".concat(container.id)); // trigger change immediately after save, since the container is expanded\n\n $carbonContainer.trigger('change'); // trigger change when the expand button is clicked\n\n $carbonContainer.closest('.widget').find('.widget-action').on('click', function () {\n setTimeout(function () {\n $carbonContainer.trigger('change');\n }, 500);\n });\n break;\n }\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.widget.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_1__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/widget/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/containers/widget/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @param {Object} component\n * @return {Object}\n */\n\nfunction aperture(component) {\n var mount$ = component.mount;\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"pipe\"])(mount$, Object(callbag_basics__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(function () {\n return {\n type: 'COMPONENT_MOUNTED'\n };\n }));\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @return {Function}\n */\n\n\nfunction handler(props) {\n return function (effect) {\n switch (effect.type) {\n case 'COMPONENT_MOUNTED':\n var container = props.container;\n var $carbonContainer = window.jQuery(\".container-\".concat(container.id)); // trigger change immediately after save, since the container is expanded\n\n $carbonContainer.trigger('change'); // trigger change when the expand button is clicked\n\n $carbonContainer.closest('.widget').find('.widget-action').on('click', function () {\n setTimeout(function () {\n $carbonContainer.trigger('change');\n }, 500);\n });\n break;\n }\n };\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.widget.classic', 'carbon-fields/metaboxes', Object(refract_callbag__WEBPACK_IMPORTED_MODULE_1__[\"withEffects\"])(aperture, {\n handler: handler\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/widget/index.js?"); /***/ }), @@ -536,7 +537,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/containers/widget/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/containers/widget/style.scss?"); /***/ }), @@ -548,7 +549,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_strip_compact_input_prefix__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/strip-compact-input-prefix */ \"./packages/metaboxes/utils/strip-compact-input-prefix.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Returns a field with the given name.\n *\n * @param {Object[]} fields\n * @param {string} name\n * @return {?Object}\n */\n\nfunction findFieldByName(fields, name) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"find\"])(fields, function (field) {\n return field.name === name;\n });\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.association.metabox', 'carbon-fields/metaboxes', Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withProps\"])(function (props) {\n return {\n hierarchyResolver: function hierarchyResolver() {\n // Get all fields.\n var fields = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getFieldsByContainerId(props.containerId); // Get a clean version of field's name.\n\n var fieldName = Object(_utils_strip_compact_input_prefix__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(props.name); // Get the path.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove chunks that are empty.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Get the root field.\n\n var rootFieldName = path.shift();\n var rootField = findFieldByName(fields, rootFieldName); // Get the hierarchy.\n\n var accessor = fields.indexOf(rootField);\n var hierarchy = rootField.base_name; // Visit every branch in the tree so we can get the full hierarchy.\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isSameField = chunk === props.field.base_name;\n var isNestedComplex = !isGroup && !isSameField;\n\n if (isGroup) {\n accessor = \"\".concat(accessor, \".value.\").concat(chunk, \".name\");\n hierarchy = \"\".concat(hierarchy, \"[\").concat(chunk, \"]:\").concat(Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(fields, accessor), \"/\");\n }\n\n if (isNestedComplex) {\n var field = findFieldByName(fields, chunk);\n accessor = fields.indexOf(field);\n hierarchy = \"\".concat(hierarchy).concat(field.base_name);\n }\n\n if (isSameField) {\n hierarchy = \"\".concat(hierarchy).concat(chunk);\n }\n }\n\n return hierarchy;\n }\n };\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/association/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_strip_compact_input_prefix__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/strip-compact-input-prefix */ \"./packages/metaboxes/utils/strip-compact-input-prefix.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Returns a field with the given name.\n *\n * @param {Object[]} fields\n * @param {string} name\n * @return {?Object}\n */\n\nfunction findFieldByName(fields, name) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"find\"])(fields, function (field) {\n return field.name === name;\n });\n}\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__[\"addFilter\"])('carbon-fields.association.metabox', 'carbon-fields/metaboxes', Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withProps\"])(function (props) {\n return {\n hierarchyResolver: function hierarchyResolver() {\n // Get all fields.\n var fields = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').getFieldsByContainerId(props.containerId); // Get a clean version of field's name.\n\n var fieldName = Object(_utils_strip_compact_input_prefix__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(props.name); // Get the path.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove chunks that are empty.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Get the root field.\n\n var rootFieldName = path.shift();\n var rootField = findFieldByName(fields, rootFieldName); // Get the hierarchy.\n\n var accessor = fields.indexOf(rootField);\n var hierarchy = rootField.base_name; // Visit every branch in the tree so we can get the full hierarchy.\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isSameField = chunk === props.field.base_name;\n var isNestedComplex = !isGroup && !isSameField;\n\n if (isGroup) {\n accessor = \"\".concat(accessor, \".value.\").concat(chunk, \".name\");\n hierarchy = \"\".concat(hierarchy, \"[\").concat(chunk, \"]:\").concat(Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(fields, accessor), \"/\");\n }\n\n if (isNestedComplex) {\n var field = findFieldByName(fields, chunk);\n accessor = fields.indexOf(field);\n hierarchy = \"\".concat(hierarchy).concat(field.base_name);\n }\n\n if (isSameField) {\n hierarchy = \"\".concat(hierarchy).concat(chunk);\n }\n }\n\n return hierarchy;\n }\n };\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/association/index.js?"); /***/ }), @@ -560,7 +561,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/field */ \"./packages/metaboxes/components/field/index.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n field = _this$props.field,\n value = _this$props.value,\n addFields = _this$props.addFields,\n onChange = _this$props.onChange; // Create a copy of the group to prevent\n // incidentally modifications.\n\n group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group); // Get a flat list of all fields for this group.\n\n var fields = [];\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n group.container_id = field.container_id;\n group.fields = group.fields.map(function (groupField) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(groupField, field.container_id, fields);\n }); // Make sure that the group is expanded even\n // `set_collapsed(true)` is used.\n\n group.collapsed = false; // Push the group to the field.\n\n addFields(fields);\n onChange(id, value.concat(group));\n callback(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n cloneFields = _this$props2.cloneFields,\n onChange = _this$props2.onChange;\n var originFieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n var cloneFieldIds = originFieldIds.map(function () {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n });\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group);\n clonedGroup.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n clonedGroup.fields.forEach(function (groupField, index) {\n groupField.id = cloneFieldIds[index];\n });\n cloneFields(originFieldIds, cloneFieldIds);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.splice(value.indexOf(group) + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n removeFields = _this$props3.removeFields,\n onChange = _this$props3.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"without\"])(value, group)); // Delay removal of fields because React will complain\n // about missing objects.\n // TODO: Investigate why this is necessary.\n\n setTimeout(function () {\n var fieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n removeFields(fieldIds);\n }, 1);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleGroup\", function (groupId) {\n var _this$props4 = _this.props,\n field = _this$props4.field,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"find\"])(draft, ['id', groupId]);\n group.collapsed = !group.collapsed;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleAllGroups\", function (collapsed) {\n var _this$props5 = _this.props,\n field = _this$props5.field,\n value = _this$props5.value,\n onChange = _this$props5.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.forEach(function (group) {\n group.collapsed = collapsed;\n });\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupSetup\", function (group, props) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n id: group.id,\n name: group.name,\n prefix: \"\".concat(_this.props.name, \"[\").concat(props.index, \"]\"),\n fields: group.fields,\n collapsed: group.collapsed,\n context: 'metabox'\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n return [_components_field__WEBPACK_IMPORTED_MODULE_15__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n key: field.id,\n id: field.id,\n containerId: _this.props.containerId,\n name: \"\".concat(groupProps.prefix, \"[\").concat(field.name, \"]\")\n })];\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ComplexField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props6 = this.props,\n value = _this$props6.value,\n children = _this$props6.children;\n var allGroupsAreCollapsed = value.every(function (_ref) {\n var collapsed = _ref.collapsed;\n return collapsed;\n });\n return children({\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withSelect\"])(function (select, props) {\n var _select = select('carbon-fields/metaboxes'),\n getComplexGroupValues = _select.getComplexGroupValues;\n\n var groupValues = props.value.map(function (group) {\n var fieldIds = group.fields.map(function (field) {\n return field.id;\n });\n return [group.name, getComplexGroupValues(fieldIds)];\n });\n return {\n groupValues: groupValues\n };\n});\nvar applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n addFields = _dispatch.addFields,\n cloneFields = _dispatch.cloneFields,\n removeFields = _dispatch.removeFields;\n\n return {\n addFields: addFields,\n cloneFields: cloneFields,\n removeFields: removeFields\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"addFilter\"])('carbon-fields.complex.metabox', 'carbon-fields/metaboxes', function (OriginalComplexField) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[\"compose\"])(applyWithSelect, applyWithDispatch)(function (props) {\n var id = props.id,\n field = props.field,\n name = props.name,\n value = props.value,\n groupValues = props.groupValues;\n return wp.element.createElement(ComplexField, props, function (_ref2) {\n var allGroupsAreCollapsed = _ref2.allGroupsAreCollapsed,\n handleGroupSetup = _ref2.handleGroupSetup,\n handleGroupFieldSetup = _ref2.handleGroupFieldSetup,\n handleAddGroup = _ref2.handleAddGroup,\n handleCloneGroup = _ref2.handleCloneGroup,\n handleRemoveGroup = _ref2.handleRemoveGroup,\n handleToggleGroup = _ref2.handleToggleGroup,\n handleToggleAllGroups = _ref2.handleToggleAllGroups;\n return wp.element.createElement(OriginalComplexField, {\n groupIdKey: \"id\",\n groupFilterKey: \"name\",\n id: id,\n field: field,\n name: name,\n value: value,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n });\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/complex/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/getPrototypeOf.js\");\n/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ \"./node_modules/@babel/runtime/helpers/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/complex/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _components_field__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/field */ \"./packages/metaboxes/components/field/index.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n\n\n\n\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\nvar ComplexField =\n/*#__PURE__*/\nfunction (_Component) {\n _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(ComplexField, _Component);\n\n function ComplexField() {\n var _getPrototypeOf2;\n\n var _this;\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, ComplexField);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_2___default()(this, (_getPrototypeOf2 = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_3___default()(ComplexField)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleAddGroup\", function (group, callback) {\n var _this$props = _this.props,\n id = _this$props.id,\n field = _this$props.field,\n value = _this$props.value,\n addFields = _this$props.addFields,\n onChange = _this$props.onChange; // Create a copy of the group to prevent\n // incidentally modifications.\n\n group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group); // Get a flat list of all fields for this group.\n\n var fields = [];\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n group.container_id = field.container_id;\n group.fields = group.fields.map(function (groupField) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(groupField, field.container_id, fields);\n }); // Make sure that the group is expanded even\n // `set_collapsed(true)` is used.\n\n group.collapsed = false; // Push the group to the field.\n\n addFields(fields);\n onChange(id, value.concat(group));\n callback(group);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleCloneGroup\", function (group, callback) {\n var _this$props2 = _this.props,\n id = _this$props2.id,\n value = _this$props2.value,\n cloneFields = _this$props2.cloneFields,\n onChange = _this$props2.onChange;\n var originFieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n var cloneFieldIds = originFieldIds.map(function () {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n });\n var clonedGroup = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"cloneDeep\"])(group);\n clonedGroup.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_13__[\"uniqueId\"])();\n clonedGroup.fields.forEach(function (groupField, index) {\n groupField.id = cloneFieldIds[index];\n });\n cloneFields(originFieldIds, cloneFieldIds);\n onChange(id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.splice(value.indexOf(group) + 1, 0, clonedGroup);\n }));\n callback(clonedGroup);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleRemoveGroup\", function (group) {\n var _this$props3 = _this.props,\n id = _this$props3.id,\n value = _this$props3.value,\n removeFields = _this$props3.removeFields,\n onChange = _this$props3.onChange;\n onChange(id, Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"without\"])(value, group)); // Delay removal of fields because React will complain\n // about missing objects.\n // TODO: Investigate why this is necessary.\n\n setTimeout(function () {\n var fieldIds = group.fields.map(function (groupField) {\n return groupField.id;\n });\n removeFields(fieldIds);\n }, 1);\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleGroup\", function (groupId) {\n var _this$props4 = _this.props,\n field = _this$props4.field,\n value = _this$props4.value,\n onChange = _this$props4.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"find\"])(draft, ['id', groupId]);\n group.collapsed = !group.collapsed;\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleToggleAllGroups\", function (collapsed) {\n var _this$props5 = _this.props,\n field = _this$props5.field,\n value = _this$props5.value,\n onChange = _this$props5.onChange;\n onChange(field.id, immer__WEBPACK_IMPORTED_MODULE_7___default()(value, function (draft) {\n draft.forEach(function (group) {\n group.collapsed = collapsed;\n });\n }));\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupSetup\", function (group, props) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n id: group.id,\n name: group.name,\n prefix: \"\".concat(_this.props.name, \"[\").concat(props.index, \"]\"),\n fields: group.fields,\n collapsed: group.collapsed,\n context: 'metabox'\n });\n });\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5___default()(_this)), \"handleGroupFieldSetup\", function (field, props, groupProps) {\n return [_components_field__WEBPACK_IMPORTED_MODULE_15__[\"default\"], Object(lodash__WEBPACK_IMPORTED_MODULE_12__[\"assign\"])({}, props, {\n key: field.id,\n id: field.id,\n containerId: _this.props.containerId,\n name: \"\".concat(groupProps.prefix, \"[\").concat(field.name, \"]\")\n })];\n });\n\n return _this;\n }\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(ComplexField, [{\n key: \"render\",\n\n /**\n * Renders the component.\n *\n * @return {Object}\n */\n value: function render() {\n var handleGroupSetup = this.handleGroupSetup,\n handleGroupFieldSetup = this.handleGroupFieldSetup,\n handleAddGroup = this.handleAddGroup,\n handleCloneGroup = this.handleCloneGroup,\n handleRemoveGroup = this.handleRemoveGroup,\n handleToggleGroup = this.handleToggleGroup,\n handleToggleAllGroups = this.handleToggleAllGroups;\n var _this$props6 = this.props,\n value = _this$props6.value,\n children = _this$props6.children;\n var allGroupsAreCollapsed = value.every(function (_ref) {\n var collapsed = _ref.collapsed;\n return collapsed;\n });\n return children({\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n handleGroupSetup: handleGroupSetup,\n handleGroupFieldSetup: handleGroupFieldSetup,\n handleAddGroup: handleAddGroup,\n handleCloneGroup: handleCloneGroup,\n handleRemoveGroup: handleRemoveGroup,\n handleToggleGroup: handleToggleGroup,\n handleToggleAllGroups: handleToggleAllGroups\n });\n }\n }]);\n\n return ComplexField;\n}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__[\"Component\"]);\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withSelect\"])(function (select, props) {\n var _select = select('carbon-fields/metaboxes'),\n getComplexGroupValues = _select.getComplexGroupValues;\n\n var groupValues = props.value.map(function (group) {\n var fieldIds = group.fields.map(function (field) {\n return field.id;\n });\n return [group.name, getComplexGroupValues(fieldIds)];\n });\n return {\n groupValues: groupValues\n };\n});\nvar applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_11__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n addFields = _dispatch.addFields,\n cloneFields = _dispatch.cloneFields,\n removeFields = _dispatch.removeFields;\n\n return {\n addFields: addFields,\n cloneFields: cloneFields,\n removeFields: removeFields\n };\n});\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__[\"addFilter\"])('carbon-fields.complex.metabox', 'carbon-fields/metaboxes', function (OriginalComplexField) {\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_10__[\"compose\"])(applyWithSelect, applyWithDispatch)(function (props) {\n var id = props.id,\n field = props.field,\n name = props.name,\n value = props.value,\n groupValues = props.groupValues;\n return wp.element.createElement(ComplexField, props, function (_ref2) {\n var allGroupsAreCollapsed = _ref2.allGroupsAreCollapsed,\n handleGroupSetup = _ref2.handleGroupSetup,\n handleGroupFieldSetup = _ref2.handleGroupFieldSetup,\n handleAddGroup = _ref2.handleAddGroup,\n handleCloneGroup = _ref2.handleCloneGroup,\n handleRemoveGroup = _ref2.handleRemoveGroup,\n handleToggleGroup = _ref2.handleToggleGroup,\n handleToggleAllGroups = _ref2.handleToggleAllGroups;\n return wp.element.createElement(OriginalComplexField, {\n groupIdKey: \"id\",\n groupFilterKey: \"name\",\n id: id,\n field: field,\n name: name,\n value: value,\n groupValues: groupValues,\n allGroupsAreCollapsed: allGroupsAreCollapsed,\n onGroupSetup: handleGroupSetup,\n onGroupFieldSetup: handleGroupFieldSetup,\n onAddGroup: handleAddGroup,\n onCloneGroup: handleCloneGroup,\n onRemoveGroup: handleRemoveGroup,\n onToggleGroup: handleToggleGroup,\n onToggleAllGroups: handleToggleAllGroups,\n onChange: props.onChange\n });\n });\n });\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/complex/index.js?"); /***/ }), @@ -571,7 +572,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/complex/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/complex/style.scss?"); /***/ }), @@ -583,7 +584,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.date_time.metabox', 'carbon-fields/metaboxes', function (OriginalDatetimeField) {\n return function (props) {\n return wp.element.createElement(OriginalDatetimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Date', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/datetime/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.date_time.metabox', 'carbon-fields/metaboxes', function (OriginalDatetimeField) {\n return function (props) {\n return wp.element.createElement(OriginalDatetimeField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonText: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Date', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/datetime/index.js?"); /***/ }), @@ -595,7 +596,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.file.metabox', 'carbon-fields/metaboxes', function (OriginalFileField) {\n return function (props) {\n return wp.element.createElement(OriginalFileField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select File', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use File', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select File', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/file/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.file.metabox', 'carbon-fields/metaboxes', function (OriginalFileField) {\n return function (props) {\n return wp.element.createElement(OriginalFileField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select File', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use File', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select File', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/file/index.js?"); /***/ }), @@ -607,7 +608,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.image.metabox', 'carbon-fields/metaboxes', function (OriginalImageField) {\n return function (props) {\n return wp.element.createElement(OriginalImageField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Image', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use Image', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Image', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/image/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n\n\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.image.metabox', 'carbon-fields/metaboxes', function (OriginalImageField) {\n return function (props) {\n return wp.element.createElement(OriginalImageField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Image', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use Image', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Image', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/image/index.js?"); /***/ }), @@ -619,7 +620,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./association */ \"./packages/metaboxes/fields/association/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./multiselect */ \"./packages/metaboxes/fields/multiselect/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _hocs_with_field__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hocs/with-field */ \"./packages/metaboxes/hocs/with-field/index.js\");\n/* harmony import */ var _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hocs/with-conditional-logic */ \"./packages/metaboxes/hocs/with-conditional-logic/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _association__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./association */ \"./packages/metaboxes/fields/association/index.js\");\n/* harmony import */ var _complex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./complex */ \"./packages/metaboxes/fields/complex/index.js\");\n/* harmony import */ var _datetime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./datetime */ \"./packages/metaboxes/fields/datetime/index.js\");\n/* harmony import */ var _file__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./file */ \"./packages/metaboxes/fields/file/index.js\");\n/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./image */ \"./packages/metaboxes/fields/image/index.js\");\n/* harmony import */ var _multiselect__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./multiselect */ \"./packages/metaboxes/fields/multiselect/index.js\");\n/* harmony import */ var _media_gallery__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./media-gallery */ \"./packages/metaboxes/fields/media-gallery/index.js\");\n/* harmony import */ var _radio__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./radio */ \"./packages/metaboxes/fields/radio/index.js\");\n/* harmony import */ var _sidebar__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./sidebar */ \"./packages/metaboxes/fields/sidebar/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * Connects every field to the store.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.field-edit.metabox', 'carbon-fields/metaboxes', Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_hocs_with_field__WEBPACK_IMPORTED_MODULE_4__[\"default\"], _hocs_with_conditional_logic__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__[\"withDispatch\"])(function (dispatch) {\n if (Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()) {\n var _dispatch = dispatch('core/editor'),\n lockPostSaving = _dispatch.lockPostSaving,\n unlockPostSaving = _dispatch.unlockPostSaving;\n\n return {\n lockSaving: lockPostSaving,\n unlockSaving: unlockPostSaving\n };\n }\n\n var _dispatch2 = dispatch('carbon-fields/metaboxes'),\n lockSaving = _dispatch2.lockSaving,\n unlockSaving = _dispatch2.unlockSaving;\n\n return {\n lockSaving: lockSaving,\n unlockSaving: unlockSaving\n };\n}), _carbon_fields_core__WEBPACK_IMPORTED_MODULE_3__[\"withValidation\"]));\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/index.js?"); /***/ }), @@ -631,7 +632,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/media-gallery/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * The internal dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.media_gallery.metabox', 'carbon-fields/metaboxes', function (OriginalMediaGalleryField) {\n return function (props) {\n return wp.element.createElement(OriginalMediaGalleryField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Attachments', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use Attachments', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Attachments', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/media-gallery/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/media-gallery/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_3__);\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * The internal dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.media_gallery.metabox', 'carbon-fields/metaboxes', function (OriginalMediaGalleryField) {\n return function (props) {\n return wp.element.createElement(OriginalMediaGalleryField, _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({\n buttonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Attachments', 'carbon-fields-ui'),\n mediaLibraryButtonLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Use Attachments', 'carbon-fields-ui'),\n mediaLibraryTitle: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Select Attachments', 'carbon-fields-ui')\n }, props));\n };\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/media-gallery/index.js?"); /***/ }), @@ -642,7 +643,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/media-gallery/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/media-gallery/style.scss?"); /***/ }), @@ -654,7 +655,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/multiselect/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/multiselect/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/multiselect/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Internal dependencies.\n */\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/multiselect/index.js?"); /***/ }), @@ -665,7 +666,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sty /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/multiselect/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/multiselect/style.scss?"); /***/ }), @@ -677,7 +678,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/radio/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * The internal dependencies.\n */\n\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/radio/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style.scss */ \"./packages/metaboxes/fields/radio/style.scss\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * The internal dependencies.\n */\n\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/radio/index.js?"); /***/ }), @@ -688,7 +689,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _sty /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { -eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/radio/style.scss?"); +eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/radio/style.scss?"); /***/ }), @@ -700,7 +701,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./pack /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.sidebar.metabox', 'carbon-fields/metaboxes', Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n receiveSidebar = _dispatch.receiveSidebar;\n\n return {\n onAdded: receiveSidebar\n };\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/fields/sidebar/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addFilter\"])('carbon-fields.sidebar.metabox', 'carbon-fields/metaboxes', Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n receiveSidebar = _dispatch.receiveSidebar;\n\n return {\n onAdded: receiveSidebar\n };\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/fields/sidebar/index.js?"); /***/ }), @@ -712,7 +713,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.containerId)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"fromSelector\"])(getFieldsByContainerId, props.containerId)), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.containerId);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(fields, function (field) {\n return field.container_id === props.containerId && Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-conditional-logic/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__);\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Returns all root fields from the given holder\n * while excluding some of them.\n *\n * @param {Object} fieldsHolder\n * @param {Object} allFields\n * @param {string[]} excludedIds\n * @return {Object[]}\n */\n\nfunction getFieldsFromFieldsHolder(fieldsHolder, allFields) {\n var excludedIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"pick\"])(allFields, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"difference\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fieldsHolder.fields, 'id'), excludedIds));\n}\n/**\n * Adds the `parent.` parent prefix to field's name.\n *\n * @param {Object[]} fields\n * @param {number} depth\n * @return {Array[]}\n */\n\n\nfunction mapParentPrefix(fields) {\n var depth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"map\"])(fields, function (field) {\n return [field.id, \"\".concat(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"repeat\"])('parent.', depth)).concat(field.base_name)];\n });\n}\n/**\n * The function used to track dependencies required\n * by conditional logic.\n *\n * @param {Object} props\n * @return {Object}\n */\n\n\nfunction input(props) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes'),\n getFieldsByContainerId = _select.getFieldsByContainerId;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getFieldsByContainerId(props.containerId)), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"fromSelector\"])(getFieldsByContainerId, props.containerId)), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isEqual\"]));\n}\n/**\n * The function that provides the data that needs to be\n * evaluated by conditional logic.\n *\n * @param {Object} props\n * @param {Object} fields\n * @return {Object}\n */\n\n\nfunction output(props, fields) {\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"keyBy\"])(fields, 'id');\n var container = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('carbon-fields/metaboxes').getContainerById(props.containerId);\n var isTopLevelField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"some\"])(container.fields, ['id', props.id]);\n var siblingFields = [];\n\n if (isTopLevelField) {\n siblingFields = getFieldsFromFieldsHolder(container, fields, [props.id]);\n siblingFields = mapParentPrefix(siblingFields);\n } else {\n var fieldName = props.name.replace(new RegExp(\"^\".concat(window.cf.config.compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1'); // Get the root field.\n\n var rootField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(fields, function (field) {\n return field.container_id === props.containerId && Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"startsWith\"])(fieldName, field.name);\n }); // Get the hierarchy.\n\n var path = fieldName.split(/\\[|\\]/g); // Remove the chunk with name of root field\n // because we already have it.\n\n path.shift(); // Remove any chunks that don't have a value.\n\n path = path.filter(function (chunk) {\n return chunk !== '';\n }); // Remove the chunk with name of field\n // because we don't needed it.\n\n path.pop(); // Keep reference to the depth\n // so we can add the `parent.` prefix.\n\n var depth = path.reduce(function (accumulator, chunk) {\n return isNaN(chunk) ? accumulator + 1 : accumulator;\n }, 0); // Collect fields that are siblings of root field.\n\n siblingFields = getFieldsFromFieldsHolder(container, fields, [rootField.id]);\n siblingFields = mapParentPrefix(siblingFields, depth + 1); // Keep reference to the full path of the field.\n\n var pathPrefix = \"\".concat(rootField.id, \".value\");\n\n while (path.length > 0) {\n var chunk = path.shift();\n var isGroup = !isNaN(chunk);\n var isNestedComplex = !isGroup;\n\n if (isGroup) {\n pathPrefix = \"\".concat(pathPrefix, \"[\").concat(chunk, \"]\");\n var group = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix);\n var groupFields = getFieldsFromFieldsHolder(group, fields, [props.id]);\n siblingFields = siblingFields.concat(mapParentPrefix(groupFields, depth));\n pathPrefix = \"\".concat(pathPrefix, \".fields\");\n }\n\n if (isNestedComplex) {\n var groupField = Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"find\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, pathPrefix), ['name', chunk]);\n pathPrefix = \"\".concat(groupField.id, \".value\");\n depth--;\n }\n }\n }\n\n siblingFields = siblingFields.map(function (_ref) {\n var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref, 2),\n id = _ref2[0],\n name = _ref2[1];\n\n return [name, Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"get\"])(fields, \"\".concat(id, \".value\"))];\n });\n return Object(lodash__WEBPACK_IMPORTED_MODULE_5__[\"fromPairs\"])(siblingFields);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_6__[\"withConditionalLogic\"])(input, output));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/hocs/with-conditional-logic/index.js?"); /***/ }), @@ -724,7 +725,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Creates a high-order component which adds connection\n * to the store.\n *\n * @param {Function} Component\n * @return {Function}\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"createHigherOrderComponent\"])(function (Component) {\n var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select, _ref) {\n var id = _ref.id;\n var container = select('carbon-fields/metaboxes').getContainerById(id);\n return {\n container: container\n };\n });\n return applyWithSelect(Component);\n}, 'withContainer'));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-container/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Creates a high-order component which adds connection\n * to the store.\n *\n * @param {Function} Component\n * @return {Function}\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"createHigherOrderComponent\"])(function (Component) {\n var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select, _ref) {\n var id = _ref.id;\n var container = select('carbon-fields/metaboxes').getContainerById(id);\n return {\n container: container\n };\n });\n return applyWithSelect(Component);\n}, 'withContainer'));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/hocs/with-container/index.js?"); /***/ }), @@ -736,7 +737,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Creates a high-order component which adds connection\n * to the store.\n *\n * @param {Function} Component\n * @return {Function}\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"createHigherOrderComponent\"])(function (Component) {\n var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select, props) {\n var _window$cf$config = window.cf.config,\n compactInput = _window$cf$config.compactInput,\n compactInputKey = _window$cf$config.compactInputKey;\n var field = select('carbon-fields/metaboxes').getFieldById(props.id);\n var value = field.value;\n var name = props.name || field.name;\n /**\n * Wrap top-level field names in compact input key.\n *\n * The fields in widgets don't need this prefix because\n * their input is already compacted by the `widget` namespace.\n */\n\n if (compactInput && !props.name && name.indexOf('widget-carbon_fields') === -1) {\n name = \"\".concat(compactInputKey, \"[\").concat(name, \"]\");\n }\n\n return {\n field: field,\n name: name,\n value: value\n };\n });\n var applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n updateFieldValue = _dispatch.updateFieldValue;\n\n return {\n onChange: updateFieldValue\n };\n });\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"compose\"])(applyWithSelect, applyWithDispatch)(Component);\n}, 'withField'));\n\n//# sourceURL=webpack:///./packages/metaboxes/hocs/with-field/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Creates a high-order component which adds connection\n * to the store.\n *\n * @param {Function} Component\n * @return {Function}\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"createHigherOrderComponent\"])(function (Component) {\n var applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select, props) {\n var _window$cf$config = window.cf.config,\n compactInput = _window$cf$config.compactInput,\n compactInputKey = _window$cf$config.compactInputKey;\n var field = select('carbon-fields/metaboxes').getFieldById(props.id);\n var value = field.value;\n var name = props.name || field.name;\n /**\n * Wrap top-level field names in compact input key.\n *\n * The fields in widgets don't need this prefix because\n * their input is already compacted by the `widget` namespace.\n */\n\n if (compactInput && !props.name && name.indexOf('widget-carbon_fields') === -1) {\n name = \"\".concat(compactInputKey, \"[\").concat(name, \"]\");\n }\n\n return {\n field: field,\n name: name,\n value: value\n };\n });\n var applyWithDispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withDispatch\"])(function (dispatch) {\n var _dispatch = dispatch('carbon-fields/metaboxes'),\n updateFieldValue = _dispatch.updateFieldValue;\n\n return {\n onChange: updateFieldValue\n };\n });\n return Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_1__[\"compose\"])(applyWithSelect, applyWithDispatch)(Component);\n}, 'withField'));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/hocs/with-field/index.js?"); /***/ }), @@ -744,11 +745,11 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /*!*************************************!*\ !*** ./packages/metaboxes/index.js ***! \*************************************/ -/*! no exports provided */ +/*! exports provided: registerContainerType, getContainerType */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./store */ \"./packages/metaboxes/store/index.js\");\n/* harmony import */ var _fields__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fields */ \"./packages/metaboxes/fields/index.js\");\n/* harmony import */ var _monitors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./monitors */ \"./packages/metaboxes/monitors/index.js\");\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n/**\n * Sets the locale data for the package type\n */\n\nObject(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"setLocaleData\"])(window.cf.config.locale, 'carbon-fields-ui');\n/**\n * Determines the rendering context.\n *\n * @type {string}\n */\n\nvar context = Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])() ? 'gutenberg' : 'classic';\n/**\n * Abracadabra! Poof! Containers everywhere ...\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addAction\"])('carbon-fields.init', 'carbon-fields/metaboxes', function () {\n Object(_containers__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(context);\n Object(_monitors__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(context);\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./store */ \"./packages/metaboxes/store/index.js\");\n/* harmony import */ var _fields__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fields */ \"./packages/metaboxes/fields/index.js\");\n/* harmony import */ var _monitors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./monitors */ \"./packages/metaboxes/monitors/index.js\");\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _containers_registry__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./containers/registry */ \"./packages/metaboxes/containers/registry.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"registerContainerType\", function() { return _containers_registry__WEBPACK_IMPORTED_MODULE_7__[\"registerContainerType\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getContainerType\", function() { return _containers_registry__WEBPACK_IMPORTED_MODULE_7__[\"getContainerType\"]; });\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n/**\n * Public API.\n */\n\n\n/**\n * Sets the locale data for the package type\n */\n\nObject(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"setLocaleData\"])(window.cf.config.locale, 'carbon-fields-ui');\n/**\n * Determines the rendering context.\n *\n * @type {string}\n */\n\nvar context = Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_6__[\"default\"])() ? 'gutenberg' : 'classic';\n/**\n * Abracadabra! Poof! Containers everywhere ...\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"addAction\"])('carbon-fields.init', 'carbon-fields/metaboxes', function () {\n Object(_containers__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(context);\n Object(_monitors__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(context);\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/index.js?"); /***/ }), @@ -760,7 +761,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PAGE_NOW_WIDGETS\", function() { return PAGE_NOW_WIDGETS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PAGE_NOW_CUSTOMIZE\", function() { return PAGE_NOW_CUSTOMIZE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CARBON_FIELDS_CONTAINER_ID_PREFIX\", function() { return CARBON_FIELDS_CONTAINER_ID_PREFIX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX\", function() { return CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX; });\nvar PAGE_NOW_WIDGETS = 'widgets.php';\nvar PAGE_NOW_CUSTOMIZE = 'customize.php';\nvar CARBON_FIELDS_CONTAINER_ID_PREFIX = 'carbon_fields_container_';\nvar CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX = 'carbon_fields_';\n\n//# sourceURL=webpack:///./packages/metaboxes/lib/constants.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PAGE_NOW_WIDGETS\", function() { return PAGE_NOW_WIDGETS; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"PAGE_NOW_CUSTOMIZE\", function() { return PAGE_NOW_CUSTOMIZE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CARBON_FIELDS_CONTAINER_ID_PREFIX\", function() { return CARBON_FIELDS_CONTAINER_ID_PREFIX; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX\", function() { return CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX; });\nvar PAGE_NOW_WIDGETS = 'widgets.php';\nvar PAGE_NOW_CUSTOMIZE = 'customize.php';\nvar CARBON_FIELDS_CONTAINER_ID_PREFIX = 'carbon_fields_container_';\nvar CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX = 'carbon_fields_';\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/lib/constants.js?"); /***/ }), @@ -772,7 +773,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return aperture; });\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _post_parent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./post-parent */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-parent.js\");\n/* harmony import */ var _post_format__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./post-format */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-format.js\");\n/* harmony import */ var _post_template__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./post-template */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-template.js\");\n/* harmony import */ var _post_term__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./post-term */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-term.js\");\n/* harmony import */ var _term_parent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./term-parent */ \"./packages/metaboxes/monitors/conditional-display/aperture/term-parent.js\");\n/* harmony import */ var _user_role__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./user-role */ \"./packages/metaboxes/monitors/conditional-display/aperture/user-role.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @param {Object} props\n * @param {string} props.context\n * @return {Object}\n */\n// eslint-disable-next-line no-unused-vars\n\nfunction aperture(component, _ref) {\n var context = _ref.context;\n var postParent$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-parent.\".concat(context));\n var postFormat$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-format.\".concat(context));\n var postTemplate$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-template.\".concat(context));\n var postTerm$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-term.\".concat(context));\n var termParent$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-term-parent.\".concat(context));\n var userRole$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-user-role.\".concat(context));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(postParent$, postFormat$, postTemplate$, postTerm$, termParent$, userRole$), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"scan\"])(function (previous, current) {\n return immer__WEBPACK_IMPORTED_MODULE_0___default()(previous, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"assign\"])(draft, current);\n });\n }));\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return aperture; });\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _post_parent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./post-parent */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-parent.js\");\n/* harmony import */ var _post_format__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./post-format */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-format.js\");\n/* harmony import */ var _post_template__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./post-template */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-template.js\");\n/* harmony import */ var _post_term__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./post-term */ \"./packages/metaboxes/monitors/conditional-display/aperture/post-term.js\");\n/* harmony import */ var _term_parent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./term-parent */ \"./packages/metaboxes/monitors/conditional-display/aperture/term-parent.js\");\n/* harmony import */ var _user_role__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./user-role */ \"./packages/metaboxes/monitors/conditional-display/aperture/user-role.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * The function that controls the stream of side effects.\n *\n * @param {Object} props\n * @param {string} props.context\n * @return {Object}\n */\n// eslint-disable-next-line no-unused-vars\n\nfunction aperture(component, _ref) {\n var context = _ref.context;\n var postParent$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-parent.\".concat(context));\n var postFormat$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-format.\".concat(context));\n var postTemplate$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-template.\".concat(context));\n var postTerm$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-post-term.\".concat(context));\n var termParent$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-term-parent.\".concat(context));\n var userRole$ = Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__[\"applyFilters\"])(\"carbon-fields.conditional-display-user-role.\".concat(context));\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"merge\"])(postParent$, postFormat$, postTemplate$, postTerm$, termParent$, userRole$), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"scan\"])(function (previous, current) {\n return immer__WEBPACK_IMPORTED_MODULE_0___default()(previous, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"assign\"])(draft, current);\n });\n }));\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/index.js?"); /***/ }), @@ -784,7 +785,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-from-delegated-event */ \"./node_modules/callbag-from-delegated-event/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_format: 'standard'\n};\n/**\n * Extracts `post_format` from the input.\n *\n * @param {Object} input\n * @return {Object}\n */\n\nfunction getPostFormatFromRadioInput(input) {\n var value = input.value; // Normalize the value of \"Standard\" input.\n\n if (value === '0') {\n value = 'standard';\n }\n\n return {\n post_format: value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-format.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('div#post-formats-select');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(node, 'input.post-format', 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getPostFormatFromRadioInput(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getPostFormatFromRadioInput(node.querySelector('input.post-format:checked'))));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-format.gutenberg', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'format'), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(Boolean), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (postFormat) {\n return {\n post_format: postFormat\n };\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/post-format.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-from-delegated-event */ \"./node_modules/callbag-from-delegated-event/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_format: 'standard'\n};\n/**\n * Extracts `post_format` from the input.\n *\n * @param {Object} input\n * @return {Object}\n */\n\nfunction getPostFormatFromRadioInput(input) {\n var value = input.value; // Normalize the value of \"Standard\" input.\n\n if (value === '0') {\n value = 'standard';\n }\n\n return {\n post_format: value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-format.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('div#post-formats-select');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(node, 'input.post-format', 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getPostFormatFromRadioInput(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getPostFormatFromRadioInput(node.querySelector('input.post-format:checked'))));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-format.gutenberg', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'format'), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(Boolean), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (postFormat) {\n return {\n post_format: postFormat\n };\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/post-format.js?"); /***/ }), @@ -796,7 +797,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var call /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/get-parent-id-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js\");\n/* harmony import */ var _utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/* harmony import */ var _utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/get-ancestors-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_ancestors: [],\n post_parent_id: 0,\n post_level: 1\n};\n/**\n * Extracts the `post_ancestors`, `post_parent_id` & `post_level` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getParentIdAncestorsAndLevelFromSelect(node) {\n var option = node.options[node.selectedIndex];\n var ancestors = Object(_utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(option);\n var parentId = Object(_utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(option);\n var level = Object(_utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(option) + 1;\n return {\n post_ancestors: ancestors,\n post_parent_id: parentId,\n post_level: level\n };\n}\n/**\n * Extracts `post_ancestors` from the list.\n *\n * @param {number} parentId\n * @param {Object[]} posts\n * @param {Array} ancestors\n * @return {number[]}\n */\n\n\nfunction getAncestorsFromPostsList(parentId, posts) {\n var ancestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var parent = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"find\"])(posts, ['id', parentId]);\n\n if (!parent) {\n return ancestors;\n }\n\n ancestors.unshift(parent.id);\n\n if (parent.parent) {\n return getAncestorsFromPostsList(parent.parent, posts, ancestors);\n }\n\n return ancestors;\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-parent.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#parent_id');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getParentIdAncestorsAndLevelFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(getParentIdAncestorsAndLevelFromSelect(node)));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-parent.gutenberg', 'carbon-fields/metaboxes', function () {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core'),\n getPostType = _select.getPostType,\n getEntityRecords = _select.getEntityRecords;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"combine\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getCurrentPostId), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'type'), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'parent')), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_6__[\"isEqual\"]), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"map\"])(function (_ref2) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref2, 3),\n postId = _ref3[0],\n postTypeSlug = _ref3[1],\n parentId = _ref3[2];\n\n parentId = parseInt(parentId, 10);\n\n if (isNaN(parentId)) {\n return INITIAL_STATE;\n }\n\n var postType = getPostType(postTypeSlug);\n var isHierarchical = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(postType, ['hierarchical'], false);\n\n if (!isHierarchical) {\n return INITIAL_STATE;\n } // Borrowed from https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/page-attributes/parent.js\n\n\n var items = getEntityRecords('postType', postTypeSlug, {\n per_page: -1,\n exclude: postId,\n parent_exclude: postId,\n orderby: 'menu_order',\n order: 'asc'\n }) || [];\n var ancestors = getAncestorsFromPostsList(parentId, items);\n var level = ancestors.length + 1;\n return {\n post_ancestors: ancestors,\n post_parent_id: parentId,\n post_level: level\n };\n }));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/post-parent.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/get-parent-id-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js\");\n/* harmony import */ var _utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/* harmony import */ var _utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/get-ancestors-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_ancestors: [],\n post_parent_id: 0,\n post_level: 1\n};\n/**\n * Extracts the `post_ancestors`, `post_parent_id` & `post_level` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getParentIdAncestorsAndLevelFromSelect(node) {\n var option = node.options[node.selectedIndex];\n var ancestors = Object(_utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(option);\n var parentId = Object(_utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(option);\n var level = Object(_utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(option) + 1;\n return {\n post_ancestors: ancestors,\n post_parent_id: parentId,\n post_level: level\n };\n}\n/**\n * Extracts `post_ancestors` from the list.\n *\n * @param {number} parentId\n * @param {Object[]} posts\n * @param {Array} ancestors\n * @return {number[]}\n */\n\n\nfunction getAncestorsFromPostsList(parentId, posts) {\n var ancestors = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var parent = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"find\"])(posts, ['id', parentId]);\n\n if (!parent) {\n return ancestors;\n }\n\n ancestors.unshift(parent.id);\n\n if (parent.parent) {\n return getAncestorsFromPostsList(parent.parent, posts, ancestors);\n }\n\n return ancestors;\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-parent.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#parent_id');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getParentIdAncestorsAndLevelFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(getParentIdAncestorsAndLevelFromSelect(node)));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__[\"addFilter\"])('carbon-fields.conditional-display-post-parent.gutenberg', 'carbon-fields/metaboxes', function () {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core'),\n getPostType = _select.getPostType,\n getEntityRecords = _select.getEntityRecords;\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"combine\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getCurrentPostId), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'type'), Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_8__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__[\"select\"])('core/editor').getEditedPostAttribute, 'parent')), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(lodash__WEBPACK_IMPORTED_MODULE_6__[\"isEqual\"]), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_7__[\"map\"])(function (_ref2) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref2, 3),\n postId = _ref3[0],\n postTypeSlug = _ref3[1],\n parentId = _ref3[2];\n\n parentId = parseInt(parentId, 10);\n\n if (isNaN(parentId)) {\n return INITIAL_STATE;\n }\n\n var postType = getPostType(postTypeSlug);\n var isHierarchical = Object(lodash__WEBPACK_IMPORTED_MODULE_6__[\"get\"])(postType, ['hierarchical'], false);\n\n if (!isHierarchical) {\n return INITIAL_STATE;\n } // Borrowed from https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/page-attributes/parent.js\n\n\n var items = getEntityRecords('postType', postTypeSlug, {\n per_page: -1,\n exclude: postId,\n parent_exclude: postId,\n orderby: 'menu_order',\n order: 'asc'\n }) || [];\n var ancestors = getAncestorsFromPostsList(parentId, items);\n var level = ancestors.length + 1;\n return {\n post_ancestors: ancestors,\n post_parent_id: parentId,\n post_level: level\n };\n }));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/post-parent.js?"); /***/ }), @@ -808,7 +809,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_template: ''\n};\n/**\n * Extracts `post_template` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getPostTemplateFromSelect(node) {\n return {\n post_template: node.value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__[\"addFilter\"])('carbon-fields.conditional-display-post-template.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#page_template');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getPostTemplateFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getPostTemplateFromSelect(node)));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__[\"addFilter\"])('carbon-fields.conditional-display-post-template.gutenberg', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('core/editor').getEditedPostAttribute, 'template'), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isString\"]), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (postTemplate) {\n return {\n post_template: postTemplate\n };\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/post-template.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! callbag-distinct-until-changed */ \"./node_modules/callbag-distinct-until-changed/dist/callbag-distinct-until-changed.es.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n post_template: ''\n};\n/**\n * Extracts `post_template` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getPostTemplateFromSelect(node) {\n var value = node.value; // In Gutenberg for the \"Default\" template is used an empty string.\n\n if (value === 'default') {\n value = '';\n }\n\n return {\n post_template: value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__[\"addFilter\"])('carbon-fields.conditional-display-post-template.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#page_template');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getPostTemplateFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getPostTemplateFromSelect(node)));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__[\"addFilter\"])('carbon-fields.conditional-display-post-template.gutenberg', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_7__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__[\"select\"])('core/editor').getEditedPostAttribute, 'template'), Object(callbag_distinct_until_changed__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(lodash__WEBPACK_IMPORTED_MODULE_5__[\"isString\"]), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (postTemplate) {\n return {\n post_template: postTemplate\n };\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(INITIAL_STATE));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/post-template.js?"); /***/ }), @@ -820,7 +821,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var call /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! callbag-from-delegated-event */ \"./node_modules/callbag-from-delegated-event/index.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Applies a monkey patch to the specified method of `window.tagBox` API\n * so we can detect changes of the non-hierarchical taxonomies.\n *\n * @param {Object} tagBox\n * @param {string} method\n * @return {void}\n */\n\nfunction patchWordPressTagBoxAPI(tagBox, method) {\n tagBox[\"original_\".concat(method)] = tagBox[method];\n\n tagBox[method] = function () {\n var event = new Event('change');\n var textarea = window.jQuery(arguments.length <= 0 ? undefined : arguments[0]).closest('.postbox').find('textarea.the-tags').get(0);\n var result = tagBox[\"original_\".concat(method)].apply(tagBox, arguments);\n textarea.dispatchEvent(event);\n return result;\n };\n}\n\nif (window.tagBox) {\n patchWordPressTagBoxAPI(window.tagBox, 'parseTags');\n patchWordPressTagBoxAPI(window.tagBox, 'flushTags');\n}\n/**\n * Extracts the terms of a hierarchical taxonomy.\n *\n * @param {string} taxonomy\n * @return {Object}\n */\n\n\nfunction getTermsFromChecklist(taxonomy) {\n var inputs = document.querySelectorAll(\"#\".concat(taxonomy, \"checklist input[type=\\\"checkbox\\\"]:checked\"));\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(inputs).reduce(function (memo, input) {\n var value = parseInt(input.value, 10);\n memo[taxonomy].push(value);\n return memo;\n }, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, []));\n}\n/**\n * Extracts the terms of a non-hierarchical taxonomy.\n *\n * @param {string} taxonomy\n * @return {Object}\n */\n\n\nfunction getTermsFromText(taxonomy) {\n var node = document.querySelector(\"#tagsdiv-\".concat(taxonomy, \" textarea.the-tags\"));\n var terms = node.value ? node.value.split(window.tagsSuggestL10n.tagDelimiter) : [];\n return _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, terms);\n}\n/**\n * Keeps track of the hierarchical taxonomies like `categories`.\n *\n * @return {Function}\n */\n\n\nfunction trackHierarchicalTaxonomies() {\n var nodes = document.querySelectorAll('div[id^=\"taxonomy-\"]');\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(nodes).map(function (node) {\n var taxonomy = node.id.replace('taxonomy-', '');\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(node.querySelector(\"#\".concat(taxonomy, \"checklist\")), 'input[type=\"checkbox\"]', 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"scan\"])(function (stack, _ref2) {\n var target = _ref2.target;\n return immer__WEBPACK_IMPORTED_MODULE_3___default()(stack, function (draft) {\n var value = parseInt(target.value, 10);\n\n if (target.checked) {\n draft[taxonomy].push(value);\n } else {\n Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"pull\"])(draft[taxonomy], value);\n }\n });\n }, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, [])), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(getTermsFromChecklist(taxonomy)));\n });\n}\n/**\n * Keeps track of the non-hierarchical taxonomies like `tags`.\n *\n * @return {Function}\n */\n\n\nfunction trackNonHierarchicalTaxonomies() {\n var nodes = document.querySelectorAll('div[id^=\"tagsdiv-\"]');\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(nodes).map(function (node) {\n var taxonomy = node.id.replace('tagsdiv-', '');\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"fromEvent\"])(node.querySelector('textarea.the-tags'), 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref3) {\n var target = _ref3.target;\n return _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, target.value ? target.value.split(window.tagsSuggestL10n.tagDelimiter) : []);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(getTermsFromText(taxonomy)));\n });\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__[\"addFilter\"])('carbon-fields.conditional-display-post-term.classic', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"merge\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(trackHierarchicalTaxonomies()).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(trackNonHierarchicalTaxonomies()))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"scan\"])(function (previous, current) {\n return {\n post_term: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, previous.post_term, current)\n };\n }, {\n post_term: {}\n }));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__[\"addFilter\"])('carbon-fields.conditional-display-post-term.gutenberg', 'carbon-fields/metaboxes', function () {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__[\"select\"])('core'),\n getTaxonomies = _select.getTaxonomies;\n\n var _select2 = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__[\"select\"])('core/editor'),\n getEditedPostAttribute = _select2.getEditedPostAttribute; // Borrowed from https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/post-taxonomies/index.js\n\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__[\"fromSelector\"])(getTaxonomies, {\n per_page: -1\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(Boolean), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (taxonomies) {\n var pairs = taxonomies.map(function (taxonomy) {\n return [taxonomy.slug, getEditedPostAttribute(taxonomy.rest_base) || []];\n });\n return {\n post_term: Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"fromPairs\"])(pairs)\n };\n }));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/post-term.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! callbag-from-delegated-event */ \"./node_modules/callbag-from-delegated-event/index.js\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__);\n\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Applies a monkey patch to the specified method of `window.tagBox` API\n * so we can detect changes of the non-hierarchical taxonomies.\n *\n * @param {Object} tagBox\n * @param {string} method\n * @return {void}\n */\n\nfunction patchWordPressTagBoxAPI(tagBox, method) {\n tagBox[\"original_\".concat(method)] = tagBox[method];\n\n tagBox[method] = function () {\n var event = new Event('change');\n var textarea = window.jQuery(arguments.length <= 0 ? undefined : arguments[0]).closest('.postbox').find('textarea.the-tags').get(0);\n var result = tagBox[\"original_\".concat(method)].apply(tagBox, arguments);\n textarea.dispatchEvent(event);\n return result;\n };\n}\n\nif (window.tagBox) {\n patchWordPressTagBoxAPI(window.tagBox, 'parseTags');\n patchWordPressTagBoxAPI(window.tagBox, 'flushTags');\n}\n/**\n * Extracts the terms of a hierarchical taxonomy.\n *\n * @param {string} taxonomy\n * @return {Object}\n */\n\n\nfunction getTermsFromChecklist(taxonomy) {\n var inputs = document.querySelectorAll(\"#\".concat(taxonomy, \"checklist input[type=\\\"checkbox\\\"]:checked\"));\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(inputs).reduce(function (memo, input) {\n var value = parseInt(input.value, 10);\n memo[taxonomy].push(value);\n return memo;\n }, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, []));\n}\n/**\n * Extracts the terms of a non-hierarchical taxonomy.\n *\n * @param {string} taxonomy\n * @return {Object}\n */\n\n\nfunction getTermsFromText(taxonomy) {\n var node = document.querySelector(\"#tagsdiv-\".concat(taxonomy, \" textarea.the-tags\"));\n var terms = node.value ? node.value.split(window.tagsSuggestL10n.tagDelimiter) : [];\n return _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, terms);\n}\n/**\n * Keeps track of the hierarchical taxonomies like `categories`.\n *\n * @return {Function}\n */\n\n\nfunction trackHierarchicalTaxonomies() {\n var nodes = document.querySelectorAll('div[id^=\"taxonomy-\"]');\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(nodes).map(function (node) {\n var taxonomy = node.id.replace('taxonomy-', '');\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_from_delegated_event__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(node.querySelector(\"#\".concat(taxonomy, \"checklist\")), 'input[type=\"checkbox\"]', 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"scan\"])(function (stack, _ref2) {\n var target = _ref2.target;\n return immer__WEBPACK_IMPORTED_MODULE_3___default()(stack, function (draft) {\n var value = parseInt(target.value, 10);\n\n if (target.checked) {\n draft[taxonomy].push(value);\n } else {\n Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"pull\"])(draft[taxonomy], value);\n }\n });\n }, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, [])), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(getTermsFromChecklist(taxonomy)));\n });\n}\n/**\n * Keeps track of the non-hierarchical taxonomies like `tags`.\n *\n * @return {Function}\n */\n\n\nfunction trackNonHierarchicalTaxonomies() {\n var nodes = document.querySelectorAll('div[id^=\"tagsdiv-\"]');\n return _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(nodes).map(function (node) {\n var taxonomy = node.id.replace('tagsdiv-', '');\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"fromEvent\"])(node.querySelector('textarea.the-tags'), 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (_ref3) {\n var target = _ref3.target;\n return _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, taxonomy, target.value ? target.value.split(window.tagsSuggestL10n.tagDelimiter) : []);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(getTermsFromText(taxonomy)));\n });\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__[\"addFilter\"])('carbon-fields.conditional-display-post-term.classic', 'carbon-fields/metaboxes', function () {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"merge\"].apply(void 0, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(trackHierarchicalTaxonomies()).concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_2___default()(trackNonHierarchicalTaxonomies()))), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"scan\"])(function (previous, current) {\n return {\n post_term: _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, previous.post_term, current)\n };\n }, {\n post_term: {}\n }));\n});\n/**\n * Defines the side effects for Gutenberg.\n */\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__[\"addFilter\"])('carbon-fields.conditional-display-post-term.gutenberg', 'carbon-fields/metaboxes', function () {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__[\"select\"])('core'),\n getTaxonomies = _select.getTaxonomies;\n\n var _select2 = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__[\"select\"])('core/editor'),\n getEditedPostAttribute = _select2.getEditedPostAttribute; // Borrowed from https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/post-taxonomies/index.js\n\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"pipe\"])(Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_10__[\"fromSelector\"])(getTaxonomies, {\n per_page: -1\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"filter\"])(Boolean), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_6__[\"map\"])(function (taxonomies) {\n var pairs = taxonomies.map(function (taxonomy) {\n return [taxonomy.slug, getEditedPostAttribute(taxonomy.rest_base) || []];\n });\n return {\n post_term: Object(lodash__WEBPACK_IMPORTED_MODULE_9__[\"fromPairs\"])(pairs)\n };\n }));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/post-term.js?"); /***/ }), @@ -832,7 +833,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/get-parent-id-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js\");\n/* harmony import */ var _utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/* harmony import */ var _utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/get-ancestors-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n term_ancestors: [],\n term_parent: 0,\n term_level: 1\n};\n/**\n * Extracts the `term_ancestors`, `term_parent` & `term_level` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getParentIdAncestorsAndLevelFromSelect(node) {\n var option = node.options[node.selectedIndex];\n var ancestors = Object(_utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(option);\n var parentId = Object(_utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(option);\n var level = Object(_utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(option) + 1;\n return {\n term_ancestors: ancestors,\n term_parent: parentId,\n term_level: level\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.conditional-display-term-parent.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#parent');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getParentIdAncestorsAndLevelFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getParentIdAncestorsAndLevelFromSelect(node)));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/term-parent.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/get-parent-id-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js\");\n/* harmony import */ var _utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/* harmony import */ var _utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/get-ancestors-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n term_ancestors: [],\n term_parent: 0,\n term_level: 1\n};\n/**\n * Extracts the `term_ancestors`, `term_parent` & `term_level` from the select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getParentIdAncestorsAndLevelFromSelect(node) {\n var option = node.options[node.selectedIndex];\n var ancestors = Object(_utils_get_ancestors_from_option__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(option);\n var parentId = Object(_utils_get_parent_id_from_option__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(option);\n var level = Object(_utils_get_level_from_option__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(option) + 1;\n return {\n term_ancestors: ancestors,\n term_parent: parentId,\n term_level: level\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.conditional-display-term-parent.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#parent');\n\n if (!node) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getParentIdAncestorsAndLevelFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getParentIdAncestorsAndLevelFromSelect(node)));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/term-parent.js?"); /***/ }), @@ -844,7 +845,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var call /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n user_role: ''\n};\n/**\n * Extracts `user_role` from a select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getRoleFromSelect(node) {\n return {\n user_role: node.value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.conditional-display-user-role.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#role');\n\n if (!node) {\n var fieldset = document.querySelector('fieldset[data-profile-role]'); // The selectbox doesn't exist on the \"Profile\" page.\n // So we need to read the role from the container in DOM.\n\n if (fieldset) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n user_role: fieldset.dataset.profileRole\n });\n }\n\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getRoleFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getRoleFromSelect(node)));\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/aperture/user-role.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var callbag_of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-of */ \"./node_modules/callbag-of/dist/callbag-of.esm.js\");\n/* harmony import */ var callbag_start_with__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! callbag-start-with */ \"./node_modules/callbag-start-with/index.js\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ \"@wordpress/hooks\");\n/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_3__);\n/**\n * External dependencies.\n */\n\n\n\n\n/**\n * The default state.\n *\n * @type {Object}\n */\n\nvar INITIAL_STATE = {\n user_role: ''\n};\n/**\n * Extracts `user_role` from a select.\n *\n * @param {Object} node\n * @return {Object}\n */\n\nfunction getRoleFromSelect(node) {\n return {\n user_role: node.value\n };\n}\n/**\n * Defines the side effects for Classic Editor.\n */\n\n\nObject(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__[\"addFilter\"])('carbon-fields.conditional-display-user-role.classic', 'carbon-fields/metaboxes', function () {\n var node = document.querySelector('select#role');\n\n if (!node) {\n var fieldset = document.querySelector('fieldset[data-profile-role]'); // The selectbox doesn't exist on the \"Profile\" page.\n // So we need to read the role from the container in DOM.\n\n if (fieldset) {\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n user_role: fieldset.dataset.profileRole\n });\n }\n\n return Object(callbag_of__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(INITIAL_STATE);\n }\n\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"pipe\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"fromEvent\"])(node, 'change'), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(function (_ref) {\n var target = _ref.target;\n return getRoleFromSelect(target);\n }), Object(callbag_start_with__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(getRoleFromSelect(node)));\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/aperture/user-role.js?"); /***/ }), @@ -856,7 +857,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var call /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['IN', 'NOT IN'],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case 'IN':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"intersection\"])(a, b).length > 0;\n\n case 'NOT IN':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"intersection\"])(a, b).length === 0;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['IN', 'NOT IN'],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case 'IN':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"intersection\"])(a, b).length > 0;\n\n case 'NOT IN':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"intersection\"])(a, b).length === 0;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js?"); /***/ }), @@ -868,7 +869,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['=', '!='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '=':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"includes\"])(a, b);\n\n case '!=':\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"includes\"])(a, b);\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['=', '!='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '=':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"includes\"])(a, b);\n\n case '!=':\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"includes\"])(a, b);\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js?"); /***/ }), @@ -880,7 +881,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n /**\n * The supported operators.\n *\n * @type {string[]}\n */\n operators: [],\n\n /**\n * Checks if the operator is supported.\n *\n * @param {string} operator\n * @return {boolean}\n */\n isOperatorSupported: function isOperatorSupported(operator) {\n return this.operators.indexOf(operator) > -1;\n },\n\n /**\n * Performs the comparison.\n *\n * @param {mixed} a\n * @param {string} operator\n * @param {mixed} b\n * @return {boolean}\n */\n evaluate: function evaluate() {\n return false;\n }\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/base.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n /**\n * The supported operators.\n *\n * @type {string[]}\n */\n operators: [],\n\n /**\n * Checks if the operator is supported.\n *\n * @param {string} operator\n * @return {boolean}\n */\n isOperatorSupported: function isOperatorSupported(operator) {\n return this.operators.indexOf(operator) > -1;\n },\n\n /**\n * Performs the comparison.\n *\n * @param {mixed} a\n * @param {string} operator\n * @param {mixed} b\n * @return {boolean}\n */\n evaluate: function evaluate() {\n return false;\n }\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/comparers/base.js?"); /***/ }), @@ -892,7 +893,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['IN', 'NOT IN'],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case 'IN':\n return b.indexOf(a) > -1;\n\n case 'NOT IN':\n return b.indexOf(a) === -1;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/contain.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['IN', 'NOT IN'],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case 'IN':\n return b.indexOf(a) > -1;\n\n case 'NOT IN':\n return b.indexOf(a) === -1;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/comparers/contain.js?"); /***/ }), @@ -904,7 +905,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/* eslint eqeqeq: \"off\" */\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['=', '!='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '=':\n return a == b;\n\n case '!=':\n return a != b;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/equality.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/* eslint eqeqeq: \"off\" */\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['=', '!='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '=':\n return a == b;\n\n case '!=':\n return a != b;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/comparers/equality.js?"); /***/ }), @@ -916,7 +917,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['>', '>=', '<', '<='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '>':\n return a > b;\n\n case '>=':\n return a >= b;\n\n case '<':\n return a < b;\n\n case '<=':\n return a <= b;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/comparers/scalar.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/comparers/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n operators: ['>', '>=', '<', '<='],\n\n /**\n * @inheritdoc\n */\n evaluate: function evaluate(a, operator, b) {\n switch (operator) {\n case '>':\n return a > b;\n\n case '>=':\n return a >= b;\n\n case '<':\n return a < b;\n\n case '<=':\n return a <= b;\n\n default:\n return false;\n }\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/comparers/scalar.js?"); /***/ }), @@ -928,7 +929,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/equality.js\");\n/* harmony import */ var _comparers_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/contain.js\");\n/* harmony import */ var _comparers_scalar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../comparers/scalar */ \"./packages/metaboxes/monitors/conditional-display/comparers/scalar.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n /**\n * The supported comparers.\n *\n * @type {Function[]}\n */\n comparers: [_comparers_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _comparers_scalar__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n\n /**\n * Checks if the condition is fulfiled.\n *\n * @param {Object} definition\n * @param {Object} values\n * @return {boolean}\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare,\n value = definition.value;\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * Checks if any comparer is correct for `a` and `b`.\n *\n * @param {mixed} a\n * @param {string} operator\n * @param {mixed} b\n * @return {boolean}\n */\n firstComparerIsCorrect: function firstComparerIsCorrect(a, operator, b) {\n var comparer = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"find\"])(this.comparers, function (item) {\n return item.isOperatorSupported(operator);\n });\n\n if (!comparer) {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('Unsupported container condition comparison operator used - \"%1$s\".', 'carbon-fields-ui'), operator));\n return false;\n }\n\n return comparer.evaluate(a, operator, b);\n },\n\n /**\n * Returns the value from the environment.\n *\n * @param {Object} definition\n * @param {Object} values\n * @return {Object}\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return values[definition.type];\n }\n});\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/base.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/equality.js\");\n/* harmony import */ var _comparers_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/contain.js\");\n/* harmony import */ var _comparers_scalar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../comparers/scalar */ \"./packages/metaboxes/monitors/conditional-display/comparers/scalar.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n /**\n * The supported comparers.\n *\n * @type {Function[]}\n */\n comparers: [_comparers_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"], _comparers_scalar__WEBPACK_IMPORTED_MODULE_4__[\"default\"]],\n\n /**\n * Checks if the condition is fulfiled.\n *\n * @param {Object} definition\n * @param {Object} values\n * @return {boolean}\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare,\n value = definition.value;\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * Checks if any comparer is correct for `a` and `b`.\n *\n * @param {mixed} a\n * @param {string} operator\n * @param {mixed} b\n * @return {boolean}\n */\n firstComparerIsCorrect: function firstComparerIsCorrect(a, operator, b) {\n var comparer = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"find\"])(this.comparers, function (item) {\n return item.isOperatorSupported(operator);\n });\n\n if (!comparer) {\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__[\"__\"])('Unsupported container condition comparison operator used - \"%1$s\".', 'carbon-fields-ui'), operator));\n return false;\n }\n\n return comparer.evaluate(a, operator, b);\n },\n\n /**\n * Returns the value from the environment.\n *\n * @param {Object} definition\n * @param {Object} values\n * @return {Object}\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return values[definition.type];\n }\n});\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/base.js?"); /***/ }), @@ -940,7 +941,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue() {\n return true;\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/boolean.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue() {\n return true;\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/boolean.js?"); /***/ }), @@ -952,7 +953,19 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/any-contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, 'post_ancestors', []);\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/post-ancestor-id.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/any-contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, 'post_ancestors', []);\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/post-ancestor-id.js?"); + +/***/ }), + +/***/ "./packages/metaboxes/monitors/conditional-display/conditions/post-template.js": +/*!*************************************************************************************!*\ + !*** ./packages/metaboxes/monitors/conditional-display/conditions/post-template.js ***! + \*************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * Internal dependencies.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n definition = _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, definition); // In Gutenberg for the \"Default\" template is used an empty string.\n\n if (definition.value === 'default') {\n definition.value = '';\n }\n\n return _base__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isFulfiled(definition, values);\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/post-template.js?"); /***/ }), @@ -964,7 +977,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var _this = this;\n\n var compare = definition.compare,\n value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n var method;\n\n switch (compare) {\n case 'IN':\n compare = '=';\n method = 'some';\n break;\n\n case 'NOT IN':\n compare = '!=';\n method = 'every';\n break;\n\n default:\n return false;\n }\n\n var results = value.map(function (descriptor) {\n return _this.isFulfiled(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, definition, {\n compare: compare,\n value: descriptor\n }), values);\n });\n return results[method](Boolean);\n } // TODO: Improve value resolution in context of Gutenberg\n\n\n value = value.taxonomy_object.hierarchical ? value.term_object.term_id : value.term_object.name;\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, \"post_term.\".concat(definition.value.taxonomy), []);\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/post-term.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var _this = this;\n\n var compare = definition.compare,\n value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n var method;\n\n switch (compare) {\n case 'IN':\n compare = '=';\n method = 'some';\n break;\n\n case 'NOT IN':\n compare = '!=';\n method = 'every';\n break;\n\n default:\n return false;\n }\n\n var results = value.map(function (descriptor) {\n return _this.isFulfiled(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, definition, {\n compare: compare,\n value: descriptor\n }), values);\n });\n return results[method](Boolean);\n } // TODO: Improve value resolution in context of Gutenberg\n\n\n value = value.taxonomy_object.hierarchical ? value.term_object.term_id : value.term_object.name;\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, \"post_term.\".concat(definition.value.taxonomy), []);\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/post-term.js?"); /***/ }), @@ -976,7 +989,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/any-contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare;\n var value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n value = value.map(function (item) {\n return item.term_object.term_id;\n });\n } else if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isPlainObject\"])(value)) {\n value = value.term_object.term_id;\n }\n\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, 'term_ancestors', []);\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/term-ancestor-id.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../comparers/any-equality */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-equality.js\");\n/* harmony import */ var _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../comparers/any-contain */ \"./packages/metaboxes/monitors/conditional-display/comparers/any-contain.js\");\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n /**\n * @inheritdoc\n */\n comparers: [_comparers_any_equality__WEBPACK_IMPORTED_MODULE_2__[\"default\"], _comparers_any_contain__WEBPACK_IMPORTED_MODULE_3__[\"default\"]],\n\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare;\n var value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n value = value.map(function (item) {\n return item.term_object.term_id;\n });\n } else if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isPlainObject\"])(value)) {\n value = value.term_object.term_id;\n }\n\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n },\n\n /**\n * @inheritdoc\n */\n getEnvironmentValue: function getEnvironmentValue(definition, values) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(values, 'term_ancestors', []);\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/term-ancestor-id.js?"); /***/ }), @@ -988,7 +1001,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare;\n var value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n value = value.map(function (item) {\n return item.term_object.term_id;\n });\n } else if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isPlainObject\"])(value)) {\n value = value.term_object.term_id;\n }\n\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n }\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/conditions/term-parent-id.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n\n\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_0___default()({}, _base__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n /**\n * @inheritdoc\n */\n isFulfiled: function isFulfiled(definition, values) {\n var compare = definition.compare;\n var value = definition.value;\n\n if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isArray\"])(value)) {\n value = value.map(function (item) {\n return item.term_object.term_id;\n });\n } else if (Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"isPlainObject\"])(value)) {\n value = value.term_object.term_id;\n }\n\n return this.firstComparerIsCorrect(this.getEnvironmentValue(definition, values), compare, value);\n }\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/conditions/term-parent-id.js?"); /***/ }), @@ -1000,7 +1013,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return handler; });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _conditions_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../conditions/base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n/* harmony import */ var _conditions_boolean__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../conditions/boolean */ \"./packages/metaboxes/monitors/conditional-display/conditions/boolean.js\");\n/* harmony import */ var _conditions_post_term__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../conditions/post-term */ \"./packages/metaboxes/monitors/conditional-display/conditions/post-term.js\");\n/* harmony import */ var _conditions_post_ancestor_id__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../conditions/post-ancestor-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/post-ancestor-id.js\");\n/* harmony import */ var _conditions_term_parent_id__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../conditions/term-parent-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/term-parent-id.js\");\n/* harmony import */ var _conditions_term_ancestor_id__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../conditions/term-ancestor-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/term-ancestor-id.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n/**\n * Keeps track of supported conditions.\n *\n * @type {Object}\n */\n\nvar conditions = {\n boolean: _conditions_boolean__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n post_term: _conditions_post_term__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n post_ancestor_id: _conditions_post_ancestor_id__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n post_parent_id: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n post_level: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n post_format: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n post_template: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n term_level: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n term_parent: _conditions_term_parent_id__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n term_ancestor: _conditions_term_ancestor_id__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n user_role: _conditions_base__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n};\n/**\n * Walks through the definitions and evaluates the conditions.\n *\n * @param {Object[]} definitions\n * @param {Object} values\n * @param {string} relation\n * @return {boolean}\n */\n\nfunction evaluate(definitions, values, relation) {\n var results = definitions.map(function (definition) {\n if (!definition.relation) {\n var condition = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"get\"])(conditions, definition.type);\n\n if (condition) {\n return condition.isFulfiled(definition, values);\n } else {\n // eslint-disable-line no-else-return\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Unsupported container condition - \"%1$s\".', 'carbon-fields-ui'), definition.type));\n return false;\n }\n } else {\n // eslint-disable-line no-else-return\n return evaluate(definition.conditions, values, definition.relation);\n }\n });\n\n switch (relation) {\n case 'AND':\n return results.every(Boolean);\n\n case 'OR':\n return results.some(Boolean);\n\n default:\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__[\"__\"])('Unsupported container condition relation used - \"%1$s\".', 'carbon-fields-ui'), relation));\n return false;\n }\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @param {Object} props.containers\n * @param {string} props.context\n * @return {Function}\n */\n\n\nfunction handler(_ref) {\n var containers = _ref.containers,\n context = _ref.context;\n return function (effect) {\n var results = Object(lodash__WEBPACK_IMPORTED_MODULE_3__[\"map\"])(containers, function (container, id) {\n return [id, evaluate(container.conditions.conditions, effect, container.conditions.relation)];\n });\n results.forEach(function (_ref2) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref2, 2),\n id = _ref3[0],\n result = _ref3[1];\n\n var postboxNode = document.getElementById(id);\n var containerNode = document.querySelector(\".container-\".concat(id));\n\n if (postboxNode) {\n postboxNode.hidden = !result;\n }\n\n if (containerNode) {\n if (result && !containerNode.dataset.mounted) {\n containerNode.dataset.mounted = true;\n Object(_containers__WEBPACK_IMPORTED_MODULE_4__[\"renderContainer\"])(containers[id], context);\n }\n\n if (!result && containerNode.dataset.mounted) {\n delete containerNode.dataset.mounted;\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"])(containerNode);\n }\n }\n });\n };\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/handler/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return handler; });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ \"@wordpress/i18n\");\n/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _conditions_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../conditions/base */ \"./packages/metaboxes/monitors/conditional-display/conditions/base.js\");\n/* harmony import */ var _conditions_boolean__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../conditions/boolean */ \"./packages/metaboxes/monitors/conditional-display/conditions/boolean.js\");\n/* harmony import */ var _conditions_post_term__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../conditions/post-term */ \"./packages/metaboxes/monitors/conditional-display/conditions/post-term.js\");\n/* harmony import */ var _conditions_post_template__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../conditions/post-template */ \"./packages/metaboxes/monitors/conditional-display/conditions/post-template.js\");\n/* harmony import */ var _conditions_post_ancestor_id__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../conditions/post-ancestor-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/post-ancestor-id.js\");\n/* harmony import */ var _conditions_term_parent_id__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../conditions/term-parent-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/term-parent-id.js\");\n/* harmony import */ var _conditions_term_ancestor_id__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../conditions/term-ancestor-id */ \"./packages/metaboxes/monitors/conditional-display/conditions/term-ancestor-id.js\");\n\n\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n\n\n/**\n * Keeps track of supported conditions.\n *\n * @type {Object}\n */\n\nvar conditions = {\n boolean: _conditions_boolean__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n post_term: _conditions_post_term__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n post_ancestor_id: _conditions_post_ancestor_id__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n post_parent_id: _conditions_base__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n post_level: _conditions_base__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n post_format: _conditions_base__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n post_template: _conditions_post_template__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n term_level: _conditions_base__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n term_parent: _conditions_term_parent_id__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n term_ancestor: _conditions_term_ancestor_id__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n user_role: _conditions_base__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n};\n/**\n * Walks through the definitions and evaluates the conditions.\n *\n * @param {Object[]} definitions\n * @param {Object} values\n * @param {string} relation\n * @return {boolean}\n */\n\nfunction evaluate(definitions, values, relation) {\n var results = definitions.map(function (definition) {\n if (!definition.relation) {\n var condition = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"get\"])(conditions, definition.type);\n\n if (condition) {\n return condition.isFulfiled(definition, values);\n } else {\n // eslint-disable-line no-else-return\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Unsupported container condition - \"%1$s\".', 'carbon-fields-ui'), definition.type));\n return false;\n }\n } else {\n // eslint-disable-line no-else-return\n return evaluate(definition.conditions, values, definition.relation);\n }\n });\n\n switch (relation) {\n case 'AND':\n return results.every(Boolean);\n\n case 'OR':\n return results.some(Boolean);\n\n default:\n // eslint-disable-next-line no-console\n console.error(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"sprintf\"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__[\"__\"])('Unsupported container condition relation used - \"%1$s\".', 'carbon-fields-ui'), relation));\n return false;\n }\n}\n/**\n * The function that causes the side effects.\n *\n * @param {Object} props\n * @param {Object} props.containers\n * @param {string} props.context\n * @return {Function}\n */\n\n\nfunction handler(_ref) {\n var containers = _ref.containers,\n context = _ref.context;\n return function (effect) {\n var results = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"map\"])(containers, function (container, id) {\n return [id, evaluate(container.conditions.conditions, effect, container.conditions.relation)];\n });\n results.forEach(function (_ref2) {\n var _ref3 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_ref2, 2),\n id = _ref3[0],\n result = _ref3[1];\n\n var postboxNode = document.getElementById(id);\n var containerNode = document.querySelector(\".container-\".concat(id));\n var isMounted = !!containerNode.dataset.mounted;\n\n if (postboxNode) {\n postboxNode.hidden = !result;\n }\n\n if (containerNode) {\n if (result && !isMounted) {\n Object(_containers__WEBPACK_IMPORTED_MODULE_3__[\"renderContainer\"])(containers[id], context);\n }\n\n if (!result && isMounted) {\n delete containerNode.dataset.mounted; // Rely on React's internals instead of `unmountComponentAtNode`\n // due to https://github.com/facebook/react/issues/13690.\n // TODO: Conditionally render the fields in the container, this way\n // we can move away from mount/unmount cycles.\n\n containerNode._reactRootContainer.unmount();\n }\n }\n });\n };\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/handler/index.js?"); /***/ }), @@ -1012,7 +1025,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _aperture__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./aperture */ \"./packages/metaboxes/monitors/conditional-display/aperture/index.js\");\n/* harmony import */ var _handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./handler */ \"./packages/metaboxes/monitors/conditional-display/handler/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * Performs the evaluation of conditions.\n *\n * @return {null}\n */\n\nfunction ConditionalDisplay() {\n return null;\n}\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withSelect\"])(function (select) {\n var containers = select('carbon-fields/metaboxes').getContainers();\n return {\n containers: containers\n };\n});\nvar applyWitEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"withEffects\"])(_aperture__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n handler: _handler__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(applyWithSelect, applyWitEffects)(ConditionalDisplay));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/compose */ \"@wordpress/compose\");\n/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _aperture__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./aperture */ \"./packages/metaboxes/monitors/conditional-display/aperture/index.js\");\n/* harmony import */ var _handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./handler */ \"./packages/metaboxes/monitors/conditional-display/handler/index.js\");\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n/**\n * Performs the evaluation of conditions.\n *\n * @return {null}\n */\n\nfunction ConditionalDisplay() {\n return null;\n}\n\nvar applyWithSelect = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"withSelect\"])(function (select) {\n var containers = select('carbon-fields/metaboxes').getContainers();\n return {\n containers: containers\n };\n});\nvar applyWitEffects = Object(refract_callbag__WEBPACK_IMPORTED_MODULE_2__[\"withEffects\"])(_aperture__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n handler: _handler__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(applyWithSelect, applyWitEffects)(ConditionalDisplay));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/index.js?"); /***/ }), @@ -1024,7 +1037,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getAncestorsFromOption; });\n/* harmony import */ var _get_level_from_option__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/**\n * Internal dependencies.\n */\n\n/**\n * Extracts the ancestors of the post/term from an option.\n *\n * @param {Object} option\n * @return {number[]}\n */\n\nfunction getAncestorsFromOption(option) {\n var ancestors = [];\n var previousOption = option;\n var level = Object(_get_level_from_option__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(option);\n\n while (level > 0 && previousOption) {\n if (Object(_get_level_from_option__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(previousOption) !== level) {\n previousOption = previousOption.previousSibling; // Skip this iteration because the option isn't an ancestor.\n\n continue;\n }\n\n var id = parseInt(previousOption.value, 10);\n\n if (id > 0) {\n ancestors.unshift(id);\n }\n\n previousOption = previousOption.previousSibling;\n level--;\n }\n\n return ancestors;\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getAncestorsFromOption; });\n/* harmony import */ var _get_level_from_option__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./get-level-from-option */ \"./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js\");\n/**\n * Internal dependencies.\n */\n\n/**\n * Extracts the ancestors of the post/term from an option.\n *\n * @param {Object} option\n * @return {number[]}\n */\n\nfunction getAncestorsFromOption(option) {\n var ancestors = [];\n var previousOption = option;\n var level = Object(_get_level_from_option__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(option);\n\n while (level > 0 && previousOption) {\n if (Object(_get_level_from_option__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(previousOption) !== level) {\n previousOption = previousOption.previousSibling; // Skip this iteration because the option isn't an ancestor.\n\n continue;\n }\n\n var id = parseInt(previousOption.value, 10);\n\n if (id > 0) {\n ancestors.unshift(id);\n }\n\n previousOption = previousOption.previousSibling;\n level--;\n }\n\n return ancestors;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/utils/get-ancestors-from-option.js?"); /***/ }), @@ -1036,7 +1049,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getLevelFromOption; });\n/**\n * Extracts the level from an option.\n *\n * @param {Object} option\n * @return {number}\n */\nfunction getLevelFromOption(option) {\n var level = 0;\n\n if (option.className) {\n var matches = option.className.match(/^level-(\\d+)/);\n\n if (matches) {\n level = parseInt(matches[1], 10) + 1;\n }\n }\n\n return level;\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getLevelFromOption; });\n/**\n * Extracts the level from an option.\n *\n * @param {Object} option\n * @return {number}\n */\nfunction getLevelFromOption(option) {\n var level = 0;\n\n if (option.className) {\n var matches = option.className.match(/^level-(\\d+)/);\n\n if (matches) {\n level = parseInt(matches[1], 10) + 1;\n }\n }\n\n return level;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/utils/get-level-from-option.js?"); /***/ }), @@ -1048,7 +1061,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getParentIdFromOption; });\n/**\n * Extracts the id of the post/term parent from an option.\n *\n * @param {Object} option\n * @return {number}\n */\nfunction getParentIdFromOption(option) {\n var value = parseInt(option.value, 10);\n return !isNaN(value) && value >= 0 ? value : 0;\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getParentIdFromOption; });\n/**\n * Extracts the id of the post/term parent from an option.\n *\n * @param {Object} option\n * @return {number}\n */\nfunction getParentIdFromOption(option) {\n var value = parseInt(option.value, 10);\n return !isNaN(value) && value >= 0 ? value : 0;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/conditional-display/utils/get-parent-id-from-option.js?"); /***/ }), @@ -1060,7 +1073,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeMonitors; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _save_lock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./save-lock */ \"./packages/metaboxes/monitors/save-lock/index.js\");\n/* harmony import */ var _conditional_display__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conditional-display */ \"./packages/metaboxes/monitors/conditional-display/index.js\");\n/* harmony import */ var _widget_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./widget-handler */ \"./packages/metaboxes/monitors/widget-handler/index.js\");\n/* harmony import */ var _revisions_flag__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./revisions-flag */ \"./packages/metaboxes/monitors/revisions-flag/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _lib_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../lib/constants */ \"./packages/metaboxes/lib/constants.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Initializes the monitors.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeMonitors(context) {\n var pagenow = window.cf.config.pagenow;\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, !Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_5__[\"default\"])() && wp.element.createElement(_save_lock__WEBPACK_IMPORTED_MODULE_1__[\"default\"], null), (pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_6__[\"PAGE_NOW_WIDGETS\"] || pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_6__[\"PAGE_NOW_CUSTOMIZE\"]) && wp.element.createElement(_widget_handler__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null), wp.element.createElement(_conditional_display__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n context: context\n })), document.createElement('div'));\n var postStuffNode = document.querySelector('#poststuff');\n\n if (postStuffNode) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(wp.element.createElement(_revisions_flag__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null), postStuffNode.appendChild(document.createElement('div')));\n }\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return initializeMonitors; });\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _save_lock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./save-lock */ \"./packages/metaboxes/monitors/save-lock/index.js\");\n/* harmony import */ var _conditional_display__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conditional-display */ \"./packages/metaboxes/monitors/conditional-display/index.js\");\n/* harmony import */ var _widget_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./widget-handler */ \"./packages/metaboxes/monitors/widget-handler/index.js\");\n/* harmony import */ var _revisions_flag__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./revisions-flag */ \"./packages/metaboxes/monitors/revisions-flag/index.js\");\n/* harmony import */ var _utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/is-gutenberg */ \"./packages/metaboxes/utils/is-gutenberg.js\");\n/* harmony import */ var _lib_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../lib/constants */ \"./packages/metaboxes/lib/constants.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n\n/**\n * Initializes the monitors.\n *\n * @param {string} context\n * @return {void}\n */\n\nfunction initializeMonitors(context) {\n var pagenow = window.cf.config.pagenow;\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(wp.element.createElement(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, !Object(_utils_is_gutenberg__WEBPACK_IMPORTED_MODULE_5__[\"default\"])() && wp.element.createElement(_save_lock__WEBPACK_IMPORTED_MODULE_1__[\"default\"], null), (pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_6__[\"PAGE_NOW_WIDGETS\"] || pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_6__[\"PAGE_NOW_CUSTOMIZE\"]) && wp.element.createElement(_widget_handler__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null), wp.element.createElement(_conditional_display__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n context: context\n })), document.createElement('div'));\n var postStuffNode = document.querySelector('#poststuff');\n\n if (postStuffNode) {\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__[\"render\"])(wp.element.createElement(_revisions_flag__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null), postStuffNode.appendChild(document.createElement('div')));\n }\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/index.js?"); /***/ }), @@ -1072,7 +1085,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Renders the input used to notify the backend about the changes.\n *\n * @param {Object} props\n * @param {boolean} props.isDirty\n * @return {mixed}\n */\n\nfunction RevisionsFlag(props) {\n return wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: window.cf.config.revisionsInputKey,\n disabled: !props.isDirty,\n value: \"1\"\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select) {\n return {\n isDirty: select('carbon-fields/metaboxes').isDirty()\n };\n})(RevisionsFlag));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/revisions-flag/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Renders the input used to notify the backend about the changes.\n *\n * @param {Object} props\n * @param {boolean} props.isDirty\n * @return {mixed}\n */\n\nfunction RevisionsFlag(props) {\n return wp.element.createElement(\"input\", {\n type: \"hidden\",\n name: window.cf.config.revisionsInputKey,\n disabled: !props.isDirty,\n value: \"1\"\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"withSelect\"])(function (select) {\n return {\n isDirty: select('carbon-fields/metaboxes').isDirty()\n };\n})(RevisionsFlag));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/revisions-flag/index.js?"); /***/ }), @@ -1084,7 +1097,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Toggles the ability to save the page.\n *\n * @return {null}\n */\n\nfunction SaveLock() {\n return null;\n}\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\n\nfunction aperture() {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').isSavingLocked);\n}\n/**\n * The function that causes the side effects.\n *\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (isLocked) {\n var nodes = document.querySelectorAll(\"\\n\\t\\t\\t#publishing-action input#publish,\\n\\t\\t\\t#publishing-action input#save,\\n\\t\\t\\t#addtag input#submit,\\n\\t\\t\\t#edittag input[type=\\\"submit\\\"],\\n\\t\\t\\t#your-profile input#submit\\n\\t\\t\");\n nodes.forEach(function (node) {\n node.disabled = isLocked;\n });\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_0__[\"withEffects\"])(aperture, {\n handler: handler\n})(SaveLock));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/save-lock/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__);\n/**\n * External dependencies.\n */\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Toggles the ability to save the page.\n *\n * @return {null}\n */\n\nfunction SaveLock() {\n return null;\n}\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\n\nfunction aperture() {\n return Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_2__[\"fromSelector\"])(Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__[\"select\"])('carbon-fields/metaboxes').isSavingLocked);\n}\n/**\n * The function that causes the side effects.\n *\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (isLocked) {\n var nodes = document.querySelectorAll(\"\\n\\t\\t\\t#publishing-action input#publish,\\n\\t\\t\\t#publishing-action input#save,\\n\\t\\t\\t#addtag input#submit,\\n\\t\\t\\t#edittag input[type=\\\"submit\\\"],\\n\\t\\t\\t#your-profile input#submit\\n\\t\\t\");\n nodes.forEach(function (node) {\n node.disabled = isLocked;\n });\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_0__[\"withEffects\"])(aperture, {\n handler: handler\n})(SaveLock));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/save-lock/index.js?"); /***/ }), @@ -1096,7 +1109,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var refr /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_urldecode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/urldecode */ \"./packages/metaboxes/utils/urldecode.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n/* harmony import */ var _utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/from-event-pattern */ \"./packages/metaboxes/utils/from-event-pattern.js\");\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _lib_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../lib/constants */ \"./packages/metaboxes/lib/constants.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n/**\n * Performs the re-initialization of widgets.\n *\n * @return {null}\n */\n\nfunction WidgetHandler() {\n return null;\n}\n/**\n * Returns whether the widget is created by Carbon Fields.\n *\n * @param {string} identifier\n * @return {boolean}\n */\n\n\nfunction isCarbonFieldsWidget(identifier) {\n return identifier.indexOf(_lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX\"]) > -1;\n}\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function (handler) {\n return window.jQuery(document).on('widget-added widget-updated', handler);\n }, function (handler) {\n return window.jQuery(document).off('widget-added widget-updated', handler);\n }, function (event, $widget) {\n return {\n event: event,\n $widget: $widget\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var $widget = _ref.$widget;\n return isCarbonFieldsWidget($widget[0].id);\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"map\"])(function (payload) {\n return {\n type: 'WIDGET_CREATED_OR_UPDATED',\n payload: payload\n };\n })), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function (handler) {\n return window.jQuery(document).on('ajaxSuccess', handler);\n }, function (handler) {\n return window.jQuery(document).off('ajaxSuccess', handler);\n }, function (event, xhr, options, data) {\n return {\n event: event,\n xhr: xhr,\n options: options,\n data: data\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref2) {\n var data = _ref2.data;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"startsWith\"])(data, 'deleted:') && isCarbonFieldsWidget(data);\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"map\"])(function (payload) {\n return {\n type: 'WIDGET_DELETED',\n payload: payload\n };\n })));\n}\n/**\n * The function that causes the side effects.\n *\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (effect) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('carbon-fields/metaboxes'),\n getContainerById = _select.getContainerById;\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])('carbon-fields/metaboxes'),\n addContainer = _dispatch.addContainer,\n removeContainer = _dispatch.removeContainer,\n addFields = _dispatch.addFields,\n removeFields = _dispatch.removeFields;\n\n switch (effect.type) {\n case 'WIDGET_CREATED_OR_UPDATED':\n {\n var _effect$payload = effect.payload,\n event = _effect$payload.event,\n $widget = _effect$payload.$widget;\n var container = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"flow\"])(_utils_urldecode__WEBPACK_IMPORTED_MODULE_5__[\"default\"], JSON.parse)($widget.find('[data-json]').data('json'));\n var fields = [];\n var oldFieldIds;\n\n if (event.type === 'widget-updated') {\n oldFieldIds = getContainerById(container.id).fields.map(function (_ref3) {\n var id = _ref3.id;\n return id;\n });\n }\n\n container.fields = container.fields.map(function (field) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(field, container, fields);\n });\n addFields(fields);\n addContainer(container);\n\n if (event.type === 'widget-updated') {\n removeFields(oldFieldIds);\n }\n\n Object(_containers__WEBPACK_IMPORTED_MODULE_8__[\"renderContainer\"])(container, 'classic'); // WARNING: This piece of code manipulates the core behavior of WordPress Widgets.\n // Some day this code will stop to work and we'll need to find another workaround.\n //\n // * Disable the submit { handler } since it breaks our validation logic.\n // * Disable live preview mode because we can't detect when the widget is updated/synced.\n // * Show the \"Apply\" button because it's hidden by the live mode.\n\n if (window.cf.config.pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"PAGE_NOW_CUSTOMIZE\"] && event.type === 'widget-added') {\n var widgetId = $widget.find('[name=\"widget-id\"]').val();\n $widget.find('[name=\"savewidget\"]').show().end().find('.widget-content:first').off('keydown', 'input').off('change input propertychange', ':input');\n var instance = wp.customize.Widgets.getWidgetFormControlForWidget(widgetId); // Change the flag for 'live mode' so we can receive proper `widget-updated` events.\n\n instance.liveUpdateMode = false;\n }\n\n break;\n }\n\n case 'WIDGET_DELETED':\n {\n var _widgetId = effect.payload.data.replace('deleted:', '');\n\n var containerId = \"\".concat(_lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"CARBON_FIELDS_CONTAINER_ID_PREFIX\"]).concat(_widgetId); // Get the container from the store.\n\n var _container = getContainerById(containerId); // Remove the current instance from DOM.\n\n\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"])(document.querySelector(\".container-\".concat(containerId))); // Get the fields that belongs to the container.\n\n var fieldsIds = _.map(_container.fields, 'id'); // Remove everything from the store.\n\n\n removeContainer(containerId);\n removeFields(fieldsIds);\n break;\n }\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n})(WidgetHandler));\n\n//# sourceURL=webpack:///./packages/metaboxes/monitors/widget-handler/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ \"@wordpress/element\");\n/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! refract-callbag */ \"refract-callbag\");\n/* harmony import */ var refract_callbag__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(refract_callbag__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! callbag-basics */ \"callbag-basics\");\n/* harmony import */ var callbag_basics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(callbag_basics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_urldecode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/urldecode */ \"./packages/metaboxes/utils/urldecode.js\");\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n/* harmony import */ var _utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/from-event-pattern */ \"./packages/metaboxes/utils/from-event-pattern.js\");\n/* harmony import */ var _containers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../containers */ \"./packages/metaboxes/containers/index.js\");\n/* harmony import */ var _lib_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../lib/constants */ \"./packages/metaboxes/lib/constants.js\");\n/**\n * External dependencies.\n */\n\n\n\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n\n/**\n * Performs the re-initialization of widgets.\n *\n * @return {null}\n */\n\nfunction WidgetHandler() {\n return null;\n}\n/**\n * Returns whether the widget is created by Carbon Fields.\n *\n * @param {string} identifier\n * @return {boolean}\n */\n\n\nfunction isCarbonFieldsWidget(identifier) {\n return identifier.indexOf(_lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"CARBON_FIELDS_CONTAINER_WIDGET_ID_PREFIX\"]) > -1;\n}\n/**\n * The function that controls the stream of side effects.\n *\n * @return {Object}\n */\n\n\nfunction aperture() {\n return Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"merge\"])(Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function (handler) {\n return window.jQuery(document).on('widget-added widget-updated', handler);\n }, function (handler) {\n return window.jQuery(document).off('widget-added widget-updated', handler);\n }, function (event, $widget) {\n return {\n event: event,\n $widget: $widget\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref) {\n var $widget = _ref.$widget;\n return isCarbonFieldsWidget($widget[0].id);\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"map\"])(function (payload) {\n return {\n type: 'WIDGET_CREATED_OR_UPDATED',\n payload: payload\n };\n })), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"pipe\"])(Object(_utils_from_event_pattern__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(function (handler) {\n return window.jQuery(document).on('ajaxSuccess', handler);\n }, function (handler) {\n return window.jQuery(document).off('ajaxSuccess', handler);\n }, function (event, xhr, options, data) {\n return {\n event: event,\n xhr: xhr,\n options: options,\n data: data\n };\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"filter\"])(function (_ref2) {\n var data = _ref2.data;\n return Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"startsWith\"])(data, 'deleted:') && isCarbonFieldsWidget(data);\n }), Object(callbag_basics__WEBPACK_IMPORTED_MODULE_4__[\"map\"])(function (payload) {\n return {\n type: 'WIDGET_DELETED',\n payload: payload\n };\n })));\n}\n/**\n * The function that causes the side effects.\n *\n * @return {Function}\n */\n\n\nfunction handler() {\n return function (effect) {\n var _select = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"select\"])('carbon-fields/metaboxes'),\n getContainerById = _select.getContainerById;\n\n var _dispatch = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])('carbon-fields/metaboxes'),\n addContainer = _dispatch.addContainer,\n removeContainer = _dispatch.removeContainer,\n addFields = _dispatch.addFields,\n removeFields = _dispatch.removeFields;\n\n switch (effect.type) {\n case 'WIDGET_CREATED_OR_UPDATED':\n {\n var _effect$payload = effect.payload,\n event = _effect$payload.event,\n $widget = _effect$payload.$widget;\n var container = Object(lodash__WEBPACK_IMPORTED_MODULE_2__[\"flow\"])(_utils_urldecode__WEBPACK_IMPORTED_MODULE_5__[\"default\"], JSON.parse)($widget.find('[data-json]').data('json'));\n var fields = [];\n var oldFieldIds;\n\n if (event.type === 'widget-updated') {\n oldFieldIds = getContainerById(container.id).fields.map(function (_ref3) {\n var id = _ref3.id;\n return id;\n });\n }\n\n container.fields = container.fields.map(function (field) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(field, container, fields);\n });\n addFields(fields);\n addContainer(container);\n\n if (event.type === 'widget-updated') {\n removeFields(oldFieldIds);\n }\n\n Object(_containers__WEBPACK_IMPORTED_MODULE_8__[\"renderContainer\"])(container, 'classic'); // WARNING: This piece of code manipulates the core behavior of WordPress Widgets.\n // Some day this code will stop to work and we'll need to find another workaround.\n //\n // * Disable the submit { handler } since it breaks our validation logic.\n // * Disable live preview mode because we can't detect when the widget is updated/synced.\n // * Show the \"Apply\" button because it's hidden by the live mode.\n\n if (window.cf.config.pagenow === _lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"PAGE_NOW_CUSTOMIZE\"] && event.type === 'widget-added') {\n var widgetId = $widget.find('[name=\"widget-id\"]').val();\n $widget.find('[name=\"savewidget\"]').show().end().find('.widget-content:first').off('keydown', 'input').off('change input propertychange', ':input');\n var instance = wp.customize.Widgets.getWidgetFormControlForWidget(widgetId); // Change the flag for 'live mode' so we can receive proper `widget-updated` events.\n\n instance.liveUpdateMode = false;\n }\n\n break;\n }\n\n case 'WIDGET_DELETED':\n {\n var _widgetId = effect.payload.data.replace('deleted:', '');\n\n var containerId = \"\".concat(_lib_constants__WEBPACK_IMPORTED_MODULE_9__[\"CARBON_FIELDS_CONTAINER_ID_PREFIX\"]).concat(_widgetId); // Get the container from the store.\n\n var _container = getContainerById(containerId); // Remove the current instance from DOM.\n\n\n Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"])(document.querySelector(\".container-\".concat(containerId))); // Get the fields that belongs to the container.\n\n var fieldsIds = _.map(_container.fields, 'id'); // Remove everything from the store.\n\n\n removeContainer(containerId);\n removeFields(fieldsIds);\n break;\n }\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(refract_callbag__WEBPACK_IMPORTED_MODULE_3__[\"withEffects\"])(aperture, {\n handler: handler\n})(WidgetHandler));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/monitors/widget-handler/index.js?"); /***/ }), @@ -1108,7 +1121,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setupState\", function() { return setupState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateState\", function() { return updateState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateFieldValue\", function() { return updateFieldValue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addFields\", function() { return addFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cloneFields\", function() { return cloneFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeFields\", function() { return removeFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addContainer\", function() { return addContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeContainer\", function() { return removeContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"receiveSidebar\", function() { return receiveSidebar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lockSaving\", function() { return lockSaving; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unlockSaving\", function() { return unlockSaving; });\n/**\n * Returns an action object used to setup the state when first opening an editor.\n *\n * @param {Object[]} containers\n * @param {Object} fields\n * @return {Object}\n */\nfunction setupState(containers, fields) {\n return {\n type: 'SETUP_STATE',\n payload: {\n containers: containers,\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to update the state.\n *\n * @param {Object[]} containers\n * @param {Object} fields\n * @return {Object}\n */\n\nfunction updateState(containers, fields) {\n return {\n type: 'UPDATE_STATE',\n payload: {\n containers: containers,\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to update the field's value.\n *\n * @param {string} fieldId\n * @param {mixed} value\n * @return {Object}\n */\n\nfunction updateFieldValue(fieldId, value) {\n return {\n type: 'UPDATE_FIELD_VALUE',\n payload: {\n fieldId: fieldId,\n value: value\n }\n };\n}\n/**\n * Returns an action object used to add the fields.\n *\n * @param {Object[]} fields\n * @return {Object}\n */\n\nfunction addFields(fields) {\n return {\n type: 'ADD_FIELDS',\n payload: {\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to clone the fields.\n *\n * @param {string[]} originFieldIds\n * @param {string[]} cloneFieldIds\n * @return {Object}\n */\n\nfunction cloneFields(originFieldIds, cloneFieldIds) {\n return {\n type: 'CLONE_FIELDS',\n payload: {\n originFieldIds: originFieldIds,\n cloneFieldIds: cloneFieldIds\n }\n };\n}\n/**\n * Returns an action object used to remove the fields.\n *\n * @param {string[]} fieldIds\n * @return {Object}\n */\n\nfunction removeFields(fieldIds) {\n return {\n type: 'REMOVE_FIELDS',\n payload: {\n fieldIds: fieldIds\n }\n };\n}\n/**\n * Returns an action object used to add a container to all containers.\n *\n * @param {Object} container\n * @return {Object}\n */\n\nfunction addContainer(container) {\n return {\n type: 'ADD_CONTAINER',\n payload: container\n };\n}\n/**\n * Returns an action object used to remove a container from all containers.\n *\n * @param {Object} container\n * @return {Object}\n */\n\nfunction removeContainer(container) {\n return {\n type: 'REMOVE_CONTAINER',\n payload: container\n };\n}\n/**\n * Returns an action object used to add the created sidebar to all fields.\n *\n * @param {Object} sidebar\n * @return {Object}\n */\n\nfunction receiveSidebar(sidebar) {\n return {\n type: 'RECEIVE_SIDEBAR',\n payload: sidebar\n };\n}\n/**\n * Returns an action object used to signal that saving is locked.\n *\n * @param {string} lockName\n * @return {Object}\n */\n\nfunction lockSaving(lockName) {\n return {\n type: 'LOCK_SAVING',\n payload: {\n lockName: lockName\n }\n };\n}\n/**\n * Returns an action object used to signal that saving is unlocked.\n *\n * @param {string} lockName\n * @return {Object}\n */\n\nfunction unlockSaving(lockName) {\n return {\n type: 'UNLOCK_SAVING',\n payload: {\n lockName: lockName\n }\n };\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/store/actions.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setupState\", function() { return setupState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateState\", function() { return updateState; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateFieldValue\", function() { return updateFieldValue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addFields\", function() { return addFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cloneFields\", function() { return cloneFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeFields\", function() { return removeFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addContainer\", function() { return addContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"removeContainer\", function() { return removeContainer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"receiveSidebar\", function() { return receiveSidebar; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lockSaving\", function() { return lockSaving; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"unlockSaving\", function() { return unlockSaving; });\n/**\n * Returns an action object used to setup the state when first opening an editor.\n *\n * @param {Object[]} containers\n * @param {Object} fields\n * @return {Object}\n */\nfunction setupState(containers, fields) {\n return {\n type: 'SETUP_STATE',\n payload: {\n containers: containers,\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to update the state.\n *\n * @param {Object[]} containers\n * @param {Object} fields\n * @return {Object}\n */\n\nfunction updateState(containers, fields) {\n return {\n type: 'UPDATE_STATE',\n payload: {\n containers: containers,\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to update the field's value.\n *\n * @param {string} fieldId\n * @param {mixed} value\n * @return {Object}\n */\n\nfunction updateFieldValue(fieldId, value) {\n return {\n type: 'UPDATE_FIELD_VALUE',\n payload: {\n fieldId: fieldId,\n value: value\n }\n };\n}\n/**\n * Returns an action object used to add the fields.\n *\n * @param {Object[]} fields\n * @return {Object}\n */\n\nfunction addFields(fields) {\n return {\n type: 'ADD_FIELDS',\n payload: {\n fields: fields\n }\n };\n}\n/**\n * Returns an action object used to clone the fields.\n *\n * @param {string[]} originFieldIds\n * @param {string[]} cloneFieldIds\n * @return {Object}\n */\n\nfunction cloneFields(originFieldIds, cloneFieldIds) {\n return {\n type: 'CLONE_FIELDS',\n payload: {\n originFieldIds: originFieldIds,\n cloneFieldIds: cloneFieldIds\n }\n };\n}\n/**\n * Returns an action object used to remove the fields.\n *\n * @param {string[]} fieldIds\n * @return {Object}\n */\n\nfunction removeFields(fieldIds) {\n return {\n type: 'REMOVE_FIELDS',\n payload: {\n fieldIds: fieldIds\n }\n };\n}\n/**\n * Returns an action object used to add a container to all containers.\n *\n * @param {Object} container\n * @return {Object}\n */\n\nfunction addContainer(container) {\n return {\n type: 'ADD_CONTAINER',\n payload: container\n };\n}\n/**\n * Returns an action object used to remove a container from all containers.\n *\n * @param {Object} container\n * @return {Object}\n */\n\nfunction removeContainer(container) {\n return {\n type: 'REMOVE_CONTAINER',\n payload: container\n };\n}\n/**\n * Returns an action object used to add the created sidebar to all fields.\n *\n * @param {Object} sidebar\n * @return {Object}\n */\n\nfunction receiveSidebar(sidebar) {\n return {\n type: 'RECEIVE_SIDEBAR',\n payload: sidebar\n };\n}\n/**\n * Returns an action object used to signal that saving is locked.\n *\n * @param {string} lockName\n * @return {Object}\n */\n\nfunction lockSaving(lockName) {\n return {\n type: 'LOCK_SAVING',\n payload: {\n lockName: lockName\n }\n };\n}\n/**\n * Returns an action object used to signal that saving is unlocked.\n *\n * @param {string} lockName\n * @return {Object}\n */\n\nfunction unlockSaving(lockName) {\n return {\n type: 'UNLOCK_SAVING',\n payload: {\n lockName: lockName\n }\n };\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/store/actions.js?"); /***/ }), @@ -1120,7 +1133,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"normalizePreloadedState\", function() { return normalizePreloadedState; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Transform the shape of the given state to be more Redux friendly.\n *\n * @param {Object} state\n * @return {Object}\n */\n\nfunction normalizePreloadedState(state) {\n var fields = [];\n var containers = state.filter(function (_ref) {\n var id = _ref.id;\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"endsWith\"])(id, '__i__');\n }).map(function (container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"assign\"])({}, container, {\n fields: container.fields.map(function (field) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(field, container.id, fields);\n })\n });\n });\n return {\n containers: containers,\n fields: fields\n };\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/store/helpers.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"normalizePreloadedState\", function() { return normalizePreloadedState; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_flatten_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/flatten-field */ \"./packages/metaboxes/utils/flatten-field.js\");\n/**\n * External dependencies.\n */\n\n/**\n * Internal dependencies.\n */\n\n\n/**\n * Transform the shape of the given state to be more Redux friendly.\n *\n * @param {Object} state\n * @return {Object}\n */\n\nfunction normalizePreloadedState(state) {\n var fields = [];\n var containers = state.filter(function (_ref) {\n var id = _ref.id;\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"endsWith\"])(id, '__i__');\n }).map(function (container) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"assign\"])({}, container, {\n fields: container.fields.map(function (field) {\n return Object(_utils_flatten_field__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(field, container.id, fields);\n })\n });\n });\n return {\n containers: containers,\n fields: fields\n };\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/store/helpers.js?"); /***/ }), @@ -1132,7 +1145,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _reducer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reducer */ \"./packages/metaboxes/store/reducer.js\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions */ \"./packages/metaboxes/store/actions.js\");\n/* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./selectors */ \"./packages/metaboxes/store/selectors.js\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers */ \"./packages/metaboxes/store/helpers.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n/**\n * Register the store.\n */\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"registerStore\"])('carbon-fields/metaboxes', {\n reducer: _reducer__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n actions: _actions__WEBPACK_IMPORTED_MODULE_3__,\n selectors: _selectors__WEBPACK_IMPORTED_MODULE_4__\n});\n/**\n * Hydrate the store's state.\n */\n\nvar _normalizePreloadedSt = Object(_helpers__WEBPACK_IMPORTED_MODULE_5__[\"normalizePreloadedState\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])('carbon-fields/metaboxes').setupState(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"keyBy\"])(containers, 'id'), Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"keyBy\"])(fields, 'id'));\n\n//# sourceURL=webpack:///./packages/metaboxes/store/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _reducer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reducer */ \"./packages/metaboxes/store/reducer.js\");\n/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions */ \"./packages/metaboxes/store/actions.js\");\n/* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./selectors */ \"./packages/metaboxes/store/selectors.js\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers */ \"./packages/metaboxes/store/helpers.js\");\n/**\n * External dependencies.\n */\n\n\n/**\n * Internal dependencies.\n */\n\n\n\n\n\n/**\n * Register the store.\n */\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"registerStore\"])('carbon-fields/metaboxes', {\n reducer: _reducer__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n actions: _actions__WEBPACK_IMPORTED_MODULE_3__,\n selectors: _selectors__WEBPACK_IMPORTED_MODULE_4__\n});\n/**\n * Hydrate the store's state.\n */\n\nvar _normalizePreloadedSt = Object(_helpers__WEBPACK_IMPORTED_MODULE_5__[\"normalizePreloadedState\"])(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"get\"])(window.cf, 'preloaded.containers', [])),\n containers = _normalizePreloadedSt.containers,\n fields = _normalizePreloadedSt.fields;\n\nObject(_wordpress_data__WEBPACK_IMPORTED_MODULE_0__[\"dispatch\"])('carbon-fields/metaboxes').setupState(Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"keyBy\"])(containers, 'id'), Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"keyBy\"])(fields, 'id'));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/store/index.js?"); /***/ }), @@ -1144,7 +1157,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _wor /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"containers\", function() { return containers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fields\", function() { return fields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"savingLock\", function() { return savingLock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDirty\", function() { return isDirty; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The reducer that keeps track of the containers.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction containers() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_STATE':\n return action.payload.containers;\n\n case 'UPDATE_STATE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(action.payload.containers).forEach(function (container) {\n draft[container.id] = container;\n });\n });\n\n case 'ADD_CONTAINER':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n draft[action.payload.id] = action.payload;\n });\n\n case 'REMOVE_CONTAINER':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, action.payload);\n\n default:\n return state;\n }\n}\n/**\n * Clones a field.\n *\n * @param {string} originId\n * @param {string} cloneId\n * @param {Object} fields\n * @param {Object[]} accumulator\n * @return {Object[]}\n */\n\nfunction cloneField(originId, cloneId, fields, accumulator) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"cloneDeep\"])(fields[originId]);\n field.id = cloneId;\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__[\"uniqueId\"])();\n accumulator = group.fields.reduce(function (groupAccumulator, groupField) {\n var originGroupFieldId = groupField.id;\n var cloneGroupFieldId = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__[\"uniqueId\"])();\n groupField.id = cloneGroupFieldId;\n return cloneField(originGroupFieldId, cloneGroupFieldId, fields, groupAccumulator);\n }, accumulator);\n });\n }\n\n return accumulator.concat(field);\n}\n/**\n * Returns a list of field ids by a given root id.\n *\n * @param {string} fieldId\n * @param {Object} fields\n * @param {string[]} accumulator\n * @return {string[]}\n */\n\n\nfunction getFieldIdsByRootId(fieldId, fields, accumulator) {\n var field = fields[fieldId];\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n accumulator = group.fields.reduce(function (groupAccumulator, groupField) {\n return getFieldIdsByRootId(groupField.id, fields, groupAccumulator);\n }, accumulator);\n });\n }\n\n return accumulator.concat(fieldId);\n}\n/**\n * The reducer that keeps track of the fields.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\n\nfunction fields() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_STATE':\n return action.payload.fields;\n\n case 'UPDATE_STATE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(action.payload.fields).forEach(function (field) {\n draft[field.id] = field;\n });\n });\n\n case 'UPDATE_FIELD_VALUE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n var _action$payload = action.payload,\n fieldId = _action$payload.fieldId,\n value = _action$payload.value;\n draft[fieldId].value = value;\n });\n\n case 'ADD_FIELDS':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n action.payload.fields.forEach(function (field) {\n draft[field.id] = field;\n });\n });\n\n case 'CLONE_FIELDS':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n var _action$payload2 = action.payload,\n originFieldIds = _action$payload2.originFieldIds,\n cloneFieldIds = _action$payload2.cloneFieldIds;\n var clonedFields = originFieldIds.reduce(function (accumulator, originFieldId, index) {\n return cloneField(originFieldId, cloneFieldIds[index], draft, accumulator);\n }, []);\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"assign\"])(draft, Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"keyBy\"])(clonedFields, 'id'));\n });\n\n case 'REMOVE_FIELDS':\n var fieldIds = action.payload.fieldIds.reduce(function (accumulator, fieldId) {\n return getFieldIdsByRootId(fieldId, state, accumulator);\n }, []);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, fieldIds);\n\n case 'RECEIVE_SIDEBAR':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"forEach\"])(draft, function (field) {\n if (field.type === 'sidebar') {\n field.options.unshift(action.payload);\n }\n });\n });\n\n default:\n return state;\n }\n}\n/**\n * The reducer that keeps track of the save locks.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction savingLock() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'LOCK_SAVING':\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, state, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, action.payload.lockName, true));\n\n case 'UNLOCK_SAVING':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, [action.payload.lockName]);\n\n default:\n return state;\n }\n}\n/**\n * The reducer that keeps track if there is dirty fields.\n *\n * @param {boolean} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction isDirty() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'UPDATE_FIELD_VALUE':\n return true;\n\n default:\n return state;\n }\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__[\"combineReducers\"])({\n containers: containers,\n fields: fields,\n savingLock: savingLock,\n isDirty: isDirty\n}));\n\n//# sourceURL=webpack:///./packages/metaboxes/store/reducer.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"containers\", function() { return containers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fields\", function() { return fields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"savingLock\", function() { return savingLock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDirty\", function() { return isDirty; });\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectSpread */ \"./node_modules/@babel/runtime/helpers/objectSpread.js\");\n/* harmony import */ var _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ \"immer\");\n/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(immer__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ \"@wordpress/data\");\n/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n/**\n * External dependencies.\n */\n\n\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * The reducer that keeps track of the containers.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction containers() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_STATE':\n return action.payload.containers;\n\n case 'UPDATE_STATE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(action.payload.containers).forEach(function (container) {\n draft[container.id] = container;\n });\n });\n\n case 'ADD_CONTAINER':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n draft[action.payload.id] = action.payload;\n });\n\n case 'REMOVE_CONTAINER':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, action.payload);\n\n default:\n return state;\n }\n}\n/**\n * Clones a field.\n *\n * @param {string} originId\n * @param {string} cloneId\n * @param {Object} fields\n * @param {Object[]} accumulator\n * @return {Object[]}\n */\n\nfunction cloneField(originId, cloneId, fields, accumulator) {\n var field = Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"cloneDeep\"])(fields[originId]);\n field.id = cloneId;\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__[\"uniqueId\"])();\n accumulator = group.fields.reduce(function (groupAccumulator, groupField) {\n var originGroupFieldId = groupField.id;\n var cloneGroupFieldId = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_5__[\"uniqueId\"])();\n groupField.id = cloneGroupFieldId;\n return cloneField(originGroupFieldId, cloneGroupFieldId, fields, groupAccumulator);\n }, accumulator);\n });\n }\n\n return accumulator.concat(field);\n}\n/**\n * Returns a list of field ids by a given root id.\n *\n * @param {string} fieldId\n * @param {Object} fields\n * @param {string[]} accumulator\n * @return {string[]}\n */\n\n\nfunction getFieldIdsByRootId(fieldId, fields, accumulator) {\n var field = fields[fieldId];\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n accumulator = group.fields.reduce(function (groupAccumulator, groupField) {\n return getFieldIdsByRootId(groupField.id, fields, groupAccumulator);\n }, accumulator);\n });\n }\n\n return accumulator.concat(fieldId);\n}\n/**\n * The reducer that keeps track of the fields.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\n\nfunction fields() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'SETUP_STATE':\n return action.payload.fields;\n\n case 'UPDATE_STATE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"values\"])(action.payload.fields).forEach(function (field) {\n draft[field.id] = field;\n });\n });\n\n case 'UPDATE_FIELD_VALUE':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n var _action$payload = action.payload,\n fieldId = _action$payload.fieldId,\n value = _action$payload.value;\n draft[fieldId].value = value;\n });\n\n case 'ADD_FIELDS':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n action.payload.fields.forEach(function (field) {\n draft[field.id] = field;\n });\n });\n\n case 'CLONE_FIELDS':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n var _action$payload2 = action.payload,\n originFieldIds = _action$payload2.originFieldIds,\n cloneFieldIds = _action$payload2.cloneFieldIds;\n var clonedFields = originFieldIds.reduce(function (accumulator, originFieldId, index) {\n return cloneField(originFieldId, cloneFieldIds[index], draft, accumulator);\n }, []);\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"assign\"])(draft, Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"keyBy\"])(clonedFields, 'id'));\n });\n\n case 'REMOVE_FIELDS':\n var fieldIds = action.payload.fieldIds.reduce(function (accumulator, fieldId) {\n return getFieldIdsByRootId(fieldId, state, accumulator);\n }, []);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, fieldIds);\n\n case 'RECEIVE_SIDEBAR':\n return immer__WEBPACK_IMPORTED_MODULE_2___default()(state, function (draft) {\n Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"forEach\"])(draft, function (field) {\n if (field.type === 'sidebar') {\n field.options.unshift(action.payload);\n }\n });\n });\n\n default:\n return state;\n }\n}\n/**\n * The reducer that keeps track of the save locks.\n *\n * @param {Object} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction savingLock() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'LOCK_SAVING':\n return _babel_runtime_helpers_objectSpread__WEBPACK_IMPORTED_MODULE_1___default()({}, state, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, action.payload.lockName, true));\n\n case 'UNLOCK_SAVING':\n return Object(lodash__WEBPACK_IMPORTED_MODULE_4__[\"omit\"])(state, [action.payload.lockName]);\n\n default:\n return state;\n }\n}\n/**\n * The reducer that keeps track if there is dirty fields.\n *\n * @param {boolean} state\n * @param {Object} action\n * @return {Object}\n */\n\nfunction isDirty() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var action = arguments.length > 1 ? arguments[1] : undefined;\n\n switch (action.type) {\n case 'UPDATE_FIELD_VALUE':\n return true;\n\n default:\n return state;\n }\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__[\"combineReducers\"])({\n containers: containers,\n fields: fields,\n savingLock: savingLock,\n isDirty: isDirty\n}));\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/store/reducer.js?"); /***/ }), @@ -1156,7 +1169,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainers\", function() { return getContainers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainerById\", function() { return getContainerById; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFields\", function() { return getFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldsByContainerId\", function() { return getFieldsByContainerId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldById\", function() { return getFieldById; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isSavingLocked\", function() { return isSavingLocked; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDirty\", function() { return isDirty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getComplexGroupValues\", function() { return getComplexGroupValues; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Returns the containers.\n *\n * @param {Object} state\n * @return {Object[]}\n */\n\nfunction getContainers(state) {\n return state.containers;\n}\n/**\n * Returns a container by an id.\n *\n * @param {Object} state\n * @param {string} containerId\n * @return {?Object}\n */\n\nfunction getContainerById(state, containerId) {\n return state.containers[containerId];\n}\n/**\n * Returns the fields.\n *\n * @param {Object} state\n * @return {Object}\n */\n\nfunction getFields(state) {\n return state.fields;\n}\n/**\n * Returns the fields that belong to the specified container.\n *\n * @param {Object} state\n * @param {string} containerId\n * @return {Object[]}\n */\n\nfunction getFieldsByContainerId(state, containerId) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"filter\"])(state.fields, ['container_id', containerId]);\n}\n/**\n * Returns a field by an id.\n *\n * @param {Object} state\n * @param {string} fieldId\n * @return {?Object}\n */\n\nfunction getFieldById(state, fieldId) {\n return state.fields[fieldId];\n}\n/**\n * Returns whether saving is locked.\n *\n * @param {Object} state\n * @return {boolean}\n */\n\nfunction isSavingLocked(state) {\n return Object.keys(state.savingLock).length > 0;\n}\n/**\n * Returns whether the metaboxes fields contain unsaved changed.\n *\n * @param {Object} state\n * @return {boolean}\n */\n\nfunction isDirty(state) {\n return state.isDirty;\n}\n/**\n * Returns a map of field values for a given group.\n *\n * @param {Object} state\n * @param {string[]} fieldIds\n * @return {Object}\n */\n\nfunction getComplexGroupValues(state, fieldIds) {\n var fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"pick\"])(getFields(state), fieldIds);\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"mapKeys\"])(fields, function (field) {\n return field.base_name.replace(/\\-/g, '_');\n });\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"mapValues\"])(fields, function (field) {\n return field.value;\n });\n return fields;\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/store/selectors.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainers\", function() { return getContainers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContainerById\", function() { return getContainerById; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFields\", function() { return getFields; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldsByContainerId\", function() { return getFieldsByContainerId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFieldById\", function() { return getFieldById; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isSavingLocked\", function() { return isSavingLocked; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDirty\", function() { return isDirty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getComplexGroupValues\", function() { return getComplexGroupValues; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Returns the containers.\n *\n * @param {Object} state\n * @return {Object[]}\n */\n\nfunction getContainers(state) {\n return state.containers;\n}\n/**\n * Returns a container by an id.\n *\n * @param {Object} state\n * @param {string} containerId\n * @return {?Object}\n */\n\nfunction getContainerById(state, containerId) {\n return state.containers[containerId];\n}\n/**\n * Returns the fields.\n *\n * @param {Object} state\n * @return {Object}\n */\n\nfunction getFields(state) {\n return state.fields;\n}\n/**\n * Returns the fields that belong to the specified container.\n *\n * @param {Object} state\n * @param {string} containerId\n * @return {Object[]}\n */\n\nfunction getFieldsByContainerId(state, containerId) {\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"filter\"])(state.fields, ['container_id', containerId]);\n}\n/**\n * Returns a field by an id.\n *\n * @param {Object} state\n * @param {string} fieldId\n * @return {?Object}\n */\n\nfunction getFieldById(state, fieldId) {\n return state.fields[fieldId];\n}\n/**\n * Returns whether saving is locked.\n *\n * @param {Object} state\n * @return {boolean}\n */\n\nfunction isSavingLocked(state) {\n return Object.keys(state.savingLock).length > 0;\n}\n/**\n * Returns whether the metaboxes fields contain unsaved changed.\n *\n * @param {Object} state\n * @return {boolean}\n */\n\nfunction isDirty(state) {\n return state.isDirty;\n}\n/**\n * Returns a map of field values for a given group.\n *\n * @param {Object} state\n * @param {string[]} fieldIds\n * @return {Object}\n */\n\nfunction getComplexGroupValues(state, fieldIds) {\n var fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"pick\"])(getFields(state), fieldIds);\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"mapKeys\"])(fields, function (field) {\n return field.base_name.replace(/\\-/g, '_');\n });\n fields = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"mapValues\"])(fields, function (field) {\n return field.value;\n });\n return fields;\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/store/selectors.js?"); /***/ }), @@ -1168,7 +1181,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return flattenField; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Flattens a field.\n *\n * @param {Object} field\n * @param {string} containerId\n * @param {Object[]} accumulator\n * @return {Object}\n */\n\nfunction flattenField(field, containerId, accumulator) {\n field = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"cloneDeep\"])(field); // Replace the id of the field.\n\n field.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"uniqueId\"])(); // Keep reference to the container.\n\n field.container_id = containerId; // The complex fields represent a nested structure of fields.\n // So we need to flat them as well.\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"uniqueId\"])();\n group.container_id = containerId;\n group.fields = group.fields.map(function (groupField) {\n return flattenField(groupField, containerId, accumulator);\n });\n });\n }\n\n accumulator.push(field);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"pick\"])(field, ['id', 'type', 'name', 'base_name']);\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/flatten-field.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return flattenField; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @carbon-fields/core */ \"@carbon-fields/core\");\n/* harmony import */ var _carbon_fields_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * External dependencies.\n */\n\n/**\n * Carbon Fields dependencies.\n */\n\n\n/**\n * Flattens a field.\n *\n * @param {Object} field\n * @param {string} containerId\n * @param {Object[]} accumulator\n * @return {Object}\n */\n\nfunction flattenField(field, containerId, accumulator) {\n field = Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"cloneDeep\"])(field); // Replace the id of the field.\n\n field.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"uniqueId\"])(); // Keep reference to the container.\n\n field.container_id = containerId; // The complex fields represent a nested structure of fields.\n // So we need to flat them as well.\n\n if (field.type === 'complex') {\n field.value.forEach(function (group) {\n group.id = Object(_carbon_fields_core__WEBPACK_IMPORTED_MODULE_1__[\"uniqueId\"])();\n group.container_id = containerId;\n group.fields = group.fields.map(function (groupField) {\n return flattenField(groupField, containerId, accumulator);\n });\n });\n }\n\n accumulator.push(field);\n return Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"pick\"])(field, ['id', 'type', 'name', 'base_name']);\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/utils/flatten-field.js?"); /***/ }), @@ -1180,7 +1193,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return fromEventPattern; });\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-create */ \"./node_modules/callbag-create/index.js\");\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(callbag_create__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Callbag source factory from `addHandler` and `removeHandler` pair.\n *\n * @see https://github.com/Andarist/callbag-from-event-pattern\n * @param {Function} addHandler\n * @param {Function} removeHandler\n * @param {Function} argsTransformer\n * @return {Function}\n */\n\nfunction fromEventPattern(addHandler, removeHandler) {\n var argsTransformer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return args;\n };\n return callbag_create__WEBPACK_IMPORTED_MODULE_0___default()(function (sink) {\n var handler = function handler() {\n return sink(1, argsTransformer.apply(void 0, arguments));\n };\n\n addHandler(handler);\n return function () {\n return removeHandler(handler);\n };\n });\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/from-event-pattern.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return fromEventPattern; });\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! callbag-create */ \"./node_modules/callbag-create/index.js\");\n/* harmony import */ var callbag_create__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(callbag_create__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Callbag source factory from `addHandler` and `removeHandler` pair.\n *\n * @see https://github.com/Andarist/callbag-from-event-pattern\n * @param {Function} addHandler\n * @param {Function} removeHandler\n * @param {Function} argsTransformer\n * @return {Function}\n */\n\nfunction fromEventPattern(addHandler, removeHandler) {\n var argsTransformer = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return args;\n };\n return callbag_create__WEBPACK_IMPORTED_MODULE_0___default()(function (sink) {\n var handler = function handler() {\n return sink(1, argsTransformer.apply(void 0, arguments));\n };\n\n addHandler(handler);\n return function () {\n return removeHandler(handler);\n };\n });\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/utils/from-event-pattern.js?"); /***/ }), @@ -1192,7 +1205,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return isGutenberg; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Returns true if Gutenberg is presented.\n *\n * For some reason the Gutenberg package uses `_wpLoadGutenbergEditor`\n * while WordPress@5 uses `_wpLoadBlockEditor`.\n *\n * @return {boolean}\n */\n\nfunction isGutenberg() {\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isUndefined\"])(window._wpLoadGutenbergEditor) || !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isUndefined\"])(window._wpLoadBlockEditor);\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/is-gutenberg.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return isGutenberg; });\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ \"lodash\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * External dependencies.\n */\n\n/**\n * Returns true if Gutenberg is presented.\n *\n * @return {boolean}\n */\n\nfunction isGutenberg() {\n return !Object(lodash__WEBPACK_IMPORTED_MODULE_0__[\"isUndefined\"])(window._wpLoadBlockEditor);\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/utils/is-gutenberg.js?"); /***/ }), @@ -1204,7 +1217,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return stripCompactInputPrefix; });\n/**\n * Removes the prefix used to compact the input of Carbon Fields.\n *\n * @param {string} str\n * @return {string}\n */\nfunction stripCompactInputPrefix(str) {\n var _window$cf$config = window.cf.config,\n compactInput = _window$cf$config.compactInput,\n compactInputKey = _window$cf$config.compactInputKey;\n\n if (!compactInput || str.indexOf(compactInputKey) !== 0) {\n return str;\n }\n\n return str.replace(new RegExp(\"^\".concat(compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1');\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/strip-compact-input-prefix.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return stripCompactInputPrefix; });\n/**\n * Removes the prefix used to compact the input of Carbon Fields.\n *\n * @param {string} str\n * @return {string}\n */\nfunction stripCompactInputPrefix(str) {\n var _window$cf$config = window.cf.config,\n compactInput = _window$cf$config.compactInput,\n compactInputKey = _window$cf$config.compactInputKey;\n\n if (!compactInput || str.indexOf(compactInputKey) !== 0) {\n return str;\n }\n\n return str.replace(new RegExp(\"^\".concat(compactInputKey, \"\\\\[(.+?)\\\\]\")), '$1');\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/utils/strip-compact-input-prefix.js?"); /***/ }), @@ -1216,7 +1229,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return urldecode; });\n/**\n * Source: https://github.com/kvz/locutus/blob/master/src/php/url/urldecode.js\n *\n * @param {string} str\n * @return {string}\n */\nfunction urldecode(str) {\n return decodeURIComponent((str + '').replace(/%(?![\\da-f]{2})/gi, function () {\n // PHP tolerates poorly formed escape sequences\n return '%25';\n }).replace(/\\+/g, '%20'));\n}\n\n//# sourceURL=webpack:///./packages/metaboxes/utils/urldecode.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return urldecode; });\n/**\n * Source: https://github.com/kvz/locutus/blob/master/src/php/url/urldecode.js\n *\n * @param {string} str\n * @return {string}\n */\nfunction urldecode(str) {\n return decodeURIComponent((str + '').replace(/%(?![\\da-f]{2})/gi, function () {\n // PHP tolerates poorly formed escape sequences\n return '%25';\n }).replace(/\\+/g, '%20'));\n}\n\n//# sourceURL=webpack://cf.%5Bname%5D/./packages/metaboxes/utils/urldecode.js?"); /***/ }), @@ -1227,7 +1240,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"core\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22core%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"core\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22core%22%5D?"); /***/ }), @@ -1238,7 +1251,7 @@ eval("module.exports = cf[\"core\"];\n\n//# sourceURL=webpack:///external_%5B%22 /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = wp[\"compose\"];\n\n//# sourceURL=webpack:///external_%5B%22wp%22,%22compose%22%5D?"); +eval("(function() { module.exports = this[\"wp\"][\"compose\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22wp%22,%22compose%22%5D?"); /***/ }), @@ -1249,7 +1262,7 @@ eval("module.exports = wp[\"compose\"];\n\n//# sourceURL=webpack:///external_%5B /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = wp[\"data\"];\n\n//# sourceURL=webpack:///external_%5B%22wp%22,%22data%22%5D?"); +eval("(function() { module.exports = this[\"wp\"][\"data\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22wp%22,%22data%22%5D?"); /***/ }), @@ -1260,7 +1273,7 @@ eval("module.exports = wp[\"data\"];\n\n//# sourceURL=webpack:///external_%5B%22 /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = wp[\"element\"];\n\n//# sourceURL=webpack:///external_%5B%22wp%22,%22element%22%5D?"); +eval("(function() { module.exports = this[\"wp\"][\"element\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22wp%22,%22element%22%5D?"); /***/ }), @@ -1271,7 +1284,7 @@ eval("module.exports = wp[\"element\"];\n\n//# sourceURL=webpack:///external_%5B /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = wp[\"hooks\"];\n\n//# sourceURL=webpack:///external_%5B%22wp%22,%22hooks%22%5D?"); +eval("(function() { module.exports = this[\"wp\"][\"hooks\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22wp%22,%22hooks%22%5D?"); /***/ }), @@ -1282,7 +1295,7 @@ eval("module.exports = wp[\"hooks\"];\n\n//# sourceURL=webpack:///external_%5B%2 /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = wp[\"i18n\"];\n\n//# sourceURL=webpack:///external_%5B%22wp%22,%22i18n%22%5D?"); +eval("(function() { module.exports = this[\"wp\"][\"i18n\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22wp%22,%22i18n%22%5D?"); /***/ }), @@ -1293,7 +1306,7 @@ eval("module.exports = wp[\"i18n\"];\n\n//# sourceURL=webpack:///external_%5B%22 /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"callbag-basics\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22callbag-basics%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"callbag-basics\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22callbag-basics%22%5D?"); /***/ }), @@ -1304,7 +1317,7 @@ eval("module.exports = cf[\"vendor\"][\"callbag-basics\"];\n\n//# sourceURL=webp /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"classnames\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22classnames%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"classnames\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22classnames%22%5D?"); /***/ }), @@ -1315,7 +1328,7 @@ eval("module.exports = cf[\"vendor\"][\"classnames\"];\n\n//# sourceURL=webpack: /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"immer\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22immer%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"immer\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22immer%22%5D?"); /***/ }), @@ -1326,7 +1339,7 @@ eval("module.exports = cf[\"vendor\"][\"immer\"];\n\n//# sourceURL=webpack:///ex /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = lodash;\n\n//# sourceURL=webpack:///external_%5B%22lodash%22%5D?"); +eval("(function() { module.exports = this[\"lodash\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22lodash%22%5D?"); /***/ }), @@ -1337,7 +1350,7 @@ eval("module.exports = lodash;\n\n//# sourceURL=webpack:///external_%5B%22lodash /*! no static exports found */ /***/ (function(module, exports) { -eval("module.exports = cf[\"vendor\"][\"refract-callbag\"];\n\n//# sourceURL=webpack:///external_%5B%22cf%22,%22vendor%22,%22refract-callbag%22%5D?"); +eval("(function() { module.exports = this[\"cf\"][\"vendor\"][\"refract-callbag\"]; }());\n\n//# sourceURL=webpack://cf.%5Bname%5D/external_%5B%22cf%22,%22vendor%22,%22refract-callbag%22%5D?"); /***/ }) diff --git a/build/gutenberg/metaboxes.min.js b/build/gutenberg/metaboxes.min.js index 79c2d9e05..5f3006f04 100644 --- a/build/gutenberg/metaboxes.min.js +++ b/build/gutenberg/metaboxes.min.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=41)}([function(e,t){e.exports=lodash},function(e,t){e.exports=cf.vendor["callbag-basics"]},function(e,t){e.exports=wp.hooks},function(e,t){e.exports=wp.data},function(e,t){e.exports=cf.core},function(e,t){e.exports=wp.i18n},function(e,t,n){var r=n(8);e.exports=function(e){for(var t=1;tt=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return m()(e,function(e){Object(u.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return m()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(u.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return m()(e,function(e){Object(u.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return m()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return m()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return m()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(u.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(v.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(v.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(u.assign)(e,Object(u.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(u.omit)(e,n);case"RECEIVE_SIDEBAR":return m()(e,function(e){Object(u.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return p()({},e,d()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(u.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function j(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function g(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function y(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function h(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function w(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function E(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function x(e){return{type:"ADD_CONTAINER",payload:e}}function S(e){return{type:"REMOVE_CONTAINER",payload:e}}function I(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function F(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function T(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function C(e){return e.containers}function A(e,t){return e.containers[t]}function D(e){return e.fields}function N(e,t){return Object(u.filter)(e.fields,["container_id",t])}function k(e,t){return e.fields[t]}function G(e){return Object.keys(e.savingLock).length>0}function L(e){return e.isDirty}function P(e,t){var n=Object(u.pick)(D(e),t);return n=Object(u.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(u.mapValues)(n,function(e){return e.value})}function R(e,t,n){return(e=Object(u.cloneDeep)(e)).id=Object(v.uniqueId)(),e.container_id=t,"complex"===e.type&&e.value.forEach(function(e){e.id=Object(v.uniqueId)(),e.container_id=t,e.fields=e.fields.map(function(e){return R(e,t,n)})}),n.push(e),Object(u.pick)(e,["id","type","name","base_name"])}function V(e){var t=[];return{containers:e.filter(function(e){var t=e.id;return!Object(u.endsWith)(t,"__i__")}).map(function(e){return Object(u.assign)({},e,{fields:e.fields.map(function(n){return R(n,e.id,t)})})}),fields:t}}Object(a.registerStore)("carbon-fields/metaboxes",{reducer:O,actions:r,selectors:o});var B=V(Object(u.get)(window.cf,"preloaded.containers",[])),q=B.containers,U=B.fields;Object(a.dispatch)("carbon-fields/metaboxes").setupState(Object(u.keyBy)(q,"id"),Object(u.keyBy)(U,"id"));var M=n(10),Q=Object(M.createHigherOrderComponent)(function(e){var t=Object(a.withSelect)(function(e,t){var n=window.cf.config,r=n.compactInput,o=n.compactInputKey,i=e("carbon-fields/metaboxes").getFieldById(t.id),c=i.value,a=t.name||i.name;return r&&!t.name&&-1===a.indexOf("widget-carbon_fields")&&(a="".concat(o,"[").concat(a,"]")),{field:i,name:a,value:c}}),n=Object(a.withDispatch)(function(e){return{onChange:e("carbon-fields/metaboxes").updateFieldValue}});return Object(M.compose)(t,n)(e)},"withField"),K=n(15),W=n.n(K),$=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:[];return Object(u.pick)(t,Object(u.difference)(Object(u.map)(e.fields,"id"),n))}function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(u.map)(e,function(e){return[e.id,"".concat(Object(u.repeat)("parent.",t)).concat(e.base_name)]})}var Z=Object(v.withConditionalLogic)(function(e){var t=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(J.pipe)(Object(J.merge)($(t(e.containerId)),Object(v.fromSelector)(t,e.containerId)),H(u.isEqual))},function(e,t){t=Object(u.keyBy)(t,"id");var n=Object(a.select)("carbon-fields/metaboxes").getContainerById(e.containerId),r=[];if(Object(u.some)(n.fields,["id",e.id]))r=Y(r=X(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(u.find)(t,function(t){return t.container_id===e.containerId&&Object(u.startsWith)(o,t.name)}),c=o.split(/\[|\]/g);c.shift(),(c=c.filter(function(e){return""!==e})).pop();var l=c.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=Y(r=X(n,t,[i.id]),l+1);for(var s="".concat(i.id,".value");c.length>0;){var d=c.shift(),f=!isNaN(d),p=!f;if(f){s="".concat(s,"[").concat(d,"]");var b=X(Object(u.get)(t,s),t,[e.id]);r=r.concat(Y(b,l)),s="".concat(s,".fields")}if(p){var m=Object(u.find)(Object(u.get)(t,s),["name",d]);s="".concat(m.id,".value"),l--}}}return r=r.map(function(e){var n=W()(e,2),r=n[0];return[n[1],Object(u.get)(t,"".concat(r,".value"))]}),Object(u.fromPairs)(r)});function ee(){return!Object(u.isUndefined)(window._wpLoadGutenbergEditor)||!Object(u.isUndefined)(window._wpLoadBlockEditor)}function te(e,t){return Object(u.find)(e,function(e){return e.name===t})}Object(c.addFilter)("carbon-fields.association.metabox","carbon-fields/metaboxes",Object(v.withProps)(function(e){return{hierarchyResolver:function(){for(var t,n,r,o,i=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId(e.containerId),c=(t=e.name,n=window.cf.config,r=n.compactInput,o=n.compactInputKey,r&&0===t.indexOf(o)?t.replace(new RegExp("^".concat(o,"\\[(.+?)\\]")),"$1"):t).split(/\[|\]/g),l=te(i,(c=c.filter(function(e){return""!==e})).shift()),s=i.indexOf(l),d=l.base_name;c.length>0;){var f=c.shift(),p=!isNaN(f),b=f===e.field.base_name,m=!p&&!b;if(p&&(s="".concat(s,".value.").concat(f,".name"),d="".concat(d,"[").concat(f,"]:").concat(Object(u.get)(i,s),"/")),m){var v=te(i,f);s=i.indexOf(v),d="".concat(d).concat(v.base_name)}b&&(d="".concat(d).concat(f))}return d}}}));var ne=n(16),re=n.n(ne),oe=n(17),ie=n.n(oe),ce=n(18),ae=n.n(ce),ue=n(19),le=n.n(ue),se=n(20),de=n.n(se),fe=n(7),pe=n.n(fe),be=n(11),me=(n(29),n(30),Object(M.compose)(Q,Object(v.withFilters)("carbon-fields.field-wrapper.metabox"))(v.Field)),ve=function(e){function t(){var e,n;re()(this,t);for(var r=arguments.length,o=new Array(r),i=0;it=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})};function Ee(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function xe(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function Se(e){for(var t=[],n=e,r=xe(e);r>0&&n;)if(xe(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var Ie={post_ancestors:[],post_parent_id:0,post_level:1};function Fe(e){var t=e.options[e.selectedIndex];return{post_ancestors:Se(t),post_parent_id:Ee(t),post_level:xe(t)+1}}Object(c.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Fe(e.target)}),we(Fe(e))):$(Ie)}),Object(c.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(a.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(J.pipe)(Object(J.combine)(Object(v.fromSelector)(Object(a.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"parent")),H(u.isEqual),Object(J.map)(function(e){var r=W()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return Ie;var a=t(i);if(!Object(u.get)(a,["hierarchical"],!1))return Ie;var l=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(u.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:l,post_parent_id:c,post_level:l.length+1}}))});var Te=n(22),Ce=n.n(Te),Ae=(e,t,n)=>Ce()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),De={post_format:"standard"};function Ne(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(c.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(J.pipe)(Ae(e,"input.post-format","change"),Object(J.map)(function(e){return Ne(e.target)}),we(Ne(e.querySelector("input.post-format:checked")))):$(De)}),Object(c.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"format"),H(),Object(J.filter)(Boolean),Object(J.map)(function(e){return{post_format:e}}),we(De))});var ke={post_template:""};function Ge(e){return{post_template:e.value}}Object(c.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Ge(e.target)}),we(Ge(e))):$(ke)}),Object(c.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"template"),H(),Object(J.filter)(u.isString),Object(J.map)(function(e){return{post_template:e}}),we(ke))});var Le=n(14),Pe=n.n(Le);function Re(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(Re(window.tagBox,"parseTags"),Re(window.tagBox,"flushTags")),Object(c.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(J.pipe)(J.merge.apply(void 0,Pe()((e=document.querySelectorAll('div[id^="taxonomy-"]'),Pe()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(J.pipe)(Ae(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(J.scan)(function(e,n){var r=n.target;return m()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(u.pull)(e[t],n)})},d()({},t,[])),we(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return Pe()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},d()({},e,[]))}(t)))}))).concat(Pe()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return Pe()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(J.pipe)(Object(J.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(J.map)(function(e){var n=e.target;return d()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),we(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return d()({},e,n)}(t)))})}()))),Object(J.scan)(function(e,t){return{post_term:p()({},e.post_term,t)}},{post_term:{}}));var e}),Object(c.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(a.select)("core").getTaxonomies,t=Object(a.select)("core/editor").getEditedPostAttribute;return Object(J.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(J.filter)(Boolean),Object(J.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(u.fromPairs)(n)}}))});var Ve={term_ancestors:[],term_parent:0,term_level:1};function Be(e){var t=e.options[e.selectedIndex];return{term_ancestors:Se(t),term_parent:Ee(t),term_level:xe(t)+1}}Object(c.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Be(e.target)}),we(Be(e))):$(Ve)});var qe={user_role:""};function Ue(e){return{user_role:e.value}}Object(c.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return $(t?{user_role:t.dataset.profileRole}:qe)}return Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Ue(e.target)}),we(Ue(e)))});var Me=Object(M.createHigherOrderComponent)(function(e){return Object(a.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(c.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(M.compose)(Me,Object(v.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)}),n(37),Object(c.addFilter)("carbon-fields.widget.classic","carbon-fields/metaboxes",Object(he.withEffects)(function(e){var t=e.mount;return Object(J.pipe)(t,Object(J.map)(function(){return{type:"COMPONENT_MOUNTED"}}))},{handler:function(e){return function(t){switch(t.type){case"COMPONENT_MOUNTED":var n=e.container,r=window.jQuery(".container-".concat(n.id));r.trigger("change"),r.closest(".widget").find(".widget-action").on("click",function(){setTimeout(function(){r.trigger("change")},500)})}}}}));var Qe=n(23),Ke=n.n(Qe);function We(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n-1&&t.data.indexOf("add-tag")>-1&&!n.documentElement.querySelector("wp_error")}))},{handler:function(e){return function(){var t=l.a.map(e.container.fields,"id"),n=V(l.a.get(window.cf,"preloaded.containers",[])),r=n.containers,o=n.fields,i=l.a.find(r,["id",e.id]),c=l.a.filter(o,["container_id",e.id]),u=Object(a.dispatch)("carbon-fields/metaboxes"),s=u.updateState,d=u.removeFields;s(l.a.keyBy([i],"id"),l.a.keyBy(c,"id")),d(t)}}})),n(38),Object(c.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(he.withEffects)(function(){return Object(J.pipe)(Object(J.fromEvent)(window,"scroll"),Object(J.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}})),n(39);var $e=n(21),ze=n.n($e),He=(n(40),function(e){function t(){var e,n;re()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1},evaluate:function(){return!1}},tt={comparers:[p()({},et,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),p()({},et,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),p()({},et,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(u.intersection)(e,n).length;default:return!1}}}),ct={boolean:nt,post_term:ot,post_ancestor_id:p()({},tt,{comparers:[rt,it],getEnvironmentValue:function(e,t){return Object(u.get)(t,"post_ancestors",[])}}),post_parent_id:tt,post_level:tt,post_format:tt,post_template:tt,term_level:tt,term_parent:p()({},tt,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(u.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(u.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),term_ancestor:p()({},tt,{comparers:[rt,it],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(u.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(u.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(u.get)(t,"term_ancestors",[])}}),user_role:tt},at=Object(a.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),ut=Object(he.withEffects)(function(e,t){var n=t.context,r=Object(c.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(c.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(c.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),a=Object(c.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),l=Object(c.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),s=Object(c.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(J.pipe)(Object(J.merge)(r,o,i,a,l,s),Object(J.scan)(function(e,t){return m()(e,function(e){Object(u.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(u.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(u.get)(ct,t.type);return r?r.isFulfiled(t,n):(console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=W()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o));c&&(c.hidden=!i),a&&(i&&!a.dataset.mounted&&(a.dataset.mounted=!0,Ze(t[o],n)),!i&&a.dataset.mounted&&(delete a.dataset.mounted,Object(be.unmountComponentAtNode)(a)))})}}}),lt=Object(M.compose)(at,ut)(function(){return null});function st(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var dt="customize.php",ft="carbon_fields_";function pt(e){return e.indexOf(ft)>-1}var bt=Object(he.withEffects)(function(){return Object(J.merge)(Object(J.pipe)(We(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(J.filter)(function(e){return pt(e.$widget[0].id)}),Object(J.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(J.pipe)(We(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(J.filter)(function(e){var t=e.data;return Object(u.startsWith)(t,"deleted:")&&pt(t)}),Object(J.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(a.select)("carbon-fields/metaboxes").getContainerById,n=Object(a.dispatch)("carbon-fields/metaboxes"),r=n.addContainer,o=n.removeContainer,i=n.addFields,c=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var l,s=e.payload,d=s.event,f=s.$widget,p=Object(u.flow)(st,JSON.parse)(f.find("[data-json]").data("json")),b=[];if("widget-updated"===d.type&&(l=t(p.id).fields.map(function(e){return e.id})),p.fields=p.fields.map(function(e){return R(e,p,b)}),i(b),r(p),"widget-updated"===d.type&&c(l),Ze(p,"classic"),window.cf.config.pagenow===dt&&"widget-added"===d.type){var m=f.find('[name="widget-id"]').val();f.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(m).liveUpdateMode=!1}break;case"WIDGET_DELETED":var v=e.payload.data.replace("deleted:",""),O="".concat("carbon_fields_container_").concat(v),j=t(O);Object(be.unmountComponentAtNode)(document.querySelector(".container-".concat(O)));var g=_.map(j.fields,"id");o(O),c(g)}}}})(function(){return null}),mt=Object(a.withSelect)(function(e){return{isDirty:e("carbon-fields/metaboxes").isDirty()}})(function(e){return wp.element.createElement("input",{type:"hidden",name:window.cf.config.revisionsInputKey,disabled:!e.isDirty,value:"1"})});Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var vt=ee()?"gutenberg":"classic";Object(c.addAction)("carbon-fields.init","carbon-fields/metaboxes",function(){var e,t;e=vt,t=Object(a.select)("carbon-fields/metaboxes").getContainers(),Object(u.forEach)(t,function(t){Ze(t,e)}),function(e){var t=window.cf.config.pagenow;Object(be.render)(wp.element.createElement(be.Fragment,null,!ee()&&wp.element.createElement(_e,null),("widgets.php"===t||t===dt)&&wp.element.createElement(bt,null),wp.element.createElement(lt,{context:e})),document.createElement("div"));var n=document.querySelector("#poststuff");n&&Object(be.render)(wp.element.createElement(mt,null),n.appendChild(document.createElement("div")))}(vt)})}]); \ No newline at end of file +this.cf=this.cf||{},this.cf.metaboxes=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=41)}([function(e,t){!function(){e.exports=this.lodash}()},function(e,t){!function(){e.exports=this.cf.vendor["callbag-basics"]}()},function(e,t){!function(){e.exports=this.wp.hooks}()},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t){!function(){e.exports=this.cf.core}()},function(e,t,n){var r=n(8);e.exports=function(e){for(var t=1;tt=>(n,r)=>{if(0!==n)return;let o;t(0,(t,n)=>{0===t?(o=n,r(t,n)):1===t?e(n)?r(t,n):o(1):r(t,n)})})},function(e,t){e.exports=(e=>(t,n)=>{if(0!==t)return;if("function"!=typeof e)return n(0,()=>{}),void n(2);let r,o;const i=e=>{(r=r||2===e)&&"function"==typeof o&&o()};n(0,i),o=e((e,t)=>{r||0===e||(n(e,t),i(e))})})},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.containers;case"UPDATE_STATE":return m()(e,function(e){Object(u.values)(t.payload.containers).forEach(function(t){e[t.id]=t})});case"ADD_CONTAINER":return m()(e,function(e){e[t.payload.id]=t.payload});case"REMOVE_CONTAINER":return Object(u.omit)(e,t.payload);default:return e}},fields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_STATE":return t.payload.fields;case"UPDATE_STATE":return m()(e,function(e){Object(u.values)(t.payload.fields).forEach(function(t){e[t.id]=t})});case"UPDATE_FIELD_VALUE":return m()(e,function(e){var n=t.payload,r=n.fieldId,o=n.value;e[r].value=o});case"ADD_FIELDS":return m()(e,function(e){t.payload.fields.forEach(function(t){e[t.id]=t})});case"CLONE_FIELDS":return m()(e,function(e){var n=t.payload,r=n.originFieldIds,o=n.cloneFieldIds,i=r.reduce(function(t,n,r){return function e(t,n,r,o){var i=Object(u.cloneDeep)(r[t]);return i.id=n,"complex"===i.type&&i.value.forEach(function(t){t.id=Object(v.uniqueId)(),o=t.fields.reduce(function(t,n){var o=n.id,i=Object(v.uniqueId)();return n.id=i,e(o,i,r,t)},o)}),o.concat(i)}(n,o[r],e,t)},[]);Object(u.assign)(e,Object(u.keyBy)(i,"id"))});case"REMOVE_FIELDS":var n=t.payload.fieldIds.reduce(function(t,n){return function e(t,n,r){var o=n[t];return"complex"===o.type&&o.value.forEach(function(t){r=t.fields.reduce(function(t,r){return e(r.id,n,t)},r)}),r.concat(t)}(n,e,t)},[]);return Object(u.omit)(e,n);case"RECEIVE_SIDEBAR":return m()(e,function(e){Object(u.forEach)(e,function(e){"sidebar"===e.type&&e.options.unshift(t.payload)})});default:return e}},savingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_SAVING":return p()({},e,d()({},t.payload.lockName,!0));case"UNLOCK_SAVING":return Object(u.omit)(e,[t.payload.lockName]);default:return e}},isDirty:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"UPDATE_FIELD_VALUE":return!0;default:return e}}});function j(e,t){return{type:"SETUP_STATE",payload:{containers:e,fields:t}}}function g(e,t){return{type:"UPDATE_STATE",payload:{containers:e,fields:t}}}function y(e,t){return{type:"UPDATE_FIELD_VALUE",payload:{fieldId:e,value:t}}}function h(e){return{type:"ADD_FIELDS",payload:{fields:e}}}function w(e,t){return{type:"CLONE_FIELDS",payload:{originFieldIds:e,cloneFieldIds:t}}}function x(e){return{type:"REMOVE_FIELDS",payload:{fieldIds:e}}}function E(e){return{type:"ADD_CONTAINER",payload:e}}function S(e){return{type:"REMOVE_CONTAINER",payload:e}}function I(e){return{type:"RECEIVE_SIDEBAR",payload:e}}function F(e){return{type:"LOCK_SAVING",payload:{lockName:e}}}function T(e){return{type:"UNLOCK_SAVING",payload:{lockName:e}}}function C(e){return e.containers}function A(e,t){return e.containers[t]}function D(e){return e.fields}function N(e,t){return Object(u.filter)(e.fields,["container_id",t])}function k(e,t){return e.fields[t]}function G(e){return Object.keys(e.savingLock).length>0}function L(e){return e.isDirty}function P(e,t){var n=Object(u.pick)(D(e),t);return n=Object(u.mapKeys)(n,function(e){return e.base_name.replace(/\-/g,"_")}),Object(u.mapValues)(n,function(e){return e.value})}function R(e,t,n){return(e=Object(u.cloneDeep)(e)).id=Object(v.uniqueId)(),e.container_id=t,"complex"===e.type&&e.value.forEach(function(e){e.id=Object(v.uniqueId)(),e.container_id=t,e.fields=e.fields.map(function(e){return R(e,t,n)})}),n.push(e),Object(u.pick)(e,["id","type","name","base_name"])}function V(e){var t=[];return{containers:e.filter(function(e){var t=e.id;return!Object(u.endsWith)(t,"__i__")}).map(function(e){return Object(u.assign)({},e,{fields:e.fields.map(function(n){return R(n,e.id,t)})})}),fields:t}}Object(a.registerStore)("carbon-fields/metaboxes",{reducer:O,actions:r,selectors:o});var B=V(Object(u.get)(window.cf,"preloaded.containers",[])),q=B.containers,U=B.fields;Object(a.dispatch)("carbon-fields/metaboxes").setupState(Object(u.keyBy)(q,"id"),Object(u.keyBy)(U,"id"));var M=n(10),Q=Object(M.createHigherOrderComponent)(function(e){var t=Object(a.withSelect)(function(e,t){var n=window.cf.config,r=n.compactInput,o=n.compactInputKey,i=e("carbon-fields/metaboxes").getFieldById(t.id),c=i.value,a=t.name||i.name;return r&&!t.name&&-1===a.indexOf("widget-carbon_fields")&&(a="".concat(o,"[").concat(a,"]")),{field:i,name:a,value:c}}),n=Object(a.withDispatch)(function(e){return{onChange:e("carbon-fields/metaboxes").updateFieldValue}});return Object(M.compose)(t,n)(e)},"withField"),K=n(15),W=n.n(K),$=function(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:[];return Object(u.pick)(t,Object(u.difference)(Object(u.map)(e.fields,"id"),n))}function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(u.map)(e,function(e){return[e.id,"".concat(Object(u.repeat)("parent.",t)).concat(e.base_name)]})}var Z=Object(v.withConditionalLogic)(function(e){var t=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId;return Object(J.pipe)(Object(J.merge)($(t(e.containerId)),Object(v.fromSelector)(t,e.containerId)),H(u.isEqual))},function(e,t){t=Object(u.keyBy)(t,"id");var n=Object(a.select)("carbon-fields/metaboxes").getContainerById(e.containerId),r=[];if(Object(u.some)(n.fields,["id",e.id]))r=Y(r=X(n,t,[e.id]));else{var o=e.name.replace(new RegExp("^".concat(window.cf.config.compactInputKey,"\\[(.+?)\\]")),"$1"),i=Object(u.find)(t,function(t){return t.container_id===e.containerId&&Object(u.startsWith)(o,t.name)}),c=o.split(/\[|\]/g);c.shift(),(c=c.filter(function(e){return""!==e})).pop();var l=c.reduce(function(e,t){return isNaN(t)?e+1:e},0);r=Y(r=X(n,t,[i.id]),l+1);for(var s="".concat(i.id,".value");c.length>0;){var d=c.shift(),f=!isNaN(d),p=!f;if(f){s="".concat(s,"[").concat(d,"]");var b=X(Object(u.get)(t,s),t,[e.id]);r=r.concat(Y(b,l)),s="".concat(s,".fields")}if(p){var m=Object(u.find)(Object(u.get)(t,s),["name",d]);s="".concat(m.id,".value"),l--}}}return r=r.map(function(e){var n=W()(e,2),r=n[0];return[n[1],Object(u.get)(t,"".concat(r,".value"))]}),Object(u.fromPairs)(r)});function ee(){return!Object(u.isUndefined)(window._wpLoadBlockEditor)}function te(e,t){return Object(u.find)(e,function(e){return e.name===t})}Object(c.addFilter)("carbon-fields.association.metabox","carbon-fields/metaboxes",Object(v.withProps)(function(e){return{hierarchyResolver:function(){for(var t,n,r,o,i=Object(a.select)("carbon-fields/metaboxes").getFieldsByContainerId(e.containerId),c=(t=e.name,n=window.cf.config,r=n.compactInput,o=n.compactInputKey,r&&0===t.indexOf(o)?t.replace(new RegExp("^".concat(o,"\\[(.+?)\\]")),"$1"):t).split(/\[|\]/g),l=te(i,(c=c.filter(function(e){return""!==e})).shift()),s=i.indexOf(l),d=l.base_name;c.length>0;){var f=c.shift(),p=!isNaN(f),b=f===e.field.base_name,m=!p&&!b;if(p&&(s="".concat(s,".value.").concat(f,".name"),d="".concat(d,"[").concat(f,"]:").concat(Object(u.get)(i,s),"/")),m){var v=te(i,f);s=i.indexOf(v),d="".concat(d).concat(v.base_name)}b&&(d="".concat(d).concat(f))}return d}}}));var ne=n(16),re=n.n(ne),oe=n(17),ie=n.n(oe),ce=n(18),ae=n.n(ce),ue=n(19),le=n.n(ue),se=n(20),de=n.n(se),fe=n(7),pe=n.n(fe),be=n(12),me=(n(29),n(30),Object(M.compose)(Q,Object(v.withFilters)("carbon-fields.field-wrapper.metabox"))(v.Field)),ve=function(e){function t(){var e,n;re()(this,t);for(var r=arguments.length,o=new Array(r),i=0;it=>(n,r)=>{if(0!==n)return;let o,i,c=!1,a=!1;for(r(0,(t,n)=>{a&&1===t&&(i=[1,n]),2===t&&(c=!0,e.length=0),o&&o(t,n)});0!==e.length;)1===e.length&&(a=!0),r(1,e.shift());c||t(0,(e,t)=>{if(0===e)return o=t,a=!1,void(i&&(o(...i),i=null));r(e,t)})};function xe(e){var t=parseInt(e.value,10);return!isNaN(t)&&t>=0?t:0}function Ee(e){var t=0;if(e.className){var n=e.className.match(/^level-(\d+)/);n&&(t=parseInt(n[1],10)+1)}return t}function Se(e){for(var t=[],n=e,r=Ee(e);r>0&&n;)if(Ee(n)===r){var o=parseInt(n.value,10);o>0&&t.unshift(o),n=n.previousSibling,r--}else n=n.previousSibling;return t}var Ie={post_ancestors:[],post_parent_id:0,post_level:1};function Fe(e){var t=e.options[e.selectedIndex];return{post_ancestors:Se(t),post_parent_id:xe(t),post_level:Ee(t)+1}}Object(c.addFilter)("carbon-fields.conditional-display-post-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent_id");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Fe(e.target)}),we(Fe(e))):$(Ie)}),Object(c.addFilter)("carbon-fields.conditional-display-post-parent.gutenberg","carbon-fields/metaboxes",function(){var e=Object(a.select)("core"),t=e.getPostType,n=e.getEntityRecords;return Object(J.pipe)(Object(J.combine)(Object(v.fromSelector)(Object(a.select)("core/editor").getCurrentPostId),Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"type"),Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"parent")),H(u.isEqual),Object(J.map)(function(e){var r=W()(e,3),o=r[0],i=r[1],c=r[2];if(c=parseInt(c,10),isNaN(c))return Ie;var a=t(i);if(!Object(u.get)(a,["hierarchical"],!1))return Ie;var l=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=Object(u.find)(n,["id",t]);return o?(r.unshift(o.id),o.parent?e(o.parent,n,r):r):r}(c,n("postType",i,{per_page:-1,exclude:o,parent_exclude:o,orderby:"menu_order",order:"asc"})||[]);return{post_ancestors:l,post_parent_id:c,post_level:l.length+1}}))});var Te=n(22),Ce=n.n(Te),Ae=(e,t,n)=>Ce()(n=>{let r=n.target;for(;r!==e;){if(r.matches(t))return!0;r=r.parentElement}return!1})(((e,t,n)=>(r,o)=>{if(0!==r)return;let i=!1;const c=e=>{o(1,e)};o(0,r=>{2===r&&(i=!0,e.removeEventListener(t,c,n))}),i||e.addEventListener(t,c,n)})(e,n)),De={post_format:"standard"};function Ne(e){var t=e.value;return"0"===t&&(t="standard"),{post_format:t}}Object(c.addFilter)("carbon-fields.conditional-display-post-format.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("div#post-formats-select");return e?Object(J.pipe)(Ae(e,"input.post-format","change"),Object(J.map)(function(e){return Ne(e.target)}),we(Ne(e.querySelector("input.post-format:checked")))):$(De)}),Object(c.addFilter)("carbon-fields.conditional-display-post-format.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"format"),H(),Object(J.filter)(Boolean),Object(J.map)(function(e){return{post_format:e}}),we(De))});var ke={post_template:""};function Ge(e){var t=e.value;return"default"===t&&(t=""),{post_template:t}}Object(c.addFilter)("carbon-fields.conditional-display-post-template.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#page_template");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Ge(e.target)}),we(Ge(e))):$(ke)}),Object(c.addFilter)("carbon-fields.conditional-display-post-template.gutenberg","carbon-fields/metaboxes",function(){return Object(J.pipe)(Object(v.fromSelector)(Object(a.select)("core/editor").getEditedPostAttribute,"template"),H(),Object(J.filter)(u.isString),Object(J.map)(function(e){return{post_template:e}}),we(ke))});var Le=n(14),Pe=n.n(Le);function Re(e,t){e["original_".concat(t)]=e[t],e[t]=function(){var n=new Event("change"),r=window.jQuery(arguments.length<=0?void 0:arguments[0]).closest(".postbox").find("textarea.the-tags").get(0),o=e["original_".concat(t)].apply(e,arguments);return r.dispatchEvent(n),o}}window.tagBox&&(Re(window.tagBox,"parseTags"),Re(window.tagBox,"flushTags")),Object(c.addFilter)("carbon-fields.conditional-display-post-term.classic","carbon-fields/metaboxes",function(){return Object(J.pipe)(J.merge.apply(void 0,Pe()((e=document.querySelectorAll('div[id^="taxonomy-"]'),Pe()(e).map(function(e){var t=e.id.replace("taxonomy-","");return Object(J.pipe)(Ae(e.querySelector("#".concat(t,"checklist")),'input[type="checkbox"]',"change"),Object(J.scan)(function(e,n){var r=n.target;return m()(e,function(e){var n=parseInt(r.value,10);r.checked?e[t].push(n):Object(u.pull)(e[t],n)})},d()({},t,[])),we(function(e){var t=document.querySelectorAll("#".concat(e,'checklist input[type="checkbox"]:checked'));return Pe()(t).reduce(function(t,n){var r=parseInt(n.value,10);return t[e].push(r),t},d()({},e,[]))}(t)))}))).concat(Pe()(function(){var e=document.querySelectorAll('div[id^="tagsdiv-"]');return Pe()(e).map(function(e){var t=e.id.replace("tagsdiv-","");return Object(J.pipe)(Object(J.fromEvent)(e.querySelector("textarea.the-tags"),"change"),Object(J.map)(function(e){var n=e.target;return d()({},t,n.value?n.value.split(window.tagsSuggestL10n.tagDelimiter):[])}),we(function(e){var t=document.querySelector("#tagsdiv-".concat(e," textarea.the-tags")),n=t.value?t.value.split(window.tagsSuggestL10n.tagDelimiter):[];return d()({},e,n)}(t)))})}()))),Object(J.scan)(function(e,t){return{post_term:p()({},e.post_term,t)}},{post_term:{}}));var e}),Object(c.addFilter)("carbon-fields.conditional-display-post-term.gutenberg","carbon-fields/metaboxes",function(){var e=Object(a.select)("core").getTaxonomies,t=Object(a.select)("core/editor").getEditedPostAttribute;return Object(J.pipe)(Object(v.fromSelector)(e,{per_page:-1}),Object(J.filter)(Boolean),Object(J.map)(function(e){var n=e.map(function(e){return[e.slug,t(e.rest_base)||[]]});return{post_term:Object(u.fromPairs)(n)}}))});var Ve={term_ancestors:[],term_parent:0,term_level:1};function Be(e){var t=e.options[e.selectedIndex];return{term_ancestors:Se(t),term_parent:xe(t),term_level:Ee(t)+1}}Object(c.addFilter)("carbon-fields.conditional-display-term-parent.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#parent");return e?Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Be(e.target)}),we(Be(e))):$(Ve)});var qe={user_role:""};function Ue(e){return{user_role:e.value}}Object(c.addFilter)("carbon-fields.conditional-display-user-role.classic","carbon-fields/metaboxes",function(){var e=document.querySelector("select#role");if(!e){var t=document.querySelector("fieldset[data-profile-role]");return $(t?{user_role:t.dataset.profileRole}:qe)}return Object(J.pipe)(Object(J.fromEvent)(e,"change"),Object(J.map)(function(e){return Ue(e.target)}),we(Ue(e)))});var Me=Object(M.createHigherOrderComponent)(function(e){return Object(a.withSelect)(function(e,t){var n=t.id;return{container:e("carbon-fields/metaboxes").getContainerById(n)}})(e)},"withContainer");Object(c.addFilter)("carbon-fields.register-container-type","carbon-fields/metaboxes",function(e,t,n){return Object(M.compose)(Me,Object(v.withFilters)("carbon-fields.".concat(e,".").concat(t)))(n)}),n(37),Object(c.addFilter)("carbon-fields.widget.classic","carbon-fields/metaboxes",Object(he.withEffects)(function(e){var t=e.mount;return Object(J.pipe)(t,Object(J.map)(function(){return{type:"COMPONENT_MOUNTED"}}))},{handler:function(e){return function(t){switch(t.type){case"COMPONENT_MOUNTED":var n=e.container,r=window.jQuery(".container-".concat(n.id));r.trigger("change"),r.closest(".widget").find(".widget-action").on("click",function(){setTimeout(function(){r.trigger("change")},500)})}}}}));var Qe=n(23),Ke=n.n(Qe);function We(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){for(var e=arguments.length,t=new Array(e),n=0;n-1&&t.data.indexOf("add-tag")>-1&&!n.documentElement.querySelector("wp_error")}))},{handler:function(e){return function(){var t=l.a.map(e.container.fields,"id"),n=V(l.a.get(window.cf,"preloaded.containers",[])),r=n.containers,o=n.fields,i=l.a.find(r,["id",e.id]),c=l.a.filter(o,["container_id",e.id]),u=Object(a.dispatch)("carbon-fields/metaboxes"),s=u.updateState,d=u.removeFields;s(l.a.keyBy([i],"id"),l.a.keyBy(c,"id")),d(t)}}})),n(38),Object(c.addFilter)("carbon-fields.theme_options.classic","carbon-fields/metaboxes",Object(he.withEffects)(function(){return Object(J.pipe)(Object(J.fromEvent)(window,"scroll"),Object(J.map)(function(){return window.jQuery(window).scrollTop()}))},{handler:function(){return function(e){var t=window.jQuery(".carbon-box:first"),n=window.jQuery("#postbox-container-1"),r=window.jQuery("#wpadminbar").height()+10,o=t.offset().top-r;o>0&&n.toggleClass("fixed",e>=o).css("top",r)}}})),n(39);var $e=n(21),ze=n.n($e),He=(n(40),function(e){function t(){var e,n;re()(this,t);for(var r=arguments.length,o=new Array(r),i=0;i-1},evaluate:function(){return!1}},tt={comparers:[p()({},et,{operators:["=","!="],evaluate:function(e,t,n){switch(t){case"=":return e==n;case"!=":return e!=n;default:return!1}}}),p()({},et,{operators:["IN","NOT IN"],evaluate:function(e,t,n){switch(t){case"IN":return n.indexOf(e)>-1;case"NOT IN":return-1===n.indexOf(e);default:return!1}}}),p()({},et,{operators:[">",">=","<","<="],evaluate:function(e,t,n){switch(t){case">":return e>n;case">=":return e>=n;case"<":return e0;case"NOT IN":return 0===Object(u.intersection)(e,n).length;default:return!1}}}),at=p()({},tt,{comparers:[rt,ct],getEnvironmentValue:function(e,t){return Object(u.get)(t,"post_ancestors",[])}}),ut=p()({},tt,{isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(u.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(u.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)}}),lt=p()({},tt,{comparers:[rt,ct],isFulfiled:function(e,t){var n=e.compare,r=e.value;return Object(u.isArray)(r)?r=r.map(function(e){return e.term_object.term_id}):Object(u.isPlainObject)(r)&&(r=r.term_object.term_id),this.firstComparerIsCorrect(this.getEnvironmentValue(e,t),n,r)},getEnvironmentValue:function(e,t){return Object(u.get)(t,"term_ancestors",[])}}),st={boolean:nt,post_term:ot,post_ancestor_id:at,post_parent_id:tt,post_level:tt,post_format:tt,post_template:it,term_level:tt,term_parent:ut,term_ancestor:lt,user_role:tt},dt=Object(a.withSelect)(function(e){return{containers:e("carbon-fields/metaboxes").getContainers()}}),ft=Object(he.withEffects)(function(e,t){var n=t.context,r=Object(c.applyFilters)("carbon-fields.conditional-display-post-parent.".concat(n)),o=Object(c.applyFilters)("carbon-fields.conditional-display-post-format.".concat(n)),i=Object(c.applyFilters)("carbon-fields.conditional-display-post-template.".concat(n)),a=Object(c.applyFilters)("carbon-fields.conditional-display-post-term.".concat(n)),l=Object(c.applyFilters)("carbon-fields.conditional-display-term-parent.".concat(n)),s=Object(c.applyFilters)("carbon-fields.conditional-display-user-role.".concat(n));return Object(J.pipe)(Object(J.merge)(r,o,i,a,l,s),Object(J.scan)(function(e,t){return m()(e,function(e){Object(u.assign)(e,t)})}))},{handler:function(e){var t=e.containers,n=e.context;return function(e){Object(u.map)(t,function(t,n){return[n,function e(t,n,r){var o=t.map(function(t){if(t.relation)return e(t.conditions,n,t.relation);var r=Object(u.get)(st,t.type);return r?r.isFulfiled(t,n):(console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition - "%1$s".',"carbon-fields-ui"),t.type)),!1)});switch(r){case"AND":return o.every(Boolean);case"OR":return o.some(Boolean);default:return console.error(Object(i.sprintf)(Object(i.__)('Unsupported container condition relation used - "%1$s".',"carbon-fields-ui"),r)),!1}}(t.conditions.conditions,e,t.conditions.relation)]}).forEach(function(e){var r=W()(e,2),o=r[0],i=r[1],c=document.getElementById(o),a=document.querySelector(".container-".concat(o)),u=!!a.dataset.mounted;c&&(c.hidden=!i),a&&(i&&!u&&Ze(t[o],n),!i&&u&&(delete a.dataset.mounted,a._reactRootContainer.unmount()))})}}}),pt=Object(M.compose)(dt,ft)(function(){return null});function bt(e){return decodeURIComponent((e+"").replace(/%(?![\da-f]{2})/gi,function(){return"%25"}).replace(/\+/g,"%20"))}var mt="customize.php",vt="carbon_fields_";function Ot(e){return e.indexOf(vt)>-1}var jt=Object(he.withEffects)(function(){return Object(J.merge)(Object(J.pipe)(We(function(e){return window.jQuery(document).on("widget-added widget-updated",e)},function(e){return window.jQuery(document).off("widget-added widget-updated",e)},function(e,t){return{event:e,$widget:t}}),Object(J.filter)(function(e){return Ot(e.$widget[0].id)}),Object(J.map)(function(e){return{type:"WIDGET_CREATED_OR_UPDATED",payload:e}})),Object(J.pipe)(We(function(e){return window.jQuery(document).on("ajaxSuccess",e)},function(e){return window.jQuery(document).off("ajaxSuccess",e)},function(e,t,n,r){return{event:e,xhr:t,options:n,data:r}}),Object(J.filter)(function(e){var t=e.data;return Object(u.startsWith)(t,"deleted:")&&Ot(t)}),Object(J.map)(function(e){return{type:"WIDGET_DELETED",payload:e}})))},{handler:function(){return function(e){var t=Object(a.select)("carbon-fields/metaboxes").getContainerById,n=Object(a.dispatch)("carbon-fields/metaboxes"),r=n.addContainer,o=n.removeContainer,i=n.addFields,c=n.removeFields;switch(e.type){case"WIDGET_CREATED_OR_UPDATED":var l,s=e.payload,d=s.event,f=s.$widget,p=Object(u.flow)(bt,JSON.parse)(f.find("[data-json]").data("json")),b=[];if("widget-updated"===d.type&&(l=t(p.id).fields.map(function(e){return e.id})),p.fields=p.fields.map(function(e){return R(e,p,b)}),i(b),r(p),"widget-updated"===d.type&&c(l),Ze(p,"classic"),window.cf.config.pagenow===mt&&"widget-added"===d.type){var m=f.find('[name="widget-id"]').val();f.find('[name="savewidget"]').show().end().find(".widget-content:first").off("keydown","input").off("change input propertychange",":input"),wp.customize.Widgets.getWidgetFormControlForWidget(m).liveUpdateMode=!1}break;case"WIDGET_DELETED":var v=e.payload.data.replace("deleted:",""),O="".concat("carbon_fields_container_").concat(v),j=t(O);Object(be.unmountComponentAtNode)(document.querySelector(".container-".concat(O)));var g=_.map(j.fields,"id");o(O),c(g)}}}})(function(){return null}),gt=Object(a.withSelect)(function(e){return{isDirty:e("carbon-fields/metaboxes").isDirty()}})(function(e){return wp.element.createElement("input",{type:"hidden",name:window.cf.config.revisionsInputKey,disabled:!e.isDirty,value:"1"})});n.d(t,"registerContainerType",function(){return Xe}),n.d(t,"getContainerType",function(){return Ye}),Object(i.setLocaleData)(window.cf.config.locale,"carbon-fields-ui");var yt=ee()?"gutenberg":"classic";Object(c.addAction)("carbon-fields.init","carbon-fields/metaboxes",function(){var e,t;e=yt,t=Object(a.select)("carbon-fields/metaboxes").getContainers(),Object(u.forEach)(t,function(t){Ze(t,e)}),function(e){var t=window.cf.config.pagenow;Object(be.render)(wp.element.createElement(be.Fragment,null,!ee()&&wp.element.createElement(_e,null),("widgets.php"===t||t===mt)&&wp.element.createElement(jt,null),wp.element.createElement(pt,{context:e})),document.createElement("div"));var n=document.querySelector("#poststuff");n&&Object(be.render)(wp.element.createElement(gt,null),n.appendChild(document.createElement("div")))}(yt)})}]); \ No newline at end of file diff --git a/languages/carbon-fields-ui.pot b/languages/carbon-fields-ui.pot index 0f8ba00f3..34ca7283e 100644 --- a/languages/carbon-fields-ui.pot +++ b/languages/carbon-fields-ui.pot @@ -3,15 +3,15 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "X-Generator: babel-plugin-makepot\n" -#: packages/blocks/components/block-edit/index.js:201 +#: packages/blocks/components/block-edit/index.js:214 msgid "Show preview" msgstr "" -#: packages/blocks/components/block-edit/index.js:202 +#: packages/blocks/components/block-edit/index.js:215 msgid "Hide preview" msgstr "" -#: packages/blocks/components/block-edit/index.js:271 +#: packages/blocks/components/block-edit/index.js:286 msgid "Fields" msgstr "" @@ -19,6 +19,14 @@ msgstr "" msgid "Field of type '%s' is not supported in Gutenberg." msgstr "" +#: packages/blocks/components/server-side-render/index.js:129 +msgid "Error loading block: %s" +msgstr "" + +#: packages/blocks/components/server-side-render/index.js:135 +msgid "No results found." +msgstr "" + #: packages/blocks/fields/datetime/index.js:59 #: packages/core/fields/date/index.js:15 #: packages/metaboxes/fields/datetime/index.js:9 @@ -63,29 +71,29 @@ msgstr "" msgid "Search..." msgstr "" -#: packages/core/fields/association/index.js:113 +#: packages/core/fields/association/index.js:168 msgid "Maximum number of items reached (%s items)" msgstr "" -#: packages/core/fields/association/index.js:204 +#: packages/core/fields/association/index.js:266 msgid "Showing %1$d of %2$d results" msgstr "" -#: packages/core/fields/association/index.js:380 +#: packages/core/fields/association/index.js:449 msgid "An error occurred while trying to fetch association options." msgstr "" -#: packages/core/fields/association/index.js:430 +#: packages/core/fields/association/index.js:506 #: packages/core/fields/complex/index.js:428 #: packages/core/hocs/with-validation/required.js:20 msgid "This field is required." msgstr "" -#: packages/core/fields/association/index.js:434 +#: packages/core/fields/association/index.js:510 msgid "Minimum number of items not reached (%s items)" msgstr "" -#: packages/core/fields/color/index.js:86 +#: packages/core/fields/color/index.js:92 msgid "Select a color" msgstr "" @@ -197,7 +205,7 @@ msgstr "" msgid "An error occurred while trying to fetch files data." msgstr "" -#: packages/metaboxes/containers/index.js:52 +#: packages/metaboxes/containers/index.js:55 msgid "Could not find DOM element for container \"%1$s\"." msgstr ""