UNPKG

@progress/kendo-react-editor

Version:

React Editor enables users to create rich text content through a WYSIWYG interface. KendoReact Editor package

15 lines 121 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ /** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@progress/kendo-react-buttons"),require("@progress/kendo-react-common"),require("@progress/kendo-editor-common"),require("@progress/kendo-svg-icons"),require("@progress/kendo-react-dialogs"),require("@progress/kendo-react-inputs"),require("@progress/kendo-react-form"),require("@progress/kendo-react-intl"),require("@progress/kendo-react-layout"),require("@progress/kendo-react-labels"),require("@progress/kendo-react-popup"),require("@progress/kendo-react-dropdowns"),require("@progress/kendo-react-pdf")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@progress/kendo-react-buttons","@progress/kendo-react-common","@progress/kendo-editor-common","@progress/kendo-svg-icons","@progress/kendo-react-dialogs","@progress/kendo-react-inputs","@progress/kendo-react-form","@progress/kendo-react-intl","@progress/kendo-react-layout","@progress/kendo-react-labels","@progress/kendo-react-popup","@progress/kendo-react-dropdowns","@progress/kendo-react-pdf"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactEditor={},e.React,e.PropTypes,e.KendoReactButtons,e.KendoReactCommon,e.KendoEditorCommon,e.KendoSvgIcons,e.KendoReactDialogs,e.KendoReactInputs,e.KendoReactForm,e.KendoReactIntl,e.KendoReactLayout,e.KendoReactLabels,e.KendoReactPopup,e.KendoReactDropdowns,e.KendoReactPdf)}(this,(function(e,t,l,o,r,n,i,a,s,c,d,p,m,u,g,h){"use strict";function f(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(l){if("default"!==l){var o=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,o.get?o:{enumerable:!0,get:function(){return e[l]}})}})),t.default=e,Object.freeze(t)}var b=f(t);const v='\nhtml, body {\n margin: 0;\n height: 100%;\n padding: 0;\n}\nhtml {\n min-height: 100%;\n}\nbody {\n box-sizing: border-box;\n position: relative;\n word-wrap: break-word;\n padding: 8px;\n}\nbody > .k-content {\n outline: 0;\n height: 100%;\n white-space: pre-wrap;\n}\n.k-content > p {\n margin: 0 0 1em;\n}\n.k-content table {\n white-space: pre-wrap;\n}\n.k-content .k-text-selected {\n color: HighlightText;\n background-color: Highlight;\n}\n.k-content .k-text-highlighted {\n background-color: #bbdefb;\n}\n.k-content .ProseMirror-selectednode {\n outline: 2px solid #8cf;\n}\n.ProseMirror-hideselection *::selection { background: transparent; }\n.ProseMirror-hideselection *::-moz-selection { background: transparent; }\n.ProseMirror-hideselection { caret-color: transparent; }\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n}\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n.k-editor-resize-handles-wrapper {\n position: absolute;\n visibility: hidden;\n}\n.k-editor-resize-handle {\n position: absolute;\n visibility: visible;\n background-color: #fff;\n border: 1px solid #000;\n z-index: 100;\n width: 5px;\n height: 5px;\n}\n.k-editor-resize-handle.northwest {\n top: 0;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: nw-resize;\n}\n.k-editor-resize-handle.north {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n cursor: n-resize;\n}\n.k-editor-resize-handle.northeast {\n top: 0;\n right: 0;\n transform: translate(50%, -50%);\n cursor: ne-resize;\n}\n.k-editor-resize-handle.southwest {\n left: 0;\n bottom: 0;\n transform: translate(-50%, 50%);\n cursor: sw-resize;\n}\n.k-editor-resize-handle.south {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%);\n cursor: s-resize;\n}\n.k-editor-resize-handle.southeast {\n right: 0;\n bottom: 0;\n transform: translate(50%, 50%);\n cursor: se-resize;\n}\n.k-editor-resize-handle.west {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n cursor: w-resize;\n}\n.k-editor-resize-handle.east {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n cursor: e-resize;\n}\n.k-editor-resize-wrap-element {\n display: inline-block;\n position: relative;\n}\n.ProseMirror .row-resize-handle {\n position: absolute;\n right: 0; left: 0; bottom: 0;\n transform: translate(0, 50%);\n height: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n.ProseMirror .column-resize-handle {\n position: absolute;\n right: -2px; top: 0; bottom: 0;\n width: 4px;\n z-index: 20;\n background-color: #adf;\n pointer-events: none;\n}\n.ProseMirror.resize-cursor {\n cursor: ew-resize;\n cursor: col-resize;\n}\n.ProseMirror.resize-cursor-vertical {\n cursor: sn-resize;\n cursor: row-resize;\n}\n.k-editor-resize-wrap-element table td p,\n.k-editor-resize-wrap-element table th p {\n margin: 0 auto;\n}\n',k='\n .ProseMirror .tableWrapper {\n overflow-x: auto;\n margin: 1em 0;\n }\n .ProseMirror table {\n margin: 0;\n border-collapse: collapse;\n table-layout: fixed;\n width: 100%;\n overflow: hidden;\n }\n .ProseMirror td, .ProseMirror th {\n min-width: 1em;\n border: 1px solid #ddd;\n padding: 3px 5px;\n vertical-align: top;\n box-sizing: border-box;\n position: relative;\n }\n .ProseMirror th {\n font-weight: bold;\n text-align: left;\n }\n /* Give selected cells a blue overlay */\n .ProseMirror .selectedCell:after {\n z-index: 2;\n position: absolute;\n content: "";\n left: 0; right: 0; top: 0; bottom: 0;\n background: rgba(200, 200, 255, 0.4);\n pointer-events: none;\n }\n .ProseMirror .selectedCell ::selection {\n background-color: transparent;\n }\n',y="editor.bold",C="editor.italic",w="editor.underline",S="editor.strikethrough",x="editor.subscript",E="editor.superscript",T="editor.hyperlink",P="editor.insertFile",I="editor.print",R="editor.selectAll",N="editor.cleanFormatting",L="editor.pdf",A="editor.foregroundColor",B="editor.backgroundColor",D="editor.createTable",M="editor.insertTableHint",z="editor.addRowBefore",F="editor.addRowAfter",H="editor.addColumnBefore",W="editor.addColumnAfter",K="editor.deleteRow",U="editor.deleteColumn",O="editor.deleteTable",V="editor.mergeCells",_="editor.splitCell",j="editor.hyperlink-dialog-title",q="editor.hyperlink-dialog-content-address",$="editor.hyperlink-dialog-content-title",G="editor.hyperlink-dialog-content-newwindow",J="editor.hyperlink-dialog-cancel",Q="editor.hyperlink-dialog-insert",X="editor.insertfile-dialog-title",Y="editor.insertfile-dialog-content-address",Z="editor.insertfile-dialog-content-title",ee="editor.insertfile-dialog-cancel",te="editor.insertfile-dialog-insert",le="editor.image",oe="editor.image-dialog-title",re="editor.image-address",ne="editor.image-title",ie="editor.image-altText",ae="editor.image-width",se="editor.image-height",ce="editor.image-cancel",de="editor.image-insert",pe="editor.viewHtml",me="editor.viewHtml-dialog-title",ue="editor.viewHtml-cancel",ge="editor.viewHtml-update",he="editor.unlink",fe="editor.undo",be="editor.redo",ve="editor.fontSize",ke="editor.fontName",ye="editor.format",Ce="editor.alignLeft",we="editor.alignRight",Se="editor.alignCenter",xe="editor.alignJustify",Ee="editor.indent",Te="editor.outdent",Pe="editor.orderedList",Ie="editor.bulletList",Re="editor.findReplace-tool-title",Ne="editor.findReplace-dialog-title",Le="editor.findReplace-tab-find",Ae="editor.findReplace-tab-replace",Be="editor.findReplace-findWhat",De="editor.findReplace-replaceWith",Me="editor.findReplace-replace",ze="editor.findReplace-replaceAll",Fe="editor.findReplace-matchCase",He="editor.findReplace-matchWord",We="editor.findReplace-matchCyclic",Ke="editor.findReplace-useRegExp",Ue="editor.findReplace-prevMatch",Oe="editor.findReplace-nextMatch",Ve="editor.findReplace-matches",_e="editor.findReplace-invalidRegExp",je="editor.iframeTitle",qe="editorTools.foreColorLabel",$e="editorTools.backColorLabel",Ge="editor.cellProperties",Je="editor.cellPropertiesLeftTop",Qe="editor.cellPropertiesCenterTop",Xe="editor.cellPropertiesRightTop",Ye="editor.cellPropertiesLeftMiddle",Ze="editor.cellPropertiesCenterMiddle",et="editor.cellPropertiesRightMiddle",tt="editor.cellPropertiesLeftBottom",lt="editor.cellPropertiesCenterBottom",ot="editor.cellPropertiesRightBottom",rt="editor.cellPropertiesNoAlignment",nt="editor.cellPropertiesWrap",it="editor.cellPropertiesFitToCell",at="editor.cellPropertiesApplyToAllCells",st="editor.cellPropertiesWidth",ct="editor.cellPropertiesApplyToColumn",dt="editor.cellPropertiesHeight",pt="editor.cellPropertiesApplyToRow",mt="editor.cellPropertiesAlignment",ut="editor.cellPropertiesTextControl",gt="editor.cellPropertiesCellPadding",ht="editor.cellPropertiesBackground",ft="editor.cellPropertiesBorderWidth",bt="editor.cellPropertiesBorderColor",vt="editor.cellPropertiesBorderStyle",kt="editor.cellPropertiesId",yt="editor.cellPropertiesCssClass",Ct="editor.cellPropertiesSave",wt="editor.cellPropertiesCancel",St="editor.tableProperties",xt="editor.tablePropertiesAlignLeft",Et="editor.tablePropertiesAlignCenter",Tt="editor.tablePropertiesAlignRight",Pt="editor.tablePropertiesNoAlignment",It="editor.tablePropertiesLeft",Rt="editor.tablePropertiesCenter",Nt="editor.tablePropertiesRight",Lt="editor.tablePropertiesTop",At="editor.tablePropertiesBottom",Bt="editor.tablePropertiesNone",Dt="editor.tablePropertiesUsingScopeAttribute",Mt="editor.tablePropertiesUsingIdAttributes",zt="editor.tablePropertiesRows",Ft="editor.tablePropertiesColumns",Ht="editor.tablePropertiesWidth",Wt="editor.tablePropertiesHeight",Kt="editor.tablePropertiesPosition",Ut="editor.tablePropertiesAlignment",Ot="editor.tablePropertiesCellSpacing",Vt="editor.tablePropertiesCellPadding",_t="editor.tablePropertiesTableBackground",jt="editor.tablePropertiesBorderWidth",qt="editor.tablePropertiesBorderColor",$t="editor.tablePropertiesBorderStyle",Gt="editor.tablePropertiesCollapseBorders",Jt="editor.tablePropertiesID",Qt="editor.tablePropertiesCssClass",Xt="editor.tablePropertiesAccessibility",Yt="editor.tablePropertiesCaption",Zt="editor.tablePropertiesCaptionPosition",el="editor.tablePropertiesCaptionAlignment",tl="editor.tablePropertiesHeaderRows",ll="editor.tablePropertiesHeaderCols",ol="editor.tablePropertiesAssociateHeaders",rl="editor.tablePropertiesGeneral",nl="editor.tablePropertiesAdvanced",il="editor.tablePropertiesSave",al="editor.tablePropertiesCancel",sl="editor.borderStyleNone",cl="editor.borderStyleSolid",dl="editor.borderStyleDotted",pl="editor.borderStyleDashed",ml="editor.borderStyleDouble",ul="editor.borderStyleGroove",gl="editor.borderStyleRidge",hl="editor.borderStyleInset",fl="editor.borderStyleOutset",bl="editor.borderStyleInitial",vl="editor.borderStyleInherit",kl="editor.borderStyleHidden",yl="editor.sizeAuto",Cl="editor.listStyleDisc",wl="editor.listStyleCircle",Sl="editor.listStyleSquare",xl="editor.listStyleDecimal",El="editor.listStyleUpperRoman",Tl="editor.listStyleLowerRoman",Pl="editor.listStyleUpperLatin",Il="editor.listStyleLowerLatin",Rl={[y]:"Bold",[C]:"Italic",[w]:"Underline",[S]:"Strikethrough",[x]:"Subscript",[E]:"Superscript",[he]:"Remove hyperlink",[fe]:"Undo",[be]:"Redo",[ve]:"Font Size",[ke]:"Font Name",[ye]:"Format",[Ce]:"Align text left",[we]:"Align text right",[Se]:"Center text",[xe]:"Justify",[Ee]:"Indent",[Te]:"Outdent",[Pe]:"Insert ordered list",[Ie]:"Insert unordered list",[I]:"Print",[R]:"Select All",[N]:"Clean formatting",[L]:"Export as PDF",[A]:"Color",[B]:"Background color",[D]:"Create a table",[M]:"Create a {0} x {1} table",[z]:"Add row above",[F]:"Add row below",[H]:"Add column on the left",[W]:"Add column on the right",[K]:"Delete row",[U]:"Delete column",[O]:"Delete table",[V]:"Merge cells",[_]:"Split cell",[T]:"Insert hyperlink",[j]:"Insert hyperlink",[q]:"Web address",[$]:"Title",[G]:"Open link in new window",[J]:"Cancel",[Q]:"Insert",[P]:"Insert file",[X]:"Insert file",[Y]:"Web address",[Z]:"Title",[ee]:"Cancel",[te]:"Insert",[le]:"Insert image",[oe]:"Insert image",[re]:"Web address",[ne]:"Title",[ie]:"Alternate text",[ae]:"Width (px)",[se]:"Height (px)",[ce]:"Cancel",[de]:"Insert",[pe]:"View HTML",[me]:"View HTML",[ue]:"Cancel",[ge]:"Update",[Re]:"Find and Replace",[Ne]:"Find and Replace",[Le]:"Find",[Ae]:"Replace",[Be]:"Find What:",[De]:"Replace With",[Me]:"Replace",[ze]:"Replace All",[Fe]:"Match Case",[He]:"Match whole word only",[We]:"Match cyclic (Wrap around)",[Ke]:"Regular Expression",[Ue]:"Prev",[Oe]:"Next",[Ve]:"{0} of {1} matches",[_e]:"Invalid regular expression.",[je]:"Editable area. Press Alt + F10 for toolbar.",[qe]:"Fore Color",[$e]:"Back Color",[Ge]:"Cell properties",[Je]:"Left Top",[Qe]:"Center Top",[Xe]:"Right Top",[Ye]:"Left Middle",[Ze]:"Center Middle",[et]:"Right Middle",[tt]:"Left Bottom",[lt]:"Center Bottom",[ot]:"Right Bottom",[rt]:"No Alignment",[nt]:"Wrap",[it]:"Fit to cell",[at]:"Apply to all cells",[st]:"Width",[ct]:"apply to column",[dt]:"Height",[pt]:"apply to row",[mt]:"Alignment",[ut]:"Text control",[gt]:"Cell padding",[ht]:"Background",[ft]:"Border width",[bt]:"Border color",[vt]:"Border style",[kt]:"ID",[yt]:"CSS class",[Ct]:"Save",[wt]:"Cancel",[St]:"Table properties",[xt]:"Align Left",[Et]:"Align Center",[Tt]:"Align Right",[Pt]:"No Alignment",[It]:"Left",[Rt]:"Center",[Nt]:"Right",[Lt]:"Top",[At]:"Bottom",[Bt]:"None",[Dt]:"Using 'scope' attribute",[Mt]:"Using 'id' attributes",[zt]:"Rows",[Ft]:"Columns",[Ht]:"Width",[Wt]:"Height",[Kt]:"Position",[Ut]:"Alignment",[Ot]:"Cell spacing",[Vt]:"Cell padding",[_t]:"Table background",[jt]:"Border width",[qt]:"Border color",[$t]:"Border style",[Gt]:"Collapse borders",[Jt]:"ID",[Qt]:"CSS class",[Xt]:"Accessibility",[Yt]:"Caption",[Zt]:"Position",[el]:"Alignment",[tl]:"Header rows",[ll]:"Header cols",[ol]:"Associate headers",[rl]:"General",[nl]:"Advanced",[il]:"Save",[al]:"Cancel",[sl]:"None",[cl]:"Solid",[dl]:"Dotted",[pl]:"Dashed",[ml]:"Double",[ul]:"Groove",[gl]:"Ridge",[hl]:"Inset",[fl]:"Outset",[bl]:"Initial",[vl]:"Inherit",[kl]:"Hidden",[yl]:"Auto",[Cl]:"Disc",[wl]:"Circle",[Sl]:"Square",[xl]:"Decimal",[El]:"Upper roman",[Tl]:"Lower roman",[Pl]:"Upper latin",[Il]:"Lower latin"},Nl={bold:y,italic:C,underline:w,strikethrough:S,subscript:x,superscript:E,unlink:he,undo:fe,redo:be,fontSize:ve,fontName:ke,format:ye,alignLeft:Ce,alignRight:we,alignCenter:Se,alignJustify:xe,indent:Ee,outdent:Te,orderedList:Pe,bulletList:Ie,print:I,selectAll:R,cleanFormatting:N,pdf:L,foregroundColor:A,backgroundColor:B,createTable:D,createTableHint:M,addRowBefore:z,addRowAfter:F,addColumnBefore:H,addColumnAfter:W,deleteRow:K,deleteColumn:U,deleteTable:O,mergeCells:V,splitCell:_,insertHyperlink:T,insertHyperlinkDialogTitle:j,insertHyperlinkAddress:q,insertHyperlinkTitle:$,insertHyperlinkNewWindow:G,insertHyperlinkCancel:J,insertHyperlinkInsert:Q,insertFile:P,insertFileDialogTitle:X,insertFileAddress:Y,insertFileTitle:Z,insertFileCancel:ee,insertFileInsert:te,insertImage:le,insertImageDialogTitle:oe,insertImageAddress:re,insertImageTitle:ne,insertImageAltText:ie,insertImageWidth:ae,insertImageHeight:se,insertImageCancel:ce,insertImageInsert:de,viewHtml:pe,viewHtmlDialogTitle:me,viewHtmlCancel:ue,viewHtmlUpdate:ge,findReplaceToolTitle:Re,findReplaceDialogTitle:Ne,findReplaceTabFind:Le,findReplaceTabReplace:Ae,findReplaceFindWhat:Be,findReplaceReplaceWith:De,findReplaceReplace:Me,findReplaceReplaceAll:ze,findReplaceMatchCase:Fe,findReplaceMatchWord:He,findReplaceMatchCyclic:We,findReplaceUseRegExp:Ke,findReplacePrevMatch:Ue,findReplaceNextMatch:Oe,findReplaceMatches:Ve,findReplaceInvalidRegExp:_e,iframeTitle:je,foreColorLabel:qe,backColorLabel:$e,cellProperties:Ge,cellPropertiesLeftTop:Je,cellPropertiesCenterTop:Qe,cellPropertiesRightTop:Xe,cellPropertiesLeftMiddle:Ye,cellPropertiesCenterMiddle:Ze,cellPropertiesRightMiddle:et,cellPropertiesLeftBottom:tt,cellPropertiesCenterBottom:lt,cellPropertiesRightBottom:ot,cellPropertiesNoAlignment:rt,cellPropertiesWrap:nt,cellPropertiesFitToCell:it,cellPropertiesApplyToAllCells:at,cellPropertiesWidth:st,cellPropertiesApplyToColumn:ct,cellPropertiesHeight:dt,cellPropertiesApplyToRow:pt,cellPropertiesAlignment:mt,cellPropertiesTextControl:ut,cellPropertiesCellPadding:gt,cellPropertiesBackground:ht,cellPropertiesBorderWidth:ft,cellPropertiesBorderColor:bt,cellPropertiesBorderStyle:vt,cellPropertiesId:kt,cellPropertiesCssClass:yt,cellPropertiesSave:Ct,cellPropertiesCancel:wt,tableProperties:St,tablePropertiesAlignLeft:xt,tablePropertiesAlignCenter:Et,tablePropertiesAlignRight:Tt,tablePropertiesNoAlignment:Pt,tablePropertiesLeft:It,tablePropertiesCenter:Rt,tablePropertiesRight:Nt,tablePropertiesTop:Lt,tablePropertiesBottom:At,tablePropertiesNone:Bt,tablePropertiesUsingScopeAttribute:Dt,tablePropertiesUsingIdAttributes:Mt,tablePropertiesRows:zt,tablePropertiesColumns:Ft,tablePropertiesWidth:Ht,tablePropertiesHeight:Wt,tablePropertiesPosition:Kt,tablePropertiesAlignment:Ut,tablePropertiesCellSpacing:Ot,tablePropertiesCellPadding:Vt,tablePropertiesTableBackground:_t,tablePropertiesBorderWidth:jt,tablePropertiesBorderColor:qt,tablePropertiesBorderStyle:$t,tablePropertiesCollapseBorders:Gt,tablePropertiesId:Jt,tablePropertiesCssClass:Qt,tablePropertiesAccessibility:Xt,tablePropertiesCaption:Yt,tablePropertiesCaptionPosition:Zt,tablePropertiesCaptionAlignment:el,tablePropertiesHeaderRows:tl,tablePropertiesHeaderCols:ll,tablePropertiesAssociateHeaders:ol,tablePropertiesGeneral:rl,tablePropertiesAdvanced:nl,tablePropertiesSave:il,tablePropertiesCancel:al,borderStyleNone:sl,borderStyleSolid:cl,borderStyleDotted:dl,borderStyleDashed:pl,borderStyleDouble:ml,borderStyleGroove:ul,borderStyleRidge:gl,borderStyleInset:hl,borderStyleOutset:fl,borderStyleInitial:bl,borderStyleInherit:vl,borderStyleHidden:kl,sizeAuto:yl,listStyleDisc:Cl,listStyleCircle:wl,listStyleSquare:Sl,listStyleDecimal:xl,listStyleUpperRoman:El,listStyleLowerRoman:Tl,listStyleUpperLatin:Pl,listStyleLowerLatin:Il},Ll={...n.indentRules.listsTypes};e.EditorToolsSettings=void 0,(e=>{const t={type:"button"};e.bold={...n.bold,props:{icon:"bold",svgIcon:i.boldIcon,...t},messages:{title:Nl.bold},commandName:"Bold"},e.italic={...n.italic,props:{icon:"italic",svgIcon:i.italicIcon,...t},messages:{title:Nl.italic},commandName:"Italic"},e.underline={...n.underline,props:{icon:"underline",svgIcon:i.underlineIcon,...t},messages:{title:Nl.underline},commandName:"Underline"},e.strikethrough={...n.strikethrough,props:{icon:"strikethrough",svgIcon:i.strikethroughIcon,...t},messages:{title:Nl.strikethrough},commandName:"Strikethrough"},e.subscript={...n.subscript,props:{icon:"subscript",svgIcon:i.subscriptIcon,...t},messages:{title:Nl.subscript},commandName:"Subscript"},e.superscript={...n.superscript,props:{icon:"supscript",svgIcon:i.supscriptIcon,...t},messages:{title:Nl.superscript},commandName:"Superscript"},e.link={...n.link,props:{icon:"link",svgIcon:i.linkIcon,...t},messages:{insertHyperlink:Nl.insertHyperlink,insertHyperlinkDialogTitle:Nl.insertHyperlinkDialogTitle,insertHyperlinkAddress:Nl.insertHyperlinkAddress,insertHyperlinkTitle:Nl.insertHyperlinkTitle,insertHyperlinkNewWindow:Nl.insertHyperlinkNewWindow,insertHyperlinkCancel:Nl.insertHyperlinkCancel,insertHyperlinkInsert:Nl.insertHyperlinkInsert},commandName:"Link"},e.insertFile={...n.link,props:{icon:"file-add",svgIcon:i.fileAddIcon,...t},messages:{insertHyperlink:Nl.insertFile,insertHyperlinkDialogTitle:Nl.insertFileDialogTitle,insertHyperlinkAddress:Nl.insertFileAddress,insertHyperlinkTitle:Nl.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:Nl.insertFileCancel,insertHyperlinkInsert:Nl.insertFileInsert},commandName:"InsertFile",linkTarget:!1},e.insertTable={props:{icon:"table-add",svgIcon:i.tableAddIcon,...t},messages:{createTable:Nl.createTable,createTableHint:Nl.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:i.tableRowInsertAboveIcon,...t},messages:{title:Nl.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:i.tableRowInsertBelowIcon,...t},messages:{title:Nl.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:i.tableColumnInsertLeftIcon,...t},messages:{title:Nl.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:i.tableColumnInsertRightIcon,...t},messages:{title:Nl.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:{icon:"table-row-delete",svgIcon:i.tableRowDeleteIcon,...t},messages:{title:Nl.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:{icon:"table-column-delete",svgIcon:i.tableColumnDeleteIcon,...t},messages:{title:Nl.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:{icon:"table-delete",svgIcon:i.tableDeleteIcon,...t},messages:{title:Nl.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:{icon:"cells-merge",svgIcon:i.cellsMergeIcon,...t},messages:{title:Nl.mergeCells},commandName:"MergeCells"},e.splitCell={props:{icon:"cell-split-horizontally",svgIcon:i.cellSplitHorizontallyIcon,...t},messages:{title:Nl.splitCell},commandName:"SplitCell"},e.print={props:{icon:"print",svgIcon:i.printIcon,...t},messages:{title:Nl.print}},e.selectAll={props:{icon:"select-all",svgIcon:i.selectAllIcon,...t},messages:{title:Nl.selectAll}},e.pdf={props:{icon:"file-pdf",svgIcon:i.filePdfIcon,...t},messages:{title:Nl.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:{icon:"clear-css",svgIcon:i.clearCssIcon,...t},messages:{title:Nl.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:{icon:"image",svgIcon:i.imageIcon,...t},messages:{insertImage:Nl.insertImage,insertImageDialogTitle:Nl.insertImageDialogTitle,insertImageAddress:Nl.insertImageAddress,insertImageTitle:Nl.insertImageTitle,insertImageAltText:Nl.insertImageAltText,insertImageWidth:Nl.insertImageWidth,insertImageHeight:Nl.insertImageHeight,insertImageCancel:Nl.insertImageCancel,insertImageInsert:Nl.insertImageInsert},commandName:"InsertImage"},e.viewHtml={props:{icon:"code",svgIcon:i.codeIcon,...t},messages:{viewHtml:Nl.viewHtml,viewHtmlDialogTitle:Nl.viewHtmlDialogTitle,viewHtmlCancel:Nl.viewHtmlCancel,viewHtmlUpdate:Nl.viewHtmlUpdate},commandName:"SetContent"},e.findAndReplace={props:{icon:"find",svgIcon:i.binocularsIcon,...t},messages:{findReplaceToolTitle:Nl.findReplaceToolTitle,findReplaceDialogTitle:Nl.findReplaceDialogTitle,findReplaceTabFind:Nl.findReplaceTabFind,findReplaceTabReplace:Nl.findReplaceTabReplace,findReplaceFindWhat:Nl.findReplaceFindWhat,findReplaceReplaceWith:Nl.findReplaceReplaceWith,findReplaceReplace:Nl.findReplaceReplace,findReplaceReplaceAll:Nl.findReplaceReplaceAll,findReplaceMatchCase:Nl.findReplaceMatchCase,findReplaceMatchWord:Nl.findReplaceMatchWord,findReplaceMatchCyclic:Nl.findReplaceMatchCyclic,findReplaceUseRegExp:Nl.findReplaceUseRegExp,findReplacePrevMatch:Nl.findReplacePrevMatch,findReplaceNextMatch:Nl.findReplaceNextMatch,findReplaceMatches:Nl.findReplaceMatches,findReplaceInvalidRegExp:Nl.findReplaceInvalidRegExp}},e.unlink={...n.link,props:{icon:"unlink",svgIcon:i.unlinkIcon,...t},messages:{title:Nl.unlink},commandName:"Unlink"},e.undo={props:{icon:"undo",svgIcon:i.undoIcon,...t},messages:{title:Nl.undo},commandName:"Undo"},e.redo={props:{icon:"redo",svgIcon:i.redoIcon,...t},messages:{title:Nl.redo},commandName:"Redo"},e.fontSize={style:"font-size",defaultItem:{text:Rl[Nl.fontSize],value:"",localizationKey:Nl.fontSize},items:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],commandName:"FontSize"},e.fontName={style:"font-family",defaultItem:{text:Rl[Nl.fontName],value:"",localizationKey:Nl.fontName},items:[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],commandName:"FontName"},e.formatBlock={defaultItem:{text:Rl[Nl.format],value:"",localizationKey:Nl.format},items:[{text:"Paragraph",value:"p",style:{display:"block",marginLeft:0}},{text:"Heading 1",value:"h1",style:{display:"block",fontSize:"2em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 2",value:"h2",style:{display:"block",fontSize:"1.5em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 3",value:"h3",style:{display:"block",fontSize:"1.17em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 4",value:"h4",style:{display:"block",fontSize:"1em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 5",value:"h5",style:{display:"block",fontSize:"0.83em",marginLeft:0,fontWeight:"bold"}},{text:"Heading 6",value:"h6",style:{display:"block",fontSize:"0.67em",marginLeft:0,fontWeight:"bold"}}],commandName:"FormatBlock"},e.foreColor={style:"color",colorPickerProps:{icon:"foreground-color",svgIcon:i.foregroundColorIcon,view:"palette",title:Nl.foregroundColor,ariaLabel:Nl.foreColorLabel},commandName:"ForeColor"},e.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:i.dropletIcon,view:"palette",title:Nl.backgroundColor,ariaLabel:Nl.backColorLabel},commandName:"BackColor"},e.alignLeft={actions:[...n.alignLeftRules],props:{icon:"align-left",svgIcon:i.alignLeftIcon,...t},messages:{title:Nl.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:[...n.alignRightRules],props:{icon:"align-right",svgIcon:i.alignRightIcon,...t},messages:{title:Nl.alignRight},commandName:"AlignRight"},e.alignCenter={actions:[...n.alignCenterRules],props:{icon:"align-center",svgIcon:i.alignCenterIcon,...t},messages:{title:Nl.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:[...n.alignJustifyRules],props:{icon:"align-justify",svgIcon:i.alignJustifyIcon,...t},messages:{title:Nl.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:[...n.alignRemoveRules],props:{icon:"align-remove",svgIcon:i.alignRemoveIcon,...t},messages:{},commandName:"AlignRemove"},e.indent={actions:n.indentRules.nodes,listsTypes:Ll,props:{icon:"indent",svgIcon:i.indentIcon,...t},messages:{title:Nl.indent},commandName:"Indent"},e.outdent={actions:n.outdentRules.nodes,listsTypes:Ll,props:{icon:"outdent",svgIcon:i.outdentIcon,...t},messages:{title:Nl.outdent},commandName:"Outdent"},e.orderedList={listType:Ll.orderedList,props:{icon:"list-ordered",svgIcon:i.listOrderedIcon,...t},messages:{title:Nl.orderedList},commandName:"OrderedList",types:{...Ll}},e.bulletList={listType:Ll.bulletList,props:{icon:"list-unordered",svgIcon:i.listUnorderedIcon,...t},messages:{title:Nl.bulletList},commandName:"UnorderedList",types:{...Ll}}})(e.EditorToolsSettings||(e.EditorToolsSettings={}));let Al=class extends b.Component{constructor(){super(...arguments),this.href=null,this.title=null,this.target=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const e=this.props.view,t=this.props.settings.mark,l={href:this.href?this.href.value:void 0,title:this.title?this.title.value:void 0,target:this.target&&this.target.element&&this.target.element.checked?"_blank":void 0};n.applyLink({mark:t,attrs:l},this.props.settings.commandName)(e.state,e.dispatch),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:r}=this.props,i=d.provideLocalizationService(this),{insertHyperlinkDialogTitle:p,insertHyperlinkAddress:m,insertHyperlinkTitle:u,insertHyperlinkNewWindow:g,insertHyperlinkCancel:h,insertHyperlinkInsert:f}=t.messages,v=!!e&&n.getMark(e.state,e.state.schema.marks[t.mark]),k=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-link-url",className:"k-form-label"},i.toLanguageString(m,Rl[m])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-link-url",ref:e=>{this.href=e&&e.element},defaultValue:v&&v.attrs.href||void 0,autoFocus:!0}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-link-text",className:"k-form-label"},i.toLanguageString(u,Rl[u])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-link-text",ref:e=>{this.title=e&&e.element},defaultValue:v&&v.attrs.title||void 0}))),!1!==t.linkTarget&&b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},b.createElement(s.Checkbox,{id:"k-editor-link-target",ref:e=>{this.target=e},defaultChecked:v&&!!v.attrs.target||void 0}),i.toLanguageString(g,Rl[g]))))}),y=[b.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(h,Rl[h])),b.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},i.toLanguageString(f,Rl[f]))],C=b.createElement(a.Window,{initialWidth:450,initialHeight:250,className:"k-editor-window",title:i.toLanguageString(p,Rl[p]),onClose:this.onClose,style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},k,b.createElement(a.WindowActionsBar,null,...y));return r?r(C,{content:k,actionButtons:y}):C}};d.registerForLocalization(Al);let Bl=class extends b.Component{constructor(){super(...arguments),this.src=null,this.altText=null,this.title=null,this.width=null,this.height=null,this.onClose=()=>{this.props.view.focus(),this.props.onClose()},this.onInsert=()=>{const{view:e,settings:t}=this.props,l=e.state.schema.nodes[t.node],o={src:this.src?this.src.value:null,title:this.title?this.title.value:null,alt:this.altText?this.altText.value:null,width:this.width?this.width.value:null,height:this.height?this.height.value:null},r=Object.keys(o).filter((e=>null!==o[e]&&""!==o[e])).reduce(((e,t)=>Object.assign(e,{[t]:o[t]})),{}),i=l.createAndFill(r);i&&n.insertNode(i,!0)(e.state,(l=>e.dispatch(l.setMeta("commandName",t.commandName).setMeta("args",r)))),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:r}=this.props,{insertImageDialogTitle:i,insertImageAddress:p,insertImageTitle:m,insertImageAltText:u,insertImageWidth:g,insertImageHeight:h,insertImageCancel:f,insertImageInsert:v}=t.messages,k=d.provideLocalizationService(this),y=e&&e.state;let C={};y&&y.selection instanceof n.NodeSelection&&y.selection.node.type===y.schema.nodes[t.node]&&(C=y.selection.node.attrs);const w=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(p,Rl[p])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-url",defaultValue:C.src,ref:e=>{this.src=e&&e.element},autoFocus:!0}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(u,Rl[u])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-alt",defaultValue:C.alt,ref:e=>{this.altText=e&&e.element}}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-title",className:"k-form-label"},k.toLanguageString(m,Rl[m])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-title",defaultValue:C.title,ref:e=>{this.title=e&&e.element}}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-width",className:"k-form-label"},k.toLanguageString(g,Rl[g])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{type:"text",id:"k-editor-image-width",defaultValue:C.width,ref:e=>{this.width=e&&e.element}}))),b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"k-editor-image-height",className:"k-form-label"},k.toLanguageString(h,Rl[h])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"k-editor-image-height",defaultValue:C.height,ref:e=>{this.height=e&&e.element}}))))}),S=[b.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},k.toLanguageString(f,Rl[f])),b.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},k.toLanguageString(v,Rl[v]))],x=b.createElement(a.Window,{initialWidth:500,initialHeight:350,className:"k-editor-window",title:k.toLanguageString(i,Rl[i]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},w,b.createElement(a.WindowActionsBar,null,...S));return r?r(x,{content:w,actionButtons:S}):x}};d.registerForLocalization(Bl);const Dl=new n.PluginKey("editor-props");let Ml=class extends b.Component{constructor(){super(...arguments),this.htmlArea=null,this.textAreaRef=e=>{this.htmlArea=e;const t=e&&e.element.current;t&&(t.style.resize="none")},this.onUpdate=()=>{const{view:e,settings:t}=this.props,l=n.trimWhitespace(this.htmlArea&&this.htmlArea.value||""),{preserveWhitespace:o}=Dl.getState(e.state);n.setHtml(l,t.commandName,{preserveWhitespace:o})(e.state,e.dispatch),this.onClose()},this.onClose=()=>{this.props.view.focus(),this.props.onClose()}}render(){const{view:e,settings:t,dir:l,render:r}=this.props,i=d.provideLocalizationService(this),{viewHtmlDialogTitle:c,viewHtmlCancel:p,viewHtmlUpdate:m}=t.messages,u=b.createElement(s.TextArea,{className:"k-editor-textarea",defaultValue:n.indentHtml(n.getHtml(e.state)),autoFocus:!0,autoSize:!1,ref:this.textAreaRef}),g=[b.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(p,Rl[p])),b.createElement(o.Button,{onClick:this.onUpdate,themeColor:"primary",dir:l,key:"update"},i.toLanguageString(m,Rl[m]))],h=b.createElement(a.Window,{className:"k-editor-window",title:i.toLanguageString(c,Rl[c]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!0,initialHeight:400,initialWidth:500},u,b.createElement(a.WindowActionsBar,null,...g));return r?r(h,{content:u,actionButtons:g}):h}};d.registerForLocalization(Ml);const zl={onMouseDown:e=>e.preventDefault(),onPointerDown:e=>e.preventDefault()},Fl={userSelect:"none"},Hl=function(e,...t){return t.forEach(((t,l)=>{e=e.replace("{"+l+"}",String(t))})),e},Wl=(e,t)=>t.dataItem.style?b.cloneElement(e,e.props,b.createElement("span",{style:t.dataItem.style},e.props.children)):e,Kl=["px","em","%"],Ul={animate:{openDuration:150,closeDuration:150}},Ol=[{textKey:Nl.borderStyleNone,text:Rl[Nl.borderStyleNone],value:"none"},{textKey:Nl.borderStyleSolid,text:Rl[Nl.borderStyleSolid],value:"solid"},{textKey:Nl.borderStyleDotted,text:Rl[Nl.borderStyleDotted],value:"dotted"},{textKey:Nl.borderStyleDashed,text:Rl[Nl.borderStyleDashed],value:"dashed"},{textKey:Nl.borderStyleDouble,text:Rl[Nl.borderStyleDouble],value:"double"},{textKey:Nl.borderStyleGroove,text:Rl[Nl.borderStyleGroove],value:"groove"},{textKey:Nl.borderStyleRidge,text:Rl[Nl.borderStyleRidge],value:"ridge"},{textKey:Nl.borderStyleInset,text:Rl[Nl.borderStyleInset],value:"inset"},{textKey:Nl.borderStyleOutset,text:Rl[Nl.borderStyleOutset],value:"outset"},{textKey:Nl.borderStyleInitial,text:Rl[Nl.borderStyleInitial],value:"initial"},{textKey:Nl.borderStyleInherit,text:Rl[Nl.borderStyleInherit],value:"inherit"},{textKey:Nl.borderStyleHidden,text:Rl[Nl.borderStyleHidden],value:"hidden"}];function Vl(e,t){for(let l=e.depth;l>0;l--){const o=e.node(l);if(t(o))return{node:o,depth:l}}return null}const _l=e.EditorToolsSettings.findAndReplace;let jl=class extends b.Component{constructor(e){super(e),this.onTabSelect=e=>{this.setState({selectedTab:e.selected})},this.onClose=()=>{const e=this.props.view,t=e.state,l=t.tr.setSelection(n.TextSelection.create(t.doc,t.selection.from,t.selection.to));e.updateState(t.apply(l)),e.focus(),this.props.onClose.call(void 0)},this.matchesMessage=e=>{const t=this.state.matches,l=this.state.nextMatch;let o=0,r=0;if(t&&l){const e=t.findIndex((e=>e.eq(l)));o=-1===e?t.length:e+1,r=t.length}return Hl(e,o,r)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(e=!1)=>{const t=this.props.view,{searchText:l,matchCase:o,matchCyclic:r,matchWord:i,useRegExp:a}=this.state,s={text:l,matchWord:i,matchCase:o,useRegExp:a,backward:e,matchCyclic:r},c=n.find(t.state,s);if(c){const e=t.state.tr.setSelection(c);e.scrollIntoView(),t.updateState(t.state.apply(e)),this.setState({nextMatch:c})}},this.onReplace=()=>{const e=this.props.view,t=e.state.selection,{replaceText:l}=this.state;if(!t.empty){const o=t.from,r=o+l.length,i=n.replace(t,l,e.state.tr);i.setSelection(n.TextSelection.create(i.doc,o,r)),i.scrollIntoView(),e.dispatch(i),this.setNextState({})}},this.onReplaceAll=()=>{const e=this.props.view,{searchText:t,replaceText:l,matchCase:o,matchWord:r,useRegExp:i}=this.state,a={text:t,matchWord:r,matchCase:o,useRegExp:i},s=n.replaceAll(e.state,l,a);s&&e.dispatch(s),this.setNextState({})},this.onKeyDown=e=>{13===e.keyCode?this.onFindNext():27===e.keyCode&&this.onClose()},this.onMatchCaseChecked=e=>this.setNextState({matchCase:e.value}),this.onMatchWordChecked=e=>this.setNextState({matchWord:e.value}),this.onMatchCyclicChecked=e=>this.setNextState({matchCyclic:e.value}),this.onUseRegExpChecked=e=>this.setNextState({useRegExp:e.value}),this.onSearchChange=e=>this.setNextState({searchText:e.target.value}),this.onReplaceChange=e=>this.setNextState({replaceText:e.target.value}),this.setNextState=e=>{const t={...this.state,...e,matches:void 0,nextMatch:void 0,error:void 0},l=this.props.view;if(t.searchText){const{searchText:e,matchWord:o,matchCase:r,useRegExp:i,matchCyclic:a}=t,s={text:e,matchWord:o,matchCase:r,useRegExp:i},c=l.state.selection;let d=[];try{d=n.findAll(l.state.doc,s)}catch(e){return e instanceof SyntaxError&&(t.error=this.settings.messages.findReplaceInvalidRegExp),void this.setState(t)}const p=e=>!e&&d[0]||d.find((e=>e.from>=c.from))||a&&d[0]||void 0;this.setState((e=>({...t,matches:d,nextMatch:p(e.searchText)})))}else this.setState(t)},this.state={selectedTab:0,searchText:n.selectedLineTextOnly(e.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1}}get settings(){return this.props.settings||_l}componentDidUpdate(e,t){const l=this.props.view,{matches:o=[],nextMatch:r}=this.state;if(t.nextMatch!==r){const e=l.state,t=e.tr,i=[];o.forEach((e=>{i.push({from:e.from,to:e.to,attrs:{class:r&&e.eq(r)?"k-text-selected":"k-text-highlighted"}})})),t.setMeta(n.textHighlightKey,i),t.setSelection(r||n.TextSelection.create(e.doc,e.selection.from)),l.dispatch(t)}}render(){const e=d.provideLocalizationService(this),{findReplaceDialogTitle:t,findReplaceTabFind:l,findReplaceTabReplace:n,findReplaceFindWhat:u,findReplaceReplaceWith:g,findReplaceReplace:h,findReplaceReplaceAll:f,findReplaceMatchCase:v,findReplaceMatchWord:k,findReplaceMatchCyclic:y,findReplaceUseRegExp:C,findReplacePrevMatch:w,findReplaceNextMatch:S,findReplaceMatches:x}=this.settings.messages,{matchCase:E,matchWord:T,matchCyclic:P,useRegExp:I,searchText:R,replaceText:N,nextMatch:L}=this.state,A=b.createElement("div",{className:"k-search-options"},b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-case",checked:E,onChange:this.onMatchCaseChecked,label:e.toLanguageString(v,Rl[v])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-whole",checked:T,onChange:this.onMatchWordChecked,label:e.toLanguageString(k,Rl[k])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"match-cyclic",checked:P,onChange:this.onMatchCyclicChecked,label:e.toLanguageString(y,Rl[y])})),b.createElement("span",null,b.createElement(s.Checkbox,{id:"regular-expression",checked:I,onChange:this.onUseRegExpChecked,label:e.toLanguageString(C,Rl[C])}))),B=b.createElement("div",{className:"k-matches-container"},b.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},b.createElement(r.IconWrap,{name:"chevron-left",icon:i.chevronLeftIcon}),e.toLanguageString(w,Rl[w])),b.createElement("span",null,this.matchesMessage(e.toLanguageString(x,Rl[x]))),b.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(S,Rl[S]),b.createElement(r.IconWrap,{name:"chevron-right",icon:i.chevronRightIcon}))),D=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"findWhat",className:"k-form-label"},e.toLanguageString(u,Rl[u])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"findWhat",type:"text",value:R,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}),this.state.error&&b.createElement(m.Error,null,e.toLanguageString(this.state.error,Rl[this.state.error])))))}),M=b.createElement(c.Form,{render:()=>b.createElement(c.FormElement,{horizontal:!0},b.createElement(c.FieldWrapper,null,b.createElement("label",{htmlFor:"replaceWith",className:"k-form-label"},e.toLanguageString(g,Rl[g])),b.createElement("div",{className:"k-form-field-wrap"},b.createElement(s.Input,{id:"replaceWith",type:"text",value:N,onChange:this.onReplaceChange}))))});return b.createElement(a.Window,{title:e.toLanguageString(t,Rl[t]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:()=>null,maximizeButton:()=>null},b.createElement(p.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},b.createElement(p.TabStripTab,{title:e.toLanguageString(l,Rl[l])},D,A,B),b.createElement(p.TabStripTab,{title:e.toLanguageString(n,Rl[n])},D,M,b.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},b.createElement(o.Button,{disabled:!L,onClick:this.onReplace},e.toLanguageString(h,Rl[h])),b.createElement(o.Button,{disabled:!L,onClick:this.onReplaceAll},e.toLanguageString(f,Rl[f]))),A,B)))}};d.registerForLocalization(jl),e.EditorDialogs=void 0,(e=>{e.InsertLinkDialog=class extends Al{};e.InsertImageDialog=class extends Bl{};e.ViewHtmlDialog=class extends Ml{};e.FindAndReplaceDialog=class extends jl{}})(e.EditorDialogs||(e.EditorDialogs={}));const{bold:ql,underline:$l,italic:Gl}=e.EditorToolsSettings,Jl="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);e.EditorUtils=void 0,(e=>{e.alignBlocks=function(e,t,l){return!!n.alignBlocks(t,l)(e.state,e.dispatch)},e.applyInlineStyle=function(e,t,l){return n.applyInlineStyle(t,l)(e.state,e.dispatch)},e.applyLink=function(e,t,l){return n.applyLink(t,l)(e.state,e.dispatch)},e.canIndentList=function(e,t){return n.canIndentAsListItem(e,t)},e.canInsert=function(e,t){return n.canInsert(e,t)},e.canOutdentList=function(e,t){return n.canOutdentAsListItem(e,{listsTypes:t,nodes:[]})},e.convertMsLists=function(e){return n.convertMsLists(e)},e.createDocument=function(e,t,l){return n.parseContent(n.trimWhitespace(t),e,void 0!==l?l:{preserveWhitespace:"full"})},e.createTable=function(e,t,l){return n.createTable(e,t,l)},e.formatBlockElements=function(e,t,l){return n.formatBlockElements(t,l)(e.state,e.dispatch)},e.getBlockFormats=function(e){return n.getBlockFormats(e)},e.getHtml=function(e){return n.getHtml(e)},e.getInlineStyles=function(e,t){return n.getInlineStyles(e,t)},e.getMark=function(e,t){return n.getMark(e,t)},e.hasMark=function(e,t){return n.hasMark(e,t)},e.hasNode=function(e,t){return n.hasNode(e,t)},e.indentBlocks=function(e,t,l,o){return!!n.indentBlocks(t,l,o)(e.state,e.dispatch)},e.indentHtml=function(e){return n.indentHtml(e)},e.insertNode=function(e,t,l){n.insertNode(t,l)(e.state,e.dispatch)},e.isAligned=function(e,t){return n.isAligned(e,t)},e.isIndented=function(e,t,l){return n.isIndented(e,t,l)},e.removeComments=function(e){return n.removeComments(e)},e.removeTag=function(e,t){return n.removeTag(e,t)},e.pasteCleanup=function(e,t){return n.pasteCleanup(e,t)},e.sanitizeClassAttr=function(e){n.sanitizeClassAttr(e)},e.sanitizeStyleAttr=function(e){n.sanitizeStyleAttr(e)},e.removeAttribute=function(e){n.removeAttribute(e)},e.sanitize=function(e){return n.sanitize(e)},e.replaceImageSourcesFromRtf=function(e,t){return n.replaceImageSourcesFromRtf(e,t)},e.textHighlight=function(e){return n.textHighlight(e)},e.imageResizing=function(e){return n.imageResizing(e)},e.tableResizing=function(){return n.tableResizing()},e.setHtml=function(e,t,l,o){const r=n.trimWhitespace(t);n.setHtml(r,l,o)(e.state,e.dispatch)},e.toggleInlineFormat=function(e,t,l,o){return n.toggleInlineFormat(t,l,o)(e.state,e.dispatch)},e.toggleList=function(e,t,l){return n.toggleList(e.state,e.dispatch,e,t,l)},e.getShortcuts=function(e){return(e=>{const t=n.chainCommands(n.exitCode,((t,l)=>{const o=e&&e.types&&e.types.hardBreak||"hard_break",r=t.schema.nodes[o];return l&&l(t.tr.replaceSelectionWith(r.create()).scrollIntoView()),!0})),l=e&&e.types&&e.types.listItem||"list_item",o=e&&e.toolsSettings||{};return{"Mod-b":(e,t)=>n.toggleInlineFormat(o.bold||ql)(e,t),"Mod-i":(e,t)=>n.toggleInlineFormat(o.italic||Gl)(e,t),"Mod-u":(e,t)=>n.toggleInlineFormat(o.underline||$l)(e,t),"Mod-z":n.undo,"Shift-Mod-z":n.redo,...Jl?{}:{"Mod-y":n.redo},Backspace:n.undoInputRule,"Mod-Enter":t,"Shift-Enter":t,...Jl?{"Ctrl-Enter":t}:{},Enter:(e,t)=>n.splitListItem(e.schema.nodes[l])(e,t),Tab:n.goToNextCell(1),"Shift-Tab":n.goToNextCell(-1)}})(e)},e.propsKey=Dl,e.imageResizeKey=n.imageResizeKey,e.marks={...n.marks},e.nodes={...n.nodes}})(e.EditorUtils||(e.EditorUtils={}));const Ql=(t,l)=>{const o=l.tr||t.state.tr.setSelection(new n.AllSelection(t.state.doc)).replaceSelectionWith(l.doc||e.EditorUtils.createDocument(t.state.schema,l.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(o))},Xl="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),Yl=Object.freeze({name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"13.2.0",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"}),{link:Zl,bold:eo,italic:to,underline:lo}=e.EditorToolsSettings,oo=class extends b.Component{constructor(t){super(t),this.state={view:void 0,linkDialog:!1},this._element=null,this._contentElement=null,this.iframe=null,this.trOnChange=null,this.htmlOnChange=null,this.showLicenseWatermark=!1,this.focus=()=>{this.view&&this.view.focus()},this.renderDialog=(e,t,l)=>this.state[l]&&b.createElement(e,{view:this.view,settings:t,dir:this.props.dir,onClose:()=>this.setState({[l]:!1})}),this.renderTool=(e,t,l=!1)=>{const r=b.createElement(e,{view:this.view,dir:this.props.dir,key:t,className:l?"k-toolbar-button":void 0});return r.type===o.ToolbarSeparator?b.createElement(e,{key:t}):r},this.updateTools=(e,t)=>{this.setState({view:e})},this.filterTransaction=(e,t)=>{const l={target:this,transaction:e,state:t};return!1!==(this.props.onExecute&&this.props.onExecute.call(void 0,l))},this.onPasteHtml=e=>{if(this.props.onPasteHtml&&this.pasteEvent){const t={target:this,pastedHtml:e,nativeEvent:this.pasteEvent},l=this.props.onPasteHtml.call(void 0,t);if(this.pasteEvent=void 0,"string"==typeof l)return l}return e},this.dispatchTransaction=t=>{const l=t.docChanged;if(this.props.onChange&&l){this.trOnChange=t;const l=t.doc,o=t.doc.type.schema,r={target:this,value:l,html:"",transaction:t,schema:o};Object.defineProperty(r,"html",{get:()=>(this.htmlOnChange=e.EditorUtils.getHtml({doc:l,schema:o}),this.htmlOnChange)}),this.props.onChange.call(void 0,r)}this.view&&(void 0===this.props.value||!l)&&this.view.updateState(this.view.state.apply(t))},this.onFocus=(e,t)=>{if(this.props.onFocus){const e={target:this,nativeEvent:t};this.props.onFocus.call(void 0,e)}return!1},this.onBlur=(e,t)=>{if(this.props.onBlur){const e={target:this,nativeEvent:t};this.props.onBlur.call(void 0,e)}return!1},this.onPaste=(e,t)=>(this.props.onPasteHtml&&(this.pasteEvent=t),!1),this.onIFrameInit=e=>{if(this.props.onIFrameInit){const t={target:this,iframe:e};this.props.onIFrameInit.call(void 0,t)}return!1},this.showLicenseWatermark=!r.validatePackage(Yl,{component:"Editor"}),this.licenseMessage=r.getLicenseMessage(Yl)}get