Socket
Socket
Sign inDemoInstall

@ckeditor/ckeditor5-react

Package Overview
Dependencies
11
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.0-alpha.0 to 6.0.0

2

dist/index.js

@@ -5,3 +5,3 @@ /*!

*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.CKEditor=e(require("react")):t.CKEditor=e(t.React)}(self,(t=>(()=>{var e={703:(t,e,r)=>{"use strict";var o=r(414);function n(){}function i(){}i.resetWarningCache=n,t.exports=function(){function t(t,e,r,n,i,s){if(s!==o){var a=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 a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:n};return r.PropTypes=r,r}},697:(t,e,r)=>{t.exports=r(703)()},414:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},787:e=>{"use strict";e.exports=t}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";o.r(n),o.d(n,{CKEditor:()=>Ho,CKEditorContext:()=>Bo});var t=o(787),e=o.n(t),r=o(697),i=o.n(r);const s=new Array(256).fill("").map(((t,e)=>("0"+e.toString(16)).slice(-2)));class a{constructor(t){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof t.crashNumberLimit?t.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof t.minimumNonErrorTimePeriod?t.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=t=>{const e="error"in t?t.error:t.reason;e instanceof Error&&this._handleError(e,t)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(t,e){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e)}off(t,e){this._listeners[t]=this._listeners[t].filter((t=>t!==e))}_fire(t,...e){const r=this._listeners[t]||[];for(const t of r)t.apply(this,[null,...e])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(t,e){if(this._shouldReactToError(t)){this.crashes.push({message:t.message,stack:t.stack,filename:e instanceof ErrorEvent?e.filename:void 0,lineno:e instanceof ErrorEvent?e.lineno:void 0,colno:e instanceof ErrorEvent?e.colno:void 0,date:this._now()});const r=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:t,causesRestart:r}),r?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(t){return t.is&&t.is("CKEditorError")&&void 0!==t.context&&null!==t.context&&"ready"===this.state&&this._isErrorComingFromThisItem(t)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function c(t,e=new Set){const r=[t],o=new Set;let n=0;for(;r.length>n;){const t=r[n++];if(!o.has(t)&&u(t)&&!e.has(t))if(o.add(t),Symbol.iterator in t)try{for(const e of t)r.push(e)}catch(t){}else for(const e in t)"defaultValue"!==e&&r.push(t[e])}return o}function u(t){const e=Object.prototype.toString.call(t),r=typeof t;return!("number"===r||"boolean"===r||"string"===r||"symbol"===r||"function"===r||"[object Date]"===e||"[object RegExp]"===e||"[object Module]"===e||null==t||t._watchdogExcluded||t instanceof EventTarget||t instanceof Event)}function h(t,e,r=new Set){if(t===e&&("object"==typeof(o=t)&&null!==o))return!0;var o;const n=c(t,r),i=c(e,r);for(const t of n)if(i.has(t))return!0;return!1}const d=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};const l="object"==typeof global&&global&&global.Object===Object&&global;var f="object"==typeof self&&self&&self.Object===Object&&self;const p=l||f||Function("return this")();const _=function(){return p.Date.now()};var y=/\s/;const g=function(t){for(var e=t.length;e--&&y.test(t.charAt(e)););return e};var v=/^\s+/;const b=function(t){return t?t.slice(0,g(t)+1).replace(v,""):t};const m=p.Symbol;var j=Object.prototype,w=j.hasOwnProperty,x=j.toString,E=m?m.toStringTag:void 0;const O=function(t){var e=w.call(t,E),r=t[E];try{t[E]=void 0;var o=!0}catch(t){}var n=x.call(t);return o&&(e?t[E]=r:delete t[E]),n};var C=Object.prototype.toString;const P=function(t){return C.call(t)};var A="[object Null]",T="[object Undefined]",S=m?m.toStringTag:void 0;const W=function(t){return null==t?void 0===t?T:A:S&&S in Object(t)?O(t):P(t)};const R=function(t){return null!=t&&"object"==typeof t};var I="[object Symbol]";const D=function(t){return"symbol"==typeof t||R(t)&&W(t)==I};var z=NaN,M=/^[-+]0x[0-9a-f]+$/i,U=/^0b[01]+$/i,F=/^0o[0-7]+$/i,N=parseInt;const q=function(t){if("number"==typeof t)return t;if(D(t))return z;if(d(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=d(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=b(t);var r=U.test(t);return r||F.test(t)?N(t.slice(2),r?2:8):M.test(t)?z:+t};var L="Expected a function",k=Math.max,B=Math.min;const $=function(t,e,r){var o,n,i,s,a,c,u=0,h=!1,l=!1,f=!0;if("function"!=typeof t)throw new TypeError(L);function p(e){var r=o,i=n;return o=n=void 0,u=e,s=t.apply(i,r)}function y(t){var r=t-c;return void 0===c||r>=e||r<0||l&&t-u>=i}function g(){var t=_();if(y(t))return v(t);a=setTimeout(g,function(t){var r=e-(t-c);return l?B(r,i-(t-u)):r}(t))}function v(t){return a=void 0,f&&o?p(t):(o=n=void 0,s)}function b(){var t=_(),r=y(t);if(o=arguments,n=this,c=t,r){if(void 0===a)return function(t){return u=t,a=setTimeout(g,e),h?p(t):s}(c);if(l)return clearTimeout(a),a=setTimeout(g,e),p(c)}return void 0===a&&(a=setTimeout(g,e)),s}return e=q(e)||0,d(r)&&(h=!!r.leading,i=(l="maxWait"in r)?k(q(r.maxWait)||0,e):i,f="trailing"in r?!!r.trailing:f),b.cancel=function(){void 0!==a&&clearTimeout(a),u=0,o=c=n=a=void 0},b.flush=function(){return void 0===a?s:v(_())},b};var H="Expected a function";const V=function(t,e,r){var o=!0,n=!0;if("function"!=typeof t)throw new TypeError(H);return d(r)&&(o="leading"in r?!!r.leading:o,n="trailing"in r?!!r.trailing:n),$(t,e,{leading:o,maxWait:e,trailing:n})};const K=function(){this.__data__=[],this.size=0};const Q=function(t,e){return t===e||t!=t&&e!=e};const G=function(t,e){for(var r=t.length;r--;)if(Q(t[r][0],e))return r;return-1};var Y=Array.prototype.splice;const J=function(t){var e=this.__data__,r=G(e,t);return!(r<0)&&(r==e.length-1?e.pop():Y.call(e,r,1),--this.size,!0)};const X=function(t){var e=this.__data__,r=G(e,t);return r<0?void 0:e[r][1]};const Z=function(t){return G(this.__data__,t)>-1};const tt=function(t,e){var r=this.__data__,o=G(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this};function et(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}et.prototype.clear=K,et.prototype.delete=J,et.prototype.get=X,et.prototype.has=Z,et.prototype.set=tt;const rt=et;const ot=function(){this.__data__=new rt,this.size=0};const nt=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};const it=function(t){return this.__data__.get(t)};const st=function(t){return this.__data__.has(t)};var at="[object AsyncFunction]",ct="[object Function]",ut="[object GeneratorFunction]",ht="[object Proxy]";const dt=function(t){if(!d(t))return!1;var e=W(t);return e==ct||e==ut||e==at||e==ht};const lt=p["__core-js_shared__"];var ft=function(){var t=/[^.]+$/.exec(lt&&lt.keys&&lt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();const pt=function(t){return!!ft&&ft in t};var _t=Function.prototype.toString;const yt=function(t){if(null!=t){try{return _t.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var gt=/^\[object .+?Constructor\]$/,vt=Function.prototype,bt=Object.prototype,mt=vt.toString,jt=bt.hasOwnProperty,wt=RegExp("^"+mt.call(jt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const xt=function(t){return!(!d(t)||pt(t))&&(dt(t)?wt:gt).test(yt(t))};const Et=function(t,e){return null==t?void 0:t[e]};const Ot=function(t,e){var r=Et(t,e);return xt(r)?r:void 0};const Ct=Ot(p,"Map");const Pt=Ot(Object,"create");const At=function(){this.__data__=Pt?Pt(null):{},this.size=0};const Tt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var St="__lodash_hash_undefined__",Wt=Object.prototype.hasOwnProperty;const Rt=function(t){var e=this.__data__;if(Pt){var r=e[t];return r===St?void 0:r}return Wt.call(e,t)?e[t]:void 0};var It=Object.prototype.hasOwnProperty;const Dt=function(t){var e=this.__data__;return Pt?void 0!==e[t]:It.call(e,t)};var zt="__lodash_hash_undefined__";const Mt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Pt&&void 0===e?zt:e,this};function Ut(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}Ut.prototype.clear=At,Ut.prototype.delete=Tt,Ut.prototype.get=Rt,Ut.prototype.has=Dt,Ut.prototype.set=Mt;const Ft=Ut;const Nt=function(){this.size=0,this.__data__={hash:new Ft,map:new(Ct||rt),string:new Ft}};const qt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const Lt=function(t,e){var r=t.__data__;return qt(e)?r["string"==typeof e?"string":"hash"]:r.map};const kt=function(t){var e=Lt(this,t).delete(t);return this.size-=e?1:0,e};const Bt=function(t){return Lt(this,t).get(t)};const $t=function(t){return Lt(this,t).has(t)};const Ht=function(t,e){var r=Lt(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this};function Vt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}Vt.prototype.clear=Nt,Vt.prototype.delete=kt,Vt.prototype.get=Bt,Vt.prototype.has=$t,Vt.prototype.set=Ht;const Kt=Vt;var Qt=200;const Gt=function(t,e){var r=this.__data__;if(r instanceof rt){var o=r.__data__;if(!Ct||o.length<Qt-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new Kt(o)}return r.set(t,e),this.size=r.size,this};function Yt(t){var e=this.__data__=new rt(t);this.size=e.size}Yt.prototype.clear=ot,Yt.prototype.delete=nt,Yt.prototype.get=it,Yt.prototype.has=st,Yt.prototype.set=Gt;const Jt=Yt;const Xt=function(t,e){for(var r=-1,o=null==t?0:t.length;++r<o&&!1!==e(t[r],r,t););return t};const Zt=function(){try{var t=Ot(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();const te=function(t,e,r){"__proto__"==e&&Zt?Zt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r};var ee=Object.prototype.hasOwnProperty;const re=function(t,e,r){var o=t[e];ee.call(t,e)&&Q(o,r)&&(void 0!==r||e in t)||te(t,e,r)};const oe=function(t,e,r,o){var n=!r;r||(r={});for(var i=-1,s=e.length;++i<s;){var a=e[i],c=o?o(r[a],t[a],a,r,t):void 0;void 0===c&&(c=t[a]),n?te(r,a,c):re(r,a,c)}return r};const ne=function(t,e){for(var r=-1,o=Array(t);++r<t;)o[r]=e(r);return o};var ie="[object Arguments]";const se=function(t){return R(t)&&W(t)==ie};var ae=Object.prototype,ce=ae.hasOwnProperty,ue=ae.propertyIsEnumerable;const he=se(function(){return arguments}())?se:function(t){return R(t)&&ce.call(t,"callee")&&!ue.call(t,"callee")};const de=Array.isArray;const le=function(){return!1};var fe="object"==typeof exports&&exports&&!exports.nodeType&&exports,pe=fe&&"object"==typeof module&&module&&!module.nodeType&&module,_e=pe&&pe.exports===fe?p.Buffer:void 0;const ye=(_e?_e.isBuffer:void 0)||le;var ge=9007199254740991,ve=/^(?:0|[1-9]\d*)$/;const be=function(t,e){var r=typeof t;return!!(e=null==e?ge:e)&&("number"==r||"symbol"!=r&&ve.test(t))&&t>-1&&t%1==0&&t<e};var me=9007199254740991;const je=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=me};var we={};we["[object Float32Array]"]=we["[object Float64Array]"]=we["[object Int8Array]"]=we["[object Int16Array]"]=we["[object Int32Array]"]=we["[object Uint8Array]"]=we["[object Uint8ClampedArray]"]=we["[object Uint16Array]"]=we["[object Uint32Array]"]=!0,we["[object Arguments]"]=we["[object Array]"]=we["[object ArrayBuffer]"]=we["[object Boolean]"]=we["[object DataView]"]=we["[object Date]"]=we["[object Error]"]=we["[object Function]"]=we["[object Map]"]=we["[object Number]"]=we["[object Object]"]=we["[object RegExp]"]=we["[object Set]"]=we["[object String]"]=we["[object WeakMap]"]=!1;const xe=function(t){return R(t)&&je(t.length)&&!!we[W(t)]};const Ee=function(t){return function(e){return t(e)}};var Oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ce=Oe&&"object"==typeof module&&module&&!module.nodeType&&module,Pe=Ce&&Ce.exports===Oe&&l.process;const Ae=function(){try{var t=Ce&&Ce.require&&Ce.require("util").types;return t||Pe&&Pe.binding&&Pe.binding("util")}catch(t){}}();var Te=Ae&&Ae.isTypedArray;const Se=Te?Ee(Te):xe;var We=Object.prototype.hasOwnProperty;const Re=function(t,e){var r=de(t),o=!r&&he(t),n=!r&&!o&&ye(t),i=!r&&!o&&!n&&Se(t),s=r||o||n||i,a=s?ne(t.length,String):[],c=a.length;for(var u in t)!e&&!We.call(t,u)||s&&("length"==u||n&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||be(u,c))||a.push(u);return a};var Ie=Object.prototype;const De=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ie)};const ze=function(t,e){return function(r){return t(e(r))}};const Me=ze(Object.keys,Object);var Ue=Object.prototype.hasOwnProperty;const Fe=function(t){if(!De(t))return Me(t);var e=[];for(var r in Object(t))Ue.call(t,r)&&"constructor"!=r&&e.push(r);return e};const Ne=function(t){return null!=t&&je(t.length)&&!dt(t)};const qe=function(t){return Ne(t)?Re(t):Fe(t)};const Le=function(t,e){return t&&oe(e,qe(e),t)};const ke=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e};var Be=Object.prototype.hasOwnProperty;const $e=function(t){if(!d(t))return ke(t);var e=De(t),r=[];for(var o in t)("constructor"!=o||!e&&Be.call(t,o))&&r.push(o);return r};const He=function(t){return Ne(t)?Re(t,!0):$e(t)};const Ve=function(t,e){return t&&oe(e,He(e),t)};var Ke="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qe=Ke&&"object"==typeof module&&module&&!module.nodeType&&module,Ge=Qe&&Qe.exports===Ke?p.Buffer:void 0,Ye=Ge?Ge.allocUnsafe:void 0;const Je=function(t,e){if(e)return t.slice();var r=t.length,o=Ye?Ye(r):new t.constructor(r);return t.copy(o),o};const Xe=function(t,e){var r=-1,o=t.length;for(e||(e=Array(o));++r<o;)e[r]=t[r];return e};const Ze=function(t,e){for(var r=-1,o=null==t?0:t.length,n=0,i=[];++r<o;){var s=t[r];e(s,r,t)&&(i[n++]=s)}return i};const tr=function(){return[]};var er=Object.prototype.propertyIsEnumerable,rr=Object.getOwnPropertySymbols;const or=rr?function(t){return null==t?[]:(t=Object(t),Ze(rr(t),(function(e){return er.call(t,e)})))}:tr;const nr=function(t,e){return oe(t,or(t),e)};const ir=function(t,e){for(var r=-1,o=e.length,n=t.length;++r<o;)t[n+r]=e[r];return t};const sr=ze(Object.getPrototypeOf,Object);const ar=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)ir(e,or(t)),t=sr(t);return e}:tr;const cr=function(t,e){return oe(t,ar(t),e)};const ur=function(t,e,r){var o=e(t);return de(t)?o:ir(o,r(t))};const hr=function(t){return ur(t,qe,or)};const dr=function(t){return ur(t,He,ar)};const lr=Ot(p,"DataView");const fr=Ot(p,"Promise");const pr=Ot(p,"Set");const _r=Ot(p,"WeakMap");var yr="[object Map]",gr="[object Promise]",vr="[object Set]",br="[object WeakMap]",mr="[object DataView]",jr=yt(lr),wr=yt(Ct),xr=yt(fr),Er=yt(pr),Or=yt(_r),Cr=W;(lr&&Cr(new lr(new ArrayBuffer(1)))!=mr||Ct&&Cr(new Ct)!=yr||fr&&Cr(fr.resolve())!=gr||pr&&Cr(new pr)!=vr||_r&&Cr(new _r)!=br)&&(Cr=function(t){var e=W(t),r="[object Object]"==e?t.constructor:void 0,o=r?yt(r):"";if(o)switch(o){case jr:return mr;case wr:return yr;case xr:return gr;case Er:return vr;case Or:return br}return e});const Pr=Cr;var Ar=Object.prototype.hasOwnProperty;const Tr=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Ar.call(t,"index")&&(r.index=t.index,r.input=t.input),r};const Sr=p.Uint8Array;const Wr=function(t){var e=new t.constructor(t.byteLength);return new Sr(e).set(new Sr(t)),e};const Rr=function(t,e){var r=e?Wr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)};var Ir=/\w*$/;const Dr=function(t){var e=new t.constructor(t.source,Ir.exec(t));return e.lastIndex=t.lastIndex,e};var zr=m?m.prototype:void 0,Mr=zr?zr.valueOf:void 0;const Ur=function(t){return Mr?Object(Mr.call(t)):{}};const Fr=function(t,e){var r=e?Wr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var Nr="[object Boolean]",qr="[object Date]",Lr="[object Map]",kr="[object Number]",Br="[object RegExp]",$r="[object Set]",Hr="[object String]",Vr="[object Symbol]",Kr="[object ArrayBuffer]",Qr="[object DataView]",Gr="[object Float32Array]",Yr="[object Float64Array]",Jr="[object Int8Array]",Xr="[object Int16Array]",Zr="[object Int32Array]",to="[object Uint8Array]",eo="[object Uint8ClampedArray]",ro="[object Uint16Array]",oo="[object Uint32Array]";const no=function(t,e,r){var o=t.constructor;switch(e){case Kr:return Wr(t);case Nr:case qr:return new o(+t);case Qr:return Rr(t,r);case Gr:case Yr:case Jr:case Xr:case Zr:case to:case eo:case ro:case oo:return Fr(t,r);case Lr:return new o;case kr:case Hr:return new o(t);case Br:return Dr(t);case $r:return new o;case Vr:return Ur(t)}};var io=Object.create;const so=function(){function t(){}return function(e){if(!d(e))return{};if(io)return io(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const ao=function(t){return"function"!=typeof t.constructor||De(t)?{}:so(sr(t))};var co="[object Map]";const uo=function(t){return R(t)&&Pr(t)==co};var ho=Ae&&Ae.isMap;const lo=ho?Ee(ho):uo;var fo="[object Set]";const po=function(t){return R(t)&&Pr(t)==fo};var _o=Ae&&Ae.isSet;const yo=_o?Ee(_o):po;var go=1,vo=2,bo=4,mo="[object Arguments]",jo="[object Function]",wo="[object GeneratorFunction]",xo="[object Object]",Eo={};Eo[mo]=Eo["[object Array]"]=Eo["[object ArrayBuffer]"]=Eo["[object DataView]"]=Eo["[object Boolean]"]=Eo["[object Date]"]=Eo["[object Float32Array]"]=Eo["[object Float64Array]"]=Eo["[object Int8Array]"]=Eo["[object Int16Array]"]=Eo["[object Int32Array]"]=Eo["[object Map]"]=Eo["[object Number]"]=Eo[xo]=Eo["[object RegExp]"]=Eo["[object Set]"]=Eo["[object String]"]=Eo["[object Symbol]"]=Eo["[object Uint8Array]"]=Eo["[object Uint8ClampedArray]"]=Eo["[object Uint16Array]"]=Eo["[object Uint32Array]"]=!0,Eo["[object Error]"]=Eo[jo]=Eo["[object WeakMap]"]=!1;const Oo=function t(e,r,o,n,i,s){var a,c=r&go,u=r&vo,h=r&bo;if(o&&(a=i?o(e,n,i,s):o(e)),void 0!==a)return a;if(!d(e))return e;var l=de(e);if(l){if(a=Tr(e),!c)return Xe(e,a)}else{var f=Pr(e),p=f==jo||f==wo;if(ye(e))return Je(e,c);if(f==xo||f==mo||p&&!i){if(a=u||p?{}:ao(e),!c)return u?cr(e,Ve(a,e)):nr(e,Le(a,e))}else{if(!Eo[f])return i?e:{};a=no(e,f,c)}}s||(s=new Jt);var _=s.get(e);if(_)return _;s.set(e,a),yo(e)?e.forEach((function(n){a.add(t(n,r,o,n,e,s))})):lo(e)&&e.forEach((function(n,i){a.set(i,t(n,r,o,i,e,s))}));var y=l?void 0:(h?u?dr:hr:u?He:qe)(e);return Xt(y||e,(function(n,i){y&&(n=e[i=n]),re(a,i,t(n,r,o,i,e,s))})),a};var Co=1,Po=4;const Ao=function(t,e){return Oo(t,Co|Po,e="function"==typeof e?e:void 0)};var To="[object Object]",So=Function.prototype,Wo=Object.prototype,Ro=So.toString,Io=Wo.hasOwnProperty,Do=Ro.call(Object);const zo=function(t){if(!R(t)||W(t)!=To)return!1;var e=sr(t);if(null===e)return!0;var r=Io.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Ro.call(r)==Do};const Mo=function(t){return R(t)&&1===t.nodeType&&!zo(t)};class Uo extends a{constructor(t,e={}){super(e),this._editor=null,this._throttledSave=V(this._save.bind(this),"number"==typeof e.saveInterval?e.saveInterval:5e3),t&&(this._creator=(e,r)=>t.create(e,r)),this._destructor=t=>t.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(t){this._creator=t}setDestructor(t){this._destructor=t}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((t=>{console.error("An error happened during the editor destroying.",t)})).then((()=>{if("string"==typeof this._elementOrData)return this.create(this._data,this._config,this._config.context);{const t=Object.assign({},this._config,{initialData:this._data});return this.create(this._elementOrData,t,t.context)}})).then((()=>{this._fire("restart")}))}create(t=this._elementOrData,e=this._config,r){return Promise.resolve().then((()=>(super._startErrorHandling(),this._elementOrData=t,this._config=this._cloneEditorConfiguration(e)||{},this._config.context=r,this._creator(t,this._config)))).then((t=>{this._editor=t,t.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=t.model.document.version,this._data=this._getData(),this.state="ready",this._fire("stateChange")}))}destroy(){return Promise.resolve().then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.flush();const t=this._editor;return this._editor=null,t.model.document.off("change:data",this._throttledSave),this._destructor(t)}))}_save(){const t=this._editor.model.document.version;try{this._data=this._getData(),this._lastDocumentVersion=t}catch(t){console.error(t,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(t){this._excludedProps=t}_getData(){const t={};for(const e of this._editor.model.document.getRootNames())t[e]=this._editor.data.get({rootName:e});return t}_isErrorComingFromThisItem(t){return h(this._editor,t.context,this._excludedProps)}_cloneEditorConfiguration(t){return Ao(t,((t,e)=>Mo(t)||"context"===e?t:void 0))}}const Fo=Symbol("MainQueueId");class No extends a{constructor(t,e={}){super(e),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new qo,this._watchdogConfig=e,this._creator=e=>t.create(e),this._destructor=t=>t.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(t){this._creator=t}setDestructor(t){this._destructor=t}get context(){return this._context}create(t={}){return this._actionQueues.enqueue(Fo,(()=>(this._contextConfig=t,this._create())))}getItem(t){return this._getWatchdog(t)._item}getItemState(t){return this._getWatchdog(t).state}add(t){const e=Lo(t);return Promise.all(e.map((t=>this._actionQueues.enqueue(t.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let e;if(this._watchdogs.has(t.id))throw new Error(`Item with the given id is already added: '${t.id}'.`);if("editor"===t.type)return e=new Uo(null,this._watchdogConfig),e.setCreator(t.creator),e._setExcludedProperties(this._contextProps),t.destructor&&e.setDestructor(t.destructor),this._watchdogs.set(t.id,e),e.on("error",((r,{error:o,causesRestart:n})=>{this._fire("itemError",{itemId:t.id,error:o}),n&&this._actionQueues.enqueue(t.id,(()=>new Promise((r=>{const o=()=>{e.off("restart",o),this._fire("itemRestart",{itemId:t.id}),r()};e.on("restart",o)}))))})),e.create(t.sourceElementOrData,t.config,this._context);throw new Error(`Not supported item type: '${t.type}'.`)})))))}remove(t){const e=Lo(t);return Promise.all(e.map((t=>this._actionQueues.enqueue(t,(()=>{const e=this._getWatchdog(t);return this._watchdogs.delete(t),e.destroy()})))))}destroy(){return this._actionQueues.enqueue(Fo,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(Fo,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((t=>{console.error("An error happened during destroying the context or items.",t)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((t=>(this._context=t,this._contextProps=c(this._context),Promise.all(Array.from(this._watchdogs.values()).map((t=>(t._setExcludedProperties(this._contextProps),t.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const t=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((t=>t.destroy()))).then((()=>this._destructor(t)))}))}_getWatchdog(t){const e=this._watchdogs.get(t);if(!e)throw new Error(`Item with the given id was not registered: ${t}.`);return e}_isErrorComingFromThisItem(t){for(const e of this._watchdogs.values())if(e._isErrorComingFromThisItem(t))return!1;return h(this._context,t.context)}}class qo{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(t){this._onEmptyCallbacks.push(t)}enqueue(t,e){const r=t===Fo;this._activeActions++,this._queues.get(t)||this._queues.set(t,Promise.resolve());const o=(r?Promise.all(this._queues.values()):Promise.all([this._queues.get(Fo),this._queues.get(t)])).then(e),n=o.catch((()=>{}));return this._queues.set(t,n),o.finally((()=>{this._activeActions--,this._queues.get(t)===n&&0===this._activeActions&&this._onEmptyCallbacks.forEach((t=>t()))}))}}function Lo(t){return Array.isArray(t)?t:[t]}const ko=e().createContext("contextWatchdog");class Bo extends e().Component{constructor(t,e){super(t,e),this.contextWatchdog=null,this.props.isLayoutReady&&this._initializeContextWatchdog(this.props.config)}shouldComponentUpdate(t){return this._shouldComponentUpdate(t)}async _shouldComponentUpdate(t){return t.id!==this.props.id&&(this.contextWatchdog&&await this.contextWatchdog.destroy(),await this._initializeContextWatchdog(t.config)),t.isLayoutReady&&!this.contextWatchdog?(await this._initializeContextWatchdog(t.config),!0):this.props.children!==t.children}render(){return e().createElement(ko.Provider,{value:this.contextWatchdog},this.props.children)}componentWillUnmount(){this._destroyContext()}async _initializeContextWatchdog(t){this.contextWatchdog=new No(this.props.context,this.props.watchdogConfig),this.contextWatchdog.on("error",((t,e)=>{this.props.onError(e.error,{phase:"runtime",willContextRestart:e.causesRestart})})),this.contextWatchdog.on("stateChange",(()=>{"ready"===this.contextWatchdog.state&&this.props.onReady&&this.props.onReady(this.contextWatchdog.context)})),await this.contextWatchdog.create(t).catch((t=>{this.props.onError(t,{phase:"initialization",willContextRestart:!1})}))}async _destroyContext(){this.contextWatchdog&&(await this.contextWatchdog.destroy(),this.contextWatchdog=null)}}Bo.defaultProps={isLayoutReady:!0,onError:(t,e)=>console.error(t,e)},Bo.propTypes={id:i().string,isLayoutReady:i().bool,context:i().func,watchdogConfig:i().object,config:i().object,onReady:i().func,onError:i().func};const $o="Lock from React integration (@ckeditor/ckeditor5-react)";class Ho extends e().Component{constructor(t){super(t),this.editorDestructionInProgress=null,this.domContainer=e().createRef(),this.watchdog=null;const{CKEDITOR_VERSION:r}=window;if(r){const[t]=r.split(".").map(Number);t<37&&console.warn("The <CKEditor> component requires using CKEditor 5 in version 37 or higher.")}else console.warn('Cannot find the "CKEDITOR_VERSION" in the "window" scope.')}get editor(){return this.watchdog?this.watchdog.editor:null}shouldComponentUpdate(t){return!!this.editor&&(t.id!==this.props.id||(this._shouldUpdateEditor(t)&&this.editor.data.set(t.data),"disabled"in t&&(t.disabled?this.editor.enableReadOnlyMode($o):this.editor.disableReadOnlyMode($o)),!1))}async componentDidMount(){await this._initializeEditor()}async componentDidUpdate(){await this._destroyEditor(),await this._initializeEditor()}async componentWillUnmount(){await this._destroyEditor()}render(){return e().createElement("div",{ref:this.domContainer})}async _initializeEditor(){await this.editorDestructionInProgress,this.watchdog||(this.context instanceof No?this.watchdog=new Vo(this.context):this.watchdog=new Ho._EditorWatchdog(this.props.editor,this.props.watchdogConfig),this.watchdog.setCreator(((t,e)=>this._createEditor(t,e))),this.watchdog.on("error",((t,{error:e,causesRestart:r})=>{(this.props.onError||console.error)(e,{phase:"runtime",willEditorRestart:r})})),await this.watchdog.create(this.domContainer.current,this._getConfig()).catch((t=>{(this.props.onError||console.error)(t,{phase:"initialization",willEditorRestart:!1})})))}_createEditor(t,e){return this.props.editor.create(t,e).then((t=>{"disabled"in this.props&&this.props.disabled&&t.enableReadOnlyMode($o);const e=t.model.document,r=t.editing.view.document;return e.on("change:data",(e=>{this.props.onChange&&this.props.onChange(e,t)})),r.on("focus",(e=>{this.props.onFocus&&this.props.onFocus(e,t)})),r.on("blur",(e=>{this.props.onBlur&&this.props.onBlur(e,t)})),setTimeout((()=>{this.props.onReady&&this.props.onReady(t)})),t}))}async _destroyEditor(){this.editorDestructionInProgress=new Promise((t=>{setTimeout((()=>{this.watchdog?this.watchdog.destroy().then((()=>{this.watchdog=null,t()})):t()}))}))}_shouldUpdateEditor(t){return this.props.data!==t.data&&this.editor.data.get()!==t.data}_getConfig(){const t=this.props.config||{};return this.props.data&&t.initialData&&console.warn("Editor data should be provided either using `config.initialData` or `data` properties. The config property is over the data value and the first one will be used when specified both."),{...t,initialData:t.initialData||this.props.data||""}}}Ho.contextType=ko,Ho.propTypes={editor:i().func.isRequired,data:i().string,config:i().object,watchdogConfig:i().object,onChange:i().func,onReady:i().func,onFocus:i().func,onBlur:i().func,onError:i().func,disabled:i().bool,id:i().any},Ho._EditorWatchdog=Uo;class Vo{constructor(t){this._contextWatchdog=t,this._id=function(){const t=4294967296*Math.random()>>>0,e=4294967296*Math.random()>>>0,r=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0;return"e"+s[t>>0&255]+s[t>>8&255]+s[t>>16&255]+s[t>>24&255]+s[e>>0&255]+s[e>>8&255]+s[e>>16&255]+s[e>>24&255]+s[r>>0&255]+s[r>>8&255]+s[r>>16&255]+s[r>>24&255]+s[o>>0&255]+s[o>>8&255]+s[o>>16&255]+s[o>>24&255]}()}setCreator(t){this._creator=t}create(t,e){return this._contextWatchdog.add({sourceElementOrData:t,config:e,creator:this._creator,id:this._id,type:"editor"})}on(t,e){this._contextWatchdog.on("itemError",((t,{itemId:r,error:o})=>{r===this._id&&e(null,{error:o,causesRestart:void 0})}))}destroy(){return"ready"===this._contextWatchdog.state?this._contextWatchdog.remove(this._id):Promise.resolve()}get editor(){return this._contextWatchdog.getItem(this._id)}}})(),n})()));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.CKEditor=e(require("react")):t.CKEditor=e(t.React)}(self,(t=>(()=>{var e={703:(t,e,r)=>{"use strict";var o=r(414);function n(){}function i(){}i.resetWarningCache=n,t.exports=function(){function t(t,e,r,n,i,s){if(s!==o){var a=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 a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:n};return r.PropTypes=r,r}},697:(t,e,r)=>{t.exports=r(703)()},414:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},787:e=>{"use strict";e.exports=t}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";o.r(n),o.d(n,{CKEditor:()=>to,CKEditorContext:()=>Xr});var t=o(787),e=o.n(t),r=o(697),i=o.n(r);const s=new Array(256).fill("").map(((t,e)=>("0"+e.toString(16)).slice(-2)));class a{constructor(t){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof t.crashNumberLimit?t.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof t.minimumNonErrorTimePeriod?t.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=t=>{const e="error"in t?t.error:t.reason;e instanceof Error&&this._handleError(e,t)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(t,e){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e)}off(t,e){this._listeners[t]=this._listeners[t].filter((t=>t!==e))}_fire(t,...e){const r=this._listeners[t]||[];for(const t of r)t.apply(this,[null,...e])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(t,e){if(this._shouldReactToError(t)){this.crashes.push({message:t.message,stack:t.stack,filename:e instanceof ErrorEvent?e.filename:void 0,lineno:e instanceof ErrorEvent?e.lineno:void 0,colno:e instanceof ErrorEvent?e.colno:void 0,date:this._now()});const r=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:t,causesRestart:r}),r?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(t){return t.is&&t.is("CKEditorError")&&void 0!==t.context&&null!==t.context&&"ready"===this.state&&this._isErrorComingFromThisItem(t)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function c(t,e=new Set){const r=[t],o=new Set;let n=0;for(;r.length>n;){const t=r[n++];if(!o.has(t)&&u(t)&&!e.has(t))if(o.add(t),Symbol.iterator in t)try{for(const e of t)r.push(e)}catch(t){}else for(const e in t)"defaultValue"!==e&&r.push(t[e])}return o}function u(t){const e=Object.prototype.toString.call(t),r=typeof t;return!("number"===r||"boolean"===r||"string"===r||"symbol"===r||"function"===r||"[object Date]"===e||"[object RegExp]"===e||"[object Module]"===e||null==t||t._watchdogExcluded||t instanceof EventTarget||t instanceof Event)}function h(t,e,r=new Set){if(t===e&&("object"==typeof(o=t)&&null!==o))return!0;var o;const n=c(t,r),i=c(e,r);for(const t of n)if(i.has(t))return!0;return!1}const d=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};const l="object"==typeof global&&global&&global.Object===Object&&global;var f="object"==typeof self&&self&&self.Object===Object&&self;const p=l||f||Function("return this")();const _=function(){return p.Date.now()};var y=/\s/;const g=function(t){for(var e=t.length;e--&&y.test(t.charAt(e)););return e};var b=/^\s+/;const v=function(t){return t?t.slice(0,g(t)+1).replace(b,""):t};const m=p.Symbol;var j=Object.prototype,w=j.hasOwnProperty,x=j.toString,E=m?m.toStringTag:void 0;const O=function(t){var e=w.call(t,E),r=t[E];try{t[E]=void 0;var o=!0}catch(t){}var n=x.call(t);return o&&(e?t[E]=r:delete t[E]),n};var C=Object.prototype.toString;const P=function(t){return C.call(t)};var A=m?m.toStringTag:void 0;const T=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":A&&A in Object(t)?O(t):P(t)};const S=function(t){return null!=t&&"object"==typeof t};const W=function(t){return"symbol"==typeof t||S(t)&&"[object Symbol]"==T(t)};var R=/^[-+]0x[0-9a-f]+$/i,I=/^0b[01]+$/i,D=/^0o[0-7]+$/i,z=parseInt;const M=function(t){if("number"==typeof t)return t;if(W(t))return NaN;if(d(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=d(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=v(t);var r=I.test(t);return r||D.test(t)?z(t.slice(2),r?2:8):R.test(t)?NaN:+t};var U=Math.max,N=Math.min;const F=function(t,e,r){var o,n,i,s,a,c,u=0,h=!1,l=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(e){var r=o,i=n;return o=n=void 0,u=e,s=t.apply(i,r)}function y(t){var r=t-c;return void 0===c||r>=e||r<0||l&&t-u>=i}function g(){var t=_();if(y(t))return b(t);a=setTimeout(g,function(t){var r=e-(t-c);return l?N(r,i-(t-u)):r}(t))}function b(t){return a=void 0,f&&o?p(t):(o=n=void 0,s)}function v(){var t=_(),r=y(t);if(o=arguments,n=this,c=t,r){if(void 0===a)return function(t){return u=t,a=setTimeout(g,e),h?p(t):s}(c);if(l)return clearTimeout(a),a=setTimeout(g,e),p(c)}return void 0===a&&(a=setTimeout(g,e)),s}return e=M(e)||0,d(r)&&(h=!!r.leading,i=(l="maxWait"in r)?U(M(r.maxWait)||0,e):i,f="trailing"in r?!!r.trailing:f),v.cancel=function(){void 0!==a&&clearTimeout(a),u=0,o=c=n=a=void 0},v.flush=function(){return void 0===a?s:b(_())},v};const q=function(t,e,r){var o=!0,n=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return d(r)&&(o="leading"in r?!!r.leading:o,n="trailing"in r?!!r.trailing:n),F(t,e,{leading:o,maxWait:e,trailing:n})};const L=function(){this.__data__=[],this.size=0};const k=function(t,e){return t===e||t!=t&&e!=e};const B=function(t,e){for(var r=t.length;r--;)if(k(t[r][0],e))return r;return-1};var $=Array.prototype.splice;const H=function(t){var e=this.__data__,r=B(e,t);return!(r<0)&&(r==e.length-1?e.pop():$.call(e,r,1),--this.size,!0)};const V=function(t){var e=this.__data__,r=B(e,t);return r<0?void 0:e[r][1]};const K=function(t){return B(this.__data__,t)>-1};const Q=function(t,e){var r=this.__data__,o=B(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this};function G(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}G.prototype.clear=L,G.prototype.delete=H,G.prototype.get=V,G.prototype.has=K,G.prototype.set=Q;const Y=G;const J=function(){this.__data__=new Y,this.size=0};const X=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};const Z=function(t){return this.__data__.get(t)};const tt=function(t){return this.__data__.has(t)};const et=function(t){if(!d(t))return!1;var e=T(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e};const rt=p["__core-js_shared__"];var ot=function(){var t=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();const nt=function(t){return!!ot&&ot in t};var it=Function.prototype.toString;const st=function(t){if(null!=t){try{return it.call(t)}catch(t){}try{return t+""}catch(t){}}return""};var at=/^\[object .+?Constructor\]$/,ct=Function.prototype,ut=Object.prototype,ht=ct.toString,dt=ut.hasOwnProperty,lt=RegExp("^"+ht.call(dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ft=function(t){return!(!d(t)||nt(t))&&(et(t)?lt:at).test(st(t))};const pt=function(t,e){return null==t?void 0:t[e]};const _t=function(t,e){var r=pt(t,e);return ft(r)?r:void 0};const yt=_t(p,"Map");const gt=_t(Object,"create");const bt=function(){this.__data__=gt?gt(null):{},this.size=0};const vt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var mt=Object.prototype.hasOwnProperty;const jt=function(t){var e=this.__data__;if(gt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return mt.call(e,t)?e[t]:void 0};var wt=Object.prototype.hasOwnProperty;const xt=function(t){var e=this.__data__;return gt?void 0!==e[t]:wt.call(e,t)};const Et=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=gt&&void 0===e?"__lodash_hash_undefined__":e,this};function Ot(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}Ot.prototype.clear=bt,Ot.prototype.delete=vt,Ot.prototype.get=jt,Ot.prototype.has=xt,Ot.prototype.set=Et;const Ct=Ot;const Pt=function(){this.size=0,this.__data__={hash:new Ct,map:new(yt||Y),string:new Ct}};const At=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};const Tt=function(t,e){var r=t.__data__;return At(e)?r["string"==typeof e?"string":"hash"]:r.map};const St=function(t){var e=Tt(this,t).delete(t);return this.size-=e?1:0,e};const Wt=function(t){return Tt(this,t).get(t)};const Rt=function(t){return Tt(this,t).has(t)};const It=function(t,e){var r=Tt(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this};function Dt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}Dt.prototype.clear=Pt,Dt.prototype.delete=St,Dt.prototype.get=Wt,Dt.prototype.has=Rt,Dt.prototype.set=It;const zt=Dt;const Mt=function(t,e){var r=this.__data__;if(r instanceof Y){var o=r.__data__;if(!yt||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new zt(o)}return r.set(t,e),this.size=r.size,this};function Ut(t){var e=this.__data__=new Y(t);this.size=e.size}Ut.prototype.clear=J,Ut.prototype.delete=X,Ut.prototype.get=Z,Ut.prototype.has=tt,Ut.prototype.set=Mt;const Nt=Ut;const Ft=function(t,e){for(var r=-1,o=null==t?0:t.length;++r<o&&!1!==e(t[r],r,t););return t};const qt=function(){try{var t=_t(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();const Lt=function(t,e,r){"__proto__"==e&&qt?qt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r};var kt=Object.prototype.hasOwnProperty;const Bt=function(t,e,r){var o=t[e];kt.call(t,e)&&k(o,r)&&(void 0!==r||e in t)||Lt(t,e,r)};const $t=function(t,e,r,o){var n=!r;r||(r={});for(var i=-1,s=e.length;++i<s;){var a=e[i],c=o?o(r[a],t[a],a,r,t):void 0;void 0===c&&(c=t[a]),n?Lt(r,a,c):Bt(r,a,c)}return r};const Ht=function(t,e){for(var r=-1,o=Array(t);++r<t;)o[r]=e(r);return o};const Vt=function(t){return S(t)&&"[object Arguments]"==T(t)};var Kt=Object.prototype,Qt=Kt.hasOwnProperty,Gt=Kt.propertyIsEnumerable;const Yt=Vt(function(){return arguments}())?Vt:function(t){return S(t)&&Qt.call(t,"callee")&&!Gt.call(t,"callee")};const Jt=Array.isArray;const Xt=function(){return!1};var Zt="object"==typeof exports&&exports&&!exports.nodeType&&exports,te=Zt&&"object"==typeof module&&module&&!module.nodeType&&module,ee=te&&te.exports===Zt?p.Buffer:void 0;const re=(ee?ee.isBuffer:void 0)||Xt;var oe=/^(?:0|[1-9]\d*)$/;const ne=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&oe.test(t))&&t>-1&&t%1==0&&t<e};const ie=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var se={};se["[object Float32Array]"]=se["[object Float64Array]"]=se["[object Int8Array]"]=se["[object Int16Array]"]=se["[object Int32Array]"]=se["[object Uint8Array]"]=se["[object Uint8ClampedArray]"]=se["[object Uint16Array]"]=se["[object Uint32Array]"]=!0,se["[object Arguments]"]=se["[object Array]"]=se["[object ArrayBuffer]"]=se["[object Boolean]"]=se["[object DataView]"]=se["[object Date]"]=se["[object Error]"]=se["[object Function]"]=se["[object Map]"]=se["[object Number]"]=se["[object Object]"]=se["[object RegExp]"]=se["[object Set]"]=se["[object String]"]=se["[object WeakMap]"]=!1;const ae=function(t){return S(t)&&ie(t.length)&&!!se[T(t)]};const ce=function(t){return function(e){return t(e)}};var ue="object"==typeof exports&&exports&&!exports.nodeType&&exports,he=ue&&"object"==typeof module&&module&&!module.nodeType&&module,de=he&&he.exports===ue&&l.process;const le=function(){try{var t=he&&he.require&&he.require("util").types;return t||de&&de.binding&&de.binding("util")}catch(t){}}();var fe=le&&le.isTypedArray;const pe=fe?ce(fe):ae;var _e=Object.prototype.hasOwnProperty;const ye=function(t,e){var r=Jt(t),o=!r&&Yt(t),n=!r&&!o&&re(t),i=!r&&!o&&!n&&pe(t),s=r||o||n||i,a=s?Ht(t.length,String):[],c=a.length;for(var u in t)!e&&!_e.call(t,u)||s&&("length"==u||n&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ne(u,c))||a.push(u);return a};var ge=Object.prototype;const be=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ge)};const ve=function(t,e){return function(r){return t(e(r))}};const me=ve(Object.keys,Object);var je=Object.prototype.hasOwnProperty;const we=function(t){if(!be(t))return me(t);var e=[];for(var r in Object(t))je.call(t,r)&&"constructor"!=r&&e.push(r);return e};const xe=function(t){return null!=t&&ie(t.length)&&!et(t)};const Ee=function(t){return xe(t)?ye(t):we(t)};const Oe=function(t,e){return t&&$t(e,Ee(e),t)};const Ce=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e};var Pe=Object.prototype.hasOwnProperty;const Ae=function(t){if(!d(t))return Ce(t);var e=be(t),r=[];for(var o in t)("constructor"!=o||!e&&Pe.call(t,o))&&r.push(o);return r};const Te=function(t){return xe(t)?ye(t,!0):Ae(t)};const Se=function(t,e){return t&&$t(e,Te(e),t)};var We="object"==typeof exports&&exports&&!exports.nodeType&&exports,Re=We&&"object"==typeof module&&module&&!module.nodeType&&module,Ie=Re&&Re.exports===We?p.Buffer:void 0,De=Ie?Ie.allocUnsafe:void 0;const ze=function(t,e){if(e)return t.slice();var r=t.length,o=De?De(r):new t.constructor(r);return t.copy(o),o};const Me=function(t,e){var r=-1,o=t.length;for(e||(e=Array(o));++r<o;)e[r]=t[r];return e};const Ue=function(t,e){for(var r=-1,o=null==t?0:t.length,n=0,i=[];++r<o;){var s=t[r];e(s,r,t)&&(i[n++]=s)}return i};const Ne=function(){return[]};var Fe=Object.prototype.propertyIsEnumerable,qe=Object.getOwnPropertySymbols;const Le=qe?function(t){return null==t?[]:(t=Object(t),Ue(qe(t),(function(e){return Fe.call(t,e)})))}:Ne;const ke=function(t,e){return $t(t,Le(t),e)};const Be=function(t,e){for(var r=-1,o=e.length,n=t.length;++r<o;)t[n+r]=e[r];return t};const $e=ve(Object.getPrototypeOf,Object);const He=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Be(e,Le(t)),t=$e(t);return e}:Ne;const Ve=function(t,e){return $t(t,He(t),e)};const Ke=function(t,e,r){var o=e(t);return Jt(t)?o:Be(o,r(t))};const Qe=function(t){return Ke(t,Ee,Le)};const Ge=function(t){return Ke(t,Te,He)};const Ye=_t(p,"DataView");const Je=_t(p,"Promise");const Xe=_t(p,"Set");const Ze=_t(p,"WeakMap");var tr="[object Map]",er="[object Promise]",rr="[object Set]",or="[object WeakMap]",nr="[object DataView]",ir=st(Ye),sr=st(yt),ar=st(Je),cr=st(Xe),ur=st(Ze),hr=T;(Ye&&hr(new Ye(new ArrayBuffer(1)))!=nr||yt&&hr(new yt)!=tr||Je&&hr(Je.resolve())!=er||Xe&&hr(new Xe)!=rr||Ze&&hr(new Ze)!=or)&&(hr=function(t){var e=T(t),r="[object Object]"==e?t.constructor:void 0,o=r?st(r):"";if(o)switch(o){case ir:return nr;case sr:return tr;case ar:return er;case cr:return rr;case ur:return or}return e});const dr=hr;var lr=Object.prototype.hasOwnProperty;const fr=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&lr.call(t,"index")&&(r.index=t.index,r.input=t.input),r};const pr=p.Uint8Array;const _r=function(t){var e=new t.constructor(t.byteLength);return new pr(e).set(new pr(t)),e};const yr=function(t,e){var r=e?_r(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)};var gr=/\w*$/;const br=function(t){var e=new t.constructor(t.source,gr.exec(t));return e.lastIndex=t.lastIndex,e};var vr=m?m.prototype:void 0,mr=vr?vr.valueOf:void 0;const jr=function(t){return mr?Object(mr.call(t)):{}};const wr=function(t,e){var r=e?_r(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};const xr=function(t,e,r){var o=t.constructor;switch(e){case"[object ArrayBuffer]":return _r(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return yr(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return wr(t,r);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return br(t);case"[object Symbol]":return jr(t)}};var Er=Object.create;const Or=function(){function t(){}return function(e){if(!d(e))return{};if(Er)return Er(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const Cr=function(t){return"function"!=typeof t.constructor||be(t)?{}:Or($e(t))};const Pr=function(t){return S(t)&&"[object Map]"==dr(t)};var Ar=le&&le.isMap;const Tr=Ar?ce(Ar):Pr;const Sr=function(t){return S(t)&&"[object Set]"==dr(t)};var Wr=le&&le.isSet;const Rr=Wr?ce(Wr):Sr;var Ir="[object Arguments]",Dr="[object Function]",zr="[object Object]",Mr={};Mr[Ir]=Mr["[object Array]"]=Mr["[object ArrayBuffer]"]=Mr["[object DataView]"]=Mr["[object Boolean]"]=Mr["[object Date]"]=Mr["[object Float32Array]"]=Mr["[object Float64Array]"]=Mr["[object Int8Array]"]=Mr["[object Int16Array]"]=Mr["[object Int32Array]"]=Mr["[object Map]"]=Mr["[object Number]"]=Mr[zr]=Mr["[object RegExp]"]=Mr["[object Set]"]=Mr["[object String]"]=Mr["[object Symbol]"]=Mr["[object Uint8Array]"]=Mr["[object Uint8ClampedArray]"]=Mr["[object Uint16Array]"]=Mr["[object Uint32Array]"]=!0,Mr["[object Error]"]=Mr[Dr]=Mr["[object WeakMap]"]=!1;const Ur=function t(e,r,o,n,i,s){var a,c=1&r,u=2&r,h=4&r;if(o&&(a=i?o(e,n,i,s):o(e)),void 0!==a)return a;if(!d(e))return e;var l=Jt(e);if(l){if(a=fr(e),!c)return Me(e,a)}else{var f=dr(e),p=f==Dr||"[object GeneratorFunction]"==f;if(re(e))return ze(e,c);if(f==zr||f==Ir||p&&!i){if(a=u||p?{}:Cr(e),!c)return u?Ve(e,Se(a,e)):ke(e,Oe(a,e))}else{if(!Mr[f])return i?e:{};a=xr(e,f,c)}}s||(s=new Nt);var _=s.get(e);if(_)return _;s.set(e,a),Rr(e)?e.forEach((function(n){a.add(t(n,r,o,n,e,s))})):Tr(e)&&e.forEach((function(n,i){a.set(i,t(n,r,o,i,e,s))}));var y=l?void 0:(h?u?Ge:Qe:u?Te:Ee)(e);return Ft(y||e,(function(n,i){y&&(n=e[i=n]),Bt(a,i,t(n,r,o,i,e,s))})),a};const Nr=function(t,e){return Ur(t,5,e="function"==typeof e?e:void 0)};var Fr=Function.prototype,qr=Object.prototype,Lr=Fr.toString,kr=qr.hasOwnProperty,Br=Lr.call(Object);const $r=function(t){if(!S(t)||"[object Object]"!=T(t))return!1;var e=$e(t);if(null===e)return!0;var r=kr.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Lr.call(r)==Br};const Hr=function(t){return S(t)&&1===t.nodeType&&!$r(t)};class Vr extends a{constructor(t,e={}){super(e),this._editor=null,this._throttledSave=q(this._save.bind(this),"number"==typeof e.saveInterval?e.saveInterval:5e3),t&&(this._creator=(e,r)=>t.create(e,r)),this._destructor=t=>t.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(t){this._creator=t}setDestructor(t){this._destructor=t}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((t=>{console.error("An error happened during the editor destroying.",t)})).then((()=>{if("string"==typeof this._elementOrData)return this.create(this._data,this._config,this._config.context);{const t=Object.assign({},this._config,{initialData:this._data});return this.create(this._elementOrData,t,t.context)}})).then((()=>{this._fire("restart")}))}create(t=this._elementOrData,e=this._config,r){return Promise.resolve().then((()=>(super._startErrorHandling(),this._elementOrData=t,this._config=this._cloneEditorConfiguration(e)||{},this._config.context=r,this._creator(t,this._config)))).then((t=>{this._editor=t,t.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=t.model.document.version,this._data=this._getData(),this.state="ready",this._fire("stateChange")}))}destroy(){return Promise.resolve().then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.flush();const t=this._editor;return this._editor=null,t.model.document.off("change:data",this._throttledSave),this._destructor(t)}))}_save(){const t=this._editor.model.document.version;try{this._data=this._getData(),this._lastDocumentVersion=t}catch(t){console.error(t,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(t){this._excludedProps=t}_getData(){const t={};for(const e of this._editor.model.document.getRootNames())t[e]=this._editor.data.get({rootName:e});return t}_isErrorComingFromThisItem(t){return h(this._editor,t.context,this._excludedProps)}_cloneEditorConfiguration(t){return Nr(t,((t,e)=>Hr(t)||"context"===e?t:void 0))}}const Kr=Symbol("MainQueueId");class Qr extends a{constructor(t,e={}){super(e),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new Gr,this._watchdogConfig=e,this._creator=e=>t.create(e),this._destructor=t=>t.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(t){this._creator=t}setDestructor(t){this._destructor=t}get context(){return this._context}create(t={}){return this._actionQueues.enqueue(Kr,(()=>(this._contextConfig=t,this._create())))}getItem(t){return this._getWatchdog(t)._item}getItemState(t){return this._getWatchdog(t).state}add(t){const e=Yr(t);return Promise.all(e.map((t=>this._actionQueues.enqueue(t.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let e;if(this._watchdogs.has(t.id))throw new Error(`Item with the given id is already added: '${t.id}'.`);if("editor"===t.type)return e=new Vr(null,this._watchdogConfig),e.setCreator(t.creator),e._setExcludedProperties(this._contextProps),t.destructor&&e.setDestructor(t.destructor),this._watchdogs.set(t.id,e),e.on("error",((r,{error:o,causesRestart:n})=>{this._fire("itemError",{itemId:t.id,error:o}),n&&this._actionQueues.enqueue(t.id,(()=>new Promise((r=>{const o=()=>{e.off("restart",o),this._fire("itemRestart",{itemId:t.id}),r()};e.on("restart",o)}))))})),e.create(t.sourceElementOrData,t.config,this._context);throw new Error(`Not supported item type: '${t.type}'.`)})))))}remove(t){const e=Yr(t);return Promise.all(e.map((t=>this._actionQueues.enqueue(t,(()=>{const e=this._getWatchdog(t);return this._watchdogs.delete(t),e.destroy()})))))}destroy(){return this._actionQueues.enqueue(Kr,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(Kr,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((t=>{console.error("An error happened during destroying the context or items.",t)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((t=>(this._context=t,this._contextProps=c(this._context),Promise.all(Array.from(this._watchdogs.values()).map((t=>(t._setExcludedProperties(this._contextProps),t.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const t=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((t=>t.destroy()))).then((()=>this._destructor(t)))}))}_getWatchdog(t){const e=this._watchdogs.get(t);if(!e)throw new Error(`Item with the given id was not registered: ${t}.`);return e}_isErrorComingFromThisItem(t){for(const e of this._watchdogs.values())if(e._isErrorComingFromThisItem(t))return!1;return h(this._context,t.context)}}class Gr{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(t){this._onEmptyCallbacks.push(t)}enqueue(t,e){const r=t===Kr;this._activeActions++,this._queues.get(t)||this._queues.set(t,Promise.resolve());const o=(r?Promise.all(this._queues.values()):Promise.all([this._queues.get(Kr),this._queues.get(t)])).then(e),n=o.catch((()=>{}));return this._queues.set(t,n),o.finally((()=>{this._activeActions--,this._queues.get(t)===n&&0===this._activeActions&&this._onEmptyCallbacks.forEach((t=>t()))}))}}function Yr(t){return Array.isArray(t)?t:[t]}const Jr=e().createContext("contextWatchdog");class Xr extends e().Component{constructor(t,e){super(t,e),this.contextWatchdog=null,this.props.isLayoutReady&&this._initializeContextWatchdog(this.props.config)}shouldComponentUpdate(t){return this._shouldComponentUpdate(t)}async _shouldComponentUpdate(t){return t.id!==this.props.id&&(this.contextWatchdog&&await this.contextWatchdog.destroy(),await this._initializeContextWatchdog(t.config)),t.isLayoutReady&&!this.contextWatchdog?(await this._initializeContextWatchdog(t.config),!0):this.props.children!==t.children}render(){return e().createElement(Jr.Provider,{value:this.contextWatchdog},this.props.children)}componentWillUnmount(){this._destroyContext()}async _initializeContextWatchdog(t){this.contextWatchdog=new Qr(this.props.context,this.props.watchdogConfig),this.contextWatchdog.on("error",((t,e)=>{this.props.onError(e.error,{phase:"runtime",willContextRestart:e.causesRestart})})),this.contextWatchdog.on("stateChange",(()=>{"ready"===this.contextWatchdog.state&&this.props.onReady&&this.props.onReady(this.contextWatchdog.context)})),await this.contextWatchdog.create(t).catch((t=>{this.props.onError(t,{phase:"initialization",willContextRestart:!1})}))}async _destroyContext(){this.contextWatchdog&&(await this.contextWatchdog.destroy(),this.contextWatchdog=null)}}Xr.defaultProps={isLayoutReady:!0,onError:(t,e)=>console.error(t,e)},Xr.propTypes={id:i().string,isLayoutReady:i().bool,context:i().func,watchdogConfig:i().object,config:i().object,onReady:i().func,onError:i().func};const Zr="Lock from React integration (@ckeditor/ckeditor5-react)";class to extends e().Component{constructor(t){super(t),this.editorDestructionInProgress=null,this.domContainer=e().createRef(),this.watchdog=null;const{CKEDITOR_VERSION:r}=window;if(r){const[t]=r.split(".").map(Number);t<37&&console.warn("The <CKEditor> component requires using CKEditor 5 in version 37 or higher.")}else console.warn('Cannot find the "CKEDITOR_VERSION" in the "window" scope.')}get editor(){return this.watchdog?this.watchdog.editor:null}shouldComponentUpdate(t){return!!this.editor&&(t.id!==this.props.id||(this._shouldUpdateEditor(t)&&this.editor.data.set(t.data),"disabled"in t&&(t.disabled?this.editor.enableReadOnlyMode(Zr):this.editor.disableReadOnlyMode(Zr)),!1))}async componentDidMount(){await this._initializeEditor()}async componentDidUpdate(){await this._destroyEditor(),await this._initializeEditor()}async componentWillUnmount(){await this._destroyEditor()}render(){return e().createElement("div",{ref:this.domContainer})}async _initializeEditor(){await this.editorDestructionInProgress,this.watchdog||(this.context instanceof Qr?this.watchdog=new eo(this.context):this.watchdog=new to._EditorWatchdog(this.props.editor,this.props.watchdogConfig),this.watchdog.setCreator(((t,e)=>this._createEditor(t,e))),this.watchdog.on("error",((t,{error:e,causesRestart:r})=>{(this.props.onError||console.error)(e,{phase:"runtime",willEditorRestart:r})})),await this.watchdog.create(this.domContainer.current,this._getConfig()).catch((t=>{(this.props.onError||console.error)(t,{phase:"initialization",willEditorRestart:!1})})))}_createEditor(t,e){return this.props.editor.create(t,e).then((t=>{"disabled"in this.props&&this.props.disabled&&t.enableReadOnlyMode(Zr);const e=t.model.document,r=t.editing.view.document;return e.on("change:data",(e=>{this.props.onChange&&this.props.onChange(e,t)})),r.on("focus",(e=>{this.props.onFocus&&this.props.onFocus(e,t)})),r.on("blur",(e=>{this.props.onBlur&&this.props.onBlur(e,t)})),setTimeout((()=>{this.props.onReady&&this.props.onReady(t)})),t}))}async _destroyEditor(){this.editorDestructionInProgress=new Promise((t=>{setTimeout((()=>{this.watchdog?this.watchdog.destroy().then((()=>{this.watchdog=null,t()})):t()}))}))}_shouldUpdateEditor(t){return this.props.data!==t.data&&this.editor.data.get()!==t.data}_getConfig(){const t=this.props.config||{};return this.props.data&&t.initialData&&console.warn("Editor data should be provided either using `config.initialData` or `data` properties. The config property is over the data value and the first one will be used when specified both."),{...t,initialData:t.initialData||this.props.data||""}}}to.contextType=Jr,to.propTypes={editor:i().func.isRequired,data:i().string,config:i().object,watchdogConfig:i().object,onChange:i().func,onReady:i().func,onFocus:i().func,onBlur:i().func,onError:i().func,disabled:i().bool,id:i().any},to._EditorWatchdog=Vr;class eo{constructor(t){this._contextWatchdog=t,this._id=function(){const t=4294967296*Math.random()>>>0,e=4294967296*Math.random()>>>0,r=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0;return"e"+s[t>>0&255]+s[t>>8&255]+s[t>>16&255]+s[t>>24&255]+s[e>>0&255]+s[e>>8&255]+s[e>>16&255]+s[e>>24&255]+s[r>>0&255]+s[r>>8&255]+s[r>>16&255]+s[r>>24&255]+s[o>>0&255]+s[o>>8&255]+s[o>>16&255]+s[o>>24&255]}()}setCreator(t){this._creator=t}create(t,e){return this._contextWatchdog.add({sourceElementOrData:t,config:e,creator:this._creator,id:this._id,type:"editor"})}on(t,e){this._contextWatchdog.on("itemError",((t,{itemId:r,error:o})=>{r===this._id&&e(null,{error:o,causesRestart:void 0})}))}destroy(){return"ready"===this._contextWatchdog.state?this._contextWatchdog.remove(this._id):Promise.resolve()}get editor(){return this._contextWatchdog.getItem(this._id)}}})(),n})()));
//# sourceMappingURL=index.js.map
{
"name": "@ckeditor/ckeditor5-react",
"version": "6.0.0-alpha.0",
"version": "6.0.0",
"main": "dist/index.js",

@@ -26,23 +26,23 @@ "types": "dist/index.d.ts",

"@babel/preset-react": "^7.10.4",
"@ckeditor/ckeditor5-autoformat": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-basic-styles": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-block-quote": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-build-classic": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-cloud-services": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-dev-bump-year": "^35.0.0",
"@ckeditor/ckeditor5-dev-ci": "^35.0.0",
"@ckeditor/ckeditor5-dev-release-tools": "^35.0.0",
"@ckeditor/ckeditor5-dev-utils": "^35.0.0",
"@ckeditor/ckeditor5-editor-classic": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-essentials": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-heading": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-image": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-indent": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-link": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-list": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-media-embed": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-paste-from-office": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-table": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-utils": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-watchdog": "37.0.0-alpha.3",
"@ckeditor/ckeditor5-autoformat": "^37.0.0",
"@ckeditor/ckeditor5-basic-styles": "^37.0.0",
"@ckeditor/ckeditor5-block-quote": "^37.0.0",
"@ckeditor/ckeditor5-build-classic": "^37.0.0",
"@ckeditor/ckeditor5-cloud-services": "^37.0.0",
"@ckeditor/ckeditor5-dev-bump-year": "^36.0.0",
"@ckeditor/ckeditor5-dev-ci": "^36.0.0",
"@ckeditor/ckeditor5-dev-release-tools": "^36.0.0",
"@ckeditor/ckeditor5-dev-utils": "^36.0.0",
"@ckeditor/ckeditor5-editor-classic": "^37.0.0",
"@ckeditor/ckeditor5-essentials": "^37.0.0",
"@ckeditor/ckeditor5-heading": "^37.0.0",
"@ckeditor/ckeditor5-image": "^37.0.0",
"@ckeditor/ckeditor5-indent": "^37.0.0",
"@ckeditor/ckeditor5-link": "^37.0.0",
"@ckeditor/ckeditor5-list": "^37.0.0",
"@ckeditor/ckeditor5-media-embed": "^37.0.0",
"@ckeditor/ckeditor5-paste-from-office": "^37.0.0",
"@ckeditor/ckeditor5-table": "^37.0.0",
"@ckeditor/ckeditor5-utils": "^37.0.0",
"@ckeditor/ckeditor5-watchdog": "^37.0.0",
"@types/react": "^16.14.35",

@@ -53,3 +53,3 @@ "@types/react-dom": "^16.9.18",

"chai": "^4.2.0",
"ckeditor5": "37.0.0-alpha.3",
"ckeditor5": "^37.0.0",
"coveralls": "^3.1.1",

@@ -80,3 +80,3 @@ "enzyme": "^3.11.0",

"typescript": "^4.9.5",
"webpack": "^5.71.0",
"webpack": "^5.77.0",
"webpack-cli": "^4.9.2"

@@ -86,6 +86,6 @@ },

"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
"@ckeditor/ckeditor5-core": ">=37.0.0-alpha.3",
"@ckeditor/ckeditor5-engine": ">=37.0.0-alpha.3",
"@ckeditor/ckeditor5-utils": ">=37.0.0-alpha.3",
"@ckeditor/ckeditor5-watchdog": ">=37.0.0-alpha.3"
"@ckeditor/ckeditor5-core": ">=37.0.0",
"@ckeditor/ckeditor5-engine": ">=37.0.0",
"@ckeditor/ckeditor5-utils": ">=37.0.0",
"@ckeditor/ckeditor5-watchdog": ">=37.0.0"
},

@@ -92,0 +92,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc