!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={1139:(e,t,r)=>{r.d(t,{default:()=>u});var o=r(1116),n=r.n(o),i=r(2015),a=r.n(i);const l=require("jodit-react");var c=r.n(l);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}const u=({id:e,value:t,error:r,className:o,onChange:l,options:u={},extraButtons:p=[]})=>{const f=(0,i.useRef)(null),b=(0,i.useMemo)((()=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({placeholder:"Start typing...",className:o,buttons:["bold","italic","strikethrough","underline","|","source","|","font","fontsize","align","|","ul","ol","image","link","|","undo","redo","|","spellcheck","table",...p],askBeforePasteHTML:!1,askBeforePasteFromWord:!1,pasteFromWord:{enable:!0,convertUnitsToPixel:!0},beautifyHTML:!1},u)),[]);return a().createElement("div",{className:"editor-input"},a().createElement(c(),{ref:f,key:t,value:t,config:b,onBlur:t=>{l({target:{id:e,value:t,type:"texteditor"}})}}),r&&a().createElement("p",{className:"error-label"},r))}},9558:(e,t,r)=>{r.d(t,{normalizeHtmlString:()=>o});r(5812),r(8041);const o=e=>{if(!e)return"";return 0===(new DOMParser).parseFromString(e,"text/html").body.textContent.trim().length?"":e}},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},8619:e=>{e.exports=require("@mui/material")},3294:e=>{e.exports=require("formik")},5812:e=>{e.exports=require("moment-timezone")},2015:e=>{e.exports=require("react")},8041:e=>{e.exports=require("urijs")}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var o={};r.r(o),r.d(o,{default:()=>g});var n=r(6031),i=r.n(n),a=r(1116),l=r.n(a),c=r(2462),s=r.n(c),u=r(2015),p=r.n(u),f=r(3294),b=r(8619),d=r(1139),m=r(9558);const y=["name","label","options","licence"];function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}const g=e=>{let{name:t,label:r="",options:o={},licence:n}=e,a=s()(e,y);const[c,u,g]=(0,f.useField)(t),j=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){l()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({tabIndex:0,allowTabNavigation:!0},o);return p().createElement(p().Fragment,null,r&&p().createElement(b.InputLabel,{htmlFor:t},r),p().createElement(d.default,i()({id:t,value:c.value,options:j,onChange:e=>{const t=(0,m.normalizeHtmlString)(e.target.value);g.setValue(t)},error:u.touched&&u.error,license:n},a)))};return o})()));
//# sourceMappingURL=texteditor.js.map