@progress/kendo-react-editor 11.0.0-develop.3 → 11.0.0-develop.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-editor.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!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-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-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.KendoReactPopup,e.KendoReactDropdowns,e.KendoReactPdf)}(this,(function(e,t,l,o,n,r,i,a,s,c,d,p,m,u,g){"use strict";function h(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 f=h(t);const b='\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, .k-content::selection {\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',v='\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',k="editor.bold",y="editor.italic",C="editor.underline",w="editor.strikethrough",S="editor.subscript",E="editor.superscript",x="editor.hyperlink",T="editor.insertFile",P="editor.print",I="editor.selectAll",N="editor.cleanFormatting",R="editor.pdf",L="editor.foregroundColor",A="editor.backgroundColor",B="editor.createTable",D="editor.insertTableHint",M="editor.addRowBefore",F="editor.addRowAfter",z="editor.addColumnBefore",H="editor.addColumnAfter",W="editor.deleteRow",K="editor.deleteColumn",U="editor.deleteTable",O="editor.mergeCells",V="editor.splitCell",_="editor.hyperlink-dialog-title",j="editor.hyperlink-dialog-content-address",q="editor.hyperlink-dialog-content-title",$="editor.hyperlink-dialog-content-newwindow",G="editor.hyperlink-dialog-cancel",J="editor.hyperlink-dialog-insert",Q="editor.insertfile-dialog-title",X="editor.insertfile-dialog-content-address",Y="editor.insertfile-dialog-content-title",Z="editor.insertfile-dialog-cancel",ee="editor.insertfile-dialog-insert",te="editor.image",le="editor.image-dialog-title",oe="editor.image-address",ne="editor.image-title",re="editor.image-altText",ie="editor.image-width",ae="editor.image-height",se="editor.image-cancel",ce="editor.image-insert",de="editor.viewHtml",pe="editor.viewHtml-dialog-title",me="editor.viewHtml-cancel",ue="editor.viewHtml-update",ge="editor.unlink",he="editor.undo",fe="editor.redo",be="editor.fontSize",ve="editor.fontName",ke="editor.format",ye="editor.alignLeft",Ce="editor.alignRight",we="editor.alignCenter",Se="editor.alignJustify",Ee="editor.indent",xe="editor.outdent",Te="editor.orderedList",Pe="editor.bulletList",Ie="editor.findReplace-tool-title",Ne="editor.findReplace-dialog-title",Re="editor.findReplace-tab-find",Le="editor.findReplace-tab-replace",Ae="editor.findReplace-findWhat",Be="editor.findReplace-replaceWith",De="editor.findReplace-replace",Me="editor.findReplace-replaceAll",Fe="editor.findReplace-matchCase",ze="editor.findReplace-matchWord",He="editor.findReplace-matchCyclic",We="editor.findReplace-useRegExp",Ke="editor.findReplace-prevMatch",Ue="editor.findReplace-nextMatch",Oe="editor.findReplace-matches",Ve="editor.iframeTitle",_e="editorTools.foreColorLabel",je="editorTools.backColorLabel",qe="editor.cellProperties",$e="editor.cellPropertiesLeftTop",Ge="editor.cellPropertiesCenterTop",Je="editor.cellPropertiesRightTop",Qe="editor.cellPropertiesLeftMiddle",Xe="editor.cellPropertiesCenterMiddle",Ye="editor.cellPropertiesRightMiddle",Ze="editor.cellPropertiesLeftBottom",et="editor.cellPropertiesCenterBottom",tt="editor.cellPropertiesRightBottom",lt="editor.cellPropertiesNoAlignment",ot="editor.cellPropertiesWrap",nt="editor.cellPropertiesFitToCell",rt="editor.cellPropertiesApplyToAllCells",it="editor.cellPropertiesWidth",at="editor.cellPropertiesApplyToColumn",st="editor.cellPropertiesHeight",ct="editor.cellPropertiesApplyToRow",dt="editor.cellPropertiesAlignment",pt="editor.cellPropertiesTextControl",mt="editor.cellPropertiesCellPadding",ut="editor.cellPropertiesBackground",gt="editor.cellPropertiesBorderWidth",ht="editor.cellPropertiesBorderColor",ft="editor.cellPropertiesBorderStyle",bt="editor.cellPropertiesId",vt="editor.cellPropertiesCssClass",kt="editor.cellPropertiesSave",yt="editor.cellPropertiesCancel",Ct="editor.tableProperties",wt="editor.tablePropertiesAlignLeft",St="editor.tablePropertiesAlignCenter",Et="editor.tablePropertiesAlignRight",xt="editor.tablePropertiesNoAlignment",Tt="editor.tablePropertiesLeft",Pt="editor.tablePropertiesCenter",It="editor.tablePropertiesRight",Nt="editor.tablePropertiesTop",Rt="editor.tablePropertiesBottom",Lt="editor.tablePropertiesNone",At="editor.tablePropertiesUsingScopeAttribute",Bt="editor.tablePropertiesUsingIdAttributes",Dt="editor.tablePropertiesRows",Mt="editor.tablePropertiesColumns",Ft="editor.tablePropertiesWidth",zt="editor.tablePropertiesHeight",Ht="editor.tablePropertiesPosition",Wt="editor.tablePropertiesAlignment",Kt="editor.tablePropertiesCellSpacing",Ut="editor.tablePropertiesCellPadding",Ot="editor.tablePropertiesTableBackground",Vt="editor.tablePropertiesBorderWidth",_t="editor.tablePropertiesBorderColor",jt="editor.tablePropertiesBorderStyle",qt="editor.tablePropertiesCollapseBorders",$t="editor.tablePropertiesID",Gt="editor.tablePropertiesCssClass",Jt="editor.tablePropertiesAccessibility",Qt="editor.tablePropertiesCaption",Xt="editor.tablePropertiesCaptionPosition",Yt="editor.tablePropertiesCaptionAlignment",Zt="editor.tablePropertiesHeaderRows",el="editor.tablePropertiesHeaderCols",tl="editor.tablePropertiesAssociateHeaders",ll="editor.tablePropertiesGeneral",ol="editor.tablePropertiesAdvanced",nl="editor.tablePropertiesSave",rl="editor.tablePropertiesCancel",il="editor.borderStyleNone",al="editor.borderStyleSolid",sl="editor.borderStyleDotted",cl="editor.borderStyleDashed",dl="editor.borderStyleDouble",pl="editor.borderStyleGroove",ml="editor.borderStyleRidge",ul="editor.borderStyleInset",gl="editor.borderStyleOutset",hl="editor.borderStyleInitial",fl="editor.borderStyleInherit",bl="editor.borderStyleHidden",vl="editor.sizeAuto",kl={[k]:"Bold",[y]:"Italic",[C]:"Underline",[w]:"Strikethrough",[S]:"Subscript",[E]:"Superscript",[ge]:"Remove hyperlink",[he]:"Undo",[fe]:"Redo",[be]:"Font Size",[ve]:"Font Name",[ke]:"Format",[ye]:"Align text left",[Ce]:"Align text right",[we]:"Center text",[Se]:"Justify",[Ee]:"Indent",[xe]:"Outdent",[Te]:"Insert ordered list",[Pe]:"Insert unordered list",[P]:"Print",[I]:"Select All",[N]:"Clean formatting",[R]:"Export as PDF",[L]:"Color",[A]:"Background color",[B]:"Create a table",[D]:"Create a {0} x {1} table",[M]:"Add row above",[F]:"Add row below",[z]:"Add column on the left",[H]:"Add column on the right",[W]:"Delete row",[K]:"Delete column",[U]:"Delete table",[O]:"Merge cells",[V]:"Split cell",[x]:"Insert hyperlink",[_]:"Insert hyperlink",[j]:"Web address",[q]:"Title",[$]:"Open link in new window",[G]:"Cancel",[J]:"Insert",[T]:"Insert file",[Q]:"Insert file",[X]:"Web address",[Y]:"Title",[Z]:"Cancel",[ee]:"Insert",[te]:"Insert image",[le]:"Insert image",[oe]:"Web address",[ne]:"Title",[re]:"Alternate text",[ie]:"Width (px)",[ae]:"Height (px)",[se]:"Cancel",[ce]:"Insert",[de]:"View HTML",[pe]:"View HTML",[me]:"Cancel",[ue]:"Update",[Ie]:"Find and Replace",[Ne]:"Find and Replace",[Re]:"Find",[Le]:"Replace",[Ae]:"Find What:",[Be]:"Replace With",[De]:"Replace",[Me]:"Replace All",[Fe]:"Match Case",[ze]:"Match whole word only",[He]:"Match cyclic (Wrap around)",[We]:"Regular Expression",[Ke]:"Prev",[Ue]:"Next",[Oe]:"{0} of {1} matches",[Ve]:"Editable area. Press Alt + F10 for toolbar.",[_e]:"Fore Color",[je]:"Back Color",[qe]:"Cell properties",[$e]:"Left Top",[Ge]:"Center Top",[Je]:"Right Top",[Qe]:"Left Middle",[Xe]:"Center Middle",[Ye]:"Right Middle",[Ze]:"Left Bottom",[et]:"Center Bottom",[tt]:"Right Bottom",[lt]:"No Alignment",[ot]:"Wrap",[nt]:"Fit to cell",[rt]:"Apply to all cells",[it]:"Width",[at]:"apply to column",[st]:"Height",[ct]:"apply to row",[dt]:"Alignment",[pt]:"Text control",[mt]:"Cell padding",[ut]:"Background",[gt]:"Border width",[ht]:"Border color",[ft]:"Border style",[bt]:"ID",[vt]:"CSS class",[kt]:"Save",[yt]:"Cancel",[Ct]:"Table properties",[wt]:"Align Left",[St]:"Align Center",[Et]:"Align Right",[xt]:"No Alignment",[Tt]:"Left",[Pt]:"Center",[It]:"Right",[Nt]:"Top",[Rt]:"Bottom",[Lt]:"None",[At]:"Using 'scope' attribute",[Bt]:"Using 'id' attributes",[Dt]:"Rows",[Mt]:"Columns",[Ft]:"Width",[zt]:"Height",[Ht]:"Position",[Wt]:"Alignment",[Kt]:"Cell spacing",[Ut]:"Cell padding",[Ot]:"Table background",[Vt]:"Border width",[_t]:"Border color",[jt]:"Border style",[qt]:"Collapse borders",[$t]:"ID",[Gt]:"CSS class",[Jt]:"Accessibility",[Qt]:"Caption",[Xt]:"Position",[Yt]:"Alignment",[Zt]:"Header rows",[el]:"Header cols",[tl]:"Associate headers",[ll]:"General",[ol]:"Advanced",[nl]:"Save",[rl]:"Cancel",[il]:"None",[al]:"Solid",[sl]:"Dotted",[cl]:"Dashed",[dl]:"Double",[pl]:"Groove",[ml]:"Ridge",[ul]:"Inset",[gl]:"Outset",[hl]:"Initial",[fl]:"Inherit",[bl]:"Hidden",[vl]:"Auto"},yl={bold:k,italic:y,underline:C,strikethrough:w,subscript:S,superscript:E,unlink:ge,undo:he,redo:fe,fontSize:be,fontName:ve,format:ke,alignLeft:ye,alignRight:Ce,alignCenter:we,alignJustify:Se,indent:Ee,outdent:xe,orderedList:Te,bulletList:Pe,print:P,selectAll:I,cleanFormatting:N,pdf:R,foregroundColor:L,backgroundColor:A,createTable:B,createTableHint:D,addRowBefore:M,addRowAfter:F,addColumnBefore:z,addColumnAfter:H,deleteRow:W,deleteColumn:K,deleteTable:U,mergeCells:O,splitCell:V,insertHyperlink:x,insertHyperlinkDialogTitle:_,insertHyperlinkAddress:j,insertHyperlinkTitle:q,insertHyperlinkNewWindow:$,insertHyperlinkCancel:G,insertHyperlinkInsert:J,insertFile:T,insertFileDialogTitle:Q,insertFileAddress:X,insertFileTitle:Y,insertFileCancel:Z,insertFileInsert:ee,insertImage:te,insertImageDialogTitle:le,insertImageAddress:oe,insertImageTitle:ne,insertImageAltText:re,insertImageWidth:ie,insertImageHeight:ae,insertImageCancel:se,insertImageInsert:ce,viewHtml:de,viewHtmlDialogTitle:pe,viewHtmlCancel:me,viewHtmlUpdate:ue,findReplaceToolTitle:Ie,findReplaceDialogTitle:Ne,findReplaceTabFind:Re,findReplaceTabReplace:Le,findReplaceFindWhat:Ae,findReplaceReplaceWith:Be,findReplaceReplace:De,findReplaceReplaceAll:Me,findReplaceMatchCase:Fe,findReplaceMatchWord:ze,findReplaceMatchCyclic:He,findReplaceUseRegExp:We,findReplacePrevMatch:Ke,findReplaceNextMatch:Ue,findReplaceMatches:Oe,iframeTitle:Ve,foreColorLabel:_e,backColorLabel:je,cellProperties:qe,cellPropertiesLeftTop:$e,cellPropertiesCenterTop:Ge,cellPropertiesRightTop:Je,cellPropertiesLeftMiddle:Qe,cellPropertiesCenterMiddle:Xe,cellPropertiesRightMiddle:Ye,cellPropertiesLeftBottom:Ze,cellPropertiesCenterBottom:et,cellPropertiesRightBottom:tt,cellPropertiesNoAlignment:lt,cellPropertiesWrap:ot,cellPropertiesFitToCell:nt,cellPropertiesApplyToAllCells:rt,cellPropertiesWidth:it,cellPropertiesApplyToColumn:at,cellPropertiesHeight:st,cellPropertiesApplyToRow:ct,cellPropertiesAlignment:dt,cellPropertiesTextControl:pt,cellPropertiesCellPadding:mt,cellPropertiesBackground:ut,cellPropertiesBorderWidth:gt,cellPropertiesBorderColor:ht,cellPropertiesBorderStyle:ft,cellPropertiesId:bt,cellPropertiesCssClass:vt,cellPropertiesSave:kt,cellPropertiesCancel:yt,tableProperties:Ct,tablePropertiesAlignLeft:wt,tablePropertiesAlignCenter:St,tablePropertiesAlignRight:Et,tablePropertiesNoAlignment:xt,tablePropertiesLeft:Tt,tablePropertiesCenter:Pt,tablePropertiesRight:It,tablePropertiesTop:Nt,tablePropertiesBottom:Rt,tablePropertiesNone:Lt,tablePropertiesUsingScopeAttribute:At,tablePropertiesUsingIdAttributes:Bt,tablePropertiesRows:Dt,tablePropertiesColumns:Mt,tablePropertiesWidth:Ft,tablePropertiesHeight:zt,tablePropertiesPosition:Ht,tablePropertiesAlignment:Wt,tablePropertiesCellSpacing:Kt,tablePropertiesCellPadding:Ut,tablePropertiesTableBackground:Ot,tablePropertiesBorderWidth:Vt,tablePropertiesBorderColor:_t,tablePropertiesBorderStyle:jt,tablePropertiesCollapseBorders:qt,tablePropertiesId:$t,tablePropertiesCssClass:Gt,tablePropertiesAccessibility:Jt,tablePropertiesCaption:Qt,tablePropertiesCaptionPosition:Xt,tablePropertiesCaptionAlignment:Yt,tablePropertiesHeaderRows:Zt,tablePropertiesHeaderCols:el,tablePropertiesAssociateHeaders:tl,tablePropertiesGeneral:ll,tablePropertiesAdvanced:ol,tablePropertiesSave:nl,tablePropertiesCancel:rl,borderStyleNone:il,borderStyleSolid:al,borderStyleDotted:sl,borderStyleDashed:cl,borderStyleDouble:dl,borderStyleGroove:pl,borderStyleRidge:ml,borderStyleInset:ul,borderStyleOutset:gl,borderStyleInitial:hl,borderStyleInherit:fl,borderStyleHidden:bl,sizeAuto:vl},Cl={...r.indentRules.listsTypes};e.EditorToolsSettings=void 0,(e=>{const t={type:"button"};e.bold={...r.bold,props:{icon:"bold",svgIcon:i.boldIcon,...t},messages:{title:yl.bold},commandName:"Bold"},e.italic={...r.italic,props:{icon:"italic",svgIcon:i.italicIcon,...t},messages:{title:yl.italic},commandName:"Italic"},e.underline={...r.underline,props:{icon:"underline",svgIcon:i.underlineIcon,...t},messages:{title:yl.underline},commandName:"Underline"},e.strikethrough={...r.strikethrough,props:{icon:"strikethrough",svgIcon:i.strikethroughIcon,...t},messages:{title:yl.strikethrough},commandName:"Strikethrough"},e.subscript={...r.subscript,props:{icon:"subscript",svgIcon:i.subscriptIcon,...t},messages:{title:yl.subscript},commandName:"Subscript"},e.superscript={...r.superscript,props:{icon:"supscript",svgIcon:i.supscriptIcon,...t},messages:{title:yl.superscript},commandName:"Superscript"},e.link={...r.link,props:{icon:"link",svgIcon:i.linkIcon,...t},messages:{insertHyperlink:yl.insertHyperlink,insertHyperlinkDialogTitle:yl.insertHyperlinkDialogTitle,insertHyperlinkAddress:yl.insertHyperlinkAddress,insertHyperlinkTitle:yl.insertHyperlinkTitle,insertHyperlinkNewWindow:yl.insertHyperlinkNewWindow,insertHyperlinkCancel:yl.insertHyperlinkCancel,insertHyperlinkInsert:yl.insertHyperlinkInsert},commandName:"Link"},e.insertFile={...r.link,props:{icon:"file-add",svgIcon:i.fileAddIcon,...t},messages:{insertHyperlink:yl.insertFile,insertHyperlinkDialogTitle:yl.insertFileDialogTitle,insertHyperlinkAddress:yl.insertFileAddress,insertHyperlinkTitle:yl.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:yl.insertFileCancel,insertHyperlinkInsert:yl.insertFileInsert},commandName:"InsertFile",linkTarget:!1},e.insertTable={props:{icon:"table-add",svgIcon:i.tableAddIcon,...t},messages:{createTable:yl.createTable,createTableHint:yl.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:i.tableRowInsertAboveIcon,...t},messages:{title:yl.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:i.tableRowInsertBelowIcon,...t},messages:{title:yl.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:i.tableColumnInsertLeftIcon,...t},messages:{title:yl.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:i.tableColumnInsertRightIcon,...t},messages:{title:yl.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:{icon:"table-row-delete",svgIcon:i.tableRowDeleteIcon,...t},messages:{title:yl.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:{icon:"table-column-delete",svgIcon:i.tableColumnDeleteIcon,...t},messages:{title:yl.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:{icon:"table-delete",svgIcon:i.tableDeleteIcon,...t},messages:{title:yl.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:{icon:"cells-merge",svgIcon:i.cellsMergeIcon,...t},messages:{title:yl.mergeCells},commandName:"MergeCells"},e.splitCell={props:{icon:"cell-split-horizontally",svgIcon:i.cellSplitHorizontallyIcon,...t},messages:{title:yl.splitCell},commandName:"SplitCell"},e.print={props:{icon:"print",svgIcon:i.printIcon,...t},messages:{title:yl.print}},e.selectAll={props:{icon:"select-all",svgIcon:i.selectAllIcon,...t},messages:{title:yl.selectAll}},e.pdf={props:{icon:"file-pdf",svgIcon:i.filePdfIcon,...t},messages:{title:yl.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:{icon:"clear-css",svgIcon:i.clearCssIcon,...t},messages:{title:yl.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:{icon:"image",svgIcon:i.imageIcon,...t},messages:{insertImage:yl.insertImage,insertImageDialogTitle:yl.insertImageDialogTitle,insertImageAddress:yl.insertImageAddress,insertImageTitle:yl.insertImageTitle,insertImageAltText:yl.insertImageAltText,insertImageWidth:yl.insertImageWidth,insertImageHeight:yl.insertImageHeight,insertImageCancel:yl.insertImageCancel,insertImageInsert:yl.insertImageInsert},commandName:"InsertImage"},e.viewHtml={props:{icon:"code",svgIcon:i.codeIcon,...t},messages:{viewHtml:yl.viewHtml,viewHtmlDialogTitle:yl.viewHtmlDialogTitle,viewHtmlCancel:yl.viewHtmlCancel,viewHtmlUpdate:yl.viewHtmlUpdate},commandName:"SetContent"},e.findAndReplace={props:{icon:"find",svgIcon:i.binocularsIcon,...t},messages:{findReplaceToolTitle:yl.findReplaceToolTitle,findReplaceDialogTitle:yl.findReplaceDialogTitle,findReplaceTabFind:yl.findReplaceTabFind,findReplaceTabReplace:yl.findReplaceTabReplace,findReplaceFindWhat:yl.findReplaceFindWhat,findReplaceReplaceWith:yl.findReplaceReplaceWith,findReplaceReplace:yl.findReplaceReplace,findReplaceReplaceAll:yl.findReplaceReplaceAll,findReplaceMatchCase:yl.findReplaceMatchCase,findReplaceMatchWord:yl.findReplaceMatchWord,findReplaceMatchCyclic:yl.findReplaceMatchCyclic,findReplaceUseRegExp:yl.findReplaceUseRegExp,findReplacePrevMatch:yl.findReplacePrevMatch,findReplaceNextMatch:yl.findReplaceNextMatch,findReplaceMatches:yl.findReplaceMatches}},e.unlink={...r.link,props:{icon:"unlink",svgIcon:i.unlinkIcon,...t},messages:{title:yl.unlink},commandName:"Unlink"},e.undo={props:{icon:"undo",svgIcon:i.undoIcon,...t},messages:{title:yl.undo},commandName:"Undo"},e.redo={props:{icon:"redo",svgIcon:i.redoIcon,...t},messages:{title:yl.redo},commandName:"Redo"},e.fontSize={style:"font-size",defaultItem:{text:kl[yl.fontSize],value:"",localizationKey:yl.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:kl[yl.fontName],value:"",localizationKey:yl.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:kl[yl.format],value:"",localizationKey:yl.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:yl.foregroundColor,ariaLabel:yl.foreColorLabel},commandName:"ForeColor"},e.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:i.dropletIcon,view:"palette",title:yl.backgroundColor,ariaLabel:yl.backColorLabel},commandName:"BackColor"},e.alignLeft={actions:[...r.alignLeftRules],props:{icon:"align-left",svgIcon:i.alignLeftIcon,...t},messages:{title:yl.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:[...r.alignRightRules],props:{icon:"align-right",svgIcon:i.alignRightIcon,...t},messages:{title:yl.alignRight},commandName:"AlignRight"},e.alignCenter={actions:[...r.alignCenterRules],props:{icon:"align-center",svgIcon:i.alignCenterIcon,...t},messages:{title:yl.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:[...r.alignJustifyRules],props:{icon:"align-justify",svgIcon:i.alignJustifyIcon,...t},messages:{title:yl.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:[...r.alignRemoveRules],props:{icon:"align-remove",svgIcon:i.alignRemoveIcon,...t},messages:{},commandName:"AlignRemove"},e.indent={actions:r.indentRules.nodes,listsTypes:Cl,props:{icon:"indent",svgIcon:i.indentIcon,...t},messages:{title:yl.indent},commandName:"Indent"},e.outdent={actions:r.outdentRules.nodes,listsTypes:Cl,props:{icon:"outdent",svgIcon:i.outdentIcon,...t},messages:{title:yl.outdent},commandName:"Outdent"},e.orderedList={listType:Cl.orderedList,props:{icon:"list-ordered",svgIcon:i.listOrderedIcon,...t},messages:{title:yl.orderedList},commandName:"OrderedList",types:{...Cl}},e.bulletList={listType:Cl.bulletList,props:{icon:"list-unordered",svgIcon:i.listUnorderedIcon,...t},messages:{title:yl.bulletList},commandName:"UnorderedList",types:{...Cl}}})(e.EditorToolsSettings||(e.EditorToolsSettings={}));let wl=class extends f.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};r.applyLink({mark:t,attrs:l},this.props.settings.commandName)(e.state,e.dispatch),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:n}=this.props,i=d.provideLocalizationService(this),{insertHyperlinkDialogTitle:p,insertHyperlinkAddress:m,insertHyperlinkTitle:u,insertHyperlinkNewWindow:g,insertHyperlinkCancel:h,insertHyperlinkInsert:b}=t.messages,v=!!e&&r.getMark(e.state,e.state.schema.marks[t.mark]),k=f.createElement(c.Form,{render:()=>f.createElement(c.FormElement,{horizontal:!0},f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-link-url",className:"k-form-label"},i.toLanguageString(m,kl[m])),f.createElement("div",{className:"k-form-field-wrap"},f.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}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-link-text",className:"k-form-label"},i.toLanguageString(u,kl[u])),f.createElement("div",{className:"k-form-field-wrap"},f.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&&f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},f.createElement(s.Checkbox,{id:"k-editor-link-target",ref:e=>{this.target=e},defaultChecked:v&&!!v.attrs.target||void 0}),i.toLanguageString(g,kl[g]))))}),y=[f.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(h,kl[h])),f.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},i.toLanguageString(b,kl[b]))],C=f.createElement(a.Window,{initialWidth:450,initialHeight:250,className:"k-editor-window",title:i.toLanguageString(p,kl[p]),onClose:this.onClose,style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},k,f.createElement(a.WindowActionsBar,null,...y));return n?n(C,{content:k,actionButtons:y}):C}};d.registerForLocalization(wl);let Sl=class extends f.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},n=Object.keys(o).filter((e=>null!==o[e]&&""!==o[e])).reduce(((e,t)=>Object.assign(e,{[t]:o[t]})),{}),i=l.createAndFill(n);i&&r.insertNode(i,!0)(e.state,(l=>e.dispatch(l.setMeta("commandName",t.commandName).setMeta("args",n)))),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:n}=this.props,{insertImageDialogTitle:i,insertImageAddress:p,insertImageTitle:m,insertImageAltText:u,insertImageWidth:g,insertImageHeight:h,insertImageCancel:b,insertImageInsert:v}=t.messages,k=d.provideLocalizationService(this),y=e&&e.state;let C={};y&&y.selection instanceof r.NodeSelection&&y.selection.node.type===y.schema.nodes[t.node]&&(C=y.selection.node.attrs);const w=f.createElement(c.Form,{render:()=>f.createElement(c.FormElement,{horizontal:!0},f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(p,kl[p])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-image-url",defaultValue:C.src,ref:e=>{this.src=e&&e.element},autoFocus:!0}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(u,kl[u])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-image-alt",defaultValue:C.alt,ref:e=>{this.altText=e&&e.element}}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-title",className:"k-form-label"},k.toLanguageString(m,kl[m])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-image-title",defaultValue:C.title,ref:e=>{this.title=e&&e.element}}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-width",className:"k-form-label"},k.toLanguageString(g,kl[g])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-image-width",defaultValue:C.width,ref:e=>{this.width=e&&e.element}}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-height",className:"k-form-label"},k.toLanguageString(h,kl[h])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{id:"k-editor-image-height",defaultValue:C.height,ref:e=>{this.height=e&&e.element}}))))}),S=[f.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},k.toLanguageString(b,kl[b])),f.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},k.toLanguageString(v,kl[v]))],E=f.createElement(a.Window,{initialWidth:500,initialHeight:350,className:"k-editor-window",title:k.toLanguageString(i,kl[i]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},w,f.createElement(a.WindowActionsBar,null,...S));return n?n(E,{content:w,actionButtons:S}):E}};d.registerForLocalization(Sl);const El=new r.PluginKey("editor-props");let xl=class extends f.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=r.trimWhitespace(this.htmlArea&&this.htmlArea.value||""),{preserveWhitespace:o}=El.getState(e.state);r.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:n}=this.props,i=d.provideLocalizationService(this),{viewHtmlDialogTitle:c,viewHtmlCancel:p,viewHtmlUpdate:m}=t.messages,u=f.createElement(s.TextArea,{className:"k-editor-textarea",defaultValue:r.indentHtml(r.getHtml(e.state)),autoFocus:!0,autoSize:!1,ref:this.textAreaRef}),g=[f.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(p,kl[p])),f.createElement(o.Button,{onClick:this.onUpdate,themeColor:"primary",dir:l,key:"update"},i.toLanguageString(m,kl[m]))],h=f.createElement(a.Window,{className:"k-editor-window",title:i.toLanguageString(c,kl[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,f.createElement(a.WindowActionsBar,null,...g));return n?n(h,{content:u,actionButtons:g}):h}};d.registerForLocalization(xl);const Tl={onMouseDown:e=>e.preventDefault(),onPointerDown:e=>e.preventDefault()},Pl={userSelect:"none"},Il=function(e,...t){return t.forEach(((t,l)=>{e=e.replace("{"+l+"}",String(t))})),e},Nl=(e,t)=>t.dataItem.style?f.cloneElement(e,e.props,f.createElement("span",{style:t.dataItem.style},e.props.children)):e,Rl=["px","em","%"],Ll={animate:{openDuration:150,closeDuration:150}},Al=[{textKey:yl.borderStyleNone,text:kl[yl.borderStyleNone],value:"none"},{textKey:yl.borderStyleSolid,text:kl[yl.borderStyleSolid],value:"solid"},{textKey:yl.borderStyleDotted,text:kl[yl.borderStyleDotted],value:"dotted"},{textKey:yl.borderStyleDashed,text:kl[yl.borderStyleDashed],value:"dashed"},{textKey:yl.borderStyleDouble,text:kl[yl.borderStyleDouble],value:"double"},{textKey:yl.borderStyleGroove,text:kl[yl.borderStyleGroove],value:"groove"},{textKey:yl.borderStyleRidge,text:kl[yl.borderStyleRidge],value:"ridge"},{textKey:yl.borderStyleInset,text:kl[yl.borderStyleInset],value:"inset"},{textKey:yl.borderStyleOutset,text:kl[yl.borderStyleOutset],value:"outset"},{textKey:yl.borderStyleInitial,text:kl[yl.borderStyleInitial],value:"initial"},{textKey:yl.borderStyleInherit,text:kl[yl.borderStyleInherit],value:"inherit"},{textKey:yl.borderStyleHidden,text:kl[yl.borderStyleHidden],value:"hidden"}];function Bl(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 Dl=e.EditorToolsSettings.findAndReplace;let Ml=class extends f.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(r.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,n=0;if(t&&l){const e=t.findIndex((e=>e.eq(l)));o=-1===e?t.length:e+1,n=t.length}return Il(e,o,n)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(e=!1)=>{const t=this.props.view,{searchText:l,matchCase:o,matchCyclic:n,matchWord:i,useRegExp:a}=this.state,s={text:l,matchWord:i,matchCase:o,useRegExp:a,backward:e,matchCyclic:n},c=r.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,n=o+l.length,i=r.replace(t,l,e.state.tr);i.setSelection(r.TextSelection.create(i.doc,o,n)),i.scrollIntoView(),e.dispatch(i),this.setNextState({})}},this.onReplaceAll=()=>{const e=this.props.view,{searchText:t,replaceText:l,matchCase:o,matchWord:n,useRegExp:i}=this.state,a={text:t,matchWord:n,matchCase:o,useRegExp:i},s=r.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},l=this.props.view;if(t.searchText){const{searchText:e,matchWord:o,matchCase:n,useRegExp:i,matchCyclic:a}=t,s={text:e,matchWord:o,matchCase:n,useRegExp:i},c=l.state.selection,d=r.findAll(l.state.doc,s),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:r.selectedLineTextOnly(e.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1}}get settings(){return this.props.settings||Dl}componentDidUpdate(e,t){const l=this.props.view,{matches:o=[],nextMatch:n}=this.state;if(t.nextMatch!==n){const e=l.state,t=e.tr,i=[];o.forEach((e=>{i.push({from:e.from,to:e.to,attrs:{class:n&&e.eq(n)?"k-text-selected":"k-text-highlighted"}})})),t.setMeta(r.textHighlightKey,i),t.setSelection(n||r.TextSelection.create(e.doc,e.selection.from)),l.dispatch(t)}}render(){const e=d.provideLocalizationService(this),{findReplaceDialogTitle:t,findReplaceTabFind:l,findReplaceTabReplace:r,findReplaceFindWhat:m,findReplaceReplaceWith:u,findReplaceReplace:g,findReplaceReplaceAll:h,findReplaceMatchCase:b,findReplaceMatchWord:v,findReplaceMatchCyclic:k,findReplaceUseRegExp:y,findReplacePrevMatch:C,findReplaceNextMatch:w,findReplaceMatches:S}=this.settings.messages,{matchCase:E,matchWord:x,matchCyclic:T,useRegExp:P,searchText:I,replaceText:N,nextMatch:R}=this.state,L=f.createElement("div",{className:"k-search-options"},f.createElement("span",null,f.createElement(s.Checkbox,{id:"match-case",checked:E,onChange:this.onMatchCaseChecked}),f.createElement("label",{htmlFor:"match-case",className:"k-checkbox-label"},e.toLanguageString(b,kl[b]))),f.createElement("span",null,f.createElement(s.Checkbox,{id:"match-whole",checked:x,onChange:this.onMatchWordChecked}),f.createElement("label",{htmlFor:"match-whole",className:"k-checkbox-label"},e.toLanguageString(v,kl[v]))),f.createElement("span",null,f.createElement(s.Checkbox,{id:"match-cyclic",checked:T,onChange:this.onMatchCyclicChecked}),f.createElement("label",{htmlFor:"match-cyclic",className:"k-checkbox-label"},e.toLanguageString(k,kl[k]))),f.createElement("span",null,f.createElement(s.Checkbox,{id:"regular-expression",checked:P,onChange:this.onUseRegExpChecked}),f.createElement("label",{htmlFor:"regular-expression",className:"k-checkbox-label"},e.toLanguageString(y,kl[y])))),A=f.createElement("div",{className:"k-matches-container"},f.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},f.createElement(n.IconWrap,{name:"chevron-left",icon:i.chevronLeftIcon}),e.toLanguageString(C,kl[C])),f.createElement("span",null,this.matchesMessage(e.toLanguageString(S,kl[S]))),f.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(w,kl[w]),f.createElement(n.IconWrap,{name:"chevron-right",icon:i.chevronRightIcon}))),B=f.createElement(c.Form,{render:()=>f.createElement(c.FormElement,{horizontal:!0},f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"findWhat",className:"k-form-label"},e.toLanguageString(m,kl[m])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{id:"findWhat",type:"text",value:I,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}))))}),D=f.createElement(c.Form,{render:()=>f.createElement(c.FormElement,{horizontal:!0},f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"replaceWith",className:"k-form-label"},e.toLanguageString(u,kl[u])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{id:"replaceWith",type:"text",value:N,onChange:this.onReplaceChange}))))});return f.createElement(a.Window,{title:e.toLanguageString(t,kl[t]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:()=>null,maximizeButton:()=>null},f.createElement(p.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},f.createElement(p.TabStripTab,{title:e.toLanguageString(l,kl[l])},B,L,A),f.createElement(p.TabStripTab,{title:e.toLanguageString(r,kl[r])},B,D,f.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},f.createElement(o.Button,{disabled:!R,onClick:this.onReplace},e.toLanguageString(g,kl[g])),f.createElement(o.Button,{disabled:!R,onClick:this.onReplaceAll},e.toLanguageString(h,kl[h]))),L,A)))}};d.registerForLocalization(Ml),e.EditorDialogs=void 0,(e=>{e.InsertLinkDialog=class extends wl{};e.InsertImageDialog=class extends Sl{};e.ViewHtmlDialog=class extends xl{};e.FindAndReplaceDialog=class extends Ml{}})(e.EditorDialogs||(e.EditorDialogs={}));const{bold:Fl,underline:zl,italic:Hl}=e.EditorToolsSettings,Wl="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);e.EditorUtils=void 0,(e=>{e.alignBlocks=function(e,t,l){return!!r.alignBlocks(t,l)(e.state,e.dispatch)},e.applyInlineStyle=function(e,t,l){return r.applyInlineStyle(t,l)(e.state,e.dispatch)},e.applyLink=function(e,t,l){return r.applyLink(t,l)(e.state,e.dispatch)},e.canIndentList=function(e,t){return r.canIndentAsListItem(e,t)},e.canInsert=function(e,t){return r.canInsert(e,t)},e.canOutdentList=function(e,t){return r.canOutdentAsListItem(e,{listsTypes:t,nodes:[]})},e.convertMsLists=function(e){return r.convertMsLists(e)},e.createDocument=function(e,t,l){return r.parseContent(r.trimWhitespace(t),e,void 0!==l?l:{preserveWhitespace:"full"})},e.createTable=function(e,t,l){return r.createTable(e,t,l)},e.formatBlockElements=function(e,t,l){return r.formatBlockElements(t,l)(e.state,e.dispatch)},e.getBlockFormats=function(e){return r.getBlockFormats(e)},e.getHtml=function(e){return r.getHtml(e)},e.getInlineStyles=function(e,t){return r.getInlineStyles(e,t)},e.getMark=function(e,t){return r.getMark(e,t)},e.hasMark=function(e,t){return r.hasMark(e,t)},e.hasNode=function(e,t){return r.hasNode(e,t)},e.indentBlocks=function(e,t,l,o){return!!r.indentBlocks(t,l,o)(e.state,e.dispatch)},e.indentHtml=function(e){return r.indentHtml(e)},e.insertNode=function(e,t,l){r.insertNode(t,l)(e.state,e.dispatch)},e.isAligned=function(e,t){return r.isAligned(e,t)},e.isIndented=function(e,t,l){return r.isIndented(e,t,l)},e.removeComments=function(e){return r.removeComments(e)},e.removeTag=function(e,t){return r.removeTag(e,t)},e.pasteCleanup=function(e,t){return r.pasteCleanup(e,t)},e.sanitizeClassAttr=function(e){r.sanitizeClassAttr(e)},e.sanitizeStyleAttr=function(e){r.sanitizeStyleAttr(e)},e.removeAttribute=function(e){r.removeAttribute(e)},e.sanitize=function(e){return r.sanitize(e)},e.replaceImageSourcesFromRtf=function(e,t){return r.replaceImageSourcesFromRtf(e,t)},e.textHighlight=function(e){return r.textHighlight(e)},e.imageResizing=function(e){return r.imageResizing(e)},e.tableResizing=function(){return r.tableResizing()},e.setHtml=function(e,t,l,o){const n=r.trimWhitespace(t);r.setHtml(n,l,o)(e.state,e.dispatch)},e.toggleInlineFormat=function(e,t,l,o){return r.toggleInlineFormat(t,l,o)(e.state,e.dispatch)},e.toggleList=function(e,t,l){return r.toggleList(e.state,e.dispatch,e,t,l)},e.getShortcuts=function(e){return(e=>{const t=r.chainCommands(r.exitCode,((t,l)=>{const o=e&&e.types&&e.types.hardBreak||"hard_break",n=t.schema.nodes[o];return l&&l(t.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0})),l=e&&e.types&&e.types.listItem||"list_item",o=e&&e.toolsSettings||{};return{"Mod-b":(e,t)=>r.toggleInlineFormat(o.bold||Fl)(e,t),"Mod-i":(e,t)=>r.toggleInlineFormat(o.italic||Hl)(e,t),"Mod-u":(e,t)=>r.toggleInlineFormat(o.underline||zl)(e,t),"Mod-z":r.undo,"Shift-Mod-z":r.redo,...Wl?{}:{"Mod-y":r.redo},Backspace:r.undoInputRule,"Mod-Enter":t,"Shift-Enter":t,...Wl?{"Ctrl-Enter":t}:{},Enter:(e,t)=>r.splitListItem(e.schema.nodes[l])(e,t),Tab:r.goToNextCell(1),"Shift-Tab":r.goToNextCell(-1)}})(e)},e.propsKey=El,e.imageResizeKey=r.imageResizeKey,e.marks={...r.marks},e.nodes={...r.nodes}})(e.EditorUtils||(e.EditorUtils={}));const Kl=(t,l)=>{const o=l.tr||t.state.tr.setSelection(new r.AllSelection(t.state.doc)).replaceSelectionWith(l.doc||e.EditorUtils.createDocument(t.state.schema,l.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(o))},Ul="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),Ol={name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"11.0.0-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},{link:Vl,bold:_l,italic:jl,underline:ql}=e.EditorToolsSettings,$l=class extends f.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]&&f.createElement(e,{view:this.view,settings:t,dir:this.props.dir,onClose:()=>this.setState({[l]:!1})}),this.renderTool=(e,t,l=!1)=>{const n=f.createElement(e,{view:this.view,dir:this.props.dir,key:t,className:l?"k-toolbar-button":void 0});return n.type===o.ToolbarSeparator?f.createElement(e,{key:t}):n},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,n={target:this,value:l,html:"",transaction:t,schema:o};Object.defineProperty(n,"html",{get:()=>(this.htmlOnChange=e.EditorUtils.getHtml({doc:l,schema:o}),this.htmlOnChange)}),this.props.onChange.call(void 0,n)}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=!n.validatePackage(Ol,{component:"Editor"})}get value(){return null!==this.trOnChange?this.trOnChange.doc:void 0!==this.props.value?this.props.value:this.view?this.view.state.doc:this.props.defaultContent||""}get element(){return this._element}get contentElement(){return this._contentElement}get view(){return this._view}componentDidMount(){(!this.iframe||!Ul)&&this.initialize()}componentDidUpdate(e){const{value:t}=this.props,l=this.view;void 0===t||!l||(((e,t,l,o,n)=>{"string"==typeof t?o&&t===n?Kl(e,{tr:o}):t!==l&&Kl(e,{html:t}):o&&t.eq(o.doc)?Kl(e,{tr:o}):e.state.doc.eq(t)||Kl(e,{doc:t})})(l,t,e.value,this.trOnChange,this.htmlOnChange),this.trOnChange=null,this.htmlOnChange=null)}componentWillUnmount(){var e;this.view&&this.view.destroy(),this._view=void 0;const t=null==(e=this.iframe)?void 0:e.contentWindow;if(t){this._contentElement&&this._contentElement.parentNode&&this._contentElement.parentNode.removeChild(this._contentElement);const e=t.document.head;for(;e&&e.firstChild;)e.removeChild(e.firstChild)}}render(){const{tools:t=[],defaultEditMode:l="iframe",preserveWhitespace:r="full",style:i,className:a}=this.props,s=d.provideLocalizationService(this);if(this.view){El.getState(this.view.state).preserveWhitespace=r}let c=this.props.contentStyle;void 0===c&&void 0===(i||{}).height&&(c={height:"300px"});const p=t.map(((e,t)=>Array.isArray(e)?f.createElement(o.ButtonGroup,{key:t,className:"k-toolbar-button-group k-button-group-solid"},e.map(((e,t)=>this.renderTool(e,t)))):this.renderTool(e,t,!0)));return f.createElement("div",{ref:e=>{this._element=e},className:n.classNames("k-editor",a,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:i},p.length>0&&f.createElement(o.Toolbar,{className:"k-editor-toolbar",keyboardNavigation:this.props.keyboardNavigation},p),"iframe"===l?f.createElement("div",{className:"k-editor-content"},f.createElement("iframe",{onLoad:Ul?()=>{this.initialize()}:void 0,ref:e=>{this.iframe=e},frameBorder:"0",title:s.toLanguageString(yl.iframeTitle,kl[yl.iframeTitle]),style:c,className:"k-iframe"})):f.createElement("div",{style:c,className:"k-editor-content"},f.createElement("div",{ref:e=>{this._contentElement=e},suppressContentEditableWarning:!0,role:"textbox","aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel})),this.renderDialog(e.EditorDialogs.InsertLinkDialog,Vl,"linkDialog"),this.showLicenseWatermark&&f.createElement(n.WatermarkOverlay,null))}initialize(){const t=this.iframe&&this.iframe.contentWindow;if(t){const e=t.document,l=e.createElement("meta");l.setAttribute("charset","utf-8"),e.head.appendChild(l),this._contentElement=e.createElement("div"),e.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content"),this.iframe&&this.props.onIFrameInit?this.onIFrameInit(this.iframe):[b,v,"rtl"===this.props.dir?"body { direction: rtl }":void 0].forEach((t=>{if(t){const l=e.createElement("style");l.appendChild(e.createTextNode(t)),e.head.appendChild(l)}}))}const l=this._contentElement;if(!l)return;const{preserveWhitespace:n="full"}=this.props,i=[new r.Plugin({view:()=>({update:this.updateTools}),key:new r.PluginKey("toolbar-tools-update-plugin")}),new r.Plugin({filterTransaction:this.filterTransaction,key:new r.PluginKey("onExecute-event-plugin")}),new r.Plugin({key:El,state:{init:()=>({preserveWhitespace:n}),apply:(e,t)=>t}}),r.spacesFix(),r.caretColor(),r.history(),r.dropCursor(),r.gapCursor(),r.tableEditing(),r.cspFix()],a={...e.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:_l,italic:jl,underline:ql}}),"Mod-k":()=>{const{linkDialog:e}=this.state,t=this.view;if(t){const l=t.state,o=l.selection.empty,n=r.getMark(l,l.schema.marks[Vl.mark]);!e&&(!o||n)&&this.setState({linkDialog:!0})}return!e},"Alt-F10":()=>{var e;const t=null==(e=this.element)?void 0:e.querySelector(".k-toolbar");if(t){const e=t.querySelector(o.toolbarButtons.join(","));if(e)return e.focus(),!0}return!1}},{defaultContent:s="",value:c,onMount:d}=this.props,p=c&&"string"!=typeof c?c:e.EditorUtils.createDocument(new r.Schema({nodes:r.nodes,marks:r.marks}),c||s,{preserveWhitespace:n}),m={state:r.EditorState.create({plugins:[...i,r.keymap(a),r.keymap(r.baseKeymap)],doc:p}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur,paste:this.onPaste},handleDrop:(e,t,l,o)=>{let n=!1;return l.content.nodesBetween(0,l.content.size,(e=>{n=n||"table_caption_external"===e.type.name})),n}},u={plugins:i,shortcuts:a,target:this,viewProps:m,dom:l},g=this._view=d&&d.call(void 0,u)||new r.EditorView({mount:l},m);this.setState({view:g})}};$l.propTypes={defaultContent:l.string,value:l.oneOfType([l.object,l.string]),defaultEditMode:l.oneOf(["iframe","div"]),contentStyle:l.object,dir:l.string,className:l.string,ariaDescribedBy:l.string,ariaLabelledBy:l.string,ariaLabel:l.string,style:l.object,tools:l.arrayOf(l.any),keyboardNavigation:l.bool,resizable:l.bool,preserveWhitespace:l.oneOf([!0,!1,"full"]),onMount:l.func,onFocus:l.func,onBlur:l.func,onChange:l.func,onPasteHtml:l.func,onExecute:l.func,onIFrameInit:l.func};let Gl=$l;d.registerForLocalization(Gl);let Jl=class extends f.Component{constructor(){super(...arguments),this.state={row:-1,col:-1}}renderCell(e,t,l){const o=Math.floor(e/this.props.columns),n=e%this.props.columns,r=n<=l&&o<=t;return f.createElement("span",{className:"k-ct-cell k-disabled"+(r?" k-selected":""),onMouseEnter:()=>this.setState({row:o,col:n}),onClick:()=>this.props.onCellClick.call(void 0,o,n),key:e})}render(){const e=[],t=this.props.columns*this.props.rows,{row:l,col:o}=this.state,{onDown:n}=this.props;let r=this.props.createTableMessage;o>-1&&(r=Il(this.props.createTableHintMessage,l+1,o+1));for(let n=0;n<t;n++)e.push(this.renderCell(n,l,o));return[f.createElement("div",{onMouseLeave:()=>this.setState({row:-1,col:-1}),key:"cells",style:{borderColor:"inherit"},onPointerDown:n,onMouseDown:n},e),f.createElement("div",{className:"k-status",key:"status",onPointerDown:n,onMouseDown:n},r)]}};var Ql,Xl;(e=>{const t=class e extends f.Component{constructor(){super(...arguments),this.pointerdown=!1,this.onWindowDown=e=>{const{anchor:t}=this.props;t&&(t===e.target||t.firstElementChild===e.target)||(this.props.show&&!this.pointerdown&&this.props.onClose(),this.pointerdown=!1)},this.onPointerDown=()=>this.pointerdown=!0}componentDidUpdate(e){e.show&&this.props.show&&this.props.onClose()}componentDidMount(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)}componentWillUnmount(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)}render(){const{show:t,anchor:l,dir:o,rows:n=e.defaultProps.rows,columns:r=e.defaultProps.columns}=this.props,i="rtl"===o?"right":"left";return f.createElement(m.Popup,{anchor:l,anchorAlign:{horizontal:i,vertical:"bottom"},popupAlign:{horizontal:i,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:t,style:"rtl"===o?{direction:"rtl"}:void 0},f.createElement(Jl,{rows:n,columns:r,createTableMessage:this.props.createTableMessage,createTableHintMessage:this.props.createTableHintMessage,onCellClick:this.props.onTableInsert,onDown:this.onPointerDown}))}};t.propTypes={show:l.bool.isRequired,createTableMessage:l.string.isRequired,createTableHintMessage:l.string.isRequired,onClose:l.func.isRequired,onTableInsert:l.func.isRequired,anchor:l.any,rows:l.number,columns:l.number,dir:l.string},t.defaultProps={rows:6,columns:8};let o=t;e.InsertTablePopup=o})(Ql||(Ql={})),(e=>{e.createInsertTableTool=e=>{const t=class extends f.Component{constructor(){super(...arguments),this.state={openedPopup:!1},this.button=null,this.togglePopup=()=>{this.setState({openedPopup:!this.state.openedPopup})},this.closePopup=()=>{this.state.openedPopup&&this.togglePopup()},this.onTableInsert=(e,t)=>{const{view:l}=this.props;if(!l)return;const{table:o,table_row:n,table_cell:i}=l.state.schema.nodes,a=r.createTable({table:o,table_row:n,table_cell:i},e,t);a&&r.insertNode(a,!0)(l.state,l.dispatch),l.focus(),this.closePopup()}}render(){const{view:t,render:l,...i}=this.props,a=t&&t.state,s=d.provideLocalizationService(this),{createTable:c,createTableHint:p}=e.messages,m=s.toLanguageString(c,kl[c]),u=s.toLanguageString(p,kl[p]),g=!(a&&r.canInsert(a,a.schema.nodes.table)&&!Bl(a.selection.$from,(e=>"table_caption_external"===e.type.name))),h=[f.createElement(o.Button,{onClick:g?void 0:this.togglePopup,"aria-disabled":!!g||void 0,ref:e=>{this.button=e&&e.element},key:"InsertTable",...Tl,title:m,...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":g})}),t&&!g&&f.createElement(Ql.InsertTablePopup,{key:"insertTablePopup",createTableMessage:m,createTableHintMessage:u,dir:i.dir,anchor:this.button,show:this.state.openedPopup,onClose:this.closePopup,onTableInsert:this.onTableInsert})||null];return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(Xl||(Xl={}));const{alignRemove:Yl}=e.EditorToolsSettings,Zl=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...n}=this.props,i=t&&t.state,a=!!i&&r.isAligned(i,e.actions),s=a?Yl.actions:e.actions,c=a?Yl.commandName:e.commandName,p=d.provideLocalizationService(this),m=e.messages.title,u=f.createElement(o.Button,{onClick:()=>t&&r.alignBlocks(s,c)(t.state,t.dispatch),selected:a,togglable:!0,...Tl,title:p.toLanguageString(m,kl[m]),...e.props,...n});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t};var eo;(e=>{e.createStyleDropDownList=e=>{const t=class extends f.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:o}=this.props,{style:n}=e;if(o){r.applyInlineStyle({style:n,value:l.value},e.commandName)(o.state,o.dispatch);const{syntheticEvent:i}=t;i&&"click"===i.type&&o.focus()}}}render(){const{style:t}=e,{view:l,render:o,data:n,defaultItem:i,...a}=this.props,s=n||e.items;let c=i||e.defaultItem;const p=l?r.getInlineStyles(l.state,{name:t,value:/^.+$/}):[],m=d.provideLocalizationService(this);c&&c.localizationKey&&(c={...c},c.text=c.localizationKey?m.toLanguageString(c.localizationKey,kl[c.localizationKey]):c.text);let g=1===new Set(p).size?p[0]:null;null===g&&a.defaultValue&&(g=a.defaultValue);const h=f.createElement(u.DropDownList,{value:g&&s.find((e=>e.value===g)),data:s,defaultItem:c,itemRender:Nl,textField:"text",dataItemKey:"value",onChange:this.onChange,style:Pl,leftRightKeysNavigation:!1,title:c&&c.text,...a});return o?o.call(void 0,h,{view:l}):h}};return d.registerForLocalization(t),t}})(eo||(eo={}));const to=e=>{const{view:t,style:l,colorPickerProps:o,commandName:n}=e,i=o.title,a=o.ariaLabel,{view:c="palette"}=o,p=d.useLocalization(),m=f.useCallback((e=>{t&&(r.applyInlineStyle({style:l,value:e.value},n)(t.state,t.dispatch),"palette"===c&&t.focus())}),[t,l,c,n]);return f.createElement(s.ColorPicker,{onChange:m,onActiveColorClick:m,...o,title:i&&p.toLanguageString(i,kl[i]),ariaLabel:a&&p.toLanguageString(a,kl[a])})};var lo;(e=>{e.createFormatBlockDropDownList=e=>{const t=class extends f.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:o}=this.props;if(o&&r.formatBlockElements(l.value,e.commandName)(o.state,o.dispatch)){const{syntheticEvent:e}=t;e&&"click"===e.type&&o.focus()}}}render(){const{view:t,render:l,data:o,defaultItem:n,...i}=this.props,a=o||e.items;let s=n||e.defaultItem;const c=t&&t.state,p=c?r.getBlockFormats(c):[],m=d.provideLocalizationService(this);s&&s.localizationKey&&(s={...s},s.text=s.localizationKey?m.toLanguageString(s.localizationKey,kl[s.localizationKey]):s.text);const g=1===new Set(p).size?p[0]:null,h=f.createElement(u.DropDownList,{value:g&&a.find((e=>e.value===g)),onChange:this.onChange,itemRender:Nl,data:a,defaultItem:s,textField:"text",dataItemKey:"value",style:Pl,leftRightKeysNavigation:!1,title:s.text,...i});return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(lo||(lo={}));const oo=(e,t)=>{const l=class extends f.Component{render(){const{view:l,render:r,...i}=this.props,a=d.provideLocalizationService(this),s=e.messages.title,c=l&&l.state,p=!!c&&!t(c),m=f.createElement(o.Button,{onClick:p?void 0:()=>l&&t(l.state,(t=>l.dispatch(t.setMeta("commandName",e.commandName)))),"aria-disabled":!!p||void 0,...Tl,title:a.toLanguageString(s,kl[s]),...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":p})});return r?r.call(void 0,m,{view:l}):m}};return d.registerForLocalization(l),l};var no,ro,io;(e=>{e.createUndoTool=e=>oo(e,r.undo),e.createRedoTool=e=>oo(e,r.redo)})(no||(no={})),(e=>{e.createIndentTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...i}=this.props,a=i.dir,s=t&&t.state,c=s&&s.schema.nodes,p=c&&c[e.listsTypes.listItem],m=e.actions,u=!!s&&!!p&&(r.isIndented(s,m,a)||m.some((e=>c&&c[e.node]&&r.hasNode(s,c[e.node]))))&&!r.hasNode(s,p),g=!!s&&r.canIndentAsListItem(s,p),h=u||g,b=d.provideLocalizationService(this),v=e.messages.title,k=!h,y=f.createElement(o.Button,{onClick:k?void 0:()=>{t&&g&&p?r.sinkListItem(p)(t.state,t.dispatch):t&&u&&r.indentBlocks(m,e.commandName,a)(t.state,t.dispatch)},"aria-disabled":!!k||void 0,title:b.toLanguageString(v,kl[v]),...Tl,...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":k})});return l?l.call(void 0,y,{view:t}):y}};return d.registerForLocalization(t),t}})(ro||(ro={})),(e=>{e.createInlineFormatTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...n}=this.props,i=t&&t.state,{mark:a,altMarks:s,altStyle:c}=e,p={mark:a,altMarks:s,altStyle:c},m=d.provideLocalizationService(this),u=e.messages.title,g=f.createElement(o.Button,{onClick:()=>t&&r.toggleInlineFormat(p,i&&i.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),selected:!!i&&r.hasMark(i,p),togglable:!0,...Tl,title:m.toLanguageString(u,kl[u]),...e.props,...n});return l?l.call(void 0,g,{view:t}):g}};return d.registerForLocalization(t),t}})(io||(io={}));const ao=t=>{const l=class extends f.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:i,...a}=this.props,s=l&&l.state,c=s?s.schema.nodes[t.node]:void 0,p=d.provideLocalizationService(this),{insertImage:m}=t.messages,u=!c||!s||!r.canInsert(s,c),g=[f.createElement(o.Button,{onClick:u?void 0:this.toggleDialog,"aria-disabled":!!u||void 0,key:"insertImage",...Tl,title:p.toLanguageString(m,kl[m]),...t.props,...a,className:n.classNames(a.className,t.props.className,{"k-disabled":u})}),this.state.openedDialog&&l&&f.createElement(e.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:l,settings:t,dir:a.dir,onClose:this.toggleDialog})||null];return i?i.call(void 0,g,{view:l}):g}};return d.registerForLocalization(l),l};var so,co,po;(t=>{t.createLinkTool=t=>{const l=class extends f.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:i,...a}=this.props,s=l&&l.state,c=!s||s.selection.empty,p=s&&r.getMark(s,s.schema.marks[t.mark]),m=d.provideLocalizationService(this),{insertHyperlink:u}=t.messages,g=c&&!p,h=[f.createElement(o.Button,{onClick:g?void 0:this.toggleDialog,"aria-disabled":!!g||void 0,key:"link",...Tl,title:m.toLanguageString(u,kl[u]),...t.props,...a,className:n.classNames(a.className,t.props.className,{"k-disabled":g})}),this.state.openedDialog&&l&&f.createElement(e.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:t,dir:a.dir,view:l,onClose:this.toggleDialog})||null];return i?i.call(void 0,h,{view:l}):h}};return d.registerForLocalization(l),l}})(so||(so={})),(e=>{e.createListTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...n}=this.props;let i=!1;const a=d.provideLocalizationService(this),s=e.messages.title,c=e.types,p=e.listType;if(t){const e=t.state,l=e.schema.nodes,o=r.hasNode(e,l[c.orderedList]),n=r.hasNode(e,l[c.bulletList]);i=p===c.orderedList?o&&!n:!o&&n}const m=f.createElement(o.Button,{onClick:()=>t&&r.toggleList(t.state,t.dispatch,t,{listType:p,...c},e.commandName),togglable:!0,selected:i,title:a.toLanguageString(s,kl[s]),...Tl,...e.props,...n});return l?l.call(void 0,m,{view:t}):m}};return d.registerForLocalization(t),t}})(co||(co={})),(e=>{e.createOutdentTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...i}=this.props,a=t&&t.state,s=i.dir,c=!!a&&r.isIndented(a,e.actions,s),p=a&&a.schema.nodes[e.listsTypes.listItem],m=!!a&&r.canOutdentAsListItem(a,{nodes:e.actions,listsTypes:e.listsTypes}),u=c||m,g=d.provideLocalizationService(this),h=e.messages.title,b=!u,v=f.createElement(o.Button,{onClick:b?void 0:()=>{t&&m&&p?r.liftListItem(p)(t.state,t.dispatch):t&&c&&r.indentBlocks(e.actions,e.commandName,s)(t.state,t.dispatch)},"aria-disabled":!!b||void 0,title:g.toLanguageString(h,kl[h]),...Tl,...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":b})});return l?l.call(void 0,v,{view:t}):v}};return d.registerForLocalization(t),t}})(po||(po={}));const mo=(e,t)=>{const l=r.deleteColumn(e,t);if(l&&!t){const t=r.selectionCell(e),l=t&&t.node(t.depth);if(l&&1===l.content.childCount)return!1}return l},uo=(e,t)=>{const l=r.deleteRow(e,t);if(l&&!t){const t=r.selectionCell(e),l=t&&t.node(t.depth-1);if(l&&1===l.content.childCount)return!1}return l};var go,ho,fo;(e=>{e.createAddRowBeforeTool=e=>oo(e,r.addRowBefore),e.createAddRowAfterTool=e=>oo(e,r.addRowAfter),e.createAddColumnBeforeTool=e=>oo(e,r.addColumnBefore),e.createAddColumnAfterTool=e=>oo(e,r.addColumnAfter),e.createDeleteRowTool=e=>oo(e,uo),e.createDeleteColumnTool=e=>oo(e,mo),e.createDeleteTableTool=e=>oo(e,r.deleteTable),e.createMergeCellsTool=e=>oo(e,r.mergeCells),e.createSplitCellTool=e=>oo(e,r.splitCell)})(go||(go={})),(e=>{e.createUnlinkTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...i}=this.props,a={mark:e.mark},s=!!t&&r.hasMark(t.state,a),c=d.provideLocalizationService(this),p=e.messages.title,m=!s,u=f.createElement(o.Button,{onClick:m?void 0:()=>t&&r.removeLink(a,t.state.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),"aria-disabled":!!m||void 0,...Tl,title:c.toLanguageString(p,kl[p]),...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":m})});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t}})(ho||(ho={})),(t=>{t.createViewHtmlTool=t=>{const l=class extends f.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:n,...r}=this.props,i=d.provideLocalizationService(this),a=t.messages.viewHtml,s=[f.createElement(o.Button,{onClick:this.toggleDialog,key:"viewHtml",...Tl,title:i.toLanguageString(a,kl[a]),...t.props,...r}),this.state.openedDialog&&l&&f.createElement(e.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:l,settings:t,dir:r.dir,onClose:this.toggleDialog})||null];return n?n.call(void 0,s,{view:l}):s}};return d.registerForLocalization(l),l}})(fo||(fo={}));const{print:bo}=e.EditorToolsSettings,vo=e=>{const{view:t,render:l,settings:r=bo,...i}=e,a=t&&t.dom,s=a&&a.ownerDocument,c=s&&s.defaultView,p=r.messages.title,m=!c||c===window,u=f.useCallback((()=>{c&&c.print()}),[c]),g=f.createElement(o.Button,{onClick:m?void 0:u,"aria-disabled":!!m||void 0,title:d.useLocalization().toLanguageString(p,kl[p]),...Tl,...r.props,...i,className:n.classNames(i.className,r.props.className,{"k-disabled":m})});return l?l.call(void 0,g,{view:t}):g},{pdf:ko,savePdfOptions:yo}=e.EditorToolsSettings,Co=e=>{const{view:t,render:l,settings:n=ko,savePdfOptions:r,savePdfCallback:i,...a}=e,s=n.messages.title,c=f.useCallback((()=>{t&&g.savePDF(t.dom,{...yo,...r||{}},i)}),[t,r,i]),p=f.createElement(o.Button,{onClick:c,title:d.useLocalization().toLanguageString(s,kl[s]),...Tl,...n.props,...a});return l?l.call(void 0,p,{view:t}):p},{selectAll:wo}=e.EditorToolsSettings,So=e=>{const{view:t,render:l,settings:n=wo,...i}=e,a=n.messages.title,s=f.useCallback((()=>{t&&(r.selectAll(t.state,t.dispatch),t.focus())}),[t]),c=f.createElement(o.Button,{onClick:s,title:d.useLocalization().toLanguageString(a,kl[a]),...Tl,...n.props,...i});return l?l.call(void 0,c,{view:t}):c},{cleanFormatting:Eo}=e.EditorToolsSettings,xo=r.cleanFormatting(),To=e=>{const{view:t,render:l,settings:r=Eo,...i}=e,a=r.messages.title,s=!t||!xo(t.state),c=f.useCallback((()=>{t&&xo(t.state,(e=>{e.setMeta("commandName",r.commandName),t.dispatch(e)}))}),[t]),p=f.createElement(o.Button,{onClick:s?void 0:c,"aria-disabled":!!s||void 0,title:d.useLocalization().toLanguageString(a,kl[a]),...Tl,...r.props,...i,className:n.classNames(e.className,r.props.className,{"k-disabled":s})});return l?l.call(void 0,p,{view:t}):p},Po=e.EditorToolsSettings.findAndReplace;let Io=class extends f.Component{constructor(){super(...arguments),this.state={showDialog:!1},this.onClose=()=>this.setState({showDialog:!1}),this.onOpen=()=>this.setState({showDialog:!0})}render(){const{view:e,...t}=this.props,{props:l}=Po,r=d.provideLocalizationService(this),i=Po.messages.findReplaceToolTitle,a=!e;return[f.createElement(o.Button,{onClick:a?void 0:this.onOpen,"aria-disabled":!!a||void 0,...Tl,title:r.toLanguageString(i,kl[i]),key:"tool",...l,...t,className:n.classNames(t.className,l.className,{"k-disabled":a})}),this.state.showDialog&&e&&f.createElement(Ml,{view:e,onClose:this.onClose,dir:t.dir,key:"dialog"})]}};d.registerForLocalization(Io);const No=(e,t)=>{const{from:l,to:o}=e.selection;let n=null;return e.doc.nodesBetween(l,o,(e=>(n=n||(e.type===t?e:null),!n))),n},Ro=e=>{let t=!1;const l=e.view,n=Cl,i=e.listType,a=d.useLocalization();let s,c,p=[...e.items||[]];if(l){const e=l.state,o=e&&e.schema.nodes;s=o&&No(e,o[n.orderedList]),c=o&&No(e,o[n.bulletList]),t=!!(i===n.orderedList?s&&!c:!s&&c)}if(t&&(s||c)){const e=r.listStyle((s||c).attrs);p=p.map(((t,l)=>({...t,selected:e?t.style===e:0===l})))}return f.createElement("span",{onMouseDown:e=>{e.preventDefault()}},f.createElement(o.SplitButton,{textField:"text",items:p,icon:e.icon,svgIcon:e.svgIcon,onButtonClick:e=>{l&&(r.toggleList(l.state,l.dispatch,l,{listType:i,...n,listAttrs:{}},"InsertList"),l.focus())},onItemClick:e=>{if(l){const t=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},o=s||c;if(o&&r.listStyle(o.attrs)!==e.item.style){const e=l.state.selection.$head.posAtIndex(0,-2)-1;l.dispatch(l.state.tr.setNodeMarkup(e,l.state.schema.nodes[i],t))}else r.toggleList(l.state,l.dispatch,l,{listType:i,...n,listAttrs:t},"InsertList");l.focus()}},buttonClass:t?"k-selected":void 0,title:void 0!==e.title?e.title:a.toLanguageString(e.titleKey,kl[e.titleKey])}))},Lo=/[\D]+$/,Ao=e=>{const t=e.match(Lo);return t?t[0]:""},Bo=(e,t)=>{var l;const o=Do((null==(l=e.attrs)?void 0:l.style)||"")[t]||"";return{[t]:parseFloat(o)||null,[t+"Unit"]:Ao(o)}},Do=e=>(e||"").split(/\s*;\s*/).filter(Boolean).map((e=>{const t=e.split(/\s*:\s*/);return{[t[0]]:t[1]}})).reduce(((e,t)=>({...e,...t})),{}),Mo=/^.+$/;function Fo(e,t,l){let o;if(new RegExp("[^-]?"+t+":").test(e.style||"")){const{style:n}=((e,t)=>{const l=t.style,o=t.value,n=t.newValue;if(!e)return{changed:!1,style:null};const r=e.split(/\s*;\s*/).filter((e=>!!e)),i=r.filter((e=>{const t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===l&&o.test(t[1]))}));return n&&i.push(`${l}: ${n}`),{style:i.join("; ")+(i.length?";":""),changed:!!n||i.length!==r.length}})(e.style||"",{style:t,value:Mo,newValue:l});o={...e,style:n}}else if(e.style){const n=Do(e.style);n[t]=l,o={...e,style:Object.keys(n).filter((e=>!!n[e])).reduce(((e,t)=>e+t+": "+n[t]+"; "),"").trim()}}else o=l?{...e,style:t+": "+l+";"}:{...e};return o}const zo=e=>{const t=Bl(e.selection.$from,(e=>"table"===e.type.name)),l=Bl(e.selection.$to,(e=>"table"===e.type.name));return t&&l&&t.depth===l.depth&&t.node.eq(l.node)?(e=>{const{doc:t,selection:l}=e,o=[];return l.ranges.forEach((e=>{const l=e.$from.pos,n=e.$to.pos;t.nodesBetween(l,n,((e,t,l,n)=>{("table_cell"===e.type.name||"table_header"===e.type.name)&&o.push({node:e,pos:t})}))})),o})(e).filter((({pos:l})=>{const o=Bl(e.doc.resolve(l),(e=>"table"===e.type.name));return o&&o.depth===t.depth&&t.node.eq(o.node)})):[]},Ho=e=>{const t=[];if(zo(e).length){const l=e.selection.$from,o=Bl(l,(e=>"table"===e.type.spec.tableRole));if(null===o)return t;const n=l.start(o.depth),i=o.node,a=r.TableMap.get(i),s=e.doc;a.map.forEach((e=>{const l=e+n;t.push({pos:l,node:s.nodeAt(l)})}))}return t},Wo="k-colgroup-data",Ko=(e,t,l)=>{const o={cellWidth:null,widthUnit:""},n=t.node,i=l.start(t.depth);if(!n.attrs[Wo])return o;const a=new Set;let s="";const c=r.htmlToFragment(n.attrs[Wo]).firstChild;return e.forEach((e=>{const t=n.resolve(e.pos-i),l=t.parent,o=t.index();let r=0;for(let e=0;e<=o;e++)r+=l.child(e).attrs.colspan;const d=c.children[r-1];d&&(s=d.style.width,a.add(s))})),1===a.size&&s&&(o.cellWidth=parseFloat(s)||null,o.widthUnit=Ao(s)),o},Uo=(e,t,l)=>{const o={cellHeight:null,heightUnit:""},n=t.node,r=l.start(t.depth),i=new Set;let a="";return e.forEach((e=>{var t;const l=n.resolve(e.pos-r).parent;a=Do((null==(t=l.attrs)?void 0:t.style)||"").height||"",i.add(a)})),1===i.size&&a&&(o.cellHeight=parseFloat(a)||null,o.heightUnit=Ao(a)),o},Oo=(e,t)=>{const l=new Set;let o="";return e.forEach((e=>{var n;o=Do((null==(n=e.node.attrs)?void 0:n.style)||"")[t]||"",l.add(o)})),1===l.size&&o?o:""},Vo=(e,t)=>{const l=new Set;let o="";return e.forEach((e=>{o=(e.node.attrs||{})[t]||"",l.add(o)})),1===l.size&&o?o:""},_o={applyToAll:!1,cellWidth:null,widthUnit:"",cellHeight:null,heightUnit:"",alignment:{x:"",y:""},textControl:"",backgroundColor:void 0,cellPadding:null,borderWidth:null,borderColor:void 0,borderStyle:null,id:"",className:""},jo=e=>{const t=zo(e),l=e.selection.$from,o=t.length?Bl(l,(e=>"table"===e.type.spec.tableRole)):null;return o?{..._o,...Ko(t,o,l),...Uo(t,o,l),alignment:{x:Oo(t,"text-align"),y:Oo(t,"vertical-align")},textControl:Oo(t,"white-space"),backgroundColor:Oo(t,"background-color")||void 0,cellPadding:parseFloat(Oo(t,"padding"))||null,borderWidth:parseFloat(Oo(t,"border-width"))||null,borderColor:Oo(t,"border-color")||void 0,borderStyle:Oo(t,"border-style")||null,id:Vo(t,"id"),className:Vo(t,"class")}:_o},qo=(e,t,l)=>{l.forEach((({node:l,pos:o})=>{let n={...l.attrs};n=Fo(n,"border-color",t.borderColor||""),n=Fo(n,"border-style",t.borderStyle||""),n=Fo(n,"border-width","number"==typeof t.borderWidth?t.borderWidth+"px":""),n=Fo(n,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),n=Fo(n,"background-color",t.backgroundColor||""),n=Fo(n,"text-align",t.alignment.x||""),n=Fo(n,"vertical-align",t.alignment.y||""),n=Fo(n,"white-space",t.textControl||""),n.id=t.id||null,n.class=t.className||null,e.setNodeMarkup(o,null,n),"number"==typeof t.cellWidth&&((e,t,l)=>{const o=e.doc.resolve(t),n=o.parent,i=o.index();let a=0;for(let e=0;e<=i;e++)a+=n.child(e).attrs.colspan;const s=o.node(o.depth-1),c=o.posAtIndex(0,o.depth-1)-1;let d,p=s.attrs;if(p&&p[Wo]){const t=r.htmlToFragment(p[Wo]).firstChild;d=t.children[a-1],d.style.width=l,p={...p,[Wo]:t.outerHTML},e.setNodeMarkup(c,null,p)}else{let t=0;for(let e=0;e<n.childCount;e++)t+=n.child(e).attrs.colspan;const o=document.createElement("colgroup"),r=new Array(t);for(let e=0;e<t;e++)r[e]=document.createElement("col"),o.appendChild(r[e]);d=r[i],d.style.width=l,p={...p,[Wo]:"<colgroup>"+r.reduce(((e,t)=>e+t.outerHTML),"")+"</colgroup>"},e.setNodeMarkup(c,null,p)}})(e,o,t.cellWidth+(t.widthUnit||"px")),"number"==typeof t.cellHeight&&((e,t,l)=>{const o=e.doc.resolve(t),n=o.parent,r=o.posAtIndex(0)-1;e.setNodeMarkup(r,null,Fo(n.attrs,"height",l))})(e,o,t.cellHeight+(t.heightUnit||"px"))}))},$o=(e,t)=>{const l=e.tr,o=t.applyToAll?Ho(e):zo(e);return qo(l,t,o),l},Go=e=>{const{view:t,...l}=e,[n,r]=f.useState(!1),a=d.useLocalization(),s=!(!t||!Bl(t.state.selection.$from,(e=>"table"===e.type.spec.tableRole))),c=f.useCallback((()=>{r(!0)}),[]),p=f.useCallback((()=>{r(!1),null==t||t.focus()}),[t]),m=f.useCallback((e=>{if(t&&e){const l=$o(t.state,e);l.docChanged&&t.dispatch(l)}p()}),[t,p]);return f.createElement(f.Fragment,null,f.createElement(o.Button,{type:"button",title:a.toLanguageString(yl.cellProperties,kl[yl.cellProperties]),icon:"table-cell-properties",svgIcon:i.tableCellPropertiesIcon,onClick:c,disabled:!s,...Tl,...l}),n&&t&&f.createElement(Zo,{view:t,onCancel:p,onSave:m}))},Jo=[{textKey:yl.cellPropertiesLeftTop,text:kl[yl.cellPropertiesLeftTop],icon:"table-align-top-left",svgIcon:i.tableAlignTopLeftIcon,value:{x:"left",y:"top"}},{textKey:yl.cellPropertiesCenterTop,text:kl[yl.cellPropertiesCenterTop],icon:"table-align-top-center",svgIcon:i.tableAlignTopCenterIcon,value:{x:"center",y:"top"}},{textKey:yl.cellPropertiesRightTop,text:kl[yl.cellPropertiesRightTop],icon:"table-align-top-right",svgIcon:i.tableAlignTopRightIcon,value:{x:"right",y:"top"}},{textKey:yl.cellPropertiesLeftMiddle,text:kl[yl.cellPropertiesLeftMiddle],icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon,value:{x:"left",y:"middle"}},{textKey:yl.cellPropertiesCenterMiddle,text:kl[yl.cellPropertiesCenterMiddle],icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon,value:{x:"center",y:"middle"}},{textKey:yl.cellPropertiesRightMiddle,text:kl[yl.cellPropertiesRightMiddle],icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon,value:{x:"right",y:"middle"}},{textKey:yl.cellPropertiesLeftBottom,text:kl[yl.cellPropertiesLeftBottom],icon:"table-align-bottom-left",svgIcon:i.tableAlignBottomLeftIcon,value:{x:"left",y:"bottom"}},{textKey:yl.cellPropertiesCenterBottom,text:kl[yl.cellPropertiesCenterBottom],icon:"table-align-bottom-center",svgIcon:i.tableAlignBottomCenterIcon,value:{x:"center",y:"bottom"}},{textKey:yl.cellPropertiesRightBottom,text:kl[yl.cellPropertiesRightBottom],icon:"table-align-bottom-right",svgIcon:i.tableAlignBottomRightIcon,value:{x:"right",y:"bottom"}},{textKey:yl.cellPropertiesNoAlignment,text:kl[yl.cellPropertiesNoAlignment],icon:"align-remove",svgIcon:i.tableAlignRemoveIcon,value:{x:"",y:""}}],Qo=[{textKey:yl.cellPropertiesWrap,text:kl[yl.cellPropertiesWrap],value:"",icon:"text-wrap",svgIcon:i.textWrapIcon},{textKey:yl.cellPropertiesFitToCell,text:kl[yl.cellPropertiesFitToCell],value:"nowrap",icon:"parameter-string",svgIcon:i.parameterStringIcon}],Xo=(e,t)=>t?f.createElement(f.Fragment,null,f.createElement(s.InputPrefix,null,f.createElement(n.IconWrap,{icon:t.svgIcon,name:t.icon})),e):e,Yo=(e,t)=>{const l=f.createElement(f.Fragment,null,f.createElement(s.InputPrefix,null,f.createElement(n.IconWrap,{icon:t.dataItem.svgIcon,name:t.dataItem.icon})),e.props.children);return f.cloneElement(e,e.props,l)},Zo=e=>{const t=f.useMemo((()=>jo(e.view.state)),[e.view]),l=d.useLocalization(),n=f.useRef(null),r=t.applyToAll,i=f.useRef(null),c=t.cellWidth,p=f.useRef(null);t.widthUnit&&!Rl.includes(t.widthUnit)&&Rl.push(t.widthUnit);const m=t.widthUnit||"",g=f.useRef(null),h=t.cellHeight,b=f.useRef(null);t.heightUnit&&!Rl.includes(t.heightUnit)&&Rl.push(t.heightUnit);const v=t.heightUnit||"",k=f.useRef(null),y=Jo.find((e=>void 0!==e.value.x&&t.alignment&&e.value.x===t.alignment.x&&e.value.y===t.alignment.y))||null,C=f.useRef(null),w=Qo.find((e=>e.value===t.textControl)),S=f.useRef(null),E=t.backgroundColor,x=f.useRef(null),T=t.cellPadding,P=f.useRef(null),I=t.borderWidth,N=f.useRef(null),R=t.borderColor,L=f.useRef(null),A=Al.find((e=>e.value===t.borderStyle)),B=f.useRef(null),D=t.id,M=f.useRef(null),F=t.className,z=f.useCallback((()=>{var t,l,o,r,a,s,c,d,m,u,h,f,v,y,w,E,T,I,R,A;const D={applyToAll:!(null==(l=null==(t=n.current)?void 0:t.element)||!l.checked),cellWidth:(null==(o=i.current)?void 0:o.value)||null,widthUnit:(null==(r=p.current)?void 0:r.value)||"",cellHeight:(null==(a=g.current)?void 0:a.value)||null,heightUnit:(null==(s=b.current)?void 0:s.value)||"",alignment:null==(d=null==(c=k.current)?void 0:c.value)?void 0:d.value,textControl:null==(u=null==(m=C.current)?void 0:m.value)?void 0:u.value,backgroundColor:null==(h=S.current)?void 0:h.value,cellPadding:"number"==typeof(null==(f=x.current)?void 0:f.value)?null==(v=x.current)?void 0:v.value:null,borderWidth:"number"==typeof(null==(y=P.current)?void 0:y.value)?null==(w=P.current)?void 0:w.value:null,borderColor:null==(E=N.current)?void 0:E.value,borderStyle:(null==(I=null==(T=L.current)?void 0:T.value)?void 0:I.value)||null,id:String((null==(R=B.current)?void 0:R.value)||""),className:String((null==(A=M.current)?void 0:A.value)||"")};e.onSave.call(void 0,D)}),[e.onSave]),H=f.createElement("div",{className:"k-form k-form-md"},f.createElement("fieldset",{className:"k-form-fieldset"},f.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("div",{className:"k-form-field-wrap"},f.createElement("span",{className:"k-checkbox-wrap"},f.createElement(s.Checkbox,{ref:n,defaultChecked:r})),f.createElement("label",{className:"k-checkbox-label"},l.toLanguageString(yl.cellPropertiesApplyToAllCells,kl[yl.cellPropertiesApplyToAllCells])))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesWidth,kl[yl.cellPropertiesWidth])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:i,defaultValue:c,min:0,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto])}),f.createElement("div",{className:"k-form-hint"},l.toLanguageString(yl.cellPropertiesApplyToColumn,kl[yl.cellPropertiesApplyToColumn])))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"}," "),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.AutoComplete,{ref:p,defaultValue:m,data:Rl,popupSettings:Ll}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesHeight,kl[yl.cellPropertiesHeight])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:g,defaultValue:h,min:0,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto])}),f.createElement("div",{className:"k-form-hint"},l.toLanguageString(yl.cellPropertiesApplyToRow,kl[yl.cellPropertiesApplyToRow])))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"}," "),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.AutoComplete,{ref:b,defaultValue:v,data:Rl,popupSettings:Ll}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesAlignment,kl[yl.cellPropertiesAlignment])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:k,defaultValue:y,data:Jo.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"text",popupSettings:Ll,valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesTextControl,kl[yl.cellPropertiesTextControl])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:C,defaultValue:w,data:Qo.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",popupSettings:Ll,valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesCellPadding,kl[yl.cellPropertiesCellPadding])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:x,defaultValue:T,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesBackground,kl[yl.cellPropertiesBackground])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.ColorPicker,{ref:S,defaultValue:E}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesBorderWidth,kl[yl.cellPropertiesBorderWidth])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:P,defaultValue:I,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesBorderColor,kl[yl.cellPropertiesBorderColor])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.ColorPicker,{ref:N,defaultValue:R}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesBorderStyle,kl[yl.cellPropertiesBorderStyle])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:L,defaultValue:A,popupSettings:Ll,data:Al,textField:"text",dataItemKey:"value"}))),f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesId,kl[yl.cellPropertiesId])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:B,defaultValue:D}))),f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesCssClass,kl[yl.cellPropertiesCssClass])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:M,defaultValue:F})))))),W=[f.createElement(o.Button,{themeColor:"primary",key:"save",onClick:z},l.toLanguageString(yl.cellPropertiesSave,kl[yl.cellPropertiesSave])),f.createElement(o.Button,{onClick:e.onCancel,key:"cancel"},l.toLanguageString(yl.cellPropertiesCancel,kl[yl.cellPropertiesCancel]))];return f.createElement(a.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(yl.cellProperties,kl[yl.cellProperties]),onClose:e.onCancel,key:"dialog",style:{userSelect:"none"},width:408,height:587,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},H,f.createElement(a.WindowActionsBar,{layout:"start"},...W))},en={rows:0,columns:0,width:null,widthUnit:"",height:null,heightUnit:"",position:null,textAlign:"",cellPadding:null,cellSpacing:null,backgroundColor:void 0,borderWidth:null,borderColor:void 0,borderStyle:null,collapseBorders:!1,id:"",className:"",caption:"",captionAlignment:null,captionPosition:null,headerRows:0,headerColumns:0,associateHeaders:"none"},tn={left:{"margin-left":"","margin-right":"auto"},center:{"margin-left":"auto","margin-right":"auto"},right:{"margin-left":"auto","margin-right":""},"":{}},ln=e=>{const t=[];for(let l=0;l<e.height;l++){const o=l*e.width,n=o+e.width;t.push(e.map.slice(o,n))}return t},on=e=>{let t=!0,l=!0;return e.content.forEach((e=>{e.content.forEach((e=>{const o="table_header"===e.type.name,n="table_cell"===e.type.name;o&&!e.attrs.scope&&(t=!1),(o&&!e.attrs.id||n&&!e.attrs.headers)&&(l=!1)}))})),t?"scope":l?"id":"none"},nn=e=>{var t,l,o;const n=zo(e),i=e.selection.$from,a=n.length?Bl(i,(e=>"table"===e.type.spec.tableRole)):null;if(!a)return en;const s=Bl(i,(e=>"table_wrapper"===e.type.name));let c="",d={},p={};s&&(p=Do(s.node.attrs.style),s.node.content.forEach((e=>{if("table_caption_external"===e.type.name){const t=r.pmDocToFragment(e);c=r.fragmentToHtml(t),c="<img>"===c?"":c,d=Do(e.attrs.style)}})));const m=Do((null==(t=a.node.attrs)?void 0:t.style)||""),u=r.TableMap.get(a.node),g="auto"===p["margin-left"]&&"auto"===p["margin-right"]?"center":"auto"===p["margin-right"]?"left":"auto"===p["margin-left"]?"right":null,h=((e,t)=>{let l=0,o=0;const n=ln(t);n.forEach((t=>{let o=!0;t.forEach((t=>{const l=e.nodeAt(t);l&&"table_header"!==l.type.name&&(o=!1)})),o&&l++}));for(let l=0;l<t.width;l++){let r=!0;for(let o=0;o<t.height;o++){const t=n[o]&&n[o][l],i="number"==typeof t&&e.nodeAt(t);i&&"table_header"!==i.type.name&&(r=!1)}r&&o++}return{rows:l,columns:o}})(a.node,u),f=(e=>{const t=new Set;return e.content.forEach((e=>{e.content.forEach((e=>{t.add(Do(e.attrs.style).padding||"")}))})),1===t.size?Array.from(t)[0]:""})(a.node);return{...en,columns:u.width,rows:u.height,...Bo(a.node,"width"),...s&&/%/.test(p.width||"")?Bo(s.node,"width"):{},...Bo(a.node,"height"),textAlign:m["text-align"]||"",position:g||null,cellPadding:f?parseFloat(f):null,cellSpacing:m["border-spacing"]?parseFloat(m["border-spacing"]):null,backgroundColor:m["background-color"],borderWidth:m["border-width"]?parseFloat(m["border-width"]):null,borderColor:m["border-color"],borderStyle:m["border-style"]||null,collapseBorders:"collapse"===m["border-collapse"],caption:c||void 0,captionAlignment:d["text-align"]||"",captionPosition:d["caption-side"]||null,headerRows:h.rows,headerColumns:h.columns,associateHeaders:h.rows||h.columns?on(a.node):"none",id:(null==(l=a.node.attrs)?void 0:l.id)||"",className:(null==(o=a.node.attrs)?void 0:o.class)||""}},rn=e=>{const t=e.lastChild.lastChild;return{node:t,pos:e.content.size-t.nodeSize}},an=(e,t,l,o,n)=>{const i=t+rn(l).pos;if(!e.doc.nodeAt(i))return e;const a=e.doc.resolve(i),s=new r.CellSelection(a,a),c=e.tr.setSelection(s);let d=e.apply(c);for(let e=0;e<o;e++)n(d,(e=>{d=d.apply(e)}));return d},sn=(e,t,l,o)=>{let n=e;for(let e=0;e<l;e++){const e=n.doc.nodeAt(t);if(e){const l=t+rn(e).pos,i=n.doc.resolve(l),a=new r.CellSelection(i,i),s=n.tr.setSelection(a);n=n.apply(s),o(n,(e=>{n=n.apply(e)}))}}return n},cn=(e,t,l,o,n)=>{if(t.type.name!==o.name||Object.keys(n).length>0){const r=e.tr.setNodeMarkup(l,o,{...t.attrs,...n});return e.apply(r)}return e},dn=(e,t,l)=>{const o=e.doc.nodeAt(l),n=o&&r.TableMap.get(o);if(!o||!n)return e;const i=ln(n);let a=e;const{table_header:s,table_cell:c}=e.schema.nodes,d=String((new Date).getTime()),p=[],m=(e,t,l,o)=>{const n=[];if(o)for(let l=0;l<e;l++)p[l]&&p[l][t]&&n.push(p[l][t]);if(l)for(let l=0;l<t;l++)p[e]&&p[e][l]&&n.push(p[e][l]);return n.join(" ")};return i.forEach(((e,n)=>{e.forEach(((e,r)=>{const i=o.nodeAt(e);if(i){const o=r<t.headerColumns,u=n<t.headerRows,g={...i.attrs};((e,t)=>{/^cell-[0-9]+-[0-9]+$/.test(e.attrs.id||"")&&(t.id=null)})(i,g),g.headers=null,g.scope=null,u||o?("scope"===t.associateHeaders&&(g.scope=u?"col":"row"),"id"===t.associateHeaders&&(g.id=((e,t)=>{const l=`cell-${e}${t}-${d}`;return p[e]||p.push([]),p[e][t]||p[e].push([]),p[e][t]=l,l})(n,r),(r>0||n>0)&&(g.headers=m(n,r,o,u)||null)),a=cn(a,i,l+e+1,s,g)):("id"===t.associateHeaders&&(g.headers=m(n,r,t.headerColumns>0,t.headerRows>0)||null),a=cn(a,i,l+e+1,c,g))}}))})),a},pn=(e,t)=>r.parseContent("<p>"+e+"</p>",t).content.firstChild.content,mn=(e,t)=>{if(!e.caption)return;let l={caption:"",style:"display: table-caption"};e.captionAlignment&&(l=Fo(l,"text-align",e.captionAlignment)),e.captionPosition&&(l=Fo(l,"caption-side",e.captionPosition));const o=pn(e.caption,t);return o&&t.nodes.table_caption_external.createAndFill(l,o)||void 0},un=e=>e.firstChild&&"table_caption_external"===e.firstChild.type.name,gn=(e,t,l,o,n)=>{let r={state:e,pos:l};if(o||!t.position&&!t.caption)o&&(t.position||t.caption||!t.caption&&un(o.node))?(e=((e,t,l,o)=>{let n={...t.attrs};return n=Fo(n,"margin-left",""),n=Fo(n,"margin-right",""),Object.keys(o||{}).forEach((e=>{n=Fo(n,e,(o||{})[e]||"")})),e.apply(e.tr.setNodeMarkup(l,null,n))})(e,o.node,n,t.position&&tn[t.position]),e=((e,t,l,o)=>{let n,r=e;const i=l+2,a=l+1,s=r.schema;if(un(t))if(n=t.firstChild,o.caption){const e=pn(o.caption,s);if(r=r.apply(r.tr.replaceWith(i,i+n.content.size,e)),n=r.doc.nodeAt(a),n){let e={...n.attrs};e=Fo(e,"text-align",o.captionAlignment||""),e=Fo(e,"caption-side",o.captionPosition||""),r=r.apply(r.tr.setNodeAttribute(a,"style",e.style))}}else r=r.apply(r.tr.deleteRange(i,i+n.content.size));else n=mn(o,s),n&&(r=r.apply(r.tr.replaceWith(a,a,n)));return r})(e,o.node,n,t),r={state:e,pos:n}):r=!o||t.position||t.caption?{state:e,pos:l}:{state:e,node:o.node,pos:e.selection.$from.start(o.depth)-1};else{let o={table:"",style:"display: table"};const n=[],i=t.position,a=i&&tn[i];a&&Object.keys(a).forEach((e=>{o=Fo(o,e,a[e]||"")})),"number"==typeof t.width&&"%"===t.widthUnit&&(o=Fo(o,"width",t.width+t.widthUnit));const s=mn(t,e.schema);s&&n.push(s);const c=e.doc.nodeAt(l);n.push(c);const d=e.schema.nodes.table_wrapper.createAndFill(o,n);if(d){const t=e.tr.replaceWith(l,l+c.content.size,d);r={state:e=e.apply(t),pos:l}}}const i=o&&r.state.doc.nodeAt(n);if(i){let e;"number"==typeof t.width&&"%"===t.widthUnit?e=Fo(i.attrs,"width",t.width+t.widthUnit):"%"!==t.widthUnit&&/%/.test(Do(i.attrs.style||"").width||"")&&(e=Fo(i.attrs,"width","")),e&&(r.state=r.state.apply(r.state.tr.setNodeMarkup(n,null,e)))}return r},hn=(e,t)=>{const l=e.selection.$from,o=Bl(l,(e=>"table"===e.type.spec.tableRole));if(!o)return;const n=l.start(o.depth)-1;let i=((e,t,l,o)=>{let n=e,i=n.doc.nodeAt(t);if(!i)return n;let a=r.TableMap.get(i);return a.width===o&&a.height===l||(o>a.width?n=an(n,t,i,o-a.width,r.addColumnAfter):o<a.width&&(n=sn(n,t,a.width-o,mo)),i=n.doc.nodeAt(t),!i)||(a=r.TableMap.get(i),l>a.height?n=an(n,t,i,l-a.height,r.addRowAfter):l<a.height&&(n=sn(n,t,a.height-l,uo))),n})(e,n,t.rows,t.columns);if(!i)return;const a=i.tr;Ho(i).forEach((e=>{let l={...e.node.attrs};l=Fo(l,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),a.setNodeMarkup(e.pos,null,l)})),i=i.apply(a),i=((e,t,l)=>{const o=e.doc.nodeAt(l);if(!o)return e;let n={...o.attrs};const r=null!==t.width&&("%"!==t.widthUnit||!t.caption&&!t.position);n=Fo(n,"width",r?t.width+t.widthUnit:""),n=Fo(n,"height",null!==t.height?t.height+t.heightUnit:""),n=Fo(n,"text-align",t.textAlign||""),n=Fo(n,"background-color",t.backgroundColor||""),n=Fo(n,"border-width",t.borderWidth?t.borderWidth+"px":""),n=Fo(n,"border-style",t.borderStyle||""),n=Fo(n,"border-color",t.borderColor||""),n=Fo(n,"border-spacing",null!==t.cellSpacing?t.cellSpacing+"px":""),n=null!==t.cellSpacing?Fo(n,"border-collapse","unset"):Fo(n,"border-collapse",t.collapseBorders?"collapse":"");const i=tn[t.position||""]||{};Object.keys(i).forEach((e=>{n=Fo(n,e,i[e])})),n.id=t.id||null,n.class=t.className||null;const a=e.tr.setNodeMarkup(l,null,n);return e.apply(a)})(i,t,n),i=dn(i,t,n);const s=Bl(l,(e=>"table_wrapper"===e.type.name)),c=l.start((null==s?void 0:s.depth)||0)-1,d=gn(i,t,n,s,c);i=d.state;const p=d.pos,m=i.doc.nodeAt(d.pos);if(!m)return;const u=p+(s||o).node.content.size,g=e.tr.replaceWith(p,u,m),h=r.Selection.atEnd(m),f=r.TextSelection.create(g.doc,p+h.to+1);return g.setSelection(f),g},fn=e=>{const{view:t,...l}=e,n=d.useLocalization(),[r,a]=f.useState(!1),s=!(!t||!Bl(t.state.selection.$from,(e=>"table"===e.type.spec.tableRole))),c=f.useCallback((()=>{a(!0)}),[]),p=f.useCallback((()=>{a(!1),null==t||t.focus()}),[t]),m=f.useCallback((e=>{if(t&&e){const l=hn(t.state,e);l&&t.dispatch(l)}p()}),[t,p]);return f.createElement(f.Fragment,null,f.createElement(o.Button,{type:"button",title:n.toLanguageString(yl.tableProperties,kl[yl.tableProperties]),icon:"table-properties",svgIcon:i.tablePropertiesIcon,onClick:c,disabled:!s,...Tl,...l}),r&&f.createElement(Cn,{onClose:p,onSave:m,view:t}))},bn=[{textKey:yl.tablePropertiesAlignLeft,text:kl[yl.tablePropertiesAlignLeft],value:"left",icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon},{textKey:yl.tablePropertiesAlignCenter,text:kl[yl.tablePropertiesAlignCenter],value:"center",icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon},{textKey:yl.tablePropertiesAlignRight,text:kl[yl.tablePropertiesAlignRight],value:"right",icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon},{textKey:yl.tablePropertiesNoAlignment,text:kl[yl.tablePropertiesNoAlignment],value:"",icon:"align-remove",svgIcon:i.tableAlignRemoveIcon}],vn=[{textKey:yl.tablePropertiesLeft,text:kl[yl.tablePropertiesLeft],value:"left",style:{},icon:"table-position-left",svgIcon:i.tablePositionStartIcon},{textKey:yl.tablePropertiesCenter,text:kl[yl.tablePropertiesCenter],value:"center",style:{},icon:"table-position-center",svgIcon:i.tablePositionCenterIcon},{textKey:yl.tablePropertiesRight,text:kl[yl.tablePropertiesRight],value:"right",style:{},icon:"table-position-right",svgIcon:i.tablePositionEndIcon}].map((e=>({...e,style:tn[e.value]}))),kn=[{textKey:yl.tablePropertiesTop,text:kl[yl.tablePropertiesTop],value:"top",icon:"position-top",svgIcon:i.positionTopIcon},{textKey:yl.tablePropertiesBottom,text:kl[yl.tablePropertiesBottom],value:"bottom",icon:"position-bottom",svgIcon:i.positionBottomIcon}],yn=[{textKey:yl.tablePropertiesNone,text:kl[yl.tablePropertiesNone],value:"none"},{textKey:yl.tablePropertiesUsingScopeAttribute,text:kl[yl.tablePropertiesUsingScopeAttribute],value:"scope"},{textKey:yl.tablePropertiesUsingIdAttributes,text:kl[yl.tablePropertiesUsingIdAttributes],value:"id"}],Cn=e=>{const t=f.useMemo((()=>{const t=e.view&&e.view.state;return t?nn(t):en}),[e.view]),l=d.useLocalization(),[n,r]=f.useState(0),i=f.useCallback((e=>{r(e.selected)}),[]),c=f.useRef(null),m=f.useRef(null),g=f.useRef(null),h=f.useRef(null),b=f.useRef(null),v=f.useRef(null),k=f.useRef(null),y=f.useRef(null),C=f.useRef(null),w=f.useRef(null),S=f.useRef(null),E=f.useRef(null),x=f.useRef(null),T=f.useRef(null),P=f.useRef(null),I=f.useRef(null),N=f.useRef(null),R=f.useRef(null),L=f.useRef(null),A=f.useRef(null),B=f.useRef(null),D=f.useRef(null),M=f.useRef(null),F=f.useCallback((()=>{var t,l,o,n,r,i,a,s,d,p,u,f,F,z,H,W,K,U,O,V;const _={rows:(null==(t=c.current)?void 0:t.value)||0,columns:(null==(l=m.current)?void 0:l.value)||0,width:g.current?g.current.value:null,height:h.current?h.current.value:null,cellSpacing:b.current?b.current.value:null,cellPadding:v.current?v.current.value:null,borderWidth:k.current?k.current.value:null,widthUnit:(null==(o=y.current)?void 0:o.value)||"",heightUnit:(null==(n=C.current)?void 0:n.value)||"",position:(null==(i=null==(r=w.current)?void 0:r.value)?void 0:i.value)||null,textAlign:null!=(a=S.current)&&a.value?S.current.value.value:null,borderStyle:null!=(s=E.current)&&s.value?E.current.value.value:null,backgroundColor:null==(d=x.current)?void 0:d.value,borderColor:null==(p=T.current)?void 0:p.value,collapseBorders:!(null==(f=null==(u=P.current)?void 0:u.element)||!f.checked),id:String((null==(F=I.current)?void 0:F.value)||""),className:String((null==(z=N.current)?void 0:z.value)||""),caption:String((null==(H=R.current)?void 0:H.value)||""),headerRows:(null==(W=L.current)?void 0:W.value)||0,headerColumns:(null==(K=A.current)?void 0:K.value)||0,captionAlignment:null!=(U=B.current)&&U.value?B.current.value.value:null,captionPosition:null!=(O=D.current)&&O.value?D.current.value.value:null,associateHeaders:null!=(V=M.current)&&V.value?M.current.value.value:"none"};e.onSave.call(void 0,_)}),[e.onSave]),z=f.createElement("div",{className:"k-form k-form-md"},f.createElement("fieldset",{className:"k-form-fieldset"},f.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesRows,kl[yl.tablePropertiesRows])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:c,defaultValue:t.rows,min:1}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesColumns,kl[yl.tablePropertiesColumns])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:m,defaultValue:t.columns,min:1}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesWidth,kl[yl.tablePropertiesWidth])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:g,defaultValue:t.width,min:0,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto])}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"}," "),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.AutoComplete,{ref:y,defaultValue:t.widthUnit,data:Rl,popupSettings:Ll}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesHeight,kl[yl.tablePropertiesHeight])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:h,defaultValue:t.height,min:0,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto])}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"}," "),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.AutoComplete,{ref:C,defaultValue:t.heightUnit,data:Rl.filter((e=>"%"!==e)),popupSettings:Ll}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesPosition,kl[yl.tablePropertiesPosition])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:w,defaultValue:vn.find((e=>e.value===t.position)),popupSettings:Ll,data:vn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesAlignment,kl[yl.tablePropertiesAlignment])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:S,defaultValue:bn.find((e=>e.value===t.textAlign)),data:bn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",popupSettings:Ll,valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCellSpacing,kl[yl.tablePropertiesCellSpacing])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:b,defaultValue:t.cellSpacing,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto]),min:0}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCellPadding,kl[yl.tablePropertiesCellPadding])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:v,defaultValue:t.cellPadding,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto]),min:0}))),f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesTableBackground,kl[yl.tablePropertiesTableBackground])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.ColorPicker,{ref:x,defaultValue:t.backgroundColor}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesBorderWidth,kl[yl.tablePropertiesBorderWidth])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:k,defaultValue:t.borderWidth,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesBorderColor,kl[yl.tablePropertiesBorderColor])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.ColorPicker,{ref:T,defaultValue:t.borderColor}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesBorderStyle,kl[yl.tablePropertiesBorderStyle])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:E,defaultValue:Al.find((e=>e.value===t.borderStyle)),popupSettings:Ll,data:Al.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value"}))),f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Checkbox,{ref:P,className:"k-checkbox-wrap",label:l.toLanguageString(yl.tablePropertiesCollapseBorders,kl[yl.tablePropertiesCollapseBorders]),defaultChecked:t.collapseBorders})))))),H=f.createElement("div",{className:"k-form k-form-md"},f.createElement("fieldset",{className:"k-form-fieldset"},f.createElement("div",{className:"k-form-layout k-d-grid"},f.createElement("div",{className:"k-form-field"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesId,kl[yl.tablePropertiesId])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:I,defaultValue:t.id}))),f.createElement("div",{className:"k-form-field"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCssClass,kl[yl.tablePropertiesCssClass])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:N,defaultValue:t.className}))),f.createElement("fieldset",{className:"k-form-fieldset"},f.createElement("legend",{className:"k-form-legend"},l.toLanguageString(yl.tablePropertiesAccessibility,kl[yl.tablePropertiesAccessibility])),f.createElement("div",{className:"k-d-grid k-grid-cols-4 k-gap-x-4"},f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCaption,kl[yl.tablePropertiesCaption])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:R,defaultValue:t.caption}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCaptionPosition,kl[yl.tablePropertiesCaptionPosition])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:D,defaultValue:kn.find((e=>e.value===t.captionPosition)),data:kn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ll,textField:"text",dataItemKey:"value",valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCaptionAlignment,kl[yl.tablePropertiesCaptionAlignment])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:B,defaultValue:bn.find((e=>e.value===t.captionAlignment)),data:bn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ll,textField:"text",dataItemKey:"value",valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesHeaderRows,kl[yl.tablePropertiesHeaderRows])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:L,defaultValue:t.headerRows,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesHeaderCols,kl[yl.tablePropertiesHeaderCols])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:A,defaultValue:t.headerColumns,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesAssociateHeaders,kl[yl.tablePropertiesAssociateHeaders])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:M,defaultValue:yn.find((e=>e.value===t.associateHeaders)),data:yn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ll,textField:"text",dataItemKey:"value"})))))))),W=f.createElement(p.TabStrip,{selected:n,onSelect:i,animation:!1,keepTabsMounted:!0},f.createElement(p.TabStripTab,{title:l.toLanguageString(yl.tablePropertiesGeneral,kl[yl.tablePropertiesGeneral])},z),f.createElement(p.TabStripTab,{title:l.toLanguageString(yl.tablePropertiesAdvanced,kl[yl.tablePropertiesAdvanced])},H)),K=[f.createElement(o.Button,{themeColor:"primary",key:"save",onClick:F},l.toLanguageString(yl.tablePropertiesSave,kl[yl.tablePropertiesSave])),f.createElement(o.Button,{onClick:e.onClose,key:"cancel"},l.toLanguageString(yl.tablePropertiesCancel,kl[yl.tablePropertiesCancel]))];return f.createElement(a.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(yl.tableProperties,kl[yl.tableProperties]),onClose:e.onClose,key:"dialog",style:{userSelect:"none"},width:480,height:630,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},W,f.createElement(a.WindowActionsBar,{layout:"start"},...K))};e.EditorTools=void 0,(t=>{function l(e){return Zl(e)}t.createAlignTool=l;class o extends(l(e.EditorToolsSettings.alignLeft)){}t.AlignLeft=o;class n extends(l(e.EditorToolsSettings.alignRight)){}t.AlignRight=n;class r extends(l(e.EditorToolsSettings.alignCenter)){}t.AlignCenter=r;class a extends(l(e.EditorToolsSettings.alignJustify)){}function s(e){return Xl.createInsertTableTool(e)}t.AlignJustify=a,t.createInsertTableTool=s;class c extends(s(e.EditorToolsSettings.insertTable)){}t.InsertTable=c;class d extends Ql.InsertTablePopup{}function p(e){return eo.createStyleDropDownList(e)}t.InsertTablePopup=d,t.createStyleDropDownList=p;class m extends(p(e.EditorToolsSettings.fontSize)){}t.FontSize=m;class u extends(p(e.EditorToolsSettings.fontName)){}function g(e){return lo.createFormatBlockDropDownList(e)}t.FontName=u,t.ForeColor=t=>f.createElement(to,{...e.EditorToolsSettings.foreColor,...t}),t.BackColor=t=>f.createElement(to,{...e.EditorToolsSettings.backColor,...t}),t.createFormatBlockDropDownList=g;class h extends(g(e.EditorToolsSettings.formatBlock)){}function b(e){return no.createUndoTool(e)}function v(e){return no.createRedoTool(e)}t.FormatBlock=h,t.createUndoTool=b,t.createRedoTool=v;class k extends(b(e.EditorToolsSettings.undo)){}t.Undo=k;class y extends(v(e.EditorToolsSettings.redo)){}function C(e){return ro.createIndentTool(e)}t.Redo=y,t.createIndentTool=C;class w extends(C(e.EditorToolsSettings.indent)){}function S(e){return io.createInlineFormatTool(e)}t.Indent=w,t.createInlineFormatTool=S;class E extends(S(e.EditorToolsSettings.bold)){}t.Bold=E;class x extends(S(e.EditorToolsSettings.italic)){}t.Italic=x;class T extends(S(e.EditorToolsSettings.underline)){}t.Underline=T;class P extends(S(e.EditorToolsSettings.strikethrough)){}t.Strikethrough=P;class I extends(S(e.EditorToolsSettings.subscript)){}t.Subscript=I;class N extends(S(e.EditorToolsSettings.superscript)){}function R(e){return ao(e)}t.Superscript=N,t.createInsertImageTool=R;class L extends(R(e.EditorToolsSettings.image)){}function A(e){return so.createLinkTool(e)}t.InsertImage=L,t.createLinkTool=A;class B extends(A(e.EditorToolsSettings.link)){}t.Link=B;class D extends(A(e.EditorToolsSettings.insertFile)){}function M(e){return co.createListTool(e)}t.InsertFile=D,t.createListTool=M;class F extends(M(e.EditorToolsSettings.orderedList)){}t.OrderedList=F;class z extends(M(e.EditorToolsSettings.bulletList)){}function H(e){return po.createOutdentTool(e)}t.UnorderedList=z,t.BulletedList=t=>{const l=[{icon:"list-unordered",svgIcon:i.listUnorderedIcon,text:"Disc",style:"disc"},{icon:"list-unordered-outline",svgIcon:i.listUnorderedOutlineIcon,text:"Circle",style:"circle"},{icon:"list-unordered-square",svgIcon:i.listUnorderedSquareIcon,text:"Square",style:"square"}];return f.createElement(Ro,{listType:e.EditorToolsSettings.bulletList.listType,items:l,icon:"list-unordered",svgIcon:i.listUnorderedIcon,titleKey:e.EditorToolsSettings.bulletList.messages.title,...t})},t.NumberedList=t=>{const l=[{icon:"list-ordered",svgIcon:i.listOrderedIcon,text:"Decimal"},{icon:"list-roman-upper",svgIcon:i.listRomanUpperIcon,text:"Upper roman",style:"upper-roman"},{icon:"list-roman-lower",svgIcon:i.listRomanLowerIcon,text:"Lower roman",style:"lower-roman"},{icon:"list-latin-big",svgIcon:i.listLatinBigIcon,text:"Upper latin",style:"upper-latin"},{icon:"list-latin-small",svgIcon:i.listLatinSmallIcon,text:"Lower latin",style:"lower-latin"}];return f.createElement(Ro,{listType:e.EditorToolsSettings.orderedList.listType,items:l,icon:"list-ordered",svgIcon:i.listOrderedIcon,titleKey:e.EditorToolsSettings.orderedList.messages.title,...t})},t.TableCellProperties=Go,t.TableProperties=fn,t.createOutdentTool=H;class W extends(H(e.EditorToolsSettings.outdent)){}function K(e){return go.createAddRowBeforeTool(e)}function U(e){return go.createAddRowAfterTool(e)}function O(e){return go.createAddColumnBeforeTool(e)}function V(e){return go.createAddColumnAfterTool(e)}function _(e){return go.createDeleteRowTool(e)}function j(e){return go.createDeleteColumnTool(e)}function q(e){return go.createDeleteTableTool(e)}function $(e){return go.createMergeCellsTool(e)}function G(e){return go.createSplitCellTool(e)}t.Outdent=W,t.Print=e=>f.createElement(vo,{...e}),t.Pdf=e=>f.createElement(Co,{...e}),t.SelectAll=e=>f.createElement(So,{...e}),t.CleanFormatting=e=>f.createElement(To,{...e}),t.createAddRowBeforeTool=K,t.createAddRowAfterTool=U,t.createAddColumnBeforeTool=O,t.createAddColumnAfterTool=V,t.createDeleteRowTool=_,t.createDeleteColumnTool=j,t.createDeleteTableTool=q,t.createMergeCellsTool=$,t.createSplitCellTool=G;class J extends(K(e.EditorToolsSettings.addRowBefore)){}t.AddRowBefore=J;class Q extends(U(e.EditorToolsSettings.addRowAfter)){}t.AddRowAfter=Q;class X extends(O(e.EditorToolsSettings.addColumnBefore)){}t.AddColumnBefore=X;class Y extends(V(e.EditorToolsSettings.addColumnAfter)){}t.AddColumnAfter=Y;class Z extends(_(e.EditorToolsSettings.deleteRow)){}t.DeleteRow=Z;class ee extends(j(e.EditorToolsSettings.deleteColumn)){}t.DeleteColumn=ee;class te extends(q(e.EditorToolsSettings.deleteTable)){}t.DeleteTable=te;class le extends($(e.EditorToolsSettings.mergeCells)){}t.MergeCells=le;class oe extends(G(e.EditorToolsSettings.splitCell)){}function ne(e){return ho.createUnlinkTool(e)}t.SplitCell=oe,t.createUnlinkTool=ne;class re extends(ne(e.EditorToolsSettings.unlink)){}function ie(e){return fo.createViewHtmlTool(e)}t.Unlink=re,t.createViewHtmlTool=ie;class ae extends(ie(e.EditorToolsSettings.viewHtml)){}t.ViewHtml=ae;t.FindAndReplace=class extends Io{}})(e.EditorTools||(e.EditorTools={}));const wn={Selection:r.Selection,SelectionRange:r.SelectionRange,TextSelection:r.TextSelection,NodeSelection:r.NodeSelection,AllSelection:r.AllSelection,EditorState:r.EditorState,Plugin:r.Plugin,PluginKey:r.PluginKey,Transaction:r.Transaction,Decoration:r.Decoration,DecorationSet:r.DecorationSet,EditorView:r.EditorView,Node:r.Node,ResolvedPos:r.ResolvedPos,NodeRange:r.NodeRange,Fragment:r.Fragment,Slice:r.Slice,ReplaceError:r.ReplaceError,Mark:r.Mark,Schema:r.Schema,NodeType:r.NodeType,MarkType:r.MarkType,ContentMatch:r.ContentMatch,DOMParser:r.DOMParser,DOMSerializer:r.DOMSerializer,Transform:r.Transform,Step:r.Step,StepResult:r.StepResult,joinPoint:r.joinPoint,canJoin:r.canJoin,canSplit:r.canSplit,insertPoint:r.insertPoint,dropPoint:r.dropPoint,liftTarget:r.liftTarget,findWrapping:r.findWrapping,StepMap:r.StepMap,MapResult:r.MapResult,Mapping:r.Mapping,AddMarkStep:r.AddMarkStep,RemoveMarkStep:r.RemoveMarkStep,ReplaceStep:r.ReplaceStep,ReplaceAroundStep:r.ReplaceAroundStep,replaceStep:r.replaceStep,deleteSelection:r.deleteSelection,joinBackward:r.joinBackward,selectNodeBackward:r.selectNodeBackward,joinForward:r.joinForward,selectNodeForward:r.selectNodeForward,joinUp:r.joinUp,joinDown:r.joinDown,lift:r.lift,newlineInCode:r.newlineInCode,exitCode:r.exitCode,createParagraphNear:r.createParagraphNear,liftEmptyBlock:r.liftEmptyBlock,splitBlock:r.splitBlock,splitBlockKeepMarks:r.splitBlockKeepMarks,selectParentNode:r.selectParentNode,selectAll:r.selectAll,wrapIn:r.wrapIn,setBlockType:r.setBlockType,toggleMark:r.toggleMark,autoJoin:r.autoJoin,chainCommands:r.chainCommands,pcBaseKeymap:r.pcBaseKeymap,macBaseKeymap:r.macBaseKeymap,baseKeymap:r.baseKeymap,history:r.history,undo:r.undo,redo:r.redo,undoDepth:r.undoDepth,redoDepth:r.redoDepth,InputRule:r.InputRule,inputRules:r.inputRules,undoInputRule:r.undoInputRule,emDash:r.emDash,ellipsis:r.ellipsis,openDoubleQuote:r.openDoubleQuote,closeDoubleQuote:r.closeDoubleQuote,openSingleQuote:r.openSingleQuote,closeSingleQuote:r.closeSingleQuote,smartQuotes:r.smartQuotes,wrappingInputRule:r.wrappingInputRule,textblockTypeInputRule:r.textblockTypeInputRule,keymap:r.keymap,keydownHandler:r.keydownHandler,orderedList:r.orderedList,bulletList:r.bulletList,listItem:r.listItem,addListNodes:r.addListNodes,wrapInList:r.wrapInList,splitListItem:r.splitListItem,liftListItem:r.liftListItem,sinkListItem:r.sinkListItem,dropCursor:r.dropCursor,gapCursor:r.gapCursor,tableEditing:r.tableEditing,fixTables:r.fixTables,fixTablesKey:r.fixTablesKey,cellAround:r.cellAround,isInTable:r.isInTable,selectionCell:r.selectionCell,moveCellForward:r.moveCellForward,inSameTable:r.inSameTable,findCell:r.findCell,colCount:r.colCount,nextCell:r.nextCell,removeColSpan:r.removeColSpan,addColSpan:r.addColSpan,columnIsHeader:r.columnIsHeader,tableNodes:r.tableNodes,tableNodeTypes:r.tableNodeTypes,CellSelection:r.CellSelection,TableMap:r.TableMap,tableEditingKey:r.tableEditingKey,columnResizing:r.columnResizing,columnResizingPluginKey:r.columnResizingPluginKey,updateColumnsOnResize:r.updateColumnsOnResize,selectedRect:r.selectedRect,addColumn:r.addColumn,addColumnBefore:r.addColumnBefore,addColumnAfter:r.addColumnAfter,deleteColumn:r.deleteColumn,rowIsHeader:r.rowIsHeader,addRow:r.addRow,addRowBefore:r.addRowBefore,addRowAfter:r.addRowAfter,deleteRow:r.deleteRow,mergeCells:r.mergeCells,splitCell:r.splitCell,splitCellWithType:r.splitCellWithType,setCellAttr:r.setCellAttr,toggleHeader:r.toggleHeader,toggleHeaderRow:r.toggleHeaderRow,toggleHeaderColumn:r.toggleHeaderColumn,toggleHeaderCell:r.toggleHeaderCell,goToNextCell:r.goToNextCell,deleteTable:r.deleteTable};Object.defineProperty(e,"getHtml",{enumerable:!0,get:function(){return r.getHtml}}),Object.defineProperty(e,"marks",{enumerable:!0,get:function(){return r.marks}}),Object.defineProperty(e,"nodes",{enumerable:!0,get:function(){return r.nodes}}),Object.defineProperty(e,"parseContent",{enumerable:!0,get:function(){return r.parseContent}}),e.Editor=Gl,e.ProseMirror=wn,e.editorPropsKey=El}));
|
|
15
|
+
!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-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-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.KendoReactPopup,e.KendoReactDropdowns,e.KendoReactPdf)}(this,(function(e,t,l,o,n,r,i,a,s,c,d,p,m,u,g){"use strict";function h(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 f=h(t);const b='\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, .k-content::selection {\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',v='\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',k="editor.bold",y="editor.italic",C="editor.underline",w="editor.strikethrough",S="editor.subscript",E="editor.superscript",x="editor.hyperlink",T="editor.insertFile",P="editor.print",I="editor.selectAll",N="editor.cleanFormatting",R="editor.pdf",L="editor.foregroundColor",A="editor.backgroundColor",B="editor.createTable",D="editor.insertTableHint",M="editor.addRowBefore",F="editor.addRowAfter",z="editor.addColumnBefore",H="editor.addColumnAfter",W="editor.deleteRow",K="editor.deleteColumn",U="editor.deleteTable",O="editor.mergeCells",V="editor.splitCell",_="editor.hyperlink-dialog-title",j="editor.hyperlink-dialog-content-address",q="editor.hyperlink-dialog-content-title",$="editor.hyperlink-dialog-content-newwindow",G="editor.hyperlink-dialog-cancel",J="editor.hyperlink-dialog-insert",Q="editor.insertfile-dialog-title",X="editor.insertfile-dialog-content-address",Y="editor.insertfile-dialog-content-title",Z="editor.insertfile-dialog-cancel",ee="editor.insertfile-dialog-insert",te="editor.image",le="editor.image-dialog-title",oe="editor.image-address",ne="editor.image-title",re="editor.image-altText",ie="editor.image-width",ae="editor.image-height",se="editor.image-cancel",ce="editor.image-insert",de="editor.viewHtml",pe="editor.viewHtml-dialog-title",me="editor.viewHtml-cancel",ue="editor.viewHtml-update",ge="editor.unlink",he="editor.undo",fe="editor.redo",be="editor.fontSize",ve="editor.fontName",ke="editor.format",ye="editor.alignLeft",Ce="editor.alignRight",we="editor.alignCenter",Se="editor.alignJustify",Ee="editor.indent",xe="editor.outdent",Te="editor.orderedList",Pe="editor.bulletList",Ie="editor.findReplace-tool-title",Ne="editor.findReplace-dialog-title",Re="editor.findReplace-tab-find",Le="editor.findReplace-tab-replace",Ae="editor.findReplace-findWhat",Be="editor.findReplace-replaceWith",De="editor.findReplace-replace",Me="editor.findReplace-replaceAll",Fe="editor.findReplace-matchCase",ze="editor.findReplace-matchWord",He="editor.findReplace-matchCyclic",We="editor.findReplace-useRegExp",Ke="editor.findReplace-prevMatch",Ue="editor.findReplace-nextMatch",Oe="editor.findReplace-matches",Ve="editor.iframeTitle",_e="editorTools.foreColorLabel",je="editorTools.backColorLabel",qe="editor.cellProperties",$e="editor.cellPropertiesLeftTop",Ge="editor.cellPropertiesCenterTop",Je="editor.cellPropertiesRightTop",Qe="editor.cellPropertiesLeftMiddle",Xe="editor.cellPropertiesCenterMiddle",Ye="editor.cellPropertiesRightMiddle",Ze="editor.cellPropertiesLeftBottom",et="editor.cellPropertiesCenterBottom",tt="editor.cellPropertiesRightBottom",lt="editor.cellPropertiesNoAlignment",ot="editor.cellPropertiesWrap",nt="editor.cellPropertiesFitToCell",rt="editor.cellPropertiesApplyToAllCells",it="editor.cellPropertiesWidth",at="editor.cellPropertiesApplyToColumn",st="editor.cellPropertiesHeight",ct="editor.cellPropertiesApplyToRow",dt="editor.cellPropertiesAlignment",pt="editor.cellPropertiesTextControl",mt="editor.cellPropertiesCellPadding",ut="editor.cellPropertiesBackground",gt="editor.cellPropertiesBorderWidth",ht="editor.cellPropertiesBorderColor",ft="editor.cellPropertiesBorderStyle",bt="editor.cellPropertiesId",vt="editor.cellPropertiesCssClass",kt="editor.cellPropertiesSave",yt="editor.cellPropertiesCancel",Ct="editor.tableProperties",wt="editor.tablePropertiesAlignLeft",St="editor.tablePropertiesAlignCenter",Et="editor.tablePropertiesAlignRight",xt="editor.tablePropertiesNoAlignment",Tt="editor.tablePropertiesLeft",Pt="editor.tablePropertiesCenter",It="editor.tablePropertiesRight",Nt="editor.tablePropertiesTop",Rt="editor.tablePropertiesBottom",Lt="editor.tablePropertiesNone",At="editor.tablePropertiesUsingScopeAttribute",Bt="editor.tablePropertiesUsingIdAttributes",Dt="editor.tablePropertiesRows",Mt="editor.tablePropertiesColumns",Ft="editor.tablePropertiesWidth",zt="editor.tablePropertiesHeight",Ht="editor.tablePropertiesPosition",Wt="editor.tablePropertiesAlignment",Kt="editor.tablePropertiesCellSpacing",Ut="editor.tablePropertiesCellPadding",Ot="editor.tablePropertiesTableBackground",Vt="editor.tablePropertiesBorderWidth",_t="editor.tablePropertiesBorderColor",jt="editor.tablePropertiesBorderStyle",qt="editor.tablePropertiesCollapseBorders",$t="editor.tablePropertiesID",Gt="editor.tablePropertiesCssClass",Jt="editor.tablePropertiesAccessibility",Qt="editor.tablePropertiesCaption",Xt="editor.tablePropertiesCaptionPosition",Yt="editor.tablePropertiesCaptionAlignment",Zt="editor.tablePropertiesHeaderRows",el="editor.tablePropertiesHeaderCols",tl="editor.tablePropertiesAssociateHeaders",ll="editor.tablePropertiesGeneral",ol="editor.tablePropertiesAdvanced",nl="editor.tablePropertiesSave",rl="editor.tablePropertiesCancel",il="editor.borderStyleNone",al="editor.borderStyleSolid",sl="editor.borderStyleDotted",cl="editor.borderStyleDashed",dl="editor.borderStyleDouble",pl="editor.borderStyleGroove",ml="editor.borderStyleRidge",ul="editor.borderStyleInset",gl="editor.borderStyleOutset",hl="editor.borderStyleInitial",fl="editor.borderStyleInherit",bl="editor.borderStyleHidden",vl="editor.sizeAuto",kl={[k]:"Bold",[y]:"Italic",[C]:"Underline",[w]:"Strikethrough",[S]:"Subscript",[E]:"Superscript",[ge]:"Remove hyperlink",[he]:"Undo",[fe]:"Redo",[be]:"Font Size",[ve]:"Font Name",[ke]:"Format",[ye]:"Align text left",[Ce]:"Align text right",[we]:"Center text",[Se]:"Justify",[Ee]:"Indent",[xe]:"Outdent",[Te]:"Insert ordered list",[Pe]:"Insert unordered list",[P]:"Print",[I]:"Select All",[N]:"Clean formatting",[R]:"Export as PDF",[L]:"Color",[A]:"Background color",[B]:"Create a table",[D]:"Create a {0} x {1} table",[M]:"Add row above",[F]:"Add row below",[z]:"Add column on the left",[H]:"Add column on the right",[W]:"Delete row",[K]:"Delete column",[U]:"Delete table",[O]:"Merge cells",[V]:"Split cell",[x]:"Insert hyperlink",[_]:"Insert hyperlink",[j]:"Web address",[q]:"Title",[$]:"Open link in new window",[G]:"Cancel",[J]:"Insert",[T]:"Insert file",[Q]:"Insert file",[X]:"Web address",[Y]:"Title",[Z]:"Cancel",[ee]:"Insert",[te]:"Insert image",[le]:"Insert image",[oe]:"Web address",[ne]:"Title",[re]:"Alternate text",[ie]:"Width (px)",[ae]:"Height (px)",[se]:"Cancel",[ce]:"Insert",[de]:"View HTML",[pe]:"View HTML",[me]:"Cancel",[ue]:"Update",[Ie]:"Find and Replace",[Ne]:"Find and Replace",[Re]:"Find",[Le]:"Replace",[Ae]:"Find What:",[Be]:"Replace With",[De]:"Replace",[Me]:"Replace All",[Fe]:"Match Case",[ze]:"Match whole word only",[He]:"Match cyclic (Wrap around)",[We]:"Regular Expression",[Ke]:"Prev",[Ue]:"Next",[Oe]:"{0} of {1} matches",[Ve]:"Editable area. Press Alt + F10 for toolbar.",[_e]:"Fore Color",[je]:"Back Color",[qe]:"Cell properties",[$e]:"Left Top",[Ge]:"Center Top",[Je]:"Right Top",[Qe]:"Left Middle",[Xe]:"Center Middle",[Ye]:"Right Middle",[Ze]:"Left Bottom",[et]:"Center Bottom",[tt]:"Right Bottom",[lt]:"No Alignment",[ot]:"Wrap",[nt]:"Fit to cell",[rt]:"Apply to all cells",[it]:"Width",[at]:"apply to column",[st]:"Height",[ct]:"apply to row",[dt]:"Alignment",[pt]:"Text control",[mt]:"Cell padding",[ut]:"Background",[gt]:"Border width",[ht]:"Border color",[ft]:"Border style",[bt]:"ID",[vt]:"CSS class",[kt]:"Save",[yt]:"Cancel",[Ct]:"Table properties",[wt]:"Align Left",[St]:"Align Center",[Et]:"Align Right",[xt]:"No Alignment",[Tt]:"Left",[Pt]:"Center",[It]:"Right",[Nt]:"Top",[Rt]:"Bottom",[Lt]:"None",[At]:"Using 'scope' attribute",[Bt]:"Using 'id' attributes",[Dt]:"Rows",[Mt]:"Columns",[Ft]:"Width",[zt]:"Height",[Ht]:"Position",[Wt]:"Alignment",[Kt]:"Cell spacing",[Ut]:"Cell padding",[Ot]:"Table background",[Vt]:"Border width",[_t]:"Border color",[jt]:"Border style",[qt]:"Collapse borders",[$t]:"ID",[Gt]:"CSS class",[Jt]:"Accessibility",[Qt]:"Caption",[Xt]:"Position",[Yt]:"Alignment",[Zt]:"Header rows",[el]:"Header cols",[tl]:"Associate headers",[ll]:"General",[ol]:"Advanced",[nl]:"Save",[rl]:"Cancel",[il]:"None",[al]:"Solid",[sl]:"Dotted",[cl]:"Dashed",[dl]:"Double",[pl]:"Groove",[ml]:"Ridge",[ul]:"Inset",[gl]:"Outset",[hl]:"Initial",[fl]:"Inherit",[bl]:"Hidden",[vl]:"Auto"},yl={bold:k,italic:y,underline:C,strikethrough:w,subscript:S,superscript:E,unlink:ge,undo:he,redo:fe,fontSize:be,fontName:ve,format:ke,alignLeft:ye,alignRight:Ce,alignCenter:we,alignJustify:Se,indent:Ee,outdent:xe,orderedList:Te,bulletList:Pe,print:P,selectAll:I,cleanFormatting:N,pdf:R,foregroundColor:L,backgroundColor:A,createTable:B,createTableHint:D,addRowBefore:M,addRowAfter:F,addColumnBefore:z,addColumnAfter:H,deleteRow:W,deleteColumn:K,deleteTable:U,mergeCells:O,splitCell:V,insertHyperlink:x,insertHyperlinkDialogTitle:_,insertHyperlinkAddress:j,insertHyperlinkTitle:q,insertHyperlinkNewWindow:$,insertHyperlinkCancel:G,insertHyperlinkInsert:J,insertFile:T,insertFileDialogTitle:Q,insertFileAddress:X,insertFileTitle:Y,insertFileCancel:Z,insertFileInsert:ee,insertImage:te,insertImageDialogTitle:le,insertImageAddress:oe,insertImageTitle:ne,insertImageAltText:re,insertImageWidth:ie,insertImageHeight:ae,insertImageCancel:se,insertImageInsert:ce,viewHtml:de,viewHtmlDialogTitle:pe,viewHtmlCancel:me,viewHtmlUpdate:ue,findReplaceToolTitle:Ie,findReplaceDialogTitle:Ne,findReplaceTabFind:Re,findReplaceTabReplace:Le,findReplaceFindWhat:Ae,findReplaceReplaceWith:Be,findReplaceReplace:De,findReplaceReplaceAll:Me,findReplaceMatchCase:Fe,findReplaceMatchWord:ze,findReplaceMatchCyclic:He,findReplaceUseRegExp:We,findReplacePrevMatch:Ke,findReplaceNextMatch:Ue,findReplaceMatches:Oe,iframeTitle:Ve,foreColorLabel:_e,backColorLabel:je,cellProperties:qe,cellPropertiesLeftTop:$e,cellPropertiesCenterTop:Ge,cellPropertiesRightTop:Je,cellPropertiesLeftMiddle:Qe,cellPropertiesCenterMiddle:Xe,cellPropertiesRightMiddle:Ye,cellPropertiesLeftBottom:Ze,cellPropertiesCenterBottom:et,cellPropertiesRightBottom:tt,cellPropertiesNoAlignment:lt,cellPropertiesWrap:ot,cellPropertiesFitToCell:nt,cellPropertiesApplyToAllCells:rt,cellPropertiesWidth:it,cellPropertiesApplyToColumn:at,cellPropertiesHeight:st,cellPropertiesApplyToRow:ct,cellPropertiesAlignment:dt,cellPropertiesTextControl:pt,cellPropertiesCellPadding:mt,cellPropertiesBackground:ut,cellPropertiesBorderWidth:gt,cellPropertiesBorderColor:ht,cellPropertiesBorderStyle:ft,cellPropertiesId:bt,cellPropertiesCssClass:vt,cellPropertiesSave:kt,cellPropertiesCancel:yt,tableProperties:Ct,tablePropertiesAlignLeft:wt,tablePropertiesAlignCenter:St,tablePropertiesAlignRight:Et,tablePropertiesNoAlignment:xt,tablePropertiesLeft:Tt,tablePropertiesCenter:Pt,tablePropertiesRight:It,tablePropertiesTop:Nt,tablePropertiesBottom:Rt,tablePropertiesNone:Lt,tablePropertiesUsingScopeAttribute:At,tablePropertiesUsingIdAttributes:Bt,tablePropertiesRows:Dt,tablePropertiesColumns:Mt,tablePropertiesWidth:Ft,tablePropertiesHeight:zt,tablePropertiesPosition:Ht,tablePropertiesAlignment:Wt,tablePropertiesCellSpacing:Kt,tablePropertiesCellPadding:Ut,tablePropertiesTableBackground:Ot,tablePropertiesBorderWidth:Vt,tablePropertiesBorderColor:_t,tablePropertiesBorderStyle:jt,tablePropertiesCollapseBorders:qt,tablePropertiesId:$t,tablePropertiesCssClass:Gt,tablePropertiesAccessibility:Jt,tablePropertiesCaption:Qt,tablePropertiesCaptionPosition:Xt,tablePropertiesCaptionAlignment:Yt,tablePropertiesHeaderRows:Zt,tablePropertiesHeaderCols:el,tablePropertiesAssociateHeaders:tl,tablePropertiesGeneral:ll,tablePropertiesAdvanced:ol,tablePropertiesSave:nl,tablePropertiesCancel:rl,borderStyleNone:il,borderStyleSolid:al,borderStyleDotted:sl,borderStyleDashed:cl,borderStyleDouble:dl,borderStyleGroove:pl,borderStyleRidge:ml,borderStyleInset:ul,borderStyleOutset:gl,borderStyleInitial:hl,borderStyleInherit:fl,borderStyleHidden:bl,sizeAuto:vl},Cl={...r.indentRules.listsTypes};e.EditorToolsSettings=void 0,(e=>{const t={type:"button"};e.bold={...r.bold,props:{icon:"bold",svgIcon:i.boldIcon,...t},messages:{title:yl.bold},commandName:"Bold"},e.italic={...r.italic,props:{icon:"italic",svgIcon:i.italicIcon,...t},messages:{title:yl.italic},commandName:"Italic"},e.underline={...r.underline,props:{icon:"underline",svgIcon:i.underlineIcon,...t},messages:{title:yl.underline},commandName:"Underline"},e.strikethrough={...r.strikethrough,props:{icon:"strikethrough",svgIcon:i.strikethroughIcon,...t},messages:{title:yl.strikethrough},commandName:"Strikethrough"},e.subscript={...r.subscript,props:{icon:"subscript",svgIcon:i.subscriptIcon,...t},messages:{title:yl.subscript},commandName:"Subscript"},e.superscript={...r.superscript,props:{icon:"supscript",svgIcon:i.supscriptIcon,...t},messages:{title:yl.superscript},commandName:"Superscript"},e.link={...r.link,props:{icon:"link",svgIcon:i.linkIcon,...t},messages:{insertHyperlink:yl.insertHyperlink,insertHyperlinkDialogTitle:yl.insertHyperlinkDialogTitle,insertHyperlinkAddress:yl.insertHyperlinkAddress,insertHyperlinkTitle:yl.insertHyperlinkTitle,insertHyperlinkNewWindow:yl.insertHyperlinkNewWindow,insertHyperlinkCancel:yl.insertHyperlinkCancel,insertHyperlinkInsert:yl.insertHyperlinkInsert},commandName:"Link"},e.insertFile={...r.link,props:{icon:"file-add",svgIcon:i.fileAddIcon,...t},messages:{insertHyperlink:yl.insertFile,insertHyperlinkDialogTitle:yl.insertFileDialogTitle,insertHyperlinkAddress:yl.insertFileAddress,insertHyperlinkTitle:yl.insertFileTitle,insertHyperlinkNewWindow:"",insertHyperlinkCancel:yl.insertFileCancel,insertHyperlinkInsert:yl.insertFileInsert},commandName:"InsertFile",linkTarget:!1},e.insertTable={props:{icon:"table-add",svgIcon:i.tableAddIcon,...t},messages:{createTable:yl.createTable,createTableHint:yl.createTableHint},commandName:"InsertTable"},e.addRowBefore={props:{icon:"table-row-insert-above",svgIcon:i.tableRowInsertAboveIcon,...t},messages:{title:yl.addRowBefore},commandName:"AddRowBefore"},e.addRowAfter={props:{icon:"table-row-insert-below",svgIcon:i.tableRowInsertBelowIcon,...t},messages:{title:yl.addRowAfter},commandName:"AddRowAfter"},e.addColumnBefore={props:{icon:"table-column-insert-left",svgIcon:i.tableColumnInsertLeftIcon,...t},messages:{title:yl.addColumnBefore},commandName:"AddColumnBefore"},e.addColumnAfter={props:{icon:"table-column-insert-right",svgIcon:i.tableColumnInsertRightIcon,...t},messages:{title:yl.addColumnAfter},commandName:"AddColumnAfter"},e.deleteRow={props:{icon:"table-row-delete",svgIcon:i.tableRowDeleteIcon,...t},messages:{title:yl.deleteRow},commandName:"DeleteRow"},e.deleteColumn={props:{icon:"table-column-delete",svgIcon:i.tableColumnDeleteIcon,...t},messages:{title:yl.deleteColumn},commandName:"DeleteColumn"},e.deleteTable={props:{icon:"table-delete",svgIcon:i.tableDeleteIcon,...t},messages:{title:yl.deleteTable},commandName:"DeleteTable"},e.mergeCells={props:{icon:"cells-merge",svgIcon:i.cellsMergeIcon,...t},messages:{title:yl.mergeCells},commandName:"MergeCells"},e.splitCell={props:{icon:"cell-split-horizontally",svgIcon:i.cellSplitHorizontallyIcon,...t},messages:{title:yl.splitCell},commandName:"SplitCell"},e.print={props:{icon:"print",svgIcon:i.printIcon,...t},messages:{title:yl.print}},e.selectAll={props:{icon:"select-all",svgIcon:i.selectAllIcon,...t},messages:{title:yl.selectAll}},e.pdf={props:{icon:"file-pdf",svgIcon:i.filePdfIcon,...t},messages:{title:yl.pdf}},e.savePdfOptions={fileName:"editor.pdf",paperSize:"A4",margin:"1cm"},e.cleanFormatting={props:{icon:"clear-css",svgIcon:i.clearCssIcon,...t},messages:{title:yl.cleanFormatting},commandName:"CleanFormatting"},e.image={node:"image",props:{icon:"image",svgIcon:i.imageIcon,...t},messages:{insertImage:yl.insertImage,insertImageDialogTitle:yl.insertImageDialogTitle,insertImageAddress:yl.insertImageAddress,insertImageTitle:yl.insertImageTitle,insertImageAltText:yl.insertImageAltText,insertImageWidth:yl.insertImageWidth,insertImageHeight:yl.insertImageHeight,insertImageCancel:yl.insertImageCancel,insertImageInsert:yl.insertImageInsert},commandName:"InsertImage"},e.viewHtml={props:{icon:"code",svgIcon:i.codeIcon,...t},messages:{viewHtml:yl.viewHtml,viewHtmlDialogTitle:yl.viewHtmlDialogTitle,viewHtmlCancel:yl.viewHtmlCancel,viewHtmlUpdate:yl.viewHtmlUpdate},commandName:"SetContent"},e.findAndReplace={props:{icon:"find",svgIcon:i.binocularsIcon,...t},messages:{findReplaceToolTitle:yl.findReplaceToolTitle,findReplaceDialogTitle:yl.findReplaceDialogTitle,findReplaceTabFind:yl.findReplaceTabFind,findReplaceTabReplace:yl.findReplaceTabReplace,findReplaceFindWhat:yl.findReplaceFindWhat,findReplaceReplaceWith:yl.findReplaceReplaceWith,findReplaceReplace:yl.findReplaceReplace,findReplaceReplaceAll:yl.findReplaceReplaceAll,findReplaceMatchCase:yl.findReplaceMatchCase,findReplaceMatchWord:yl.findReplaceMatchWord,findReplaceMatchCyclic:yl.findReplaceMatchCyclic,findReplaceUseRegExp:yl.findReplaceUseRegExp,findReplacePrevMatch:yl.findReplacePrevMatch,findReplaceNextMatch:yl.findReplaceNextMatch,findReplaceMatches:yl.findReplaceMatches}},e.unlink={...r.link,props:{icon:"unlink",svgIcon:i.unlinkIcon,...t},messages:{title:yl.unlink},commandName:"Unlink"},e.undo={props:{icon:"undo",svgIcon:i.undoIcon,...t},messages:{title:yl.undo},commandName:"Undo"},e.redo={props:{icon:"redo",svgIcon:i.redoIcon,...t},messages:{title:yl.redo},commandName:"Redo"},e.fontSize={style:"font-size",defaultItem:{text:kl[yl.fontSize],value:"",localizationKey:yl.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:kl[yl.fontName],value:"",localizationKey:yl.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:kl[yl.format],value:"",localizationKey:yl.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:yl.foregroundColor,ariaLabel:yl.foreColorLabel},commandName:"ForeColor"},e.backColor={style:"background-color",colorPickerProps:{icon:"droplet",svgIcon:i.dropletIcon,view:"palette",title:yl.backgroundColor,ariaLabel:yl.backColorLabel},commandName:"BackColor"},e.alignLeft={actions:[...r.alignLeftRules],props:{icon:"align-left",svgIcon:i.alignLeftIcon,...t},messages:{title:yl.alignLeft},commandName:"AlignLeft"},e.alignRight={actions:[...r.alignRightRules],props:{icon:"align-right",svgIcon:i.alignRightIcon,...t},messages:{title:yl.alignRight},commandName:"AlignRight"},e.alignCenter={actions:[...r.alignCenterRules],props:{icon:"align-center",svgIcon:i.alignCenterIcon,...t},messages:{title:yl.alignCenter},commandName:"AlignCenter"},e.alignJustify={actions:[...r.alignJustifyRules],props:{icon:"align-justify",svgIcon:i.alignJustifyIcon,...t},messages:{title:yl.alignJustify},commandName:"AlignJustify"},e.alignRemove={actions:[...r.alignRemoveRules],props:{icon:"align-remove",svgIcon:i.alignRemoveIcon,...t},messages:{},commandName:"AlignRemove"},e.indent={actions:r.indentRules.nodes,listsTypes:Cl,props:{icon:"indent",svgIcon:i.indentIcon,...t},messages:{title:yl.indent},commandName:"Indent"},e.outdent={actions:r.outdentRules.nodes,listsTypes:Cl,props:{icon:"outdent",svgIcon:i.outdentIcon,...t},messages:{title:yl.outdent},commandName:"Outdent"},e.orderedList={listType:Cl.orderedList,props:{icon:"list-ordered",svgIcon:i.listOrderedIcon,...t},messages:{title:yl.orderedList},commandName:"OrderedList",types:{...Cl}},e.bulletList={listType:Cl.bulletList,props:{icon:"list-unordered",svgIcon:i.listUnorderedIcon,...t},messages:{title:yl.bulletList},commandName:"UnorderedList",types:{...Cl}}})(e.EditorToolsSettings||(e.EditorToolsSettings={}));let wl=class extends f.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};r.applyLink({mark:t,attrs:l},this.props.settings.commandName)(e.state,e.dispatch),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:n}=this.props,i=d.provideLocalizationService(this),{insertHyperlinkDialogTitle:p,insertHyperlinkAddress:m,insertHyperlinkTitle:u,insertHyperlinkNewWindow:g,insertHyperlinkCancel:h,insertHyperlinkInsert:b}=t.messages,v=!!e&&r.getMark(e.state,e.state.schema.marks[t.mark]),k=f.createElement(c.Form,{render:()=>f.createElement(c.FormElement,{horizontal:!0},f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-link-url",className:"k-form-label"},i.toLanguageString(m,kl[m])),f.createElement("div",{className:"k-form-field-wrap"},f.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}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-link-text",className:"k-form-label"},i.toLanguageString(u,kl[u])),f.createElement("div",{className:"k-form-field-wrap"},f.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&&f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-link-target",className:"k-checkbox-label"},f.createElement(s.Checkbox,{id:"k-editor-link-target",ref:e=>{this.target=e},defaultChecked:v&&!!v.attrs.target||void 0}),i.toLanguageString(g,kl[g]))))}),y=[f.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(h,kl[h])),f.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},i.toLanguageString(b,kl[b]))],C=f.createElement(a.Window,{initialWidth:450,initialHeight:250,className:"k-editor-window",title:i.toLanguageString(p,kl[p]),onClose:this.onClose,style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},k,f.createElement(a.WindowActionsBar,null,...y));return n?n(C,{content:k,actionButtons:y}):C}};d.registerForLocalization(wl);let Sl=class extends f.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},n=Object.keys(o).filter((e=>null!==o[e]&&""!==o[e])).reduce(((e,t)=>Object.assign(e,{[t]:o[t]})),{}),i=l.createAndFill(n);i&&r.insertNode(i,!0)(e.state,(l=>e.dispatch(l.setMeta("commandName",t.commandName).setMeta("args",n)))),this.onClose()}}render(){const{view:e,settings:t,dir:l,render:n}=this.props,{insertImageDialogTitle:i,insertImageAddress:p,insertImageTitle:m,insertImageAltText:u,insertImageWidth:g,insertImageHeight:h,insertImageCancel:b,insertImageInsert:v}=t.messages,k=d.provideLocalizationService(this),y=e&&e.state;let C={};y&&y.selection instanceof r.NodeSelection&&y.selection.node.type===y.schema.nodes[t.node]&&(C=y.selection.node.attrs);const w=f.createElement(c.Form,{render:()=>f.createElement(c.FormElement,{horizontal:!0},f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(p,kl[p])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-image-url",defaultValue:C.src,ref:e=>{this.src=e&&e.element},autoFocus:!0}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-url",className:"k-form-label"},k.toLanguageString(u,kl[u])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-image-alt",defaultValue:C.alt,ref:e=>{this.altText=e&&e.element}}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-title",className:"k-form-label"},k.toLanguageString(m,kl[m])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-image-title",defaultValue:C.title,ref:e=>{this.title=e&&e.element}}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-width",className:"k-form-label"},k.toLanguageString(g,kl[g])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{type:"text",id:"k-editor-image-width",defaultValue:C.width,ref:e=>{this.width=e&&e.element}}))),f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"k-editor-image-height",className:"k-form-label"},k.toLanguageString(h,kl[h])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{id:"k-editor-image-height",defaultValue:C.height,ref:e=>{this.height=e&&e.element}}))))}),S=[f.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},k.toLanguageString(b,kl[b])),f.createElement(o.Button,{onClick:this.onInsert,themeColor:"primary",dir:l,key:"insert"},k.toLanguageString(v,kl[v]))],E=f.createElement(a.Window,{initialWidth:500,initialHeight:350,className:"k-editor-window",title:k.toLanguageString(i,kl[i]),onClose:this.onClose,key:"dialog",style:"rtl"===l?{textAlign:"right"}:void 0,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},w,f.createElement(a.WindowActionsBar,null,...S));return n?n(E,{content:w,actionButtons:S}):E}};d.registerForLocalization(Sl);const El=new r.PluginKey("editor-props");let xl=class extends f.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=r.trimWhitespace(this.htmlArea&&this.htmlArea.value||""),{preserveWhitespace:o}=El.getState(e.state);r.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:n}=this.props,i=d.provideLocalizationService(this),{viewHtmlDialogTitle:c,viewHtmlCancel:p,viewHtmlUpdate:m}=t.messages,u=f.createElement(s.TextArea,{className:"k-editor-textarea",defaultValue:r.indentHtml(r.getHtml(e.state)),autoFocus:!0,autoSize:!1,ref:this.textAreaRef}),g=[f.createElement(o.Button,{onClick:this.onClose,dir:l,key:"cancel"},i.toLanguageString(p,kl[p])),f.createElement(o.Button,{onClick:this.onUpdate,themeColor:"primary",dir:l,key:"update"},i.toLanguageString(m,kl[m]))],h=f.createElement(a.Window,{className:"k-editor-window",title:i.toLanguageString(c,kl[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,f.createElement(a.WindowActionsBar,null,...g));return n?n(h,{content:u,actionButtons:g}):h}};d.registerForLocalization(xl);const Tl={onMouseDown:e=>e.preventDefault(),onPointerDown:e=>e.preventDefault()},Pl={userSelect:"none"},Il=function(e,...t){return t.forEach(((t,l)=>{e=e.replace("{"+l+"}",String(t))})),e},Nl=(e,t)=>t.dataItem.style?f.cloneElement(e,e.props,f.createElement("span",{style:t.dataItem.style},e.props.children)):e,Rl=["px","em","%"],Ll={animate:{openDuration:150,closeDuration:150}},Al=[{textKey:yl.borderStyleNone,text:kl[yl.borderStyleNone],value:"none"},{textKey:yl.borderStyleSolid,text:kl[yl.borderStyleSolid],value:"solid"},{textKey:yl.borderStyleDotted,text:kl[yl.borderStyleDotted],value:"dotted"},{textKey:yl.borderStyleDashed,text:kl[yl.borderStyleDashed],value:"dashed"},{textKey:yl.borderStyleDouble,text:kl[yl.borderStyleDouble],value:"double"},{textKey:yl.borderStyleGroove,text:kl[yl.borderStyleGroove],value:"groove"},{textKey:yl.borderStyleRidge,text:kl[yl.borderStyleRidge],value:"ridge"},{textKey:yl.borderStyleInset,text:kl[yl.borderStyleInset],value:"inset"},{textKey:yl.borderStyleOutset,text:kl[yl.borderStyleOutset],value:"outset"},{textKey:yl.borderStyleInitial,text:kl[yl.borderStyleInitial],value:"initial"},{textKey:yl.borderStyleInherit,text:kl[yl.borderStyleInherit],value:"inherit"},{textKey:yl.borderStyleHidden,text:kl[yl.borderStyleHidden],value:"hidden"}];function Bl(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 Dl=e.EditorToolsSettings.findAndReplace;let Ml=class extends f.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(r.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,n=0;if(t&&l){const e=t.findIndex((e=>e.eq(l)));o=-1===e?t.length:e+1,n=t.length}return Il(e,o,n)},this.onFindNext=()=>{this.onFind()},this.onFindPrev=()=>{this.onFind(!0)},this.onFind=(e=!1)=>{const t=this.props.view,{searchText:l,matchCase:o,matchCyclic:n,matchWord:i,useRegExp:a}=this.state,s={text:l,matchWord:i,matchCase:o,useRegExp:a,backward:e,matchCyclic:n},c=r.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,n=o+l.length,i=r.replace(t,l,e.state.tr);i.setSelection(r.TextSelection.create(i.doc,o,n)),i.scrollIntoView(),e.dispatch(i),this.setNextState({})}},this.onReplaceAll=()=>{const e=this.props.view,{searchText:t,replaceText:l,matchCase:o,matchWord:n,useRegExp:i}=this.state,a={text:t,matchWord:n,matchCase:o,useRegExp:i},s=r.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},l=this.props.view;if(t.searchText){const{searchText:e,matchWord:o,matchCase:n,useRegExp:i,matchCyclic:a}=t,s={text:e,matchWord:o,matchCase:n,useRegExp:i},c=l.state.selection,d=r.findAll(l.state.doc,s),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:r.selectedLineTextOnly(e.view.state),replaceText:"",matchCase:!1,matchWord:!1,matchCyclic:!1,useRegExp:!1}}get settings(){return this.props.settings||Dl}componentDidUpdate(e,t){const l=this.props.view,{matches:o=[],nextMatch:n}=this.state;if(t.nextMatch!==n){const e=l.state,t=e.tr,i=[];o.forEach((e=>{i.push({from:e.from,to:e.to,attrs:{class:n&&e.eq(n)?"k-text-selected":"k-text-highlighted"}})})),t.setMeta(r.textHighlightKey,i),t.setSelection(n||r.TextSelection.create(e.doc,e.selection.from)),l.dispatch(t)}}render(){const e=d.provideLocalizationService(this),{findReplaceDialogTitle:t,findReplaceTabFind:l,findReplaceTabReplace:r,findReplaceFindWhat:m,findReplaceReplaceWith:u,findReplaceReplace:g,findReplaceReplaceAll:h,findReplaceMatchCase:b,findReplaceMatchWord:v,findReplaceMatchCyclic:k,findReplaceUseRegExp:y,findReplacePrevMatch:C,findReplaceNextMatch:w,findReplaceMatches:S}=this.settings.messages,{matchCase:E,matchWord:x,matchCyclic:T,useRegExp:P,searchText:I,replaceText:N,nextMatch:R}=this.state,L=f.createElement("div",{className:"k-search-options"},f.createElement("span",null,f.createElement(s.Checkbox,{id:"match-case",checked:E,onChange:this.onMatchCaseChecked}),f.createElement("label",{htmlFor:"match-case",className:"k-checkbox-label"},e.toLanguageString(b,kl[b]))),f.createElement("span",null,f.createElement(s.Checkbox,{id:"match-whole",checked:x,onChange:this.onMatchWordChecked}),f.createElement("label",{htmlFor:"match-whole",className:"k-checkbox-label"},e.toLanguageString(v,kl[v]))),f.createElement("span",null,f.createElement(s.Checkbox,{id:"match-cyclic",checked:T,onChange:this.onMatchCyclicChecked}),f.createElement("label",{htmlFor:"match-cyclic",className:"k-checkbox-label"},e.toLanguageString(k,kl[k]))),f.createElement("span",null,f.createElement(s.Checkbox,{id:"regular-expression",checked:P,onChange:this.onUseRegExpChecked}),f.createElement("label",{htmlFor:"regular-expression",className:"k-checkbox-label"},e.toLanguageString(y,kl[y])))),A=f.createElement("div",{className:"k-matches-container"},f.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindPrev},f.createElement(n.IconWrap,{name:"chevron-left",icon:i.chevronLeftIcon}),e.toLanguageString(C,kl[C])),f.createElement("span",null,this.matchesMessage(e.toLanguageString(S,kl[S]))),f.createElement(o.Button,{fillMode:"flat",themeColor:"primary",onClick:this.onFindNext},e.toLanguageString(w,kl[w]),f.createElement(n.IconWrap,{name:"chevron-right",icon:i.chevronRightIcon}))),B=f.createElement(c.Form,{render:()=>f.createElement(c.FormElement,{horizontal:!0},f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"findWhat",className:"k-form-label"},e.toLanguageString(m,kl[m])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{id:"findWhat",type:"text",value:I,onChange:this.onSearchChange,onFocus:this.onSearchChange,onKeyDown:this.onKeyDown,autoFocus:!0}))))}),D=f.createElement(c.Form,{render:()=>f.createElement(c.FormElement,{horizontal:!0},f.createElement(c.FieldWrapper,null,f.createElement("label",{htmlFor:"replaceWith",className:"k-form-label"},e.toLanguageString(u,kl[u])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Input,{id:"replaceWith",type:"text",value:N,onChange:this.onReplaceChange}))))});return f.createElement(a.Window,{title:e.toLanguageString(t,kl[t]),onClose:this.onClose,style:{width:"auto",height:"auto",userSelect:"none"},resizable:!1,minimizeButton:()=>null,maximizeButton:()=>null},f.createElement(p.TabStrip,{selected:this.state.selectedTab,className:"k-editor-find-replace",onSelect:this.onTabSelect,animation:!1},f.createElement(p.TabStripTab,{title:e.toLanguageString(l,kl[l])},B,L,A),f.createElement(p.TabStripTab,{title:e.toLanguageString(r,kl[r])},B,D,f.createElement("div",{className:"k-actions k-hstack k-justify-content-end"},f.createElement(o.Button,{disabled:!R,onClick:this.onReplace},e.toLanguageString(g,kl[g])),f.createElement(o.Button,{disabled:!R,onClick:this.onReplaceAll},e.toLanguageString(h,kl[h]))),L,A)))}};d.registerForLocalization(Ml),e.EditorDialogs=void 0,(e=>{e.InsertLinkDialog=class extends wl{};e.InsertImageDialog=class extends Sl{};e.ViewHtmlDialog=class extends xl{};e.FindAndReplaceDialog=class extends Ml{}})(e.EditorDialogs||(e.EditorDialogs={}));const{bold:Fl,underline:zl,italic:Hl}=e.EditorToolsSettings,Wl="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);e.EditorUtils=void 0,(e=>{e.alignBlocks=function(e,t,l){return!!r.alignBlocks(t,l)(e.state,e.dispatch)},e.applyInlineStyle=function(e,t,l){return r.applyInlineStyle(t,l)(e.state,e.dispatch)},e.applyLink=function(e,t,l){return r.applyLink(t,l)(e.state,e.dispatch)},e.canIndentList=function(e,t){return r.canIndentAsListItem(e,t)},e.canInsert=function(e,t){return r.canInsert(e,t)},e.canOutdentList=function(e,t){return r.canOutdentAsListItem(e,{listsTypes:t,nodes:[]})},e.convertMsLists=function(e){return r.convertMsLists(e)},e.createDocument=function(e,t,l){return r.parseContent(r.trimWhitespace(t),e,void 0!==l?l:{preserveWhitespace:"full"})},e.createTable=function(e,t,l){return r.createTable(e,t,l)},e.formatBlockElements=function(e,t,l){return r.formatBlockElements(t,l)(e.state,e.dispatch)},e.getBlockFormats=function(e){return r.getBlockFormats(e)},e.getHtml=function(e){return r.getHtml(e)},e.getInlineStyles=function(e,t){return r.getInlineStyles(e,t)},e.getMark=function(e,t){return r.getMark(e,t)},e.hasMark=function(e,t){return r.hasMark(e,t)},e.hasNode=function(e,t){return r.hasNode(e,t)},e.indentBlocks=function(e,t,l,o){return!!r.indentBlocks(t,l,o)(e.state,e.dispatch)},e.indentHtml=function(e){return r.indentHtml(e)},e.insertNode=function(e,t,l){r.insertNode(t,l)(e.state,e.dispatch)},e.isAligned=function(e,t){return r.isAligned(e,t)},e.isIndented=function(e,t,l){return r.isIndented(e,t,l)},e.removeComments=function(e){return r.removeComments(e)},e.removeTag=function(e,t){return r.removeTag(e,t)},e.pasteCleanup=function(e,t){return r.pasteCleanup(e,t)},e.sanitizeClassAttr=function(e){r.sanitizeClassAttr(e)},e.sanitizeStyleAttr=function(e){r.sanitizeStyleAttr(e)},e.removeAttribute=function(e){r.removeAttribute(e)},e.sanitize=function(e){return r.sanitize(e)},e.replaceImageSourcesFromRtf=function(e,t){return r.replaceImageSourcesFromRtf(e,t)},e.textHighlight=function(e){return r.textHighlight(e)},e.imageResizing=function(e){return r.imageResizing(e)},e.tableResizing=function(){return r.tableResizing()},e.setHtml=function(e,t,l,o){const n=r.trimWhitespace(t);r.setHtml(n,l,o)(e.state,e.dispatch)},e.toggleInlineFormat=function(e,t,l,o){return r.toggleInlineFormat(t,l,o)(e.state,e.dispatch)},e.toggleList=function(e,t,l){return r.toggleList(e.state,e.dispatch,e,t,l)},e.getShortcuts=function(e){return(e=>{const t=r.chainCommands(r.exitCode,((t,l)=>{const o=e&&e.types&&e.types.hardBreak||"hard_break",n=t.schema.nodes[o];return l&&l(t.tr.replaceSelectionWith(n.create()).scrollIntoView()),!0})),l=e&&e.types&&e.types.listItem||"list_item",o=e&&e.toolsSettings||{};return{"Mod-b":(e,t)=>r.toggleInlineFormat(o.bold||Fl)(e,t),"Mod-i":(e,t)=>r.toggleInlineFormat(o.italic||Hl)(e,t),"Mod-u":(e,t)=>r.toggleInlineFormat(o.underline||zl)(e,t),"Mod-z":r.undo,"Shift-Mod-z":r.redo,...Wl?{}:{"Mod-y":r.redo},Backspace:r.undoInputRule,"Mod-Enter":t,"Shift-Enter":t,...Wl?{"Ctrl-Enter":t}:{},Enter:(e,t)=>r.splitListItem(e.schema.nodes[l])(e,t),Tab:r.goToNextCell(1),"Shift-Tab":r.goToNextCell(-1)}})(e)},e.propsKey=El,e.imageResizeKey=r.imageResizeKey,e.marks={...r.marks},e.nodes={...r.nodes}})(e.EditorUtils||(e.EditorUtils={}));const Kl=(t,l)=>{const o=l.tr||t.state.tr.setSelection(new r.AllSelection(t.state.doc)).replaceSelectionWith(l.doc||e.EditorUtils.createDocument(t.state.schema,l.html||"")).setMeta("commandName","setHTML");t.updateState(t.state.apply(o))},Ul="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),Ol={name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:0,version:"11.0.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"},{link:Vl,bold:_l,italic:jl,underline:ql}=e.EditorToolsSettings,$l=class extends f.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]&&f.createElement(e,{view:this.view,settings:t,dir:this.props.dir,onClose:()=>this.setState({[l]:!1})}),this.renderTool=(e,t,l=!1)=>{const n=f.createElement(e,{view:this.view,dir:this.props.dir,key:t,className:l?"k-toolbar-button":void 0});return n.type===o.ToolbarSeparator?f.createElement(e,{key:t}):n},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,n={target:this,value:l,html:"",transaction:t,schema:o};Object.defineProperty(n,"html",{get:()=>(this.htmlOnChange=e.EditorUtils.getHtml({doc:l,schema:o}),this.htmlOnChange)}),this.props.onChange.call(void 0,n)}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=!n.validatePackage(Ol,{component:"Editor"})}get value(){return null!==this.trOnChange?this.trOnChange.doc:void 0!==this.props.value?this.props.value:this.view?this.view.state.doc:this.props.defaultContent||""}get element(){return this._element}get contentElement(){return this._contentElement}get view(){return this._view}componentDidMount(){(!this.iframe||!Ul)&&this.initialize()}componentDidUpdate(e){const{value:t}=this.props,l=this.view;void 0===t||!l||(((e,t,l,o,n)=>{"string"==typeof t?o&&t===n?Kl(e,{tr:o}):t!==l&&Kl(e,{html:t}):o&&t.eq(o.doc)?Kl(e,{tr:o}):e.state.doc.eq(t)||Kl(e,{doc:t})})(l,t,e.value,this.trOnChange,this.htmlOnChange),this.trOnChange=null,this.htmlOnChange=null)}componentWillUnmount(){var e;this.view&&this.view.destroy(),this._view=void 0;const t=null==(e=this.iframe)?void 0:e.contentWindow;if(t){this._contentElement&&this._contentElement.parentNode&&this._contentElement.parentNode.removeChild(this._contentElement);const e=t.document.head;for(;e&&e.firstChild;)e.removeChild(e.firstChild)}}render(){const{tools:t=[],defaultEditMode:l="iframe",preserveWhitespace:r="full",style:i,className:a}=this.props,s=d.provideLocalizationService(this);if(this.view){El.getState(this.view.state).preserveWhitespace=r}let c=this.props.contentStyle;void 0===c&&void 0===(i||{}).height&&(c={height:"300px"});const p=t.map(((e,t)=>Array.isArray(e)?f.createElement(o.ButtonGroup,{key:t,className:"k-toolbar-button-group k-button-group-solid"},e.map(((e,t)=>this.renderTool(e,t)))):this.renderTool(e,t,!0)));return f.createElement("div",{ref:e=>{this._element=e},className:n.classNames("k-editor",a,{"k-editor-resizable":this.props.resizable}),dir:this.props.dir,style:i},p.length>0&&f.createElement(o.Toolbar,{className:"k-editor-toolbar",keyboardNavigation:this.props.keyboardNavigation},p),"iframe"===l?f.createElement("div",{className:"k-editor-content"},f.createElement("iframe",{onLoad:Ul?()=>{this.initialize()}:void 0,ref:e=>{this.iframe=e},frameBorder:"0",title:s.toLanguageString(yl.iframeTitle,kl[yl.iframeTitle]),style:c,className:"k-iframe"})):f.createElement("div",{style:c,className:"k-editor-content"},f.createElement("div",{ref:e=>{this._contentElement=e},suppressContentEditableWarning:!0,role:"textbox","aria-labelledby":this.props.ariaLabelledBy,"aria-describedby":this.props.ariaDescribedBy,"aria-label":this.props.ariaLabel})),this.renderDialog(e.EditorDialogs.InsertLinkDialog,Vl,"linkDialog"),this.showLicenseWatermark&&f.createElement(n.WatermarkOverlay,null))}initialize(){const t=this.iframe&&this.iframe.contentWindow;if(t){const e=t.document,l=e.createElement("meta");l.setAttribute("charset","utf-8"),e.head.appendChild(l),this._contentElement=e.createElement("div"),e.body.appendChild(this._contentElement),this._contentElement.classList.add("k-content"),this.iframe&&this.props.onIFrameInit?this.onIFrameInit(this.iframe):[b,v,"rtl"===this.props.dir?"body { direction: rtl }":void 0].forEach((t=>{if(t){const l=e.createElement("style");l.appendChild(e.createTextNode(t)),e.head.appendChild(l)}}))}const l=this._contentElement;if(!l)return;const{preserveWhitespace:n="full"}=this.props,i=[new r.Plugin({view:()=>({update:this.updateTools}),key:new r.PluginKey("toolbar-tools-update-plugin")}),new r.Plugin({filterTransaction:this.filterTransaction,key:new r.PluginKey("onExecute-event-plugin")}),new r.Plugin({key:El,state:{init:()=>({preserveWhitespace:n}),apply:(e,t)=>t}}),r.spacesFix(),r.caretColor(),r.history(),r.dropCursor(),r.gapCursor(),r.tableEditing(),r.cspFix()],a={...e.EditorUtils.getShortcuts({types:{listItem:"list_item",hardBreak:"hard_break"},toolsSettings:{bold:_l,italic:jl,underline:ql}}),"Mod-k":()=>{const{linkDialog:e}=this.state,t=this.view;if(t){const l=t.state,o=l.selection.empty,n=r.getMark(l,l.schema.marks[Vl.mark]);!e&&(!o||n)&&this.setState({linkDialog:!0})}return!e},"Alt-F10":()=>{var e;const t=null==(e=this.element)?void 0:e.querySelector(".k-toolbar");if(t){const e=t.querySelector(o.toolbarButtons.join(","));if(e)return e.focus(),!0}return!1}},{defaultContent:s="",value:c,onMount:d}=this.props,p=c&&"string"!=typeof c?c:e.EditorUtils.createDocument(new r.Schema({nodes:r.nodes,marks:r.marks}),c||s,{preserveWhitespace:n}),m={state:r.EditorState.create({plugins:[...i,r.keymap(a),r.keymap(r.baseKeymap)],doc:p}),transformPastedHTML:this.onPasteHtml,dispatchTransaction:this.dispatchTransaction,handleDOMEvents:{focus:this.onFocus,blur:this.onBlur,paste:this.onPaste},handleDrop:(e,t,l,o)=>{let n=!1;return l.content.nodesBetween(0,l.content.size,(e=>{n=n||"table_caption_external"===e.type.name})),n}},u={plugins:i,shortcuts:a,target:this,viewProps:m,dom:l},g=this._view=d&&d.call(void 0,u)||new r.EditorView({mount:l},m);this.setState({view:g})}};$l.propTypes={defaultContent:l.string,value:l.oneOfType([l.object,l.string]),defaultEditMode:l.oneOf(["iframe","div"]),contentStyle:l.object,dir:l.string,className:l.string,ariaDescribedBy:l.string,ariaLabelledBy:l.string,ariaLabel:l.string,style:l.object,tools:l.arrayOf(l.any),keyboardNavigation:l.bool,resizable:l.bool,preserveWhitespace:l.oneOf([!0,!1,"full"]),onMount:l.func,onFocus:l.func,onBlur:l.func,onChange:l.func,onPasteHtml:l.func,onExecute:l.func,onIFrameInit:l.func};let Gl=$l;d.registerForLocalization(Gl);let Jl=class extends f.Component{constructor(){super(...arguments),this.state={row:-1,col:-1}}renderCell(e,t,l){const o=Math.floor(e/this.props.columns),n=e%this.props.columns,r=n<=l&&o<=t;return f.createElement("span",{className:"k-ct-cell k-disabled"+(r?" k-selected":""),onMouseEnter:()=>this.setState({row:o,col:n}),onClick:()=>this.props.onCellClick.call(void 0,o,n),key:e})}render(){const e=[],t=this.props.columns*this.props.rows,{row:l,col:o}=this.state,{onDown:n}=this.props;let r=this.props.createTableMessage;o>-1&&(r=Il(this.props.createTableHintMessage,l+1,o+1));for(let n=0;n<t;n++)e.push(this.renderCell(n,l,o));return[f.createElement("div",{onMouseLeave:()=>this.setState({row:-1,col:-1}),key:"cells",style:{borderColor:"inherit"},onPointerDown:n,onMouseDown:n},e),f.createElement("div",{className:"k-status",key:"status",onPointerDown:n,onMouseDown:n},r)]}};var Ql,Xl;(e=>{const t=class e extends f.Component{constructor(){super(...arguments),this.pointerdown=!1,this.onWindowDown=e=>{const{anchor:t}=this.props;t&&(t===e.target||t.firstElementChild===e.target)||(this.props.show&&!this.pointerdown&&this.props.onClose(),this.pointerdown=!1)},this.onPointerDown=()=>this.pointerdown=!0}componentDidUpdate(e){e.show&&this.props.show&&this.props.onClose()}componentDidMount(){window.addEventListener("mousedown",this.onWindowDown),window.addEventListener("pointerdown",this.onWindowDown)}componentWillUnmount(){window.removeEventListener("mousedown",this.onWindowDown),window.removeEventListener("pointerdown",this.onWindowDown)}render(){const{show:t,anchor:l,dir:o,rows:n=e.defaultProps.rows,columns:r=e.defaultProps.columns}=this.props,i="rtl"===o?"right":"left";return f.createElement(m.Popup,{anchor:l,anchorAlign:{horizontal:i,vertical:"bottom"},popupAlign:{horizontal:i,vertical:"top"},popupClass:"k-ct-popup k-group k-reset k-state-border-up",show:t,style:"rtl"===o?{direction:"rtl"}:void 0},f.createElement(Jl,{rows:n,columns:r,createTableMessage:this.props.createTableMessage,createTableHintMessage:this.props.createTableHintMessage,onCellClick:this.props.onTableInsert,onDown:this.onPointerDown}))}};t.propTypes={show:l.bool.isRequired,createTableMessage:l.string.isRequired,createTableHintMessage:l.string.isRequired,onClose:l.func.isRequired,onTableInsert:l.func.isRequired,anchor:l.any,rows:l.number,columns:l.number,dir:l.string},t.defaultProps={rows:6,columns:8};let o=t;e.InsertTablePopup=o})(Ql||(Ql={})),(e=>{e.createInsertTableTool=e=>{const t=class extends f.Component{constructor(){super(...arguments),this.state={openedPopup:!1},this.button=null,this.togglePopup=()=>{this.setState({openedPopup:!this.state.openedPopup})},this.closePopup=()=>{this.state.openedPopup&&this.togglePopup()},this.onTableInsert=(e,t)=>{const{view:l}=this.props;if(!l)return;const{table:o,table_row:n,table_cell:i}=l.state.schema.nodes,a=r.createTable({table:o,table_row:n,table_cell:i},e,t);a&&r.insertNode(a,!0)(l.state,l.dispatch),l.focus(),this.closePopup()}}render(){const{view:t,render:l,...i}=this.props,a=t&&t.state,s=d.provideLocalizationService(this),{createTable:c,createTableHint:p}=e.messages,m=s.toLanguageString(c,kl[c]),u=s.toLanguageString(p,kl[p]),g=!(a&&r.canInsert(a,a.schema.nodes.table)&&!Bl(a.selection.$from,(e=>"table_caption_external"===e.type.name))),h=[f.createElement(o.Button,{onClick:g?void 0:this.togglePopup,"aria-disabled":!!g||void 0,ref:e=>{this.button=e&&e.element},key:"InsertTable",...Tl,title:m,...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":g})}),t&&!g&&f.createElement(Ql.InsertTablePopup,{key:"insertTablePopup",createTableMessage:m,createTableHintMessage:u,dir:i.dir,anchor:this.button,show:this.state.openedPopup,onClose:this.closePopup,onTableInsert:this.onTableInsert})||null];return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(Xl||(Xl={}));const{alignRemove:Yl}=e.EditorToolsSettings,Zl=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...n}=this.props,i=t&&t.state,a=!!i&&r.isAligned(i,e.actions),s=a?Yl.actions:e.actions,c=a?Yl.commandName:e.commandName,p=d.provideLocalizationService(this),m=e.messages.title,u=f.createElement(o.Button,{onClick:()=>t&&r.alignBlocks(s,c)(t.state,t.dispatch),selected:a,togglable:!0,...Tl,title:p.toLanguageString(m,kl[m]),...e.props,...n});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t};var eo;(e=>{e.createStyleDropDownList=e=>{const t=class extends f.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:o}=this.props,{style:n}=e;if(o){r.applyInlineStyle({style:n,value:l.value},e.commandName)(o.state,o.dispatch);const{syntheticEvent:i}=t;i&&"click"===i.type&&o.focus()}}}render(){const{style:t}=e,{view:l,render:o,data:n,defaultItem:i,...a}=this.props,s=n||e.items;let c=i||e.defaultItem;const p=l?r.getInlineStyles(l.state,{name:t,value:/^.+$/}):[],m=d.provideLocalizationService(this);c&&c.localizationKey&&(c={...c},c.text=c.localizationKey?m.toLanguageString(c.localizationKey,kl[c.localizationKey]):c.text);let g=1===new Set(p).size?p[0]:null;null===g&&a.defaultValue&&(g=a.defaultValue);const h=f.createElement(u.DropDownList,{value:g&&s.find((e=>e.value===g)),data:s,defaultItem:c,itemRender:Nl,textField:"text",dataItemKey:"value",onChange:this.onChange,style:Pl,leftRightKeysNavigation:!1,title:c&&c.text,...a});return o?o.call(void 0,h,{view:l}):h}};return d.registerForLocalization(t),t}})(eo||(eo={}));const to=e=>{const{view:t,style:l,colorPickerProps:o,commandName:n}=e,i=o.title,a=o.ariaLabel,{view:c="palette"}=o,p=d.useLocalization(),m=f.useCallback((e=>{t&&(r.applyInlineStyle({style:l,value:e.value},n)(t.state,t.dispatch),"palette"===c&&t.focus())}),[t,l,c,n]);return f.createElement(s.ColorPicker,{onChange:m,onActiveColorClick:m,...o,title:i&&p.toLanguageString(i,kl[i]),ariaLabel:a&&p.toLanguageString(a,kl[a])})};var lo;(e=>{e.createFormatBlockDropDownList=e=>{const t=class extends f.Component{constructor(){super(...arguments),this.onChange=t=>{const l=t.target.value,{view:o}=this.props;if(o&&r.formatBlockElements(l.value,e.commandName)(o.state,o.dispatch)){const{syntheticEvent:e}=t;e&&"click"===e.type&&o.focus()}}}render(){const{view:t,render:l,data:o,defaultItem:n,...i}=this.props,a=o||e.items;let s=n||e.defaultItem;const c=t&&t.state,p=c?r.getBlockFormats(c):[],m=d.provideLocalizationService(this);s&&s.localizationKey&&(s={...s},s.text=s.localizationKey?m.toLanguageString(s.localizationKey,kl[s.localizationKey]):s.text);const g=1===new Set(p).size?p[0]:null,h=f.createElement(u.DropDownList,{value:g&&a.find((e=>e.value===g)),onChange:this.onChange,itemRender:Nl,data:a,defaultItem:s,textField:"text",dataItemKey:"value",style:Pl,leftRightKeysNavigation:!1,title:s.text,...i});return l?l.call(void 0,h,{view:t}):h}};return d.registerForLocalization(t),t}})(lo||(lo={}));const oo=(e,t)=>{const l=class extends f.Component{render(){const{view:l,render:r,...i}=this.props,a=d.provideLocalizationService(this),s=e.messages.title,c=l&&l.state,p=!!c&&!t(c),m=f.createElement(o.Button,{onClick:p?void 0:()=>l&&t(l.state,(t=>l.dispatch(t.setMeta("commandName",e.commandName)))),"aria-disabled":!!p||void 0,...Tl,title:a.toLanguageString(s,kl[s]),...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":p})});return r?r.call(void 0,m,{view:l}):m}};return d.registerForLocalization(l),l};var no,ro,io;(e=>{e.createUndoTool=e=>oo(e,r.undo),e.createRedoTool=e=>oo(e,r.redo)})(no||(no={})),(e=>{e.createIndentTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...i}=this.props,a=i.dir,s=t&&t.state,c=s&&s.schema.nodes,p=c&&c[e.listsTypes.listItem],m=e.actions,u=!!s&&!!p&&(r.isIndented(s,m,a)||m.some((e=>c&&c[e.node]&&r.hasNode(s,c[e.node]))))&&!r.hasNode(s,p),g=!!s&&r.canIndentAsListItem(s,p),h=u||g,b=d.provideLocalizationService(this),v=e.messages.title,k=!h,y=f.createElement(o.Button,{onClick:k?void 0:()=>{t&&g&&p?r.sinkListItem(p)(t.state,t.dispatch):t&&u&&r.indentBlocks(m,e.commandName,a)(t.state,t.dispatch)},"aria-disabled":!!k||void 0,title:b.toLanguageString(v,kl[v]),...Tl,...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":k})});return l?l.call(void 0,y,{view:t}):y}};return d.registerForLocalization(t),t}})(ro||(ro={})),(e=>{e.createInlineFormatTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...n}=this.props,i=t&&t.state,{mark:a,altMarks:s,altStyle:c}=e,p={mark:a,altMarks:s,altStyle:c},m=d.provideLocalizationService(this),u=e.messages.title,g=f.createElement(o.Button,{onClick:()=>t&&r.toggleInlineFormat(p,i&&i.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),selected:!!i&&r.hasMark(i,p),togglable:!0,...Tl,title:m.toLanguageString(u,kl[u]),...e.props,...n});return l?l.call(void 0,g,{view:t}):g}};return d.registerForLocalization(t),t}})(io||(io={}));const ao=t=>{const l=class extends f.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:i,...a}=this.props,s=l&&l.state,c=s?s.schema.nodes[t.node]:void 0,p=d.provideLocalizationService(this),{insertImage:m}=t.messages,u=!c||!s||!r.canInsert(s,c),g=[f.createElement(o.Button,{onClick:u?void 0:this.toggleDialog,"aria-disabled":!!u||void 0,key:"insertImage",...Tl,title:p.toLanguageString(m,kl[m]),...t.props,...a,className:n.classNames(a.className,t.props.className,{"k-disabled":u})}),this.state.openedDialog&&l&&f.createElement(e.EditorDialogs.InsertImageDialog,{key:"insertImageDialog",view:l,settings:t,dir:a.dir,onClose:this.toggleDialog})||null];return i?i.call(void 0,g,{view:l}):g}};return d.registerForLocalization(l),l};var so,co,po;(t=>{t.createLinkTool=t=>{const l=class extends f.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:i,...a}=this.props,s=l&&l.state,c=!s||s.selection.empty,p=s&&r.getMark(s,s.schema.marks[t.mark]),m=d.provideLocalizationService(this),{insertHyperlink:u}=t.messages,g=c&&!p,h=[f.createElement(o.Button,{onClick:g?void 0:this.toggleDialog,"aria-disabled":!!g||void 0,key:"link",...Tl,title:m.toLanguageString(u,kl[u]),...t.props,...a,className:n.classNames(a.className,t.props.className,{"k-disabled":g})}),this.state.openedDialog&&l&&f.createElement(e.EditorDialogs.InsertLinkDialog,{key:"insertLinkDialog",settings:t,dir:a.dir,view:l,onClose:this.toggleDialog})||null];return i?i.call(void 0,h,{view:l}):h}};return d.registerForLocalization(l),l}})(so||(so={})),(e=>{e.createListTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...n}=this.props;let i=!1;const a=d.provideLocalizationService(this),s=e.messages.title,c=e.types,p=e.listType;if(t){const e=t.state,l=e.schema.nodes,o=r.hasNode(e,l[c.orderedList]),n=r.hasNode(e,l[c.bulletList]);i=p===c.orderedList?o&&!n:!o&&n}const m=f.createElement(o.Button,{onClick:()=>t&&r.toggleList(t.state,t.dispatch,t,{listType:p,...c},e.commandName),togglable:!0,selected:i,title:a.toLanguageString(s,kl[s]),...Tl,...e.props,...n});return l?l.call(void 0,m,{view:t}):m}};return d.registerForLocalization(t),t}})(co||(co={})),(e=>{e.createOutdentTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...i}=this.props,a=t&&t.state,s=i.dir,c=!!a&&r.isIndented(a,e.actions,s),p=a&&a.schema.nodes[e.listsTypes.listItem],m=!!a&&r.canOutdentAsListItem(a,{nodes:e.actions,listsTypes:e.listsTypes}),u=c||m,g=d.provideLocalizationService(this),h=e.messages.title,b=!u,v=f.createElement(o.Button,{onClick:b?void 0:()=>{t&&m&&p?r.liftListItem(p)(t.state,t.dispatch):t&&c&&r.indentBlocks(e.actions,e.commandName,s)(t.state,t.dispatch)},"aria-disabled":!!b||void 0,title:g.toLanguageString(h,kl[h]),...Tl,...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":b})});return l?l.call(void 0,v,{view:t}):v}};return d.registerForLocalization(t),t}})(po||(po={}));const mo=(e,t)=>{const l=r.deleteColumn(e,t);if(l&&!t){const t=r.selectionCell(e),l=t&&t.node(t.depth);if(l&&1===l.content.childCount)return!1}return l},uo=(e,t)=>{const l=r.deleteRow(e,t);if(l&&!t){const t=r.selectionCell(e),l=t&&t.node(t.depth-1);if(l&&1===l.content.childCount)return!1}return l};var go,ho,fo;(e=>{e.createAddRowBeforeTool=e=>oo(e,r.addRowBefore),e.createAddRowAfterTool=e=>oo(e,r.addRowAfter),e.createAddColumnBeforeTool=e=>oo(e,r.addColumnBefore),e.createAddColumnAfterTool=e=>oo(e,r.addColumnAfter),e.createDeleteRowTool=e=>oo(e,uo),e.createDeleteColumnTool=e=>oo(e,mo),e.createDeleteTableTool=e=>oo(e,r.deleteTable),e.createMergeCellsTool=e=>oo(e,r.mergeCells),e.createSplitCellTool=e=>oo(e,r.splitCell)})(go||(go={})),(e=>{e.createUnlinkTool=e=>{const t=class extends f.Component{render(){const{view:t,render:l,...i}=this.props,a={mark:e.mark},s=!!t&&r.hasMark(t.state,a),c=d.provideLocalizationService(this),p=e.messages.title,m=!s,u=f.createElement(o.Button,{onClick:m?void 0:()=>t&&r.removeLink(a,t.state.tr.setMeta("commandName",e.commandName))(t.state,t.dispatch),"aria-disabled":!!m||void 0,...Tl,title:c.toLanguageString(p,kl[p]),...e.props,...i,className:n.classNames(i.className,e.props.className,{"k-disabled":m})});return l?l.call(void 0,u,{view:t}):u}};return d.registerForLocalization(t),t}})(ho||(ho={})),(t=>{t.createViewHtmlTool=t=>{const l=class extends f.Component{constructor(){super(...arguments),this.state={openedDialog:!1},this.toggleDialog=()=>{this.setState({openedDialog:!this.state.openedDialog})}}render(){const{view:l,render:n,...r}=this.props,i=d.provideLocalizationService(this),a=t.messages.viewHtml,s=[f.createElement(o.Button,{onClick:this.toggleDialog,key:"viewHtml",...Tl,title:i.toLanguageString(a,kl[a]),...t.props,...r}),this.state.openedDialog&&l&&f.createElement(e.EditorDialogs.ViewHtmlDialog,{key:"viewHtmlDialog",view:l,settings:t,dir:r.dir,onClose:this.toggleDialog})||null];return n?n.call(void 0,s,{view:l}):s}};return d.registerForLocalization(l),l}})(fo||(fo={}));const{print:bo}=e.EditorToolsSettings,vo=e=>{const{view:t,render:l,settings:r=bo,...i}=e,a=t&&t.dom,s=a&&a.ownerDocument,c=s&&s.defaultView,p=r.messages.title,m=!c||c===window,u=f.useCallback((()=>{c&&c.print()}),[c]),g=f.createElement(o.Button,{onClick:m?void 0:u,"aria-disabled":!!m||void 0,title:d.useLocalization().toLanguageString(p,kl[p]),...Tl,...r.props,...i,className:n.classNames(i.className,r.props.className,{"k-disabled":m})});return l?l.call(void 0,g,{view:t}):g},{pdf:ko,savePdfOptions:yo}=e.EditorToolsSettings,Co=e=>{const{view:t,render:l,settings:n=ko,savePdfOptions:r,savePdfCallback:i,...a}=e,s=n.messages.title,c=f.useCallback((()=>{t&&g.savePDF(t.dom,{...yo,...r||{}},i)}),[t,r,i]),p=f.createElement(o.Button,{onClick:c,title:d.useLocalization().toLanguageString(s,kl[s]),...Tl,...n.props,...a});return l?l.call(void 0,p,{view:t}):p},{selectAll:wo}=e.EditorToolsSettings,So=e=>{const{view:t,render:l,settings:n=wo,...i}=e,a=n.messages.title,s=f.useCallback((()=>{t&&(r.selectAll(t.state,t.dispatch),t.focus())}),[t]),c=f.createElement(o.Button,{onClick:s,title:d.useLocalization().toLanguageString(a,kl[a]),...Tl,...n.props,...i});return l?l.call(void 0,c,{view:t}):c},{cleanFormatting:Eo}=e.EditorToolsSettings,xo=r.cleanFormatting(),To=e=>{const{view:t,render:l,settings:r=Eo,...i}=e,a=r.messages.title,s=!t||!xo(t.state),c=f.useCallback((()=>{t&&xo(t.state,(e=>{e.setMeta("commandName",r.commandName),t.dispatch(e)}))}),[t]),p=f.createElement(o.Button,{onClick:s?void 0:c,"aria-disabled":!!s||void 0,title:d.useLocalization().toLanguageString(a,kl[a]),...Tl,...r.props,...i,className:n.classNames(e.className,r.props.className,{"k-disabled":s})});return l?l.call(void 0,p,{view:t}):p},Po=e.EditorToolsSettings.findAndReplace;let Io=class extends f.Component{constructor(){super(...arguments),this.state={showDialog:!1},this.onClose=()=>this.setState({showDialog:!1}),this.onOpen=()=>this.setState({showDialog:!0})}render(){const{view:e,...t}=this.props,{props:l}=Po,r=d.provideLocalizationService(this),i=Po.messages.findReplaceToolTitle,a=!e;return[f.createElement(o.Button,{onClick:a?void 0:this.onOpen,"aria-disabled":!!a||void 0,...Tl,title:r.toLanguageString(i,kl[i]),key:"tool",...l,...t,className:n.classNames(t.className,l.className,{"k-disabled":a})}),this.state.showDialog&&e&&f.createElement(Ml,{view:e,onClose:this.onClose,dir:t.dir,key:"dialog"})]}};d.registerForLocalization(Io);const No=(e,t)=>{const{from:l,to:o}=e.selection;let n=null;return e.doc.nodesBetween(l,o,(e=>(n=n||(e.type===t?e:null),!n))),n},Ro=e=>{let t=!1;const l=e.view,n=Cl,i=e.listType,a=d.useLocalization();let s,c,p=[...e.items||[]];if(l){const e=l.state,o=e&&e.schema.nodes;s=o&&No(e,o[n.orderedList]),c=o&&No(e,o[n.bulletList]),t=!!(i===n.orderedList?s&&!c:!s&&c)}if(t&&(s||c)){const e=r.listStyle((s||c).attrs);p=p.map(((t,l)=>({...t,selected:e?t.style===e:0===l})))}return f.createElement("span",{onMouseDown:e=>{e.preventDefault()}},f.createElement(o.SplitButton,{textField:"text",items:p,icon:e.icon,svgIcon:e.svgIcon,onButtonClick:e=>{l&&(r.toggleList(l.state,l.dispatch,l,{listType:i,...n,listAttrs:{}},"InsertList"),l.focus())},onItemClick:e=>{if(l){const t=e.item.style?{style:"list-style-type: "+e.item.style+";"}:{},o=s||c;if(o&&r.listStyle(o.attrs)!==e.item.style){const e=l.state.selection.$head.posAtIndex(0,-2)-1;l.dispatch(l.state.tr.setNodeMarkup(e,l.state.schema.nodes[i],t))}else r.toggleList(l.state,l.dispatch,l,{listType:i,...n,listAttrs:t},"InsertList");l.focus()}},buttonClass:t?"k-selected":void 0,title:void 0!==e.title?e.title:a.toLanguageString(e.titleKey,kl[e.titleKey])}))},Lo=/[\D]+$/,Ao=e=>{const t=e.match(Lo);return t?t[0]:""},Bo=(e,t)=>{var l;const o=Do((null==(l=e.attrs)?void 0:l.style)||"")[t]||"";return{[t]:parseFloat(o)||null,[t+"Unit"]:Ao(o)}},Do=e=>(e||"").split(/\s*;\s*/).filter(Boolean).map((e=>{const t=e.split(/\s*:\s*/);return{[t[0]]:t[1]}})).reduce(((e,t)=>({...e,...t})),{}),Mo=/^.+$/;function Fo(e,t,l){let o;if(new RegExp("[^-]?"+t+":").test(e.style||"")){const{style:n}=((e,t)=>{const l=t.style,o=t.value,n=t.newValue;if(!e)return{changed:!1,style:null};const r=e.split(/\s*;\s*/).filter((e=>!!e)),i=r.filter((e=>{const t=e.split(/\s*:\s*/);return!(t[0].toLowerCase()===l&&o.test(t[1]))}));return n&&i.push(`${l}: ${n}`),{style:i.join("; ")+(i.length?";":""),changed:!!n||i.length!==r.length}})(e.style||"",{style:t,value:Mo,newValue:l});o={...e,style:n}}else if(e.style){const n=Do(e.style);n[t]=l,o={...e,style:Object.keys(n).filter((e=>!!n[e])).reduce(((e,t)=>e+t+": "+n[t]+"; "),"").trim()}}else o=l?{...e,style:t+": "+l+";"}:{...e};return o}const zo=e=>{const t=Bl(e.selection.$from,(e=>"table"===e.type.name)),l=Bl(e.selection.$to,(e=>"table"===e.type.name));return t&&l&&t.depth===l.depth&&t.node.eq(l.node)?(e=>{const{doc:t,selection:l}=e,o=[];return l.ranges.forEach((e=>{const l=e.$from.pos,n=e.$to.pos;t.nodesBetween(l,n,((e,t,l,n)=>{("table_cell"===e.type.name||"table_header"===e.type.name)&&o.push({node:e,pos:t})}))})),o})(e).filter((({pos:l})=>{const o=Bl(e.doc.resolve(l),(e=>"table"===e.type.name));return o&&o.depth===t.depth&&t.node.eq(o.node)})):[]},Ho=e=>{const t=[];if(zo(e).length){const l=e.selection.$from,o=Bl(l,(e=>"table"===e.type.spec.tableRole));if(null===o)return t;const n=l.start(o.depth),i=o.node,a=r.TableMap.get(i),s=e.doc;a.map.forEach((e=>{const l=e+n;t.push({pos:l,node:s.nodeAt(l)})}))}return t},Wo="k-colgroup-data",Ko=(e,t,l)=>{const o={cellWidth:null,widthUnit:""},n=t.node,i=l.start(t.depth);if(!n.attrs[Wo])return o;const a=new Set;let s="";const c=r.htmlToFragment(n.attrs[Wo]).firstChild;return e.forEach((e=>{const t=n.resolve(e.pos-i),l=t.parent,o=t.index();let r=0;for(let e=0;e<=o;e++)r+=l.child(e).attrs.colspan;const d=c.children[r-1];d&&(s=d.style.width,a.add(s))})),1===a.size&&s&&(o.cellWidth=parseFloat(s)||null,o.widthUnit=Ao(s)),o},Uo=(e,t,l)=>{const o={cellHeight:null,heightUnit:""},n=t.node,r=l.start(t.depth),i=new Set;let a="";return e.forEach((e=>{var t;const l=n.resolve(e.pos-r).parent;a=Do((null==(t=l.attrs)?void 0:t.style)||"").height||"",i.add(a)})),1===i.size&&a&&(o.cellHeight=parseFloat(a)||null,o.heightUnit=Ao(a)),o},Oo=(e,t)=>{const l=new Set;let o="";return e.forEach((e=>{var n;o=Do((null==(n=e.node.attrs)?void 0:n.style)||"")[t]||"",l.add(o)})),1===l.size&&o?o:""},Vo=(e,t)=>{const l=new Set;let o="";return e.forEach((e=>{o=(e.node.attrs||{})[t]||"",l.add(o)})),1===l.size&&o?o:""},_o={applyToAll:!1,cellWidth:null,widthUnit:"",cellHeight:null,heightUnit:"",alignment:{x:"",y:""},textControl:"",backgroundColor:void 0,cellPadding:null,borderWidth:null,borderColor:void 0,borderStyle:null,id:"",className:""},jo=e=>{const t=zo(e),l=e.selection.$from,o=t.length?Bl(l,(e=>"table"===e.type.spec.tableRole)):null;return o?{..._o,...Ko(t,o,l),...Uo(t,o,l),alignment:{x:Oo(t,"text-align"),y:Oo(t,"vertical-align")},textControl:Oo(t,"white-space"),backgroundColor:Oo(t,"background-color")||void 0,cellPadding:parseFloat(Oo(t,"padding"))||null,borderWidth:parseFloat(Oo(t,"border-width"))||null,borderColor:Oo(t,"border-color")||void 0,borderStyle:Oo(t,"border-style")||null,id:Vo(t,"id"),className:Vo(t,"class")}:_o},qo=(e,t,l)=>{l.forEach((({node:l,pos:o})=>{let n={...l.attrs};n=Fo(n,"border-color",t.borderColor||""),n=Fo(n,"border-style",t.borderStyle||""),n=Fo(n,"border-width","number"==typeof t.borderWidth?t.borderWidth+"px":""),n=Fo(n,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),n=Fo(n,"background-color",t.backgroundColor||""),n=Fo(n,"text-align",t.alignment.x||""),n=Fo(n,"vertical-align",t.alignment.y||""),n=Fo(n,"white-space",t.textControl||""),n.id=t.id||null,n.class=t.className||null,e.setNodeMarkup(o,null,n),"number"==typeof t.cellWidth&&((e,t,l)=>{const o=e.doc.resolve(t),n=o.parent,i=o.index();let a=0;for(let e=0;e<=i;e++)a+=n.child(e).attrs.colspan;const s=o.node(o.depth-1),c=o.posAtIndex(0,o.depth-1)-1;let d,p=s.attrs;if(p&&p[Wo]){const t=r.htmlToFragment(p[Wo]).firstChild;d=t.children[a-1],d.style.width=l,p={...p,[Wo]:t.outerHTML},e.setNodeMarkup(c,null,p)}else{let t=0;for(let e=0;e<n.childCount;e++)t+=n.child(e).attrs.colspan;const o=document.createElement("colgroup"),r=new Array(t);for(let e=0;e<t;e++)r[e]=document.createElement("col"),o.appendChild(r[e]);d=r[i],d.style.width=l,p={...p,[Wo]:"<colgroup>"+r.reduce(((e,t)=>e+t.outerHTML),"")+"</colgroup>"},e.setNodeMarkup(c,null,p)}})(e,o,t.cellWidth+(t.widthUnit||"px")),"number"==typeof t.cellHeight&&((e,t,l)=>{const o=e.doc.resolve(t),n=o.parent,r=o.posAtIndex(0)-1;e.setNodeMarkup(r,null,Fo(n.attrs,"height",l))})(e,o,t.cellHeight+(t.heightUnit||"px"))}))},$o=(e,t)=>{const l=e.tr,o=t.applyToAll?Ho(e):zo(e);return qo(l,t,o),l},Go=e=>{const{view:t,...l}=e,[n,r]=f.useState(!1),a=d.useLocalization(),s=!(!t||!Bl(t.state.selection.$from,(e=>"table"===e.type.spec.tableRole))),c=f.useCallback((()=>{r(!0)}),[]),p=f.useCallback((()=>{r(!1),null==t||t.focus()}),[t]),m=f.useCallback((e=>{if(t&&e){const l=$o(t.state,e);l.docChanged&&t.dispatch(l)}p()}),[t,p]);return f.createElement(f.Fragment,null,f.createElement(o.Button,{type:"button",title:a.toLanguageString(yl.cellProperties,kl[yl.cellProperties]),icon:"table-cell-properties",svgIcon:i.tableCellPropertiesIcon,onClick:c,disabled:!s,...Tl,...l}),n&&t&&f.createElement(Zo,{view:t,onCancel:p,onSave:m}))},Jo=[{textKey:yl.cellPropertiesLeftTop,text:kl[yl.cellPropertiesLeftTop],icon:"table-align-top-left",svgIcon:i.tableAlignTopLeftIcon,value:{x:"left",y:"top"}},{textKey:yl.cellPropertiesCenterTop,text:kl[yl.cellPropertiesCenterTop],icon:"table-align-top-center",svgIcon:i.tableAlignTopCenterIcon,value:{x:"center",y:"top"}},{textKey:yl.cellPropertiesRightTop,text:kl[yl.cellPropertiesRightTop],icon:"table-align-top-right",svgIcon:i.tableAlignTopRightIcon,value:{x:"right",y:"top"}},{textKey:yl.cellPropertiesLeftMiddle,text:kl[yl.cellPropertiesLeftMiddle],icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon,value:{x:"left",y:"middle"}},{textKey:yl.cellPropertiesCenterMiddle,text:kl[yl.cellPropertiesCenterMiddle],icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon,value:{x:"center",y:"middle"}},{textKey:yl.cellPropertiesRightMiddle,text:kl[yl.cellPropertiesRightMiddle],icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon,value:{x:"right",y:"middle"}},{textKey:yl.cellPropertiesLeftBottom,text:kl[yl.cellPropertiesLeftBottom],icon:"table-align-bottom-left",svgIcon:i.tableAlignBottomLeftIcon,value:{x:"left",y:"bottom"}},{textKey:yl.cellPropertiesCenterBottom,text:kl[yl.cellPropertiesCenterBottom],icon:"table-align-bottom-center",svgIcon:i.tableAlignBottomCenterIcon,value:{x:"center",y:"bottom"}},{textKey:yl.cellPropertiesRightBottom,text:kl[yl.cellPropertiesRightBottom],icon:"table-align-bottom-right",svgIcon:i.tableAlignBottomRightIcon,value:{x:"right",y:"bottom"}},{textKey:yl.cellPropertiesNoAlignment,text:kl[yl.cellPropertiesNoAlignment],icon:"align-remove",svgIcon:i.tableAlignRemoveIcon,value:{x:"",y:""}}],Qo=[{textKey:yl.cellPropertiesWrap,text:kl[yl.cellPropertiesWrap],value:"",icon:"text-wrap",svgIcon:i.textWrapIcon},{textKey:yl.cellPropertiesFitToCell,text:kl[yl.cellPropertiesFitToCell],value:"nowrap",icon:"parameter-string",svgIcon:i.parameterStringIcon}],Xo=(e,t)=>t?f.createElement(f.Fragment,null,f.createElement(s.InputPrefix,null,f.createElement(n.IconWrap,{icon:t.svgIcon,name:t.icon})),e):e,Yo=(e,t)=>{const l=f.createElement(f.Fragment,null,f.createElement(s.InputPrefix,null,f.createElement(n.IconWrap,{icon:t.dataItem.svgIcon,name:t.dataItem.icon})),e.props.children);return f.cloneElement(e,e.props,l)},Zo=e=>{const t=f.useMemo((()=>jo(e.view.state)),[e.view]),l=d.useLocalization(),n=f.useRef(null),r=t.applyToAll,i=f.useRef(null),c=t.cellWidth,p=f.useRef(null);t.widthUnit&&!Rl.includes(t.widthUnit)&&Rl.push(t.widthUnit);const m=t.widthUnit||"",g=f.useRef(null),h=t.cellHeight,b=f.useRef(null);t.heightUnit&&!Rl.includes(t.heightUnit)&&Rl.push(t.heightUnit);const v=t.heightUnit||"",k=f.useRef(null),y=Jo.find((e=>void 0!==e.value.x&&t.alignment&&e.value.x===t.alignment.x&&e.value.y===t.alignment.y))||null,C=f.useRef(null),w=Qo.find((e=>e.value===t.textControl)),S=f.useRef(null),E=t.backgroundColor,x=f.useRef(null),T=t.cellPadding,P=f.useRef(null),I=t.borderWidth,N=f.useRef(null),R=t.borderColor,L=f.useRef(null),A=Al.find((e=>e.value===t.borderStyle)),B=f.useRef(null),D=t.id,M=f.useRef(null),F=t.className,z=f.useCallback((()=>{var t,l,o,r,a,s,c,d,m,u,h,f,v,y,w,E,T,I,R,A;const D={applyToAll:!(null==(l=null==(t=n.current)?void 0:t.element)||!l.checked),cellWidth:(null==(o=i.current)?void 0:o.value)||null,widthUnit:(null==(r=p.current)?void 0:r.value)||"",cellHeight:(null==(a=g.current)?void 0:a.value)||null,heightUnit:(null==(s=b.current)?void 0:s.value)||"",alignment:null==(d=null==(c=k.current)?void 0:c.value)?void 0:d.value,textControl:null==(u=null==(m=C.current)?void 0:m.value)?void 0:u.value,backgroundColor:null==(h=S.current)?void 0:h.value,cellPadding:"number"==typeof(null==(f=x.current)?void 0:f.value)?null==(v=x.current)?void 0:v.value:null,borderWidth:"number"==typeof(null==(y=P.current)?void 0:y.value)?null==(w=P.current)?void 0:w.value:null,borderColor:null==(E=N.current)?void 0:E.value,borderStyle:(null==(I=null==(T=L.current)?void 0:T.value)?void 0:I.value)||null,id:String((null==(R=B.current)?void 0:R.value)||""),className:String((null==(A=M.current)?void 0:A.value)||"")};e.onSave.call(void 0,D)}),[e.onSave]),H=f.createElement("div",{className:"k-form k-form-md"},f.createElement("fieldset",{className:"k-form-fieldset"},f.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("div",{className:"k-form-field-wrap"},f.createElement("span",{className:"k-checkbox-wrap"},f.createElement(s.Checkbox,{ref:n,defaultChecked:r})),f.createElement("label",{className:"k-checkbox-label"},l.toLanguageString(yl.cellPropertiesApplyToAllCells,kl[yl.cellPropertiesApplyToAllCells])))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesWidth,kl[yl.cellPropertiesWidth])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:i,defaultValue:c,min:0,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto])}),f.createElement("div",{className:"k-form-hint"},l.toLanguageString(yl.cellPropertiesApplyToColumn,kl[yl.cellPropertiesApplyToColumn])))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"}," "),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.AutoComplete,{ref:p,defaultValue:m,data:Rl,popupSettings:Ll}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesHeight,kl[yl.cellPropertiesHeight])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:g,defaultValue:h,min:0,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto])}),f.createElement("div",{className:"k-form-hint"},l.toLanguageString(yl.cellPropertiesApplyToRow,kl[yl.cellPropertiesApplyToRow])))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"}," "),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.AutoComplete,{ref:b,defaultValue:v,data:Rl,popupSettings:Ll}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesAlignment,kl[yl.cellPropertiesAlignment])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:k,defaultValue:y,data:Jo.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"text",popupSettings:Ll,valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesTextControl,kl[yl.cellPropertiesTextControl])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:C,defaultValue:w,data:Qo.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",popupSettings:Ll,valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesCellPadding,kl[yl.cellPropertiesCellPadding])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:x,defaultValue:T,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesBackground,kl[yl.cellPropertiesBackground])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.ColorPicker,{ref:S,defaultValue:E}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesBorderWidth,kl[yl.cellPropertiesBorderWidth])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:P,defaultValue:I,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesBorderColor,kl[yl.cellPropertiesBorderColor])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.ColorPicker,{ref:N,defaultValue:R}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesBorderStyle,kl[yl.cellPropertiesBorderStyle])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:L,defaultValue:A,popupSettings:Ll,data:Al,textField:"text",dataItemKey:"value"}))),f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesId,kl[yl.cellPropertiesId])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:B,defaultValue:D}))),f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.cellPropertiesCssClass,kl[yl.cellPropertiesCssClass])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:M,defaultValue:F})))))),W=[f.createElement(o.Button,{themeColor:"primary",key:"save",onClick:z},l.toLanguageString(yl.cellPropertiesSave,kl[yl.cellPropertiesSave])),f.createElement(o.Button,{onClick:e.onCancel,key:"cancel"},l.toLanguageString(yl.cellPropertiesCancel,kl[yl.cellPropertiesCancel]))];return f.createElement(a.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(yl.cellProperties,kl[yl.cellProperties]),onClose:e.onCancel,key:"dialog",style:{userSelect:"none"},width:408,height:587,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},H,f.createElement(a.WindowActionsBar,{layout:"start"},...W))},en={rows:0,columns:0,width:null,widthUnit:"",height:null,heightUnit:"",position:null,textAlign:"",cellPadding:null,cellSpacing:null,backgroundColor:void 0,borderWidth:null,borderColor:void 0,borderStyle:null,collapseBorders:!1,id:"",className:"",caption:"",captionAlignment:null,captionPosition:null,headerRows:0,headerColumns:0,associateHeaders:"none"},tn={left:{"margin-left":"","margin-right":"auto"},center:{"margin-left":"auto","margin-right":"auto"},right:{"margin-left":"auto","margin-right":""},"":{}},ln=e=>{const t=[];for(let l=0;l<e.height;l++){const o=l*e.width,n=o+e.width;t.push(e.map.slice(o,n))}return t},on=e=>{let t=!0,l=!0;return e.content.forEach((e=>{e.content.forEach((e=>{const o="table_header"===e.type.name,n="table_cell"===e.type.name;o&&!e.attrs.scope&&(t=!1),(o&&!e.attrs.id||n&&!e.attrs.headers)&&(l=!1)}))})),t?"scope":l?"id":"none"},nn=e=>{var t,l,o;const n=zo(e),i=e.selection.$from,a=n.length?Bl(i,(e=>"table"===e.type.spec.tableRole)):null;if(!a)return en;const s=Bl(i,(e=>"table_wrapper"===e.type.name));let c="",d={},p={};s&&(p=Do(s.node.attrs.style),s.node.content.forEach((e=>{if("table_caption_external"===e.type.name){const t=r.pmDocToFragment(e);c=r.fragmentToHtml(t),c="<img>"===c?"":c,d=Do(e.attrs.style)}})));const m=Do((null==(t=a.node.attrs)?void 0:t.style)||""),u=r.TableMap.get(a.node),g="auto"===p["margin-left"]&&"auto"===p["margin-right"]?"center":"auto"===p["margin-right"]?"left":"auto"===p["margin-left"]?"right":null,h=((e,t)=>{let l=0,o=0;const n=ln(t);n.forEach((t=>{let o=!0;t.forEach((t=>{const l=e.nodeAt(t);l&&"table_header"!==l.type.name&&(o=!1)})),o&&l++}));for(let l=0;l<t.width;l++){let r=!0;for(let o=0;o<t.height;o++){const t=n[o]&&n[o][l],i="number"==typeof t&&e.nodeAt(t);i&&"table_header"!==i.type.name&&(r=!1)}r&&o++}return{rows:l,columns:o}})(a.node,u),f=(e=>{const t=new Set;return e.content.forEach((e=>{e.content.forEach((e=>{t.add(Do(e.attrs.style).padding||"")}))})),1===t.size?Array.from(t)[0]:""})(a.node);return{...en,columns:u.width,rows:u.height,...Bo(a.node,"width"),...s&&/%/.test(p.width||"")?Bo(s.node,"width"):{},...Bo(a.node,"height"),textAlign:m["text-align"]||"",position:g||null,cellPadding:f?parseFloat(f):null,cellSpacing:m["border-spacing"]?parseFloat(m["border-spacing"]):null,backgroundColor:m["background-color"],borderWidth:m["border-width"]?parseFloat(m["border-width"]):null,borderColor:m["border-color"],borderStyle:m["border-style"]||null,collapseBorders:"collapse"===m["border-collapse"],caption:c||void 0,captionAlignment:d["text-align"]||"",captionPosition:d["caption-side"]||null,headerRows:h.rows,headerColumns:h.columns,associateHeaders:h.rows||h.columns?on(a.node):"none",id:(null==(l=a.node.attrs)?void 0:l.id)||"",className:(null==(o=a.node.attrs)?void 0:o.class)||""}},rn=e=>{const t=e.lastChild.lastChild;return{node:t,pos:e.content.size-t.nodeSize}},an=(e,t,l,o,n)=>{const i=t+rn(l).pos;if(!e.doc.nodeAt(i))return e;const a=e.doc.resolve(i),s=new r.CellSelection(a,a),c=e.tr.setSelection(s);let d=e.apply(c);for(let e=0;e<o;e++)n(d,(e=>{d=d.apply(e)}));return d},sn=(e,t,l,o)=>{let n=e;for(let e=0;e<l;e++){const e=n.doc.nodeAt(t);if(e){const l=t+rn(e).pos,i=n.doc.resolve(l),a=new r.CellSelection(i,i),s=n.tr.setSelection(a);n=n.apply(s),o(n,(e=>{n=n.apply(e)}))}}return n},cn=(e,t,l,o,n)=>{if(t.type.name!==o.name||Object.keys(n).length>0){const r=e.tr.setNodeMarkup(l,o,{...t.attrs,...n});return e.apply(r)}return e},dn=(e,t,l)=>{const o=e.doc.nodeAt(l),n=o&&r.TableMap.get(o);if(!o||!n)return e;const i=ln(n);let a=e;const{table_header:s,table_cell:c}=e.schema.nodes,d=String((new Date).getTime()),p=[],m=(e,t,l,o)=>{const n=[];if(o)for(let l=0;l<e;l++)p[l]&&p[l][t]&&n.push(p[l][t]);if(l)for(let l=0;l<t;l++)p[e]&&p[e][l]&&n.push(p[e][l]);return n.join(" ")};return i.forEach(((e,n)=>{e.forEach(((e,r)=>{const i=o.nodeAt(e);if(i){const o=r<t.headerColumns,u=n<t.headerRows,g={...i.attrs};((e,t)=>{/^cell-[0-9]+-[0-9]+$/.test(e.attrs.id||"")&&(t.id=null)})(i,g),g.headers=null,g.scope=null,u||o?("scope"===t.associateHeaders&&(g.scope=u?"col":"row"),"id"===t.associateHeaders&&(g.id=((e,t)=>{const l=`cell-${e}${t}-${d}`;return p[e]||p.push([]),p[e][t]||p[e].push([]),p[e][t]=l,l})(n,r),(r>0||n>0)&&(g.headers=m(n,r,o,u)||null)),a=cn(a,i,l+e+1,s,g)):("id"===t.associateHeaders&&(g.headers=m(n,r,t.headerColumns>0,t.headerRows>0)||null),a=cn(a,i,l+e+1,c,g))}}))})),a},pn=(e,t)=>r.parseContent("<p>"+e+"</p>",t).content.firstChild.content,mn=(e,t)=>{if(!e.caption)return;let l={caption:"",style:"display: table-caption"};e.captionAlignment&&(l=Fo(l,"text-align",e.captionAlignment)),e.captionPosition&&(l=Fo(l,"caption-side",e.captionPosition));const o=pn(e.caption,t);return o&&t.nodes.table_caption_external.createAndFill(l,o)||void 0},un=e=>e.firstChild&&"table_caption_external"===e.firstChild.type.name,gn=(e,t,l,o,n)=>{let r={state:e,pos:l};if(o||!t.position&&!t.caption)o&&(t.position||t.caption||!t.caption&&un(o.node))?(e=((e,t,l,o)=>{let n={...t.attrs};return n=Fo(n,"margin-left",""),n=Fo(n,"margin-right",""),Object.keys(o||{}).forEach((e=>{n=Fo(n,e,(o||{})[e]||"")})),e.apply(e.tr.setNodeMarkup(l,null,n))})(e,o.node,n,t.position&&tn[t.position]),e=((e,t,l,o)=>{let n,r=e;const i=l+2,a=l+1,s=r.schema;if(un(t))if(n=t.firstChild,o.caption){const e=pn(o.caption,s);if(r=r.apply(r.tr.replaceWith(i,i+n.content.size,e)),n=r.doc.nodeAt(a),n){let e={...n.attrs};e=Fo(e,"text-align",o.captionAlignment||""),e=Fo(e,"caption-side",o.captionPosition||""),r=r.apply(r.tr.setNodeAttribute(a,"style",e.style))}}else r=r.apply(r.tr.deleteRange(i,i+n.content.size));else n=mn(o,s),n&&(r=r.apply(r.tr.replaceWith(a,a,n)));return r})(e,o.node,n,t),r={state:e,pos:n}):r=!o||t.position||t.caption?{state:e,pos:l}:{state:e,node:o.node,pos:e.selection.$from.start(o.depth)-1};else{let o={table:"",style:"display: table"};const n=[],i=t.position,a=i&&tn[i];a&&Object.keys(a).forEach((e=>{o=Fo(o,e,a[e]||"")})),"number"==typeof t.width&&"%"===t.widthUnit&&(o=Fo(o,"width",t.width+t.widthUnit));const s=mn(t,e.schema);s&&n.push(s);const c=e.doc.nodeAt(l);n.push(c);const d=e.schema.nodes.table_wrapper.createAndFill(o,n);if(d){const t=e.tr.replaceWith(l,l+c.content.size,d);r={state:e=e.apply(t),pos:l}}}const i=o&&r.state.doc.nodeAt(n);if(i){let e;"number"==typeof t.width&&"%"===t.widthUnit?e=Fo(i.attrs,"width",t.width+t.widthUnit):"%"!==t.widthUnit&&/%/.test(Do(i.attrs.style||"").width||"")&&(e=Fo(i.attrs,"width","")),e&&(r.state=r.state.apply(r.state.tr.setNodeMarkup(n,null,e)))}return r},hn=(e,t)=>{const l=e.selection.$from,o=Bl(l,(e=>"table"===e.type.spec.tableRole));if(!o)return;const n=l.start(o.depth)-1;let i=((e,t,l,o)=>{let n=e,i=n.doc.nodeAt(t);if(!i)return n;let a=r.TableMap.get(i);return a.width===o&&a.height===l||(o>a.width?n=an(n,t,i,o-a.width,r.addColumnAfter):o<a.width&&(n=sn(n,t,a.width-o,mo)),i=n.doc.nodeAt(t),!i)||(a=r.TableMap.get(i),l>a.height?n=an(n,t,i,l-a.height,r.addRowAfter):l<a.height&&(n=sn(n,t,a.height-l,uo))),n})(e,n,t.rows,t.columns);if(!i)return;const a=i.tr;Ho(i).forEach((e=>{let l={...e.node.attrs};l=Fo(l,"padding","number"==typeof t.cellPadding?t.cellPadding+"px":""),a.setNodeMarkup(e.pos,null,l)})),i=i.apply(a),i=((e,t,l)=>{const o=e.doc.nodeAt(l);if(!o)return e;let n={...o.attrs};const r=null!==t.width&&("%"!==t.widthUnit||!t.caption&&!t.position);n=Fo(n,"width",r?t.width+t.widthUnit:""),n=Fo(n,"height",null!==t.height?t.height+t.heightUnit:""),n=Fo(n,"text-align",t.textAlign||""),n=Fo(n,"background-color",t.backgroundColor||""),n=Fo(n,"border-width",t.borderWidth?t.borderWidth+"px":""),n=Fo(n,"border-style",t.borderStyle||""),n=Fo(n,"border-color",t.borderColor||""),n=Fo(n,"border-spacing",null!==t.cellSpacing?t.cellSpacing+"px":""),n=null!==t.cellSpacing?Fo(n,"border-collapse","unset"):Fo(n,"border-collapse",t.collapseBorders?"collapse":"");const i=tn[t.position||""]||{};Object.keys(i).forEach((e=>{n=Fo(n,e,i[e])})),n.id=t.id||null,n.class=t.className||null;const a=e.tr.setNodeMarkup(l,null,n);return e.apply(a)})(i,t,n),i=dn(i,t,n);const s=Bl(l,(e=>"table_wrapper"===e.type.name)),c=l.start((null==s?void 0:s.depth)||0)-1,d=gn(i,t,n,s,c);i=d.state;const p=d.pos,m=i.doc.nodeAt(d.pos);if(!m)return;const u=p+(s||o).node.content.size,g=e.tr.replaceWith(p,u,m),h=r.Selection.atEnd(m),f=r.TextSelection.create(g.doc,p+h.to+1);return g.setSelection(f),g},fn=e=>{const{view:t,...l}=e,n=d.useLocalization(),[r,a]=f.useState(!1),s=!(!t||!Bl(t.state.selection.$from,(e=>"table"===e.type.spec.tableRole))),c=f.useCallback((()=>{a(!0)}),[]),p=f.useCallback((()=>{a(!1),null==t||t.focus()}),[t]),m=f.useCallback((e=>{if(t&&e){const l=hn(t.state,e);l&&t.dispatch(l)}p()}),[t,p]);return f.createElement(f.Fragment,null,f.createElement(o.Button,{type:"button",title:n.toLanguageString(yl.tableProperties,kl[yl.tableProperties]),icon:"table-properties",svgIcon:i.tablePropertiesIcon,onClick:c,disabled:!s,...Tl,...l}),r&&f.createElement(Cn,{onClose:p,onSave:m,view:t}))},bn=[{textKey:yl.tablePropertiesAlignLeft,text:kl[yl.tablePropertiesAlignLeft],value:"left",icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon},{textKey:yl.tablePropertiesAlignCenter,text:kl[yl.tablePropertiesAlignCenter],value:"center",icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon},{textKey:yl.tablePropertiesAlignRight,text:kl[yl.tablePropertiesAlignRight],value:"right",icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon},{textKey:yl.tablePropertiesNoAlignment,text:kl[yl.tablePropertiesNoAlignment],value:"",icon:"align-remove",svgIcon:i.tableAlignRemoveIcon}],vn=[{textKey:yl.tablePropertiesLeft,text:kl[yl.tablePropertiesLeft],value:"left",style:{},icon:"table-position-left",svgIcon:i.tablePositionStartIcon},{textKey:yl.tablePropertiesCenter,text:kl[yl.tablePropertiesCenter],value:"center",style:{},icon:"table-position-center",svgIcon:i.tablePositionCenterIcon},{textKey:yl.tablePropertiesRight,text:kl[yl.tablePropertiesRight],value:"right",style:{},icon:"table-position-right",svgIcon:i.tablePositionEndIcon}].map((e=>({...e,style:tn[e.value]}))),kn=[{textKey:yl.tablePropertiesTop,text:kl[yl.tablePropertiesTop],value:"top",icon:"position-top",svgIcon:i.positionTopIcon},{textKey:yl.tablePropertiesBottom,text:kl[yl.tablePropertiesBottom],value:"bottom",icon:"position-bottom",svgIcon:i.positionBottomIcon}],yn=[{textKey:yl.tablePropertiesNone,text:kl[yl.tablePropertiesNone],value:"none"},{textKey:yl.tablePropertiesUsingScopeAttribute,text:kl[yl.tablePropertiesUsingScopeAttribute],value:"scope"},{textKey:yl.tablePropertiesUsingIdAttributes,text:kl[yl.tablePropertiesUsingIdAttributes],value:"id"}],Cn=e=>{const t=f.useMemo((()=>{const t=e.view&&e.view.state;return t?nn(t):en}),[e.view]),l=d.useLocalization(),[n,r]=f.useState(0),i=f.useCallback((e=>{r(e.selected)}),[]),c=f.useRef(null),m=f.useRef(null),g=f.useRef(null),h=f.useRef(null),b=f.useRef(null),v=f.useRef(null),k=f.useRef(null),y=f.useRef(null),C=f.useRef(null),w=f.useRef(null),S=f.useRef(null),E=f.useRef(null),x=f.useRef(null),T=f.useRef(null),P=f.useRef(null),I=f.useRef(null),N=f.useRef(null),R=f.useRef(null),L=f.useRef(null),A=f.useRef(null),B=f.useRef(null),D=f.useRef(null),M=f.useRef(null),F=f.useCallback((()=>{var t,l,o,n,r,i,a,s,d,p,u,f,F,z,H,W,K,U,O,V;const _={rows:(null==(t=c.current)?void 0:t.value)||0,columns:(null==(l=m.current)?void 0:l.value)||0,width:g.current?g.current.value:null,height:h.current?h.current.value:null,cellSpacing:b.current?b.current.value:null,cellPadding:v.current?v.current.value:null,borderWidth:k.current?k.current.value:null,widthUnit:(null==(o=y.current)?void 0:o.value)||"",heightUnit:(null==(n=C.current)?void 0:n.value)||"",position:(null==(i=null==(r=w.current)?void 0:r.value)?void 0:i.value)||null,textAlign:null!=(a=S.current)&&a.value?S.current.value.value:null,borderStyle:null!=(s=E.current)&&s.value?E.current.value.value:null,backgroundColor:null==(d=x.current)?void 0:d.value,borderColor:null==(p=T.current)?void 0:p.value,collapseBorders:!(null==(f=null==(u=P.current)?void 0:u.element)||!f.checked),id:String((null==(F=I.current)?void 0:F.value)||""),className:String((null==(z=N.current)?void 0:z.value)||""),caption:String((null==(H=R.current)?void 0:H.value)||""),headerRows:(null==(W=L.current)?void 0:W.value)||0,headerColumns:(null==(K=A.current)?void 0:K.value)||0,captionAlignment:null!=(U=B.current)&&U.value?B.current.value.value:null,captionPosition:null!=(O=D.current)&&O.value?D.current.value.value:null,associateHeaders:null!=(V=M.current)&&V.value?M.current.value.value:"none"};e.onSave.call(void 0,_)}),[e.onSave]),z=f.createElement("div",{className:"k-form k-form-md"},f.createElement("fieldset",{className:"k-form-fieldset"},f.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesRows,kl[yl.tablePropertiesRows])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:c,defaultValue:t.rows,min:1}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesColumns,kl[yl.tablePropertiesColumns])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:m,defaultValue:t.columns,min:1}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesWidth,kl[yl.tablePropertiesWidth])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:g,defaultValue:t.width,min:0,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto])}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"}," "),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.AutoComplete,{ref:y,defaultValue:t.widthUnit,data:Rl,popupSettings:Ll}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesHeight,kl[yl.tablePropertiesHeight])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:h,defaultValue:t.height,min:0,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto])}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"}," "),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.AutoComplete,{ref:C,defaultValue:t.heightUnit,data:Rl.filter((e=>"%"!==e)),popupSettings:Ll}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesPosition,kl[yl.tablePropertiesPosition])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:w,defaultValue:vn.find((e=>e.value===t.position)),popupSettings:Ll,data:vn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesAlignment,kl[yl.tablePropertiesAlignment])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:S,defaultValue:bn.find((e=>e.value===t.textAlign)),data:bn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value",popupSettings:Ll,valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCellSpacing,kl[yl.tablePropertiesCellSpacing])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:b,defaultValue:t.cellSpacing,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto]),min:0}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCellPadding,kl[yl.tablePropertiesCellPadding])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:v,defaultValue:t.cellPadding,placeholder:l.toLanguageString(yl.sizeAuto,kl[yl.sizeAuto]),min:0}))),f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesTableBackground,kl[yl.tablePropertiesTableBackground])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.ColorPicker,{ref:x,defaultValue:t.backgroundColor}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesBorderWidth,kl[yl.tablePropertiesBorderWidth])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:k,defaultValue:t.borderWidth,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesBorderColor,kl[yl.tablePropertiesBorderColor])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.ColorPicker,{ref:T,defaultValue:t.borderColor}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesBorderStyle,kl[yl.tablePropertiesBorderStyle])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:E,defaultValue:Al.find((e=>e.value===t.borderStyle)),popupSettings:Ll,data:Al.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),textField:"text",dataItemKey:"value"}))),f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.Checkbox,{ref:P,className:"k-checkbox-wrap",label:l.toLanguageString(yl.tablePropertiesCollapseBorders,kl[yl.tablePropertiesCollapseBorders]),defaultChecked:t.collapseBorders})))))),H=f.createElement("div",{className:"k-form k-form-md"},f.createElement("fieldset",{className:"k-form-fieldset"},f.createElement("div",{className:"k-form-layout k-d-grid"},f.createElement("div",{className:"k-form-field"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesId,kl[yl.tablePropertiesId])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:I,defaultValue:t.id}))),f.createElement("div",{className:"k-form-field"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCssClass,kl[yl.tablePropertiesCssClass])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:N,defaultValue:t.className}))),f.createElement("fieldset",{className:"k-form-fieldset"},f.createElement("legend",{className:"k-form-legend"},l.toLanguageString(yl.tablePropertiesAccessibility,kl[yl.tablePropertiesAccessibility])),f.createElement("div",{className:"k-d-grid k-grid-cols-4 k-gap-x-4"},f.createElement("div",{className:"k-form-field k-col-span-full"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCaption,kl[yl.tablePropertiesCaption])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.TextBox,{ref:R,defaultValue:t.caption}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCaptionPosition,kl[yl.tablePropertiesCaptionPosition])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:D,defaultValue:kn.find((e=>e.value===t.captionPosition)),data:kn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ll,textField:"text",dataItemKey:"value",valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesCaptionAlignment,kl[yl.tablePropertiesCaptionAlignment])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:B,defaultValue:bn.find((e=>e.value===t.captionAlignment)),data:bn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ll,textField:"text",dataItemKey:"value",valueRender:Xo,itemRender:Yo}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesHeaderRows,kl[yl.tablePropertiesHeaderRows])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:L,defaultValue:t.headerRows,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-1"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesHeaderCols,kl[yl.tablePropertiesHeaderCols])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(s.NumericTextBox,{ref:A,defaultValue:t.headerColumns,min:0}))),f.createElement("div",{className:"k-form-field k-col-span-2"},f.createElement("label",{className:"k-label k-form-label"},l.toLanguageString(yl.tablePropertiesAssociateHeaders,kl[yl.tablePropertiesAssociateHeaders])),f.createElement("div",{className:"k-form-field-wrap"},f.createElement(u.DropDownList,{ref:M,defaultValue:yn.find((e=>e.value===t.associateHeaders)),data:yn.map((e=>({...e,text:l.toLanguageString(e.textKey,e.text)}))),popupSettings:Ll,textField:"text",dataItemKey:"value"})))))))),W=f.createElement(p.TabStrip,{selected:n,onSelect:i,animation:!1,keepTabsMounted:!0},f.createElement(p.TabStripTab,{title:l.toLanguageString(yl.tablePropertiesGeneral,kl[yl.tablePropertiesGeneral])},z),f.createElement(p.TabStripTab,{title:l.toLanguageString(yl.tablePropertiesAdvanced,kl[yl.tablePropertiesAdvanced])},H)),K=[f.createElement(o.Button,{themeColor:"primary",key:"save",onClick:F},l.toLanguageString(yl.tablePropertiesSave,kl[yl.tablePropertiesSave])),f.createElement(o.Button,{onClick:e.onClose,key:"cancel"},l.toLanguageString(yl.tablePropertiesCancel,kl[yl.tablePropertiesCancel]))];return f.createElement(a.Window,{className:"k-editor-window k-editor-table-wizard-window",title:l.toLanguageString(yl.tableProperties,kl[yl.tableProperties]),onClose:e.onClose,key:"dialog",style:{userSelect:"none"},width:480,height:630,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},W,f.createElement(a.WindowActionsBar,{layout:"start"},...K))};e.EditorTools=void 0,(t=>{function l(e){return Zl(e)}t.createAlignTool=l;class o extends(l(e.EditorToolsSettings.alignLeft)){}t.AlignLeft=o;class n extends(l(e.EditorToolsSettings.alignRight)){}t.AlignRight=n;class r extends(l(e.EditorToolsSettings.alignCenter)){}t.AlignCenter=r;class a extends(l(e.EditorToolsSettings.alignJustify)){}function s(e){return Xl.createInsertTableTool(e)}t.AlignJustify=a,t.createInsertTableTool=s;class c extends(s(e.EditorToolsSettings.insertTable)){}t.InsertTable=c;class d extends Ql.InsertTablePopup{}function p(e){return eo.createStyleDropDownList(e)}t.InsertTablePopup=d,t.createStyleDropDownList=p;class m extends(p(e.EditorToolsSettings.fontSize)){}t.FontSize=m;class u extends(p(e.EditorToolsSettings.fontName)){}function g(e){return lo.createFormatBlockDropDownList(e)}t.FontName=u,t.ForeColor=t=>f.createElement(to,{...e.EditorToolsSettings.foreColor,...t}),t.BackColor=t=>f.createElement(to,{...e.EditorToolsSettings.backColor,...t}),t.createFormatBlockDropDownList=g;class h extends(g(e.EditorToolsSettings.formatBlock)){}function b(e){return no.createUndoTool(e)}function v(e){return no.createRedoTool(e)}t.FormatBlock=h,t.createUndoTool=b,t.createRedoTool=v;class k extends(b(e.EditorToolsSettings.undo)){}t.Undo=k;class y extends(v(e.EditorToolsSettings.redo)){}function C(e){return ro.createIndentTool(e)}t.Redo=y,t.createIndentTool=C;class w extends(C(e.EditorToolsSettings.indent)){}function S(e){return io.createInlineFormatTool(e)}t.Indent=w,t.createInlineFormatTool=S;class E extends(S(e.EditorToolsSettings.bold)){}t.Bold=E;class x extends(S(e.EditorToolsSettings.italic)){}t.Italic=x;class T extends(S(e.EditorToolsSettings.underline)){}t.Underline=T;class P extends(S(e.EditorToolsSettings.strikethrough)){}t.Strikethrough=P;class I extends(S(e.EditorToolsSettings.subscript)){}t.Subscript=I;class N extends(S(e.EditorToolsSettings.superscript)){}function R(e){return ao(e)}t.Superscript=N,t.createInsertImageTool=R;class L extends(R(e.EditorToolsSettings.image)){}function A(e){return so.createLinkTool(e)}t.InsertImage=L,t.createLinkTool=A;class B extends(A(e.EditorToolsSettings.link)){}t.Link=B;class D extends(A(e.EditorToolsSettings.insertFile)){}function M(e){return co.createListTool(e)}t.InsertFile=D,t.createListTool=M;class F extends(M(e.EditorToolsSettings.orderedList)){}t.OrderedList=F;class z extends(M(e.EditorToolsSettings.bulletList)){}function H(e){return po.createOutdentTool(e)}t.UnorderedList=z,t.BulletedList=t=>{const l=[{icon:"list-unordered",svgIcon:i.listUnorderedIcon,text:"Disc",style:"disc"},{icon:"list-unordered-outline",svgIcon:i.listUnorderedOutlineIcon,text:"Circle",style:"circle"},{icon:"list-unordered-square",svgIcon:i.listUnorderedSquareIcon,text:"Square",style:"square"}];return f.createElement(Ro,{listType:e.EditorToolsSettings.bulletList.listType,items:l,icon:"list-unordered",svgIcon:i.listUnorderedIcon,titleKey:e.EditorToolsSettings.bulletList.messages.title,...t})},t.NumberedList=t=>{const l=[{icon:"list-ordered",svgIcon:i.listOrderedIcon,text:"Decimal"},{icon:"list-roman-upper",svgIcon:i.listRomanUpperIcon,text:"Upper roman",style:"upper-roman"},{icon:"list-roman-lower",svgIcon:i.listRomanLowerIcon,text:"Lower roman",style:"lower-roman"},{icon:"list-latin-big",svgIcon:i.listLatinBigIcon,text:"Upper latin",style:"upper-latin"},{icon:"list-latin-small",svgIcon:i.listLatinSmallIcon,text:"Lower latin",style:"lower-latin"}];return f.createElement(Ro,{listType:e.EditorToolsSettings.orderedList.listType,items:l,icon:"list-ordered",svgIcon:i.listOrderedIcon,titleKey:e.EditorToolsSettings.orderedList.messages.title,...t})},t.TableCellProperties=Go,t.TableProperties=fn,t.createOutdentTool=H;class W extends(H(e.EditorToolsSettings.outdent)){}function K(e){return go.createAddRowBeforeTool(e)}function U(e){return go.createAddRowAfterTool(e)}function O(e){return go.createAddColumnBeforeTool(e)}function V(e){return go.createAddColumnAfterTool(e)}function _(e){return go.createDeleteRowTool(e)}function j(e){return go.createDeleteColumnTool(e)}function q(e){return go.createDeleteTableTool(e)}function $(e){return go.createMergeCellsTool(e)}function G(e){return go.createSplitCellTool(e)}t.Outdent=W,t.Print=e=>f.createElement(vo,{...e}),t.Pdf=e=>f.createElement(Co,{...e}),t.SelectAll=e=>f.createElement(So,{...e}),t.CleanFormatting=e=>f.createElement(To,{...e}),t.createAddRowBeforeTool=K,t.createAddRowAfterTool=U,t.createAddColumnBeforeTool=O,t.createAddColumnAfterTool=V,t.createDeleteRowTool=_,t.createDeleteColumnTool=j,t.createDeleteTableTool=q,t.createMergeCellsTool=$,t.createSplitCellTool=G;class J extends(K(e.EditorToolsSettings.addRowBefore)){}t.AddRowBefore=J;class Q extends(U(e.EditorToolsSettings.addRowAfter)){}t.AddRowAfter=Q;class X extends(O(e.EditorToolsSettings.addColumnBefore)){}t.AddColumnBefore=X;class Y extends(V(e.EditorToolsSettings.addColumnAfter)){}t.AddColumnAfter=Y;class Z extends(_(e.EditorToolsSettings.deleteRow)){}t.DeleteRow=Z;class ee extends(j(e.EditorToolsSettings.deleteColumn)){}t.DeleteColumn=ee;class te extends(q(e.EditorToolsSettings.deleteTable)){}t.DeleteTable=te;class le extends($(e.EditorToolsSettings.mergeCells)){}t.MergeCells=le;class oe extends(G(e.EditorToolsSettings.splitCell)){}function ne(e){return ho.createUnlinkTool(e)}t.SplitCell=oe,t.createUnlinkTool=ne;class re extends(ne(e.EditorToolsSettings.unlink)){}function ie(e){return fo.createViewHtmlTool(e)}t.Unlink=re,t.createViewHtmlTool=ie;class ae extends(ie(e.EditorToolsSettings.viewHtml)){}t.ViewHtml=ae;t.FindAndReplace=class extends Io{}})(e.EditorTools||(e.EditorTools={}));const wn={Selection:r.Selection,SelectionRange:r.SelectionRange,TextSelection:r.TextSelection,NodeSelection:r.NodeSelection,AllSelection:r.AllSelection,EditorState:r.EditorState,Plugin:r.Plugin,PluginKey:r.PluginKey,Transaction:r.Transaction,Decoration:r.Decoration,DecorationSet:r.DecorationSet,EditorView:r.EditorView,Node:r.Node,ResolvedPos:r.ResolvedPos,NodeRange:r.NodeRange,Fragment:r.Fragment,Slice:r.Slice,ReplaceError:r.ReplaceError,Mark:r.Mark,Schema:r.Schema,NodeType:r.NodeType,MarkType:r.MarkType,ContentMatch:r.ContentMatch,DOMParser:r.DOMParser,DOMSerializer:r.DOMSerializer,Transform:r.Transform,Step:r.Step,StepResult:r.StepResult,joinPoint:r.joinPoint,canJoin:r.canJoin,canSplit:r.canSplit,insertPoint:r.insertPoint,dropPoint:r.dropPoint,liftTarget:r.liftTarget,findWrapping:r.findWrapping,StepMap:r.StepMap,MapResult:r.MapResult,Mapping:r.Mapping,AddMarkStep:r.AddMarkStep,RemoveMarkStep:r.RemoveMarkStep,ReplaceStep:r.ReplaceStep,ReplaceAroundStep:r.ReplaceAroundStep,replaceStep:r.replaceStep,deleteSelection:r.deleteSelection,joinBackward:r.joinBackward,selectNodeBackward:r.selectNodeBackward,joinForward:r.joinForward,selectNodeForward:r.selectNodeForward,joinUp:r.joinUp,joinDown:r.joinDown,lift:r.lift,newlineInCode:r.newlineInCode,exitCode:r.exitCode,createParagraphNear:r.createParagraphNear,liftEmptyBlock:r.liftEmptyBlock,splitBlock:r.splitBlock,splitBlockKeepMarks:r.splitBlockKeepMarks,selectParentNode:r.selectParentNode,selectAll:r.selectAll,wrapIn:r.wrapIn,setBlockType:r.setBlockType,toggleMark:r.toggleMark,autoJoin:r.autoJoin,chainCommands:r.chainCommands,pcBaseKeymap:r.pcBaseKeymap,macBaseKeymap:r.macBaseKeymap,baseKeymap:r.baseKeymap,history:r.history,undo:r.undo,redo:r.redo,undoDepth:r.undoDepth,redoDepth:r.redoDepth,InputRule:r.InputRule,inputRules:r.inputRules,undoInputRule:r.undoInputRule,emDash:r.emDash,ellipsis:r.ellipsis,openDoubleQuote:r.openDoubleQuote,closeDoubleQuote:r.closeDoubleQuote,openSingleQuote:r.openSingleQuote,closeSingleQuote:r.closeSingleQuote,smartQuotes:r.smartQuotes,wrappingInputRule:r.wrappingInputRule,textblockTypeInputRule:r.textblockTypeInputRule,keymap:r.keymap,keydownHandler:r.keydownHandler,orderedList:r.orderedList,bulletList:r.bulletList,listItem:r.listItem,addListNodes:r.addListNodes,wrapInList:r.wrapInList,splitListItem:r.splitListItem,liftListItem:r.liftListItem,sinkListItem:r.sinkListItem,dropCursor:r.dropCursor,gapCursor:r.gapCursor,tableEditing:r.tableEditing,fixTables:r.fixTables,fixTablesKey:r.fixTablesKey,cellAround:r.cellAround,isInTable:r.isInTable,selectionCell:r.selectionCell,moveCellForward:r.moveCellForward,inSameTable:r.inSameTable,findCell:r.findCell,colCount:r.colCount,nextCell:r.nextCell,removeColSpan:r.removeColSpan,addColSpan:r.addColSpan,columnIsHeader:r.columnIsHeader,tableNodes:r.tableNodes,tableNodeTypes:r.tableNodeTypes,CellSelection:r.CellSelection,TableMap:r.TableMap,tableEditingKey:r.tableEditingKey,columnResizing:r.columnResizing,columnResizingPluginKey:r.columnResizingPluginKey,updateColumnsOnResize:r.updateColumnsOnResize,selectedRect:r.selectedRect,addColumn:r.addColumn,addColumnBefore:r.addColumnBefore,addColumnAfter:r.addColumnAfter,deleteColumn:r.deleteColumn,rowIsHeader:r.rowIsHeader,addRow:r.addRow,addRowBefore:r.addRowBefore,addRowAfter:r.addRowAfter,deleteRow:r.deleteRow,mergeCells:r.mergeCells,splitCell:r.splitCell,splitCellWithType:r.splitCellWithType,setCellAttr:r.setCellAttr,toggleHeader:r.toggleHeader,toggleHeaderRow:r.toggleHeaderRow,toggleHeaderColumn:r.toggleHeaderColumn,toggleHeaderCell:r.toggleHeaderCell,goToNextCell:r.goToNextCell,deleteTable:r.deleteTable};Object.defineProperty(e,"getHtml",{enumerable:!0,get:function(){return r.getHtml}}),Object.defineProperty(e,"marks",{enumerable:!0,get:function(){return r.marks}}),Object.defineProperty(e,"nodes",{enumerable:!0,get:function(){return r.nodes}}),Object.defineProperty(e,"parseContent",{enumerable:!0,get:function(){return r.parseContent}}),e.Editor=Gl,e.ProseMirror=wn,e.editorPropsKey=El}));
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1745582435,version:"11.0.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "11.0.0-develop.
|
|
13
|
+
publishDate: 1745582435,
|
|
14
|
+
version: "11.0.0-develop.4",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-editor",
|
|
3
|
-
"version": "11.0.0-develop.
|
|
3
|
+
"version": "11.0.0-develop.4",
|
|
4
4
|
"description": "React Editor enables users to create rich text content through a WYSIWYG interface. KendoReact Editor package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-drawing": "^1.21.2",
|
|
29
29
|
"@progress/kendo-licensing": "^1.5.1",
|
|
30
|
-
"@progress/kendo-react-buttons": "11.0.0-develop.
|
|
31
|
-
"@progress/kendo-react-common": "11.0.0-develop.
|
|
32
|
-
"@progress/kendo-react-dialogs": "11.0.0-develop.
|
|
33
|
-
"@progress/kendo-react-dropdowns": "11.0.0-develop.
|
|
34
|
-
"@progress/kendo-react-form": "11.0.0-develop.
|
|
35
|
-
"@progress/kendo-react-inputs": "11.0.0-develop.
|
|
36
|
-
"@progress/kendo-react-intl": "11.0.0-develop.
|
|
37
|
-
"@progress/kendo-react-layout": "11.0.0-develop.
|
|
38
|
-
"@progress/kendo-react-pdf": "11.0.0-develop.
|
|
39
|
-
"@progress/kendo-react-popup": "11.0.0-develop.
|
|
30
|
+
"@progress/kendo-react-buttons": "11.0.0-develop.4",
|
|
31
|
+
"@progress/kendo-react-common": "11.0.0-develop.4",
|
|
32
|
+
"@progress/kendo-react-dialogs": "11.0.0-develop.4",
|
|
33
|
+
"@progress/kendo-react-dropdowns": "11.0.0-develop.4",
|
|
34
|
+
"@progress/kendo-react-form": "11.0.0-develop.4",
|
|
35
|
+
"@progress/kendo-react-inputs": "11.0.0-develop.4",
|
|
36
|
+
"@progress/kendo-react-intl": "11.0.0-develop.4",
|
|
37
|
+
"@progress/kendo-react-layout": "11.0.0-develop.4",
|
|
38
|
+
"@progress/kendo-react-pdf": "11.0.0-develop.4",
|
|
39
|
+
"@progress/kendo-react-popup": "11.0.0-develop.4",
|
|
40
40
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
41
41
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
42
42
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"package": {
|
|
64
64
|
"productName": "KendoReact",
|
|
65
65
|
"productCode": "KENDOUIREACT",
|
|
66
|
-
"publishDate":
|
|
66
|
+
"publishDate": 1745582435,
|
|
67
67
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
68
68
|
}
|
|
69
69
|
},
|