@r3l/app
Version:
2 lines • 18.2 kB
JavaScript
(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[56],{"../../node_modules/react-select/async/dist/react-select.browser.esm.js":function(e,t,n){"use strict";var r=n("../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),o=n("../../node_modules/@babel/runtime/helpers/esm/extends.js"),a=(n("../../node_modules/@babel/runtime/helpers/slicedToArray.js"),n("../../node_modules/@babel/runtime/helpers/toConsumableArray.js"),n("../../node_modules/@babel/runtime/helpers/defineProperty.js"),n("../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js")),s=n("../../node_modules/@babel/runtime/helpers/esm/createClass.js"),i=(n("../../node_modules/@babel/runtime/helpers/assertThisInitialized.js"),n("../../node_modules/@babel/runtime/helpers/esm/inherits.js")),u=n("../../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),l=n("../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),c=n("../../node_modules/react/index.js"),d=n.n(c),p=(n("../../node_modules/@emotion/core/dist/core.browser.esm.js"),n("../../node_modules/react-dom/index.js"),n("../../node_modules/@babel/runtime/helpers/typeof.js"),n("../../node_modules/react-select/dist/index-75b02bac.browser.esm.js")),f=n("../../node_modules/react-select/dist/Select-e1cf49ae.browser.esm.js"),m=(n("../../node_modules/@emotion/css/dist/css.browser.esm.js"),n("../../node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js"),n("../../node_modules/react-input-autosize/lib/AutosizeInput.js"),n("../../node_modules/react-select/dist/stateManager-2f2b6f5b.browser.esm.js"));function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(l.a)(e);if(t){var o=Object(l.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(u.a)(this,n)}}var b,v,g,y={cacheOptions:!1,defaultOptions:!1,filterOption:null,isLoading:!1},O=Object(m.a)(f.a),j=(b=O,g=v=function(e){Object(i.a)(n,e);var t=h(n);function n(e){var r;return Object(a.a)(this,n),(r=t.call(this)).select=void 0,r.lastRequest=void 0,r.mounted=!1,r.optionsCache={},r.handleInputChange=function(e,t){var n=r.props,o=n.cacheOptions,a=n.onInputChange,s=Object(p.g)(e,t,a);if(!s)return delete r.lastRequest,void r.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(o&&r.optionsCache[s])r.setState({inputValue:s,loadedInputValue:s,loadedOptions:r.optionsCache[s],isLoading:!1,passEmptyOptions:!1});else{var i=r.lastRequest={};r.setState({inputValue:s,isLoading:!0,passEmptyOptions:!r.state.loadedInputValue},(function(){r.loadOptions(s,(function(e){r.mounted&&(e&&(r.optionsCache[s]=e),i===r.lastRequest&&(delete r.lastRequest,r.setState({isLoading:!1,loadedInputValue:s,loadedOptions:e||[],passEmptyOptions:!1})))}))}))}return s},r.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:void 0!==e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},r}return Object(s.a)(n,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,(function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}}))}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var r=n(e,t);r&&"function"==typeof r.then&&r.then(t,(function(){return t()}))}},{key:"render",value:function(){var e=this,t=this.props,n=(t.loadOptions,t.isLoading),a=Object(r.a)(t,["loadOptions","isLoading"]),s=this.state,i=s.defaultOptions,u=s.inputValue,l=s.isLoading,c=s.loadedInputValue,p=s.loadedOptions,f=s.passEmptyOptions?[]:u&&c?p:i||[];return d.a.createElement(b,Object(o.a)({},a,{ref:function(t){e.select=t},options:f,isLoading:l||n,onInputChange:this.handleInputChange}))}}]),n}(c.Component),v.defaultProps=y,g);t.a=j},"../../node_modules/react-select/creatable/dist/react-select.browser.esm.js":function(e,t,n){"use strict";n("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js");var r=n("../../node_modules/@babel/runtime/helpers/esm/extends.js"),o=(n("../../node_modules/@babel/runtime/helpers/slicedToArray.js"),n("../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js")),a=n("../../node_modules/@babel/runtime/helpers/esm/defineProperty.js"),s=n("../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js"),i=n("../../node_modules/@babel/runtime/helpers/esm/createClass.js"),u=(n("../../node_modules/@babel/runtime/helpers/assertThisInitialized.js"),n("../../node_modules/@babel/runtime/helpers/esm/inherits.js")),l=n("../../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"),c=n("../../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"),d=n("../../node_modules/react/index.js"),p=n.n(d),f=(n("../../node_modules/@emotion/core/dist/core.browser.esm.js"),n("../../node_modules/react-dom/index.js"),n("../../node_modules/@babel/runtime/helpers/typeof.js"),n("../../node_modules/react-select/dist/index-75b02bac.browser.esm.js")),m=n("../../node_modules/react-select/dist/Select-e1cf49ae.browser.esm.js"),h=(n("../../node_modules/@emotion/css/dist/css.browser.esm.js"),n("../../node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js"),n("../../node_modules/react-input-autosize/lib/AutosizeInput.js"),n("../../node_modules/react-select/dist/stateManager-2f2b6f5b.browser.esm.js"));function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(c.a)(e);if(t){var o=Object(c.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(l.a)(this,n)}}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var g,y,O,j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=String(e).toLowerCase(),r=String(t.value).toLowerCase(),o=String(t.label).toLowerCase();return r===n||o===n},_=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some((function(t){return j(e,t)}))||n.some((function(t){return j(e,t)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),w=(g=m.a,O=y=function(e){Object(u.a)(n,e);var t=b(n);function n(e){var r;Object(s.a)(this,n),(r=t.call(this,e)).select=void 0,r.onChange=function(e,t){var n=r.props,a=n.getNewOptionData,s=n.inputValue,i=n.isMulti,u=n.onChange,l=n.onCreateOption,c=n.value,d=n.name;if("select-option"!==t.action)return u(e,t);var p=r.state.newOption,m=Array.isArray(e)?e:[e];if(m[m.length-1]!==p)u(e,t);else if(l)l(s);else{var h=a(s,s),b={action:"create-option",name:d};u(i?[].concat(Object(o.a)(Object(f.c)(c)),[h]):h,b)}};var a=e.options||[];return r.state={newOption:void 0,options:a},r}return Object(i.a)(n,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,a=e.getNewOptionData,s=e.inputValue,i=e.isLoading,u=e.isValidNewOption,l=e.value,c=e.options||[],d=this.state.newOption;d=u(s,Object(f.c)(l),c)?a(s,r(s)):void 0,this.setState({newOption:d,options:!t&&i||!d?c:"first"===n?[d].concat(Object(o.a)(c)):[].concat(Object(o.a)(c),[d])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var e=this,t=this.state.options;return p.a.createElement(g,Object(r.a)({},this.props,{ref:function(t){e.select=t},options:t,onChange:this.onChange}))}}]),n}(d.Component),y.defaultProps=_,O),C=Object(h.a)(w);t.a=C},"../../node_modules/redux-form/es/Field.js":function(e,t,n){"use strict";var r=n("../../node_modules/@babel/runtime/helpers/extends.js"),o=n.n(r),a=n("../../node_modules/@babel/runtime/helpers/createClass.js"),s=n.n(a),i=n("../../node_modules/@babel/runtime/helpers/inheritsLoose.js"),u=n.n(i),l=n("../../node_modules/react/index.js"),c=n.n(l),d=n("../../node_modules/prop-types/index.js"),p=n.n(d),f=n("../../node_modules/invariant/browser.js"),m=n.n(f),h=n("../../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"),b=n.n(h),v=n("../../node_modules/react-redux/es/index.js"),g=function(e,t,n,r){var a=t.value;return"checkbox"===e?o()({},t,{checked:!!a}):"radio"===e?o()({},t,{checked:r(a,n),value:n}):"select-multiple"===e?o()({},t,{value:a||[]}):"file"===e?o()({},t,{value:a||void 0}):t};var y=n("../../node_modules/redux-form/es/events/isEvent.js"),O=function(e,t){if(Object(y.a)(e)){if(!t&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(t&&void 0!==e.nativeEvent)return e.nativeEvent.text;var n=e,r=n.target,o=r.type,a=r.value,s=r.checked,i=r.files,u=n.dataTransfer;return"checkbox"===o?!!s:"file"===o?i||u&&u.files:"select-multiple"===o?function(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n];r.selected&&t.push(r.value)}return t}(e.target.options):a}return e},j="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product,_=function(e,t){var n=t.name,r=t.parse,o=t.normalize,a=O(e,j);return r&&(a=r(a,n)),o&&(a=o(n,a)),a},w=n("../../node_modules/redux-form/es/structure/plain/index.js"),C=n("../../node_modules/react-is/index.js"),x=function(e,t,n){return Object(C.isValidElementType)(e[t])?null:new Error("Invalid prop `"+t+"` supplied to `"+n+"`.")},D=["_reduxForm"],E=function(e){return e&&"object"==typeof e},F=function(e){return e&&"function"==typeof e},R=function(e){E(e)&&F(e.preventDefault)&&e.preventDefault()},S=function(e,t){if(E(e)&&E(e.dataTransfer)&&F(e.dataTransfer.getData))return e.dataTransfer.getData(t)},P=function(e,t,n){E(e)&&E(e.dataTransfer)&&F(e.dataTransfer.setData)&&e.dataTransfer.setData(t,n)};var V=function(e){var t=e.deepEqual,n=e.getIn,r=function(n){function r(){for(var e,t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return(e=n.call.apply(n,[this].concat(r))||this).ref=c.a.createRef(),e.isPristine=function(){return e.props.pristine},e.getValue=function(){return e.props.value},e.handleChange=function(t){var n=e.props,r=n.name,a=n.dispatch,s=n.parse,i=n.normalize,u=n.onChange,l=n._reduxForm,c=n.value,d=_(t,{name:r,parse:s,normalize:i}),p=!1;if(u)if(!j&&Object(y.a)(t))u(o()({},t,{preventDefault:function(){return p=!0,R(t)}}),d,c,r);else{var f=u(t,d,c,r);j&&(p=f)}p||(a(l.change(r,d)),l.asyncValidate&&l.asyncValidate(r,d,"change"))},e.handleFocus=function(t){var n=e.props,r=n.name,a=n.dispatch,s=n.onFocus,i=n._reduxForm,u=!1;s&&(j?u=s(t,r):s(o()({},t,{preventDefault:function(){return u=!0,R(t)}}),r)),u||a(i.focus(r))},e.handleBlur=function(t){var n=e.props,r=n.name,a=n.dispatch,s=n.parse,i=n.normalize,u=n.onBlur,l=n._reduxForm,c=n._value,d=n.value,p=_(t,{name:r,parse:s,normalize:i});p===c&&void 0!==c&&(p=d);var f=!1;u&&(j?f=u(t,p,d,r):u(o()({},t,{preventDefault:function(){return f=!0,R(t)}}),p,d,r)),f||(a(l.blur(r,p)),l.asyncValidate&&l.asyncValidate(r,p,"blur"))},e.handleDragStart=function(t){var n=e.props,r=n.name,o=n.onDragStart,a=n.value;P(t,"text",null==a?"":a),o&&o(t,r)},e.handleDrop=function(t){var n=e.props,r=n.name,a=n.dispatch,s=n.onDrop,i=n._reduxForm,u=n.value,l=S(t,"text"),c=!1;s&&s(o()({},t,{preventDefault:function(){return c=!0,R(t)}}),l,u,r),c||(a(i.change(r,l)),R(t))},e}u()(r,n);var a=r.prototype;return a.shouldComponentUpdate=function(e){var n=this,r=Object.keys(e),o=Object.keys(this.props);return!!(this.props.children||e.children||r.length!==o.length||r.some((function(r){return~(e.immutableProps||[]).indexOf(r)?n.props[r]!==e[r]:!~D.indexOf(r)&&!t(n.props[r],e[r])})))},a.getRenderedComponent=function(){return this.ref.current},a.render=function(){var t=this.props,n=t.component,r=t.forwardRef,a=t.name,s=t._reduxForm,i=(t.normalize,t.onBlur,t.onChange,t.onFocus,t.onDragStart,t.onDrop,t.immutableProps,b()(t,["component","forwardRef","name","_reduxForm","normalize","onBlur","onChange","onFocus","onDragStart","onDrop","immutableProps"])),u=function(e,t,n){var r=e.getIn,a=e.toJS,s=e.deepEqual,i=n.asyncError,u=n.asyncValidating,l=n.onBlur,c=n.onChange,d=n.onDrop,p=n.onDragStart,f=n.dirty,m=n.dispatch,h=n.onFocus,v=n.form,y=n.format,O=n.initial,j=(n.parse,n.pristine),_=n.props,w=n.state,C=n.submitError,x=n.submitFailed,D=n.submitting,E=n.syncError,F=n.syncWarning,R=(n.validate,n.value),S=n._value,P=(n.warn,b()(n,["asyncError","asyncValidating","onBlur","onChange","onDrop","onDragStart","dirty","dispatch","onFocus","form","format","initial","parse","pristine","props","state","submitError","submitFailed","submitting","syncError","syncWarning","validate","value","_value","warn"])),V=E||i||C,L=F,k=function(e,n){if(null===n)return e;var r=null==e?"":e;return n?n(e,t):r}(R,y);return{input:g(P.type,{name:t,onBlur:l,onChange:c,onDragStart:p,onDrop:d,onFocus:h,value:k},S,s),meta:o()({},a(w),{active:!(!w||!r(w,"active")),asyncValidating:u,autofilled:!(!w||!r(w,"autofilled")),dirty:f,dispatch:m,error:V,form:v,initial:O,warning:L,invalid:!!V,pristine:j,submitting:!!D,submitFailed:!!x,touched:!(!w||!r(w,"touched")),valid:!V,visited:!(!w||!r(w,"visited"))}),custom:o()({},P,{},_)}}(e,a,o()({},i,{form:s.form,onBlur:this.handleBlur,onChange:this.handleChange,onDrop:this.handleDrop,onDragStart:this.handleDragStart,onFocus:this.handleFocus})),c=u.custom,d=b()(u,["custom"]);if(r&&(c.ref=this.ref),"string"==typeof n){var p=d.input;d.meta;return Object(l.createElement)(n,o()({},p,{},c))}return Object(l.createElement)(n,o()({},d,{},c))},r}(l.Component);return r.propTypes={component:x,props:p.a.object},Object(v.b)((function(e,r){var o=r.name,a=r._reduxForm,s=a.initialValues,i=(0,a.getFormState)(e),u=n(i,"initial."+o),l=void 0!==u?u:s&&n(s,o),c=n(i,"values."+o),d=n(i,"submitting"),p=function(e,t){var n=w.a.getIn(e,t);return n&&n._error?n._error:n}(n(i,"syncErrors"),o),f=function(e,t){var r=n(e,t);return r&&r._warning?r._warning:r}(n(i,"syncWarnings"),o),m=t(c,l);return{asyncError:n(i,"asyncErrors."+o),asyncValidating:n(i,"asyncValidating")===o,dirty:!m,pristine:m,state:n(i,"fields."+o),submitError:n(i,"submitErrors."+o),submitFailed:n(i,"submitFailed"),submitting:d,syncError:p,syncWarning:f,initial:l,value:c,_value:r.value}}),void 0,void 0,{forwardRef:!0})(r)},L=n("../../node_modules/lodash/isEqualWith.js"),k=n.n(L),A=function(e,t,n,r,o,a){if(a)return e===t},I=function(e,t,n){var r=k()(e.props,t,A),o=k()(e.state,n,A);return!r||!o},z=function(e,t){var n=e._reduxForm.sectionPrefix;return n?n+"."+t:t},T=n("../../node_modules/redux-form/es/ReduxFormContext.js");var W=function(e){var t=V(e),n=e.setIn,r=function(e){function r(t){var r;if((r=e.call(this,t)||this).ref=c.a.createRef(),r.normalize=function(e,t){var o=r.props.normalize;if(!o)return t;var a=r.props._reduxForm.getValues();return o(t,r.value,n(a,e,t),a,e)},!t._reduxForm)throw new Error("Field must be inside a component decorated with reduxForm()");return r}u()(r,e);var a=r.prototype;return a.componentDidMount=function(){var e=this;this.props._reduxForm.register(this.name,"Field",(function(){return e.props.validate}),(function(){return e.props.warn}))},a.shouldComponentUpdate=function(e,t){return I(this,e,t)},a.UNSAFE_componentWillReceiveProps=function(e){var t=z(this.props,this.props.name),n=z(e,e.name);t===n&&w.a.deepEqual(this.props.validate,e.validate)&&w.a.deepEqual(this.props.warn,e.warn)||(this.props._reduxForm.unregister(t),this.props._reduxForm.register(n,"Field",(function(){return e.validate}),(function(){return e.warn})))},a.componentWillUnmount=function(){this.props._reduxForm.unregister(this.name)},a.getRenderedComponent=function(){return m()(this.props.forwardRef,"If you want to access getRenderedComponent(), you must specify a forwardRef prop to Field"),this.ref.current?this.ref.current.getRenderedComponent():void 0},a.render=function(){return Object(l.createElement)(t,o()({},this.props,{name:this.name,normalize:this.normalize,ref:this.ref}))},s()(r,[{key:"name",get:function(){return z(this.props,this.props.name)}},{key:"dirty",get:function(){return!this.pristine}},{key:"pristine",get:function(){return!(!this.ref.current||!this.ref.current.isPristine())}},{key:"value",get:function(){return this.ref.current&&this.ref.current.getValue()}}]),r}(l.Component);return r.propTypes={name:p.a.string.isRequired,component:x,format:p.a.func,normalize:p.a.func,onBlur:p.a.func,onChange:p.a.func,onFocus:p.a.func,onDragStart:p.a.func,onDrop:p.a.func,parse:p.a.func,props:p.a.object,validate:p.a.oneOfType([p.a.func,p.a.arrayOf(p.a.func)]),warn:p.a.oneOfType([p.a.func,p.a.arrayOf(p.a.func)]),forwardRef:p.a.bool,immutableProps:p.a.arrayOf(p.a.string),_reduxForm:p.a.object},Object(T.b)(r)};t.a=W(w.a)}}]);
//# sourceMappingURL=vendors~admin-web-communityAdminForm-component.bundle.1b0f54beebba2d27c917.js.map