rj-editor 1.3.1 → 1.3.2
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/README.md +15 -6
- package/dist/components/rj-text-editor/RJEditorImageUploadContext.d.ts +6 -1
- package/dist/index.d.ts +1 -0
- package/dist/rendered-html.d.ts +2 -0
- package/dist/rendered-html.js +29 -0
- package/dist/rj-editor.css +1 -1
- package/dist/rj-editor.js +713 -683
- package/dist/rj-editor.umd.cjs +10 -10
- package/package.json +10 -5
package/dist/rj-editor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const RJ_EDITOR_STYLE_ID = "rj-editor-style";
|
|
2
|
-
const RJ_EDITOR_CSS = ":root{--rj-color-text:#111827;--rj-color-muted:#526070;--rj-color-subtle:#8a94a6;--rj-color-page-bg:#f5f7fb;--rj-color-surface:#fff;--rj-color-surface-soft:#f8fafc;--rj-color-border:#d9dde5;--rj-color-brand:#3167c8;--rj-color-brand-strong:#1f4f9a;--rj-color-brand-soft:#eef4ff;--rj-color-brand-tint:#eaf2ff;--rj-color-link:#2563eb;--rj-color-focus:#7aa7f7;--rj-color-table-border:#cbd5e1;--rj-color-table-header-bg:#f1f5f9;--rj-color-image-border:#94a3b8;--rj-shadow-image:0 .875rem 2rem #0f172a2e;--rj-color-inline-code-bg:#2a2828;--rj-color-inline-code-text:#ededed;--rj-color-inline-code-border:#ffffff24;--rj-color-code-bg:#0b0c0e;--rj-color-code-header-bg:#111214;--rj-color-code-border:#34363a;--rj-color-code-text:#ededed;--rj-color-code-muted:#a1a1aa;--rj-color-code-keyword:#c678dd;--rj-color-code-string:#98c379;--rj-color-code-number:#d19a66;--rj-color-code-comment:#7f848e;--rj-color-code-function:#61afef;--rj-color-code-operator:#56b6c2;--rj-color-code-tag:#e06c75;--rj-color-danger:#dc2626;--rj-color-danger-soft:#fce1e13f;--rj-color-danger-border:#fca5a5;--rj-color-inverse-bg:#101827;--rj-color-inverse-text:#dbeafe;--rj-color-white:#fff;--rj-editor-bg:var(--rj-color-surface);--rj-editor-border:var(--rj-color-border);--rj-editor-text:var(--rj-color-text);--rj-editor-placeholder:var(--rj-color-subtle);--rj-editor-toolbar-bg:var(--rj-color-surface-soft);--rj-editor-toolbar-button-bg:var(--rj-color-surface);--rj-editor-toolbar-button-active-bg:var(--rj-color-brand-tint);--rj-editor-link:var(--rj-color-link);--rj-editor-focus-border:var(--rj-color-focus);--rj-editor-table-border:var(--rj-color-table-border);--rj-editor-table-header-bg:var(--rj-color-table-header-bg);--rj-editor-table-selected-bg:var(--rj-color-brand-tint);--rj-editor-image-border:var(--rj-color-image-border);--rj-editor-image-shadow:var(--rj-shadow-image);--rj-editor-inline-code-bg:var(--rj-color-inline-code-bg);--rj-editor-inline-code-text:var(--rj-color-inline-code-text);--rj-editor-inline-code-border:var(--rj-color-inline-code-border);--rj-editor-code-bg:var(--rj-color-code-bg);--rj-editor-code-header-bg:var(--rj-color-code-header-bg);--rj-editor-code-border:var(--rj-color-code-border);--rj-editor-code-text:var(--rj-color-code-text);--rj-editor-code-muted:var(--rj-color-code-muted);--rj-editor-code-keyword:var(--rj-color-code-keyword);--rj-editor-code-string:var(--rj-color-code-string);--rj-editor-code-number:var(--rj-color-code-number);--rj-editor-code-comment:var(--rj-color-code-comment);--rj-editor-code-function:var(--rj-color-code-function);--rj-editor-code-operator:var(--rj-color-code-operator);--rj-editor-code-tag:var(--rj-color-code-tag);--rj-editor-muted-text:var(--rj-color-muted);--rj-editor-danger:var(--rj-color-danger);--rj-editor-danger-bg:var(--rj-color-danger-soft);--rj-editor-danger-border:var(--rj-color-danger-border);--rj-editor-focus-ring:#7aa7f738;--rj-editor-floating-shadow:0 .75rem 1.75rem #0f172a24;--rj-editor-modal-overlay:#0f172a6b;--rj-editor-modal-shadow:0 1.5rem 4rem #0f172a38;color:var(--rj-color-text);background:var(--rj-color-page-bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:1rem;line-height:1.5}[data-rj-editor-theme=light]{--rj-color-text:#111827;--rj-color-muted:#526070;--rj-color-subtle:#8a94a6;--rj-color-page-bg:#f5f7fb;--rj-color-surface:#fff;--rj-color-surface-soft:#f8fafc;--rj-color-border:#d9dde5;--rj-color-brand:#3167c8;--rj-color-brand-strong:#1f4f9a;--rj-color-brand-soft:#eef4ff;--rj-color-brand-tint:#eaf2ff;--rj-color-link:#2563eb;--rj-color-focus:#7aa7f7;--rj-color-table-border:#cbd5e1;--rj-color-table-header-bg:#f1f5f9;--rj-color-image-border:#94a3b8;--rj-shadow-image:0 .875rem 2rem #0f172a2e;--rj-color-inline-code-bg:#2a2828;--rj-color-inline-code-text:#ededed;--rj-color-inline-code-border:#ffffff24;--rj-color-code-bg:#0b0c0e;--rj-color-code-header-bg:#111214;--rj-color-code-border:#34363a;--rj-color-code-text:#ededed;--rj-color-code-muted:#a1a1aa;--rj-color-code-keyword:#c678dd;--rj-color-code-string:#98c379;--rj-color-code-number:#d19a66;--rj-color-code-comment:#7f848e;--rj-color-code-function:#61afef;--rj-color-code-operator:#56b6c2;--rj-color-code-tag:#e06c75;--rj-color-danger:#dc2626;--rj-color-danger-soft:#fce1e13f;--rj-color-danger-border:#fca5a5;--rj-color-inverse-bg:#101827;--rj-color-inverse-text:#dbeafe;--rj-color-white:#fff;--rj-editor-bg:var(--rj-color-surface);--rj-editor-border:var(--rj-color-border);--rj-editor-text:var(--rj-color-text);--rj-editor-placeholder:var(--rj-color-subtle);--rj-editor-toolbar-bg:var(--rj-color-surface-soft);--rj-editor-toolbar-button-bg:var(--rj-color-surface);--rj-editor-toolbar-button-active-bg:var(--rj-color-brand-tint);--rj-editor-link:var(--rj-color-link);--rj-editor-focus-border:var(--rj-color-focus);--rj-editor-table-border:var(--rj-color-table-border);--rj-editor-table-header-bg:var(--rj-color-table-header-bg);--rj-editor-table-selected-bg:var(--rj-color-brand-tint);--rj-editor-image-border:var(--rj-color-image-border);--rj-editor-image-shadow:var(--rj-shadow-image);--rj-editor-inline-code-bg:var(--rj-color-inline-code-bg);--rj-editor-inline-code-text:var(--rj-color-inline-code-text);--rj-editor-inline-code-border:var(--rj-color-inline-code-border);--rj-editor-code-bg:var(--rj-color-code-bg);--rj-editor-code-header-bg:var(--rj-color-code-header-bg);--rj-editor-code-border:var(--rj-color-code-border);--rj-editor-code-text:var(--rj-color-code-text);--rj-editor-code-muted:var(--rj-color-code-muted);--rj-editor-code-keyword:var(--rj-color-code-keyword);--rj-editor-code-string:var(--rj-color-code-string);--rj-editor-code-number:var(--rj-color-code-number);--rj-editor-code-comment:var(--rj-color-code-comment);--rj-editor-code-function:var(--rj-color-code-function);--rj-editor-code-operator:var(--rj-color-code-operator);--rj-editor-code-tag:var(--rj-color-code-tag);--rj-editor-muted-text:var(--rj-color-muted);--rj-editor-danger:var(--rj-color-danger);--rj-editor-danger-bg:var(--rj-color-danger-soft);--rj-editor-danger-border:var(--rj-color-danger-border);--rj-editor-focus-ring:#7aa7f738;--rj-editor-floating-shadow:0 .75rem 1.75rem #0f172a24;--rj-editor-modal-overlay:#0f172a6b;--rj-editor-modal-shadow:0 1.5rem 4rem #0f172a38;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}[data-rj-editor-theme=dark]{--rj-color-text:#ededed;--rj-color-muted:#b0b0b0;--rj-color-subtle:#898989;--rj-color-page-bg:#151515;--rj-color-surface:#1b1b1b;--rj-color-surface-soft:#232323;--rj-color-border:#414141;--rj-color-brand:#b8b8b8;--rj-color-brand-strong:#d4d4d4;--rj-color-brand-soft:#292929;--rj-color-brand-tint:#303030;--rj-color-link:#d0d0d0;--rj-color-focus:#a8a8a8;--rj-color-table-border:#3a3a3a;--rj-color-table-header-bg:#252525;--rj-color-image-border:#686868;--rj-shadow-image:0 .875rem 2rem #00000061;--rj-color-inline-code-bg:#101010;--rj-color-inline-code-text:#ededed;--rj-color-inline-code-border:#ffffff29;--rj-color-code-bg:#0b0b0b;--rj-color-code-header-bg:#141414;--rj-color-code-border:#404040;--rj-color-code-text:#ededed;--rj-color-code-muted:#949494;--rj-color-code-keyword:#d7d7d7;--rj-color-code-string:#b8b8b8;--rj-color-code-number:#c9c9c9;--rj-color-code-comment:#777;--rj-color-code-function:#e1e1e1;--rj-color-code-operator:#a6a6a6;--rj-color-code-tag:#c2c2c2;--rj-color-danger:#f87171;--rj-color-danger-soft:#f871711f;--rj-color-danger-border:#985050;--rj-color-inverse-bg:#ededed;--rj-color-inverse-text:#1b1b1b;--rj-color-white:#fff;--rj-editor-bg:var(--rj-color-surface);--rj-editor-border:var(--rj-color-border);--rj-editor-text:var(--rj-color-text);--rj-editor-placeholder:var(--rj-color-subtle);--rj-editor-toolbar-bg:var(--rj-color-surface-soft);--rj-editor-toolbar-button-bg:var(--rj-color-surface);--rj-editor-toolbar-button-active-bg:var(--rj-color-brand-tint);--rj-editor-link:var(--rj-color-link);--rj-editor-focus-border:var(--rj-color-focus);--rj-editor-table-border:var(--rj-color-table-border);--rj-editor-table-header-bg:var(--rj-color-table-header-bg);--rj-editor-table-selected-bg:var(--rj-color-brand-tint);--rj-editor-image-border:var(--rj-color-image-border);--rj-editor-image-shadow:var(--rj-shadow-image);--rj-editor-inline-code-bg:var(--rj-color-inline-code-bg);--rj-editor-inline-code-text:var(--rj-color-inline-code-text);--rj-editor-inline-code-border:var(--rj-color-inline-code-border);--rj-editor-code-bg:var(--rj-color-code-bg);--rj-editor-code-header-bg:var(--rj-color-code-header-bg);--rj-editor-code-border:var(--rj-color-code-border);--rj-editor-code-text:var(--rj-color-code-text);--rj-editor-code-muted:var(--rj-color-code-muted);--rj-editor-code-keyword:var(--rj-color-code-keyword);--rj-editor-code-string:var(--rj-color-code-string);--rj-editor-code-number:var(--rj-color-code-number);--rj-editor-code-comment:var(--rj-color-code-comment);--rj-editor-code-function:var(--rj-color-code-function);--rj-editor-code-operator:var(--rj-color-code-operator);--rj-editor-code-tag:var(--rj-color-code-tag);--rj-editor-muted-text:var(--rj-color-muted);--rj-editor-danger:var(--rj-color-danger);--rj-editor-danger-bg:var(--rj-color-danger-soft);--rj-editor-danger-border:var(--rj-color-danger-border);--rj-editor-focus-ring:#bebebe33;--rj-editor-floating-shadow:0 .75rem 1.75rem #00000061;--rj-editor-modal-overlay:#00000094;--rj-editor-modal-shadow:0 1.5rem 4rem #0000007a;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}._wrapper_se0k7_1{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.375rem;align-items:center;gap:.125rem;width:100%;height:2.125rem;padding:0 .5rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1;display:inline-flex}._wrapper_se0k7_1:focus-within{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .125rem #7aa7f72e}._wrapper_se0k7_1._disabled_se0k7_23{cursor:not-allowed;opacity:.55}._affix_se0k7_28{color:var(--rj-editor-muted-text,#526070);cursor:text;font:inherit;-webkit-user-select:none;user-select:none;flex:none}._affix_se0k7_28 svg{width:1rem!important;height:1rem!important}._affix_se0k7_28 svg path{stroke:var(--rj-editor-muted-text,#526070)}._input_se0k7_43{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.375rem;outline:none;width:100%;height:2.125rem;padding:0 .5rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1}._inputAffix_se0k7_58{box-shadow:none;background:0 0;border:0;border-radius:0;flex:auto;width:100%;min-width:0;height:100%;padding:0}._input_se0k7_43:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .125rem #7aa7f72e}._inputAffix_se0k7_58:focus{box-shadow:none;border-color:#0000}._input_se0k7_43:disabled{cursor:not-allowed;opacity:.55}._overlay_qjax1_1{background:var(--rj-editor-modal-overlay,#0f172a6b);z-index:1200;justify-content:center;align-items:center;padding:1.5rem;display:flex;position:fixed;inset:0}._modal_qjax1_12{background:var(--rj-editor-bg,#fff);box-shadow:var(--rj-editor-modal-shadow,0 1.5rem 4rem #0f172a38);color:var(--rj-editor-text,#111827);min-width:min(26.25rem,100vw - 3rem);max-width:calc(100vw - 3rem);max-height:min(45rem,100vh - 3rem);width:var(--rj-modal-width,26.25rem);border-radius:.5rem;overflow:hidden}._header_qjax1_24{border-bottom:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:move;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;padding:.875rem 1.125rem;display:flex}._title_qjax1_34{margin:0;font-family:system-ui,sans-serif;font-size:1rem;font-weight:700;line-height:1.3}._closeButton_qjax1_42{color:var(--rj-editor-muted-text,#526070);cursor:pointer;cursor:pointer;background:0 0;border:0;border-radius:.375rem;justify-content:center;align-items:center;width:1.875rem;height:1.875rem;padding:0;display:inline-flex}._closeButton_qjax1_42:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);color:var(--rj-editor-text,#111827)}._body_qjax1_65{max-height:calc(100vh - 11.375rem);padding:1.125rem;overflow:auto}._footer_qjax1_71{border-top:.0625rem solid var(--rj-editor-border,#d9dde5);justify-content:flex-end;align-items:center;gap:.5rem;padding:.75rem 1.125rem;display:flex}._button_qjax1_80{border:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:.5rem;justify-content:center;align-items:center;min-width:4.75rem;height:2.125rem;padding:0 .875rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1;display:inline-flex}._cancelButton_qjax1_96{background:var(--rj-editor-toolbar-button-bg,#fff);color:var(--rj-editor-text,#111827)}._cancelButton_qjax1_96:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}._okButton_qjax1_106{background:var(--rj-color-brand,#3167c8);border-color:var(--rj-color-brand,#3167c8);color:var(--rj-color-white,#fff)}._okButton_qjax1_106:hover{background:var(--rj-color-brand-strong,#1f4f9a);border-color:var(--rj-color-brand-strong,#1f4f9a)}._button_qjax1_80:disabled{cursor:not-allowed;opacity:.5}.rj-editor-image-border-radius-input{width:4.375rem}.rj-editor-image-edit-form{gap:.5rem;display:grid}.rj-editor-image-edit-form label{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.25}.rj-editor-image-edit-form input,.rj-editor-image-edit-form textarea{background:var(--rj-editor-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;outline:none;width:100%;padding:.5625rem .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1.35}.rj-editor-image-edit-form input{height:2.375rem}.rj-editor-image-edit-form textarea{resize:vertical;min-height:6rem}.rj-editor-image-edit-form input:focus,.rj-editor-image-edit-form textarea:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .1875rem var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-link-form{gap:.75rem;display:grid}.rj-editor-link-field{gap:.375rem;display:grid}.rj-editor-link-field label,.rj-editor-link-checkbox{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.25}.rj-editor-link-field input{background:var(--rj-editor-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;outline:none;height:2.25rem;padding:0 .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1.35}.rj-editor-link-field input:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .1875rem var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-link-checkbox{align-items:center;gap:.5rem;width:fit-content;display:inline-flex}.rj-editor-link-checkbox input{accent-color:var(--rj-color-brand,#3167c8);width:1rem;height:1rem}.rj-editor-youtube-form{gap:.75rem;display:grid}.rj-editor-youtube-field{gap:.375rem;display:grid}.rj-editor-youtube-field label{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.25}.rj-editor-youtube-field input{background:var(--rj-editor-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;outline:none;width:100%;height:2.375rem;padding:.5625rem .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1.35}.rj-editor-youtube-field input:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .1875rem var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-youtube-error{color:var(--rj-editor-danger,#dc2626);margin:0;font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.35}.rj-editor-toolbar{background:var(--rj-editor-toolbar-bg,#f8fafc);border-bottom:.0625rem solid var(--rj-editor-border,#d9dde5);flex-direction:column;display:flex}.rj-editor-toolbar-tabs{border-bottom:.0625rem solid var(--rj-editor-border,#d9dde5);justify-content:space-between;align-items:center;gap:.25rem;padding:.375rem .5rem;display:flex}.rj-editor-toolbar-tabs-list{flex-wrap:wrap;align-items:center;gap:.25rem;display:flex}.rj-editor-toolbar-tabs-list button{background:0 0;border:.0625rem solid #0000;border-bottom:0;border-radius:.5rem .5rem 0 0;min-width:auto;height:2rem;padding:0 .875rem}.rj-editor-toolbar-tabs-list button:hover,.rj-editor-toolbar-tabs-list button.is-active{background:var(--rj-editor-toolbar-button-bg,#fff);border-color:var(--rj-editor-border,#d9dde5)}.rj-editor-toolbar-fullscreen{flex:none}.rj-editor-toolbar-panel{flex-wrap:wrap;align-items:center;gap:.375rem;min-height:3.125rem;padding:.5rem;display:flex}.rj-editor-toolbar-panel--home,.rj-editor-toolbar-panel--image{flex-flow:column;align-items:stretch;gap:.5rem}.rj-editor-toolbar-row{flex-wrap:wrap;flex:none;align-items:center;gap:.375rem;padding-bottom:.0625rem;display:flex}.rj-editor-equation-toolbar{flex-flow:wrap;align-items:stretch}.rj-editor-equation-ribbon{flex-wrap:wrap;align-items:stretch;gap:.5rem;width:100%;display:flex}.rj-editor-equation-ribbon-group{flex:none;align-items:center;min-width:0;display:inline-flex}.rj-editor-equation-ribbon-group--symbols{max-width:26.875rem}.rj-editor-equation-ribbon-group--structures{flex:26.25rem}.rj-editor-equation-tools{align-items:center;gap:.375rem;display:inline-flex}.rj-editor-equation-primary{flex-direction:column;gap:.125rem;min-width:4.625rem!important;height:3.875rem!important;padding:.375rem .625rem!important}.rj-editor-equation-primary-icon{color:var(--rj-color-brand,#3167c8);font-family:Georgia,Times New Roman,serif;font-size:1.875rem;font-weight:700;line-height:1}.rj-editor-equation-mode-stack{gap:.25rem;display:grid}.rj-editor-equation-mode-stack button{min-width:4rem;height:1.75rem}.rj-editor-equation-symbol-palette{gap:.125rem;display:grid}.rj-editor-equation-symbol-row{gap:.125rem;display:flex}.rj-editor-equation-symbol-row button{border-radius:.1875rem;min-width:1.75rem;height:1.75rem;padding:0 .375rem;font-family:Georgia,Times New Roman,serif;font-size:1rem}.rj-editor-equation-structures{flex-wrap:wrap;align-items:center;gap:.375rem;display:flex}.rj-editor-equation-structure{flex-direction:column;gap:.25rem;min-width:5rem!important;height:3.875rem!important;padding:.375rem .625rem!important}.rj-editor-equation-structure small{color:var(--rj-editor-muted-text,#526070);align-items:center;gap:.125rem;font-family:system-ui,sans-serif;font-size:.625rem;font-weight:600;line-height:1;display:inline-flex}.rj-editor-equation-structure small svg{width:.75rem!important;height:.75rem!important}.rj-editor-equation-math-preview{justify-content:center;align-items:center;min-width:2.125rem;min-height:1.5rem;display:inline-flex}.rj-editor-equation-math-preview .rj-editor-equation-render{font-family:Georgia,Times New Roman,serif;font-size:1.25rem;font-weight:600}.rj-editor-equation-gallery{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);box-shadow:var(--rj-editor-floating-shadow,0 1rem 2.375rem #0f172a2e);scrollbar-width:thin;border-radius:.5rem;min-width:23.75rem;max-height:32.5rem;padding:.625rem;overflow:auto}.rj-editor-equation-gallery-title{color:var(--rj-editor-muted-text,#526070);margin-bottom:.5rem;font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:700}.rj-editor-equation-gallery-grid{grid-template-columns:repeat(3,minmax(6rem,1fr));gap:.5rem;display:grid}.rj-editor-equation-gallery-grid button{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:.375rem;flex-direction:column;justify-content:center;align-items:center;gap:.375rem;min-height:4.75rem;padding:.5rem;display:flex}.rj-editor-equation-gallery-grid button:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-equation-gallery-grid small{color:var(--rj-editor-muted-text,#526070);text-align:center;font-family:system-ui,sans-serif;font-size:.6875rem;font-weight:600;line-height:1.2}.rj-editor-equation-gallery-section{background:linear-gradient(180deg, var(--rj-editor-toolbar-bg,#f8fafc), var(--rj-editor-toolbar-button-bg,#fff));color:var(--rj-editor-muted-text,#526070);border-radius:.25rem;grid-column:1/-1;padding:.3125rem .375rem;font-size:.75rem;font-weight:700}.rj-editor-equation-gallery-grid .rj-editor-equation-math-preview{min-height:2.125rem}.rj-editor-equation-gallery-grid .rj-editor-equation-math-preview .rj-editor-equation-render{font-size:1.125rem}.rj-editor-toolbar-group{white-space:nowrap;flex-wrap:nowrap;flex:none;align-items:center;gap:.375rem;display:inline-flex}.rj-editor-toolbar-group button svg{min-width:1rem;min-height:1rem}.rj-editor-toolbar button{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:.5rem;justify-content:center;align-items:center;min-width:2.125rem;height:2.125rem;padding:0 .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1;display:inline-flex}.rj-editor-toolbar--clear-btn{color:var(--rj-editor-danger,#dc2626)!important}.rj-editor-toolbar--clear-btn svg path{stroke:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar button:hover:not(:disabled),.rj-editor-toolbar button.is-active,.rj-editor-toolbar select:hover,.rj-editor-toolbar input[type=color]:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-toolbar .rj-editor-toolbar--clear-btn:hover:not(:disabled){background:var(--rj-editor-danger-bg,#fee2e2);border-color:var(--rj-editor-danger-border,#fca5a5);color:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar input[type=color]{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;height:2.125rem}.rj-editor-toolbar-select{border-radius:.5rem;min-width:5.75rem;height:2.125rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1}.rj-editor-toolbar-select .ant-select-selector{font:inherit;align-items:center;min-height:2.125rem;display:flex;border-radius:.5rem!important}.rj-editor-toolbar-select .ant-select-selection-item,.rj-editor-toolbar-select .ant-select-selection-placeholder{font:inherit}.rj-editor-toolbar-select .ant-select-arrow{color:var(--rj-editor-muted-text,#526070);align-items:center;display:inline-flex}.rj-editor-toolbar-select .ant-select-suffix{align-items:center;width:1.25rem;height:1.25rem;display:inline-flex}.rj-editor-toolbar-select-font{min-width:9.25rem}.rj-editor-toolbar-select-crop{min-width:7.25rem}.rj-editor-image-width-input{width:5.25rem}.rj-editor-toolbar input[type=color]{cursor:pointer;width:2.375rem;padding:.1875rem}.rj-editor-toolbar button:disabled{cursor:not-allowed;opacity:.45}.rj-editor-color-button{min-width:2.625rem}.rj-editor-color-button svg{filter:drop-shadow(0 0 .0625rem #fff)!important}.rj-editor-text-color-mark{flex-direction:column;align-items:center;gap:.125rem;font-weight:700;line-height:1;display:inline-flex}.rj-editor-text-color-line{border-radius:62.4375rem;width:1.125rem;height:.1875rem;display:block}.rj-editor-background-color-mark{border:.0625rem solid var(--rj-editor-border,#d9dde5);border-radius:.25rem;justify-content:center;align-items:center;min-width:1.75rem;max-width:1.875rem;height:1.375rem;padding:0 .25rem;font-size:.75rem;font-weight:700;display:inline-flex}.rj-editor-background-color-mark.is-none{background:linear-gradient(135deg, transparent 45%, var(--rj-editor-focus-border,#7aa7f7) 47%, var(--rj-editor-focus-border,#7aa7f7) 53%, transparent 55%), var(--rj-editor-toolbar-button-bg,#fff)}.rj-editor-color-menu-item{color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;align-items:center;gap:.5rem;width:100%;min-width:7.5rem;padding:.125rem 0;display:flex}.rj-editor-spacing-menu-item{color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;width:100%;min-width:6rem;padding:.125rem 0}.rj-editor-color-menu-input{cursor:pointer;width:1.75rem;height:1.375rem;margin-left:auto;padding:0}.rj-editor-color-swatch,.rj-editor-color-none{border:.0625rem solid var(--rj-editor-border,#d9dde5);border-radius:.25rem;width:1.125rem;height:1.125rem;display:inline-flex}.rj-editor-color-none{background:linear-gradient(135deg, transparent 43%, #ef4444 46%, #ef4444 54%, transparent 57%), var(--rj-editor-toolbar-button-bg,#fff)}.rj-editor-toolbar button svg{width:1.125rem;height:1.125rem}.rj-editor-toolbar-divider{background:var(--rj-editor-border,#d9dde5);width:.0625rem;height:1.375rem;margin:0 .125rem}.rj-editor-table-icon span{border:.09375rem solid;border-radius:.125rem}.rj-editor-table-menu{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);box-shadow:var(--rj-editor-floating-shadow,0 .75rem 1.75rem #0f172a24);border-radius:.5rem;gap:.625rem;min-width:16.25rem;padding:.75rem;display:grid}.rj-editor-table-menu-title{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.875rem;font-weight:700;line-height:1.2}.rj-editor-table-grid{grid-template-columns:repeat(10,1.125rem);gap:.3125rem;display:grid}.rj-editor-table-grid button{background:var(--rj-editor-toolbar-bg,#f8fafc);border:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:.125rem;width:1.125rem;min-width:1.125rem;height:1.125rem;padding:0}.rj-editor-table-grid button:hover,.rj-editor-table-grid button.is-selected{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-table-menu-divider{background:var(--rj-editor-border,#d9dde5);height:.0625rem;margin:.125rem -.75rem}.rj-editor-table-menu-row{grid-template-columns:1fr 4.75rem;align-items:center;gap:.625rem;display:grid}.rj-editor-table-menu-row label{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:500;line-height:1.2}.rj-editor-footer{background:var(--rj-editor-toolbar-bg,#f8fafc);border-top:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-muted-text,#526070);align-items:center;gap:.75rem;min-height:2.125rem;padding:.375rem .75rem;font-size:.75rem;font-weight:500;line-height:1.2;display:flex;overflow:hidden}.rj-editor-footer-items{flex-wrap:wrap;align-items:center;gap:.375rem .875rem;width:100%;min-width:0;display:flex}.rj-editor-footer-item{white-space:nowrap;flex:none;align-items:center;gap:.25rem;display:inline-flex}.rj-editor-footer-item-value{color:var(--rj-editor-text,#111827);font-weight:600}.rj-editor-footer-spacer{flex:auto;min-width:.5rem}.rj-editor{border:.0625rem solid var(--rj-editor-border,#d9dde5);background:var(--rj-editor-bg,#fff);color:var(--rj-editor-text,#111827);text-align:left;border-radius:.5rem;transition:border-color .2s,box-shadow .2s;overflow:hidden}.rj-editor[data-rj-editor-theme=dark]{accent-color:var(--rj-color-brand,#b8b8b8)}.rj-editor[data-rj-editor-theme=dark] ::selection{color:#fff;background:#555}.rj-editor-hidden-file-input{display:none!important}.ant-form-item-has-error .rj-editor{border-color:var(--rj-editor-error-border,#ff4d4f);box-shadow:0 0 0 .125rem var(--rj-editor-error-shadow,#ff4d4f1a)}.ant-form-item-has-warning .rj-editor{border-color:var(--rj-editor-warning-border,#faad14);box-shadow:0 0 0 .125rem var(--rj-editor-warning-shadow,#faad141a)}.ant-form-item-has-error .rj-editor .rj-editor-toolbar-select .ant-select-selector,.ant-form-item-has-warning .rj-editor .rj-editor-toolbar-select .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-status-error .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-status-warning .ant-select-selector{border-color:var(--rj-editor-border,#d9dde5)!important;box-shadow:none!important}.ant-form-item-has-error .rj-editor .rj-editor-toolbar-select.ant-select-focused .ant-select-selector,.ant-form-item-has-warning .rj-editor .rj-editor-toolbar-select.ant-select-focused .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-focused.ant-select-status-error .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-focused.ant-select-status-warning .ant-select-selector{border-color:var(--rj-editor-focus-border,#7aa7f7)!important;box-shadow:0 0 0 .125rem var(--rj-editor-focus-ring,#7aa7f738)!important}.ant-form-item-has-error .rj-editor .rj-editor-code-block-language-select .ant-select-selector,.ant-form-item-has-warning .rj-editor .rj-editor-code-block-language-select .ant-select-selector,.rj-editor .rj-editor-code-block-language-select.ant-select-status-error .ant-select-selector,.rj-editor .rj-editor-code-block-language-select.ant-select-status-warning .ant-select-selector{border-color:var(--rj-editor-code-border,#34363a)!important;box-shadow:none!important}.rj-editor--fullscreen{z-index:1000;border-radius:0;flex-direction:column;display:flex;position:fixed;inset:0}.rj-editor-body{flex:auto;min-height:0;position:relative}.rj-editor-input{outline:none;min-height:13.75rem;padding:1.125rem}.rj-editor--fullscreen .rj-editor-input{height:100%;min-height:0;overflow:auto}.rj-editor-placeholder{color:var(--rj-editor-placeholder,#8a94a6);pointer-events:none;-webkit-user-select:none;user-select:none;position:absolute;top:1.125rem;left:1.125rem}.rj-editor-paragraph{margin:0 0 .75rem}.rj-editor-paragraph:last-child{margin-bottom:0}.rj-editor-text-bold{font-weight:700}.rj-editor-input code:not(.rj-editor-code-block){background:var(--rj-editor-inline-code-current-bg,var(--rj-editor-inline-code-bg,#2a2828));border:.0625rem solid var(--rj-editor-inline-code-border,#ffffff24);color:var(--rj-editor-inline-code-current-text,var(--rj-editor-inline-code-text,#ededed));white-space:pre-wrap;border-radius:.375rem;padding:.125rem .375rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.92em;line-height:1.35}.rj-editor-input a code:not(.rj-editor-code-block),.rj-editor-input code:not(.rj-editor-code-block) a{--rj-editor-inline-code-current-text:var(--rj-editor-link,#2563eb)}.rj-editor-input code:not(.rj-editor-code-block) .rj-editor-text-code{border-radius:inherit;color:inherit;font:inherit;line-height:inherit;white-space:inherit;background:0 0;border:0;padding:0}.rj-editor-input pre.rj-editor-code-block code{color:inherit;font:inherit;line-height:inherit;background:0 0;border:0;border-radius:0;padding:0}.rj-editor-code-block{background:var(--rj-editor-code-bg,#0b0c0e);border:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-text,#ededed);scrollbar-color:var(--rj-editor-code-border,#34363a) transparent;scrollbar-width:thin;tab-size:2;white-space:pre;border-radius:.5rem;outline:none;min-height:7rem;margin:.75rem 0;padding:3.625rem 1rem 1.125rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.8125rem;line-height:1.65;display:block;position:relative;overflow:auto}.rj-editor-code-block:before{background:var(--rj-editor-code-header-bg,#111214);border-bottom:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-muted,#a1a1aa);content:\">_ \" attr(data-rj-code-title);align-items:center;height:2.625rem;padding:0 .875rem;font-family:inherit;font-size:.75rem;display:flex;position:absolute;top:0;left:0;right:0}.rj-editor-code-block-actions{z-index:20;justify-content:space-between;align-items:center;gap:.625rem;max-width:calc(100% - 1rem);display:flex;position:absolute}.rj-editor-code-block-title-control{background:var(--rj-editor-code-header-bg,#111214);color:var(--rj-editor-code-muted,#a1a1aa);flex:auto;align-items:center;gap:.75rem;min-width:0;height:1.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.75rem;display:inline-flex}.rj-editor-code-block-title-control input{color:inherit;font:inherit;text-overflow:ellipsis;background:0 0;border:0;outline:0;flex:auto;min-width:0;padding:0}.rj-editor-code-block-title-control input:focus{color:var(--rj-editor-code-text,#ededed)}.rj-editor-code-block-action-controls{flex:none;justify-content:flex-end;align-items:center;gap:.3125rem;min-width:0;display:inline-flex}.rj-editor-code-block-language-select{flex:0 0 clamp(9rem,26vw,15.625rem);width:clamp(9rem,26vw,15.625rem);min-width:0}.rj-editor-code-block-language-select.ant-select .ant-select-selector{background-color:var(--rj-editor-code-header-bg,#111214)!important;border-color:var(--rj-editor-code-border,#34363a)!important;color:var(--rj-editor-code-text,#ededed)!important}.rj-editor-code-block-language-select .ant-select-selection-item,.rj-editor-code-block-language-select .ant-select-selection-search-input,.rj-editor-code-block-language-select .ant-select-arrow,.rj-editor-code-block-language-select .ant-select-suffix{color:var(--rj-editor-code-text,#ededed)!important}.rj-editor-code-block-language-popup{border:.0625rem solid var(--rj-editor-code-border,#34363a);background:var(--rj-editor-code-header-bg,#111214)!important}.rj-editor-code-block-language-popup .ant-select-item{color:var(--rj-editor-code-text,#ededed)!important}.rj-editor-code-block-language-popup .ant-select-item-option-active,.rj-editor-code-block-language-popup .ant-select-item-option-selected{background:#303030!important}.rj-editor-code-block-actions button{background:var(--rj-editor-code-header-bg,#111214);border:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-muted,#a1a1aa);cursor:pointer;border-radius:.375rem;flex:0 0 1.75rem;justify-content:center;align-items:center;height:1.75rem;padding:0;display:inline-flex}.rj-editor-code-block-actions button:hover,.rj-editor-code-block-actions button.is-copied{color:var(--rj-editor-code-text,#ededed);background:#303030;border-color:#787878}.rj-editor-code-block-actions button svg{width:1rem;height:1rem}.rj-editor-code-completion{z-index:25;background:#181818;border:.0625rem solid #34363a;border-radius:.5rem;gap:.125rem;min-width:11.25rem;max-height:14.375rem;padding:.25rem;display:grid;position:absolute;overflow:auto;box-shadow:0 .75rem 1.75rem #0000003d}.rj-editor-code-completion button{color:#ededed;cursor:pointer;text-align:left;white-space:nowrap;background:0 0;border:0;border-radius:.375rem;min-height:1.875rem;padding:.375rem .625rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.75rem;line-height:1.35}.rj-editor-code-completion button:hover,.rj-editor-code-completion button.is-active{color:#fff;background:#303030}.rj-editor-code-block-export{background:var(--rj-editor-code-bg,#0b0c0e);border:.0625rem solid var(--rj-editor-code-border,#34363a);border-radius:.5rem;max-width:100%;margin:.75rem 0;overflow:hidden}.rj-editor-code-block-export-header{background:var(--rj-editor-code-header-bg,#111214);border-bottom:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-muted,#a1a1aa);justify-content:space-between;align-items:center;height:2.625rem;padding:0 .5rem 0 .875rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.75rem;display:flex}.rj-editor-code-block-export-copy{color:var(--rj-editor-code-muted,#a1a1aa);cursor:pointer;background:0 0;border:.0625rem solid #0000;border-radius:.375rem;justify-content:center;align-items:center;width:1.75rem;height:1.75rem;padding:0;display:inline-flex}.rj-editor-code-block-export-copy:hover,.rj-editor-code-block-export-copy.is-copied{color:var(--rj-editor-code-text,#ededed);background:#303030;border-color:#787878}.rj-editor-code-block-export-copy svg{width:1rem;height:1rem}.rj-editor-code-block.rj-editor-code-block--exported{border:0;border-radius:0;min-height:4.375rem;margin:0;padding:1rem}.rj-editor-code-block.rj-editor-code-block--exported:before{content:none;display:none}.rj-editor-code-token-comment{color:var(--rj-editor-code-comment,#7f848e)}.rj-editor-code-token-atrule,.rj-editor-code-token-keyword,.rj-editor-code-token-important{color:var(--rj-editor-code-keyword,#c678dd)}.rj-editor-code-token-attr,.rj-editor-code-token-char,.rj-editor-code-token-inserted,.rj-editor-code-token-regex,.rj-editor-code-token-selector,.rj-editor-code-token-string{color:var(--rj-editor-code-string,#98c379)}.rj-editor-code-token-boolean,.rj-editor-code-token-constant,.rj-editor-code-token-number,.rj-editor-code-token-symbol{color:var(--rj-editor-code-number,#d19a66)}.rj-editor-code-token-class,.rj-editor-code-token-class-name,.rj-editor-code-token-function{color:var(--rj-editor-code-function,#61afef)}.rj-editor-code-token-builtin,.rj-editor-code-token-entity,.rj-editor-code-token-operator,.rj-editor-code-token-property,.rj-editor-code-token-punctuation,.rj-editor-code-token-url,.rj-editor-code-token-variable{color:var(--rj-editor-code-operator,#56b6c2)}.rj-editor-code-token-deleted,.rj-editor-code-token-tag{color:var(--rj-editor-code-tag,#e06c75)}.rj-editor-text-italic{font-style:italic}.rj-editor-text-strikethrough{text-decoration:line-through}.rj-editor-text-subscript{vertical-align:sub;font-size:.75em}.rj-editor-text-superscript{vertical-align:super;font-size:.75em}.rj-editor-text-underline{text-decoration:underline}.rj-editor-input a{color:var(--rj-editor-link,#2563eb);text-decoration:underline}.rj-editor-input hr{border:0;border-top:.0625rem solid var(--rj-editor-border,#d9dde5);margin:1rem 0}.rj-editor-equation-node{display:inline}.rj-editor-equation{cursor:pointer;scrollbar-width:thin;vertical-align:middle;border-radius:.375rem;min-width:0;max-width:100%;padding:.125rem .25rem;display:inline-flex;overflow-x:auto}.rj-editor-equation--block{justify-content:center;width:100%;margin:.625rem 0;padding:.5rem;display:flex;overflow-x:auto}.rj-editor-equation-editor{flex-direction:column;align-items:center;gap:.5rem;min-width:0;max-width:100%;display:inline-flex}.rj-editor-equation-editor input:not(.rj-editor-equation-slot-input){background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border:.0625rem solid var(--rj-editor-focus-border,#7aa7f7);color:var(--rj-editor-text,#111827);resize:none;text-align:center;border-radius:.25rem;outline:none;min-width:16.25rem;min-height:2.125rem;padding:.25rem .5rem;font-family:Georgia,Times New Roman,serif;font-size:1.125rem;font-weight:500;line-height:1.25}.rj-editor-equation-editor input::placeholder,.rj-editor-equation-content.is-empty{color:var(--rj-editor-placeholder,#8a94a6)}.rj-editor-equation-visual-editor{align-items:center;min-width:0;min-height:2.125rem;display:inline-flex}.rj-editor-equation-visual,.rj-editor-equation-render{vertical-align:middle;justify-content:center;align-items:center;gap:.25rem;min-width:0;max-width:100%;font-family:Georgia,Times New Roman,serif;font-size:1.25rem;font-style:italic;line-height:1.15;display:inline-flex}.rj-editor-equation-visual{min-height:2.125rem}.rj-editor-equation-render-slot{text-align:center;text-overflow:ellipsis;min-width:.625rem;max-width:8.75rem;display:inline-block;overflow:hidden}.rj-editor-equation-nested{align-items:center;min-width:0;display:inline-flex}.rj-editor-equation-insert-point{appearance:none;cursor:text;background:0 0;border:0;border-radius:.125rem;flex:0 0 .5rem;align-self:stretch;width:.5rem;min-height:1.5rem;margin:0 -.125rem;padding:0;display:inline-flex;position:relative}.rj-editor-equation-insert-point:after{background:var(--rj-editor-focus-border,#7aa7f7);content:\"\";opacity:0;border-radius:.125rem;width:.125rem;transition:opacity .12s;position:absolute;top:.1875rem;bottom:.1875rem;left:50%;transform:translate(-50%)}.rj-editor-equation-insert-point:hover:after,.rj-editor-equation-insert-point.is-active:after{opacity:1}.rj-editor-equation-slot-input{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border:.0625rem dashed var(--rj-editor-focus-border,#7aa7f7);color:var(--rj-editor-text,#111827);box-sizing:border-box;text-align:center;text-overflow:clip;border-radius:.25rem;outline:none;flex:none;width:auto;min-width:1.375rem;max-width:9.375rem;min-height:1.5rem;padding:.0625rem .3125rem;font-family:Georgia,Times New Roman,serif;font-size:1.125rem;font-style:italic;font-weight:600;line-height:1.2;overflow:hidden}.rj-editor-equation-editor .rj-editor-equation-slot-input{width:auto;min-width:1.375rem;min-height:1.5rem;padding:.0625rem .3125rem;font-size:1.125rem}.rj-editor-equation-slot-input:focus{box-shadow:0 0 0 .125rem var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-style:solid}.rj-editor-equation-slot-input::placeholder{color:var(--rj-editor-muted-text,#526070)}.rj-editor-equation-slot-input--limit,.rj-editor-equation-slot-input--script,.rj-editor-equation-slot-input--small,.rj-editor-equation-slot-input--root-index,.rj-editor-equation-editor .rj-editor-equation-slot-input--limit,.rj-editor-equation-editor .rj-editor-equation-slot-input--script,.rj-editor-equation-editor .rj-editor-equation-slot-input--small,.rj-editor-equation-editor .rj-editor-equation-slot-input--root-index{min-width:1.125rem;min-height:1.125rem;padding:.0625rem .25rem;font-size:.8125rem}.rj-editor-equation-slot-input--small{min-width:1.125rem}.rj-editor-equation-slot-input--matrix{min-width:1.375rem}.rj-editor-equation-visual--fraction,.rj-editor-equation-render--fraction{place-items:center;gap:.125rem;min-width:0;display:inline-grid}.rj-editor-equation-fraction-line,.rj-editor-equation-render-line{background:var(--rj-editor-text,#111827);width:100%;height:.125rem;display:block}.rj-editor-equation-visual--fraction-inline,.rj-editor-equation-render--fraction-inline,.rj-editor-equation-visual--row,.rj-editor-equation-render--row{flex-wrap:nowrap;align-items:center;gap:.125rem;min-width:0;display:inline-flex}.rj-editor-equation-visual--script,.rj-editor-equation-render--script{vertical-align:middle;align-items:center;gap:.125rem}.rj-editor-equation-script-stack,.rj-editor-equation-render-script-stack{place-items:center;gap:.0625rem;line-height:1;display:inline-grid}.rj-editor-equation-visual--script.has-superscript:not(.has-subscript) .rj-editor-equation-script-stack,.rj-editor-equation-render--script.has-superscript:not(.has-subscript) .rj-editor-equation-render-script-stack{transform:translateY(-.4375rem)}.rj-editor-equation-visual--script.has-subscript:not(.has-superscript) .rj-editor-equation-script-stack,.rj-editor-equation-render--script.has-subscript:not(.has-superscript) .rj-editor-equation-render-script-stack{transform:translateY(.4375rem)}.rj-editor-equation-visual--script.has-superscript.has-subscript .rj-editor-equation-script-stack,.rj-editor-equation-render--script.has-superscript.has-subscript .rj-editor-equation-render-script-stack{transform:translateY(-.0625rem)}.rj-editor-equation-render-script-stack{font-size:.68em}.rj-editor-equation-visual--root,.rj-editor-equation-render--root{align-items:flex-start;gap:0}.rj-editor-equation-root-symbol,.rj-editor-equation-render-root-symbol{font-size:1.875rem;font-style:normal;line-height:1}.rj-editor-equation-radicand,.rj-editor-equation-render-radicand{border-top:.125rem solid var(--rj-editor-text,#111827);margin-top:.125rem;padding:.125rem .25rem 0;display:inline-flex}.rj-editor-equation-slot-input--root-index,.rj-editor-equation-render-root-index{align-self:flex-start;margin-right:-.125rem}.rj-editor-equation-render-root-index{font-size:.62em}.rj-editor-equation-limits,.rj-editor-equation-render-limits{place-items:center;gap:.0625rem;line-height:1;display:inline-grid}.rj-editor-equation-render-limits span:first-child,.rj-editor-equation-render-limits span:last-child{font-size:.62em}.rj-editor-equation-large-symbol,.rj-editor-equation-render-large-symbol{font-size:2.125rem;font-style:normal;line-height:.9}.rj-editor-equation-function-name{font-style:normal;font-weight:600}.rj-editor-equation-bracket,.rj-editor-equation-render-bracket,.rj-editor-equation-matrix-bracket,.rj-editor-equation-render-matrix-bracket{font-size:2.125rem;font-style:normal;line-height:1}.rj-editor-equation-visual--accent,.rj-editor-equation-render--accent{justify-items:center;gap:0;display:inline-grid}.rj-editor-equation-accent-mark,.rj-editor-equation-render-accent-mark{font-size:1.125rem;line-height:.7}.rj-editor-equation-matrix-grid,.rj-editor-equation-render-matrix-grid{gap:.25rem .5rem;display:inline-grid}.rj-editor-equation-render-matrix-grid span{text-align:center;min-width:1.5rem}.rj-editor-equation.is-selected{outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:.125rem}.rj-editor-equation-content,.rj-editor-equation-content math{max-width:100%}.rj-editor-equation-content .katex-display{margin:0}.rj-editor-image-node{margin:.75rem 0;display:block}.rj-editor-youtube-node{clear:both;margin:1rem 0;display:block}.rj-editor-youtube{aspect-ratio:16/9;background:var(--rj-editor-toolbar-bg,#f8fafc);border:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:.5rem;width:100%;max-width:45rem;overflow:hidden}.rj-editor-youtube.is-selected{outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:.125rem}.rj-editor-youtube iframe{border:0;width:100%;height:100%;display:block}.rj-editor-image-frame{width:100%;display:flex;position:relative}.rj-editor-image-frame--wrap-square{width:auto;max-width:100%;display:block}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--left{float:left;margin:.25rem 1rem .625rem 0}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--right{float:right;margin:.25rem 0 .625rem 1rem}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--center,.rj-editor-image-frame--wrap-top-bottom{clear:both;width:100%;display:flex}.rj-editor-image-frame--left{justify-content:flex-start}.rj-editor-image-frame--center{justify-content:center}.rj-editor-image-frame--right{justify-content:flex-end}.rj-editor-image{width:100%;max-width:100%;height:auto;display:block}.rj-editor-image-box{transform-origin:50%;flex-direction:column;display:inline-flex;position:relative}.rj-editor-image-rotator{transform:rotate(var(--rj-image-rotation,0deg));transform-origin:50%;width:100%;display:block}.rj-editor-image-box.is-quarter-turn{display:block}.rj-editor-image-box.is-quarter-turn .rj-editor-image-rotator{transform:translate(-50%, -50%) rotate(var(--rj-image-rotation,0deg));position:absolute;top:50%;left:50%}.rj-editor-image-box.is-quarter-turn .rj-editor-image-link,.rj-editor-image-box.is-quarter-turn .rj-editor-image{width:100%;max-width:none;height:100%}.rj-editor-image-box.is-quarter-turn .rj-editor-image-caption{width:100%;position:absolute;top:100%;left:0}.rj-editor-image-box.has-border .rj-editor-image{border:.0625rem solid var(--rj-editor-image-border,#94a3b8)}.rj-editor-image-box.has-shadow .rj-editor-image{box-shadow:var(--rj-editor-image-shadow,0 .875rem 2rem #0f172a2e)}.rj-editor-image-link{display:block}.rj-editor-image-caption{color:var(--rj-editor-muted-text,#64748b);text-align:center;margin-top:.375rem;font-family:system-ui,sans-serif;font-size:.75rem;font-weight:500;line-height:1.35;display:block}.rj-editor-image-frame.is-selected .rj-editor-image-box{outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:.125rem}.rj-editor-image-floating-toolbar{background:var(--rj-editor-toolbar-bg,#f8fafc);border:.0625rem solid var(--rj-editor-border,#d9dde5);box-shadow:var(--rj-editor-floating-shadow,0 .75rem 1.75rem #0f172a24);z-index:1005;border-radius:.5rem;align-items:center;gap:.25rem;padding:.25rem;display:inline-flex;position:absolute}.rj-editor-image-floating-toolbar button{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:.375rem;justify-content:center;align-items:center;min-width:1.75rem;height:1.75rem;padding:0 .4375rem;font-family:system-ui,sans-serif;font-size:.75rem;font-weight:500;line-height:1;display:inline-flex}.rj-editor-image-floating-toolbar button svg{width:1.25rem;height:1.25rem}.rj-editor-image-floating-toolbar button:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-image-resize-handle{background:var(--rj-editor-focus-border,#7aa7f7);border:.125rem solid var(--rj-editor-bg,#fff);touch-action:none;z-index:2;border-radius:62.4375rem;width:.75rem;height:.75rem;position:absolute;transform:translate(-50%,-50%)}.rj-editor-image-resize-handle--left{cursor:ew-resize;top:50%;left:0}.rj-editor-image-resize-handle--right{cursor:ew-resize;top:50%;left:100%}.rj-editor-image-resize-handle--top{cursor:ns-resize;top:0;left:50%}.rj-editor-image-resize-handle--bottom{cursor:ns-resize;top:100%;left:50%}.rj-editor-image-resize-handle--top-left{cursor:nwse-resize;top:0;left:0}.rj-editor-image-resize-handle--top-right{cursor:nesw-resize;top:0;left:100%}.rj-editor-image-resize-handle--bottom-right{cursor:nwse-resize;top:100%;left:100%}.rj-editor-image-resize-handle--bottom-left{cursor:nesw-resize;top:100%;left:0}.rj-editor-table-scrollable-wrapper{max-width:100%;margin:.75rem 0;overflow-x:auto}.rj-editor-table{border:.0625rem solid var(--rj-editor-table-border,#cbd5e1);border-collapse:separate;border-spacing:0;table-layout:fixed;border-radius:.75rem;width:100%;overflow:hidden}.rj-editor-table-cell,.rj-editor-table-cell-header{border:0;border-bottom:.0625rem solid var(--rj-editor-table-border,#cbd5e1);border-right:.0625rem solid var(--rj-editor-table-border,#cbd5e1);box-sizing:border-box;vertical-align:top;min-width:5rem;height:2rem;padding:.5rem .625rem}.rj-editor-table-row:last-child .rj-editor-table-cell,.rj-editor-table-row:last-child .rj-editor-table-cell-header,.rj-editor-table tr:last-child .rj-editor-table-cell,.rj-editor-table tr:last-child .rj-editor-table-cell-header{border-bottom:0}.rj-editor-table-cell:last-child,.rj-editor-table-cell-header:last-child{border-right:0}.rj-editor-table tr:first-child .rj-editor-table-cell:first-child,.rj-editor-table tr:first-child .rj-editor-table-cell-header:first-child{border-top-left-radius:.75rem}.rj-editor-table tr:first-child .rj-editor-table-cell:last-child,.rj-editor-table tr:first-child .rj-editor-table-cell-header:last-child{border-top-right-radius:.75rem}.rj-editor-table tr:last-child .rj-editor-table-cell:first-child,.rj-editor-table tr:last-child .rj-editor-table-cell-header:first-child{border-bottom-left-radius:.75rem}.rj-editor-table tr:last-child .rj-editor-table-cell:last-child,.rj-editor-table tr:last-child .rj-editor-table-cell-header:last-child{border-bottom-right-radius:.75rem}.rj-editor-table-cell .rj-editor-paragraph,.rj-editor-table-cell-header .rj-editor-paragraph{min-height:1.25rem;margin:0;line-height:1.25rem}.rj-editor-table-cell-header{background:var(--rj-editor-table-header-bg,#f1f5f9);font-weight:700}.rj-editor-table-cell-selected{background:var(--rj-editor-table-selected-bg,#eaf2ff);outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:-.125rem}.rj-editor-list-ol,.rj-editor-list-ul{margin:0 0 .75rem 1.5rem;padding:0}.rj-editor-list-item{margin:.25rem 0}\n/*$vite$:1*/";
|
|
2
|
+
const RJ_EDITOR_CSS = ":root{--rj-color-text:#111827;--rj-color-muted:#526070;--rj-color-subtle:#8a94a6;--rj-color-page-bg:#f5f7fb;--rj-color-surface:#fff;--rj-color-surface-soft:#f8fafc;--rj-color-border:#d9dde5;--rj-color-brand:#3167c8;--rj-color-brand-strong:#1f4f9a;--rj-color-brand-soft:#eef4ff;--rj-color-brand-tint:#eaf2ff;--rj-color-link:#2563eb;--rj-color-focus:#7aa7f7;--rj-color-table-border:#94a3b86b;--rj-color-table-header-bg:#94a3b829;--rj-color-image-border:#94a3b8;--rj-shadow-image:0 .875rem 2rem #0f172a2e;--rj-color-inline-code-bg:#2a2828;--rj-color-inline-code-text:#ededed;--rj-color-inline-code-border:#ffffff24;--rj-color-code-bg:#0b0c0e;--rj-color-code-header-bg:#111214;--rj-color-code-border:#34363a;--rj-color-code-text:#ededed;--rj-color-code-muted:#a1a1aa;--rj-color-code-keyword:#c678dd;--rj-color-code-string:#98c379;--rj-color-code-number:#d19a66;--rj-color-code-comment:#7f848e;--rj-color-code-function:#61afef;--rj-color-code-operator:#56b6c2;--rj-color-code-tag:#e06c75;--rj-color-danger:#dc2626;--rj-color-danger-soft:#fce1e13f;--rj-color-danger-border:#fca5a5;--rj-color-inverse-bg:#101827;--rj-color-inverse-text:#dbeafe;--rj-color-white:#fff;--rj-editor-bg:var(--rj-color-surface);--rj-editor-border:var(--rj-color-border);--rj-editor-text:var(--rj-color-text);--rj-editor-placeholder:var(--rj-color-subtle);--rj-editor-toolbar-bg:var(--rj-color-surface-soft);--rj-editor-toolbar-button-bg:var(--rj-color-surface);--rj-editor-toolbar-button-active-bg:var(--rj-color-brand-tint);--rj-editor-link:var(--rj-color-link);--rj-editor-focus-border:var(--rj-color-focus);--rj-editor-table-border:var(--rj-color-table-border);--rj-editor-table-header-bg:var(--rj-color-table-header-bg);--rj-editor-table-selected-bg:var(--rj-color-brand-tint);--rj-editor-image-border:var(--rj-color-image-border);--rj-editor-image-shadow:var(--rj-shadow-image);--rj-editor-inline-code-bg:var(--rj-color-inline-code-bg);--rj-editor-inline-code-text:var(--rj-color-inline-code-text);--rj-editor-inline-code-border:var(--rj-color-inline-code-border);--rj-editor-code-bg:var(--rj-color-code-bg);--rj-editor-code-header-bg:var(--rj-color-code-header-bg);--rj-editor-code-border:var(--rj-color-code-border);--rj-editor-code-text:var(--rj-color-code-text);--rj-editor-code-muted:var(--rj-color-code-muted);--rj-editor-code-keyword:var(--rj-color-code-keyword);--rj-editor-code-string:var(--rj-color-code-string);--rj-editor-code-number:var(--rj-color-code-number);--rj-editor-code-comment:var(--rj-color-code-comment);--rj-editor-code-function:var(--rj-color-code-function);--rj-editor-code-operator:var(--rj-color-code-operator);--rj-editor-code-tag:var(--rj-color-code-tag);--rj-editor-muted-text:var(--rj-color-muted);--rj-editor-danger:var(--rj-color-danger);--rj-editor-danger-bg:var(--rj-color-danger-soft);--rj-editor-danger-border:var(--rj-color-danger-border);--rj-editor-focus-ring:#7aa7f738;--rj-editor-floating-shadow:0 .75rem 1.75rem #0f172a24;--rj-editor-modal-overlay:#0f172a6b;--rj-editor-modal-shadow:0 1.5rem 4rem #0f172a38;color:var(--rj-color-text);background:var(--rj-color-page-bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:1rem;line-height:1.5}[data-rj-editor-theme=light]{--rj-color-text:#111827;--rj-color-muted:#526070;--rj-color-subtle:#8a94a6;--rj-color-page-bg:#f5f7fb;--rj-color-surface:#fff;--rj-color-surface-soft:#f8fafc;--rj-color-border:#d9dde5;--rj-color-brand:#3167c8;--rj-color-brand-strong:#1f4f9a;--rj-color-brand-soft:#eef4ff;--rj-color-brand-tint:#eaf2ff;--rj-color-link:#2563eb;--rj-color-focus:#7aa7f7;--rj-color-table-border:#94a3b86b;--rj-color-table-header-bg:#94a3b829;--rj-color-image-border:#94a3b8;--rj-shadow-image:0 .875rem 2rem #0f172a2e;--rj-color-inline-code-bg:#2a2828;--rj-color-inline-code-text:#ededed;--rj-color-inline-code-border:#ffffff24;--rj-color-code-bg:#0b0c0e;--rj-color-code-header-bg:#111214;--rj-color-code-border:#34363a;--rj-color-code-text:#ededed;--rj-color-code-muted:#a1a1aa;--rj-color-code-keyword:#c678dd;--rj-color-code-string:#98c379;--rj-color-code-number:#d19a66;--rj-color-code-comment:#7f848e;--rj-color-code-function:#61afef;--rj-color-code-operator:#56b6c2;--rj-color-code-tag:#e06c75;--rj-color-danger:#dc2626;--rj-color-danger-soft:#fce1e13f;--rj-color-danger-border:#fca5a5;--rj-color-inverse-bg:#101827;--rj-color-inverse-text:#dbeafe;--rj-color-white:#fff;--rj-editor-bg:var(--rj-color-surface);--rj-editor-border:var(--rj-color-border);--rj-editor-text:var(--rj-color-text);--rj-editor-placeholder:var(--rj-color-subtle);--rj-editor-toolbar-bg:var(--rj-color-surface-soft);--rj-editor-toolbar-button-bg:var(--rj-color-surface);--rj-editor-toolbar-button-active-bg:var(--rj-color-brand-tint);--rj-editor-link:var(--rj-color-link);--rj-editor-focus-border:var(--rj-color-focus);--rj-editor-table-border:var(--rj-color-table-border);--rj-editor-table-header-bg:var(--rj-color-table-header-bg);--rj-editor-table-selected-bg:var(--rj-color-brand-tint);--rj-editor-image-border:var(--rj-color-image-border);--rj-editor-image-shadow:var(--rj-shadow-image);--rj-editor-inline-code-bg:var(--rj-color-inline-code-bg);--rj-editor-inline-code-text:var(--rj-color-inline-code-text);--rj-editor-inline-code-border:var(--rj-color-inline-code-border);--rj-editor-code-bg:var(--rj-color-code-bg);--rj-editor-code-header-bg:var(--rj-color-code-header-bg);--rj-editor-code-border:var(--rj-color-code-border);--rj-editor-code-text:var(--rj-color-code-text);--rj-editor-code-muted:var(--rj-color-code-muted);--rj-editor-code-keyword:var(--rj-color-code-keyword);--rj-editor-code-string:var(--rj-color-code-string);--rj-editor-code-number:var(--rj-color-code-number);--rj-editor-code-comment:var(--rj-color-code-comment);--rj-editor-code-function:var(--rj-color-code-function);--rj-editor-code-operator:var(--rj-color-code-operator);--rj-editor-code-tag:var(--rj-color-code-tag);--rj-editor-muted-text:var(--rj-color-muted);--rj-editor-danger:var(--rj-color-danger);--rj-editor-danger-bg:var(--rj-color-danger-soft);--rj-editor-danger-border:var(--rj-color-danger-border);--rj-editor-focus-ring:#7aa7f738;--rj-editor-floating-shadow:0 .75rem 1.75rem #0f172a24;--rj-editor-modal-overlay:#0f172a6b;--rj-editor-modal-shadow:0 1.5rem 4rem #0f172a38;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}[data-rj-editor-theme=dark]{--rj-color-text:#ededed;--rj-color-muted:#b0b0b0;--rj-color-subtle:#898989;--rj-color-page-bg:#151515;--rj-color-surface:#1b1b1b;--rj-color-surface-soft:#232323;--rj-color-border:#414141;--rj-color-brand:#b8b8b8;--rj-color-brand-strong:#d4d4d4;--rj-color-brand-soft:#292929;--rj-color-brand-tint:#303030;--rj-color-link:#d0d0d0;--rj-color-focus:#a8a8a8;--rj-color-table-border:#94a3b86b;--rj-color-table-header-bg:#94a3b829;--rj-color-image-border:#686868;--rj-shadow-image:0 .875rem 2rem #00000061;--rj-color-inline-code-bg:#101010;--rj-color-inline-code-text:#ededed;--rj-color-inline-code-border:#ffffff29;--rj-color-code-bg:#0b0b0b;--rj-color-code-header-bg:#141414;--rj-color-code-border:#404040;--rj-color-code-text:#ededed;--rj-color-code-muted:#949494;--rj-color-code-keyword:#d7d7d7;--rj-color-code-string:#b8b8b8;--rj-color-code-number:#c9c9c9;--rj-color-code-comment:#777;--rj-color-code-function:#e1e1e1;--rj-color-code-operator:#a6a6a6;--rj-color-code-tag:#c2c2c2;--rj-color-danger:#f87171;--rj-color-danger-soft:#f871711f;--rj-color-danger-border:#985050;--rj-color-inverse-bg:#ededed;--rj-color-inverse-text:#1b1b1b;--rj-color-white:#fff;--rj-editor-bg:var(--rj-color-surface);--rj-editor-border:var(--rj-color-border);--rj-editor-text:var(--rj-color-text);--rj-editor-placeholder:var(--rj-color-subtle);--rj-editor-toolbar-bg:var(--rj-color-surface-soft);--rj-editor-toolbar-button-bg:var(--rj-color-surface);--rj-editor-toolbar-button-active-bg:var(--rj-color-brand-tint);--rj-editor-link:var(--rj-color-link);--rj-editor-focus-border:var(--rj-color-focus);--rj-editor-table-border:var(--rj-color-table-border);--rj-editor-table-header-bg:var(--rj-color-table-header-bg);--rj-editor-table-selected-bg:var(--rj-color-brand-tint);--rj-editor-image-border:var(--rj-color-image-border);--rj-editor-image-shadow:var(--rj-shadow-image);--rj-editor-inline-code-bg:var(--rj-color-inline-code-bg);--rj-editor-inline-code-text:var(--rj-color-inline-code-text);--rj-editor-inline-code-border:var(--rj-color-inline-code-border);--rj-editor-code-bg:var(--rj-color-code-bg);--rj-editor-code-header-bg:var(--rj-color-code-header-bg);--rj-editor-code-border:var(--rj-color-code-border);--rj-editor-code-text:var(--rj-color-code-text);--rj-editor-code-muted:var(--rj-color-code-muted);--rj-editor-code-keyword:var(--rj-color-code-keyword);--rj-editor-code-string:var(--rj-color-code-string);--rj-editor-code-number:var(--rj-color-code-number);--rj-editor-code-comment:var(--rj-color-code-comment);--rj-editor-code-function:var(--rj-color-code-function);--rj-editor-code-operator:var(--rj-color-code-operator);--rj-editor-code-tag:var(--rj-color-code-tag);--rj-editor-muted-text:var(--rj-color-muted);--rj-editor-danger:var(--rj-color-danger);--rj-editor-danger-bg:var(--rj-color-danger-soft);--rj-editor-danger-border:var(--rj-color-danger-border);--rj-editor-focus-ring:#bebebe33;--rj-editor-floating-shadow:0 .75rem 1.75rem #00000061;--rj-editor-modal-overlay:#00000094;--rj-editor-modal-shadow:0 1.5rem 4rem #0000007a;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}._wrapper_se0k7_1{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.375rem;align-items:center;gap:.125rem;width:100%;height:2.125rem;padding:0 .5rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1;display:inline-flex}._wrapper_se0k7_1:focus-within{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .125rem #7aa7f72e}._wrapper_se0k7_1._disabled_se0k7_23{cursor:not-allowed;opacity:.55}._affix_se0k7_28{color:var(--rj-editor-muted-text,#526070);cursor:text;font:inherit;-webkit-user-select:none;user-select:none;flex:none}._affix_se0k7_28 svg{width:1rem!important;height:1rem!important}._affix_se0k7_28 svg path{stroke:var(--rj-editor-muted-text,#526070)}._input_se0k7_43{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.375rem;outline:none;width:100%;height:2.125rem;padding:0 .5rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1}._inputAffix_se0k7_58{box-shadow:none;background:0 0;border:0;border-radius:0;flex:auto;width:100%;min-width:0;height:100%;padding:0}._input_se0k7_43:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .125rem #7aa7f72e}._inputAffix_se0k7_58:focus{box-shadow:none;border-color:#0000}._input_se0k7_43:disabled{cursor:not-allowed;opacity:.55}._overlay_qjax1_1{background:var(--rj-editor-modal-overlay,#0f172a6b);z-index:1200;justify-content:center;align-items:center;padding:1.5rem;display:flex;position:fixed;inset:0}._modal_qjax1_12{background:var(--rj-editor-bg,#fff);box-shadow:var(--rj-editor-modal-shadow,0 1.5rem 4rem #0f172a38);color:var(--rj-editor-text,#111827);min-width:min(26.25rem,100vw - 3rem);max-width:calc(100vw - 3rem);max-height:min(45rem,100vh - 3rem);width:var(--rj-modal-width,26.25rem);border-radius:.5rem;overflow:hidden}._header_qjax1_24{border-bottom:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:move;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;padding:.875rem 1.125rem;display:flex}._title_qjax1_34{margin:0;font-family:system-ui,sans-serif;font-size:1rem;font-weight:700;line-height:1.3}._closeButton_qjax1_42{color:var(--rj-editor-muted-text,#526070);cursor:pointer;cursor:pointer;background:0 0;border:0;border-radius:.375rem;justify-content:center;align-items:center;width:1.875rem;height:1.875rem;padding:0;display:inline-flex}._closeButton_qjax1_42:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);color:var(--rj-editor-text,#111827)}._body_qjax1_65{max-height:calc(100vh - 11.375rem);padding:1.125rem;overflow:auto}._footer_qjax1_71{border-top:.0625rem solid var(--rj-editor-border,#d9dde5);justify-content:flex-end;align-items:center;gap:.5rem;padding:.75rem 1.125rem;display:flex}._button_qjax1_80{border:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:.5rem;justify-content:center;align-items:center;min-width:4.75rem;height:2.125rem;padding:0 .875rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:600;line-height:1;display:inline-flex}._cancelButton_qjax1_96{background:var(--rj-editor-toolbar-button-bg,#fff);color:var(--rj-editor-text,#111827)}._cancelButton_qjax1_96:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}._okButton_qjax1_106{background:var(--rj-color-brand,#3167c8);border-color:var(--rj-color-brand,#3167c8);color:var(--rj-color-white,#fff)}._okButton_qjax1_106:hover{background:var(--rj-color-brand-strong,#1f4f9a);border-color:var(--rj-color-brand-strong,#1f4f9a)}._button_qjax1_80:disabled{cursor:not-allowed;opacity:.5}.rj-editor-image-border-radius-input{width:4.375rem}.rj-editor-image-edit-form{gap:.5rem;display:grid}.rj-editor-image-edit-form label{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.25}.rj-editor-image-edit-form input,.rj-editor-image-edit-form textarea{background:var(--rj-editor-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;outline:none;width:100%;padding:.5625rem .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1.35}.rj-editor-image-edit-form input{height:2.375rem}.rj-editor-image-edit-form textarea{resize:vertical;min-height:6rem}.rj-editor-image-edit-form input:focus,.rj-editor-image-edit-form textarea:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .1875rem var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-link-form{gap:.75rem;display:grid}.rj-editor-link-field{gap:.375rem;display:grid}.rj-editor-link-field label,.rj-editor-link-checkbox{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.25}.rj-editor-link-field input{background:var(--rj-editor-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;outline:none;height:2.25rem;padding:0 .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1.35}.rj-editor-link-field input:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .1875rem var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-link-checkbox{align-items:center;gap:.5rem;width:fit-content;display:inline-flex}.rj-editor-link-checkbox input{accent-color:var(--rj-color-brand,#3167c8);width:1rem;height:1rem}.rj-editor-youtube-form{gap:.75rem;display:grid}.rj-editor-youtube-field{gap:.375rem;display:grid}.rj-editor-youtube-field label{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.25}.rj-editor-youtube-field input{background:var(--rj-editor-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;outline:none;width:100%;height:2.375rem;padding:.5625rem .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1.35}.rj-editor-youtube-field input:focus{border-color:var(--rj-editor-focus-border,#7aa7f7);box-shadow:0 0 0 .1875rem var(--rj-editor-focus-ring,#7aa7f738)}.rj-editor-youtube-error{color:var(--rj-editor-danger,#dc2626);margin:0;font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:600;line-height:1.35}.rj-editor-toolbar{background:var(--rj-editor-toolbar-bg,#f8fafc);border-bottom:.0625rem solid var(--rj-editor-border,#d9dde5);flex-direction:column;display:flex}.rj-editor-toolbar-tabs{border-bottom:.0625rem solid var(--rj-editor-border,#d9dde5);justify-content:space-between;align-items:center;gap:.25rem;padding:.375rem .5rem;display:flex}.rj-editor-toolbar-tabs-list{flex-wrap:wrap;align-items:center;gap:.25rem;display:flex}.rj-editor-toolbar-tabs-list button{background:0 0;border:.0625rem solid #0000;border-bottom:0;border-radius:.5rem .5rem 0 0;min-width:auto;height:2rem;padding:0 .875rem}.rj-editor-toolbar-tabs-list button:hover,.rj-editor-toolbar-tabs-list button.is-active{background:var(--rj-editor-toolbar-button-bg,#fff);border-color:var(--rj-editor-border,#d9dde5)}.rj-editor-toolbar-fullscreen{flex:none}.rj-editor-toolbar-panel{flex-wrap:wrap;align-items:center;gap:.375rem;min-height:3.125rem;padding:.5rem;display:flex}.rj-editor-toolbar-panel--home,.rj-editor-toolbar-panel--image{flex-flow:column;align-items:stretch;gap:.5rem}.rj-editor-toolbar-row{flex-wrap:wrap;flex:none;align-items:center;gap:.375rem;padding-bottom:.0625rem;display:flex}.rj-editor-equation-toolbar{flex-flow:wrap;align-items:stretch}.rj-editor-equation-ribbon{flex-wrap:wrap;align-items:stretch;gap:.5rem;width:100%;display:flex}.rj-editor-equation-ribbon-group{flex:none;align-items:center;min-width:0;display:inline-flex}.rj-editor-equation-ribbon-group--symbols{max-width:26.875rem}.rj-editor-equation-ribbon-group--structures{flex:26.25rem}.rj-editor-equation-tools{align-items:center;gap:.375rem;display:inline-flex}.rj-editor-equation-primary{flex-direction:column;gap:.125rem;min-width:4.625rem!important;height:3.875rem!important;padding:.375rem .625rem!important}.rj-editor-equation-primary-icon{color:var(--rj-color-brand,#3167c8);font-family:Georgia,Times New Roman,serif;font-size:1.875rem;font-weight:700;line-height:1}.rj-editor-equation-mode-stack{gap:.25rem;display:grid}.rj-editor-equation-mode-stack button{min-width:4rem;height:1.75rem}.rj-editor-equation-symbol-palette{gap:.125rem;display:grid}.rj-editor-equation-symbol-row{gap:.125rem;display:flex}.rj-editor-equation-symbol-row button{border-radius:.1875rem;min-width:1.75rem;height:1.75rem;padding:0 .375rem;font-family:Georgia,Times New Roman,serif;font-size:1rem}.rj-editor-equation-structures{flex-wrap:wrap;align-items:center;gap:.375rem;display:flex}.rj-editor-equation-structure{flex-direction:column;gap:.25rem;min-width:5rem!important;height:3.875rem!important;padding:.375rem .625rem!important}.rj-editor-equation-structure small{color:var(--rj-editor-muted-text,#526070);align-items:center;gap:.125rem;font-family:system-ui,sans-serif;font-size:.625rem;font-weight:600;line-height:1;display:inline-flex}.rj-editor-equation-structure small svg{width:.75rem!important;height:.75rem!important}.rj-editor-equation-math-preview{justify-content:center;align-items:center;min-width:2.125rem;min-height:1.5rem;display:inline-flex}.rj-editor-equation-math-preview .rj-editor-equation-render{font-family:Georgia,Times New Roman,serif;font-size:1.25rem;font-weight:600}.rj-editor-equation-gallery{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);box-shadow:var(--rj-editor-floating-shadow,0 1rem 2.375rem #0f172a2e);scrollbar-width:thin;border-radius:.5rem;min-width:23.75rem;max-height:32.5rem;padding:.625rem;overflow:auto}.rj-editor-equation-gallery-title{color:var(--rj-editor-muted-text,#526070);margin-bottom:.5rem;font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:700}.rj-editor-equation-gallery-grid{grid-template-columns:repeat(3,minmax(6rem,1fr));gap:.5rem;display:grid}.rj-editor-equation-gallery-grid button{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:.375rem;flex-direction:column;justify-content:center;align-items:center;gap:.375rem;min-height:4.75rem;padding:.5rem;display:flex}.rj-editor-equation-gallery-grid button:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-equation-gallery-grid small{color:var(--rj-editor-muted-text,#526070);text-align:center;font-family:system-ui,sans-serif;font-size:.6875rem;font-weight:600;line-height:1.2}.rj-editor-equation-gallery-section{background:linear-gradient(180deg, var(--rj-editor-toolbar-bg,#f8fafc), var(--rj-editor-toolbar-button-bg,#fff));color:var(--rj-editor-muted-text,#526070);border-radius:.25rem;grid-column:1/-1;padding:.3125rem .375rem;font-size:.75rem;font-weight:700}.rj-editor-equation-gallery-grid .rj-editor-equation-math-preview{min-height:2.125rem}.rj-editor-equation-gallery-grid .rj-editor-equation-math-preview .rj-editor-equation-render{font-size:1.125rem}.rj-editor-toolbar-group{white-space:nowrap;flex-wrap:nowrap;flex:none;align-items:center;gap:.375rem;display:inline-flex}.rj-editor-toolbar-group button svg{min-width:1rem;min-height:1rem}.rj-editor-toolbar button{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:.5rem;justify-content:center;align-items:center;min-width:2.125rem;height:2.125rem;padding:0 .625rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1;display:inline-flex}.rj-editor-toolbar--clear-btn{color:var(--rj-editor-danger,#dc2626)!important}.rj-editor-toolbar--clear-btn svg path{stroke:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar button:hover:not(:disabled),.rj-editor-toolbar button.is-active,.rj-editor-toolbar select:hover,.rj-editor-toolbar input[type=color]:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-toolbar .rj-editor-toolbar--clear-btn:hover:not(:disabled){background:var(--rj-editor-danger-bg,#fee2e2);border-color:var(--rj-editor-danger-border,#fca5a5);color:var(--rj-editor-danger,#dc2626)}.rj-editor-toolbar input[type=color]{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);border-radius:.5rem;height:2.125rem}.rj-editor-toolbar-select{border-radius:.5rem;min-width:5.75rem;height:2.125rem;font-family:system-ui,sans-serif;font-size:.875rem;font-weight:500;line-height:1}.rj-editor-toolbar-select .ant-select-selector{font:inherit;align-items:center;min-height:2.125rem;display:flex;border-radius:.5rem!important}.rj-editor-toolbar-select .ant-select-selection-item,.rj-editor-toolbar-select .ant-select-selection-placeholder{font:inherit}.rj-editor-toolbar-select .ant-select-arrow{color:var(--rj-editor-muted-text,#526070);align-items:center;display:inline-flex}.rj-editor-toolbar-select .ant-select-suffix{align-items:center;width:1.25rem;height:1.25rem;display:inline-flex}.rj-editor-toolbar-select-font{min-width:9.25rem}.rj-editor-toolbar-select-crop{min-width:7.25rem}.rj-editor-image-width-input{width:5.25rem}.rj-editor-toolbar input[type=color]{cursor:pointer;width:2.375rem;padding:.1875rem}.rj-editor-toolbar button:disabled{cursor:not-allowed;opacity:.45}.rj-editor-color-button{min-width:2.625rem}.rj-editor-color-button svg{filter:drop-shadow(0 0 .0625rem #fff)!important}.rj-editor-text-color-mark{flex-direction:column;align-items:center;gap:.125rem;font-weight:700;line-height:1;display:inline-flex}.rj-editor-text-color-line{border-radius:62.4375rem;width:1.125rem;height:.1875rem;display:block}.rj-editor-background-color-mark{border:.0625rem solid var(--rj-editor-border,#d9dde5);border-radius:.25rem;justify-content:center;align-items:center;min-width:1.75rem;max-width:1.875rem;height:1.375rem;padding:0 .25rem;font-size:.75rem;font-weight:700;display:inline-flex}.rj-editor-background-color-mark.is-none{background:linear-gradient(135deg, transparent 45%, var(--rj-editor-focus-border,#7aa7f7) 47%, var(--rj-editor-focus-border,#7aa7f7) 53%, transparent 55%), var(--rj-editor-toolbar-button-bg,#fff)}.rj-editor-color-menu-item{color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;align-items:center;gap:.5rem;width:100%;min-width:7.5rem;padding:.125rem 0;display:flex}.rj-editor-spacing-menu-item{color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;width:100%;min-width:6rem;padding:.125rem 0}.rj-editor-color-menu-input{cursor:pointer;width:1.75rem;height:1.375rem;margin-left:auto;padding:0}.rj-editor-color-swatch,.rj-editor-color-none{border:.0625rem solid var(--rj-editor-border,#d9dde5);border-radius:.25rem;width:1.125rem;height:1.125rem;display:inline-flex}.rj-editor-color-none{background:linear-gradient(135deg, transparent 43%, #ef4444 46%, #ef4444 54%, transparent 57%), var(--rj-editor-toolbar-button-bg,#fff)}.rj-editor-toolbar button svg{width:1.125rem;height:1.125rem}.rj-editor-toolbar-divider{background:var(--rj-editor-border,#d9dde5);width:.0625rem;height:1.375rem;margin:0 .125rem}.rj-editor-table-icon span{border:.09375rem solid;border-radius:.125rem}.rj-editor-table-menu{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);box-shadow:var(--rj-editor-floating-shadow,0 .75rem 1.75rem #0f172a24);border-radius:.5rem;gap:.625rem;min-width:16.25rem;padding:.75rem;display:grid}.rj-editor-table-menu-title{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.875rem;font-weight:700;line-height:1.2}.rj-editor-table-grid{grid-template-columns:repeat(10,1.125rem);gap:.3125rem;display:grid}.rj-editor-table-grid button{background:var(--rj-editor-toolbar-bg,#f8fafc);border:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:.125rem;width:1.125rem;min-width:1.125rem;height:1.125rem;padding:0}.rj-editor-table-grid button:hover,.rj-editor-table-grid button.is-selected{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-table-menu-divider{background:var(--rj-editor-border,#d9dde5);height:.0625rem;margin:.125rem -.75rem}.rj-editor-table-menu-row{grid-template-columns:1fr 4.75rem;align-items:center;gap:.625rem;display:grid}.rj-editor-table-menu-row label{color:var(--rj-editor-text,#111827);font-family:system-ui,sans-serif;font-size:.8125rem;font-weight:500;line-height:1.2}.rj-editor-footer{background:var(--rj-editor-toolbar-bg,#f8fafc);border-top:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-muted-text,#526070);align-items:center;gap:.75rem;min-height:2.125rem;padding:.375rem .75rem;font-size:.75rem;font-weight:500;line-height:1.2;display:flex;overflow:hidden}.rj-editor-footer-items{flex-wrap:wrap;align-items:center;gap:.375rem .875rem;width:100%;min-width:0;display:flex}.rj-editor-footer-item{white-space:nowrap;flex:none;align-items:center;gap:.25rem;display:inline-flex}.rj-editor-footer-item-value{color:var(--rj-editor-text,#111827);font-weight:600}.rj-editor-footer-spacer{flex:auto;min-width:.5rem}.rj-editor{border:.0625rem solid var(--rj-editor-border,#d9dde5);background:var(--rj-editor-bg,#fff);color:var(--rj-editor-text,#111827);text-align:left;border-radius:.5rem;transition:border-color .2s,box-shadow .2s;overflow:hidden}.rj-editor[data-rj-editor-theme=dark]{accent-color:var(--rj-color-brand,#b8b8b8)}.rj-editor[data-rj-editor-theme=dark] ::selection{color:#fff;background:#555}.rj-editor-hidden-file-input{display:none!important}.ant-form-item-has-error .rj-editor{border-color:var(--rj-editor-error-border,#ff4d4f);box-shadow:0 0 0 .125rem var(--rj-editor-error-shadow,#ff4d4f1a)}.ant-form-item-has-warning .rj-editor{border-color:var(--rj-editor-warning-border,#faad14);box-shadow:0 0 0 .125rem var(--rj-editor-warning-shadow,#faad141a)}.ant-form-item-has-error .rj-editor .rj-editor-toolbar-select .ant-select-selector,.ant-form-item-has-warning .rj-editor .rj-editor-toolbar-select .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-status-error .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-status-warning .ant-select-selector{border-color:var(--rj-editor-border,#d9dde5)!important;box-shadow:none!important}.ant-form-item-has-error .rj-editor .rj-editor-toolbar-select.ant-select-focused .ant-select-selector,.ant-form-item-has-warning .rj-editor .rj-editor-toolbar-select.ant-select-focused .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-focused.ant-select-status-error .ant-select-selector,.rj-editor .rj-editor-toolbar-select.ant-select-focused.ant-select-status-warning .ant-select-selector{border-color:var(--rj-editor-focus-border,#7aa7f7)!important;box-shadow:0 0 0 .125rem var(--rj-editor-focus-ring,#7aa7f738)!important}.ant-form-item-has-error .rj-editor .rj-editor-code-block-language-select .ant-select-selector,.ant-form-item-has-warning .rj-editor .rj-editor-code-block-language-select .ant-select-selector,.rj-editor .rj-editor-code-block-language-select.ant-select-status-error .ant-select-selector,.rj-editor .rj-editor-code-block-language-select.ant-select-status-warning .ant-select-selector{border-color:var(--rj-editor-code-border,#34363a)!important;box-shadow:none!important}.rj-editor--fullscreen{z-index:1000;border-radius:0;flex-direction:column;display:flex;position:fixed;inset:0}.rj-editor-body{flex:auto;min-height:0;position:relative}.rj-editor-input{outline:none;min-height:13.75rem;padding:1.125rem}.rj-editor--fullscreen .rj-editor-input{height:100%;min-height:0;overflow:auto}.rj-editor-placeholder{color:var(--rj-editor-placeholder,#8a94a6);pointer-events:none;-webkit-user-select:none;user-select:none;position:absolute;top:1.125rem;left:1.125rem}.rj-editor-paragraph{margin:0 0 .75rem}.rj-editor-paragraph:last-child{margin-bottom:0}.rj-editor-text-bold{font-weight:700}.rj-editor-input code:not(.rj-editor-code-block){background:var(--rj-editor-inline-code-current-bg,var(--rj-editor-inline-code-bg,#2a2828));border:.0625rem solid var(--rj-editor-inline-code-border,#ffffff24);color:var(--rj-editor-inline-code-current-text,var(--rj-editor-inline-code-text,#ededed));white-space:pre-wrap;border-radius:.375rem;padding:.125rem .375rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.92em;line-height:1.35}.rj-editor-input a code:not(.rj-editor-code-block),.rj-editor-input code:not(.rj-editor-code-block) a{--rj-editor-inline-code-current-text:var(--rj-editor-link,#2563eb)}.rj-editor-input code:not(.rj-editor-code-block) .rj-editor-text-code{border-radius:inherit;color:inherit;font:inherit;line-height:inherit;white-space:inherit;background:0 0;border:0;padding:0}.rj-editor-input pre.rj-editor-code-block code{color:inherit;font:inherit;line-height:inherit;background:0 0;border:0;border-radius:0;padding:0}.rj-editor-code-block{background:var(--rj-editor-code-bg,#0b0c0e);border:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-text,#ededed);scrollbar-color:var(--rj-editor-code-border,#34363a) transparent;scrollbar-width:thin;tab-size:2;white-space:pre;border-radius:.5rem;outline:none;min-height:7rem;margin:.75rem 0;padding:3.625rem 1rem 1.125rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.8125rem;line-height:1.65;display:block;position:relative;overflow:auto}.rj-editor-code-block:before{background:var(--rj-editor-code-header-bg,#111214);border-bottom:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-muted,#a1a1aa);content:\">_ \" attr(data-rj-code-title);align-items:center;height:2.625rem;padding:0 .875rem;font-family:inherit;font-size:.75rem;display:flex;position:absolute;top:0;left:0;right:0}.rj-editor-code-block-actions{z-index:20;justify-content:space-between;align-items:center;gap:.625rem;max-width:calc(100% - 1rem);display:flex;position:absolute}.rj-editor-code-block-title-control{background:var(--rj-editor-code-header-bg,#111214);color:var(--rj-editor-code-muted,#a1a1aa);flex:auto;align-items:center;gap:.75rem;min-width:0;height:1.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.75rem;display:inline-flex}.rj-editor-code-block-title-control input{color:inherit;font:inherit;text-overflow:ellipsis;background:0 0;border:0;outline:0;flex:auto;min-width:0;padding:0}.rj-editor-code-block-title-control input:focus{color:var(--rj-editor-code-text,#ededed)}.rj-editor-code-block-action-controls{flex:none;justify-content:flex-end;align-items:center;gap:.3125rem;min-width:0;display:inline-flex}.rj-editor-code-block-language-select{flex:0 0 clamp(9rem,26vw,15.625rem);width:clamp(9rem,26vw,15.625rem);min-width:0}.rj-editor-code-block-language-select.ant-select .ant-select-selector{background-color:var(--rj-editor-code-header-bg,#111214)!important;border-color:var(--rj-editor-code-border,#34363a)!important;color:var(--rj-editor-code-text,#ededed)!important}.rj-editor-code-block-language-select .ant-select-selection-item,.rj-editor-code-block-language-select .ant-select-selection-search-input,.rj-editor-code-block-language-select .ant-select-arrow,.rj-editor-code-block-language-select .ant-select-suffix{color:var(--rj-editor-code-text,#ededed)!important}.rj-editor-code-block-language-popup{border:.0625rem solid var(--rj-editor-code-border,#34363a);background:var(--rj-editor-code-header-bg,#111214)!important}.rj-editor-code-block-language-popup .ant-select-item{color:var(--rj-editor-code-text,#ededed)!important}.rj-editor-code-block-language-popup .ant-select-item-option-active,.rj-editor-code-block-language-popup .ant-select-item-option-selected{background:#303030!important}.rj-editor-code-block-actions button{background:var(--rj-editor-code-header-bg,#111214);border:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-muted,#a1a1aa);cursor:pointer;border-radius:.375rem;flex:0 0 1.75rem;justify-content:center;align-items:center;height:1.75rem;padding:0;display:inline-flex}.rj-editor-code-block-actions button:hover,.rj-editor-code-block-actions button.is-copied{color:var(--rj-editor-code-text,#ededed);background:#303030;border-color:#787878}.rj-editor-code-block-actions button svg{width:1rem;height:1rem}.rj-editor-code-completion{z-index:25;background:#181818;border:.0625rem solid #34363a;border-radius:.5rem;gap:.125rem;min-width:11.25rem;max-height:14.375rem;padding:.25rem;display:grid;position:absolute;overflow:auto;box-shadow:0 .75rem 1.75rem #0000003d}.rj-editor-code-completion button{color:#ededed;cursor:pointer;text-align:left;white-space:nowrap;background:0 0;border:0;border-radius:.375rem;min-height:1.875rem;padding:.375rem .625rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.75rem;line-height:1.35}.rj-editor-code-completion button:hover,.rj-editor-code-completion button.is-active{color:#fff;background:#303030}.rj-editor-code-block-export{background:var(--rj-editor-code-bg,#0b0c0e);border:.0625rem solid var(--rj-editor-code-border,#34363a);border-radius:.5rem;max-width:100%;margin:.75rem 0;overflow:hidden}.rj-editor-code-block-export-header{background:var(--rj-editor-code-header-bg,#111214);border-bottom:.0625rem solid var(--rj-editor-code-border,#34363a);color:var(--rj-editor-code-muted,#a1a1aa);justify-content:space-between;align-items:center;height:2.625rem;padding:0 .5rem 0 .875rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:.75rem;display:flex}.rj-editor-code-block-export-copy{color:var(--rj-editor-code-muted,#a1a1aa);cursor:pointer;background:0 0;border:.0625rem solid #0000;border-radius:.375rem;justify-content:center;align-items:center;width:1.75rem;height:1.75rem;padding:0;display:inline-flex}.rj-editor-code-block-export-copy:hover,.rj-editor-code-block-export-copy.is-copied{color:var(--rj-editor-code-text,#ededed);background:#303030;border-color:#787878}.rj-editor-code-block-export-copy svg{width:1rem;height:1rem}.rj-editor-code-block.rj-editor-code-block--exported{border:0;border-radius:0;min-height:4.375rem;margin:0;padding:1rem}.rj-editor-code-block.rj-editor-code-block--exported:before{content:none;display:none}.rj-editor-code-token-comment{color:var(--rj-editor-code-comment,#7f848e)}.rj-editor-code-token-atrule,.rj-editor-code-token-keyword,.rj-editor-code-token-important{color:var(--rj-editor-code-keyword,#c678dd)}.rj-editor-code-token-attr,.rj-editor-code-token-char,.rj-editor-code-token-inserted,.rj-editor-code-token-regex,.rj-editor-code-token-selector,.rj-editor-code-token-string{color:var(--rj-editor-code-string,#98c379)}.rj-editor-code-token-boolean,.rj-editor-code-token-constant,.rj-editor-code-token-number,.rj-editor-code-token-symbol{color:var(--rj-editor-code-number,#d19a66)}.rj-editor-code-token-class,.rj-editor-code-token-class-name,.rj-editor-code-token-function{color:var(--rj-editor-code-function,#61afef)}.rj-editor-code-token-builtin,.rj-editor-code-token-entity,.rj-editor-code-token-operator,.rj-editor-code-token-property,.rj-editor-code-token-punctuation,.rj-editor-code-token-url,.rj-editor-code-token-variable{color:var(--rj-editor-code-operator,#56b6c2)}.rj-editor-code-token-deleted,.rj-editor-code-token-tag{color:var(--rj-editor-code-tag,#e06c75)}.rj-editor-text-italic{font-style:italic}.rj-editor-text-strikethrough{text-decoration:line-through}.rj-editor-text-subscript{vertical-align:sub;font-size:.75em}.rj-editor-text-superscript{vertical-align:super;font-size:.75em}.rj-editor-text-underline{text-decoration:underline}.rj-editor-input a{color:var(--rj-editor-link,#2563eb);text-decoration:underline}.rj-editor-input hr{border:0;border-top:.0625rem solid var(--rj-editor-border,#d9dde5);margin:1rem 0}.rj-editor-equation-node{display:inline}.rj-editor-equation{cursor:pointer;scrollbar-width:thin;vertical-align:middle;border-radius:.375rem;min-width:0;max-width:100%;padding:.125rem .25rem;display:inline-flex;overflow-x:auto}.rj-editor-equation--block{justify-content:center;width:100%;margin:.625rem 0;padding:.5rem;display:flex;overflow-x:auto}.rj-editor-equation-editor{flex-direction:column;align-items:center;gap:.5rem;min-width:0;max-width:100%;display:inline-flex}.rj-editor-equation-editor input:not(.rj-editor-equation-slot-input){background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border:.0625rem solid var(--rj-editor-focus-border,#7aa7f7);color:var(--rj-editor-text,#111827);resize:none;text-align:center;border-radius:.25rem;outline:none;min-width:16.25rem;min-height:2.125rem;padding:.25rem .5rem;font-family:Georgia,Times New Roman,serif;font-size:1.125rem;font-weight:500;line-height:1.25}.rj-editor-equation-editor input::placeholder,.rj-editor-equation-content.is-empty{color:var(--rj-editor-placeholder,#8a94a6)}.rj-editor-equation-visual-editor{align-items:center;min-width:0;min-height:2.125rem;display:inline-flex}.rj-editor-equation-visual,.rj-editor-equation-render{vertical-align:middle;justify-content:center;align-items:center;gap:.25rem;min-width:0;max-width:100%;font-family:Georgia,Times New Roman,serif;font-size:1.25rem;font-style:italic;line-height:1.15;display:inline-flex}.rj-editor-equation-visual{min-height:2.125rem}.rj-editor-equation-render-slot{text-align:center;text-overflow:ellipsis;min-width:.625rem;max-width:8.75rem;display:inline-block;overflow:hidden}.rj-editor-equation-nested{align-items:center;min-width:0;display:inline-flex}.rj-editor-equation-insert-point{appearance:none;cursor:text;background:0 0;border:0;border-radius:.125rem;flex:0 0 .5rem;align-self:stretch;width:.5rem;min-height:1.5rem;margin:0 -.125rem;padding:0;display:inline-flex;position:relative}.rj-editor-equation-insert-point:after{background:var(--rj-editor-focus-border,#7aa7f7);content:\"\";opacity:0;border-radius:.125rem;width:.125rem;transition:opacity .12s;position:absolute;top:.1875rem;bottom:.1875rem;left:50%;transform:translate(-50%)}.rj-editor-equation-insert-point:hover:after,.rj-editor-equation-insert-point.is-active:after{opacity:1}.rj-editor-equation-slot-input{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border:.0625rem dashed var(--rj-editor-focus-border,#7aa7f7);color:var(--rj-editor-text,#111827);box-sizing:border-box;text-align:center;text-overflow:clip;border-radius:.25rem;outline:none;flex:none;width:auto;min-width:1.375rem;max-width:9.375rem;min-height:1.5rem;padding:.0625rem .3125rem;font-family:Georgia,Times New Roman,serif;font-size:1.125rem;font-style:italic;font-weight:600;line-height:1.2;overflow:hidden}.rj-editor-equation-editor .rj-editor-equation-slot-input{width:auto;min-width:1.375rem;min-height:1.5rem;padding:.0625rem .3125rem;font-size:1.125rem}.rj-editor-equation-slot-input:focus{box-shadow:0 0 0 .125rem var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-style:solid}.rj-editor-equation-slot-input::placeholder{color:var(--rj-editor-muted-text,#526070)}.rj-editor-equation-slot-input--limit,.rj-editor-equation-slot-input--script,.rj-editor-equation-slot-input--small,.rj-editor-equation-slot-input--root-index,.rj-editor-equation-editor .rj-editor-equation-slot-input--limit,.rj-editor-equation-editor .rj-editor-equation-slot-input--script,.rj-editor-equation-editor .rj-editor-equation-slot-input--small,.rj-editor-equation-editor .rj-editor-equation-slot-input--root-index{min-width:1.125rem;min-height:1.125rem;padding:.0625rem .25rem;font-size:.8125rem}.rj-editor-equation-slot-input--small{min-width:1.125rem}.rj-editor-equation-slot-input--matrix{min-width:1.375rem}.rj-editor-equation-visual--fraction,.rj-editor-equation-render--fraction{place-items:center;gap:.125rem;min-width:0;display:inline-grid}.rj-editor-equation-fraction-line,.rj-editor-equation-render-line{background:var(--rj-editor-text,#111827);width:100%;height:.125rem;display:block}.rj-editor-equation-visual--fraction-inline,.rj-editor-equation-render--fraction-inline,.rj-editor-equation-visual--row,.rj-editor-equation-render--row{flex-wrap:nowrap;align-items:center;gap:.125rem;min-width:0;display:inline-flex}.rj-editor-equation-visual--script,.rj-editor-equation-render--script{vertical-align:middle;align-items:center;gap:.125rem}.rj-editor-equation-script-stack,.rj-editor-equation-render-script-stack{place-items:center;gap:.0625rem;line-height:1;display:inline-grid}.rj-editor-equation-visual--script.has-superscript:not(.has-subscript) .rj-editor-equation-script-stack,.rj-editor-equation-render--script.has-superscript:not(.has-subscript) .rj-editor-equation-render-script-stack{transform:translateY(-.4375rem)}.rj-editor-equation-visual--script.has-subscript:not(.has-superscript) .rj-editor-equation-script-stack,.rj-editor-equation-render--script.has-subscript:not(.has-superscript) .rj-editor-equation-render-script-stack{transform:translateY(.4375rem)}.rj-editor-equation-visual--script.has-superscript.has-subscript .rj-editor-equation-script-stack,.rj-editor-equation-render--script.has-superscript.has-subscript .rj-editor-equation-render-script-stack{transform:translateY(-.0625rem)}.rj-editor-equation-render-script-stack{font-size:.68em}.rj-editor-equation-visual--root,.rj-editor-equation-render--root{align-items:flex-start;gap:0}.rj-editor-equation-root-symbol,.rj-editor-equation-render-root-symbol{font-size:1.875rem;font-style:normal;line-height:1}.rj-editor-equation-radicand,.rj-editor-equation-render-radicand{border-top:.125rem solid var(--rj-editor-text,#111827);margin-top:.125rem;padding:.125rem .25rem 0;display:inline-flex}.rj-editor-equation-slot-input--root-index,.rj-editor-equation-render-root-index{align-self:flex-start;margin-right:-.125rem}.rj-editor-equation-render-root-index{font-size:.62em}.rj-editor-equation-limits,.rj-editor-equation-render-limits{place-items:center;gap:.0625rem;line-height:1;display:inline-grid}.rj-editor-equation-render-limits span:first-child,.rj-editor-equation-render-limits span:last-child{font-size:.62em}.rj-editor-equation-large-symbol,.rj-editor-equation-render-large-symbol{font-size:2.125rem;font-style:normal;line-height:.9}.rj-editor-equation-function-name{font-style:normal;font-weight:600}.rj-editor-equation-bracket,.rj-editor-equation-render-bracket,.rj-editor-equation-matrix-bracket,.rj-editor-equation-render-matrix-bracket{font-size:2.125rem;font-style:normal;line-height:1}.rj-editor-equation-visual--accent,.rj-editor-equation-render--accent{justify-items:center;gap:0;display:inline-grid}.rj-editor-equation-accent-mark,.rj-editor-equation-render-accent-mark{font-size:1.125rem;line-height:.7}.rj-editor-equation-matrix-grid,.rj-editor-equation-render-matrix-grid{gap:.25rem .5rem;display:inline-grid}.rj-editor-equation-render-matrix-grid span{text-align:center;min-width:1.5rem}.rj-editor-equation.is-selected{outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:.125rem}.rj-editor-equation-content,.rj-editor-equation-content math{max-width:100%}.rj-editor-equation-content .katex-display{margin:0}.rj-editor-image-node{margin:.75rem 0;display:block}.rj-editor-youtube-node{clear:both;margin:1rem 0;display:block}.rj-editor-youtube{aspect-ratio:16/9;background:var(--rj-editor-toolbar-bg,#f8fafc);border:.0625rem solid var(--rj-editor-border,#d9dde5);cursor:pointer;border-radius:.5rem;width:100%;max-width:45rem;overflow:hidden}.rj-editor-youtube.is-selected{outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:.125rem}.rj-editor-youtube iframe{border:0;width:100%;height:100%;display:block}.rj-editor-image-frame{width:100%;display:flex;position:relative}.rj-editor-image-frame--wrap-square{width:auto;max-width:100%;display:block}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--left{float:left;margin:.25rem 1rem .625rem 0}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--right{float:right;margin:.25rem 0 .625rem 1rem}.rj-editor-image-frame--wrap-square.rj-editor-image-frame--center,.rj-editor-image-frame--wrap-top-bottom{clear:both;width:100%;display:flex}.rj-editor-image-frame--left{justify-content:flex-start}.rj-editor-image-frame--center{justify-content:center}.rj-editor-image-frame--right{justify-content:flex-end}.rj-editor-image{width:100%;max-width:100%;height:auto;display:block}.rj-editor-image-box{transform-origin:50%;flex-direction:column;display:inline-flex;position:relative}.rj-editor-image-rotator{transform:rotate(var(--rj-image-rotation,0deg));transform-origin:50%;width:100%;display:block}.rj-editor-image-box.is-quarter-turn{display:block}.rj-editor-image-box.is-quarter-turn .rj-editor-image-rotator{transform:translate(-50%, -50%) rotate(var(--rj-image-rotation,0deg));position:absolute;top:50%;left:50%}.rj-editor-image-box.is-quarter-turn .rj-editor-image-link,.rj-editor-image-box.is-quarter-turn .rj-editor-image{width:100%;max-width:none;height:100%}.rj-editor-image-box.is-quarter-turn .rj-editor-image-caption{width:100%;position:absolute;top:100%;left:0}.rj-editor-image-box.has-border .rj-editor-image{border:.0625rem solid var(--rj-editor-image-border,#94a3b8)}.rj-editor-image-box.has-shadow .rj-editor-image{box-shadow:var(--rj-editor-image-shadow,0 .875rem 2rem #0f172a2e)}.rj-editor-image-link{display:block}.rj-editor-image-caption{color:var(--rj-editor-muted-text,#64748b);text-align:center;margin-top:.375rem;font-family:system-ui,sans-serif;font-size:.75rem;font-weight:500;line-height:1.35;display:block}.rj-editor-image-frame.is-selected .rj-editor-image-box{outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:.125rem}.rj-editor-image-floating-toolbar{background:var(--rj-editor-toolbar-bg,#f8fafc);border:.0625rem solid var(--rj-editor-border,#d9dde5);box-shadow:var(--rj-editor-floating-shadow,0 .75rem 1.75rem #0f172a24);z-index:1005;border-radius:.5rem;align-items:center;gap:.25rem;padding:.25rem;display:inline-flex;position:absolute}.rj-editor-image-floating-toolbar button{background:var(--rj-editor-toolbar-button-bg,#fff);border:.0625rem solid var(--rj-editor-border,#d9dde5);color:var(--rj-editor-text,#111827);cursor:pointer;border-radius:.375rem;justify-content:center;align-items:center;min-width:1.75rem;height:1.75rem;padding:0 .4375rem;font-family:system-ui,sans-serif;font-size:.75rem;font-weight:500;line-height:1;display:inline-flex}.rj-editor-image-floating-toolbar button svg{width:1.25rem;height:1.25rem}.rj-editor-image-floating-toolbar button:hover{background:var(--rj-editor-toolbar-button-active-bg,#eaf2ff);border-color:var(--rj-editor-focus-border,#7aa7f7)}.rj-editor-image-resize-handle{background:var(--rj-editor-focus-border,#7aa7f7);border:.125rem solid var(--rj-editor-bg,#fff);touch-action:none;z-index:2;border-radius:62.4375rem;width:.75rem;height:.75rem;position:absolute;transform:translate(-50%,-50%)}.rj-editor-image-resize-handle--left{cursor:ew-resize;top:50%;left:0}.rj-editor-image-resize-handle--right{cursor:ew-resize;top:50%;left:100%}.rj-editor-image-resize-handle--top{cursor:ns-resize;top:0;left:50%}.rj-editor-image-resize-handle--bottom{cursor:ns-resize;top:100%;left:50%}.rj-editor-image-resize-handle--top-left{cursor:nwse-resize;top:0;left:0}.rj-editor-image-resize-handle--top-right{cursor:nesw-resize;top:0;left:100%}.rj-editor-image-resize-handle--bottom-right{cursor:nwse-resize;top:100%;left:100%}.rj-editor-image-resize-handle--bottom-left{cursor:nesw-resize;top:100%;left:0}.rj-editor-table-scrollable-wrapper{max-width:100%;margin:.75rem 0;overflow-x:auto}.rj-editor-table{border:.0625rem solid var(--rj-editor-table-border,#94a3b86b);border-collapse:separate;border-spacing:0;table-layout:fixed;border-radius:.75rem;width:100%;overflow:hidden}.rj-editor-table-cell,.rj-editor-table-cell-header{border:0;border-bottom:.0625rem solid var(--rj-editor-table-border,#94a3b86b);border-right:.0625rem solid var(--rj-editor-table-border,#94a3b86b);box-sizing:border-box;vertical-align:top;min-width:5rem;height:2rem;padding:.5rem .625rem}.rj-editor-table-row:last-child .rj-editor-table-cell,.rj-editor-table-row:last-child .rj-editor-table-cell-header,.rj-editor-table tr:last-child .rj-editor-table-cell,.rj-editor-table tr:last-child .rj-editor-table-cell-header{border-bottom:0}.rj-editor-table-cell:last-child,.rj-editor-table-cell-header:last-child{border-right:0}.rj-editor-table tr:first-child .rj-editor-table-cell:first-child,.rj-editor-table tr:first-child .rj-editor-table-cell-header:first-child{border-top-left-radius:.75rem}.rj-editor-table tr:first-child .rj-editor-table-cell:last-child,.rj-editor-table tr:first-child .rj-editor-table-cell-header:last-child{border-top-right-radius:.75rem}.rj-editor-table tr:last-child .rj-editor-table-cell:first-child,.rj-editor-table tr:last-child .rj-editor-table-cell-header:first-child{border-bottom-left-radius:.75rem}.rj-editor-table tr:last-child .rj-editor-table-cell:last-child,.rj-editor-table tr:last-child .rj-editor-table-cell-header:last-child{border-bottom-right-radius:.75rem}.rj-editor-table-cell .rj-editor-paragraph,.rj-editor-table-cell-header .rj-editor-paragraph{min-height:1.25rem;margin:0;line-height:1.25rem}.rj-editor-table-cell-header{background:var(--rj-editor-table-header-bg,#94a3b829);font-weight:700}.rj-editor-table-cell-selected{background:var(--rj-editor-table-selected-bg,#eaf2ff);outline:.125rem solid var(--rj-editor-focus-border,#7aa7f7);outline-offset:-.125rem}.rj-editor-list-ol,.rj-editor-list-ul{margin:0 0 .75rem 1.5rem;padding:0}.rj-editor-list-item{margin:.25rem 0}\n/*$vite$:1*/";
|
|
3
3
|
function injectRJEditorStyle() {
|
|
4
4
|
if (typeof document === "undefined" || document.getElementById(RJ_EDITOR_STYLE_ID)) return;
|
|
5
5
|
const style = document.createElement("style");
|
|
@@ -16,36 +16,36 @@ import { $generateHtmlFromNodes as fe, $generateNodesFromDOM as pe } from "@lexi
|
|
|
16
16
|
import { LexicalComposer as me } from "@lexical/react/LexicalComposer";
|
|
17
17
|
import { Button as he, Checkbox as ge, ConfigProvider as _e, Dropdown as ve, Select as ye, theme as be } from "antd";
|
|
18
18
|
import * as A from "react";
|
|
19
|
-
import j, { createContext as xe, useContext as Se, useEffect as Ce,
|
|
20
|
-
import { Provider as
|
|
21
|
-
import { configureStore as
|
|
19
|
+
import j, { createContext as xe, useContext as Se, useEffect as Ce, useRef as we, useState as Te } from "react";
|
|
20
|
+
import { Provider as Ee, useDispatch as De, useSelector as Oe } from "react-redux";
|
|
21
|
+
import { configureStore as ke, createSlice as Ae } from "@reduxjs/toolkit";
|
|
22
22
|
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
23
|
-
import { $createLinkNode as
|
|
24
|
-
import { $isListNode as
|
|
25
|
-
import { $computeTableMapSkipCellCheck as
|
|
26
|
-
import { $getNearestNodeOfType as
|
|
23
|
+
import { $createLinkNode as je, $toggleLink as Me, LinkNode as Ne, formatUrl as Pe } from "@lexical/link";
|
|
24
|
+
import { $isListNode as Fe, $removeList as Ie, INSERT_ORDERED_LIST_COMMAND as Le, INSERT_UNORDERED_LIST_COMMAND as Re, ListItemNode as ze, ListNode as Be, REMOVE_LIST_COMMAND as Ve } from "@lexical/list";
|
|
25
|
+
import { $computeTableMapSkipCellCheck as He, $deleteTableColumnAtSelection as Ue, $deleteTableRowAtSelection as We, $getNodeTriplet as Ge, $getTableCellNodeRect as Ke, $insertTableColumnAtSelection as qe, $insertTableRowAtSelection as Je, $isTableCellNode as Ye, $isTableNode as Xe, $isTableSelection as Ze, $mergeCells as Qe, $unmergeCell as $e, INSERT_TABLE_COMMAND as et, TableCellHeaderStates as tt, TableCellNode as nt, TableNode as rt, TableRowNode as it } from "@lexical/table";
|
|
26
|
+
import { $getNearestNodeOfType as at, $insertNodeToNearestRoot as ot } from "@lexical/utils";
|
|
27
27
|
import { useLexicalComposerContext as F } from "@lexical/react/LexicalComposerContext";
|
|
28
|
-
import { useLexicalNodeSelection as
|
|
29
|
-
import { AutoFocusPlugin as
|
|
30
|
-
import { ContentEditable as
|
|
31
|
-
import { LexicalErrorBoundary as
|
|
32
|
-
import { HistoryPlugin as
|
|
33
|
-
import { LinkPlugin as
|
|
34
|
-
import { ListPlugin as
|
|
35
|
-
import { OnChangePlugin as
|
|
36
|
-
import { RichTextPlugin as
|
|
37
|
-
import { TablePlugin as
|
|
38
|
-
import { $getSelectionStyleValueForProperty as
|
|
39
|
-
import { createPortal as
|
|
28
|
+
import { useLexicalNodeSelection as st } from "@lexical/react/useLexicalNodeSelection";
|
|
29
|
+
import { AutoFocusPlugin as ct } from "@lexical/react/LexicalAutoFocusPlugin";
|
|
30
|
+
import { ContentEditable as lt } from "@lexical/react/LexicalContentEditable";
|
|
31
|
+
import { LexicalErrorBoundary as ut } from "@lexical/react/LexicalErrorBoundary";
|
|
32
|
+
import { HistoryPlugin as dt } from "@lexical/react/LexicalHistoryPlugin";
|
|
33
|
+
import { LinkPlugin as ft } from "@lexical/react/LexicalLinkPlugin";
|
|
34
|
+
import { ListPlugin as pt } from "@lexical/react/LexicalListPlugin";
|
|
35
|
+
import { OnChangePlugin as mt } from "@lexical/react/LexicalOnChangePlugin";
|
|
36
|
+
import { RichTextPlugin as ht } from "@lexical/react/LexicalRichTextPlugin";
|
|
37
|
+
import { TablePlugin as gt } from "@lexical/react/LexicalTablePlugin";
|
|
38
|
+
import { $getSelectionStyleValueForProperty as _t, $patchStyleText as vt, $setBlocksType as yt } from "@lexical/selection";
|
|
39
|
+
import { createPortal as bt } from "react-dom";
|
|
40
40
|
//#region src/utils/helpers/getEquationModelSlotValue.ts
|
|
41
|
-
function
|
|
41
|
+
function xt(e) {
|
|
42
42
|
return typeof e != "string";
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function St(e, t) {
|
|
45
45
|
let [n, ...r] = t.split(">");
|
|
46
46
|
if (r.length > 0) {
|
|
47
|
-
let t =
|
|
48
|
-
return
|
|
47
|
+
let t = St(e, n);
|
|
48
|
+
return xt(t) ? St(t, r.join(">")) : "";
|
|
49
49
|
}
|
|
50
50
|
switch (e.kind) {
|
|
51
51
|
case "accent":
|
|
@@ -72,7 +72,7 @@ function xt(e, t) {
|
|
|
72
72
|
}
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region src/utils/helpers/parseEquationRowInsertSlotId.ts
|
|
75
|
-
function
|
|
75
|
+
function Ct(e) {
|
|
76
76
|
let t = e.split(">"), n = t.at(-1)?.match(/^row\.insert\.(\d+)$/);
|
|
77
77
|
return n ? {
|
|
78
78
|
insertIndex: Number(n[1]),
|
|
@@ -81,17 +81,17 @@ function St(e) {
|
|
|
81
81
|
}
|
|
82
82
|
//#endregion
|
|
83
83
|
//#region src/utils/helpers/updateEquationModelSlot.ts
|
|
84
|
-
function
|
|
84
|
+
function wt(e) {
|
|
85
85
|
return typeof e != "string";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
87
|
+
function Tt(e, t, n) {
|
|
88
|
+
return wt(e) ? I(e, t, n) : e;
|
|
89
89
|
}
|
|
90
90
|
function I(e, t, n) {
|
|
91
91
|
let [r, ...i] = t.split(">");
|
|
92
92
|
if (i.length > 0) {
|
|
93
93
|
let t = i.join(">");
|
|
94
|
-
return I(e, r,
|
|
94
|
+
return I(e, r, Tt(Et(e, r), t, n));
|
|
95
95
|
}
|
|
96
96
|
switch (e.kind) {
|
|
97
97
|
case "accent": return t === "accent.value" ? {
|
|
@@ -156,7 +156,7 @@ function I(e, t, n) {
|
|
|
156
156
|
} : e;
|
|
157
157
|
case "row": {
|
|
158
158
|
let [, , r] = t.split("."), i = Number(r);
|
|
159
|
-
return !
|
|
159
|
+
return !wt(n) || Number.isNaN(i) ? e : {
|
|
160
160
|
...e,
|
|
161
161
|
items: e.items.map((e, t) => t === i ? n : e)
|
|
162
162
|
};
|
|
@@ -185,7 +185,7 @@ function I(e, t, n) {
|
|
|
185
185
|
default: return e;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Et(e, t) {
|
|
189
189
|
switch (e.kind) {
|
|
190
190
|
case "accent":
|
|
191
191
|
case "bracket":
|
|
@@ -211,13 +211,13 @@ function Tt(e, t) {
|
|
|
211
211
|
}
|
|
212
212
|
//#endregion
|
|
213
213
|
//#region src/utils/helpers/appendTextToEquationModelSlot.ts
|
|
214
|
-
function
|
|
214
|
+
function Dt(e) {
|
|
215
215
|
return {
|
|
216
216
|
kind: "text",
|
|
217
217
|
value: e
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function Ot(e, t, n) {
|
|
221
221
|
if (typeof e == "string") {
|
|
222
222
|
let r = Math.max(0, Math.min(n?.start ?? e.length, e.length)), i = Math.max(r, Math.min(n?.end ?? r, e.length));
|
|
223
223
|
return `${e.slice(0, r)}${t}${e.slice(i)}`;
|
|
@@ -232,20 +232,20 @@ function Dt(e, t, n) {
|
|
|
232
232
|
}]
|
|
233
233
|
} : {
|
|
234
234
|
...e,
|
|
235
|
-
items: [...e.items,
|
|
235
|
+
items: [...e.items, Dt(t)]
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
return {
|
|
239
|
-
items: [e,
|
|
239
|
+
items: [e, Dt(t)],
|
|
240
240
|
kind: "row"
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
let i =
|
|
243
|
+
function kt(e, t, n, r) {
|
|
244
|
+
let i = Ct(t);
|
|
245
245
|
if (i) {
|
|
246
|
-
let t = i.rowSlotId ?
|
|
246
|
+
let t = i.rowSlotId ? St(e, i.rowSlotId) : e;
|
|
247
247
|
if (typeof t != "string" && t.kind === "row") {
|
|
248
|
-
let r = Math.max(0, Math.min(i.insertIndex, t.items.length)), a =
|
|
248
|
+
let r = Math.max(0, Math.min(i.insertIndex, t.items.length)), a = Dt(n), o = {
|
|
249
249
|
...t,
|
|
250
250
|
items: [
|
|
251
251
|
...t.items.slice(0, r),
|
|
@@ -263,10 +263,10 @@ function Ot(e, t, n, r) {
|
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
let a =
|
|
266
|
+
let a = St(e, t), o = typeof a == "string" ? Math.max(0, Math.min(r?.start ?? a.length, a.length)) : n.length;
|
|
267
267
|
return {
|
|
268
268
|
activeSlotId: t,
|
|
269
|
-
model: I(e, t,
|
|
269
|
+
model: I(e, t, Ot(a, n, r)),
|
|
270
270
|
selection: {
|
|
271
271
|
end: o + n.length,
|
|
272
272
|
start: o + n.length
|
|
@@ -275,12 +275,12 @@ function Ot(e, t, n, r) {
|
|
|
275
275
|
}
|
|
276
276
|
//#endregion
|
|
277
277
|
//#region src/utils/helpers/clampValue.ts
|
|
278
|
-
function
|
|
278
|
+
function At(e, t, n) {
|
|
279
279
|
return typeof t == "number" && e < t ? t : typeof n == "number" && e > n ? n : e;
|
|
280
280
|
}
|
|
281
281
|
//#endregion
|
|
282
282
|
//#region src/utils/helpers/copyTextToClipboard.ts
|
|
283
|
-
async function
|
|
283
|
+
async function jt(e) {
|
|
284
284
|
if (typeof navigator < "u" && navigator.clipboard?.writeText) try {
|
|
285
285
|
await navigator.clipboard.writeText(e);
|
|
286
286
|
return;
|
|
@@ -291,66 +291,66 @@ async function At(e) {
|
|
|
291
291
|
}
|
|
292
292
|
//#endregion
|
|
293
293
|
//#region src/utils/helpers/countTextCharacters.ts
|
|
294
|
-
function
|
|
294
|
+
function Mt(e) {
|
|
295
295
|
return Array.from(e.replace(/\n/g, "")).length;
|
|
296
296
|
}
|
|
297
297
|
//#endregion
|
|
298
298
|
//#region src/utils/helpers/countTextWords.ts
|
|
299
|
-
function
|
|
299
|
+
function Nt(e) {
|
|
300
300
|
let t = e.replace(/\u00a0/g, " ").trim();
|
|
301
301
|
return t ? t.split(/\s+/).length : 0;
|
|
302
302
|
}
|
|
303
303
|
//#endregion
|
|
304
304
|
//#region src/utils/helpers/equationModelPrefix.ts
|
|
305
|
-
var
|
|
305
|
+
var Pt = "rj-equation-model:";
|
|
306
306
|
//#endregion
|
|
307
307
|
//#region src/utils/helpers/isVisualEquationValue.ts
|
|
308
|
-
function
|
|
309
|
-
return e.startsWith(
|
|
308
|
+
function Ft(e) {
|
|
309
|
+
return e.startsWith(Pt);
|
|
310
310
|
}
|
|
311
311
|
//#endregion
|
|
312
312
|
//#region src/utils/helpers/decodeEquationValue.ts
|
|
313
|
-
function
|
|
314
|
-
if (!
|
|
313
|
+
function It(e) {
|
|
314
|
+
if (!Ft(e)) return null;
|
|
315
315
|
try {
|
|
316
|
-
return JSON.parse(decodeURIComponent(e.slice(
|
|
316
|
+
return JSON.parse(decodeURIComponent(e.slice(Pt.length)));
|
|
317
317
|
} catch {
|
|
318
318
|
return null;
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
//#endregion
|
|
322
322
|
//#region src/utils/helpers/encodeEquationModel.ts
|
|
323
|
-
function
|
|
324
|
-
return `${
|
|
323
|
+
function Lt(e) {
|
|
324
|
+
return `${Pt}${encodeURIComponent(JSON.stringify(e))}`;
|
|
325
325
|
}
|
|
326
326
|
//#endregion
|
|
327
327
|
//#region src/utils/helpers/escapeHtml.ts
|
|
328
|
-
var
|
|
328
|
+
var Rt = {
|
|
329
329
|
"&": "&",
|
|
330
330
|
"\"": """,
|
|
331
331
|
"'": "'",
|
|
332
332
|
"<": "<",
|
|
333
333
|
">": ">"
|
|
334
334
|
};
|
|
335
|
-
function
|
|
336
|
-
return e.replace(/[&"'<>]/g, (e) =>
|
|
335
|
+
function zt(e) {
|
|
336
|
+
return e.replace(/[&"'<>]/g, (e) => Rt[e]);
|
|
337
337
|
}
|
|
338
338
|
//#endregion
|
|
339
339
|
//#region src/utils/helpers/formatNumberText.ts
|
|
340
|
-
function
|
|
340
|
+
function Bt(e, t) {
|
|
341
341
|
if (!t || e === "") return e;
|
|
342
342
|
let n = e.endsWith("."), [r, i] = e.split("."), a = r.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
343
343
|
return typeof i == "string" ? `${a}.${i}` : n ? `${a}.` : a;
|
|
344
344
|
}
|
|
345
345
|
//#endregion
|
|
346
346
|
//#region src/utils/helpers/isApplePlatform.ts
|
|
347
|
-
function
|
|
347
|
+
function Vt() {
|
|
348
348
|
return typeof navigator > "u" ? !1 : /Mac|iPhone|iPad|iPod/i.test(navigator.platform);
|
|
349
349
|
}
|
|
350
350
|
//#endregion
|
|
351
351
|
//#region src/utils/helpers/formatShortcutTitle.ts
|
|
352
352
|
function L(e, t) {
|
|
353
|
-
return `${e.replace(/\bMOD\b/g,
|
|
353
|
+
return `${e.replace(/\bMOD\b/g, Vt() ? "CMD" : "CTRL")} | ${t}`;
|
|
354
354
|
}
|
|
355
355
|
//#endregion
|
|
356
356
|
//#region src/utils/helpers/getFirstEquationSlotId.ts
|
|
@@ -374,25 +374,25 @@ function R(e) {
|
|
|
374
374
|
}
|
|
375
375
|
//#endregion
|
|
376
376
|
//#region src/utils/helpers/getYouTubeVideoId.ts
|
|
377
|
-
var
|
|
378
|
-
function
|
|
377
|
+
var Ht = /^[a-zA-Z0-9_-]{11}$/;
|
|
378
|
+
function Ut(e) {
|
|
379
379
|
let t = e.trim();
|
|
380
|
-
if (
|
|
380
|
+
if (Ht.test(t)) return t;
|
|
381
381
|
try {
|
|
382
382
|
let e = new URL(t), n = e.hostname.replace(/^www\./, "");
|
|
383
383
|
if (n === "youtu.be") {
|
|
384
384
|
let t = e.pathname.split("/").filter(Boolean)[0];
|
|
385
|
-
return t &&
|
|
385
|
+
return t && Ht.test(t) ? t : null;
|
|
386
386
|
}
|
|
387
387
|
if (n === "youtube.com" || n === "m.youtube.com" || n === "youtube-nocookie.com") {
|
|
388
388
|
let t = e.searchParams.get("v");
|
|
389
|
-
if (t &&
|
|
389
|
+
if (t && Ht.test(t)) return t;
|
|
390
390
|
let [, n, r] = e.pathname.split("/");
|
|
391
391
|
if ([
|
|
392
392
|
"embed",
|
|
393
393
|
"live",
|
|
394
394
|
"shorts"
|
|
395
|
-
].includes(n) && r &&
|
|
395
|
+
].includes(n) && r && Ht.test(r)) return r;
|
|
396
396
|
}
|
|
397
397
|
} catch {
|
|
398
398
|
return null;
|
|
@@ -401,20 +401,20 @@ function Ht(e) {
|
|
|
401
401
|
}
|
|
402
402
|
//#endregion
|
|
403
403
|
//#region src/utils/helpers/insertEquationModelIntoSlot.ts
|
|
404
|
-
function
|
|
404
|
+
function Wt(e) {
|
|
405
405
|
return {
|
|
406
406
|
kind: "text",
|
|
407
407
|
value: e
|
|
408
408
|
};
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function Gt(e, t, n) {
|
|
411
411
|
if (typeof e == "string") {
|
|
412
412
|
let r = Math.max(0, Math.min(n?.start ?? e.length, e.length)), i = Math.max(r, Math.min(n?.end ?? r, e.length)), a = e.slice(0, r), o = e.slice(i);
|
|
413
413
|
return {
|
|
414
414
|
items: [
|
|
415
|
-
a ?
|
|
415
|
+
a ? Wt(a) : null,
|
|
416
416
|
t,
|
|
417
|
-
o ?
|
|
417
|
+
o ? Wt(o) : null
|
|
418
418
|
].filter(Boolean),
|
|
419
419
|
kind: "row"
|
|
420
420
|
};
|
|
@@ -431,31 +431,31 @@ function Wt(e, t, n) {
|
|
|
431
431
|
kind: "row"
|
|
432
432
|
};
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function Kt(e, t) {
|
|
435
435
|
if (!t) return e.kind === "row" ? e : null;
|
|
436
|
-
let n =
|
|
436
|
+
let n = St(e, t);
|
|
437
437
|
return typeof n != "string" && n.kind === "row" ? n : null;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function qt(e) {
|
|
440
440
|
let t = e.split(">");
|
|
441
441
|
return t.at(-1) === "text.value" ? t.slice(0, -1).join(">") : null;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function Jt(e, t) {
|
|
444
444
|
return e ? `${e}>${t}` : t;
|
|
445
445
|
}
|
|
446
|
-
function
|
|
447
|
-
if (typeof t == "string" && !t.trim()) return
|
|
448
|
-
if (typeof t == "string") return
|
|
446
|
+
function Yt(e, t, n, r) {
|
|
447
|
+
if (typeof t == "string" && !t.trim()) return Jt(e, `row.items.0>${R(n)}`);
|
|
448
|
+
if (typeof t == "string") return Jt(e, `row.items.${r?.start && r.start > 0 ? 1 : 0}>${R(n)}`);
|
|
449
449
|
if (typeof t != "string" && t.kind === "row") {
|
|
450
450
|
let r = t.items.at(-1);
|
|
451
|
-
return
|
|
451
|
+
return Jt(e, `row.items.${r?.kind === "text" && typeof r.value == "string" && !r.value.trim() ? t.items.length - 1 : t.items.length}>${R(n)}`);
|
|
452
452
|
}
|
|
453
|
-
return
|
|
453
|
+
return Jt(e, `row.items.1>${R(n)}`);
|
|
454
454
|
}
|
|
455
|
-
function
|
|
456
|
-
let i =
|
|
455
|
+
function Xt(e, t, n, r) {
|
|
456
|
+
let i = Ct(t);
|
|
457
457
|
if (i) {
|
|
458
|
-
let t =
|
|
458
|
+
let t = Kt(e, i.rowSlotId);
|
|
459
459
|
if (!t) return {
|
|
460
460
|
activeSlotId: R(n),
|
|
461
461
|
model: e
|
|
@@ -469,22 +469,22 @@ function Yt(e, t, n, r) {
|
|
|
469
469
|
]
|
|
470
470
|
};
|
|
471
471
|
return {
|
|
472
|
-
activeSlotId:
|
|
472
|
+
activeSlotId: Jt(i.rowSlotId, `row.items.${r}>${R(n)}`),
|
|
473
473
|
model: i.rowSlotId ? I(e, i.rowSlotId, a) : a
|
|
474
474
|
};
|
|
475
475
|
}
|
|
476
|
-
let a =
|
|
476
|
+
let a = qt(t), o = St(e, t), s = Gt(o, n, r);
|
|
477
477
|
return a === null ? {
|
|
478
|
-
activeSlotId:
|
|
478
|
+
activeSlotId: Yt(t, o, n, r),
|
|
479
479
|
model: I(e, t, s)
|
|
480
480
|
} : {
|
|
481
|
-
activeSlotId:
|
|
481
|
+
activeSlotId: Yt(a, o, n, r),
|
|
482
482
|
model: a ? I(e, a, s) : s
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
485
|
//#endregion
|
|
486
486
|
//#region src/utils/helpers/normalizeNumberText.ts
|
|
487
|
-
function
|
|
487
|
+
function Zt(e, t, n) {
|
|
488
488
|
let r = e.replace(/,/g, ".").replace(/\s/g, ""), i = "", a = !1, o = 0;
|
|
489
489
|
for (let e of r) {
|
|
490
490
|
if (/\d/.test(e)) {
|
|
@@ -501,7 +501,7 @@ function Xt(e, t, n) {
|
|
|
501
501
|
}
|
|
502
502
|
//#endregion
|
|
503
503
|
//#region src/constants/backgroundColorOptions.ts
|
|
504
|
-
var
|
|
504
|
+
var Qt = [
|
|
505
505
|
"#FFFFFF",
|
|
506
506
|
"#FEF3C7",
|
|
507
507
|
"#DBEAFE",
|
|
@@ -509,14 +509,14 @@ var Zt = [
|
|
|
509
509
|
"#FCE7F3",
|
|
510
510
|
"#EDE9FE",
|
|
511
511
|
"#E5E7EB"
|
|
512
|
-
],
|
|
512
|
+
], $t = "rj-editor-equation-insert", en = [
|
|
513
513
|
"Arial",
|
|
514
514
|
"Georgia",
|
|
515
515
|
"Inter",
|
|
516
516
|
"Times New Roman",
|
|
517
517
|
"Trebuchet MS",
|
|
518
518
|
"Verdana"
|
|
519
|
-
],
|
|
519
|
+
], tn = [
|
|
520
520
|
"0.5rem",
|
|
521
521
|
"0.5625rem",
|
|
522
522
|
"0.6875rem",
|
|
@@ -570,14 +570,14 @@ var Zt = [
|
|
|
570
570
|
tableCellVerticalAlign: void 0,
|
|
571
571
|
tableHasMergedCell: !1,
|
|
572
572
|
textColor: ""
|
|
573
|
-
},
|
|
573
|
+
}, nn = k("INSERT_CODE_BLOCK_COMMAND"), rn = k("INSERT_EQUATION_COMMAND"), an = k("INSERT_IMAGE_COMMAND"), on = k("INSERT_YOUTUBE_COMMAND"), sn = [
|
|
574
574
|
"1",
|
|
575
575
|
"1.15",
|
|
576
576
|
"1.5",
|
|
577
577
|
"2",
|
|
578
578
|
"2.5",
|
|
579
579
|
"3"
|
|
580
|
-
],
|
|
580
|
+
], cn = "rj-editor:open-link-modal", ln = [
|
|
581
581
|
"#111827",
|
|
582
582
|
"#dc2626",
|
|
583
583
|
"#2563eb",
|
|
@@ -587,34 +587,34 @@ var Zt = [
|
|
|
587
587
|
];
|
|
588
588
|
//#endregion
|
|
589
589
|
//#region src/utils/helpers/normalizeEditorFontFamily.ts
|
|
590
|
-
function
|
|
590
|
+
function un(e) {
|
|
591
591
|
return e.trim().replace(/^['"]|['"]$/g, "").toLowerCase();
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function dn(e) {
|
|
594
594
|
if (!e) return;
|
|
595
|
-
let t = e.split(",").map(
|
|
596
|
-
return
|
|
595
|
+
let t = e.split(",").map(un);
|
|
596
|
+
return en.find((e) => t.includes(un(e)));
|
|
597
597
|
}
|
|
598
598
|
//#endregion
|
|
599
599
|
//#region src/utils/helpers/normalizeEditorFontSize.ts
|
|
600
|
-
function
|
|
600
|
+
function fn(e) {
|
|
601
601
|
return e.trim().toLowerCase();
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function pn(e) {
|
|
604
604
|
if (!e) return;
|
|
605
|
-
let t =
|
|
606
|
-
return
|
|
605
|
+
let t = fn(e);
|
|
606
|
+
return tn.find((e) => fn(e) === t);
|
|
607
607
|
}
|
|
608
608
|
//#endregion
|
|
609
609
|
//#region src/utils/helpers/pxToRem.ts
|
|
610
|
-
var
|
|
610
|
+
var mn = 16;
|
|
611
611
|
function B(e) {
|
|
612
|
-
let t = e /
|
|
612
|
+
let t = e / mn;
|
|
613
613
|
return `${Number(t.toFixed(6))}rem`;
|
|
614
614
|
}
|
|
615
615
|
//#endregion
|
|
616
616
|
//#region src/utils/helpers/normalizeRJEditorHtml.ts
|
|
617
|
-
var
|
|
617
|
+
var hn = {
|
|
618
618
|
border: "0.0625rem solid #cbd5e1",
|
|
619
619
|
borderCollapse: "separate",
|
|
620
620
|
borderRadius: "0.75rem",
|
|
@@ -622,7 +622,7 @@ var mn = {
|
|
|
622
622
|
overflow: "hidden",
|
|
623
623
|
tableLayout: "fixed",
|
|
624
624
|
width: "100%"
|
|
625
|
-
},
|
|
625
|
+
}, gn = {
|
|
626
626
|
border: "0",
|
|
627
627
|
borderBottom: "0.0625rem solid #cbd5e1",
|
|
628
628
|
borderRight: "0.0625rem solid #cbd5e1",
|
|
@@ -631,11 +631,15 @@ var mn = {
|
|
|
631
631
|
minWidth: "5rem",
|
|
632
632
|
padding: "0.5rem 0.625rem",
|
|
633
633
|
verticalAlign: "top"
|
|
634
|
-
},
|
|
634
|
+
}, _n = {
|
|
635
635
|
margin: "0.75rem 0",
|
|
636
636
|
maxWidth: "100%",
|
|
637
637
|
overflowX: "auto"
|
|
638
|
-
},
|
|
638
|
+
}, vn = "rgb(242, 243, 245)", yn = "rgb(148 163 184 / 0.42)", bn = "rgb(148 163 184 / 0.16)", xn = "rgb(122 167 247 / 0.18)", Sn = new Set([
|
|
639
|
+
vn,
|
|
640
|
+
"rgb(241, 245, 249)",
|
|
641
|
+
"rgb(37, 37, 37)"
|
|
642
|
+
]), Cn = "[data-rj-editor-content=\"true\"]", wn = "pre.rj-editor-code-block", Tn = "data-rj-code-title", En = "data-rj-code-custom-title", Dn = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace", On = "var b=this,w=b.closest('[data-rj-editor-code-block=\"true\"]'),c=w&&w.querySelector('[data-rj-editor-code-content=\"true\"],pre.rj-editor-code-block'),t=c?c.textContent:'',f=function(){var a=document.createElement('textarea');a.value=t;a.style.position='fixed';a.style.opacity='0';document.body.appendChild(a);a.focus();a.select();document.execCommand('copy');a.remove()};if(navigator.clipboard&&window.isSecureContext){navigator.clipboard.writeText(t).catch(f)}else{f()}b.setAttribute('aria-label','Copied');b.setAttribute('title','Copied');setTimeout(function(){b.setAttribute('aria-label','Copy code');b.setAttribute('title','Copy code')},1600);return false;", kn = {
|
|
639
643
|
background: "#0b0c0e",
|
|
640
644
|
border: "0.0625rem solid #34363a",
|
|
641
645
|
borderRadius: "0.5rem",
|
|
@@ -648,7 +652,7 @@ var mn = {
|
|
|
648
652
|
borderBottom: "0.0625rem solid #34363a",
|
|
649
653
|
color: "#a1a1aa",
|
|
650
654
|
display: "flex",
|
|
651
|
-
fontFamily:
|
|
655
|
+
fontFamily: Dn,
|
|
652
656
|
fontSize: "0.75rem",
|
|
653
657
|
height: "2.625rem",
|
|
654
658
|
justifyContent: "space-between",
|
|
@@ -671,7 +675,7 @@ var mn = {
|
|
|
671
675
|
borderRadius: "0",
|
|
672
676
|
color: "#ededed",
|
|
673
677
|
display: "block",
|
|
674
|
-
fontFamily:
|
|
678
|
+
fontFamily: Dn,
|
|
675
679
|
fontSize: "0.8125rem",
|
|
676
680
|
lineHeight: "1.65",
|
|
677
681
|
margin: "0",
|
|
@@ -719,7 +723,7 @@ var mn = {
|
|
|
719
723
|
border: "0.0625rem solid rgb(255 255 255 / 14%)",
|
|
720
724
|
borderRadius: "0.375rem",
|
|
721
725
|
color: "#ededed",
|
|
722
|
-
fontFamily:
|
|
726
|
+
fontFamily: Dn,
|
|
723
727
|
fontSize: "0.92em",
|
|
724
728
|
lineHeight: "1.35",
|
|
725
729
|
padding: "0.125rem 0.375rem",
|
|
@@ -895,55 +899,43 @@ var mn = {
|
|
|
895
899
|
"--rj-editor-inline-code-text": "#ededed",
|
|
896
900
|
"--rj-editor-link": Hn,
|
|
897
901
|
"--rj-editor-muted-text": "#64748b",
|
|
898
|
-
"--rj-editor-table-border":
|
|
899
|
-
"--rj-editor-table-header-bg":
|
|
900
|
-
"--rj-editor-table-selected-bg":
|
|
902
|
+
"--rj-editor-table-border": yn,
|
|
903
|
+
"--rj-editor-table-header-bg": bn,
|
|
904
|
+
"--rj-editor-table-selected-bg": xn,
|
|
901
905
|
"--rj-editor-text": "#111827",
|
|
902
906
|
"--rj-editor-toolbar-bg": "#f8fafc",
|
|
903
907
|
"--rj-editor-toolbar-button-active-bg": "#eaf2ff"
|
|
904
908
|
};
|
|
905
|
-
function Kn(
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
let t = e?.getRootElement()?.closest("[data-rj-editor-theme]");
|
|
911
|
-
return Kn(t?.dataset.rjEditorTheme) || (globalThis.document === void 0 ? "light" : Kn(globalThis.document.documentElement.dataset.rjEditorTheme) || Kn(globalThis.document.body?.dataset.rjEditorTheme) || "light");
|
|
912
|
-
}
|
|
913
|
-
function Jn(e) {
|
|
914
|
-
return e === "dark" ? {
|
|
915
|
-
border: xn,
|
|
916
|
-
headerBg: Sn,
|
|
917
|
-
selectedBg: Cn
|
|
918
|
-
} : {
|
|
919
|
-
border: vn,
|
|
920
|
-
headerBg: yn,
|
|
921
|
-
selectedBg: bn
|
|
909
|
+
function Kn() {
|
|
910
|
+
return {
|
|
911
|
+
border: yn,
|
|
912
|
+
headerBg: bn,
|
|
913
|
+
selectedBg: xn
|
|
922
914
|
};
|
|
923
915
|
}
|
|
924
|
-
function
|
|
916
|
+
function qn(e) {
|
|
925
917
|
let t = "http://www.w3.org/2000/svg", n = e.createElementNS(t, "svg"), r = e.createElementNS(t, "path");
|
|
926
918
|
return n.setAttribute("aria-hidden", "true"), n.setAttribute("fill", "none"), n.setAttribute("viewBox", "0 0 24 24"), r.setAttribute("d", "M5 15C4.06812 15 3.60218 15 3.23463 14.8478C2.74458 14.6448 2.35523 14.2554 2.15224 13.7654C2 13.3978 2 12.9319 2 12V5.2C2 4.0799 2 3.51984 2.21799 3.09202C2.40973 2.71569 2.71569 2.40973 3.09202 2.21799C3.51984 2 4.0799 2 5.2 2H12C12.9319 2 13.3978 2 13.7654 2.15224C14.2554 2.35523 14.6448 2.74458 14.8478 3.23463C15 3.60218 15 4.06812 15 5M12.2 22H18.8C19.9201 22 20.4802 22 20.908 21.782C21.2843 21.5903 21.5903 21.2843 21.782 20.908C22 20.4802 22 19.9201 22 18.8V12.2C22 11.0799 22 10.5198 21.782 10.092C21.5903 9.71569 21.2843 9.40973 20.908 9.21799C20.4802 9 19.9201 9 18.8 9H12.2C11.0799 9 10.5198 9 10.092 9.21799C9.71569 9.40973 9.40973 9.71569 9.21799 10.092C9 10.5198 9 11.0799 9 12.2V18.8C9 19.9201 9 20.4802 9.21799 20.908C9.40973 21.2843 9.71569 21.5903 10.092 21.782C10.5198 22 11.0799 22 12.2 22Z"), r.setAttribute("stroke", "currentColor"), r.setAttribute("stroke-linecap", "round"), r.setAttribute("stroke-linejoin", "round"), r.setAttribute("stroke-width", "2"), n.append(r), V(n, Nn), n;
|
|
927
919
|
}
|
|
928
|
-
function
|
|
929
|
-
e.querySelectorAll(
|
|
920
|
+
function Jn(e) {
|
|
921
|
+
e.querySelectorAll(wn).forEach((t) => {
|
|
930
922
|
if (!(t instanceof HTMLElement) || t.closest("[data-rj-editor-code-block=\"true\"]")) return;
|
|
931
923
|
let n = e.createElement("div"), r = e.createElement("div"), i = e.createElement("span"), a = e.createElement("button");
|
|
932
|
-
n.className = "rj-editor-code-block-export", n.setAttribute("data-rj-editor-code-block", "true"), V(n, kn), r.className = "rj-editor-code-block-export-header", V(r, An), i.className = "rj-editor-code-block-export-language", i.textContent = `>_ ${t.getAttribute(
|
|
924
|
+
n.className = "rj-editor-code-block-export", n.setAttribute("data-rj-editor-code-block", "true"), V(n, kn), r.className = "rj-editor-code-block-export-header", V(r, An), i.className = "rj-editor-code-block-export-language", i.textContent = `>_ ${t.getAttribute(Tn) || t.getAttribute(En) || t.getAttribute("data-language") || "plain"}`, i.style.minWidth = "0", i.style.overflow = "hidden", i.style.textOverflow = "ellipsis", i.style.whiteSpace = "nowrap", a.className = "rj-editor-code-block-export-copy", a.setAttribute("aria-label", "Copy code"), a.setAttribute("data-rj-editor-code-copy", "true"), a.setAttribute("onclick", On), a.setAttribute("title", "Copy code"), a.setAttribute("type", "button"), V(a, jn), a.append(qn(e)), t.classList.add("rj-editor-code-block--exported"), t.setAttribute("data-rj-editor-code-content", "true"), V(t, Mn), t.replaceWith(n), r.append(i, a), n.append(r, t);
|
|
933
925
|
});
|
|
934
926
|
}
|
|
935
|
-
function
|
|
927
|
+
function Yn(e) {
|
|
936
928
|
e.querySelectorAll(".rj-editor-paragraph").forEach((e) => {
|
|
937
929
|
if (!(e instanceof HTMLElement)) return;
|
|
938
930
|
let t = !!e.closest("td, th");
|
|
939
931
|
V(e, t ? Fn : Pn), !t && !e.nextElementSibling && (e.style.marginBottom = "0"), H(e, "rj-editor-paragraph");
|
|
940
932
|
}), e.querySelectorAll("a").forEach((e) => {
|
|
941
|
-
e instanceof HTMLElement &&
|
|
933
|
+
e instanceof HTMLElement && or(e, Un);
|
|
942
934
|
}), e.querySelectorAll("hr").forEach((e) => {
|
|
943
935
|
e instanceof HTMLElement && V(e, Rn);
|
|
944
936
|
});
|
|
945
937
|
}
|
|
946
|
-
function
|
|
938
|
+
function Xn(e) {
|
|
947
939
|
Object.entries(zn).forEach(([t, n]) => {
|
|
948
940
|
e.querySelectorAll(`.${t}`).forEach((e) => {
|
|
949
941
|
e instanceof HTMLElement && (V(e, n), H(e, t));
|
|
@@ -954,7 +946,7 @@ function Qn(e) {
|
|
|
954
946
|
e.classList.contains("rj-editor-text-underline") && t.add("underline"), e.classList.contains("rj-editor-text-strikethrough") && t.add("line-through"), e.style.textDecorationLine = Array.from(t).join(" "), H(e, "rj-editor-text-underline"), H(e, "rj-editor-text-strikethrough");
|
|
955
947
|
});
|
|
956
948
|
}
|
|
957
|
-
function
|
|
949
|
+
function Zn(e) {
|
|
958
950
|
Object.entries(In).forEach(([t, n]) => {
|
|
959
951
|
e.querySelectorAll(`.${t}`).forEach((e) => {
|
|
960
952
|
e instanceof HTMLElement && (V(e, n), H(e, t));
|
|
@@ -963,26 +955,26 @@ function $n(e) {
|
|
|
963
955
|
e instanceof HTMLElement && (V(e, Ln), H(e, "rj-editor-list-item"));
|
|
964
956
|
});
|
|
965
957
|
}
|
|
966
|
-
function
|
|
967
|
-
let
|
|
958
|
+
function Qn(e) {
|
|
959
|
+
let t = Kn();
|
|
968
960
|
e.querySelectorAll(".rj-editor-table-scrollable-wrapper").forEach((e) => {
|
|
969
|
-
e instanceof HTMLElement && (V(e,
|
|
961
|
+
e instanceof HTMLElement && (V(e, _n), H(e, "rj-editor-table-scrollable-wrapper"));
|
|
970
962
|
}), e.querySelectorAll("table").forEach((e) => {
|
|
971
|
-
e.classList.add("rj-editor-table"), V(e,
|
|
963
|
+
e.classList.add("rj-editor-table"), V(e, hn), e.style.border = `0.0625rem solid ${t.border}`, H(e, "rj-editor-table");
|
|
972
964
|
}), e.querySelectorAll("table").forEach((e) => {
|
|
973
|
-
let
|
|
974
|
-
|
|
965
|
+
let n = Array.from(e.rows);
|
|
966
|
+
n.forEach((e, r) => {
|
|
975
967
|
let i = Array.from(e.cells);
|
|
976
968
|
i.forEach((e, a) => {
|
|
977
|
-
let o = e.tagName.toLowerCase() === "th", s = o ? "rj-editor-table-cell-header" : "rj-editor-table-cell", c = e.style.backgroundColor
|
|
978
|
-
e.classList.add(s), V(e,
|
|
969
|
+
let o = e.tagName.toLowerCase() === "th", s = o ? "rj-editor-table-cell-header" : "rj-editor-table-cell", c = !e.style.backgroundColor || Sn.has(e.style.backgroundColor);
|
|
970
|
+
e.classList.add(s), V(e, gn), e.style.borderBottom = r === n.length - 1 ? "0" : `0.0625rem solid ${t.border}`, e.style.borderRight = a === i.length - 1 ? "0" : `0.0625rem solid ${t.border}`, e.style.borderRadius = "0", r === 0 && a === 0 && (e.style.borderTopLeftRadius = "0.75rem"), r === 0 && a === i.length - 1 && (e.style.borderTopRightRadius = "0.75rem"), r === n.length - 1 && a === 0 && (e.style.borderBottomLeftRadius = "0.75rem"), r === n.length - 1 && a === i.length - 1 && (e.style.borderBottomRightRadius = "0.75rem"), o && c && (e.style.backgroundColor = t.headerBg, e.style.fontWeight = "700"), e.classList.contains("rj-editor-table-cell-selected") && (e.style.background = t.selectedBg, e.style.outline = "0.125rem solid #7aa7f7", e.style.outlineOffset = "-0.125rem", H(e, "rj-editor-table-cell-selected")), H(e, s);
|
|
979
971
|
}), H(e, "rj-editor-table-row");
|
|
980
972
|
});
|
|
981
973
|
}), e.querySelectorAll(".rj-editor-table-selection").forEach((e) => {
|
|
982
974
|
e.remove();
|
|
983
975
|
});
|
|
984
976
|
}
|
|
985
|
-
function
|
|
977
|
+
function $n(e) {
|
|
986
978
|
e.querySelectorAll(".rj-editor-equation-render--script.has-superscript:not(.has-subscript) .rj-editor-equation-render-script-stack").forEach((e) => {
|
|
987
979
|
e instanceof HTMLElement && (e.style.transform = "translateY(-0.4375rem)");
|
|
988
980
|
}), e.querySelectorAll(".rj-editor-equation-render--script.has-subscript:not(.has-superscript) .rj-editor-equation-render-script-stack").forEach((e) => {
|
|
@@ -1005,42 +997,42 @@ function tr(e) {
|
|
|
1005
997
|
e instanceof HTMLElement && Array.from(e.classList).filter((e) => e.startsWith("rj-editor-equation-render")).forEach((t) => H(e, t));
|
|
1006
998
|
});
|
|
1007
999
|
}
|
|
1008
|
-
function
|
|
1000
|
+
function er(e) {
|
|
1009
1001
|
e.querySelectorAll("code").forEach((e) => {
|
|
1010
|
-
if (!(e instanceof HTMLElement) || e.closest(
|
|
1002
|
+
if (!(e instanceof HTMLElement) || e.closest(wn) || e.matches(wn)) return;
|
|
1011
1003
|
let t = e.style.background || e.style.backgroundColor;
|
|
1012
|
-
|
|
1013
|
-
t instanceof HTMLElement && (
|
|
1004
|
+
or(e, Bn), nr(e), rr(e), t && !e.style.background && (e.style.background = t), e.querySelectorAll("span").forEach((t) => {
|
|
1005
|
+
t instanceof HTMLElement && (ir(e, t) || tr(t) && t.replaceWith(...Array.from(t.childNodes)));
|
|
1014
1006
|
});
|
|
1015
1007
|
}), e.querySelectorAll(".rj-editor-text-code").forEach((e) => {
|
|
1016
|
-
e instanceof HTMLElement && (e.closest(
|
|
1008
|
+
e instanceof HTMLElement && (e.closest(wn) || (e.closest("code") || V(e, Bn), e.classList.remove("rj-editor-text-code"), e.className || e.removeAttribute("class")));
|
|
1017
1009
|
}), Object.entries(Vn).forEach(([t, n]) => {
|
|
1018
1010
|
e.querySelectorAll(`.${t}`).forEach((e) => {
|
|
1019
1011
|
e instanceof HTMLElement && (V(e, n), e.classList.remove(t), e.className || e.removeAttribute("class"));
|
|
1020
1012
|
});
|
|
1021
1013
|
});
|
|
1022
1014
|
}
|
|
1023
|
-
function
|
|
1015
|
+
function tr(e) {
|
|
1024
1016
|
return Array.from(e.attributes).every((e) => [
|
|
1025
1017
|
"class",
|
|
1026
1018
|
"style",
|
|
1027
1019
|
"data-lexical-text"
|
|
1028
1020
|
].includes(e.name));
|
|
1029
1021
|
}
|
|
1030
|
-
function
|
|
1031
|
-
let t = Array.from(e.querySelectorAll("*")).find((t) => !
|
|
1022
|
+
function nr(e) {
|
|
1023
|
+
let t = Array.from(e.querySelectorAll("*")).find((t) => !ir(e, t) && (t.style.backgroundColor || t.style.color));
|
|
1032
1024
|
t && (t.style.backgroundColor && (e.style.background = t.style.backgroundColor), t.style.color && (e.style.color = t.style.color));
|
|
1033
1025
|
}
|
|
1034
|
-
function
|
|
1035
|
-
(e.closest("a") || e.querySelector("a")) && ((!e.style.color ||
|
|
1026
|
+
function rr(e) {
|
|
1027
|
+
(e.closest("a") || e.querySelector("a")) && ((!e.style.color || ar(e.style.color)) && (e.style.color = Hn), e.querySelectorAll("a").forEach((e) => {
|
|
1036
1028
|
e instanceof HTMLElement && (e.style.color = Hn);
|
|
1037
1029
|
}));
|
|
1038
1030
|
}
|
|
1039
|
-
function
|
|
1031
|
+
function ir(e, t) {
|
|
1040
1032
|
let n = t.closest("a");
|
|
1041
1033
|
return !!n && !n.contains(e);
|
|
1042
1034
|
}
|
|
1043
|
-
function
|
|
1035
|
+
function ar(e) {
|
|
1044
1036
|
let t = e.replace(/\s+/g, "").toLowerCase();
|
|
1045
1037
|
return t === "#ededed" || t === "rgb(237,237,237)";
|
|
1046
1038
|
}
|
|
@@ -1049,7 +1041,7 @@ function V(e, t) {
|
|
|
1049
1041
|
typeof n == "string" && e.style.setProperty(t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), n);
|
|
1050
1042
|
});
|
|
1051
1043
|
}
|
|
1052
|
-
function
|
|
1044
|
+
function or(e, t) {
|
|
1053
1045
|
Object.entries(t).forEach(([t, n]) => {
|
|
1054
1046
|
if (typeof n != "string") return;
|
|
1055
1047
|
let r = t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), i = r === "background" && "backgroundColor" in e.style && !!e.style.backgroundColor;
|
|
@@ -1059,11 +1051,11 @@ function cr(e, t) {
|
|
|
1059
1051
|
function H(e, t) {
|
|
1060
1052
|
e.classList.remove(t), e.className || e.removeAttribute("class");
|
|
1061
1053
|
}
|
|
1062
|
-
function
|
|
1063
|
-
let
|
|
1064
|
-
return e === "--rj-editor-table-border" ?
|
|
1054
|
+
function sr(e, t) {
|
|
1055
|
+
let n = Kn();
|
|
1056
|
+
return e === "--rj-editor-table-border" ? n.border : e === "--rj-editor-table-header-bg" ? n.headerBg : e === "--rj-editor-table-selected-bg" ? n.selectedBg : Gn[e] || t.trim();
|
|
1065
1057
|
}
|
|
1066
|
-
function
|
|
1058
|
+
function cr(e) {
|
|
1067
1059
|
let t = e.indexOf(",");
|
|
1068
1060
|
return t === -1 ? {
|
|
1069
1061
|
fallback: "",
|
|
@@ -1073,121 +1065,121 @@ function ur(e) {
|
|
|
1073
1065
|
name: e.slice(0, t).trim()
|
|
1074
1066
|
};
|
|
1075
1067
|
}
|
|
1076
|
-
function
|
|
1077
|
-
let
|
|
1078
|
-
for (;
|
|
1079
|
-
let
|
|
1080
|
-
if (
|
|
1081
|
-
|
|
1068
|
+
function lr(e) {
|
|
1069
|
+
let t = "", n = 0;
|
|
1070
|
+
for (; n < e.length;) {
|
|
1071
|
+
let r = e.indexOf("var(", n);
|
|
1072
|
+
if (r === -1) {
|
|
1073
|
+
t += e.slice(n);
|
|
1082
1074
|
break;
|
|
1083
1075
|
}
|
|
1084
|
-
|
|
1085
|
-
let
|
|
1086
|
-
for (;
|
|
1087
|
-
let t = e[
|
|
1088
|
-
if (t === "(" && (
|
|
1076
|
+
t += e.slice(n, r);
|
|
1077
|
+
let i = 1, a = r + 4;
|
|
1078
|
+
for (; a < e.length; a += 1) {
|
|
1079
|
+
let t = e[a];
|
|
1080
|
+
if (t === "(" && (i += 1), t === ")" && --i, i === 0) break;
|
|
1089
1081
|
}
|
|
1090
|
-
if (
|
|
1091
|
-
|
|
1082
|
+
if (i !== 0) {
|
|
1083
|
+
t += e.slice(r);
|
|
1092
1084
|
break;
|
|
1093
1085
|
}
|
|
1094
|
-
let { fallback:
|
|
1095
|
-
|
|
1086
|
+
let { fallback: o, name: s } = cr(e.slice(r + 4, a));
|
|
1087
|
+
t += sr(s, o), n = a + 1;
|
|
1096
1088
|
}
|
|
1097
|
-
return
|
|
1089
|
+
return t;
|
|
1098
1090
|
}
|
|
1099
|
-
function
|
|
1091
|
+
function ur(e) {
|
|
1100
1092
|
e.querySelectorAll("[style]").forEach((e) => {
|
|
1101
|
-
(e instanceof HTMLElement || e instanceof SVGElement) && Array.from(e.style).forEach((
|
|
1102
|
-
let
|
|
1103
|
-
|
|
1093
|
+
(e instanceof HTMLElement || e instanceof SVGElement) && Array.from(e.style).forEach((t) => {
|
|
1094
|
+
let n = e.style.getPropertyValue(t);
|
|
1095
|
+
n.includes("var(") && e.style.setProperty(t, lr(n));
|
|
1104
1096
|
});
|
|
1105
1097
|
});
|
|
1106
1098
|
}
|
|
1107
|
-
function
|
|
1099
|
+
function dr(e, t, n) {
|
|
1108
1100
|
n === "square" && t === "left" && (e.style.float = "left", e.style.margin = "0.25rem 1rem 0.625rem 0"), n === "square" && t === "right" && (e.style.float = "right", e.style.margin = "0.25rem 0 0.625rem 1rem"), n !== "square" && t === "center" && (e.style.marginLeft = "auto", e.style.marginRight = "auto"), n !== "square" && t === "right" && (e.style.marginLeft = "auto", e.style.marginRight = "0"), n !== "square" && t === "left" && (e.style.marginLeft = "0", e.style.marginRight = "auto");
|
|
1109
1101
|
}
|
|
1110
|
-
function
|
|
1102
|
+
function fr(e, t) {
|
|
1111
1103
|
let n = e.createElement("span");
|
|
1112
1104
|
return n.className = "rj-editor-image-caption", n.textContent = t, n.style.color = "#64748b", n.style.display = "block", n.style.font = "500 0.75rem/1.35 system-ui, sans-serif", n.style.marginTop = "0.375rem", n.style.textAlign = "center", n.style.width = "100%", n;
|
|
1113
1105
|
}
|
|
1114
|
-
function
|
|
1106
|
+
function pr(e, t, n) {
|
|
1115
1107
|
let r = n?.trim();
|
|
1116
1108
|
if (!r) return t;
|
|
1117
1109
|
let i = e.createElement("a");
|
|
1118
1110
|
return i.href = r, i.rel = "noreferrer", i.target = "_blank", i.style.color = "inherit", i.style.display = "block", i.style.textDecoration = "none", t.replaceWith(i), i.append(t), i;
|
|
1119
1111
|
}
|
|
1120
|
-
function
|
|
1112
|
+
function mr(e) {
|
|
1121
1113
|
return Array.from(e.querySelectorAll("img[data-text-wrap=\"square\"], [data-rj-image-caption-wrapper=\"true\"], [data-rj-image-rotation-wrapper=\"true\"]")).some((e) => {
|
|
1122
1114
|
let t = e;
|
|
1123
1115
|
return t.style.float === "left" || t.style.float === "right";
|
|
1124
1116
|
});
|
|
1125
1117
|
}
|
|
1126
|
-
function
|
|
1127
|
-
if (!
|
|
1118
|
+
function hr(e) {
|
|
1119
|
+
if (!mr(e) || e.body.children.length === 1 && e.body.firstElementChild?.matches(Cn)) return;
|
|
1128
1120
|
let t = e.createElement("div");
|
|
1129
1121
|
t.className = "rj-editor-content", t.setAttribute("data-rj-editor-content", "true"), t.style.display = "flow-root", t.style.width = "100%", t.append(...Array.from(e.body.childNodes)), e.body.append(t);
|
|
1130
1122
|
}
|
|
1131
|
-
function
|
|
1123
|
+
function gr(e, t) {
|
|
1132
1124
|
let n = t.getAttribute("data-caption")?.trim();
|
|
1133
1125
|
if (!n) return !1;
|
|
1134
1126
|
let r = t.getAttribute("data-alignment"), i = t.getAttribute("data-text-wrap"), a = e.createElement("span");
|
|
1135
|
-
return a.setAttribute("data-rj-image-caption-wrapper", "true"), a.style.display = "block", a.style.maxWidth = "100%", a.style.width = t.style.width || "fit-content",
|
|
1127
|
+
return a.setAttribute("data-rj-image-caption-wrapper", "true"), a.style.display = "block", a.style.maxWidth = "100%", a.style.width = t.style.width || "fit-content", dr(a, r, i), t.style.float = "", t.style.margin = "0", t.style.width = "100%", t.replaceWith(a), a.append(pr(e, t, t.getAttribute("data-link-url")), fr(e, n)), !0;
|
|
1136
1128
|
}
|
|
1137
|
-
function
|
|
1129
|
+
function _r(e) {
|
|
1138
1130
|
return (Number(e || 0) % 360 + 360) % 360;
|
|
1139
1131
|
}
|
|
1140
|
-
function
|
|
1141
|
-
let r = t.getAttribute("data-rj-image-node-key"), i =
|
|
1132
|
+
function vr(e, t, n) {
|
|
1133
|
+
let r = t.getAttribute("data-rj-image-node-key"), i = _r(t.getAttribute("data-rotation"));
|
|
1142
1134
|
if (!r || i !== 90 && i !== 270) return !1;
|
|
1143
1135
|
let a = (n?.getElementByKey(r))?.querySelector(".rj-editor-image-rotator");
|
|
1144
1136
|
if (!(a instanceof HTMLElement)) return !1;
|
|
1145
1137
|
let o = a.getBoundingClientRect(), s = a.offsetWidth, c = a.offsetHeight;
|
|
1146
1138
|
if (!o.width || !o.height || !s || !c) return !1;
|
|
1147
1139
|
let l = t.getAttribute("data-alignment"), u = t.getAttribute("data-caption")?.trim(), d = t.getAttribute("data-link-url"), f = t.getAttribute("data-text-wrap"), p = e.createElement("span"), m = e.createElement("span");
|
|
1148
|
-
return m.setAttribute("data-rj-image-rotation-wrapper", "true"), m.style.display = "block", m.style.height = B(Math.ceil(o.height)), m.style.maxWidth = "100%", m.style.position = "relative", m.style.width = B(Math.ceil(o.width)),
|
|
1140
|
+
return m.setAttribute("data-rj-image-rotation-wrapper", "true"), m.style.display = "block", m.style.height = B(Math.ceil(o.height)), m.style.maxWidth = "100%", m.style.position = "relative", m.style.width = B(Math.ceil(o.width)), dr(m, l, f), p.style.display = "block", p.style.height = B(Math.ceil(o.height)), p.style.position = "relative", p.style.width = B(Math.ceil(o.width)), t.style.display = "block", t.style.float = "", t.style.height = B(c), t.style.left = "50%", t.style.margin = "0", t.style.maxWidth = "none", t.style.position = "absolute", t.style.top = "50%", t.style.transform = `translate(-50%, -50%) rotate(${i}deg)`, t.style.transformOrigin = "center", t.style.width = B(s), t.replaceWith(m), p.append(pr(e, t, d)), m.append(p), u && m.append(fr(e, u)), !0;
|
|
1149
1141
|
}
|
|
1150
|
-
function
|
|
1142
|
+
function yr(e, t) {
|
|
1151
1143
|
if (!e.trim() || typeof DOMParser > "u") return e;
|
|
1152
|
-
let n = new DOMParser().parseFromString(e, "text/html")
|
|
1153
|
-
return
|
|
1144
|
+
let n = new DOMParser().parseFromString(e, "text/html");
|
|
1145
|
+
return Qn(n), n.querySelectorAll("img[data-alignment]").forEach((e) => {
|
|
1154
1146
|
let r = e, i = r.getAttribute("data-alignment"), a = r.getAttribute("data-text-wrap");
|
|
1155
|
-
|
|
1156
|
-
}),
|
|
1147
|
+
vr(n, r, t) || (r.style.display = "block", r.style.maxWidth = "100%", dr(r, i, a), gr(n, r) || pr(n, r, r.getAttribute("data-link-url")));
|
|
1148
|
+
}), Yn(n), Xn(n), Zn(n), $n(n), er(n), Jn(n), hr(n), ur(n), n.body.innerHTML;
|
|
1157
1149
|
}
|
|
1158
1150
|
//#endregion
|
|
1159
1151
|
//#region src/utils/helpers/numberToInputText.ts
|
|
1160
|
-
function
|
|
1161
|
-
return typeof e != "number" || Number.isNaN(e) ? "" :
|
|
1152
|
+
function br(e, t) {
|
|
1153
|
+
return typeof e != "number" || Number.isNaN(e) ? "" : Bt(String(e), t);
|
|
1162
1154
|
}
|
|
1163
1155
|
//#endregion
|
|
1164
1156
|
//#region src/utils/helpers/openFilePicker.ts
|
|
1165
|
-
var
|
|
1166
|
-
function
|
|
1157
|
+
var xr = 1200, Sr = 700;
|
|
1158
|
+
function Cr() {
|
|
1167
1159
|
return document.fullscreenElement ? new Promise((e) => {
|
|
1168
1160
|
let t = () => {
|
|
1169
1161
|
window.clearTimeout(n), document.removeEventListener("fullscreenchange", t), e();
|
|
1170
|
-
}, n = window.setTimeout(t,
|
|
1162
|
+
}, n = window.setTimeout(t, xr);
|
|
1171
1163
|
document.addEventListener("fullscreenchange", t, { once: !0 });
|
|
1172
1164
|
}) : Promise.resolve();
|
|
1173
1165
|
}
|
|
1174
|
-
function
|
|
1166
|
+
function wr() {
|
|
1175
1167
|
return new Promise((e) => {
|
|
1176
|
-
window.setTimeout(e,
|
|
1168
|
+
window.setTimeout(e, Sr);
|
|
1177
1169
|
});
|
|
1178
1170
|
}
|
|
1179
|
-
async function
|
|
1171
|
+
async function Tr(e) {
|
|
1180
1172
|
if (e) {
|
|
1181
1173
|
if (document.fullscreenElement) try {
|
|
1182
|
-
let e =
|
|
1183
|
-
await document.exitFullscreen(), await e, await
|
|
1174
|
+
let e = Cr();
|
|
1175
|
+
await document.exitFullscreen(), await e, await wr();
|
|
1184
1176
|
} catch {}
|
|
1185
1177
|
e.ownerDocument.defaultView?.focus(), e.click();
|
|
1186
1178
|
}
|
|
1187
1179
|
}
|
|
1188
1180
|
//#endregion
|
|
1189
1181
|
//#region src/utils/helpers/readFileAsDataUrl.ts
|
|
1190
|
-
function
|
|
1182
|
+
function Er(e) {
|
|
1191
1183
|
return new Promise((t, n) => {
|
|
1192
1184
|
let r = new FileReader();
|
|
1193
1185
|
r.addEventListener("error", () => {
|
|
@@ -1203,13 +1195,14 @@ function Or(e) {
|
|
|
1203
1195
|
}
|
|
1204
1196
|
//#endregion
|
|
1205
1197
|
//#region src/utils/helpers/registerCodeBlockCopyHandler.ts
|
|
1206
|
-
var
|
|
1207
|
-
function
|
|
1208
|
-
|
|
1198
|
+
var Dr = !1;
|
|
1199
|
+
function Or() {
|
|
1200
|
+
Dr || typeof document > "u" || (Dr = !0, document.addEventListener("click", async (e) => {
|
|
1201
|
+
if (e.defaultPrevented) return;
|
|
1209
1202
|
let t = e.target, n = t instanceof Element ? t.closest("[data-rj-editor-code-copy=\"true\"]") : null;
|
|
1210
1203
|
if (!(n instanceof HTMLButtonElement)) return;
|
|
1211
|
-
let r = n.closest("[data-rj-editor-code-block=\"true\"]")?.querySelector("pre.rj-editor-code-block");
|
|
1212
|
-
r instanceof HTMLElement && (e.preventDefault(), await
|
|
1204
|
+
let r = n.closest("[data-rj-editor-code-block=\"true\"]")?.querySelector("[data-rj-editor-code-content=\"true\"], pre.rj-editor-code-block");
|
|
1205
|
+
r instanceof HTMLElement && (e.preventDefault(), await jt(r.textContent || ""), n.classList.add("is-copied"), n.setAttribute("aria-label", "Copied"), n.setAttribute("title", "Copied"), window.setTimeout(() => {
|
|
1213
1206
|
n.classList.remove("is-copied"), n.setAttribute("aria-label", "Copy code"), n.setAttribute("title", "Copy code");
|
|
1214
1207
|
}, 1600));
|
|
1215
1208
|
}));
|
|
@@ -1217,12 +1210,12 @@ function Ar() {
|
|
|
1217
1210
|
//#endregion
|
|
1218
1211
|
//#region src/utils/helpers/renderEquationModelToHtml.ts
|
|
1219
1212
|
function U(e, t = "□") {
|
|
1220
|
-
return e && typeof e != "string" ?
|
|
1213
|
+
return e && typeof e != "string" ? Pr(e) : `<span class="rj-editor-equation-render-slot">${zt(e?.trim() || t)}</span>`;
|
|
1221
1214
|
}
|
|
1222
|
-
function
|
|
1215
|
+
function kr(e) {
|
|
1223
1216
|
return e === "absolute" ? ["|", "|"] : e === "angle" ? ["⟨", "⟩"] : e === "brace" ? ["{", "}"] : e === "ceiling" ? ["⌈", "⌉"] : e === "doubleAbsolute" ? ["‖", "‖"] : e === "floor" ? ["⌊", "⌋"] : e === "square" ? ["[", "]"] : ["(", ")"];
|
|
1224
1217
|
}
|
|
1225
|
-
function
|
|
1218
|
+
function Ar(e) {
|
|
1226
1219
|
return {
|
|
1227
1220
|
intersection: "⋂",
|
|
1228
1221
|
product: "∏",
|
|
@@ -1230,7 +1223,7 @@ function Mr(e) {
|
|
|
1230
1223
|
union: "⋃"
|
|
1231
1224
|
}[e];
|
|
1232
1225
|
}
|
|
1233
|
-
function
|
|
1226
|
+
function jr(e) {
|
|
1234
1227
|
return {
|
|
1235
1228
|
contour: "∮",
|
|
1236
1229
|
double: "∫∫",
|
|
@@ -1238,7 +1231,7 @@ function Nr(e) {
|
|
|
1238
1231
|
triple: "∫∫∫"
|
|
1239
1232
|
}[e || "single"];
|
|
1240
1233
|
}
|
|
1241
|
-
function
|
|
1234
|
+
function Mr(e) {
|
|
1242
1235
|
return [
|
|
1243
1236
|
"rj-editor-equation-render",
|
|
1244
1237
|
"rj-editor-equation-render--script",
|
|
@@ -1247,11 +1240,11 @@ function Pr(e) {
|
|
|
1247
1240
|
e.subscript === void 0 ? "" : "has-subscript"
|
|
1248
1241
|
].filter(Boolean).join(" ");
|
|
1249
1242
|
}
|
|
1250
|
-
function
|
|
1243
|
+
function Nr(e) {
|
|
1251
1244
|
let t = `<span class="rj-editor-equation-render-matrix-grid" style="grid-template-columns: repeat(${Math.max(...e.cells.map((e) => e.length), 1)}, minmax(1.75rem, auto));">${e.cells.flatMap((e) => e.map((e) => `<span>${U(e)}</span>`)).join("")}</span>`;
|
|
1252
1245
|
return e.bracket === "none" ? t : e.bracket === "determinant" ? `<span class="rj-editor-equation-render-matrix-bracket">|</span>${t}<span class="rj-editor-equation-render-matrix-bracket">|</span>` : e.bracket === "round" ? `<span class="rj-editor-equation-render-matrix-bracket">(</span>${t}<span class="rj-editor-equation-render-matrix-bracket">)</span>` : `<span class="rj-editor-equation-render-matrix-bracket">[</span>${t}<span class="rj-editor-equation-render-matrix-bracket">]</span>`;
|
|
1253
1246
|
}
|
|
1254
|
-
function
|
|
1247
|
+
function Pr(e) {
|
|
1255
1248
|
switch (e.kind) {
|
|
1256
1249
|
case "accent": return `<span class="rj-editor-equation-render rj-editor-equation-render--accent"><span class="rj-editor-equation-render-accent-mark">${{
|
|
1257
1250
|
bar: "¯",
|
|
@@ -1261,28 +1254,28 @@ function Ir(e) {
|
|
|
1261
1254
|
vector: "⃗"
|
|
1262
1255
|
}[e.accent]}</span>${U(e.value, "x")}</span>`;
|
|
1263
1256
|
case "bracket": {
|
|
1264
|
-
let [t, n] =
|
|
1265
|
-
return `<span class="rj-editor-equation-render rj-editor-equation-render--bracket"><span class="rj-editor-equation-render-bracket">${
|
|
1257
|
+
let [t, n] = kr(e.bracket);
|
|
1258
|
+
return `<span class="rj-editor-equation-render rj-editor-equation-render--bracket"><span class="rj-editor-equation-render-bracket">${zt(t)}</span>${U(e.value, "x")}<span class="rj-editor-equation-render-bracket">${zt(n)}</span></span>`;
|
|
1266
1259
|
}
|
|
1267
1260
|
case "fraction": return e.variant === "linear" || e.variant === "skewed" ? `<span class="rj-editor-equation-render rj-editor-equation-render--fraction-inline"><span>${U(e.numerator)}</span><span>${e.variant === "skewed" ? "⁄" : "/"}</span><span>${U(e.denominator)}</span></span>` : `<span class="rj-editor-equation-render rj-editor-equation-render--fraction"><span>${U(e.numerator)}</span><span class="rj-editor-equation-render-line"></span><span>${U(e.denominator)}</span></span>`;
|
|
1268
1261
|
case "function": return `<span class="rj-editor-equation-render rj-editor-equation-render--function"><span>${e.functionName}</span><span>(</span>${U(e.argument, "x")}<span>)</span></span>`;
|
|
1269
|
-
case "integral": return `<span class="rj-editor-equation-render rj-editor-equation-render--integral"><span class="rj-editor-equation-render-limits"><span>${e.upper === void 0 ? "" : U(e.upper, "b")}</span><span class="rj-editor-equation-render-large-symbol">${
|
|
1270
|
-
case "largeOperator": return `<span class="rj-editor-equation-render rj-editor-equation-render--large-operator"><span class="rj-editor-equation-render-limits"><span>${e.upper === void 0 ? "" : U(e.upper, "n")}</span><span class="rj-editor-equation-render-large-symbol">${
|
|
1262
|
+
case "integral": return `<span class="rj-editor-equation-render rj-editor-equation-render--integral"><span class="rj-editor-equation-render-limits"><span>${e.upper === void 0 ? "" : U(e.upper, "b")}</span><span class="rj-editor-equation-render-large-symbol">${jr(e.variant)}</span><span>${e.lower === void 0 ? "" : U(e.lower, "a")}</span></span>${U(e.body, "f(x)")}<span>d</span>${U(e.variable, "x")}</span>`;
|
|
1263
|
+
case "largeOperator": return `<span class="rj-editor-equation-render rj-editor-equation-render--large-operator"><span class="rj-editor-equation-render-limits"><span>${e.upper === void 0 ? "" : U(e.upper, "n")}</span><span class="rj-editor-equation-render-large-symbol">${Ar(e.operator)}</span><span>${e.lower === void 0 ? "" : U(e.lower, "i=1")}</span></span>${U(e.body, "i")}</span>`;
|
|
1271
1264
|
case "limit": return `<span class="rj-editor-equation-render rj-editor-equation-render--limit"><span class="rj-editor-equation-render-limits"><span>lim</span><span>${U(e.target, "x→0")}</span></span>${U(e.body, "f(x)")}</span>`;
|
|
1272
|
-
case "matrix": return `<span class="rj-editor-equation-render rj-editor-equation-render--matrix">${
|
|
1273
|
-
case "operator": return `<span class="rj-editor-equation-render">${
|
|
1265
|
+
case "matrix": return `<span class="rj-editor-equation-render rj-editor-equation-render--matrix">${Nr(e)}</span>`;
|
|
1266
|
+
case "operator": return `<span class="rj-editor-equation-render">${zt(e.value || "□")}</span>`;
|
|
1274
1267
|
case "root": return `<span class="rj-editor-equation-render rj-editor-equation-render--root">${e.index === void 0 ? "" : `<span class="rj-editor-equation-render-root-index">${U(e.index, "n")}</span>`}<span class="rj-editor-equation-render-root-symbol">√</span><span class="rj-editor-equation-render-radicand">${U(e.value, "x")}</span></span>`;
|
|
1275
|
-
case "script": return e.position === "before" ? `<span class="${
|
|
1268
|
+
case "script": return e.position === "before" ? `<span class="${Mr(e)}"><span class="rj-editor-equation-render-script-stack">${e.superscript === void 0 ? "" : `<span>${U(e.superscript, "n")}</span>`}${e.subscript === void 0 ? "" : `<span>${U(e.subscript, "1")}</span>`}</span>${U(e.base, "Y")}</span>` : `<span class="${Mr(e)}">${U(e.base, "x")}<span class="rj-editor-equation-render-script-stack">${e.superscript === void 0 ? "" : `<span>${U(e.superscript, "2")}</span>`}${e.subscript === void 0 ? "" : `<span>${U(e.subscript, "i")}</span>`}</span></span>`;
|
|
1276
1269
|
case "text": return `<span class="rj-editor-equation-render">${U(e.value, "□")}</span>`;
|
|
1277
|
-
case "row": return `<span class="rj-editor-equation-render rj-editor-equation-render--row">${e.items.map(
|
|
1270
|
+
case "row": return `<span class="rj-editor-equation-render rj-editor-equation-render--row">${e.items.map(Pr).join("")}</span>`;
|
|
1278
1271
|
default: return "";
|
|
1279
1272
|
}
|
|
1280
1273
|
}
|
|
1281
1274
|
//#endregion
|
|
1282
1275
|
//#region src/utils/helpers/renderEquationToHtml.ts
|
|
1283
|
-
function
|
|
1284
|
-
let n =
|
|
1285
|
-
return n ?
|
|
1276
|
+
function Fr(e, t) {
|
|
1277
|
+
let n = It(e);
|
|
1278
|
+
return n ? Pr(n) : de.renderToString(e, {
|
|
1286
1279
|
displayMode: t === "block",
|
|
1287
1280
|
output: "mathml",
|
|
1288
1281
|
strict: !1,
|
|
@@ -1292,11 +1285,11 @@ function Lr(e, t) {
|
|
|
1292
1285
|
}
|
|
1293
1286
|
//#endregion
|
|
1294
1287
|
//#region src/utils/helpers/setEditorHtml.ts
|
|
1295
|
-
var
|
|
1296
|
-
function
|
|
1288
|
+
var Ir = "data-rj-code-title", Lr = "data-rj-code-custom-title";
|
|
1289
|
+
function Rr(e) {
|
|
1297
1290
|
return e.querySelector(".rj-editor-code-block-export-language")?.textContent?.replace(/^>_\s*/, "").trim() || "";
|
|
1298
1291
|
}
|
|
1299
|
-
function
|
|
1292
|
+
function zr(e, t) {
|
|
1300
1293
|
let n = new DOMParser().parseFromString(t || "", "text/html"), r = n.body.querySelector("[data-rj-editor-content=\"true\"]");
|
|
1301
1294
|
n.body.querySelectorAll("[data-rj-editor-code-block=\"true\"]").forEach((e) => {
|
|
1302
1295
|
let t = e.querySelector("pre.rj-editor-code-block");
|
|
@@ -1304,9 +1297,9 @@ function Vr(e, t) {
|
|
|
1304
1297
|
e.remove();
|
|
1305
1298
|
return;
|
|
1306
1299
|
}
|
|
1307
|
-
if (t.classList.remove("rj-editor-code-block--exported"), t.removeAttribute("style"), !t.getAttribute(
|
|
1308
|
-
let n =
|
|
1309
|
-
n && (t.setAttribute(
|
|
1300
|
+
if (t.classList.remove("rj-editor-code-block--exported"), t.removeAttribute("style"), !t.getAttribute(Ir)) {
|
|
1301
|
+
let n = Rr(e);
|
|
1302
|
+
n && (t.setAttribute(Ir, n), n !== (t.getAttribute("data-language") || "plain") && t.setAttribute(Lr, n));
|
|
1310
1303
|
}
|
|
1311
1304
|
e.replaceWith(t);
|
|
1312
1305
|
}), r && n.body.children.length === 1 && n.body.replaceChildren(...Array.from(r.childNodes));
|
|
@@ -1319,7 +1312,7 @@ function Vr(e, t) {
|
|
|
1319
1312
|
}
|
|
1320
1313
|
//#endregion
|
|
1321
1314
|
//#region src/slice/toolbarSlice.ts
|
|
1322
|
-
var
|
|
1315
|
+
var Br = Ae({
|
|
1323
1316
|
name: "toolbar",
|
|
1324
1317
|
initialState: z,
|
|
1325
1318
|
reducers: {
|
|
@@ -1348,11 +1341,11 @@ var Hr = ke({
|
|
|
1348
1341
|
e.isImageSelected = t.payload.isImageSelected, e.selectedImageAlignment = t.payload.selectedImageAlignment, e.selectedImageAltText = t.payload.selectedImageAltText, e.selectedImageAspectRatioLocked = t.payload.selectedImageAspectRatioLocked, e.selectedImageBorderEnabled = t.payload.selectedImageBorderEnabled, e.selectedImageBorderRadius = t.payload.selectedImageBorderRadius, e.selectedImageCaption = t.payload.selectedImageCaption, e.selectedImageHeight = t.payload.selectedImageHeight, e.selectedImageKey = t.payload.selectedImageKey, e.selectedImageLinkUrl = t.payload.selectedImageLinkUrl, e.selectedImageObjectFit = t.payload.selectedImageObjectFit, e.selectedImageRotation = t.payload.selectedImageRotation, e.selectedImageShadowEnabled = t.payload.selectedImageShadowEnabled, e.selectedImageTextWrap = t.payload.selectedImageTextWrap, e.selectedImageWidth = t.payload.selectedImageWidth;
|
|
1349
1342
|
}
|
|
1350
1343
|
}
|
|
1351
|
-
}), { setBlockFormats:
|
|
1352
|
-
|
|
1344
|
+
}), { setBlockFormats: Vr, setCanRedo: Hr, setCanUndo: Ur, setEquationFormats: Wr, setImageFormats: Gr, setStyleFormats: W, setTableFormats: Kr, setTextFormats: qr } = Br.actions, Jr = Br.reducer, Yr = () => ke({ reducer: { toolbar: Jr } });
|
|
1345
|
+
Yr();
|
|
1353
1346
|
//#endregion
|
|
1354
1347
|
//#region src/store/hooks.ts
|
|
1355
|
-
var G =
|
|
1348
|
+
var G = De.withTypes(), K = Oe.withTypes(), Xr = {
|
|
1356
1349
|
alerts: {
|
|
1357
1350
|
imageUploadFailed: "Image upload failed.",
|
|
1358
1351
|
imageSizeLimit: "Image size must be 5MB or less.",
|
|
@@ -1545,22 +1538,22 @@ var G = Ee.withTypes(), K = De.withTypes(), Qr = {
|
|
|
1545
1538
|
};
|
|
1546
1539
|
//#endregion
|
|
1547
1540
|
//#region src/i18n/mergeTranslations.ts
|
|
1548
|
-
function
|
|
1549
|
-
return !e || typeof e != "object" ? e : Array.isArray(e) ? e.map((e) =>
|
|
1541
|
+
function Zr(e) {
|
|
1542
|
+
return !e || typeof e != "object" ? e : Array.isArray(e) ? e.map((e) => Zr(e)) : Object.fromEntries(Object.entries(e).map(([e, t]) => [e, Zr(t)]));
|
|
1550
1543
|
}
|
|
1551
|
-
function
|
|
1544
|
+
function Qr(e, ...t) {
|
|
1552
1545
|
return t.reduce((e, t) => (t && Object.entries(t).forEach(([t, n]) => {
|
|
1553
1546
|
let r = e[t];
|
|
1554
1547
|
if (n && typeof n == "object" && !Array.isArray(n) && r && typeof r == "object") {
|
|
1555
|
-
e[t] =
|
|
1548
|
+
e[t] = Qr(r, n);
|
|
1556
1549
|
return;
|
|
1557
1550
|
}
|
|
1558
1551
|
e[t] = n;
|
|
1559
|
-
}), e),
|
|
1552
|
+
}), e), Zr(e));
|
|
1560
1553
|
}
|
|
1561
1554
|
//#endregion
|
|
1562
1555
|
//#region src/i18n/locales/ru.ts
|
|
1563
|
-
var
|
|
1556
|
+
var $r = Qr(Xr, {
|
|
1564
1557
|
alerts: {
|
|
1565
1558
|
imageUploadFailed: "Не удалось загрузить изображение.",
|
|
1566
1559
|
imageSizeLimit: "Размер изображения должен быть не больше 5MB.",
|
|
@@ -1639,7 +1632,7 @@ var ti = ei(Qr, {
|
|
|
1639
1632
|
titlePlaceholder: "Необязательно"
|
|
1640
1633
|
}
|
|
1641
1634
|
}
|
|
1642
|
-
}),
|
|
1635
|
+
}), ei = Qr(Xr, {
|
|
1643
1636
|
alerts: {
|
|
1644
1637
|
imageUploadFailed: "Rasmni yuklashda xatolik yuz berdi.",
|
|
1645
1638
|
imageSizeLimit: "Rasm hajmi 5MB yoki undan kichik bo‘lishi kerak.",
|
|
@@ -1810,18 +1803,18 @@ var ti = ei(Qr, {
|
|
|
1810
1803
|
titlePlaceholder: "Ixtiyoriy"
|
|
1811
1804
|
}
|
|
1812
1805
|
}
|
|
1813
|
-
}),
|
|
1814
|
-
en:
|
|
1815
|
-
ru:
|
|
1816
|
-
uz:
|
|
1806
|
+
}), ti = j.createContext(ei), ni = {
|
|
1807
|
+
en: Xr,
|
|
1808
|
+
ru: $r,
|
|
1809
|
+
uz: ei
|
|
1817
1810
|
};
|
|
1818
|
-
function
|
|
1819
|
-
let i = j.useMemo(() =>
|
|
1811
|
+
function ri({ children: e, locale: t = "uz", locales: n, translations: r }) {
|
|
1812
|
+
let i = j.useMemo(() => Qr(ni[t] || Xr, n?.[t], r), [
|
|
1820
1813
|
t,
|
|
1821
1814
|
n,
|
|
1822
1815
|
r
|
|
1823
1816
|
]);
|
|
1824
|
-
return /* @__PURE__ */ N(
|
|
1817
|
+
return /* @__PURE__ */ N(ti.Provider, {
|
|
1825
1818
|
value: i,
|
|
1826
1819
|
children: e
|
|
1827
1820
|
});
|
|
@@ -1829,14 +1822,14 @@ function ai({ children: e, locale: t = "uz", locales: n, translations: r }) {
|
|
|
1829
1822
|
//#endregion
|
|
1830
1823
|
//#region src/i18n/useRJEditorI18n.ts
|
|
1831
1824
|
function q() {
|
|
1832
|
-
return j.useContext(
|
|
1825
|
+
return j.useContext(ti);
|
|
1833
1826
|
}
|
|
1834
1827
|
//#endregion
|
|
1835
1828
|
//#region src/theme/getAntdThemeConfig.ts
|
|
1836
|
-
var
|
|
1829
|
+
var ii = {
|
|
1837
1830
|
algorithm: be.defaultAlgorithm,
|
|
1838
1831
|
token: { colorPrimary: "#3167c8" }
|
|
1839
|
-
},
|
|
1832
|
+
}, ai = {
|
|
1840
1833
|
algorithm: be.darkAlgorithm,
|
|
1841
1834
|
token: {
|
|
1842
1835
|
colorBgContainer: "#202020",
|
|
@@ -1855,46 +1848,46 @@ var oi = {
|
|
|
1855
1848
|
colorTextTertiary: "#999999"
|
|
1856
1849
|
}
|
|
1857
1850
|
};
|
|
1858
|
-
function
|
|
1859
|
-
return e === "dark" ?
|
|
1851
|
+
function oi(e) {
|
|
1852
|
+
return e === "dark" ? ai : ii;
|
|
1860
1853
|
}
|
|
1861
1854
|
//#endregion
|
|
1862
1855
|
//#region src/theme/RJEditorThemeContext.ts
|
|
1863
|
-
var
|
|
1856
|
+
var si = j.createContext("light");
|
|
1864
1857
|
//#endregion
|
|
1865
1858
|
//#region src/theme/useRJEditorTheme.ts
|
|
1866
|
-
function
|
|
1867
|
-
return j.useContext(
|
|
1859
|
+
function ci() {
|
|
1860
|
+
return j.useContext(si);
|
|
1868
1861
|
}
|
|
1869
1862
|
//#endregion
|
|
1870
1863
|
//#region src/theme/useResolvedRJEditorTheme.ts
|
|
1871
|
-
function
|
|
1864
|
+
function li(e) {
|
|
1872
1865
|
let t = e?.trim().toLowerCase();
|
|
1873
1866
|
if (t === "dark" || t === "only dark") return "dark";
|
|
1874
1867
|
if (t === "light" || t === "only light") return "light";
|
|
1875
1868
|
}
|
|
1876
|
-
function
|
|
1869
|
+
function ui(e) {
|
|
1877
1870
|
if (!e) return;
|
|
1878
|
-
let t =
|
|
1871
|
+
let t = li(e.dataset.rjEditorTheme) || li(e.dataset.colorScheme) || li(e.dataset.theme) || li(e.getAttribute("color-scheme"));
|
|
1879
1872
|
if (t) return t;
|
|
1880
1873
|
if (e.classList.contains("dark")) return "dark";
|
|
1881
1874
|
if (e.classList.contains("light")) return "light";
|
|
1882
1875
|
}
|
|
1883
|
-
function
|
|
1884
|
-
return e ?
|
|
1876
|
+
function di(e) {
|
|
1877
|
+
return e ? li(window.getComputedStyle(e).colorScheme) : void 0;
|
|
1885
1878
|
}
|
|
1886
|
-
function
|
|
1879
|
+
function fi() {
|
|
1887
1880
|
if (typeof document > "u" || typeof window > "u") return "light";
|
|
1888
|
-
let e = document.documentElement, t = document.body, n =
|
|
1881
|
+
let e = document.documentElement, t = document.body, n = ui(e) || ui(t);
|
|
1889
1882
|
if (n) return n;
|
|
1890
1883
|
let r = document.querySelector("meta[name=\"color-scheme\"]")?.content;
|
|
1891
|
-
return
|
|
1884
|
+
return di(e) || di(t) || li(r) || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
|
|
1892
1885
|
}
|
|
1893
|
-
function
|
|
1894
|
-
let [t, n] = j.useState(() =>
|
|
1886
|
+
function pi(e) {
|
|
1887
|
+
let [t, n] = j.useState(() => fi());
|
|
1895
1888
|
return j.useEffect(() => {
|
|
1896
1889
|
if (e !== "auto") return;
|
|
1897
|
-
let t = () => n(
|
|
1890
|
+
let t = () => n(fi()), r = window.matchMedia("(prefers-color-scheme: dark)"), i = new MutationObserver(t), a = new MutationObserver(t), o = new MutationObserver(t), s = window.requestAnimationFrame(t), c = [
|
|
1898
1891
|
"class",
|
|
1899
1892
|
"color-scheme",
|
|
1900
1893
|
"data-color-scheme",
|
|
@@ -1920,12 +1913,12 @@ function hi(e) {
|
|
|
1920
1913
|
}
|
|
1921
1914
|
//#endregion
|
|
1922
1915
|
//#region src/components/equation/visual/equation-visual-editor/EquationVisualEditor.tsx
|
|
1923
|
-
var
|
|
1924
|
-
function
|
|
1925
|
-
let r = Array.from(e || t ||
|
|
1916
|
+
var mi = "□", hi = "x + y = z";
|
|
1917
|
+
function gi(e, t, n) {
|
|
1918
|
+
let r = Array.from(e || t || mi).length, i = n?.includes("rj-editor-equation-slot-input--limit") || n?.includes("rj-editor-equation-slot-input--matrix") || n?.includes("rj-editor-equation-slot-input--root-index") || n?.includes("rj-editor-equation-slot-input--script") || n?.includes("rj-editor-equation-slot-input--small"), a = i ? 2 : 2.5, o = i ? 5 : 11;
|
|
1926
1919
|
return `calc(${Math.min(Math.max(r + 1, a), o)}ch + 0.25rem)`;
|
|
1927
1920
|
}
|
|
1928
|
-
function
|
|
1921
|
+
function _i(e) {
|
|
1929
1922
|
return [
|
|
1930
1923
|
"rj-editor-equation-visual",
|
|
1931
1924
|
"rj-editor-equation-visual--script",
|
|
@@ -1934,44 +1927,44 @@ function yi(e) {
|
|
|
1934
1927
|
e.subscript === void 0 ? "" : "has-subscript"
|
|
1935
1928
|
].filter(Boolean).join(" ");
|
|
1936
1929
|
}
|
|
1937
|
-
function
|
|
1930
|
+
function vi(e) {
|
|
1938
1931
|
e.stopPropagation();
|
|
1939
1932
|
}
|
|
1940
|
-
function
|
|
1933
|
+
function yi(e) {
|
|
1941
1934
|
let t = e.selectionStart ?? e.value.length;
|
|
1942
1935
|
return {
|
|
1943
1936
|
end: e.selectionEnd ?? t,
|
|
1944
1937
|
start: t
|
|
1945
1938
|
};
|
|
1946
1939
|
}
|
|
1947
|
-
function
|
|
1940
|
+
function bi({ className: e, inputRef: t, onActiveSlotChange: n, onSlotSelectionChange: r, onSlotChange: i, placeholder: a = mi, slotId: o, value: s }) {
|
|
1948
1941
|
let c = (e) => {
|
|
1949
|
-
|
|
1942
|
+
vi(e), n(o), r(o, yi(e.currentTarget));
|
|
1950
1943
|
};
|
|
1951
1944
|
return /* @__PURE__ */ N("input", {
|
|
1952
1945
|
"aria-label": "Equation field",
|
|
1953
1946
|
className: ["rj-editor-equation-slot-input", e || ""].filter(Boolean).join(" "),
|
|
1954
1947
|
onChange: (e) => {
|
|
1955
|
-
i(o, e.target.value), r(o,
|
|
1948
|
+
i(o, e.target.value), r(o, yi(e.currentTarget));
|
|
1956
1949
|
},
|
|
1957
1950
|
onClick: c,
|
|
1958
1951
|
onFocus: c,
|
|
1959
|
-
onKeyDown:
|
|
1952
|
+
onKeyDown: vi,
|
|
1960
1953
|
onKeyUp: c,
|
|
1961
|
-
onMouseDown:
|
|
1954
|
+
onMouseDown: vi,
|
|
1962
1955
|
onSelect: c,
|
|
1963
1956
|
placeholder: a,
|
|
1964
1957
|
ref: t,
|
|
1965
1958
|
size: Math.max(1, Math.min(Array.from(s || a).length + 1, 12)),
|
|
1966
|
-
style: { width:
|
|
1959
|
+
style: { width: gi(s, a, e) },
|
|
1967
1960
|
type: "text",
|
|
1968
1961
|
value: s
|
|
1969
1962
|
});
|
|
1970
1963
|
}
|
|
1971
|
-
function
|
|
1964
|
+
function xi(e) {
|
|
1972
1965
|
return e === "absolute" ? ["|", "|"] : e === "angle" ? ["⟨", "⟩"] : e === "brace" ? ["{", "}"] : e === "ceiling" ? ["⌈", "⌉"] : e === "doubleAbsolute" ? ["‖", "‖"] : e === "floor" ? ["⌊", "⌋"] : e === "square" ? ["[", "]"] : ["(", ")"];
|
|
1973
1966
|
}
|
|
1974
|
-
function
|
|
1967
|
+
function Si(e) {
|
|
1975
1968
|
return {
|
|
1976
1969
|
intersection: "⋂",
|
|
1977
1970
|
product: "∏",
|
|
@@ -1979,7 +1972,7 @@ function wi(e) {
|
|
|
1979
1972
|
union: "⋃"
|
|
1980
1973
|
}[e];
|
|
1981
1974
|
}
|
|
1982
|
-
function
|
|
1975
|
+
function Ci(e) {
|
|
1983
1976
|
return {
|
|
1984
1977
|
contour: "∮",
|
|
1985
1978
|
double: "∫∫",
|
|
@@ -1987,7 +1980,7 @@ function Ti(e) {
|
|
|
1987
1980
|
triple: "∫∫∫"
|
|
1988
1981
|
}[e || "single"];
|
|
1989
1982
|
}
|
|
1990
|
-
var
|
|
1983
|
+
var wi = j.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r, onActiveSlotChange: i, onSlotSelectionChange: a, onSlotChange: o, slotPrefix: s = "" }) {
|
|
1991
1984
|
let c = j.useRef({}), l = j.useCallback((e) => (t) => {
|
|
1992
1985
|
c.current[e] = t;
|
|
1993
1986
|
}, []);
|
|
@@ -2019,7 +2012,7 @@ var Ei = j.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
2019
2012
|
t,
|
|
2020
2013
|
i,
|
|
2021
2014
|
s
|
|
2022
|
-
]), d = j.useCallback((r, c, u, d =
|
|
2015
|
+
]), d = j.useCallback((r, c, u, d = mi) => {
|
|
2023
2016
|
let f = `${s}${r}`;
|
|
2024
2017
|
return c && typeof c != "string" ? /* @__PURE__ */ N("span", {
|
|
2025
2018
|
className: "rj-editor-equation-nested",
|
|
@@ -2032,7 +2025,7 @@ var Ei = j.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
2032
2025
|
onSlotChange: o,
|
|
2033
2026
|
slotPrefix: `${f}>`
|
|
2034
2027
|
})
|
|
2035
|
-
}, f) : /* @__PURE__ */ N(
|
|
2028
|
+
}, f) : /* @__PURE__ */ N(bi, {
|
|
2036
2029
|
className: u,
|
|
2037
2030
|
inputRef: l(f),
|
|
2038
2031
|
onActiveSlotChange: i,
|
|
@@ -2065,7 +2058,7 @@ var Ei = j.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
2065
2058
|
}), d("accent.value", r.value)]
|
|
2066
2059
|
});
|
|
2067
2060
|
if (r.kind === "bracket") {
|
|
2068
|
-
let [e, t] =
|
|
2061
|
+
let [e, t] = xi(r.bracket);
|
|
2069
2062
|
return /* @__PURE__ */ P("span", {
|
|
2070
2063
|
className: "rj-editor-equation-visual rj-editor-equation-visual--bracket",
|
|
2071
2064
|
children: [
|
|
@@ -2117,7 +2110,7 @@ var Ei = j.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
2117
2110
|
r.upper === void 0 ? /* @__PURE__ */ N("span", {}) : d("integral.upper", r.upper, "rj-editor-equation-slot-input--limit", "b"),
|
|
2118
2111
|
/* @__PURE__ */ N("span", {
|
|
2119
2112
|
className: "rj-editor-equation-large-symbol",
|
|
2120
|
-
children:
|
|
2113
|
+
children: Ci(r.variant)
|
|
2121
2114
|
}),
|
|
2122
2115
|
r.lower === void 0 ? /* @__PURE__ */ N("span", {}) : d("integral.lower", r.lower, "rj-editor-equation-slot-input--limit", "a")
|
|
2123
2116
|
]
|
|
@@ -2135,7 +2128,7 @@ var Ei = j.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
2135
2128
|
d("largeOperator.upper", r.upper, "rj-editor-equation-slot-input--limit", "n"),
|
|
2136
2129
|
/* @__PURE__ */ N("span", {
|
|
2137
2130
|
className: "rj-editor-equation-large-symbol",
|
|
2138
|
-
children:
|
|
2131
|
+
children: Si(r.operator)
|
|
2139
2132
|
}),
|
|
2140
2133
|
d("largeOperator.lower", r.lower, "rj-editor-equation-slot-input--limit", "i=1")
|
|
2141
2134
|
]
|
|
@@ -2194,13 +2187,13 @@ var Ei = j.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
2194
2187
|
})
|
|
2195
2188
|
]
|
|
2196
2189
|
}) : r.kind === "script" ? r.position === "before" ? /* @__PURE__ */ P("span", {
|
|
2197
|
-
className:
|
|
2190
|
+
className: _i(r),
|
|
2198
2191
|
children: [/* @__PURE__ */ P("span", {
|
|
2199
2192
|
className: "rj-editor-equation-script-stack",
|
|
2200
2193
|
children: [r.superscript === void 0 ? null : d("script.superscript", r.superscript, "rj-editor-equation-slot-input--script", "n"), r.subscript === void 0 ? null : d("script.subscript", r.subscript, "rj-editor-equation-slot-input--script", "1")]
|
|
2201
2194
|
}), d("script.base", r.base, void 0, "Y")]
|
|
2202
2195
|
}) : /* @__PURE__ */ P("span", {
|
|
2203
|
-
className:
|
|
2196
|
+
className: _i(r),
|
|
2204
2197
|
children: [d("script.base", r.base, void 0, "x"), /* @__PURE__ */ P("span", {
|
|
2205
2198
|
className: "rj-editor-equation-script-stack",
|
|
2206
2199
|
children: [r.superscript === void 0 ? null : d("script.superscript", r.superscript, "rj-editor-equation-slot-input--script", "2"), r.subscript === void 0 ? null : d("script.subscript", r.subscript, "rj-editor-equation-slot-input--script", "i")]
|
|
@@ -2218,22 +2211,22 @@ var Ei = j.memo(function e({ activeSlotId: t, activeSlotSelection: n, model: r,
|
|
|
2218
2211
|
}), u(c + 1)] }, `${s}row.items.${c}`))]
|
|
2219
2212
|
}) : /* @__PURE__ */ N("span", {
|
|
2220
2213
|
className: "rj-editor-equation-visual",
|
|
2221
|
-
children: d("text.value", r.value, void 0, s ?
|
|
2214
|
+
children: d("text.value", r.value, void 0, s ? mi : hi)
|
|
2222
2215
|
});
|
|
2223
2216
|
});
|
|
2224
2217
|
//#endregion
|
|
2225
2218
|
//#region src/components/equation/EquationComponent.tsx
|
|
2226
|
-
function
|
|
2219
|
+
function Ti(e, t) {
|
|
2227
2220
|
let n = l(e);
|
|
2228
|
-
|
|
2221
|
+
Ai(n) && t(n);
|
|
2229
2222
|
}
|
|
2230
|
-
var
|
|
2231
|
-
let [r] = F(), i = G(), a = j.useRef(""), o = j.useRef({}), s = j.useRef(null), [c, l] = j.useState(""), [u, d] = j.useState(), [f, p, m] =
|
|
2223
|
+
var Ei = j.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
2224
|
+
let [r] = F(), i = G(), a = j.useRef(""), o = j.useRef({}), s = j.useRef(null), [c, l] = j.useState(""), [u, d] = j.useState(), [f, p, m] = st(n), h = j.useMemo(() => It(t), [t]), g = j.useMemo(() => t.trim() ? Fr(t, e) : "", [e, t]), _ = j.useMemo(() => !h && !/[\\{}_^]/.test(t), [t, h]), v = j.useCallback((t) => {
|
|
2232
2225
|
r.update(() => {
|
|
2233
|
-
|
|
2234
|
-
|
|
2226
|
+
Ti(n, (e) => {
|
|
2227
|
+
Ai(e) && e.setEquation(t);
|
|
2235
2228
|
});
|
|
2236
|
-
}), i(
|
|
2229
|
+
}), i(Wr({
|
|
2237
2230
|
isEquationSelected: !0,
|
|
2238
2231
|
selectedEquation: t,
|
|
2239
2232
|
selectedEquationDisplayMode: e,
|
|
@@ -2249,11 +2242,11 @@ var Oi = j.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
2249
2242
|
}, []), b = j.useCallback((e, t) => {
|
|
2250
2243
|
o.current[e] = t, y(e, t);
|
|
2251
2244
|
}, [y]), x = j.useCallback((e) => {
|
|
2252
|
-
v(
|
|
2245
|
+
v(Lt(e));
|
|
2253
2246
|
}, [v]), S = j.useCallback((e, t) => {
|
|
2254
2247
|
h && x(I(h, e, t));
|
|
2255
2248
|
}, [h, x]), w = j.useCallback(() => {
|
|
2256
|
-
m(), p(!0), h && y(a.current || R(h)), i(
|
|
2249
|
+
m(), p(!0), h && y(a.current || R(h)), i(Wr({
|
|
2257
2250
|
isEquationSelected: !0,
|
|
2258
2251
|
selectedEquation: t,
|
|
2259
2252
|
selectedEquationDisplayMode: e,
|
|
@@ -2280,11 +2273,11 @@ var Oi = j.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
2280
2273
|
]), j.useEffect(() => {
|
|
2281
2274
|
if (!f) return;
|
|
2282
2275
|
let e = r.registerCommand(re, (e) => e.target instanceof HTMLInputElement ? !1 : (e.preventDefault(), r.update(() => {
|
|
2283
|
-
|
|
2276
|
+
Ti(n, (e) => {
|
|
2284
2277
|
e?.remove();
|
|
2285
2278
|
});
|
|
2286
2279
|
}), !0), C), t = r.registerCommand(ne, (e) => e.target instanceof HTMLInputElement ? !1 : (e.preventDefault(), r.update(() => {
|
|
2287
|
-
|
|
2280
|
+
Ti(n, (e) => {
|
|
2288
2281
|
e?.remove();
|
|
2289
2282
|
});
|
|
2290
2283
|
}), !0), C);
|
|
@@ -2300,10 +2293,10 @@ var Oi = j.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
2300
2293
|
let e = (e) => {
|
|
2301
2294
|
let n = e.detail;
|
|
2302
2295
|
if (!n) return;
|
|
2303
|
-
let r =
|
|
2296
|
+
let r = It(n);
|
|
2304
2297
|
if (r) {
|
|
2305
2298
|
if (h) {
|
|
2306
|
-
let e = a.current || R(h), t =
|
|
2299
|
+
let e = a.current || R(h), t = Xt(h, e, r, o.current[e]);
|
|
2307
2300
|
y(t.activeSlotId), x(t.model);
|
|
2308
2301
|
return;
|
|
2309
2302
|
}
|
|
@@ -2311,7 +2304,7 @@ var Oi = j.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
2311
2304
|
return;
|
|
2312
2305
|
}
|
|
2313
2306
|
if (h) {
|
|
2314
|
-
let e = a.current || R(h), t =
|
|
2307
|
+
let e = a.current || R(h), t = kt(h, e, n, o.current[e]);
|
|
2315
2308
|
y(t.activeSlotId, t.selection), x(t.model);
|
|
2316
2309
|
return;
|
|
2317
2310
|
}
|
|
@@ -2325,8 +2318,8 @@ var Oi = j.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
2325
2318
|
i.focus(), i.setSelectionRange(d, d);
|
|
2326
2319
|
});
|
|
2327
2320
|
};
|
|
2328
|
-
return window.addEventListener(
|
|
2329
|
-
window.removeEventListener(
|
|
2321
|
+
return window.addEventListener($t, e), () => {
|
|
2322
|
+
window.removeEventListener($t, e);
|
|
2330
2323
|
};
|
|
2331
2324
|
}, [
|
|
2332
2325
|
t,
|
|
@@ -2350,7 +2343,7 @@ var Oi = j.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
2350
2343
|
tabIndex: -1,
|
|
2351
2344
|
children: f ? /* @__PURE__ */ P("span", {
|
|
2352
2345
|
className: "rj-editor-equation-editor",
|
|
2353
|
-
children: [h ? /* @__PURE__ */ N(
|
|
2346
|
+
children: [h ? /* @__PURE__ */ N(wi, {
|
|
2354
2347
|
activeSlotId: c || R(h),
|
|
2355
2348
|
activeSlotSelection: u,
|
|
2356
2349
|
model: h,
|
|
@@ -2391,14 +2384,14 @@ var Oi = j.memo(function({ displayMode: e, equation: t, nodeKey: n }) {
|
|
|
2391
2384
|
});
|
|
2392
2385
|
//#endregion
|
|
2393
2386
|
//#region src/nodes/EquationNode.tsx
|
|
2394
|
-
function
|
|
2387
|
+
function Di(e) {
|
|
2395
2388
|
let t = e.getAttribute("data-equation");
|
|
2396
|
-
return t ? { node:
|
|
2389
|
+
return t ? { node: ki({
|
|
2397
2390
|
displayMode: e.getAttribute("data-display-mode") === "inline" ? "inline" : "block",
|
|
2398
2391
|
equation: t
|
|
2399
2392
|
}) } : null;
|
|
2400
2393
|
}
|
|
2401
|
-
var
|
|
2394
|
+
var Oi = class e extends T {
|
|
2402
2395
|
__displayMode;
|
|
2403
2396
|
__equation;
|
|
2404
2397
|
static clone(t) {
|
|
@@ -2410,17 +2403,17 @@ var Ai = class e extends T {
|
|
|
2410
2403
|
static importDOM() {
|
|
2411
2404
|
return {
|
|
2412
2405
|
div: (e) => e.hasAttribute("data-equation") ? {
|
|
2413
|
-
conversion:
|
|
2406
|
+
conversion: Di,
|
|
2414
2407
|
priority: 1
|
|
2415
2408
|
} : null,
|
|
2416
2409
|
span: (e) => e.hasAttribute("data-equation") ? {
|
|
2417
|
-
conversion:
|
|
2410
|
+
conversion: Di,
|
|
2418
2411
|
priority: 1
|
|
2419
2412
|
} : null
|
|
2420
2413
|
};
|
|
2421
2414
|
}
|
|
2422
2415
|
static importJSON(e) {
|
|
2423
|
-
return
|
|
2416
|
+
return ki({
|
|
2424
2417
|
displayMode: e.displayMode,
|
|
2425
2418
|
equation: e.equation
|
|
2426
2419
|
});
|
|
@@ -2433,7 +2426,7 @@ var Ai = class e extends T {
|
|
|
2433
2426
|
return t.className = e.theme.equation || "rj-editor-equation-node", t;
|
|
2434
2427
|
}
|
|
2435
2428
|
decorate() {
|
|
2436
|
-
return /* @__PURE__ */ N(
|
|
2429
|
+
return /* @__PURE__ */ N(Ei, {
|
|
2437
2430
|
displayMode: this.__displayMode,
|
|
2438
2431
|
equation: this.__equation,
|
|
2439
2432
|
nodeKey: this.__key
|
|
@@ -2443,7 +2436,7 @@ var Ai = class e extends T {
|
|
|
2443
2436
|
let e = this.__displayMode === "inline" ? document.createElement("span") : document.createElement("div");
|
|
2444
2437
|
e.setAttribute("data-equation", this.__equation), e.setAttribute("data-display-mode", this.__displayMode);
|
|
2445
2438
|
try {
|
|
2446
|
-
e.innerHTML =
|
|
2439
|
+
e.innerHTML = Fr(this.__equation, this.__displayMode);
|
|
2447
2440
|
} catch {
|
|
2448
2441
|
e.textContent = this.__equation;
|
|
2449
2442
|
}
|
|
@@ -2481,41 +2474,41 @@ var Ai = class e extends T {
|
|
|
2481
2474
|
return !1;
|
|
2482
2475
|
}
|
|
2483
2476
|
};
|
|
2484
|
-
function
|
|
2485
|
-
return new
|
|
2477
|
+
function ki({ displayMode: e = "block", equation: t }) {
|
|
2478
|
+
return new Oi(t, e);
|
|
2486
2479
|
}
|
|
2487
|
-
function
|
|
2488
|
-
return e instanceof
|
|
2480
|
+
function Ai(e) {
|
|
2481
|
+
return e instanceof Oi;
|
|
2489
2482
|
}
|
|
2490
2483
|
//#endregion
|
|
2491
2484
|
//#region src/nodes/ExtendedCodeNode.ts
|
|
2492
|
-
var
|
|
2493
|
-
function
|
|
2494
|
-
return e?.trim().slice(0,
|
|
2485
|
+
var ji = "data-rj-code-title", Mi = "data-rj-code-custom-title", Ni = 80;
|
|
2486
|
+
function Pi(e) {
|
|
2487
|
+
return e?.trim().slice(0, Ni) || void 0;
|
|
2495
2488
|
}
|
|
2496
|
-
function
|
|
2497
|
-
return
|
|
2489
|
+
function Fi(e, t) {
|
|
2490
|
+
return Pi(e) || t || "plain";
|
|
2498
2491
|
}
|
|
2499
|
-
function
|
|
2500
|
-
let r =
|
|
2501
|
-
e.setAttribute(
|
|
2492
|
+
function Ii(e, t, n) {
|
|
2493
|
+
let r = Pi(t);
|
|
2494
|
+
e.setAttribute(ji, Fi(r, n)), r ? e.setAttribute(Mi, r) : e.removeAttribute(Mi);
|
|
2502
2495
|
}
|
|
2503
|
-
function
|
|
2504
|
-
return
|
|
2496
|
+
function Li(e) {
|
|
2497
|
+
return Pi(e.getAttribute("data-rj-code-custom-title") || e.getAttribute("data-rj-code-title") || e.getAttribute("data-title"));
|
|
2505
2498
|
}
|
|
2506
|
-
function
|
|
2499
|
+
function Ri(e) {
|
|
2507
2500
|
return e ? {
|
|
2508
2501
|
...e,
|
|
2509
2502
|
priority: Math.min((e.priority || 0) + 1, 4),
|
|
2510
2503
|
conversion: (t) => {
|
|
2511
2504
|
let n = e.conversion(t);
|
|
2512
2505
|
if (!n) return n;
|
|
2513
|
-
let r = n.node, a =
|
|
2514
|
-
return !Array.isArray(r) && i(r) && (o.node =
|
|
2506
|
+
let r = n.node, a = Li(t), o = { ...n };
|
|
2507
|
+
return !Array.isArray(r) && i(r) && (o.node = Wi(r).setTitle(a)), o;
|
|
2515
2508
|
}
|
|
2516
2509
|
} : null;
|
|
2517
2510
|
}
|
|
2518
|
-
var
|
|
2511
|
+
var zi = class e extends n {
|
|
2519
2512
|
__title;
|
|
2520
2513
|
static clone(t) {
|
|
2521
2514
|
return new e(t.__language, t.__title, t.__key);
|
|
@@ -2525,28 +2518,28 @@ var Vi = class e extends n {
|
|
|
2525
2518
|
}
|
|
2526
2519
|
static importDOM() {
|
|
2527
2520
|
let e = n.importDOM();
|
|
2528
|
-
return e ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, (e) =>
|
|
2521
|
+
return e ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, (e) => Ri(t(e))])) : null;
|
|
2529
2522
|
}
|
|
2530
2523
|
static importJSON(e) {
|
|
2531
|
-
return
|
|
2524
|
+
return Bi().updateFromJSON(e);
|
|
2532
2525
|
}
|
|
2533
2526
|
constructor(e, t, n) {
|
|
2534
|
-
super(e, n), this.__title =
|
|
2527
|
+
super(e, n), this.__title = Pi(t);
|
|
2535
2528
|
}
|
|
2536
2529
|
afterCloneFrom(e) {
|
|
2537
2530
|
super.afterCloneFrom(e), this.__title = e.__title;
|
|
2538
2531
|
}
|
|
2539
2532
|
createDOM(e) {
|
|
2540
2533
|
let t = super.createDOM(e);
|
|
2541
|
-
return
|
|
2534
|
+
return Ii(t, this.getTitle(), this.getLanguage()), t;
|
|
2542
2535
|
}
|
|
2543
2536
|
updateDOM(e, t, n) {
|
|
2544
2537
|
let r = e.__title !== this.__title || e.__language !== this.__language, i = super.updateDOM(e, t, n);
|
|
2545
|
-
return r &&
|
|
2538
|
+
return r && Ii(t, this.getTitle(), this.getLanguage()), i;
|
|
2546
2539
|
}
|
|
2547
2540
|
exportDOM(e) {
|
|
2548
2541
|
let t = super.exportDOM(e);
|
|
2549
|
-
return t.element instanceof HTMLElement &&
|
|
2542
|
+
return t.element instanceof HTMLElement && Ii(t.element, this.getTitle(), this.getLanguage()), t;
|
|
2550
2543
|
}
|
|
2551
2544
|
updateFromJSON(e) {
|
|
2552
2545
|
return super.updateFromJSON(e).setTitle(e.codeBlockTitle);
|
|
@@ -2561,34 +2554,34 @@ var Vi = class e extends n {
|
|
|
2561
2554
|
}
|
|
2562
2555
|
setTitle(e) {
|
|
2563
2556
|
let t = this.getWritable();
|
|
2564
|
-
return t.__title =
|
|
2557
|
+
return t.__title = Pi(e), t;
|
|
2565
2558
|
}
|
|
2566
2559
|
getTitle() {
|
|
2567
2560
|
return this.getLatest().__title;
|
|
2568
2561
|
}
|
|
2569
2562
|
getDisplayTitle() {
|
|
2570
|
-
return
|
|
2563
|
+
return Fi(this.getTitle(), this.getLanguage());
|
|
2571
2564
|
}
|
|
2572
2565
|
};
|
|
2573
|
-
function
|
|
2574
|
-
return a(new
|
|
2566
|
+
function Bi(e, t) {
|
|
2567
|
+
return a(new zi(e, t));
|
|
2575
2568
|
}
|
|
2576
|
-
function
|
|
2577
|
-
return e instanceof
|
|
2569
|
+
function Vi(e) {
|
|
2570
|
+
return e instanceof zi;
|
|
2578
2571
|
}
|
|
2579
|
-
function
|
|
2580
|
-
return
|
|
2572
|
+
function Hi(e) {
|
|
2573
|
+
return Vi(e) ? e.getTitle() : void 0;
|
|
2581
2574
|
}
|
|
2582
|
-
function
|
|
2583
|
-
return
|
|
2575
|
+
function Ui(e) {
|
|
2576
|
+
return Vi(e) ? e.getDisplayTitle() : Fi(void 0, e.getLanguage());
|
|
2584
2577
|
}
|
|
2585
|
-
function
|
|
2586
|
-
let t = new
|
|
2578
|
+
function Wi(e) {
|
|
2579
|
+
let t = new zi(e.getLanguage(), Hi(e));
|
|
2587
2580
|
return t.setTheme(e.getTheme()), t.setStyle(e.getStyle()), t;
|
|
2588
2581
|
}
|
|
2589
2582
|
//#endregion
|
|
2590
2583
|
//#region src/nodes/ExtendedTextNode.ts
|
|
2591
|
-
var
|
|
2584
|
+
var Gi = [
|
|
2592
2585
|
"b",
|
|
2593
2586
|
"code",
|
|
2594
2587
|
"em",
|
|
@@ -2602,34 +2595,34 @@ var qi = [
|
|
|
2602
2595
|
"sup",
|
|
2603
2596
|
"u"
|
|
2604
2597
|
];
|
|
2605
|
-
function
|
|
2606
|
-
let t = [], n = e.style.backgroundColor, r = e.style.color || e.getAttribute("color") || "", i =
|
|
2598
|
+
function Ki(e) {
|
|
2599
|
+
let t = [], n = e.style.backgroundColor, r = e.style.color || e.getAttribute("color") || "", i = dn(e.style.fontFamily || e.getAttribute("face") || ""), a = pn(e.style.fontSize), o = e.style.lineHeight;
|
|
2607
2600
|
return n && t.push(`background-color: ${n}`), r && t.push(`color: ${r}`), i && t.push(`font-family: ${i}`), a && t.push(`font-size: ${a}`), o && t.push(`line-height: ${o}`), t.join("; ");
|
|
2608
2601
|
}
|
|
2609
|
-
function
|
|
2602
|
+
function qi(e, t) {
|
|
2610
2603
|
return e ? t ? `${e}; ${t}` : e : t;
|
|
2611
2604
|
}
|
|
2612
|
-
function
|
|
2605
|
+
function Ji(e) {
|
|
2613
2606
|
return e ? {
|
|
2614
2607
|
...e,
|
|
2615
2608
|
conversion: (t) => {
|
|
2616
2609
|
let n = e.conversion(t);
|
|
2617
2610
|
if (!n) return n;
|
|
2618
|
-
let r = n.forChild, i =
|
|
2611
|
+
let r = n.forChild, i = Ki(t), a = t.tagName.toLowerCase() === "code";
|
|
2619
2612
|
return !i && !a ? n : {
|
|
2620
2613
|
...n,
|
|
2621
2614
|
forChild: (e, t) => {
|
|
2622
2615
|
let n = r ? r(e, t) : e;
|
|
2623
|
-
return g(n) && (i && n.setStyle(
|
|
2616
|
+
return g(n) && (i && n.setStyle(qi(n.getStyle(), i)), a && !n.hasFormat("code") && n.toggleFormat("code")), n;
|
|
2624
2617
|
}
|
|
2625
2618
|
};
|
|
2626
2619
|
}
|
|
2627
2620
|
} : null;
|
|
2628
2621
|
}
|
|
2629
|
-
function
|
|
2622
|
+
function Yi(e, t) {
|
|
2630
2623
|
return t.setDetail(e.getDetail()), t.setFormat(e.getFormat()), t.setMode(e.getMode()), t.setStyle(e.getStyle()), t;
|
|
2631
2624
|
}
|
|
2632
|
-
var
|
|
2625
|
+
var Xi = class e extends le {
|
|
2633
2626
|
static clone(t) {
|
|
2634
2627
|
return new e(t.__text, t.__key);
|
|
2635
2628
|
}
|
|
@@ -2640,13 +2633,13 @@ var Qi = class e extends le {
|
|
|
2640
2633
|
let e = le.importDOM();
|
|
2641
2634
|
if (!e) return null;
|
|
2642
2635
|
let t = { ...e };
|
|
2643
|
-
return
|
|
2636
|
+
return Gi.forEach((n) => {
|
|
2644
2637
|
let r = e[n];
|
|
2645
|
-
r && (t[n] = (e) =>
|
|
2638
|
+
r && (t[n] = (e) => Ji(r(e)));
|
|
2646
2639
|
}), t;
|
|
2647
2640
|
}
|
|
2648
2641
|
static importJSON(e) {
|
|
2649
|
-
return
|
|
2642
|
+
return Zi(e.text).updateFromJSON(e);
|
|
2650
2643
|
}
|
|
2651
2644
|
constructor(e = "", t) {
|
|
2652
2645
|
super(e, t);
|
|
@@ -2659,15 +2652,15 @@ var Qi = class e extends le {
|
|
|
2659
2652
|
};
|
|
2660
2653
|
}
|
|
2661
2654
|
};
|
|
2662
|
-
function
|
|
2663
|
-
return new
|
|
2655
|
+
function Zi(e = "") {
|
|
2656
|
+
return new Xi(e);
|
|
2664
2657
|
}
|
|
2665
|
-
function
|
|
2666
|
-
return
|
|
2658
|
+
function Qi(e) {
|
|
2659
|
+
return Yi(e, Zi(e.getTextContent()));
|
|
2667
2660
|
}
|
|
2668
2661
|
//#endregion
|
|
2669
2662
|
//#region src/assets/icons/AlignCenterIcon.tsx
|
|
2670
|
-
function
|
|
2663
|
+
function $i(e) {
|
|
2671
2664
|
return /* @__PURE__ */ N("svg", {
|
|
2672
2665
|
width: "24",
|
|
2673
2666
|
height: "24",
|
|
@@ -2685,7 +2678,7 @@ function ta(e) {
|
|
|
2685
2678
|
}
|
|
2686
2679
|
//#endregion
|
|
2687
2680
|
//#region src/assets/icons/AlignLeftIcon.tsx
|
|
2688
|
-
function
|
|
2681
|
+
function ea(e) {
|
|
2689
2682
|
return /* @__PURE__ */ N("svg", {
|
|
2690
2683
|
width: "24",
|
|
2691
2684
|
height: "24",
|
|
@@ -2703,7 +2696,7 @@ function na(e) {
|
|
|
2703
2696
|
}
|
|
2704
2697
|
//#endregion
|
|
2705
2698
|
//#region src/assets/icons/AlignRightIcon.tsx
|
|
2706
|
-
function
|
|
2699
|
+
function ta(e) {
|
|
2707
2700
|
return /* @__PURE__ */ N("svg", {
|
|
2708
2701
|
width: "24",
|
|
2709
2702
|
height: "24",
|
|
@@ -2721,7 +2714,7 @@ function ra(e) {
|
|
|
2721
2714
|
}
|
|
2722
2715
|
//#endregion
|
|
2723
2716
|
//#region src/assets/icons/TrashIcon03.tsx
|
|
2724
|
-
function
|
|
2717
|
+
function na(e) {
|
|
2725
2718
|
return /* @__PURE__ */ N("svg", {
|
|
2726
2719
|
width: "24",
|
|
2727
2720
|
height: "24",
|
|
@@ -2739,13 +2732,19 @@ function ia(e) {
|
|
|
2739
2732
|
}
|
|
2740
2733
|
//#endregion
|
|
2741
2734
|
//#region src/components/rj-text-editor/RJEditorImageUploadContext.ts
|
|
2742
|
-
var
|
|
2743
|
-
|
|
2744
|
-
|
|
2735
|
+
var ra = j.createContext({
|
|
2736
|
+
isUploading: !1,
|
|
2737
|
+
uploadImage: Er
|
|
2738
|
+
});
|
|
2739
|
+
function ia() {
|
|
2740
|
+
return j.useContext(ra).uploadImage;
|
|
2741
|
+
}
|
|
2742
|
+
function aa() {
|
|
2743
|
+
return j.useContext(ra);
|
|
2745
2744
|
}
|
|
2746
2745
|
//#endregion
|
|
2747
2746
|
//#region src/assets/icons/RefreshCcwIcon05.tsx
|
|
2748
|
-
function
|
|
2747
|
+
function oa(e) {
|
|
2749
2748
|
return /* @__PURE__ */ N("svg", {
|
|
2750
2749
|
width: "24",
|
|
2751
2750
|
height: "24",
|
|
@@ -2763,7 +2762,7 @@ function sa(e) {
|
|
|
2763
2762
|
}
|
|
2764
2763
|
//#endregion
|
|
2765
2764
|
//#region src/components/image/ImageComponent.tsx
|
|
2766
|
-
var
|
|
2765
|
+
var sa = 100, ca = 2e3, la = 10, ua = 32, da = 42, fa = 340, pa = 12, ma = [
|
|
2767
2766
|
"top-left",
|
|
2768
2767
|
"top",
|
|
2769
2768
|
"top-right",
|
|
@@ -2773,24 +2772,24 @@ var ca = 100, la = 2e3, ua = 10, da = 32, fa = 42, pa = 340, ma = 12, ha = [
|
|
|
2773
2772
|
"bottom-left",
|
|
2774
2773
|
"left"
|
|
2775
2774
|
];
|
|
2776
|
-
function
|
|
2775
|
+
function ha(e, t) {
|
|
2777
2776
|
let n = l(e);
|
|
2778
2777
|
J(n) && t(n);
|
|
2779
2778
|
}
|
|
2780
|
-
function
|
|
2779
|
+
function ga(e, t) {
|
|
2781
2780
|
let n = t?.getBoundingClientRect();
|
|
2782
2781
|
if (!n) return {
|
|
2783
2782
|
x: 8,
|
|
2784
2783
|
y: 8
|
|
2785
2784
|
};
|
|
2786
|
-
let r = e.clientX - n.left, i = e.clientY - n.top, a = Math.max(8, n.width -
|
|
2785
|
+
let r = e.clientX - n.left, i = e.clientY - n.top, a = Math.max(8, n.width - fa - 8), o = Math.max(8, n.height - da - 8), s = r + pa, c = i + pa;
|
|
2787
2786
|
return {
|
|
2788
2787
|
x: Math.min(Math.max(s, 8), a),
|
|
2789
|
-
y: Math.max(c > o ? i -
|
|
2788
|
+
y: Math.max(c > o ? i - da - pa : c, 8)
|
|
2790
2789
|
};
|
|
2791
2790
|
}
|
|
2792
|
-
function
|
|
2793
|
-
let [h] = F(), g = q(), _ =
|
|
2791
|
+
function _a({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r, borderRadius: i, caption: a, height: o, linkUrl: s, nodeKey: c, objectFit: l, rotation: u, shadowEnabled: d, src: f, textWrap: p, width: m }) {
|
|
2792
|
+
let [h] = F(), g = q(), _ = ia(), v = G(), [y, b, x] = st(c), S = j.useRef(null), w = j.useRef(null), ee = j.useRef(null), [T, E] = j.useState({
|
|
2794
2793
|
x: 0,
|
|
2795
2794
|
y: 0
|
|
2796
2795
|
}), [D, te] = j.useState(0), [ie, ae] = j.useState(1), [oe, se] = j.useState(!1), ce = (u % 360 + 360) % 360, O = ce === 90 || ce === 270, le = p === "square" && e !== "center";
|
|
@@ -2810,11 +2809,11 @@ function va({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2810
2809
|
}, []), j.useEffect(() => {
|
|
2811
2810
|
if (!y) return;
|
|
2812
2811
|
let e = h.registerCommand(re, (e) => (e.preventDefault(), h.update(() => {
|
|
2813
|
-
|
|
2812
|
+
ha(c, (e) => {
|
|
2814
2813
|
e?.remove();
|
|
2815
2814
|
});
|
|
2816
2815
|
}), !0), C), t = h.registerCommand(ne, (e) => (e.preventDefault(), h.update(() => {
|
|
2817
|
-
|
|
2816
|
+
ha(c, (e) => {
|
|
2818
2817
|
e?.remove();
|
|
2819
2818
|
});
|
|
2820
2819
|
}), !0), C);
|
|
@@ -2828,20 +2827,20 @@ function va({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2828
2827
|
]);
|
|
2829
2828
|
let ue = (e) => {
|
|
2830
2829
|
h.update(() => {
|
|
2831
|
-
|
|
2830
|
+
ha(c, (t) => {
|
|
2832
2831
|
J(t) && t.setAlignment(e);
|
|
2833
2832
|
});
|
|
2834
2833
|
});
|
|
2835
2834
|
}, k = (e) => {
|
|
2836
2835
|
h.update(() => {
|
|
2837
|
-
|
|
2838
|
-
J(t) && t.setWidth(Math.min(
|
|
2836
|
+
ha(c, (t) => {
|
|
2837
|
+
J(t) && t.setWidth(Math.min(sa, Math.max(la, e)));
|
|
2839
2838
|
});
|
|
2840
2839
|
});
|
|
2841
2840
|
}, de = (e, t) => {
|
|
2842
2841
|
h.update(() => {
|
|
2843
|
-
|
|
2844
|
-
J(n) && (n.setWidth(Math.min(
|
|
2842
|
+
ha(c, (n) => {
|
|
2843
|
+
J(n) && (n.setWidth(Math.min(sa, Math.max(la, e))), n.setHeight(t === void 0 ? void 0 : Math.min(ca, Math.max(ua, t))));
|
|
2845
2844
|
});
|
|
2846
2845
|
}), b(!0);
|
|
2847
2846
|
}, fe = (e, t) => {
|
|
@@ -2864,7 +2863,7 @@ function va({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2864
2863
|
window.addEventListener("pointermove", d), window.addEventListener("pointerup", f);
|
|
2865
2864
|
}, pe = () => {
|
|
2866
2865
|
h.update(() => {
|
|
2867
|
-
|
|
2866
|
+
ha(c, (e) => {
|
|
2868
2867
|
e?.remove();
|
|
2869
2868
|
});
|
|
2870
2869
|
});
|
|
@@ -2889,7 +2888,7 @@ function va({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2889
2888
|
se(!1);
|
|
2890
2889
|
}
|
|
2891
2890
|
h.update(() => {
|
|
2892
|
-
|
|
2891
|
+
ha(c, (e) => {
|
|
2893
2892
|
J(e) && (e.setSrc(n), e.setAltText(t.name));
|
|
2894
2893
|
});
|
|
2895
2894
|
});
|
|
@@ -2947,19 +2946,19 @@ function va({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2947
2946
|
"aria-label": g.toolbar.image.alignLeft,
|
|
2948
2947
|
onClick: () => ue("left"),
|
|
2949
2948
|
type: "button",
|
|
2950
|
-
children: /* @__PURE__ */ N(
|
|
2949
|
+
children: /* @__PURE__ */ N(ea, { "aria-hidden": "true" })
|
|
2951
2950
|
}),
|
|
2952
2951
|
/* @__PURE__ */ N("button", {
|
|
2953
2952
|
"aria-label": g.toolbar.image.alignCenter,
|
|
2954
2953
|
onClick: () => ue("center"),
|
|
2955
2954
|
type: "button",
|
|
2956
|
-
children: /* @__PURE__ */ N(
|
|
2955
|
+
children: /* @__PURE__ */ N($i, { "aria-hidden": "true" })
|
|
2957
2956
|
}),
|
|
2958
2957
|
/* @__PURE__ */ N("button", {
|
|
2959
2958
|
"aria-label": g.toolbar.image.alignRight,
|
|
2960
2959
|
onClick: () => ue("right"),
|
|
2961
2960
|
type: "button",
|
|
2962
|
-
children: /* @__PURE__ */ N(
|
|
2961
|
+
children: /* @__PURE__ */ N(ta, { "aria-hidden": "true" })
|
|
2963
2962
|
}),
|
|
2964
2963
|
/* @__PURE__ */ N("button", {
|
|
2965
2964
|
onClick: () => k(25),
|
|
@@ -2980,16 +2979,16 @@ function va({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
2980
2979
|
"aria-busy": oe,
|
|
2981
2980
|
"aria-label": g.toolbar.image.replace,
|
|
2982
2981
|
disabled: oe,
|
|
2983
|
-
onClick: () => void
|
|
2982
|
+
onClick: () => void Tr(S.current),
|
|
2984
2983
|
type: "button",
|
|
2985
|
-
children: /* @__PURE__ */ N(
|
|
2984
|
+
children: /* @__PURE__ */ N(oa, { "aria-hidden": "true" })
|
|
2986
2985
|
}),
|
|
2987
2986
|
/* @__PURE__ */ N("button", {
|
|
2988
2987
|
"aria-label": g.toolbar.image.delete,
|
|
2989
2988
|
className: "rj-editor-toolbar--clear-btn",
|
|
2990
2989
|
onClick: pe,
|
|
2991
2990
|
type: "button",
|
|
2992
|
-
children: /* @__PURE__ */ N(
|
|
2991
|
+
children: /* @__PURE__ */ N(na, { "aria-hidden": "true" })
|
|
2993
2992
|
})
|
|
2994
2993
|
]
|
|
2995
2994
|
}) : null,
|
|
@@ -3002,7 +3001,7 @@ function va({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
3002
3001
|
O ? "is-quarter-turn" : ""
|
|
3003
3002
|
].filter(Boolean).join(" "),
|
|
3004
3003
|
onClick: (f) => {
|
|
3005
|
-
f.preventDefault(), f.stopPropagation(), x(), b(!0), E(
|
|
3004
|
+
f.preventDefault(), f.stopPropagation(), x(), b(!0), E(ga(f, w.current)), v(Gr({
|
|
3006
3005
|
isImageSelected: !0,
|
|
3007
3006
|
selectedImageAlignment: e,
|
|
3008
3007
|
selectedImageAltText: t,
|
|
@@ -3037,7 +3036,7 @@ function va({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
3037
3036
|
className: "rj-editor-image-caption",
|
|
3038
3037
|
children: a
|
|
3039
3038
|
}) : null,
|
|
3040
|
-
y ? /* @__PURE__ */ N(M, { children:
|
|
3039
|
+
y ? /* @__PURE__ */ N(M, { children: ma.map((e) => /* @__PURE__ */ N("span", {
|
|
3041
3040
|
"aria-hidden": "true",
|
|
3042
3041
|
className: ["rj-editor-image-resize-handle", `rj-editor-image-resize-handle--${e}`].join(" "),
|
|
3043
3042
|
onPointerDown: (t) => fe(t, e)
|
|
@@ -3056,68 +3055,68 @@ function va({ alignment: e, altText: t, aspectRatioLocked: n, borderEnabled: r,
|
|
|
3056
3055
|
}
|
|
3057
3056
|
//#endregion
|
|
3058
3057
|
//#region src/nodes/ImageNode.tsx
|
|
3059
|
-
function
|
|
3058
|
+
function va(e) {
|
|
3060
3059
|
return e === "square" || e === "around" ? "square" : "top-bottom";
|
|
3061
3060
|
}
|
|
3062
|
-
function
|
|
3061
|
+
function ya(e) {
|
|
3063
3062
|
return e === "left" || e === "right" || e === "center" ? e : "center";
|
|
3064
3063
|
}
|
|
3065
|
-
function
|
|
3064
|
+
function ba(e) {
|
|
3066
3065
|
return e === "cover" || e === "fill" || e === "contain" ? e : "contain";
|
|
3067
3066
|
}
|
|
3068
|
-
function
|
|
3067
|
+
function xa(e) {
|
|
3069
3068
|
let t = Number.parseFloat(e || "");
|
|
3070
3069
|
return Number.isFinite(t) ? t : void 0;
|
|
3071
3070
|
}
|
|
3072
|
-
function
|
|
3073
|
-
let t =
|
|
3071
|
+
function Sa(e) {
|
|
3072
|
+
let t = xa(e.getAttribute("data-width"));
|
|
3074
3073
|
if (t !== void 0) return t;
|
|
3075
|
-
let n = e.closest("[data-rj-image-caption-wrapper=\"true\"], [data-rj-image-rotation-wrapper=\"true\"]"), r =
|
|
3074
|
+
let n = e.closest("[data-rj-image-caption-wrapper=\"true\"], [data-rj-image-rotation-wrapper=\"true\"]"), r = xa(n?.style.width);
|
|
3076
3075
|
if (r !== void 0 && n?.style.width.includes("%")) return r;
|
|
3077
|
-
let i =
|
|
3076
|
+
let i = xa(e.style.width);
|
|
3078
3077
|
return i !== void 0 && e.style.width.includes("%") ? i : 100;
|
|
3079
3078
|
}
|
|
3080
|
-
function
|
|
3079
|
+
function Ca(e) {
|
|
3081
3080
|
let t = e.getAttribute("data-alignment");
|
|
3082
|
-
if (t) return
|
|
3081
|
+
if (t) return ya(t);
|
|
3083
3082
|
let n = e.closest("[data-rj-image-caption-wrapper=\"true\"], [data-rj-image-rotation-wrapper=\"true\"]") || e;
|
|
3084
3083
|
return n.style.float === "left" ? "left" : n.style.float === "right" || n.style.marginLeft === "auto" && ["0", "0rem"].includes(n.style.marginRight) ? "right" : ["0", "0rem"].includes(n.style.marginLeft) && n.style.marginRight === "auto" ? "left" : "center";
|
|
3085
3084
|
}
|
|
3086
|
-
function
|
|
3085
|
+
function wa(e) {
|
|
3087
3086
|
let t = e.getAttribute("data-text-wrap");
|
|
3088
|
-
return t ?
|
|
3087
|
+
return t ? va(t) : (e.closest("[data-rj-image-caption-wrapper=\"true\"], [data-rj-image-rotation-wrapper=\"true\"]") || e).style.float ? "square" : "top-bottom";
|
|
3089
3088
|
}
|
|
3090
|
-
function
|
|
3089
|
+
function Ta(e) {
|
|
3091
3090
|
return e.getAttribute("data-caption") || e.closest("[data-rj-image-caption-wrapper=\"true\"], [data-rj-image-rotation-wrapper=\"true\"]")?.querySelector(".rj-editor-image-caption")?.textContent || "";
|
|
3092
3091
|
}
|
|
3093
|
-
function
|
|
3092
|
+
function Ea(e) {
|
|
3094
3093
|
return e.getAttribute("data-link-url") || e.closest("a")?.href || "";
|
|
3095
3094
|
}
|
|
3096
|
-
function
|
|
3095
|
+
function Da(e) {
|
|
3097
3096
|
if (!(e instanceof HTMLImageElement)) return null;
|
|
3098
3097
|
let t = e.getAttribute("src");
|
|
3099
|
-
return t ? { node:
|
|
3100
|
-
alignment:
|
|
3098
|
+
return t ? { node: Aa({
|
|
3099
|
+
alignment: Ca(e),
|
|
3101
3100
|
altText: e.getAttribute("alt") || "",
|
|
3102
3101
|
aspectRatioLocked: e.getAttribute("data-aspect-ratio-locked") !== "false",
|
|
3103
3102
|
borderEnabled: !!e.style.border,
|
|
3104
|
-
borderRadius:
|
|
3105
|
-
caption:
|
|
3106
|
-
height:
|
|
3107
|
-
linkUrl:
|
|
3108
|
-
objectFit:
|
|
3109
|
-
rotation:
|
|
3103
|
+
borderRadius: xa(e.style.borderRadius) || 0,
|
|
3104
|
+
caption: Ta(e),
|
|
3105
|
+
height: xa(e.getAttribute("data-height")) || xa(e.style.height),
|
|
3106
|
+
linkUrl: Ea(e),
|
|
3107
|
+
objectFit: ba(e.getAttribute("data-object-fit") || e.style.objectFit),
|
|
3108
|
+
rotation: xa(e.getAttribute("data-rotation")) || 0,
|
|
3110
3109
|
shadowEnabled: !!e.style.boxShadow,
|
|
3111
3110
|
src: t,
|
|
3112
|
-
textWrap:
|
|
3113
|
-
width:
|
|
3111
|
+
textWrap: wa(e),
|
|
3112
|
+
width: Sa(e)
|
|
3114
3113
|
}) } : null;
|
|
3115
3114
|
}
|
|
3116
|
-
function
|
|
3115
|
+
function Oa(e) {
|
|
3117
3116
|
let t = e.querySelector("img");
|
|
3118
|
-
return t ?
|
|
3117
|
+
return t ? Da(t) : null;
|
|
3119
3118
|
}
|
|
3120
|
-
var
|
|
3119
|
+
var ka = class e extends T {
|
|
3121
3120
|
__alignment;
|
|
3122
3121
|
__aspectRatioLocked;
|
|
3123
3122
|
__altText;
|
|
@@ -3141,21 +3140,21 @@ var Aa = class e extends T {
|
|
|
3141
3140
|
static importDOM() {
|
|
3142
3141
|
return {
|
|
3143
3142
|
a: (e) => !(e instanceof HTMLAnchorElement) || !e.querySelector("img") ? null : {
|
|
3144
|
-
conversion:
|
|
3143
|
+
conversion: Oa,
|
|
3145
3144
|
priority: 2
|
|
3146
3145
|
},
|
|
3147
3146
|
img: () => ({
|
|
3148
|
-
conversion:
|
|
3147
|
+
conversion: Da,
|
|
3149
3148
|
priority: 0
|
|
3150
3149
|
}),
|
|
3151
3150
|
span: (e) => !(e instanceof HTMLElement) || e.getAttribute("data-rj-image-caption-wrapper") !== "true" && e.getAttribute("data-rj-image-rotation-wrapper") !== "true" ? null : {
|
|
3152
|
-
conversion:
|
|
3151
|
+
conversion: Oa,
|
|
3153
3152
|
priority: 2
|
|
3154
3153
|
}
|
|
3155
3154
|
};
|
|
3156
3155
|
}
|
|
3157
3156
|
static importJSON(e) {
|
|
3158
|
-
return
|
|
3157
|
+
return Aa({
|
|
3159
3158
|
alignment: e.alignment,
|
|
3160
3159
|
altText: e.altText,
|
|
3161
3160
|
aspectRatioLocked: e.aspectRatioLocked,
|
|
@@ -3168,7 +3167,7 @@ var Aa = class e extends T {
|
|
|
3168
3167
|
rotation: e.rotation,
|
|
3169
3168
|
shadowEnabled: e.shadowEnabled,
|
|
3170
3169
|
src: e.src,
|
|
3171
|
-
textWrap:
|
|
3170
|
+
textWrap: va(e.textWrap),
|
|
3172
3171
|
width: e.width
|
|
3173
3172
|
});
|
|
3174
3173
|
}
|
|
@@ -3180,7 +3179,7 @@ var Aa = class e extends T {
|
|
|
3180
3179
|
return t.className = e.theme.image || "rj-editor-image-node", t;
|
|
3181
3180
|
}
|
|
3182
3181
|
decorate() {
|
|
3183
|
-
return /* @__PURE__ */ N(
|
|
3182
|
+
return /* @__PURE__ */ N(_a, {
|
|
3184
3183
|
alignment: this.__alignment,
|
|
3185
3184
|
altText: this.__altText,
|
|
3186
3185
|
aspectRatioLocked: this.__aspectRatioLocked,
|
|
@@ -3330,23 +3329,23 @@ var Aa = class e extends T {
|
|
|
3330
3329
|
return !1;
|
|
3331
3330
|
}
|
|
3332
3331
|
};
|
|
3333
|
-
function
|
|
3334
|
-
return new
|
|
3332
|
+
function Aa({ alignment: e, aspectRatioLocked: t, altText: n, borderEnabled: r, borderRadius: i, caption: a, height: o, linkUrl: s, objectFit: c, rotation: l, shadowEnabled: u, src: d, textWrap: f, width: p }) {
|
|
3333
|
+
return new ka(d, n, p, e, a, o, s, c, f, i, r, u, l, t);
|
|
3335
3334
|
}
|
|
3336
3335
|
function J(e) {
|
|
3337
|
-
return e instanceof
|
|
3336
|
+
return e instanceof ka;
|
|
3338
3337
|
}
|
|
3339
3338
|
//#endregion
|
|
3340
3339
|
//#region src/components/youtube/YouTubeComponent.tsx
|
|
3341
|
-
function
|
|
3340
|
+
function ja(e) {
|
|
3342
3341
|
let t = l(e);
|
|
3343
|
-
|
|
3342
|
+
Ia(t) && t.remove();
|
|
3344
3343
|
}
|
|
3345
|
-
var
|
|
3346
|
-
let [r] = F(), [i, a, o] =
|
|
3344
|
+
var Ma = j.memo(function({ nodeKey: e, title: t, videoId: n }) {
|
|
3345
|
+
let [r] = F(), [i, a, o] = st(e), s = t || "YouTube video";
|
|
3347
3346
|
return j.useEffect(() => {
|
|
3348
3347
|
if (!i) return;
|
|
3349
|
-
let t = r.registerCommand(re, (t) => (t.preventDefault(), r.update(() =>
|
|
3348
|
+
let t = r.registerCommand(re, (t) => (t.preventDefault(), r.update(() => ja(e)), !0), C), n = r.registerCommand(ne, (t) => (t.preventDefault(), r.update(() => ja(e)), !0), C);
|
|
3350
3349
|
return () => {
|
|
3351
3350
|
t(), n();
|
|
3352
3351
|
};
|
|
@@ -3372,14 +3371,14 @@ var Na = j.memo(function({ nodeKey: e, title: t, videoId: n }) {
|
|
|
3372
3371
|
});
|
|
3373
3372
|
//#endregion
|
|
3374
3373
|
//#region src/nodes/YouTubeNode.tsx
|
|
3375
|
-
function
|
|
3376
|
-
let t =
|
|
3377
|
-
return t ? { node:
|
|
3374
|
+
function Na(e) {
|
|
3375
|
+
let t = Ut(e.getAttribute("data-youtube-video-id") || e.getAttribute("src") || "");
|
|
3376
|
+
return t ? { node: Fa({
|
|
3378
3377
|
title: e.getAttribute("title") || "",
|
|
3379
3378
|
videoId: t
|
|
3380
3379
|
}) } : null;
|
|
3381
3380
|
}
|
|
3382
|
-
var
|
|
3381
|
+
var Pa = class e extends T {
|
|
3383
3382
|
__title;
|
|
3384
3383
|
__videoId;
|
|
3385
3384
|
static clone(t) {
|
|
@@ -3389,13 +3388,13 @@ var Fa = class e extends T {
|
|
|
3389
3388
|
return "youtube";
|
|
3390
3389
|
}
|
|
3391
3390
|
static importDOM() {
|
|
3392
|
-
return { iframe: (e) =>
|
|
3393
|
-
conversion:
|
|
3391
|
+
return { iframe: (e) => Ut(e.getAttribute("src") || "") ? {
|
|
3392
|
+
conversion: Na,
|
|
3394
3393
|
priority: 1
|
|
3395
3394
|
} : null };
|
|
3396
3395
|
}
|
|
3397
3396
|
static importJSON(e) {
|
|
3398
|
-
return
|
|
3397
|
+
return Fa({
|
|
3399
3398
|
title: e.title,
|
|
3400
3399
|
videoId: e.videoId
|
|
3401
3400
|
});
|
|
@@ -3408,7 +3407,7 @@ var Fa = class e extends T {
|
|
|
3408
3407
|
return t.className = e.theme.youtube || "rj-editor-youtube-node", t;
|
|
3409
3408
|
}
|
|
3410
3409
|
decorate() {
|
|
3411
|
-
return /* @__PURE__ */ N(
|
|
3410
|
+
return /* @__PURE__ */ N(Ma, {
|
|
3412
3411
|
nodeKey: this.__key,
|
|
3413
3412
|
title: this.__title,
|
|
3414
3413
|
videoId: this.__videoId
|
|
@@ -3446,15 +3445,15 @@ var Fa = class e extends T {
|
|
|
3446
3445
|
return !1;
|
|
3447
3446
|
}
|
|
3448
3447
|
};
|
|
3449
|
-
function
|
|
3450
|
-
return new
|
|
3448
|
+
function Fa({ title: e = "", videoId: t }) {
|
|
3449
|
+
return new Pa(t, e);
|
|
3451
3450
|
}
|
|
3452
|
-
function
|
|
3453
|
-
return e instanceof
|
|
3451
|
+
function Ia(e) {
|
|
3452
|
+
return e instanceof Pa;
|
|
3454
3453
|
}
|
|
3455
3454
|
//#endregion
|
|
3456
3455
|
//#region src/components/rj-text-editor/editorTheme.ts
|
|
3457
|
-
var
|
|
3456
|
+
var La = {
|
|
3458
3457
|
code: "rj-editor-code-block",
|
|
3459
3458
|
codeHighlight: {
|
|
3460
3459
|
atrule: "rj-editor-code-token-atrule",
|
|
@@ -3516,46 +3515,63 @@ var Ra = {
|
|
|
3516
3515
|
};
|
|
3517
3516
|
//#endregion
|
|
3518
3517
|
//#region src/components/rj-text-editor/createInitialConfig.ts
|
|
3519
|
-
function
|
|
3518
|
+
function Ra({ defaultValue: e, namespace: r, value: i }) {
|
|
3520
3519
|
return {
|
|
3521
3520
|
namespace: r,
|
|
3522
3521
|
nodes: [
|
|
3523
3522
|
n,
|
|
3524
3523
|
t,
|
|
3525
|
-
|
|
3524
|
+
zi,
|
|
3526
3525
|
{
|
|
3527
3526
|
replace: n,
|
|
3528
|
-
with:
|
|
3529
|
-
withKlass:
|
|
3527
|
+
with: Wi,
|
|
3528
|
+
withKlass: zi
|
|
3530
3529
|
},
|
|
3531
|
-
|
|
3530
|
+
Xi,
|
|
3532
3531
|
{
|
|
3533
3532
|
replace: le,
|
|
3534
|
-
with:
|
|
3535
|
-
withKlass:
|
|
3533
|
+
with: Qi,
|
|
3534
|
+
withKlass: Xi
|
|
3536
3535
|
},
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3536
|
+
Oi,
|
|
3537
|
+
ka,
|
|
3538
|
+
Pa,
|
|
3539
|
+
Ne,
|
|
3540
|
+
Be,
|
|
3541
3541
|
ze,
|
|
3542
|
-
Re,
|
|
3543
|
-
tt,
|
|
3544
3542
|
nt,
|
|
3545
|
-
rt
|
|
3543
|
+
rt,
|
|
3544
|
+
it
|
|
3546
3545
|
],
|
|
3547
3546
|
onError(e) {
|
|
3548
3547
|
throw e;
|
|
3549
3548
|
},
|
|
3550
|
-
editorState: i || e ? (t) =>
|
|
3551
|
-
theme:
|
|
3549
|
+
editorState: i || e ? (t) => zr(t, i || e || "") : void 0,
|
|
3550
|
+
theme: La
|
|
3552
3551
|
};
|
|
3553
3552
|
}
|
|
3554
3553
|
//#endregion
|
|
3555
3554
|
//#region src/components/rj-text-editor/ImageUploadContext.tsx
|
|
3555
|
+
function za(e) {
|
|
3556
|
+
return `${e.type || "application/octet-stream"}:${e.size}`;
|
|
3557
|
+
}
|
|
3556
3558
|
function Ba({ children: e, onImageUpload: t }) {
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
+
let n = t || Er, r = j.useRef(/* @__PURE__ */ new Map()), [i, a] = j.useState(0), o = j.useCallback(async (e) => {
|
|
3560
|
+
let t = za(e), i = r.current.get(t);
|
|
3561
|
+
if (i) return i;
|
|
3562
|
+
let o = (async () => n(e))();
|
|
3563
|
+
r.current.set(t, o), a((e) => e + 1);
|
|
3564
|
+
try {
|
|
3565
|
+
return await o;
|
|
3566
|
+
} finally {
|
|
3567
|
+
r.current.delete(t), a((e) => Math.max(0, e - 1));
|
|
3568
|
+
}
|
|
3569
|
+
}, [n]), s = j.useMemo(() => ({
|
|
3570
|
+
isUploading: i > 0,
|
|
3571
|
+
uploadImage: o
|
|
3572
|
+
}), [i, o]);
|
|
3573
|
+
return /* @__PURE__ */ N(ra.Provider, {
|
|
3574
|
+
value: s,
|
|
3559
3575
|
children: e
|
|
3560
3576
|
});
|
|
3561
3577
|
}
|
|
@@ -3780,7 +3796,7 @@ function Za({ displayTitle: e, editor: t, language: n, nodeKey: r, title: a }) {
|
|
|
3780
3796
|
t.getEditorState().read(() => {
|
|
3781
3797
|
let t = l(r);
|
|
3782
3798
|
i(t) && (e = t.getTextContent());
|
|
3783
|
-
}), await
|
|
3799
|
+
}), await jt(e), d(!0);
|
|
3784
3800
|
}, x = (e) => {
|
|
3785
3801
|
let n = Ya(e);
|
|
3786
3802
|
t.update(() => {
|
|
@@ -3796,12 +3812,12 @@ function Za({ displayTitle: e, editor: t, language: n, nodeKey: r, title: a }) {
|
|
|
3796
3812
|
value: a || n
|
|
3797
3813
|
}), t.update(() => {
|
|
3798
3814
|
let e = l(r);
|
|
3799
|
-
if (
|
|
3815
|
+
if (Vi(e)) {
|
|
3800
3816
|
e.setTitle(a);
|
|
3801
3817
|
return;
|
|
3802
3818
|
}
|
|
3803
3819
|
if (i(e)) {
|
|
3804
|
-
let t =
|
|
3820
|
+
let t = Bi(e.getLanguage(), a);
|
|
3805
3821
|
t.setTheme(e.getTheme()), t.setStyle(e.getStyle()), e.replace(t, !0);
|
|
3806
3822
|
}
|
|
3807
3823
|
});
|
|
@@ -3904,10 +3920,10 @@ function eo() {
|
|
|
3904
3920
|
return j.useEffect(() => {
|
|
3905
3921
|
let t = () => {
|
|
3906
3922
|
let e = Qa(u()).map((e) => ({
|
|
3907
|
-
displayTitle:
|
|
3923
|
+
displayTitle: Ui(e),
|
|
3908
3924
|
key: e.getKey(),
|
|
3909
3925
|
language: e.getLanguage() || "plain",
|
|
3910
|
-
title:
|
|
3926
|
+
title: Hi(e)
|
|
3911
3927
|
}));
|
|
3912
3928
|
n((t) => $a(t, e) ? t : e);
|
|
3913
3929
|
};
|
|
@@ -3952,7 +3968,7 @@ function no({ editor: e }) {
|
|
|
3952
3968
|
onClick: () => e.dispatchCommand(E, "left"),
|
|
3953
3969
|
title: L("MOD+SHIFT+L", t.toolbar.alignment.left),
|
|
3954
3970
|
type: "button",
|
|
3955
|
-
children: /* @__PURE__ */ N(
|
|
3971
|
+
children: /* @__PURE__ */ N(ea, {})
|
|
3956
3972
|
}),
|
|
3957
3973
|
/* @__PURE__ */ N("button", {
|
|
3958
3974
|
"aria-label": t.toolbar.alignment.center,
|
|
@@ -3961,7 +3977,7 @@ function no({ editor: e }) {
|
|
|
3961
3977
|
onClick: () => e.dispatchCommand(E, "center"),
|
|
3962
3978
|
title: L("MOD+SHIFT+C", t.toolbar.alignment.center),
|
|
3963
3979
|
type: "button",
|
|
3964
|
-
children: /* @__PURE__ */ N(
|
|
3980
|
+
children: /* @__PURE__ */ N($i, {})
|
|
3965
3981
|
}),
|
|
3966
3982
|
/* @__PURE__ */ N("button", {
|
|
3967
3983
|
"aria-label": t.toolbar.alignment.right,
|
|
@@ -3970,7 +3986,7 @@ function no({ editor: e }) {
|
|
|
3970
3986
|
onClick: () => e.dispatchCommand(E, "right"),
|
|
3971
3987
|
title: L("MOD+SHIFT+R", t.toolbar.alignment.right),
|
|
3972
3988
|
type: "button",
|
|
3973
|
-
children: /* @__PURE__ */ N(
|
|
3989
|
+
children: /* @__PURE__ */ N(ta, {})
|
|
3974
3990
|
}),
|
|
3975
3991
|
/* @__PURE__ */ N("button", {
|
|
3976
3992
|
"aria-label": t.toolbar.alignment.justify,
|
|
@@ -4161,7 +4177,7 @@ function mo({ editor: e }) {
|
|
|
4161
4177
|
"aria-label": t.toolbar.list.bullet,
|
|
4162
4178
|
"aria-pressed": n === "bullet",
|
|
4163
4179
|
className: n === "bullet" ? "is-active" : void 0,
|
|
4164
|
-
onClick: () => e.dispatchCommand(
|
|
4180
|
+
onClick: () => e.dispatchCommand(Re, void 0),
|
|
4165
4181
|
title: L("MOD+SHIFT+8", t.toolbar.shortcuts.bulletList),
|
|
4166
4182
|
type: "button",
|
|
4167
4183
|
children: /* @__PURE__ */ N(fo, {})
|
|
@@ -4170,7 +4186,7 @@ function mo({ editor: e }) {
|
|
|
4170
4186
|
"aria-label": t.toolbar.list.numbered,
|
|
4171
4187
|
"aria-pressed": n === "number",
|
|
4172
4188
|
className: n === "number" ? "is-active" : void 0,
|
|
4173
|
-
onClick: () => e.dispatchCommand(
|
|
4189
|
+
onClick: () => e.dispatchCommand(Le, void 0),
|
|
4174
4190
|
title: L("MOD+SHIFT+7", t.toolbar.shortcuts.numberedList),
|
|
4175
4191
|
type: "button",
|
|
4176
4192
|
children: /* @__PURE__ */ N(po, {})
|
|
@@ -4178,7 +4194,7 @@ function mo({ editor: e }) {
|
|
|
4178
4194
|
/* @__PURE__ */ N("button", {
|
|
4179
4195
|
"aria-label": t.toolbar.list.remove,
|
|
4180
4196
|
"aria-pressed": n === void 0 ? void 0 : !1,
|
|
4181
|
-
onClick: () => e.dispatchCommand(
|
|
4197
|
+
onClick: () => e.dispatchCommand(Ve, void 0),
|
|
4182
4198
|
title: t.toolbar.shortcuts.removeList,
|
|
4183
4199
|
type: "button",
|
|
4184
4200
|
className: "rj-editor-toolbar--clear-btn",
|
|
@@ -4210,7 +4226,7 @@ function go(e, t) {
|
|
|
4210
4226
|
e.focus(() => {
|
|
4211
4227
|
e.update(() => {
|
|
4212
4228
|
let e = d();
|
|
4213
|
-
m(e) &&
|
|
4229
|
+
m(e) && vt(e, t);
|
|
4214
4230
|
});
|
|
4215
4231
|
});
|
|
4216
4232
|
}
|
|
@@ -4218,7 +4234,7 @@ function _o(e) {
|
|
|
4218
4234
|
e.update(() => {
|
|
4219
4235
|
let e = d();
|
|
4220
4236
|
if (!m(e)) return;
|
|
4221
|
-
|
|
4237
|
+
vt(e, {
|
|
4222
4238
|
"background-color": null,
|
|
4223
4239
|
color: null,
|
|
4224
4240
|
"font-family": null,
|
|
@@ -4238,7 +4254,7 @@ function _o(e) {
|
|
|
4238
4254
|
"uppercase"
|
|
4239
4255
|
].forEach((t) => {
|
|
4240
4256
|
e.hasFormat(t) && e.formatText(t);
|
|
4241
|
-
}), e.setFormat(0),
|
|
4257
|
+
}), e.setFormat(0), Fe(at(e.anchor.getNode(), Be)) && Ie(), yt(d(), s, (e, t) => {
|
|
4242
4258
|
t.setFormat(""), t.setIndent(0), t.setDirection(null);
|
|
4243
4259
|
});
|
|
4244
4260
|
let t = d();
|
|
@@ -4269,7 +4285,7 @@ function vo() {
|
|
|
4269
4285
|
})
|
|
4270
4286
|
},
|
|
4271
4287
|
{ type: "divider" },
|
|
4272
|
-
...
|
|
4288
|
+
...sn.map((e) => ({
|
|
4273
4289
|
key: e,
|
|
4274
4290
|
label: /* @__PURE__ */ N("button", {
|
|
4275
4291
|
className: "rj-editor-spacing-menu-item",
|
|
@@ -4333,7 +4349,7 @@ function yo(e) {
|
|
|
4333
4349
|
//#endregion
|
|
4334
4350
|
//#region src/components/toolbar/home/style-controls/background-color/BackgroundColorControl.tsx
|
|
4335
4351
|
function bo() {
|
|
4336
|
-
let [e] = F(), t = q(), [n, r] =
|
|
4352
|
+
let [e] = F(), t = q(), [n, r] = Te(!1), [i, a] = Te(null), o = G(), s = K((e) => e.toolbar), c = s.backgroundColor, l = (t) => {
|
|
4337
4353
|
go(e, { "background-color": t || null }), o(W({
|
|
4338
4354
|
...s,
|
|
4339
4355
|
backgroundColor: t
|
|
@@ -4352,7 +4368,7 @@ function bo() {
|
|
|
4352
4368
|
children: [/* @__PURE__ */ N("span", { className: "rj-editor-color-none" }), t.common.none]
|
|
4353
4369
|
})
|
|
4354
4370
|
},
|
|
4355
|
-
...
|
|
4371
|
+
...Qt.map((e) => ({
|
|
4356
4372
|
key: e,
|
|
4357
4373
|
label: /* @__PURE__ */ P("button", {
|
|
4358
4374
|
className: "rj-editor-color-menu-item",
|
|
@@ -4376,7 +4392,7 @@ function bo() {
|
|
|
4376
4392
|
children: [
|
|
4377
4393
|
/* @__PURE__ */ N("span", {
|
|
4378
4394
|
className: "rj-editor-color-swatch",
|
|
4379
|
-
style: { backgroundColor: c ||
|
|
4395
|
+
style: { backgroundColor: c || Qt[0] }
|
|
4380
4396
|
}),
|
|
4381
4397
|
t.common.moreColors,
|
|
4382
4398
|
/* @__PURE__ */ N("input", {
|
|
@@ -4388,7 +4404,7 @@ function bo() {
|
|
|
4388
4404
|
onClick: (e) => e.stopPropagation(),
|
|
4389
4405
|
onMouseDown: (e) => e.stopPropagation(),
|
|
4390
4406
|
type: "color",
|
|
4391
|
-
value: c ||
|
|
4407
|
+
value: c || Qt[0]
|
|
4392
4408
|
})
|
|
4393
4409
|
]
|
|
4394
4410
|
})
|
|
@@ -4439,7 +4455,7 @@ function So() {
|
|
|
4439
4455
|
return /* @__PURE__ */ N("button", {
|
|
4440
4456
|
"aria-label": t.toolbar.style.clearFormatting,
|
|
4441
4457
|
onClick: () => {
|
|
4442
|
-
_o(e), n(
|
|
4458
|
+
_o(e), n(qr({
|
|
4443
4459
|
isBold: !1,
|
|
4444
4460
|
isCode: !1,
|
|
4445
4461
|
isItalic: !1,
|
|
@@ -4453,7 +4469,7 @@ function So() {
|
|
|
4453
4469
|
fontSize: z.fontSize,
|
|
4454
4470
|
lineHeight: z.lineHeight,
|
|
4455
4471
|
textColor: z.textColor
|
|
4456
|
-
})), n(
|
|
4472
|
+
})), n(Vr({
|
|
4457
4473
|
alignment: z.alignment,
|
|
4458
4474
|
listType: z.listType
|
|
4459
4475
|
}));
|
|
@@ -4477,7 +4493,7 @@ function Co() {
|
|
|
4477
4493
|
fontFamily: t
|
|
4478
4494
|
}));
|
|
4479
4495
|
},
|
|
4480
|
-
options:
|
|
4496
|
+
options: en.map((e) => ({
|
|
4481
4497
|
label: e,
|
|
4482
4498
|
value: e
|
|
4483
4499
|
})),
|
|
@@ -4506,7 +4522,7 @@ function To() {
|
|
|
4506
4522
|
fontSize: t
|
|
4507
4523
|
}));
|
|
4508
4524
|
},
|
|
4509
|
-
options:
|
|
4525
|
+
options: tn.map((e) => ({
|
|
4510
4526
|
label: wo(e),
|
|
4511
4527
|
value: e
|
|
4512
4528
|
})),
|
|
@@ -4521,7 +4537,7 @@ function To() {
|
|
|
4521
4537
|
//#endregion
|
|
4522
4538
|
//#region src/components/toolbar/home/style-controls/text-color/TextColorControl.tsx
|
|
4523
4539
|
function Eo() {
|
|
4524
|
-
let [e] = F(), t = q(), [n, r] =
|
|
4540
|
+
let [e] = F(), t = q(), [n, r] = Te(!1), [i, a] = Te(null), o = G(), s = K((e) => e.toolbar), c = s.textColor, l = (t) => {
|
|
4525
4541
|
go(e, { color: t || null }), o(W({
|
|
4526
4542
|
...s,
|
|
4527
4543
|
textColor: t
|
|
@@ -4540,7 +4556,7 @@ function Eo() {
|
|
|
4540
4556
|
children: [/* @__PURE__ */ N("span", { className: "rj-editor-color-none" }), t.common.none]
|
|
4541
4557
|
})
|
|
4542
4558
|
},
|
|
4543
|
-
...
|
|
4559
|
+
...ln.map((e) => ({
|
|
4544
4560
|
key: e,
|
|
4545
4561
|
label: /* @__PURE__ */ P("button", {
|
|
4546
4562
|
className: "rj-editor-color-menu-item",
|
|
@@ -4564,7 +4580,7 @@ function Eo() {
|
|
|
4564
4580
|
children: [
|
|
4565
4581
|
/* @__PURE__ */ N("span", {
|
|
4566
4582
|
className: "rj-editor-color-swatch",
|
|
4567
|
-
style: { backgroundColor: c ||
|
|
4583
|
+
style: { backgroundColor: c || ln[0] }
|
|
4568
4584
|
}),
|
|
4569
4585
|
t.common.moreColors,
|
|
4570
4586
|
/* @__PURE__ */ N("input", {
|
|
@@ -4576,7 +4592,7 @@ function Eo() {
|
|
|
4576
4592
|
onClick: (e) => e.stopPropagation(),
|
|
4577
4593
|
onMouseDown: (e) => e.stopPropagation(),
|
|
4578
4594
|
type: "color",
|
|
4579
|
-
value: c ||
|
|
4595
|
+
value: c || ln[0]
|
|
4580
4596
|
})
|
|
4581
4597
|
]
|
|
4582
4598
|
})
|
|
@@ -4923,16 +4939,16 @@ var zo = {
|
|
|
4923
4939
|
//#endregion
|
|
4924
4940
|
//#region src/components/global/input-number/InputNumber.tsx
|
|
4925
4941
|
function Bo({ className: e, decimalScale: t = 2, defaultValue: n, integerOnly: r = !1, locale: i = !1, max: a, min: o, onBlur: s, onChange: c, prefix: l, suffix: u, value: d, ...f }) {
|
|
4926
|
-
let p = j.useRef(null), m = typeof d == "number", [h, g] = j.useState(!1), [_, v] = j.useState(() =>
|
|
4927
|
-
let n =
|
|
4928
|
-
v(s), n !== "" && n !== "." && Number.isFinite(l) && c?.(
|
|
4942
|
+
let p = j.useRef(null), m = typeof d == "number", [h, g] = j.useState(!1), [_, v] = j.useState(() => br(m ? d : n, i)), y = m && !h ? br(d, i) : _, b = (e) => {
|
|
4943
|
+
let n = Zt(e.target.value, t, r), s = Bt(n, i), l = Number(n);
|
|
4944
|
+
v(s), n !== "" && n !== "." && Number.isFinite(l) && c?.(At(l, o, a));
|
|
4929
4945
|
}, x = (e) => {
|
|
4930
4946
|
g(!1);
|
|
4931
4947
|
let t = y.replace(/\s/g, ""), n = Number(t);
|
|
4932
4948
|
if (t === "" || t === "." || !Number.isFinite(n)) v("");
|
|
4933
4949
|
else {
|
|
4934
|
-
let e =
|
|
4935
|
-
v(
|
|
4950
|
+
let e = At(n, o, a);
|
|
4951
|
+
v(br(e, i)), c?.(e);
|
|
4936
4952
|
}
|
|
4937
4953
|
s?.(e);
|
|
4938
4954
|
}, S = (e) => {
|
|
@@ -4998,7 +5014,7 @@ var Y = {
|
|
|
4998
5014
|
//#endregion
|
|
4999
5015
|
//#region src/components/global/modal/Modal.tsx
|
|
5000
5016
|
function Vo({ cancelText: e, children: t, okText: n, onCancel: r, onOk: i, open: a, title: o, width: s = 420 }) {
|
|
5001
|
-
let c = q(), l =
|
|
5017
|
+
let c = q(), l = ci(), u = j.useRef(null), d = j.useRef({
|
|
5002
5018
|
x: 0,
|
|
5003
5019
|
y: 0
|
|
5004
5020
|
}), [f, p] = j.useState(null);
|
|
@@ -5026,7 +5042,7 @@ function Vo({ cancelText: e, children: t, okText: n, onCancel: r, onOk: i, open:
|
|
|
5026
5042
|
y: Math.min(Math.max(t, 8), o)
|
|
5027
5043
|
};
|
|
5028
5044
|
};
|
|
5029
|
-
return
|
|
5045
|
+
return bt(/* @__PURE__ */ N("div", {
|
|
5030
5046
|
className: Y.overlay,
|
|
5031
5047
|
"data-rj-editor-theme": l,
|
|
5032
5048
|
onMouseDown: (e) => {
|
|
@@ -5223,7 +5239,7 @@ function Qo(e) {
|
|
|
5223
5239
|
//#endregion
|
|
5224
5240
|
//#region src/components/toolbar/image/ImageToolbar.tsx
|
|
5225
5241
|
function $o() {
|
|
5226
|
-
let [e] = F(), t = q(), n =
|
|
5242
|
+
let [e] = F(), t = q(), n = ia(), r = j.useRef(null), { isImageSelected: i, selectedImageAlignment: a, selectedImageAltText: o, selectedImageBorderEnabled: s, selectedImageBorderRadius: c, selectedImageCaption: l, selectedImageKey: u, selectedImageLinkUrl: d, selectedImageObjectFit: f, selectedImageRotation: p, selectedImageShadowEnabled: m, selectedImageTextWrap: h, selectedImageWidth: g } = K((e) => e.toolbar), [_, v] = j.useState(null), [y, b] = j.useState(""), [x, S] = j.useState(!1), C = j.useMemo(() => [
|
|
5227
5243
|
{
|
|
5228
5244
|
label: t.toolbar.image.fitContain,
|
|
5229
5245
|
value: "contain"
|
|
@@ -5278,7 +5294,7 @@ function $o() {
|
|
|
5278
5294
|
disabled: !i,
|
|
5279
5295
|
onClick: () => Ko(e, "left"),
|
|
5280
5296
|
type: "button",
|
|
5281
|
-
children: /* @__PURE__ */ N(
|
|
5297
|
+
children: /* @__PURE__ */ N(ea, { "aria-hidden": "true" })
|
|
5282
5298
|
}),
|
|
5283
5299
|
/* @__PURE__ */ N("button", {
|
|
5284
5300
|
"aria-label": t.toolbar.image.alignCenter,
|
|
@@ -5286,7 +5302,7 @@ function $o() {
|
|
|
5286
5302
|
disabled: !i,
|
|
5287
5303
|
onClick: () => Ko(e, "center"),
|
|
5288
5304
|
type: "button",
|
|
5289
|
-
children: /* @__PURE__ */ N(
|
|
5305
|
+
children: /* @__PURE__ */ N($i, { "aria-hidden": "true" })
|
|
5290
5306
|
}),
|
|
5291
5307
|
/* @__PURE__ */ N("button", {
|
|
5292
5308
|
"aria-label": t.toolbar.image.alignRight,
|
|
@@ -5294,7 +5310,7 @@ function $o() {
|
|
|
5294
5310
|
disabled: !i,
|
|
5295
5311
|
onClick: () => Ko(e, "right"),
|
|
5296
5312
|
type: "button",
|
|
5297
|
-
children: /* @__PURE__ */ N(
|
|
5313
|
+
children: /* @__PURE__ */ N(ta, { "aria-hidden": "true" })
|
|
5298
5314
|
}),
|
|
5299
5315
|
/* @__PURE__ */ N(Ho, {})
|
|
5300
5316
|
]
|
|
@@ -5447,10 +5463,10 @@ function $o() {
|
|
|
5447
5463
|
"aria-busy": x,
|
|
5448
5464
|
disabled: !i || x,
|
|
5449
5465
|
onClick: () => {
|
|
5450
|
-
|
|
5466
|
+
Tr(r.current);
|
|
5451
5467
|
},
|
|
5452
5468
|
type: "button",
|
|
5453
|
-
children: /* @__PURE__ */ N(
|
|
5469
|
+
children: /* @__PURE__ */ N(oa, { "aria-hidden": "true" })
|
|
5454
5470
|
}),
|
|
5455
5471
|
/* @__PURE__ */ N("button", {
|
|
5456
5472
|
"aria-label": t.toolbar.image.delete,
|
|
@@ -5458,7 +5474,7 @@ function $o() {
|
|
|
5458
5474
|
disabled: !i,
|
|
5459
5475
|
onClick: () => Yo(e),
|
|
5460
5476
|
type: "button",
|
|
5461
|
-
children: /* @__PURE__ */ N(
|
|
5477
|
+
children: /* @__PURE__ */ N(na, { "aria-hidden": "true" })
|
|
5462
5478
|
}),
|
|
5463
5479
|
/* @__PURE__ */ N("input", {
|
|
5464
5480
|
accept: "image/*",
|
|
@@ -5512,7 +5528,7 @@ function $o() {
|
|
|
5512
5528
|
e.setCaption(t);
|
|
5513
5529
|
return;
|
|
5514
5530
|
}
|
|
5515
|
-
e.setLinkUrl(t ?
|
|
5531
|
+
e.setLinkUrl(t ? Pe(t) : "");
|
|
5516
5532
|
}), v(null), b("");
|
|
5517
5533
|
},
|
|
5518
5534
|
open: !!_,
|
|
@@ -5575,7 +5591,7 @@ function ns() {
|
|
|
5575
5591
|
return /* @__PURE__ */ N("button", {
|
|
5576
5592
|
"aria-label": t.toolbar.insert.codeBlock,
|
|
5577
5593
|
onClick: () => {
|
|
5578
|
-
e.dispatchCommand(
|
|
5594
|
+
e.dispatchCommand(nn, { language: "plain" }), window.requestAnimationFrame(() => e.focus());
|
|
5579
5595
|
},
|
|
5580
5596
|
onMouseDown: (e) => e.preventDefault(),
|
|
5581
5597
|
title: t.toolbar.insert.codeBlock,
|
|
@@ -6775,26 +6791,26 @@ function Hc({ size: e = 24, className: t }) {
|
|
|
6775
6791
|
//#endregion
|
|
6776
6792
|
//#region src/components/toolbar/insert/image/ImageControl.tsx
|
|
6777
6793
|
function Uc() {
|
|
6778
|
-
let [e] = F(), t = q(),
|
|
6794
|
+
let [e] = F(), t = q(), { isUploading: n, uploadImage: r } = aa(), i = j.useRef(null);
|
|
6779
6795
|
return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("button", {
|
|
6780
6796
|
"aria-label": t.toolbar.insert.image,
|
|
6781
|
-
"aria-busy":
|
|
6782
|
-
disabled:
|
|
6797
|
+
"aria-busy": n,
|
|
6798
|
+
disabled: n,
|
|
6783
6799
|
onClick: () => {
|
|
6784
|
-
|
|
6800
|
+
Tr(i.current);
|
|
6785
6801
|
},
|
|
6786
6802
|
onMouseDown: (e) => {
|
|
6787
6803
|
e.preventDefault();
|
|
6788
6804
|
},
|
|
6789
6805
|
title: t.toolbar.insert.image,
|
|
6790
6806
|
type: "button",
|
|
6791
|
-
children: N(
|
|
6807
|
+
children: N(n ? Hc : rs, {})
|
|
6792
6808
|
}), /* @__PURE__ */ N("input", {
|
|
6793
6809
|
accept: "image/*",
|
|
6794
6810
|
className: "rj-editor-hidden-file-input",
|
|
6795
|
-
onChange: async (
|
|
6796
|
-
let i =
|
|
6797
|
-
if (
|
|
6811
|
+
onChange: async (n) => {
|
|
6812
|
+
let i = n.target.files?.[0];
|
|
6813
|
+
if (n.target.value = "", !i) {
|
|
6798
6814
|
e.focus();
|
|
6799
6815
|
return;
|
|
6800
6816
|
}
|
|
@@ -6806,21 +6822,19 @@ function Uc() {
|
|
|
6806
6822
|
window.alert(t.alerts.imageSizeLimit), e.focus();
|
|
6807
6823
|
return;
|
|
6808
6824
|
}
|
|
6809
|
-
let
|
|
6825
|
+
let a;
|
|
6810
6826
|
try {
|
|
6811
|
-
a
|
|
6827
|
+
a = await r(i);
|
|
6812
6828
|
} catch (n) {
|
|
6813
6829
|
console.error(n), window.alert(t.alerts.imageUploadFailed), e.focus();
|
|
6814
6830
|
return;
|
|
6815
|
-
} finally {
|
|
6816
|
-
a(!1);
|
|
6817
6831
|
}
|
|
6818
|
-
e.dispatchCommand(
|
|
6832
|
+
e.dispatchCommand(an, {
|
|
6819
6833
|
altText: i.name,
|
|
6820
|
-
src:
|
|
6834
|
+
src: a
|
|
6821
6835
|
}), e.focus();
|
|
6822
6836
|
},
|
|
6823
|
-
ref:
|
|
6837
|
+
ref: i,
|
|
6824
6838
|
type: "file"
|
|
6825
6839
|
})] });
|
|
6826
6840
|
}
|
|
@@ -6858,8 +6872,8 @@ function Kc({ enableShortcutListener: e = !0, showButton: t = !0 }) {
|
|
|
6858
6872
|
return j.useEffect(() => {
|
|
6859
6873
|
if (!e) return;
|
|
6860
6874
|
let t = () => v();
|
|
6861
|
-
return window.addEventListener(
|
|
6862
|
-
window.removeEventListener(
|
|
6875
|
+
return window.addEventListener(cn, t), () => {
|
|
6876
|
+
window.removeEventListener(cn, t);
|
|
6863
6877
|
};
|
|
6864
6878
|
}, [e, v]), /* @__PURE__ */ P(M, { children: [t ? /* @__PURE__ */ N("button", {
|
|
6865
6879
|
"aria-label": r.toolbar.insert.link,
|
|
@@ -6883,7 +6897,7 @@ function Kc({ enableShortcutListener: e = !0, showButton: t = !0 }) {
|
|
|
6883
6897
|
rel: Gc,
|
|
6884
6898
|
target: h ? "_blank" : null,
|
|
6885
6899
|
title: l.trim() || null,
|
|
6886
|
-
url:
|
|
6900
|
+
url: Pe(e)
|
|
6887
6901
|
};
|
|
6888
6902
|
n.focus(() => {
|
|
6889
6903
|
n.update(() => {
|
|
@@ -6891,7 +6905,7 @@ function Kc({ enableShortcutListener: e = !0, showButton: t = !0 }) {
|
|
|
6891
6905
|
if (!m(e)) return;
|
|
6892
6906
|
let n = o.trim();
|
|
6893
6907
|
if (e.isCollapsed()) {
|
|
6894
|
-
let r =
|
|
6908
|
+
let r = je(t.url, {
|
|
6895
6909
|
rel: t.rel,
|
|
6896
6910
|
target: t.target,
|
|
6897
6911
|
title: t.title
|
|
@@ -6899,7 +6913,7 @@ function Kc({ enableShortcutListener: e = !0, showButton: t = !0 }) {
|
|
|
6899
6913
|
r.append(c(n || t.url)), e.insertNodes([r]), r.selectEnd();
|
|
6900
6914
|
return;
|
|
6901
6915
|
}
|
|
6902
|
-
n && n !== e.getTextContent() && e.insertText(n),
|
|
6916
|
+
n && n !== e.getTextContent() && e.insertText(n), Me(t);
|
|
6903
6917
|
});
|
|
6904
6918
|
}), a(!1);
|
|
6905
6919
|
},
|
|
@@ -6983,7 +6997,7 @@ function qc(e) {
|
|
|
6983
6997
|
var Jc = 1, Yc = 20, Xc = 8, Zc = 10;
|
|
6984
6998
|
function Qc({ onTableInserted: e }) {
|
|
6985
6999
|
let [t] = F(), n = q(), r = j.useId(), i = j.useId(), [a, o] = j.useState(!1), [s, c] = j.useState(3), [l, u] = j.useState(3), [d, f] = j.useState(3), [p, m] = j.useState(3), [h, g] = j.useState(!0), _ = (n = s, r = l) => {
|
|
6986
|
-
t.dispatchCommand(
|
|
7000
|
+
t.dispatchCommand(et, {
|
|
6987
7001
|
columns: String(r),
|
|
6988
7002
|
includeHeaders: h ? {
|
|
6989
7003
|
columns: !1,
|
|
@@ -7125,12 +7139,12 @@ function el() {
|
|
|
7125
7139
|
r(!1), l(""), e.focus();
|
|
7126
7140
|
},
|
|
7127
7141
|
onOk: () => {
|
|
7128
|
-
let n =
|
|
7142
|
+
let n = Ut(o);
|
|
7129
7143
|
if (!n) {
|
|
7130
7144
|
l(t.toolbar.youtube.invalidUrl);
|
|
7131
7145
|
return;
|
|
7132
7146
|
}
|
|
7133
|
-
e.dispatchCommand(
|
|
7147
|
+
e.dispatchCommand(on, {
|
|
7134
7148
|
title: i.trim(),
|
|
7135
7149
|
videoId: n
|
|
7136
7150
|
}), r(!1), l(""), e.focus();
|
|
@@ -7296,25 +7310,25 @@ function ol(e) {
|
|
|
7296
7310
|
//#region src/components/toolbar/table/utils.ts
|
|
7297
7311
|
function sl() {
|
|
7298
7312
|
let e = d();
|
|
7299
|
-
return m(e) ? e.anchor.getNode() :
|
|
7313
|
+
return m(e) ? e.anchor.getNode() : Ze(e) ? l(e.anchor.key) : null;
|
|
7300
7314
|
}
|
|
7301
7315
|
function cl() {
|
|
7302
7316
|
let e = d();
|
|
7303
|
-
if (
|
|
7304
|
-
let t = e.getNodes().filter(
|
|
7317
|
+
if (Ze(e)) {
|
|
7318
|
+
let t = e.getNodes().filter(Ye);
|
|
7305
7319
|
return Array.from(new Map(t.map((e) => [e.getKey(), e])).values());
|
|
7306
7320
|
}
|
|
7307
|
-
let t = sl(), n = t ?
|
|
7321
|
+
let t = sl(), n = t ? at(t, nt) : null;
|
|
7308
7322
|
return n ? [n] : [];
|
|
7309
7323
|
}
|
|
7310
7324
|
function ll() {
|
|
7311
7325
|
let e = d();
|
|
7312
|
-
if (
|
|
7326
|
+
if (Ze(e)) {
|
|
7313
7327
|
let t = l(e.tableKey);
|
|
7314
|
-
return
|
|
7328
|
+
return Xe(t) ? t : null;
|
|
7315
7329
|
}
|
|
7316
7330
|
let t = sl();
|
|
7317
|
-
return t ?
|
|
7331
|
+
return t ? at(t, rt) : null;
|
|
7318
7332
|
}
|
|
7319
7333
|
function ul() {
|
|
7320
7334
|
let e = cl(), t = e[0];
|
|
@@ -7331,22 +7345,22 @@ function Q(e, t) {
|
|
|
7331
7345
|
}
|
|
7332
7346
|
function dl(e, t) {
|
|
7333
7347
|
Q(e, () => {
|
|
7334
|
-
|
|
7348
|
+
Je(t);
|
|
7335
7349
|
});
|
|
7336
7350
|
}
|
|
7337
7351
|
function fl(e, t) {
|
|
7338
7352
|
Q(e, () => {
|
|
7339
|
-
|
|
7353
|
+
qe(t);
|
|
7340
7354
|
});
|
|
7341
7355
|
}
|
|
7342
7356
|
function pl(e) {
|
|
7343
7357
|
Q(e, () => {
|
|
7344
|
-
|
|
7358
|
+
We();
|
|
7345
7359
|
});
|
|
7346
7360
|
}
|
|
7347
7361
|
function ml(e) {
|
|
7348
7362
|
Q(e, () => {
|
|
7349
|
-
|
|
7363
|
+
Ue();
|
|
7350
7364
|
});
|
|
7351
7365
|
}
|
|
7352
7366
|
function hl(e) {
|
|
@@ -7360,12 +7374,12 @@ function hl(e) {
|
|
|
7360
7374
|
function gl(e) {
|
|
7361
7375
|
Q(e, () => {
|
|
7362
7376
|
let e = cl();
|
|
7363
|
-
e.length > 1 &&
|
|
7377
|
+
e.length > 1 && Qe(e);
|
|
7364
7378
|
});
|
|
7365
7379
|
}
|
|
7366
7380
|
function _l(e) {
|
|
7367
7381
|
Q(e, () => {
|
|
7368
|
-
|
|
7382
|
+
$e();
|
|
7369
7383
|
});
|
|
7370
7384
|
}
|
|
7371
7385
|
function vl(e, t) {
|
|
@@ -7386,20 +7400,20 @@ function bl(e) {
|
|
|
7386
7400
|
Q(e, () => {
|
|
7387
7401
|
let e = cl()[0];
|
|
7388
7402
|
if (!e) return;
|
|
7389
|
-
let [, t] =
|
|
7403
|
+
let [, t] = Ge(e);
|
|
7390
7404
|
t.getChildren().forEach((e) => {
|
|
7391
|
-
|
|
7405
|
+
Ye(e) && e.toggleHeaderStyle(tt.ROW);
|
|
7392
7406
|
});
|
|
7393
7407
|
});
|
|
7394
7408
|
}
|
|
7395
7409
|
function xl(e) {
|
|
7396
7410
|
Q(e, () => {
|
|
7397
|
-
let e = cl()[0], t = ll(), n = e ?
|
|
7411
|
+
let e = cl()[0], t = ll(), n = e ? Ke(e) : null;
|
|
7398
7412
|
if (!e || !t || !n) return;
|
|
7399
|
-
let [r] =
|
|
7413
|
+
let [r] = He(t, null, null), i = /* @__PURE__ */ new Set();
|
|
7400
7414
|
r.forEach((e) => {
|
|
7401
7415
|
e.forEach(({ cell: e, startColumn: t }) => {
|
|
7402
|
-
t <= n.columnIndex && t + e.getColSpan() > n.columnIndex && !i.has(e.getKey()) && (i.add(e.getKey()), e.toggleHeaderStyle(
|
|
7416
|
+
t <= n.columnIndex && t + e.getColSpan() > n.columnIndex && !i.has(e.getKey()) && (i.add(e.getKey()), e.toggleHeaderStyle(tt.COLUMN));
|
|
7403
7417
|
});
|
|
7404
7418
|
});
|
|
7405
7419
|
});
|
|
@@ -7407,7 +7421,7 @@ function xl(e) {
|
|
|
7407
7421
|
//#endregion
|
|
7408
7422
|
//#region src/components/toolbar/table/cell/CellControls.tsx
|
|
7409
7423
|
function Sl() {
|
|
7410
|
-
let [e] = F(), t = q(), [n, r] =
|
|
7424
|
+
let [e] = F(), t = q(), [n, r] = Te(!1), [i, a] = Te(null), { isInTable: o, tableCellBackgroundColor: s, tableCellVerticalAlign: c } = K((e) => e.toolbar);
|
|
7411
7425
|
return /* @__PURE__ */ P(M, { children: [
|
|
7412
7426
|
/* @__PURE__ */ N(ve, {
|
|
7413
7427
|
disabled: !o,
|
|
@@ -7424,7 +7438,7 @@ function Sl() {
|
|
|
7424
7438
|
})
|
|
7425
7439
|
},
|
|
7426
7440
|
{ type: "divider" },
|
|
7427
|
-
...
|
|
7441
|
+
...Qt.map((t) => ({
|
|
7428
7442
|
key: t,
|
|
7429
7443
|
label: /* @__PURE__ */ P("button", {
|
|
7430
7444
|
className: "rj-editor-color-menu-item",
|
|
@@ -7448,7 +7462,7 @@ function Sl() {
|
|
|
7448
7462
|
children: [
|
|
7449
7463
|
/* @__PURE__ */ N("span", {
|
|
7450
7464
|
className: "rj-editor-color-swatch",
|
|
7451
|
-
style: { backgroundColor: s ||
|
|
7465
|
+
style: { backgroundColor: s || Qt[0] }
|
|
7452
7466
|
}),
|
|
7453
7467
|
t.common.moreColors,
|
|
7454
7468
|
/* @__PURE__ */ N("input", {
|
|
@@ -7460,7 +7474,7 @@ function Sl() {
|
|
|
7460
7474
|
onClick: (e) => e.stopPropagation(),
|
|
7461
7475
|
onMouseDown: (e) => e.stopPropagation(),
|
|
7462
7476
|
type: "color",
|
|
7463
|
-
value: s ||
|
|
7477
|
+
value: s || Qt[0]
|
|
7464
7478
|
})
|
|
7465
7479
|
]
|
|
7466
7480
|
})
|
|
@@ -7540,7 +7554,7 @@ function wl() {
|
|
|
7540
7554
|
onClick: () => pl(e),
|
|
7541
7555
|
type: "button",
|
|
7542
7556
|
children: [
|
|
7543
|
-
/* @__PURE__ */ N(
|
|
7557
|
+
/* @__PURE__ */ N(na, { "aria-hidden": "true" }),
|
|
7544
7558
|
"\xA0",
|
|
7545
7559
|
t.toolbar.table.row
|
|
7546
7560
|
]
|
|
@@ -7552,7 +7566,7 @@ function wl() {
|
|
|
7552
7566
|
onClick: () => ml(e),
|
|
7553
7567
|
type: "button",
|
|
7554
7568
|
children: [
|
|
7555
|
-
/* @__PURE__ */ N(
|
|
7569
|
+
/* @__PURE__ */ N(na, { "aria-hidden": "true" }),
|
|
7556
7570
|
"\xA0",
|
|
7557
7571
|
t.toolbar.table.column
|
|
7558
7572
|
]
|
|
@@ -7563,7 +7577,7 @@ function wl() {
|
|
|
7563
7577
|
disabled: n,
|
|
7564
7578
|
onClick: () => hl(e),
|
|
7565
7579
|
type: "button",
|
|
7566
|
-
children: /* @__PURE__ */ N(
|
|
7580
|
+
children: /* @__PURE__ */ N(na, { "aria-hidden": "true" })
|
|
7567
7581
|
})
|
|
7568
7582
|
] });
|
|
7569
7583
|
}
|
|
@@ -7714,8 +7728,8 @@ function jl() {
|
|
|
7714
7728
|
function Ml() {
|
|
7715
7729
|
let e = d();
|
|
7716
7730
|
if (!p(e)) return null;
|
|
7717
|
-
let t = e.getNodes().find(
|
|
7718
|
-
return
|
|
7731
|
+
let t = e.getNodes().find(Ai);
|
|
7732
|
+
return Ai(t) ? t : null;
|
|
7719
7733
|
}
|
|
7720
7734
|
function Nl() {
|
|
7721
7735
|
let e = Ml();
|
|
@@ -7776,9 +7790,9 @@ function Ll({ isFullscreen: e, onToggleFullscreen: t }) {
|
|
|
7776
7790
|
return j.useEffect(() => {
|
|
7777
7791
|
let e = () => {
|
|
7778
7792
|
let e = d(), t = Nl(), n = Wo(), r = ul();
|
|
7779
|
-
if (o(
|
|
7780
|
-
let i = e.anchor.getNode(), a = i.getTopLevelElementOrThrow(), s =
|
|
7781
|
-
o(
|
|
7793
|
+
if (o(Wr(t)), o(Gr(n)), o(Kr(r)), !m(e)) return;
|
|
7794
|
+
let i = e.anchor.getNode(), a = i.getTopLevelElementOrThrow(), s = at(i, Be);
|
|
7795
|
+
o(qr({
|
|
7782
7796
|
isBold: e.hasFormat("bold"),
|
|
7783
7797
|
isCode: e.hasFormat("code"),
|
|
7784
7798
|
isItalic: e.hasFormat("italic"),
|
|
@@ -7787,18 +7801,18 @@ function Ll({ isFullscreen: e, onToggleFullscreen: t }) {
|
|
|
7787
7801
|
isSuperscript: e.hasFormat("superscript"),
|
|
7788
7802
|
isUnderline: e.hasFormat("underline")
|
|
7789
7803
|
})), o(W({
|
|
7790
|
-
backgroundColor:
|
|
7791
|
-
fontFamily:
|
|
7792
|
-
fontSize:
|
|
7793
|
-
lineHeight:
|
|
7794
|
-
textColor:
|
|
7795
|
-
})), o(
|
|
7804
|
+
backgroundColor: _t(e, "background-color", ""),
|
|
7805
|
+
fontFamily: dn(_t(e, "font-family", "")),
|
|
7806
|
+
fontSize: pn(_t(e, "font-size", "")),
|
|
7807
|
+
lineHeight: _t(e, "line-height", "") || void 0,
|
|
7808
|
+
textColor: _t(e, "color", "")
|
|
7809
|
+
})), o(Vr({
|
|
7796
7810
|
alignment: a.getFormatType(),
|
|
7797
|
-
listType:
|
|
7811
|
+
listType: Fe(s) ? s.getListType() : void 0
|
|
7798
7812
|
}));
|
|
7799
7813
|
}, t = n.registerCommand(O, () => (n.getEditorState().read(e), !1), C), r = n.registerUpdateListener(({ editorState: t }) => {
|
|
7800
7814
|
t.read(e);
|
|
7801
|
-
}), i = n.registerCommand(y, (e) => (o(
|
|
7815
|
+
}), i = n.registerCommand(y, (e) => (o(Ur(e)), !1), C), a = n.registerCommand(v, (e) => (o(Hr(e)), !1), C);
|
|
7802
7816
|
return () => {
|
|
7803
7817
|
t(), r(), i(), a();
|
|
7804
7818
|
};
|
|
@@ -7847,9 +7861,9 @@ function Ll({ isFullscreen: e, onToggleFullscreen: t }) {
|
|
|
7847
7861
|
//#region src/plugins/EquationPlugin.tsx
|
|
7848
7862
|
function Rl() {
|
|
7849
7863
|
let [e] = F();
|
|
7850
|
-
return Ce(() => e.registerCommand(
|
|
7851
|
-
let t =
|
|
7852
|
-
|
|
7864
|
+
return Ce(() => e.registerCommand(rn, (e) => {
|
|
7865
|
+
let t = ki(e);
|
|
7866
|
+
ot(t), e.displayMode !== "inline" && t.insertAfter(s());
|
|
7853
7867
|
let n = o();
|
|
7854
7868
|
return n.add(t.getKey()), _(n), !0;
|
|
7855
7869
|
}, x), [e]), null;
|
|
@@ -7917,9 +7931,9 @@ function Zl(e) {
|
|
|
7917
7931
|
function Ql() {
|
|
7918
7932
|
let [e] = F();
|
|
7919
7933
|
return j.useEffect(() => {
|
|
7920
|
-
let t = e.registerCommand(
|
|
7921
|
-
let r =
|
|
7922
|
-
return e && r.append(c(e)),
|
|
7934
|
+
let t = e.registerCommand(nn, ({ code: e = "", language: t, title: n }) => {
|
|
7935
|
+
let r = Bi(t, n);
|
|
7936
|
+
return e && r.append(c(e)), ot(r), r.insertAfter(s()), r.selectEnd(), !0;
|
|
7923
7937
|
}, x), n = e.registerCommand(oe, (t) => {
|
|
7924
7938
|
let n = (t instanceof ClipboardEvent ? t.clipboardData : null)?.getData("text/html"), r = n ? Zl(n) : null;
|
|
7925
7939
|
return r ? (t.preventDefault(), e.update(() => {
|
|
@@ -8395,17 +8409,24 @@ function xu() {
|
|
|
8395
8409
|
}
|
|
8396
8410
|
//#endregion
|
|
8397
8411
|
//#region src/plugins/ImagePlugin.tsx
|
|
8398
|
-
|
|
8412
|
+
var Su = 750;
|
|
8413
|
+
function Cu(e) {
|
|
8414
|
+
return `${e.type || "application/octet-stream"}:${e.size}`;
|
|
8415
|
+
}
|
|
8416
|
+
function wu(e) {
|
|
8417
|
+
return e.map(Cu).sort().join("|");
|
|
8418
|
+
}
|
|
8419
|
+
function Tu(e, t) {
|
|
8399
8420
|
let n = /* @__PURE__ */ new Map();
|
|
8400
8421
|
return Array.from(e || []).forEach((e) => {
|
|
8401
|
-
e.type.startsWith("image/") && n.set(
|
|
8422
|
+
e.type.startsWith("image/") && n.set(Cu(e), e);
|
|
8402
8423
|
}), Array.from(t || []).forEach((e) => {
|
|
8403
8424
|
if (e.kind !== "file" || !e.type.startsWith("image/")) return;
|
|
8404
8425
|
let t = e.getAsFile();
|
|
8405
|
-
t && n.set(
|
|
8426
|
+
t && n.set(Cu(t), t);
|
|
8406
8427
|
}), Array.from(n.values());
|
|
8407
8428
|
}
|
|
8408
|
-
async function
|
|
8429
|
+
async function Eu(e, t, n) {
|
|
8409
8430
|
if (e.size > 5242880) return window.alert(t), null;
|
|
8410
8431
|
let r = await n(e);
|
|
8411
8432
|
return {
|
|
@@ -8413,32 +8434,41 @@ async function Cu(e, t, n) {
|
|
|
8413
8434
|
src: r
|
|
8414
8435
|
};
|
|
8415
8436
|
}
|
|
8416
|
-
function
|
|
8417
|
-
let [e] = F(), t = q(), n =
|
|
8437
|
+
function Du() {
|
|
8438
|
+
let [e] = F(), t = q(), n = ia(), r = we({
|
|
8439
|
+
signature: "",
|
|
8440
|
+
timestamp: 0
|
|
8441
|
+
});
|
|
8418
8442
|
return Ce(() => {
|
|
8419
|
-
let
|
|
8443
|
+
let i = async (r) => {
|
|
8420
8444
|
for (let i of r) {
|
|
8421
8445
|
let r = null;
|
|
8422
8446
|
try {
|
|
8423
|
-
r = await
|
|
8447
|
+
r = await Eu(i, t.alerts.imageSizeLimit, n);
|
|
8424
8448
|
} catch (e) {
|
|
8425
8449
|
console.error(e), window.alert(t.alerts.imageUploadFailed);
|
|
8426
8450
|
}
|
|
8427
|
-
r && e.dispatchCommand(
|
|
8451
|
+
r && e.dispatchCommand(an, r);
|
|
8428
8452
|
}
|
|
8429
|
-
},
|
|
8430
|
-
let t =
|
|
8431
|
-
return
|
|
8432
|
-
}, x),
|
|
8453
|
+
}, a = e.registerCommand(an, (e) => {
|
|
8454
|
+
let t = Aa(e);
|
|
8455
|
+
return ot(t), t.insertAfter(s()), !0;
|
|
8456
|
+
}, x), o = e.registerCommand(oe, (e) => {
|
|
8433
8457
|
if (!(e instanceof ClipboardEvent)) return !1;
|
|
8434
|
-
let t =
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
let
|
|
8438
|
-
return
|
|
8458
|
+
let t = Tu(e.clipboardData?.files, e.clipboardData?.items);
|
|
8459
|
+
if (t.length === 0) return !1;
|
|
8460
|
+
e.preventDefault();
|
|
8461
|
+
let n = wu(t), a = Date.now();
|
|
8462
|
+
return r.current.signature === n && a - r.current.timestamp < Su ? !0 : (r.current = {
|
|
8463
|
+
signature: n,
|
|
8464
|
+
timestamp: a
|
|
8465
|
+
}, i(t), !0);
|
|
8466
|
+
}, S), c = e.registerCommand(w, (e) => Tu(e.dataTransfer?.files, e.dataTransfer?.items).length === 0 ? !1 : (e.preventDefault(), !0), C), l = e.registerCommand(ee, (e) => {
|
|
8467
|
+
let t = Tu(e.dataTransfer?.files, e.dataTransfer?.items);
|
|
8468
|
+
return t.length === 0 ? !1 : (e.preventDefault(), i(t), !0);
|
|
8439
8469
|
}, C);
|
|
8440
8470
|
return () => {
|
|
8441
|
-
|
|
8471
|
+
a(), o(), c(), l();
|
|
8442
8472
|
};
|
|
8443
8473
|
}, [
|
|
8444
8474
|
e,
|
|
@@ -8449,29 +8479,29 @@ function wu() {
|
|
|
8449
8479
|
}
|
|
8450
8480
|
//#endregion
|
|
8451
8481
|
//#region src/plugins/InlineCodeStylePlugin.tsx
|
|
8452
|
-
var
|
|
8453
|
-
function
|
|
8454
|
-
return e.classList.contains("rj-editor-text-code") || !!e.querySelector(
|
|
8482
|
+
var Ou = "pre.rj-editor-code-block", ku = ".rj-editor-text-code", Au = "--rj-editor-inline-code-current-bg", ju = "--rj-editor-inline-code-current-text";
|
|
8483
|
+
function Mu(e) {
|
|
8484
|
+
return e.classList.contains("rj-editor-text-code") || !!e.querySelector(ku);
|
|
8455
8485
|
}
|
|
8456
|
-
function
|
|
8486
|
+
function Nu(e, t) {
|
|
8457
8487
|
return Array.from(e.querySelectorAll("*")).find((e) => e.style[t])?.style[t];
|
|
8458
8488
|
}
|
|
8459
|
-
function
|
|
8489
|
+
function Pu(e, t, n) {
|
|
8460
8490
|
if (n) {
|
|
8461
8491
|
e.style.setProperty(t, n);
|
|
8462
8492
|
return;
|
|
8463
8493
|
}
|
|
8464
8494
|
e.style.removeProperty(t);
|
|
8465
8495
|
}
|
|
8466
|
-
function
|
|
8496
|
+
function Fu(e) {
|
|
8467
8497
|
e?.querySelectorAll("code").forEach((e) => {
|
|
8468
|
-
e.closest(
|
|
8498
|
+
e.closest(Ou) || Mu(e) && (Pu(e, Au, Nu(e, "backgroundColor")), Pu(e, ju, Nu(e, "color")));
|
|
8469
8499
|
});
|
|
8470
8500
|
}
|
|
8471
|
-
function
|
|
8501
|
+
function Iu() {
|
|
8472
8502
|
let [e] = F(), t = j.useRef(null), n = j.useCallback(() => {
|
|
8473
8503
|
t.current !== null && window.cancelAnimationFrame(t.current), t.current = window.requestAnimationFrame(() => {
|
|
8474
|
-
t.current = null,
|
|
8504
|
+
t.current = null, Fu(e.getRootElement());
|
|
8475
8505
|
});
|
|
8476
8506
|
}, [e]);
|
|
8477
8507
|
return j.useEffect(() => (n(), () => {
|
|
@@ -8480,21 +8510,21 @@ function Nu() {
|
|
|
8480
8510
|
}
|
|
8481
8511
|
//#endregion
|
|
8482
8512
|
//#region src/plugins/KeyboardShortcutsPlugin.tsx
|
|
8483
|
-
function
|
|
8513
|
+
function Lu(e) {
|
|
8484
8514
|
return e.metaKey || e.ctrlKey;
|
|
8485
8515
|
}
|
|
8486
|
-
function
|
|
8516
|
+
function Ru(e) {
|
|
8487
8517
|
return e instanceof HTMLElement ? [
|
|
8488
8518
|
"INPUT",
|
|
8489
8519
|
"SELECT",
|
|
8490
8520
|
"TEXTAREA"
|
|
8491
8521
|
].includes(e.tagName) : !1;
|
|
8492
8522
|
}
|
|
8493
|
-
function
|
|
8523
|
+
function zu() {
|
|
8494
8524
|
let [e] = F(), t = G();
|
|
8495
8525
|
return Ce(() => {
|
|
8496
8526
|
let n = () => {
|
|
8497
|
-
_o(e), t(
|
|
8527
|
+
_o(e), t(qr({
|
|
8498
8528
|
isBold: !1,
|
|
8499
8529
|
isCode: !1,
|
|
8500
8530
|
isItalic: !1,
|
|
@@ -8508,62 +8538,62 @@ function Iu() {
|
|
|
8508
8538
|
fontSize: z.fontSize,
|
|
8509
8539
|
lineHeight: z.lineHeight,
|
|
8510
8540
|
textColor: z.textColor
|
|
8511
|
-
})), t(
|
|
8541
|
+
})), t(Vr({
|
|
8512
8542
|
alignment: z.alignment,
|
|
8513
8543
|
listType: z.listType
|
|
8514
8544
|
}));
|
|
8515
8545
|
};
|
|
8516
8546
|
return e.registerCommand(ie, (t) => {
|
|
8517
|
-
if (!
|
|
8547
|
+
if (!Lu(t) || t.altKey || Ru(t.target)) return !1;
|
|
8518
8548
|
let r = t.key.toLowerCase(), i = t.shiftKey;
|
|
8519
|
-
return r === "b" && !i ? (t.preventDefault(), e.dispatchCommand(D, "bold"), !0) : r === "i" && !i ? (t.preventDefault(), e.dispatchCommand(D, "italic"), !0) : r === "u" && !i ? (t.preventDefault(), e.dispatchCommand(D, "underline"), !0) : r === "x" && i ? (t.preventDefault(), e.dispatchCommand(D, "strikethrough"), !0) : t.key === "=" && !i ? (t.preventDefault(), e.dispatchCommand(D, "subscript"), !0) : (t.key === "=" || t.key === "+") && i ? (t.preventDefault(), e.dispatchCommand(D, "superscript"), !0) : r === "z" && !i ? (t.preventDefault(), e.dispatchCommand(ue, void 0), !0) : r === "z" && i || r === "y" ? (t.preventDefault(), e.dispatchCommand(ce, void 0), !0) : r === "k" && !i ? (t.preventDefault(), window.dispatchEvent(new CustomEvent(
|
|
8549
|
+
return r === "b" && !i ? (t.preventDefault(), e.dispatchCommand(D, "bold"), !0) : r === "i" && !i ? (t.preventDefault(), e.dispatchCommand(D, "italic"), !0) : r === "u" && !i ? (t.preventDefault(), e.dispatchCommand(D, "underline"), !0) : r === "x" && i ? (t.preventDefault(), e.dispatchCommand(D, "strikethrough"), !0) : t.key === "=" && !i ? (t.preventDefault(), e.dispatchCommand(D, "subscript"), !0) : (t.key === "=" || t.key === "+") && i ? (t.preventDefault(), e.dispatchCommand(D, "superscript"), !0) : r === "z" && !i ? (t.preventDefault(), e.dispatchCommand(ue, void 0), !0) : r === "z" && i || r === "y" ? (t.preventDefault(), e.dispatchCommand(ce, void 0), !0) : r === "k" && !i ? (t.preventDefault(), window.dispatchEvent(new CustomEvent(cn)), !0) : t.key === "7" && i ? (t.preventDefault(), e.dispatchCommand(Le, void 0), !0) : t.key === "8" && i ? (t.preventDefault(), e.dispatchCommand(Re, void 0), !0) : t.key === "[" && !i ? (t.preventDefault(), e.dispatchCommand(ae, void 0), !0) : t.key === "]" && !i ? (t.preventDefault(), e.dispatchCommand(te, void 0), !0) : t.key === "\\" && !i ? (t.preventDefault(), n(), !0) : i ? r === "l" ? (t.preventDefault(), e.dispatchCommand(E, "left"), !0) : r === "c" ? (t.preventDefault(), e.dispatchCommand(E, "center"), !0) : r === "r" ? (t.preventDefault(), e.dispatchCommand(E, "right"), !0) : r === "j" ? (t.preventDefault(), e.dispatchCommand(E, "justify"), !0) : !1 : !1;
|
|
8520
8550
|
}, b);
|
|
8521
8551
|
}, [t, e]), null;
|
|
8522
8552
|
}
|
|
8523
8553
|
//#endregion
|
|
8524
8554
|
//#region src/plugins/TableBoundaryPlugin.tsx
|
|
8525
|
-
function
|
|
8526
|
-
return
|
|
8555
|
+
function Bu(e) {
|
|
8556
|
+
return Xe(e) || J(e) || Ia(e);
|
|
8527
8557
|
}
|
|
8528
|
-
function
|
|
8558
|
+
function Vu() {
|
|
8529
8559
|
let [e] = F();
|
|
8530
8560
|
return Ce(() => e.registerUpdateListener(({ editorState: t }) => {
|
|
8531
8561
|
let n = !1, r = null;
|
|
8532
8562
|
t.read(() => {
|
|
8533
8563
|
let e = u().getChildren();
|
|
8534
|
-
n =
|
|
8535
|
-
for (let t = 0; t < e.length - 1; t += 1) if (
|
|
8564
|
+
n = Bu(e.at(-1));
|
|
8565
|
+
for (let t = 0; t < e.length - 1; t += 1) if (Bu(e[t]) && Bu(e[t + 1])) {
|
|
8536
8566
|
r = e[t].getKey();
|
|
8537
8567
|
break;
|
|
8538
8568
|
}
|
|
8539
8569
|
}), !(!n && !r) && e.update(() => {
|
|
8540
8570
|
if (r) {
|
|
8541
8571
|
let e = u().getChildren().find((e) => e.getKey() === r);
|
|
8542
|
-
if (
|
|
8572
|
+
if (Bu(e)) {
|
|
8543
8573
|
e.insertAfter(s());
|
|
8544
8574
|
return;
|
|
8545
8575
|
}
|
|
8546
8576
|
}
|
|
8547
8577
|
let e = u().getLastChild();
|
|
8548
|
-
|
|
8578
|
+
Bu(e) && e.insertAfter(s());
|
|
8549
8579
|
});
|
|
8550
8580
|
}), [e]), null;
|
|
8551
8581
|
}
|
|
8552
8582
|
//#endregion
|
|
8553
8583
|
//#region src/plugins/YouTubePlugin.tsx
|
|
8554
|
-
function
|
|
8584
|
+
function Hu() {
|
|
8555
8585
|
let [e] = F();
|
|
8556
8586
|
return Ce(() => {
|
|
8557
|
-
let t = e.registerCommand(
|
|
8558
|
-
let t =
|
|
8559
|
-
return
|
|
8587
|
+
let t = e.registerCommand(on, (e) => {
|
|
8588
|
+
let t = Fa(e), n = s();
|
|
8589
|
+
return ot(t), t.insertAfter(n), n.select(), !0;
|
|
8560
8590
|
}, x), n = e.registerUpdateListener(({ editorState: t }) => {
|
|
8561
8591
|
let n = !1;
|
|
8562
8592
|
t.read(() => {
|
|
8563
|
-
n =
|
|
8593
|
+
n = Ia(u().getLastChild());
|
|
8564
8594
|
}), n && e.update(() => {
|
|
8565
8595
|
let e = u().getLastChild();
|
|
8566
|
-
|
|
8596
|
+
Ia(e) && e.insertAfter(s());
|
|
8567
8597
|
});
|
|
8568
8598
|
});
|
|
8569
8599
|
return () => {
|
|
@@ -8573,24 +8603,24 @@ function zu() {
|
|
|
8573
8603
|
}
|
|
8574
8604
|
//#endregion
|
|
8575
8605
|
//#region src/components/rj-text-editor/footer/EditorFooter.tsx
|
|
8576
|
-
var
|
|
8606
|
+
var Uu = [
|
|
8577
8607
|
"words",
|
|
8578
8608
|
"characters",
|
|
8579
8609
|
"selection",
|
|
8580
8610
|
"language",
|
|
8581
8611
|
"mode",
|
|
8582
8612
|
"zoom"
|
|
8583
|
-
],
|
|
8613
|
+
], Wu = {
|
|
8584
8614
|
characters: 0,
|
|
8585
8615
|
isSelectionCollapsed: !0,
|
|
8586
8616
|
selectedCharacters: 0,
|
|
8587
8617
|
selectedWords: 0,
|
|
8588
8618
|
words: 0
|
|
8589
8619
|
};
|
|
8590
|
-
function
|
|
8620
|
+
function Gu(e, t) {
|
|
8591
8621
|
return e.characters === t.characters && e.isSelectionCollapsed === t.isSelectionCollapsed && e.selectedCharacters === t.selectedCharacters && e.selectedWords === t.selectedWords && e.words === t.words;
|
|
8592
8622
|
}
|
|
8593
|
-
function
|
|
8623
|
+
function Ku(e, t, n) {
|
|
8594
8624
|
return e === "words" ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("span", {
|
|
8595
8625
|
className: "rj-editor-footer-item-value",
|
|
8596
8626
|
children: t.words
|
|
@@ -8615,17 +8645,17 @@ function Uu(e, t, n) {
|
|
|
8615
8645
|
children: [t.zoom, "%"]
|
|
8616
8646
|
})] });
|
|
8617
8647
|
}
|
|
8618
|
-
var
|
|
8619
|
-
let [o] = F(), s = q(), [c, l] = j.useState(
|
|
8648
|
+
var qu = j.memo(function({ customFooter: e, isFocused: t, isFullscreen: n, items: r, language: i, zoom: a }) {
|
|
8649
|
+
let [o] = F(), s = q(), [c, l] = j.useState(Wu), f = j.useCallback(() => {
|
|
8620
8650
|
o.getEditorState().read(() => {
|
|
8621
8651
|
let e = u().getTextContent(), t = d(), n = m(t) ? t.getTextContent() : "", r = {
|
|
8622
|
-
characters:
|
|
8652
|
+
characters: Mt(e),
|
|
8623
8653
|
isSelectionCollapsed: !m(t) || t.isCollapsed(),
|
|
8624
|
-
selectedCharacters:
|
|
8625
|
-
selectedWords:
|
|
8626
|
-
words:
|
|
8654
|
+
selectedCharacters: Mt(n),
|
|
8655
|
+
selectedWords: Nt(n),
|
|
8656
|
+
words: Nt(e)
|
|
8627
8657
|
};
|
|
8628
|
-
l((e) =>
|
|
8658
|
+
l((e) => Gu(e, r) ? e : r);
|
|
8629
8659
|
});
|
|
8630
8660
|
}, [o]);
|
|
8631
8661
|
j.useEffect(() => (f(), o.registerUpdateListener(() => {
|
|
@@ -8649,7 +8679,7 @@ var Wu = j.memo(function({ customFooter: e, isFocused: t, isFullscreen: n, items
|
|
|
8649
8679
|
className: "rj-editor-footer",
|
|
8650
8680
|
children: e(p)
|
|
8651
8681
|
});
|
|
8652
|
-
let h = r?.length ? r :
|
|
8682
|
+
let h = r?.length ? r : Uu;
|
|
8653
8683
|
return /* @__PURE__ */ N("footer", {
|
|
8654
8684
|
"aria-label": s.footer.statusBar,
|
|
8655
8685
|
className: "rj-editor-footer",
|
|
@@ -8658,25 +8688,25 @@ var Wu = j.memo(function({ customFooter: e, isFocused: t, isFullscreen: n, items
|
|
|
8658
8688
|
children: h.map((e, t) => /* @__PURE__ */ P(j.Fragment, { children: [t > 0 && e === "mode" ? /* @__PURE__ */ N("span", { className: "rj-editor-footer-spacer" }) : null, /* @__PURE__ */ N("span", {
|
|
8659
8689
|
className: "rj-editor-footer-item",
|
|
8660
8690
|
"data-rj-editor-footer-item": e,
|
|
8661
|
-
children:
|
|
8691
|
+
children: Ku(e, p, s)
|
|
8662
8692
|
})] }, `${e}-${t}`))
|
|
8663
8693
|
})
|
|
8664
8694
|
});
|
|
8665
8695
|
});
|
|
8666
8696
|
//#endregion
|
|
8667
8697
|
//#region src/components/rj-text-editor/handleEditorChange.ts
|
|
8668
|
-
function
|
|
8698
|
+
function Ju(e, t, n) {
|
|
8669
8699
|
n && e.read(() => {
|
|
8670
|
-
n(
|
|
8700
|
+
n(yr(fe(t), t), JSON.stringify(e.toJSON()), e);
|
|
8671
8701
|
});
|
|
8672
8702
|
}
|
|
8673
8703
|
//#endregion
|
|
8674
8704
|
//#region src/components/rj-text-editor/HtmlValuePlugin.tsx
|
|
8675
|
-
function
|
|
8705
|
+
function Yu({ lastHtmlRef: e, value: t }) {
|
|
8676
8706
|
let [n] = F();
|
|
8677
8707
|
return j.useEffect(() => {
|
|
8678
8708
|
t === void 0 || t === e.current || n.update(() => {
|
|
8679
|
-
|
|
8709
|
+
zr(n, t), e.current = t;
|
|
8680
8710
|
});
|
|
8681
8711
|
}, [
|
|
8682
8712
|
n,
|
|
@@ -8686,7 +8716,7 @@ function Ku({ lastHtmlRef: e, value: t }) {
|
|
|
8686
8716
|
}
|
|
8687
8717
|
//#endregion
|
|
8688
8718
|
//#region src/components/rj-text-editor/RJTextEditorContent.tsx
|
|
8689
|
-
function
|
|
8719
|
+
function Xu({ autofocus: e, className: t, editorRef: n, footer: r, footerItems: i, footerLanguageLabel: a, footerZoom: o, id: s, isFullscreen: c, onBlur: l, onChange: u, onFocus: d, onToggleFullscreen: f, placeholder: p, showFooter: m, theme: h, value: g }) {
|
|
8690
8720
|
let _ = q(), v = j.useRef(g), [y, b] = j.useState(!1);
|
|
8691
8721
|
return /* @__PURE__ */ P("div", {
|
|
8692
8722
|
className: [
|
|
@@ -8712,41 +8742,41 @@ function qu({ autofocus: e, className: t, editorRef: n, footer: r, footerItems:
|
|
|
8712
8742
|
/* @__PURE__ */ P("div", {
|
|
8713
8743
|
className: "rj-editor-body",
|
|
8714
8744
|
children: [
|
|
8715
|
-
/* @__PURE__ */ N(
|
|
8716
|
-
contentEditable: /* @__PURE__ */ N(
|
|
8717
|
-
ErrorBoundary:
|
|
8745
|
+
/* @__PURE__ */ N(ht, {
|
|
8746
|
+
contentEditable: /* @__PURE__ */ N(lt, { className: "rj-editor-input" }),
|
|
8747
|
+
ErrorBoundary: ut,
|
|
8718
8748
|
placeholder: /* @__PURE__ */ N("div", {
|
|
8719
8749
|
className: "rj-editor-placeholder",
|
|
8720
8750
|
children: p === void 0 ? _.placeholders.editor : p
|
|
8721
8751
|
})
|
|
8722
8752
|
}),
|
|
8723
|
-
/* @__PURE__ */ N(
|
|
8753
|
+
/* @__PURE__ */ N(dt, {}),
|
|
8724
8754
|
/* @__PURE__ */ N(Ql, {}),
|
|
8725
8755
|
/* @__PURE__ */ N(xu, {}),
|
|
8726
8756
|
/* @__PURE__ */ N(gu, {}),
|
|
8727
8757
|
/* @__PURE__ */ N(Rl, {}),
|
|
8728
|
-
/* @__PURE__ */ N(
|
|
8729
|
-
/* @__PURE__ */ N(Nu, {}),
|
|
8758
|
+
/* @__PURE__ */ N(Du, {}),
|
|
8730
8759
|
/* @__PURE__ */ N(Iu, {}),
|
|
8731
8760
|
/* @__PURE__ */ N(zu, {}),
|
|
8732
|
-
/* @__PURE__ */ N(
|
|
8761
|
+
/* @__PURE__ */ N(Hu, {}),
|
|
8733
8762
|
/* @__PURE__ */ N(ft, {}),
|
|
8734
|
-
/* @__PURE__ */ N(
|
|
8735
|
-
/* @__PURE__ */ N(
|
|
8763
|
+
/* @__PURE__ */ N(pt, {}),
|
|
8764
|
+
/* @__PURE__ */ N(gt, {}),
|
|
8765
|
+
/* @__PURE__ */ N(Vu, {}),
|
|
8736
8766
|
/* @__PURE__ */ N(eo, {}),
|
|
8737
|
-
/* @__PURE__ */ N(
|
|
8767
|
+
/* @__PURE__ */ N(Yu, {
|
|
8738
8768
|
lastHtmlRef: v,
|
|
8739
8769
|
value: g
|
|
8740
8770
|
}),
|
|
8741
|
-
/* @__PURE__ */ N(
|
|
8771
|
+
/* @__PURE__ */ N(mt, { onChange: (e, t) => {
|
|
8742
8772
|
e.read(() => {
|
|
8743
|
-
v.current =
|
|
8744
|
-
}),
|
|
8773
|
+
v.current = yr(fe(t), t);
|
|
8774
|
+
}), Ju(e, t, u);
|
|
8745
8775
|
} }),
|
|
8746
|
-
e ? /* @__PURE__ */ N(
|
|
8776
|
+
e ? /* @__PURE__ */ N(ct, {}) : null
|
|
8747
8777
|
]
|
|
8748
8778
|
}),
|
|
8749
|
-
m ? /* @__PURE__ */ N(
|
|
8779
|
+
m ? /* @__PURE__ */ N(qu, {
|
|
8750
8780
|
customFooter: r,
|
|
8751
8781
|
isFocused: y,
|
|
8752
8782
|
isFullscreen: c,
|
|
@@ -8759,8 +8789,8 @@ function qu({ autofocus: e, className: t, editorRef: n, footer: r, footerItems:
|
|
|
8759
8789
|
}
|
|
8760
8790
|
//#endregion
|
|
8761
8791
|
//#region src/components/RJTextEditor.tsx
|
|
8762
|
-
function
|
|
8763
|
-
let b = j.useMemo(() =>
|
|
8792
|
+
function Zu({ autofocus: e = !1, className: t, defaultValue: n, footer: r, footerItems: i, footerLanguageLabel: a, footerZoom: o = 100, id: s, locale: c = "en", locales: l, namespace: u = "RJEditor", onBlur: d, onChange: f, onFocus: p, onUpload: m, placeholder: h, showFooter: g = !1, translations: _, theme: v = "auto", value: y }) {
|
|
8793
|
+
let b = j.useMemo(() => Yr(), []), x = j.useRef(null), [S, C] = j.useState(!1), w = pi(v), ee = j.useMemo(() => oi(w), [w]), T = Ra({
|
|
8764
8794
|
defaultValue: n,
|
|
8765
8795
|
namespace: u,
|
|
8766
8796
|
value: y
|
|
@@ -8780,13 +8810,13 @@ function Ju({ autofocus: e = !1, className: t, defaultValue: n, footer: r, foote
|
|
|
8780
8810
|
}
|
|
8781
8811
|
await x.current?.requestFullscreen();
|
|
8782
8812
|
}, D = j.useCallback((e) => document.fullscreenElement || x.current || e?.parentElement || document.body, []);
|
|
8783
|
-
return /* @__PURE__ */ N(
|
|
8813
|
+
return /* @__PURE__ */ N(Ee, {
|
|
8784
8814
|
store: b,
|
|
8785
|
-
children: /* @__PURE__ */ N(
|
|
8815
|
+
children: /* @__PURE__ */ N(ri, {
|
|
8786
8816
|
locale: c,
|
|
8787
8817
|
locales: l,
|
|
8788
8818
|
translations: _,
|
|
8789
|
-
children: /* @__PURE__ */ N(
|
|
8819
|
+
children: /* @__PURE__ */ N(si.Provider, {
|
|
8790
8820
|
value: w,
|
|
8791
8821
|
children: /* @__PURE__ */ N(_e, {
|
|
8792
8822
|
getPopupContainer: D,
|
|
@@ -8795,13 +8825,13 @@ function Ju({ autofocus: e = !1, className: t, defaultValue: n, footer: r, foote
|
|
|
8795
8825
|
initialConfig: T,
|
|
8796
8826
|
children: /* @__PURE__ */ N(Ba, {
|
|
8797
8827
|
onImageUpload: m,
|
|
8798
|
-
children: /* @__PURE__ */ N(
|
|
8828
|
+
children: /* @__PURE__ */ N(Xu, {
|
|
8799
8829
|
autofocus: e,
|
|
8800
8830
|
className: t,
|
|
8801
8831
|
editorRef: x,
|
|
8802
8832
|
footer: r,
|
|
8803
8833
|
footerItems: i,
|
|
8804
|
-
footerLanguageLabel: a ||
|
|
8834
|
+
footerLanguageLabel: a || Qu(c),
|
|
8805
8835
|
footerZoom: o,
|
|
8806
8836
|
id: s,
|
|
8807
8837
|
isFullscreen: S,
|
|
@@ -8821,11 +8851,11 @@ function Ju({ autofocus: e = !1, className: t, defaultValue: n, footer: r, foote
|
|
|
8821
8851
|
})
|
|
8822
8852
|
});
|
|
8823
8853
|
}
|
|
8824
|
-
function
|
|
8854
|
+
function Qu(e) {
|
|
8825
8855
|
return e === "uz" ? "O‘zbek" : e === "ru" ? "Русский" : e === "en" ? "English" : e;
|
|
8826
8856
|
}
|
|
8827
8857
|
//#endregion
|
|
8828
8858
|
//#region src/index.ts
|
|
8829
|
-
|
|
8859
|
+
Or();
|
|
8830
8860
|
//#endregion
|
|
8831
|
-
export {
|
|
8861
|
+
export { ri as RJEditorI18nProvider, Zu as RJTextEditor, Xr as enTranslations, Qr as mergeTranslations, Or as registerCodeBlockCopyHandler, $r as ruTranslations, q as useRJEditorI18n, ei as uzTranslations };
|