/*! For license information please see editor-kit~0.b0428a0a.js.LICENSE.txt */ (self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["23145"],{330851:function(t,e,n){"use strict";n.d(e,{u:function(){return u}});var r=n("194055"),i=n("375518"),o=n("464675"),s=n("386308");n("294484");var a=n("162114"),l=n("361087"),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="BlockElementDeserializer",e}return(0,r.d)(e,t),e.prototype.deserialize=function(t){var e,n=t.node,r=t.deltaSet,s=t.zoneId,t=t.types,s=r.get(s);if(s instanceof o.I&&!(0,a.f)(s,"\n")){;if(t.includes("text/html")&&(0,l.y1)(n)&&!((e=n).nodeType===Node.TEXT_NODE&&"\n"===e.textContent))return n.nextSibling&&(0,i.P)(n.nextSibling)&&s.insertEnter(),r;n instanceof Element&&("BR"===n.tagName?s.insertEnter():(0,i.P)(n)?!n.hasChildNodes()&&(n.nextSibling||n.previousSibling)||s.insertEnter():["span","a","b","u","i","s","strong","button","abbr","audio","cite","code","em","embed","img","input","bdi","bdo","data","del","dfn","ins","kbd","label","map","mark","meter","object","output","picture","progress","q","ruby","samp","select","slot","small","sub","sup","svg","textarea","time","var","wbr"].includes(n.tagName.toLowerCase())&&n.nextSibling&&(0,i.P)(n.nextSibling)&&s.insertEnter())}return r},e}(s.S)},604780:function(t,e,n){"use strict";n.d(e,{r:function(){return f}});var r=n(194055),i=n(269516),o=n(464675),s=n(481685),a=n(386308),l=n(361087),u=[/[\b]/g,RegExp(String.fromCharCode(8203),"g")];function c(t){var e=t;return u.forEach(function(t){return e=e.replace(t,"")}),e}function d(t){return t.replace(/\r/g," ").replace(/\xa0/g," ").replace(/\t/g," ".repeat(8))}var f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="TextNodeDeserializer",e}return(0,r.d)(e,t),e.prototype.deserialize=function(t){var e=t.node,n=t.deltaSet,r=t.zoneId,a=t.text,u=t.types;if(u.includes("text/html")){if((0,l.y1)(e)){var f=null!==(t=e.nodeValue)&&void 0!==t?t:"",h="",p=0,v=!1;if(0===f.trim().length&&"body"===(null===(t=e.parentElement)||void 0===t?void 0:t.tagName.toLowerCase()))return n.concat(new o.I({zoneId:r}));for(var g=e.parentNode;g;){if(g instanceof HTMLElement){var y=g.tagName,m=g.style;if("pre"===y.toLowerCase()){v=!0;break}if(m.whiteSpace){v=m.whiteSpace.startsWith("pre");break}}g=g.parentNode}for(var b,E,e=new s.D,S=new o.I({zoneId:r});0'}),this.proxyClipboard.setData(t,"text/html",n+i)):e.forEach(function(e){o.proxyClipboard.setData(t,e.key,e.data)}))},e.getCustomData=function(t,e){if(!t||!t.setData)return"";if(r.Xh.isAndroid){var n=this.proxyClipboard.getData(t,"text/html"),n=(new DOMParser).parseFromString(n,"text/html").getElementById("custom-clipboard-data-"+e);return decodeURIComponent((null==n?void 0:n.getAttribute("data-custom-clipboard"))||"")}return this.proxyClipboard.getData(t,e)},t}()},650054:function(t,e,n){"use strict";n.d(e,{HY:function(){return a},K6:function(){return i},Z6:function(){return s},c5:function(){return o},fF:function(){return l},iC:function(){return r},mX:function(){return u}});var r="application/x-editor-kit-fragment",i="application/x-editor-kit-business-key",o={underline:"u",bold:"b",blockquote:"blockquote",italic:"i",strikethrough:"s"},s="ignore-collect",a="COPY_WITHOUT_PERMISSION",l="data-multiple-line-wrap",u="data-line"},993137:function(t,e,n){"use strict";var r,i;n.d(e,{T:function(){return r}}),(i=r=r||{}).LEAF="leaf",i.LINE="line",i.ROOT="root"},85359:function(t,e,n){"use strict";n.d(e,{WZ:function(){return s},Xh:function(){return R},vu:function(){return a}});var r=window.User&&window.User.userAgent||navigator.userAgent||"";function i(t){return(t=r.match(t))&&11?l.top=a.scrollTop-s:e>1&&(l.top=a.scrollTop+e),i=-o.left+i,n=o.right-a.clientWidth+n,i>1?l.left=a.scrollLeft-i:n>1&&(l.left=a.scrollLeft+n),l},e.scrollPointIntoWindowView=function(t,e,n,r){if(!this.s)return E;var i,o={};if(!(0,I.Fl)(r))return E;try{i=(0,I.re)(e),window.visualViewport&&(i.clientHeight=window.visualViewport.height,i.clientWidth=window.visualViewport.width)}catch(t){return E}var s=(0,I.AS)(n),a=s.paddingBottom,e=s.paddingLeft,n=s.paddingRight,s=s.paddingTop,s=-r.top+s,a=r.bottom-i.clientHeight+a;return s>1?o.top=i.scrollTop-s:a>1&&(o.top=i.scrollTop+a),e=-r.left+e,n=r.right-i.clientWidth+n,e>1?o.left=i.scrollLeft-e:n>1&&(o.left=i.scrollLeft+n),o},e._scrollIntoViewport=function(t,e){var n,r=this.s,i=this.Se,s=this.qe,a=this.Me,l=(e=void 0===e?{}:e).onlyScrollWhenCollapsed,e=r.selection.getSelection();l&&!e.isCollapsed()||!t||t.zoneId!==s&&s!==o.S||(!r.getStatus("preventScrolling")&&r.isEditable()?(null!=(s=null===(e=r.virtualListManager)||void 0===e?void 0:e.getVirtualListModuleOfZone(t.zoneId))&&s.isEnabled&&s.scrollIntoViewport(t.line),e=r.rectModule.getRawCaretRect(t),s=E,i!==document.scrollingElement&&(s=this.scrollPointIntoScrollerView(t,i,(null===(n=a.getScrollerPadding)||void 0===n?void 0:n.call(a))||0,e),i.scrollTo(s)),n=document.scrollingElement||window,i=E,a.disableBodyScroll||(i=this.scrollPointIntoWindowView(t,n,(null===(t=a.getViewPortPadding)||void 0===t?void 0:t.call(a))||0,e),n.scrollTo(i)),((0,I.Yz)(s)||(0,I.Yz)(i))&&this.emitScroll()):r.setStatus("preventScrolling",!1))},e.scrollIntoViewport=function(){for(var t,e=this,n=[],i=0;in&&(t.line=n,t.offset=e.getLine(n).getModelText().length-1),e=e.getLine(t.line),t.offset=Math.min(e.getModelText().length-1,t.offset),t.offset<=0&&(t.offset=e.hasLineMarker()?1:0),t):t},e._handleDOMSelectionChange=function(){var t,e,n,r,i=window.getSelection();null!==i&&(this.s.log({scope:"[Selection][_handleDOMSelectionChange]",level:"info",shouldLogToMobile:!1,sel:i}),W.Xh.ios&&null===i.focusNode&&this.s.isFocus()&&(this.s.setStopUpdateSelection(!1),this.setSelection(this.getSelection(),!0)),this.s.getStatus("stopUpdateSelection")||(e=(0,V.Zj)(i,0))&&(n=e.startContainer,r=e.endContainer,t=e.collapsed,!(e=this.s.getContainer()).contains(n)||!t&&!e.contains(r)||(0,V.E_)(n)&&(0,V.E_)(r)||(n=this._toModelRange(i))&&(r=!(W.Xh.isAndroid&&!n.isCollapsed()),this.s.getStatus("isMouseDown")||(i=n.toPosition(),this.s.log("[Log]","[Selection][_handleDOMSelectionChange] selection",JSON.stringify({zoneId:i.zoneId,start:i.start,timestamp:Date.now()}))),this.setSelection(n,r))))},e.toDOMRange=function(t,e){return this._toDOMRange(t,e=void 0===e?{ignoreNormalize:!1}:e)},e._toDOMRange=function(t,e){void 0===e&&(e={ignoreNormalize:!1});var n=t.start,r=t.end,n=this.In(n),r=this.In(r);return n.node&&r.node?e.ignoreNormalize?(0,V.XM)(n,r):(t=(r=this.Tn(n,r,t)).start,r=r.end,(0,V.XM)(t,r)):null},e.Tn=function(t,e,n){var i=t.node,o=t.offset,a=e.node,l=e.offset,u=n.start,c=n.end,d=(0,V.E_)(i),f=(0,V.E_)(a),h=(null===(p=(0,V.Ju)(i))||void 0===p?void 0:p.length)||0,p=(null===(v=(0,V.Ju)(a))||void 0===v?void 0:v.length)||0,v=(0,V.x1)(i);if(!d&&!f&&i&&i===a&&t.offset===e.offset&&(m=i instanceof Element?i:i.parentElement)&&m.closest("["+s.q7+"]")){var g={node:m,offset:(null===(g=null==m?void 0:m.textContent)||void 0===g?void 0:g.length)||0};return{start:g,end:g}}if(d&&(0,V.hl)(i)&&i===a&&uc.index)return null;if(f===c.index)return v.hasAttribute(s.Q0)?null:v;var g=(null===(l=v.getAttribute(s.Q0))||void 0===l?void 0:l.split("-").map(function(t){return+t}))||[];g.length?f+=g[1]-g[0]+1:f++}}catch(t){n={error:t}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}return null},e.On=function(t){var e=t.start,n=t.end,r=t.isBackward,o=t.zoneId,s=this._toModelRangePoint(e,!1,o),t=this._toModelRangePoint(n,!0,o);if(!s||!t)return this.s.error({message:"[Selection][_calcModelRangeFromDom] startPoint: "+s+", endPoint: "+t,level:i.W.ERROR}),null;if(!o&&s.zoneId!==t.zoneId&&!this.s._isFixToCommonZone)return null;if(o&&s.zoneId!==t.zoneId){if(!(e=this.s.getContentState().getZoneState(o)))return null;if(n=e.length()-1,!(e=e.getLine(n)))return null;o===s.zoneId?t={line:n,offset:e.length()-1,zoneId:o}:o===t.zoneId?s={line:0,offset:0,zoneId:o}:(s={line:0,offset:0,zoneId:o},t={line:n,offset:e.length()-1,zoneId:o})}return new(this.s.modulesContainer.get(l.h.Range))({start:s,end:t,isBackward:r,editor:this.s})},e.toModelRange=function(t,e){return this._toModelRange(t,e)},e._toModelRange=function(t,e){var n=!1;if("selection"===function(t){var e=Object.prototype.toString.call(t);if(e){var n=e.split(" ")[1];if(n)return n.slice(0,-1).toLowerCase()}return""}(t)){var r=t.anchorNode,i=t.anchorOffset,o=t.focusNode,s=t.focusOffset,a=(0,V.Zj)(t,0);if(!a)return null;var l=(t=a).startContainer,u=t.startOffset,c=t.endContainer,a=t.endOffset,n=r!==l||o!==c||i!==u||s!==a}return c=t.startContainer,i=t.startOffset,u=t.endContainer,s=t.endOffset,null!=(a=this.On({start:{node:c,offset:i},end:{node:u,offset:s},isBackward:n,zoneId:e}))&&a.isCollapsed()&&!t.collapsed&&(s=(u=this.Tn({node:c,offset:i},{node:u,offset:s},a)).start,u=u.end,a=this.On({start:s,end:u,isBackward:n,zoneId:e})),a},e._toModelRangePoint=function(t,e,n){void 0===e&&(e=!1);var i,o,a,l=(0,V.KK)(t),u=l.node,c=l.offset,l=(0,V.mO)(u);if(!u||!l||!(0,V.Tl)(this.s,l,e)){if(!n)return null;var d=this.s.getContentState().getZoneState(n);if(!d)return null;var f=d.length()-1,h=d.getLine(f);return h?e?{line:f,offset:h.length()-1,zoneId:n}:{line:0,offset:0,zoneId:n}:null}f=(d=(0,V.Tl)(this.s,l,e)).getZoneId(),h=d.index,n=0,(l=u instanceof HTMLElement?(0,V.Ny)(u):(0,V.Ny)(u.parentElement))&&(c=0),l&&e&&(n=(null===(p=l.getAttribute(s.eu))||void 0===p?void 0:p.length)||0);var p=(0,V.qI)(u);if(p&&(n=c=0,l=p),!(l=l||(u instanceof HTMLElement?u.closest("["+s.nV+"]"):null===(v=u.parentElement)||void 0===v?void 0:v.closest("["+s.nV+"]")))){var v=(0,V.fr)(t),t=v?(0,V.MK)(v):0;if(v&&t){var g=Array.from(v.querySelectorAll("["+s.VI+"]"));if(g.length)try{for(var y=(0,r.c)(g),m=y.next();!m.done;m=y.next()){var b=m.value;null!==(a=b.textContent)&&void 0!==a&&a.length&&this.s.log("trace",{zerospacesLength:g.length,domInfo:(0,U.F)(b)})}}catch(t){i={error:t}}finally{try{m&&!m.done&&(o=y.return)&&o.call(y)}finally{if(i)throw i.error}}}return{line:h,offset:Math.max(t=t+(d.hasLineMarker()?1:0)+n,0),zoneId:f}}return l.hasAttribute(s.q7)&&(c=0),{line:h,offset:Math.max(d=(l&&(null===(l=this.s._getViewModel().getLeafModel(l))||void 0===l?void 0:l.start)||0)+c+n+(d.hasLineMarker()?1:0),0),zoneId:f}},e._updateDOMSelection=function(t){var e=this,n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,s=document.getSelection();if(this.s.log({scope:"[Selection][_updateDOMSelection]",level:"info",shouldLogToMobile:!1,selection:s,preDomSelection:this.bn,updateDomSelectionTimes:this.En}),this.En>=100&&null!==this.bn&&this.bn===s)return this.En,this.range,100===this.En&&setTimeout(function(){e.gn()},200),void this.En++;if(null!==s){if(null===n||null===i)return s.removeAllRanges(),this.s.getContainer().blur(),void this.gn();this.hasFocus()||(u=this.qn(null===(l=this.range)||void 0===l?void 0:l.start.zoneId))&&F(u);var a,l=(0,V.Zj)(s,0);if(l&&this.Pn(t,l))this.gn();else{if(s.anchorNode!==s.baseNode||s.focusNode!==s.extentNode){var u=(0,V.Yr)(s,l)?{startContainer:s.extentNode,startOffset:s.extentOffset,endContainer:s.baseNode,endOffset:s.baseOffset}:{startContainer:s.baseNode,startOffset:s.baseOffset,endContainer:s.extentNode,endOffset:s.extentOffset};if(this.Pn(t,u))return void this.gn()}this.yn(this.En+1,s),s.collapse&&s.extend?n===i&&r===o?s.collapse(n,r):null!==(a=this.range)&&void 0!==a&&a.isBackward?(s.collapse(i,o),s.extend(n,r)):(s.collapse(n,r),s.extend(i,o)):((a=document.createRange()).setStart(n,r),a.setEnd(i,o),s.removeAllRanges(),s.addRange(a))}}else this.gn()},e.Pn=function(t,e){return t.startContainer===e.startContainer&&t.endContainer===e.endContainer&&t.startOffset===e.startOffset&&t.endOffset===e.endOffset},e.An=function(t,e,n,r){var i=this.Cn(t.zoneId,t.line);if(!i)return 0;var t=e.hasAttribute(s.VI)||e.hasAttribute(s.q7),o=r?null===(o=e.textContent)||void 0===o?void 0:o.slice(n):null===(a=e.textContent)||void 0===a?void 0:a.slice(0,n),a=r?1:-1,n=0;if(o&&o.length&&!t)n=(r?B.X:B.j)(o);else{i=(0,V.U_)(i),e=(0,V.Ny)(e)||e;var e=i.indexOf(e),i=r?i.slice(e+1).find(function(t){return!(0,V.x1)(t)}):i.slice(0,e).reverse().find(function(t){return!(0,V.x1)(t)});if(!i)return a;n=(0,V.Ny)(i)?(null===(e=(0,V.Ju)(i))||void 0===e?void 0:e.length)||1:(i=i.textContent||"",(r?B.X:B.j)(i))}return a*Math.max(n,1)},e.kn=function(t){var e=(0,r.b)({},t),n=t.zoneId,i=t.line,o=t.offset,s=this.s.getContentState().getZoneState(n);if(!s)return t;var a=s.getLine(i);if(!a)return t;var l=a.hasLineMarker()?1:0,u=a.length()-1,n=null===(a=this.s.virtualListManager)||void 0===a?void 0:a.getVirtualListModuleOfZone(n),c=null==n?void 0:n.getInvisibleLinesModule();if(os)return void l[e].splice(u,0,a);l[e].push(a)},this.off=function(e,n,r){var i=t.Q.get(n);if(i&&i[e]){for(var o=i[e].length-1;0<=o;o--)i[e][o].handle===r&&i[e].splice(o,1);i[e].length||delete i[e],Object.keys(i).length||(t.Q.delete(n),t.et(n)),t.Q.size||t.rt()}}}var e=t.prototype;return e.tt=function(t,e,n){switch(t){case"resize":r=n||window;break;case"focus":case"blur":r=n||e instanceof HTMLElement&&e.closest("[contenteditable]")||document;break;default:r=n||document}var r,i=this.X.get(r);i||(i=new Map,this.X.set(r,i)),i.has(t)||(r.addEventListener(t,this.dispatchNativeEvent),i.set(t,!0))},e.Z=function(t,e){for(var n=[];e;){var i=this.Q.get(e);i&&i[t]&&n.push.apply(n,(0,r.e)(i[t])),e=e.parentNode}return n.sort(function(t,e){return t.priority-e.priority})},e.$=function(t,e,n){if(t.defaultPrevented)return!1;if(t.type===tl){if(e instanceof HTMLElement)return e.hasAttribute("contenteditable")?e.contains(n):!(!(n=window.getSelection())||!n.rangeCount)&&e.contains(n.getRangeAt(0).startContainer);if(e instanceof Document)return e===t.target}return!(!t.target||!t.target.contains)&&(e===t.target||e.contains(t.target))},e.rt=function(){var t,e;try{for(var n=(0,r.c)(this.X.keys()),i=n.next();!i.done;i=n.next()){var o=i.value;this.et(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.et=function(t){var e,n,i=this.X.get(t);if(i){this.X.delete(t),i=(0,r.e)(i.keys());try{for(var o=(0,r.c)(i),s=o.next();!s.done;s=o.next()){var a=s.value;t.removeEventListener(a,this.dispatchNativeEvent)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}}},t}()),tc=function(){function t(){this.i=[],this.n=!1}var e=t.prototype;return e.add=function(t){this.n&&this.i.push(t)},e.start=function(){this.reset(),this.n=!0},e.reset=function(){this.n=!1,this.i=[]},e.export=function(){try{return JSON.stringify(this.i)}catch(t){return""}},t}(),td=n("162114"),tf=n("65476"),th=function(){function t(){this.be=new Map,this.pe=new Map}var e=t.prototype;return e.get=function(t){var e,n=this.be.get(t);if(!n&&!((e=t)===l.h.InputModel||e===l.h.UndoModule))throw Error("modules undefined, type is "+t);return n},e.set=function(t,e){var n=this,i=[];if("object"==typeof t)Object.keys(t).forEach(function(e){l.h[e]||l.C[e],l.C[e]?n.set(e,t[e]):n.set(e,t[e])&&i.push(e)});else if("string"==typeof t&&e){var s=this.be.get(t);if(!l.C[t]||!Array.isArray(e))return this.be.set(t,e),e!==s;var a=(0,r._)(e,2),s=a[0],a=a[1];this.setZoneModule(o.S,l.C[t],s,a)}return i},e.getZoneModule=function(t,e){var n=this.be.get(e),t=null===(e=this.pe.get(e))||void 0===e?void 0:e.get(t);return n&&t?[n,t]:null},e.setZoneModule=function(t,e,n,i){this.be.set(e,n);var o,s,a,l,u=this.pe.get(e);if(u){try{for(var c=(0,r.c)(u.values()),d=c.next();!d.done;d=c.next()){var f=d.value,h=Object.keys(f);if(h.length===Object.keys(i).length){var p=!0;try{for(var v=(a=void 0,(0,r.c)(h)),g=v.next();!g.done;g=v.next()){var y=g.value;if(f[y]!==i[y]){p=!1;break}}}catch(t){a={error:t}}finally{try{g&&!g.done&&(l=v.return)&&l.call(v)}finally{if(a)throw a.error}}if(p)return void u.set(t,f)}}}catch(t){o={error:t}}finally{try{d&&!d.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}u.set(t,(0,r.b)({},i))}else this.pe.set(e,new Map([[t,(0,r.b)({},i)]]))},e.unSubscribingZone=function(t,e){(e=this.pe.get(e))&&e.delete(t)},t}(),tp=n("649146"),tv=function(){function t(){this.Xn=new WeakMap,this.th=new WeakMap,this.nh=new WeakMap}var e=t.prototype;return e._setNode=function(t,e){document.contains(e),t._node=e,this._deleteNode(t),this._deleteNode(e),this.Xn.set(t,e),this.th.set(e,t)},e._resetNode=function(t){t._node=null},e._deleteNode=function(t){var e;t instanceof HTMLElement?((e=this.th.get(t))&&this.Xn.delete(e),this.th.delete(t)):((e=this.Xn.get(t))&&this.th.delete(e),this.Xn.delete(t))},e.getModel=function(t){return this.th.get(t)},e.getView=function(t){return this.Xn.get(t)},e._setLeaf=function(t,e){this.nh.set(t,e)},e._deleteLeaf=function(t){this.nh.delete(t)},e.getLeafModel=function(t){return this.nh.get(t)},e.destroy=function(){this.Xn=new WeakMap,this.th=new WeakMap,this.nh=new WeakMap},t}();function tg(t,e,n){var r=t.parentElement;if(!e)return r;for(;r&&!(n&&r.matches(n));){;if(r.matches(e))return r;r=r.parentElement}return null}var ty=function(){function t(t){this.e=100,this.s=t}var e=t.prototype;return e.isZoneContainer=function(t){var e=!1;return this.s.getContentState().getContent().forEach(function(n){n._node===t&&(e=!0)}),e},e.getZoneFromNode=function(t){var e=null;return this.s.getContentState().getContent().forEach(function(n){var r;null!==(r=n._node)&&void 0!==r&&r.contains(t)&&(e=n.getZoneId())}),e},e.getLineStateFromNode=function(t){return null!=(t=tg(t,".ace-line",".editor-kit-container"))&&t.classList.contains(".ace-line")&&(t=this.s._getViewModel().getModel(t))||null},e.getLineStateInParentZone=function(t){var e=this.getLineStateFromNode(t);return null!==(t=null==e?void 0:e.parent)&&void 0!==t&&t.parent?e.parent.parent:null},e.getLineStateInRootZone=function(t){for(var e=0,n=this.getLineStateInParentZone(t);ee?o=new K.L({start:i.toPosition().start+1,editor:this,len:0,zoneId:r}).toRange().start:i.start.offset>e&&(n=new K.L({start:i.toPosition().start-1,editor:this,len:0,zoneId:r}).toRange().start),this.q.getAttributes(n,o)):o},e._getInlineAttributesOfNextPosition=function(t){var e=this.q.getActiveZone().getZoneId(),n=null!=t?t:this.selection.getSelection(e);if(!n||!(t=null===(r=this.q.getZoneState(e))||void 0===r?void 0:r.getLine(n.start.line)))return(0,tf.vA)();var r=n.start;return n.start.offsetr.line&&(l=(d=l.getLine(i.line)).getText()||"",h=Number(d.hasLineMarker()),h=l.slice(0,l.length-1).length-(i.offset-h),e.getContainer().contains(c)&&n||(c=o.getView(d),u=0),a=f.Xh.isEdge?n.length:n.length-h);var h=s,s=(0,p.S3)(c).join(""),c=n.slice(u,a).replace(g.DT,""),a=this._getInheritAttributesAndsetStatus();h!==s&&r.line===i.line?(e.setStatus("dangerousInput",!0),this.Et(c,a,{refresh:!0,type:t})):0===c.length&&r.line===i.line&&r.offset===i.offset?(c=n.substr(u,this.nt),this.Et(c,a,{overtype:!0,type:t})):this.Et(c,a,{overtype:!1,type:t}),this.nt=0}},e._getInheritAttributesAndsetStatus=function(){var t=this,e=this.editor.selection.getSelection(),n=e.toPosition().zoneId,n=this.editor.pluginManager.call("editorGetInheritAttributes",{},{cb:function(t,e){return e},zoneId:n}),e=this.getInheritAttributes(e,function(){t.editor.setStatus("dangerousInput",!0)});return Object.assign({},e,n)},e.getInheritAttributes=function(t,e){var n,r,o,s=this.editor,a=s.getContentState(),l=s._getInlineAttributesOfPreviousPosition(!0,t),u=s._getInlineAttributesOfPreviousPosition(!1,t).toMap(),c=(null!=t?t:s.selection.getSelection()).toPosition(),c=a.getInlineStyleOverride(c),d={};try{for(var f=(0,i.c)(l),h=f.next();!h.done;h=f.next()){var p=(0,i._)(h.value,2),v=p[0],g=p[1],y=this.bt();if(null!=y&&y.test(v)&&(!1!==(null==(I=a.schema.get(v))?void 0:I.lineStartInherit)||v in u)){if(I&&!1===I.tailInherit&&s._getInlineAttributesOfNextPosition(t).toMap()[v]!==g){null!=I&&I.refresh&&e&&e();continue}d[v]=g}}}catch(t){m={error:t}}finally{try{h&&!h.done&&(n=f.return)&&n.call(f)}finally{if(m)throw m.error}}var m=s._getInlineAttributesOfNextPosition(t),b=this.bt();try{for(var E=(0,i.c)(m),S=E.next();!S.done;S=E.next()){var I,C=(0,i._)(S.value,2),v=C[0],g=C[1];null==b||!b.test(v)||v in d||(I=a.schema.get(v))&&I.headInherit&&(d[v]=g)}}catch(t){r={error:t}}finally{try{S&&!S.done&&(o=E.return)&&o.call(E)}finally{if(r)throw r.error}}return(0,i.b)((0,i.b)({},d),c)},e.bt=function(){if(this.it)return this.it;var t,e,n=this.editor.getContentState().schema,r=[];try{for(var o=(0,i.c)(Object.keys(n.schemas)),s=o.next();!s.done;s=o.next()){var a=s.value;n.schemas[a].mark&&r.push(a)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r.length?(this.it=new RegExp(r.join("|")),this.it):null},e._handleReturnKey=function(t){return null},e.dt=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=1),this.editor.log("trace","[Editor Event] name: "+t.type+", type: deleteKey");var r=Date.now();r-this.pt<5&&this.editor.error({level:a.W.ERROR,message:"[Editor Error]: delete trigger multiple times in a short period of time."}),this.pt=r,this._flushInput();var i=this.editor;if(i.triggerEditorEvent(h.r.DELETE_KEY,{e:t,isBackward:e}),t.defaultPrevented)return null;var s=i.getContentState(),l=s.getActiveZone().getZoneId(),u=i.selection.getSelection(),d=u.start,f=d.line,p=d.offset,v=u.toPosition(),r=v.start,d=v.len,u={evt:t,deltaSet:(new c.D).compose(new o.I({zoneId:l})),editor:i};if(e&&i.pluginManager.call("editorWillDoDeleteKey",u),i.callAll("aceDoDeleteKey",{editor:i,evt:t,caretLine:i.selection.getSelection().start.line}),v=[],d?(d=new o.I({zoneId:l}).retain(r).delete(d),d=u.deltaSet.compose(d),this._apply(d,{type:M.DeleteRange}),v=[!0]):e&&(p={editor:this.editor,evt:t,lineMarker:null===(s=null===(s=s.getZoneState(l))||void 0===s?void 0:s.getLine(f))||void 0===s?void 0:s.hasLineMarker(),zoneId:l,theLine:f,col:p},v=i.callAll("editorDoDeleteKey",p)),v.includes(!0))return i.callAll("editorAfterDoDeleteKey",{editor:i,theLine:f,evt:t}),null;var g=!1;return(u.deltaSet.forEach(function(t){0=t.ops.length)throw Error("getOpOffsetInDocumentWithCache index overstep");for(var r=e,i=0;0<=r;){if(n.has(r)){i+=n.get(r);break}var o=t.ops[r];(0,a.f)(o)!==l.HP.INSERT&&(i+=(0,a.a)(o)),r--}return i}function x(t,e,n){var r,o,s,c;return s=t,c=e,(r=t,o=e,n.reduce(function(t,e){if(!(e instanceof u.I))return t.concat(e);var n=r.getZoneState(e.zoneId);if(!n&&e.ops.some(function(t){return!t.insert}))throw Error("attempt to apply new ZoneDelta which is invalid");var s=!1,c=e.reduce(function(t,r,u){var c=(0,a.f)(r);return c===l.HP.DELETE?(t.push(r),t):c===l.HP.RETAIN?(s=!1,function(t,e,n,r,o){var s,u=t.ops[n];if(!u.attributes||!E(u.attributes,o))return!1;if(!(e=(s=e).ops[s.ops.length-1]))return!1;if((0,a.f)(e)===l.HP.INSERT)return!e.insert.endsWith("\n");for(var c=t.ops.slice(0,n).filter(function(t){return(0,a.f)(t)!==l.HP.INSERT});c[c.length-1]&&(0,a.f)(c[c.length-1])===l.HP.DELETE;)c.pop();return 0!==c.length&&"\n"!==g(r,(n=c.reduce(function(t,e){return t+(0,a.a)(e)},0))-1,n)&&!(0,i._)(y(r,n-1,n),1)[0].attributes.lmkr}(e,t,u,n,o)&&t.insertEnter(),t.push(r),function t(e,n,r,o,s){var u=e.ops[n],c=e.ops[r];if(!u.attributes||!E(u.attributes,s))return function(t,e,n,r){for(var o=!1,s=e+1;sthis.Mt)return this.Bt(r-this.Mt,e),void(n&&this.Ut(n,e));t&&this.Ut(t,e)}},e.Ut=function(t,e){var n,r;e&&(this.Ct||this.Dt()),this.Ct&&(this.Lt(),n=this.xt.length-1,r=this.xt[n],e=(new f.I).retain(this.Pt).retain(t,e),this.xt[n]=new c.V(r._getDelta().compose(e,!1),r.parent),this.xt[n]._setKey(r.getKey()),this.xt[n].setNode(r.getNode())),this.Pt+=t,this.Ht+=t},e.delete=function(t){if(t){var e=this.Ot(t),n=e.line,e=e.col;if(n>this.Mt)return this.Wt(n-this.Mt),void(e&&this.Zt(e));t&&this.Zt(t)}},e.close=function(){this.Ft()},e.Ot=function(t){for(var e=0,n=this.Mt,r=this.Ht,i=this.te.length(),o=n;oi[i.length-1]._offsetEnd||e<0?null:e>=i[o]._offsetStart&&e<=i[o]._offsetEnd?o:e>i[o]._offsetEnd?t(e,o,r,i):e0&&(n.ops=i),n}(0,v.c)(e,t);var n=e.prototype;return n.insert=function(e,n){return e?t.prototype.insert.call(this,{id:e},n,!1):this},n.create=function(t){return t.zoneType=t.zoneType||this.zoneType,new e(t)},e}(s.B),m=function(t){function e(e){return t.call(this,(0,v.a)({zoneType:g.Ak.Row},e))||this}return(0,v.c)(e,t),e}(y),b=function(t){function e(e){return t.call(this,(0,v.a)({zoneType:g.Ak.Column},e))||this}return(0,v.c)(e,t),e}(y);s.B.registerCreator(g.Ak.Row,m),s.B.registerCreator(g.Ak.Column,b);var E=function(){function t(t){this.ee=0,this.te=t}var e=t.prototype;return e.insert=function(t,e){var n=t,t=(t=this.te.get(0))||new c.V(this.ne(),this.te.getParent()),e=this.ne().retain(this.ee).insert(n.id,e),e=t.compose(e);this.te.splice(0,1,[e]),this.ee+=(0,s.a)({insert:n})},e.retain=function(t,e){e&&(e=this.ne().retain(this.ee).retain(t,e),e=this.te.get(0).compose(e),this.te.splice(0,1,[e])),this.ee+=t},e.delete=function(t){var e=this.ne(),t=this.te.get(0).compose(e.retain(this.ee).delete(t));this.te.splice(0,1,[t])},e.ne=function(){return new("R"===this.te.getZoneType()?m:b)({zoneId:this.te.getZoneId()})},e.close=function(){},t}(),S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.d)(e,t),e.prototype.cloneEmptyState=function(){var t=this._content.create({zoneType:this.type,zoneId:this.zoneId}),t=new e(this.getZoneId(),t,this.schema);return t.type=this.type,t.zoneId=this.zoneId,t._node=this._node,t.placeholder=this.placeholder,t},e}(p);S.register("R",E),S.register("C",E)},195229:function(t,e,n){"use strict";var r,i,o;n.d(e,{C:function(){return i},h:function(){return r}}),(o=r=r||{}).Range="Range",o.ZoneState="ZoneState",o.ContentState="ContentState",o.UndoModule="UndoModule",o.InputModel="InputModel",(i=i||{}).VirtualListModule="VirtualListModule"},672543:function(t,e,n){"use strict";function r(t){if(t instanceof Window)return{top:0,left:0,clientWidth:window.innerWidth,clientHeight:window.innerHeight,scrollTop:t.scrollY,scrollLeft:t.scrollX};if(t instanceof Element){var e=t.getBoundingClientRect();return{top:e.top,left:e.left,clientWidth:t.clientWidth,clientHeight:t.clientHeight,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}}return{top:0,left:0,clientHeight:0,clientWidth:0,scrollLeft:0,scrollTop:0}}function i(t){return"number"==typeof t?{paddingBottom:t,paddingLeft:t,paddingRight:t,paddingTop:t}:{paddingBottom:t.bottom||0,paddingTop:t.top||0,paddingLeft:t.left||0,paddingRight:t.right||0}}function o(t){return 0!==t.height||0!==t.top||0!==t.left||0!==t.right||0!==t.left}function s(t){return t.left||t.top}n.d(e,{AS:function(){return i},Fl:function(){return o},Yz:function(){return s},re:function(){return r}})},613974:function(t,e,n){"use strict";n.d(e,{$l:function(){return a},j0:function(){return d},zq:function(){return l}});var r=n(194055),i=n(809919),o=n(457341),s=n(559016),a="undo",l="redo",u=function(t){var e=t.id,n=t.type,r=t.deltaSet,t=t.selection;this.id=e,this.type=n,this.deltaSet=r,this.selection=t};function c(){}c.prototype=Object.create(Array.prototype,{clear:{value:function(){this.splice(0,this.length)}},getNthFromTop:{value:function(t){return null!==(t=this[this.length-1-(t=void 0===t?0:t)])&&void 0!==t?t:null}},getNthFromBottom:{value:function(t){return null!==(t=this[t=void 0===t?0:t])&&void 0!==t?t:null}}}),c.prototype.constructor=c;var d=function(){function t(t){this.name="undoModule",this.Oe=(0,i.D)(6),this.De=null,this.Ce=new c,this.Ne=new c,this.ke=[],this.Re=!1,this.Ae=null,this.s=t,this.Ue(),this.xe()}var e=t.prototype;return e.xe=function(){var t=this,e=this.s;e.registerCommand(a,function(){t.undo()}),e.registerCommand(l,function(){t.redo()})},e.Ue=function(){this.s.on(s.r.CONTENT_WILL_CHANGE,this.handleContentWillChange),this.s.on(s.r.CONTENT_CHANGE,this.handleContentChange),this.s.on(s.r.INPUT,this.handleInputEvent,100)},e.He=function(){this.s.off(s.r.CONTENT_WILL_CHANGE,this.handleContentWillChange),this.s.off(s.r.CONTENT_CHANGE,this.handleContentChange),this.s.off(s.r.INPUT,this.handleInputEvent)},e.handleInputEvent=function(t){var e=!1;"historyUndo"===t.nativeEvent.inputType?(this.undo(),e=!0):"historyRedo"===t.nativeEvent.inputType&&(this.redo(),e=!0),e&&(t.preventDefault(),t.stopEvent())},e.Be=function(){var t=this.s.getContentState().contentApplyRuntime;return!!t.atRuntime&&[a,l].includes(t=t.runtimeStack[0].type)},Object.defineProperty(e,"inBatching",{get:function(){return 0=o.length?(c=!0,u=e-1,n="backward"):u<0?(d=!0,u=e+1,n="forward"):(a=o[u],u+="forward"===n?1:-1);return a},c=function(t){var e=t.node,n=t.offset;if(l(e)&&e.hasChildNodes()){var r=(n=Math.min(n,e.childNodes.length))===e.childNodes.length,i=r?"backward":"forward";for(e=e.childNodes[r?n-1:n];e instanceof HTMLElement&&e.childNodes.length;)var o=r?e.childNodes.length-1:0,e=u(e,o,i);if(!e)return t;n=r&&null!=e.textContent?e.textContent.length:0}return{node:e,offset:n}};function d(t){if(!t)return null;var e=t;return(e=t.nodeType===window.Node.TEXT_NODE?t.parentNode:e)&&e.closest?e.closest("["+i.PI+"]"):null}function f(t){if(!(t instanceof HTMLElement))return"";var e=t.hasAttribute(i.eu),n=t.hasAttribute(i.VI),r=t.hasAttribute(i.Ks),o=t.hasAttribute(i.sq),s=t.hasAttribute(i.q7);return e?t.getAttribute(i.eu):n?(null===(n=t.textContent)||void 0===n?void 0:n.replace(RegExp(""+i.T6,"g"),""))||"":r?t.querySelectorAll("["+i.P9+"]").length?" ":"":s?((null===(t=t.textContent)||void 0===t?void 0:t.replace(RegExp(""+i.T6,"g"),""))||"")+"\n":o?"":void 0}function h(t){var e,n,o,s=c(t),a=s.node,l=s.offset,t=d(a);if(!a||!t)return null;(s=document.createRange()).setStart(t,0),s.setEnd(a,l),s=Array.from((l=s.cloneContents()).querySelectorAll("["+i.eu+"],["+i.VI+"],["+i.Ks+"],["+i.sq+"]"));try{for(var u=(0,r.c)(s),f=u.next();!f.done;f=u.next()){var h,p,v,g,y,m,b=f.value,E=b.parentNode;E&&(h=b.hasAttribute(i.eu),p=b.hasAttribute(i.VI),v=b.hasAttribute(i.Ks),h?(g=b.getAttribute(i.eu),(y=document.createElement("span")).setAttribute(i.eu,g),y.textContent=g,E.insertBefore(y,b),E.removeChild(b)):p?b.textContent=(null===(o=b.textContent)||void 0===o?void 0:o.replace(RegExp(""+i.T6,"g"),""))||null:v?(m=b.querySelectorAll("["+i.P9+"]"),b.textContent=m.length?" ":""):E.removeChild(b))}}catch(t){e={error:t}}finally{try{f&&!f.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return l}function p(t){return Array.from(t.querySelectorAll("["+i.nV+"], ["+i.eu+"], ["+i.VI+"]")).filter(function(t){var e;return!(t instanceof HTMLElement&&"string"==typeof(null===(e=t.dataset)||void 0===e?void 0:e.fakeText))||(null===(t=null===(t=t.dataset)||void 0===t?void 0:t.fakeText)||void 0===t?void 0:t.length)}).filter(function(e){return e=e.parentElement&&e.parentElement.closest("["+i.eu+"]"),!t.contains(e)}).filter(function(e){return e=e.parentElement&&e.parentElement.closest("["+i.Ks+"]"),!t.contains(e)})}function v(t){if(a(t)||!t.hasChildNodes())return[t];if(g(t)){var e=x(t);if(e&&e.firstChild)return[e.firstChild]}return Array.from(t.childNodes).reduce(function(t,e){return t.push.apply(t,(0,r.e)(v(e))),t},[])}function g(t){return!!y(t)}function y(t){return b(t,"["+i.eu+"]")}function m(t){return b(t,"["+i.sq+"]")}function b(t,e){return t&&(t=t instanceof HTMLElement?t:t.parentElement)?(e=t.closest(e),t=d(t),e&&t&&t.contains(e)?e:null):null}function E(t){return t&&(t instanceof Element||t instanceof DocumentFragment)&&(function(t){t.querySelectorAll("["+i.q7+"]").forEach(function(t){t.textContent&&(t.textContent=function(t){return t.replace(RegExp(i.T6+"|\\n","g"),"")}(t.textContent))})}(t),function(t){t.querySelectorAll("."+i.Z6).forEach(function(t){t.parentElement.removeChild(t)})}(t)),(t=t.textContent)?t.length:0}function S(t,e){var n=t.anchorNode,r=t.focusNode;if(!n||!r||t.rangeCount<=e)return null;if(r=null,o.Xh.safari)try{r=t.getRangeAt(e)}catch(t){r=null}else t.getRangeAt&&(r=t.getRangeAt(e));return r||((r=document.createRange()).setStart(t.anchorNode,t.anchorOffset),r.setEnd(t.focusNode,t.focusOffset)),r}function I(t,e){var n,r,i,o=document.createRange(),s=t.node,a=t.offset,t=e.node,e=e.offset;return s&&(i=Math.min(a,(null===(n=(r=C(v(s)[0])).textContent)||void 0===n?void 0:n.length)||0),o.setStart(r,i)),t&&(a=C(v(t)[0]),r=(n=g(t))&&x(t),t=(null===(t=a.textContent)||void 0===t?void 0:t.length)||0,i=!n||r?Math.min(e,t):t,o.setEnd(a,i)),o}function C(t){return o.Xh.safari&&t instanceof HTMLElement&&"BR"===t.tagName?t.closest("span[data-leaf]"):t}function L(t){return t&&(t instanceof HTMLElement?t.hasAttribute(i.VI):null===(t=t.parentElement)||void 0===t?void 0:t.hasAttribute(i.VI))}function w(t){return!!x(t)}function x(t){return t&&t instanceof Element?t.hasAttribute(i.VI)?t:t.querySelector("["+i.VI+"]"):null}function _(t){return t&&t instanceof Element&&t.hasAttribute(""+i.eu)?t.getAttribute(""+i.eu):null}function T(t,e,n){void 0===n&&(n=!1);var o,s,a,l=t._getViewModel(),u=l.getModel(e);if(!u){var c=e.closest("["+i.Ks+"]");if(!c)return null;var d=c.querySelectorAll("["+i.PI+"],["+i.Q0+"]");if(!d.length||!(c=(null==(f=l.getModel(c))?void 0:f.getZoneId())||c.getAttribute("["+i.P9+"]")))return null;var f=f||t.getContentState().getZoneState(c),c=null===(t=t.virtualListManager)||void 0===t?void 0:t.getVirtualListModuleOfZone(c);if(null!=c&&c.isEnabled&&(c=e.getAttribute(i.Q0))){var h=c.split("-"),p=null!==(v=null==f?void 0:f.getLine(+h[0]))&&void 0!==v?v:null,v=null!==(v=null==f?void 0:f.getLine(+h[1]))&&void 0!==v?v:null;return n?v:p}var g=-1;try{for(var y=(0,r.c)(Array.from(d)),m=y.next();!m.done;m=y.next()){var b=m.value;if(b.getAttribute(i.PI)?g++:(h=null===(a=b.getAttribute(i.Q0))||void 0===a?void 0:a.split("-"))&&(g+=+h[1]-+h[0]+1),b===e){var E=null==f?void 0:f.getLine(g);if(!E)return null;u=E;break}}}catch(t){o={error:t}}finally{try{m&&!m.done&&(s=y.return)&&s.call(y)}finally{if(o)throw o.error}}}return Array.isArray(u)&&(p=u[0],v=u[u.length-1],u=n?v:p),u}function A(t,e){var n;if(!t||!(t=t instanceof HTMLElement?t:t.parentElement)||!t.textContent||e!==t.textContent.length)return!1;for(var r=t.closest("["+i.MB+"]");(null==r||!r.nextElementSibling)&&null!==(n=null==r?void 0:r.parentElement)&&void 0!==n&&n.hasAttribute(i.lE);)r=r.parentElement;return null===(t=null==r?void 0:r.nextElementSibling)||void 0===t?void 0:t.querySelector("["+i.eu+"]")}function M(t,e){return!!e&&t.focusNode===e.startContainer&&t.focusOffset===e.startOffset&&t.anchorNode===e.endContainer&&t.anchorOffset===e.endOffset}},401328:function(t,e,n){"use strict";n.d(e,{y:function(){return a}});var r=n(194055),i=n(734795),o=n(283138),s=n(651271),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.d)(e,t),e.prototype.render=function(){var t=this,e=this.props,n=e.data,a=e.dataSet,l=void 0===a?{}:a,u=e.className,c=e.style,d=e.editor,a=n.op,e=n.parent;return"string"!=typeof a.insert?o.ZP.createElement(o.ZP.Fragment,null):(u=(0,r.b)((0,r.b)(((n={})[i.nV]=!0,n),l),{className:u,style:c}),null!==(c=a.attributes)&&void 0!==c&&c.enter&&(u[i.q7]=!0,e.isTextEmpty()&&d._isRenderBrInEmptyLine)?o.ZP.createElement(s.q,(0,r.b)({},u,{ref:function(e){var n,r;null!==(r=null===(n=t.props)||void 0===n?void 0:n._ref)&&void 0!==r&&r.call(n,e)}})):o.ZP.createElement(s.T,(0,r.b)({},u,{ref:function(e){var n,r;null!==(r=null===(n=t.props)||void 0===n?void 0:n._ref)&&void 0!==r&&r.call(n,e)}}),a.insert))},e}(o.ZP.Component)},236836:function(t,e,n){"use strict";n.d(e,{T:function(){return g},Z:function(){return m}});var r=n("194055"),i=n("457341"),o=n("464675"),s=n("734795"),a=n("85359"),l=n("559016");n("294484");var u=n("651419"),c=n("65476"),d=n("101199"),f=n("52236"),h=n("489883"),p=d.forwardRef(function(t,e){return d.createElement("span",(0,r.b)({ref:e,"data-zero-space":!0},t),"​")}),v=["editor","length","disableDefaultSelected","forwardRef","onSelect","onDeselect","onKeyDown","autoSelectOnClick"],g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tagName=h.K.TEXT,e.option={viewportEventEnabled:!0,selectEventEnabled:!0},e._leftZeroSpaceRef=d.createRef(),e._rightZeroSpaceRef=d.createRef(),e.eo=new WeakMap,e.handleKeyDown=function(t){if(e.props.onKeyDown)return e.props.onKeyDown(t);if(e.to()){var n=t.keyCode,r=!1;switch(!0){case n===s.VD.Enter:r=e.so();break;case[s.VD.Left,s.VD.Right,s.VD.Up,s.VD.Down].includes(n):r=e.io(t)}r&&(t.stopEvent(),t.stopPropagation(),t.preventDefault(),t.preventEvent())}},e.updateLeafModel=function(){var t,n,r,i=e._ref.current;i&&((n=null==(t=null===(r=e._ref.current)||void 0===r?void 0:r.closest("["+s.MB+"]"))?void 0:t.__leafModel)&&(e.props.editor._getViewModel()._setLeaf(i,n),e.eo.set(i,n)),n&&n.lineState&&(r=n.op,i=n.lineState,i=n.index===i.getOps().length-2,null!=r&&r.attributes&&i&&(e.no(e._leftZeroSpaceRef.current),e.no(e._rightZeroSpaceRef.current),e.to()?a.Xh.mobile||requestAnimationFrame(function(){var t;null!==(t=null===(t=e._ref.current)||void 0===t?void 0:t.closest("["+s.PI+"]"))&&void 0!==t&&t.setAttribute("contenteditable","false")}):t.style.margin="0 0.1px")))},e.ro=function(t){},e.oo=function(t){t&&(e.to()?t.style.display="block":t.style.display="auto")},e}(0,r.d)(e,t);var n=e.prototype;return Object.defineProperty(n,"_length",{get:function(){var t=this.props.length;return"number"==typeof t&&isFinite(t)?Math.max(t,1):1},enumerable:!1,configurable:!0}),n.handleDeleteKey=function(t){var e=t.e,n=t.stopEvent,r=t.preventEvent,i=t.isBackward,s=this.props.editor,a=s.selection.getSelection(),l=a.toPosition(),u=l.zoneId,c=l.start;if(a.isCollapsed()&&(this.to()||1!==this._length)){var d=this.getSelectionOfCurrentRef();if(d){var f=s.getContentState(),h=a.start,p=h.line,v=h.offset,t=i?d.end:d.start,l=p+-1*(i?1:-1),h=f.getZoneState(u);if(h){var g,p=h.getLine(p);if(this.to()&&t.line===l&&p&&v===(i?p.getLineMarker():p.length()-1)&&t.zoneId===a.start.zoneId)return n(),r(),e.preventDefault(),e.stopPropagation(),p.isTextEmpty()&&(g=new o.I({zoneId:u}),i?(p=p.getLineMarker()+1,g.retain(c-p).delete(p)):(g.retain(c).delete(1),d.start.line--,d.end.line--),f.apply(g)),void s.selection.setSelection(d,!0);t.line===a.start.line&&t.offset===a.start.offset&&(n(),r(),e.preventDefault(),e.stopPropagation(),(g=new o.I({zoneId:u})).retain(c+(i?-1*this._length:0)).delete(this._length),f.apply(g))}}}},n.so=function(){if(!this.isFocusOnMe())return!1;var t=this.getSelectionOfCurrentRef();if(!t)return!1;var e=this.editor.getContentState(),n=t.start,r=n.zoneId,t=n.line,n=null===(n=e.getZoneState(r))||void 0===n?void 0:n.getLine(t);return!!(n&&(t=e.rangePointToOffset({line:t,zoneId:r,offset:n.length()-1})))&&(n=new o.I({zoneId:r}).retain(t).insertEnterAndLineMarker(),e.apply(n),this.editor.selection.setSelection({start:t+2,len:0,zoneId:r}),!0)},n.io=function(t){var e,n=this.getSelectionOfCurrentRef();if(!n)return!1;var r=n.start,i=r.zoneId,o=r.line,a=this.editor.selection.getSelection(),l=a.start,u=a.end,c=l.line,d=l.offset,f=l.zoneId,r=u.line,a=u.offset;if(i!==f)return!1;var h={start:n.start,end:n.end},p=this.editor.getContentState().getZoneState(f);if(!p)return!1;if(this.isFocusOnMe()){switch(t.keyCode){case s.VD.Left:case s.VD.Up:h.start.line=Math.max(0,o-1),h.start.offset=(null!==(e=null===(e=p.getLine(h.start.line))||void 0===e?void 0:e.length())&&void 0!==e?e:1)-1,h.end=h.start;break;case s.VD.Right:case s.VD.Down:h.start.line=Math.min(p.length()-1,o+1),h.start.offset=null!==(e=null===(e=p.getLine(h.start.line))||void 0===e?void 0:e.getLineMarker())&&void 0!==e?e:0,h.end=h.start;break;default:return!1}return this.editor.selection.setSelection(h,!0),!0}return(c===o+1&&(t.keyCode===s.VD.Up&&this.uo(l)||t.keyCode===s.VD.Left&&d===(null===(c=null==p?void 0:p.getLine(c))||void 0===c?void 0:c.getLineMarker()))||!(r!==o-1||!(t.keyCode===s.VD.Down&&this.lo(u)||t.keyCode===s.VD.Right&&a+1===(null===(r=null==p?void 0:p.getLine(r))||void 0===r?void 0:r.length()))))&&(this.editor.selection.setSelection(h=n,!0),!0)},n.uo=function(t){var e=null===(n=this.editor.getContentState().getZoneState(t.zoneId))||void 0===n?void 0:n.getLine(t.line);if(!e)return!1;var n=e.getLineMarker(),e=this.editor.rectModule.getCaretRect(t,t.zoneId),t=this.editor.rectModule.getCaretRect({line:t.line,offset:n,zoneId:t.zoneId},t.zoneId);return e.top===t.top},n.lo=function(t){var e=null===(n=this.editor.getContentState().getZoneState(t.zoneId))||void 0===n?void 0:n.getLine(t.line);if(!e)return!1;var n=this.editor.rectModule.getCaretRect(t,t.zoneId),t=this.editor.rectModule.getCaretRect({line:t.line,offset:e.length()-1,zoneId:t.zoneId},t.zoneId);return n.bottom===t.bottom},n.isFocusOnMe=function(){var t=null===(e=this.getSelectionOfCurrentRef())||void 0===e?void 0:e.toPosition();if(!t)return!1;var e=this.editor.selection.getSelection().toPosition();return t.start===e.start&&t.len===e.len&&t.zoneId===e.zoneId},n.shouldComponentUpdate=function(){return!0},n.componentDidUpdate=function(e){t.prototype.componentDidUpdate.call(this,e),this._ref.current&&(this.handleRef(this._ref.current),this.updateLeafModel()),e=this.getZoneIdByCurrentRef(),this.props.editor.once(l.r.PAINT,this.updateLeafModel,{zoneId:e})},n.componentDidMount=function(){t.prototype.componentDidMount.call(this);var e=this.getZoneIdByCurrentRef();this.props.editor.on(l.r.DELETE_KEY,this.handleDeleteKey,{zoneId:e,priority:900}),this.props.editor.on(l.r.KEYDOWN,this.handleKeyDown,{zoneId:e,priority:900}),this.props.editor.once(l.r.PAINT,this.updateLeafModel,{zoneId:e})},n.componentWillUnmount=function(){var e;t.prototype.componentWillUnmount.call(this),this.props.editor.off(l.r.DELETE_KEY,this.handleDeleteKey),this.props.editor.off(l.r.KEYDOWN,this.handleKeyDown),this._ref&&this._ref.current&&this.props.editor._getViewModel()._deleteLeaf(this._ref.current),this.to()&&null!==(e=null===(e=this._ref.current)||void 0===e?void 0:e.closest("["+s.PI+"]"))&&void 0!==e&&e.removeAttribute("contenteditable")},n.to=function(){var t=(this._ref.current&&this.eo.get(this._ref.current)||{}).op,e=null==t?void 0:t.attributes;return!!e&&(t=this.props.editor.getContentState().schema,(0,c.ky)(e,t))},n.getZoneIdByCurrentRef=function(){var t=null!==(t=this._rightZeroSpaceRef.current)&&void 0!==t?t:this._ref.current;return(null===(t=null===(t=null==t?void 0:t.closest("["+s.P9+"]"))||void 0===t?void 0:t.dataset)||void 0===t?void 0:t.zoneId)||""},n.getSelectionOfCurrentRef=function(){if(!this._rightZeroSpaceRef.current&&!this._ref.current)return null;var t=null!==(t=this._rightZeroSpaceRef.current)&&void 0!==t?t:this._ref.current,t=(0,u.Ve)(t,this.props.editor);return t||null},n.handleMouseDown=function(t){var e;!1===this.props.autoSelectOnClick||(e=this.getSelectionOfCurrentRef())&&(a.Xh.isAndroid&&this.props.editor.getStatus("isComposing")&&this.editor._correctCompositionIfNecessary(t),this.props.editor.selection.setSelection(e),this.props.editor.selection.updateBrowserSelection(!0))},n._handleMouseDown=function(t){this.handleMouseDown(t)},n.handleRef=function(t){t&&(this._ref.current=t)},n.handleRightZeroSpaceRef=function(t){t&&(this.props.forwardRef&&(this.props.forwardRef.current=t),this._rightZeroSpaceRef.current=t,this.ro(t))},n.handleLeftZeroSpaceRef=function(t){t&&(this._leftZeroSpaceRef.current=t)},n.no=function(t){t&&(this.to()?(t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.style.display="inline-block"):(t.style.position="",t.style.width="auto",t.style.height="auto",t.style.display="auto"))},n.render=function(){var t,e=this,n=Object.keys(this.props).reduce(function(t,n){return v.includes(n)||(n.startsWith("on")?t[n]=u.eb.includes((0,u.Le)(n))?void 0:e._handleSynthesisEvents:t[n]=e.props[n]),t},{});return a.Xh.ios&&(n.style=Object.assign({WebkitUserSelect:"none"},n.style)),d.createElement("span",(0,r.b)({},((t={})[s.Pk]=!0,t),{ref:this.oo}),d.createElement(p,{key:""+Math.random(),ref:this.handleLeftZeroSpaceRef}),d.createElement("span",(0,r.b)({},((t={})[s.eu]=" ".repeat(this._length),t),{contentEditable:!1,ref:this.handleRef,onMouseDown:this._handleMouseDown},n),this.props.children,this.props.disableDefaultSelected&&d.createElement(p,{ref:this.handleRightZeroSpaceRef})))},(0,r.a)([i.W],e.prototype,"handleDeleteKey",null),(0,r.a)([i.W],e.prototype,"_handleMouseDown",null),(0,r.a)([i.W],e.prototype,"handleRef",null),(0,r.a)([i.W],e.prototype,"handleRightZeroSpaceRef",null),(0,r.a)([i.W],e.prototype,"handleLeftZeroSpaceRef",null),e}(h.c),y=d.forwardRef(function(t,e){return d.createElement(g,(0,r.b)({},t,{forwardRef:e}))}),m=(0,f.eT)(y)},52236:function(t,e,n){"use strict";n.d(e,{eT:function(){return s},rU:function(){return o}});var r=n(194055),i=n(101199),o=i.createContext(null),s=function(t){return i.forwardRef(function(e,n){return i.createElement(o.Consumer,null,function(o){return o&&i.createElement(t,(0,r.b)({},e,{editor:o,ref:n}))})})}},818376:function(t,e,n){"use strict";n.d(e,{CL:function(){return f},ru:function(){return d},wo:function(){return h}});var r=n(194055),i=n(931173),o=n(734795);n(294484);var s=n(24453),a=n(959679),l=n(87456),u=n(101199),c=n(649146);function d(t,e,n,s){var l=this,c=(0,r.b)({},e.attributes||{}),d={op:e,lineState:t,attributes:c,insert:e.insert,domAttributes:{},children:n,class:s.class||"",lineClass:s.lineClass||"",style:s.style||{},key:"",index:s.index,zoneId:s.zoneId};return f({attributes:c,zoneId:s.zoneId,editor:s.editor}).forEach(function(t){var c,f,h,p;try{e.insert===o.Ed&&(null===(c=e.attributes)||void 0===c?void 0:c.enter)?t.renderLinefeed&&(p=t.renderLinefeed(d),d=(0,r.b)((0,r.b)({},d),{children:null!=p?p:n})):t.render&&(p=t.render(d),(0,u.isValidElement)(p)&&(0,a.l$)(n)&&null!==(h=null===(f=p.props)||void 0===f?void 0:f.className)&&void 0!==h&&h.includes(o.SX)&&l.props.editor.error({message:"plugin render failed! Objects are not valid as a React child: object info "+JSON.stringify({type:"symbol"==typeof n.type?Symbol.keyFor(n.type):n.type,ref:n.ref,className:n.props.className}),level:i.W.ERROR}),d=(0,r.b)((0,r.b)({},d),{children:null!=p?p:n}))}catch(e){s.editor.error({message:t.name+" plugin render failed! Index: "+s.index,level:i.W.ERROR})}}),{view:d.children,renderContext:d}}function f(t){var e=t.attributes,n=t.editor,r=t.zoneId,i=new Set;return Object.keys(e).forEach(function(t){""===e[t]||(t=n.pluginManager._matchPlugin({attributeKey:t,value:e[t],zoneId:r,attributes:e}))&&i.add(t)}),(0,c.iI)(Array.from(i),"render")}function h(t,e,n){for(var i,o=[],u=0,c=0;c=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,c(e))return{delete:t};var i={};return e.attributes&&(i.attributes=e.attributes),d(e)?i.retain=t:h(e)?i.insert=e.insert.substr(n,t):i.insert=e.insert,i},e.peek=function(){return this.ops[this.index]},e.peekLength=function(){return this.ops[this.index]?u(this.ops[this.index])-this.offset:1/0},e.peekType=function(){return this.ops[this.index]?v(this.ops[this.index]):i.HP.RETAIN},e.rest=function(){if(!this.hasNext())return[];if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)},t}();function l(t){return new a(t)}function u(t){if(c(t))return t.delete;if(d(t))return t.retain;if(h(t))return t.insert.length;if(p(t))return 1;throw Error("op is unknown")}function c(t){return"number"==typeof(null==t?void 0:t.delete)}function d(t){return"number"==typeof(null==t?void 0:t.retain)}function f(t){return h(t)||p(t)}function h(t){return"string"==typeof(null==t?void 0:t.insert)}function p(t){return"object"==typeof(null==t?void 0:t.insert)}function v(t){var e;if(c(t))return i.HP.DELETE;if(d(t))return i.HP.RETAIN;if(h(e=t)||p(e))return i.HP.INSERT;throw Error("op is unknown")}var g=function(){function t(t,e){void 0===t&&(t={}),(e=null!=e?e:Object.keys(t).some(function(e){return t[e]instanceof I||!1}))?this._deltas=t:this._deltas=Object.keys(t).reduce(function(e,n){return e[n]=C(t[n]),e},{})}var e=t.prototype;return Object.defineProperty(e,"deltas",{get:function(){return this._deltas},enumerable:!1,configurable:!0}),e.get=function(t){return this._deltas[t]},e.compose=function(t,e,n){return void 0===e&&(e=!0),void 0===n&&(n=!0),this._call("compose",t,{keepEmptyAttributes:e,immutable:n})},e.concat=function(t){return this._call("concat",t)},e.invert=function(e){var n=new t;if(m(e))n=new t().add(e.zoneId,e);else if(b(e))n=e;else throw Error("DeltaSet invert data is wrong");return this.reduce(function(t,e){var r=n.get(e.zoneId)||e.create({zoneId:e.zoneId}),i=e.invert(r);return t.compose(i)},new t)},e.transform=function(e,n){var r=this;if(void 0===n&&(n=!1),m(e))return e.zoneId in this.deltas?this.deltas[e.zoneId].transform(e,n):e;if(b(e))return new t(e.reduce(function(t,e){return t[e.zoneId]=r.transform(e,n),t},{}));throw Error("DeltaSet call data is wrong")},e.delete=function(t){return delete this._deltas[t],this},e.add=function(t,e){if(m(t)){var n=t.zoneId;this._deltas[n]=t}else{if(!e)return this;var n=t;if(e.zoneId!==n)return this;this._deltas[n]=e}return this},e.replace=function(t,e){return this.delete(t).add(e.zoneId,e),this},e._call=function(e,n,r){if(m(n))return this._callDeltaFunc(e,n,r);if(b(n)){var i=new t(this.deltas);return n.forEach(function(t){i=i._callDeltaFunc(e,t,r)}),i}throw Error("DeltaSet call: data: "+n+" is not Delta or DeltaSet")},e._callDeltaFunc=function(e,n,i){var o=Object.assign({keepEmptyAttributes:!0,immutable:!0},i),s=n.zoneId,a=o.immutable?(0,r.a)({},this.deltas):this.deltas;if(this.deltas[s])a[s]=this.deltas[s][e](n,o.keepEmptyAttributes);else{var l=n.zoneType;a[s]=n.create({zoneId:s,zoneType:l})[e](n,o.keepEmptyAttributes)}return new t(a,!0)},e.reduce=function(t,e){var n=this;return Object.keys(this._deltas).map(function(t){return n._deltas[t]}).reduce(t,e)},e.forEach=function(t){var e,n;try{for(var i=(0,r.b)(Object.entries(this._deltas)),o=i.next();!o.done;o=i.next()){var s=(0,r._)(o.value,2),a=s[0],l=s[1];t(l,a)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},t}();function y(t){return t.insert===i.F5&&t.attributes&&t.attributes.lmkr}function m(t){return Object.values(i.Ak).includes(t.zoneType)}function b(t){return void 0!==t.deltas}function E(t){var e;return!t||(null===(e=null==t?void 0:t.ops)||void 0===e?void 0:e.length)===0}function S(t){if(!t)return!0;var e=t.deltas,n=Object.keys(e);return 0===n.length||!n.some(function(t){return!E(e[t])})}var I=function(){function t(){this.ops=[]}var e=t.prototype;return t.registerCreator=function(e,n){t.creators.set(e,n)},t.getCreator=function(e){return t.creators.get(e)},e.insert=function(t,e,n){if(void 0===n&&(n=!0),"string"==typeof t&&0===t.length)return this;var r={insert:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(r.attributes=s(e,n)),this.push(r)},e.delete=function(t){return t<=0?this:this.push({delete:t})},e.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=s(e)),this.push(n)},e.forEach=function(t){this.ops.forEach(t)},e.eachLine=function(t,e){void 0===e&&(e=i.K5);for(var n=l(this.ops),r=0,o={},s=[];n.hasNext();){if(n.peekType()!==i.HP.INSERT)return;var a=n.peek();y(a)&&(o=a.attributes||{});var c=u(a)-n.peekLength(),d="string"==typeof a.insert?a.insert.indexOf(e,c)-c:-1;if(d<0)s.push(n.next());else{if(s.push(n.next(d+1)),!1===t(this.create({zoneId:this.zoneId,ops:s}),o,r))return;s=[],o={},r+=1}}var f=this.create({zoneId:this.zoneId,ops:s});f.length()>0&&t(f,o,r)},e.push=function(t){if(c(t)&&t.delete<=0||d(t)&&t.retain<=0||h(t)&&0===t.insert.length)return this;var e,n,i=this.ops.length,s=this.ops[i-1];if(e=t,n=(0,r.a)({},e),e.attributes&&(n.attributes=(0,r.a)({},e.attributes)),t=n,"object"==typeof s){if(c(t)&&c(s))return this.ops[i-1]={delete:s.delete+t.delete},this;if((0,o.X)(t.attributes,s.attributes)){if(h(t)&&h(s))return this.ops[i-1]={insert:s.insert+t.insert},"object"==typeof t.attributes&&(this.ops[i-1].attributes=t.attributes),this;if(d(t)&&d(s))return this.ops[i-1]={retain:s.retain+t.retain},"object"==typeof t.attributes&&(this.ops[i-1].attributes=t.attributes),this}}return i===this.ops.length?this.ops.push(t):this.ops.splice(i,0,t),this},e.compose=function(t,e){if(void 0===e&&(e=!0),!1===e){var n=t.zoneId,a=t.zoneType;t=t.reduce(function(t,n){return n.insert&&n.attributes&&(n.attributes=s(n.attributes,e)),t.push(n),t},this.create({zoneId:n,zoneType:a}))}var u=l(this.ops),f=l(t.ops),p=[],v=f.peek();if(null!=v&&d(v)&&null==v.attributes){for(var g=v.retain;u.peekType()===i.HP.INSERT&&u.peekLength()<=g;)g-=u.peekLength(),p.push(u.next());v.retain-g>0&&f.next(v.retain-g)}for(var y=this.create({zoneId:this.zoneId,zoneType:this.zoneType,ops:p});u.hasNext()||f.hasNext();)if(f.peekType()===i.HP.INSERT)y.push(f.next());else if(u.peekType()===i.HP.DELETE)y.push(u.next());else{var m=Math.min(u.peekLength(),f.peekLength()),b=u.next(m),E=f.next(m);if(c(E)&&h(b));else if(c(E)&&d(b))y.push(E);else if(d(E)){var S={};d(b)?S.retain=m:S.insert=b.insert;var I=function(t,e,n){void 0===t&&(t={}),void 0===e&&(e={}),"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var i=(0,r.a)({},e);for(var o in!n&&(i=Object.keys(i).reduce(function(t,e){return null!==i[e]&&""!==i[e]&&(t[e]=i[e]),t},{})),t)void 0!==t[o]&&void 0===e[o]&&(i[o]=t[o]);return Object.keys(i).length>0?i:void 0}(b.attributes,E.attributes,e);if(I&&(S.attributes=I),y.push(S),!f.hasNext()&&(0,o.X)(y.ops[y.ops.length-1],S)){var C=this.create({zoneId:this.zoneId,zoneType:this.zoneType,ops:u.rest()});return y.concat(C).chop()}}}return y.chop()},e.concat=function(t){var e=this.create({zoneId:this.zoneId,zoneType:this.zoneType,ops:this.ops.slice()});return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},e.length=function(){return this.reduce(function(t,e){return t+u(e)},0)},e.reduce=function(t,e){return this.ops.reduce(t,e)},e.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},e.transform=function(t,e){if(void 0===e&&(e=!1),e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=l(this.ops),r=l(t.ops),o=this.create({zoneId:this.zoneId,zoneType:this.zoneType});n.hasNext()||r.hasNext();)if(n.peekType()===i.HP.INSERT&&(e||r.peekType()!==i.HP.INSERT))o.retain(u(n.next()));else if(r.peekType()===i.HP.INSERT)o.push(r.next());else{var s=Math.min(n.peekLength(),r.peekLength()),a=n.next(s),d=r.next(s);if(c(a))continue;c(d)?o.push(d):o.retain(s,function(t,e,n){if(void 0===t&&(t={}),void 0===e&&(e={}),void 0===n&&(n=!1),"object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce(function(n,r){return void 0===t[r]&&(n[r]=e[r]),n},{});return Object.keys(r).length>0?r:void 0}}(a.attributes,d.attributes,e))}return o.chop()},e.transformPosition=function(t,e){void 0===e&&(e=!1),e=!!e;for(var n=l(this.ops),r=0;n.hasNext()&&r<=t;){var i=n.peekLength(),o=n.peekType();if(n.next(),"delete"===o){t-=Math.min(i,t-r);continue}"insert"===o&&(r=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}},464675:function(t,e,n){"use strict";n.d(e,{I:function(){return s}});var r=n("16168"),i=n("639142");n("882559");var o=n("481685"),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}(0,r.c)(e,t);var n=e.prototype;return n.create=function(t){return t.zoneType=t.zoneType||this.zoneType,new e(t)},n.insert=function(e,n){return t.prototype.insert.call(this,e,n,!1)},n.insertLineMarker=function(t){void 0===t&&(t={});var e=Object.assign({lmkr:1},t);return this.insert(i.F5,e),this},n.insertEnterAndLineMarker=function(t){this.insert(i.K5,t&&t.enterAttributes?t.enterAttributes:{});var e=Object.assign({lmkr:1},t&&t.lineAttributes?t.lineAttributes:{});return this.insert(i.F5,e),this},e}(function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;n.ops=[];var r=e.zoneId,o=e.ops;return n.zoneId=r||"0",n.zoneType=i.Ak.Content,o&&o.length>0&&(n.ops=o),n}(0,r.c)(e,t);var n=e.prototype;return n.create=function(t){return t.zoneType=t.zoneType||this.zoneType,new e(t)},n.insertEnter=function(t){return void 0===t&&(t={}),this.insert(i.K5,t),this},n.insertEnterAndLineMarker=function(t){return this},n.insertLineMarker=function(t){return this},e}(o.B));o.B.registerCreator(i.Ak.Content,s)},125270:function(t,e,n){"use strict";n.d(e,{Z:function(){return a},a:function(){return l}});var r=n(159751),i=n(455793);n(101199),n(890710);var o=n(777767),s=n(959679);function a(t,e,n,a){if(!n)return;var l,u,c,d,f,h=(a||{}).PluginContextProvider;h&&(0,i.RM)(h),(0,i.aZ)("DOM"),i.L3.length=0;var p=(0,s.az)(t,e);if(h&&(0,i.RM)(null),!!p){Array.isArray(p)?n.append.apply(n,(0,r.d)(p)):n.append(p);for(var v=[];i.L3.length;){var g=(0,r.b)(null!==(l=i.L3.shift())&&void 0!==l?l:[],3),y=g[0],m=g[1],b=g[2];if(!(!b&&Array.isArray(m))){if((0,o.AL)(b))for(var E=0;E0){var n=e[t-1],r=h.L3.findIndex(function(t){var e=t[1];return Array.isArray(e)?e[e.length-1]===n:e===n});return r<0?Math.max(h.L3.length-1,0):r+1}for(var i=null,o=t+1;o0)try{for(var w=(0,r.a)(Object.keys(p)),x=w.next();!x.done;x=w.next()){var L=x.value,_=p[L];try{t.addEventListener(L,_)}catch(t){throw Error("[DOM-renderer]: addEventListener failed, eventName: "+L+", handler: "+_+", msg: "+t.message)}}}catch(t){o={error:t}}finally{try{x&&!x.done&&(s=w.return)&&s.call(w)}finally{if(o)throw o.error}}if(v)try{for(var T=(0,r.a)(Object.entries(v)),A=T.next();!A.done;A=T.next()){var M=(0,r.b)(A.value,2),k=M[0],N=M[1];t.dataset[k]=""+N}}catch(t){a={error:t}}finally{try{A&&!A.done&&(l=T.return)&&l.call(T)}finally{if(a)throw a.error}}if(g){var R="";try{for(var O=(0,r.a)(Object.entries(g)),D=O.next();!D.done;D=O.next()){var z=(0,r.b)(D.value,2),k=z[0],N=z[1],P=k.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}),Z="number"==typeof N?N+"px":N;R+=P+":"+Z+";"}}catch(t){u={error:t}}finally{try{D&&!D.done&&(c=O.return)&&c.call(O)}finally{if(u)throw u.error}}R&&t.setAttribute("style",R)}y&&t.setAttribute("class",y);try{for(var W=(0,r.a)(Object.keys(m)),K=W.next();!K.done;K=W.next()){var U=K.value;t.setAttribute(U,e[U])}}catch(t){d={error:t}}finally{try{K&&!K.done&&(f=W.return)&&f.call(W)}finally{if(d)throw d.error}}return t}},128168:function(t,e,n){"use strict";function r(t){return t.split(";").reduce(function(t,e){if(!e.trim())return t;var n=e.split(":");return t[n[0].trim().toLowerCase().replace(/([-][a-z])/g,function(t){return t.toUpperCase().replace("-","")})]=n[1].trim(),t},{})}function i(t,e,n){"-"===e[0]?t.setProperty(e,n):null===n?t[e]="":"number"!=typeof n?t[e]=n:t[e]=n+"px"}n.d(e,{A:function(){return i},R:function(){return r}})},682647:function(t,e,n){"use strict";n.d(e,{p:function(){return p}});var r=n(144847),i=n(162114),o=n(649146),s=n(386308),a=n(283138),l=n(651271),u=n(464675),c=n(754209),d=n(323145);function f(){return{paddingLeft:"12px",color:"var(--text-caption, "+d.mg+")",borderLeft:"2px solid var(--udtoken-quote-bar-bg, "+d.xS+")"}}var h=a.ZP.createElement(l.D,{style:f(),className:"blockquote"}),p=function(t){function e(n){var r=n.editor,i=t.call(this)||this;return i.name="Blockquote",r.registerCommand(e.KEY,function(t){var n=t.value;(0,c.B)(r,e.KEY,n,!0)}),i}(0,r.d)(e,t);var n=e.prototype;return n.renderWrapper=function(){return h},n.match=function(t){return t===e.KEY},n.editorWillDoReturnKey=function(t){var n=t.delta,r=t.editor,i=r.getContentState().getActiveZone(),o=i.getZoneId(),s=r.selection.getSelection(),a=s.toPosition(),l=a.start,c=a.len,d=i.getLine(s.start.line);if(!!d){var f=d.getLineAttributes().toMap(),h=d.isTextEmpty();if(!n.ops.length&&f[e.KEY]&&!c){var p=new u.I({zoneId:o});h?(f.blockquote="",p.retain(l-1).retain(1,f)):p.retain(l).insertEnter().insertLineMarker(f),t.delta=n.compose(p)}}},n.editorWillDoDeleteKey=function(t){var n=t.deltaSet,r=t.editor,i=r.getContentState().getActiveZone(),o=i.getZoneId(),s=r.selection.getSelection(),a=i.getLine(s.start.line);if(!!a){var l=a.getLineAttributes().toMap(),c=s.toPosition(),d=c.start,f=c.len,h=1===s.start.offset;if(!n.get(o).ops.length&&l[e.KEY]&&h&&!f){l[e.KEY]="";var p=new u.I({zoneId:o}).retain(d-1).retain(1,l);t.deltaSet=n.compose(p)}}},n.serialize=function(t){return(0,i.i)(t,{tagAttribute:e.KEY,wrapNodesInfo:[{tag:e.KEY,style:(0,r.g)((0,r.g)({},f()),{margin:"0px",paddingLeft:"0px",color:d.mg,borderLeft:"2px solid "+d.xS})}]})},n.deserialize=function(t){var n=t.node,r=t.deltaSet,o=t.zoneId;if(n instanceof HTMLElement){var s=n.className,a=n.tagName;if(s.indexOf(e.KEY)>-1||"BLOCKQUOTE"===a)return(0,i.e)(r,o,{blockquote:"true"})}return r},e.KEY="blockquote",e.isFormatter=!0,e.isLineAttribute=!0,(0,r.e)([(0,o.gv)(1003)],e.prototype,"serialize",null),e}(s.S)},440050:function(t,e,n){"use strict";n.d(e,{d:function(){return d}});var r=n("144847"),i=n("559016"),o=n("162114"),s=n("650054");n("399884"),n("707574");var a=n("386308"),l=n("811492"),u=function(t){function e(e){var n=e.editor,r=t.call(this)||this;return r.name="Bold",r.editor=n,r}(0,r.d)(e,t);var n=e.prototype;return n.match=function(t){return t===e.KEY},n.render=function(t){var e=t.children;return t.style.fontWeight="bold",e},e.KEY="bold",(0,r.e)([l.P],e.prototype,"render",null),e}(a.S),c=function(t){var e=t.tagName,n=t.getAttribute("style")||"";return"B"===e||"STRONG"===e||/\bfont-weight:\s*bold\b/i.test(n)},d=function(t){function e(n){var r=t.call(this,n)||this;r.handleInput=function(t){"formatBold"===t.inputType&&(t.preventEvent(),t.preventDefault(),t.stopEvent(),r.editor.toggleAttribute(e.KEY))};var o=r.editor;return o.registerCommand(e.KEY,function(){o.toggleAttribute(e.KEY)}),o.on(i.r.INPUT,r.handleInput),r}(0,r.d)(e,t);var n=e.prototype;return n.deserialize=function(t){var e=t.node,n=t.deltaSet,r=t.zoneId;return e&&e instanceof HTMLElement&&c(e)?(0,o.d)(n,r,{bold:"true"},!1):n},n.serialize=function(t){return(0,o.w)(t,{tagAttribute:"bold",wrapTag:s.c5.bold})},e}(u)},518514:function(t,e,n){"use strict";n.d(e,{C:function(){return S}});var r=n("144847"),i=n("495907"),o=n("386308"),s=n("430970"),a=n("811492");n("399884"),n("707574");var l=n("101199"),u=/\\begin\n*\{(equation|split|align|gather|alignat|CD)\}|\\tag/,c=n("651419"),d=n("559016"),f=n("333475"),h=n("809919"),p=n("236836"),v=n("52236"),g=n("689057"),y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handleKeyDown=function(t){if(e.props.onKeyDown)return e.props.onKeyDown(t);var n=t.keyCode,r=!1;switch(n){case g.VD.Left:case g.VD.Right:case g.VD.Up:case g.VD.Down:r=e._handleArrowKey(t)}r&&(t.stopEvent(),t.stopPropagation(),t.preventDefault(),t.preventEvent())},e._handleArrowKey=function(t){if(t.shiftKey)return!1;var n,r,i,o,s=e.editor.selection.getSelection().toPosition(),a=e.getSelectionOfCurrentRef();if(!a)return!1;var l=a.toPosition();return!(s.zoneId!==l.zoneId||!s.isCollapsed()||e.isFocusOnMe())&&(t.keyCode===g.VD.Left&&s.start===l.start+l.len?(e.editor.selection.setSelection(a,!0),null===(r=(n=e.props).onCursorMoveIn)||void 0===r||r.call(n),!0):t.keyCode===g.VD.Right&&s.start===l.start&&(e.editor.selection.setSelection(a,!0),null===(o=(i=e.props).onCursorMoveIn)||void 0===o||o.call(i),!0))},e._handleEditorSelectionChange=function(){var t,n,r,i,o,s,a=e.getSelectionOfCurrentRef();if(!a)return;var l=e.editor.selection.getSelection(a.start.zoneId),u=!l||!e._prevSel&&l.isCollapsed()||(null===(t=e._prevSel)||void 0===t?void 0:t.isCollapsed())&&l.isCollapsed();if(e._prevSel=l,u)return;var c=e.editor.getContentState().getEntities(a);if(!!(null===(n=null==c?void 0:c[0])||void 0===n?void 0:n.attributes.equation)){var d=l.start,f=l.end,h=a.start,p=a.end,v=d.zoneId===h.zoneId&&d<=h&&f>=p;v?(e._selected=!0,null===(i=(r=e.props).onSelect)||void 0===i||i.call(r)):!v&&(e._selected=!1,null===(s=(o=e.props).onDeselect)||void 0===s||s.call(o))}},e}(0,r.d)(e,t);var n=e.prototype;return n.componentDidMount=function(){t.prototype.componentDidMount.call(this),this.editor.on(d.r.SELECTION_CHANGE,this._handleEditorSelectionChange)},n.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this),this.editor.off(d.r.SELECTION_CHANGE,this._handleEditorSelectionChange)},e}(p.T),m=l.forwardRef(function(t,e){var n=(0,l.useContext)(v.rU);return n&&l.createElement(y,(0,r.g)({},t,{forwardRef:e,editor:n}))}),b=function(){for(var t=[],e=0;eo)&&O()}},[e,O,D]),P=(0,l.useCallback)(function(t){if(t===S)return;var n=e.getContentState(),r=D();if(!!r){var i=n.getAttributes(r.start,r.end).toMap().objectID;"string"!=typeof i&&(i=(0,h.D)(8)),n.setAttributes(r,{objectID:i,equation:t})}},[e,S,D]),Z=(0,l.useCallback)(function(t){P(t),I(t)},[P]),W=(0,l.useMemo)(function(){return g({containerEditor:e,objectID:o,zoneId:s,lineState:a,isEditMode:L&&_,displayMode:p,equation:S,mountNode:v,getEquationRange:D,onEquationChange:Z,onIsEditModeChange:L?z:null,onIsSelectedChange:N})},[e,o,s,a,p,v,L,S,_,D,Z,g,z,N]),K=(0,l.useCallback)(function(t){w(t.current)},[]);return(0,l.useEffect)(function(){return e.on(d.r.EDITABLE_CHANGE,K),function(){e.off(d.r.EDITABLE_CHANGE,K)}},[e,K]),l.createElement(m,{isEditMode:_,onCursorMoveIn:function(){T(!0)},onSelect:R,onDeselect:O,length:n,autoSelectOnClick:!1},l.createElement("div",{ref:y,className:b("editor-kit-equation-block",{"editor-kit-equation-block-selected":M||_,editable:L}),style:{width:p===i.v.block?"100%":"auto"}},W))},S=function(t){function e(e){var n=e.editor,i=e.getPopupContainer,o=e.renderEquationContent,s=t.call(this)||this;return s.name="Equation",s._editor=n,s._renderEquationContent=function(t){return o((0,r.g)((0,r.g)({},t),{containerEditor:s._editor}))},s._getPopupContainer=i,s._initPopupWrapperIfNotExist(),s}(0,r.d)(e,t);var n=e.prototype;return n.editorCollectText=function(t){var e=t.attributes.equation;return"string"!=typeof e?"":"$$"+e+"$$"},n.serialize=function(t){return t},n.deserialize=function(t){return t.deltaSet},n.match=function(t){return t===e.KEY},n.render=function(t){var n,r=t.attributes,o=t.children,s=t.index,a=t.lineState,c=t.op,d=r.equation,f=r.objectID;if("string"!=typeof d)return o;if(!t.key){if("string"==typeof f)t.key=f;else{var h=a.getOps().indexOf(c);t.key="equation-line-"+s+"-op-"+h}}var p=(n=d,u.test(n))?i.v.block:i.v.inline;return t.class+=" equation-leaf equation-display-"+p,l.createElement(E,{editor:this._editor,length:t.insert.length,objectID:f,zoneId:t.zoneId,lineState:t.lineState,defaultEquation:d,displayMode:p,popoverContainer:e.popupWrapper,renderEquationContent:this._renderEquationContent})},n._initPopupWrapperIfNotExist=function(){var t;(!e.popupWrapper||!document.contains(e.popupWrapper))&&(e.popupWrapper=document.createElement("div"),e.popupWrapper.className="editor-kit-equation-popover-wrapper",((null===(t=this._getPopupContainer)||void 0===t?void 0:t.call(this))||document.body).appendChild(e.popupWrapper))},e.KEY="equation",(0,r.e)([a.P,(0,s.x)()],e.prototype,"render",null),e}(o.S)},988957:function(t,e,n){"use strict";n.d(e,{Ec:function(){return i},Er:function(){return a},Wd:function(){return s},uc:function(){return o}});var r,i,o=4,s=20,a=["tl","tr","br","bl"];(r=i||(i={})).WRAPPER="image-wrapper",r.CONTAINER="image-container"},494315:function(t,e,n){"use strict";n.d(e,{E:function(){return E}});var r=n("144847"),i=n("85359"),o=n("559016"),s=n("993137"),a=n("649146"),l=n("386308"),u=n("430970"),c=n("464675");n("399884"),n("707574");var d=n("985189"),f=n("101199"),h=n("441642"),p=n("651419"),v=n("515979"),g=n("988957"),y=function(){function t(t){var e=this;this.editor=t,this.canDrag=!1,this.pointX=0,this.pointY=0,this.pageX=0,this.pageY=0,this.diffX=0,this.diffY=0,this.body=document.body,this.isMoved=!1,this.oriScrollTop=0,this.events=new Map,this.bind=function(){document.addEventListener("mousemove",e.handleMouseMove),document.addEventListener("mousedown",e.handleMouseDown),document.addEventListener("mouseup",e.handleMouseUp),e.editor.once(o.r.PAINT,e.bindScrollEvent)},this.bindScrollEvent=function(){var t=e.editor.getScrollContainer();if(!!t)t.addEventListener("scroll",e.handleScroll)},this.isSameInstance=function(t){return e.editor.getContainer().contains(t)},this.handleMouseDown=function(t){if(!(t.target instanceof HTMLElement)||!e.editor.isEditable()||!e.isSameInstance(t.target)||!(null===(o=t.target)||void 0===o?void 0:o.classList.contains("point")))return;var n,i,o,s,a,l=e.editor.getScrollContainer(),u=null===(s=t.target.closest(".image-wrapper"))||void 0===s?void 0:s.querySelector("img");if(!u)return;if(e.image=u,!e.image.closest(".unresize")){var c=e.image.closest(".ace-line");e.oriScrollTop=null!==(a=null==l?void 0:l.scrollTop)&&void 0!==a?a:0,e.resizeImageLineKey=null,e.direction=t.target.getAttribute("data-direction"),e.imageWidth=e.image.clientWidth,e.imageHeight=e.image.clientHeight,e.imageMaxWidth=c.clientWidth,e.imageMaxWidth=e.imageMaxWidth&&e.imageMaxWidth-g.uc,e.uuid=e.image.getAttribute("data-uuid"),e.canDrag=!0,e.pointX=t.pageX,e.pointY=t.pageY,e.alignment="left";try{for(var d=(0,r.c)([["align-left","left"],["align-center","center"],["align-right","right"]]),f=d.next();!f.done;f=d.next()){var h=(0,r.a)(f.value,2),p=h[0],v=h[1];c.classList.contains(p)&&(e.alignment=v)}}catch(t){n={error:t}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return e.direction&&["tl","br"].includes(e.direction)?e.body.classList.add("keep-nwse-cursor"):e.direction&&["tr","bl"].includes(e.direction)&&e.body.classList.add("keep-nesw-cursor"),t.preventDefault(),!1}},this.applyDynamicResize=function(t){var n=t.pageX,r=t.pageY,i=t.target,o=t.scrollTop;if(!!e.direction&&!!e.imageWidth&&!!e.uuid&&!!e.alignment&&!!e.imageHeight&&!!e.imageMaxWidth){var s=o-e.oriScrollTop;e.diffX=n-e.pointX,e.diffY=r-e.pointY+s,e.isMoved=!0;var a={width:e.imageWidth,height:e.imageHeight},l={x:e.diffX,y:e.diffY};(0,h.jB)({direction:e.direction,alignment:e.alignment,imageSize:a,moveVector:l,imageMaxWidth:e.imageMaxWidth,uuid:e.uuid});var u=i;if(!e.resizeImageLineKey){for(;u&&u!==document.body&&!(u.id&&/magicdomid/.test(u.id));){;u=u.parentElement}e.resizeImageLineKey=i&&i.id}}},this.handleScroll=(0,v.Z)(function(t){var n,r=t.target;if(!!r&&!!e.canDrag&&!!e.pageX&&!!e.pageY&&!!e.isSameInstance(r)){var i=e.editor.getScrollContainer();e.applyDynamicResize({pageX:e.pageX,pageY:e.pageY,target:r,scrollTop:null!==(n=null==i?void 0:i.scrollTop)&&void 0!==n?n:0})}},16),this.handleMouseMove=(0,v.Z)(function(t){var n,r=t.target;if(!!r&&!!e.canDrag&&!!e.isSameInstance(r)){var i=e.editor.getScrollContainer();e.pageX=t.pageX,e.pageY=t.pageY,e.applyDynamicResize({pageX:e.pageX,pageY:e.pageY,target:r,scrollTop:null!==(n=null==i?void 0:i.scrollTop)&&void 0!==n?n:0})}},16),this.handleMouseUp=function(){e.resizeImageLineKey=null,e.canDrag=!1,e.isMoved&&e.uuid&&(e.body.classList.remove("keep-nwse-cursor"),e.body.classList.remove("keep-nesw-cursor"),e.handleResize()),e.isMoved=!1},this.clearTempStyle=function(){if(!!e.uuid){var t,n=document.querySelector("#"+(0,h.tf)(e.uuid));null===(t=null==n?void 0:n.parentNode)||void 0===t||t.removeChild(n)}}}var e=t.prototype;return e.unbind=function(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mousedown",this.handleMouseDown),document.removeEventListener("mouseup",this.handleMouseUp);var t=this.editor.getScrollContainer();t&&t.removeEventListener("scroll",this.handleScroll),this.events.clear()},e.handleResize=function(){if(!this.uuid)return;var t,e,n=this.editor.getContainer().querySelector((0,h.MO)(this.uuid));if(!n)return;var i=(0,p.Ve)(n,this.editor);if(!i)return;var s=n.clientWidth,a=i.start.zoneId,l=this.editor.getContentState().getZoneState(a);if(!l)return;var u=l.getEntities(i);if(!!u.length){var c=this.events.get("resize");if(null==c?void 0:c.length)try{for(var d=(0,r.c)(c),f=d.next();!f.done;f=d.next())(0,f.value)((0,r.g)((0,r.g)({},u[0]),{attributes:(0,r.g)((0,r.g)({},u[0].attributes),{width:s})}))}catch(e){t={error:e}}finally{try{f&&!f.done&&(e=d.return)&&e.call(d)}finally{if(t)throw t.error}}this.editor.once(o.r.PAINT,this.clearTempStyle)}},e.onResize=function(t){var e=this.events.get("resize")||[];e.push(t),this.events.set("resize",e)},t}(),m=n("236836"),b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={selected:!1},e.handleSelect=function(){e.setState({selected:!0})},e.handleDeSelect=function(){e.setState({selected:!1})},e}(0,r.d)(e,t);var n=e.prototype;return n.componentDidUpdate=function(){var t,e,n=this.props,r=n.editor,i=n.lineState;if(!r||!i)return;var o=i.getZoneId(),s=null===(t=r.virtualListManager)||void 0===t?void 0:t.getVirtualListModuleOfZone(o);if(!!(null==s?void 0:s.isEnabled)){var a=null===(e=i.getNode())||void 0===e?void 0:e.querySelector("img");a&&!a.complete&&a.addEventListener("load",function(){s.notifyInnerNodeLayoutUpdate(i)},{once:!0})}},n.render=function(){var t=this.props,e=t.uuid,n=t.src,r=t.alt,i=t.width,o=t.height,s=!1===t.resizeable?"unresize":"";return(0,f.createElement)(m.Z,{key:e,onSelect:this.handleSelect,onDeselect:this.handleDeSelect,className:g.Ec.CONTAINER+" "+s,disableDefaultSelected:!0},(0,f.createElement)("span",{className:g.Ec.WRAPPER+" "+(this.state.selected?"selected":"")},g.Er.map(function(t){return(0,f.createElement)("span",{key:t,className:"point "+t+" n-icon-dragable","data-direction":t})}),(0,f.createElement)("img",{style:{width:i?i+"px":"100%",height:o?o+"px":"100%"},src:(n||"").replace(/"/g,"""),"data-uuid":e,"data-resizeable":s,alt:r})))},e}(f.Component),E=function(t){function e(n){var s=t.call(this)||this;s.name="Image",s.uploadInput=(0,h.pp)(),s.canResetSelection=!0,s.handleUploadImage=function(){s.uploadInput.click()},s.handleInputChange=function(t){if(!t.target)return;var e=t.target,n=e.files;if(!n||!!(0,h.XR)(n)){if(n){var r=s.editor.selection.getSelection().toPosition();s.insertImage(r,n)}e.value=""}},s.handleKeyDown=function(t){if(i.Xh.mobile&&"Backspace"===t.key){var e=s.editor,n=e.selection.getSelection();if(n.isCollapsed()){var r=n.start.line-1,o=s.editor.getContentState().getActiveZone().getLine(r);if(o&&(0,h.VB)(o)&&0===n.start.offset){var a=o.getOffset(),l=a.start,u=a.end,d=new c.I({zoneId:o.getZoneId()}).retain(l).delete(u-l);e.getContentState().apply(d),t.preventDefault(),t.preventEvent(),t.stopEvent()}}}},s.handleSelectionChange=function(t){if(!!s.canResetSelection){var e=t.current,n=e.start,r=e.end;if(n.line!==r.line){var i=(0,h.uf)(e,s.editor),o=i.start,a=i.end;if(!o&&!a)return;s.fixSelectionOnImageLine(i,e,s.editor)}}},s.fixSelectionOnImageLine=function(t,e,n){if(!s.canResetSelection)return;s.canResetSelection=!1;var r=e.start,i=e.end,o=e.isBackward,a=r.zoneId,l=t.start,u=t.end,c=n.getContentState().getZoneState(a),d=c.getLine(r.line),f=c.getLine(i.line),h=r,p=i,v=!1;if(d&&l&&(h={line:r.line,offset:0,zoneId:a},v=!0),f&&u&&(p={line:i.line,offset:f.length()-1,zoneId:a},v=!0),!!v)n.selection.setSelection({start:h,end:p,isBackward:o}),n.selection.updateBrowserSelection(!0),s.canResetSelection=!0},s.updateImageAttributes=function(t){var n,i,o=t.start,a=t.end,l=s.editor.getContentState(),u=l.getZoneState(o.zoneId);if(!u)return;var d=u.pointToOffset(o),f=u.pointToOffset(a);if(null!==d&&null!==f){var h=(0,r.g)((0,r.g)((0,r.g)({},s.oldDataToNewData(t.attributes)),t.attributes),((n={})[e.KEY]="true",n)),p=Object.keys(h).reduce(function(t,e){return t[e]=h[e].toString(),t},{}),v=new c.I({zoneId:o.zoneId}).retain(d).retain(f-d,(0,r.g)(((i={})[e.KEY]="true",i),p));l.apply(v)}},s.deserialize=function(t){var n,r,i=t.node,o=t.deltaSet,s=t.zoneId;return(null===(r=null==i?void 0:i.tagName)||void 0===r?void 0:r.toUpperCase())==="IMG"?o.concat(new c.I({zoneId:s}).insert(" ",((n={alt:i.getAttribute("alt")||""})[e.KEY]="true",n.src=i.getAttribute("src")||"",n.uuid=(0,h.xo)(),n.width=i.getAttribute("width")||"",n))):o},s.options=n;var a=n.editor;return s.editor=a,s.event=new y(s.editor),s.event.bind(),s.uploadInput.addEventListener("change",s.handleInputChange),s.event.onResize(s.updateImageAttributes),a.registerCommand(e.KEY,s.handleUploadImage),a.on(o.r.PASTE,s.handlePaste),a.on(o.r.KEYDOWN,s.handleKeyDown),a.on(o.r.SELECTION_CHANGE,s.handleSelectionChange),s}(0,r.d)(e,t);var n=e.prototype;return n.match=function(t){return t===e.KEY},n.handlePaste=function(t){if(!(0,h.$p)(t.nativeEvent))return;var e,n=null===(e=t.nativeEvent.clipboardData)||void 0===e?void 0:e.files;if(!!(null==n?void 0:n.length)){var r=this.editor.selection.getSelection().toPosition();this.insertImage(r,n)}},n.insertImage=function(t,n){if(this.options.onInsertImage){this.options.onInsertImage(t,n);return}var i,o,s=this.editor.getContentState(),a=t.zoneId,l=t.len,u=t.start,d=t.toRange().start.line,f=s.getActiveZone().getLine(d);if(!!f){var p=0!==d&&f.isEmpty(),v=new c.I({zoneId:a}).retain(u).delete(l);p||v.insertEnter();try{for(var g=(0,r.c)(Array.from(n)),y=g.next();!y.done;y=g.next()){var m=y.value;!function(t){var n,i={uuid:(0,h.xo)(),src:window.URL.createObjectURL(t)},o=Object.keys(i).reduce(function(t,e){return t[e]=i[e].toString(),t},{});v.insert(" ",(0,r.g)(((n={})[e.KEY]="true",n),o)).insertEnter()}(m)}}catch(t){i={error:t}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}s.apply(v)}},n.editorWillCopy=function(t){(0,h.tZ)(t.deltaSet)},n.editorWillPaste=function(t){var e,n=t.deltaSet,r=t.zoneId;(0,h.tZ)(n);var i=n.deltas,o=i[0].ops[i[0].ops.length-1];if(!!(null===(e=null==o?void 0:o.attributes)||void 0===e?void 0:e.image)){var s=new c.I({zoneId:r}).insertEnter();t.deltaSet=n.concat(s)}},n.serialize=function(t){var n,i,o=t.node,a=t.op,l=t.type;if(!(null==a?void 0:a.attributes))return t;var u=this.oldDataToNewData(a.attributes);if((null==u?void 0:u[e.KEY])&&l===s.T.LEAF){var c=new DOMParser().parseFromString("","text/html").querySelector("img");c.setAttribute("src",u.src);try{for(var d=(0,r.c)(Object.entries(u)),f=d.next();!f.done;f=d.next()){var h=(0,r.a)(f.value,2),p=h[0],v=h[1];c.setAttribute(p,String(v))}}catch(t){n={error:t}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return c.appendChild(o),Object.assign(t,{node:c})}return t},n.oldDataToNewData=function(t){var n;if(!t[e.KEY]||"true"===t[e.KEY])return t;try{var i=JSON.parse(t[e.KEY]);t=(0,r.g)((0,r.g)({},i.attributes),((n={})[e.KEY]="true",n.src=i.src,n.uuid=(0,h.xo)(),n))}catch(t){}return t},n.lineDidMount=function(t){var n,r=t.lineState;if(!r.getAttributes().toMap()[e.KEY])return;var i=r.getZoneId(),o=null===(n=this.editor.virtualListManager)||void 0===n?void 0:n.getVirtualListModuleOfZone(i);if(!(null==o?void 0:o.isEnabled))return;var s=r.getNode();if(!!s){var a=s.querySelector("img");a?a.addEventListener("load",function(){o.notifyInnerNodeLayoutUpdate(r)},{once:!0}):setTimeout(function(){var t=s.querySelector("img");null==t||t.addEventListener("load",function(){o.notifyInnerNodeLayoutUpdate(r)},{once:!0})})}},n.render=function(t){var e=this.oldDataToNewData(t.attributes);return t.key=e.uuid,f.createElement(b,(0,r.g)({},e,{resizeable:this.options.resizeable,src:e.src,editor:this.editor,lineState:t.lineState}))},n.destroy=function(){this.event.unbind(),this.uploadInput.removeEventListener("change",this.handleInputChange),this.editor.off(o.r.PASTE,this.handlePaste),this.editor.off(o.r.KEYDOWN,this.handleKeyDown),this.editor.off(o.r.SELECTION_CHANGE,this.handleSelectionChange),(0,h.aj)(this.uploadInput)},e.KEY="image",(0,r.e)([d.MR],e.prototype,"handlePaste",null),(0,r.e)([(0,a.gv)(999)],e.prototype,"serialize",null),(0,r.e)([(0,a.gv)(999),(0,u.x)()],e.prototype,"render",null),e}(l.S)},243415:function(t,e,n){"use strict";n.d(e,{T:function(){return u}});var r=n("144847"),i=n("559016"),o=n("162114"),s=n("650054");n("399884"),n("707574");var a=n("386308"),l=n("811492"),u=function(t){function e(n){var r=t.call(this,n)||this;r.handleInput=function(t){"formatItalic"===t.inputType&&(t.preventEvent(),t.preventDefault(),t.stopEvent(),r.editor.toggleAttribute(e.KEY))};var o=r.editor;return o.registerCommand(e.KEY,function(){o.toggleAttribute(e.KEY)}),o.on(i.r.INPUT,r.handleInput),r}(0,r.d)(e,t);var n=e.prototype;return n.deserialize=function(t){var e=t.node,n=t.deltaSet,r=t.zoneId;if(e instanceof HTMLElement){var i=e.tagName,s=e.getAttribute("style")||"";if("I"===i||"EM"===i||/\bfont-style:\s*italic\b/i.test(s))return(0,o.d)(n,r,{italic:"true"},!1)}return n},n.serialize=function(t){return(0,o.w)(t,{tagAttribute:"italic",wrapTag:s.c5.italic})},e}(function(t){function e(e){var n=e.editor,r=t.call(this)||this;return r.name="Italic",r.editor=n,r}(0,r.d)(e,t);var n=e.prototype;return n.match=function(t){return t===e.KEY},n.render=function(t){var e=t.children;return t.style.fontStyle="italic",e},e.KEY="italic",(0,r.e)([l.P],e.prototype,"render",null),e}(a.S))},797925:function(t,e,n){"use strict";n.d(e,{W:function(){return a}});var r=n(144847),i=n(386308);n(399884);var o=n(390485);n(707574);var s="";o.Z.isMac||o.Z.isIPad?s="mac":o.Z.isWindows?s="windows":o.Z.isLinux&&(s="linux");var a=function(t){function e(e){var n=e.editor,r=e.shortcutsMap,i=t.call(this)||this;return i.name="KeyboardShortcuts",i.handleKeydown=function(t){var e=i.getHotKeyName(t.nativeEvent);if(e){var n=e.key,r=e.value;return i.editor.execCommand(n,r?{value:r}:void 0),t.preventDefault(),t.stopPropagation(),!0}return!1},i.editor=n,i.shortcutToCommandMap=i.normalizeShortCutsMap(r),i.editor.on("keydown",i.handleKeydown),i}(0,r.d)(e,t);var n=e.prototype;return n.getShortCutID=function(t){var e=t.metaKey,n=t.altKey,r=t.shiftKey,i=t.ctrlKey,o=t.keyCode;return[e?"meta":"",n?"alt":"",r?"shift":"",i?"ctrl":"",null!=o?o:""].filter(Boolean).join("-")},n.normalizeShortCutsMap=function(t){var e,n,i,o,a={};try{for(var l=(0,r.c)(t),u=l.next();!u.done;u=l.next()){var c=u.value,d=c.key,f=c.value,h=c.shortcut,p=void 0;p=Array.isArray(h)?h:[h];try{for(var v=(i=void 0,(0,r.c)(p)),g=v.next();!g.done;g=v.next()){var y=g.value[s];if(!!y)a[this.getShortCutID(y)]={key:d,value:f}}}catch(t){i={error:t}}finally{try{g&&!g.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}return a},n.getHotKeyName=function(t){var e=this.getShortCutID(t);return this.shortcutToCommandMap[e]},e}(i.S)},444902:function(t,e,n){"use strict";n.d(e,{C:function(){return i},U:function(){return p}});var r,i,o=n(144847),s=n(97930),a=n(570930);n(399884);var l=n(390485);n(707574),n(741704);var u=n(372321),c=l.Z.isEdge,d=l.Z.isAndroid&&!l.Z.isX5,f=["align","heading","aceTable","list","blockquote","lmkr","origin-start","insertorder","text-indent","start","origin-start","lang"],h="horizontal-line";(r=i||(i={})).heading="heading",r.blockQuote="blockQuote",r.ul="ul",r.ol="ol",r.codeBlock="codeBlock",r.checkbox="checkbox",r.horizontal="horizontal",r.bold="bold",r.inlineCode="inlineCode",r.italic="italic",r.underline="underline",r.strikethrough="strikethrough";var p=function(){function t(t){var e=this;this.options=t,this.name="Markdown",this.isMarkdownMatch=!1,this.markdownMap={heading:{regExp:/^(#{1,3}\s)(\S*|\S+[\s\S]*)$/,match:function(t){var e=this.regExp.exec(t);return e?{key:"heading",value:"h"+(e[1].length-1),type:"line",replaceLen:e[1].length,active:"heading-h"+(e[1].length-1)}:null}},blockQuote:{regExp:/^(>\s)(\S*|\S+[\s\S]*)$/,match:function(t){var e=this.regExp.exec(t);return e?{key:"blockquote",value:"true",type:"line",replaceLen:e[1].length,active:"reference"}:null}},ul:{regExp:/^([*]+\s)(\S*|\S+[\s\S]*)$|^([-]+\s)(\S*|\S+[\s\S]*)$/,match:function(t){var e=this.regExp.exec(t);if(!e)return null;var n=e[1]||e[3];return{key:"list",value:"bullet"+(n.length-1),type:"line",replaceLen:n.length,active:"list-bullet"}}},ol:{regExp:/^([1-9][0-9]*\.\s)(\S*|\S+[\s\S]*)$/,match:function(t){var e=this.regExp.exec(t);return e?{key:"list",value:"number1",type:"line",replaceLen:e[1].length,start:parseInt(e[1],10),active:"list-number"}:null}},checkbox:{regExp:/^((\[\]\s)|(\u3010\u3011\s))(\S*|\S+[\s\S]*)$/,match:function(t){var e=this.regExp.exec(t);return e?{key:"list",value:"check1",type:"line",replaceLen:e[1].length,active:"checkbox"}:null}},horizontal:{regExp:/^---$|^\*\*\*$/,match:function(t){var e=this.regExp.exec(t);return e?{name:h,value:"true",type:"inline",replaceRight:!1,execLen:3,replaceLen:e[0].length,startReplacePos:e.index,endReplacePos:e.index+e[0].length,textLen:0,active:"insertseparator"}:null},doInsert:function(t){t.editor.execCommand(h)}},bold:{regExp:/\*\*(\S|\S.*\S)\*\*\s/,match:function(t){var e=this.regExp.exec(t);if(!e)return null;var n=e[1];return n&&/[^_|^*]/.test(n)?{type:"inline",name:"bold",value:"true",replaceRight:!0,execLen:2,replaceLen:e.index+n.length+5,startReplacePos:e.index,endReplacePos:e.index+n.length,textLen:n.length,active:"bold"}:null}},italic:{regExp:/\*([^*\s]|[^*\s].*[^*\s])\*\s/,match:function(t){var e=this.regExp.exec(t);if(!e)return null;var n=e[1];return n&&/[^_|^*]/.test(n)?{type:"inline",name:"italic",value:"true",replaceRight:!0,execLen:1,replaceLen:e.index+n.length+3,startReplacePos:e.index,endReplacePos:e.index+n.length,textLen:n.length,active:"italic"}:null}},underline:{regExp:/~([^\s~]|[^\s~].*[^\s~])~\s/,match:function(t){var e=this.regExp.exec(t);if(!e)return null;var n=e[1];return(null==n?void 0:n.length)?{type:"inline",name:"underline",value:"true",replaceRight:!0,execLen:1,replaceLen:e.index+n.length+3,startReplacePos:e.index,endReplacePos:e.index+n.length,textLen:n.length,active:"underline"}:null}},strikethrough:{regExp:/~~(\S|\S.*\S)~~\s/,match:function(t){var e=this.regExp.exec(t);if(!e)return null;var n=e[1];return n&&/[^~]/.test(n)?{type:"inline",name:"strikethrough",value:"true",replaceRight:!0,execLen:2,replaceLen:e.index+n.length+5,startReplacePos:e.index,endReplacePos:e.index+n.length,textLen:n.length,active:"strikethrough"}:null}}},this.handleInput=function(t){e.isMarkdownMatch&&" "===t.data&&(t.preventDefault(),t.nativeEvent.stopImmediatePropagation(),e.isMarkdownMatch=!1)},this.handleKeyEventWithBatchUndo=function(t){var n=t.evt;e.editor.undoModule.batchedUndo(function(){return e.handleKeyEvent({evt:n})})},this.handleKeyEvent=function(t){var n,r,i,a,d,f,h,p,v,g,y,m=t.evt,b=e.editor,E=m.keyCode,S=m.key,I=m.type,C=b.getStatus("isComposing");if(!(e.options.markdownOptions.ignoreFirstLine&&e.inTitleLine())&&!!b.selection.getSelection().isCollapsed()){var L=!C&&e.lastInternationalComposition&&l.Z.isSafari;if(" "===S&&(C||L)&&"keydown"===I)return e.shouldContinue=!1,!1;if("keyup"===I&&!e.shouldContinue)return e.shouldContinue=!0,!1;e.lastInternationalComposition=C;var w="";if(e.lastKeydownStatus=e.keydownStatus,e.keydownStatus=e.isInKeydownStatusWithoutKeycode(m),!l.Z.isSafari&&e.keydownStatus||!c&&C||C&&c&&"keyup"!==I||90===E||E>=65&&E<=90||m.nativeEvent.which>=37&&m.nativeEvent.which<=40)return!1;var x=e.isSpecialKey(m),_=32===E||" "===S;if(!x&&!_||8===E)return!1;var T=b.selection.getSelection(),A=T.start,M=T.end,k=A.zoneId,N=M.offset,R="";if((!e.keydownStatus&&e.lastKeydownStatus||l.Z.isX5)&&"keyup"===I){if(null===A)return!1;b.flushInput();var O=b.selection.getSelection().start;if(y=O.line,e.getLineListType(O.zoneId,y).indexOf("code")>-1)return;if((g=null===(i=b.getContentState().getZoneState(O.zoneId))||void 0===i?void 0:i.getLine(y))&&(c&&C||l.Z.isMobile)){var D=g.getText();w=D.slice(0,D.length-1)}}else{var z=b.selection.getSelection().start;if("keydown"!==I||null===z||l.Z.isX5)return!1;b.flushInput();var P=b.selection.getSelection(),O=P.start,Z=P.end;if(!Z)return!1;if(N=Z.offset,y=O.line,e.getLineListType(O.zoneId,y).indexOf("code")>-1||!b.selection.getSelection().isCollapsed())return;var W=Z.offset;w=(g=null===(a=b.getContentState().getZoneState(O.zoneId))||void 0===a?void 0:a.getLine(y))?g.getText().substr(0,W-(g.hasLineMarker()?1:0))+R:"",(!e.isInKeydownStatusWithoutKeycode(m)||!w.endsWith(S))&&(R="spacebar"===S.toLowerCase()?" ":S),w+=R}for(var K in e.markdownMap)if(e.markdownMap.hasOwnProperty(K)){var U=e.markdownMap[K],F=U.match(w);if(F){if(e.isMarkdownMatch=!0,c&&C){b.flushInput();var B=b.selection.getSelection(),V=B.start,j=B.end;g=null===(d=b.getContentState().getZoneState(V.zoneId))||void 0===d?void 0:d.getLine(y),N=j.offset}R&&(m.preventDefault(),e.editor.undoModule.batchedUndo(function(){e.performText(R)}),R="");var H=b.selection.getSelection(),X=H.start,q=H.end,Y=(null==g?void 0:g.hasLineMarker())?1:0,G=Y+F.replaceLen,J=q.offset>G&&G>N;if(G!==q.offset&&!J)continue;if("line"===F.type){var Q=null===(h=null===(f=b.getContentState().getZoneState(X.zoneId))||void 0===f?void 0:f.getLine(y))||void 0===h?void 0:h.getLineAttributes().toMap()[F.key];if(!Q||Q&&Q!==F.value){var $=b.selection.getSelection().start.zoneId,tt=b.pluginManager.getPlugin("List"),te={start:{line:y,offset:Y,zoneId:$},end:{line:y,offset:Y+F.replaceLen,zoneId:$}},tn=b.getContentState(),tr=tn.getEntities(te).reduce(function(t,e){return t=(0,o.g)((0,o.g)({},t),e.attributes)},{});if(tn.deleteText(te),tn.setAttributes({start:te.start,end:te.start},tr),F.value.indexOf("code")>-1);else if(F.start){var ti=e.getTabLevel(F.value,b,y);if(ti&&(F.value="number"+ti,b.getContentState().setLineAttributes($,y,{"text-indent":""})),!tt)return;var to=(0,u.m)(b,b.selection.getSelection(),y);tt.bulkInsertOList($,[y],((r={})[y]=to,r),F.start)}else{var ti=e.getTabLevel(F.value,b,y);if(ti){var ts=ti+F.replaceLen-2;F.value="bullet"+ts,b.getContentState().setLineAttributes($,y,{"text-indent":""})}b.getContentState().setLineAttributes($,y,((n={})[F.key]=F.value,n))}}}else if("inline"===F.type){var ta=(null===(v=null===(p=b.getContentState().getZoneState(k))||void 0===p?void 0:p.getLine(y))||void 0===v?void 0:v.hasLineMarker())?1:0,tl=[y,ta+F.startReplacePos],tu=[y,ta+F.endReplacePos];b.getContentState().deleteText({start:{line:y,offset:tl[1],zoneId:k},end:{line:y,offset:tl[1]+F.execLen,zoneId:k}}),F.replaceRight?(b.getContentState().deleteText({start:{line:y,offset:tu[1],zoneId:k},end:{line:y,offset:tu[1]+F.execLen,zoneId:k}}),b.toggleAttribute(F.name,"true",new s.e({editor:b,start:{line:y,offset:ta+F.startReplacePos,zoneId:k},end:{line:y,offset:ta+F.startReplacePos+F.textLen,zoneId:k}}))):U.doInsert&&U.doInsert({editor:b})}return}}}},this.getLineListType=function(t,n){return e.getLineAttributes(t,n,"list")},this.getLineAttributes=function(t,n,r){var i,o=null===(i=e.editor.getContentState().getZoneState(t))||void 0===i?void 0:i.getLine(n);return o&&o.getLineAttributes().toMap()[r]||""};var n=t.editor,r=t.markdownOptions,i=r.markdownMap;this.shouldContinue=!0,this.lastInternationalComposition=!1,this.lastKeydownStatus=!1,this.keydownStatus=!1,this.markdownMap=(0,a.Z)((0,o.g)((0,o.g)({},this.markdownMap),void 0===i?{}:i),r.types),this.editor=n,this.handleKeyEventWithBatchUndo.plugin=this,this.handleInput.plugin=this,this.editor.on("keydown",this.handleKeyEventWithBatchUndo),this.editor.on("keyup",this.handleKeyEventWithBatchUndo),l.Z.isSafari&&n.on("beforeinput",this.handleInput)}var e=t.prototype;return e.destroy=function(){this.editor.off("keydown",this.handleKeyEventWithBatchUndo),this.editor.off("keyup",this.handleKeyEventWithBatchUndo),l.Z.isSafari&&this.editor.off("beforeinput",this.handleInput)},e.inTitleLine=function(){var t=this.editor.selection.getSelection().start;return 0===t.line&&"0"===t.zoneId||!1},e.isSpecialKey=function(t){var e=t.key,n=t.keyCode;if(!t.nativeEvent)return!1;var r=t.nativeEvent.code,i=this.editor;if(!i)return!1;if((c&&i.getStatus("isComposing")||d)&&229===n)return!0;var o=t.metaKey||t.ctrlKey;return"~"===e||"`"===e||192===n||("*"===e||"8"===e)&&!o||"-"===e||189===n||"Minus"===r},e.isInKeydownStatusWithoutKeycode=function(t){var e="keydown"===t.type,n=229===t.keyCode;return e&&n},e.getTabLevel=function(t,e,n){var r=/bullet[0-9]+/.exec(t),i=e.getContentState().getActiveZone().getZoneId(),o="number1"===t;if(!r&&!o)return!1;var s=this.getLineAttributes(i,n,"text-indent");if(!s)return!1;var a=/([a-z]+)([0-9]+)/.exec(this.getLineListType(i,n)),l=0;return a&&(l=Number(a[2])),s&&(l+=2),l},e.performText=function(t){for(var e=this.editor,n=e.getContentState(),r=e.selection.getSelection(),i=r.start,s=r.end,a=s.offset,l=1===a?[]:n.getAttributes((0,o.g)((0,o.g)({},s),{offset:a-1}),(0,o.g)((0,o.g)({},s),{offset:a-1})),u={},c=0;c1?1:l).toFixed(3)+")"};function s(t){return t.map(function(t){return t.map(function(t){return t?t.startsWith("#")?o(t):t:void 0})})}},846673:function(t,e,n){"use strict";n.d(e,{KL:function(){return H},P6:function(){return F},T$:function(){return q},VV:function(){return X},Xb:function(){return z},cO:function(){return Z},d2:function(){return V},gM:function(){return j},xU:function(){return W},z0:function(){return D}});var r=n(144847);n(399884);var i=n(390485);n(707574);var o=n(109773),s=n(16810),a=n(956685),l=n(38952),u=n(151912),c=n(572280),d=n(740595),f=n(580369),h=n(375258),p=n(813149),v=n(941277),g=n(661749),y=n(535593),m=n(622265),b=n(145501),E=n(30638),S=n(939764),I=n(389125),C=n(880270),L=n(475973),w=n(429118),x=n(220435),_=n(261148),T=n(818538),A=n(392390),M=n(926916),k=n(307259),N=i.Z.isWindows?"Ctrl":"⌘",R=i.Z.isWindows?"Alt":"Option",O=i.Z.isWindows?N+"+Y":N+"+Shift+Z",D=3,z=[o.Z,s.Z,a.Z,l.Z,u.Z,c.Z,d.Z],P=Array.from({length:6}).map(function(t,e){return[z[e+1],"h"+(e+1),N+"+"+R+"+"+(e+1),"#".repeat(e+1)+" Space","heading","h"+(e+1)]}),Z=(0,r.f)([[f.Z,"bold",N+"+B","**Text** Space","bold"],[h.Z,"italic",N+"+I","*Text* Space","italic"],[p.Z,"underline",N+"+U","~Text~ Space","underline"],[v.Z,"undo",N+"+Z",void 0,"undo"],[g.Z,"redo",O,void 0,"redo"],[y.Z,"strikethrough",N+"+Shift+X","~~Text~~ Space","strikethrough"],[m.Z,"blockquote",N+"+Shift+>","> Space","blockquote","true"],[b.Z,"unorderlist",N+"+Shift+8","- Space","list","bullet"],[E.Z,"orderlist",N+"+Shift+7","1. Space","list","number"],[S.Z,"checkbox",N+"+"+R+"+T","[] Space","list","check"],[I.Z,"text-indent",N+"+]",void 0,"indentRight","true"],[C.Z,"align-center",N+"+Shift+E",void 0,"align","center"],[L.Z,"align-left",N+"+Shift+L",void 0,"align","left"],[w.Z,"align-right",N+"+Shift+R",void 0,"align","right"],[x.Z,"horizontal-line",N+"+"+R+"+S",void 0,"horizontal-line"],[_.Z,"image","",void 0,"image"],[T.Z,"hyperlink",N+"+K",void 0,"hyperlink"],[A.Z,"table",N+"+"+R+"+A",void 0,"table"],[M.Z,"codeblock",N+"+"+R+"+C",void 0,"codeblock"],[k.Z,"video","",void 0,"video"]],P),W=[{size:"0.85em",text:"small"},{size:"1em",text:"normal",isDefault:!0},{size:"1.15em",text:"large"},{size:"1.43em",text:"max"}],K=["monospace",'"Aril black", sans-serif','"Arial narrow", sans-serif',"arial, helvetica, sans-serif",'"comic sans ms", sans-serif',"Garamond, serif","Georgia, serif","Tahoma, sans-serif",'"Trebuchet MS", sans-serif',"Verdana, sans-serif",'"Times new Roman", serif'],U=["Fixed width","Wide font","Narrow font","Sans-Serif","comic sans ms","Garamond","Georgia","Tahoma","Trebuchet MS","Verdana","Serif"],F=Array.from({length:K.length}).map(function(t,e){return{font:K[e],text:U[e],style:{fontFamily:K[e]}}});F[3].isDefault=!0;var B=["固定宽度","宽字体","窄字体","Sans-Serif","comic sans ms","Garamond","Georgia","Tahoma","Trebuchet MS","Verdana","Serif"],V=Array.from({length:K.length}).map(function(t,e){return{font:K[e],text:B[e],style:{fontFamily:K[e]}}});V[3].isDefault=!0;var j=[{font:"simsun, STSong, serif",text:"宋体",style:{fontFamily:"simsun, STSong, serif"},isDefault:!0},{font:"simhei, STHeiti, sans-serif",text:"黑体",style:{fontFamily:"simhei, STHeiti, sans-serif"}},{font:"nsimsun, monospace",text:"新宋",style:{fontFamily:"nsimsun, monospace"}}],H=[{font:'"ms pgothic", sans-serif',text:"Pゴシック",style:{fontFamily:'"ms pgothic", sans-serif'},isDefault:!0},{font:'"ms pmincho", serif',text:"P明朝",style:{fontFamily:'"ms pmincho", serif'}},{font:'"ms gothic", monospace',text:"ゴシック",style:{fontFamily:'"ms gothic", monospace'}}],X=[[void 0,"#dee0e3cc","#fbbfbc","#fed4a4cc","#fff67acc","#b7edb1cc","#bacefdb3","#cdb2fab3"],["#f2f3f5","#bbbfc4","#f76964","#ffa53d","#ffe928","#62d256","#4e83fd8c","#935af68c"]],q=[[void 0,"#646a73","#d83931","#de7802","#dc9b04","#2ea121","#245bdb","#6425d0"]]},263543:function(t,e,n){"use strict";n.d(e,{o:function(){return td}});var r=n("144847");n("399884"),n("707574");var i=n("457341"),o=n("101199"),s=n("469935"),a=n.n(s),l=n("890710"),u=n("559016"),c=n("91821"),d=n("919421"),f=n("672543"),h=n("846673"),p=n("48281"),v=n("764675"),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.d)(e,t),e.prototype.render=function(){var t=this.props,e=t.icon,n=t.disabled,i=t.highlighted,s=t.pluginKey,a=t.pluginValue,l=t.tooltipText,u=t.extra,c=o.createElement(p.h,(0,r.g)({color:i?"primary":void 0,disabled:n,size:"medium","plugin-key":s,"plugin-value":a,"plugin-disabled":null==n?void 0:n.toString(),icon:e},void 0===u?{}:u));return l?o.createElement(v.Z,{text:l},c):c},e}(o.PureComponent),y=(0,r.a)(h.cO.map(function(t){var e=(0,r.a)(t,6),n=e[0],i=e[1],s=e[2],a=e[3],l=e[4],u=e[5];return(0,o.memo)(function(t){var e=t.activeAttr,c=t.i18n,d=t.disabledKeys,f=t.extra,h=void 0===f?{}:f,p=h.tooltipOverride,v=(0,r.h)(h,["tooltipOverride"]),y=null!=p?p:(c["toolbar."+i]||i)+(s?" ("+s+")":"")+(a?"\n"+a:"");return o.createElement(g,{highlighted:void 0===u?l in e:e[l]===u,disabled:d.includes(l),tooltipText:y,icon:o.createElement(n,null),pluginKey:l,pluginValue:u,extra:v})},function(t,e){return void 0===u?l in t.activeAttr==l in e.activeAttr&&t.disabledKeys.includes(l)===e.disabledKeys.includes(l):t.activeAttr[l]===u==(e.activeAttr[l]===u)&&t.disabledKeys.includes(l)===e.disabledKeys.includes(l)})}),23),m=y[0],b=y[1],E=y[2],S=y[3],I=y[4],C=y[5],L=y[6],w=y[7],x=y[8],_=y[9],T=y[10],A=y[11],M=y[12],k=y[13],N=y[14],R=y[15],O=y[16],D=y[17],z=y[18],P=y[19],Z=y[20],W=y[21],K=y[22],U=n("498014"),F=n("539606"),B="fontsize",V=h.xU.find(function(t){return t.isDefault}),j=(0,o.memo)(function(t){var e,n=t.activeAttr,r=t.disabledKeys,i=t.i18n,s=r.includes(B),a=(0,o.useMemo)(function(){return o.createElement(U.v,null,h.xU.map(function(t){return o.createElement(U.v.Item,{key:t.text,"plugin-key":B,"plugin-disabled":null==s?void 0:s.toString(),"plugin-value":t.size},o.createElement("span",{style:{fontSize:t.size}},i["toolbar.font-size-"+t.text]))}))},[i,s]),l=n[B]||(null==V?void 0:V.size),u=null===(e=h.xU.find(function(t){return t.size===l}))||void 0===e?void 0:e.text;return o.createElement(F.Z,{buttonContent:i["toolbar.font-size-"+u],dropdownProps:{overlay:a,disabled:s}})},function(t,e){return t.disabledKeys.includes(B)===e.disabledKeys.includes(B)&&t.i18n===e.i18n&&t.activeAttr[B]===e.activeAttr[B]}),H="align",X=["left","center","right"],q=(0,o.memo)(function(t){var e=t.activeAttr,n=t.disabledKeys,r=t.i18n,i=n.includes(H),s=(0,o.useMemo)(function(){return o.createElement(U.v,null,X.map(function(t){return o.createElement(U.v.Item,{key:t,"plugin-key":H,"plugin-disabled":null==i?void 0:i.toString(),"plugin-value":t},o.createElement("span",null,r["toolbar.align-"+t]))}))},[r,i]),a=e[H]||X[0];return o.createElement(F.Z,{buttonContent:r["toolbar.align-"+a],dropdownProps:{overlay:s,disabled:i}})},function(t,e){return t.disabledKeys.includes(H)===e.disabledKeys.includes(H)&&t.i18n===e.i18n&&t.activeAttr[H]===e.activeAttr[H]}),Y="heading",G=(0,o.memo)(function(t){var e=t.activeAttr,n=t.disabledKeys.includes(Y),r=(0,o.useMemo)(function(){return o.createElement(U.v,null,h.Xb.slice(0,h.z0+1).map(function(t,e){return o.createElement(U.v.Item,{key:e,"plugin-key":Y,"plugin-disabled":null==n?void 0:n.toString(),"plugin-value":0===e?void 0:"h"+e},o.createElement(t,null))}))},[n]),i=Number((e[Y]||"h0").slice(1))||0,s=h.Xb[i];return o.createElement(F.Z,{buttonContent:o.createElement(s,null),dropdownProps:{overlay:r,disabled:n}})},function(t,e){return t.disabledKeys.includes(Y)===e.disabledKeys.includes(Y)&&t.activeAttr[Y]===e.activeAttr[Y]}),J=n("454746");function Q(t,e){return"string"==typeof t?t:"function"==typeof t?t(e):void 0}var $="fontfamily",tt=(0,o.memo)(function(t){var e=t.activeAttr,n=t.disabledKeys,i=t.i18n,s=t.extra,a=void 0===s?{}:s,l=a.language,u=void 0===l?"EN":l,c=a.env,d=void 0===c?"EN":c,f=a.fontFamilies,p=n.includes($),v=(0,o.useMemo)(function(){if(f)t=f;else switch(u){case"ZH":t=h.gM;break;case"EN":t="CN"===d?h.d2:h.P6;break;case"JP":t=h.KL;break;default:t=h.P6}var t,e=t.find(function(t){return t.isDefault}),n=t.reduce(function(t,e){var n;return(0,r.g)((0,r.g)({},t),((n={})[e.font]=Q(e.text,i),n))},{});return{fontFamilies:t,defaultFont:e,mapFont2Name:n}},[u,d,f,i]),g=v.fontFamilies,y=v.defaultFont,m=v.mapFont2Name,b=e[$]||(null==y?void 0:y.font),E=m[b]||Q(null==y?void 0:y.text,i)||"default",S=o.createElement(U.v,{selectedKeys:[String(b)]},g.map(function(t){var e;return o.createElement(U.v.Item,{key:String(t.font),"plugin-key":$,"plugin-disabled":null==p?void 0:p.toString(),"plugin-value":t.font},o.createElement("span",{style:{fontFamily:(null===(e=t.style)||void 0===e?void 0:e.fontFamily)||t.font}},Q(t.text,i)))}));return o.createElement(F.Z,{buttonContent:o.createElement("span",{style:{fontFamily:E===Q(null==y?void 0:y.text,i)?null==y?void 0:y.font:b}},E),dropdownProps:{overlay:S,disabled:p}})},function(t,e){return t.disabledKeys.includes($)===e.disabledKeys.includes($)&&t.i18n===e.i18n&&t.activeAttr[$]===e.activeAttr[$]&&(0,J.X)(t.extra,e.extra)}),te={DIVIDER:function(){return o.createElement("div",{className:"editor-kit-toolbar-v2-divider"})},Bold:m,Italic:b,Underline:E,Undo:S,Redo:I,Strikethrough:C,Blockquote:L,UnorderedList:w,OrderedList:x,Checkbox:_,Indent:T,AlignCenter:A,AlignLeft:M,AlignRight:k,HorizontalLine:N,Image:R,Hyperlink:O,Table:D,CodeBlock:z,Video:P,H1:Z,H2:W,H3:K,FontSizeDropdown:j,AlignDropdown:q,HeadingDropdown:G,FontFamilyDropdown:tt,ColorPicker:n("179087").Z};function tn(t){if("string"==typeof t)return te[t];if(!function(t){var e=t.type;return void 0!==e&&("string"==typeof e||!1)}(t))return t;var e=te[t.type];return function(n){var i;return o.createElement(e,(0,r.g)({},n,{extra:(0,r.g)({tooltipOverride:(null===(i=t.getTooltipFromI18N)||void 0===i?void 0:i.call(t,n.i18n))||t.tooltip},t.extraPropsToBuiltinComp||{})}))}}var tr=function(t){return t!==document.scrollingElement&&t?(0,f.re)(t):{top:0,left:0,clientHeight:0,clientWidth:0,scrollLeft:0,scrollTop:0}},ti=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.wrapperRef=o.createRef(),e}(0,r.d)(e,t);var n=e.prototype;return n.getWrapperClassName=function(){},n.getWrapperStyle=function(){return{}},n.componentDidMount=function(){this.bindEvent()},n.componentWillUnmount=function(){this.unbindEvent()},n.bindEvent=function(){var t=this.props.editor;t.on(u.r.SELECTION_CHANGE,this.update),t.on(u.r.EXEC_COMMAND,this.update)},n.unbindEvent=function(){var t=this.props.editor;t.off(u.r.SELECTION_CHANGE,this.update),t.off(u.r.EXEC_COMMAND,this.update)},n.update=function(){this.forceUpdate()},n.getRenderInfo=function(){var t,e,n=this.props,i=n.getSelectionInfo,o=n.getI18n,s=i(),a=s.activeAttrMap,l=s.disabledKeys,u=o(),c=Object.keys(a);try{for(var d=(0,r.c)(c),f=d.next();!f.done;f=d.next()){var h=f.value;if(h.startsWith("list-")){var p=a[h];delete a[h];var v=h.substring(5);!a[v]&&(a[v]=p)}}}catch(e){t={error:e}}finally{try{f&&!f.done&&(e=d.return)&&e.call(d)}finally{if(t)throw t.error}}return{activeAttr:a,disabledKeys:l,i18n:u}},Object.defineProperty(n,"convertedComponents",{get:function(){return!this._convertedComponents&&(this._convertedComponents=this.props.items.map(tn)),this._convertedComponents},enumerable:!1,configurable:!0}),n.render=function(){var t=this.props.handleWrapperClick;return o.createElement("div",{className:a()("editor-kit-toolbar-v2-wrapper",this.getWrapperClassName()),ref:this.wrapperRef,style:this.getWrapperStyle(),onClick:function(e){e.persist(),t(e.target)},onMouseDown:function(t){t.preventDefault()}},this.renderContent())},(0,r.e)([i.W],e.prototype,"update",null),e}(o.PureComponent),to="floattoolbar",ts=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={isVisible:!1,animateDirection:"none",scrollReccord:null,positionLeft:0,positionTop:0,scrollStatus:null},e.floatConfig=(0,r.g)({shouldFollowScroll:!0,shouldFollowSelection:!0},e.props.floatConfig||{}),e.editor=e.props.editor,e.listenToScroll=(0,d.P)(e._listenToScroll,50,{leading:!0,trailing:!0}),e.throttledShowAtCurrentSelection=(0,d.P)(function(){return e.showAtCurrentSelection()},100),e.checkIfNeedToHideToolbar=(0,d.P)(e._checkIfNeedToHideToolbar,100,{leading:!0,trailing:!1}),e.checkIfNeedToShowToolbar=(0,d.P)(e._checkIfNeedToShowToolbar,100,{leading:!0,trailing:!0}),e.setPosition=function(t,n){var i=t.left,o=t.top;return void 0===n&&(n={}),(0,r._)(e,void 0,void 0,function(){var t,e,s,a,l,u,c,d,h,p,v,g,y,m,b,E,S,I,C,L,w=this;return(0,r.b)(this,function(x){var _,T,A,M,k,N,R,O,D,z,P,Z,W,K,U,F,B,V,j,H,X,q,Y,G,J;if(!(t=this.wrapperRef.current))return[2];return s=(e=(0,r.g)({anchor:"topLeft",offset:{}},n)).anchor,a=e.offset,l=e.ignoreBoundary,c=(u=t.getBoundingClientRect()).height,d=u.width,h=u.left,p=u.top,"center"===s?(v=void 0===o?p:o-c/2,g=void 0===i?h:i-d/2):"topLeft"===s&&(v=null!=o?o:p,g=null!=i?i:h),m=void 0===(y=a.left)?0:y,E=void 0===(b=a.top)?0:b,_={left:g+m,top:v+E},T=t,A=null===(L=this.props.floatConfig)||void 0===L?void 0:L.boundary,M=this.editor.getViewPortPadding,k=l,O=(R=T.getBoundingClientRect()).height,D=R.width,P=(z=(0,f.AS)(null!==(N=null==M?void 0:M())&&void 0!==N?N:0)).paddingBottom,Z=z.paddingLeft,W=z.paddingRight,K=z.paddingTop,F=(U=function(t){var e,n,r,i;return(void 0===t&&(t=!1),"boolean"==typeof t)?{ignoreTop:t,ignoreLeft:t,ignoreRight:t,ignoreBottom:t}:{ignoreTop:null!==(e=t.top)&&void 0!==e&&e,ignoreLeft:null!==(n=t.left)&&void 0!==n&&n,ignoreRight:null!==(r=t.right)&&void 0!==r&&r,ignoreBottom:null!==(i=t.bottom)&&void 0!==i&&i}}(k)).ignoreBottom,B=U.ignoreLeft,V=U.ignoreRight,j=U.ignoreTop,H=function(){for(var t=[],e=0;e0&&(X.top=_.top-J),G>0&&(X.left=_.left-G),q>0&&(X.top=_.top+q),Y>0&&(X.left=_.left+Y),I=(S=X).left,C=S.top,[2,new Promise(function(t){w.setState({positionLeft:I,positionTop:C},t)})]})})},e.setVisibility=function(t,n){var r=e.state,i=r.scrollStatus,o=r.scrollReccord;!1===t&&null!==o&&null!==i&&e.setState({scrollReccord:null,scrollStatus:null});var s=(null==n?void 0:n.animateDirection)||"none";return e.state.isVisible===t&&e.state.animateDirection===s?Promise.resolve():new Promise(function(n){e.setState({isVisible:t,animateDirection:s},n)})},e.showAtPosition=function(t,n){return void 0===n&&(n={}),(0,r._)(e,void 0,void 0,function(){return(0,r.b)(this,function(e){switch(e.label){case 0:return[4,this.setPosition(t,n)];case 1:return e.sent(),[4,this.setVisibility(!0,n)];case 2:return e.sent(),this.floatConfig.shouldFollowScroll&&!n._bypassScrollStatusCheck&&this.checkAndSetScrollStatus(),[2]}})})},e.getPosition=function(){var t=e.state,n=t.isVisible,r=t.positionLeft,i=t.positionTop;return n?{left:r,top:i}:null},e.setItems=function(t){e._convertedComponents=t.map(tn),e.forceUpdate()},e}(0,r.d)(e,t);var n=e.prototype;return n.componentDidMount=function(){t.prototype.componentDidMount.call(this);var e,n=this.floatConfig,r=n.onMount,i=n.shouldFollowScroll,o=n.shouldFollowSelection;r&&r({getPosition:this.getPosition,setPosition:this.setPosition,setVisibility:this.setVisibility,showAtPosition:this.showAtPosition,setItems:this.setItems}),i&&(null===(e=this.editor.getScrollContainer())||void 0===e||e.addEventListener("scroll",this.listenToScroll),window.addEventListener("scroll",this.listenToScroll)),o&&this.bindSelectionHandlers(),this.bindEditorCalls(),window.addEventListener("resize",this.throttledShowAtCurrentSelection)},n.bindSelectionHandlers=function(){var t=this,e=function(){return t._checkIfNeedToShowToolbar("mouseup")},n=function(){return t.checkIfNeedToShowToolbar("mousemove")};document.addEventListener("mouseup",e),document.addEventListener("touchend",e),document.addEventListener("mousemove",n),this.editor.on(u.r.SELECTION_CHANGE,this.checkIfNeedToHideToolbar),this.unbindSelectionHandlers=function(){document.removeEventListener("mouseup",e),document.removeEventListener("touchend",e),document.removeEventListener("mousemove",n),t.editor.off(u.r.SELECTION_CHANGE,t.checkIfNeedToHideToolbar)}},n.bindEditorCalls=function(){var t=this,e=this.editor,n=["setPosition","setVisibility","showAtPosition","getPosition","setItems"],i=n.map(function(e){return function(n){return t[e].apply(t,(0,r.f)(n))}});n.forEach(function(t,n){e.registerCommand(to+"-"+t,i[n])}),this.unbindEditorCalls=function(){n.forEach(function(t,n){e.off(to+"-"+t,i[n])})}},n.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this);var e,n,r,i=this.floatConfig,o=i.shouldFollowScroll,s=i.shouldFollowSelection;o&&(null===(e=this.editor.getScrollContainer())||void 0===e||e.removeEventListener("scroll",this.listenToScroll),window.removeEventListener("scroll",this.listenToScroll)),s&&(null===(n=this.unbindSelectionHandlers)||void 0===n||n.call(this)),null===(r=this.unbindEditorCalls)||void 0===r||r.call(this),window.removeEventListener("resize",this.throttledShowAtCurrentSelection)},n.getWrapperStyle=function(){var t=this.state,e=t.positionLeft;return{top:t.positionTop,left:e}},n.getWrapperClassName=function(){var t=this.state,e=t.isVisible,n=t.animateDirection,r=t.scrollReccord;return a()("editor_toolbar-float","toolbar-animation-"+n,{"editor_toolbar-is_visible":e,"editor_toolbar-transition_top":null!==r})},n._listenToScroll=function(){return(0,r._)(this,void 0,void 0,function(){var t,e,n,i,o,s,a,l;return(0,r.b)(this,function(r){switch(r.label){case 0:if(!this.state.isVisible)return[2];return[4,this.checkAndSetScrollStatus()];case 1:if(r.sent(),e=(t=this.state).scrollStatus,n=t.scrollReccord,"pending"===e||null===e||null===n)return[2];return i=n.positionTopShot,o=n.scrollerScrollTop,s=n.windowScrollTop,a=tr(this.editor.getScrollContainer()||window).scrollTop,l=o+s+i-window.pageYOffset-a,this.setPosition({top:l},{ignoreBoundary:{top:!0,bottom:!0}}),[2]}})})},n.fixToolbar=function(){var t=this;return new Promise(function(e){t.setState({scrollStatus:"fixed",scrollReccord:{positionTopShot:t.state.positionTop,scrollerScrollTop:tr(t.editor.getScrollContainer()).scrollTop,windowScrollTop:window.pageYOffset}},e)})},n.checkAndSetScrollStatus=function(){var t=this;return new Promise(function(e){var n=t.state.scrollStatus,r=t.checkIfToolbarOverlapsWithSelection();if(null===n)return"overlapped"===r?t.setState({scrollStatus:"pending"},e):t.showAtCurrentSelection({_bypassScrollStatusCheck:!0,ignoreBoundary:{top:!0,bottom:!0},animateDirection:"none"},{isBackward:"above-selection"===r}).then(t.fixToolbar).then(e);if("pending"!==n)return e();return"overlapped"===r?e():t.showAtCurrentSelection({_bypassScrollStatusCheck:!0,ignoreBoundary:{top:!0,bottom:!0},animateDirection:"none"},{isBackward:"above-selection"===r}).then(t.fixToolbar).then(e)})},n.checkIfToolbarOverlapsWithSelection=function(){var t=this.wrapperRef.current;if(!t)return"above-selection";var e=this.editor.selection.getSelection(),n=this.editor.rectModule.getRawCaretRect(e.start),r=this.editor.rectModule.getRawCaretRect(e.end),i=Math.min(n.top,r.top)-5,o=Math.max(n.bottom,r.bottom)+5,s=t.getBoundingClientRect(),a=s.bottom,l=s.top;return ao?"below-selection":"overlapped"},n._checkIfNeedToShowToolbar=function(t){if(!(this.state.isVisible||"mousemove"===t&&this.editor.getStatus("isMouseDown")))this.showAtCurrentSelection()},n.showAtCurrentSelection=function(t,e){var n,i,o;return void 0===t&&(t={}),void 0===e&&(e={}),(0,r._)(this,void 0,void 0,function(){var s,a,l,u,c,d,f,h,p,v,g,y;return(0,r.b)(this,function(m){return(a=(s=this.editor).selection.getSelection()).isCollapsed()?[2]:(l=null!==(n=e.isBackward)&&void 0!==n?n:a.isBackward,u=a.end,c=a.start,d=l?c:u,h=(f=s.rectModule.getRawCaretRect(d)).left,p=f.top,g={left:h,top:p+(v=f.height)/2},y=v/2+(null!==(o=null===(i=this.wrapperRef.current)||void 0===i?void 0:i.getBoundingClientRect().height)&&void 0!==o?o:0)/2+10,l&&(y*=-1),[2,this.showAtPosition(g,(0,r.g)({anchor:"center",offset:{top:y},animateDirection:l?"bottom-to-top":"top-to-bottom"},t))])})})},n._checkIfNeedToHideToolbar=function(t){var e=t.previous,n=t.current;if(!c.W.isRangeEqual(e,n))this.setVisibility(!1)},n.renderContent=function(){var t=this.getRenderInfo();return o.createElement(o.Fragment,null,this.convertedComponents.map(function(e,n){return o.createElement(e,(0,r.g)({key:n},t))}))},(0,r.e)([i.W],e.prototype,"_listenToScroll",null),(0,r.e)([i.W],e.prototype,"fixToolbar",null),(0,r.e)([i.W],e.prototype,"_checkIfNeedToShowToolbar",null),(0,r.e)([i.W],e.prototype,"showAtCurrentSelection",null),(0,r.e)([i.W],e.prototype,"_checkIfNeedToHideToolbar",null),e}(ti),ta=n("65476"),tl=n("386308"),tu=n("809919");function tc(t){return(0,r.f)(t).reduce(function(t,e){var n=(0,r.a)(e,2),i=n[0],o=n[1];return t[i]=o,t},{})}var td=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="FloatToolbar",e}return(0,r.d)(e,t),e.prototype.renderReact=function(){l.render(o.createElement(ts,(0,r.g)({key:this.reactKey},this._options,{getSelectionInfo:this.getSelectionInfo,handleWrapperClick:this.handleWrapperClick})),this.mountPoint)},(0,r.e)([i.W],e.prototype,"renderReact",null),e}(function(t){function e(e){var n=t.call(this)||this;return n._options=e,n._mountPoint=null,n.reactKey=(0,tu.D)(),n.editor=e.editor,n}(0,r.d)(e,t);var n=e.prototype;return Object.defineProperty(n,"mountPoint",{get:function(){if(!this._mountPoint){var t=this._options.toolbarId||"editor-toolbar_"+(0,tu.D)(),e=document.getElementById(t);!e&&((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),this._mountPoint=e}return this._mountPoint},enumerable:!1,configurable:!0}),n.clearMountPoint=function(){if(!!this._mountPoint)this._mountPoint.remove(),this._mountPoint=null},n.handleWrapperClick=function(t){for(var e=this,n=t,r=null,i=null;n&&n!==this.mountPoint;){if(r=null==n?void 0:n.getAttribute("plugin-key")){if((null==n?void 0:n.getAttribute("plugin-disabled"))==="true")return;i=null==n?void 0:n.getAttribute("plugin-value");break}n=n.parentElement}if(!!r){if(/\[.+\]/.test(r))try{for(var o=JSON.parse(r),s=JSON.parse(i||"[]").map(function(t){return null===t?void 0:t}),a=0;ae.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);ie.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function a(t,e,n,r){var i,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}function l(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function a(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(s,a)}l((r=r.apply(t,e||[])).next())})}function u(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function f(){for(var t=[],e=0;e":">",'"':""","'":"'","/":"/"},W=/[\x00-\x2F\x3A-\x40\x5B-\x60\x7B-\xFF]/gm;function K(t){return t&&t.replace(W,function(t){return Z[t]||"&#x"+("00"+t.charCodeAt(0).toString(16)).slice(-2)+";"})}var U=n("809919");function F(t){var e={};return function(n){var r=e[n];return null==r&&(r=e[n]=t(n)),r}}var B=F(function(t){return t<1?"":(function(t){for(var e="";t>=0;)e=String.fromCharCode(t%26+65)+e,t=Math.floor(t/26)-1;return e})(t-1).toLowerCase()}),V=F(function(t){if(t<1)return"";if(t>1e4)return String(t);var e,n,r={m:1e3,cm:900,d:500,cd:400,c:100,xc:90,l:50,xl:40,x:10,ix:9,v:5,iv:4,i:1},i="";try{for(var o=(0,l.c)(Object.keys(r)),s=o.next();!s.done;s=o.next()){for(var a=s.value;t>=r[a];)i+=a,t-=r[a]}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return i});function j(){return(0,U.D)(8)}var H="bullet",X="number";(i=a||(a={}))[i.BULLET=0]="BULLET",i[i.ORDER=1]="ORDER",i[i.INDENT=2]="INDENT";var q="clientside-remove-text-indent",Y=function(t){function e(n){var r=t.call(this)||this;return r.name="List",r.pasteLineNum=-1,r.willRenumberArr=[],r.needRenumberList=!1,r.olIdMap={},r.deserializeOlID="",r.serializeOlID="",r.prevListType=-1,r.prefixAttributes=O,r.relativeAttrKeys=R.concat(O),r.zoneShouldRemoveTextIndent=null,r.handleDeleteKey=function(t){var e=t.isBackward,n=r.editor.selection.getSelection(),i=n.start,o=r.editor.getContentState().getActiveZone().getLine(i.line);if(!o)return;var s=o.getLineAttributes().toMap();if(!!(e&&n.isCollapsed()&&s.list&&n.start.offset===o.getLineMarker()))r.handleEditorWillDoDeleteKey(),t.stopEvent(),t.preventEvent(),t.e.preventDefault()},r.handleWillDeleteFromCut=function(t){var e=r.editor,n=e.selection.getSelection(),i=n.start,o=n.end,s=i.zoneId,a="",l="";a=J(e,s,i.line);var u=e.getContentState().getZoneState(s);u&&i.line!==u.length()-1&&(l=J(e,s,o.line+1)),(a||l)&&(r.cutList(),t.preventEvent())},r.cutList=function(){var t=r.editor;t.undoModule.batchedUndo(function(){var e=r.renumberList,n=r.deleteNumberList,i=t.selection.getSelection(),o=i.start,s=i.end,a=o.line,l=t.getContentState(),c=l.hasLineMarker(o)?1:0,d=o;(0,P.Q)(s,l)&&function(t,e){var n=t.zoneId,r=t.line,i=t.offset;if(i>1)return!1;var o=e.getZoneState(n);if(!o)throw Error("isStartOfLine execute error: zoneId "+n+" does not exist.");var s=o.getLine(r);if(!s)throw Error("isStartOfLine execute error: zoneId "+n+" line "+r+" does not exist.");return i===(s.hasLineMarker()?1:0)}(o,l)&&(d={zoneId:o.zoneId,line:a,offset:c});var f=n(new u.e({start:d,end:s,editor:t}));t.getContentState().deleteText({start:d,end:s});var h=t.selection.getSelection().start,p=h.zoneId,v=h.line;-1!==v&&f.forEach(function(t){"number"==typeof t&&null===e(p,v+1)?e(p,v):e(p,v,t,!1)})})},r.caretColumn=function(){return r.editor.selection.getSelection().start.offset},r.deleteNumberList=function(t,e){void 0===e&&(e=[]);var n=r.editor,i=(t=t||n.selection.getSelection()).start,o=t.end,s=i.zoneId,a=i.line,l=o.line,u=n.getContentState().getZoneState(s);if(!u)return e;var c=u.getLine(a);if(t.isCollapsed()&&r.caretColumn()===(c.hasLineMarker()?1:0)){var d=t.start.line>1?J(n,s,t.start.line-1):"",f=t.start.line-1&&f.indexOf("code")>-1)return e.push(Number(t.start.line)),e}for(var h=a;h<=l;h++){var p=J(n,s,h);if(-1!==p.indexOf("code")){e.push(Number(h));continue}if(-1!==p.indexOf(X)){var v=u.getLine(h).getLineAttributes().toMap()["ol-id"];if(v&&!e.includes(v))e.push(v);else if(!v){var g=j();r.renumberList(s,h,g,!0),e.push(g)}}}return e},r.handleDidPaste=function(){if(r.zoneShouldRemoveTextIndent){var t,e,n,i,o=r.editor.getContentState(),s=null===(i=o.getZoneState(r.zoneShouldRemoveTextIndent))||void 0===i?void 0:i.getEntities([[q,"true"]]);if(s)try{for(var a=(0,l.c)(s),u=a.next();!u.done;u=a.next()){var c=u.value;o.setLineAttributes(c.start.zoneId,c.start.line,((n={"text-indent":""})[q]="",n))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}r.zoneShouldRemoveTextIndent=null}var d=r.editor.selection.getSelection(),f=d.start,h=d.end;r.doFixNewInsertNodeListError(r.pasteLineNum,Math.max(f.line-r.pasteLineNum,1)),r.mergeListIfNecessary(f.zoneId,f.line,h.line),r.renumberList(f.zoneId,r.pasteLineNum)},r.handleContentChange=function(t){var e=t.changes,n=t.options;if(!n.isRemote&&"setContent"!==n.type&&!!r.needRenumberList)Object.values(e).forEach(function(t){var e=0;t.forEach(function(n){var i=n.start,o=n.inserts,s=n.deletes;(o.length>1||s.length>1||t.length>1)&&r.doFixNewInsertNodeListError(i+e,o.length),s.length&&s.forEach(function(t){var e;(null===(e=t.getLineAttributes().toMap().list)||void 0===e?void 0:e.includes("number"))&&r.handleDeleteListLine(t.index)}),e+=o.length-s.length})})},r.handleCompositionEnd=function(t){var n,i=r.editor.selection.getSelection();if(t.data.length>0||!i.isCollapsed())return;var o=i.start,s=o.zoneId,a=o.line,l=r.editor.getContentState(),u=null===(n=l.getZoneState(s))||void 0===n?void 0:n.getLine(a);if(!(null==u?void 0:u.isTextEmpty()))return;var c=u.getLineAttributes().toMap();if(e.KEY in c)l._forceRefresh(s,[a])},r.doFixNewInsertNodeListError=function(t,e){if(!!r.needRenumberList)for(var n,i,o=r.renumberList,s=r.editor.getContentState().getActiveZone().getZoneId(),a="",l="",u=0;u-1,p=d.indexOf("code")>-1,v=f.indexOf("code")>-1,g=h&&(null===(i=null===(n=r.editor.getContentState().getZoneState(s))||void 0===n?void 0:n.getLine(c))||void 0===i?void 0:i.getLineAttributes().toMap()["ol-id"])||"";if(h&&g!==a){var y=""===g?a:"",m=r.needRenumberList;r.needRenumberList=!1,y?o(s,c,y,!0):o(s,c),r.needRenumberList=m}var b=l.indexOf("code")>-1;p&&!b&&o(s,c),!p&&v&&o(s,c+1),l=d,a=g}},r.doInsertOrderedList=function(){r.editor.undoModule.batchedUndo(function(){r.doInsertList({attribKey:"list",attribValue:X})})},r.doInsertUnorderedList=function(){r.editor.undoModule.batchedUndo(function(){r.doInsertList({attribKey:"list",attribValue:H})})},r.doInsertList=function(t){var e=t.attribKey,n=t.attribValue,i=t.range,o=t.isAllHasAttrib,s=t.clickZone,a=r.editor;if(i=i||a.selection.getSelection(),void 0===o){var l=function(t,e,n,r){var i=t.getContentState();return e.every(function(t){for(var e=t.start,o=t.end,s=e.zoneId,a=e.line,l=o.line,u=a;u<=l;u++){var c=i.getLineAttributes(s,u).toMap()[n];if(!c||c.slice(0,r.length)!==r){var d=i.getZoneState(s);if(!d)return!1;for(var f=d.getLine(u).getAttributes(),h=!1,p=0,v=f.length;p0?"indent"+b:"",x=o&&!s?w:L;v.push([m,x,S,g])}var _=v.filter(function(t){var e,n=t[0],r=null===(e=y.getLine(n))||void 0===e?void 0:e._node;return!r||!(r.className.indexOf("IGNORE_LIST")>-1)}).map(function(t){return t[0]}),T=v.reduce(function(t,e){return t[e[0]]=e[1],t},{}),A=v[0][1];k.exec(A)?r.bulkInsertOList(p,_,T):r.setMultiLinesListType(p,_,T,g);var M=v.filter(function(t){return t[2]}).map(function(t){return t[0]});r.setAttributeOnMultiLines(p,M,{"text-indent":""}),r.renumberList(p,h+1)}},r.registerCommand=function(){var t=r.editor;t.registerCommand(e.KEY,function(t){var e=t.value;e===X?r.doInsertOrderedList():e===H&&r.doInsertUnorderedList()}),t.registerCommand(w.P.INDENT_LEFT,function(){(0,_.u)(t,X,!1),(0,_.u)(t,H,!1);var e=r.indexOfListLineInRange(),n=r.editor.selection.getSelection().start,i=n.zoneId,o=n.line;e>-1?r.renumberList(i,e):r.renumberList(i,o+1)}),t.registerCommand(w.P.INDENT_RIGHT,function(){(0,_.u)(t,X,!0),(0,_.u)(t,H,!0);var e=r.indexOfListLineInRange();if(e>-1){var n=r.editor.selection.getSelection().start;r.renumberList(n.zoneId,e)}})},r.deserialize=function(t){var e,n,i=t.node,o=t.deltaSet,s=t.zoneId,a=o;if(i instanceof HTMLElement){var l=i.tagName,u=i.className,d=A.exec(u);if(d&&(a=(0,c.e)(a,s,{"ol-id":d[1]})),"ol"===l.toLowerCase()&&((null===(e=i.parentElement)||void 0===e?void 0:e.tagName.toLowerCase())==="body"||!(null===(n=i.parentElement)||void 0===n?void 0:n.closest("ol")))&&(r.deserializeOlID=j()),"li"===l.toLowerCase()){var f=function(t){var e=null,n=t,r=t.dataset.list;if("LI"===t.tagName&&r){if(/bullet/.test(r))return"bullet";if(/number/.test(r))return"number"}for(;n;){if("UL"===n.tagName){e="bullet";break}if("OL"===n.tagName){e="number";break}n=n.parentElement}return e}(i),h=function(t){var e=0,n=t.parentElement;if("LI"===t.tagName&&t.dataset.list&&/number/.test(t.dataset.list)){var r=tl(t.dataset.list);if(r)return r}for(;n;)["OL","UL"].includes(n.tagName)&&e++,n=n.parentElement;return e}(i),p=String(function(t){var e=t.parentElement;if(e&&"OL"===e.tagName&&"LI"===t.tagName)return(e.start||1)+Array.from(e.children).filter(function(t){return"LI"===t.tagName}).indexOf(t);for(;e;){if("OL"===e.tagName&&e.start)return e.start;e=e.parentElement}return 1}(i)),v=i.getAttribute("data-ol-id"),g=r.deserializeOlID;v&&(!r.olIdMap[v]&&(r.olIdMap[v]=j()),g=r.olIdMap[v]);var y=function(t){for(var e=null,n=t;n;){var r=/(?:^| )list-([a-z]+[0-9]+)\b/.exec(n.className);if(r&&r[1]){e=r[1];break}n=n.parentElement}var i="",o="";if(t&&"LI"===t.tagName){var s=t.dataset.list,a=void 0===s?"":s;/bullet/.test(a)?i="bullet":/number/.test(a)&&(i="number");var l=a.match(/\d+/);if(l){if(!i)return null;e=i+(o=l[0])}}if(i&&e&&!o){var l=e.match(/\d+/);l&&(e=i+l[0])}return e}(i);(h>=1&&f||y)&&tf(a,s,{list:y||""+f+h,start:p,"origin-start":p}),"number"===f&&tf(a,s,{"ol-id":g})}}return a},r.UNSAFE_editorNormalizePasteNode=function(t){var e,n,i=t.data.node,o=r.editor,a=o.selection.getSelection().start,l=a.line,u=a.offset,c=z()(i).find(">:not(meta)"),d=1===c.length,f=z()(i).find("ul, ol");if(u>0&&d&&f[0]&&c.hasClass("list-div")){var h=z()("
");h.html(f.html());for(var p=0;p-1)return S+=" list-code",1===L&&(S+=" list-code-start"),t.lineClass+=" "+S,b.ZP.createElement("code",{start:""+L,className:"list-"+I,spellcheck:"false"},t.children);if(0>I.indexOf(X)){if(I.indexOf("check")>-1||I.indexOf("done")>-1)return i;t.lineClass+=" "+S;var _=I.indexOf("indent")>-1?"indent":"bullet";return b.ZP.createElement(E.B,{className:"list-"+I+" r-list r-list-"+_},b.ZP.createElement(E.n,{style:w,className:x},t.children))}else{if(!C)return t.lineClass+=" "+S,b.ZP.createElement(E.O,{className:"list-"+I+" r-list r-list-number"},b.ZP.createElement(E.o,{style:w,className:x},t.children));1===L&&(S+=" list-start-"+I);var T=/(?:^| )origin-start:(\S+)/.exec(s),A=tp(L,Number(tt(I)[2]));if(!T)return t.lineClass+=" "+S,b.ZP.createElement(E.O,{start:""+L,"data-start":""+L,className:"list-"+I+" r-list r-list-number"},b.ZP.createElement(E.o,{start:""+A,"data-start":""+A,style:w,className:x},t.children));var k=K(T[1]);return t.lineClass+=" "+S,b.ZP.createElement(E.O,{"data-origin-start":""+k,start:""+k,"data-start":""+k,className:"list-"+I+" r-list r-list-number"},b.ZP.createElement(E.o,{start:""+A,"data-start":""+A,style:w,className:x},t.children))}}}return i},r.handleKeydown=function(t){var e=t.evt;if(!r.editor)return;var n=r.editor.selection.getSelection(),i=n.start,o=n.end,s=r.editor.getContentState(),a=s.getActiveZone(),l=a.getZoneId();if(!i||!o)return;var u=o.line,c=o.offset,d=a.getLine(u);e.keyCode===x.VD.Delete&&"Delete"===e.key&&n.isCollapsed()&&d&&c===d.getModelText().length&&r.mergeList(l,u+2,u);var f=e.type,h=e.keyCode,p=e.shiftKey,v=e.ctrlKey,g=e.metaKey;if(!T.Z.isSafari||"keydown"!==f)return;if((h===x.VD.Up||h===x.VD.Down)&&!(v||g)){var y=h===x.VD.Up,m=n.isBackward,b=y?Math.max((p,i.line-1),0):Math.min((p&&m?i.line:o.line)+1,a.length()-1);if(!a.getLine(b).getLineAttributes().toMap().list)return;var E=a.getLine(b),S=E.hasLineMarker()?1:0,I=E.length()-1,C=p&&!m?i:{zoneId:l,line:b,offset:S},L=p&&m?o:{zoneId:l,line:b,offset:S};I===S&&(r.editor.selection.setSelection({start:C,end:L}),e.preventDefault())}if(!!s.getLineAttributes(l,i.line).toMap().list&&!!n.isCollapsed()){if(h===x.VD.Left&&(0,x.qT)(e.nativeEvent)){var w=a.getLine(i.line).hasLineMarker()?1:0,b=i.line,_={zoneId:l,line:b,offset:w};e.shiftKey?r.editor.selection.setSelection({end:o,start:_}):r.editor.selection.setSelection({end:_,start:_}),e.preventDefault()}}},r.setListAttributeOnMultiLines=function(t,e,n,i){void 0===i&&(i={type:"setLineAttributes"});var o=r.editor.getContentState();e.forEach(function(e){o.setLineAttributes(t,e,{list:n[e]},i)})},r.setLineListType=function(t,e,n,i){var o,s,a,l,u={},c=r.editor,d=r.renumberList,f=c.getContentState(),h=c.selection.getSelection();""===n?(l=!1,a=null===(s=null===(o=f.getZoneState(t))||void 0===o?void 0:o.getLine(e))||void 0===s?void 0:s.getLineAttributes().toMap()["ol-id"],r.relativeAttrKeys.concat("list").forEach(function(n){var r;f.setLineAttributes(t,e,((r={})[n]="",r))})):(u.list=n,n.indexOf(X)>-1&&(a=i||r.getClosetListNumberId(t,n,h)||j())&&(u["ol-id"]=a),f.setLineAttributes(t,e,u)),d(t,e,a,l)},r.setLineListTypeWithStart=function(t,e,n,i,o,s){var a,l=r.editor,u=l.getContentState(),c=u.getZoneState(t);if(!!c){var d=l.selection.getSelection(),f=s||r.getClosetListNumberId(t,n,d)||j();if(!i){r.setLineListType(t,e,n,f);return}i=String(i),n?o?u.setLineAttributes(t,e,{list:n,start:i,"origin-start":i,"ol-id":f}):u.setLineAttributes(t,e,{list:n,start:i,"ol-id":f}):(f=c.getLine(e).getLineAttributes().toMap()["ol-id"],a=!1,r.setLineListType(t,e,"")),r.renumberList(t,e,f,a)}},r.unNumberType=function(t){return"indent"===t||t===H||"check"===t||"done"===t},r.findClosetList=function(t,e,n){var i=e,o="up",s=r.editor.getContentState(),a=[],l=s.getZoneState(t);if(!l)return a;for(var u=l.length(),c=J(r.editor,t,e);i-1>=0&&r.compatibleList(t,i-1,n,o,a);){;i--}for(i=e,c&&n&&a.push(i),o="down";i+1<=u&&r.compatibleList(t,i+1,n,o,a);){;i++}return a},r.compatibleList=function(t,e,n,i,o){var s,a=r.unNumberType,l=J(r.editor,t,e),u=!1;if(!l)return null;var c=tt(l);if("code"===n)return a(c[1])||n!==c[1]?null:("up"===i?o.unshift(e):"down"===i&&o.push(e),!0);if("oldNumber"===n&&c[1]===X){var d=null===(s=r.editor.getContentState().getZoneState(t))||void 0===s?void 0:s.getLine(e);return!d||(u=d.getLineAttributes().toMap()["ol-id"])?null:("up"===i?o.unshift(e):"down"===i&&o.push(e),!0)}return null},r.renumberList=function(t,e,n,i){var o,s=r.editor,a=r.unNumberType,u=[],c=!1===i,d="",f=J(s,t,e),h=!!n;if(!f&&!h)return null;var p=tt(f);if(h&&(p=tt("number1")),a(p[1])&&!c)return null;var v=null===(o=r.editor.getContentState().getZoneState(t))||void 0===o?void 0:o.getLine(e).getLineAttributes().toMap()["ol-id"],g=n||v,y=[];if("code"===p[1]?d="code":p[1]===X&&!c&&(d="oldNumber"),""!==d&&(y=r.findClosetList(t,e,d)),0!==y.length&&"oldNumber"===d&&(y=y.map(function(n){if(n===e)return v===g?null:n;var r=tn(s,t,n);return r&&r.listId===g?null:n}).filter(function(t){return null!==t}).sort(function(t,e){return t-e}),r.setAttributeOnMultiLines(t,y,{"ol-id":g})),i&&s.getContentState().setLineAttributes(t,e,{"ol-id":g}),g){var m=r.editor.getContentState().getZoneState(t);(m?(0,l.f)(Array(m.length())).map(function(e,n){return tn(s,t,n)}):[]).forEach(function(t,e){t&&t.listType.indexOf(X)>-1&&t.listId===g&&u.push(e)})}var b=[];return 0!==u.length?b=u:0!==y.length&&(b=y),b.length&&r.performRenumberList(t,b,p,false),null},r.performRenumberList=function(t,e,n,i){var o=r.editor,s=new S.I({zoneId:t}),a=0,l=function(e,i,u){for(var c,d,f=e[a],h=-1,p=J(o,t,f);p;){d=Number((p=tt(p))[2]);var v=r.editor.getContentState().getZoneState(t),g=v.getLine(f).getLineAttributes().toMap(),y=g["text-indent"],m=g.start;if(isNaN(d)||r.unNumberType(p[1])){if("code"===n[1]||d1?null===(s=v.getLine(h-1))||void 0===s?void 0:s.getLineAttributes().toMap()["ol-id"]:"")||(null===(a=v.getLine(h+1))||void 0===a?void 0:a.getLineAttributes().toMap()["ol-id"])||"":void 0}},r.editor=n.editor,r.registerCommand(),r.editor.on(f.r.DID_PASTE,r.handleDidPaste),r.editor.on(f.r.WILL_DELETE_FROM_CUT,r.handleWillDeleteFromCut),r.editor.on(f.r.CONTENT_CHANGE,r.handleContentChange),r.editor.on(f.r.COMPOSITION_END,r.handleCompositionEnd),r.editor.on("keydown",r.handleKeydown),r.editor.on(f.r.DELETE_KEY,r.handleDeleteKey,890),r.needRenumberList=n.needRenumberList||!0,r}(0,l.d)(e,t);var n=e.prototype;return n.destroy=function(){this.editor.off(f.r.DID_PASTE,this.handleDidPaste),this.editor.off(f.r.WILL_DELETE_FROM_CUT,this.handleWillDeleteFromCut),this.editor.off(f.r.CONTENT_CHANGE,this.handleContentChange),this.editor.off(f.r.COMPOSITION_END,this.handleCompositionEnd),this.editor.off("keydown",this.handleKeydown),this.editor.off(f.r.DELETE_KEY,this.handleDeleteKey),this.editor=null},n.indexOfListLineInRange=function(){for(var t,e,n=this.editor,r=n.selection.getSelection(),i=r.start,o=r.end,s=i.line;s<=o.line;s++){var a=n.getContentState().getLineAttributes(i.zoneId,s).toMap();if((null===(t=a.list)||void 0===t?void 0:t.indexOf(X))>-1||(null===(e=a.list)||void 0===e?void 0:e.indexOf(H))>-1)return s}return -1},n.getListWrapInfo=function(t,e){var n=e.level,r=e.style,i=e.start,o=Array.from({length:n},function(){var e={tag:t,attributes:{}};return r&&(e.style=(0,l.g)({},r)),e});return i&&o[n-1]&&(o[n-1].attributes.start=String(i)),o},n.serialize=function(t){var n,r,i=t.zoneId,o=t.type,s=t.node,u=t.lineAttributes,d=t.lineDelta,f=u&&u.list||"",y=tl(f),m=function(t){return t.split("bullet")[1]}(f),b=function(t){return t.split("indent")[1]}(f),E=-1;if(o===h.T.LINE&&f&&(y||m||/check|done/.test(f)||b)){var S=!1,I=document.createElement(b?"div":"li");I.classList.add("temp-li"),I.setAttribute(p.mX,"true"),I.style.lineHeight="1.6",I.style.marginTop="0px",I.style.marginBottom="0px",I.style.paddingLeft="0px",!b&&(I.style.display="list-item"),y?(I.style.listStyleType=tu[(+y-1)%tu.length],E=a.ORDER):m?(I.style.listStyleType=tc[(+m-1)%tc.length],E=a.BULLET):b&&(E=a.INDENT),u&&(u.list&&(I.dataset.list=u.list,I.classList.add(u.list)),u["ol-id"]&&(I.dataset.olId=u["ol-id"],S=(0,l.a)(function(t){return t.split(":")}(this.serializeOlID),1)[0]!==u["ol-id"],this.serializeOlID=function(t,e){return t+":"+e}(u["ol-id"],y)),u.start&&y&&!b&&(I.dataset.start=tp(Number(u.start),Number(y))),this.prevListType!==E&&(S=!0),this.prevListType=E);var C={};if(d){var L=new v.V(d,new g.i(i,d,this.editor.getContentState().schema));C=this.getLiStyleFromLineState(L)}try{for(var w=(0,l.c)(Object.entries(C)),x=w.next();!x.done;x=w.next()){var _=(0,l.a)(x.value,2),T=_[0],A=_[1];if(I.style[T]=A,"fontSize"===T){var M=String(A).replace(/\s/g,"");I.classList.add("font-size-"+M)}}}catch(t){n={error:t}}finally{try{x&&!x.done&&(r=w.return)&&r.call(w)}finally{if(n)throw n.error}}I.appendChild(s);var k=function(t){if(t instanceof HTMLElement){var e=t.dataset.list||"",n=/(number|bullet|check|done|indent)(\d+)/;if(n.test(e)){var r=n.exec(e),i=r[1],o=Number(r[2]);return"number"===i?{type:"ol",level:o}:"indent"===i?{type:"div",level:o}:{type:"ul",level:o}}}throw Error("unkonw list node")}(I),N=k.type,R=k.level,O={margin:"0px 0px 0px 24px",paddingLeft:"0px"};b&&(O.marginLeft="24px"),!b&&(O.listStylePosition="inside");var D=this.getListWrapInfo(N,{level:R,start:Number(null==u?void 0:u.start)||1,style:O});return D.length>0&&(!b&&Object.assign(D[0].style,{margin:"0px"}),Object.assign(D[D.length-1],{split:S})),(0,c.i)(Object.assign(t,{node:I}),{wrapNodesInfo:D,tagAttribute:e.KEY})}return t},n.assignListId=function(t,e,n){var r=this;void 0===n&&(n=!1),(n?z()(t.get().reverse()):t).each(function(t,n){return r.addListId(n,0===t?e:j())})},n.getLevelAndOrderFromOl=function(t){var e=/list-number([0-9]+)/.exec(t.className),n=z()(t).attr("start");return{level:e?parseInt(e[1],10):1,order:n?parseInt(n,10):1}},n.getLiStyleFromLineState=function(t){var n,r,i,o,s,a,u={};if(t.isTextEmpty()){var c=t.getZoneId(),d=t.getOffset().start+t.getLineMarker(),f=this.editor.getContentState().getInlineStyleOverride({zoneId:c,start:d});if(f)try{for(var h=(0,l.c)(Object.entries(f)),p=h.next();!p.done;p=h.next()){var v=(0,l.a)(p.value,2),g=v[0],y=v[1];if(g in e.PREFIX_STYLE_INHERIT){var m=(0,l.a)(e.PREFIX_STYLE_INHERIT[g],2),b=m[0],E=m[1];u[b]=E||y}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}return u}try{for(var S=(0,l.c)(Object.entries(e.PREFIX_STYLE_INHERIT)),I=S.next();!I.done;I=S.next()){var C=(0,l.a)(I.value,2),L=C[0],w=C[1],x=t.getEntities([[L,void 0]]);if(!!x.length){var _=!0,T=void 0,A=t.length()-(t.getModelText().endsWith("\n")?1:0);try{for(var M=(s=void 0,(0,l.c)(x.entries())),k=M.next();!k.done;k=M.next()){var N=(0,l.a)(k.value,2),R=N[0],O=N[1],D="lmkr"in O.attributes?0:t.getLineMarker(),z=O.end.offset-(O.text.endsWith("\n")?1:0);if(0===R&&O.start.offset!==D||R===x.length-1&&z!==A||T&&T.end.offset!==O.start.offset){_=!1;break}T=O}}catch(t){s={error:t}}finally{try{k&&!k.done&&(a=M.return)&&a.call(M)}finally{if(s)throw s.error}}_&&(u[w[0]]=w[1]||x[0].attributes[L])}}}catch(t){i={error:t}}finally{try{I&&!I.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}return u},n.shouldForceRenderLine=function(t){var e=t.lineState.getLineAttributes().toMap();if(!e.list)return!1;var n=tt(e.list);return!![X,H,"check","done","indent"].includes((null==n?void 0:n[1])||"")||!1},n.editorAfterDoDeleteKey=function(t){var e=this.editor.getContentState().getActiveZone().getZoneId();this.mergeListIfNecessary(e,t.theLine),this.handleDeleteListLine(t.theLine)},n.editorAfterDoReturnKey=function(t){this.handleDeleteListLine(t.theLine)},n.handleDeleteListLine=function(t){var e=this.editor;if(!!e){var n=this.renumberList,r=e.selection.getSelection().start;this.willRenumberArr.forEach(function(e){"number"==typeof e&&null===n(r.zoneId,t+1)?n(r.zoneId,t):n(r.zoneId,t,e,!1)}),this.willRenumberArr=[]}},n.editorKeyDown=function(t){var e=t.evt,n=e.keyCode,r=this.editor.selection.getSelection(),i=r.start,o=i.line,s=i.zoneId;!e.shiftKey&&n===x.VD.Tab&&!("0"===s&&0===o)&&this.mergeToParentListIfNecessary(r)},n.bulkInsertOList=function(t,e,n,r){var i,o,a=this.editor;if(!!a&&0!==e.length){var l=this.editor.getContentState();e.sort(function(t,e){return t-e});var u=e[0],c=e[e.length-1],d=j();if(l.setLineAttributes(t,u,{"origin-start":""+(r||1)}),this.setMultiLinesListType(t,e,n,d),1===r){var f=ti(a,s.UP,u);if(f)this.mergeList(t,f.lineNum,u);else{var h=to(a,u,c),p=h.upwardClosestOListInfo,v=h.downwardClosestOListInfo;p&&v&&this.mergeList(t,u,v.lineNum)}(null===(o=null===(i=l.getZoneState(t))||void 0===i?void 0:i.getLine(c+1))||void 0===o?void 0:o.getLineAttributes().toMap()["ol-id"])&&this.mergeList(t,c+1,c)}else this.mergeListIfNecessary(t,u,c)}},n.mergeList=function(t,e,n){var r=this,i=this.editor;if(!i)return Promise.resolve(null);var o=i.selection.getSelection(),a=i.getContentState();if(!Q(i,o,e)||!Q(i,o,n))return Promise.resolve(null);var u=tn(i,t,e),c=tn(i,t,n);if(u&&c&&u.listId!==c.listId){var d=u.listId,f=(0,l.f)([n],ta(i,o,n,c.listId,s.UP),ta(i,o,n,c.listId,s.DOWN)).sort(function(t,e){return t-e});return new Promise(function(i){if(!r.editor)return i(null);var l={type:"mergeList"};r.setAttributeOnMultiLines(t,f,{"ol-id":d},l),f[0]>e?a.setLineAttributes(t,f[0],{"origin-start":""},l):(a.setLineAttributes(t,e,{"origin-start":""},l),!function(t,e,n){return!!Q(t,e,n)&&0===ta(t,e,n,tn(t,e.start.zoneId,n).listId,s.UP).length}(r.editor,o,f[0])&&a.setLineAttributes(t,f[0],{"origin-start":""},l)),r.renumberList(t,n),i(d)})}return Promise.resolve(null)},n.mergeListIfNecessary=function(t,e,n){return(0,l._)(this,void 0,void 0,function(){var r,i,o,a,u,c,d,f,h,p,v,g,y,m;return(0,l.b)(this,function(l){switch(l.label){case 0:if(!(r=this.editor))return[2];if(i=r.selection.getSelection(),o=n||e,!Q(r,i,e)||!Q(r,i,o))return[2];if(a=ts(r,e).listId,u=ts(r,e-1),c=ts(r,o+1),d=ti(r,s.UP,e),f=ti(r,s.DOWN,o),h=u||d,p=c||f,v=!1,!(h&&h.listId!==a))return[3,2];return[4,this.mergeList(t,h.lineNum,e)];case 1:a=l.sent()||a,v=!0,l.label=2;case 2:if(!(p&&p.listId!==a))return[3,4];return[4,this.mergeList(t,p.lineNum,o)];case 3:a=l.sent()||a,v=!0,l.label=4;case 4:if(v)return[2,Promise.resolve()];if(y=(g=to(r,e,o)).upwardClosestOListInfo,m=g.downwardClosestOListInfo,!(y&&m))return[3,7];return[4,this.mergeList(t,y.lineNum,e)];case 5:return l.sent(),[4,this.mergeList(t,m.lineNum,o)];case 6:l.sent(),l.label=7;case 7:return[2]}})})},n.mergeToParentListIfNecessary=function(t){for(var e=this,n=t.start,r=t.end,i=n.zoneId,o={},a=n.line;a<=r.line;a++){var u=tn(this.editor,i,a);if(!(!u||void 0===u.listId||o[u.listId]||1>=$(u.listType)))o[u.listId]=a}Object.entries(o).forEach(function(t){var n=(0,l.a)(t,2),r=(n[0],n[1]),o=J(e.editor,i,r),a=tr(e.editor,r,s.UP,$(o),!0,!0);a&&e.mergeList(i,a.lineNum,r)})},n.handleEditorWillDoDeleteKey=function(){var t=this.editor,e=t.getContentState(),n=e.getActiveZone(),r=n.getZoneId(),i=t.selection.getSelection(),o=i.start,s=n.getLine(o.line),a=s.getLineAttributes().toMap(),l=a["ol-id"];if(!a.list)return;var u=i.toPosition(),c=u.start,d=u.len,f=Number(s.hasLineMarker()),h=tt(a.list);if(!d&&o.offset-f==0&&!!h){var p=new S.I({zoneId:r}),v=h[1],g=Number(h[2]);v===X?(a["origin-start"]="",a.start="",a["ol-id"]="",a.list="indent"+g,p.retain(c-1).retain(1,a)):"code"===v?p.retain(c-2).delete(2):(a.list="",p.retain(c-1).retain(1,a)),e.apply(p),this.willRenumberArr=[l]}},n.editorWillDoReturnKey=function(t){var e=t.evt,n=t.delta,r=t.editor,i=r.getContentState(),o=i.getActiveZone(),s=o.getZoneId(),a=r.selection.getSelection(),u=a.start.line,c=o.getLine(u),d=c.getLineAttributes().toMap(),f=a.toPosition(),h=f.start,p=f.len;if(!d.list||p)return;var v=tt(d.list);if(!!v){var g=v[1],y=Number(v[2]),m=c.isTextEmpty(),b=1===a.start.offset,E=e.shiftKey,I=new S.I({zoneId:s});if([X,H,"check","done","indent"].includes(g)){if(m)1===y?["list","start","origin-start","ol-id"].forEach(function(t){d[t]=""}):d.list=g+(y-1),I.retain(h-1).retain(1,d);else{E&&(d.list="indent"+y,["start","origin-start","ol-id"].forEach(function(t){d[t]=""}));var C=this.findLastListLine(o,u);if("indent"===g&&!E&&C){var L=C.type,w=C.start,x=C.olId;L[1]===X&&(d.list=L[0],d.start=String(w+1),d["ol-id"]=x),d.list=L[1]+L[2]}I.retain(h).insertEnter().insertLineMarker(d),"done"===g&&(I=b?I.compose(new S.I({zoneId:s}).retain(Math.max(h-1,0)).retain(1,(0,l.g)((0,l.g)({},d),{list:"check"+y}))):I.compose(new S.I({zoneId:s}).retain(h+1).retain(1,(0,l.g)((0,l.g)({},d),{list:"check"+y}))))}}var _=c.previousSibling();if("code"===g&&_){if(0===u)I.retain(h).insertEnter().insertLineMarker(d);else{var T=o.getLineIndexOfKey(_.getKey()),A=_.isEmpty(),M=i.rangeToPosition({start:{line:T,offset:0,zoneId:s},end:{line:T,offset:0,zoneId:s}});if(null===M)return;var k=M.start,N=_.getLineAttributes().toMap(),R="code1"===N.list;if(m&&A&&R){["list","start","insertorder","lang"].forEach(function(t){N[t]="",d[t]=""});var O=new S.I({zoneId:s}).retain(k).retain(1,N);I=I.retain(h-1).retain(1,d).compose(O)}else I.retain(h).insertEnter().insertLineMarker(d)}}t.delta=n.compose(I),this.willRenumberArr=this.deleteNumberList(a)}},n.findLastListLine=function(t,e){for(var n=e,r="";n-1>=0;){var i=t.getLine(n-1).getLineAttributes().toMap();if(!(r=i.list))break;if((r=tt(r))[1]===H||r[1]===X||"check"===r[1]||"done"===r[1])return{line:--n,type:"done"===r[1]?{0:"check"+r[2],1:"check",2:r[2]}:r,start:r[1]===X?parseInt(i.start,10)||1:null,olId:i["ol-id"]};n--}return null},n.setMultiLinesListType=function(t,e,n,r){var i,o=this,s=n[e[0]];if(!e.length||!this.editor)return;var a=this.editor.getContentState().getZoneState(t);if(!!a){var l=this.editor.selection.getSelection(),u=new Map;e.forEach(function(t){var e=a.getLine(t).getLineAttributes().toMap()["ol-id"];!u.has(e)&&e&&u.set(e,!0)}),""===s||/indent/.test(s)?(this.setListAttributeOnMultiLines(t,e,n),this.setAttributeOnMultiLines(t,e,{start:"","origin-start":"",lang:"","ol-id":""})):(e=e.filter(function(e){return td(o.editor,t,e,[["horizontal-line","true"],["sheet-id",""],["aceTable",""]])}),s.indexOf(X)>-1?(i=r||this.getClosetListNumberId(t,s,l)||j(),this.setAttributeOnMultiLines(t,e,{"ol-id":i})):this.setAttributeOnMultiLines(t,e,{"ol-id":""}),this.setListAttributeOnMultiLines(t,e,n)),u.forEach(function(n,r){o.renumberList(t,e[0],r)}),this.renumberList(t,e[0],i)}},n.setAttributeOnMultiLines=function(t,e,n,r){if(void 0===n&&(n={}),void 0===r&&(r={type:"setLineAttributes"}),!!Array.isArray(e)&&!!e.length){var i=this.editor.getContentState();e.forEach(function(e){i.setLineAttributes(t,e,n,r)})}},e.KEY="list",e.PREFIX_STYLE_INHERIT={bold:["fontWeight","bold"],italic:["fontStyle","italic"],fontsize:["fontSize"],fontcolor:["fontColor"],fontfamily:["fontFamily"]},(0,l.e)([(0,y.gv)(1001)],e.prototype,"serialize",null),e}(m.S),G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,l.d)(e,t),e}(Y);function J(t,e,n){return function(t,e,n,r){var i,o=null===(i=t.getContentState().getZoneState(e))||void 0===i?void 0:i.getLine(n);return o&&o.getLineAttributes().toMap()[r]||""}(t,e,n,"list")}o=Y,(0,l.d)(function(){return null!==o&&o.apply(this,arguments)||this},o);function Q(t,e,n){var r=tn(t,e.start.zoneId,n);return!!(r&&k.exec(r.listType))}function $(t){var e=k.exec(t);return e?parseInt(e[2],10):null}function tt(t){var e=N.exec(t);return e?e:t.startsWith("number")?N.exec("number1"):t.startsWith("bullet")?N.exec("bullet1"):e}function te(t,e,n,r){void 0===r&&(r="number1");var i=function(t,e,n){var r,i,o=e.start.zoneId,s=null===(i=null===(r=t.getContentState().getZoneState(o))||void 0===r?void 0:r.getLine(n))||void 0===i?void 0:i.getLineAttributes().toMap()["text-indent"];if(!s)return!1;var a=N.exec(J(t,o,n)),l=0;return a&&(l=Number(a[2])),s&&(l+=2),l}(t,e,n);return i?"number"+i:r}function tn(t,e,n){var r,i=null===(r=t.getContentState().getZoneState(e))||void 0===r?void 0:r.getLine(n);if(!i)return null;var o=i.getLineAttributes(),s=o.reduce(function(t,e){var n=(0,l.a)(e,2),r=n[0],i=n[1];return r===G.KEY?t.listType=i:"ol-id"===r&&(t.listId=i),t},{});return s.listType?s:null}function tr(t,e,n,r,i,o){void 0===o&&(o=!1);var a,l,u=t.getContentState().getActiveZone(),c=u.getZoneId(),d=u.length(),f=((a={})[s.UP]=-1,a[s.DOWN]=1,a);for(e+=f[n];e>=0&&e1&&e===s.UP){var c=tr(t,n,e,l,!0);if(c||1===u)return c}var d=tr(t,n,e,l);if(!d)return null;var f=((o={})[s.UP]=-1,o[s.DOWN]=1,o);return d.order===u+f[e]?d:null}function to(t,e,n){var r=n||e,i=tr(t,e,s.UP),o=tr(t,r,s.DOWN);return i&&o&&i.listId===o.listId?{upwardClosestOListInfo:i,downwardClosestOListInfo:o}:{}}function ts(t,e,n){var r=t.getContentState(),i=null!=n?n:r.getActiveZone().getZoneId(),o=r.getZoneState(i);if(!o)return null;var s=tn(t,i,e)||{},a=s.listId,l=s.listType,u=k.exec(void 0===l?"":l);return u?{zoneId:i,listId:void 0===a?"":a,lineNum:e,order:parseInt(o.getLine(e).getLineAttributes().toMap().start,10),level:parseInt(u[2],10)}:null}function ta(t,e,n,r,i){var o,a=e.start,l=t.getContentState().getZoneState(a.zoneId),u=[];if(!l)return u;var c=/(number)([0-9]+)/,d=l.length(),f=((o={})[s.UP]=-1,o[s.DOWN]=1,o);for(n+=f[i];n>=0&&n<=d;n+=f[i]){var h=tn(t,a.zoneId,n)||{},p=h.listType,v=void 0===p?"":p,g=h.listId,y=void 0===g?"":g;if(c.exec(v)){if(y!==r)break;u.push(n)}}return u}function tl(t){return t.split("number")[1]}var tu=["decimal","lower-alpha","lower-roman"],tc=["disc","circle","square"],td=function(t,e,n,r,i){void 0===r&&(r=[]),void 0===i&&(i=!1);var o=t.getContentState().getZoneState(e).getLine(n).getAttributes(),s=i?C.Z:function(t,e){return t[0]===e[0]};return(0,L.Z)(r,o,s).length<=0};function tf(t,e,n){var r=t.get(e);if(r instanceof S.I){var i=r.ops[0],o=new S.I({zoneId:e});"*"===i.insert&&i.attributes&&i.attributes.lmkr?o.retain(1,(0,l.g)((0,l.g)({},i.attributes),n)):o.insertLineMarker(n),t.replace(e,r.compose(o))}}function th(t){return t&&(t.tagName||"").toLowerCase()}function tp(t,e){var n=""+t;switch(e%3){case 0:n=V(t);break;case 2:n=B(t)}return n}},708180:function(t,e,n){"use strict";var r,i;n.d(e,{P:function(){return r}}),(i=r||(r={})).INDENT_LEFT="indentLeft",i.INDENT_RIGHT="indentRight"},101201:function(t,e,n){"use strict";n.d(e,{$:function(){return r}});var r=["author","lmkr","lineguid","insertorder"]},689057:function(t,e,n){"use strict";n.d(e,{VD:function(){return r},qT:function(){return s}}),n(399884);var r,i,o=n(390485);function s(t){return o.Z.isMac||o.Z.isSafari?t.metaKey&&!t.altKey:t.ctrlKey&&!t.altKey}n(707574),(i=r||(r={}))[i.BackSpace=8]="BackSpace",i[i.Tab=9]="Tab",i[i.Clear=12]="Clear",i[i.Enter=13]="Enter",i[i.Shift=16]="Shift",i[i.Ctrl=17]="Ctrl",i[i.Alt=18]="Alt",i[i.Esc=27]="Esc",i[i.Space=32]="Space",i[i.PageUp=33]="PageUp",i[i.PageDown=34]="PageDown",i[i.End=35]="End",i[i.Home=36]="Home",i[i.Left=37]="Left",i[i.Up=38]="Up",i[i.Right=39]="Right",i[i.Down=40]="Down",i[i.Delete=46]="Delete",i[i.Digit0=48]="Digit0",i[i.Digit9=57]="Digit9",i[i.A=65]="A",i[i.B=66]="B",i[i.C=67]="C",i[i.D=68]="D",i[i.E=69]="E",i[i.F=70]="F",i[i.G=71]="G",i[i.H=72]="H",i[i.I=73]="I",i[i.J=74]="J",i[i.K=75]="K",i[i.L=76]="L",i[i.M=77]="M",i[i.N=78]="N",i[i.O=79]="O",i[i.P=80]="P",i[i.Q=81]="Q",i[i.R=82]="R",i[i.S=83]="S",i[i.T=84]="T",i[i.U=85]="U",i[i.V=86]="V",i[i.W=87]="W",i[i.X=88]="X",i[i.Y=89]="Y",i[i.Z=90]="Z",i[i.Meta=91]="Meta",i[i.RightMeta=92]="RightMeta",i[i.Caret=94]="Caret",i[i.Numpad0=96]="Numpad0",i[i.Numpad9=105]="Numpad9",i[i.NumpadDot=110]="NumpadDot",i[i.F6=117]="F6",i[i.F11=122]="F11",i[i.Semicolon=186]="Semicolon",i[i.Plus=187]="Plus",i[i.Minus=189]="Minus",i[i.Dot=190]="Dot",i[i.Grave=192]="Grave",i[i.Bracket=219]="Bracket",i[i.Quot=222]="Quot",i[i.Asterisk=106]="Asterisk",i[i.Slash=111]="Slash",i[i["/"]=191]="/",i[i["\\"]=220]="\\",i[i.Ime=229]="Ime",r.Up,r.Down,r.Left,r.Right,r.C,r.V,r.X},754209:function(t,e,n){"use strict";n.d(e,{B:function(){return i}});var r=n(144847),i=function(t,e,n,i){void 0===n&&(n=""),void 0===i&&(i=!1);var o,s,a,l,u=t.selection.getSelection(),c=u.start,d=u.end,f=Math.min(c.line,d.line),h=Math.max(c.line,d.line);if(i){for(var p="",v=f;v<=h;v++)t.getContentState().getLineAttributes(c.zoneId,v).toMap()[e]!==n&&(p=n);for(var v=f;v<=h;v++)t.getContentState().setLineAttributes(c.zoneId,v,((o={})[e]=p,o))}else{var p="",g=t.getContentState().getEntities({start:c,end:d});try{for(var y=(0,r.c)(g),m=y.next();!m.done;m=y.next())m.value.attributes[e]!==n&&(p=n)}catch(t){s={error:t}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(s)throw s.error}}t.getContentState().setAttributes({start:c,end:d},((l={})[e]=p,l))}}},532439:function(t,e,n){"use strict";n.d(e,{L:function(){return i}});var r=n(455393);function i(t){var e,n,i=[];try{for(var o=(0,r._)(Object.entries(t)),s=o.next();!s.done;s=o.next()){var a=(0,r.a)(s.value,2),l=a[0],u=a[1];i.push([l,u])}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return i}},457341:function(t,e,n){"use strict";function r(t,e,n){var r=null==n?void 0:n.value;return{configurable:!0,get:function(){if(this===t.prototype||this.hasOwnProperty(e)||"function"!=typeof r)return r;var n=r.bind(this);return Object.defineProperty(this,e,{value:n,configurable:!0,writable:!0}),n}}}n.d(e,{W:function(){return r}})},931173:function(t,e,n){"use strict";var r,i;function o(t){return function(e){return function(n,r,i){var o=i.value;i.value=function(){for(var n=[],r=0;r=e||n<0||d&&r>=o}function y(){var t,n,r,i,s=Date.now();if(g(s))return m(s);a=v(y,(n=(t=s)-l,r=t-u,i=e-n,d?Math.min(i,o-r):i))}function m(t){return(a=void 0,f&&r)?p(t):(r=i=void 0,s)}function b(){for(var t,n=[],o=0;o0&&i(f)?n>1?t(f,n-1,i,o,s):s.push.apply(s,(0,r.b)(f)):!o&&(s[s.length]=f)}}catch(t){l={error:t}}finally{try{d&&!d.done&&(u=c.return)&&u.call(c)}finally{if(l)throw l.error}}return s}(t,e=void 0===e?1:+e):[]}},454746:function(t,e,n){"use strict";n.d(e,{X:function(){return l}});var r=n(61414),i=n(692912),o=Symbol.prototype.valueOf;function s(t,e){return t===e||t!=t&&e!=e}function a(t){return null==t}function l(t,e){return function t(e,n,a,l){if(e===n)return!0;if(null==(u=e)||null==(c=n)||!(0,i.y)(e)&&!(0,i.y)(n)&&"function"!=typeof e)return s(e,n);var u,c,d=(0,r.h)(e),f=(0,r.h)(n);if(d!==f)return!1;var h=a.indexOf(e);if(h===l.indexOf(n)&&h>=0)return!0;if(a.push(e),l.push(n),("[object Array]"===d?e.length:Object.keys(e).length)!==("[object Array]"===f?n.length:Object.keys(n).length))return!1;if("[object Array]"===d){for(var p=0;p=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function o(){for(var t=[],e=0;e