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.
@@ -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");
@@ -8,8 +8,8 @@ function injectRJEditorStyle() {
8
8
  document.head.appendChild(style);
9
9
  }
10
10
  injectRJEditorStyle();
11
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`lexical`),require(`katex`),require(`katex/contrib/mhchem`),require(`@lexical/html`),require(`@lexical/react/LexicalComposer`),require(`antd`),require(`react`),require(`react-redux`),require(`@reduxjs/toolkit`),require(`react/jsx-runtime`),require(`@lexical/link`),require(`@lexical/list`),require(`@lexical/table`),require(`@lexical/utils`),require(`@lexical/react/LexicalComposerContext`),require(`@lexical/react/useLexicalNodeSelection`),require(`@lexical/react/LexicalAutoFocusPlugin`),require(`@lexical/react/LexicalContentEditable`),require(`@lexical/react/LexicalErrorBoundary`),require(`@lexical/react/LexicalHistoryPlugin`),require(`@lexical/react/LexicalLinkPlugin`),require(`@lexical/react/LexicalListPlugin`),require(`@lexical/react/LexicalOnChangePlugin`),require(`@lexical/react/LexicalRichTextPlugin`),require(`@lexical/react/LexicalTablePlugin`),require(`@lexical/selection`),require(`react-dom`)):typeof define==`function`&&define.amd?define(`exports.lexical.katex.katex/contrib/mhchem.@lexical/html.@lexical/react/LexicalComposer.antd.react.react-redux.@reduxjs/toolkit.react/jsx-runtime.@lexical/link.@lexical/list.@lexical/table.@lexical/utils.@lexical/react/LexicalComposerContext.@lexical/react/useLexicalNodeSelection.@lexical/react/LexicalAutoFocusPlugin.@lexical/react/LexicalContentEditable.@lexical/react/LexicalErrorBoundary.@lexical/react/LexicalHistoryPlugin.@lexical/react/LexicalLinkPlugin.@lexical/react/LexicalListPlugin.@lexical/react/LexicalOnChangePlugin.@lexical/react/LexicalRichTextPlugin.@lexical/react/LexicalTablePlugin.@lexical/selection.react-dom`.split(`.`),t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.RJEditor={},e.Lexical,e.katex,e.katex,e.Lexical,e.Lexical,e.antd,e.React,e.ReactRedux,e.RTK,e.jsxRuntime,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.ReactDOM))})(this,function(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var O=Object.create,k=Object.defineProperty,A=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyNames,te=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty,j=(e,t)=>()=>(e&&(t=e(e=0)),t),M=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),re=(e,t)=>{let n={};for(var r in e)k(n,r,{get:e[r],enumerable:!0});return t||k(n,Symbol.toStringTag,{value:`Module`}),n},ie=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ee(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ne.call(e,s)&&s!==n&&k(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=A(t,s))||r.enumerable});return e},N=(e,t,n)=>(n=e==null?{}:O(te(e)),ie(t||!e||!e.__esModule?k(n,`default`,{value:e,enumerable:!0}):n,e));n=N(n,1);let P=N(s,1);s=N(s);function ae(e){return typeof e!=`string`}function oe(e,t){let[n,...r]=t.split(`>`);if(r.length>0){let t=oe(e,n);return ae(t)?oe(t,r.join(`>`)):``}switch(e.kind){case`accent`:case`bracket`:case`text`:return`value`in e&&t===`${e.kind}.value`?e.value:``;case`fraction`:return t===`fraction.denominator`?e.denominator:t===`fraction.numerator`?e.numerator:``;case`function`:return t===`function.argument`?e.argument:``;case`integral`:return t===`integral.body`?e.body:t===`integral.lower`?e.lower||``:t===`integral.upper`?e.upper||``:t===`integral.variable`?e.variable:``;case`largeOperator`:return t===`largeOperator.body`?e.body:t===`largeOperator.lower`?e.lower||``:t===`largeOperator.upper`&&e.upper||``;case`limit`:return t===`limit.body`?e.body:t===`limit.target`?e.target:``;case`matrix`:{let[,,n,r]=t.split(`.`),i=Number(n),a=Number(r);return e.cells[i]?.[a]||``}case`operator`:return t===`operator.value`?e.value:``;case`root`:return t===`root.index`?e.index||``:t===`root.value`?e.value:``;case`row`:{let[,,n]=t.split(`.`),r=Number(n);return e.items[r]||``}case`script`:return t===`script.base`?e.base:t===`script.subscript`?e.subscript||``:t===`script.superscript`&&e.superscript||``;default:return``}}function se(e){let t=e.split(`>`),n=t.at(-1)?.match(/^row\.insert\.(\d+)$/);return n?{insertIndex:Number(n[1]),rowSlotId:t.slice(0,-1).join(`>`)}:null}function ce(e){return typeof e!=`string`}function le(e,t,n){return ce(e)?ue(e,t,n):e}function ue(e,t,n){let[r,...i]=t.split(`>`);if(i.length>0){let t=i.join(`>`);return ue(e,r,le(de(e,r),t,n))}switch(e.kind){case`accent`:return t===`accent.value`?{...e,value:n}:e;case`bracket`:return t===`bracket.value`?{...e,value:n}:e;case`fraction`:return t===`fraction.denominator`?{...e,denominator:n}:t===`fraction.numerator`?{...e,numerator:n}:e;case`function`:return t===`function.argument`?{...e,argument:n}:e;case`integral`:return t===`integral.body`?{...e,body:n}:t===`integral.lower`?{...e,lower:n}:t===`integral.upper`?{...e,upper:n}:t===`integral.variable`?{...e,variable:n}:e;case`largeOperator`:return t===`largeOperator.body`?{...e,body:n}:t===`largeOperator.lower`?{...e,lower:n}:t===`largeOperator.upper`?{...e,upper:n}:e;case`limit`:return t===`limit.body`?{...e,body:n}:t===`limit.target`?{...e,target:n}:e;case`matrix`:{let[,,r,i]=t.split(`.`),a=Number(r),o=Number(i);return Number.isNaN(a)||Number.isNaN(o)||!e.cells[a]?e:{...e,cells:e.cells.map((e,t)=>t===a?e.map((e,t)=>t===o?n:e):e)}}case`operator`:return t===`operator.value`&&typeof n==`string`?{...e,value:n}:e;case`row`:{let[,,r]=t.split(`.`),i=Number(r);return!ce(n)||Number.isNaN(i)?e:{...e,items:e.items.map((e,t)=>t===i?n:e)}}case`root`:return t===`root.index`?{...e,index:n}:t===`root.value`?{...e,value:n}:e;case`script`:return t===`script.base`?{...e,base:n}:t===`script.subscript`?{...e,subscript:n}:t===`script.superscript`?{...e,superscript:n}:e;case`text`:return t===`text.value`&&typeof n==`string`?{...e,value:n}:e;default:return e}}function de(e,t){switch(e.kind){case`accent`:case`bracket`:case`text`:return`value`in e&&t===`${e.kind}.value`?e.value:``;case`fraction`:return t===`fraction.denominator`?e.denominator:t===`fraction.numerator`?e.numerator:``;case`function`:return t===`function.argument`?e.argument:``;case`integral`:return t===`integral.body`?e.body:t===`integral.lower`?e.lower||``:t===`integral.upper`?e.upper||``:t===`integral.variable`?e.variable:``;case`largeOperator`:return t===`largeOperator.body`?e.body:t===`largeOperator.lower`?e.lower||``:t===`largeOperator.upper`&&e.upper||``;case`limit`:return t===`limit.body`?e.body:t===`limit.target`?e.target:``;case`matrix`:{let[,,n,r]=t.split(`.`),i=Number(n),a=Number(r);return e.cells[i]?.[a]||``}case`operator`:return t===`operator.value`?e.value:``;case`root`:return t===`root.index`?e.index||``:t===`root.value`?e.value:``;case`row`:{let[,,n]=t.split(`.`),r=Number(n);return e.items[r]||``}case`script`:return t===`script.base`?e.base:t===`script.subscript`?e.subscript||``:t===`script.superscript`&&e.superscript||``;default:return``}}function fe(e){return{kind:`text`,value:e}}function pe(e,t,n){if(typeof e==`string`){let r=Math.max(0,Math.min(n?.start??e.length,e.length)),i=Math.max(r,Math.min(n?.end??r,e.length));return`${e.slice(0,r)}${t}${e.slice(i)}`}if(e.kind===`row`){let n=e.items.at(-1);return n?.kind===`text`&&typeof n.value==`string`?{...e,items:[...e.items.slice(0,-1),{...n,value:`${n.value}${t}`}]}:{...e,items:[...e.items,fe(t)]}}return{items:[e,fe(t)],kind:`row`}}function me(e,t,n,r){let i=se(t);if(i){let t=i.rowSlotId?oe(e,i.rowSlotId):e;if(typeof t!=`string`&&t.kind===`row`){let r=Math.max(0,Math.min(i.insertIndex,t.items.length)),a=fe(n),o={...t,items:[...t.items.slice(0,r),a,...t.items.slice(r)]};return{activeSlotId:[i.rowSlotId,`row.items.${r}>text.value`].filter(Boolean).join(`>`),model:i.rowSlotId?ue(e,i.rowSlotId,o):o,selection:{end:n.length,start:n.length}}}}let a=oe(e,t),o=typeof a==`string`?Math.max(0,Math.min(r?.start??a.length,a.length)):n.length;return{activeSlotId:t,model:ue(e,t,pe(a,n,r)),selection:{end:o+n.length,start:o+n.length}}}function he(e,t,n){return typeof t==`number`&&e<t?t:typeof n==`number`&&e>n?n:e}async function ge(e){if(typeof navigator<`u`&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}if(typeof document>`u`)return;let t=document.createElement(`textarea`);t.setAttribute(`aria-hidden`,`true`),t.style.position=`fixed`,t.style.opacity=`0`,t.value=e,document.body.append(t),t.select(),document.execCommand(`copy`),t.remove()}function _e(e){return Array.from(e.replace(/\n/g,``)).length}function ve(e){let t=e.replace(/\u00a0/g,` `).trim();return t?t.split(/\s+/).length:0}var ye=`rj-equation-model:`;function be(e){return e.startsWith(ye)}function xe(e){if(!be(e))return null;try{return JSON.parse(decodeURIComponent(e.slice(ye.length)))}catch{return null}}function Se(e){return`${ye}${encodeURIComponent(JSON.stringify(e))}`}var Ce={"&":`&amp;`,'"':`&quot;`,"'":`&#39;`,"<":`&lt;`,">":`&gt;`};function we(e){return e.replace(/[&"'<>]/g,e=>Ce[e])}function Te(e,t){if(!t||e===``)return e;let n=e.endsWith(`.`),[r,i]=e.split(`.`),a=r.replace(/\B(?=(\d{3})+(?!\d))/g,` `);return typeof i==`string`?`${a}.${i}`:n?`${a}.`:a}function Ee(){return typeof navigator>`u`?!1:/Mac|iPhone|iPad|iPod/i.test(navigator.platform)}function F(e,t){return`${e.replace(/\bMOD\b/g,Ee()?`CMD`:`CTRL`)} | ${t}`}function I(e){switch(e.kind){case`accent`:case`bracket`:case`text`:return`${e.kind}.value`;case`fraction`:return`fraction.numerator`;case`function`:return`function.argument`;case`integral`:return e.upper===void 0?e.lower===void 0?`integral.body`:`integral.lower`:`integral.upper`;case`largeOperator`:return`largeOperator.upper`;case`limit`:return`limit.target`;case`matrix`:return`matrix.cells.0.0`;case`operator`:return`operator.value`;case`row`:return e.items[0]?`row.items.0>${I(e.items[0])}`:``;case`root`:return e.index===void 0?`root.value`:`root.index`;case`script`:return e.position===`before`?e.superscript===void 0?`script.subscript`:`script.superscript`:`script.base`;default:return``}}var De=/^[a-zA-Z0-9_-]{11}$/;function Oe(e){let t=e.trim();if(De.test(t))return t;try{let e=new URL(t),n=e.hostname.replace(/^www\./,``);if(n===`youtu.be`){let t=e.pathname.split(`/`).filter(Boolean)[0];return t&&De.test(t)?t:null}if(n===`youtube.com`||n===`m.youtube.com`||n===`youtube-nocookie.com`){let t=e.searchParams.get(`v`);if(t&&De.test(t))return t;let[,n,r]=e.pathname.split(`/`);if([`embed`,`live`,`shorts`].includes(n)&&r&&De.test(r))return r}}catch{return null}return null}function ke(e){return{kind:`text`,value:e}}function Ae(e,t,n){if(typeof e==`string`){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);return{items:[a?ke(a):null,t,o?ke(o):null].filter(Boolean),kind:`row`}}if(e.kind===`row`){let n=e.items.at(-1),r=n?.kind===`text`&&typeof n.value==`string`&&!n.value.trim();return{...e,items:r?[...e.items.slice(0,-1),t]:[...e.items,t]}}return{items:[e,t],kind:`row`}}function je(e,t){if(!t)return e.kind===`row`?e:null;let n=oe(e,t);return typeof n!=`string`&&n.kind===`row`?n:null}function Me(e){let t=e.split(`>`);return t.at(-1)===`text.value`?t.slice(0,-1).join(`>`):null}function Ne(e,t){return e?`${e}>${t}`:t}function Pe(e,t,n,r){if(typeof t==`string`&&!t.trim())return Ne(e,`row.items.0>${I(n)}`);if(typeof t==`string`)return Ne(e,`row.items.${r?.start&&r.start>0?1:0}>${I(n)}`);if(typeof t!=`string`&&t.kind===`row`){let r=t.items.at(-1);return Ne(e,`row.items.${r?.kind===`text`&&typeof r.value==`string`&&!r.value.trim()?t.items.length-1:t.items.length}>${I(n)}`)}return Ne(e,`row.items.1>${I(n)}`)}function Fe(e,t,n,r){let i=se(t);if(i){let t=je(e,i.rowSlotId);if(!t)return{activeSlotId:I(n),model:e};let r=Math.max(0,Math.min(i.insertIndex,t.items.length)),a={...t,items:[...t.items.slice(0,r),n,...t.items.slice(r)]};return{activeSlotId:Ne(i.rowSlotId,`row.items.${r}>${I(n)}`),model:i.rowSlotId?ue(e,i.rowSlotId,a):a}}let a=Me(t),o=oe(e,t),s=Ae(o,n,r);return a===null?{activeSlotId:Pe(t,o,n,r),model:ue(e,t,s)}:{activeSlotId:Pe(a,o,n,r),model:a?ue(e,a,s):s}}function Ie(e,t,n){let r=e.replace(/,/g,`.`).replace(/\s/g,``),i=``,a=!1,o=0;for(let e of r){if(/\d/.test(e)){if(a){if(o>=t)continue;o+=1}i+=e;continue}!n&&e===`.`&&!a&&(a=!0,i+=e)}return i}var Le=[`#FFFFFF`,`#FEF3C7`,`#DBEAFE`,`#DCFCE7`,`#FCE7F3`,`#EDE9FE`,`#E5E7EB`],Re=`rj-editor-equation-insert`,ze=[`Arial`,`Georgia`,`Inter`,`Times New Roman`,`Trebuchet MS`,`Verdana`],Be=[`0.5rem`,`0.5625rem`,`0.6875rem`,`0.75rem`,`0.875rem`,`1rem`,`1.125rem`,`1.25rem`,`1.5rem`,`2rem`,`3rem`,`4.5rem`],L={alignment:``,backgroundColor:``,canRedo:!1,canUndo:!1,fontFamily:void 0,fontSize:void 0,isEquationSelected:!1,isBold:!1,isCode:!1,isImageSelected:!1,isItalic:!1,isStrikethrough:!1,isSubscript:!1,isSuperscript:!1,isUnderline:!1,isInTable:!1,lineHeight:void 0,listType:void 0,selectedImageAlignment:void 0,selectedImageAltText:void 0,selectedImageAspectRatioLocked:void 0,selectedImageBorderEnabled:void 0,selectedImageBorderRadius:void 0,selectedImageCaption:void 0,selectedImageHeight:void 0,selectedImageKey:void 0,selectedImageLinkUrl:void 0,selectedImageObjectFit:void 0,selectedImageRotation:void 0,selectedImageShadowEnabled:void 0,selectedImageTextWrap:void 0,selectedImageWidth:void 0,selectedEquation:void 0,selectedEquationDisplayMode:void 0,selectedEquationKey:void 0,selectedTableCellsCount:0,tableCellBackgroundColor:``,tableCellVerticalAlign:void 0,tableHasMergedCell:!1,textColor:``},Ve=(0,t.createCommand)(`INSERT_CODE_BLOCK_COMMAND`),He=(0,t.createCommand)(`INSERT_EQUATION_COMMAND`),Ue=(0,t.createCommand)(`INSERT_IMAGE_COMMAND`),We=(0,t.createCommand)(`INSERT_YOUTUBE_COMMAND`),Ge=[`1`,`1.15`,`1.5`,`2`,`2.5`,`3`],Ke=`rj-editor:open-link-modal`,qe=[`#111827`,`#dc2626`,`#2563eb`,`#059669`,`#9333ea`,`#ca8a04`];function Je(e){return e.trim().replace(/^['"]|['"]$/g,``).toLowerCase()}function Ye(e){if(!e)return;let t=e.split(`,`).map(Je);return ze.find(e=>t.includes(Je(e)))}function Xe(e){return e.trim().toLowerCase()}function Ze(e){if(!e)return;let t=Xe(e);return Be.find(e=>Xe(e)===t)}var Qe=16;function R(e){let t=e/Qe;return`${Number(t.toFixed(6))}rem`}var $e={border:`0.0625rem solid #cbd5e1`,borderCollapse:`separate`,borderRadius:`0.75rem`,borderSpacing:`0`,overflow:`hidden`,tableLayout:`fixed`,width:`100%`},et={border:`0`,borderBottom:`0.0625rem solid #cbd5e1`,borderRight:`0.0625rem solid #cbd5e1`,boxSizing:`border-box`,height:`2rem`,minWidth:`5rem`,padding:`0.5rem 0.625rem`,verticalAlign:`top`},tt={margin:`0.75rem 0`,maxWidth:`100%`,overflowX:`auto`},nt=`rgb(242, 243, 245)`,rt=`#cbd5e1`,it=`#f1f5f9`,at=`#eaf2ff`,ot=`#3a3a3a`,st=`#252525`,ct=`#303030`,lt=`[data-rj-editor-content="true"]`,ut=`pre.rj-editor-code-block`,dt=`data-rj-code-title`,ft=`data-rj-code-custom-title`,pt=`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace`,mt={background:`#0b0c0e`,border:`0.0625rem solid #34363a`,borderRadius:`0.5rem`,margin:`0.75rem 0`,maxWidth:`100%`,overflow:`hidden`},ht={alignItems:`center`,background:`#111214`,borderBottom:`0.0625rem solid #34363a`,color:`#a1a1aa`,display:`flex`,fontFamily:pt,fontSize:`0.75rem`,height:`2.625rem`,justifyContent:`space-between`,padding:`0 0.5rem 0 0.875rem`},gt={alignItems:`center`,background:`transparent`,border:`0.0625rem solid transparent`,borderRadius:`0.375rem`,color:`#a1a1aa`,cursor:`pointer`,display:`inline-flex`,height:`1.75rem`,justifyContent:`center`,padding:`0`,width:`1.75rem`},_t={background:`#0b0c0e`,border:`0`,borderRadius:`0`,color:`#ededed`,display:`block`,fontFamily:pt,fontSize:`0.8125rem`,lineHeight:`1.65`,margin:`0`,minHeight:`4.375rem`,outline:`none`,overflow:`auto`,padding:`1rem`,scrollbarColor:`#34363a transparent`,scrollbarWidth:`thin`,tabSize:`2`,whiteSpace:`pre`},vt={height:`1rem`,width:`1rem`},yt={margin:`0 0 0.75rem`},bt={lineHeight:`1.25rem`,margin:`0`,minHeight:`1.25rem`},xt={"rj-editor-list-ol":{margin:`0 0 0.75rem 1.5rem`,padding:`0`},"rj-editor-list-ul":{margin:`0 0 0.75rem 1.5rem`,padding:`0`}},St={margin:`0.25rem 0`},Ct={border:`0`,borderTop:`0.0625rem solid #d9dde5`,margin:`1rem 0`},wt={"rj-editor-text-bold":{fontWeight:`700`},"rj-editor-text-italic":{fontStyle:`italic`},"rj-editor-text-subscript":{fontSize:`0.75em`,verticalAlign:`sub`},"rj-editor-text-superscript":{fontSize:`0.75em`,verticalAlign:`super`}},Tt={background:`#2a2828`,border:`0.0625rem solid rgb(255 255 255 / 14%)`,borderRadius:`0.375rem`,color:`#ededed`,fontFamily:pt,fontSize:`0.92em`,lineHeight:`1.35`,padding:`0.125rem 0.375rem`,whiteSpace:`pre-wrap`},Et={"rj-editor-code-token-comment":{color:`#7f848e`},"rj-editor-code-token-atrule":{color:`#c678dd`},"rj-editor-code-token-keyword":{color:`#c678dd`},"rj-editor-code-token-namespace":{color:`#c678dd`},"rj-editor-code-token-important":{color:`#c678dd`},"rj-editor-code-token-attr":{color:`#98c379`},"rj-editor-code-token-char":{color:`#98c379`},"rj-editor-code-token-inserted":{color:`#98c379`},"rj-editor-code-token-regex":{color:`#98c379`},"rj-editor-code-token-selector":{color:`#98c379`},"rj-editor-code-token-string":{color:`#98c379`},"rj-editor-code-token-boolean":{color:`#d19a66`},"rj-editor-code-token-constant":{color:`#d19a66`},"rj-editor-code-token-number":{color:`#d19a66`},"rj-editor-code-token-symbol":{color:`#d19a66`},"rj-editor-code-token-class":{color:`#61afef`},"rj-editor-code-token-class-name":{color:`#61afef`},"rj-editor-code-token-function":{color:`#61afef`},"rj-editor-code-token-builtin":{color:`#56b6c2`},"rj-editor-code-token-entity":{color:`#56b6c2`},"rj-editor-code-token-operator":{color:`#56b6c2`},"rj-editor-code-token-property":{color:`#56b6c2`},"rj-editor-code-token-punctuation":{color:`#56b6c2`},"rj-editor-code-token-url":{color:`#56b6c2`},"rj-editor-code-token-variable":{color:`#56b6c2`},"rj-editor-code-token-deleted":{color:`#e06c75`},"rj-editor-code-token-tag":{color:`#e06c75`}},Dt=`#2563eb`,Ot={color:Dt,textDecoration:`underline`},kt={"rj-editor-equation-render":{alignItems:`center`,display:`inline-flex`,fontFamily:`Georgia, 'Times New Roman', serif`,fontSize:`1.25rem`,fontStyle:`italic`,gap:`0.25rem`,justifyContent:`center`,lineHeight:`1.15`,maxWidth:`100%`,minWidth:`0`,verticalAlign:`middle`},"rj-editor-equation-render-slot":{display:`inline-block`,maxWidth:`8.75rem`,minWidth:`0.625rem`,overflow:`hidden`,textAlign:`center`,textOverflow:`ellipsis`},"rj-editor-equation-render--fraction":{alignItems:`center`,display:`inline-grid`,gap:`0.125rem`,justifyItems:`center`,minWidth:`0`},"rj-editor-equation-render-line":{background:`#111827`,display:`block`,height:`0.125rem`,width:`100%`},"rj-editor-equation-render--fraction-inline":{alignItems:`center`,display:`inline-flex`,flexWrap:`nowrap`,gap:`0.125rem`,minWidth:`0`},"rj-editor-equation-render--row":{alignItems:`center`,display:`inline-flex`,flexWrap:`nowrap`,gap:`0.125rem`,minWidth:`0`},"rj-editor-equation-render--script":{alignItems:`center`,gap:`0.125rem`,verticalAlign:`middle`},"rj-editor-equation-render-script-stack":{alignItems:`center`,display:`inline-grid`,fontSize:`0.68em`,gap:`0.0625rem`,justifyItems:`center`,lineHeight:`1`},"rj-editor-equation-render--root":{alignItems:`flex-start`,gap:`0`},"rj-editor-equation-render-root-symbol":{fontSize:`1.875rem`,fontStyle:`normal`,lineHeight:`1`},"rj-editor-equation-render-radicand":{borderTop:`0.125rem solid #111827`,display:`inline-flex`,marginTop:`0.125rem`,padding:`0.125rem 0.25rem 0`},"rj-editor-equation-render-root-index":{alignSelf:`flex-start`,fontSize:`0.62em`,marginRight:`-0.125rem`},"rj-editor-equation-render-limits":{alignItems:`center`,display:`inline-grid`,gap:`0.0625rem`,justifyItems:`center`,lineHeight:`1`},"rj-editor-equation-render-large-symbol":{fontSize:`2.125rem`,fontStyle:`normal`,lineHeight:`0.9`},"rj-editor-equation-render-bracket":{fontSize:`2.125rem`,fontStyle:`normal`,lineHeight:`1`},"rj-editor-equation-render-matrix-bracket":{fontSize:`2.125rem`,fontStyle:`normal`,lineHeight:`1`},"rj-editor-equation-render--accent":{display:`inline-grid`,gap:`0`,justifyItems:`center`},"rj-editor-equation-render-accent-mark":{fontSize:`1.125rem`,lineHeight:`0.7`},"rj-editor-equation-render-matrix-grid":{display:`inline-grid`,gap:`0.25rem 0.5rem`}},At={"--rj-editor-bg":`#ffffff`,"--rj-editor-border":`#d9dde5`,"--rj-editor-code-bg":`#0b0c0e`,"--rj-editor-code-border":`#34363a`,"--rj-editor-code-comment":`#7f848e`,"--rj-editor-code-function":`#61afef`,"--rj-editor-code-header-bg":`#111214`,"--rj-editor-code-keyword":`#c678dd`,"--rj-editor-code-muted":`#a1a1aa`,"--rj-editor-code-number":`#d19a66`,"--rj-editor-code-operator":`#56b6c2`,"--rj-editor-code-string":`#98c379`,"--rj-editor-code-tag":`#e06c75`,"--rj-editor-code-text":`#ededed`,"--rj-editor-focus-border":`#7aa7f7`,"--rj-editor-image-border":`#94a3b8`,"--rj-editor-image-shadow":`0 0.875rem 2rem rgb(15 23 42 / 18%)`,"--rj-editor-inline-code-bg":`#2a2828`,"--rj-editor-inline-code-border":`rgb(255 255 255 / 14%)`,"--rj-editor-inline-code-text":`#ededed`,"--rj-editor-link":Dt,"--rj-editor-muted-text":`#64748b`,"--rj-editor-table-border":rt,"--rj-editor-table-header-bg":it,"--rj-editor-table-selected-bg":at,"--rj-editor-text":`#111827`,"--rj-editor-toolbar-bg":`#f8fafc`,"--rj-editor-toolbar-button-active-bg":`#eaf2ff`};function jt(e){let t=e?.trim().toLowerCase();return t===`dark`||t===`only dark`?`dark`:t===`light`||t===`only light`?`light`:null}function Mt(e){let t=e?.getRootElement()?.closest(`[data-rj-editor-theme]`);return jt(t?.dataset.rjEditorTheme)||(globalThis.document===void 0?`light`:jt(globalThis.document.documentElement.dataset.rjEditorTheme)||jt(globalThis.document.body?.dataset.rjEditorTheme)||`light`)}function Nt(e){return e===`dark`?{border:ot,headerBg:st,selectedBg:ct}:{border:rt,headerBg:it,selectedBg:at}}function Pt(e){let t=`http://www.w3.org/2000/svg`,n=e.createElementNS(t,`svg`),r=e.createElementNS(t,`path`);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),z(n,vt),n}function Ft(e){e.querySelectorAll(ut).forEach(t=>{if(!(t instanceof HTMLElement)||t.closest(`[data-rj-editor-code-block="true"]`))return;let n=e.createElement(`div`),r=e.createElement(`div`),i=e.createElement(`span`),a=e.createElement(`button`);n.className=`rj-editor-code-block-export`,n.setAttribute(`data-rj-editor-code-block`,`true`),z(n,mt),r.className=`rj-editor-code-block-export-header`,z(r,ht),i.className=`rj-editor-code-block-export-language`,i.textContent=`>_ ${t.getAttribute(dt)||t.getAttribute(ft)||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(`title`,`Copy code`),a.setAttribute(`type`,`button`),z(a,gt),a.append(Pt(e)),t.classList.add(`rj-editor-code-block--exported`),z(t,_t),t.replaceWith(n),r.append(i,a),n.append(r,t)})}function It(e){e.querySelectorAll(`.rj-editor-paragraph`).forEach(e=>{if(!(e instanceof HTMLElement))return;let t=!!e.closest(`td, th`);z(e,t?bt:yt),!t&&!e.nextElementSibling&&(e.style.marginBottom=`0`),B(e,`rj-editor-paragraph`)}),e.querySelectorAll(`a`).forEach(e=>{e instanceof HTMLElement&&qt(e,Ot)}),e.querySelectorAll(`hr`).forEach(e=>{e instanceof HTMLElement&&z(e,Ct)})}function Lt(e){Object.entries(wt).forEach(([t,n])=>{e.querySelectorAll(`.${t}`).forEach(e=>{e instanceof HTMLElement&&(z(e,n),B(e,t))})}),e.querySelectorAll(`.rj-editor-text-underline, .rj-editor-text-strikethrough`).forEach(e=>{if(!(e instanceof HTMLElement))return;let t=new Set((e.style.textDecorationLine||``).split(/\s+/).filter(Boolean));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(` `),B(e,`rj-editor-text-underline`),B(e,`rj-editor-text-strikethrough`)})}function Rt(e){Object.entries(xt).forEach(([t,n])=>{e.querySelectorAll(`.${t}`).forEach(e=>{e instanceof HTMLElement&&(z(e,n),B(e,t))})}),e.querySelectorAll(`.rj-editor-list-item`).forEach(e=>{e instanceof HTMLElement&&(z(e,St),B(e,`rj-editor-list-item`))})}function zt(e,t){let n=Nt(t);e.querySelectorAll(`.rj-editor-table-scrollable-wrapper`).forEach(e=>{e instanceof HTMLElement&&(z(e,tt),B(e,`rj-editor-table-scrollable-wrapper`))}),e.querySelectorAll(`table`).forEach(e=>{e.classList.add(`rj-editor-table`),z(e,$e),e.style.border=`0.0625rem solid ${n.border}`,B(e,`rj-editor-table`)}),e.querySelectorAll(`table`).forEach(e=>{let t=Array.from(e.rows);t.forEach((e,r)=>{let i=Array.from(e.cells);i.forEach((e,a)=>{let o=e.tagName.toLowerCase()===`th`,s=o?`rj-editor-table-cell-header`:`rj-editor-table-cell`,c=e.style.backgroundColor===nt;e.classList.add(s),z(e,et),e.style.borderBottom=r===t.length-1?`0`:`0.0625rem solid ${n.border}`,e.style.borderRight=a===i.length-1?`0`:`0.0625rem solid ${n.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===t.length-1&&a===0&&(e.style.borderBottomLeftRadius=`0.75rem`),r===t.length-1&&a===i.length-1&&(e.style.borderBottomRightRadius=`0.75rem`),o&&(!e.style.backgroundColor||c)&&(e.style.backgroundColor=n.headerBg,e.style.fontWeight=`700`),e.classList.contains(`rj-editor-table-cell-selected`)&&(e.style.background=n.selectedBg,e.style.outline=`0.125rem solid #7aa7f7`,e.style.outlineOffset=`-0.125rem`,B(e,`rj-editor-table-cell-selected`)),B(e,s)}),B(e,`rj-editor-table-row`)})}),e.querySelectorAll(`.rj-editor-table-selection`).forEach(e=>{e.remove()})}function Bt(e){e.querySelectorAll(`.rj-editor-equation-render--script.has-superscript:not(.has-subscript) .rj-editor-equation-render-script-stack`).forEach(e=>{e instanceof HTMLElement&&(e.style.transform=`translateY(-0.4375rem)`)}),e.querySelectorAll(`.rj-editor-equation-render--script.has-subscript:not(.has-superscript) .rj-editor-equation-render-script-stack`).forEach(e=>{e instanceof HTMLElement&&(e.style.transform=`translateY(0.4375rem)`)}),e.querySelectorAll(`.rj-editor-equation-render--script.has-superscript.has-subscript .rj-editor-equation-render-script-stack`).forEach(e=>{e instanceof HTMLElement&&(e.style.transform=`translateY(-0.0625rem)`)}),e.querySelectorAll(`.rj-editor-equation-render-limits`).forEach(e=>{if(!(e instanceof HTMLElement))return;let t=e.firstElementChild,n=e.lastElementChild;t instanceof HTMLElement&&(t.style.fontSize=`0.62em`),n instanceof HTMLElement&&(n.style.fontSize=`0.62em`)}),e.querySelectorAll(`.rj-editor-equation-render-matrix-grid > span`).forEach(e=>{e instanceof HTMLElement&&(e.style.minWidth=`1.5rem`,e.style.textAlign=`center`)}),Object.entries(kt).forEach(([t,n])=>{e.querySelectorAll(`.${t}`).forEach(e=>{e instanceof HTMLElement&&(z(e,n),B(e,t))})}),e.querySelectorAll(`.has-superscript, .has-subscript`).forEach(e=>{e instanceof HTMLElement&&(B(e,`has-superscript`),B(e,`has-subscript`))}),e.querySelectorAll(`[class]`).forEach(e=>{e instanceof HTMLElement&&Array.from(e.classList).filter(e=>e.startsWith(`rj-editor-equation-render`)).forEach(t=>B(e,t))})}function Vt(e){e.querySelectorAll(`code`).forEach(e=>{if(!(e instanceof HTMLElement)||e.closest(ut)||e.matches(ut))return;let t=e.style.background||e.style.backgroundColor;qt(e,Tt),Ut(e),Wt(e),t&&!e.style.background&&(e.style.background=t),e.querySelectorAll(`span`).forEach(t=>{t instanceof HTMLElement&&(Gt(e,t)||Ht(t)&&t.replaceWith(...Array.from(t.childNodes)))})}),e.querySelectorAll(`.rj-editor-text-code`).forEach(e=>{e instanceof HTMLElement&&(e.closest(ut)||(e.closest(`code`)||z(e,Tt),e.classList.remove(`rj-editor-text-code`),e.className||e.removeAttribute(`class`)))}),Object.entries(Et).forEach(([t,n])=>{e.querySelectorAll(`.${t}`).forEach(e=>{e instanceof HTMLElement&&(z(e,n),e.classList.remove(t),e.className||e.removeAttribute(`class`))})})}function Ht(e){return Array.from(e.attributes).every(e=>[`class`,`style`,`data-lexical-text`].includes(e.name))}function Ut(e){let t=Array.from(e.querySelectorAll(`*`)).find(t=>!Gt(e,t)&&(t.style.backgroundColor||t.style.color));t&&(t.style.backgroundColor&&(e.style.background=t.style.backgroundColor),t.style.color&&(e.style.color=t.style.color))}function Wt(e){(e.closest(`a`)||e.querySelector(`a`))&&((!e.style.color||Kt(e.style.color))&&(e.style.color=Dt),e.querySelectorAll(`a`).forEach(e=>{e instanceof HTMLElement&&(e.style.color=Dt)}))}function Gt(e,t){let n=t.closest(`a`);return!!n&&!n.contains(e)}function Kt(e){let t=e.replace(/\s+/g,``).toLowerCase();return t===`#ededed`||t===`rgb(237,237,237)`}function z(e,t){Object.entries(t).forEach(([t,n])=>{typeof n==`string`&&e.style.setProperty(t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),n)})}function qt(e,t){Object.entries(t).forEach(([t,n])=>{if(typeof n!=`string`)return;let r=t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),i=r===`background`&&`backgroundColor`in e.style&&!!e.style.backgroundColor;!e.style.getPropertyValue(r)&&!i&&e.style.setProperty(r,n)})}function B(e,t){e.classList.remove(t),e.className||e.removeAttribute(`class`)}function Jt(e,t,n){let r=Nt(n);return e===`--rj-editor-table-border`?r.border:e===`--rj-editor-table-header-bg`?r.headerBg:e===`--rj-editor-table-selected-bg`?r.selectedBg:At[e]||t.trim()}function Yt(e){let t=e.indexOf(`,`);return t===-1?{fallback:``,name:e.trim()}:{fallback:e.slice(t+1).trim(),name:e.slice(0,t).trim()}}function Xt(e,t){let n=``,r=0;for(;r<e.length;){let i=e.indexOf(`var(`,r);if(i===-1){n+=e.slice(r);break}n+=e.slice(r,i);let a=1,o=i+4;for(;o<e.length;o+=1){let t=e[o];if(t===`(`&&(a+=1),t===`)`&&--a,a===0)break}if(a!==0){n+=e.slice(i);break}let{fallback:s,name:c}=Yt(e.slice(i+4,o));n+=Jt(c,s,t),r=o+1}return n}function Zt(e,t){e.querySelectorAll(`[style]`).forEach(e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&Array.from(e.style).forEach(n=>{let r=e.style.getPropertyValue(n);r.includes(`var(`)&&e.style.setProperty(n,Xt(r,t))})})}function Qt(e,t,n){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`)}function $t(e,t){let n=e.createElement(`span`);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}function en(e,t,n){let r=n?.trim();if(!r)return t;let i=e.createElement(`a`);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}function tn(e){return Array.from(e.querySelectorAll(`img[data-text-wrap="square"], [data-rj-image-caption-wrapper="true"], [data-rj-image-rotation-wrapper="true"]`)).some(e=>{let t=e;return t.style.float===`left`||t.style.float===`right`})}function nn(e){if(!tn(e)||e.body.children.length===1&&e.body.firstElementChild?.matches(lt))return;let t=e.createElement(`div`);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)}function rn(e,t){let n=t.getAttribute(`data-caption`)?.trim();if(!n)return!1;let r=t.getAttribute(`data-alignment`),i=t.getAttribute(`data-text-wrap`),a=e.createElement(`span`);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`,Qt(a,r,i),t.style.float=``,t.style.margin=`0`,t.style.width=`100%`,t.replaceWith(a),a.append(en(e,t,t.getAttribute(`data-link-url`)),$t(e,n)),!0}function an(e){return(Number(e||0)%360+360)%360}function on(e,t,n){let r=t.getAttribute(`data-rj-image-node-key`),i=an(t.getAttribute(`data-rotation`));if(!r||i!==90&&i!==270)return!1;let a=(n?.getElementByKey(r))?.querySelector(`.rj-editor-image-rotator`);if(!(a instanceof HTMLElement))return!1;let o=a.getBoundingClientRect(),s=a.offsetWidth,c=a.offsetHeight;if(!o.width||!o.height||!s||!c)return!1;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`);return m.setAttribute(`data-rj-image-rotation-wrapper`,`true`),m.style.display=`block`,m.style.height=R(Math.ceil(o.height)),m.style.maxWidth=`100%`,m.style.position=`relative`,m.style.width=R(Math.ceil(o.width)),Qt(m,l,f),p.style.display=`block`,p.style.height=R(Math.ceil(o.height)),p.style.position=`relative`,p.style.width=R(Math.ceil(o.width)),t.style.display=`block`,t.style.float=``,t.style.height=R(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=R(s),t.replaceWith(m),p.append(en(e,t,d)),m.append(p),u&&m.append($t(e,u)),!0}function sn(e,t){if(!e.trim()||typeof DOMParser>`u`)return e;let n=new DOMParser().parseFromString(e,`text/html`),r=Mt(t);return zt(n,r),n.querySelectorAll(`img[data-alignment]`).forEach(e=>{let r=e,i=r.getAttribute(`data-alignment`),a=r.getAttribute(`data-text-wrap`);on(n,r,t)||(r.style.display=`block`,r.style.maxWidth=`100%`,Qt(r,i,a),rn(n,r)||en(n,r,r.getAttribute(`data-link-url`)))}),It(n),Lt(n),Rt(n),Bt(n),Vt(n),Ft(n),nn(n),Zt(n,r),n.body.innerHTML}function cn(e,t){return typeof e!=`number`||Number.isNaN(e)?``:Te(String(e),t)}var ln=1200,un=700;function dn(){return document.fullscreenElement?new Promise(e=>{let t=()=>{window.clearTimeout(n),document.removeEventListener(`fullscreenchange`,t),e()},n=window.setTimeout(t,ln);document.addEventListener(`fullscreenchange`,t,{once:!0})}):Promise.resolve()}function fn(){return new Promise(e=>{window.setTimeout(e,un)})}async function pn(e){if(e){if(document.fullscreenElement)try{let e=dn();await document.exitFullscreen(),await e,await fn()}catch{}e.ownerDocument.defaultView?.focus(),e.click()}}function mn(e){return new Promise((t,n)=>{let r=new FileReader;r.addEventListener(`error`,()=>{n(r.error)}),r.addEventListener(`load`,()=>{if(typeof r.result==`string`){t(r.result);return}n(Error(`File could not be converted to base64.`))}),r.readAsDataURL(e)})}var hn=!1;function gn(){hn||typeof document>`u`||(hn=!0,document.addEventListener(`click`,async e=>{let t=e.target,n=t instanceof Element?t.closest(`[data-rj-editor-code-copy="true"]`):null;if(!(n instanceof HTMLButtonElement))return;let r=n.closest(`[data-rj-editor-code-block="true"]`)?.querySelector(`pre.rj-editor-code-block`);r instanceof HTMLElement&&(e.preventDefault(),await ge(r.textContent||``),n.classList.add(`is-copied`),n.setAttribute(`aria-label`,`Copied`),n.setAttribute(`title`,`Copied`),window.setTimeout(()=>{n.classList.remove(`is-copied`),n.setAttribute(`aria-label`,`Copy code`),n.setAttribute(`title`,`Copy code`)},1600))}))}function V(e,t=`□`){return e&&typeof e!=`string`?Sn(e):`<span class="rj-editor-equation-render-slot">${we(e?.trim()||t)}</span>`}function _n(e){return e===`absolute`?[`|`,`|`]:e===`angle`?[`⟨`,`⟩`]:e===`brace`?[`{`,`}`]:e===`ceiling`?[`⌈`,`⌉`]:e===`doubleAbsolute`?[`‖`,`‖`]:e===`floor`?[`⌊`,`⌋`]:e===`square`?[`[`,`]`]:[`(`,`)`]}function vn(e){return{intersection:`⋂`,product:`∏`,summation:`∑`,union:`⋃`}[e]}function yn(e){return{contour:`∮`,double:`∫∫`,single:`∫`,triple:`∫∫∫`}[e||`single`]}function bn(e){return[`rj-editor-equation-render`,`rj-editor-equation-render--script`,e.position===`before`?`rj-editor-equation-render--prescript`:``,e.superscript===void 0?``:`has-superscript`,e.subscript===void 0?``:`has-subscript`].filter(Boolean).join(` `)}function xn(e){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>${V(e)}</span>`)).join(``)}</span>`;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>`}function Sn(e){switch(e.kind){case`accent`:return`<span class="rj-editor-equation-render rj-editor-equation-render--accent"><span class="rj-editor-equation-render-accent-mark">${{bar:`¯`,dot:`˙`,doubleDot:`¨`,hat:`ˆ`,vector:`⃗`}[e.accent]}</span>${V(e.value,`x`)}</span>`;case`bracket`:{let[t,n]=_n(e.bracket);return`<span class="rj-editor-equation-render rj-editor-equation-render--bracket"><span class="rj-editor-equation-render-bracket">${we(t)}</span>${V(e.value,`x`)}<span class="rj-editor-equation-render-bracket">${we(n)}</span></span>`}case`fraction`:return e.variant===`linear`||e.variant===`skewed`?`<span class="rj-editor-equation-render rj-editor-equation-render--fraction-inline"><span>${V(e.numerator)}</span><span>${e.variant===`skewed`?`⁄`:`/`}</span><span>${V(e.denominator)}</span></span>`:`<span class="rj-editor-equation-render rj-editor-equation-render--fraction"><span>${V(e.numerator)}</span><span class="rj-editor-equation-render-line"></span><span>${V(e.denominator)}</span></span>`;case`function`:return`<span class="rj-editor-equation-render rj-editor-equation-render--function"><span>${e.functionName}</span><span>(</span>${V(e.argument,`x`)}<span>)</span></span>`;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?``:V(e.upper,`b`)}</span><span class="rj-editor-equation-render-large-symbol">${yn(e.variant)}</span><span>${e.lower===void 0?``:V(e.lower,`a`)}</span></span>${V(e.body,`f(x)`)}<span>d</span>${V(e.variable,`x`)}</span>`;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?``:V(e.upper,`n`)}</span><span class="rj-editor-equation-render-large-symbol">${vn(e.operator)}</span><span>${e.lower===void 0?``:V(e.lower,`i=1`)}</span></span>${V(e.body,`i`)}</span>`;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>${V(e.target,`x→0`)}</span></span>${V(e.body,`f(x)`)}</span>`;case`matrix`:return`<span class="rj-editor-equation-render rj-editor-equation-render--matrix">${xn(e)}</span>`;case`operator`:return`<span class="rj-editor-equation-render">${we(e.value||`□`)}</span>`;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">${V(e.index,`n`)}</span>`}<span class="rj-editor-equation-render-root-symbol">√</span><span class="rj-editor-equation-render-radicand">${V(e.value,`x`)}</span></span>`;case`script`:return e.position===`before`?`<span class="${bn(e)}"><span class="rj-editor-equation-render-script-stack">${e.superscript===void 0?``:`<span>${V(e.superscript,`n`)}</span>`}${e.subscript===void 0?``:`<span>${V(e.subscript,`1`)}</span>`}</span>${V(e.base,`Y`)}</span>`:`<span class="${bn(e)}">${V(e.base,`x`)}<span class="rj-editor-equation-render-script-stack">${e.superscript===void 0?``:`<span>${V(e.superscript,`2`)}</span>`}${e.subscript===void 0?``:`<span>${V(e.subscript,`i`)}</span>`}</span></span>`;case`text`:return`<span class="rj-editor-equation-render">${V(e.value,`□`)}</span>`;case`row`:return`<span class="rj-editor-equation-render rj-editor-equation-render--row">${e.items.map(Sn).join(``)}</span>`;default:return``}}function Cn(e,t){let r=xe(e);return r?Sn(r):n.default.renderToString(e,{displayMode:t===`block`,output:`mathml`,strict:!1,throwOnError:!1,trust:!1})}var wn=`data-rj-code-title`,Tn=`data-rj-code-custom-title`;function En(e){return e.querySelector(`.rj-editor-code-block-export-language`)?.textContent?.replace(/^>_\s*/,``).trim()||``}function Dn(e,n){let r=new DOMParser().parseFromString(n||``,`text/html`),a=r.body.querySelector(`[data-rj-editor-content="true"]`);r.body.querySelectorAll(`[data-rj-editor-code-block="true"]`).forEach(e=>{let t=e.querySelector(`pre.rj-editor-code-block`);if(!t){e.remove();return}if(t.classList.remove(`rj-editor-code-block--exported`),t.removeAttribute(`style`),!t.getAttribute(wn)){let n=En(e);n&&(t.setAttribute(wn,n),n!==(t.getAttribute(`data-language`)||`plain`)&&t.setAttribute(Tn,n))}e.replaceWith(t)}),a&&r.body.children.length===1&&r.body.replaceChildren(...Array.from(a.childNodes));let o=(0,i.$generateNodesFromDOM)(e,r),s=(0,t.$getRoot)();if(s.clear(),o.length>0){s.append(...o);return}s.append((0,t.$createParagraphNode)())}var On=(0,l.createSlice)({name:`toolbar`,initialState:L,reducers:{setCanRedo(e,t){e.canRedo=t.payload},setCanUndo(e,t){e.canUndo=t.payload},setTextFormats(e,t){e.isBold=t.payload.isBold,e.isCode=t.payload.isCode,e.isItalic=t.payload.isItalic,e.isStrikethrough=t.payload.isStrikethrough,e.isSubscript=t.payload.isSubscript,e.isSuperscript=t.payload.isSuperscript,e.isUnderline=t.payload.isUnderline},setStyleFormats(e,t){e.backgroundColor=t.payload.backgroundColor,e.fontFamily=t.payload.fontFamily,e.fontSize=t.payload.fontSize,e.lineHeight=t.payload.lineHeight,e.textColor=t.payload.textColor},setBlockFormats(e,t){e.alignment=t.payload.alignment,e.listType=t.payload.listType},setTableFormats(e,t){e.isInTable=t.payload.isInTable,e.selectedTableCellsCount=t.payload.selectedTableCellsCount,e.tableCellBackgroundColor=t.payload.tableCellBackgroundColor,e.tableCellVerticalAlign=t.payload.tableCellVerticalAlign,e.tableHasMergedCell=t.payload.tableHasMergedCell},setEquationFormats(e,t){e.isEquationSelected=t.payload.isEquationSelected,e.selectedEquation=t.payload.selectedEquation,e.selectedEquationDisplayMode=t.payload.selectedEquationDisplayMode,e.selectedEquationKey=t.payload.selectedEquationKey},setImageFormats(e,t){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}}}),{setBlockFormats:kn,setCanRedo:An,setCanUndo:jn,setEquationFormats:Mn,setImageFormats:Nn,setStyleFormats:Pn,setTableFormats:Fn,setTextFormats:In}=On.actions,Ln=On.reducer,Rn=()=>(0,l.configureStore)({reducer:{toolbar:Ln}});Rn();var zn=c.useDispatch.withTypes(),H=c.useSelector.withTypes(),Bn={alerts:{imageUploadFailed:`Image upload failed.`,imageSizeLimit:`Image size must be 5MB or less.`,onlyImages:`Only image files can be uploaded.`},common:{cancel:`Cancel`,close:`Close`,insert:`Insert`,moreColors:`More colors`,none:`None`,optional:`Optional`,save:`Save`},footer:{characters:`characters`,editing:`Editing`,focus:`Focus`,fullscreen:`Fullscreen`,language:`Language`,selected:`Selected`,statusBar:`Editor status`,words:`words`,zoom:`Zoom`},modal:{closeAriaLabel:`Close modal`},placeholders:{editor:`Write your article here...`},toolbar:{alignment:{center:`Align center`,justify:`Align justify`,left:`Align left`,right:`Align right`},codeBlock:{code:`Code`,codePlaceholder:`Write or paste code here...`,copied:`Copied`,copy:`Copy code`,language:`Language`,title:`Code block title`},fullscreen:{close:`Exit fullscreen`,open:`Open fullscreen`},history:{redo:`Redo`,undo:`Undo`},image:{alignCenter:`Align image center`,alignLeft:`Align image left`,alignRight:`Align image right`,alt:`Alt text`,altPlaceholder:`Describe this image`,border:`Border`,borderRadius:`Image border radius`,caption:`Caption`,captionPlaceholder:`Image caption`,cropMode:`Image crop mode`,delete:`Delete image`,editAlt:`Edit alt text`,editCaption:`Edit caption`,editLink:`Edit image link`,fitContain:`Contain`,fitCover:`Cover`,fitFill:`Fill`,link:`Link`,linkPlaceholder:`https://example.com`,replace:`Replace image`,rotateLeft:`Rotate left`,rotateRight:`Rotate right`,shadow:`Shadow`,squareWrap:`Square`,topBottomWrap:`Top and Bottom`,width:`Image width`},insert:{codeBlock:`Code block`,equation:`Equation`,horizontalLine:`Horizontal line`,image:`Image`,link:`Link`,table:`Table`,youtube:`YouTube`},link:{openInNewTab:`Open in new tab`,text:`Text`,textPlaceholder:`Link text`,title:`Title`,titlePlaceholder:`Optional`,url:`URL`,urlPlaceholder:`https://example.com`},list:{bullet:`Bulleted list`,numbered:`Numbered list`,remove:`Remove list`},spacing:{default:`Default`,lineAndParagraph:`Line and paragraph spacing`},shortcuts:{backgroundColor:`Background color`,bold:`Bold`,bulletList:`Bulleted list`,clearFormatting:`Clear formatting`,decreaseIndent:`Decrease indent`,fontFamily:`Font family`,fontSize:`Font size`,increaseIndent:`Increase indent`,italic:`Italic`,link:`Insert link`,numberedList:`Numbered list`,redo:`Redo`,removeList:`Remove list`,spacing:`Line spacing`,strikethrough:`Strikethrough`,subscript:`Subscript`,superscript:`Superscript`,textColor:`Text color`,underline:`Underline`,undo:`Undo`},style:{backgroundColor:`Background color`,clearFormatting:`Clear formatting`,fontFamily:`Font family`,fontFamilyPlaceholder:`Font`,fontSize:`Font size`,fontSizePlaceholder:`Size`,textColor:`Text color`},table:{alignBottom:`Align cell content to bottom`,alignMiddle:`Align cell content to middle`,alignTop:`Align cell content to top`,background:`Table cell background`,columns:`Columns`,deleteColumn:`Delete column`,deleteRow:`Delete row`,deleteTable:`Delete table`,headerColumn:`Header col`,headerRow:`Header row`,header:`Header`,insertColumnLeft:`Insert column left`,insertColumnRight:`Insert column right`,insertRowAbove:`Insert row above`,insertRowBelow:`Insert row below`,insertTable:`Insert table`,insertTableSize:`{columns}x{rows} Table`,mergeCells:`Merge`,columnLeft:`Col ←`,columnRight:`Col →`,rowAbove:`Row ↑`,rowBelow:`Row ↓`,column:`Col`,row:`Row`,rows:`Rows`,unmergeCell:`Unmerge`},tabs:{equation:`Equation`,home:`Home`,image:`Image`,insert:`Insert`,layout:`Layout`,table:`Table`},textFormat:{bold:`Bold`,code:`Inline code`,italic:`Italic`,strikethrough:`Strikethrough`,subscript:`Subscript`,superscript:`Superscript`,underline:`Underline`},youtube:{invalidUrl:`YouTube link or video ID is invalid.`,title:`Title`,titlePlaceholder:`Optional`,url:`YouTube URL`,urlPlaceholder:`https://www.youtube.com/watch?v=...`}}};function Vn(e){return!e||typeof e!=`object`?e:Array.isArray(e)?e.map(e=>Vn(e)):Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Vn(t)]))}function Hn(e,...t){return t.reduce((e,t)=>(t&&Object.entries(t).forEach(([t,n])=>{let r=e[t];if(n&&typeof n==`object`&&!Array.isArray(n)&&r&&typeof r==`object`){e[t]=Hn(r,n);return}e[t]=n}),e),Vn(e))}var Un=Hn(Bn,{alerts:{imageUploadFailed:`Не удалось загрузить изображение.`,imageSizeLimit:`Размер изображения должен быть не больше 5MB.`,onlyImages:`Можно загружать только изображения.`},common:{cancel:`Отмена`,close:`Закрыть`,insert:`Вставить`,moreColors:`Больше цветов`,none:`Нет`,optional:`Необязательно`,save:`Сохранить`},footer:{characters:`символов`,editing:`Редактирование`,focus:`Фокус`,fullscreen:`Полный экран`,language:`Язык`,selected:`Выделено`,statusBar:`Статус редактора`,words:`слов`,zoom:`Масштаб`},modal:{closeAriaLabel:`Закрыть модальное окно`},placeholders:{editor:`Напишите текст здесь...`},toolbar:{codeBlock:{code:`Код`,codePlaceholder:`Напишите или вставьте код здесь...`,copied:`Скопировано`,copy:`Копировать код`,language:`Язык`,title:`Название блока кода`},fullscreen:{close:`Выйти из полноэкранного режима`,open:`Открыть на весь экран`},image:{border:`Граница`,caption:`Подпись`,captionPlaceholder:`Подпись к изображению`,cropMode:`Режим обрезки изображения`,delete:`Удалить изображение`,replace:`Заменить изображение`,shadow:`Тень`},insert:{codeBlock:`Блок кода`,equation:`Формула`,horizontalLine:`Горизонтальная линия`,image:`Изображение`,link:`Ссылка`,table:`Таблица`},link:{openInNewTab:`Открывать в новой вкладке`,text:`Текст`,textPlaceholder:`Текст ссылки`,titlePlaceholder:`Необязательно`},table:{columns:`Столбцы`,headerColumn:`Заголовок столбца`,headerRow:`Заголовок строки`,insertTable:`Вставить таблицу`,insertTableSize:`Таблица {columns}x{rows}`,mergeCells:`Объединить`,rows:`Строки`,unmergeCell:`Разделить`},youtube:{invalidUrl:`Ссылка YouTube или video ID неверны.`,titlePlaceholder:`Необязательно`}}}),Wn=Hn(Bn,{alerts:{imageUploadFailed:`Rasmni yuklashda xatolik yuz berdi.`,imageSizeLimit:`Rasm hajmi 5MB yoki undan kichik bo‘lishi kerak.`,onlyImages:`Faqat rasm fayllarini yuklash mumkin.`},common:{cancel:`Bekor qilish`,close:`Yopish`,insert:`Qo‘shish`,moreColors:`Ko‘proq ranglar`,none:`Yo‘q`,optional:`Ixtiyoriy`,save:`Saqlash`},footer:{characters:`belgi`,editing:`Tahrirlash`,focus:`Fokus`,fullscreen:`To‘liq ekran`,language:`Til`,selected:`Tanlangan`,statusBar:`Editor holati`,words:`so‘z`,zoom:`Masshtab`},modal:{closeAriaLabel:`Modalni yopish`},placeholders:{editor:`Maqolangizni shu yerga yozing...`},toolbar:{codeBlock:{code:`Kod`,codePlaceholder:`Kodni shu yerga yozing yoki joylang...`,copied:`Nusxalandi`,copy:`Kodni nusxalash`,language:`Dasturlash tili`,title:`Kod bloki nomi`},fullscreen:{close:`To‘liq ekrandan chiqish`,open:`To‘liq ekranda ochish`},history:{redo:`Qaytarish`,undo:`Bekor qilish`},image:{alt:`Muqobil matn`,altPlaceholder:`Rasmni tasvirlab yozing`,border:`Chegara`,borderRadius:`Rasm burchak radiusi`,caption:`Izoh`,captionPlaceholder:`Rasm osti yozuvi`,cropMode:`Rasm ko‘rinish rejimi`,delete:`Rasmni o‘chirish`,editAlt:`Muqobil matnni tahrirlash`,editCaption:`Izohni tahrirlash`,editLink:`Rasm linkini tahrirlash`,fitContain:`Sig‘dirish`,fitCover:`Qoplash`,fitFill:`To‘ldirish`,replace:`Rasmni almashtirish`,rotateLeft:`Chapga aylantirish`,rotateRight:`O‘ngga aylantirish`,shadow:`Soya`,squareWrap:`Yonidan matn`,topBottomWrap:`Yuqori va pastdan`,width:`Rasm kengligi`},insert:{codeBlock:`Kod bloki`,equation:`Formula`,horizontalLine:`Gorizontal chiziq`,image:`Rasm`,table:`Jadval`},link:{openInNewTab:`Yangi tabda ochish`,text:`Matn`,textPlaceholder:`Link matni`,titlePlaceholder:`Ixtiyoriy`},list:{bullet:`Nuqtali ro‘yxat`,numbered:`Raqamli ro‘yxat`,remove:`Ro‘yxatni olib tashlash`},spacing:{default:`Standart`,lineAndParagraph:`Qator va paragraf oralig‘i`},shortcuts:{backgroundColor:`Orqa fon rangi`,bold:`Qalin`,bulletList:`Nuqtali ro‘yxat`,clearFormatting:`Formatni tozalash`,decreaseIndent:`Chekinishni kamaytirish`,fontFamily:`Shrift`,fontSize:`O‘lcham`,increaseIndent:`Chekinishni oshirish`,italic:`Kursiv`,link:`Link qo‘shish`,numberedList:`Raqamli ro‘yxat`,redo:`Qaytarish`,removeList:`Ro‘yxatni olib tashlash`,spacing:`Qator oralig‘i`,strikethrough:`Ustidan chizish`,subscript:`Pastki indeks`,superscript:`Yuqori indeks`,textColor:`Matn rangi`,underline:`Tagiga chizish`,undo:`Bekor qilish`},style:{backgroundColor:`Orqa fon rangi`,clearFormatting:`Formatni tozalash`,fontFamily:`Shrift oilasi`,fontFamilyPlaceholder:`Shrift`,fontSize:`Shrift o‘lchami`,fontSizePlaceholder:`O‘lcham`,textColor:`Matn rangi`},table:{alignBottom:`Katak matnini pastga tekislash`,alignMiddle:`Katak matnini o‘rtaga tekislash`,alignTop:`Katak matnini yuqoriga tekislash`,background:`Katak orqa fon rangi`,columns:`Ustunlar`,deleteColumn:`Ustunni o‘chirish`,deleteRow:`Qatorni o‘chirish`,deleteTable:`Jadvalni o‘chirish`,headerColumn:`Sarlavha ustuni`,headerRow:`Sarlavha qatori`,header:`Sarlavha`,insertColumnLeft:`Chapga ustun qo‘shish`,insertColumnRight:`O‘ngga ustun qo‘shish`,insertRowAbove:`Yuqoriga qator qo‘shish`,insertRowBelow:`Pastga qator qo‘shish`,insertTable:`Jadval qo‘shish`,insertTableSize:`{columns}x{rows} jadval`,mergeCells:`Birlashtirish`,columnLeft:`Ustun ←`,columnRight:`Ustun →`,rowAbove:`Qator ↑`,rowBelow:`Qator ↓`,column:`Ustun`,row:`Qator`,rows:`Qatorlar`,unmergeCell:`Ajratish`},tabs:{equation:`Formula`,home:`Asosiy`,image:`Rasm`,insert:`Qo‘shish`,layout:`Joylashuv`,table:`Jadval`},textFormat:{bold:`Qalin`,code:`Inline kod`,italic:`Kursiv`,strikethrough:`Ustidan chizish`,subscript:`Pastki indeks`,superscript:`Yuqori indeks`,underline:`Tagiga chizish`},youtube:{invalidUrl:`YouTube link yoki video ID noto‘g‘ri.`,titlePlaceholder:`Ixtiyoriy`}}}),Gn=P.default.createContext(Wn),Kn={en:Bn,ru:Un,uz:Wn};function qn({children:e,locale:t=`uz`,locales:n,translations:r}){let i=P.default.useMemo(()=>Hn(Kn[t]||Bn,n?.[t],r),[t,n,r]);return(0,u.jsx)(Gn.Provider,{value:i,children:e})}function U(){return P.default.useContext(Gn)}var Jn={algorithm:o.theme.defaultAlgorithm,token:{colorPrimary:`#3167c8`}},Yn={algorithm:o.theme.darkAlgorithm,token:{colorBgContainer:`#202020`,colorBgElevated:`#252525`,colorBorder:`#444444`,colorBorderSecondary:`#383838`,colorFillSecondary:`#2d2d2d`,colorFillTertiary:`#292929`,colorPrimary:`#b8b8b8`,colorPrimaryActive:`#d8d8d8`,colorPrimaryHover:`#cecece`,colorText:`#ededed`,colorTextPlaceholder:`#8d8d8d`,colorTextQuaternary:`#777777`,colorTextSecondary:`#b5b5b5`,colorTextTertiary:`#999999`}};function Xn(e){return e===`dark`?Yn:Jn}var Zn=P.default.createContext(`light`);function Qn(){return P.default.useContext(Zn)}function $n(e){let t=e?.trim().toLowerCase();if(t===`dark`||t===`only dark`)return`dark`;if(t===`light`||t===`only light`)return`light`}function er(e){if(!e)return;let t=$n(e.dataset.rjEditorTheme)||$n(e.dataset.colorScheme)||$n(e.dataset.theme)||$n(e.getAttribute(`color-scheme`));if(t)return t;if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`}function tr(e){return e?$n(window.getComputedStyle(e).colorScheme):void 0}function nr(){if(typeof document>`u`||typeof window>`u`)return`light`;let e=document.documentElement,t=document.body,n=er(e)||er(t);if(n)return n;let r=document.querySelector(`meta[name="color-scheme"]`)?.content;return tr(e)||tr(t)||$n(r)||(window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`)}function rr(e){let[t,n]=P.default.useState(()=>nr());return P.default.useEffect(()=>{if(e!==`auto`)return;let t=()=>n(nr()),r=window.matchMedia(`(prefers-color-scheme: dark)`),i=new MutationObserver(t),a=new MutationObserver(t),o=new MutationObserver(t),s=window.requestAnimationFrame(t),c=[`class`,`color-scheme`,`data-color-scheme`,`data-rj-editor-theme`,`data-theme`,`style`];return r.addEventListener(`change`,t),i.observe(document.documentElement,{attributeFilter:c,attributes:!0}),document.body&&a.observe(document.body,{attributeFilter:c,attributes:!0}),o.observe(document.head,{attributeFilter:[`content`],attributes:!0,childList:!0,subtree:!0}),()=>{window.cancelAnimationFrame(s),r.removeEventListener(`change`,t),i.disconnect(),a.disconnect(),o.disconnect()}},[e]),e===`auto`?t:e}function ir(){if(Hr>1)return void Hr--;let e,t=!1;for(function(){let e=Vr;for(Vr=void 0;e!==void 0;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();Br!==void 0;){let n=Br;for(Br=void 0,Ur++;n!==void 0;){let r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&lr(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(Ur=0,Hr--,t)throw e}function ar(e){if(Hr>0)return e();Gr=++Wr,Hr++;try{return e()}finally{ir()}}function or(e){let t=K;K=void 0;try{return e()}finally{K=t}}function sr(e){if(K===void 0)return;let t=e.n;return t===void 0||t.t!==K?(t={i:0,S:e,p:K.s,n:void 0,t:K,e:void 0,x:void 0,r:t},K.s!==void 0&&(K.s.n=t),K.s=t,e.n=t,32&K.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=K.s,t.n=void 0,K.s.n=t,K.s=t),t):void 0}function W(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function cr(e,t){return new W(e,t)}function lr(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ur(e){for(let t=e.s;t!==void 0;t=t.n){let n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function dr(e){let t,n=e.s;for(;n!==void 0;){let e=n.p;n.i===-1?(n.S.U(n),e!==void 0&&(e.n=n.n),n.n!==void 0&&(n.n.p=e)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=e}e.s=t}function fr(e,t){W.call(this,void 0),this.x=e,this.s=void 0,this.g=Kr-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function pr(e,t){return new fr(e,t)}function mr(e){let t=e.m;if(e.m=void 0,typeof t==`function`){Hr++;let n=K;K=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,hr(e),t}finally{K=n,ir()}}}function hr(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,mr(e)}function gr(e){if(K!==this)throw Error(`Out-of-order effect`);dr(this),K=e,this.f&=-2,8&this.f&&hr(this),ir()}function _r(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}function vr(e,t){let n=new _r(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}function yr(e,t={}){let n={};for(let r in e){let i=t[r];n[r]=cr(i===void 0?e[r]:i)}return n}function br(){let e=(0,t.$getRoot)(),n=(0,t.$getSelection)(),r=(0,t.$createParagraphNode)();e.clear(),e.append(r),n!==null&&r.select(),(0,t.$isRangeSelection)(n)&&(n.format=0)}function xr(e,n=br){return e.registerCommand(t.CLEAR_EDITOR_COMMAND,t=>(e.update(n),!0),t.COMMAND_PRIORITY_EDITOR)}function Sr(e){return(typeof e.nodes==`function`?e.nodes():e.nodes)||[]}function Cr(e){return e instanceof Jr}function wr(e,t){let n;return cr(e(),{unwatched(){n&&=(n(),void 0)},watched(){this.value=e(),n=t(this)}})}function G(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Tr(e,t){if(e&&t&&!Array.isArray(t)&&typeof e==`object`&&typeof t==`object`){let n=e,r=t;for(let e in r)n[e]=Tr(n[e],r[e]);return e}return t}function Er(e){return e.id===Xr}function Dr(e){return e.id===Qr}function Or(e){return function(e){return e.id===Zr}(e)||G(305,String(e.id),String(Zr)),Object.assign(e,{id:Qr})}function kr(){let e=(0,t.$getRoot)();e.isEmpty()&&e.append((0,t.$createParagraphNode)())}function Ar(){}function jr(e){throw e}function Mr(e){return Array.isArray(e)?e:[e]}function Nr(e,t){let n=ui.maybeFromEditor(e);if(!n)return;let r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}function Pr(){return{node:Fr()}}function Fr(){return(0,t.$create)(mi)}function Ir(e){return e instanceof mi}function Lr(e){return e.canBeEmpty()}function Rr(e,n,r=Lr){return(0,t.mergeRegister)(e.registerCommand(t.KEY_TAB_COMMAND,n=>{let r=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(r))return!1;n.preventDefault();let i=function(e){if(e.getNodes().filter(e=>(0,t.$isBlockElementNode)(e)&&e.canIndent()).length>0)return!0;let n=e.anchor,r=e.focus,i=r.isBefore(n)?r:n,a=(0,m.$getNearestBlockElementAncestorOrThrow)(i.getNode());if(a.canIndent()){let e=a.getKey(),n=(0,t.$createRangeSelection)();if(n.anchor.set(e,0,`element`),n.focus.set(e,0,`element`),n=(0,t.$normalizeSelection__EXPERIMENTAL)(n),n.anchor.is(i))return!0}return!1}(r)?n.shiftKey?t.OUTDENT_CONTENT_COMMAND:t.INDENT_CONTENT_COMMAND:t.INSERT_TAB_COMMAND;return e.dispatchCommand(i,void 0)},t.COMMAND_PRIORITY_EDITOR),e.registerCommand(t.INDENT_CONTENT_COMMAND,()=>{let e=typeof n==`number`?n:n?n.peek():null;if(!(0,t.$isRangeSelection)((0,t.$getSelection)()))return!1;let i=typeof r==`function`?r:r.peek();return(0,m.$handleIndentAndOutdent)(t=>{if(i(t)){let n=t.getIndent()+1;(!e||n<e)&&t.setIndent(n)}})},t.COMMAND_PRIORITY_CRITICAL))}var zr,K,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi=j((()=>{zr=Symbol.for(`preact-signals`),Hr=0,Ur=0,Wr=0,Gr=0,Kr=0,W.prototype.brand=zr,W.prototype.h=function(){return!0},W.prototype.S=function(e){let t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t===void 0?or(()=>{var e;(e=this.W)==null||e.call(this)}):t.e=e)},W.prototype.U=function(e){if(this.t!==void 0){let t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&or(()=>{var e;(e=this.Z)==null||e.call(this)}))}},W.prototype.subscribe=function(e){return vr(()=>{let t=this.value,n=K;K=void 0;try{e(t)}finally{K=n}},{name:`sub`})},W.prototype.valueOf=function(){return this.value},W.prototype.toString=function(){return this.value+``},W.prototype.toJSON=function(){return this.value},W.prototype.peek=function(){let e=K;K=void 0;try{return this.value}finally{K=e}},Object.defineProperty(W.prototype,`value`,{get(){let e=sr(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(Ur>100)throw Error(`Cycle detected`);(function(e){Hr!==0&&Ur===0&&e.l!==Gr&&(e.l=Gr,Vr={S:e,v:e.v,i:e.i,o:Vr})})(this),this.v=e,this.i++,Kr++,Hr++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{ir()}}}}),fr.prototype=new W,fr.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Kr))return!0;if(this.g=Kr,this.f|=1,this.i>0&&!lr(this))return this.f&=-2,!0;let e=K;try{ur(this),K=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return K=e,dr(this),this.f&=-2,!0},fr.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}W.prototype.S.call(this,e)},fr.prototype.U=function(e){if(this.t!==void 0&&(W.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},fr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(fr.prototype,`value`,{get(){if(1&this.f)throw Error(`Cycle detected`);let e=sr(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),_r.prototype.c=function(){let e=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e==`function`&&(this.m=e)}finally{e()}},_r.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,mr(this),ur(this),Hr++;let e=K;return K=this,gr.bind(this,e)},_r.prototype.N=function(){2&this.f||(this.f|=2,this.u=Br,Br=this)},_r.prototype.d=function(){this.f|=8,1&this.f||hr(this)},_r.prototype.dispose=function(){this.d()},(0,t.defineExtension)({build:(e,t,n)=>yr(t),config:(0,t.safeCast)({defaultSelection:`rootEnd`,disabled:!1}),name:`@lexical/extension/AutoFocus`,register(e,t,n){let r=n.getOutput();return vr(()=>r.disabled.value?void 0:e.registerRootListener(t=>{e.focus(()=>{let e=document.activeElement;t===null||e!==null&&t.contains(e)||t.focus({preventScroll:!0})},{defaultSelection:r.defaultSelection.peek()})}))}}),(0,t.defineExtension)({build:(e,t,n)=>yr(t),config:(0,t.safeCast)({$onClear:br}),name:`@lexical/extension/ClearEditor`,register(e,t,n){let{$onClear:r}=n.getOutput();return vr(()=>xr(e,r.value))}}),qr=(0,t.createState)(`format`,{parse:e=>typeof e==`number`?e:0}),Jr=class extends t.DecoratorNode{$config(){return this.config(`decorator-text`,{extends:t.DecoratorNode,stateConfigs:[{flat:!0,stateConfig:qr}]})}getFormat(){return(0,t.$getState)(this,qr)}getFormatFlags(e,n){return(0,t.toggleTextFormatType)(this.getFormat(),e,n)}hasFormat(e){let n=t.TEXT_TYPE_TO_FORMAT[e];return(this.getFormat()&n)!==0}setFormat(e){return(0,t.$setState)(this,qr,e)}toggleFormat(e){let n=(0,t.toggleTextFormatType)(this.getFormat(),e,null);return this.setFormat(n)}isInline(){return!0}createDOM(){return document.createElement(`span`)}updateDOM(){return!1}},(0,t.defineExtension)({name:`@lexical/extension/DecoratorText`,nodes:()=>[Jr],register:(e,n,r)=>e.registerCommand(t.FORMAT_TEXT_COMMAND,e=>{let n=(0,t.$getSelection)();if((0,t.$isNodeSelection)(n)||(0,t.$isRangeSelection)(n))for(let t of n.getNodes())Cr(t)&&t.toggleFormat(e);return!1},t.COMMAND_PRIORITY_LOW)}),Yr=(0,t.defineExtension)({build:e=>wr(()=>e.getEditorState(),t=>e.registerUpdateListener(e=>{t.value=e.editorState})),name:`@lexical/extension/EditorState`}),Xr=0,Zr=1,Qr=2,$r=3,ei=4,ti=5,ni=6,ri=7,ii=new Set,ai=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:Xr}}mergeConfigs(){let e=this.extension.config||{},n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):t.shallowMergeConfig;for(let t of this.configs)e=n(e,t);return e}init(e){let t=this.state;Dr(t)||G(306,String(t.id));let n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=function(e,t,n){return Object.assign(e,{config:t,id:$r,registerState:n})}(t,this.mergeConfigs(),n),a;this.state=i,this.extension.init&&(a=this.extension.init(e,i.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:ei,initResult:t,registerState:n})}(i,a,r)}build(e){let t=this.state,n;t.id!==ei&&G(307,String(t.id),String(ti)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));let r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:ti,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;let n=this.state;n.id!==ti&&G(308,String(n.id),String(ti));let r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:ni})}(n),()=>{let e=this.state;e.id!==ri&&G(309,String(n.id),String(ri)),this.state=function(e){return Object.assign(e,{id:ti})}(e),r&&r()}}afterRegistration(e){let t=this.state,n;return t.id!==ni&&G(310,String(t.id),String(ni)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:ri})}(t),n}getSignal(){return this._signal===void 0&&G(311),this._signal}getInitResult(){this.extension.init===void 0&&G(312,this.extension.name);let e=this.state;return function(e){return e.id>=ei}(e)||G(313,String(e.id),String(ei)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return function(e){return e.id>=$r}(e)||G(314,String(e.id),String($r)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&G(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&G(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return function(e){return e.id>=ri}(e)||G(316,String(e.id),String(ri)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||ii}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(e){return e.id>=ti})(e)||G(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},oi={tag:t.HISTORY_MERGE_TAG},si=(0,t.defineExtension)({config:(0,t.safeCast)({setOptions:oi,updateOptions:oi}),init:({$initialEditorState:e=kr})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:n,setOptions:r},i){let a=i.getInitResult();if(!a.initialized){a.initialized=!0;let{$initialEditorState:i}=a;if((0,t.$isEditorState)(i))e.setEditorState(i,r);else if(typeof i==`function`)e.update(()=>{i(e)},n);else if(i&&(typeof i==`string`||typeof i==`object`)){let t=e.parseEditorState(i);e.setEditorState(t,r)}}return()=>{}},name:`@lexical/extension/InitialState`,nodes:[t.RootNode,t.TextNode,t.LineBreakNode,t.TabNode,t.ParagraphNode]}),ci=Symbol.for(`@lexical/extension/LexicalBuilder`),li=`0.44.0+prod.esm`,ui=class e{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=li,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(t){let n=[Mr(si)];for(let e of t)n.push(Mr(e));return new e(n)}static maybeFromEditor(t){let n=t[ci];return n&&(n.PACKAGE_VERSION!==li&&G(292,n.PACKAGE_VERSION,li),n instanceof e||G(293)),n}static fromEditor(t){let n=e.maybeFromEditor(t);return n===void 0&&G(294),n}constructEditor(){let{$initialEditorState:e,onError:n,...r}=this.buildCreateEditorArgs(),i=Object.assign((0,t.createEditor)({...r,...n?{onError:e=>{n(e,i)}}:{}}),{[ci]:this});for(let e of this.sortedExtensionReps())e.build(i);return i}buildEditor(){let e=Ar;function n(){try{e()}finally{e=Ar}}let r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return e=(0,t.mergeRegister)(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&G(295,e.name),t}addEdge(e,t,n){let r=this.outgoingConfigEdges.get(e);r?r.set(t,n):this.outgoingConfigEdges.set(e,new Map([[t,n]]));let i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&G(296);let[t]=Mr(e);typeof t.name!=`string`&&G(297,typeof t.name);let n=this.extensionNameMap.get(t.name);if(n!==void 0&&n.extension!==t&&G(298,t.name),!n){n=new ai(this,t),this.extensionNameMap.set(t.name,n);let e=this.conflicts.get(t.name);typeof e==`string`&&G(299,t.name,e);for(let e of t.conflictsWith||[])this.extensionNameMap.has(e)&&G(299,t.name,e),this.conflicts.set(e,t.name);for(let e of t.dependencies||[]){let n=Mr(e);this.addEdge(t.name,n[0].name,n.slice(1)),this.addExtension(n)}for(let[e,n]of t.peerDependencies||[])this.addEdge(t.name,e,n?[n]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(n,r)=>{let i=n.state;if(Dr(i))return;let a=n.extension.name;var o;Er(i)||G(300,a,r||`[unknown]`),Er(o=i)||G(304,String(o.id),String(Xr)),i=Object.assign(o,{id:Zr}),n.state=i;let s=this.outgoingConfigEdges.get(a);if(s)for(let e of s.keys()){let n=this.extensionNameMap.get(e);n&&t(n,a)}i=Or(i),n.state=i,e.push(n)};for(let e of this.extensionNameMap.values())Er(e.state)&&t(e);for(let t of e)for(let[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){let t=this.extensionNameMap.get(e);if(t)for(let e of n)t.configs.add(e)}for(let[e,...t]of this.roots)if(t.length>0){let n=this.extensionNameMap.get(e.name);n===void 0&&G(301,e.name);for(let e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let n=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],a=r.signal;for(let t of n){let n=t.register(e,a);n&&i.push(n)}for(let t of n){let n=t.afterRegistration(e);n&&i.push(n)}return(0,t.mergeRegister)(...i)}buildCreateEditorArgs(){let e={},t=new Set,n=new Map,r=new Map,i={},a={},o=this.sortedExtensionReps();for(let s of o){let{extension:o}=s;if(o.onError!==void 0&&(e.onError=o.onError),o.disableEvents!==void 0&&(e.disableEvents=o.disableEvents),o.parentEditor!==void 0&&(e.parentEditor=o.parentEditor),o.editable!==void 0&&(e.editable=o.editable),o.namespace!==void 0&&(e.namespace=o.namespace),o.$initialEditorState!==void 0&&(e.$initialEditorState=o.$initialEditorState),o.nodes)for(let e of Sr(o)){if(typeof e!=`function`){let t=n.get(e.replace);t&&G(302,o.name,e.replace.name,t.extension.name),n.set(e.replace,s)}t.add(e)}if(o.html){if(o.html.export)for(let[e,t]of o.html.export.entries())r.set(e,t);o.html.import&&Object.assign(i,o.html.import)}o.theme&&Tr(a,o.theme)}Object.keys(a).length>0&&(e.theme=a),t.size&&(e.nodes=[...t]);let s=Object.keys(i).length>0,c=r.size>0;(s||c)&&(e.html={},s&&(e.html.import=i),c&&(e.html.export=r));for(let t of o)t.init(e);return e.onError||=jr,e}},di=new Set,fi=(0,t.defineExtension)({build(e,n,r){let i=r.getDependency(Yr).output,a=cr({watchedNodeKeys:new Map}),o=wr(()=>{},()=>vr(()=>{let e=o.peek(),{watchedNodeKeys:n}=a.value,r,s=!1;i.value.read(()=>{if((0,t.$getSelection)())for(let[i,a]of n.entries()){if(a.size===0){n.delete(i);continue}let o=(0,t.$getNodeByKey)(i),c=o&&o.isSelected()||!1;s||=c!==(!!e&&e.has(i)),c&&(r||=new Set,r.add(i))}}),!s&&r&&e&&r.size===e.size||(o.value=r)}));return{watchNodeKey:function(e){let t=pr(()=>(o.value||di).has(e)),{watchedNodeKeys:n}=a.peek(),r=n.get(e),i=r!==void 0;return r||=new Set,r.add(t),i||(n.set(e,r),a.value={watchedNodeKeys:n}),t}}},dependencies:[Yr],name:`@lexical/extension/NodeSelection`}),pi=(0,t.createCommand)(`INSERT_HORIZONTAL_RULE_COMMAND`),mi=class e extends t.DecoratorNode{static getType(){return`horizontalrule`}static clone(t){return new e(t.__key)}static importJSON(e){return Fr().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:Pr,priority:0})}}exportDOM(){return{element:document.createElement(`hr`)}}createDOM(e){let n=document.createElement(`hr`);return(0,t.addClassNamesToElement)(n,e.theme.hr),n}getTextContent(){return`
12
- `}isInline(){return!1}updateDOM(){return!1}},(0,t.defineExtension)({dependencies:[Yr,fi],name:`@lexical/extension/HorizontalRule`,nodes:()=>[mi],register(e,n,r){let{watchNodeKey:i}=r.getDependency(fi).output,a=cr({nodeSelections:new Map}),o=e._config.theme.hrSelected??`selected`;return(0,t.mergeRegister)(e.registerCommand(pi,e=>{let n=(0,t.$getSelection)();return(0,t.$isRangeSelection)(n)?(n.focus.getNode()!==null&&(0,m.$insertNodeToNearestRoot)(Fr()),!0):!1},t.COMMAND_PRIORITY_EDITOR),e.registerCommand(t.CLICK_COMMAND,e=>{if((0,t.isDOMNode)(e.target)){let n=(0,t.$getNodeFromDOMNode)(e.target);if(Ir(n))return function(e,n=!1){let r=(0,t.$getSelection)(),i=e.isSelected(),a=e.getKey(),o;n&&(0,t.$isNodeSelection)(r)?o=r:(o=(0,t.$createNodeSelection)(),(0,t.$setSelection)(o)),i?o.delete(a):o.add(a)}(n,e.shiftKey),!0}return!1},t.COMMAND_PRIORITY_LOW),e.registerMutationListener(mi,(t,n)=>{ar(()=>{let n=!1,{nodeSelections:r}=a.peek();for(let[a,o]of t.entries())if(o===`destroyed`)r.delete(a),n=!0;else{let t=r.get(a),o=e.getElementByKey(a);t?t.domNode.value=o:(n=!0,r.set(a,{domNode:cr(o),selectedSignal:i(a)}))}n&&(a.value={nodeSelections:r})})}),vr(()=>{let e=[];for(let{domNode:n,selectedSignal:r}of a.value.nodeSelections.values())e.push(vr(()=>{let e=n.value;e&&(r.value?(0,t.addClassNamesToElement)(e,o):(0,t.removeClassNamesFromElement)(e,o))}));return(0,t.mergeRegister)(...e)}))}}),(0,t.defineExtension)({build:(e,t)=>yr({inheritEditableFromParent:t.inheritEditableFromParent}),config:(0,t.safeCast)({$getParentEditor:function(){let e=(0,t.$getEditor)();return ui.fromEditor(e),e},inheritEditableFromParent:!1}),init:(e,t,n)=>{let r=t.$getParentEditor();e.parentEditor=r,e.theme=e.theme||r._config.theme},name:`@lexical/extension/NestedEditor`,register:(e,t,n)=>vr(()=>{let t=e._parentEditor;if(t&&n.getOutput().inheritEditableFromParent.value)return e.setEditable(t.isEditable()),t.registerEditableListener(e.setEditable.bind(e))})}),(0,t.defineExtension)({build:(e,t,n)=>yr(t),config:(0,t.safeCast)({disabled:!1,onReposition:void 0}),name:`@lexical/utils/SelectionAlwaysOnDisplay`,register:(e,t,n)=>{let r=n.getOutput();return vr(()=>{if(!r.disabled.value)return(0,m.selectionAlwaysOnDisplay)(e,r.onReposition.value)})}}),(0,t.defineExtension)({build:(e,t,n)=>yr(t),config:(0,t.safeCast)({$canIndent:Lr,disabled:!1,maxIndent:null}),name:`@lexical/extension/TabIndentation`,register(e,t,n){let{disabled:r,maxIndent:i,$canIndent:a}=n.getOutput();return vr(()=>{if(!r.value)return Rr(e,i,a)})}})}));function gi(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function _i(e,n){let r=e;for(let i=(0,t.$getSiblingCaret)(e,n);i&&(J(i.origin)||(0,t.$isTabNode)(i.origin));i=i.getAdjacentCaret())r=i.origin;return r}function vi(e){return _i(e,`previous`)}function yi(e){return _i(e,`next`)}function bi(e){let n=vi(e),r=yi(e),i=n;for(;i!==null;){if(J(i)){let e=(0,t.getTextDirection)(i.getTextContent());if(e!==null)return e}if(i===r)break;i=i.getNextSibling()}let a=n.getParent();if((0,t.$isElementNode)(a)){let e=a.getDirection();if(e===`ltr`||e===`rtl`)return e}return null}function xi(e,n){let r=null,i=null,a=e,o=n,s=e.getTextContent();for(;;){if(o===0){if(a=a.getPreviousSibling(),a===null)break;if(J(a)||(0,t.$isTabNode)(a)||(0,t.$isLineBreakNode)(a)||gi(167),(0,t.$isLineBreakNode)(a)){r={node:a,offset:1};break}o=Math.max(0,a.getTextContentSize()-1),s=a.getTextContent()}else o--;let e=s[o];J(a)&&e!==` `&&(i={node:a,offset:o})}if(i!==null)return i;let c=null;if(n<e.getTextContentSize())J(e)&&(c=e.getTextContent()[n]);else{let t=e.getNextSibling();J(t)&&(c=t.getTextContent()[0])}if(c!==null&&c!==` `)return r;{let i=function(e,n){let r=e,i=n,a=e.getTextContent(),o=e.getTextContentSize();for(;;){if(!J(r)||i===o){if(r=r.getNextSibling(),r===null||(0,t.$isLineBreakNode)(r))return null;J(r)&&(i=0,a=r.getTextContent(),o=r.getTextContentSize())}if(J(r)){if(a[i]!==` `)return{node:r,offset:i};i++}}}(e,n);return i===null?r:i}}function Si(e){let n=yi(e);return(0,t.$isLineBreakNode)(n)&&gi(168),n}function Ci(e,n){for(let r of e.childNodes){if((0,t.isHTMLElement)(r)&&r.tagName===n)return!0;Ci(r,n)}return!1}function wi(e,n){return(0,t.$create)(Y).setLanguage(e).setTheme(n)}function q(e){return e instanceof Y}function Ti(e){return{node:wi(e.getAttribute(Fi))}}function Ei(e){let t=e,n=ki(t);return n||function(e){let t=e.parentElement;for(;t!==null;){if(ki(t))return!0;t=t.parentElement}return!1}(t)?{node:n?wi():null}:{node:null}}function Di(){return{node:wi()}}function Oi(){return{node:null}}function ki(e){return e.style.fontFamily.match(`monospace`)!==null}function Ai(e){return e.classList.contains(`js-file-line-container`)}function ji(e){let{anchor:n}=e;if(e.isCollapsed()&&n.type===`element`){let e=n.getNode();if(q(e)){let r=e.getChildrenSize();if(r>=2&&n.offset===r){let n=e.getLastChild();if((0,t.$isLineBreakNode)(n)&&(0,t.$isLineBreakNode)(n.getPreviousSibling())){let n=(0,t.$createParagraphNode)();return e.splice(r-2,2,[]).insertAfter(n,!1),n.select(),n}}}}return null}function Mi(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function Ni(e=``,n){return(0,t.$applyNodeReplacement)(new Ri(e,n))}function J(e){return e instanceof Ri}var Pi,Fi,Ii,Li,Y,Ri,zi,Bi=j((()=>{hi(),Pi=`javascript`,Fi=`data-language`,Ii=`data-highlight-language`,Li=`data-theme`,Y=class e extends t.ElementNode{__language;__theme;__isSyntaxHighlightSupported;static getType(){return`code`}static clone(t){return new e(t.__language,t.__key)}constructor(e,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){let n=document.createElement(`code`);(0,t.addClassNamesToElement)(n,e.theme.code),n.setAttribute(`spellcheck`,`false`);let r=this.getLanguage();r&&(n.setAttribute(Fi,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(Ii,r));let i=this.getTheme();i&&n.setAttribute(Li,i);let a=this.getStyle();return a&&(0,t.setDOMStyleFromCSS)(n.style,a),n}updateDOM(e,n,r){let i=this.__language,a=e.__language;i?i!==a&&n.setAttribute(Fi,i):a&&n.removeAttribute(Fi);let o=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&a?o&&i?i!==a&&n.setAttribute(Ii,i):n.removeAttribute(Ii):o&&i&&n.setAttribute(Ii,i);let s=this.__theme,c=e.__theme;s?s!==c&&n.setAttribute(Li,s):c&&n.removeAttribute(Li);let l=this.__style,u=e.__style;return l!==u&&(0,t.setDOMStyleFromCSS)(n.style,l,u),!1}exportDOM(e){let n=document.createElement(`pre`);(0,t.addClassNamesToElement)(n,e._config.theme.code),n.setAttribute(`spellcheck`,`false`);let r=this.getLanguage();r&&(n.setAttribute(Fi,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(Ii,r));let i=this.getTheme();i&&n.setAttribute(Li,i);let a=this.getStyle();return a&&(0,t.setDOMStyleFromCSS)(n.style,a),{element:n}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||Ci(e,`BR`))?{conversion:Ti,priority:1}:null,div:()=>({conversion:Ei,priority:1}),pre:()=>({conversion:Ti,priority:0}),table:e=>Ai(e)?{conversion:Di,priority:3}:null,td:e=>{let t=e,n=t.closest(`table`);return t.classList.contains(`js-file-line`)||n&&Ai(n)?{conversion:Oi,priority:3}:null},tr:e=>{let t=e.closest(`table`);return t&&Ai(t)?{conversion:Oi,priority:3}:null}}}static importJSON(e){return wi().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,n=!0){if(!Nr((0,t.$getEditor)(),`@lexical/code`)){let t=ji(e);if(t)return t}let{anchor:r,focus:i}=e,a=(r.isBefore(i)?r:i).getNode();if((0,t.$isTextNode)(a)){let e=vi(a),n=[];for(;;)if((0,t.$isTabNode)(e))n.push((0,t.$createTabNode)()),e=e.getNextSibling();else{if(!J(e))break;{let t=0,r=e.getTextContent(),i=e.getTextContentSize();for(;t<i&&r[t]===` `;)t++;if(t!==0&&n.push(Ni(` `.repeat(t))),t!==i)break;e=e.getNextSibling()}}let i=a.splitText(r.offset)[0],o=r.offset===0?0:1,s=i.getIndexWithinParent()+o,c=a.getParentOrThrow(),l=[(0,t.$createLineBreakNode)(),...n];c.splice(s,0,l);let u=n[n.length-1];u?u.select():r.offset===0?i.selectPrevious():i.getNextSibling().selectNext(0,0)}if(q(a)){let{offset:n}=e.anchor;a.splice(n,0,[(0,t.$createLineBreakNode)()]),a.select(n+1,n+1)}return null}canIndent(){return!1}collapseAtStart(){let e=(0,t.$createParagraphNode)();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}setLanguage(e){let t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){let t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){let t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}},Ri=class e extends t.TextNode{__highlightType;constructor(e=``,t,n){super(e,n),this.__highlightType=t}static getType(){return`code-highlight`}static clone(t){return new e(t.__text,t.__highlightType||void 0,t.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__highlightType=e.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){let t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){let n=super.createDOM(e);return(0,t.addClassNamesToElement)(n,Mi(e.theme,this.__highlightType)),n}updateDOM(e,n,r){let i=super.updateDOM(e,n,r),a=Mi(r.theme,e.__highlightType),o=Mi(r.theme,this.__highlightType);return a!==o&&(a&&(0,t.removeClassNamesFromElement)(n,a),o&&(0,t.addClassNamesToElement)(n,o)),i}static importJSON(e){return Ni().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return wi()}},zi=(0,t.defineExtension)({name:`@lexical/code`,nodes:()=>[Y,Ri],register:e=>e.registerCommand(t.KEY_ENTER_COMMAND,e=>{let n=(0,t.$getSelection)();return!(!(0,t.$isRangeSelection)(n)||!ji(n))&&(e.preventDefault(),!0)},t.COMMAND_PRIORITY_LOW)})})),Vi=`□`,Hi=`x + y = z`;function Ui(e,t,n){let r=Array.from(e||t||Vi).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;return`calc(${Math.min(Math.max(r+1,a),o)}ch + 0.25rem)`}function Wi(e){return[`rj-editor-equation-visual`,`rj-editor-equation-visual--script`,e.position===`before`?`rj-editor-equation-visual--prescript`:``,e.superscript===void 0?``:`has-superscript`,e.subscript===void 0?``:`has-subscript`].filter(Boolean).join(` `)}function Gi(e){e.stopPropagation()}function Ki(e){let t=e.selectionStart??e.value.length;return{end:e.selectionEnd??t,start:t}}function qi({className:e,inputRef:t,onActiveSlotChange:n,onSlotSelectionChange:r,onSlotChange:i,placeholder:a=Vi,slotId:o,value:s}){let c=e=>{Gi(e),n(o),r(o,Ki(e.currentTarget))};return(0,u.jsx)(`input`,{"aria-label":`Equation field`,className:[`rj-editor-equation-slot-input`,e||``].filter(Boolean).join(` `),onChange:e=>{i(o,e.target.value),r(o,Ki(e.currentTarget))},onClick:c,onFocus:c,onKeyDown:Gi,onKeyUp:c,onMouseDown:Gi,onSelect:c,placeholder:a,ref:t,size:Math.max(1,Math.min(Array.from(s||a).length+1,12)),style:{width:Ui(s,a,e)},type:`text`,value:s})}function Ji(e){return e===`absolute`?[`|`,`|`]:e===`angle`?[`⟨`,`⟩`]:e===`brace`?[`{`,`}`]:e===`ceiling`?[`⌈`,`⌉`]:e===`doubleAbsolute`?[`‖`,`‖`]:e===`floor`?[`⌊`,`⌋`]:e===`square`?[`[`,`]`]:[`(`,`)`]}function Yi(e){return{intersection:`⋂`,product:`∏`,summation:`∑`,union:`⋃`}[e]}function Xi(e){return{contour:`∮`,double:`∫∫`,single:`∫`,triple:`∫∫∫`}[e||`single`]}var Zi=P.default.memo(function e({activeSlotId:t,activeSlotSelection:n,model:r,onActiveSlotChange:i,onSlotSelectionChange:a,onSlotChange:o,slotPrefix:s=``}){let c=P.default.useRef({}),l=P.default.useCallback(e=>t=>{c.current[e]=t},[]);P.default.useLayoutEffect(()=>{let e=c.current[t];if(!e)return;document.activeElement!==e&&e.focus();let r=Math.max(0,Math.min(n?.start??e.value.length,e.value.length)),i=Math.max(r,Math.min(n?.end??r,e.value.length));(e.selectionStart!==r||e.selectionEnd!==i)&&e.setSelectionRange(r,i)},[t,n,r]);let d=P.default.useCallback(e=>{let n=`${s}row.insert.${e}`;return(0,u.jsx)(`button`,{"aria-label":`Insert equation item`,className:[`rj-editor-equation-insert-point`,t===n?`is-active`:``].filter(Boolean).join(` `),onClick:e=>{e.preventDefault(),e.stopPropagation(),i(n)},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},type:`button`},n)},[t,i,s]),f=P.default.useCallback((r,c,d,f=Vi)=>{let p=`${s}${r}`;return c&&typeof c!=`string`?(0,u.jsx)(`span`,{className:`rj-editor-equation-nested`,children:(0,u.jsx)(e,{activeSlotId:t,activeSlotSelection:n,model:c,onActiveSlotChange:i,onSlotSelectionChange:a,onSlotChange:o,slotPrefix:`${p}>`})},p):(0,u.jsx)(qi,{className:d,inputRef:l(p),onActiveSlotChange:i,onSlotSelectionChange:a,onSlotChange:o,placeholder:f,slotId:p,value:c||``},p)},[t,n,i,a,o,l,s]);if(r.kind===`accent`)return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--accent`,children:[(0,u.jsx)(`span`,{className:`rj-editor-equation-accent-mark`,children:{bar:`¯`,dot:`˙`,doubleDot:`¨`,hat:`ˆ`,vector:`⃗`}[r.accent]}),f(`accent.value`,r.value)]});if(r.kind===`bracket`){let[e,t]=Ji(r.bracket);return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--bracket`,children:[(0,u.jsx)(`span`,{className:`rj-editor-equation-bracket`,children:e}),f(`bracket.value`,r.value),(0,u.jsx)(`span`,{className:`rj-editor-equation-bracket`,children:t})]})}if(r.kind===`fraction`)return r.variant===`linear`||r.variant===`skewed`?(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--fraction-inline`,children:[f(`fraction.numerator`,r.numerator),(0,u.jsx)(`span`,{children:r.variant===`skewed`?`⁄`:`/`}),f(`fraction.denominator`,r.denominator)]}):(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--fraction`,children:[f(`fraction.numerator`,r.numerator),(0,u.jsx)(`span`,{className:`rj-editor-equation-fraction-line`}),f(`fraction.denominator`,r.denominator)]});if(r.kind===`function`)return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--function`,children:[(0,u.jsx)(`span`,{className:`rj-editor-equation-function-name`,children:r.functionName}),(0,u.jsx)(`span`,{children:`(`}),f(`function.argument`,r.argument,void 0,`x`),(0,u.jsx)(`span`,{children:`)`})]});if(r.kind===`integral`)return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--integral`,children:[(0,u.jsxs)(`span`,{className:`rj-editor-equation-limits`,children:[r.upper===void 0?(0,u.jsx)(`span`,{}):f(`integral.upper`,r.upper,`rj-editor-equation-slot-input--limit`,`b`),(0,u.jsx)(`span`,{className:`rj-editor-equation-large-symbol`,children:Xi(r.variant)}),r.lower===void 0?(0,u.jsx)(`span`,{}):f(`integral.lower`,r.lower,`rj-editor-equation-slot-input--limit`,`a`)]}),f(`integral.body`,r.body,void 0,`f(x)`),(0,u.jsx)(`span`,{children:`d`}),f(`integral.variable`,r.variable,`rj-editor-equation-slot-input--small`,`x`)]});if(r.kind===`largeOperator`)return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--large-operator`,children:[(0,u.jsxs)(`span`,{className:`rj-editor-equation-limits`,children:[f(`largeOperator.upper`,r.upper,`rj-editor-equation-slot-input--limit`,`n`),(0,u.jsx)(`span`,{className:`rj-editor-equation-large-symbol`,children:Yi(r.operator)}),f(`largeOperator.lower`,r.lower,`rj-editor-equation-slot-input--limit`,`i=1`)]}),f(`largeOperator.body`,r.body,void 0,`i`)]});if(r.kind===`limit`)return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--limit`,children:[(0,u.jsxs)(`span`,{className:`rj-editor-equation-limits`,children:[(0,u.jsx)(`span`,{className:`rj-editor-equation-function-name`,children:`lim`}),f(`limit.target`,r.target,`rj-editor-equation-slot-input--limit`,`x→0`)]}),f(`limit.body`,r.body,void 0,`f(x)`)]});if(r.kind===`matrix`){let e=(0,u.jsx)(`span`,{className:`rj-editor-equation-matrix-grid`,style:{gridTemplateColumns:`repeat(${Math.max(...r.cells.map(e=>e.length),1)}, minmax(1.75rem, auto))`},children:r.cells.flatMap((e,t)=>e.map((e,n)=>f(`matrix.cells.${t}.${n}`,e,`rj-editor-equation-slot-input--matrix`)))});if(r.bracket===`none`)return(0,u.jsx)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--matrix`,children:e});let[t,n]=r.bracket===`determinant`?[`|`,`|`]:r.bracket===`round`?[`(`,`)`]:[`[`,`]`];return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--matrix`,children:[(0,u.jsx)(`span`,{className:`rj-editor-equation-matrix-bracket`,children:t}),e,(0,u.jsx)(`span`,{className:`rj-editor-equation-matrix-bracket`,children:n})]})}return r.kind===`operator`?(0,u.jsx)(`span`,{className:`rj-editor-equation-visual`,children:f(`operator.value`,r.value)}):r.kind===`root`?(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--root`,children:[r.index===void 0?null:f(`root.index`,r.index,`rj-editor-equation-slot-input--root-index`,`n`),(0,u.jsx)(`span`,{className:`rj-editor-equation-root-symbol`,children:`√`}),(0,u.jsx)(`span`,{className:`rj-editor-equation-radicand`,children:f(`root.value`,r.value,void 0,`x`)})]}):r.kind===`script`?r.position===`before`?(0,u.jsxs)(`span`,{className:Wi(r),children:[(0,u.jsxs)(`span`,{className:`rj-editor-equation-script-stack`,children:[r.superscript===void 0?null:f(`script.superscript`,r.superscript,`rj-editor-equation-slot-input--script`,`n`),r.subscript===void 0?null:f(`script.subscript`,r.subscript,`rj-editor-equation-slot-input--script`,`1`)]}),f(`script.base`,r.base,void 0,`Y`)]}):(0,u.jsxs)(`span`,{className:Wi(r),children:[f(`script.base`,r.base,void 0,`x`),(0,u.jsxs)(`span`,{className:`rj-editor-equation-script-stack`,children:[r.superscript===void 0?null:f(`script.superscript`,r.superscript,`rj-editor-equation-slot-input--script`,`2`),r.subscript===void 0?null:f(`script.subscript`,r.subscript,`rj-editor-equation-slot-input--script`,`i`)]})]}):r.kind===`row`?(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--row`,children:[d(0),r.items.map((r,c)=>(0,u.jsxs)(P.default.Fragment,{children:[(0,u.jsx)(e,{activeSlotId:t,activeSlotSelection:n,model:r,onActiveSlotChange:i,onSlotSelectionChange:a,onSlotChange:o,slotPrefix:`${s}row.items.${c}>`}),d(c+1)]},`${s}row.items.${c}`))]}):(0,u.jsx)(`span`,{className:`rj-editor-equation-visual`,children:f(`text.value`,r.value,void 0,s?Vi:Hi)})});function Qi(e,n){let r=(0,t.$getNodeByKey)(e);ra(r)&&n(r)}var $i=P.default.memo(function({displayMode:e,equation:n,nodeKey:r}){let[i]=(0,h.useLexicalComposerContext)(),a=zn(),o=P.default.useRef(``),s=P.default.useRef({}),c=P.default.useRef(null),[l,d]=P.default.useState(``),[f,p]=P.default.useState(),[m,_,v]=(0,g.useLexicalNodeSelection)(r),y=P.default.useMemo(()=>xe(n),[n]),b=P.default.useMemo(()=>n.trim()?Cn(n,e):``,[e,n]),x=P.default.useMemo(()=>!y&&!/[\\{}_^]/.test(n),[n,y]),S=P.default.useCallback(t=>{i.update(()=>{Qi(r,e=>{ra(e)&&e.setEquation(t)})}),a(Mn({isEquationSelected:!0,selectedEquation:t,selectedEquationDisplayMode:e,selectedEquationKey:r}))},[a,e,i,r]),C=P.default.useCallback((e,t)=>{o.current=e,t&&(s.current[e]=t),d(e),p(t)},[]),w=P.default.useCallback((e,t)=>{s.current[e]=t,C(e,t)},[C]),T=P.default.useCallback(e=>{S(Se(e))},[S]),E=P.default.useCallback((e,t)=>{y&&T(ue(y,e,t))},[y,T]),D=P.default.useCallback(()=>{v(),_(!0),y&&C(o.current||I(y)),a(Mn({isEquationSelected:!0,selectedEquation:n,selectedEquationDisplayMode:e,selectedEquationKey:r})),window.requestAnimationFrame(()=>{c.current?.focus()})},[v,a,e,n,y,r,C,_]);return P.default.useEffect(()=>{!m||!y||o.current||C(I(y))},[y,m,C]),P.default.useEffect(()=>{if(!m)return;let e=i.registerCommand(t.KEY_DELETE_COMMAND,e=>e.target instanceof HTMLInputElement?!1:(e.preventDefault(),i.update(()=>{Qi(r,e=>{e?.remove()})}),!0),t.COMMAND_PRIORITY_LOW),n=i.registerCommand(t.KEY_BACKSPACE_COMMAND,e=>e.target instanceof HTMLInputElement?!1:(e.preventDefault(),i.update(()=>{Qi(r,e=>{e?.remove()})}),!0),t.COMMAND_PRIORITY_LOW);return()=>{e(),n()}},[i,m,r]),P.default.useEffect(()=>{if(!m)return;let e=e=>{let t=e.detail;if(!t)return;let r=xe(t);if(r){if(y){let e=o.current||I(y),t=Fe(y,e,r,s.current[e]);C(t.activeSlotId),T(t.model);return}C(I(r)),T(r);return}if(y){let e=o.current||I(y),n=me(y,e,t,s.current[e]);C(n.activeSlotId,n.selection),T(n.model);return}let i=c.current;if(!i){S(`${n}${t}`);return}let a=i.selectionStart??i.value.length,l=i.selectionEnd??a,u=`${i.value.slice(0,a)}${t}${i.value.slice(l)}`,d=a+t.length;S(u),window.requestAnimationFrame(()=>{i.focus(),i.setSelectionRange(d,d)})};return window.addEventListener(Re,e),()=>{window.removeEventListener(Re,e)}},[n,y,m,C,T,S]),(0,u.jsx)(`span`,{className:[`rj-editor-equation`,`rj-editor-equation--${e}`,m?`is-selected`:``].filter(Boolean).join(` `),"data-display-mode":e,"data-equation":n,onClick:e=>{e.preventDefault(),e.stopPropagation(),D()},role:`button`,tabIndex:-1,children:m?(0,u.jsxs)(`span`,{className:`rj-editor-equation-editor`,children:[y?(0,u.jsx)(Zi,{activeSlotId:l||I(y),activeSlotSelection:f,model:y,onActiveSlotChange:C,onSlotSelectionChange:w,onSlotChange:E}):x?(0,u.jsx)(`input`,{"aria-label":`Formula value`,onChange:e=>S(e.target.value),onClick:e=>{e.stopPropagation()},onFocus:()=>{C(``)},onKeyDown:e=>{e.stopPropagation()},onMouseDown:e=>{e.stopPropagation()},placeholder:`x + y = z`,ref:c,type:`text`,value:n}):(0,u.jsx)(`span`,{className:`rj-editor-equation-visual-editor`,dangerouslySetInnerHTML:{__html:b}}),n.trim()&&x?(0,u.jsx)(`span`,{className:`rj-editor-equation-content`,dangerouslySetInnerHTML:{__html:b}}):null]}):(0,u.jsx)(`span`,{className:[`rj-editor-equation-content`,n.trim()?``:`is-empty`].filter(Boolean).join(` `),dangerouslySetInnerHTML:{__html:b||`<span>Formula qo‘shing</span>`}})})});function ea(e){let t=e.getAttribute(`data-equation`);return t?{node:na({displayMode:e.getAttribute(`data-display-mode`)===`inline`?`inline`:`block`,equation:t})}:null}var ta=class e extends t.DecoratorNode{__displayMode;__equation;static clone(t){return new e(t.__equation,t.__displayMode,t.__key)}static getType(){return`equation`}static importDOM(){return{div:e=>e.hasAttribute(`data-equation`)?{conversion:ea,priority:1}:null,span:e=>e.hasAttribute(`data-equation`)?{conversion:ea,priority:1}:null}}static importJSON(e){return na({displayMode:e.displayMode,equation:e.equation})}constructor(e,t=`block`,n){super(n),this.__equation=e,this.__displayMode=t}createDOM(e){let t=document.createElement(`span`);return t.className=e.theme.equation||`rj-editor-equation-node`,t}decorate(){return(0,u.jsx)($i,{displayMode:this.__displayMode,equation:this.__equation,nodeKey:this.__key})}exportDOM(){let e=this.__displayMode===`inline`?document.createElement(`span`):document.createElement(`div`);e.setAttribute(`data-equation`,this.__equation),e.setAttribute(`data-display-mode`,this.__displayMode);try{e.innerHTML=Cn(this.__equation,this.__displayMode)}catch{e.textContent=this.__equation}return{element:e}}exportJSON(){return{displayMode:this.__displayMode,equation:this.__equation,type:`equation`,version:1}}getDisplayMode(){return this.getLatest().__displayMode}getEquation(){return this.getLatest().__equation}getTextContent(){return this.__equation}isInline(){return this.getLatest().__displayMode===`inline`}setDisplayMode(e){let t=this.getWritable();return t.__displayMode=e,t}setEquation(e){let t=this.getWritable();return t.__equation=e,t}updateDOM(){return!1}};function na({displayMode:e=`block`,equation:t}){return new ta(t,e)}function ra(e){return e instanceof ta}Bi();var ia=`data-rj-code-title`,aa=`data-rj-code-custom-title`,oa=80;function sa(e){return e?.trim().slice(0,oa)||void 0}function ca(e,t){return sa(e)||t||`plain`}function la(e,t,n){let r=sa(t);e.setAttribute(ia,ca(r,n)),r?e.setAttribute(aa,r):e.removeAttribute(aa)}function ua(e){return sa(e.getAttribute(`data-rj-code-custom-title`)||e.getAttribute(`data-rj-code-title`)||e.getAttribute(`data-title`))}function da(e){return e?{...e,priority:Math.min((e.priority||0)+1,4),conversion:t=>{let n=e.conversion(t);if(!n)return n;let r=n.node,i=ua(t),a={...n};return!Array.isArray(r)&&q(r)&&(a.node=_a(r).setTitle(i)),a}}:null}var fa=class e extends Y{__title;static clone(t){return new e(t.__language,t.__title,t.__key)}static getType(){return`extended-code`}static importDOM(){let e=Y.importDOM();return e?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,e=>da(t(e))])):null}static importJSON(e){return pa().updateFromJSON(e)}constructor(e,t,n){super(e,n),this.__title=sa(t)}afterCloneFrom(e){super.afterCloneFrom(e),this.__title=e.__title}createDOM(e){let t=super.createDOM(e);return la(t,this.getTitle(),this.getLanguage()),t}updateDOM(e,t,n){let r=e.__title!==this.__title||e.__language!==this.__language,i=super.updateDOM(e,t,n);return r&&la(t,this.getTitle(),this.getLanguage()),i}exportDOM(e){let t=super.exportDOM(e);return t.element instanceof HTMLElement&&la(t.element,this.getTitle(),this.getLanguage()),t}updateFromJSON(e){return super.updateFromJSON(e).setTitle(e.codeBlockTitle)}exportJSON(){return{...super.exportJSON(),codeBlockTitle:this.getTitle(),type:`extended-code`,version:1}}setTitle(e){let t=this.getWritable();return t.__title=sa(e),t}getTitle(){return this.getLatest().__title}getDisplayTitle(){return ca(this.getTitle(),this.getLanguage())}};function pa(e,n){return(0,t.$applyNodeReplacement)(new fa(e,n))}function ma(e){return e instanceof fa}function ha(e){return ma(e)?e.getTitle():void 0}function ga(e){return ma(e)?e.getDisplayTitle():ca(void 0,e.getLanguage())}function _a(e){let t=new fa(e.getLanguage(),ha(e));return t.setTheme(e.getTheme()),t.setStyle(e.getStyle()),t}var va=[`b`,`code`,`em`,`font`,`i`,`mark`,`s`,`span`,`strong`,`sub`,`sup`,`u`];function ya(e){let t=[],n=e.style.backgroundColor,r=e.style.color||e.getAttribute(`color`)||``,i=Ye(e.style.fontFamily||e.getAttribute(`face`)||``),a=Ze(e.style.fontSize),o=e.style.lineHeight;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(`; `)}function ba(e,t){return e?t?`${e}; ${t}`:e:t}function xa(e){return e?{...e,conversion:n=>{let r=e.conversion(n);if(!r)return r;let i=r.forChild,a=ya(n),o=n.tagName.toLowerCase()===`code`;return!a&&!o?r:{...r,forChild:(e,n)=>{let r=i?i(e,n):e;return(0,t.$isTextNode)(r)&&(a&&r.setStyle(ba(r.getStyle(),a)),o&&!r.hasFormat(`code`)&&r.toggleFormat(`code`)),r}}}}:null}function Sa(e,t){return t.setDetail(e.getDetail()),t.setFormat(e.getFormat()),t.setMode(e.getMode()),t.setStyle(e.getStyle()),t}var Ca=class e extends t.TextNode{static clone(t){return new e(t.__text,t.__key)}static getType(){return`extended-text`}static importDOM(){let e=t.TextNode.importDOM();if(!e)return null;let n={...e};return va.forEach(t=>{let r=e[t];r&&(n[t]=e=>xa(r(e)))}),n}static importJSON(e){return wa(e.text).updateFromJSON(e)}constructor(e=``,t){super(e,t)}exportJSON(){return{...super.exportJSON(),type:`extended-text`,version:1}}};function wa(e=``){return new Ca(e)}function Ta(e){return Sa(e,wa(e.getTextContent()))}function Ea(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M18 10H6M21 6H3M21 14H3M18 18H6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Da(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M16 10H3M20 6H3M20 14H3M16 18H3`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Oa(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 10H8M21 6H4M21 14H4M21 18H8`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ka(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var Aa=P.default.createContext(mn);function ja(){return P.default.useContext(Aa)}function Ma(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M8.54661 19.7675C10.9457 20.8319 13.8032 20.7741 16.2502 19.3613C20.3157 17.0141 21.7086 11.8156 19.3614 7.75008L19.1114 7.31706M4.63851 16.2502C2.2913 12.1847 3.68424 6.98619 7.74972 4.63898C10.1967 3.22621 13.0542 3.16841 15.4533 4.23277M2.49341 16.3338L5.22546 17.0659L5.95751 14.3338M18.0426 9.6659L18.7747 6.93385L21.5067 7.6659`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var Na=100,Pa=2e3,Fa=10,Ia=32,La=42,Ra=340,za=12,Ba=[`top-left`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`];function Va(e,n){let r=(0,t.$getNodeByKey)(e);ro(r)&&n(r)}function Ha(e,t){let n=t?.getBoundingClientRect();if(!n)return{x:8,y:8};let r=e.clientX-n.left,i=e.clientY-n.top,a=Math.max(8,n.width-Ra-8),o=Math.max(8,n.height-La-8),s=r+za,c=i+za;return{x:Math.min(Math.max(s,8),a),y:Math.max(c>o?i-La-za:c,8)}}function Ua({alignment:e,altText:n,aspectRatioLocked:r,borderEnabled:i,borderRadius:a,caption:o,height:s,linkUrl:c,nodeKey:l,objectFit:d,rotation:f,shadowEnabled:p,src:m,textWrap:_,width:v}){let[y]=(0,h.useLexicalComposerContext)(),b=U(),x=ja(),S=zn(),[C,w,T]=(0,g.useLexicalNodeSelection)(l),E=P.default.useRef(null),D=P.default.useRef(null),O=P.default.useRef(null),[k,A]=P.default.useState({x:0,y:0}),[ee,te]=P.default.useState(0),[ne,j]=P.default.useState(1),[M,re]=P.default.useState(!1),ie=(f%360+360)%360,N=ie===90||ie===270,ae=_===`square`&&e!==`center`;P.default.useEffect(()=>{let e=D.current?.parentElement;if(!e)return;let t=()=>{te(e.getBoundingClientRect().width)};if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>{window.removeEventListener(`resize`,t)};let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[]),P.default.useEffect(()=>{if(!C)return;let e=y.registerCommand(t.KEY_DELETE_COMMAND,e=>(e.preventDefault(),y.update(()=>{Va(l,e=>{e?.remove()})}),!0),t.COMMAND_PRIORITY_LOW),n=y.registerCommand(t.KEY_BACKSPACE_COMMAND,e=>(e.preventDefault(),y.update(()=>{Va(l,e=>{e?.remove()})}),!0),t.COMMAND_PRIORITY_LOW);return()=>{e(),n()}},[y,C,l]);let oe=e=>{y.update(()=>{Va(l,t=>{ro(t)&&t.setAlignment(e)})})},se=e=>{y.update(()=>{Va(l,t=>{ro(t)&&t.setWidth(Math.min(Na,Math.max(Fa,e)))})})},ce=(e,t)=>{y.update(()=>{Va(l,n=>{ro(n)&&(n.setWidth(Math.min(Na,Math.max(Fa,e))),n.setHeight(t===void 0?void 0:Math.min(Pa,Math.max(Ia,t))))})}),w(!0)},le=(e,t)=>{e.preventDefault(),e.stopPropagation(),w(!0);let n=D.current?.getBoundingClientRect(),r=D.current?.parentElement?.getBoundingClientRect()||n,i=O.current?.getBoundingClientRect();if(!r?.width||!i?.width||!i?.height)return;let a=e.clientX,o=e.clientY,c=v,l=s??i.height,u=i.width/i.height,d=e=>{let n=e.clientX-a,s=e.clientY-o,d=t.includes(`right`)?n:t.includes(`left`)?-n:0,f=t.includes(`bottom`)?s:t.includes(`top`)?-s:0;if(e.shiftKey){let e=Math.abs(d)>=Math.abs(f*u)?d:f*u,t=i.width+e;ce(c+e/r.width*100,t/u);return}ce(d===0?c:c+d/r.width*100,f===0?l:l+f)},f=()=>{window.removeEventListener(`pointermove`,d),window.removeEventListener(`pointerup`,f),y.focus(),window.requestAnimationFrame(()=>{w(!0)})};window.addEventListener(`pointermove`,d),window.addEventListener(`pointerup`,f)},ue=()=>{y.update(()=>{Va(l,e=>{e?.remove()})})},de=async e=>{let t=e.target.files?.[0];if(e.target.value=``,!t)return;if(!t.type.startsWith(`image/`)){window.alert(b.alerts.onlyImages);return}if(t.size>5242880){window.alert(b.alerts.imageSizeLimit);return}let n=``;try{re(!0),n=await x(t)}catch(e){console.error(e),window.alert(b.alerts.imageUploadFailed);return}finally{re(!1)}y.update(()=>{Va(l,e=>{ro(e)&&(e.setSrc(n),e.setAltText(t.name))})})},fe=ee>0?ee*v/100:void 0,pe=s??(fe?fe/ne:void 0),me=N&&pe?pe:void 0,he=N&&fe?fe:void 0,ge={"--rj-image-rotated-aspect-ratio":`1 / ${ne}`,height:he?R(he):void 0,width:N&&me?R(me):ae?`100%`:`${v}%`},_e=ae?{maxWidth:`100%`,width:N&&me?R(me):`${v}%`}:void 0,ve=(0,u.jsx)(`img`,{alt:n,className:`rj-editor-image`,draggable:!1,onLoad:e=>{let t=e.currentTarget;t.naturalWidth&&t.naturalHeight&&j(t.naturalWidth/t.naturalHeight)},ref:O,src:m,style:{borderRadius:a,height:s?R(s):void 0,objectFit:d}}),ye={"--rj-image-rotation":`${f}deg`,height:N&&pe?R(pe):void 0,width:N&&fe?R(fe):void 0};return(0,u.jsxs)(`span`,{className:[`rj-editor-image-frame`,`rj-editor-image-frame--${e}`,`rj-editor-image-frame--wrap-${_}`,C?`is-selected`:``].filter(Boolean).join(` `),ref:D,style:_e,children:[C?(0,u.jsxs)(`span`,{className:`rj-editor-image-floating-toolbar`,onClick:e=>{e.stopPropagation()},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},style:{left:k.x,top:k.y},children:[(0,u.jsx)(`button`,{"aria-label":b.toolbar.image.alignLeft,onClick:()=>oe(`left`),type:`button`,children:(0,u.jsx)(Da,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":b.toolbar.image.alignCenter,onClick:()=>oe(`center`),type:`button`,children:(0,u.jsx)(Ea,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":b.toolbar.image.alignRight,onClick:()=>oe(`right`),type:`button`,children:(0,u.jsx)(Oa,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{onClick:()=>se(25),type:`button`,children:`25%`}),(0,u.jsx)(`button`,{onClick:()=>se(50),type:`button`,children:`50%`}),(0,u.jsx)(`button`,{onClick:()=>se(100),type:`button`,children:`100%`}),(0,u.jsx)(`button`,{"aria-busy":M,"aria-label":b.toolbar.image.replace,disabled:M,onClick:()=>void pn(E.current),type:`button`,children:(0,u.jsx)(Ma,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":b.toolbar.image.delete,className:`rj-editor-toolbar--clear-btn`,onClick:ue,type:`button`,children:(0,u.jsx)(ka,{"aria-hidden":`true`})})]}):null,(0,u.jsxs)(`span`,{className:[`rj-editor-image-box`,i?`has-border`:``,p?`has-shadow`:``,r?`is-aspect-ratio-locked`:``,N?`is-quarter-turn`:``].filter(Boolean).join(` `),onClick:t=>{t.preventDefault(),t.stopPropagation(),T(),w(!0),A(Ha(t,D.current)),S(Nn({isImageSelected:!0,selectedImageAlignment:e,selectedImageAltText:n,selectedImageAspectRatioLocked:r,selectedImageBorderEnabled:i,selectedImageBorderRadius:a,selectedImageCaption:o,selectedImageHeight:s,selectedImageKey:l,selectedImageLinkUrl:c,selectedImageObjectFit:d,selectedImageRotation:f,selectedImageShadowEnabled:p,selectedImageTextWrap:_,selectedImageWidth:v}))},style:ge,children:[(0,u.jsx)(`span`,{className:`rj-editor-image-rotator`,style:ye,children:c?(0,u.jsx)(`a`,{className:`rj-editor-image-link`,href:c,rel:`noreferrer`,target:`_blank`,children:ve}):ve}),o?(0,u.jsx)(`span`,{className:`rj-editor-image-caption`,children:o}):null,C?(0,u.jsx)(u.Fragment,{children:Ba.map(e=>(0,u.jsx)(`span`,{"aria-hidden":`true`,className:[`rj-editor-image-resize-handle`,`rj-editor-image-resize-handle--${e}`].join(` `),onPointerDown:t=>le(t,e)},e))}):null]}),(0,u.jsx)(`input`,{accept:`image/*`,className:`rj-editor-hidden-file-input`,onChange:de,ref:E,type:`file`})]})}function Wa(e){return e===`square`||e===`around`?`square`:`top-bottom`}function Ga(e){return e===`left`||e===`right`||e===`center`?e:`center`}function Ka(e){return e===`cover`||e===`fill`||e===`contain`?e:`contain`}function qa(e){let t=Number.parseFloat(e||``);return Number.isFinite(t)?t:void 0}function Ja(e){let t=qa(e.getAttribute(`data-width`));if(t!==void 0)return t;let n=e.closest(`[data-rj-image-caption-wrapper="true"], [data-rj-image-rotation-wrapper="true"]`),r=qa(n?.style.width);if(r!==void 0&&n?.style.width.includes(`%`))return r;let i=qa(e.style.width);return i!==void 0&&e.style.width.includes(`%`)?i:100}function Ya(e){let t=e.getAttribute(`data-alignment`);if(t)return Ga(t);let n=e.closest(`[data-rj-image-caption-wrapper="true"], [data-rj-image-rotation-wrapper="true"]`)||e;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`}function Xa(e){let t=e.getAttribute(`data-text-wrap`);return t?Wa(t):(e.closest(`[data-rj-image-caption-wrapper="true"], [data-rj-image-rotation-wrapper="true"]`)||e).style.float?`square`:`top-bottom`}function Za(e){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||``}function Qa(e){return e.getAttribute(`data-link-url`)||e.closest(`a`)?.href||``}function $a(e){if(!(e instanceof HTMLImageElement))return null;let t=e.getAttribute(`src`);return t?{node:no({alignment:Ya(e),altText:e.getAttribute(`alt`)||``,aspectRatioLocked:e.getAttribute(`data-aspect-ratio-locked`)!==`false`,borderEnabled:!!e.style.border,borderRadius:qa(e.style.borderRadius)||0,caption:Za(e),height:qa(e.getAttribute(`data-height`))||qa(e.style.height),linkUrl:Qa(e),objectFit:Ka(e.getAttribute(`data-object-fit`)||e.style.objectFit),rotation:qa(e.getAttribute(`data-rotation`))||0,shadowEnabled:!!e.style.boxShadow,src:t,textWrap:Xa(e),width:Ja(e)})}:null}function eo(e){let t=e.querySelector(`img`);return t?$a(t):null}var to=class e extends t.DecoratorNode{__alignment;__aspectRatioLocked;__altText;__borderEnabled;__borderRadius;__caption;__height;__linkUrl;__objectFit;__rotation;__shadowEnabled;__src;__textWrap;__width;static clone(t){return new e(t.__src,t.__altText,t.__width,t.__alignment,t.__caption,t.__height,t.__linkUrl,t.__objectFit,t.__textWrap,t.__borderRadius,t.__borderEnabled,t.__shadowEnabled,t.__rotation,t.__aspectRatioLocked,t.__key)}static getType(){return`image`}static importDOM(){return{a:e=>!(e instanceof HTMLAnchorElement)||!e.querySelector(`img`)?null:{conversion:eo,priority:2},img:()=>({conversion:$a,priority:0}),span:e=>!(e instanceof HTMLElement)||e.getAttribute(`data-rj-image-caption-wrapper`)!==`true`&&e.getAttribute(`data-rj-image-rotation-wrapper`)!==`true`?null:{conversion:eo,priority:2}}}static importJSON(e){return no({alignment:e.alignment,altText:e.altText,aspectRatioLocked:e.aspectRatioLocked,borderEnabled:e.borderEnabled,borderRadius:e.borderRadius,caption:e.caption,height:e.height,linkUrl:e.linkUrl,objectFit:e.objectFit,rotation:e.rotation,shadowEnabled:e.shadowEnabled,src:e.src,textWrap:Wa(e.textWrap),width:e.width})}constructor(e,t=``,n=100,r=`center`,i=``,a,o=``,s=`contain`,c=`top-bottom`,l=0,u=!1,d=!1,f=0,p=!0,m){super(m),this.__src=e,this.__altText=t,this.__width=n,this.__alignment=r,this.__caption=i,this.__height=a,this.__linkUrl=o,this.__objectFit=s,this.__textWrap=c,this.__borderRadius=l,this.__borderEnabled=u,this.__shadowEnabled=d,this.__rotation=f,this.__aspectRatioLocked=p}createDOM(e){let t=document.createElement(`span`);return t.className=e.theme.image||`rj-editor-image-node`,t}decorate(){return(0,u.jsx)(Ua,{alignment:this.__alignment,altText:this.__altText,aspectRatioLocked:this.__aspectRatioLocked,borderEnabled:this.__borderEnabled,borderRadius:this.__borderRadius,caption:this.__caption,height:this.__height,linkUrl:this.__linkUrl,nodeKey:this.__key,objectFit:this.__objectFit,rotation:this.__rotation,shadowEnabled:this.__shadowEnabled,src:this.__src,textWrap:this.__textWrap,width:this.__width})}exportDOM(){let e=document.createElement(`img`);return e.setAttribute(`src`,this.__src),this.__altText&&e.setAttribute(`alt`,this.__altText),e.setAttribute(`data-alignment`,this.__alignment),e.setAttribute(`data-caption`,this.__caption),e.setAttribute(`data-height`,this.__height?String(this.__height):``),e.setAttribute(`data-link-url`,this.__linkUrl),e.setAttribute(`data-object-fit`,this.__objectFit),e.setAttribute(`data-rj-image-node-key`,this.__key),e.setAttribute(`data-rotation`,String(this.__rotation)),e.setAttribute(`data-text-wrap`,this.__textWrap),e.setAttribute(`data-width`,String(this.__width)),e.setAttribute(`data-aspect-ratio-locked`,String(this.__aspectRatioLocked)),e.style.display=`block`,e.style.borderRadius=R(this.__borderRadius),e.style.maxWidth=`100%`,e.style.objectFit=this.__objectFit,e.style.transform=`rotate(${this.__rotation}deg)`,e.style.width=`${this.__width}%`,this.__textWrap===`square`&&this.__alignment===`left`&&(e.style.float=`left`,e.style.margin=`0.25rem 1rem 0.625rem 0`),this.__textWrap===`square`&&this.__alignment===`right`&&(e.style.float=`right`,e.style.margin=`0.25rem 0 0.625rem 1rem`),this.__textWrap!==`square`&&this.__alignment===`center`&&(e.style.marginLeft=`auto`,e.style.marginRight=`auto`),this.__textWrap!==`square`&&this.__alignment===`right`&&(e.style.marginLeft=`auto`,e.style.marginRight=`0`),this.__textWrap!==`square`&&this.__alignment===`left`&&(e.style.marginLeft=`0`,e.style.marginRight=`auto`),this.__borderEnabled&&(e.style.border=`0.0625rem solid #94a3b8`),this.__shadowEnabled&&(e.style.boxShadow=`0 0.875rem 2rem rgb(15 23 42 / 18%)`),this.__height&&(e.style.height=R(this.__height)),{element:e}}exportJSON(){return{alignment:this.__alignment,aspectRatioLocked:this.__aspectRatioLocked,altText:this.__altText,borderEnabled:this.__borderEnabled,borderRadius:this.__borderRadius,caption:this.__caption,height:this.__height,linkUrl:this.__linkUrl,objectFit:this.__objectFit,rotation:this.__rotation,shadowEnabled:this.__shadowEnabled,src:this.__src,textWrap:this.__textWrap,type:`image`,version:1,width:this.__width}}getAlignment(){return this.getLatest().__alignment}getAltText(){return this.getLatest().__altText}getAspectRatioLocked(){return this.getLatest().__aspectRatioLocked}getBorderEnabled(){return this.getLatest().__borderEnabled}getBorderRadius(){return this.getLatest().__borderRadius}getCaption(){return this.getLatest().__caption}getLinkUrl(){return this.getLatest().__linkUrl}getHeight(){return this.getLatest().__height}getObjectFit(){return this.getLatest().__objectFit}getRotation(){return this.getLatest().__rotation}getShadowEnabled(){return this.getLatest().__shadowEnabled}getSrc(){return this.getLatest().__src}getTextWrap(){return this.getLatest().__textWrap}getWidth(){return this.getLatest().__width}setAlignment(e){let t=this.getWritable();return t.__alignment=e,t}setAltText(e){let t=this.getWritable();return t.__altText=e,t}setAspectRatioLocked(e){let t=this.getWritable();return t.__aspectRatioLocked=e,t}setBorderEnabled(e){let t=this.getWritable();return t.__borderEnabled=e,t}setBorderRadius(e){let t=this.getWritable();return t.__borderRadius=e,t}setCaption(e){let t=this.getWritable();return t.__caption=e,t}setLinkUrl(e){let t=this.getWritable();return t.__linkUrl=e,t}setHeight(e){let t=this.getWritable();return t.__height=e,t}setObjectFit(e){let t=this.getWritable();return t.__objectFit=e,t}setRotation(e){let t=this.getWritable();return t.__rotation=e,t}setShadowEnabled(e){let t=this.getWritable();return t.__shadowEnabled=e,t}setSrc(e){let t=this.getWritable();return t.__src=e,t}setTextWrap(e){let t=this.getWritable();return t.__textWrap=e,t}setWidth(e){let t=this.getWritable();return t.__width=e,t}getTextContent(){return this.__altText}isInline(){return!1}updateDOM(){return!1}};function no({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}){return new to(d,n,p,e,a,o,s,c,f,i,r,u,l,t)}function ro(e){return e instanceof to}function io(e){let n=(0,t.$getNodeByKey)(e);lo(n)&&n.remove()}var ao=P.default.memo(function({nodeKey:e,title:n,videoId:r}){let[i]=(0,h.useLexicalComposerContext)(),[a,o,s]=(0,g.useLexicalNodeSelection)(e),c=n||`YouTube video`;return P.default.useEffect(()=>{if(!a)return;let n=i.registerCommand(t.KEY_DELETE_COMMAND,t=>(t.preventDefault(),i.update(()=>io(e)),!0),t.COMMAND_PRIORITY_LOW),r=i.registerCommand(t.KEY_BACKSPACE_COMMAND,t=>(t.preventDefault(),i.update(()=>io(e)),!0),t.COMMAND_PRIORITY_LOW);return()=>{n(),r()}},[i,a,e]),(0,u.jsx)(`div`,{className:[`rj-editor-youtube`,a?`is-selected`:``].filter(Boolean).join(` `),onClick:e=>{e.preventDefault(),e.stopPropagation(),s(),o(!0)},role:`presentation`,children:(0,u.jsx)(`iframe`,{allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`,allowFullScreen:!0,loading:`lazy`,referrerPolicy:`strict-origin-when-cross-origin`,src:`https://www.youtube-nocookie.com/embed/${r}`,title:c})})});function oo(e){let t=Oe(e.getAttribute(`data-youtube-video-id`)||e.getAttribute(`src`)||``);return t?{node:co({title:e.getAttribute(`title`)||``,videoId:t})}:null}var so=class e extends t.DecoratorNode{__title;__videoId;static clone(t){return new e(t.__videoId,t.__title,t.__key)}static getType(){return`youtube`}static importDOM(){return{iframe:e=>Oe(e.getAttribute(`src`)||``)?{conversion:oo,priority:1}:null}}static importJSON(e){return co({title:e.title,videoId:e.videoId})}constructor(e,t=``,n){super(n),this.__videoId=e,this.__title=t}createDOM(e){let t=document.createElement(`div`);return t.className=e.theme.youtube||`rj-editor-youtube-node`,t}decorate(){return(0,u.jsx)(ao,{nodeKey:this.__key,title:this.__title,videoId:this.__videoId})}exportDOM(){let e=document.createElement(`div`),t=document.createElement(`iframe`);return e.className=`rj-editor-youtube`,e.style.aspectRatio=`16 / 9`,e.style.background=`#f8fafc`,e.style.border=`0.0625rem solid #d9dde5`,e.style.borderRadius=`0.5rem`,e.style.maxWidth=`45rem`,e.style.overflow=`hidden`,e.style.width=`100%`,t.setAttribute(`allow`,`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`),t.setAttribute(`allowfullscreen`,`true`),t.setAttribute(`data-youtube-video-id`,this.__videoId),t.setAttribute(`loading`,`lazy`),t.setAttribute(`referrerpolicy`,`strict-origin-when-cross-origin`),t.setAttribute(`src`,`https://www.youtube-nocookie.com/embed/${this.__videoId}`),t.setAttribute(`title`,this.__title||`YouTube video`),t.style.border=`0`,t.style.display=`block`,t.style.height=`100%`,t.style.width=`100%`,e.append(t),{element:e}}exportJSON(){return{title:this.__title,type:`youtube`,version:1,videoId:this.__videoId}}getTextContent(){return`https://www.youtube.com/watch?v=${this.__videoId}`}getTitle(){return this.getLatest().__title}getVideoId(){return this.getLatest().__videoId}isInline(){return!1}setTitle(e){let t=this.getWritable();return t.__title=e,t}updateDOM(){return!1}};function co({title:e=``,videoId:t}){return new so(t,e)}function lo(e){return e instanceof so}var uo={code:`rj-editor-code-block`,codeHighlight:{atrule:`rj-editor-code-token-atrule`,attr:`rj-editor-code-token-attr`,"attr-name":`rj-editor-code-token-attr`,"attr-value":`rj-editor-code-token-string`,boolean:`rj-editor-code-token-boolean`,builtin:`rj-editor-code-token-builtin`,char:`rj-editor-code-token-char`,class:`rj-editor-code-token-class`,"class-name":`rj-editor-code-token-class-name`,comment:`rj-editor-code-token-comment`,constant:`rj-editor-code-token-constant`,deleted:`rj-editor-code-token-deleted`,entity:`rj-editor-code-token-entity`,function:`rj-editor-code-token-function`,important:`rj-editor-code-token-important`,inserted:`rj-editor-code-token-inserted`,keyword:`rj-editor-code-token-keyword`,namespace:`rj-editor-code-token-namespace`,number:`rj-editor-code-token-number`,operator:`rj-editor-code-token-operator`,prolog:`rj-editor-code-token-comment`,property:`rj-editor-code-token-property`,punctuation:`rj-editor-code-token-punctuation`,regex:`rj-editor-code-token-regex`,selector:`rj-editor-code-token-selector`,string:`rj-editor-code-token-string`,symbol:`rj-editor-code-token-symbol`,tag:`rj-editor-code-token-tag`,url:`rj-editor-code-token-url`,variable:`rj-editor-code-token-variable`},paragraph:`rj-editor-paragraph`,text:{bold:`rj-editor-text-bold`,code:`rj-editor-text-code`,italic:`rj-editor-text-italic`,strikethrough:`rj-editor-text-strikethrough`,subscript:`rj-editor-text-subscript`,superscript:`rj-editor-text-superscript`,underline:`rj-editor-text-underline`},list:{ol:`rj-editor-list-ol`,ul:`rj-editor-list-ul`,listitem:`rj-editor-list-item`},equation:`rj-editor-equation-node`,image:`rj-editor-image-node`,youtube:`rj-editor-youtube-node`,table:`rj-editor-table`,tableCell:`rj-editor-table-cell`,tableCellHeader:`rj-editor-table-cell-header`,tableCellSelected:`rj-editor-table-cell-selected`,tableRow:`rj-editor-table-row`,tableScrollableWrapper:`rj-editor-table-scrollable-wrapper`,tableSelection:`rj-editor-table-selection`};Bi();function fo({defaultValue:e,namespace:n,value:r}){return{namespace:n,nodes:[Y,Ri,fa,{replace:Y,with:_a,withKlass:fa},Ca,{replace:t.TextNode,with:Ta,withKlass:Ca},ta,to,so,d.LinkNode,f.ListNode,f.ListItemNode,p.TableCellNode,p.TableNode,p.TableRowNode],onError(e){throw e},editorState:r||e?t=>Dn(t,r||e||``):void 0,theme:uo}}function po({children:e,onImageUpload:t}){return(0,u.jsx)(Aa.Provider,{value:t||mn,children:e})}function mo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M6 9L12 15L18 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ho(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{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`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}Bi();var go=250,_o=8,vo=48,yo=80,bo=[{label:`Plain Text`,value:`plain`},{label:`Terminal`,value:`terminal`},{label:`JSON`,value:`json`},{label:`Bash`,value:`bash`},{label:`Shell`,value:`shell`},{label:`PNPM`,value:`pnpm`},{label:`NPM`,value:`npm`},{label:`Yarn`,value:`yarn`},{label:`Bun`,value:`bun`},{label:`C`,value:`c`},{label:`C++`,value:`cpp`},{label:`CSS`,value:`css`},{label:`Diff`,value:`diff`},{label:`Dockerfile`,value:`dockerfile`},{label:`HTML`,value:`html`},{label:`Java`,value:`java`},{label:`JavaScript`,value:`js`},{label:`JSX`,value:`jsx`},{label:`Markdown`,value:`markdown`},{label:`Objective-C`,value:`objc`},{label:`PowerShell`,value:`powershell`},{label:`Python`,value:`py`},{label:`Rust`,value:`rust`},{label:`SQL`,value:`sql`},{label:`Swift`,value:`swift`},{label:`TypeScript`,value:`typescript`},{label:`TSX`,value:`tsx`},{label:`XML`,value:`xml`},{label:`YAML`,value:`yaml`}],xo={algorithm:o.theme.darkAlgorithm,token:{colorBgContainer:`#181818`,colorBgElevated:`#202020`,colorBorder:`#4a4a4a`,colorFillSecondary:`#303030`,colorPrimary:`#b8b8b8`,colorText:`#ededed`,colorTextPlaceholder:`#8f8f8f`,colorTextSecondary:`#b8b8b8`}};function So(e){return e.trim().slice(0,vo)||`plain`}function Co(e){return e.trim().slice(0,yo)}function wo({displayTitle:e,editor:n,language:r,nodeKey:i,title:a}){let s=U(),c=P.default.useRef(null),l=P.default.useRef(!1),[d,f]=P.default.useState(!1),[p,m]=P.default.useState(!1),[h,g]=P.default.useState({displayTitle:e,nodeKey:i,title:a,value:e}),[_,v]=P.default.useState({left:0,top:0,visible:!1,width:go}),y=P.default.useCallback(()=>{let e=n.getElementByKey(i),t=n.getRootElement()?.closest(`.rj-editor-body`);if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement)){v(e=>e.visible?{...e,visible:!1}:e);return}let r=t.getBoundingClientRect(),a=e.getBoundingClientRect(),o=Math.max(go,a.width-_o*2),s={left:Math.max(a.left-r.left+_o,_o),top:Math.max(a.top-r.top+_o,_o),visible:!0,width:Math.min(o,r.width-_o*2)};v(e=>e.left===s.left&&e.top===s.top&&e.visible===s.visible&&e.width===s.width?e:s)},[n,i]),b=p&&h.nodeKey===i?h.value:e;P.default.useEffect(()=>{let e=window.requestAnimationFrame(y),t=n.getElementByKey(i),r=n.getRootElement()?.closest(`.rj-editor-body`),a=typeof ResizeObserver>`u`?null:new ResizeObserver(y);return t&&a?.observe(t),r&&a?.observe(r),c.current&&a?.observe(c.current),window.addEventListener(`resize`,y),document.addEventListener(`scroll`,y,!0),()=>{window.cancelAnimationFrame(e),a?.disconnect(),window.removeEventListener(`resize`,y),document.removeEventListener(`scroll`,y,!0)}},[n,i,y]),P.default.useEffect(()=>{if(!d)return;let e=window.setTimeout(()=>f(!1),1600);return()=>window.clearTimeout(e)},[d]);let x=async()=>{let e=``;n.getEditorState().read(()=>{let n=(0,t.$getNodeByKey)(i);q(n)&&(e=n.getTextContent())}),await ge(e),f(!0)},S=e=>{let r=So(e);n.update(()=>{let e=(0,t.$getNodeByKey)(i);q(e)&&e.setLanguage(r)})},C=e=>{let a=Co(e);g({displayTitle:a||r,nodeKey:i,title:a||void 0,value:a||r}),n.update(()=>{let e=(0,t.$getNodeByKey)(i);if(ma(e)){e.setTitle(a);return}if(q(e)){let t=pa(e.getLanguage(),a);t.setTheme(e.getTheme()),t.setStyle(e.getStyle()),e.replace(t,!0)}})};return _.visible?(0,u.jsxs)(`div`,{className:`rj-editor-code-block-actions`,contentEditable:!1,onMouseDown:e=>e.stopPropagation(),ref:c,style:{left:_.left,top:_.top,width:_.width},children:[(0,u.jsxs)(`label`,{className:`rj-editor-code-block-title-control`,children:[(0,u.jsx)(`span`,{"aria-hidden":`true`,children:`>_`}),(0,u.jsx)(`input`,{"aria-label":s.toolbar.codeBlock.title,onBlur:()=>{if(l.current){l.current=!1,m(!1);return}C(b),m(!1)},onChange:t=>{g({displayTitle:e,nodeKey:i,title:a,value:t.target.value})},onFocus:()=>{m(!0),g({displayTitle:e,nodeKey:i,title:a,value:e})},onKeyDown:t=>{t.stopPropagation(),t.key===`Enter`&&(t.preventDefault(),t.currentTarget.blur()),t.key===`Escape`&&(t.preventDefault(),l.current=!0,m(!1),g({displayTitle:e,nodeKey:i,title:a,value:e}),t.currentTarget.blur())},title:s.toolbar.codeBlock.title,type:`text`,value:b})]}),(0,u.jsxs)(`div`,{className:`rj-editor-code-block-action-controls`,children:[(0,u.jsx)(o.ConfigProvider,{theme:xo,children:(0,u.jsx)(o.Select,{suffixIcon:(0,u.jsx)(mo,{}),"aria-label":s.toolbar.codeBlock.language,className:`rj-editor-code-block-language-select`,classNames:{popup:{root:`rj-editor-code-block-language-popup`}},filterOption:(e,t)=>String(t?.label||t?.value||``).toLowerCase().includes(e.toLowerCase()),onChange:e=>S(e),options:bo,popupMatchSelectWidth:!1,showSearch:!0,size:`small`,value:r})}),(0,u.jsx)(`button`,{"aria-label":d?s.toolbar.codeBlock.copied:s.toolbar.codeBlock.copy,className:d?`is-copied`:void 0,onClick:()=>void x(),title:d?s.toolbar.codeBlock.copied:s.toolbar.codeBlock.copy,type:`button`,children:(0,u.jsx)(ho,{"aria-hidden":`true`})})]})]}):null}Bi();function To(e,n=[]){return q(e)&&n.push(e),(0,t.$isElementNode)(e)&&e.getChildren().forEach(e=>{To(e,n)}),n}function Eo(e,t){return e.length===t.length&&e.every((e,n)=>{let r=t[n];return e.displayTitle===r?.displayTitle&&e.key===r.key&&e.language===r.language&&e.title===r.title})}function Do(){let[e]=(0,h.useLexicalComposerContext)(),[n,r]=P.default.useState([]);return P.default.useEffect(()=>{let n=()=>{let e=To((0,t.$getRoot)()).map(e=>({displayTitle:ga(e),key:e.getKey(),language:e.getLanguage()||`plain`,title:ha(e)}));r(t=>Eo(t,e)?t:e)};return e.getEditorState().read(n),e.registerUpdateListener(({editorState:e})=>{e.read(n)})},[e]),n.map(t=>(0,u.jsx)(wo,{editor:e,displayTitle:t.displayTitle,language:t.language,nodeKey:t.key,title:t.title},t.key))}function Oo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 10H3M21 18H3M21 6H3M21 14H3`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ko({editor:e}){let n=U(),r=H(e=>e.toolbar.alignment),i=r===``||r===`start`?`left`:r===`end`?`right`:r;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":n.toolbar.alignment.left,"aria-pressed":i===`left`,className:i===`left`?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`left`),title:F(`MOD+SHIFT+L`,n.toolbar.alignment.left),type:`button`,children:(0,u.jsx)(Da,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.alignment.center,"aria-pressed":i===`center`,className:i===`center`?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`center`),title:F(`MOD+SHIFT+C`,n.toolbar.alignment.center),type:`button`,children:(0,u.jsx)(Ea,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.alignment.right,"aria-pressed":i===`right`,className:i===`right`?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`right`),title:F(`MOD+SHIFT+R`,n.toolbar.alignment.right),type:`button`,children:(0,u.jsx)(Oa,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.alignment.justify,"aria-pressed":i===`justify`,className:i===`justify`?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`justify`),title:F(`MOD+SHIFT+J`,n.toolbar.alignment.justify),type:`button`,children:(0,u.jsx)(Oo,{})})]})}function Ao(){return(0,u.jsx)(`span`,{className:`rj-editor-toolbar-divider`})}function jo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M3 9H16.5C18.9853 9 21 11.0147 21 13.5C21 15.9853 18.9853 18 16.5 18H12M7 13L3 9L7 5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Mo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 9H7.5C5.01472 9 3 11.0147 3 13.5C3 15.9853 5.01472 18 7.5 18H12M17 13L21 9L17 5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function No({editor:e}){let n=U(),{canRedo:r,canUndo:i}=H(e=>e.toolbar);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":n.toolbar.history.undo,disabled:!i,onClick:()=>e.dispatchCommand(t.UNDO_COMMAND,void 0),title:F(`MOD+Z`,n.toolbar.shortcuts.undo),type:`button`,children:(0,u.jsx)(jo,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.history.redo,disabled:!r,onClick:()=>e.dispatchCommand(t.REDO_COMMAND,void 0),title:F(`MOD+Y`,n.toolbar.shortcuts.redo),type:`button`,children:(0,u.jsx)(Mo,{})})]})}function Po(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 9.25H12M21 4H3M21 14.75H12M21 20H3M4.28 8.56L8.14667 11.46C8.43616 11.6771 8.5809 11.7857 8.63266 11.9188C8.678 12.0353 8.678 12.1647 8.63266 12.2812C8.5809 12.4143 8.43616 12.5229 8.14667 12.74L4.28 15.64C3.86802 15.949 3.66203 16.1035 3.48961 16.0999C3.33956 16.0968 3.19885 16.0264 3.10632 15.9082C3 15.7725 3 15.515 3 15V9.2C3 8.68503 3 8.42754 3.10632 8.29175C3.19885 8.17358 3.33956 8.10323 3.48961 8.10011C3.66203 8.09652 3.86802 8.25102 4.28 8.56Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Fo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 4H3M21 20H3M12 9.25H3M12 14.75H3M19.72 8.46L15.8533 11.36C15.5638 11.5771 15.4191 11.6857 15.3673 11.8188C15.322 11.9353 15.322 12.0647 15.3673 12.1812C15.4191 12.3143 15.5638 12.4229 15.8533 12.64L19.72 15.54C20.132 15.849 20.338 16.0035 20.5104 15.9999C20.6604 15.9968 20.8012 15.9264 20.8937 15.8082C21 15.6725 21 15.415 21 14.9V9.1C21 8.58503 21 8.32754 20.8937 8.19175C20.8012 8.07358 20.6604 8.00323 20.5104 8.00011C20.338 7.99652 20.132 8.15102 19.72 8.46Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Io(){let[e]=(0,h.useLexicalComposerContext)(),n=U();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":n.toolbar.shortcuts.increaseIndent,onClick:()=>e.dispatchCommand(t.INDENT_CONTENT_COMMAND,void 0),title:F(`MOD+]`,n.toolbar.shortcuts.increaseIndent),type:`button`,children:(0,u.jsx)(Po,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.shortcuts.decreaseIndent,onClick:()=>e.dispatchCommand(t.OUTDENT_CONTENT_COMMAND,void 0),title:F(`MOD+[`,n.toolbar.shortcuts.decreaseIndent),type:`button`,children:(0,u.jsx)(Fo,{"aria-hidden":`true`})})]})}function Lo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 5.00001L10 5.00001M21 19L10 19M21 12L12 12M6 5.00001C5.5 5.00004 5.32843 5.00001 4.5 5.00001C3.67157 5.00001 3.5 4.99999 3 5.00001M6 19C5.5 19 5.32843 19 4.5 19C3.67157 19 3.5 19 3 19M11 8C9 10 7 12 7 12M7 12C7 12 5 10 3 8M7 12C7 12 9 14 11 16M7 12C7 12 5 14 3 16`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Ro(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 12L9 12M21 6L9 6M21 18L9 18M5 12C5 12.5523 4.55228 13 4 13C3.44772 13 3 12.5523 3 12C3 11.4477 3.44772 11 4 11C4.55228 11 5 11.4477 5 12ZM5 6C5 6.55228 4.55228 7 4 7C3.44772 7 3 6.55228 3 6C3 5.44772 3.44772 5 4 5C4.55228 5 5 5.44772 5 6ZM5 18C5 18.5523 4.55228 19 4 19C3.44772 19 3 18.5523 3 18C3 17.4477 3.44772 17 4 17C4.55228 17 5 17.4477 5 18Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function zo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 5.00001L10 5.00001M21 19L10 19M21 12L10 12M6 5.00001C5.5 5.00004 5.32843 5.00001 4.5 5.00001C3.67157 5.00001 3.5 4.99999 3 5.00001M6 19C5.5 19 5.32843 19 4.5 19C3.67157 19 3.5 19 3 19M6 12C5.5 12 5.32843 12 4.5 12C3.67157 12 3.5 12 3 12`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Bo({editor:e}){let t=U(),n=H(e=>e.toolbar.listType);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.list.bullet,"aria-pressed":n===`bullet`,className:n===`bullet`?`is-active`:void 0,onClick:()=>e.dispatchCommand(f.INSERT_UNORDERED_LIST_COMMAND,void 0),title:F(`MOD+SHIFT+8`,t.toolbar.shortcuts.bulletList),type:`button`,children:(0,u.jsx)(Ro,{})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.list.numbered,"aria-pressed":n===`number`,className:n===`number`?`is-active`:void 0,onClick:()=>e.dispatchCommand(f.INSERT_ORDERED_LIST_COMMAND,void 0),title:F(`MOD+SHIFT+7`,t.toolbar.shortcuts.numberedList),type:`button`,children:(0,u.jsx)(zo,{})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.list.remove,"aria-pressed":n===void 0?void 0:!1,onClick:()=>e.dispatchCommand(f.REMOVE_LIST_COMMAND,void 0),title:t.toolbar.shortcuts.removeList,type:`button`,className:`rj-editor-toolbar--clear-btn`,children:(0,u.jsx)(Lo,{})})]})}function Vo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 10H13M21 6H13M21 14H13M21 18H13M6 20L6 4M9 17L6 20L3 17M9 7L6 4L3 7`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Ho(e,n){e.focus(()=>{e.update(()=>{let e=(0,t.$getSelection)();(0,t.$isRangeSelection)(e)&&(0,E.$patchStyleText)(e,n)})})}function Uo(e){e.update(()=>{let e=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(e))return;(0,E.$patchStyleText)(e,{"background-color":null,color:null,"font-family":null,"font-size":null,"line-height":null}),[`bold`,`capitalize`,`code`,`highlight`,`italic`,`lowercase`,`strikethrough`,`subscript`,`superscript`,`underline`,`uppercase`].forEach(t=>{e.hasFormat(t)&&e.formatText(t)}),e.setFormat(0),(0,f.$isListNode)((0,m.$getNearestNodeOfType)(e.anchor.getNode(),f.ListNode))&&(0,f.$removeList)(),(0,E.$setBlocksType)((0,t.$getSelection)(),t.$createParagraphNode,(e,t)=>{t.setFormat(``),t.setIndent(0),t.setDirection(null)});let n=(0,t.$getSelection)();(0,t.$isRangeSelection)(n)&&n.getNodes().forEach(e=>{let n=e.getTopLevelElement();(0,t.$isElementNode)(n)&&(n.setFormat(``),n.setIndent(0),n.setDirection(null))})})}function Wo(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=zn(),r=H(e=>e.toolbar),i=t=>{Ho(e,{"line-height":t||null}),n(Pn({...r,lineHeight:t}))};return(0,u.jsx)(o.Dropdown,{menu:{items:[{key:`default`,label:(0,u.jsx)(`button`,{className:`rj-editor-spacing-menu-item`,onClick:()=>i(void 0),type:`button`,children:t.toolbar.spacing.default})},{type:`divider`},...Ge.map(e=>({key:e,label:(0,u.jsx)(`button`,{className:`rj-editor-spacing-menu-item`,onClick:()=>i(e),type:`button`,children:e})}))]},trigger:[`click`],children:(0,u.jsx)(`button`,{"aria-label":t.toolbar.spacing.lineAndParagraph,className:r.lineHeight?`is-active`:void 0,title:t.toolbar.shortcuts.spacing,type:`button`,children:(0,u.jsx)(Vo,{"aria-hidden":`true`})})})}function Go(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M2 12C2 17.5228 6.47715 22 12 22C13.6569 22 15 20.6569 15 19V18.5C15 18.0356 15 17.8034 15.0257 17.6084C15.2029 16.2622 16.2622 15.2029 17.6084 15.0257C17.8034 15 18.0356 15 18.5 15H19C20.6569 15 22 13.6569 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M7 13C7.55228 13 8 12.5523 8 12C8 11.4477 7.55228 11 7 11C6.44772 11 6 11.4477 6 12C6 12.5523 6.44772 13 7 13Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M16 9C16.5523 9 17 8.55228 17 8C17 7.44772 16.5523 7 16 7C15.4477 7 15 7.44772 15 8C15 8.55228 15.4477 9 16 9Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M10 8C10.5523 8 11 7.55228 11 7C11 6.44772 10.5523 6 10 6C9.44772 6 9 6.44772 9 7C9 7.55228 9.44772 8 10 8Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Ko(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),[n,r]=(0,P.useState)(!1),[i,a]=(0,P.useState)(null),s=zn(),c=H(e=>e.toolbar),l=c.backgroundColor,d=t=>{Ho(e,{"background-color":t||null}),s(Pn({...c,backgroundColor:t}))};return(0,u.jsx)(o.Dropdown,{menu:{items:[{key:`none`,label:(0,u.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{d(``),r(!1)},type:`button`,children:[(0,u.jsx)(`span`,{className:`rj-editor-color-none`}),t.common.none]})},...Le.map(e=>({key:e,label:(0,u.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{d(e),r(!1)},type:`button`,children:[(0,u.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:e}}),e]})})),{type:`divider`},{key:`more-colors`,label:(0,u.jsxs)(`label`,{className:`rj-editor-color-menu-item`,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,u.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:l||Le[0]}}),t.common.moreColors,(0,u.jsx)(`input`,{"aria-label":t.common.moreColors,className:`rj-editor-color-menu-input`,onChange:e=>{d(e.target.value),a(e.target.value),r(!0)},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),type:`color`,value:l||Le[0]})]})}]},onOpenChange:t=>{r(t),!t&&i&&(window.setTimeout(()=>{Ho(e,{"background-color":i})}),a(null))},open:n,trigger:[`click`],children:(0,u.jsx)(`button`,{"aria-label":t.toolbar.style.backgroundColor,className:`rj-editor-color-button`,title:t.toolbar.shortcuts.backgroundColor,type:`button`,children:(0,u.jsx)(`span`,{className:l?`rj-editor-background-color-mark`:`rj-editor-background-color-mark is-none`,style:l?{backgroundColor:l}:void 0,children:(0,u.jsx)(Go,{})})})})}function qo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M18 6L6 18M6 6L18 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Jo(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=zn();return(0,u.jsx)(`button`,{"aria-label":t.toolbar.style.clearFormatting,onClick:()=>{Uo(e),n(In({isBold:!1,isCode:!1,isItalic:!1,isStrikethrough:!1,isSubscript:!1,isSuperscript:!1,isUnderline:!1})),n(Pn({backgroundColor:L.backgroundColor,fontFamily:L.fontFamily,fontSize:L.fontSize,lineHeight:L.lineHeight,textColor:L.textColor})),n(kn({alignment:L.alignment,listType:L.listType}))},title:F(`MOD+\\`,t.toolbar.shortcuts.clearFormatting),type:`button`,className:`rj-editor-toolbar--clear-btn`,children:(0,u.jsx)(qo,{})})}function Yo(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=zn(),r=H(e=>e.toolbar);return(0,u.jsx)(o.Select,{"aria-label":t.toolbar.style.fontFamily,className:`rj-editor-toolbar-select rj-editor-toolbar-select-font`,onChange:(t=``)=>{Ho(e,{"font-family":t||null}),n(Pn({...r,fontFamily:t}))},options:ze.map(e=>({label:e,value:e})),placeholder:t.toolbar.style.fontFamilyPlaceholder,popupMatchSelectWidth:!1,size:`small`,title:t.toolbar.shortcuts.fontFamily,value:r.fontFamily==``?void 0:r.fontFamily,suffixIcon:(0,u.jsx)(mo,{})})}function Xo(e){let t=Number.parseFloat(e);return Number.isFinite(t)?String(Number((t*16).toFixed(2))):e}function Zo(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=zn(),r=H(e=>e.toolbar);return(0,u.jsx)(o.Select,{"aria-label":t.toolbar.style.fontSize,className:`rj-editor-toolbar-select`,onChange:(t=``)=>{Ho(e,{"font-size":t||null}),n(Pn({...r,fontSize:t}))},options:Be.map(e=>({label:Xo(e),value:e})),placeholder:t.toolbar.style.fontSizePlaceholder,popupMatchSelectWidth:!1,size:`small`,title:t.toolbar.shortcuts.fontSize,value:r.fontSize==``?void 0:r.fontSize,suffixIcon:(0,u.jsx)(mo,{})})}function Qo(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),[n,r]=(0,P.useState)(!1),[i,a]=(0,P.useState)(null),s=zn(),c=H(e=>e.toolbar),l=c.textColor,d=t=>{Ho(e,{color:t||null}),s(Pn({...c,textColor:t}))};return(0,u.jsx)(o.Dropdown,{menu:{items:[{key:`none`,label:(0,u.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{d(``),r(!1)},type:`button`,children:[(0,u.jsx)(`span`,{className:`rj-editor-color-none`}),t.common.none]})},...qe.map(e=>({key:e,label:(0,u.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{d(e),r(!1)},type:`button`,children:[(0,u.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:e}}),e]})})),{type:`divider`},{key:`more-colors`,label:(0,u.jsxs)(`label`,{className:`rj-editor-color-menu-item`,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,u.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:l||qe[0]}}),t.common.moreColors,(0,u.jsx)(`input`,{"aria-label":t.common.moreColors,className:`rj-editor-color-menu-input`,onChange:e=>{d(e.target.value),a(e.target.value),r(!0)},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),type:`color`,value:l||qe[0]})]})}]},onOpenChange:t=>{r(t),!t&&i&&(window.setTimeout(()=>{Ho(e,{color:i})}),a(null))},open:n,trigger:[`click`],children:(0,u.jsx)(`button`,{"aria-label":t.toolbar.style.textColor,className:`rj-editor-color-button`,title:t.toolbar.shortcuts.textColor,type:`button`,children:(0,u.jsxs)(`span`,{className:`rj-editor-text-color-mark`,children:[`A`,(0,u.jsx)(`span`,{className:`rj-editor-text-color-line`,style:{backgroundColor:l||`currentColor`}})]})})})}function $o(){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Yo,{}),(0,u.jsx)(Zo,{}),(0,u.jsx)(Qo,{}),(0,u.jsx)(Ko,{}),(0,u.jsx)(Jo,{})]})}function es(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M6 16C6 18.2091 7.79086 20 10 20H14C16.2091 20 18 18.2091 18 16C18 13.7909 16.2091 12 14 12M18 8C18 5.79086 16.2091 4 14 4H10C7.79086 4 6 5.79086 6 8M3 12H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ts(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M6 12H14C16.2091 12 18 10.2091 18 8C18 5.79086 16.2091 4 14 4H6V12ZM6 12H15C17.2091 12 19 13.7909 19 16C19 18.2091 17.2091 20 15 20H6V12Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ns(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M17 17L22 12L17 7M7 7L2 12L7 17M14 3L10 21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function rs(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M19 4H10M14 20H5M15 4L9 20`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function is(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M3 5L13 15M13 5L3 15M21 19.0001H17C17 17.5001 17.44 17.0001 18.5 16.5001C19.56 16.0001 21 15.3301 21 14.0001C21 13.5301 20.83 13.0701 20.52 12.7101C20.1999 12.3476 19.7649 12.1061 19.2879 12.026C18.811 11.9459 18.321 12.0321 17.9 12.2701C17.48 12.5101 17.16 12.8901 17 13.3401`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function as(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M3 19L13 9M13 19L3 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M17 6.20449C17.824 4.52464 20.0058 4.6741 20.7484 6.20449C20.907 6.53145 21 6.92143 21 7.37007C21 10.428 17 8.60237 17 11.301C17 12.4597 17 11.8301 17 12H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function os(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M18 4V11C18 14.3137 15.3137 17 12 17C8.68629 17 6 14.3137 6 11V4M4 21H20`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ss(){let[e]=(0,h.useLexicalComposerContext)(),n=U(),{isBold:r,isCode:i,isItalic:a,isStrikethrough:o,isSubscript:s,isSuperscript:c,isUnderline:l}=H(e=>e.toolbar);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.bold,"aria-pressed":r,className:r?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`bold`),title:F(`MOD+B`,n.toolbar.shortcuts.bold),type:`button`,children:(0,u.jsx)(ts,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.italic,"aria-pressed":a,className:a?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`italic`),title:F(`MOD+I`,n.toolbar.shortcuts.italic),type:`button`,children:(0,u.jsx)(rs,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.underline,"aria-pressed":l,className:l?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`underline`),title:F(`MOD+U`,n.toolbar.shortcuts.underline),type:`button`,children:(0,u.jsx)(os,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.strikethrough,"aria-pressed":o,className:o?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`strikethrough`),title:F(`MOD+SHIFT+X`,n.toolbar.shortcuts.strikethrough),type:`button`,children:(0,u.jsx)(es,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.code,"aria-pressed":i,className:i?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`code`),title:n.toolbar.textFormat.code,type:`button`,children:(0,u.jsx)(ns,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.subscript,"aria-pressed":s,className:s?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`subscript`),title:F(`MOD+=`,n.toolbar.shortcuts.subscript),type:`button`,children:(0,u.jsx)(is,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.superscript,"aria-pressed":c,className:c?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`superscript`),title:F(`MOD+SHIFT+=`,n.toolbar.shortcuts.superscript),type:`button`,children:(0,u.jsx)(as,{"aria-hidden":`true`})})]})}function cs({editor:e}){return(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-panel rj-editor-toolbar-panel--home`,role:`tabpanel`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-row`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(No,{editor:e}),(0,u.jsx)(Ao,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(ss,{}),(0,u.jsx)(Ao,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(Wo,{}),(0,u.jsx)(Ao,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(ko,{editor:e}),(0,u.jsx)(Ao,{})]})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-row`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)($o,{}),(0,u.jsx)(Ao,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(Bo,{editor:e}),(0,u.jsx)(Ao,{})]}),(0,u.jsx)(`div`,{className:`rj-editor-toolbar-group`,children:(0,u.jsx)(Io,{})})]})]})}function ls(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 9.25H15M21 4H3M21 14.75H15M21 20H3M4.6 16H9.4C9.96005 16 10.2401 16 10.454 15.891C10.6422 15.7951 10.7951 15.6422 10.891 15.454C11 15.2401 11 14.9601 11 14.4V9.6C11 9.03995 11 8.75992 10.891 8.54601C10.7951 8.35785 10.6422 8.20487 10.454 8.10899C10.2401 8 9.96005 8 9.4 8H4.6C4.03995 8 3.75992 8 3.54601 8.10899C3.35785 8.20487 3.20487 8.35785 3.10899 8.54601C3 8.75992 3 9.03995 3 9.6V14.4C3 14.9601 3 15.2401 3.10899 15.454C3.20487 15.6422 3.35785 15.7951 3.54601 15.891C3.75992 16 4.03995 16 4.6 16Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function us(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M3 4H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,u.jsx)(`path`,{d:`M3 20H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,u.jsx)(`rect`,{x:`3`,y:`8`,width:`8`,height:`8`,stroke:`currentColor`,strokeWidth:`2`,strokeLinejoin:`round`})]})}var ds={wrapper:`_wrapper_se0k7_1`,disabled:`_disabled_se0k7_23`,affix:`_affix_se0k7_28`,input:`_input_se0k7_43`,inputAffix:`_inputAffix_se0k7_58`};function fs({className:e,decimalScale:t=2,defaultValue:n,integerOnly:r=!1,locale:i=!1,max:a,min:o,onBlur:s,onChange:c,prefix:l,suffix:d,value:f,...p}){let m=P.default.useRef(null),h=typeof f==`number`,[g,_]=P.default.useState(!1),[v,y]=P.default.useState(()=>cn(h?f:n,i)),b=h&&!g?cn(f,i):v,x=e=>{let n=Ie(e.target.value,t,r),s=Te(n,i),l=Number(n);y(s),n!==``&&n!==`.`&&Number.isFinite(l)&&c?.(he(l,o,a))},S=e=>{_(!1);let t=b.replace(/\s/g,``),n=Number(t);if(t===``||t===`.`||!Number.isFinite(n))y(``);else{let e=he(n,o,a);y(cn(e,i)),c?.(e)}s?.(e)},C=e=>{let t=m.current;if(!t)return;t.focus();let n=e===`start`?0:t.value.length;t.setSelectionRange(n,n)},w=(0,u.jsx)(`input`,{...p,className:[ds.input,l||d?ds.inputAffix:``,l||d?``:e].filter(Boolean).join(` `),inputMode:r?`numeric`:`decimal`,onBlur:S,onChange:x,onFocus:e=>{_(!0),p.onFocus?.(e)},ref:m,type:`text`,value:b});return!l&&!d?w:(0,u.jsxs)(`span`,{className:[ds.wrapper,p.disabled?ds.disabled:``,e].filter(Boolean).join(` `),children:[l?(0,u.jsx)(`span`,{className:ds.affix,onMouseDown:e=>{e.preventDefault(),C(`start`)},children:l}):null,w,d?(0,u.jsx)(`span`,{className:ds.affix,onMouseDown:e=>{e.preventDefault(),C(`end`)},children:d}):null]})}var X={overlay:`_overlay_qjax1_1`,modal:`_modal_qjax1_12`,header:`_header_qjax1_24`,title:`_title_qjax1_34`,closeButton:`_closeButton_qjax1_42`,body:`_body_qjax1_65`,footer:`_footer_qjax1_71`,button:`_button_qjax1_80`,cancelButton:`_cancelButton_qjax1_96`,okButton:`_okButton_qjax1_106`};function ps({cancelText:e,children:t,okText:n,onCancel:r,onOk:i,open:a,title:o,width:s=420}){let c=U(),l=Qn(),d=P.default.useRef(null),f=P.default.useRef({x:0,y:0}),[p,m]=P.default.useState(null);if(P.default.useEffect(()=>{if(!a)return;let e=e=>{if(e.key===`Escape`){r();return}e.key===`Enter`&&i&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!(e.target instanceof HTMLTextAreaElement)&&(e.preventDefault(),i())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[r,i,a]),!a||typeof document>`u`)return null;let h=document.fullscreenElement||document.body,g=(e,t)=>{let n=d.current?.getBoundingClientRect(),r=n?.width||s,i=n?.height||0,a=Math.max(8,window.innerWidth-r-8),o=Math.max(8,window.innerHeight-i-8);return{x:Math.min(Math.max(e,8),a),y:Math.min(Math.max(t,8),o)}};return(0,D.createPortal)((0,u.jsx)(`div`,{className:X.overlay,"data-rj-editor-theme":l,onMouseDown:e=>{e.target===e.currentTarget&&r()},role:`presentation`,children:(0,u.jsxs)(`div`,{"aria-modal":`true`,className:X.modal,ref:d,role:`dialog`,style:{"--rj-modal-width":R(s),left:p?R(p.x):void 0,position:p?`fixed`:void 0,top:p?R(p.y):void 0},children:[(0,u.jsxs)(`div`,{className:X.header,onPointerDown:e=>{if(e.button!==0)return;let t=d.current?.getBoundingClientRect();t&&(e.currentTarget.setPointerCapture(e.pointerId),f.current={x:e.clientX-t.left,y:e.clientY-t.top},m(g(t.left,t.top)))},onPointerMove:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&m(g(e.clientX-f.current.x,e.clientY-f.current.y))},onPointerUp:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)},children:[o?(0,u.jsx)(`h2`,{className:X.title,children:o}):(0,u.jsx)(`span`,{}),(0,u.jsx)(`button`,{"aria-label":c.modal.closeAriaLabel,className:X.closeButton,onClick:r,onPointerDown:e=>{e.stopPropagation()},type:`button`,children:(0,u.jsx)(qo,{"aria-hidden":`true`})})]}),(0,u.jsx)(`div`,{className:X.body,children:t}),i?(0,u.jsxs)(`div`,{className:X.footer,children:[(0,u.jsx)(`button`,{className:`${X.button} ${X.cancelButton}`,onClick:r,type:`button`,children:e||c.common.close}),(0,u.jsx)(`button`,{className:`${X.button} ${X.okButton}`,onClick:i,type:`button`,children:n||c.common.save})]}):null]})}),h)}function ms(){return(0,u.jsx)(`span`,{className:`rj-editor-toolbar-divider`,"aria-hidden":`true`})}function hs(){let e=(0,t.$getSelection)();if(!(0,t.$isNodeSelection)(e))return null;let n=e.getNodes().find(ro);return ro(n)?n:null}function gs(){let e=hs();return{isImageSelected:!!e,selectedImageAlignment:e?.getAlignment(),selectedImageAltText:e?.getAltText(),selectedImageAspectRatioLocked:e?.getAspectRatioLocked(),selectedImageBorderEnabled:e?.getBorderEnabled(),selectedImageBorderRadius:e?.getBorderRadius(),selectedImageCaption:e?.getCaption(),selectedImageHeight:e?.getHeight(),selectedImageKey:e?.getKey(),selectedImageLinkUrl:e?.getLinkUrl(),selectedImageObjectFit:e?.getObjectFit(),selectedImageRotation:e?.getRotation(),selectedImageShadowEnabled:e?.getShadowEnabled(),selectedImageTextWrap:e?.getTextWrap(),selectedImageWidth:e?.getWidth()}}function Z(e,t){e.update(()=>{let e=hs();e&&t(e)}),e.focus()}function _s(e,n,r){e.update(()=>{let e=(0,t.$getNodeByKey)(n);ro(e)&&r(e)}),e.focus()}function vs(e,t){Z(e,e=>{e.setAlignment(t)})}function ys(e,t){Z(e,e=>{e.setWidth(t)})}function bs(e,n){Z(e,e=>{e.setTextWrap(n),n===`square`&&e.getAlignment()===`center`&&e.setAlignment(`left`);let r=e.getParent();r&&!(0,t.$isRootOrShadowRoot)(r)&&r.insertBefore(e)})}function xs(e){Z(e,e=>{e.remove()})}function Ss(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M18 5.00802C13.6667 4.84146 5 7.20666 5 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})})}function Cs(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M2 10C2 10 4.00498 7.26822 5.63384 5.63824C7.26269 4.00827 9.5136 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.89691 21 4.43511 18.2543 3.35177 14.5M8 10H2V4`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ws(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 10C21 10 18.995 7.26822 17.3662 5.63824C15.7373 4.00827 13.4864 3 11 3C6.02944 3 2 7.02944 2 12C2 16.9706 6.02944 21 11 21C15.1031 21 18.5649 18.2543 19.6482 14.5M15 10H21V4`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Ts(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=ja(),r=P.default.useRef(null),{isImageSelected:i,selectedImageAlignment:a,selectedImageAltText:s,selectedImageBorderEnabled:c,selectedImageBorderRadius:l,selectedImageCaption:f,selectedImageKey:p,selectedImageLinkUrl:m,selectedImageObjectFit:g,selectedImageRotation:_,selectedImageShadowEnabled:v,selectedImageTextWrap:y,selectedImageWidth:b}=H(e=>e.toolbar),[x,S]=P.default.useState(null),[C,w]=P.default.useState(``),[T,E]=P.default.useState(!1),D=P.default.useMemo(()=>[{label:t.toolbar.image.fitContain,value:`contain`},{label:t.toolbar.image.fitCover,value:`cover`},{label:t.toolbar.image.fitFill,value:`fill`}],[t]),O=P.default.useMemo(()=>({alt:{label:t.toolbar.image.alt,placeholder:t.toolbar.image.altPlaceholder,title:t.toolbar.image.editAlt},caption:{label:t.toolbar.image.caption,placeholder:t.toolbar.image.captionPlaceholder,title:t.toolbar.image.editCaption},link:{label:t.toolbar.image.link,placeholder:t.toolbar.image.linkPlaceholder,title:t.toolbar.image.editLink}}),[t]),k=e=>{let t={alt:s||``,caption:f||``,link:m||``};S(e),w(t[e])},A=()=>{S(null),w(``),e.focus()};return(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-panel rj-editor-toolbar-panel--image`,role:`tabpanel`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-row`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.alignLeft,className:a===`left`?`is-active`:void 0,disabled:!i,onClick:()=>vs(e,`left`),type:`button`,children:(0,u.jsx)(Da,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.alignCenter,className:a===`center`?`is-active`:void 0,disabled:!i,onClick:()=>vs(e,`center`),type:`button`,children:(0,u.jsx)(Ea,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.alignRight,className:a===`right`?`is-active`:void 0,disabled:!i,onClick:()=>vs(e,`right`),type:`button`,children:(0,u.jsx)(Oa,{"aria-hidden":`true`})}),(0,u.jsx)(ms,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(fs,{"aria-label":t.toolbar.image.width,className:`rj-editor-image-width-input`,max:100,min:10,decimalScale:3,suffix:`%`,onChange:t=>ys(e,t),value:b||100}),[25,50,100].map(t=>(0,u.jsxs)(`button`,{className:b===t?`is-active`:void 0,disabled:!i,onClick:()=>ys(e,t),type:`button`,children:[t,`%`]},t)),(0,u.jsx)(ms,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(`button`,{disabled:!i,onClick:()=>k(`alt`),type:`button`,children:t.toolbar.image.alt}),(0,u.jsx)(`button`,{className:f?`is-active`:void 0,disabled:!i,onClick:()=>k(`caption`),type:`button`,children:t.toolbar.image.caption}),(0,u.jsx)(`button`,{className:m?`is-active`:void 0,disabled:!i,onClick:()=>k(`link`),type:`button`,children:t.toolbar.image.link}),(0,u.jsx)(ms,{})]})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-row`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(`button`,{className:c?`is-active`:void 0,disabled:!i,onClick:()=>Z(e,e=>{e.setBorderEnabled(!e.getBorderEnabled())}),type:`button`,children:t.toolbar.image.border}),(0,u.jsx)(fs,{"aria-label":t.toolbar.image.borderRadius,className:`rj-editor-image-border-radius-input`,integerOnly:!0,max:64,min:0,prefix:(0,u.jsx)(Ss,{}),onChange:t=>Z(e,e=>e.setBorderRadius(t)),value:l||0}),(0,u.jsx)(`button`,{className:v?`is-active`:void 0,disabled:!i,onClick:()=>Z(e,e=>{e.setShadowEnabled(!e.getShadowEnabled())}),type:`button`,children:t.toolbar.image.shadow}),(0,u.jsx)(ms,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(o.Select,{"aria-label":t.toolbar.image.cropMode,className:`rj-editor-toolbar-select rj-editor-toolbar-select-crop`,disabled:!i,onChange:t=>Z(e,e=>e.setObjectFit(t)),options:D,size:`small`,suffixIcon:(0,u.jsx)(mo,{}),value:g||`contain`}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.topBottomWrap,className:y===`top-bottom`?`is-active`:void 0,disabled:!i,onClick:()=>bs(e,`top-bottom`),title:t.toolbar.image.topBottomWrap,type:`button`,children:(0,u.jsx)(us,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.squareWrap,className:y===`square`?`is-active`:void 0,disabled:!i,onClick:()=>bs(e,`square`),title:t.toolbar.image.squareWrap,type:`button`,children:(0,u.jsx)(ls,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.rotateLeft,disabled:!i,onClick:()=>Z(e,e=>e.setRotation((_||0)-90)),type:`button`,children:(0,u.jsx)(Cs,{})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.rotateRight,disabled:!i,onClick:()=>Z(e,e=>e.setRotation((_||0)+90)),type:`button`,children:(0,u.jsx)(ws,{})}),(0,u.jsx)(ms,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.replace,"aria-busy":T,disabled:!i||T,onClick:()=>{pn(r.current)},type:`button`,children:(0,u.jsx)(Ma,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.delete,className:`rj-editor-toolbar--clear-btn`,disabled:!i,onClick:()=>xs(e),type:`button`,children:(0,u.jsx)(ka,{"aria-hidden":`true`})}),(0,u.jsx)(`input`,{accept:`image/*`,className:`rj-editor-hidden-file-input`,onChange:async r=>{let i=r.target.files?.[0];if(r.target.value=``,!i)return;if(!i.type.startsWith(`image/`)){window.alert(t.alerts.onlyImages);return}if(i.size>5242880){window.alert(t.alerts.imageSizeLimit);return}let a=``;try{E(!0),a=await n(i)}catch(e){console.error(e),window.alert(t.alerts.imageUploadFailed);return}finally{E(!1)}Z(e,e=>{e.setSrc(a),e.setAltText(i.name)})},ref:r,type:`file`})]})]}),(0,u.jsx)(ps,{okText:t.common.save,onCancel:A,onOk:()=>{if(!x||!p){A();return}let t=C.trim();_s(e,p,e=>{if(x===`alt`){e.setAltText(t);return}if(x===`caption`){e.setCaption(t);return}e.setLinkUrl(t?(0,d.formatUrl)(t):``)}),S(null),w(``)},open:!!x,title:x?O[x].title:void 0,children:x?(0,u.jsxs)(`div`,{className:`rj-editor-image-edit-form`,children:[(0,u.jsx)(`label`,{htmlFor:`rj-editor-image-edit-input`,children:O[x].label}),x===`caption`?(0,u.jsx)(`textarea`,{autoFocus:!0,id:`rj-editor-image-edit-input`,onChange:e=>w(e.target.value),placeholder:O[x].placeholder,rows:4,value:C}):(0,u.jsx)(`input`,{autoFocus:!0,id:`rj-editor-image-edit-input`,onChange:e=>w(e.target.value),placeholder:O[x].placeholder,type:x===`link`?`url`:`text`,value:C})]}):null})]})}function Es(){return(0,u.jsx)(`span`,{className:`rj-editor-toolbar-divider`,"aria-hidden":`true`})}function Ds(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M16 18L22 12L16 6M8 6L2 12L8 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Os(){let[e]=(0,h.useLexicalComposerContext)(),t=U();return(0,u.jsx)(`button`,{"aria-label":t.toolbar.insert.codeBlock,onClick:()=>{e.dispatchCommand(Ve,{language:`plain`}),window.requestAnimationFrame(()=>e.focus())},onMouseDown:e=>e.preventDefault(),title:t.toolbar.insert.codeBlock,type:`button`,children:(0,u.jsx)(Ds,{"aria-hidden":`true`})})}function ks(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M4.27209 20.7279L10.8686 14.1314C11.2646 13.7354 11.4627 13.5373 11.691 13.4632C11.8918 13.3979 12.1082 13.3979 12.309 13.4632C12.5373 13.5373 12.7354 13.7354 13.1314 14.1314L19.6839 20.6839M14 15L16.8686 12.1314C17.2646 11.7354 17.4627 11.5373 17.691 11.4632C17.8918 11.3979 18.1082 11.3979 18.309 11.4632C18.5373 11.5373 18.7354 11.7354 19.1314 12.1314L22 15M10 9C10 10.1046 9.10457 11 8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9ZM6.8 21H17.2C18.8802 21 19.7202 21 20.362 20.673C20.9265 20.3854 21.3854 19.9265 21.673 19.362C22 18.7202 22 17.8802 22 16.2V7.8C22 6.11984 22 5.27976 21.673 4.63803C21.3854 4.07354 20.9265 3.6146 20.362 3.32698C19.7202 3 18.8802 3 17.2 3H6.8C5.11984 3 4.27976 3 3.63803 3.32698C3.07354 3.6146 2.6146 4.07354 2.32698 4.63803C2 5.27976 2 6.11984 2 7.8V16.2C2 17.8802 2 18.7202 2.32698 19.362C2.6146 19.9265 3.07354 20.3854 3.63803 20.673C4.27976 21 5.11984 21 6.8 21Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var As=(0,s.createContext)({});function js(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=js(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Ms(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=js(e))&&(r&&(r+=` `),r+=t);return r}var Ns={aliceblue:`9ehhb`,antiquewhite:`9sgk7`,aqua:`1ekf`,aquamarine:`4zsno`,azure:`9eiv3`,beige:`9lhp8`,bisque:`9zg04`,black:`0`,blanchedalmond:`9zhe5`,blue:`73`,blueviolet:`5e31e`,brown:`6g016`,burlywood:`8ouiv`,cadetblue:`3qba8`,chartreuse:`4zshs`,chocolate:`87k0u`,coral:`9yvyo`,cornflowerblue:`3xael`,cornsilk:`9zjz0`,crimson:`8l4xo`,cyan:`1ekf`,darkblue:`3v`,darkcyan:`rkb`,darkgoldenrod:`776yz`,darkgray:`6mbhl`,darkgreen:`jr4`,darkgrey:`6mbhl`,darkkhaki:`7ehkb`,darkmagenta:`5f91n`,darkolivegreen:`3bzfz`,darkorange:`9yygw`,darkorchid:`5z6x8`,darkred:`5f8xs`,darksalmon:`9441m`,darkseagreen:`5lwgf`,darkslateblue:`2th1n`,darkslategray:`1ugcv`,darkslategrey:`1ugcv`,darkturquoise:`14up`,darkviolet:`5rw7n`,deeppink:`9yavn`,deepskyblue:`11xb`,dimgray:`442g9`,dimgrey:`442g9`,dodgerblue:`16xof`,firebrick:`6y7tu`,floralwhite:`9zkds`,forestgreen:`1cisi`,fuchsia:`9y70f`,gainsboro:`8m8kc`,ghostwhite:`9pq0v`,goldenrod:`8j4f4`,gold:`9zda8`,gray:`50i2o`,green:`pa8`,greenyellow:`6senj`,grey:`50i2o`,honeydew:`9eiuo`,hotpink:`9yrp0`,indianred:`80gnw`,indigo:`2xcoy`,ivory:`9zldc`,khaki:`9edu4`,lavenderblush:`9ziet`,lavender:`90c8q`,lawngreen:`4vk74`,lemonchiffon:`9zkct`,lightblue:`6s73a`,lightcoral:`9dtog`,lightcyan:`8s1rz`,lightgoldenrodyellow:`9sjiq`,lightgray:`89jo3`,lightgreen:`5nkwg`,lightgrey:`89jo3`,lightpink:`9z6wx`,lightsalmon:`9z2ii`,lightseagreen:`19xgq`,lightskyblue:`5arju`,lightslategray:`4nwk9`,lightslategrey:`4nwk9`,lightsteelblue:`6wau6`,lightyellow:`9zlcw`,lime:`1edc`,limegreen:`1zcxe`,linen:`9shk6`,magenta:`9y70f`,maroon:`4zsow`,mediumaquamarine:`40eju`,mediumblue:`5p`,mediumorchid:`79qkz`,mediumpurple:`5r3rv`,mediumseagreen:`2d9ip`,mediumslateblue:`4tcku`,mediumspringgreen:`1di2`,mediumturquoise:`2uabw`,mediumvioletred:`7rn9h`,midnightblue:`z980`,mintcream:`9ljp6`,mistyrose:`9zg0x`,moccasin:`9zfzp`,navajowhite:`9zest`,navy:`3k`,oldlace:`9wq92`,olive:`50hz4`,olivedrab:`472ub`,orange:`9z3eo`,orangered:`9ykg0`,orchid:`8iu3a`,palegoldenrod:`9bl4a`,palegreen:`5yw0o`,paleturquoise:`6v4ku`,palevioletred:`8k8lv`,papayawhip:`9zi6t`,peachpuff:`9ze0p`,peru:`80oqn`,pink:`9z8wb`,plum:`8nba5`,powderblue:`6wgdi`,purple:`4zssg`,rebeccapurple:`3zk49`,red:`9y6tc`,rosybrown:`7cv4f`,royalblue:`2jvtt`,saddlebrown:`5fmkz`,salmon:`9rvci`,sandybrown:`9jn1c`,seagreen:`1tdnb`,seashell:`9zje6`,sienna:`6973h`,silver:`7ir40`,skyblue:`5arjf`,slateblue:`45e4t`,slategray:`4e100`,slategrey:`4e100`,snow:`9zke2`,springgreen:`1egv`,steelblue:`2r1kk`,tan:`87yx8`,teal:`pds`,thistle:`8ggk8`,tomato:`9yqfb`,turquoise:`2j4r4`,violet:`9b10u`,wheat:`9ld4j`,white:`9zldr`,whitesmoke:`9lhpx`,yellow:`9zl6o`,yellowgreen:`61fzm`},Q=Math.round;function Ps(e,t){let n=e.replace(/^[^(]*\((.*)/,`$1`).replace(/\).*/,``).match(/\d*\.?\d+%?/g)||[],r=n.map(e=>parseFloat(e));for(let e=0;e<3;e+=1)r[e]=t(r[e]||0,n[e]||``,e);return n[3]?r[3]=n[3].includes(`%`)?r[3]/100:r[3]:r[3]=1,r}var Fs=(e,t,n)=>n===0?e:e/100;function Is(e,t){let n=t||255;return e>n?n:e<0?0:e}var Ls=class e{isValid=!0;r=0;g=0;b=0;a=1;_h;_hsl_s;_hsv_s;_l;_v;_max;_min;_brightness;constructor(t){function n(e){return e[0]in t&&e[1]in t&&e[2]in t}if(t)if(typeof t==`string`){let e=t.trim();function n(t){return e.startsWith(t)}if(/^#?[A-F\d]{3,8}$/i.test(e))this.fromHexString(e);else if(n(`rgb`))this.fromRgbString(e);else if(n(`hsl`))this.fromHslString(e);else if(n(`hsv`)||n(`hsb`))this.fromHsvString(e);else{let t=Ns[e.toLowerCase()];t&&this.fromHexString(parseInt(t,36).toString(16).padStart(6,`0`))}}else if(t instanceof e)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(n(`rgb`))this.r=Is(t.r),this.g=Is(t.g),this.b=Is(t.b),this.a=typeof t.a==`number`?Is(t.a,1):1;else if(n(`hsl`))this.fromHsl(t);else if(n(`hsv`))this.fromHsv(t);else throw Error(`@ant-design/fast-color: unsupported input `+JSON.stringify(t))}setR(e){return this._sc(`r`,e)}setG(e){return this._sc(`g`,e)}setB(e){return this._sc(`b`,e)}setA(e){return this._sc(`a`,e,1)}setHue(e){let t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}let t=e(this.r),n=e(this.g),r=e(this.b);return .2126*t+.7152*n+.0722*r}getHue(){if(this._h===void 0){let e=this.getMax()-this.getMin();e===0?this._h=0:this._h=Q(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){return this.getHSVSaturation()}getHSVSaturation(){if(this._hsv_s===void 0){let e=this.getMax()-this.getMin();e===0?this._hsv_s=0:this._hsv_s=e/this.getMax()}return this._hsv_s}getHSLSaturation(){if(this._hsl_s===void 0){let e=this.getMax()-this.getMin();if(e===0)this._hsl_s=0;else{let t=this.getLightness();this._hsl_s=e/255/(1-Math.abs(2*t-1))}}return this._hsl_s}getLightness(){return this._l===void 0&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return this._v===void 0&&(this._v=this.getMax()/255),this._v}getBrightness(){return this._brightness===void 0&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){let t=this.getHue(),n=this.getSaturation(),r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(e=10){let t=this.getHue(),n=this.getSaturation(),r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e,t=50){let n=this._c(e),r=t/100,i=e=>(n[e]-this[e])*r+this[e],a={r:Q(i(`r`)),g:Q(i(`g`)),b:Q(i(`b`)),a:Q(i(`a`)*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){let t=this._c(e),n=this.a+t.a*(1-this.a),r=e=>Q((this[e]*this.a+t[e]*t.a*(1-this.a))/n);return this._c({r:r(`r`),g:r(`g`),b:r(`b`),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e=`#`,t=(this.r||0).toString(16);e+=t.length===2?t:`0`+t;let n=(this.g||0).toString(16);e+=n.length===2?n:`0`+n;let r=(this.b||0).toString(16);if(e+=r.length===2?r:`0`+r,typeof this.a==`number`&&this.a>=0&&this.a<1){let t=Q(this.a*255).toString(16);e+=t.length===2?t:`0`+t}return e}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){let e=this.getHue(),t=Q(this.getHSLSaturation()*100),n=Q(this.getLightness()*100);return this.a===1?`hsl(${e},${t}%,${n}%)`:`hsla(${e},${t}%,${n}%,${this.a})`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${this.a})`}toString(){return this.toRgbString()}_sc(e,t,n){let r=this.clone();return r[e]=Is(t,n),r}_c(e){return new this.constructor(e)}getMax(){return this._max===void 0&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return this._min===void 0&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){let t=e.replace(`#`,``);function n(e,n){return parseInt(t[e]+t[n||e],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:r}){let i=(e%360+360)%360;if(this._h=i,this._hsl_s=t,this._l=n,this.a=typeof r==`number`?r:1,t<=0){let e=Q(n*255);this.r=e,this.g=e,this.b=e;return}let a=0,o=0,s=0,c=i/60,l=(1-Math.abs(2*n-1))*t,u=l*(1-Math.abs(c%2-1));c>=0&&c<1?(a=l,o=u):c>=1&&c<2?(a=u,o=l):c>=2&&c<3?(o=l,s=u):c>=3&&c<4?(o=u,s=l):c>=4&&c<5?(a=u,s=l):c>=5&&c<6&&(a=l,s=u);let d=n-l/2;this.r=Q((a+d)*255),this.g=Q((o+d)*255),this.b=Q((s+d)*255)}fromHsv({h:e,s:t,v:n,a:r}){let i=(e%360+360)%360;this._h=i,this._hsv_s=t,this._v=n,this.a=typeof r==`number`?r:1;let a=Q(n*255);if(this.r=a,this.g=a,this.b=a,t<=0)return;let o=i/60,s=Math.floor(o),c=o-s,l=Q(n*(1-t)*255),u=Q(n*(1-t*c)*255),d=Q(n*(1-t*(1-c))*255);switch(s){case 0:this.g=d,this.b=l;break;case 1:this.r=u,this.b=l;break;case 2:this.r=l,this.b=d;break;case 3:this.r=l,this.g=u;break;case 4:this.r=d,this.g=l;break;default:this.g=l,this.b=u;break}}fromHsvString(e){let t=Ps(e,Fs);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){let t=Ps(e,Fs);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){let t=Ps(e,(e,t)=>t.includes(`%`)?Q(e/100*255):e);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}},Rs=2,zs=.16,Bs=.05,Vs=.05,Hs=.15,Us=5,Ws=4,Gs=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function Ks(e,t,n){let r;return r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-Rs*t:Math.round(e.h)+Rs*t:n?Math.round(e.h)+Rs*t:Math.round(e.h)-Rs*t,r<0?r+=360:r>=360&&(r-=360),r}function qs(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return r=n?e.s-zs*t:t===Ws?e.s+zs:e.s+Bs*t,r>1&&(r=1),n&&t===Us&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function Js(e,t,n){let r;return r=n?e.v+Vs*t:e.v-Hs*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Ys(e,t={}){let n=[],r=new Ls(e),i=r.toHsv();for(let e=Us;e>0;--e){let t=new Ls({h:Ks(i,e,!0),s:qs(i,e,!0),v:Js(i,e,!0)});n.push(t)}n.push(r);for(let e=1;e<=Ws;e+=1){let t=new Ls({h:Ks(i,e),s:qs(i,e),v:Js(i,e)});n.push(t)}return t.theme===`dark`?Gs.map(({index:e,amount:r})=>new Ls(t.backgroundColor||`#141414`).mix(n[e],r).toHexString()):n.map(e=>e.toHexString())}var Xs=[`#fff1f0`,`#ffccc7`,`#ffa39e`,`#ff7875`,`#ff4d4f`,`#f5222d`,`#cf1322`,`#a8071a`,`#820014`,`#5c0011`];Xs.primary=Xs[5];var Zs=[`#fff2e8`,`#ffd8bf`,`#ffbb96`,`#ff9c6e`,`#ff7a45`,`#fa541c`,`#d4380d`,`#ad2102`,`#871400`,`#610b00`];Zs.primary=Zs[5];var Qs=[`#fff7e6`,`#ffe7ba`,`#ffd591`,`#ffc069`,`#ffa940`,`#fa8c16`,`#d46b08`,`#ad4e00`,`#873800`,`#612500`];Qs.primary=Qs[5];var $s=[`#fffbe6`,`#fff1b8`,`#ffe58f`,`#ffd666`,`#ffc53d`,`#faad14`,`#d48806`,`#ad6800`,`#874d00`,`#613400`];$s.primary=$s[5];var ec=[`#feffe6`,`#ffffb8`,`#fffb8f`,`#fff566`,`#ffec3d`,`#fadb14`,`#d4b106`,`#ad8b00`,`#876800`,`#614700`];ec.primary=ec[5];var tc=[`#fcffe6`,`#f4ffb8`,`#eaff8f`,`#d3f261`,`#bae637`,`#a0d911`,`#7cb305`,`#5b8c00`,`#3f6600`,`#254000`];tc.primary=tc[5];var nc=[`#f6ffed`,`#d9f7be`,`#b7eb8f`,`#95de64`,`#73d13d`,`#52c41a`,`#389e0d`,`#237804`,`#135200`,`#092b00`];nc.primary=nc[5];var rc=[`#e6fffb`,`#b5f5ec`,`#87e8de`,`#5cdbd3`,`#36cfc9`,`#13c2c2`,`#08979c`,`#006d75`,`#00474f`,`#002329`];rc.primary=rc[5];var ic=[`#e6f4ff`,`#bae0ff`,`#91caff`,`#69b1ff`,`#4096ff`,`#1677ff`,`#0958d9`,`#003eb3`,`#002c8c`,`#001d66`];ic.primary=ic[5];var ac=[`#f0f5ff`,`#d6e4ff`,`#adc6ff`,`#85a5ff`,`#597ef7`,`#2f54eb`,`#1d39c4`,`#10239e`,`#061178`,`#030852`];ac.primary=ac[5];var oc=[`#f9f0ff`,`#efdbff`,`#d3adf7`,`#b37feb`,`#9254de`,`#722ed1`,`#531dab`,`#391085`,`#22075e`,`#120338`];oc.primary=oc[5];var sc=[`#fff0f6`,`#ffd6e7`,`#ffadd2`,`#ff85c0`,`#f759ab`,`#eb2f96`,`#c41d7f`,`#9e1068`,`#780650`,`#520339`];sc.primary=sc[5];var cc=[`#a6a6a6`,`#999999`,`#8c8c8c`,`#808080`,`#737373`,`#666666`,`#404040`,`#1a1a1a`,`#000000`,`#000000`];cc.primary=cc[5];var lc=[`#2a1215`,`#431418`,`#58181c`,`#791a1f`,`#a61d24`,`#d32029`,`#e84749`,`#f37370`,`#f89f9a`,`#fac8c3`];lc.primary=lc[5];var uc=[`#2b1611`,`#441d12`,`#592716`,`#7c3118`,`#aa3e19`,`#d84a1b`,`#e87040`,`#f3956a`,`#f8b692`,`#fad4bc`];uc.primary=uc[5];var dc=[`#2b1d11`,`#442a11`,`#593815`,`#7c4a15`,`#aa6215`,`#d87a16`,`#e89a3c`,`#f3b765`,`#f8cf8d`,`#fae3b7`];dc.primary=dc[5];var fc=[`#2b2111`,`#443111`,`#594214`,`#7c5914`,`#aa7714`,`#d89614`,`#e8b339`,`#f3cc62`,`#f8df8b`,`#faedb5`];fc.primary=fc[5];var pc=[`#2b2611`,`#443b11`,`#595014`,`#7c6e14`,`#aa9514`,`#d8bd14`,`#e8d639`,`#f3ea62`,`#f8f48b`,`#fafab5`];pc.primary=pc[5];var mc=[`#1f2611`,`#2e3c10`,`#3e4f13`,`#536d13`,`#6f9412`,`#8bbb11`,`#a9d134`,`#c9e75d`,`#e4f88b`,`#f0fab5`];mc.primary=mc[5];var hc=[`#162312`,`#1d3712`,`#274916`,`#306317`,`#3c8618`,`#49aa19`,`#6abe39`,`#8fd460`,`#b2e58b`,`#d5f2bb`];hc.primary=hc[5];var gc=[`#112123`,`#113536`,`#144848`,`#146262`,`#138585`,`#13a8a8`,`#33bcb7`,`#58d1c9`,`#84e2d8`,`#b2f1e8`];gc.primary=gc[5];var _c=[`#111a2c`,`#112545`,`#15325b`,`#15417e`,`#1554ad`,`#1668dc`,`#3c89e8`,`#65a9f3`,`#8dc5f8`,`#b7dcfa`];_c.primary=_c[5];var vc=[`#131629`,`#161d40`,`#1c2755`,`#203175`,`#263ea0`,`#2b4acb`,`#5273e0`,`#7f9ef3`,`#a8c1f8`,`#d2e0fa`];vc.primary=vc[5];var yc=[`#1a1325`,`#24163a`,`#301c4d`,`#3e2069`,`#51258f`,`#642ab5`,`#854eca`,`#ab7ae0`,`#cda8f0`,`#ebd7fa`];yc.primary=yc[5];var bc=[`#291321`,`#40162f`,`#551c3b`,`#75204f`,`#a02669`,`#cb2b83`,`#e0529c`,`#f37fb7`,`#f8a8cc`,`#fad2e3`];bc.primary=bc[5];var xc=[`#151515`,`#1f1f1f`,`#2d2d2d`,`#393939`,`#494949`,`#5a5a5a`,`#6a6a6a`,`#7b7b7b`,`#888888`,`#969696`];xc.primary=xc[5];function Sc(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function Cc(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}var wc=`data-rc-order`,Tc=`data-rc-priority`,Ec=`rc-util-key`,Dc=new Map;function Oc({mark:e}={}){return e?e.startsWith(`data-`)?e:`data-${e}`:Ec}function kc(e){return e.attachTo?e.attachTo:document.querySelector(`head`)||document.body}function Ac(e){return e===`queue`?`prependQueue`:e?`prepend`:`append`}function jc(e){return Array.from((Dc.get(e)||e).children).filter(e=>e.tagName===`STYLE`)}function Mc(e,t={}){if(!Sc())return null;let{csp:n,prepend:r,priority:i=0}=t,a=Ac(r),o=a===`prependQueue`,s=document.createElement(`style`);s.setAttribute(wc,a),o&&i&&s.setAttribute(Tc,`${i}`),n?.nonce&&(s.nonce=n?.nonce),s.innerHTML=e;let c=kc(t),{firstChild:l}=c;if(r){if(o){let e=(t.styles||jc(c)).filter(e=>[`prepend`,`prependQueue`].includes(e.getAttribute(wc))?i>=Number(e.getAttribute(Tc)||0):!1);if(e.length)return c.insertBefore(s,e[e.length-1].nextSibling),s}c.insertBefore(s,l)}else c.appendChild(s);return s}function Nc(e,t={}){let{styles:n}=t;return n||=jc(kc(t)),n.find(n=>n.getAttribute(Oc(t))===e)}function Pc(e,t){let n=Dc.get(e);if(!n||!Cc(document,n)){let n=Mc(``,t),{parentNode:r}=n;Dc.set(e,r),e.removeChild(n)}}function Fc(e,t,n={}){let r=kc(n),i=jc(r),a={...n,styles:i};Pc(r,a);let o=Nc(t,a);if(o)return a.csp?.nonce&&o.nonce!==a.csp?.nonce&&(o.nonce=a.csp?.nonce),o.innerHTML!==e&&(o.innerHTML=e),o;let s=Mc(e,a);return s.setAttribute(Oc(a),t),s}function Ic(e){return e?.getRootNode?.()}function Lc(e){return Ic(e)instanceof ShadowRoot}function Rc(e){return Lc(e)?Ic(e):null}var zc={},Bc=[],Vc=e=>{Bc.push(e)};function Hc(e,t){if(process.env.NODE_ENV!==`production`&&!e&&console!==void 0){let e=Bc.reduce((e,t)=>t(e??``,`warning`),t);e&&console.error(`Warning: ${e}`)}}function Uc(e,t){if(process.env.NODE_ENV!==`production`&&!e&&console!==void 0){let e=Bc.reduce((e,t)=>t(e??``,`note`),t);e&&console.warn(`Note: ${e}`)}}function Wc(){zc={}}function Gc(e,t,n){!t&&!zc[n]&&(e(!1,n),zc[n]=!0)}function Kc(e,t){Gc(Hc,e,t)}function qc(e,t){Gc(Uc,e,t)}Kc.preMessage=Vc,Kc.resetWarned=Wc,Kc.noteOnce=qc;function Jc(e){return e.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Yc(e,t){Kc(e,`[@ant-design/icons] ${t}`)}function Xc(e){return typeof e==`object`&&typeof e.name==`string`&&typeof e.theme==`string`&&(typeof e.icon==`object`||typeof e.icon==`function`)}function Zc(e={}){return Object.keys(e).reduce((t,n)=>{let r=e[n];switch(n){case`class`:t.className=r,delete t.class;break;default:delete t[n],t[Jc(n)]=r}return t},{})}function Qc(e,t,n){return n?s.default.createElement(e.tag,{key:t,...Zc(e.attrs),...n},(e.children||[]).map((n,r)=>Qc(n,`${t}-${e.tag}-${r}`))):s.default.createElement(e.tag,{key:t,...Zc(e.attrs)},(e.children||[]).map((n,r)=>Qc(n,`${t}-${e.tag}-${r}`)))}function $c(e){return Ys(e)[0]}function el(e){return e?Array.isArray(e)?e:[e]:[]}var tl=`
11
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`lexical`),require(`katex`),require(`katex/contrib/mhchem`),require(`@lexical/html`),require(`@lexical/react/LexicalComposer`),require(`antd`),require(`react`),require(`react-redux`),require(`@reduxjs/toolkit`),require(`react/jsx-runtime`),require(`@lexical/link`),require(`@lexical/list`),require(`@lexical/table`),require(`@lexical/utils`),require(`@lexical/react/LexicalComposerContext`),require(`@lexical/react/useLexicalNodeSelection`),require(`@lexical/react/LexicalAutoFocusPlugin`),require(`@lexical/react/LexicalContentEditable`),require(`@lexical/react/LexicalErrorBoundary`),require(`@lexical/react/LexicalHistoryPlugin`),require(`@lexical/react/LexicalLinkPlugin`),require(`@lexical/react/LexicalListPlugin`),require(`@lexical/react/LexicalOnChangePlugin`),require(`@lexical/react/LexicalRichTextPlugin`),require(`@lexical/react/LexicalTablePlugin`),require(`@lexical/selection`),require(`react-dom`)):typeof define==`function`&&define.amd?define(`exports.lexical.katex.katex/contrib/mhchem.@lexical/html.@lexical/react/LexicalComposer.antd.react.react-redux.@reduxjs/toolkit.react/jsx-runtime.@lexical/link.@lexical/list.@lexical/table.@lexical/utils.@lexical/react/LexicalComposerContext.@lexical/react/useLexicalNodeSelection.@lexical/react/LexicalAutoFocusPlugin.@lexical/react/LexicalContentEditable.@lexical/react/LexicalErrorBoundary.@lexical/react/LexicalHistoryPlugin.@lexical/react/LexicalLinkPlugin.@lexical/react/LexicalListPlugin.@lexical/react/LexicalOnChangePlugin.@lexical/react/LexicalRichTextPlugin.@lexical/react/LexicalTablePlugin.@lexical/selection.react-dom`.split(`.`),t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.RJEditor={},e.Lexical,e.katex,e.katex,e.Lexical,e.Lexical,e.antd,e.React,e.ReactRedux,e.RTK,e.jsxRuntime,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.Lexical,e.ReactDOM))})(this,function(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var O=Object.create,k=Object.defineProperty,A=Object.getOwnPropertyDescriptor,ee=Object.getOwnPropertyNames,te=Object.getPrototypeOf,ne=Object.prototype.hasOwnProperty,j=(e,t)=>()=>(e&&(t=e(e=0)),t),M=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),re=(e,t)=>{let n={};for(var r in e)k(n,r,{get:e[r],enumerable:!0});return t||k(n,Symbol.toStringTag,{value:`Module`}),n},ie=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ee(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ne.call(e,s)&&s!==n&&k(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=A(t,s))||r.enumerable});return e},N=(e,t,n)=>(n=e==null?{}:O(te(e)),ie(t||!e||!e.__esModule?k(n,`default`,{value:e,enumerable:!0}):n,e));n=N(n,1);let P=N(s,1);s=N(s);function ae(e){return typeof e!=`string`}function oe(e,t){let[n,...r]=t.split(`>`);if(r.length>0){let t=oe(e,n);return ae(t)?oe(t,r.join(`>`)):``}switch(e.kind){case`accent`:case`bracket`:case`text`:return`value`in e&&t===`${e.kind}.value`?e.value:``;case`fraction`:return t===`fraction.denominator`?e.denominator:t===`fraction.numerator`?e.numerator:``;case`function`:return t===`function.argument`?e.argument:``;case`integral`:return t===`integral.body`?e.body:t===`integral.lower`?e.lower||``:t===`integral.upper`?e.upper||``:t===`integral.variable`?e.variable:``;case`largeOperator`:return t===`largeOperator.body`?e.body:t===`largeOperator.lower`?e.lower||``:t===`largeOperator.upper`&&e.upper||``;case`limit`:return t===`limit.body`?e.body:t===`limit.target`?e.target:``;case`matrix`:{let[,,n,r]=t.split(`.`),i=Number(n),a=Number(r);return e.cells[i]?.[a]||``}case`operator`:return t===`operator.value`?e.value:``;case`root`:return t===`root.index`?e.index||``:t===`root.value`?e.value:``;case`row`:{let[,,n]=t.split(`.`),r=Number(n);return e.items[r]||``}case`script`:return t===`script.base`?e.base:t===`script.subscript`?e.subscript||``:t===`script.superscript`&&e.superscript||``;default:return``}}function se(e){let t=e.split(`>`),n=t.at(-1)?.match(/^row\.insert\.(\d+)$/);return n?{insertIndex:Number(n[1]),rowSlotId:t.slice(0,-1).join(`>`)}:null}function ce(e){return typeof e!=`string`}function le(e,t,n){return ce(e)?ue(e,t,n):e}function ue(e,t,n){let[r,...i]=t.split(`>`);if(i.length>0){let t=i.join(`>`);return ue(e,r,le(de(e,r),t,n))}switch(e.kind){case`accent`:return t===`accent.value`?{...e,value:n}:e;case`bracket`:return t===`bracket.value`?{...e,value:n}:e;case`fraction`:return t===`fraction.denominator`?{...e,denominator:n}:t===`fraction.numerator`?{...e,numerator:n}:e;case`function`:return t===`function.argument`?{...e,argument:n}:e;case`integral`:return t===`integral.body`?{...e,body:n}:t===`integral.lower`?{...e,lower:n}:t===`integral.upper`?{...e,upper:n}:t===`integral.variable`?{...e,variable:n}:e;case`largeOperator`:return t===`largeOperator.body`?{...e,body:n}:t===`largeOperator.lower`?{...e,lower:n}:t===`largeOperator.upper`?{...e,upper:n}:e;case`limit`:return t===`limit.body`?{...e,body:n}:t===`limit.target`?{...e,target:n}:e;case`matrix`:{let[,,r,i]=t.split(`.`),a=Number(r),o=Number(i);return Number.isNaN(a)||Number.isNaN(o)||!e.cells[a]?e:{...e,cells:e.cells.map((e,t)=>t===a?e.map((e,t)=>t===o?n:e):e)}}case`operator`:return t===`operator.value`&&typeof n==`string`?{...e,value:n}:e;case`row`:{let[,,r]=t.split(`.`),i=Number(r);return!ce(n)||Number.isNaN(i)?e:{...e,items:e.items.map((e,t)=>t===i?n:e)}}case`root`:return t===`root.index`?{...e,index:n}:t===`root.value`?{...e,value:n}:e;case`script`:return t===`script.base`?{...e,base:n}:t===`script.subscript`?{...e,subscript:n}:t===`script.superscript`?{...e,superscript:n}:e;case`text`:return t===`text.value`&&typeof n==`string`?{...e,value:n}:e;default:return e}}function de(e,t){switch(e.kind){case`accent`:case`bracket`:case`text`:return`value`in e&&t===`${e.kind}.value`?e.value:``;case`fraction`:return t===`fraction.denominator`?e.denominator:t===`fraction.numerator`?e.numerator:``;case`function`:return t===`function.argument`?e.argument:``;case`integral`:return t===`integral.body`?e.body:t===`integral.lower`?e.lower||``:t===`integral.upper`?e.upper||``:t===`integral.variable`?e.variable:``;case`largeOperator`:return t===`largeOperator.body`?e.body:t===`largeOperator.lower`?e.lower||``:t===`largeOperator.upper`&&e.upper||``;case`limit`:return t===`limit.body`?e.body:t===`limit.target`?e.target:``;case`matrix`:{let[,,n,r]=t.split(`.`),i=Number(n),a=Number(r);return e.cells[i]?.[a]||``}case`operator`:return t===`operator.value`?e.value:``;case`root`:return t===`root.index`?e.index||``:t===`root.value`?e.value:``;case`row`:{let[,,n]=t.split(`.`),r=Number(n);return e.items[r]||``}case`script`:return t===`script.base`?e.base:t===`script.subscript`?e.subscript||``:t===`script.superscript`&&e.superscript||``;default:return``}}function fe(e){return{kind:`text`,value:e}}function pe(e,t,n){if(typeof e==`string`){let r=Math.max(0,Math.min(n?.start??e.length,e.length)),i=Math.max(r,Math.min(n?.end??r,e.length));return`${e.slice(0,r)}${t}${e.slice(i)}`}if(e.kind===`row`){let n=e.items.at(-1);return n?.kind===`text`&&typeof n.value==`string`?{...e,items:[...e.items.slice(0,-1),{...n,value:`${n.value}${t}`}]}:{...e,items:[...e.items,fe(t)]}}return{items:[e,fe(t)],kind:`row`}}function me(e,t,n,r){let i=se(t);if(i){let t=i.rowSlotId?oe(e,i.rowSlotId):e;if(typeof t!=`string`&&t.kind===`row`){let r=Math.max(0,Math.min(i.insertIndex,t.items.length)),a=fe(n),o={...t,items:[...t.items.slice(0,r),a,...t.items.slice(r)]};return{activeSlotId:[i.rowSlotId,`row.items.${r}>text.value`].filter(Boolean).join(`>`),model:i.rowSlotId?ue(e,i.rowSlotId,o):o,selection:{end:n.length,start:n.length}}}}let a=oe(e,t),o=typeof a==`string`?Math.max(0,Math.min(r?.start??a.length,a.length)):n.length;return{activeSlotId:t,model:ue(e,t,pe(a,n,r)),selection:{end:o+n.length,start:o+n.length}}}function he(e,t,n){return typeof t==`number`&&e<t?t:typeof n==`number`&&e>n?n:e}async function ge(e){if(typeof navigator<`u`&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}if(typeof document>`u`)return;let t=document.createElement(`textarea`);t.setAttribute(`aria-hidden`,`true`),t.style.position=`fixed`,t.style.opacity=`0`,t.value=e,document.body.append(t),t.select(),document.execCommand(`copy`),t.remove()}function _e(e){return Array.from(e.replace(/\n/g,``)).length}function ve(e){let t=e.replace(/\u00a0/g,` `).trim();return t?t.split(/\s+/).length:0}var ye=`rj-equation-model:`;function be(e){return e.startsWith(ye)}function xe(e){if(!be(e))return null;try{return JSON.parse(decodeURIComponent(e.slice(ye.length)))}catch{return null}}function Se(e){return`${ye}${encodeURIComponent(JSON.stringify(e))}`}var Ce={"&":`&amp;`,'"':`&quot;`,"'":`&#39;`,"<":`&lt;`,">":`&gt;`};function we(e){return e.replace(/[&"'<>]/g,e=>Ce[e])}function Te(e,t){if(!t||e===``)return e;let n=e.endsWith(`.`),[r,i]=e.split(`.`),a=r.replace(/\B(?=(\d{3})+(?!\d))/g,` `);return typeof i==`string`?`${a}.${i}`:n?`${a}.`:a}function Ee(){return typeof navigator>`u`?!1:/Mac|iPhone|iPad|iPod/i.test(navigator.platform)}function F(e,t){return`${e.replace(/\bMOD\b/g,Ee()?`CMD`:`CTRL`)} | ${t}`}function I(e){switch(e.kind){case`accent`:case`bracket`:case`text`:return`${e.kind}.value`;case`fraction`:return`fraction.numerator`;case`function`:return`function.argument`;case`integral`:return e.upper===void 0?e.lower===void 0?`integral.body`:`integral.lower`:`integral.upper`;case`largeOperator`:return`largeOperator.upper`;case`limit`:return`limit.target`;case`matrix`:return`matrix.cells.0.0`;case`operator`:return`operator.value`;case`row`:return e.items[0]?`row.items.0>${I(e.items[0])}`:``;case`root`:return e.index===void 0?`root.value`:`root.index`;case`script`:return e.position===`before`?e.superscript===void 0?`script.subscript`:`script.superscript`:`script.base`;default:return``}}var De=/^[a-zA-Z0-9_-]{11}$/;function Oe(e){let t=e.trim();if(De.test(t))return t;try{let e=new URL(t),n=e.hostname.replace(/^www\./,``);if(n===`youtu.be`){let t=e.pathname.split(`/`).filter(Boolean)[0];return t&&De.test(t)?t:null}if(n===`youtube.com`||n===`m.youtube.com`||n===`youtube-nocookie.com`){let t=e.searchParams.get(`v`);if(t&&De.test(t))return t;let[,n,r]=e.pathname.split(`/`);if([`embed`,`live`,`shorts`].includes(n)&&r&&De.test(r))return r}}catch{return null}return null}function ke(e){return{kind:`text`,value:e}}function Ae(e,t,n){if(typeof e==`string`){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);return{items:[a?ke(a):null,t,o?ke(o):null].filter(Boolean),kind:`row`}}if(e.kind===`row`){let n=e.items.at(-1),r=n?.kind===`text`&&typeof n.value==`string`&&!n.value.trim();return{...e,items:r?[...e.items.slice(0,-1),t]:[...e.items,t]}}return{items:[e,t],kind:`row`}}function je(e,t){if(!t)return e.kind===`row`?e:null;let n=oe(e,t);return typeof n!=`string`&&n.kind===`row`?n:null}function Me(e){let t=e.split(`>`);return t.at(-1)===`text.value`?t.slice(0,-1).join(`>`):null}function Ne(e,t){return e?`${e}>${t}`:t}function Pe(e,t,n,r){if(typeof t==`string`&&!t.trim())return Ne(e,`row.items.0>${I(n)}`);if(typeof t==`string`)return Ne(e,`row.items.${r?.start&&r.start>0?1:0}>${I(n)}`);if(typeof t!=`string`&&t.kind===`row`){let r=t.items.at(-1);return Ne(e,`row.items.${r?.kind===`text`&&typeof r.value==`string`&&!r.value.trim()?t.items.length-1:t.items.length}>${I(n)}`)}return Ne(e,`row.items.1>${I(n)}`)}function Fe(e,t,n,r){let i=se(t);if(i){let t=je(e,i.rowSlotId);if(!t)return{activeSlotId:I(n),model:e};let r=Math.max(0,Math.min(i.insertIndex,t.items.length)),a={...t,items:[...t.items.slice(0,r),n,...t.items.slice(r)]};return{activeSlotId:Ne(i.rowSlotId,`row.items.${r}>${I(n)}`),model:i.rowSlotId?ue(e,i.rowSlotId,a):a}}let a=Me(t),o=oe(e,t),s=Ae(o,n,r);return a===null?{activeSlotId:Pe(t,o,n,r),model:ue(e,t,s)}:{activeSlotId:Pe(a,o,n,r),model:a?ue(e,a,s):s}}function Ie(e,t,n){let r=e.replace(/,/g,`.`).replace(/\s/g,``),i=``,a=!1,o=0;for(let e of r){if(/\d/.test(e)){if(a){if(o>=t)continue;o+=1}i+=e;continue}!n&&e===`.`&&!a&&(a=!0,i+=e)}return i}var Le=[`#FFFFFF`,`#FEF3C7`,`#DBEAFE`,`#DCFCE7`,`#FCE7F3`,`#EDE9FE`,`#E5E7EB`],Re=`rj-editor-equation-insert`,ze=[`Arial`,`Georgia`,`Inter`,`Times New Roman`,`Trebuchet MS`,`Verdana`],Be=[`0.5rem`,`0.5625rem`,`0.6875rem`,`0.75rem`,`0.875rem`,`1rem`,`1.125rem`,`1.25rem`,`1.5rem`,`2rem`,`3rem`,`4.5rem`],L={alignment:``,backgroundColor:``,canRedo:!1,canUndo:!1,fontFamily:void 0,fontSize:void 0,isEquationSelected:!1,isBold:!1,isCode:!1,isImageSelected:!1,isItalic:!1,isStrikethrough:!1,isSubscript:!1,isSuperscript:!1,isUnderline:!1,isInTable:!1,lineHeight:void 0,listType:void 0,selectedImageAlignment:void 0,selectedImageAltText:void 0,selectedImageAspectRatioLocked:void 0,selectedImageBorderEnabled:void 0,selectedImageBorderRadius:void 0,selectedImageCaption:void 0,selectedImageHeight:void 0,selectedImageKey:void 0,selectedImageLinkUrl:void 0,selectedImageObjectFit:void 0,selectedImageRotation:void 0,selectedImageShadowEnabled:void 0,selectedImageTextWrap:void 0,selectedImageWidth:void 0,selectedEquation:void 0,selectedEquationDisplayMode:void 0,selectedEquationKey:void 0,selectedTableCellsCount:0,tableCellBackgroundColor:``,tableCellVerticalAlign:void 0,tableHasMergedCell:!1,textColor:``},Ve=(0,t.createCommand)(`INSERT_CODE_BLOCK_COMMAND`),He=(0,t.createCommand)(`INSERT_EQUATION_COMMAND`),Ue=(0,t.createCommand)(`INSERT_IMAGE_COMMAND`),We=(0,t.createCommand)(`INSERT_YOUTUBE_COMMAND`),Ge=[`1`,`1.15`,`1.5`,`2`,`2.5`,`3`],Ke=`rj-editor:open-link-modal`,qe=[`#111827`,`#dc2626`,`#2563eb`,`#059669`,`#9333ea`,`#ca8a04`];function Je(e){return e.trim().replace(/^['"]|['"]$/g,``).toLowerCase()}function Ye(e){if(!e)return;let t=e.split(`,`).map(Je);return ze.find(e=>t.includes(Je(e)))}function Xe(e){return e.trim().toLowerCase()}function Ze(e){if(!e)return;let t=Xe(e);return Be.find(e=>Xe(e)===t)}var Qe=16;function R(e){let t=e/Qe;return`${Number(t.toFixed(6))}rem`}var $e={border:`0.0625rem solid #cbd5e1`,borderCollapse:`separate`,borderRadius:`0.75rem`,borderSpacing:`0`,overflow:`hidden`,tableLayout:`fixed`,width:`100%`},et={border:`0`,borderBottom:`0.0625rem solid #cbd5e1`,borderRight:`0.0625rem solid #cbd5e1`,boxSizing:`border-box`,height:`2rem`,minWidth:`5rem`,padding:`0.5rem 0.625rem`,verticalAlign:`top`},tt={margin:`0.75rem 0`,maxWidth:`100%`,overflowX:`auto`},nt=`rgb(242, 243, 245)`,rt=`rgb(148 163 184 / 0.42)`,it=`rgb(148 163 184 / 0.16)`,at=`rgb(122 167 247 / 0.18)`,ot=new Set([nt,`rgb(241, 245, 249)`,`rgb(37, 37, 37)`]),st=`[data-rj-editor-content="true"]`,ct=`pre.rj-editor-code-block`,lt=`data-rj-code-title`,ut=`data-rj-code-custom-title`,dt=`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace`,ft=`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;`,pt={background:`#0b0c0e`,border:`0.0625rem solid #34363a`,borderRadius:`0.5rem`,margin:`0.75rem 0`,maxWidth:`100%`,overflow:`hidden`},mt={alignItems:`center`,background:`#111214`,borderBottom:`0.0625rem solid #34363a`,color:`#a1a1aa`,display:`flex`,fontFamily:dt,fontSize:`0.75rem`,height:`2.625rem`,justifyContent:`space-between`,padding:`0 0.5rem 0 0.875rem`},ht={alignItems:`center`,background:`transparent`,border:`0.0625rem solid transparent`,borderRadius:`0.375rem`,color:`#a1a1aa`,cursor:`pointer`,display:`inline-flex`,height:`1.75rem`,justifyContent:`center`,padding:`0`,width:`1.75rem`},gt={background:`#0b0c0e`,border:`0`,borderRadius:`0`,color:`#ededed`,display:`block`,fontFamily:dt,fontSize:`0.8125rem`,lineHeight:`1.65`,margin:`0`,minHeight:`4.375rem`,outline:`none`,overflow:`auto`,padding:`1rem`,scrollbarColor:`#34363a transparent`,scrollbarWidth:`thin`,tabSize:`2`,whiteSpace:`pre`},_t={height:`1rem`,width:`1rem`},vt={margin:`0 0 0.75rem`},yt={lineHeight:`1.25rem`,margin:`0`,minHeight:`1.25rem`},bt={"rj-editor-list-ol":{margin:`0 0 0.75rem 1.5rem`,padding:`0`},"rj-editor-list-ul":{margin:`0 0 0.75rem 1.5rem`,padding:`0`}},xt={margin:`0.25rem 0`},St={border:`0`,borderTop:`0.0625rem solid #d9dde5`,margin:`1rem 0`},Ct={"rj-editor-text-bold":{fontWeight:`700`},"rj-editor-text-italic":{fontStyle:`italic`},"rj-editor-text-subscript":{fontSize:`0.75em`,verticalAlign:`sub`},"rj-editor-text-superscript":{fontSize:`0.75em`,verticalAlign:`super`}},wt={background:`#2a2828`,border:`0.0625rem solid rgb(255 255 255 / 14%)`,borderRadius:`0.375rem`,color:`#ededed`,fontFamily:dt,fontSize:`0.92em`,lineHeight:`1.35`,padding:`0.125rem 0.375rem`,whiteSpace:`pre-wrap`},Tt={"rj-editor-code-token-comment":{color:`#7f848e`},"rj-editor-code-token-atrule":{color:`#c678dd`},"rj-editor-code-token-keyword":{color:`#c678dd`},"rj-editor-code-token-namespace":{color:`#c678dd`},"rj-editor-code-token-important":{color:`#c678dd`},"rj-editor-code-token-attr":{color:`#98c379`},"rj-editor-code-token-char":{color:`#98c379`},"rj-editor-code-token-inserted":{color:`#98c379`},"rj-editor-code-token-regex":{color:`#98c379`},"rj-editor-code-token-selector":{color:`#98c379`},"rj-editor-code-token-string":{color:`#98c379`},"rj-editor-code-token-boolean":{color:`#d19a66`},"rj-editor-code-token-constant":{color:`#d19a66`},"rj-editor-code-token-number":{color:`#d19a66`},"rj-editor-code-token-symbol":{color:`#d19a66`},"rj-editor-code-token-class":{color:`#61afef`},"rj-editor-code-token-class-name":{color:`#61afef`},"rj-editor-code-token-function":{color:`#61afef`},"rj-editor-code-token-builtin":{color:`#56b6c2`},"rj-editor-code-token-entity":{color:`#56b6c2`},"rj-editor-code-token-operator":{color:`#56b6c2`},"rj-editor-code-token-property":{color:`#56b6c2`},"rj-editor-code-token-punctuation":{color:`#56b6c2`},"rj-editor-code-token-url":{color:`#56b6c2`},"rj-editor-code-token-variable":{color:`#56b6c2`},"rj-editor-code-token-deleted":{color:`#e06c75`},"rj-editor-code-token-tag":{color:`#e06c75`}},Et=`#2563eb`,Dt={color:Et,textDecoration:`underline`},Ot={"rj-editor-equation-render":{alignItems:`center`,display:`inline-flex`,fontFamily:`Georgia, 'Times New Roman', serif`,fontSize:`1.25rem`,fontStyle:`italic`,gap:`0.25rem`,justifyContent:`center`,lineHeight:`1.15`,maxWidth:`100%`,minWidth:`0`,verticalAlign:`middle`},"rj-editor-equation-render-slot":{display:`inline-block`,maxWidth:`8.75rem`,minWidth:`0.625rem`,overflow:`hidden`,textAlign:`center`,textOverflow:`ellipsis`},"rj-editor-equation-render--fraction":{alignItems:`center`,display:`inline-grid`,gap:`0.125rem`,justifyItems:`center`,minWidth:`0`},"rj-editor-equation-render-line":{background:`#111827`,display:`block`,height:`0.125rem`,width:`100%`},"rj-editor-equation-render--fraction-inline":{alignItems:`center`,display:`inline-flex`,flexWrap:`nowrap`,gap:`0.125rem`,minWidth:`0`},"rj-editor-equation-render--row":{alignItems:`center`,display:`inline-flex`,flexWrap:`nowrap`,gap:`0.125rem`,minWidth:`0`},"rj-editor-equation-render--script":{alignItems:`center`,gap:`0.125rem`,verticalAlign:`middle`},"rj-editor-equation-render-script-stack":{alignItems:`center`,display:`inline-grid`,fontSize:`0.68em`,gap:`0.0625rem`,justifyItems:`center`,lineHeight:`1`},"rj-editor-equation-render--root":{alignItems:`flex-start`,gap:`0`},"rj-editor-equation-render-root-symbol":{fontSize:`1.875rem`,fontStyle:`normal`,lineHeight:`1`},"rj-editor-equation-render-radicand":{borderTop:`0.125rem solid #111827`,display:`inline-flex`,marginTop:`0.125rem`,padding:`0.125rem 0.25rem 0`},"rj-editor-equation-render-root-index":{alignSelf:`flex-start`,fontSize:`0.62em`,marginRight:`-0.125rem`},"rj-editor-equation-render-limits":{alignItems:`center`,display:`inline-grid`,gap:`0.0625rem`,justifyItems:`center`,lineHeight:`1`},"rj-editor-equation-render-large-symbol":{fontSize:`2.125rem`,fontStyle:`normal`,lineHeight:`0.9`},"rj-editor-equation-render-bracket":{fontSize:`2.125rem`,fontStyle:`normal`,lineHeight:`1`},"rj-editor-equation-render-matrix-bracket":{fontSize:`2.125rem`,fontStyle:`normal`,lineHeight:`1`},"rj-editor-equation-render--accent":{display:`inline-grid`,gap:`0`,justifyItems:`center`},"rj-editor-equation-render-accent-mark":{fontSize:`1.125rem`,lineHeight:`0.7`},"rj-editor-equation-render-matrix-grid":{display:`inline-grid`,gap:`0.25rem 0.5rem`}},kt={"--rj-editor-bg":`#ffffff`,"--rj-editor-border":`#d9dde5`,"--rj-editor-code-bg":`#0b0c0e`,"--rj-editor-code-border":`#34363a`,"--rj-editor-code-comment":`#7f848e`,"--rj-editor-code-function":`#61afef`,"--rj-editor-code-header-bg":`#111214`,"--rj-editor-code-keyword":`#c678dd`,"--rj-editor-code-muted":`#a1a1aa`,"--rj-editor-code-number":`#d19a66`,"--rj-editor-code-operator":`#56b6c2`,"--rj-editor-code-string":`#98c379`,"--rj-editor-code-tag":`#e06c75`,"--rj-editor-code-text":`#ededed`,"--rj-editor-focus-border":`#7aa7f7`,"--rj-editor-image-border":`#94a3b8`,"--rj-editor-image-shadow":`0 0.875rem 2rem rgb(15 23 42 / 18%)`,"--rj-editor-inline-code-bg":`#2a2828`,"--rj-editor-inline-code-border":`rgb(255 255 255 / 14%)`,"--rj-editor-inline-code-text":`#ededed`,"--rj-editor-link":Et,"--rj-editor-muted-text":`#64748b`,"--rj-editor-table-border":rt,"--rj-editor-table-header-bg":it,"--rj-editor-table-selected-bg":at,"--rj-editor-text":`#111827`,"--rj-editor-toolbar-bg":`#f8fafc`,"--rj-editor-toolbar-button-active-bg":`#eaf2ff`};function At(){return{border:rt,headerBg:it,selectedBg:at}}function jt(e){let t=`http://www.w3.org/2000/svg`,n=e.createElementNS(t,`svg`),r=e.createElementNS(t,`path`);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),z(n,_t),n}function Mt(e){e.querySelectorAll(ct).forEach(t=>{if(!(t instanceof HTMLElement)||t.closest(`[data-rj-editor-code-block="true"]`))return;let n=e.createElement(`div`),r=e.createElement(`div`),i=e.createElement(`span`),a=e.createElement(`button`);n.className=`rj-editor-code-block-export`,n.setAttribute(`data-rj-editor-code-block`,`true`),z(n,pt),r.className=`rj-editor-code-block-export-header`,z(r,mt),i.className=`rj-editor-code-block-export-language`,i.textContent=`>_ ${t.getAttribute(lt)||t.getAttribute(ut)||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`,ft),a.setAttribute(`title`,`Copy code`),a.setAttribute(`type`,`button`),z(a,ht),a.append(jt(e)),t.classList.add(`rj-editor-code-block--exported`),t.setAttribute(`data-rj-editor-code-content`,`true`),z(t,gt),t.replaceWith(n),r.append(i,a),n.append(r,t)})}function Nt(e){e.querySelectorAll(`.rj-editor-paragraph`).forEach(e=>{if(!(e instanceof HTMLElement))return;let t=!!e.closest(`td, th`);z(e,t?yt:vt),!t&&!e.nextElementSibling&&(e.style.marginBottom=`0`),B(e,`rj-editor-paragraph`)}),e.querySelectorAll(`a`).forEach(e=>{e instanceof HTMLElement&&Wt(e,Dt)}),e.querySelectorAll(`hr`).forEach(e=>{e instanceof HTMLElement&&z(e,St)})}function Pt(e){Object.entries(Ct).forEach(([t,n])=>{e.querySelectorAll(`.${t}`).forEach(e=>{e instanceof HTMLElement&&(z(e,n),B(e,t))})}),e.querySelectorAll(`.rj-editor-text-underline, .rj-editor-text-strikethrough`).forEach(e=>{if(!(e instanceof HTMLElement))return;let t=new Set((e.style.textDecorationLine||``).split(/\s+/).filter(Boolean));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(` `),B(e,`rj-editor-text-underline`),B(e,`rj-editor-text-strikethrough`)})}function Ft(e){Object.entries(bt).forEach(([t,n])=>{e.querySelectorAll(`.${t}`).forEach(e=>{e instanceof HTMLElement&&(z(e,n),B(e,t))})}),e.querySelectorAll(`.rj-editor-list-item`).forEach(e=>{e instanceof HTMLElement&&(z(e,xt),B(e,`rj-editor-list-item`))})}function It(e){let t=At();e.querySelectorAll(`.rj-editor-table-scrollable-wrapper`).forEach(e=>{e instanceof HTMLElement&&(z(e,tt),B(e,`rj-editor-table-scrollable-wrapper`))}),e.querySelectorAll(`table`).forEach(e=>{e.classList.add(`rj-editor-table`),z(e,$e),e.style.border=`0.0625rem solid ${t.border}`,B(e,`rj-editor-table`)}),e.querySelectorAll(`table`).forEach(e=>{let n=Array.from(e.rows);n.forEach((e,r)=>{let i=Array.from(e.cells);i.forEach((e,a)=>{let o=e.tagName.toLowerCase()===`th`,s=o?`rj-editor-table-cell-header`:`rj-editor-table-cell`,c=!e.style.backgroundColor||ot.has(e.style.backgroundColor);e.classList.add(s),z(e,et),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`,B(e,`rj-editor-table-cell-selected`)),B(e,s)}),B(e,`rj-editor-table-row`)})}),e.querySelectorAll(`.rj-editor-table-selection`).forEach(e=>{e.remove()})}function Lt(e){e.querySelectorAll(`.rj-editor-equation-render--script.has-superscript:not(.has-subscript) .rj-editor-equation-render-script-stack`).forEach(e=>{e instanceof HTMLElement&&(e.style.transform=`translateY(-0.4375rem)`)}),e.querySelectorAll(`.rj-editor-equation-render--script.has-subscript:not(.has-superscript) .rj-editor-equation-render-script-stack`).forEach(e=>{e instanceof HTMLElement&&(e.style.transform=`translateY(0.4375rem)`)}),e.querySelectorAll(`.rj-editor-equation-render--script.has-superscript.has-subscript .rj-editor-equation-render-script-stack`).forEach(e=>{e instanceof HTMLElement&&(e.style.transform=`translateY(-0.0625rem)`)}),e.querySelectorAll(`.rj-editor-equation-render-limits`).forEach(e=>{if(!(e instanceof HTMLElement))return;let t=e.firstElementChild,n=e.lastElementChild;t instanceof HTMLElement&&(t.style.fontSize=`0.62em`),n instanceof HTMLElement&&(n.style.fontSize=`0.62em`)}),e.querySelectorAll(`.rj-editor-equation-render-matrix-grid > span`).forEach(e=>{e instanceof HTMLElement&&(e.style.minWidth=`1.5rem`,e.style.textAlign=`center`)}),Object.entries(Ot).forEach(([t,n])=>{e.querySelectorAll(`.${t}`).forEach(e=>{e instanceof HTMLElement&&(z(e,n),B(e,t))})}),e.querySelectorAll(`.has-superscript, .has-subscript`).forEach(e=>{e instanceof HTMLElement&&(B(e,`has-superscript`),B(e,`has-subscript`))}),e.querySelectorAll(`[class]`).forEach(e=>{e instanceof HTMLElement&&Array.from(e.classList).filter(e=>e.startsWith(`rj-editor-equation-render`)).forEach(t=>B(e,t))})}function Rt(e){e.querySelectorAll(`code`).forEach(e=>{if(!(e instanceof HTMLElement)||e.closest(ct)||e.matches(ct))return;let t=e.style.background||e.style.backgroundColor;Wt(e,wt),Bt(e),Vt(e),t&&!e.style.background&&(e.style.background=t),e.querySelectorAll(`span`).forEach(t=>{t instanceof HTMLElement&&(Ht(e,t)||zt(t)&&t.replaceWith(...Array.from(t.childNodes)))})}),e.querySelectorAll(`.rj-editor-text-code`).forEach(e=>{e instanceof HTMLElement&&(e.closest(ct)||(e.closest(`code`)||z(e,wt),e.classList.remove(`rj-editor-text-code`),e.className||e.removeAttribute(`class`)))}),Object.entries(Tt).forEach(([t,n])=>{e.querySelectorAll(`.${t}`).forEach(e=>{e instanceof HTMLElement&&(z(e,n),e.classList.remove(t),e.className||e.removeAttribute(`class`))})})}function zt(e){return Array.from(e.attributes).every(e=>[`class`,`style`,`data-lexical-text`].includes(e.name))}function Bt(e){let t=Array.from(e.querySelectorAll(`*`)).find(t=>!Ht(e,t)&&(t.style.backgroundColor||t.style.color));t&&(t.style.backgroundColor&&(e.style.background=t.style.backgroundColor),t.style.color&&(e.style.color=t.style.color))}function Vt(e){(e.closest(`a`)||e.querySelector(`a`))&&((!e.style.color||Ut(e.style.color))&&(e.style.color=Et),e.querySelectorAll(`a`).forEach(e=>{e instanceof HTMLElement&&(e.style.color=Et)}))}function Ht(e,t){let n=t.closest(`a`);return!!n&&!n.contains(e)}function Ut(e){let t=e.replace(/\s+/g,``).toLowerCase();return t===`#ededed`||t===`rgb(237,237,237)`}function z(e,t){Object.entries(t).forEach(([t,n])=>{typeof n==`string`&&e.style.setProperty(t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),n)})}function Wt(e,t){Object.entries(t).forEach(([t,n])=>{if(typeof n!=`string`)return;let r=t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),i=r===`background`&&`backgroundColor`in e.style&&!!e.style.backgroundColor;!e.style.getPropertyValue(r)&&!i&&e.style.setProperty(r,n)})}function B(e,t){e.classList.remove(t),e.className||e.removeAttribute(`class`)}function Gt(e,t){let n=At();return e===`--rj-editor-table-border`?n.border:e===`--rj-editor-table-header-bg`?n.headerBg:e===`--rj-editor-table-selected-bg`?n.selectedBg:kt[e]||t.trim()}function Kt(e){let t=e.indexOf(`,`);return t===-1?{fallback:``,name:e.trim()}:{fallback:e.slice(t+1).trim(),name:e.slice(0,t).trim()}}function qt(e){let t=``,n=0;for(;n<e.length;){let r=e.indexOf(`var(`,n);if(r===-1){t+=e.slice(n);break}t+=e.slice(n,r);let i=1,a=r+4;for(;a<e.length;a+=1){let t=e[a];if(t===`(`&&(i+=1),t===`)`&&--i,i===0)break}if(i!==0){t+=e.slice(r);break}let{fallback:o,name:s}=Kt(e.slice(r+4,a));t+=Gt(s,o),n=a+1}return t}function Jt(e){e.querySelectorAll(`[style]`).forEach(e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&Array.from(e.style).forEach(t=>{let n=e.style.getPropertyValue(t);n.includes(`var(`)&&e.style.setProperty(t,qt(n))})})}function Yt(e,t,n){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`)}function Xt(e,t){let n=e.createElement(`span`);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}function Zt(e,t,n){let r=n?.trim();if(!r)return t;let i=e.createElement(`a`);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}function Qt(e){return Array.from(e.querySelectorAll(`img[data-text-wrap="square"], [data-rj-image-caption-wrapper="true"], [data-rj-image-rotation-wrapper="true"]`)).some(e=>{let t=e;return t.style.float===`left`||t.style.float===`right`})}function $t(e){if(!Qt(e)||e.body.children.length===1&&e.body.firstElementChild?.matches(st))return;let t=e.createElement(`div`);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)}function en(e,t){let n=t.getAttribute(`data-caption`)?.trim();if(!n)return!1;let r=t.getAttribute(`data-alignment`),i=t.getAttribute(`data-text-wrap`),a=e.createElement(`span`);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`,Yt(a,r,i),t.style.float=``,t.style.margin=`0`,t.style.width=`100%`,t.replaceWith(a),a.append(Zt(e,t,t.getAttribute(`data-link-url`)),Xt(e,n)),!0}function tn(e){return(Number(e||0)%360+360)%360}function nn(e,t,n){let r=t.getAttribute(`data-rj-image-node-key`),i=tn(t.getAttribute(`data-rotation`));if(!r||i!==90&&i!==270)return!1;let a=(n?.getElementByKey(r))?.querySelector(`.rj-editor-image-rotator`);if(!(a instanceof HTMLElement))return!1;let o=a.getBoundingClientRect(),s=a.offsetWidth,c=a.offsetHeight;if(!o.width||!o.height||!s||!c)return!1;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`);return m.setAttribute(`data-rj-image-rotation-wrapper`,`true`),m.style.display=`block`,m.style.height=R(Math.ceil(o.height)),m.style.maxWidth=`100%`,m.style.position=`relative`,m.style.width=R(Math.ceil(o.width)),Yt(m,l,f),p.style.display=`block`,p.style.height=R(Math.ceil(o.height)),p.style.position=`relative`,p.style.width=R(Math.ceil(o.width)),t.style.display=`block`,t.style.float=``,t.style.height=R(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=R(s),t.replaceWith(m),p.append(Zt(e,t,d)),m.append(p),u&&m.append(Xt(e,u)),!0}function rn(e,t){if(!e.trim()||typeof DOMParser>`u`)return e;let n=new DOMParser().parseFromString(e,`text/html`);return It(n),n.querySelectorAll(`img[data-alignment]`).forEach(e=>{let r=e,i=r.getAttribute(`data-alignment`),a=r.getAttribute(`data-text-wrap`);nn(n,r,t)||(r.style.display=`block`,r.style.maxWidth=`100%`,Yt(r,i,a),en(n,r)||Zt(n,r,r.getAttribute(`data-link-url`)))}),Nt(n),Pt(n),Ft(n),Lt(n),Rt(n),Mt(n),$t(n),Jt(n),n.body.innerHTML}function an(e,t){return typeof e!=`number`||Number.isNaN(e)?``:Te(String(e),t)}var on=1200,sn=700;function cn(){return document.fullscreenElement?new Promise(e=>{let t=()=>{window.clearTimeout(n),document.removeEventListener(`fullscreenchange`,t),e()},n=window.setTimeout(t,on);document.addEventListener(`fullscreenchange`,t,{once:!0})}):Promise.resolve()}function ln(){return new Promise(e=>{window.setTimeout(e,sn)})}async function un(e){if(e){if(document.fullscreenElement)try{let e=cn();await document.exitFullscreen(),await e,await ln()}catch{}e.ownerDocument.defaultView?.focus(),e.click()}}function dn(e){return new Promise((t,n)=>{let r=new FileReader;r.addEventListener(`error`,()=>{n(r.error)}),r.addEventListener(`load`,()=>{if(typeof r.result==`string`){t(r.result);return}n(Error(`File could not be converted to base64.`))}),r.readAsDataURL(e)})}var fn=!1;function pn(){fn||typeof document>`u`||(fn=!0,document.addEventListener(`click`,async e=>{if(e.defaultPrevented)return;let t=e.target,n=t instanceof Element?t.closest(`[data-rj-editor-code-copy="true"]`):null;if(!(n instanceof HTMLButtonElement))return;let r=n.closest(`[data-rj-editor-code-block="true"]`)?.querySelector(`[data-rj-editor-code-content="true"], pre.rj-editor-code-block`);r instanceof HTMLElement&&(e.preventDefault(),await ge(r.textContent||``),n.classList.add(`is-copied`),n.setAttribute(`aria-label`,`Copied`),n.setAttribute(`title`,`Copied`),window.setTimeout(()=>{n.classList.remove(`is-copied`),n.setAttribute(`aria-label`,`Copy code`),n.setAttribute(`title`,`Copy code`)},1600))}))}function V(e,t=`□`){return e&&typeof e!=`string`?yn(e):`<span class="rj-editor-equation-render-slot">${we(e?.trim()||t)}</span>`}function mn(e){return e===`absolute`?[`|`,`|`]:e===`angle`?[`⟨`,`⟩`]:e===`brace`?[`{`,`}`]:e===`ceiling`?[`⌈`,`⌉`]:e===`doubleAbsolute`?[`‖`,`‖`]:e===`floor`?[`⌊`,`⌋`]:e===`square`?[`[`,`]`]:[`(`,`)`]}function hn(e){return{intersection:`⋂`,product:`∏`,summation:`∑`,union:`⋃`}[e]}function gn(e){return{contour:`∮`,double:`∫∫`,single:`∫`,triple:`∫∫∫`}[e||`single`]}function _n(e){return[`rj-editor-equation-render`,`rj-editor-equation-render--script`,e.position===`before`?`rj-editor-equation-render--prescript`:``,e.superscript===void 0?``:`has-superscript`,e.subscript===void 0?``:`has-subscript`].filter(Boolean).join(` `)}function vn(e){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>${V(e)}</span>`)).join(``)}</span>`;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>`}function yn(e){switch(e.kind){case`accent`:return`<span class="rj-editor-equation-render rj-editor-equation-render--accent"><span class="rj-editor-equation-render-accent-mark">${{bar:`¯`,dot:`˙`,doubleDot:`¨`,hat:`ˆ`,vector:`⃗`}[e.accent]}</span>${V(e.value,`x`)}</span>`;case`bracket`:{let[t,n]=mn(e.bracket);return`<span class="rj-editor-equation-render rj-editor-equation-render--bracket"><span class="rj-editor-equation-render-bracket">${we(t)}</span>${V(e.value,`x`)}<span class="rj-editor-equation-render-bracket">${we(n)}</span></span>`}case`fraction`:return e.variant===`linear`||e.variant===`skewed`?`<span class="rj-editor-equation-render rj-editor-equation-render--fraction-inline"><span>${V(e.numerator)}</span><span>${e.variant===`skewed`?`⁄`:`/`}</span><span>${V(e.denominator)}</span></span>`:`<span class="rj-editor-equation-render rj-editor-equation-render--fraction"><span>${V(e.numerator)}</span><span class="rj-editor-equation-render-line"></span><span>${V(e.denominator)}</span></span>`;case`function`:return`<span class="rj-editor-equation-render rj-editor-equation-render--function"><span>${e.functionName}</span><span>(</span>${V(e.argument,`x`)}<span>)</span></span>`;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?``:V(e.upper,`b`)}</span><span class="rj-editor-equation-render-large-symbol">${gn(e.variant)}</span><span>${e.lower===void 0?``:V(e.lower,`a`)}</span></span>${V(e.body,`f(x)`)}<span>d</span>${V(e.variable,`x`)}</span>`;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?``:V(e.upper,`n`)}</span><span class="rj-editor-equation-render-large-symbol">${hn(e.operator)}</span><span>${e.lower===void 0?``:V(e.lower,`i=1`)}</span></span>${V(e.body,`i`)}</span>`;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>${V(e.target,`x→0`)}</span></span>${V(e.body,`f(x)`)}</span>`;case`matrix`:return`<span class="rj-editor-equation-render rj-editor-equation-render--matrix">${vn(e)}</span>`;case`operator`:return`<span class="rj-editor-equation-render">${we(e.value||`□`)}</span>`;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">${V(e.index,`n`)}</span>`}<span class="rj-editor-equation-render-root-symbol">√</span><span class="rj-editor-equation-render-radicand">${V(e.value,`x`)}</span></span>`;case`script`:return e.position===`before`?`<span class="${_n(e)}"><span class="rj-editor-equation-render-script-stack">${e.superscript===void 0?``:`<span>${V(e.superscript,`n`)}</span>`}${e.subscript===void 0?``:`<span>${V(e.subscript,`1`)}</span>`}</span>${V(e.base,`Y`)}</span>`:`<span class="${_n(e)}">${V(e.base,`x`)}<span class="rj-editor-equation-render-script-stack">${e.superscript===void 0?``:`<span>${V(e.superscript,`2`)}</span>`}${e.subscript===void 0?``:`<span>${V(e.subscript,`i`)}</span>`}</span></span>`;case`text`:return`<span class="rj-editor-equation-render">${V(e.value,`□`)}</span>`;case`row`:return`<span class="rj-editor-equation-render rj-editor-equation-render--row">${e.items.map(yn).join(``)}</span>`;default:return``}}function bn(e,t){let r=xe(e);return r?yn(r):n.default.renderToString(e,{displayMode:t===`block`,output:`mathml`,strict:!1,throwOnError:!1,trust:!1})}var xn=`data-rj-code-title`,Sn=`data-rj-code-custom-title`;function Cn(e){return e.querySelector(`.rj-editor-code-block-export-language`)?.textContent?.replace(/^>_\s*/,``).trim()||``}function wn(e,n){let r=new DOMParser().parseFromString(n||``,`text/html`),a=r.body.querySelector(`[data-rj-editor-content="true"]`);r.body.querySelectorAll(`[data-rj-editor-code-block="true"]`).forEach(e=>{let t=e.querySelector(`pre.rj-editor-code-block`);if(!t){e.remove();return}if(t.classList.remove(`rj-editor-code-block--exported`),t.removeAttribute(`style`),!t.getAttribute(xn)){let n=Cn(e);n&&(t.setAttribute(xn,n),n!==(t.getAttribute(`data-language`)||`plain`)&&t.setAttribute(Sn,n))}e.replaceWith(t)}),a&&r.body.children.length===1&&r.body.replaceChildren(...Array.from(a.childNodes));let o=(0,i.$generateNodesFromDOM)(e,r),s=(0,t.$getRoot)();if(s.clear(),o.length>0){s.append(...o);return}s.append((0,t.$createParagraphNode)())}var Tn=(0,l.createSlice)({name:`toolbar`,initialState:L,reducers:{setCanRedo(e,t){e.canRedo=t.payload},setCanUndo(e,t){e.canUndo=t.payload},setTextFormats(e,t){e.isBold=t.payload.isBold,e.isCode=t.payload.isCode,e.isItalic=t.payload.isItalic,e.isStrikethrough=t.payload.isStrikethrough,e.isSubscript=t.payload.isSubscript,e.isSuperscript=t.payload.isSuperscript,e.isUnderline=t.payload.isUnderline},setStyleFormats(e,t){e.backgroundColor=t.payload.backgroundColor,e.fontFamily=t.payload.fontFamily,e.fontSize=t.payload.fontSize,e.lineHeight=t.payload.lineHeight,e.textColor=t.payload.textColor},setBlockFormats(e,t){e.alignment=t.payload.alignment,e.listType=t.payload.listType},setTableFormats(e,t){e.isInTable=t.payload.isInTable,e.selectedTableCellsCount=t.payload.selectedTableCellsCount,e.tableCellBackgroundColor=t.payload.tableCellBackgroundColor,e.tableCellVerticalAlign=t.payload.tableCellVerticalAlign,e.tableHasMergedCell=t.payload.tableHasMergedCell},setEquationFormats(e,t){e.isEquationSelected=t.payload.isEquationSelected,e.selectedEquation=t.payload.selectedEquation,e.selectedEquationDisplayMode=t.payload.selectedEquationDisplayMode,e.selectedEquationKey=t.payload.selectedEquationKey},setImageFormats(e,t){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}}}),{setBlockFormats:En,setCanRedo:Dn,setCanUndo:On,setEquationFormats:kn,setImageFormats:An,setStyleFormats:jn,setTableFormats:Mn,setTextFormats:Nn}=Tn.actions,Pn=Tn.reducer,Fn=()=>(0,l.configureStore)({reducer:{toolbar:Pn}});Fn();var In=c.useDispatch.withTypes(),H=c.useSelector.withTypes(),Ln={alerts:{imageUploadFailed:`Image upload failed.`,imageSizeLimit:`Image size must be 5MB or less.`,onlyImages:`Only image files can be uploaded.`},common:{cancel:`Cancel`,close:`Close`,insert:`Insert`,moreColors:`More colors`,none:`None`,optional:`Optional`,save:`Save`},footer:{characters:`characters`,editing:`Editing`,focus:`Focus`,fullscreen:`Fullscreen`,language:`Language`,selected:`Selected`,statusBar:`Editor status`,words:`words`,zoom:`Zoom`},modal:{closeAriaLabel:`Close modal`},placeholders:{editor:`Write your article here...`},toolbar:{alignment:{center:`Align center`,justify:`Align justify`,left:`Align left`,right:`Align right`},codeBlock:{code:`Code`,codePlaceholder:`Write or paste code here...`,copied:`Copied`,copy:`Copy code`,language:`Language`,title:`Code block title`},fullscreen:{close:`Exit fullscreen`,open:`Open fullscreen`},history:{redo:`Redo`,undo:`Undo`},image:{alignCenter:`Align image center`,alignLeft:`Align image left`,alignRight:`Align image right`,alt:`Alt text`,altPlaceholder:`Describe this image`,border:`Border`,borderRadius:`Image border radius`,caption:`Caption`,captionPlaceholder:`Image caption`,cropMode:`Image crop mode`,delete:`Delete image`,editAlt:`Edit alt text`,editCaption:`Edit caption`,editLink:`Edit image link`,fitContain:`Contain`,fitCover:`Cover`,fitFill:`Fill`,link:`Link`,linkPlaceholder:`https://example.com`,replace:`Replace image`,rotateLeft:`Rotate left`,rotateRight:`Rotate right`,shadow:`Shadow`,squareWrap:`Square`,topBottomWrap:`Top and Bottom`,width:`Image width`},insert:{codeBlock:`Code block`,equation:`Equation`,horizontalLine:`Horizontal line`,image:`Image`,link:`Link`,table:`Table`,youtube:`YouTube`},link:{openInNewTab:`Open in new tab`,text:`Text`,textPlaceholder:`Link text`,title:`Title`,titlePlaceholder:`Optional`,url:`URL`,urlPlaceholder:`https://example.com`},list:{bullet:`Bulleted list`,numbered:`Numbered list`,remove:`Remove list`},spacing:{default:`Default`,lineAndParagraph:`Line and paragraph spacing`},shortcuts:{backgroundColor:`Background color`,bold:`Bold`,bulletList:`Bulleted list`,clearFormatting:`Clear formatting`,decreaseIndent:`Decrease indent`,fontFamily:`Font family`,fontSize:`Font size`,increaseIndent:`Increase indent`,italic:`Italic`,link:`Insert link`,numberedList:`Numbered list`,redo:`Redo`,removeList:`Remove list`,spacing:`Line spacing`,strikethrough:`Strikethrough`,subscript:`Subscript`,superscript:`Superscript`,textColor:`Text color`,underline:`Underline`,undo:`Undo`},style:{backgroundColor:`Background color`,clearFormatting:`Clear formatting`,fontFamily:`Font family`,fontFamilyPlaceholder:`Font`,fontSize:`Font size`,fontSizePlaceholder:`Size`,textColor:`Text color`},table:{alignBottom:`Align cell content to bottom`,alignMiddle:`Align cell content to middle`,alignTop:`Align cell content to top`,background:`Table cell background`,columns:`Columns`,deleteColumn:`Delete column`,deleteRow:`Delete row`,deleteTable:`Delete table`,headerColumn:`Header col`,headerRow:`Header row`,header:`Header`,insertColumnLeft:`Insert column left`,insertColumnRight:`Insert column right`,insertRowAbove:`Insert row above`,insertRowBelow:`Insert row below`,insertTable:`Insert table`,insertTableSize:`{columns}x{rows} Table`,mergeCells:`Merge`,columnLeft:`Col ←`,columnRight:`Col →`,rowAbove:`Row ↑`,rowBelow:`Row ↓`,column:`Col`,row:`Row`,rows:`Rows`,unmergeCell:`Unmerge`},tabs:{equation:`Equation`,home:`Home`,image:`Image`,insert:`Insert`,layout:`Layout`,table:`Table`},textFormat:{bold:`Bold`,code:`Inline code`,italic:`Italic`,strikethrough:`Strikethrough`,subscript:`Subscript`,superscript:`Superscript`,underline:`Underline`},youtube:{invalidUrl:`YouTube link or video ID is invalid.`,title:`Title`,titlePlaceholder:`Optional`,url:`YouTube URL`,urlPlaceholder:`https://www.youtube.com/watch?v=...`}}};function Rn(e){return!e||typeof e!=`object`?e:Array.isArray(e)?e.map(e=>Rn(e)):Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Rn(t)]))}function zn(e,...t){return t.reduce((e,t)=>(t&&Object.entries(t).forEach(([t,n])=>{let r=e[t];if(n&&typeof n==`object`&&!Array.isArray(n)&&r&&typeof r==`object`){e[t]=zn(r,n);return}e[t]=n}),e),Rn(e))}var Bn=zn(Ln,{alerts:{imageUploadFailed:`Не удалось загрузить изображение.`,imageSizeLimit:`Размер изображения должен быть не больше 5MB.`,onlyImages:`Можно загружать только изображения.`},common:{cancel:`Отмена`,close:`Закрыть`,insert:`Вставить`,moreColors:`Больше цветов`,none:`Нет`,optional:`Необязательно`,save:`Сохранить`},footer:{characters:`символов`,editing:`Редактирование`,focus:`Фокус`,fullscreen:`Полный экран`,language:`Язык`,selected:`Выделено`,statusBar:`Статус редактора`,words:`слов`,zoom:`Масштаб`},modal:{closeAriaLabel:`Закрыть модальное окно`},placeholders:{editor:`Напишите текст здесь...`},toolbar:{codeBlock:{code:`Код`,codePlaceholder:`Напишите или вставьте код здесь...`,copied:`Скопировано`,copy:`Копировать код`,language:`Язык`,title:`Название блока кода`},fullscreen:{close:`Выйти из полноэкранного режима`,open:`Открыть на весь экран`},image:{border:`Граница`,caption:`Подпись`,captionPlaceholder:`Подпись к изображению`,cropMode:`Режим обрезки изображения`,delete:`Удалить изображение`,replace:`Заменить изображение`,shadow:`Тень`},insert:{codeBlock:`Блок кода`,equation:`Формула`,horizontalLine:`Горизонтальная линия`,image:`Изображение`,link:`Ссылка`,table:`Таблица`},link:{openInNewTab:`Открывать в новой вкладке`,text:`Текст`,textPlaceholder:`Текст ссылки`,titlePlaceholder:`Необязательно`},table:{columns:`Столбцы`,headerColumn:`Заголовок столбца`,headerRow:`Заголовок строки`,insertTable:`Вставить таблицу`,insertTableSize:`Таблица {columns}x{rows}`,mergeCells:`Объединить`,rows:`Строки`,unmergeCell:`Разделить`},youtube:{invalidUrl:`Ссылка YouTube или video ID неверны.`,titlePlaceholder:`Необязательно`}}}),Vn=zn(Ln,{alerts:{imageUploadFailed:`Rasmni yuklashda xatolik yuz berdi.`,imageSizeLimit:`Rasm hajmi 5MB yoki undan kichik bo‘lishi kerak.`,onlyImages:`Faqat rasm fayllarini yuklash mumkin.`},common:{cancel:`Bekor qilish`,close:`Yopish`,insert:`Qo‘shish`,moreColors:`Ko‘proq ranglar`,none:`Yo‘q`,optional:`Ixtiyoriy`,save:`Saqlash`},footer:{characters:`belgi`,editing:`Tahrirlash`,focus:`Fokus`,fullscreen:`To‘liq ekran`,language:`Til`,selected:`Tanlangan`,statusBar:`Editor holati`,words:`so‘z`,zoom:`Masshtab`},modal:{closeAriaLabel:`Modalni yopish`},placeholders:{editor:`Maqolangizni shu yerga yozing...`},toolbar:{codeBlock:{code:`Kod`,codePlaceholder:`Kodni shu yerga yozing yoki joylang...`,copied:`Nusxalandi`,copy:`Kodni nusxalash`,language:`Dasturlash tili`,title:`Kod bloki nomi`},fullscreen:{close:`To‘liq ekrandan chiqish`,open:`To‘liq ekranda ochish`},history:{redo:`Qaytarish`,undo:`Bekor qilish`},image:{alt:`Muqobil matn`,altPlaceholder:`Rasmni tasvirlab yozing`,border:`Chegara`,borderRadius:`Rasm burchak radiusi`,caption:`Izoh`,captionPlaceholder:`Rasm osti yozuvi`,cropMode:`Rasm ko‘rinish rejimi`,delete:`Rasmni o‘chirish`,editAlt:`Muqobil matnni tahrirlash`,editCaption:`Izohni tahrirlash`,editLink:`Rasm linkini tahrirlash`,fitContain:`Sig‘dirish`,fitCover:`Qoplash`,fitFill:`To‘ldirish`,replace:`Rasmni almashtirish`,rotateLeft:`Chapga aylantirish`,rotateRight:`O‘ngga aylantirish`,shadow:`Soya`,squareWrap:`Yonidan matn`,topBottomWrap:`Yuqori va pastdan`,width:`Rasm kengligi`},insert:{codeBlock:`Kod bloki`,equation:`Formula`,horizontalLine:`Gorizontal chiziq`,image:`Rasm`,table:`Jadval`},link:{openInNewTab:`Yangi tabda ochish`,text:`Matn`,textPlaceholder:`Link matni`,titlePlaceholder:`Ixtiyoriy`},list:{bullet:`Nuqtali ro‘yxat`,numbered:`Raqamli ro‘yxat`,remove:`Ro‘yxatni olib tashlash`},spacing:{default:`Standart`,lineAndParagraph:`Qator va paragraf oralig‘i`},shortcuts:{backgroundColor:`Orqa fon rangi`,bold:`Qalin`,bulletList:`Nuqtali ro‘yxat`,clearFormatting:`Formatni tozalash`,decreaseIndent:`Chekinishni kamaytirish`,fontFamily:`Shrift`,fontSize:`O‘lcham`,increaseIndent:`Chekinishni oshirish`,italic:`Kursiv`,link:`Link qo‘shish`,numberedList:`Raqamli ro‘yxat`,redo:`Qaytarish`,removeList:`Ro‘yxatni olib tashlash`,spacing:`Qator oralig‘i`,strikethrough:`Ustidan chizish`,subscript:`Pastki indeks`,superscript:`Yuqori indeks`,textColor:`Matn rangi`,underline:`Tagiga chizish`,undo:`Bekor qilish`},style:{backgroundColor:`Orqa fon rangi`,clearFormatting:`Formatni tozalash`,fontFamily:`Shrift oilasi`,fontFamilyPlaceholder:`Shrift`,fontSize:`Shrift o‘lchami`,fontSizePlaceholder:`O‘lcham`,textColor:`Matn rangi`},table:{alignBottom:`Katak matnini pastga tekislash`,alignMiddle:`Katak matnini o‘rtaga tekislash`,alignTop:`Katak matnini yuqoriga tekislash`,background:`Katak orqa fon rangi`,columns:`Ustunlar`,deleteColumn:`Ustunni o‘chirish`,deleteRow:`Qatorni o‘chirish`,deleteTable:`Jadvalni o‘chirish`,headerColumn:`Sarlavha ustuni`,headerRow:`Sarlavha qatori`,header:`Sarlavha`,insertColumnLeft:`Chapga ustun qo‘shish`,insertColumnRight:`O‘ngga ustun qo‘shish`,insertRowAbove:`Yuqoriga qator qo‘shish`,insertRowBelow:`Pastga qator qo‘shish`,insertTable:`Jadval qo‘shish`,insertTableSize:`{columns}x{rows} jadval`,mergeCells:`Birlashtirish`,columnLeft:`Ustun ←`,columnRight:`Ustun →`,rowAbove:`Qator ↑`,rowBelow:`Qator ↓`,column:`Ustun`,row:`Qator`,rows:`Qatorlar`,unmergeCell:`Ajratish`},tabs:{equation:`Formula`,home:`Asosiy`,image:`Rasm`,insert:`Qo‘shish`,layout:`Joylashuv`,table:`Jadval`},textFormat:{bold:`Qalin`,code:`Inline kod`,italic:`Kursiv`,strikethrough:`Ustidan chizish`,subscript:`Pastki indeks`,superscript:`Yuqori indeks`,underline:`Tagiga chizish`},youtube:{invalidUrl:`YouTube link yoki video ID noto‘g‘ri.`,titlePlaceholder:`Ixtiyoriy`}}}),Hn=P.default.createContext(Vn),Un={en:Ln,ru:Bn,uz:Vn};function Wn({children:e,locale:t=`uz`,locales:n,translations:r}){let i=P.default.useMemo(()=>zn(Un[t]||Ln,n?.[t],r),[t,n,r]);return(0,u.jsx)(Hn.Provider,{value:i,children:e})}function U(){return P.default.useContext(Hn)}var Gn={algorithm:o.theme.defaultAlgorithm,token:{colorPrimary:`#3167c8`}},Kn={algorithm:o.theme.darkAlgorithm,token:{colorBgContainer:`#202020`,colorBgElevated:`#252525`,colorBorder:`#444444`,colorBorderSecondary:`#383838`,colorFillSecondary:`#2d2d2d`,colorFillTertiary:`#292929`,colorPrimary:`#b8b8b8`,colorPrimaryActive:`#d8d8d8`,colorPrimaryHover:`#cecece`,colorText:`#ededed`,colorTextPlaceholder:`#8d8d8d`,colorTextQuaternary:`#777777`,colorTextSecondary:`#b5b5b5`,colorTextTertiary:`#999999`}};function qn(e){return e===`dark`?Kn:Gn}var Jn=P.default.createContext(`light`);function Yn(){return P.default.useContext(Jn)}function Xn(e){let t=e?.trim().toLowerCase();if(t===`dark`||t===`only dark`)return`dark`;if(t===`light`||t===`only light`)return`light`}function Zn(e){if(!e)return;let t=Xn(e.dataset.rjEditorTheme)||Xn(e.dataset.colorScheme)||Xn(e.dataset.theme)||Xn(e.getAttribute(`color-scheme`));if(t)return t;if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`}function Qn(e){return e?Xn(window.getComputedStyle(e).colorScheme):void 0}function $n(){if(typeof document>`u`||typeof window>`u`)return`light`;let e=document.documentElement,t=document.body,n=Zn(e)||Zn(t);if(n)return n;let r=document.querySelector(`meta[name="color-scheme"]`)?.content;return Qn(e)||Qn(t)||Xn(r)||(window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`)}function er(e){let[t,n]=P.default.useState(()=>$n());return P.default.useEffect(()=>{if(e!==`auto`)return;let t=()=>n($n()),r=window.matchMedia(`(prefers-color-scheme: dark)`),i=new MutationObserver(t),a=new MutationObserver(t),o=new MutationObserver(t),s=window.requestAnimationFrame(t),c=[`class`,`color-scheme`,`data-color-scheme`,`data-rj-editor-theme`,`data-theme`,`style`];return r.addEventListener(`change`,t),i.observe(document.documentElement,{attributeFilter:c,attributes:!0}),document.body&&a.observe(document.body,{attributeFilter:c,attributes:!0}),o.observe(document.head,{attributeFilter:[`content`],attributes:!0,childList:!0,subtree:!0}),()=>{window.cancelAnimationFrame(s),r.removeEventListener(`change`,t),i.disconnect(),a.disconnect(),o.disconnect()}},[e]),e===`auto`?t:e}function tr(){if(zr>1)return void zr--;let e,t=!1;for(function(){let e=Rr;for(Rr=void 0;e!==void 0;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();Lr!==void 0;){let n=Lr;for(Lr=void 0,Br++;n!==void 0;){let r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&or(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(Br=0,zr--,t)throw e}function nr(e){if(zr>0)return e();Hr=++Vr,zr++;try{return e()}finally{tr()}}function rr(e){let t=K;K=void 0;try{return e()}finally{K=t}}function ir(e){if(K===void 0)return;let t=e.n;return t===void 0||t.t!==K?(t={i:0,S:e,p:K.s,n:void 0,t:K,e:void 0,x:void 0,r:t},K.s!==void 0&&(K.s.n=t),K.s=t,e.n=t,32&K.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=K.s,t.n=void 0,K.s.n=t,K.s=t),t):void 0}function W(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function ar(e,t){return new W(e,t)}function or(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function sr(e){for(let t=e.s;t!==void 0;t=t.n){let n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function cr(e){let t,n=e.s;for(;n!==void 0;){let e=n.p;n.i===-1?(n.S.U(n),e!==void 0&&(e.n=n.n),n.n!==void 0&&(n.n.p=e)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=e}e.s=t}function lr(e,t){W.call(this,void 0),this.x=e,this.s=void 0,this.g=Ur-1,this.f=4,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}function ur(e,t){return new lr(e,t)}function dr(e){let t=e.m;if(e.m=void 0,typeof t==`function`){zr++;let n=K;K=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,fr(e),t}finally{K=n,tr()}}}function fr(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,dr(e)}function pr(e){if(K!==this)throw Error(`Out-of-order effect`);cr(this),K=e,this.f&=-2,8&this.f&&fr(this),tr()}function mr(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name}function hr(e,t){let n=new mr(e,t);try{n.c()}catch(e){throw n.d(),e}let r=n.d.bind(n);return r[Symbol.dispose]=r,r}function gr(e,t={}){let n={};for(let r in e){let i=t[r];n[r]=ar(i===void 0?e[r]:i)}return n}function _r(){let e=(0,t.$getRoot)(),n=(0,t.$getSelection)(),r=(0,t.$createParagraphNode)();e.clear(),e.append(r),n!==null&&r.select(),(0,t.$isRangeSelection)(n)&&(n.format=0)}function vr(e,n=_r){return e.registerCommand(t.CLEAR_EDITOR_COMMAND,t=>(e.update(n),!0),t.COMMAND_PRIORITY_EDITOR)}function yr(e){return(typeof e.nodes==`function`?e.nodes():e.nodes)||[]}function br(e){return e instanceof Gr}function xr(e,t){let n;return ar(e(),{unwatched(){n&&=(n(),void 0)},watched(){this.value=e(),n=t(this)}})}function G(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Sr(e,t){if(e&&t&&!Array.isArray(t)&&typeof e==`object`&&typeof t==`object`){let n=e,r=t;for(let e in r)n[e]=Sr(n[e],r[e]);return e}return t}function Cr(e){return e.id===qr}function wr(e){return e.id===Yr}function Tr(e){return function(e){return e.id===Jr}(e)||G(305,String(e.id),String(Jr)),Object.assign(e,{id:Yr})}function Er(){let e=(0,t.$getRoot)();e.isEmpty()&&e.append((0,t.$createParagraphNode)())}function Dr(){}function Or(e){throw e}function kr(e){return Array.isArray(e)?e:[e]}function Ar(e,t){let n=si.maybeFromEditor(e);if(!n)return;let r=n.extensionNameMap.get(t);return r?r.getExtensionDependency():void 0}function jr(){return{node:Mr()}}function Mr(){return(0,t.$create)(di)}function Nr(e){return e instanceof di}function Pr(e){return e.canBeEmpty()}function Fr(e,n,r=Pr){return(0,t.mergeRegister)(e.registerCommand(t.KEY_TAB_COMMAND,n=>{let r=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(r))return!1;n.preventDefault();let i=function(e){if(e.getNodes().filter(e=>(0,t.$isBlockElementNode)(e)&&e.canIndent()).length>0)return!0;let n=e.anchor,r=e.focus,i=r.isBefore(n)?r:n,a=(0,m.$getNearestBlockElementAncestorOrThrow)(i.getNode());if(a.canIndent()){let e=a.getKey(),n=(0,t.$createRangeSelection)();if(n.anchor.set(e,0,`element`),n.focus.set(e,0,`element`),n=(0,t.$normalizeSelection__EXPERIMENTAL)(n),n.anchor.is(i))return!0}return!1}(r)?n.shiftKey?t.OUTDENT_CONTENT_COMMAND:t.INDENT_CONTENT_COMMAND:t.INSERT_TAB_COMMAND;return e.dispatchCommand(i,void 0)},t.COMMAND_PRIORITY_EDITOR),e.registerCommand(t.INDENT_CONTENT_COMMAND,()=>{let e=typeof n==`number`?n:n?n.peek():null;if(!(0,t.$isRangeSelection)((0,t.$getSelection)()))return!1;let i=typeof r==`function`?r:r.peek();return(0,m.$handleIndentAndOutdent)(t=>{if(i(t)){let n=t.getIndent()+1;(!e||n<e)&&t.setIndent(n)}})},t.COMMAND_PRIORITY_CRITICAL))}var Ir,K,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi=j((()=>{Ir=Symbol.for(`preact-signals`),zr=0,Br=0,Vr=0,Hr=0,Ur=0,W.prototype.brand=Ir,W.prototype.h=function(){return!0},W.prototype.S=function(e){let t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t===void 0?rr(()=>{var e;(e=this.W)==null||e.call(this)}):t.e=e)},W.prototype.U=function(e){if(this.t!==void 0){let t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&rr(()=>{var e;(e=this.Z)==null||e.call(this)}))}},W.prototype.subscribe=function(e){return hr(()=>{let t=this.value,n=K;K=void 0;try{e(t)}finally{K=n}},{name:`sub`})},W.prototype.valueOf=function(){return this.value},W.prototype.toString=function(){return this.value+``},W.prototype.toJSON=function(){return this.value},W.prototype.peek=function(){let e=K;K=void 0;try{return this.value}finally{K=e}},Object.defineProperty(W.prototype,`value`,{get(){let e=ir(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(Br>100)throw Error(`Cycle detected`);(function(e){zr!==0&&Br===0&&e.l!==Hr&&(e.l=Hr,Rr={S:e,v:e.v,i:e.i,o:Rr})})(this),this.v=e,this.i++,Ur++,zr++;try{for(let e=this.t;e!==void 0;e=e.x)e.t.N()}finally{tr()}}}}),lr.prototype=new W,lr.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ur))return!0;if(this.g=Ur,this.f|=1,this.i>0&&!or(this))return this.f&=-2,!0;let e=K;try{sr(this),K=this;let e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return K=e,cr(this),this.f&=-2,!0},lr.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let e=this.s;e!==void 0;e=e.n)e.S.S(e)}W.prototype.S.call(this,e)},lr.prototype.U=function(e){if(this.t!==void 0&&(W.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let e=this.s;e!==void 0;e=e.n)e.S.U(e)}},lr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(lr.prototype,`value`,{get(){if(1&this.f)throw Error(`Cycle detected`);let e=ir(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),mr.prototype.c=function(){let e=this.S();try{if(8&this.f||this.x===void 0)return;let e=this.x();typeof e==`function`&&(this.m=e)}finally{e()}},mr.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,dr(this),sr(this),zr++;let e=K;return K=this,pr.bind(this,e)},mr.prototype.N=function(){2&this.f||(this.f|=2,this.u=Lr,Lr=this)},mr.prototype.d=function(){this.f|=8,1&this.f||fr(this)},mr.prototype.dispose=function(){this.d()},(0,t.defineExtension)({build:(e,t,n)=>gr(t),config:(0,t.safeCast)({defaultSelection:`rootEnd`,disabled:!1}),name:`@lexical/extension/AutoFocus`,register(e,t,n){let r=n.getOutput();return hr(()=>r.disabled.value?void 0:e.registerRootListener(t=>{e.focus(()=>{let e=document.activeElement;t===null||e!==null&&t.contains(e)||t.focus({preventScroll:!0})},{defaultSelection:r.defaultSelection.peek()})}))}}),(0,t.defineExtension)({build:(e,t,n)=>gr(t),config:(0,t.safeCast)({$onClear:_r}),name:`@lexical/extension/ClearEditor`,register(e,t,n){let{$onClear:r}=n.getOutput();return hr(()=>vr(e,r.value))}}),Wr=(0,t.createState)(`format`,{parse:e=>typeof e==`number`?e:0}),Gr=class extends t.DecoratorNode{$config(){return this.config(`decorator-text`,{extends:t.DecoratorNode,stateConfigs:[{flat:!0,stateConfig:Wr}]})}getFormat(){return(0,t.$getState)(this,Wr)}getFormatFlags(e,n){return(0,t.toggleTextFormatType)(this.getFormat(),e,n)}hasFormat(e){let n=t.TEXT_TYPE_TO_FORMAT[e];return(this.getFormat()&n)!==0}setFormat(e){return(0,t.$setState)(this,Wr,e)}toggleFormat(e){let n=(0,t.toggleTextFormatType)(this.getFormat(),e,null);return this.setFormat(n)}isInline(){return!0}createDOM(){return document.createElement(`span`)}updateDOM(){return!1}},(0,t.defineExtension)({name:`@lexical/extension/DecoratorText`,nodes:()=>[Gr],register:(e,n,r)=>e.registerCommand(t.FORMAT_TEXT_COMMAND,e=>{let n=(0,t.$getSelection)();if((0,t.$isNodeSelection)(n)||(0,t.$isRangeSelection)(n))for(let t of n.getNodes())br(t)&&t.toggleFormat(e);return!1},t.COMMAND_PRIORITY_LOW)}),Kr=(0,t.defineExtension)({build:e=>xr(()=>e.getEditorState(),t=>e.registerUpdateListener(e=>{t.value=e.editorState})),name:`@lexical/extension/EditorState`}),qr=0,Jr=1,Yr=2,Xr=3,Zr=4,Qr=5,$r=6,ei=7,ti=new Set,ni=class{builder;configs;_dependency;_peerNameSet;extension;state;_signal;constructor(e,t){this.builder=e,this.extension=t,this.configs=new Set,this.state={id:qr}}mergeConfigs(){let e=this.extension.config||{},n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):t.shallowMergeConfig;for(let t of this.configs)e=n(e,t);return e}init(e){let t=this.state;wr(t)||G(306,String(t.id));let n={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},r={...n,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},i=function(e,t,n){return Object.assign(e,{config:t,id:Xr,registerState:n})}(t,this.mergeConfigs(),n),a;this.state=i,this.extension.init&&(a=this.extension.init(e,i.config,n)),this.state=function(e,t,n){return Object.assign(e,{id:Zr,initResult:t,registerState:n})}(i,a,r)}build(e){let t=this.state,n;t.id!==Zr&&G(307,String(t.id),String(Qr)),this.extension.build&&(n=this.extension.build(e,t.config,t.registerState));let r={...t.registerState,getOutput:()=>n,getSignal:this.getSignal.bind(this)};this.state=function(e,t,n){return Object.assign(e,{id:Qr,output:t,registerState:n})}(t,n,r)}register(e,t){this._signal=t;let n=this.state;n.id!==Qr&&G(308,String(n.id),String(Qr));let r=this.extension.register&&this.extension.register(e,n.config,n.registerState);return this.state=function(e){return Object.assign(e,{id:$r})}(n),()=>{let e=this.state;e.id!==ei&&G(309,String(n.id),String(ei)),this.state=function(e){return Object.assign(e,{id:Qr})}(e),r&&r()}}afterRegistration(e){let t=this.state,n;return t.id!==$r&&G(310,String(t.id),String($r)),this.extension.afterRegistration&&(n=this.extension.afterRegistration(e,t.config,t.registerState)),this.state=function(e){return Object.assign(e,{id:ei})}(t),n}getSignal(){return this._signal===void 0&&G(311),this._signal}getInitResult(){this.extension.init===void 0&&G(312,this.extension.name);let e=this.state;return function(e){return e.id>=Zr}(e)||G(313,String(e.id),String(Zr)),e.initResult}getInitPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionInitDependency():void 0}getExtensionInitDependency(){let e=this.state;return function(e){return e.id>=Xr}(e)||G(314,String(e.id),String(Xr)),{config:e.config}}getPeer(e){let t=this.builder.extensionNameMap.get(e);return t?t.getExtensionDependency():void 0}getInitDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&G(315,this.extension.name,e.name),t.getExtensionInitDependency()}getDependency(e){let t=this.builder.getExtensionRep(e);return t===void 0&&G(315,this.extension.name,e.name),t.getExtensionDependency()}getState(){let e=this.state;return function(e){return e.id>=ei}(e)||G(316,String(e.id),String(ei)),e}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||ti}getPeerNameSet(){let e=this._peerNameSet;return e||(e=new Set((this.extension.peerDependencies||[]).map(([e])=>e)),this._peerNameSet=e),e}getExtensionDependency(){if(!this._dependency){let e=this.state;(function(e){return e.id>=Qr})(e)||G(317,this.extension.name),this._dependency={config:e.config,init:e.initResult,output:e.output}}return this._dependency}},ri={tag:t.HISTORY_MERGE_TAG},ii=(0,t.defineExtension)({config:(0,t.safeCast)({setOptions:ri,updateOptions:ri}),init:({$initialEditorState:e=Er})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:n,setOptions:r},i){let a=i.getInitResult();if(!a.initialized){a.initialized=!0;let{$initialEditorState:i}=a;if((0,t.$isEditorState)(i))e.setEditorState(i,r);else if(typeof i==`function`)e.update(()=>{i(e)},n);else if(i&&(typeof i==`string`||typeof i==`object`)){let t=e.parseEditorState(i);e.setEditorState(t,r)}}return()=>{}},name:`@lexical/extension/InitialState`,nodes:[t.RootNode,t.TextNode,t.LineBreakNode,t.TabNode,t.ParagraphNode]}),ai=Symbol.for(`@lexical/extension/LexicalBuilder`),oi=`0.44.0+prod.esm`,si=class e{roots;extensionNameMap;outgoingConfigEdges;incomingEdges;conflicts;_sortedExtensionReps;PACKAGE_VERSION;constructor(e){this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=oi,this.roots=e;for(let t of e)this.addExtension(t)}static fromExtensions(t){let n=[kr(ii)];for(let e of t)n.push(kr(e));return new e(n)}static maybeFromEditor(t){let n=t[ai];return n&&(n.PACKAGE_VERSION!==oi&&G(292,n.PACKAGE_VERSION,oi),n instanceof e||G(293)),n}static fromEditor(t){let n=e.maybeFromEditor(t);return n===void 0&&G(294),n}constructEditor(){let{$initialEditorState:e,onError:n,...r}=this.buildCreateEditorArgs(),i=Object.assign((0,t.createEditor)({...r,...n?{onError:e=>{n(e,i)}}:{}}),{[ai]:this});for(let e of this.sortedExtensionReps())e.build(i);return i}buildEditor(){let e=Dr;function n(){try{e()}finally{e=Dr}}let r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return e=(0,t.mergeRegister)(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(e){return this.extensionNameMap.has(e)}getExtensionRep(e){let t=this.extensionNameMap.get(e.name);if(t)return t.extension!==e&&G(295,e.name),t}addEdge(e,t,n){let r=this.outgoingConfigEdges.get(e);r?r.set(t,n):this.outgoingConfigEdges.set(e,new Map([[t,n]]));let i=this.incomingEdges.get(t);i?i.add(e):this.incomingEdges.set(t,new Set([e]))}addExtension(e){this._sortedExtensionReps!==void 0&&G(296);let[t]=kr(e);typeof t.name!=`string`&&G(297,typeof t.name);let n=this.extensionNameMap.get(t.name);if(n!==void 0&&n.extension!==t&&G(298,t.name),!n){n=new ni(this,t),this.extensionNameMap.set(t.name,n);let e=this.conflicts.get(t.name);typeof e==`string`&&G(299,t.name,e);for(let e of t.conflictsWith||[])this.extensionNameMap.has(e)&&G(299,t.name,e),this.conflicts.set(e,t.name);for(let e of t.dependencies||[]){let n=kr(e);this.addEdge(t.name,n[0].name,n.slice(1)),this.addExtension(n)}for(let[e,n]of t.peerDependencies||[])this.addEdge(t.name,e,n?[n]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;let e=[],t=(n,r)=>{let i=n.state;if(wr(i))return;let a=n.extension.name;var o;Cr(i)||G(300,a,r||`[unknown]`),Cr(o=i)||G(304,String(o.id),String(qr)),i=Object.assign(o,{id:Jr}),n.state=i;let s=this.outgoingConfigEdges.get(a);if(s)for(let e of s.keys()){let n=this.extensionNameMap.get(e);n&&t(n,a)}i=Tr(i),n.state=i,e.push(n)};for(let e of this.extensionNameMap.values())Cr(e.state)&&t(e);for(let t of e)for(let[e,n]of this.outgoingConfigEdges.get(t.extension.name)||[])if(n.length>0){let t=this.extensionNameMap.get(e);if(t)for(let e of n)t.configs.add(e)}for(let[e,...t]of this.roots)if(t.length>0){let n=this.extensionNameMap.get(e.name);n===void 0&&G(301,e.name);for(let e of t)n.configs.add(e)}return this._sortedExtensionReps=e,this._sortedExtensionReps}registerEditor(e){let n=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],a=r.signal;for(let t of n){let n=t.register(e,a);n&&i.push(n)}for(let t of n){let n=t.afterRegistration(e);n&&i.push(n)}return(0,t.mergeRegister)(...i)}buildCreateEditorArgs(){let e={},t=new Set,n=new Map,r=new Map,i={},a={},o=this.sortedExtensionReps();for(let s of o){let{extension:o}=s;if(o.onError!==void 0&&(e.onError=o.onError),o.disableEvents!==void 0&&(e.disableEvents=o.disableEvents),o.parentEditor!==void 0&&(e.parentEditor=o.parentEditor),o.editable!==void 0&&(e.editable=o.editable),o.namespace!==void 0&&(e.namespace=o.namespace),o.$initialEditorState!==void 0&&(e.$initialEditorState=o.$initialEditorState),o.nodes)for(let e of yr(o)){if(typeof e!=`function`){let t=n.get(e.replace);t&&G(302,o.name,e.replace.name,t.extension.name),n.set(e.replace,s)}t.add(e)}if(o.html){if(o.html.export)for(let[e,t]of o.html.export.entries())r.set(e,t);o.html.import&&Object.assign(i,o.html.import)}o.theme&&Sr(a,o.theme)}Object.keys(a).length>0&&(e.theme=a),t.size&&(e.nodes=[...t]);let s=Object.keys(i).length>0,c=r.size>0;(s||c)&&(e.html={},s&&(e.html.import=i),c&&(e.html.export=r));for(let t of o)t.init(e);return e.onError||=Or,e}},ci=new Set,li=(0,t.defineExtension)({build(e,n,r){let i=r.getDependency(Kr).output,a=ar({watchedNodeKeys:new Map}),o=xr(()=>{},()=>hr(()=>{let e=o.peek(),{watchedNodeKeys:n}=a.value,r,s=!1;i.value.read(()=>{if((0,t.$getSelection)())for(let[i,a]of n.entries()){if(a.size===0){n.delete(i);continue}let o=(0,t.$getNodeByKey)(i),c=o&&o.isSelected()||!1;s||=c!==(!!e&&e.has(i)),c&&(r||=new Set,r.add(i))}}),!s&&r&&e&&r.size===e.size||(o.value=r)}));return{watchNodeKey:function(e){let t=ur(()=>(o.value||ci).has(e)),{watchedNodeKeys:n}=a.peek(),r=n.get(e),i=r!==void 0;return r||=new Set,r.add(t),i||(n.set(e,r),a.value={watchedNodeKeys:n}),t}}},dependencies:[Kr],name:`@lexical/extension/NodeSelection`}),ui=(0,t.createCommand)(`INSERT_HORIZONTAL_RULE_COMMAND`),di=class e extends t.DecoratorNode{static getType(){return`horizontalrule`}static clone(t){return new e(t.__key)}static importJSON(e){return Mr().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:jr,priority:0})}}exportDOM(){return{element:document.createElement(`hr`)}}createDOM(e){let n=document.createElement(`hr`);return(0,t.addClassNamesToElement)(n,e.theme.hr),n}getTextContent(){return`
12
+ `}isInline(){return!1}updateDOM(){return!1}},(0,t.defineExtension)({dependencies:[Kr,li],name:`@lexical/extension/HorizontalRule`,nodes:()=>[di],register(e,n,r){let{watchNodeKey:i}=r.getDependency(li).output,a=ar({nodeSelections:new Map}),o=e._config.theme.hrSelected??`selected`;return(0,t.mergeRegister)(e.registerCommand(ui,e=>{let n=(0,t.$getSelection)();return(0,t.$isRangeSelection)(n)?(n.focus.getNode()!==null&&(0,m.$insertNodeToNearestRoot)(Mr()),!0):!1},t.COMMAND_PRIORITY_EDITOR),e.registerCommand(t.CLICK_COMMAND,e=>{if((0,t.isDOMNode)(e.target)){let n=(0,t.$getNodeFromDOMNode)(e.target);if(Nr(n))return function(e,n=!1){let r=(0,t.$getSelection)(),i=e.isSelected(),a=e.getKey(),o;n&&(0,t.$isNodeSelection)(r)?o=r:(o=(0,t.$createNodeSelection)(),(0,t.$setSelection)(o)),i?o.delete(a):o.add(a)}(n,e.shiftKey),!0}return!1},t.COMMAND_PRIORITY_LOW),e.registerMutationListener(di,(t,n)=>{nr(()=>{let n=!1,{nodeSelections:r}=a.peek();for(let[a,o]of t.entries())if(o===`destroyed`)r.delete(a),n=!0;else{let t=r.get(a),o=e.getElementByKey(a);t?t.domNode.value=o:(n=!0,r.set(a,{domNode:ar(o),selectedSignal:i(a)}))}n&&(a.value={nodeSelections:r})})}),hr(()=>{let e=[];for(let{domNode:n,selectedSignal:r}of a.value.nodeSelections.values())e.push(hr(()=>{let e=n.value;e&&(r.value?(0,t.addClassNamesToElement)(e,o):(0,t.removeClassNamesFromElement)(e,o))}));return(0,t.mergeRegister)(...e)}))}}),(0,t.defineExtension)({build:(e,t)=>gr({inheritEditableFromParent:t.inheritEditableFromParent}),config:(0,t.safeCast)({$getParentEditor:function(){let e=(0,t.$getEditor)();return si.fromEditor(e),e},inheritEditableFromParent:!1}),init:(e,t,n)=>{let r=t.$getParentEditor();e.parentEditor=r,e.theme=e.theme||r._config.theme},name:`@lexical/extension/NestedEditor`,register:(e,t,n)=>hr(()=>{let t=e._parentEditor;if(t&&n.getOutput().inheritEditableFromParent.value)return e.setEditable(t.isEditable()),t.registerEditableListener(e.setEditable.bind(e))})}),(0,t.defineExtension)({build:(e,t,n)=>gr(t),config:(0,t.safeCast)({disabled:!1,onReposition:void 0}),name:`@lexical/utils/SelectionAlwaysOnDisplay`,register:(e,t,n)=>{let r=n.getOutput();return hr(()=>{if(!r.disabled.value)return(0,m.selectionAlwaysOnDisplay)(e,r.onReposition.value)})}}),(0,t.defineExtension)({build:(e,t,n)=>gr(t),config:(0,t.safeCast)({$canIndent:Pr,disabled:!1,maxIndent:null}),name:`@lexical/extension/TabIndentation`,register(e,t,n){let{disabled:r,maxIndent:i,$canIndent:a}=n.getOutput();return hr(()=>{if(!r.value)return Fr(e,i,a)})}})}));function pi(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function mi(e,n){let r=e;for(let i=(0,t.$getSiblingCaret)(e,n);i&&(J(i.origin)||(0,t.$isTabNode)(i.origin));i=i.getAdjacentCaret())r=i.origin;return r}function hi(e){return mi(e,`previous`)}function gi(e){return mi(e,`next`)}function _i(e){let n=hi(e),r=gi(e),i=n;for(;i!==null;){if(J(i)){let e=(0,t.getTextDirection)(i.getTextContent());if(e!==null)return e}if(i===r)break;i=i.getNextSibling()}let a=n.getParent();if((0,t.$isElementNode)(a)){let e=a.getDirection();if(e===`ltr`||e===`rtl`)return e}return null}function vi(e,n){let r=null,i=null,a=e,o=n,s=e.getTextContent();for(;;){if(o===0){if(a=a.getPreviousSibling(),a===null)break;if(J(a)||(0,t.$isTabNode)(a)||(0,t.$isLineBreakNode)(a)||pi(167),(0,t.$isLineBreakNode)(a)){r={node:a,offset:1};break}o=Math.max(0,a.getTextContentSize()-1),s=a.getTextContent()}else o--;let e=s[o];J(a)&&e!==` `&&(i={node:a,offset:o})}if(i!==null)return i;let c=null;if(n<e.getTextContentSize())J(e)&&(c=e.getTextContent()[n]);else{let t=e.getNextSibling();J(t)&&(c=t.getTextContent()[0])}if(c!==null&&c!==` `)return r;{let i=function(e,n){let r=e,i=n,a=e.getTextContent(),o=e.getTextContentSize();for(;;){if(!J(r)||i===o){if(r=r.getNextSibling(),r===null||(0,t.$isLineBreakNode)(r))return null;J(r)&&(i=0,a=r.getTextContent(),o=r.getTextContentSize())}if(J(r)){if(a[i]!==` `)return{node:r,offset:i};i++}}}(e,n);return i===null?r:i}}function yi(e){let n=gi(e);return(0,t.$isLineBreakNode)(n)&&pi(168),n}function bi(e,n){for(let r of e.childNodes){if((0,t.isHTMLElement)(r)&&r.tagName===n)return!0;bi(r,n)}return!1}function xi(e,n){return(0,t.$create)(Y).setLanguage(e).setTheme(n)}function q(e){return e instanceof Y}function Si(e){return{node:xi(e.getAttribute(Mi))}}function Ci(e){let t=e,n=Ei(t);return n||function(e){let t=e.parentElement;for(;t!==null;){if(Ei(t))return!0;t=t.parentElement}return!1}(t)?{node:n?xi():null}:{node:null}}function wi(){return{node:xi()}}function Ti(){return{node:null}}function Ei(e){return e.style.fontFamily.match(`monospace`)!==null}function Di(e){return e.classList.contains(`js-file-line-container`)}function Oi(e){let{anchor:n}=e;if(e.isCollapsed()&&n.type===`element`){let e=n.getNode();if(q(e)){let r=e.getChildrenSize();if(r>=2&&n.offset===r){let n=e.getLastChild();if((0,t.$isLineBreakNode)(n)&&(0,t.$isLineBreakNode)(n.getPreviousSibling())){let n=(0,t.$createParagraphNode)();return e.splice(r-2,2,[]).insertAfter(n,!1),n.select(),n}}}}return null}function ki(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function Ai(e=``,n){return(0,t.$applyNodeReplacement)(new Fi(e,n))}function J(e){return e instanceof Fi}var ji,Mi,Ni,Pi,Y,Fi,Ii,Li=j((()=>{fi(),ji=`javascript`,Mi=`data-language`,Ni=`data-highlight-language`,Pi=`data-theme`,Y=class e extends t.ElementNode{__language;__theme;__isSyntaxHighlightSupported;static getType(){return`code`}static clone(t){return new e(t.__language,t.__key)}constructor(e,t){super(t),this.__language=e||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}afterCloneFrom(e){super.afterCloneFrom(e),this.__language=e.__language,this.__theme=e.__theme,this.__isSyntaxHighlightSupported=e.__isSyntaxHighlightSupported}createDOM(e){let n=document.createElement(`code`);(0,t.addClassNamesToElement)(n,e.theme.code),n.setAttribute(`spellcheck`,`false`);let r=this.getLanguage();r&&(n.setAttribute(Mi,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(Ni,r));let i=this.getTheme();i&&n.setAttribute(Pi,i);let a=this.getStyle();return a&&(0,t.setDOMStyleFromCSS)(n.style,a),n}updateDOM(e,n,r){let i=this.__language,a=e.__language;i?i!==a&&n.setAttribute(Mi,i):a&&n.removeAttribute(Mi);let o=this.__isSyntaxHighlightSupported;e.__isSyntaxHighlightSupported&&a?o&&i?i!==a&&n.setAttribute(Ni,i):n.removeAttribute(Ni):o&&i&&n.setAttribute(Ni,i);let s=this.__theme,c=e.__theme;s?s!==c&&n.setAttribute(Pi,s):c&&n.removeAttribute(Pi);let l=this.__style,u=e.__style;return l!==u&&(0,t.setDOMStyleFromCSS)(n.style,l,u),!1}exportDOM(e){let n=document.createElement(`pre`);(0,t.addClassNamesToElement)(n,e._config.theme.code),n.setAttribute(`spellcheck`,`false`);let r=this.getLanguage();r&&(n.setAttribute(Mi,r),this.getIsSyntaxHighlightSupported()&&n.setAttribute(Ni,r));let i=this.getTheme();i&&n.setAttribute(Pi,i);let a=this.getStyle();return a&&(0,t.setDOMStyleFromCSS)(n.style,a),{element:n}}static importDOM(){return{code:e=>e.textContent!=null&&(/\r?\n/.test(e.textContent)||bi(e,`BR`))?{conversion:Si,priority:1}:null,div:()=>({conversion:Ci,priority:1}),pre:()=>({conversion:Si,priority:0}),table:e=>Di(e)?{conversion:wi,priority:3}:null,td:e=>{let t=e,n=t.closest(`table`);return t.classList.contains(`js-file-line`)||n&&Di(n)?{conversion:Ti,priority:3}:null},tr:e=>{let t=e.closest(`table`);return t&&Di(t)?{conversion:Ti,priority:3}:null}}}static importJSON(e){return xi().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setLanguage(e.language).setTheme(e.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(e,n=!0){if(!Ar((0,t.$getEditor)(),`@lexical/code`)){let t=Oi(e);if(t)return t}let{anchor:r,focus:i}=e,a=(r.isBefore(i)?r:i).getNode();if((0,t.$isTextNode)(a)){let e=hi(a),n=[];for(;;)if((0,t.$isTabNode)(e))n.push((0,t.$createTabNode)()),e=e.getNextSibling();else{if(!J(e))break;{let t=0,r=e.getTextContent(),i=e.getTextContentSize();for(;t<i&&r[t]===` `;)t++;if(t!==0&&n.push(Ai(` `.repeat(t))),t!==i)break;e=e.getNextSibling()}}let i=a.splitText(r.offset)[0],o=r.offset===0?0:1,s=i.getIndexWithinParent()+o,c=a.getParentOrThrow(),l=[(0,t.$createLineBreakNode)(),...n];c.splice(s,0,l);let u=n[n.length-1];u?u.select():r.offset===0?i.selectPrevious():i.getNextSibling().selectNext(0,0)}if(q(a)){let{offset:n}=e.anchor;a.splice(n,0,[(0,t.$createLineBreakNode)()]),a.select(n+1,n+1)}return null}canIndent(){return!1}collapseAtStart(){let e=(0,t.$createParagraphNode)();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}setLanguage(e){let t=this.getWritable();return t.__language=e||void 0,t}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(e){let t=this.getWritable();return t.__isSyntaxHighlightSupported=e,t}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(e){let t=this.getWritable();return t.__theme=e||void 0,t}getTheme(){return this.getLatest().__theme}},Fi=class e extends t.TextNode{__highlightType;constructor(e=``,t,n){super(e,n),this.__highlightType=t}static getType(){return`code-highlight`}static clone(t){return new e(t.__text,t.__highlightType||void 0,t.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__highlightType=e.__highlightType}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(e){let t=this.getWritable();return t.__highlightType=e||void 0,t}canHaveFormat(){return!1}createDOM(e){let n=super.createDOM(e);return(0,t.addClassNamesToElement)(n,ki(e.theme,this.__highlightType)),n}updateDOM(e,n,r){let i=super.updateDOM(e,n,r),a=ki(r.theme,e.__highlightType),o=ki(r.theme,this.__highlightType);return a!==o&&(a&&(0,t.removeClassNamesFromElement)(n,a),o&&(0,t.addClassNamesToElement)(n,o)),i}static importJSON(e){return Ai().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setHighlightType(e.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(e){return this}isParentRequired(){return!0}createParentElementNode(){return xi()}},Ii=(0,t.defineExtension)({name:`@lexical/code`,nodes:()=>[Y,Fi],register:e=>e.registerCommand(t.KEY_ENTER_COMMAND,e=>{let n=(0,t.$getSelection)();return!(!(0,t.$isRangeSelection)(n)||!Oi(n))&&(e.preventDefault(),!0)},t.COMMAND_PRIORITY_LOW)})})),Ri=`□`,zi=`x + y = z`;function Bi(e,t,n){let r=Array.from(e||t||Ri).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;return`calc(${Math.min(Math.max(r+1,a),o)}ch + 0.25rem)`}function Vi(e){return[`rj-editor-equation-visual`,`rj-editor-equation-visual--script`,e.position===`before`?`rj-editor-equation-visual--prescript`:``,e.superscript===void 0?``:`has-superscript`,e.subscript===void 0?``:`has-subscript`].filter(Boolean).join(` `)}function Hi(e){e.stopPropagation()}function Ui(e){let t=e.selectionStart??e.value.length;return{end:e.selectionEnd??t,start:t}}function Wi({className:e,inputRef:t,onActiveSlotChange:n,onSlotSelectionChange:r,onSlotChange:i,placeholder:a=Ri,slotId:o,value:s}){let c=e=>{Hi(e),n(o),r(o,Ui(e.currentTarget))};return(0,u.jsx)(`input`,{"aria-label":`Equation field`,className:[`rj-editor-equation-slot-input`,e||``].filter(Boolean).join(` `),onChange:e=>{i(o,e.target.value),r(o,Ui(e.currentTarget))},onClick:c,onFocus:c,onKeyDown:Hi,onKeyUp:c,onMouseDown:Hi,onSelect:c,placeholder:a,ref:t,size:Math.max(1,Math.min(Array.from(s||a).length+1,12)),style:{width:Bi(s,a,e)},type:`text`,value:s})}function Gi(e){return e===`absolute`?[`|`,`|`]:e===`angle`?[`⟨`,`⟩`]:e===`brace`?[`{`,`}`]:e===`ceiling`?[`⌈`,`⌉`]:e===`doubleAbsolute`?[`‖`,`‖`]:e===`floor`?[`⌊`,`⌋`]:e===`square`?[`[`,`]`]:[`(`,`)`]}function Ki(e){return{intersection:`⋂`,product:`∏`,summation:`∑`,union:`⋃`}[e]}function qi(e){return{contour:`∮`,double:`∫∫`,single:`∫`,triple:`∫∫∫`}[e||`single`]}var Ji=P.default.memo(function e({activeSlotId:t,activeSlotSelection:n,model:r,onActiveSlotChange:i,onSlotSelectionChange:a,onSlotChange:o,slotPrefix:s=``}){let c=P.default.useRef({}),l=P.default.useCallback(e=>t=>{c.current[e]=t},[]);P.default.useLayoutEffect(()=>{let e=c.current[t];if(!e)return;document.activeElement!==e&&e.focus();let r=Math.max(0,Math.min(n?.start??e.value.length,e.value.length)),i=Math.max(r,Math.min(n?.end??r,e.value.length));(e.selectionStart!==r||e.selectionEnd!==i)&&e.setSelectionRange(r,i)},[t,n,r]);let d=P.default.useCallback(e=>{let n=`${s}row.insert.${e}`;return(0,u.jsx)(`button`,{"aria-label":`Insert equation item`,className:[`rj-editor-equation-insert-point`,t===n?`is-active`:``].filter(Boolean).join(` `),onClick:e=>{e.preventDefault(),e.stopPropagation(),i(n)},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},type:`button`},n)},[t,i,s]),f=P.default.useCallback((r,c,d,f=Ri)=>{let p=`${s}${r}`;return c&&typeof c!=`string`?(0,u.jsx)(`span`,{className:`rj-editor-equation-nested`,children:(0,u.jsx)(e,{activeSlotId:t,activeSlotSelection:n,model:c,onActiveSlotChange:i,onSlotSelectionChange:a,onSlotChange:o,slotPrefix:`${p}>`})},p):(0,u.jsx)(Wi,{className:d,inputRef:l(p),onActiveSlotChange:i,onSlotSelectionChange:a,onSlotChange:o,placeholder:f,slotId:p,value:c||``},p)},[t,n,i,a,o,l,s]);if(r.kind===`accent`)return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--accent`,children:[(0,u.jsx)(`span`,{className:`rj-editor-equation-accent-mark`,children:{bar:`¯`,dot:`˙`,doubleDot:`¨`,hat:`ˆ`,vector:`⃗`}[r.accent]}),f(`accent.value`,r.value)]});if(r.kind===`bracket`){let[e,t]=Gi(r.bracket);return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--bracket`,children:[(0,u.jsx)(`span`,{className:`rj-editor-equation-bracket`,children:e}),f(`bracket.value`,r.value),(0,u.jsx)(`span`,{className:`rj-editor-equation-bracket`,children:t})]})}if(r.kind===`fraction`)return r.variant===`linear`||r.variant===`skewed`?(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--fraction-inline`,children:[f(`fraction.numerator`,r.numerator),(0,u.jsx)(`span`,{children:r.variant===`skewed`?`⁄`:`/`}),f(`fraction.denominator`,r.denominator)]}):(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--fraction`,children:[f(`fraction.numerator`,r.numerator),(0,u.jsx)(`span`,{className:`rj-editor-equation-fraction-line`}),f(`fraction.denominator`,r.denominator)]});if(r.kind===`function`)return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--function`,children:[(0,u.jsx)(`span`,{className:`rj-editor-equation-function-name`,children:r.functionName}),(0,u.jsx)(`span`,{children:`(`}),f(`function.argument`,r.argument,void 0,`x`),(0,u.jsx)(`span`,{children:`)`})]});if(r.kind===`integral`)return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--integral`,children:[(0,u.jsxs)(`span`,{className:`rj-editor-equation-limits`,children:[r.upper===void 0?(0,u.jsx)(`span`,{}):f(`integral.upper`,r.upper,`rj-editor-equation-slot-input--limit`,`b`),(0,u.jsx)(`span`,{className:`rj-editor-equation-large-symbol`,children:qi(r.variant)}),r.lower===void 0?(0,u.jsx)(`span`,{}):f(`integral.lower`,r.lower,`rj-editor-equation-slot-input--limit`,`a`)]}),f(`integral.body`,r.body,void 0,`f(x)`),(0,u.jsx)(`span`,{children:`d`}),f(`integral.variable`,r.variable,`rj-editor-equation-slot-input--small`,`x`)]});if(r.kind===`largeOperator`)return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--large-operator`,children:[(0,u.jsxs)(`span`,{className:`rj-editor-equation-limits`,children:[f(`largeOperator.upper`,r.upper,`rj-editor-equation-slot-input--limit`,`n`),(0,u.jsx)(`span`,{className:`rj-editor-equation-large-symbol`,children:Ki(r.operator)}),f(`largeOperator.lower`,r.lower,`rj-editor-equation-slot-input--limit`,`i=1`)]}),f(`largeOperator.body`,r.body,void 0,`i`)]});if(r.kind===`limit`)return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--limit`,children:[(0,u.jsxs)(`span`,{className:`rj-editor-equation-limits`,children:[(0,u.jsx)(`span`,{className:`rj-editor-equation-function-name`,children:`lim`}),f(`limit.target`,r.target,`rj-editor-equation-slot-input--limit`,`x→0`)]}),f(`limit.body`,r.body,void 0,`f(x)`)]});if(r.kind===`matrix`){let e=(0,u.jsx)(`span`,{className:`rj-editor-equation-matrix-grid`,style:{gridTemplateColumns:`repeat(${Math.max(...r.cells.map(e=>e.length),1)}, minmax(1.75rem, auto))`},children:r.cells.flatMap((e,t)=>e.map((e,n)=>f(`matrix.cells.${t}.${n}`,e,`rj-editor-equation-slot-input--matrix`)))});if(r.bracket===`none`)return(0,u.jsx)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--matrix`,children:e});let[t,n]=r.bracket===`determinant`?[`|`,`|`]:r.bracket===`round`?[`(`,`)`]:[`[`,`]`];return(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--matrix`,children:[(0,u.jsx)(`span`,{className:`rj-editor-equation-matrix-bracket`,children:t}),e,(0,u.jsx)(`span`,{className:`rj-editor-equation-matrix-bracket`,children:n})]})}return r.kind===`operator`?(0,u.jsx)(`span`,{className:`rj-editor-equation-visual`,children:f(`operator.value`,r.value)}):r.kind===`root`?(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--root`,children:[r.index===void 0?null:f(`root.index`,r.index,`rj-editor-equation-slot-input--root-index`,`n`),(0,u.jsx)(`span`,{className:`rj-editor-equation-root-symbol`,children:`√`}),(0,u.jsx)(`span`,{className:`rj-editor-equation-radicand`,children:f(`root.value`,r.value,void 0,`x`)})]}):r.kind===`script`?r.position===`before`?(0,u.jsxs)(`span`,{className:Vi(r),children:[(0,u.jsxs)(`span`,{className:`rj-editor-equation-script-stack`,children:[r.superscript===void 0?null:f(`script.superscript`,r.superscript,`rj-editor-equation-slot-input--script`,`n`),r.subscript===void 0?null:f(`script.subscript`,r.subscript,`rj-editor-equation-slot-input--script`,`1`)]}),f(`script.base`,r.base,void 0,`Y`)]}):(0,u.jsxs)(`span`,{className:Vi(r),children:[f(`script.base`,r.base,void 0,`x`),(0,u.jsxs)(`span`,{className:`rj-editor-equation-script-stack`,children:[r.superscript===void 0?null:f(`script.superscript`,r.superscript,`rj-editor-equation-slot-input--script`,`2`),r.subscript===void 0?null:f(`script.subscript`,r.subscript,`rj-editor-equation-slot-input--script`,`i`)]})]}):r.kind===`row`?(0,u.jsxs)(`span`,{className:`rj-editor-equation-visual rj-editor-equation-visual--row`,children:[d(0),r.items.map((r,c)=>(0,u.jsxs)(P.default.Fragment,{children:[(0,u.jsx)(e,{activeSlotId:t,activeSlotSelection:n,model:r,onActiveSlotChange:i,onSlotSelectionChange:a,onSlotChange:o,slotPrefix:`${s}row.items.${c}>`}),d(c+1)]},`${s}row.items.${c}`))]}):(0,u.jsx)(`span`,{className:`rj-editor-equation-visual`,children:f(`text.value`,r.value,void 0,s?Ri:zi)})});function Yi(e,n){let r=(0,t.$getNodeByKey)(e);ea(r)&&n(r)}var Xi=P.default.memo(function({displayMode:e,equation:n,nodeKey:r}){let[i]=(0,h.useLexicalComposerContext)(),a=In(),o=P.default.useRef(``),s=P.default.useRef({}),c=P.default.useRef(null),[l,d]=P.default.useState(``),[f,p]=P.default.useState(),[m,_,v]=(0,g.useLexicalNodeSelection)(r),y=P.default.useMemo(()=>xe(n),[n]),b=P.default.useMemo(()=>n.trim()?bn(n,e):``,[e,n]),x=P.default.useMemo(()=>!y&&!/[\\{}_^]/.test(n),[n,y]),S=P.default.useCallback(t=>{i.update(()=>{Yi(r,e=>{ea(e)&&e.setEquation(t)})}),a(kn({isEquationSelected:!0,selectedEquation:t,selectedEquationDisplayMode:e,selectedEquationKey:r}))},[a,e,i,r]),C=P.default.useCallback((e,t)=>{o.current=e,t&&(s.current[e]=t),d(e),p(t)},[]),w=P.default.useCallback((e,t)=>{s.current[e]=t,C(e,t)},[C]),T=P.default.useCallback(e=>{S(Se(e))},[S]),E=P.default.useCallback((e,t)=>{y&&T(ue(y,e,t))},[y,T]),D=P.default.useCallback(()=>{v(),_(!0),y&&C(o.current||I(y)),a(kn({isEquationSelected:!0,selectedEquation:n,selectedEquationDisplayMode:e,selectedEquationKey:r})),window.requestAnimationFrame(()=>{c.current?.focus()})},[v,a,e,n,y,r,C,_]);return P.default.useEffect(()=>{!m||!y||o.current||C(I(y))},[y,m,C]),P.default.useEffect(()=>{if(!m)return;let e=i.registerCommand(t.KEY_DELETE_COMMAND,e=>e.target instanceof HTMLInputElement?!1:(e.preventDefault(),i.update(()=>{Yi(r,e=>{e?.remove()})}),!0),t.COMMAND_PRIORITY_LOW),n=i.registerCommand(t.KEY_BACKSPACE_COMMAND,e=>e.target instanceof HTMLInputElement?!1:(e.preventDefault(),i.update(()=>{Yi(r,e=>{e?.remove()})}),!0),t.COMMAND_PRIORITY_LOW);return()=>{e(),n()}},[i,m,r]),P.default.useEffect(()=>{if(!m)return;let e=e=>{let t=e.detail;if(!t)return;let r=xe(t);if(r){if(y){let e=o.current||I(y),t=Fe(y,e,r,s.current[e]);C(t.activeSlotId),T(t.model);return}C(I(r)),T(r);return}if(y){let e=o.current||I(y),n=me(y,e,t,s.current[e]);C(n.activeSlotId,n.selection),T(n.model);return}let i=c.current;if(!i){S(`${n}${t}`);return}let a=i.selectionStart??i.value.length,l=i.selectionEnd??a,u=`${i.value.slice(0,a)}${t}${i.value.slice(l)}`,d=a+t.length;S(u),window.requestAnimationFrame(()=>{i.focus(),i.setSelectionRange(d,d)})};return window.addEventListener(Re,e),()=>{window.removeEventListener(Re,e)}},[n,y,m,C,T,S]),(0,u.jsx)(`span`,{className:[`rj-editor-equation`,`rj-editor-equation--${e}`,m?`is-selected`:``].filter(Boolean).join(` `),"data-display-mode":e,"data-equation":n,onClick:e=>{e.preventDefault(),e.stopPropagation(),D()},role:`button`,tabIndex:-1,children:m?(0,u.jsxs)(`span`,{className:`rj-editor-equation-editor`,children:[y?(0,u.jsx)(Ji,{activeSlotId:l||I(y),activeSlotSelection:f,model:y,onActiveSlotChange:C,onSlotSelectionChange:w,onSlotChange:E}):x?(0,u.jsx)(`input`,{"aria-label":`Formula value`,onChange:e=>S(e.target.value),onClick:e=>{e.stopPropagation()},onFocus:()=>{C(``)},onKeyDown:e=>{e.stopPropagation()},onMouseDown:e=>{e.stopPropagation()},placeholder:`x + y = z`,ref:c,type:`text`,value:n}):(0,u.jsx)(`span`,{className:`rj-editor-equation-visual-editor`,dangerouslySetInnerHTML:{__html:b}}),n.trim()&&x?(0,u.jsx)(`span`,{className:`rj-editor-equation-content`,dangerouslySetInnerHTML:{__html:b}}):null]}):(0,u.jsx)(`span`,{className:[`rj-editor-equation-content`,n.trim()?``:`is-empty`].filter(Boolean).join(` `),dangerouslySetInnerHTML:{__html:b||`<span>Formula qo‘shing</span>`}})})});function Zi(e){let t=e.getAttribute(`data-equation`);return t?{node:$i({displayMode:e.getAttribute(`data-display-mode`)===`inline`?`inline`:`block`,equation:t})}:null}var Qi=class e extends t.DecoratorNode{__displayMode;__equation;static clone(t){return new e(t.__equation,t.__displayMode,t.__key)}static getType(){return`equation`}static importDOM(){return{div:e=>e.hasAttribute(`data-equation`)?{conversion:Zi,priority:1}:null,span:e=>e.hasAttribute(`data-equation`)?{conversion:Zi,priority:1}:null}}static importJSON(e){return $i({displayMode:e.displayMode,equation:e.equation})}constructor(e,t=`block`,n){super(n),this.__equation=e,this.__displayMode=t}createDOM(e){let t=document.createElement(`span`);return t.className=e.theme.equation||`rj-editor-equation-node`,t}decorate(){return(0,u.jsx)(Xi,{displayMode:this.__displayMode,equation:this.__equation,nodeKey:this.__key})}exportDOM(){let e=this.__displayMode===`inline`?document.createElement(`span`):document.createElement(`div`);e.setAttribute(`data-equation`,this.__equation),e.setAttribute(`data-display-mode`,this.__displayMode);try{e.innerHTML=bn(this.__equation,this.__displayMode)}catch{e.textContent=this.__equation}return{element:e}}exportJSON(){return{displayMode:this.__displayMode,equation:this.__equation,type:`equation`,version:1}}getDisplayMode(){return this.getLatest().__displayMode}getEquation(){return this.getLatest().__equation}getTextContent(){return this.__equation}isInline(){return this.getLatest().__displayMode===`inline`}setDisplayMode(e){let t=this.getWritable();return t.__displayMode=e,t}setEquation(e){let t=this.getWritable();return t.__equation=e,t}updateDOM(){return!1}};function $i({displayMode:e=`block`,equation:t}){return new Qi(t,e)}function ea(e){return e instanceof Qi}Li();var ta=`data-rj-code-title`,na=`data-rj-code-custom-title`,ra=80;function ia(e){return e?.trim().slice(0,ra)||void 0}function aa(e,t){return ia(e)||t||`plain`}function oa(e,t,n){let r=ia(t);e.setAttribute(ta,aa(r,n)),r?e.setAttribute(na,r):e.removeAttribute(na)}function sa(e){return ia(e.getAttribute(`data-rj-code-custom-title`)||e.getAttribute(`data-rj-code-title`)||e.getAttribute(`data-title`))}function ca(e){return e?{...e,priority:Math.min((e.priority||0)+1,4),conversion:t=>{let n=e.conversion(t);if(!n)return n;let r=n.node,i=sa(t),a={...n};return!Array.isArray(r)&&q(r)&&(a.node=ma(r).setTitle(i)),a}}:null}var la=class e extends Y{__title;static clone(t){return new e(t.__language,t.__title,t.__key)}static getType(){return`extended-code`}static importDOM(){let e=Y.importDOM();return e?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,e=>ca(t(e))])):null}static importJSON(e){return ua().updateFromJSON(e)}constructor(e,t,n){super(e,n),this.__title=ia(t)}afterCloneFrom(e){super.afterCloneFrom(e),this.__title=e.__title}createDOM(e){let t=super.createDOM(e);return oa(t,this.getTitle(),this.getLanguage()),t}updateDOM(e,t,n){let r=e.__title!==this.__title||e.__language!==this.__language,i=super.updateDOM(e,t,n);return r&&oa(t,this.getTitle(),this.getLanguage()),i}exportDOM(e){let t=super.exportDOM(e);return t.element instanceof HTMLElement&&oa(t.element,this.getTitle(),this.getLanguage()),t}updateFromJSON(e){return super.updateFromJSON(e).setTitle(e.codeBlockTitle)}exportJSON(){return{...super.exportJSON(),codeBlockTitle:this.getTitle(),type:`extended-code`,version:1}}setTitle(e){let t=this.getWritable();return t.__title=ia(e),t}getTitle(){return this.getLatest().__title}getDisplayTitle(){return aa(this.getTitle(),this.getLanguage())}};function ua(e,n){return(0,t.$applyNodeReplacement)(new la(e,n))}function da(e){return e instanceof la}function fa(e){return da(e)?e.getTitle():void 0}function pa(e){return da(e)?e.getDisplayTitle():aa(void 0,e.getLanguage())}function ma(e){let t=new la(e.getLanguage(),fa(e));return t.setTheme(e.getTheme()),t.setStyle(e.getStyle()),t}var ha=[`b`,`code`,`em`,`font`,`i`,`mark`,`s`,`span`,`strong`,`sub`,`sup`,`u`];function ga(e){let t=[],n=e.style.backgroundColor,r=e.style.color||e.getAttribute(`color`)||``,i=Ye(e.style.fontFamily||e.getAttribute(`face`)||``),a=Ze(e.style.fontSize),o=e.style.lineHeight;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(`; `)}function _a(e,t){return e?t?`${e}; ${t}`:e:t}function va(e){return e?{...e,conversion:n=>{let r=e.conversion(n);if(!r)return r;let i=r.forChild,a=ga(n),o=n.tagName.toLowerCase()===`code`;return!a&&!o?r:{...r,forChild:(e,n)=>{let r=i?i(e,n):e;return(0,t.$isTextNode)(r)&&(a&&r.setStyle(_a(r.getStyle(),a)),o&&!r.hasFormat(`code`)&&r.toggleFormat(`code`)),r}}}}:null}function ya(e,t){return t.setDetail(e.getDetail()),t.setFormat(e.getFormat()),t.setMode(e.getMode()),t.setStyle(e.getStyle()),t}var ba=class e extends t.TextNode{static clone(t){return new e(t.__text,t.__key)}static getType(){return`extended-text`}static importDOM(){let e=t.TextNode.importDOM();if(!e)return null;let n={...e};return ha.forEach(t=>{let r=e[t];r&&(n[t]=e=>va(r(e)))}),n}static importJSON(e){return xa(e.text).updateFromJSON(e)}constructor(e=``,t){super(e,t)}exportJSON(){return{...super.exportJSON(),type:`extended-text`,version:1}}};function xa(e=``){return new ba(e)}function Sa(e){return ya(e,xa(e.getTextContent()))}function Ca(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M18 10H6M21 6H3M21 14H3M18 18H6`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function wa(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M16 10H3M20 6H3M20 14H3M16 18H3`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Ta(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 10H8M21 6H4M21 14H4M21 18H8`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Ea(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M9 3H15M3 6H21M19 6L18.2987 16.5193C18.1935 18.0975 18.1409 18.8867 17.8 19.485C17.4999 20.0118 17.0472 20.4353 16.5017 20.6997C15.882 21 15.0911 21 13.5093 21H10.4907C8.90891 21 8.11803 21 7.49834 20.6997C6.95276 20.4353 6.50009 20.0118 6.19998 19.485C5.85911 18.8867 5.8065 18.0975 5.70129 16.5193L5 6M10 10.5V15.5M14 10.5V15.5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var Da=P.default.createContext({isUploading:!1,uploadImage:dn});function Oa(){return P.default.useContext(Da).uploadImage}function ka(){return P.default.useContext(Da)}function Aa(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M8.54661 19.7675C10.9457 20.8319 13.8032 20.7741 16.2502 19.3613C20.3157 17.0141 21.7086 11.8156 19.3614 7.75008L19.1114 7.31706M4.63851 16.2502C2.2913 12.1847 3.68424 6.98619 7.74972 4.63898C10.1967 3.22621 13.0542 3.16841 15.4533 4.23277M2.49341 16.3338L5.22546 17.0659L5.95751 14.3338M18.0426 9.6659L18.7747 6.93385L21.5067 7.6659`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var ja=100,Ma=2e3,Na=10,Pa=32,Fa=42,Ia=340,La=12,Ra=[`top-left`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`];function za(e,n){let r=(0,t.$getNodeByKey)(e);to(r)&&n(r)}function Ba(e,t){let n=t?.getBoundingClientRect();if(!n)return{x:8,y:8};let r=e.clientX-n.left,i=e.clientY-n.top,a=Math.max(8,n.width-Ia-8),o=Math.max(8,n.height-Fa-8),s=r+La,c=i+La;return{x:Math.min(Math.max(s,8),a),y:Math.max(c>o?i-Fa-La:c,8)}}function Va({alignment:e,altText:n,aspectRatioLocked:r,borderEnabled:i,borderRadius:a,caption:o,height:s,linkUrl:c,nodeKey:l,objectFit:d,rotation:f,shadowEnabled:p,src:m,textWrap:_,width:v}){let[y]=(0,h.useLexicalComposerContext)(),b=U(),x=Oa(),S=In(),[C,w,T]=(0,g.useLexicalNodeSelection)(l),E=P.default.useRef(null),D=P.default.useRef(null),O=P.default.useRef(null),[k,A]=P.default.useState({x:0,y:0}),[ee,te]=P.default.useState(0),[ne,j]=P.default.useState(1),[M,re]=P.default.useState(!1),ie=(f%360+360)%360,N=ie===90||ie===270,ae=_===`square`&&e!==`center`;P.default.useEffect(()=>{let e=D.current?.parentElement;if(!e)return;let t=()=>{te(e.getBoundingClientRect().width)};if(t(),typeof ResizeObserver>`u`)return window.addEventListener(`resize`,t),()=>{window.removeEventListener(`resize`,t)};let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[]),P.default.useEffect(()=>{if(!C)return;let e=y.registerCommand(t.KEY_DELETE_COMMAND,e=>(e.preventDefault(),y.update(()=>{za(l,e=>{e?.remove()})}),!0),t.COMMAND_PRIORITY_LOW),n=y.registerCommand(t.KEY_BACKSPACE_COMMAND,e=>(e.preventDefault(),y.update(()=>{za(l,e=>{e?.remove()})}),!0),t.COMMAND_PRIORITY_LOW);return()=>{e(),n()}},[y,C,l]);let oe=e=>{y.update(()=>{za(l,t=>{to(t)&&t.setAlignment(e)})})},se=e=>{y.update(()=>{za(l,t=>{to(t)&&t.setWidth(Math.min(ja,Math.max(Na,e)))})})},ce=(e,t)=>{y.update(()=>{za(l,n=>{to(n)&&(n.setWidth(Math.min(ja,Math.max(Na,e))),n.setHeight(t===void 0?void 0:Math.min(Ma,Math.max(Pa,t))))})}),w(!0)},le=(e,t)=>{e.preventDefault(),e.stopPropagation(),w(!0);let n=D.current?.getBoundingClientRect(),r=D.current?.parentElement?.getBoundingClientRect()||n,i=O.current?.getBoundingClientRect();if(!r?.width||!i?.width||!i?.height)return;let a=e.clientX,o=e.clientY,c=v,l=s??i.height,u=i.width/i.height,d=e=>{let n=e.clientX-a,s=e.clientY-o,d=t.includes(`right`)?n:t.includes(`left`)?-n:0,f=t.includes(`bottom`)?s:t.includes(`top`)?-s:0;if(e.shiftKey){let e=Math.abs(d)>=Math.abs(f*u)?d:f*u,t=i.width+e;ce(c+e/r.width*100,t/u);return}ce(d===0?c:c+d/r.width*100,f===0?l:l+f)},f=()=>{window.removeEventListener(`pointermove`,d),window.removeEventListener(`pointerup`,f),y.focus(),window.requestAnimationFrame(()=>{w(!0)})};window.addEventListener(`pointermove`,d),window.addEventListener(`pointerup`,f)},ue=()=>{y.update(()=>{za(l,e=>{e?.remove()})})},de=async e=>{let t=e.target.files?.[0];if(e.target.value=``,!t)return;if(!t.type.startsWith(`image/`)){window.alert(b.alerts.onlyImages);return}if(t.size>5242880){window.alert(b.alerts.imageSizeLimit);return}let n=``;try{re(!0),n=await x(t)}catch(e){console.error(e),window.alert(b.alerts.imageUploadFailed);return}finally{re(!1)}y.update(()=>{za(l,e=>{to(e)&&(e.setSrc(n),e.setAltText(t.name))})})},fe=ee>0?ee*v/100:void 0,pe=s??(fe?fe/ne:void 0),me=N&&pe?pe:void 0,he=N&&fe?fe:void 0,ge={"--rj-image-rotated-aspect-ratio":`1 / ${ne}`,height:he?R(he):void 0,width:N&&me?R(me):ae?`100%`:`${v}%`},_e=ae?{maxWidth:`100%`,width:N&&me?R(me):`${v}%`}:void 0,ve=(0,u.jsx)(`img`,{alt:n,className:`rj-editor-image`,draggable:!1,onLoad:e=>{let t=e.currentTarget;t.naturalWidth&&t.naturalHeight&&j(t.naturalWidth/t.naturalHeight)},ref:O,src:m,style:{borderRadius:a,height:s?R(s):void 0,objectFit:d}}),ye={"--rj-image-rotation":`${f}deg`,height:N&&pe?R(pe):void 0,width:N&&fe?R(fe):void 0};return(0,u.jsxs)(`span`,{className:[`rj-editor-image-frame`,`rj-editor-image-frame--${e}`,`rj-editor-image-frame--wrap-${_}`,C?`is-selected`:``].filter(Boolean).join(` `),ref:D,style:_e,children:[C?(0,u.jsxs)(`span`,{className:`rj-editor-image-floating-toolbar`,onClick:e=>{e.stopPropagation()},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},style:{left:k.x,top:k.y},children:[(0,u.jsx)(`button`,{"aria-label":b.toolbar.image.alignLeft,onClick:()=>oe(`left`),type:`button`,children:(0,u.jsx)(wa,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":b.toolbar.image.alignCenter,onClick:()=>oe(`center`),type:`button`,children:(0,u.jsx)(Ca,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":b.toolbar.image.alignRight,onClick:()=>oe(`right`),type:`button`,children:(0,u.jsx)(Ta,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{onClick:()=>se(25),type:`button`,children:`25%`}),(0,u.jsx)(`button`,{onClick:()=>se(50),type:`button`,children:`50%`}),(0,u.jsx)(`button`,{onClick:()=>se(100),type:`button`,children:`100%`}),(0,u.jsx)(`button`,{"aria-busy":M,"aria-label":b.toolbar.image.replace,disabled:M,onClick:()=>void un(E.current),type:`button`,children:(0,u.jsx)(Aa,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":b.toolbar.image.delete,className:`rj-editor-toolbar--clear-btn`,onClick:ue,type:`button`,children:(0,u.jsx)(Ea,{"aria-hidden":`true`})})]}):null,(0,u.jsxs)(`span`,{className:[`rj-editor-image-box`,i?`has-border`:``,p?`has-shadow`:``,r?`is-aspect-ratio-locked`:``,N?`is-quarter-turn`:``].filter(Boolean).join(` `),onClick:t=>{t.preventDefault(),t.stopPropagation(),T(),w(!0),A(Ba(t,D.current)),S(An({isImageSelected:!0,selectedImageAlignment:e,selectedImageAltText:n,selectedImageAspectRatioLocked:r,selectedImageBorderEnabled:i,selectedImageBorderRadius:a,selectedImageCaption:o,selectedImageHeight:s,selectedImageKey:l,selectedImageLinkUrl:c,selectedImageObjectFit:d,selectedImageRotation:f,selectedImageShadowEnabled:p,selectedImageTextWrap:_,selectedImageWidth:v}))},style:ge,children:[(0,u.jsx)(`span`,{className:`rj-editor-image-rotator`,style:ye,children:c?(0,u.jsx)(`a`,{className:`rj-editor-image-link`,href:c,rel:`noreferrer`,target:`_blank`,children:ve}):ve}),o?(0,u.jsx)(`span`,{className:`rj-editor-image-caption`,children:o}):null,C?(0,u.jsx)(u.Fragment,{children:Ra.map(e=>(0,u.jsx)(`span`,{"aria-hidden":`true`,className:[`rj-editor-image-resize-handle`,`rj-editor-image-resize-handle--${e}`].join(` `),onPointerDown:t=>le(t,e)},e))}):null]}),(0,u.jsx)(`input`,{accept:`image/*`,className:`rj-editor-hidden-file-input`,onChange:de,ref:E,type:`file`})]})}function Ha(e){return e===`square`||e===`around`?`square`:`top-bottom`}function Ua(e){return e===`left`||e===`right`||e===`center`?e:`center`}function Wa(e){return e===`cover`||e===`fill`||e===`contain`?e:`contain`}function Ga(e){let t=Number.parseFloat(e||``);return Number.isFinite(t)?t:void 0}function Ka(e){let t=Ga(e.getAttribute(`data-width`));if(t!==void 0)return t;let n=e.closest(`[data-rj-image-caption-wrapper="true"], [data-rj-image-rotation-wrapper="true"]`),r=Ga(n?.style.width);if(r!==void 0&&n?.style.width.includes(`%`))return r;let i=Ga(e.style.width);return i!==void 0&&e.style.width.includes(`%`)?i:100}function qa(e){let t=e.getAttribute(`data-alignment`);if(t)return Ua(t);let n=e.closest(`[data-rj-image-caption-wrapper="true"], [data-rj-image-rotation-wrapper="true"]`)||e;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`}function Ja(e){let t=e.getAttribute(`data-text-wrap`);return t?Ha(t):(e.closest(`[data-rj-image-caption-wrapper="true"], [data-rj-image-rotation-wrapper="true"]`)||e).style.float?`square`:`top-bottom`}function Ya(e){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||``}function Xa(e){return e.getAttribute(`data-link-url`)||e.closest(`a`)?.href||``}function Za(e){if(!(e instanceof HTMLImageElement))return null;let t=e.getAttribute(`src`);return t?{node:eo({alignment:qa(e),altText:e.getAttribute(`alt`)||``,aspectRatioLocked:e.getAttribute(`data-aspect-ratio-locked`)!==`false`,borderEnabled:!!e.style.border,borderRadius:Ga(e.style.borderRadius)||0,caption:Ya(e),height:Ga(e.getAttribute(`data-height`))||Ga(e.style.height),linkUrl:Xa(e),objectFit:Wa(e.getAttribute(`data-object-fit`)||e.style.objectFit),rotation:Ga(e.getAttribute(`data-rotation`))||0,shadowEnabled:!!e.style.boxShadow,src:t,textWrap:Ja(e),width:Ka(e)})}:null}function Qa(e){let t=e.querySelector(`img`);return t?Za(t):null}var $a=class e extends t.DecoratorNode{__alignment;__aspectRatioLocked;__altText;__borderEnabled;__borderRadius;__caption;__height;__linkUrl;__objectFit;__rotation;__shadowEnabled;__src;__textWrap;__width;static clone(t){return new e(t.__src,t.__altText,t.__width,t.__alignment,t.__caption,t.__height,t.__linkUrl,t.__objectFit,t.__textWrap,t.__borderRadius,t.__borderEnabled,t.__shadowEnabled,t.__rotation,t.__aspectRatioLocked,t.__key)}static getType(){return`image`}static importDOM(){return{a:e=>!(e instanceof HTMLAnchorElement)||!e.querySelector(`img`)?null:{conversion:Qa,priority:2},img:()=>({conversion:Za,priority:0}),span:e=>!(e instanceof HTMLElement)||e.getAttribute(`data-rj-image-caption-wrapper`)!==`true`&&e.getAttribute(`data-rj-image-rotation-wrapper`)!==`true`?null:{conversion:Qa,priority:2}}}static importJSON(e){return eo({alignment:e.alignment,altText:e.altText,aspectRatioLocked:e.aspectRatioLocked,borderEnabled:e.borderEnabled,borderRadius:e.borderRadius,caption:e.caption,height:e.height,linkUrl:e.linkUrl,objectFit:e.objectFit,rotation:e.rotation,shadowEnabled:e.shadowEnabled,src:e.src,textWrap:Ha(e.textWrap),width:e.width})}constructor(e,t=``,n=100,r=`center`,i=``,a,o=``,s=`contain`,c=`top-bottom`,l=0,u=!1,d=!1,f=0,p=!0,m){super(m),this.__src=e,this.__altText=t,this.__width=n,this.__alignment=r,this.__caption=i,this.__height=a,this.__linkUrl=o,this.__objectFit=s,this.__textWrap=c,this.__borderRadius=l,this.__borderEnabled=u,this.__shadowEnabled=d,this.__rotation=f,this.__aspectRatioLocked=p}createDOM(e){let t=document.createElement(`span`);return t.className=e.theme.image||`rj-editor-image-node`,t}decorate(){return(0,u.jsx)(Va,{alignment:this.__alignment,altText:this.__altText,aspectRatioLocked:this.__aspectRatioLocked,borderEnabled:this.__borderEnabled,borderRadius:this.__borderRadius,caption:this.__caption,height:this.__height,linkUrl:this.__linkUrl,nodeKey:this.__key,objectFit:this.__objectFit,rotation:this.__rotation,shadowEnabled:this.__shadowEnabled,src:this.__src,textWrap:this.__textWrap,width:this.__width})}exportDOM(){let e=document.createElement(`img`);return e.setAttribute(`src`,this.__src),this.__altText&&e.setAttribute(`alt`,this.__altText),e.setAttribute(`data-alignment`,this.__alignment),e.setAttribute(`data-caption`,this.__caption),e.setAttribute(`data-height`,this.__height?String(this.__height):``),e.setAttribute(`data-link-url`,this.__linkUrl),e.setAttribute(`data-object-fit`,this.__objectFit),e.setAttribute(`data-rj-image-node-key`,this.__key),e.setAttribute(`data-rotation`,String(this.__rotation)),e.setAttribute(`data-text-wrap`,this.__textWrap),e.setAttribute(`data-width`,String(this.__width)),e.setAttribute(`data-aspect-ratio-locked`,String(this.__aspectRatioLocked)),e.style.display=`block`,e.style.borderRadius=R(this.__borderRadius),e.style.maxWidth=`100%`,e.style.objectFit=this.__objectFit,e.style.transform=`rotate(${this.__rotation}deg)`,e.style.width=`${this.__width}%`,this.__textWrap===`square`&&this.__alignment===`left`&&(e.style.float=`left`,e.style.margin=`0.25rem 1rem 0.625rem 0`),this.__textWrap===`square`&&this.__alignment===`right`&&(e.style.float=`right`,e.style.margin=`0.25rem 0 0.625rem 1rem`),this.__textWrap!==`square`&&this.__alignment===`center`&&(e.style.marginLeft=`auto`,e.style.marginRight=`auto`),this.__textWrap!==`square`&&this.__alignment===`right`&&(e.style.marginLeft=`auto`,e.style.marginRight=`0`),this.__textWrap!==`square`&&this.__alignment===`left`&&(e.style.marginLeft=`0`,e.style.marginRight=`auto`),this.__borderEnabled&&(e.style.border=`0.0625rem solid #94a3b8`),this.__shadowEnabled&&(e.style.boxShadow=`0 0.875rem 2rem rgb(15 23 42 / 18%)`),this.__height&&(e.style.height=R(this.__height)),{element:e}}exportJSON(){return{alignment:this.__alignment,aspectRatioLocked:this.__aspectRatioLocked,altText:this.__altText,borderEnabled:this.__borderEnabled,borderRadius:this.__borderRadius,caption:this.__caption,height:this.__height,linkUrl:this.__linkUrl,objectFit:this.__objectFit,rotation:this.__rotation,shadowEnabled:this.__shadowEnabled,src:this.__src,textWrap:this.__textWrap,type:`image`,version:1,width:this.__width}}getAlignment(){return this.getLatest().__alignment}getAltText(){return this.getLatest().__altText}getAspectRatioLocked(){return this.getLatest().__aspectRatioLocked}getBorderEnabled(){return this.getLatest().__borderEnabled}getBorderRadius(){return this.getLatest().__borderRadius}getCaption(){return this.getLatest().__caption}getLinkUrl(){return this.getLatest().__linkUrl}getHeight(){return this.getLatest().__height}getObjectFit(){return this.getLatest().__objectFit}getRotation(){return this.getLatest().__rotation}getShadowEnabled(){return this.getLatest().__shadowEnabled}getSrc(){return this.getLatest().__src}getTextWrap(){return this.getLatest().__textWrap}getWidth(){return this.getLatest().__width}setAlignment(e){let t=this.getWritable();return t.__alignment=e,t}setAltText(e){let t=this.getWritable();return t.__altText=e,t}setAspectRatioLocked(e){let t=this.getWritable();return t.__aspectRatioLocked=e,t}setBorderEnabled(e){let t=this.getWritable();return t.__borderEnabled=e,t}setBorderRadius(e){let t=this.getWritable();return t.__borderRadius=e,t}setCaption(e){let t=this.getWritable();return t.__caption=e,t}setLinkUrl(e){let t=this.getWritable();return t.__linkUrl=e,t}setHeight(e){let t=this.getWritable();return t.__height=e,t}setObjectFit(e){let t=this.getWritable();return t.__objectFit=e,t}setRotation(e){let t=this.getWritable();return t.__rotation=e,t}setShadowEnabled(e){let t=this.getWritable();return t.__shadowEnabled=e,t}setSrc(e){let t=this.getWritable();return t.__src=e,t}setTextWrap(e){let t=this.getWritable();return t.__textWrap=e,t}setWidth(e){let t=this.getWritable();return t.__width=e,t}getTextContent(){return this.__altText}isInline(){return!1}updateDOM(){return!1}};function eo({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}){return new $a(d,n,p,e,a,o,s,c,f,i,r,u,l,t)}function to(e){return e instanceof $a}function no(e){let n=(0,t.$getNodeByKey)(e);so(n)&&n.remove()}var ro=P.default.memo(function({nodeKey:e,title:n,videoId:r}){let[i]=(0,h.useLexicalComposerContext)(),[a,o,s]=(0,g.useLexicalNodeSelection)(e),c=n||`YouTube video`;return P.default.useEffect(()=>{if(!a)return;let n=i.registerCommand(t.KEY_DELETE_COMMAND,t=>(t.preventDefault(),i.update(()=>no(e)),!0),t.COMMAND_PRIORITY_LOW),r=i.registerCommand(t.KEY_BACKSPACE_COMMAND,t=>(t.preventDefault(),i.update(()=>no(e)),!0),t.COMMAND_PRIORITY_LOW);return()=>{n(),r()}},[i,a,e]),(0,u.jsx)(`div`,{className:[`rj-editor-youtube`,a?`is-selected`:``].filter(Boolean).join(` `),onClick:e=>{e.preventDefault(),e.stopPropagation(),s(),o(!0)},role:`presentation`,children:(0,u.jsx)(`iframe`,{allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`,allowFullScreen:!0,loading:`lazy`,referrerPolicy:`strict-origin-when-cross-origin`,src:`https://www.youtube-nocookie.com/embed/${r}`,title:c})})});function io(e){let t=Oe(e.getAttribute(`data-youtube-video-id`)||e.getAttribute(`src`)||``);return t?{node:oo({title:e.getAttribute(`title`)||``,videoId:t})}:null}var ao=class e extends t.DecoratorNode{__title;__videoId;static clone(t){return new e(t.__videoId,t.__title,t.__key)}static getType(){return`youtube`}static importDOM(){return{iframe:e=>Oe(e.getAttribute(`src`)||``)?{conversion:io,priority:1}:null}}static importJSON(e){return oo({title:e.title,videoId:e.videoId})}constructor(e,t=``,n){super(n),this.__videoId=e,this.__title=t}createDOM(e){let t=document.createElement(`div`);return t.className=e.theme.youtube||`rj-editor-youtube-node`,t}decorate(){return(0,u.jsx)(ro,{nodeKey:this.__key,title:this.__title,videoId:this.__videoId})}exportDOM(){let e=document.createElement(`div`),t=document.createElement(`iframe`);return e.className=`rj-editor-youtube`,e.style.aspectRatio=`16 / 9`,e.style.background=`#f8fafc`,e.style.border=`0.0625rem solid #d9dde5`,e.style.borderRadius=`0.5rem`,e.style.maxWidth=`45rem`,e.style.overflow=`hidden`,e.style.width=`100%`,t.setAttribute(`allow`,`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`),t.setAttribute(`allowfullscreen`,`true`),t.setAttribute(`data-youtube-video-id`,this.__videoId),t.setAttribute(`loading`,`lazy`),t.setAttribute(`referrerpolicy`,`strict-origin-when-cross-origin`),t.setAttribute(`src`,`https://www.youtube-nocookie.com/embed/${this.__videoId}`),t.setAttribute(`title`,this.__title||`YouTube video`),t.style.border=`0`,t.style.display=`block`,t.style.height=`100%`,t.style.width=`100%`,e.append(t),{element:e}}exportJSON(){return{title:this.__title,type:`youtube`,version:1,videoId:this.__videoId}}getTextContent(){return`https://www.youtube.com/watch?v=${this.__videoId}`}getTitle(){return this.getLatest().__title}getVideoId(){return this.getLatest().__videoId}isInline(){return!1}setTitle(e){let t=this.getWritable();return t.__title=e,t}updateDOM(){return!1}};function oo({title:e=``,videoId:t}){return new ao(t,e)}function so(e){return e instanceof ao}var co={code:`rj-editor-code-block`,codeHighlight:{atrule:`rj-editor-code-token-atrule`,attr:`rj-editor-code-token-attr`,"attr-name":`rj-editor-code-token-attr`,"attr-value":`rj-editor-code-token-string`,boolean:`rj-editor-code-token-boolean`,builtin:`rj-editor-code-token-builtin`,char:`rj-editor-code-token-char`,class:`rj-editor-code-token-class`,"class-name":`rj-editor-code-token-class-name`,comment:`rj-editor-code-token-comment`,constant:`rj-editor-code-token-constant`,deleted:`rj-editor-code-token-deleted`,entity:`rj-editor-code-token-entity`,function:`rj-editor-code-token-function`,important:`rj-editor-code-token-important`,inserted:`rj-editor-code-token-inserted`,keyword:`rj-editor-code-token-keyword`,namespace:`rj-editor-code-token-namespace`,number:`rj-editor-code-token-number`,operator:`rj-editor-code-token-operator`,prolog:`rj-editor-code-token-comment`,property:`rj-editor-code-token-property`,punctuation:`rj-editor-code-token-punctuation`,regex:`rj-editor-code-token-regex`,selector:`rj-editor-code-token-selector`,string:`rj-editor-code-token-string`,symbol:`rj-editor-code-token-symbol`,tag:`rj-editor-code-token-tag`,url:`rj-editor-code-token-url`,variable:`rj-editor-code-token-variable`},paragraph:`rj-editor-paragraph`,text:{bold:`rj-editor-text-bold`,code:`rj-editor-text-code`,italic:`rj-editor-text-italic`,strikethrough:`rj-editor-text-strikethrough`,subscript:`rj-editor-text-subscript`,superscript:`rj-editor-text-superscript`,underline:`rj-editor-text-underline`},list:{ol:`rj-editor-list-ol`,ul:`rj-editor-list-ul`,listitem:`rj-editor-list-item`},equation:`rj-editor-equation-node`,image:`rj-editor-image-node`,youtube:`rj-editor-youtube-node`,table:`rj-editor-table`,tableCell:`rj-editor-table-cell`,tableCellHeader:`rj-editor-table-cell-header`,tableCellSelected:`rj-editor-table-cell-selected`,tableRow:`rj-editor-table-row`,tableScrollableWrapper:`rj-editor-table-scrollable-wrapper`,tableSelection:`rj-editor-table-selection`};Li();function lo({defaultValue:e,namespace:n,value:r}){return{namespace:n,nodes:[Y,Fi,la,{replace:Y,with:ma,withKlass:la},ba,{replace:t.TextNode,with:Sa,withKlass:ba},Qi,$a,ao,d.LinkNode,f.ListNode,f.ListItemNode,p.TableCellNode,p.TableNode,p.TableRowNode],onError(e){throw e},editorState:r||e?t=>wn(t,r||e||``):void 0,theme:co}}function uo(e){return`${e.type||`application/octet-stream`}:${e.size}`}function fo({children:e,onImageUpload:t}){let n=t||dn,r=P.default.useRef(new Map),[i,a]=P.default.useState(0),o=P.default.useCallback(async e=>{let t=uo(e),i=r.current.get(t);if(i)return i;let o=(async()=>n(e))();r.current.set(t,o),a(e=>e+1);try{return await o}finally{r.current.delete(t),a(e=>Math.max(0,e-1))}},[n]),s=P.default.useMemo(()=>({isUploading:i>0,uploadImage:o}),[i,o]);return(0,u.jsx)(Da.Provider,{value:s,children:e})}function po(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M6 9L12 15L18 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function mo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{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`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}Li();var ho=250,go=8,_o=48,vo=80,yo=[{label:`Plain Text`,value:`plain`},{label:`Terminal`,value:`terminal`},{label:`JSON`,value:`json`},{label:`Bash`,value:`bash`},{label:`Shell`,value:`shell`},{label:`PNPM`,value:`pnpm`},{label:`NPM`,value:`npm`},{label:`Yarn`,value:`yarn`},{label:`Bun`,value:`bun`},{label:`C`,value:`c`},{label:`C++`,value:`cpp`},{label:`CSS`,value:`css`},{label:`Diff`,value:`diff`},{label:`Dockerfile`,value:`dockerfile`},{label:`HTML`,value:`html`},{label:`Java`,value:`java`},{label:`JavaScript`,value:`js`},{label:`JSX`,value:`jsx`},{label:`Markdown`,value:`markdown`},{label:`Objective-C`,value:`objc`},{label:`PowerShell`,value:`powershell`},{label:`Python`,value:`py`},{label:`Rust`,value:`rust`},{label:`SQL`,value:`sql`},{label:`Swift`,value:`swift`},{label:`TypeScript`,value:`typescript`},{label:`TSX`,value:`tsx`},{label:`XML`,value:`xml`},{label:`YAML`,value:`yaml`}],bo={algorithm:o.theme.darkAlgorithm,token:{colorBgContainer:`#181818`,colorBgElevated:`#202020`,colorBorder:`#4a4a4a`,colorFillSecondary:`#303030`,colorPrimary:`#b8b8b8`,colorText:`#ededed`,colorTextPlaceholder:`#8f8f8f`,colorTextSecondary:`#b8b8b8`}};function xo(e){return e.trim().slice(0,_o)||`plain`}function So(e){return e.trim().slice(0,vo)}function Co({displayTitle:e,editor:n,language:r,nodeKey:i,title:a}){let s=U(),c=P.default.useRef(null),l=P.default.useRef(!1),[d,f]=P.default.useState(!1),[p,m]=P.default.useState(!1),[h,g]=P.default.useState({displayTitle:e,nodeKey:i,title:a,value:e}),[_,v]=P.default.useState({left:0,top:0,visible:!1,width:ho}),y=P.default.useCallback(()=>{let e=n.getElementByKey(i),t=n.getRootElement()?.closest(`.rj-editor-body`);if(!(e instanceof HTMLElement)||!(t instanceof HTMLElement)){v(e=>e.visible?{...e,visible:!1}:e);return}let r=t.getBoundingClientRect(),a=e.getBoundingClientRect(),o=Math.max(ho,a.width-go*2),s={left:Math.max(a.left-r.left+go,go),top:Math.max(a.top-r.top+go,go),visible:!0,width:Math.min(o,r.width-go*2)};v(e=>e.left===s.left&&e.top===s.top&&e.visible===s.visible&&e.width===s.width?e:s)},[n,i]),b=p&&h.nodeKey===i?h.value:e;P.default.useEffect(()=>{let e=window.requestAnimationFrame(y),t=n.getElementByKey(i),r=n.getRootElement()?.closest(`.rj-editor-body`),a=typeof ResizeObserver>`u`?null:new ResizeObserver(y);return t&&a?.observe(t),r&&a?.observe(r),c.current&&a?.observe(c.current),window.addEventListener(`resize`,y),document.addEventListener(`scroll`,y,!0),()=>{window.cancelAnimationFrame(e),a?.disconnect(),window.removeEventListener(`resize`,y),document.removeEventListener(`scroll`,y,!0)}},[n,i,y]),P.default.useEffect(()=>{if(!d)return;let e=window.setTimeout(()=>f(!1),1600);return()=>window.clearTimeout(e)},[d]);let x=async()=>{let e=``;n.getEditorState().read(()=>{let n=(0,t.$getNodeByKey)(i);q(n)&&(e=n.getTextContent())}),await ge(e),f(!0)},S=e=>{let r=xo(e);n.update(()=>{let e=(0,t.$getNodeByKey)(i);q(e)&&e.setLanguage(r)})},C=e=>{let a=So(e);g({displayTitle:a||r,nodeKey:i,title:a||void 0,value:a||r}),n.update(()=>{let e=(0,t.$getNodeByKey)(i);if(da(e)){e.setTitle(a);return}if(q(e)){let t=ua(e.getLanguage(),a);t.setTheme(e.getTheme()),t.setStyle(e.getStyle()),e.replace(t,!0)}})};return _.visible?(0,u.jsxs)(`div`,{className:`rj-editor-code-block-actions`,contentEditable:!1,onMouseDown:e=>e.stopPropagation(),ref:c,style:{left:_.left,top:_.top,width:_.width},children:[(0,u.jsxs)(`label`,{className:`rj-editor-code-block-title-control`,children:[(0,u.jsx)(`span`,{"aria-hidden":`true`,children:`>_`}),(0,u.jsx)(`input`,{"aria-label":s.toolbar.codeBlock.title,onBlur:()=>{if(l.current){l.current=!1,m(!1);return}C(b),m(!1)},onChange:t=>{g({displayTitle:e,nodeKey:i,title:a,value:t.target.value})},onFocus:()=>{m(!0),g({displayTitle:e,nodeKey:i,title:a,value:e})},onKeyDown:t=>{t.stopPropagation(),t.key===`Enter`&&(t.preventDefault(),t.currentTarget.blur()),t.key===`Escape`&&(t.preventDefault(),l.current=!0,m(!1),g({displayTitle:e,nodeKey:i,title:a,value:e}),t.currentTarget.blur())},title:s.toolbar.codeBlock.title,type:`text`,value:b})]}),(0,u.jsxs)(`div`,{className:`rj-editor-code-block-action-controls`,children:[(0,u.jsx)(o.ConfigProvider,{theme:bo,children:(0,u.jsx)(o.Select,{suffixIcon:(0,u.jsx)(po,{}),"aria-label":s.toolbar.codeBlock.language,className:`rj-editor-code-block-language-select`,classNames:{popup:{root:`rj-editor-code-block-language-popup`}},filterOption:(e,t)=>String(t?.label||t?.value||``).toLowerCase().includes(e.toLowerCase()),onChange:e=>S(e),options:yo,popupMatchSelectWidth:!1,showSearch:!0,size:`small`,value:r})}),(0,u.jsx)(`button`,{"aria-label":d?s.toolbar.codeBlock.copied:s.toolbar.codeBlock.copy,className:d?`is-copied`:void 0,onClick:()=>void x(),title:d?s.toolbar.codeBlock.copied:s.toolbar.codeBlock.copy,type:`button`,children:(0,u.jsx)(mo,{"aria-hidden":`true`})})]})]}):null}Li();function wo(e,n=[]){return q(e)&&n.push(e),(0,t.$isElementNode)(e)&&e.getChildren().forEach(e=>{wo(e,n)}),n}function To(e,t){return e.length===t.length&&e.every((e,n)=>{let r=t[n];return e.displayTitle===r?.displayTitle&&e.key===r.key&&e.language===r.language&&e.title===r.title})}function Eo(){let[e]=(0,h.useLexicalComposerContext)(),[n,r]=P.default.useState([]);return P.default.useEffect(()=>{let n=()=>{let e=wo((0,t.$getRoot)()).map(e=>({displayTitle:pa(e),key:e.getKey(),language:e.getLanguage()||`plain`,title:fa(e)}));r(t=>To(t,e)?t:e)};return e.getEditorState().read(n),e.registerUpdateListener(({editorState:e})=>{e.read(n)})},[e]),n.map(t=>(0,u.jsx)(Co,{editor:e,displayTitle:t.displayTitle,language:t.language,nodeKey:t.key,title:t.title},t.key))}function Do(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 10H3M21 18H3M21 6H3M21 14H3`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Oo({editor:e}){let n=U(),r=H(e=>e.toolbar.alignment),i=r===``||r===`start`?`left`:r===`end`?`right`:r;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":n.toolbar.alignment.left,"aria-pressed":i===`left`,className:i===`left`?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`left`),title:F(`MOD+SHIFT+L`,n.toolbar.alignment.left),type:`button`,children:(0,u.jsx)(wa,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.alignment.center,"aria-pressed":i===`center`,className:i===`center`?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`center`),title:F(`MOD+SHIFT+C`,n.toolbar.alignment.center),type:`button`,children:(0,u.jsx)(Ca,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.alignment.right,"aria-pressed":i===`right`,className:i===`right`?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`right`),title:F(`MOD+SHIFT+R`,n.toolbar.alignment.right),type:`button`,children:(0,u.jsx)(Ta,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.alignment.justify,"aria-pressed":i===`justify`,className:i===`justify`?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`justify`),title:F(`MOD+SHIFT+J`,n.toolbar.alignment.justify),type:`button`,children:(0,u.jsx)(Do,{})})]})}function ko(){return(0,u.jsx)(`span`,{className:`rj-editor-toolbar-divider`})}function Ao(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M3 9H16.5C18.9853 9 21 11.0147 21 13.5C21 15.9853 18.9853 18 16.5 18H12M7 13L3 9L7 5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function jo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 9H7.5C5.01472 9 3 11.0147 3 13.5C3 15.9853 5.01472 18 7.5 18H12M17 13L21 9L17 5`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Mo({editor:e}){let n=U(),{canRedo:r,canUndo:i}=H(e=>e.toolbar);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":n.toolbar.history.undo,disabled:!i,onClick:()=>e.dispatchCommand(t.UNDO_COMMAND,void 0),title:F(`MOD+Z`,n.toolbar.shortcuts.undo),type:`button`,children:(0,u.jsx)(Ao,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.history.redo,disabled:!r,onClick:()=>e.dispatchCommand(t.REDO_COMMAND,void 0),title:F(`MOD+Y`,n.toolbar.shortcuts.redo),type:`button`,children:(0,u.jsx)(jo,{})})]})}function No(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 9.25H12M21 4H3M21 14.75H12M21 20H3M4.28 8.56L8.14667 11.46C8.43616 11.6771 8.5809 11.7857 8.63266 11.9188C8.678 12.0353 8.678 12.1647 8.63266 12.2812C8.5809 12.4143 8.43616 12.5229 8.14667 12.74L4.28 15.64C3.86802 15.949 3.66203 16.1035 3.48961 16.0999C3.33956 16.0968 3.19885 16.0264 3.10632 15.9082C3 15.7725 3 15.515 3 15V9.2C3 8.68503 3 8.42754 3.10632 8.29175C3.19885 8.17358 3.33956 8.10323 3.48961 8.10011C3.66203 8.09652 3.86802 8.25102 4.28 8.56Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Po(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 4H3M21 20H3M12 9.25H3M12 14.75H3M19.72 8.46L15.8533 11.36C15.5638 11.5771 15.4191 11.6857 15.3673 11.8188C15.322 11.9353 15.322 12.0647 15.3673 12.1812C15.4191 12.3143 15.5638 12.4229 15.8533 12.64L19.72 15.54C20.132 15.849 20.338 16.0035 20.5104 15.9999C20.6604 15.9968 20.8012 15.9264 20.8937 15.8082C21 15.6725 21 15.415 21 14.9V9.1C21 8.58503 21 8.32754 20.8937 8.19175C20.8012 8.07358 20.6604 8.00323 20.5104 8.00011C20.338 7.99652 20.132 8.15102 19.72 8.46Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Fo(){let[e]=(0,h.useLexicalComposerContext)(),n=U();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":n.toolbar.shortcuts.increaseIndent,onClick:()=>e.dispatchCommand(t.INDENT_CONTENT_COMMAND,void 0),title:F(`MOD+]`,n.toolbar.shortcuts.increaseIndent),type:`button`,children:(0,u.jsx)(No,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.shortcuts.decreaseIndent,onClick:()=>e.dispatchCommand(t.OUTDENT_CONTENT_COMMAND,void 0),title:F(`MOD+[`,n.toolbar.shortcuts.decreaseIndent),type:`button`,children:(0,u.jsx)(Po,{"aria-hidden":`true`})})]})}function Io(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 5.00001L10 5.00001M21 19L10 19M21 12L12 12M6 5.00001C5.5 5.00004 5.32843 5.00001 4.5 5.00001C3.67157 5.00001 3.5 4.99999 3 5.00001M6 19C5.5 19 5.32843 19 4.5 19C3.67157 19 3.5 19 3 19M11 8C9 10 7 12 7 12M7 12C7 12 5 10 3 8M7 12C7 12 9 14 11 16M7 12C7 12 5 14 3 16`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Lo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 12L9 12M21 6L9 6M21 18L9 18M5 12C5 12.5523 4.55228 13 4 13C3.44772 13 3 12.5523 3 12C3 11.4477 3.44772 11 4 11C4.55228 11 5 11.4477 5 12ZM5 6C5 6.55228 4.55228 7 4 7C3.44772 7 3 6.55228 3 6C3 5.44772 3.44772 5 4 5C4.55228 5 5 5.44772 5 6ZM5 18C5 18.5523 4.55228 19 4 19C3.44772 19 3 18.5523 3 18C3 17.4477 3.44772 17 4 17C4.55228 17 5 17.4477 5 18Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Ro(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 5.00001L10 5.00001M21 19L10 19M21 12L10 12M6 5.00001C5.5 5.00004 5.32843 5.00001 4.5 5.00001C3.67157 5.00001 3.5 4.99999 3 5.00001M6 19C5.5 19 5.32843 19 4.5 19C3.67157 19 3.5 19 3 19M6 12C5.5 12 5.32843 12 4.5 12C3.67157 12 3.5 12 3 12`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function zo({editor:e}){let t=U(),n=H(e=>e.toolbar.listType);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.list.bullet,"aria-pressed":n===`bullet`,className:n===`bullet`?`is-active`:void 0,onClick:()=>e.dispatchCommand(f.INSERT_UNORDERED_LIST_COMMAND,void 0),title:F(`MOD+SHIFT+8`,t.toolbar.shortcuts.bulletList),type:`button`,children:(0,u.jsx)(Lo,{})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.list.numbered,"aria-pressed":n===`number`,className:n===`number`?`is-active`:void 0,onClick:()=>e.dispatchCommand(f.INSERT_ORDERED_LIST_COMMAND,void 0),title:F(`MOD+SHIFT+7`,t.toolbar.shortcuts.numberedList),type:`button`,children:(0,u.jsx)(Ro,{})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.list.remove,"aria-pressed":n===void 0?void 0:!1,onClick:()=>e.dispatchCommand(f.REMOVE_LIST_COMMAND,void 0),title:t.toolbar.shortcuts.removeList,type:`button`,className:`rj-editor-toolbar--clear-btn`,children:(0,u.jsx)(Io,{})})]})}function Bo(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 10H13M21 6H13M21 14H13M21 18H13M6 20L6 4M9 17L6 20L3 17M9 7L6 4L3 7`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Vo(e,n){e.focus(()=>{e.update(()=>{let e=(0,t.$getSelection)();(0,t.$isRangeSelection)(e)&&(0,E.$patchStyleText)(e,n)})})}function Ho(e){e.update(()=>{let e=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(e))return;(0,E.$patchStyleText)(e,{"background-color":null,color:null,"font-family":null,"font-size":null,"line-height":null}),[`bold`,`capitalize`,`code`,`highlight`,`italic`,`lowercase`,`strikethrough`,`subscript`,`superscript`,`underline`,`uppercase`].forEach(t=>{e.hasFormat(t)&&e.formatText(t)}),e.setFormat(0),(0,f.$isListNode)((0,m.$getNearestNodeOfType)(e.anchor.getNode(),f.ListNode))&&(0,f.$removeList)(),(0,E.$setBlocksType)((0,t.$getSelection)(),t.$createParagraphNode,(e,t)=>{t.setFormat(``),t.setIndent(0),t.setDirection(null)});let n=(0,t.$getSelection)();(0,t.$isRangeSelection)(n)&&n.getNodes().forEach(e=>{let n=e.getTopLevelElement();(0,t.$isElementNode)(n)&&(n.setFormat(``),n.setIndent(0),n.setDirection(null))})})}function Uo(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=In(),r=H(e=>e.toolbar),i=t=>{Vo(e,{"line-height":t||null}),n(jn({...r,lineHeight:t}))};return(0,u.jsx)(o.Dropdown,{menu:{items:[{key:`default`,label:(0,u.jsx)(`button`,{className:`rj-editor-spacing-menu-item`,onClick:()=>i(void 0),type:`button`,children:t.toolbar.spacing.default})},{type:`divider`},...Ge.map(e=>({key:e,label:(0,u.jsx)(`button`,{className:`rj-editor-spacing-menu-item`,onClick:()=>i(e),type:`button`,children:e})}))]},trigger:[`click`],children:(0,u.jsx)(`button`,{"aria-label":t.toolbar.spacing.lineAndParagraph,className:r.lineHeight?`is-active`:void 0,title:t.toolbar.shortcuts.spacing,type:`button`,children:(0,u.jsx)(Bo,{"aria-hidden":`true`})})})}function Wo(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M2 12C2 17.5228 6.47715 22 12 22C13.6569 22 15 20.6569 15 19V18.5C15 18.0356 15 17.8034 15.0257 17.6084C15.2029 16.2622 16.2622 15.2029 17.6084 15.0257C17.8034 15 18.0356 15 18.5 15H19C20.6569 15 22 13.6569 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M7 13C7.55228 13 8 12.5523 8 12C8 11.4477 7.55228 11 7 11C6.44772 11 6 11.4477 6 12C6 12.5523 6.44772 13 7 13Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M16 9C16.5523 9 17 8.55228 17 8C17 7.44772 16.5523 7 16 7C15.4477 7 15 7.44772 15 8C15 8.55228 15.4477 9 16 9Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M10 8C10.5523 8 11 7.55228 11 7C11 6.44772 10.5523 6 10 6C9.44772 6 9 6.44772 9 7C9 7.55228 9.44772 8 10 8Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Go(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),[n,r]=(0,P.useState)(!1),[i,a]=(0,P.useState)(null),s=In(),c=H(e=>e.toolbar),l=c.backgroundColor,d=t=>{Vo(e,{"background-color":t||null}),s(jn({...c,backgroundColor:t}))};return(0,u.jsx)(o.Dropdown,{menu:{items:[{key:`none`,label:(0,u.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{d(``),r(!1)},type:`button`,children:[(0,u.jsx)(`span`,{className:`rj-editor-color-none`}),t.common.none]})},...Le.map(e=>({key:e,label:(0,u.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{d(e),r(!1)},type:`button`,children:[(0,u.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:e}}),e]})})),{type:`divider`},{key:`more-colors`,label:(0,u.jsxs)(`label`,{className:`rj-editor-color-menu-item`,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,u.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:l||Le[0]}}),t.common.moreColors,(0,u.jsx)(`input`,{"aria-label":t.common.moreColors,className:`rj-editor-color-menu-input`,onChange:e=>{d(e.target.value),a(e.target.value),r(!0)},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),type:`color`,value:l||Le[0]})]})}]},onOpenChange:t=>{r(t),!t&&i&&(window.setTimeout(()=>{Vo(e,{"background-color":i})}),a(null))},open:n,trigger:[`click`],children:(0,u.jsx)(`button`,{"aria-label":t.toolbar.style.backgroundColor,className:`rj-editor-color-button`,title:t.toolbar.shortcuts.backgroundColor,type:`button`,children:(0,u.jsx)(`span`,{className:l?`rj-editor-background-color-mark`:`rj-editor-background-color-mark is-none`,style:l?{backgroundColor:l}:void 0,children:(0,u.jsx)(Wo,{})})})})}function Ko(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M18 6L6 18M6 6L18 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function qo(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=In();return(0,u.jsx)(`button`,{"aria-label":t.toolbar.style.clearFormatting,onClick:()=>{Ho(e),n(Nn({isBold:!1,isCode:!1,isItalic:!1,isStrikethrough:!1,isSubscript:!1,isSuperscript:!1,isUnderline:!1})),n(jn({backgroundColor:L.backgroundColor,fontFamily:L.fontFamily,fontSize:L.fontSize,lineHeight:L.lineHeight,textColor:L.textColor})),n(En({alignment:L.alignment,listType:L.listType}))},title:F(`MOD+\\`,t.toolbar.shortcuts.clearFormatting),type:`button`,className:`rj-editor-toolbar--clear-btn`,children:(0,u.jsx)(Ko,{})})}function Jo(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=In(),r=H(e=>e.toolbar);return(0,u.jsx)(o.Select,{"aria-label":t.toolbar.style.fontFamily,className:`rj-editor-toolbar-select rj-editor-toolbar-select-font`,onChange:(t=``)=>{Vo(e,{"font-family":t||null}),n(jn({...r,fontFamily:t}))},options:ze.map(e=>({label:e,value:e})),placeholder:t.toolbar.style.fontFamilyPlaceholder,popupMatchSelectWidth:!1,size:`small`,title:t.toolbar.shortcuts.fontFamily,value:r.fontFamily==``?void 0:r.fontFamily,suffixIcon:(0,u.jsx)(po,{})})}function Yo(e){let t=Number.parseFloat(e);return Number.isFinite(t)?String(Number((t*16).toFixed(2))):e}function Xo(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=In(),r=H(e=>e.toolbar);return(0,u.jsx)(o.Select,{"aria-label":t.toolbar.style.fontSize,className:`rj-editor-toolbar-select`,onChange:(t=``)=>{Vo(e,{"font-size":t||null}),n(jn({...r,fontSize:t}))},options:Be.map(e=>({label:Yo(e),value:e})),placeholder:t.toolbar.style.fontSizePlaceholder,popupMatchSelectWidth:!1,size:`small`,title:t.toolbar.shortcuts.fontSize,value:r.fontSize==``?void 0:r.fontSize,suffixIcon:(0,u.jsx)(po,{})})}function Zo(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),[n,r]=(0,P.useState)(!1),[i,a]=(0,P.useState)(null),s=In(),c=H(e=>e.toolbar),l=c.textColor,d=t=>{Vo(e,{color:t||null}),s(jn({...c,textColor:t}))};return(0,u.jsx)(o.Dropdown,{menu:{items:[{key:`none`,label:(0,u.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{d(``),r(!1)},type:`button`,children:[(0,u.jsx)(`span`,{className:`rj-editor-color-none`}),t.common.none]})},...qe.map(e=>({key:e,label:(0,u.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{d(e),r(!1)},type:`button`,children:[(0,u.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:e}}),e]})})),{type:`divider`},{key:`more-colors`,label:(0,u.jsxs)(`label`,{className:`rj-editor-color-menu-item`,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,u.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:l||qe[0]}}),t.common.moreColors,(0,u.jsx)(`input`,{"aria-label":t.common.moreColors,className:`rj-editor-color-menu-input`,onChange:e=>{d(e.target.value),a(e.target.value),r(!0)},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),type:`color`,value:l||qe[0]})]})}]},onOpenChange:t=>{r(t),!t&&i&&(window.setTimeout(()=>{Vo(e,{color:i})}),a(null))},open:n,trigger:[`click`],children:(0,u.jsx)(`button`,{"aria-label":t.toolbar.style.textColor,className:`rj-editor-color-button`,title:t.toolbar.shortcuts.textColor,type:`button`,children:(0,u.jsxs)(`span`,{className:`rj-editor-text-color-mark`,children:[`A`,(0,u.jsx)(`span`,{className:`rj-editor-text-color-line`,style:{backgroundColor:l||`currentColor`}})]})})})}function Qo(){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Jo,{}),(0,u.jsx)(Xo,{}),(0,u.jsx)(Zo,{}),(0,u.jsx)(Go,{}),(0,u.jsx)(qo,{})]})}function $o(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M6 16C6 18.2091 7.79086 20 10 20H14C16.2091 20 18 18.2091 18 16C18 13.7909 16.2091 12 14 12M18 8C18 5.79086 16.2091 4 14 4H10C7.79086 4 6 5.79086 6 8M3 12H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function es(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M6 12H14C16.2091 12 18 10.2091 18 8C18 5.79086 16.2091 4 14 4H6V12ZM6 12H15C17.2091 12 19 13.7909 19 16C19 18.2091 17.2091 20 15 20H6V12Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ts(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M17 17L22 12L17 7M7 7L2 12L7 17M14 3L10 21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ns(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M19 4H10M14 20H5M15 4L9 20`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function rs(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M3 5L13 15M13 5L3 15M21 19.0001H17C17 17.5001 17.44 17.0001 18.5 16.5001C19.56 16.0001 21 15.3301 21 14.0001C21 13.5301 20.83 13.0701 20.52 12.7101C20.1999 12.3476 19.7649 12.1061 19.2879 12.026C18.811 11.9459 18.321 12.0321 17.9 12.2701C17.48 12.5101 17.16 12.8901 17 13.3401`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function is(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M3 19L13 9M13 19L3 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M17 6.20449C17.824 4.52464 20.0058 4.6741 20.7484 6.20449C20.907 6.53145 21 6.92143 21 7.37007C21 10.428 17 8.60237 17 11.301C17 12.4597 17 11.8301 17 12H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function as(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M18 4V11C18 14.3137 15.3137 17 12 17C8.68629 17 6 14.3137 6 11V4M4 21H20`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function os(){let[e]=(0,h.useLexicalComposerContext)(),n=U(),{isBold:r,isCode:i,isItalic:a,isStrikethrough:o,isSubscript:s,isSuperscript:c,isUnderline:l}=H(e=>e.toolbar);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.bold,"aria-pressed":r,className:r?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`bold`),title:F(`MOD+B`,n.toolbar.shortcuts.bold),type:`button`,children:(0,u.jsx)(es,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.italic,"aria-pressed":a,className:a?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`italic`),title:F(`MOD+I`,n.toolbar.shortcuts.italic),type:`button`,children:(0,u.jsx)(ns,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.underline,"aria-pressed":l,className:l?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`underline`),title:F(`MOD+U`,n.toolbar.shortcuts.underline),type:`button`,children:(0,u.jsx)(as,{})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.strikethrough,"aria-pressed":o,className:o?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`strikethrough`),title:F(`MOD+SHIFT+X`,n.toolbar.shortcuts.strikethrough),type:`button`,children:(0,u.jsx)($o,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.code,"aria-pressed":i,className:i?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`code`),title:n.toolbar.textFormat.code,type:`button`,children:(0,u.jsx)(ts,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.subscript,"aria-pressed":s,className:s?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`subscript`),title:F(`MOD+=`,n.toolbar.shortcuts.subscript),type:`button`,children:(0,u.jsx)(rs,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":n.toolbar.textFormat.superscript,"aria-pressed":c,className:c?`is-active`:void 0,onClick:()=>e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`superscript`),title:F(`MOD+SHIFT+=`,n.toolbar.shortcuts.superscript),type:`button`,children:(0,u.jsx)(is,{"aria-hidden":`true`})})]})}function ss({editor:e}){return(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-panel rj-editor-toolbar-panel--home`,role:`tabpanel`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-row`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(Mo,{editor:e}),(0,u.jsx)(ko,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(os,{}),(0,u.jsx)(ko,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(Uo,{}),(0,u.jsx)(ko,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(Oo,{editor:e}),(0,u.jsx)(ko,{})]})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-row`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(Qo,{}),(0,u.jsx)(ko,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(zo,{editor:e}),(0,u.jsx)(ko,{})]}),(0,u.jsx)(`div`,{className:`rj-editor-toolbar-group`,children:(0,u.jsx)(Fo,{})})]})]})}function cs(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 9.25H15M21 4H3M21 14.75H15M21 20H3M4.6 16H9.4C9.96005 16 10.2401 16 10.454 15.891C10.6422 15.7951 10.7951 15.6422 10.891 15.454C11 15.2401 11 14.9601 11 14.4V9.6C11 9.03995 11 8.75992 10.891 8.54601C10.7951 8.35785 10.6422 8.20487 10.454 8.10899C10.2401 8 9.96005 8 9.4 8H4.6C4.03995 8 3.75992 8 3.54601 8.10899C3.35785 8.20487 3.20487 8.35785 3.10899 8.54601C3 8.75992 3 9.03995 3 9.6V14.4C3 14.9601 3 15.2401 3.10899 15.454C3.20487 15.6422 3.35785 15.7951 3.54601 15.891C3.75992 16 4.03995 16 4.6 16Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ls(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M3 4H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,u.jsx)(`path`,{d:`M3 20H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,u.jsx)(`rect`,{x:`3`,y:`8`,width:`8`,height:`8`,stroke:`currentColor`,strokeWidth:`2`,strokeLinejoin:`round`})]})}var us={wrapper:`_wrapper_se0k7_1`,disabled:`_disabled_se0k7_23`,affix:`_affix_se0k7_28`,input:`_input_se0k7_43`,inputAffix:`_inputAffix_se0k7_58`};function ds({className:e,decimalScale:t=2,defaultValue:n,integerOnly:r=!1,locale:i=!1,max:a,min:o,onBlur:s,onChange:c,prefix:l,suffix:d,value:f,...p}){let m=P.default.useRef(null),h=typeof f==`number`,[g,_]=P.default.useState(!1),[v,y]=P.default.useState(()=>an(h?f:n,i)),b=h&&!g?an(f,i):v,x=e=>{let n=Ie(e.target.value,t,r),s=Te(n,i),l=Number(n);y(s),n!==``&&n!==`.`&&Number.isFinite(l)&&c?.(he(l,o,a))},S=e=>{_(!1);let t=b.replace(/\s/g,``),n=Number(t);if(t===``||t===`.`||!Number.isFinite(n))y(``);else{let e=he(n,o,a);y(an(e,i)),c?.(e)}s?.(e)},C=e=>{let t=m.current;if(!t)return;t.focus();let n=e===`start`?0:t.value.length;t.setSelectionRange(n,n)},w=(0,u.jsx)(`input`,{...p,className:[us.input,l||d?us.inputAffix:``,l||d?``:e].filter(Boolean).join(` `),inputMode:r?`numeric`:`decimal`,onBlur:S,onChange:x,onFocus:e=>{_(!0),p.onFocus?.(e)},ref:m,type:`text`,value:b});return!l&&!d?w:(0,u.jsxs)(`span`,{className:[us.wrapper,p.disabled?us.disabled:``,e].filter(Boolean).join(` `),children:[l?(0,u.jsx)(`span`,{className:us.affix,onMouseDown:e=>{e.preventDefault(),C(`start`)},children:l}):null,w,d?(0,u.jsx)(`span`,{className:us.affix,onMouseDown:e=>{e.preventDefault(),C(`end`)},children:d}):null]})}var X={overlay:`_overlay_qjax1_1`,modal:`_modal_qjax1_12`,header:`_header_qjax1_24`,title:`_title_qjax1_34`,closeButton:`_closeButton_qjax1_42`,body:`_body_qjax1_65`,footer:`_footer_qjax1_71`,button:`_button_qjax1_80`,cancelButton:`_cancelButton_qjax1_96`,okButton:`_okButton_qjax1_106`};function fs({cancelText:e,children:t,okText:n,onCancel:r,onOk:i,open:a,title:o,width:s=420}){let c=U(),l=Yn(),d=P.default.useRef(null),f=P.default.useRef({x:0,y:0}),[p,m]=P.default.useState(null);if(P.default.useEffect(()=>{if(!a)return;let e=e=>{if(e.key===`Escape`){r();return}e.key===`Enter`&&i&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!(e.target instanceof HTMLTextAreaElement)&&(e.preventDefault(),i())};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[r,i,a]),!a||typeof document>`u`)return null;let h=document.fullscreenElement||document.body,g=(e,t)=>{let n=d.current?.getBoundingClientRect(),r=n?.width||s,i=n?.height||0,a=Math.max(8,window.innerWidth-r-8),o=Math.max(8,window.innerHeight-i-8);return{x:Math.min(Math.max(e,8),a),y:Math.min(Math.max(t,8),o)}};return(0,D.createPortal)((0,u.jsx)(`div`,{className:X.overlay,"data-rj-editor-theme":l,onMouseDown:e=>{e.target===e.currentTarget&&r()},role:`presentation`,children:(0,u.jsxs)(`div`,{"aria-modal":`true`,className:X.modal,ref:d,role:`dialog`,style:{"--rj-modal-width":R(s),left:p?R(p.x):void 0,position:p?`fixed`:void 0,top:p?R(p.y):void 0},children:[(0,u.jsxs)(`div`,{className:X.header,onPointerDown:e=>{if(e.button!==0)return;let t=d.current?.getBoundingClientRect();t&&(e.currentTarget.setPointerCapture(e.pointerId),f.current={x:e.clientX-t.left,y:e.clientY-t.top},m(g(t.left,t.top)))},onPointerMove:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&m(g(e.clientX-f.current.x,e.clientY-f.current.y))},onPointerUp:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)},children:[o?(0,u.jsx)(`h2`,{className:X.title,children:o}):(0,u.jsx)(`span`,{}),(0,u.jsx)(`button`,{"aria-label":c.modal.closeAriaLabel,className:X.closeButton,onClick:r,onPointerDown:e=>{e.stopPropagation()},type:`button`,children:(0,u.jsx)(Ko,{"aria-hidden":`true`})})]}),(0,u.jsx)(`div`,{className:X.body,children:t}),i?(0,u.jsxs)(`div`,{className:X.footer,children:[(0,u.jsx)(`button`,{className:`${X.button} ${X.cancelButton}`,onClick:r,type:`button`,children:e||c.common.close}),(0,u.jsx)(`button`,{className:`${X.button} ${X.okButton}`,onClick:i,type:`button`,children:n||c.common.save})]}):null]})}),h)}function ps(){return(0,u.jsx)(`span`,{className:`rj-editor-toolbar-divider`,"aria-hidden":`true`})}function ms(){let e=(0,t.$getSelection)();if(!(0,t.$isNodeSelection)(e))return null;let n=e.getNodes().find(to);return to(n)?n:null}function hs(){let e=ms();return{isImageSelected:!!e,selectedImageAlignment:e?.getAlignment(),selectedImageAltText:e?.getAltText(),selectedImageAspectRatioLocked:e?.getAspectRatioLocked(),selectedImageBorderEnabled:e?.getBorderEnabled(),selectedImageBorderRadius:e?.getBorderRadius(),selectedImageCaption:e?.getCaption(),selectedImageHeight:e?.getHeight(),selectedImageKey:e?.getKey(),selectedImageLinkUrl:e?.getLinkUrl(),selectedImageObjectFit:e?.getObjectFit(),selectedImageRotation:e?.getRotation(),selectedImageShadowEnabled:e?.getShadowEnabled(),selectedImageTextWrap:e?.getTextWrap(),selectedImageWidth:e?.getWidth()}}function Z(e,t){e.update(()=>{let e=ms();e&&t(e)}),e.focus()}function gs(e,n,r){e.update(()=>{let e=(0,t.$getNodeByKey)(n);to(e)&&r(e)}),e.focus()}function _s(e,t){Z(e,e=>{e.setAlignment(t)})}function vs(e,t){Z(e,e=>{e.setWidth(t)})}function ys(e,n){Z(e,e=>{e.setTextWrap(n),n===`square`&&e.getAlignment()===`center`&&e.setAlignment(`left`);let r=e.getParent();r&&!(0,t.$isRootOrShadowRoot)(r)&&r.insertBefore(e)})}function bs(e){Z(e,e=>{e.remove()})}function xs(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M18 5.00802C13.6667 4.84146 5 7.20666 5 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})})}function Ss(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M2 10C2 10 4.00498 7.26822 5.63384 5.63824C7.26269 4.00827 9.5136 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.89691 21 4.43511 18.2543 3.35177 14.5M8 10H2V4`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Cs(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21 10C21 10 18.995 7.26822 17.3662 5.63824C15.7373 4.00827 13.4864 3 11 3C6.02944 3 2 7.02944 2 12C2 16.9706 6.02944 21 11 21C15.1031 21 18.5649 18.2543 19.6482 14.5M15 10H21V4`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function ws(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=Oa(),r=P.default.useRef(null),{isImageSelected:i,selectedImageAlignment:a,selectedImageAltText:s,selectedImageBorderEnabled:c,selectedImageBorderRadius:l,selectedImageCaption:f,selectedImageKey:p,selectedImageLinkUrl:m,selectedImageObjectFit:g,selectedImageRotation:_,selectedImageShadowEnabled:v,selectedImageTextWrap:y,selectedImageWidth:b}=H(e=>e.toolbar),[x,S]=P.default.useState(null),[C,w]=P.default.useState(``),[T,E]=P.default.useState(!1),D=P.default.useMemo(()=>[{label:t.toolbar.image.fitContain,value:`contain`},{label:t.toolbar.image.fitCover,value:`cover`},{label:t.toolbar.image.fitFill,value:`fill`}],[t]),O=P.default.useMemo(()=>({alt:{label:t.toolbar.image.alt,placeholder:t.toolbar.image.altPlaceholder,title:t.toolbar.image.editAlt},caption:{label:t.toolbar.image.caption,placeholder:t.toolbar.image.captionPlaceholder,title:t.toolbar.image.editCaption},link:{label:t.toolbar.image.link,placeholder:t.toolbar.image.linkPlaceholder,title:t.toolbar.image.editLink}}),[t]),k=e=>{let t={alt:s||``,caption:f||``,link:m||``};S(e),w(t[e])},A=()=>{S(null),w(``),e.focus()};return(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-panel rj-editor-toolbar-panel--image`,role:`tabpanel`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-row`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.alignLeft,className:a===`left`?`is-active`:void 0,disabled:!i,onClick:()=>_s(e,`left`),type:`button`,children:(0,u.jsx)(wa,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.alignCenter,className:a===`center`?`is-active`:void 0,disabled:!i,onClick:()=>_s(e,`center`),type:`button`,children:(0,u.jsx)(Ca,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.alignRight,className:a===`right`?`is-active`:void 0,disabled:!i,onClick:()=>_s(e,`right`),type:`button`,children:(0,u.jsx)(Ta,{"aria-hidden":`true`})}),(0,u.jsx)(ps,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(ds,{"aria-label":t.toolbar.image.width,className:`rj-editor-image-width-input`,max:100,min:10,decimalScale:3,suffix:`%`,onChange:t=>vs(e,t),value:b||100}),[25,50,100].map(t=>(0,u.jsxs)(`button`,{className:b===t?`is-active`:void 0,disabled:!i,onClick:()=>vs(e,t),type:`button`,children:[t,`%`]},t)),(0,u.jsx)(ps,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(`button`,{disabled:!i,onClick:()=>k(`alt`),type:`button`,children:t.toolbar.image.alt}),(0,u.jsx)(`button`,{className:f?`is-active`:void 0,disabled:!i,onClick:()=>k(`caption`),type:`button`,children:t.toolbar.image.caption}),(0,u.jsx)(`button`,{className:m?`is-active`:void 0,disabled:!i,onClick:()=>k(`link`),type:`button`,children:t.toolbar.image.link}),(0,u.jsx)(ps,{})]})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-row`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(`button`,{className:c?`is-active`:void 0,disabled:!i,onClick:()=>Z(e,e=>{e.setBorderEnabled(!e.getBorderEnabled())}),type:`button`,children:t.toolbar.image.border}),(0,u.jsx)(ds,{"aria-label":t.toolbar.image.borderRadius,className:`rj-editor-image-border-radius-input`,integerOnly:!0,max:64,min:0,prefix:(0,u.jsx)(xs,{}),onChange:t=>Z(e,e=>e.setBorderRadius(t)),value:l||0}),(0,u.jsx)(`button`,{className:v?`is-active`:void 0,disabled:!i,onClick:()=>Z(e,e=>{e.setShadowEnabled(!e.getShadowEnabled())}),type:`button`,children:t.toolbar.image.shadow}),(0,u.jsx)(ps,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(o.Select,{"aria-label":t.toolbar.image.cropMode,className:`rj-editor-toolbar-select rj-editor-toolbar-select-crop`,disabled:!i,onChange:t=>Z(e,e=>e.setObjectFit(t)),options:D,size:`small`,suffixIcon:(0,u.jsx)(po,{}),value:g||`contain`}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.topBottomWrap,className:y===`top-bottom`?`is-active`:void 0,disabled:!i,onClick:()=>ys(e,`top-bottom`),title:t.toolbar.image.topBottomWrap,type:`button`,children:(0,u.jsx)(ls,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.squareWrap,className:y===`square`?`is-active`:void 0,disabled:!i,onClick:()=>ys(e,`square`),title:t.toolbar.image.squareWrap,type:`button`,children:(0,u.jsx)(cs,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.rotateLeft,disabled:!i,onClick:()=>Z(e,e=>e.setRotation((_||0)-90)),type:`button`,children:(0,u.jsx)(Ss,{})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.rotateRight,disabled:!i,onClick:()=>Z(e,e=>e.setRotation((_||0)+90)),type:`button`,children:(0,u.jsx)(Cs,{})}),(0,u.jsx)(ps,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.replace,"aria-busy":T,disabled:!i||T,onClick:()=>{un(r.current)},type:`button`,children:(0,u.jsx)(Aa,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.image.delete,className:`rj-editor-toolbar--clear-btn`,disabled:!i,onClick:()=>bs(e),type:`button`,children:(0,u.jsx)(Ea,{"aria-hidden":`true`})}),(0,u.jsx)(`input`,{accept:`image/*`,className:`rj-editor-hidden-file-input`,onChange:async r=>{let i=r.target.files?.[0];if(r.target.value=``,!i)return;if(!i.type.startsWith(`image/`)){window.alert(t.alerts.onlyImages);return}if(i.size>5242880){window.alert(t.alerts.imageSizeLimit);return}let a=``;try{E(!0),a=await n(i)}catch(e){console.error(e),window.alert(t.alerts.imageUploadFailed);return}finally{E(!1)}Z(e,e=>{e.setSrc(a),e.setAltText(i.name)})},ref:r,type:`file`})]})]}),(0,u.jsx)(fs,{okText:t.common.save,onCancel:A,onOk:()=>{if(!x||!p){A();return}let t=C.trim();gs(e,p,e=>{if(x===`alt`){e.setAltText(t);return}if(x===`caption`){e.setCaption(t);return}e.setLinkUrl(t?(0,d.formatUrl)(t):``)}),S(null),w(``)},open:!!x,title:x?O[x].title:void 0,children:x?(0,u.jsxs)(`div`,{className:`rj-editor-image-edit-form`,children:[(0,u.jsx)(`label`,{htmlFor:`rj-editor-image-edit-input`,children:O[x].label}),x===`caption`?(0,u.jsx)(`textarea`,{autoFocus:!0,id:`rj-editor-image-edit-input`,onChange:e=>w(e.target.value),placeholder:O[x].placeholder,rows:4,value:C}):(0,u.jsx)(`input`,{autoFocus:!0,id:`rj-editor-image-edit-input`,onChange:e=>w(e.target.value),placeholder:O[x].placeholder,type:x===`link`?`url`:`text`,value:C})]}):null})]})}function Ts(){return(0,u.jsx)(`span`,{className:`rj-editor-toolbar-divider`,"aria-hidden":`true`})}function Es(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M16 18L22 12L16 6M8 6L2 12L8 18`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Ds(){let[e]=(0,h.useLexicalComposerContext)(),t=U();return(0,u.jsx)(`button`,{"aria-label":t.toolbar.insert.codeBlock,onClick:()=>{e.dispatchCommand(Ve,{language:`plain`}),window.requestAnimationFrame(()=>e.focus())},onMouseDown:e=>e.preventDefault(),title:t.toolbar.insert.codeBlock,type:`button`,children:(0,u.jsx)(Es,{"aria-hidden":`true`})})}function Os(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M4.27209 20.7279L10.8686 14.1314C11.2646 13.7354 11.4627 13.5373 11.691 13.4632C11.8918 13.3979 12.1082 13.3979 12.309 13.4632C12.5373 13.5373 12.7354 13.7354 13.1314 14.1314L19.6839 20.6839M14 15L16.8686 12.1314C17.2646 11.7354 17.4627 11.5373 17.691 11.4632C17.8918 11.3979 18.1082 11.3979 18.309 11.4632C18.5373 11.5373 18.7354 11.7354 19.1314 12.1314L22 15M10 9C10 10.1046 9.10457 11 8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9ZM6.8 21H17.2C18.8802 21 19.7202 21 20.362 20.673C20.9265 20.3854 21.3854 19.9265 21.673 19.362C22 18.7202 22 17.8802 22 16.2V7.8C22 6.11984 22 5.27976 21.673 4.63803C21.3854 4.07354 20.9265 3.6146 20.362 3.32698C19.7202 3 18.8802 3 17.2 3H6.8C5.11984 3 4.27976 3 3.63803 3.32698C3.07354 3.6146 2.6146 4.07354 2.32698 4.63803C2 5.27976 2 6.11984 2 7.8V16.2C2 17.8802 2 18.7202 2.32698 19.362C2.6146 19.9265 3.07354 20.3854 3.63803 20.673C4.27976 21 5.11984 21 6.8 21Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var ks=(0,s.createContext)({});function As(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=As(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function js(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=As(e))&&(r&&(r+=` `),r+=t);return r}var Ms={aliceblue:`9ehhb`,antiquewhite:`9sgk7`,aqua:`1ekf`,aquamarine:`4zsno`,azure:`9eiv3`,beige:`9lhp8`,bisque:`9zg04`,black:`0`,blanchedalmond:`9zhe5`,blue:`73`,blueviolet:`5e31e`,brown:`6g016`,burlywood:`8ouiv`,cadetblue:`3qba8`,chartreuse:`4zshs`,chocolate:`87k0u`,coral:`9yvyo`,cornflowerblue:`3xael`,cornsilk:`9zjz0`,crimson:`8l4xo`,cyan:`1ekf`,darkblue:`3v`,darkcyan:`rkb`,darkgoldenrod:`776yz`,darkgray:`6mbhl`,darkgreen:`jr4`,darkgrey:`6mbhl`,darkkhaki:`7ehkb`,darkmagenta:`5f91n`,darkolivegreen:`3bzfz`,darkorange:`9yygw`,darkorchid:`5z6x8`,darkred:`5f8xs`,darksalmon:`9441m`,darkseagreen:`5lwgf`,darkslateblue:`2th1n`,darkslategray:`1ugcv`,darkslategrey:`1ugcv`,darkturquoise:`14up`,darkviolet:`5rw7n`,deeppink:`9yavn`,deepskyblue:`11xb`,dimgray:`442g9`,dimgrey:`442g9`,dodgerblue:`16xof`,firebrick:`6y7tu`,floralwhite:`9zkds`,forestgreen:`1cisi`,fuchsia:`9y70f`,gainsboro:`8m8kc`,ghostwhite:`9pq0v`,goldenrod:`8j4f4`,gold:`9zda8`,gray:`50i2o`,green:`pa8`,greenyellow:`6senj`,grey:`50i2o`,honeydew:`9eiuo`,hotpink:`9yrp0`,indianred:`80gnw`,indigo:`2xcoy`,ivory:`9zldc`,khaki:`9edu4`,lavenderblush:`9ziet`,lavender:`90c8q`,lawngreen:`4vk74`,lemonchiffon:`9zkct`,lightblue:`6s73a`,lightcoral:`9dtog`,lightcyan:`8s1rz`,lightgoldenrodyellow:`9sjiq`,lightgray:`89jo3`,lightgreen:`5nkwg`,lightgrey:`89jo3`,lightpink:`9z6wx`,lightsalmon:`9z2ii`,lightseagreen:`19xgq`,lightskyblue:`5arju`,lightslategray:`4nwk9`,lightslategrey:`4nwk9`,lightsteelblue:`6wau6`,lightyellow:`9zlcw`,lime:`1edc`,limegreen:`1zcxe`,linen:`9shk6`,magenta:`9y70f`,maroon:`4zsow`,mediumaquamarine:`40eju`,mediumblue:`5p`,mediumorchid:`79qkz`,mediumpurple:`5r3rv`,mediumseagreen:`2d9ip`,mediumslateblue:`4tcku`,mediumspringgreen:`1di2`,mediumturquoise:`2uabw`,mediumvioletred:`7rn9h`,midnightblue:`z980`,mintcream:`9ljp6`,mistyrose:`9zg0x`,moccasin:`9zfzp`,navajowhite:`9zest`,navy:`3k`,oldlace:`9wq92`,olive:`50hz4`,olivedrab:`472ub`,orange:`9z3eo`,orangered:`9ykg0`,orchid:`8iu3a`,palegoldenrod:`9bl4a`,palegreen:`5yw0o`,paleturquoise:`6v4ku`,palevioletred:`8k8lv`,papayawhip:`9zi6t`,peachpuff:`9ze0p`,peru:`80oqn`,pink:`9z8wb`,plum:`8nba5`,powderblue:`6wgdi`,purple:`4zssg`,rebeccapurple:`3zk49`,red:`9y6tc`,rosybrown:`7cv4f`,royalblue:`2jvtt`,saddlebrown:`5fmkz`,salmon:`9rvci`,sandybrown:`9jn1c`,seagreen:`1tdnb`,seashell:`9zje6`,sienna:`6973h`,silver:`7ir40`,skyblue:`5arjf`,slateblue:`45e4t`,slategray:`4e100`,slategrey:`4e100`,snow:`9zke2`,springgreen:`1egv`,steelblue:`2r1kk`,tan:`87yx8`,teal:`pds`,thistle:`8ggk8`,tomato:`9yqfb`,turquoise:`2j4r4`,violet:`9b10u`,wheat:`9ld4j`,white:`9zldr`,whitesmoke:`9lhpx`,yellow:`9zl6o`,yellowgreen:`61fzm`},Q=Math.round;function Ns(e,t){let n=e.replace(/^[^(]*\((.*)/,`$1`).replace(/\).*/,``).match(/\d*\.?\d+%?/g)||[],r=n.map(e=>parseFloat(e));for(let e=0;e<3;e+=1)r[e]=t(r[e]||0,n[e]||``,e);return n[3]?r[3]=n[3].includes(`%`)?r[3]/100:r[3]:r[3]=1,r}var Ps=(e,t,n)=>n===0?e:e/100;function Fs(e,t){let n=t||255;return e>n?n:e<0?0:e}var Is=class e{isValid=!0;r=0;g=0;b=0;a=1;_h;_hsl_s;_hsv_s;_l;_v;_max;_min;_brightness;constructor(t){function n(e){return e[0]in t&&e[1]in t&&e[2]in t}if(t)if(typeof t==`string`){let e=t.trim();function n(t){return e.startsWith(t)}if(/^#?[A-F\d]{3,8}$/i.test(e))this.fromHexString(e);else if(n(`rgb`))this.fromRgbString(e);else if(n(`hsl`))this.fromHslString(e);else if(n(`hsv`)||n(`hsb`))this.fromHsvString(e);else{let t=Ms[e.toLowerCase()];t&&this.fromHexString(parseInt(t,36).toString(16).padStart(6,`0`))}}else if(t instanceof e)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(n(`rgb`))this.r=Fs(t.r),this.g=Fs(t.g),this.b=Fs(t.b),this.a=typeof t.a==`number`?Fs(t.a,1):1;else if(n(`hsl`))this.fromHsl(t);else if(n(`hsv`))this.fromHsv(t);else throw Error(`@ant-design/fast-color: unsupported input `+JSON.stringify(t))}setR(e){return this._sc(`r`,e)}setG(e){return this._sc(`g`,e)}setB(e){return this._sc(`b`,e)}setA(e){return this._sc(`a`,e,1)}setHue(e){let t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}let t=e(this.r),n=e(this.g),r=e(this.b);return .2126*t+.7152*n+.0722*r}getHue(){if(this._h===void 0){let e=this.getMax()-this.getMin();e===0?this._h=0:this._h=Q(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){return this.getHSVSaturation()}getHSVSaturation(){if(this._hsv_s===void 0){let e=this.getMax()-this.getMin();e===0?this._hsv_s=0:this._hsv_s=e/this.getMax()}return this._hsv_s}getHSLSaturation(){if(this._hsl_s===void 0){let e=this.getMax()-this.getMin();if(e===0)this._hsl_s=0;else{let t=this.getLightness();this._hsl_s=e/255/(1-Math.abs(2*t-1))}}return this._hsl_s}getLightness(){return this._l===void 0&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return this._v===void 0&&(this._v=this.getMax()/255),this._v}getBrightness(){return this._brightness===void 0&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){let t=this.getHue(),n=this.getSaturation(),r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(e=10){let t=this.getHue(),n=this.getSaturation(),r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e,t=50){let n=this._c(e),r=t/100,i=e=>(n[e]-this[e])*r+this[e],a={r:Q(i(`r`)),g:Q(i(`g`)),b:Q(i(`b`)),a:Q(i(`a`)*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){let t=this._c(e),n=this.a+t.a*(1-this.a),r=e=>Q((this[e]*this.a+t[e]*t.a*(1-this.a))/n);return this._c({r:r(`r`),g:r(`g`),b:r(`b`),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e=`#`,t=(this.r||0).toString(16);e+=t.length===2?t:`0`+t;let n=(this.g||0).toString(16);e+=n.length===2?n:`0`+n;let r=(this.b||0).toString(16);if(e+=r.length===2?r:`0`+r,typeof this.a==`number`&&this.a>=0&&this.a<1){let t=Q(this.a*255).toString(16);e+=t.length===2?t:`0`+t}return e}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){let e=this.getHue(),t=Q(this.getHSLSaturation()*100),n=Q(this.getLightness()*100);return this.a===1?`hsl(${e},${t}%,${n}%)`:`hsla(${e},${t}%,${n}%,${this.a})`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a===1?`rgb(${this.r},${this.g},${this.b})`:`rgba(${this.r},${this.g},${this.b},${this.a})`}toString(){return this.toRgbString()}_sc(e,t,n){let r=this.clone();return r[e]=Fs(t,n),r}_c(e){return new this.constructor(e)}getMax(){return this._max===void 0&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return this._min===void 0&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){let t=e.replace(`#`,``);function n(e,n){return parseInt(t[e]+t[n||e],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:r}){let i=(e%360+360)%360;if(this._h=i,this._hsl_s=t,this._l=n,this.a=typeof r==`number`?r:1,t<=0){let e=Q(n*255);this.r=e,this.g=e,this.b=e;return}let a=0,o=0,s=0,c=i/60,l=(1-Math.abs(2*n-1))*t,u=l*(1-Math.abs(c%2-1));c>=0&&c<1?(a=l,o=u):c>=1&&c<2?(a=u,o=l):c>=2&&c<3?(o=l,s=u):c>=3&&c<4?(o=u,s=l):c>=4&&c<5?(a=u,s=l):c>=5&&c<6&&(a=l,s=u);let d=n-l/2;this.r=Q((a+d)*255),this.g=Q((o+d)*255),this.b=Q((s+d)*255)}fromHsv({h:e,s:t,v:n,a:r}){let i=(e%360+360)%360;this._h=i,this._hsv_s=t,this._v=n,this.a=typeof r==`number`?r:1;let a=Q(n*255);if(this.r=a,this.g=a,this.b=a,t<=0)return;let o=i/60,s=Math.floor(o),c=o-s,l=Q(n*(1-t)*255),u=Q(n*(1-t*c)*255),d=Q(n*(1-t*(1-c))*255);switch(s){case 0:this.g=d,this.b=l;break;case 1:this.r=u,this.b=l;break;case 2:this.r=l,this.b=d;break;case 3:this.r=l,this.g=u;break;case 4:this.r=d,this.g=l;break;default:this.g=l,this.b=u;break}}fromHsvString(e){let t=Ns(e,Ps);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){let t=Ns(e,Ps);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){let t=Ns(e,(e,t)=>t.includes(`%`)?Q(e/100*255):e);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}},Ls=2,Rs=.16,zs=.05,Bs=.05,Vs=.15,Hs=5,Us=4,Ws=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function Gs(e,t,n){let r;return r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-Ls*t:Math.round(e.h)+Ls*t:n?Math.round(e.h)+Ls*t:Math.round(e.h)-Ls*t,r<0?r+=360:r>=360&&(r-=360),r}function Ks(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return r=n?e.s-Rs*t:t===Us?e.s+Rs:e.s+zs*t,r>1&&(r=1),n&&t===Hs&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function qs(e,t,n){let r;return r=n?e.v+Bs*t:e.v-Vs*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Js(e,t={}){let n=[],r=new Is(e),i=r.toHsv();for(let e=Hs;e>0;--e){let t=new Is({h:Gs(i,e,!0),s:Ks(i,e,!0),v:qs(i,e,!0)});n.push(t)}n.push(r);for(let e=1;e<=Us;e+=1){let t=new Is({h:Gs(i,e),s:Ks(i,e),v:qs(i,e)});n.push(t)}return t.theme===`dark`?Ws.map(({index:e,amount:r})=>new Is(t.backgroundColor||`#141414`).mix(n[e],r).toHexString()):n.map(e=>e.toHexString())}var Ys=[`#fff1f0`,`#ffccc7`,`#ffa39e`,`#ff7875`,`#ff4d4f`,`#f5222d`,`#cf1322`,`#a8071a`,`#820014`,`#5c0011`];Ys.primary=Ys[5];var Xs=[`#fff2e8`,`#ffd8bf`,`#ffbb96`,`#ff9c6e`,`#ff7a45`,`#fa541c`,`#d4380d`,`#ad2102`,`#871400`,`#610b00`];Xs.primary=Xs[5];var Zs=[`#fff7e6`,`#ffe7ba`,`#ffd591`,`#ffc069`,`#ffa940`,`#fa8c16`,`#d46b08`,`#ad4e00`,`#873800`,`#612500`];Zs.primary=Zs[5];var Qs=[`#fffbe6`,`#fff1b8`,`#ffe58f`,`#ffd666`,`#ffc53d`,`#faad14`,`#d48806`,`#ad6800`,`#874d00`,`#613400`];Qs.primary=Qs[5];var $s=[`#feffe6`,`#ffffb8`,`#fffb8f`,`#fff566`,`#ffec3d`,`#fadb14`,`#d4b106`,`#ad8b00`,`#876800`,`#614700`];$s.primary=$s[5];var ec=[`#fcffe6`,`#f4ffb8`,`#eaff8f`,`#d3f261`,`#bae637`,`#a0d911`,`#7cb305`,`#5b8c00`,`#3f6600`,`#254000`];ec.primary=ec[5];var tc=[`#f6ffed`,`#d9f7be`,`#b7eb8f`,`#95de64`,`#73d13d`,`#52c41a`,`#389e0d`,`#237804`,`#135200`,`#092b00`];tc.primary=tc[5];var nc=[`#e6fffb`,`#b5f5ec`,`#87e8de`,`#5cdbd3`,`#36cfc9`,`#13c2c2`,`#08979c`,`#006d75`,`#00474f`,`#002329`];nc.primary=nc[5];var rc=[`#e6f4ff`,`#bae0ff`,`#91caff`,`#69b1ff`,`#4096ff`,`#1677ff`,`#0958d9`,`#003eb3`,`#002c8c`,`#001d66`];rc.primary=rc[5];var ic=[`#f0f5ff`,`#d6e4ff`,`#adc6ff`,`#85a5ff`,`#597ef7`,`#2f54eb`,`#1d39c4`,`#10239e`,`#061178`,`#030852`];ic.primary=ic[5];var ac=[`#f9f0ff`,`#efdbff`,`#d3adf7`,`#b37feb`,`#9254de`,`#722ed1`,`#531dab`,`#391085`,`#22075e`,`#120338`];ac.primary=ac[5];var oc=[`#fff0f6`,`#ffd6e7`,`#ffadd2`,`#ff85c0`,`#f759ab`,`#eb2f96`,`#c41d7f`,`#9e1068`,`#780650`,`#520339`];oc.primary=oc[5];var sc=[`#a6a6a6`,`#999999`,`#8c8c8c`,`#808080`,`#737373`,`#666666`,`#404040`,`#1a1a1a`,`#000000`,`#000000`];sc.primary=sc[5];var cc=[`#2a1215`,`#431418`,`#58181c`,`#791a1f`,`#a61d24`,`#d32029`,`#e84749`,`#f37370`,`#f89f9a`,`#fac8c3`];cc.primary=cc[5];var lc=[`#2b1611`,`#441d12`,`#592716`,`#7c3118`,`#aa3e19`,`#d84a1b`,`#e87040`,`#f3956a`,`#f8b692`,`#fad4bc`];lc.primary=lc[5];var uc=[`#2b1d11`,`#442a11`,`#593815`,`#7c4a15`,`#aa6215`,`#d87a16`,`#e89a3c`,`#f3b765`,`#f8cf8d`,`#fae3b7`];uc.primary=uc[5];var dc=[`#2b2111`,`#443111`,`#594214`,`#7c5914`,`#aa7714`,`#d89614`,`#e8b339`,`#f3cc62`,`#f8df8b`,`#faedb5`];dc.primary=dc[5];var fc=[`#2b2611`,`#443b11`,`#595014`,`#7c6e14`,`#aa9514`,`#d8bd14`,`#e8d639`,`#f3ea62`,`#f8f48b`,`#fafab5`];fc.primary=fc[5];var pc=[`#1f2611`,`#2e3c10`,`#3e4f13`,`#536d13`,`#6f9412`,`#8bbb11`,`#a9d134`,`#c9e75d`,`#e4f88b`,`#f0fab5`];pc.primary=pc[5];var mc=[`#162312`,`#1d3712`,`#274916`,`#306317`,`#3c8618`,`#49aa19`,`#6abe39`,`#8fd460`,`#b2e58b`,`#d5f2bb`];mc.primary=mc[5];var hc=[`#112123`,`#113536`,`#144848`,`#146262`,`#138585`,`#13a8a8`,`#33bcb7`,`#58d1c9`,`#84e2d8`,`#b2f1e8`];hc.primary=hc[5];var gc=[`#111a2c`,`#112545`,`#15325b`,`#15417e`,`#1554ad`,`#1668dc`,`#3c89e8`,`#65a9f3`,`#8dc5f8`,`#b7dcfa`];gc.primary=gc[5];var _c=[`#131629`,`#161d40`,`#1c2755`,`#203175`,`#263ea0`,`#2b4acb`,`#5273e0`,`#7f9ef3`,`#a8c1f8`,`#d2e0fa`];_c.primary=_c[5];var vc=[`#1a1325`,`#24163a`,`#301c4d`,`#3e2069`,`#51258f`,`#642ab5`,`#854eca`,`#ab7ae0`,`#cda8f0`,`#ebd7fa`];vc.primary=vc[5];var yc=[`#291321`,`#40162f`,`#551c3b`,`#75204f`,`#a02669`,`#cb2b83`,`#e0529c`,`#f37fb7`,`#f8a8cc`,`#fad2e3`];yc.primary=yc[5];var bc=[`#151515`,`#1f1f1f`,`#2d2d2d`,`#393939`,`#494949`,`#5a5a5a`,`#6a6a6a`,`#7b7b7b`,`#888888`,`#969696`];bc.primary=bc[5];function xc(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function Sc(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}var Cc=`data-rc-order`,wc=`data-rc-priority`,Tc=`rc-util-key`,Ec=new Map;function Dc({mark:e}={}){return e?e.startsWith(`data-`)?e:`data-${e}`:Tc}function Oc(e){return e.attachTo?e.attachTo:document.querySelector(`head`)||document.body}function kc(e){return e===`queue`?`prependQueue`:e?`prepend`:`append`}function Ac(e){return Array.from((Ec.get(e)||e).children).filter(e=>e.tagName===`STYLE`)}function jc(e,t={}){if(!xc())return null;let{csp:n,prepend:r,priority:i=0}=t,a=kc(r),o=a===`prependQueue`,s=document.createElement(`style`);s.setAttribute(Cc,a),o&&i&&s.setAttribute(wc,`${i}`),n?.nonce&&(s.nonce=n?.nonce),s.innerHTML=e;let c=Oc(t),{firstChild:l}=c;if(r){if(o){let e=(t.styles||Ac(c)).filter(e=>[`prepend`,`prependQueue`].includes(e.getAttribute(Cc))?i>=Number(e.getAttribute(wc)||0):!1);if(e.length)return c.insertBefore(s,e[e.length-1].nextSibling),s}c.insertBefore(s,l)}else c.appendChild(s);return s}function Mc(e,t={}){let{styles:n}=t;return n||=Ac(Oc(t)),n.find(n=>n.getAttribute(Dc(t))===e)}function Nc(e,t){let n=Ec.get(e);if(!n||!Sc(document,n)){let n=jc(``,t),{parentNode:r}=n;Ec.set(e,r),e.removeChild(n)}}function Pc(e,t,n={}){let r=Oc(n),i=Ac(r),a={...n,styles:i};Nc(r,a);let o=Mc(t,a);if(o)return a.csp?.nonce&&o.nonce!==a.csp?.nonce&&(o.nonce=a.csp?.nonce),o.innerHTML!==e&&(o.innerHTML=e),o;let s=jc(e,a);return s.setAttribute(Dc(a),t),s}function Fc(e){return e?.getRootNode?.()}function Ic(e){return Fc(e)instanceof ShadowRoot}function Lc(e){return Ic(e)?Fc(e):null}var Rc={},zc=[],Bc=e=>{zc.push(e)};function Vc(e,t){if(process.env.NODE_ENV!==`production`&&!e&&console!==void 0){let e=zc.reduce((e,t)=>t(e??``,`warning`),t);e&&console.error(`Warning: ${e}`)}}function Hc(e,t){if(process.env.NODE_ENV!==`production`&&!e&&console!==void 0){let e=zc.reduce((e,t)=>t(e??``,`note`),t);e&&console.warn(`Note: ${e}`)}}function Uc(){Rc={}}function Wc(e,t,n){!t&&!Rc[n]&&(e(!1,n),Rc[n]=!0)}function Gc(e,t){Wc(Vc,e,t)}function Kc(e,t){Wc(Hc,e,t)}Gc.preMessage=Bc,Gc.resetWarned=Uc,Gc.noteOnce=Kc;function qc(e){return e.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Jc(e,t){Gc(e,`[@ant-design/icons] ${t}`)}function Yc(e){return typeof e==`object`&&typeof e.name==`string`&&typeof e.theme==`string`&&(typeof e.icon==`object`||typeof e.icon==`function`)}function Xc(e={}){return Object.keys(e).reduce((t,n)=>{let r=e[n];switch(n){case`class`:t.className=r,delete t.class;break;default:delete t[n],t[qc(n)]=r}return t},{})}function Zc(e,t,n){return n?s.default.createElement(e.tag,{key:t,...Xc(e.attrs),...n},(e.children||[]).map((n,r)=>Zc(n,`${t}-${e.tag}-${r}`))):s.default.createElement(e.tag,{key:t,...Xc(e.attrs)},(e.children||[]).map((n,r)=>Zc(n,`${t}-${e.tag}-${r}`)))}function Qc(e){return Js(e)[0]}function $c(e){return e?Array.isArray(e)?e:[e]:[]}var el=`
13
13
  .anticon {
14
14
  display: inline-flex;
15
15
  align-items: center;
@@ -63,12 +63,12 @@ injectRJEditorStyle();
63
63
  transform: rotate(360deg);
64
64
  }
65
65
  }
66
- `,nl=e=>{let{csp:t,prefixCls:n,layer:r}=(0,s.useContext)(As),i=tl;n&&(i=i.replace(/anticon/g,n)),r&&(i=`@layer ${r} {\n${i}\n}`),(0,s.useEffect)(()=>{let n=e.current,a=Rc(n);Fc(i,`@ant-design-icons`,{prepend:!r,csp:t,attachTo:a})},[])},rl={primaryColor:`#333`,secondaryColor:`#E6E6E6`,calculated:!1};function il({primaryColor:e,secondaryColor:t}){rl.primaryColor=e,rl.secondaryColor=t||$c(e),rl.calculated=!!t}function al(){return{...rl}}var ol=e=>{let{icon:t,className:n,onClick:r,style:i,primaryColor:a,secondaryColor:o,...c}=e,l=s.useRef(null),u=rl;if(a&&(u={primaryColor:a,secondaryColor:o||$c(a)}),nl(l),Yc(Xc(t),`icon should be icon definiton, but got ${t}`),!Xc(t))return null;let d=t;return d&&typeof d.icon==`function`&&(d={...d,icon:d.icon(u.primaryColor,u.secondaryColor)}),Qc(d.icon,`svg-${d.name}`,{className:n,onClick:r,style:i,"data-icon":d.name,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`,...c,ref:l})};ol.displayName=`IconReact`,ol.getTwoToneColors=al,ol.setTwoToneColors=il;function sl(e){let[t,n]=el(e);return ol.setTwoToneColors({primaryColor:t,secondaryColor:n})}function cl(){let e=ol.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ll.apply(this,arguments)}sl(ic.primary);var ul=s.forwardRef((e,t)=>{let{className:n,icon:r,spin:i,rotate:a,tabIndex:o,onClick:c,twoToneColor:l,...u}=e,{prefixCls:d=`anticon`,rootClassName:f}=s.useContext(As),p=Ms(f,d,{[`${d}-${r.name}`]:!!r.name,[`${d}-spin`]:!!i||r.name===`loading`},n),m=o;m===void 0&&c&&(m=-1);let h=a?{msTransform:`rotate(${a}deg)`,transform:`rotate(${a}deg)`}:void 0,[g,_]=el(l);return s.createElement(`span`,ll({role:`img`,"aria-label":r.name},u,{ref:t,tabIndex:m,onClick:c,className:p}),s.createElement(ol,{icon:r,primaryColor:g,secondaryColor:_,style:h}))});ul.getTwoToneColor=cl,ul.setTwoToneColor=sl,process.env.NODE_ENV!==`production`&&(ul.displayName=`AntdIcon`);var dl={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z`}}]},name:`loading`,theme:`outlined`};function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fl.apply(this,arguments)}var pl=s.forwardRef((e,t)=>s.createElement(ul,fl({},e,{ref:t,icon:dl})));process.env.NODE_ENV!==`production`&&(pl.displayName=`LoadingOutlined`);function ml({size:e=24,className:t}){return(0,u.jsx)(pl,{className:t,style:{fontSize:e},spin:!0})}function hl(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=ja(),r=P.default.useRef(null),[i,a]=P.default.useState(!1);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.insert.image,"aria-busy":i,disabled:i,onClick:()=>{pn(r.current)},onMouseDown:e=>{e.preventDefault()},title:t.toolbar.insert.image,type:`button`,children:i?(0,u.jsx)(ml,{}):(0,u.jsx)(ks,{})}),(0,u.jsx)(`input`,{accept:`image/*`,className:`rj-editor-hidden-file-input`,onChange:async r=>{let i=r.target.files?.[0];if(r.target.value=``,!i){e.focus();return}if(!i.type.startsWith(`image/`)){window.alert(t.alerts.onlyImages),e.focus();return}if(i.size>5242880){window.alert(t.alerts.imageSizeLimit),e.focus();return}let o;try{a(!0),o=await n(i)}catch(n){console.error(n),window.alert(t.alerts.imageUploadFailed),e.focus();return}finally{a(!1)}e.dispatchCommand(Ue,{altText:i.name,src:o}),e.focus()},ref:r,type:`file`})]})}function gl(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21.1525 10.8999L12.1369 19.9156C10.0866 21.9658 6.7625 21.9658 4.71225 19.9156C2.662 17.8653 2.662 14.5412 4.71225 12.4909L13.7279 3.47532C15.0947 2.10849 17.3108 2.10849 18.6776 3.47532C20.0444 4.84216 20.0444 7.05823 18.6776 8.42507L10.0156 17.0871C9.33213 17.7705 8.22409 17.7705 7.54068 17.0871C6.85726 16.4037 6.85726 15.2957 7.54068 14.6123L15.1421 7.01086`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var _l=`noreferrer`;function vl({enableShortcutListener:e=!0,showButton:n=!0}){let[r]=(0,h.useLexicalComposerContext)(),i=U(),[a,o]=P.default.useState(!1),[s,c]=P.default.useState(``),[l,f]=P.default.useState(``),[p,m]=P.default.useState(``),[g,_]=P.default.useState(!0),v=P.default.useCallback(()=>{o(!1),r.focus()},[r]),y=P.default.useCallback(()=>{let e=``;r.getEditorState().read(()=>{let n=(0,t.$getSelection)();(0,t.$isRangeSelection)(n)&&(e=n.getTextContent())}),c(e),f(``),m(``),_(!0),o(!0)},[r]);return P.default.useEffect(()=>{if(!e)return;let t=()=>y();return window.addEventListener(Ke,t),()=>{window.removeEventListener(Ke,t)}},[e,y]),(0,u.jsxs)(u.Fragment,{children:[n?(0,u.jsx)(`button`,{"aria-label":i.toolbar.insert.link,onClick:y,onMouseDown:e=>{e.preventDefault()},title:F(`MOD+K`,i.toolbar.shortcuts.link),type:`button`,children:(0,u.jsx)(gl,{})}):null,(0,u.jsx)(ps,{okText:i.common.insert,onCancel:v,onOk:()=>{let e=p.trim();if(!e){r.focus();return}let n={rel:_l,target:g?`_blank`:null,title:l.trim()||null,url:(0,d.formatUrl)(e)};r.focus(()=>{r.update(()=>{let e=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(e))return;let r=s.trim();if(e.isCollapsed()){let i=(0,d.$createLinkNode)(n.url,{rel:n.rel,target:n.target,title:n.title});i.append((0,t.$createTextNode)(r||n.url)),e.insertNodes([i]),i.selectEnd();return}r&&r!==e.getTextContent()&&e.insertText(r),(0,d.$toggleLink)(n)})}),o(!1)},open:a,title:i.toolbar.insert.link,children:(0,u.jsxs)(`div`,{className:`rj-editor-link-form`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-link-field`,children:[(0,u.jsx)(`label`,{htmlFor:`rj-editor-link-url`,children:i.toolbar.link.url}),(0,u.jsx)(`input`,{autoFocus:!0,id:`rj-editor-link-url`,onChange:e=>m(e.target.value),placeholder:i.toolbar.link.urlPlaceholder,type:`text`,value:p})]}),(0,u.jsxs)(`div`,{className:`rj-editor-link-field`,children:[(0,u.jsx)(`label`,{htmlFor:`rj-editor-link-text`,children:i.toolbar.link.text}),(0,u.jsx)(`input`,{id:`rj-editor-link-text`,onChange:e=>c(e.target.value),placeholder:i.toolbar.link.textPlaceholder,type:`text`,value:s})]}),(0,u.jsxs)(`div`,{className:`rj-editor-link-field`,children:[(0,u.jsx)(`label`,{htmlFor:`rj-editor-link-title`,children:i.toolbar.link.title}),(0,u.jsx)(`input`,{id:`rj-editor-link-title`,onChange:e=>f(e.target.value),placeholder:i.toolbar.link.titlePlaceholder,type:`text`,value:l})]}),(0,u.jsxs)(`label`,{className:`rj-editor-link-checkbox`,children:[(0,u.jsx)(`input`,{checked:g,onChange:e=>_(e.target.checked),type:`checkbox`}),i.toolbar.link.openInNewTab]})]})})]})}function yl(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M3 12H21M12 3V21M7.8 3H16.2C17.8802 3 18.7202 3 19.362 3.32698C19.9265 3.6146 20.3854 4.07354 20.673 4.63803C21 5.27976 21 6.11984 21 7.8V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var bl=1,xl=20,Sl=8,Cl=10;function wl({onTableInserted:e}){let[t]=(0,h.useLexicalComposerContext)(),n=U(),r=P.default.useId(),i=P.default.useId(),[a,s]=P.default.useState(!1),[c,l]=P.default.useState(3),[d,f]=P.default.useState(3),[m,g]=P.default.useState(3),[_,v]=P.default.useState(3),[y,b]=P.default.useState(!0),x=(n=c,r=d)=>{t.dispatchCommand(p.INSERT_TABLE_COMMAND,{columns:String(r),includeHeaders:y?{columns:!1,rows:!0}:!1,rows:String(n)}),s(!1),e?.(),t.focus()};return(0,u.jsx)(o.Dropdown,{dropdownRender:()=>(0,u.jsxs)(`div`,{className:`rj-editor-table-menu`,children:[(0,u.jsx)(`div`,{className:`rj-editor-table-menu-title`,children:n.toolbar.table.insertTableSize.replace(`{columns}`,String(_)).replace(`{rows}`,String(m))}),(0,u.jsx)(`div`,{className:`rj-editor-table-grid`,onMouseLeave:()=>{g(c),v(d)},children:Array.from({length:Sl}).map((e,t)=>(0,u.jsx)(P.default.Fragment,{children:Array.from({length:Cl}).map((e,r)=>{let i=t+1,a=r+1,o=i<=m&&a<=_;return(0,u.jsx)(`button`,{"aria-label":n.toolbar.table.insertTableSize.replace(`{columns}`,String(a)).replace(`{rows}`,String(i)),className:o?`is-selected`:void 0,onClick:()=>x(i,a),onMouseEnter:()=>{g(i),v(a)},type:`button`},`${t}-${r}`)})},t))}),(0,u.jsx)(`div`,{className:`rj-editor-table-menu-divider`}),(0,u.jsxs)(`div`,{className:`rj-editor-table-menu-row`,children:[(0,u.jsx)(`label`,{htmlFor:r,children:n.toolbar.table.rows}),(0,u.jsx)(fs,{id:r,integerOnly:!0,max:xl,min:bl,onChange:l,value:c})]}),(0,u.jsxs)(`div`,{className:`rj-editor-table-menu-row`,children:[(0,u.jsx)(`label`,{htmlFor:i,children:n.toolbar.table.columns}),(0,u.jsx)(fs,{id:i,integerOnly:!0,max:xl,min:bl,onChange:f,value:d})]}),(0,u.jsx)(o.Checkbox,{checked:y,onChange:e=>{b(e.target.checked)},children:n.toolbar.table.headerRow}),(0,u.jsx)(o.Button,{block:!0,onClick:()=>x(),size:`small`,type:`primary`,children:n.toolbar.table.insertTable})]}),onOpenChange:e=>{s(e),g(c),v(d)},open:a,trigger:[`click`],children:(0,u.jsx)(`button`,{"aria-label":n.toolbar.table.insertTable,className:a?`is-active`:void 0,onMouseDown:e=>{e.preventDefault()},title:n.toolbar.insert.table,type:`button`,children:(0,u.jsx)(yl,{})})})}function Tl(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M21.5813 7.19989C21.4733 6.76846 21.2534 6.37318 20.9438 6.05395C20.6341 5.73473 20.2457 5.50287 19.8178 5.3818C18.2542 5 12 5 12 5C12 5 5.74578 5 4.18222 5.41816C3.75429 5.53923 3.36588 5.77109 3.05623 6.09031C2.74659 6.40954 2.52666 6.80482 2.41868 7.23625C2.13253 8.82303 1.99255 10.4327 2.00052 12.0451C1.99032 13.6696 2.1303 15.2916 2.41868 16.8903C2.53773 17.3083 2.76258 17.6886 3.0715 17.9943C3.38043 18.3 3.76299 18.5209 4.18222 18.6357C5.74578 19.0538 12 19.0538 12 19.0538C12 19.0538 18.2542 19.0538 19.8178 18.6357C20.2457 18.5146 20.6341 18.2827 20.9438 17.9635C21.2534 17.6443 21.4733 17.249 21.5813 16.8176C21.8653 15.2427 22.0052 13.6453 21.9995 12.0451C22.0097 10.4206 21.8697 8.79862 21.5813 7.19989Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M9.75 9.46533C9.75 8.98805 9.75 8.74941 9.84974 8.61618C9.93666 8.50008 10.0697 8.42744 10.2144 8.4171C10.3804 8.40525 10.5811 8.53429 10.9826 8.79239L14.9254 11.3271C15.2738 11.551 15.448 11.663 15.5082 11.8054C15.5607 11.9298 15.5607 12.0702 15.5082 12.1946C15.448 12.337 15.2738 12.449 14.9254 12.6729L10.9826 15.2076C10.5811 15.4657 10.3804 15.5948 10.2144 15.5829C10.0697 15.5726 9.93666 15.4999 9.84974 15.3838C9.75 15.2506 9.75 15.012 9.75 14.5347V9.46533Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function El(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),[n,r]=P.default.useState(!1),[i,a]=P.default.useState(``),[o,s]=P.default.useState(``),[c,l]=P.default.useState(``);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.insert.youtube,onClick:()=>{a(``),s(``),l(``),r(!0)},onMouseDown:e=>{e.preventDefault()},title:t.toolbar.insert.youtube,type:`button`,children:(0,u.jsx)(Tl,{"aria-hidden":`true`})}),(0,u.jsx)(ps,{okText:t.common.insert,onCancel:()=>{r(!1),l(``),e.focus()},onOk:()=>{let n=Oe(o);if(!n){l(t.toolbar.youtube.invalidUrl);return}e.dispatchCommand(We,{title:i.trim(),videoId:n}),r(!1),l(``),e.focus()},open:n,title:t.toolbar.insert.youtube,children:(0,u.jsxs)(`div`,{className:`rj-editor-youtube-form`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-youtube-field`,children:[(0,u.jsx)(`label`,{htmlFor:`rj-editor-youtube-url`,children:t.toolbar.youtube.url}),(0,u.jsx)(`input`,{autoFocus:!0,id:`rj-editor-youtube-url`,onChange:e=>{s(e.target.value),l(``)},placeholder:t.toolbar.youtube.urlPlaceholder,type:`text`,value:o})]}),(0,u.jsxs)(`div`,{className:`rj-editor-youtube-field`,children:[(0,u.jsx)(`label`,{htmlFor:`rj-editor-youtube-title`,children:t.toolbar.youtube.title}),(0,u.jsx)(`input`,{id:`rj-editor-youtube-title`,onChange:e=>a(e.target.value),placeholder:t.toolbar.youtube.titlePlaceholder,type:`text`,value:i})]}),c?(0,u.jsx)(`p`,{className:`rj-editor-youtube-error`,children:c}):null]})})]})}function Dl({onTableInserted:e}){return(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-panel`,role:`tabpanel`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(wl,{onTableInserted:e}),(0,u.jsx)(vl,{enableShortcutListener:!1}),(0,u.jsx)(Es,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(hl,{}),(0,u.jsx)(El,{}),(0,u.jsx)(Os,{})]})]})}function Ol(){return(0,u.jsx)(`div`,{className:`rj-editor-toolbar-panel`,role:`tabpanel`})}function kl(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M15.9997 11L1.9997 11M9.9997 4L7.9997 2M13.9997 22L1.9997 22M21.9997 16C21.9997 17.1046 21.1043 18 19.9997 18C18.8951 18 17.9997 17.1046 17.9997 16C17.9997 14.8954 19.9997 13 19.9997 13C19.9997 13 21.9997 14.8954 21.9997 16ZM8.9997 3L15.8683 9.86863C16.2643 10.2646 16.4624 10.4627 16.5365 10.691C16.6018 10.8918 16.6018 11.1082 16.5365 11.309C16.4624 11.5373 16.2643 11.7354 15.8683 12.1314L11.2624 16.7373C10.4704 17.5293 10.0744 17.9253 9.61773 18.0737C9.21605 18.2042 8.78335 18.2042 8.38166 18.0737C7.92501 17.9253 7.52899 17.5293 6.73696 16.7373L3.26244 13.2627C2.4704 12.4707 2.07439 12.0747 1.92601 11.618C1.7955 11.2163 1.7955 10.7837 1.92601 10.382C2.07439 9.92531 2.47041 9.52929 3.26244 8.73726L8.9997 3Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Al(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M3 14H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,u.jsx)(`path`,{d:`M3 18H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function jl(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M3 10H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,u.jsx)(`path`,{d:`M3 14H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function Ml(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M3 6H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,u.jsx)(`path`,{d:`M3 10H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function Nl(){let e=(0,t.$getSelection)();return(0,t.$isRangeSelection)(e)?e.anchor.getNode():(0,p.$isTableSelection)(e)?(0,t.$getNodeByKey)(e.anchor.key):null}function Pl(){let e=(0,t.$getSelection)();if((0,p.$isTableSelection)(e)){let t=e.getNodes().filter(p.$isTableCellNode);return Array.from(new Map(t.map(e=>[e.getKey(),e])).values())}let n=Nl(),r=n?(0,m.$getNearestNodeOfType)(n,p.TableCellNode):null;return r?[r]:[]}function Fl(){let e=(0,t.$getSelection)();if((0,p.$isTableSelection)(e)){let n=(0,t.$getNodeByKey)(e.tableKey);return(0,p.$isTableNode)(n)?n:null}let n=Nl();return n?(0,m.$getNearestNodeOfType)(n,p.TableNode):null}function Il(){let e=Pl(),t=e[0];return{isInTable:e.length>0,selectedTableCellsCount:e.length,tableCellBackgroundColor:t?.getBackgroundColor()||``,tableCellVerticalAlign:t?.getVerticalAlign(),tableHasMergedCell:e.some(e=>e.getColSpan()>1||e.getRowSpan()>1)}}function Ll(e,t){e.update(t),e.focus()}function Rl(e,t){Ll(e,()=>{(0,p.$insertTableRowAtSelection)(t)})}function zl(e,t){Ll(e,()=>{(0,p.$insertTableColumnAtSelection)(t)})}function Bl(e){Ll(e,()=>{(0,p.$deleteTableRowAtSelection)()})}function Vl(e){Ll(e,()=>{(0,p.$deleteTableColumnAtSelection)()})}function Hl(e){Ll(e,()=>{let e=Fl();if(!e)return;let n=(0,t.$createParagraphNode)();e.insertAfter(n),e.remove(),n.select(),(0,t.$getRoot)().getChildrenSize()===0&&(0,t.$getRoot)().append((0,t.$createParagraphNode)())})}function Ul(e){Ll(e,()=>{let e=Pl();e.length>1&&(0,p.$mergeCells)(e)})}function Wl(e){Ll(e,()=>{(0,p.$unmergeCell)()})}function Gl(e,t){Ll(e,()=>{Pl().forEach(e=>{e.setBackgroundColor(t)})})}function Kl(e,t){Ll(e,()=>{Pl().forEach(e=>{e.setVerticalAlign(t)})})}function ql(e){Ll(e,()=>{let e=Pl()[0];if(!e)return;let[,t]=(0,p.$getNodeTriplet)(e);t.getChildren().forEach(e=>{(0,p.$isTableCellNode)(e)&&e.toggleHeaderStyle(p.TableCellHeaderStates.ROW)})})}function Jl(e){Ll(e,()=>{let e=Pl()[0],t=Fl(),n=e?(0,p.$getTableCellNodeRect)(e):null;if(!e||!t||!n)return;let[r]=(0,p.$computeTableMapSkipCellCheck)(t,null,null),i=new Set;r.forEach(e=>{e.forEach(({cell:e,startColumn:t})=>{t<=n.columnIndex&&t+e.getColSpan()>n.columnIndex&&!i.has(e.getKey())&&(i.add(e.getKey()),e.toggleHeaderStyle(p.TableCellHeaderStates.COLUMN))})})})}function Yl(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),[n,r]=(0,P.useState)(!1),[i,a]=(0,P.useState)(null),{isInTable:s,tableCellBackgroundColor:c,tableCellVerticalAlign:l}=H(e=>e.toolbar);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.Dropdown,{disabled:!s,menu:{items:[{key:`none`,label:(0,u.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{Gl(e,null),r(!1)},type:`button`,children:[(0,u.jsx)(`span`,{className:`rj-editor-color-none`}),t.common.none]})},{type:`divider`},...Le.map(t=>({key:t,label:(0,u.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{Gl(e,t),r(!1)},type:`button`,children:[(0,u.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:t}}),t]})})),{type:`divider`},{key:`more-colors`,label:(0,u.jsxs)(`label`,{className:`rj-editor-color-menu-item`,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,u.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:c||Le[0]}}),t.common.moreColors,(0,u.jsx)(`input`,{"aria-label":t.common.moreColors,className:`rj-editor-color-menu-input`,onChange:t=>{Gl(e,t.target.value),a(t.target.value),r(!0)},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),type:`color`,value:c||Le[0]})]})}]},onOpenChange:t=>{r(t),!t&&i&&(window.setTimeout(()=>{Gl(e,i)}),a(null))},open:n,trigger:[`click`],children:(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.background,className:c?`is-active`:void 0,disabled:!s,onMouseDown:e=>{e.preventDefault()},type:`button`,children:(0,u.jsx)(kl,{"aria-hidden":`true`})})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.alignTop,className:l===`top`?`is-active`:void 0,disabled:!s,onClick:()=>Kl(e,`top`),type:`button`,children:(0,u.jsx)(Ml,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.alignMiddle,className:l===`middle`?`is-active`:void 0,disabled:!s,onClick:()=>Kl(e,`middle`),type:`button`,children:(0,u.jsx)(jl,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.alignBottom,className:l===`bottom`?`is-active`:void 0,disabled:!s,onClick:()=>Kl(e,`bottom`),type:`button`,children:(0,u.jsx)(Al,{"aria-hidden":`true`})})]})}function Xl(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=!H(e=>e.toolbar.isInTable);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.insertColumnLeft,disabled:n,onClick:()=>zl(e,!1),type:`button`,children:t.toolbar.table.columnLeft}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.insertColumnRight,disabled:n,onClick:()=>zl(e,!0),type:`button`,children:t.toolbar.table.columnRight})]})}function Zl(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=!H(e=>e.toolbar.isInTable);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(`button`,{"aria-label":t.toolbar.table.deleteRow,className:`rj-editor-toolbar--clear-btn`,disabled:n,onClick:()=>Bl(e),type:`button`,children:[(0,u.jsx)(ka,{"aria-hidden":`true`}),`\xA0`,t.toolbar.table.row]}),(0,u.jsxs)(`button`,{"aria-label":t.toolbar.table.deleteColumn,className:`rj-editor-toolbar--clear-btn`,disabled:n,onClick:()=>Vl(e),type:`button`,children:[(0,u.jsx)(ka,{"aria-hidden":`true`}),`\xA0`,t.toolbar.table.column]}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.deleteTable,className:`rj-editor-toolbar--clear-btn`,disabled:n,onClick:()=>Hl(e),type:`button`,children:(0,u.jsx)(ka,{"aria-hidden":`true`})})]})}function Ql(){return(0,u.jsx)(`span`,{className:`rj-editor-toolbar-divider`,"aria-hidden":`true`})}function $l(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M9 7L4 12L9 17M15 7L20 12L15 17`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function eu(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M7 15L12 20L17 15M7 9L12 4L17 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function tu(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),{isInTable:n}=H(e=>e.toolbar);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(`button`,{"aria-label":t.toolbar.table.headerRow,disabled:!n,onClick:()=>ql(e),type:`button`,title:t.toolbar.table.headerRow,children:[(0,u.jsx)($l,{}),` \xA0 `,t.toolbar.table.header]}),(0,u.jsxs)(`button`,{"aria-label":t.toolbar.table.header,disabled:!n,onClick:()=>Jl(e),type:`button`,title:t.toolbar.table.headerColumn,children:[(0,u.jsx)(eu,{}),` \xA0 `,t.toolbar.table.header]})]})}function nu(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),{isInTable:n,selectedTableCellsCount:r,tableHasMergedCell:i}=H(e=>e.toolbar);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.mergeCells,disabled:!n||r<2,onClick:()=>Ul(e),type:`button`,children:t.toolbar.table.mergeCells}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.unmergeCell,disabled:!n||!i,onClick:()=>Wl(e),type:`button`,children:t.toolbar.table.unmergeCell})]})}function ru(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=!H(e=>e.toolbar.isInTable);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.insertRowAbove,disabled:n,onClick:()=>Rl(e,!1),type:`button`,children:t.toolbar.table.rowAbove}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.insertRowBelow,disabled:n,onClick:()=>Rl(e,!0),type:`button`,children:t.toolbar.table.rowBelow})]})}function iu(){return(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-panel`,role:`tabpanel`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(ru,{}),(0,u.jsx)(Ql,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(Xl,{}),(0,u.jsx)(Ql,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(nu,{}),(0,u.jsx)(Ql,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(Yl,{}),(0,u.jsx)(Ql,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(tu,{}),(0,u.jsx)(Ql,{})]}),(0,u.jsx)(`div`,{className:`rj-editor-toolbar-group`,children:(0,u.jsx)(Zl,{})})]})}function au(){let e=(0,t.$getSelection)();if(!(0,t.$isNodeSelection)(e))return null;let n=e.getNodes().find(ra);return ra(n)?n:null}function ou(){let e=au();return{isEquationSelected:!!e,selectedEquation:e?.getEquation(),selectedEquationDisplayMode:e?.getDisplayMode(),selectedEquationKey:e?.getKey()}}function su(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M8 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V8M8 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V16M21 8V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H16M21 16V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H16`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function cu(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M2.99986 8H3.19986C4.88002 8 5.7201 8 6.36183 7.67302C6.92632 7.3854 7.38526 6.92646 7.67288 6.36197C7.99986 5.72024 7.99986 4.88016 7.99986 3.2V3M2.99986 16H3.19986C4.88002 16 5.7201 16 6.36183 16.327C6.92632 16.6146 7.38526 17.0735 7.67288 17.638C7.99986 18.2798 7.99986 19.1198 7.99986 20.8V21M15.9999 3V3.2C15.9999 4.88016 15.9999 5.72024 16.3268 6.36197C16.6145 6.92646 17.0734 7.3854 17.6379 7.67302C18.2796 8 19.1197 8 20.7999 8H20.9999M15.9999 21V20.8C15.9999 19.1198 15.9999 18.2798 16.3268 17.638C16.6145 17.0735 17.0734 16.6146 17.6379 16.327C18.2796 16 19.1197 16 20.7999 16H20.9999`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var lu=[{value:`home`},{value:`insert`},{value:`equation`},{value:`image`},{value:`table`}];function uu({isFullscreen:e,onToggleFullscreen:n}){let[r]=(0,h.useLexicalComposerContext)(),i=U(),[a,o]=P.default.useState(`home`),s=zn(),c=H(e=>e.toolbar.isEquationSelected),l=H(e=>e.toolbar.isImageSelected),d=H(e=>e.toolbar.isInTable),p=c?`equation`:l?`image`:a===`table`&&!d||a===`image`&&!l||a===`equation`&&!c?`home`:a,g=lu.filter(e=>(e.value!==`table`||d)&&(e.value!==`equation`||c)&&(e.value!==`image`||l));return P.default.useEffect(()=>{let e=()=>{let e=(0,t.$getSelection)(),n=ou(),r=gs(),i=Il();if(s(Mn(n)),s(Nn(r)),s(Fn(i)),!(0,t.$isRangeSelection)(e))return;let a=e.anchor.getNode(),o=a.getTopLevelElementOrThrow(),c=(0,m.$getNearestNodeOfType)(a,f.ListNode);s(In({isBold:e.hasFormat(`bold`),isCode:e.hasFormat(`code`),isItalic:e.hasFormat(`italic`),isStrikethrough:e.hasFormat(`strikethrough`),isSubscript:e.hasFormat(`subscript`),isSuperscript:e.hasFormat(`superscript`),isUnderline:e.hasFormat(`underline`)})),s(Pn({backgroundColor:(0,E.$getSelectionStyleValueForProperty)(e,`background-color`,``),fontFamily:Ye((0,E.$getSelectionStyleValueForProperty)(e,`font-family`,``)),fontSize:Ze((0,E.$getSelectionStyleValueForProperty)(e,`font-size`,``)),lineHeight:(0,E.$getSelectionStyleValueForProperty)(e,`line-height`,``)||void 0,textColor:(0,E.$getSelectionStyleValueForProperty)(e,`color`,``)})),s(kn({alignment:o.getFormatType(),listType:(0,f.$isListNode)(c)?c.getListType():void 0}))},n=r.registerCommand(t.SELECTION_CHANGE_COMMAND,()=>(r.getEditorState().read(e),!1),t.COMMAND_PRIORITY_LOW),i=r.registerUpdateListener(({editorState:t})=>{t.read(e)}),a=r.registerCommand(t.CAN_UNDO_COMMAND,e=>(s(jn(e)),!1),t.COMMAND_PRIORITY_LOW),o=r.registerCommand(t.CAN_REDO_COMMAND,e=>(s(An(e)),!1),t.COMMAND_PRIORITY_LOW);return()=>{n(),i(),a(),o()}},[s,r]),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar`,"aria-label":`Editor toolbar`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-tabs`,children:[(0,u.jsx)(`div`,{className:`rj-editor-toolbar-tabs-list`,role:`tablist`,children:g.map(e=>(0,u.jsx)(`button`,{"aria-selected":p===e.value,className:p===e.value?`is-active`:void 0,onClick:()=>{o(e.value),window.requestAnimationFrame(()=>{r.focus()})},onMouseDown:e=>{e.preventDefault()},role:`tab`,type:`button`,children:i.toolbar.tabs[e.value]},e.value))}),(0,u.jsx)(`button`,{"aria-label":e?i.toolbar.fullscreen.close:i.toolbar.fullscreen.open,className:`rj-editor-toolbar-fullscreen`,onClick:n,type:`button`,children:e?(0,u.jsx)(cu,{"aria-hidden":`true`}):(0,u.jsx)(su,{"aria-hidden":`true`})})]}),p===`home`?(0,u.jsx)(cs,{editor:r}):null,p===`image`?(0,u.jsx)(Ts,{}):null,p===`insert`?(0,u.jsx)(Dl,{onTableInserted:()=>o(`table`)}):null,p===`table`?(0,u.jsx)(iu,{}):null,p===`layout`?(0,u.jsx)(Ol,{}):null,(0,u.jsx)(vl,{showButton:!1})]})}function du(){let[e]=(0,h.useLexicalComposerContext)();return(0,P.useEffect)(()=>e.registerCommand(He,e=>{let n=na(e);(0,m.$insertNodeToNearestRoot)(n),e.displayMode!==`inline`&&n.insertAfter((0,t.$createParagraphNode)());let r=(0,t.$createNodeSelection)();return r.add(n.getKey()),(0,t.$setSelection)(r),!0},t.COMMAND_PRIORITY_EDITOR),[e]),null}var fu=[`pnpm`,`npm`,`yarn`,`bun`,`terminal`],pu=`data-rj-code-title`,mu=`data-rj-code-custom-title`,hu=[`[data-line]`,`[data-highlighted-line]`,`.line`,`.code-line`].join(`, `);function gu(e){return e instanceof HTMLElement&&e.innerText?e.innerText:e.textContent||``}function _u(e){let t=[e.getAttribute(`data-language`),e.getAttribute(`data-lang`)].find(Boolean);return[e.className,e.querySelector(`code`)?.className].find(e=>/(?:^|\s)language-[a-z0-9-]+(?:\s|$)/i.test(e||``))?.match(/(?:^|\s)language-([a-z0-9-]+)/i)?.[1]||t||`plain`}function vu(e){let t=Array.from(e.querySelectorAll(hu));return t.length>1?t.map(e=>gu(e).replace(/\u00a0/g,` `)).join(`
67
- `).replace(/\n+$/g,``):gu(e).replace(/\u00a0/g,` `).replace(/^\n+|\n+$/g,``)}function yu(e,t){let n=gu(e).toLowerCase().replace(t.toLowerCase(),``);return!!e.querySelector(`button, [role="tab"], [role="tablist"]`)||fu.some(e=>n.includes(e))}function bu(e){let t=e.parentElement;for(;t&&t!==t.ownerDocument.body&&!(t.querySelectorAll(`pre`).length>1);){if(yu(t,gu(e)))return t;t=t.parentElement}return e}function xu(e,t){return gu(e).toLowerCase().includes(`terminal`)?`terminal`:_u(t)}function Su(e,t,n){let r=t.getAttribute(mu)||t.getAttribute(pu)||t.getAttribute(`data-title`)||t.getAttribute(`data-filename`);if(r)return r;let i=gu(e).toLowerCase(),a=gu(t).toLowerCase(),o=i.replace(a,``);return fu.find(e=>o.includes(e))||n}function Cu(e,t,n){let r=e.createElement(`pre`),i=xu(n,t),a=Su(n,t,i);return r.setAttribute(`data-language`,i),r.setAttribute(pu,a),a!==i&&r.setAttribute(mu,a),r.textContent=vu(t),r}function wu(e){if(!e.trim()||typeof DOMParser>`u`)return null;let t=new DOMParser().parseFromString(e,`text/html`),n=Array.from(t.querySelectorAll(`pre`));return n.length===0?null:(n.forEach(e=>{let n=e,r=bu(n),i=Cu(t,n,r);r.replaceWith(i)}),t.body.innerHTML)}Bi();function Tu(){let[e]=(0,h.useLexicalComposerContext)();return P.default.useEffect(()=>{let n=e.registerCommand(Ve,({code:e=``,language:n,title:r})=>{let i=pa(n,r);return e&&i.append((0,t.$createTextNode)(e)),(0,m.$insertNodeToNearestRoot)(i),i.insertAfter((0,t.$createParagraphNode)()),i.selectEnd(),!0},t.COMMAND_PRIORITY_EDITOR),r=e.registerCommand(t.PASTE_COMMAND,n=>{let r=(n instanceof ClipboardEvent?n.clipboardData:null)?.getData(`text/html`),a=r?wu(r):null;return a?(n.preventDefault(),e.update(()=>{let n=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(n))return;let r=(0,i.$generateNodesFromDOM)(e,new DOMParser().parseFromString(a,`text/html`));n.insertNodes(r)},{tag:t.PASTE_TAG}),!0):!1},t.COMMAND_PRIORITY_HIGH),a=e.registerUpdateListener(({editorState:n})=>{let r=!1;n.read(()=>{r=q((0,t.$getRoot)().getLastChild())}),r&&e.update(()=>{let e=(0,t.$getRoot)().getLastChild();q(e)&&e.insertAfter((0,t.$createParagraphNode)())})});return()=>{a(),r(),n()}},[e]),null}Bi();var Eu=8,Du=1,Ou={codeNodeKey:``,items:[],left:0,prefix:``,selectedIndex:0,top:0,visible:!1},ku={bun:`terminal`,javascript:`js`,node:`js`,npm:`terminal`,pnpm:`terminal`,shell:`terminal`,sh:`terminal`,terminal:`terminal`,text:`plain`,ts:`typescript`,yarn:`terminal`},Au={bash:[`alias`,`case`,`cd`,`chmod`,`cp`,`curl`,`do`,`done`,`echo`,`elif`,`else`,`export`,`fi`,`for`,`function`,`grep`,`if`,`mkdir`,`mv`,`npm`,`npx`,`pnpm`,`then`,`while`,`yarn`],css:[`align-items`,`background`,`border`,`color`,`display`,`flex`,`font-size`,`gap`,`grid`,`height`,`justify-content`,`margin`,`padding`,`position`,`width`],html:[`article`,`aside`,`button`,`class`,`div`,`footer`,`header`,`href`,`img`,`input`,`main`,`nav`,`section`,`span`,`type`],java:[`abstract`,`boolean`,`class`,`extends`,`final`,`implements`,`import`,`interface`,`new`,`private`,`protected`,`public`,`return`,`static`,`void`],js:`async.await.break.case.catch.class.const.continue.default.else.export.false.finally.for.function.if.import.let.new.null.return.switch.this.throw.true.try.typeof.undefined.var.while`.split(`.`),json:[`false`,`null`,`true`],markdown:[`blockquote`,`code`,`heading`,`image`,`link`,`list`,`table`],powershell:[`cd`,`Copy-Item`,`ForEach-Object`,`Get-ChildItem`,`Get-Content`,`if`,`Import-Module`,`New-Item`,`Set-Location`,`Where-Object`],py:[`as`,`async`,`await`,`class`,`def`,`elif`,`else`,`except`,`False`,`finally`,`for`,`from`,`if`,`import`,`in`,`lambda`,`None`,`return`,`self`,`True`,`try`,`while`],rust:[`async`,`await`,`enum`,`fn`,`impl`,`let`,`match`,`mod`,`mut`,`pub`,`return`,`self`,`struct`,`trait`,`use`],sql:[`ALTER`,`CREATE`,`DELETE`,`FROM`,`GROUP BY`,`INSERT`,`JOIN`,`ORDER BY`,`SELECT`,`UPDATE`,`VALUES`,`WHERE`],terminal:[`bun`,`bun add`,`bun install`,`cd`,`mkdir`,`npm`,`npm install`,`npm run build`,`npm run dev`,`npx`,`pnpm`,`pnpm add`,`pnpm create`,`pnpm dev`,`pnpm install`,`yarn`,`yarn add`],typescript:`abstract.async.await.break.catch.class.const.declare.else.enum.export.extends.false.finally.for.function.if.implements.import.interface.let.new.null.private.protected.public.readonly.return.satisfies.type.undefined`.split(`.`),yaml:[`apiVersion`,`containers`,`env`,`image`,`kind`,`metadata`,`name`,`services`,`spec`,`version`]};Au.jsx=[...Au.js,`Fragment`,`props`,`React`,`useCallback`,`useEffect`,`useMemo`,`useRef`,`useState`],Au.tsx=[...Au.typescript,`Fragment`,`React`,`useCallback`,`useEffect`,`useMemo`,`useRef`,`useState`],Au.xml=Au.html,Au.dockerfile=[`ADD`,`ARG`,`CMD`,`COPY`,`ENTRYPOINT`,`ENV`,`EXPOSE`,`FROM`,`LABEL`,`RUN`,`USER`,`WORKDIR`];function ju(e){let t=(e||`plain`).trim().toLowerCase();return ku[t]||t}function Mu(e){let t=e.anchor.getNode();if(q(t))return t;let n=t.getParent();return q(n)?n:null}function Nu(e,t){let n=t.anchor,r=n.getNode(),i=e.getChildren(),a=0;if(n.type===`element`&&r.is(e)){for(let e=0;e<n.offset;e+=1)a+=i[e]?.getTextContentSize()||0;return a}for(let e of i){if(e.is(r))return a+n.offset;a+=e.getTextContentSize()}return a}function Pu(e,t){let n=e.slice(0,t);return/[A-Za-z_$@./-][\w$@./:-]*$/.exec(n)?.[0]||``}function Fu(e,t){if(![`js`,`jsx`,`tsx`,`typescript`].includes(t))return[];let n=new Set,r=/\b(?:const|let|var|function|class|interface|type|enum)\s+([A-Za-z_$][\w$]*)/g,i;for(;(i=r.exec(e))!==null;)n.add(i[1]);return Array.from(n)}function Iu(e){return e===`plain`?[]:Au[e]||[]}function Lu(e){let t=e.prefix.toLowerCase(),n=[...Fu(e.text,e.language),...Iu(e.language)],r=new Set;return n.filter(e=>{let n=e.toLowerCase(),i=n.startsWith(t)&&n!==t&&!r.has(n);return r.add(n),i}).slice(0,Eu)}function Ru(){let e=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(e)||!e.isCollapsed())return null;let n=Mu(e);if(!n)return null;let r=e.anchor.getNode();if(!(0,t.$isTextNode)(r)&&!r.is(n))return null;let i=Nu(n,e),a=n.getTextContent(),o=Pu(a,i);return o.length<Du?null:{codeNode:n,language:ju(n.getLanguage()),offset:i,prefix:o,text:a}}function zu(e){let t=window.getSelection();if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0).getBoundingClientRect(),r=e.getBoundingClientRect(),i=e.getBoundingClientRect(),a=n.width||n.height?n:i;return{left:Math.max(8,a.left-r.left),top:Math.max(8,a.bottom-r.top+6)}}function Bu(e){return e.key.length===1&&(e.metaKey||e.ctrlKey||e.altKey)}function Vu(e,t){return e.visible===t.visible&&e.codeNodeKey===t.codeNodeKey&&e.left===t.left&&e.prefix===t.prefix&&e.selectedIndex===t.selectedIndex&&e.top===t.top&&e.items.length===t.items.length&&e.items.every((e,n)=>e===t.items[n])}function Hu(e,n){let r=e.slice(n.length);if(!r)return;let i=(0,t.$getSelection)();(0,t.$isRangeSelection)(i)&&i.isCollapsed()&&i.insertText(r)}function Uu(e){return q(e)||q(e?.getParent())}function Wu(){let[e]=(0,h.useLexicalComposerContext)(),[n,r]=P.default.useState(Ou),i=P.default.useRef(n),a=P.default.useCallback(()=>{let t=Ou;e.getEditorState().read(()=>{let n=Ru();if(!n)return;let r=e.getRootElement()?.closest(`.rj-editor-body`),i=r instanceof HTMLElement?zu(r):null;if(!i)return;let a=Lu(n);a.length!==0&&(t={codeNodeKey:n.codeNode.getKey(),items:a,left:i.left,prefix:n.prefix,selectedIndex:0,top:i.top,visible:!0})}),r(e=>Vu(e,t)?e:t)},[e]),o=P.default.useCallback((n,i)=>{e.update(()=>{let e=(0,t.$getSelection)();Uu((0,t.$isRangeSelection)(e)?e.anchor.getNode():null)&&Hu(n,i)}),r(Ou)},[e]);return P.default.useEffect(()=>{i.current=n},[n]),P.default.useEffect(()=>{let n=e.registerUpdateListener(()=>{a()}),s=e.registerCommand(t.SELECTION_CHANGE_COMMAND,()=>(a(),!1),t.COMMAND_PRIORITY_HIGH),c=e.registerCommand(t.KEY_DOWN_COMMAND,e=>{let t=i.current;if(!t.visible)return!1;if(Bu(e))return r(Ou),!1;if(e.key===`Escape`)return e.preventDefault(),r(Ou),!0;if(e.key===`ArrowDown`||e.key===`ArrowUp`)return e.preventDefault(),r(t=>{if(!t.visible)return t;let n=e.key===`ArrowDown`?1:-1,r=(t.selectedIndex+n+t.items.length)%t.items.length;return{...t,selectedIndex:r}}),!0;if(e.key===`Enter`||e.key===`Tab`){e.preventDefault();let n=t.items[t.selectedIndex];return n&&o(n,t.prefix),!0}return!1},t.COMMAND_PRIORITY_HIGH);return()=>{c(),s(),n()}},[e,o,a]),n.visible?(0,u.jsx)(`div`,{className:`rj-editor-code-completion`,contentEditable:!1,onMouseDown:e=>e.preventDefault(),style:{left:n.left,top:n.top},children:n.items.map((e,t)=>(0,u.jsx)(`button`,{className:t===n.selectedIndex?`is-active`:void 0,onClick:()=>o(e,n.prefix),onMouseEnter:()=>{r(e=>e.visible?{...e,selectedIndex:t}:e)},type:`button`,children:e},e))}):null}var Gu=M(((e,t)=>{var n=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,`__id`,{value:++n}),e.__id},clone:function e(t,n){n||={};var r,a;switch(i.util.type(t)){case`Object`:if(a=i.util.objId(t),n[a])return n[a];for(var o in r={},n[a]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case`Array`:return a=i.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return`none`},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,`gi`),``),e.classList.add(`language-`+n)},currentScript:function(){if(typeof document>`u`)return null;if(document.currentScript&&document.currentScript.tagName===`SCRIPT`)return document.currentScript;try{throw Error()}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName(`script`);for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=i.languages;var a=r[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=r[e];return r[e]=o,i.languages.DFS(i.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,a){a||={};var o=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var c=t[s],l=i.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:`code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code`};i.hooks.run(`before-highlightall`,r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run(`before-all-elements-highlight`,r);for(var a=0,o;o=r.elements[a++];)i.highlightElement(o,t===!0,r.callback)},highlightElement:function(t,n,r){var a=i.util.getLanguage(t),o=i.languages[a];i.util.setLanguage(t,a);var s=t.parentElement;s&&s.nodeName.toLowerCase()===`pre`&&i.util.setLanguage(s,a);var c={element:t,language:a,grammar:o,code:t.textContent};function l(e){c.highlightedCode=e,i.hooks.run(`before-insert`,c),c.element.innerHTML=c.highlightedCode,i.hooks.run(`after-highlight`,c),i.hooks.run(`complete`,c),r&&r.call(c.element)}if(i.hooks.run(`before-sanity-check`,c),s=c.element.parentElement,s&&s.nodeName.toLowerCase()===`pre`&&!s.hasAttribute(`tabindex`)&&s.setAttribute(`tabindex`,`0`),!c.code){i.hooks.run(`complete`,c),r&&r.call(c.element);return}if(i.hooks.run(`before-highlight`,c),!c.grammar){l(i.util.encode(c.code));return}if(n&&e.Worker){var u=new Worker(i.filename);u.onmessage=function(e){l(e.data)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(i.highlight(c.code,c.grammar,c.language))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(i.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run(`after-tokenize`,r),a.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new c;return l(i,i.head,e),s(e,i,t,i.head,0),d(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(!(!n||!n.length))for(var r=0,a;a=n[r++];)a(t)}},Token:a};e.Prism=i,globalThis.Prism=i;function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}a.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var r=``;return t.forEach(function(t){r+=e(t,n)}),r}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),i.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`&quot;`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function o(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function s(e,t,n,r,c,d){for(var f in n)if(!(!n.hasOwnProperty(f)||!n[f])){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+`g`)}for(var x=h.pattern||h,S=r.next,C=c;S!==t.tail&&!(d&&C>=d.reach);C+=S.value.length,S=S.next){var w=S.value;if(t.length>e.length)return;if(!(w instanceof a)){var T=1,E;if(v){if(E=o(x,C,e,_),!E||E.index>=e.length)break;var D=E.index,O=E.index+E[0].length,k=C;for(k+=S.value.length;D>=k;)S=S.next,k+=S.value.length;if(k-=S.value.length,C=k,S.value instanceof a)continue;for(var A=S;A!==t.tail&&(k<O||typeof A.value==`string`);A=A.next)T++,k+=A.value.length;T--,w=e.slice(C,k),E.index-=C}else if(E=o(x,0,w,_),!E)continue;var D=E.index,ee=E[0],te=w.slice(0,D),ne=w.slice(D+ee.length),j=C+w.length;d&&j>d.reach&&(d.reach=j);var M=S.prev;te&&(M=l(t,M,te),C+=te.length),u(t,M,T);var re=new a(f,g?i.tokenize(ee,g):ee,y,ee);if(S=l(t,M,re),ne&&l(t,S,ne),T>1){var ie={cause:f+`,`+m,reach:j};s(e,t,n,S.prev,C,ie),d&&ie.reach>d.reach&&(d.reach=ie.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function d(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}if(!e.document)return e.addEventListener&&(i.disableWorkerMessageHandler||e.addEventListener(`message`,function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()},!1)),i;var f=i.util.currentScript();f&&(i.filename=f.src,f.hasAttribute(`data-manual`)&&(i.manual=!0));function p(){i.manual||i.highlightAll()}if(!i.manual){var m=document.readyState;m===`loading`||m===`interactive`&&f&&f.defer?document.addEventListener(`DOMContentLoaded`,p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return i}(typeof window<`u`?window:typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:{});t!==void 0&&t.exports&&(t.exports=n),typeof global<`u`&&(global.Prism=n),globalThis.Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},globalThis.Prism.languages.markup.tag.inside[`attr-value`].inside.entity=globalThis.Prism.languages.markup.entity,globalThis.Prism.languages.markup.doctype.inside[`internal-subset`].inside=globalThis.Prism.languages.markup,globalThis.Prism.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&amp;/,`&`))}),Object.defineProperty(globalThis.Prism.languages.markup.tag,`addInlined`,{value:function(e,t){var n={};n[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:globalThis.Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r[`language-`+t]={pattern:/[\s\S]+/,inside:globalThis.Prism.languages[t]};var i={};i[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:r},globalThis.Prism.languages.insertBefore(`markup`,`cdata`,i)}}),Object.defineProperty(globalThis.Prism.languages.markup.tag,`addAttribute`,{value:function(e,t){globalThis.Prism.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:globalThis.Prism.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),globalThis.Prism.languages.html=globalThis.Prism.languages.markup,globalThis.Prism.languages.mathml=globalThis.Prism.languages.markup,globalThis.Prism.languages.svg=globalThis.Prism.languages.markup,globalThis.Prism.languages.xml=globalThis.Prism.languages.extend(`markup`,{}),globalThis.Prism.languages.ssml=globalThis.Prism.languages.xml,globalThis.Prism.languages.atom=globalThis.Prism.languages.xml,globalThis.Prism.languages.rss=globalThis.Prism.languages.xml,(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;globalThis.Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},globalThis.Prism.languages.css.atrule.inside.rest=globalThis.Prism.languages.css;var n=globalThis.Prism.languages.markup;n&&(n.tag.addInlined(`style`,`css`),n.tag.addAttribute(`style`,`css`))})(globalThis.Prism),globalThis.Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},globalThis.Prism.languages.javascript=globalThis.Prism.languages.extend(`clike`,{"class-name":[globalThis.Prism.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),globalThis.Prism.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,globalThis.Prism.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:globalThis.Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:globalThis.Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:globalThis.Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:globalThis.Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:globalThis.Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),globalThis.Prism.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:globalThis.Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),globalThis.Prism.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),globalThis.Prism.languages.markup&&(globalThis.Prism.languages.markup.tag.addInlined(`script`,`javascript`),globalThis.Prism.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),globalThis.Prism.languages.js=globalThis.Prism.languages.javascript,(function(){if(n===void 0||typeof document>`u`)return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=`Loading…`,t=function(e,t){return`✖ Error `+e+` while fetching file: `+t},r=`✖ Error: File does not exist or is empty`,i={js:`javascript`,py:`python`,rb:`ruby`,ps1:`powershell`,psm1:`powershell`,sh:`bash`,bat:`batch`,h:`c`,tex:`latex`},a=`data-src-status`,o=`loading`,s=`loaded`,c=`failed`,l=`pre[data-src]:not([`+a+`="`+s+`"]):not([`+a+`="`+o+`"])`;function u(e,n,i){var a=new XMLHttpRequest;a.open(`GET`,e,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?n(a.responseText):a.status>=400?i(t(a.status,a.statusText)):i(r))},a.send(null)}function d(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||``);if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}globalThis.Prism.hooks.add(`before-highlightall`,function(e){e.selector+=`, `+l}),globalThis.Prism.hooks.add(`before-sanity-check`,function(t){var r=t.element;if(r.matches(l)){t.code=``,r.setAttribute(a,o);var f=r.appendChild(document.createElement(`CODE`));f.textContent=e;var p=r.getAttribute(`data-src`),m=t.language;if(m===`none`){var h=(/\.(\w+)$/.exec(p)||[,`none`])[1];m=i[h]||h}n.util.setLanguage(f,m),n.util.setLanguage(r,m);var g=globalThis.Prism.plugins.autoloader;g&&g.loadLanguages(m),u(p,function(e){r.setAttribute(a,s);var t=d(r.getAttribute(`data-range`));if(t){var i=e.split(/\r\n?|\n/g),o=t[0],c=t[1]==null?i.length:t[1];o<0&&(o+=i.length),o=Math.max(0,Math.min(o-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(o,c).join(`
68
- `),r.hasAttribute(`data-start`)||r.setAttribute(`data-start`,String(o+1))}f.textContent=e,n.highlightElement(f)},function(e){r.setAttribute(a,c),f.textContent=e})}}),globalThis.Prism.plugins.fileHighlight={highlight:function(e){for(var t=(e||document).querySelectorAll(l),r=0,i;i=t[r++];)n.highlightElement(i)}};var f=!1;globalThis.Prism.fileHighlight=function(){f||=(console.warn("globalThis.Prism.fileHighlight is deprecated. Use `globalThis.Prism.plugins.fileHighlight.highlight` instead."),!0),globalThis.Prism.plugins.fileHighlight.highlight.apply(this,arguments)}})()})),Ku=j((()=>{globalThis.Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}})),qu=j((()=>{globalThis.Prism.languages.javascript=globalThis.Prism.languages.extend(`clike`,{"class-name":[globalThis.Prism.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),globalThis.Prism.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,globalThis.Prism.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:globalThis.Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:globalThis.Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:globalThis.Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:globalThis.Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:globalThis.Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),globalThis.Prism.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:globalThis.Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),globalThis.Prism.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),globalThis.Prism.languages.markup&&(globalThis.Prism.languages.markup.tag.addInlined(`script`,`javascript`),globalThis.Prism.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),globalThis.Prism.languages.js=globalThis.Prism.languages.javascript})),Ju=j((()=>{globalThis.Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},globalThis.Prism.languages.markup.tag.inside[`attr-value`].inside.entity=globalThis.Prism.languages.markup.entity,globalThis.Prism.languages.markup.doctype.inside[`internal-subset`].inside=globalThis.Prism.languages.markup,globalThis.Prism.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&amp;/,`&`))}),Object.defineProperty(globalThis.Prism.languages.markup.tag,`addInlined`,{value:function(e,t){var n={};n[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:globalThis.Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r[`language-`+t]={pattern:/[\s\S]+/,inside:globalThis.Prism.languages[t]};var i={};i[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:r},globalThis.Prism.languages.insertBefore(`markup`,`cdata`,i)}}),Object.defineProperty(globalThis.Prism.languages.markup.tag,`addAttribute`,{value:function(e,t){globalThis.Prism.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:globalThis.Prism.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),globalThis.Prism.languages.html=globalThis.Prism.languages.markup,globalThis.Prism.languages.mathml=globalThis.Prism.languages.markup,globalThis.Prism.languages.svg=globalThis.Prism.languages.markup,globalThis.Prism.languages.xml=globalThis.Prism.languages.extend(`markup`,{}),globalThis.Prism.languages.ssml=globalThis.Prism.languages.xml,globalThis.Prism.languages.atom=globalThis.Prism.languages.xml,globalThis.Prism.languages.rss=globalThis.Prism.languages.xml})),Yu=j((()=>{(function(e){var t=`(?:\\\\.|[^\\\\\\n\\r]|(?:\\n|\\r\\n?)(?![\\r\\n]))`;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(`((?:^|[^\\\\])(?:\\\\{2})*)(?:`+e+`)`)}var r="(?:\\\\.|``(?:[^`\\r\\n]|`(?!`))+``|`[^`\\r\\n]+`|[^\\\\|\\r\\n`])+",i=`\\|?__(?:\\|__)+\\|?(?:(?:\\n|\\r\\n?)|(?![\\s\\S]))`.replace(/__/g,function(){return r}),a=`\\|?[ \\t]*:?-{3,}:?[ \\t]*(?:\\|[ \\t]*:?-{3,}:?[ \\t]*)+\\|?(?:\\n|\\r\\n?)`;globalThis.Prism.languages.markdown=globalThis.Prism.languages.extend(`markup`,{}),globalThis.Prism.languages.insertBefore(`markdown`,`prolog`,{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:[`yaml`,`language-yaml`],inside:globalThis.Prism.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:`punctuation`},table:{pattern:RegExp(`^`+i+a+`(?:`+i+`)*`,`m`),inside:{"table-data-rows":{pattern:RegExp(`^(`+i+a+`)(?:`+i+`)*$`),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:globalThis.Prism.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp(`^(`+i+`)`+a+`$`),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp(`^`+i+`$`),inside:{"table-header":{pattern:RegExp(r),alias:`important`,inside:globalThis.Prism.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:`keyword`},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:`important`,inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:`important`,inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:`punctuation`},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:`punctuation`},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:`url`},bold:{pattern:n(`\\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\\b|\\*\\*(?:(?!\\*)<inner>|\\*(?:(?!\\*)<inner>)+\\*)+\\*\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(`\\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\\b|\\*(?:(?!\\*)<inner>|\\*\\*(?:(?!\\*)<inner>)+\\*\\*)+\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(`(~~?)(?:(?!~)<inner>)+\\2`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:[`code`,`keyword`]},url:{pattern:n(`!?\\[(?:(?!\\])<inner>)+\\](?:\\([^\\s)]+(?:[\\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \\t]?\\[(?:(?!\\])<inner>)+\\])`),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),[`url`,`bold`,`italic`,`strike`].forEach(function(e){[`url`,`bold`,`italic`,`strike`,`code-snippet`].forEach(function(t){e!==t&&(globalThis.Prism.languages.markdown[e].inside.content.inside[t]=globalThis.Prism.languages.markdown[t])})}),globalThis.Prism.hooks.add(`after-tokenize`,function(e){if(e.language!==`markdown`&&e.language!==`md`)return;function t(e){if(!(!e||typeof e==`string`))for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i.type!==`code`){t(i.content);continue}var a=i.content[1],o=i.content[3];if(a&&o&&a.type===`code-language`&&o.type===`code-block`&&typeof a.content==`string`){var s=a.content.replace(/\b#/g,`sharp`).replace(/\b\+\+/g,`pp`);s=(/[a-z][\w-]*/i.exec(s)||[``])[0].toLowerCase();var c=`language-`+s;o.alias?typeof o.alias==`string`?o.alias=[o.alias,c]:o.alias.push(c):o.alias=[c]}}}t(e.tokens)}),globalThis.Prism.hooks.add(`wrap`,function(e){if(e.type===`code-block`){for(var t=``,n=0,r=e.classes.length;n<r;n++){var i=e.classes[n],a=/language-(.+)/.exec(i);if(a){t=a[1];break}}var o=globalThis.Prism.languages[t];if(o)e.content=globalThis.Prism.highlight(l(e.content),o,t);else if(t&&t!==`none`&&globalThis.Prism.plugins.autoloader){var s=`md-`+new Date().valueOf()+`-`+Math.floor(Math.random()*0x2386f26fc10000);e.attributes.id=s,globalThis.Prism.plugins.autoloader.loadLanguages(t,function(){var e=document.getElementById(s);e&&(e.innerHTML=globalThis.Prism.highlight(e.textContent,globalThis.Prism.languages[t],t))})}}});var o=RegExp(globalThis.Prism.languages.markup.tag.pattern.source,`gi`),s={amp:`&`,lt:`<`,gt:`>`,quot:`"`},c=String.fromCodePoint||String.fromCharCode;function l(e){var t=e.replace(o,``);return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){return t=t.toLowerCase(),t[0]===`#`?c(t[1]===`x`?parseInt(t.slice(2),16):Number(t.slice(1))):s[t]||e}),t}globalThis.Prism.languages.md=globalThis.Prism.languages.markdown})(globalThis.Prism)})),Xu=j((()=>{globalThis.Prism.languages.c=globalThis.Prism.languages.extend(`clike`,{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),globalThis.Prism.languages.insertBefore(`c`,`string`,{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),globalThis.Prism.languages.insertBefore(`c`,`string`,{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:`property`,inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},globalThis.Prism.languages.c.string],char:globalThis.Prism.languages.c.char,comment:globalThis.Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:`function`}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:`keyword`},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:globalThis.Prism.languages.c}}}}),globalThis.Prism.languages.insertBefore(`c`,`function`,{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete globalThis.Prism.languages.c.boolean})),Zu=j((()=>{(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;globalThis.Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},globalThis.Prism.languages.css.atrule.inside.rest=globalThis.Prism.languages.css;var n=globalThis.Prism.languages.markup;n&&(n.tag.addInlined(`style`,`css`),n.tag.addAttribute(`style`,`css`))})(globalThis.Prism)})),Qu=j((()=>{globalThis.Prism.languages.objectivec=globalThis.Prism.languages.extend(`c`,{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete globalThis.Prism.languages.objectivec[`class-name`],globalThis.Prism.languages.objc=globalThis.Prism.languages.objectivec})),$u=j((()=>{globalThis.Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}})),ed=j((()=>{(function(e){var t=globalThis.Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}})(globalThis.Prism)})),td=j((()=>{globalThis.Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:`punctuation`},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:`string`},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:[`annotation`,`punctuation`],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},globalThis.Prism.languages.python[`string-interpolation`].inside.interpolation.inside.rest=globalThis.Prism.languages.python,globalThis.Prism.languages.py=globalThis.Prism.languages.python})),nd=j((()=>{(function(e){for(var t=`\\/\\*(?:[^*/]|\\*(?!\\/)|\\/(?!\\*)|<self>)*\\*\\/`,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return`[^\\s\\S]`}),globalThis.Prism.languages.rust={comment:[{pattern:RegExp(`(^|[^\\\\])`+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:`attr-name`,inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:`punctuation`},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:`symbol`},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:`punctuation`},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:`function`},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:`class-name`},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:`namespace`},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:`namespace`,inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:`property`},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},globalThis.Prism.languages.rust[`closure-params`].inside.rest=globalThis.Prism.languages.rust,globalThis.Prism.languages.rust.attribute.inside.string=globalThis.Prism.languages.rust.string})(globalThis.Prism)})),rd=j((()=>{globalThis.Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(`(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^(])|[^\\\\\\r\\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:`punctuation`},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(`(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^#])|[^\\\\\\r\\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:`punctuation`},string:/[\s\S]+/}}],directive:{pattern:RegExp(`#(?:(?:elseif|if)\\b(?:[ ]*(?:![ \\t]*)?(?:\\b\\w+\\b(?:[ \\t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \\t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)`),alias:`property`,inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:`constant`},"other-directive":{pattern:/#\w+\b/,alias:`property`},attribute:{pattern:/@\w+/,alias:`atrule`},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:`function`},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:`important`},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:`constant`},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:`keyword`},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},globalThis.Prism.languages.swift[`string-literal`].forEach(function(e){e.inside.interpolation.inside=globalThis.Prism.languages.swift})})),id=j((()=>{(function(e){globalThis.Prism.languages.typescript=globalThis.Prism.languages.extend(`javascript`,{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),globalThis.Prism.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete globalThis.Prism.languages.typescript.parameter,delete globalThis.Prism.languages.typescript[`literal-property`];var t=globalThis.Prism.languages.extend(`typescript`,{});delete t[`class-name`],globalThis.Prism.languages.typescript[`class-name`].inside=t,globalThis.Prism.languages.insertBefore(`typescript`,`function`,{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:`operator`},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:t}}}}),globalThis.Prism.languages.ts=globalThis.Prism.languages.typescript})(globalThis.Prism)})),ad=j((()=>{(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=`(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*`,r={pattern:RegExp(`(^|[^\\w.])`+n+`[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b`),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};globalThis.Prism.languages.java=globalThis.Prism.languages.extend(`clike`,{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(`(^|[^\\w.])`+n+`[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)`),lookbehind:!0,inside:r.inside},{pattern:RegExp(`(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)`+n+`[A-Z]\\w*\\b`),lookbehind:!0,inside:r.inside}],keyword:t,function:[globalThis.Prism.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),globalThis.Prism.languages.insertBefore(`java`,`string`,{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:`string`},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),globalThis.Prism.languages.insertBefore(`java`,`class-name`,{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:`punctuation`},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(`(\\bimport\\s+)`+n+`(?:[A-Z]\\w*|\\*)(?=\\s*;)`),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(`(\\bimport\\s+static\\s+)`+n+`(?:\\w+|\\*)(?=\\s*;)`),lookbehind:!0,alias:`static`,inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(`(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!<keyword>)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?`.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(globalThis.Prism)})),od=j((()=>{(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=`\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b`.replace(/<keyword>/g,function(){return t.source});globalThis.Prism.languages.cpp=globalThis.Prism.languages.extend(`c`,{"class-name":[{pattern:RegExp(`(\\b(?:class|concept|enum|struct|typename)\\s+)(?!<keyword>)\\w+`.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),globalThis.Prism.languages.insertBefore(`cpp`,`string`,{module:{pattern:RegExp(`(\\b(?:import|module)\\s+)(?:"(?:\\\\(?:\\r\\n|[\\s\\S])|[^"\\\\\\r\\n])*"|<[^<>\\r\\n]*>|`+`<mod-name>(?:\\s*:\\s*<mod-name>)?|:\\s*<mod-name>`.replace(/<mod-name>/g,function(){return n})+`)`),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:`string`,greedy:!0}}),globalThis.Prism.languages.insertBefore(`cpp`,`keyword`,{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:globalThis.Prism.languages.cpp}}}}),globalThis.Prism.languages.insertBefore(`cpp`,`operator`,{"double-colon":{pattern:/::/,alias:`punctuation`}}),globalThis.Prism.languages.insertBefore(`cpp`,`class-name`,{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:globalThis.Prism.languages.extend(`cpp`,{})}}),globalThis.Prism.languages.insertBefore(`inside`,`double-colon`,{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},globalThis.Prism.languages.cpp[`base-clause`])})(globalThis.Prism)})),sd=re({CODE_LANGUAGE_FRIENDLY_NAME_MAP:()=>Od,CODE_LANGUAGE_MAP:()=>kd,CodePrismExtension:()=>Md,PrismTokenizer:()=>jd,getCodeLanguageOptions:()=>dd,getCodeLanguages:()=>Ad,getCodeThemeOptions:()=>fd,getLanguageFriendlyName:()=>ud,isCodeLanguageLoaded:()=>pd,loadCodeLanguage:()=>md,normalizeCodeLanguage:()=>ld,registerCodeHighlighting:()=>Dd});function cd(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function ld(e){return kd[e]||e}function ud(e){let t=ld(e);return Od[t]||t}function dd(){let e=[];for(let[t,n]of Object.entries(Od))e.push([t,n]);return e}function fd(){return[]}function pd(e){let t=function(e){let t=/^diff-([\w-]+)/i.exec(e);return t?t[1]:null}(e)||e;try{return!!t&&$.languages.hasOwnProperty(t)}catch{return!1}}async function md(e,t,n){}function hd(e){return typeof e==`string`?e:Array.isArray(e)?e.map(hd).join(``):hd(e.content)}function gd(e,t){let n=/^diff-([\w-]+)/i.exec(t),r=e.getTextContent(),i=$.tokenize(r,$.languages[n?`diff`:t]);return n&&(i=function(e,t){let n=t,r=$.languages[n],i={tokens:e},a=$.languages.diff.PREFIXES;for(let e of i.tokens){if(typeof e==`string`||!(e.type in a)||!Array.isArray(e.content))continue;let t=e.type,n=0,i=()=>(n++,new $.Token(`prefix`,a[t],t.replace(/^(\w+).*/,`$1`))),o=e.content.filter(e=>typeof e==`string`||e.type!==`prefix`),s=e.content.length-o.length,c=$.tokenize(hd(o),r);c.unshift(i());let l=/\r\n|\n/g,u=e=>{let t=[];l.lastIndex=0;let r,a=0;for(;n<s&&(r=l.exec(e));){let n=r.index+r[0].length;t.push(e.slice(a,n)),a=n,t.push(i())}if(t.length!==0)return a<e.length&&t.push(e.slice(a)),t},d=e=>{for(let t=0;t<e.length&&n<s;t++){let n=e[t];if(typeof n==`string`){let r=u(n);r&&(e.splice(t,1,...r),t+=r.length-1)}else if(typeof n.content==`string`){let e=u(n.content);e&&(n.content=e)}else Array.isArray(n.content)?d(n.content):d([n.content])}};d(c),n<s&&c.push(i()),e.content=c}return i.tokens}(i,n[1])),_d(i)}function _d(e,n){let r=[];for(let i of e)if(typeof i==`string`){let e=i.split(/(\n|\t)/),a=e.length;for(let i=0;i<a;i++){let a=e[i];a===`
66
+ `,tl=e=>{let{csp:t,prefixCls:n,layer:r}=(0,s.useContext)(ks),i=el;n&&(i=i.replace(/anticon/g,n)),r&&(i=`@layer ${r} {\n${i}\n}`),(0,s.useEffect)(()=>{let n=e.current,a=Lc(n);Pc(i,`@ant-design-icons`,{prepend:!r,csp:t,attachTo:a})},[])},nl={primaryColor:`#333`,secondaryColor:`#E6E6E6`,calculated:!1};function rl({primaryColor:e,secondaryColor:t}){nl.primaryColor=e,nl.secondaryColor=t||Qc(e),nl.calculated=!!t}function il(){return{...nl}}var al=e=>{let{icon:t,className:n,onClick:r,style:i,primaryColor:a,secondaryColor:o,...c}=e,l=s.useRef(null),u=nl;if(a&&(u={primaryColor:a,secondaryColor:o||Qc(a)}),tl(l),Jc(Yc(t),`icon should be icon definiton, but got ${t}`),!Yc(t))return null;let d=t;return d&&typeof d.icon==`function`&&(d={...d,icon:d.icon(u.primaryColor,u.secondaryColor)}),Zc(d.icon,`svg-${d.name}`,{className:n,onClick:r,style:i,"data-icon":d.name,width:`1em`,height:`1em`,fill:`currentColor`,"aria-hidden":`true`,...c,ref:l})};al.displayName=`IconReact`,al.getTwoToneColors=il,al.setTwoToneColors=rl;function ol(e){let[t,n]=$c(e);return al.setTwoToneColors({primaryColor:t,secondaryColor:n})}function sl(){let e=al.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}function cl(){return cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cl.apply(this,arguments)}ol(rc.primary);var ll=s.forwardRef((e,t)=>{let{className:n,icon:r,spin:i,rotate:a,tabIndex:o,onClick:c,twoToneColor:l,...u}=e,{prefixCls:d=`anticon`,rootClassName:f}=s.useContext(ks),p=js(f,d,{[`${d}-${r.name}`]:!!r.name,[`${d}-spin`]:!!i||r.name===`loading`},n),m=o;m===void 0&&c&&(m=-1);let h=a?{msTransform:`rotate(${a}deg)`,transform:`rotate(${a}deg)`}:void 0,[g,_]=$c(l);return s.createElement(`span`,cl({role:`img`,"aria-label":r.name},u,{ref:t,tabIndex:m,onClick:c,className:p}),s.createElement(al,{icon:r,primaryColor:g,secondaryColor:_,style:h}))});ll.getTwoToneColor=sl,ll.setTwoToneColor=ol,process.env.NODE_ENV!==`production`&&(ll.displayName=`AntdIcon`);var ul={icon:{tag:`svg`,attrs:{viewBox:`0 0 1024 1024`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z`}}]},name:`loading`,theme:`outlined`};function dl(){return dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dl.apply(this,arguments)}var fl=s.forwardRef((e,t)=>s.createElement(ll,dl({},e,{ref:t,icon:ul})));process.env.NODE_ENV!==`production`&&(fl.displayName=`LoadingOutlined`);function pl({size:e=24,className:t}){return(0,u.jsx)(fl,{className:t,style:{fontSize:e},spin:!0})}function ml(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),{isUploading:n,uploadImage:r}=ka(),i=P.default.useRef(null);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.insert.image,"aria-busy":n,disabled:n,onClick:()=>{un(i.current)},onMouseDown:e=>{e.preventDefault()},title:t.toolbar.insert.image,type:`button`,children:n?(0,u.jsx)(pl,{}):(0,u.jsx)(Os,{})}),(0,u.jsx)(`input`,{accept:`image/*`,className:`rj-editor-hidden-file-input`,onChange:async n=>{let i=n.target.files?.[0];if(n.target.value=``,!i){e.focus();return}if(!i.type.startsWith(`image/`)){window.alert(t.alerts.onlyImages),e.focus();return}if(i.size>5242880){window.alert(t.alerts.imageSizeLimit),e.focus();return}let a;try{a=await r(i)}catch(n){console.error(n),window.alert(t.alerts.imageUploadFailed),e.focus();return}e.dispatchCommand(Ue,{altText:i.name,src:a}),e.focus()},ref:i,type:`file`})]})}function hl(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M21.1525 10.8999L12.1369 19.9156C10.0866 21.9658 6.7625 21.9658 4.71225 19.9156C2.662 17.8653 2.662 14.5412 4.71225 12.4909L13.7279 3.47532C15.0947 2.10849 17.3108 2.10849 18.6776 3.47532C20.0444 4.84216 20.0444 7.05823 18.6776 8.42507L10.0156 17.0871C9.33213 17.7705 8.22409 17.7705 7.54068 17.0871C6.85726 16.4037 6.85726 15.2957 7.54068 14.6123L15.1421 7.01086`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var gl=`noreferrer`;function _l({enableShortcutListener:e=!0,showButton:n=!0}){let[r]=(0,h.useLexicalComposerContext)(),i=U(),[a,o]=P.default.useState(!1),[s,c]=P.default.useState(``),[l,f]=P.default.useState(``),[p,m]=P.default.useState(``),[g,_]=P.default.useState(!0),v=P.default.useCallback(()=>{o(!1),r.focus()},[r]),y=P.default.useCallback(()=>{let e=``;r.getEditorState().read(()=>{let n=(0,t.$getSelection)();(0,t.$isRangeSelection)(n)&&(e=n.getTextContent())}),c(e),f(``),m(``),_(!0),o(!0)},[r]);return P.default.useEffect(()=>{if(!e)return;let t=()=>y();return window.addEventListener(Ke,t),()=>{window.removeEventListener(Ke,t)}},[e,y]),(0,u.jsxs)(u.Fragment,{children:[n?(0,u.jsx)(`button`,{"aria-label":i.toolbar.insert.link,onClick:y,onMouseDown:e=>{e.preventDefault()},title:F(`MOD+K`,i.toolbar.shortcuts.link),type:`button`,children:(0,u.jsx)(hl,{})}):null,(0,u.jsx)(fs,{okText:i.common.insert,onCancel:v,onOk:()=>{let e=p.trim();if(!e){r.focus();return}let n={rel:gl,target:g?`_blank`:null,title:l.trim()||null,url:(0,d.formatUrl)(e)};r.focus(()=>{r.update(()=>{let e=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(e))return;let r=s.trim();if(e.isCollapsed()){let i=(0,d.$createLinkNode)(n.url,{rel:n.rel,target:n.target,title:n.title});i.append((0,t.$createTextNode)(r||n.url)),e.insertNodes([i]),i.selectEnd();return}r&&r!==e.getTextContent()&&e.insertText(r),(0,d.$toggleLink)(n)})}),o(!1)},open:a,title:i.toolbar.insert.link,children:(0,u.jsxs)(`div`,{className:`rj-editor-link-form`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-link-field`,children:[(0,u.jsx)(`label`,{htmlFor:`rj-editor-link-url`,children:i.toolbar.link.url}),(0,u.jsx)(`input`,{autoFocus:!0,id:`rj-editor-link-url`,onChange:e=>m(e.target.value),placeholder:i.toolbar.link.urlPlaceholder,type:`text`,value:p})]}),(0,u.jsxs)(`div`,{className:`rj-editor-link-field`,children:[(0,u.jsx)(`label`,{htmlFor:`rj-editor-link-text`,children:i.toolbar.link.text}),(0,u.jsx)(`input`,{id:`rj-editor-link-text`,onChange:e=>c(e.target.value),placeholder:i.toolbar.link.textPlaceholder,type:`text`,value:s})]}),(0,u.jsxs)(`div`,{className:`rj-editor-link-field`,children:[(0,u.jsx)(`label`,{htmlFor:`rj-editor-link-title`,children:i.toolbar.link.title}),(0,u.jsx)(`input`,{id:`rj-editor-link-title`,onChange:e=>f(e.target.value),placeholder:i.toolbar.link.titlePlaceholder,type:`text`,value:l})]}),(0,u.jsxs)(`label`,{className:`rj-editor-link-checkbox`,children:[(0,u.jsx)(`input`,{checked:g,onChange:e=>_(e.target.checked),type:`checkbox`}),i.toolbar.link.openInNewTab]})]})})]})}function vl(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M3 12H21M12 3V21M7.8 3H16.2C17.8802 3 18.7202 3 19.362 3.32698C19.9265 3.6146 20.3854 4.07354 20.673 4.63803C21 5.27976 21 6.11984 21 7.8V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V7.8C3 6.11984 3 5.27976 3.32698 4.63803C3.6146 4.07354 4.07354 3.6146 4.63803 3.32698C5.27976 3 6.11984 3 7.8 3Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var yl=1,bl=20,xl=8,Sl=10;function Cl({onTableInserted:e}){let[t]=(0,h.useLexicalComposerContext)(),n=U(),r=P.default.useId(),i=P.default.useId(),[a,s]=P.default.useState(!1),[c,l]=P.default.useState(3),[d,f]=P.default.useState(3),[m,g]=P.default.useState(3),[_,v]=P.default.useState(3),[y,b]=P.default.useState(!0),x=(n=c,r=d)=>{t.dispatchCommand(p.INSERT_TABLE_COMMAND,{columns:String(r),includeHeaders:y?{columns:!1,rows:!0}:!1,rows:String(n)}),s(!1),e?.(),t.focus()};return(0,u.jsx)(o.Dropdown,{dropdownRender:()=>(0,u.jsxs)(`div`,{className:`rj-editor-table-menu`,children:[(0,u.jsx)(`div`,{className:`rj-editor-table-menu-title`,children:n.toolbar.table.insertTableSize.replace(`{columns}`,String(_)).replace(`{rows}`,String(m))}),(0,u.jsx)(`div`,{className:`rj-editor-table-grid`,onMouseLeave:()=>{g(c),v(d)},children:Array.from({length:xl}).map((e,t)=>(0,u.jsx)(P.default.Fragment,{children:Array.from({length:Sl}).map((e,r)=>{let i=t+1,a=r+1,o=i<=m&&a<=_;return(0,u.jsx)(`button`,{"aria-label":n.toolbar.table.insertTableSize.replace(`{columns}`,String(a)).replace(`{rows}`,String(i)),className:o?`is-selected`:void 0,onClick:()=>x(i,a),onMouseEnter:()=>{g(i),v(a)},type:`button`},`${t}-${r}`)})},t))}),(0,u.jsx)(`div`,{className:`rj-editor-table-menu-divider`}),(0,u.jsxs)(`div`,{className:`rj-editor-table-menu-row`,children:[(0,u.jsx)(`label`,{htmlFor:r,children:n.toolbar.table.rows}),(0,u.jsx)(ds,{id:r,integerOnly:!0,max:bl,min:yl,onChange:l,value:c})]}),(0,u.jsxs)(`div`,{className:`rj-editor-table-menu-row`,children:[(0,u.jsx)(`label`,{htmlFor:i,children:n.toolbar.table.columns}),(0,u.jsx)(ds,{id:i,integerOnly:!0,max:bl,min:yl,onChange:f,value:d})]}),(0,u.jsx)(o.Checkbox,{checked:y,onChange:e=>{b(e.target.checked)},children:n.toolbar.table.headerRow}),(0,u.jsx)(o.Button,{block:!0,onClick:()=>x(),size:`small`,type:`primary`,children:n.toolbar.table.insertTable})]}),onOpenChange:e=>{s(e),g(c),v(d)},open:a,trigger:[`click`],children:(0,u.jsx)(`button`,{"aria-label":n.toolbar.table.insertTable,className:a?`is-active`:void 0,onMouseDown:e=>{e.preventDefault()},title:n.toolbar.insert.table,type:`button`,children:(0,u.jsx)(vl,{})})})}function wl(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M21.5813 7.19989C21.4733 6.76846 21.2534 6.37318 20.9438 6.05395C20.6341 5.73473 20.2457 5.50287 19.8178 5.3818C18.2542 5 12 5 12 5C12 5 5.74578 5 4.18222 5.41816C3.75429 5.53923 3.36588 5.77109 3.05623 6.09031C2.74659 6.40954 2.52666 6.80482 2.41868 7.23625C2.13253 8.82303 1.99255 10.4327 2.00052 12.0451C1.99032 13.6696 2.1303 15.2916 2.41868 16.8903C2.53773 17.3083 2.76258 17.6886 3.0715 17.9943C3.38043 18.3 3.76299 18.5209 4.18222 18.6357C5.74578 19.0538 12 19.0538 12 19.0538C12 19.0538 18.2542 19.0538 19.8178 18.6357C20.2457 18.5146 20.6341 18.2827 20.9438 17.9635C21.2534 17.6443 21.4733 17.249 21.5813 16.8176C21.8653 15.2427 22.0052 13.6453 21.9995 12.0451C22.0097 10.4206 21.8697 8.79862 21.5813 7.19989Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,u.jsx)(`path`,{d:`M9.75 9.46533C9.75 8.98805 9.75 8.74941 9.84974 8.61618C9.93666 8.50008 10.0697 8.42744 10.2144 8.4171C10.3804 8.40525 10.5811 8.53429 10.9826 8.79239L14.9254 11.3271C15.2738 11.551 15.448 11.663 15.5082 11.8054C15.5607 11.9298 15.5607 12.0702 15.5082 12.1946C15.448 12.337 15.2738 12.449 14.9254 12.6729L10.9826 15.2076C10.5811 15.4657 10.3804 15.5948 10.2144 15.5829C10.0697 15.5726 9.93666 15.4999 9.84974 15.3838C9.75 15.2506 9.75 15.012 9.75 14.5347V9.46533Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Tl(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),[n,r]=P.default.useState(!1),[i,a]=P.default.useState(``),[o,s]=P.default.useState(``),[c,l]=P.default.useState(``);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.insert.youtube,onClick:()=>{a(``),s(``),l(``),r(!0)},onMouseDown:e=>{e.preventDefault()},title:t.toolbar.insert.youtube,type:`button`,children:(0,u.jsx)(wl,{"aria-hidden":`true`})}),(0,u.jsx)(fs,{okText:t.common.insert,onCancel:()=>{r(!1),l(``),e.focus()},onOk:()=>{let n=Oe(o);if(!n){l(t.toolbar.youtube.invalidUrl);return}e.dispatchCommand(We,{title:i.trim(),videoId:n}),r(!1),l(``),e.focus()},open:n,title:t.toolbar.insert.youtube,children:(0,u.jsxs)(`div`,{className:`rj-editor-youtube-form`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-youtube-field`,children:[(0,u.jsx)(`label`,{htmlFor:`rj-editor-youtube-url`,children:t.toolbar.youtube.url}),(0,u.jsx)(`input`,{autoFocus:!0,id:`rj-editor-youtube-url`,onChange:e=>{s(e.target.value),l(``)},placeholder:t.toolbar.youtube.urlPlaceholder,type:`text`,value:o})]}),(0,u.jsxs)(`div`,{className:`rj-editor-youtube-field`,children:[(0,u.jsx)(`label`,{htmlFor:`rj-editor-youtube-title`,children:t.toolbar.youtube.title}),(0,u.jsx)(`input`,{id:`rj-editor-youtube-title`,onChange:e=>a(e.target.value),placeholder:t.toolbar.youtube.titlePlaceholder,type:`text`,value:i})]}),c?(0,u.jsx)(`p`,{className:`rj-editor-youtube-error`,children:c}):null]})})]})}function El({onTableInserted:e}){return(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-panel`,role:`tabpanel`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(Cl,{onTableInserted:e}),(0,u.jsx)(_l,{enableShortcutListener:!1}),(0,u.jsx)(Ts,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(ml,{}),(0,u.jsx)(Tl,{}),(0,u.jsx)(Ds,{})]})]})}function Dl(){return(0,u.jsx)(`div`,{className:`rj-editor-toolbar-panel`,role:`tabpanel`})}function Ol(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M15.9997 11L1.9997 11M9.9997 4L7.9997 2M13.9997 22L1.9997 22M21.9997 16C21.9997 17.1046 21.1043 18 19.9997 18C18.8951 18 17.9997 17.1046 17.9997 16C17.9997 14.8954 19.9997 13 19.9997 13C19.9997 13 21.9997 14.8954 21.9997 16ZM8.9997 3L15.8683 9.86863C16.2643 10.2646 16.4624 10.4627 16.5365 10.691C16.6018 10.8918 16.6018 11.1082 16.5365 11.309C16.4624 11.5373 16.2643 11.7354 15.8683 12.1314L11.2624 16.7373C10.4704 17.5293 10.0744 17.9253 9.61773 18.0737C9.21605 18.2042 8.78335 18.2042 8.38166 18.0737C7.92501 17.9253 7.52899 17.5293 6.73696 16.7373L3.26244 13.2627C2.4704 12.4707 2.07439 12.0747 1.92601 11.618C1.7955 11.2163 1.7955 10.7837 1.92601 10.382C2.07439 9.92531 2.47041 9.52929 3.26244 8.73726L8.9997 3Z`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function kl(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M3 14H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,u.jsx)(`path`,{d:`M3 18H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function Al(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M3 10H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,u.jsx)(`path`,{d:`M3 14H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function jl(e){return(0,u.jsxs)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:[(0,u.jsx)(`path`,{d:`M3 6H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`}),(0,u.jsx)(`path`,{d:`M3 10H21`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]})}function Ml(){let e=(0,t.$getSelection)();return(0,t.$isRangeSelection)(e)?e.anchor.getNode():(0,p.$isTableSelection)(e)?(0,t.$getNodeByKey)(e.anchor.key):null}function Nl(){let e=(0,t.$getSelection)();if((0,p.$isTableSelection)(e)){let t=e.getNodes().filter(p.$isTableCellNode);return Array.from(new Map(t.map(e=>[e.getKey(),e])).values())}let n=Ml(),r=n?(0,m.$getNearestNodeOfType)(n,p.TableCellNode):null;return r?[r]:[]}function Pl(){let e=(0,t.$getSelection)();if((0,p.$isTableSelection)(e)){let n=(0,t.$getNodeByKey)(e.tableKey);return(0,p.$isTableNode)(n)?n:null}let n=Ml();return n?(0,m.$getNearestNodeOfType)(n,p.TableNode):null}function Fl(){let e=Nl(),t=e[0];return{isInTable:e.length>0,selectedTableCellsCount:e.length,tableCellBackgroundColor:t?.getBackgroundColor()||``,tableCellVerticalAlign:t?.getVerticalAlign(),tableHasMergedCell:e.some(e=>e.getColSpan()>1||e.getRowSpan()>1)}}function Il(e,t){e.update(t),e.focus()}function Ll(e,t){Il(e,()=>{(0,p.$insertTableRowAtSelection)(t)})}function Rl(e,t){Il(e,()=>{(0,p.$insertTableColumnAtSelection)(t)})}function zl(e){Il(e,()=>{(0,p.$deleteTableRowAtSelection)()})}function Bl(e){Il(e,()=>{(0,p.$deleteTableColumnAtSelection)()})}function Vl(e){Il(e,()=>{let e=Pl();if(!e)return;let n=(0,t.$createParagraphNode)();e.insertAfter(n),e.remove(),n.select(),(0,t.$getRoot)().getChildrenSize()===0&&(0,t.$getRoot)().append((0,t.$createParagraphNode)())})}function Hl(e){Il(e,()=>{let e=Nl();e.length>1&&(0,p.$mergeCells)(e)})}function Ul(e){Il(e,()=>{(0,p.$unmergeCell)()})}function Wl(e,t){Il(e,()=>{Nl().forEach(e=>{e.setBackgroundColor(t)})})}function Gl(e,t){Il(e,()=>{Nl().forEach(e=>{e.setVerticalAlign(t)})})}function Kl(e){Il(e,()=>{let e=Nl()[0];if(!e)return;let[,t]=(0,p.$getNodeTriplet)(e);t.getChildren().forEach(e=>{(0,p.$isTableCellNode)(e)&&e.toggleHeaderStyle(p.TableCellHeaderStates.ROW)})})}function ql(e){Il(e,()=>{let e=Nl()[0],t=Pl(),n=e?(0,p.$getTableCellNodeRect)(e):null;if(!e||!t||!n)return;let[r]=(0,p.$computeTableMapSkipCellCheck)(t,null,null),i=new Set;r.forEach(e=>{e.forEach(({cell:e,startColumn:t})=>{t<=n.columnIndex&&t+e.getColSpan()>n.columnIndex&&!i.has(e.getKey())&&(i.add(e.getKey()),e.toggleHeaderStyle(p.TableCellHeaderStates.COLUMN))})})})}function Jl(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),[n,r]=(0,P.useState)(!1),[i,a]=(0,P.useState)(null),{isInTable:s,tableCellBackgroundColor:c,tableCellVerticalAlign:l}=H(e=>e.toolbar);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.Dropdown,{disabled:!s,menu:{items:[{key:`none`,label:(0,u.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{Wl(e,null),r(!1)},type:`button`,children:[(0,u.jsx)(`span`,{className:`rj-editor-color-none`}),t.common.none]})},{type:`divider`},...Le.map(t=>({key:t,label:(0,u.jsxs)(`button`,{className:`rj-editor-color-menu-item`,onClick:()=>{Wl(e,t),r(!1)},type:`button`,children:[(0,u.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:t}}),t]})})),{type:`divider`},{key:`more-colors`,label:(0,u.jsxs)(`label`,{className:`rj-editor-color-menu-item`,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,u.jsx)(`span`,{className:`rj-editor-color-swatch`,style:{backgroundColor:c||Le[0]}}),t.common.moreColors,(0,u.jsx)(`input`,{"aria-label":t.common.moreColors,className:`rj-editor-color-menu-input`,onChange:t=>{Wl(e,t.target.value),a(t.target.value),r(!0)},onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),type:`color`,value:c||Le[0]})]})}]},onOpenChange:t=>{r(t),!t&&i&&(window.setTimeout(()=>{Wl(e,i)}),a(null))},open:n,trigger:[`click`],children:(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.background,className:c?`is-active`:void 0,disabled:!s,onMouseDown:e=>{e.preventDefault()},type:`button`,children:(0,u.jsx)(Ol,{"aria-hidden":`true`})})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.alignTop,className:l===`top`?`is-active`:void 0,disabled:!s,onClick:()=>Gl(e,`top`),type:`button`,children:(0,u.jsx)(jl,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.alignMiddle,className:l===`middle`?`is-active`:void 0,disabled:!s,onClick:()=>Gl(e,`middle`),type:`button`,children:(0,u.jsx)(Al,{"aria-hidden":`true`})}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.alignBottom,className:l===`bottom`?`is-active`:void 0,disabled:!s,onClick:()=>Gl(e,`bottom`),type:`button`,children:(0,u.jsx)(kl,{"aria-hidden":`true`})})]})}function Yl(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=!H(e=>e.toolbar.isInTable);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.insertColumnLeft,disabled:n,onClick:()=>Rl(e,!1),type:`button`,children:t.toolbar.table.columnLeft}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.insertColumnRight,disabled:n,onClick:()=>Rl(e,!0),type:`button`,children:t.toolbar.table.columnRight})]})}function Xl(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=!H(e=>e.toolbar.isInTable);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(`button`,{"aria-label":t.toolbar.table.deleteRow,className:`rj-editor-toolbar--clear-btn`,disabled:n,onClick:()=>zl(e),type:`button`,children:[(0,u.jsx)(Ea,{"aria-hidden":`true`}),`\xA0`,t.toolbar.table.row]}),(0,u.jsxs)(`button`,{"aria-label":t.toolbar.table.deleteColumn,className:`rj-editor-toolbar--clear-btn`,disabled:n,onClick:()=>Bl(e),type:`button`,children:[(0,u.jsx)(Ea,{"aria-hidden":`true`}),`\xA0`,t.toolbar.table.column]}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.deleteTable,className:`rj-editor-toolbar--clear-btn`,disabled:n,onClick:()=>Vl(e),type:`button`,children:(0,u.jsx)(Ea,{"aria-hidden":`true`})})]})}function Zl(){return(0,u.jsx)(`span`,{className:`rj-editor-toolbar-divider`,"aria-hidden":`true`})}function Ql(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M9 7L4 12L9 17M15 7L20 12L15 17`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function $l(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M7 15L12 20L17 15M7 9L12 4L17 9`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function eu(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),{isInTable:n}=H(e=>e.toolbar);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(`button`,{"aria-label":t.toolbar.table.headerRow,disabled:!n,onClick:()=>Kl(e),type:`button`,title:t.toolbar.table.headerRow,children:[(0,u.jsx)(Ql,{}),` \xA0 `,t.toolbar.table.header]}),(0,u.jsxs)(`button`,{"aria-label":t.toolbar.table.header,disabled:!n,onClick:()=>ql(e),type:`button`,title:t.toolbar.table.headerColumn,children:[(0,u.jsx)($l,{}),` \xA0 `,t.toolbar.table.header]})]})}function tu(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),{isInTable:n,selectedTableCellsCount:r,tableHasMergedCell:i}=H(e=>e.toolbar);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.mergeCells,disabled:!n||r<2,onClick:()=>Hl(e),type:`button`,children:t.toolbar.table.mergeCells}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.unmergeCell,disabled:!n||!i,onClick:()=>Ul(e),type:`button`,children:t.toolbar.table.unmergeCell})]})}function nu(){let[e]=(0,h.useLexicalComposerContext)(),t=U(),n=!H(e=>e.toolbar.isInTable);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.insertRowAbove,disabled:n,onClick:()=>Ll(e,!1),type:`button`,children:t.toolbar.table.rowAbove}),(0,u.jsx)(`button`,{"aria-label":t.toolbar.table.insertRowBelow,disabled:n,onClick:()=>Ll(e,!0),type:`button`,children:t.toolbar.table.rowBelow})]})}function ru(){return(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-panel`,role:`tabpanel`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(nu,{}),(0,u.jsx)(Zl,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(Yl,{}),(0,u.jsx)(Zl,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(tu,{}),(0,u.jsx)(Zl,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(Jl,{}),(0,u.jsx)(Zl,{})]}),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-group`,children:[(0,u.jsx)(eu,{}),(0,u.jsx)(Zl,{})]}),(0,u.jsx)(`div`,{className:`rj-editor-toolbar-group`,children:(0,u.jsx)(Xl,{})})]})}function iu(){let e=(0,t.$getSelection)();if(!(0,t.$isNodeSelection)(e))return null;let n=e.getNodes().find(ea);return ea(n)?n:null}function au(){let e=iu();return{isEquationSelected:!!e,selectedEquation:e?.getEquation(),selectedEquationDisplayMode:e?.getDisplayMode(),selectedEquationKey:e?.getKey()}}function ou(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M8 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V8M8 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V16M21 8V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H16M21 16V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C18.7202 21 17.8802 21 16.2 21H16`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function su(e){return(0,u.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,...e,children:(0,u.jsx)(`path`,{d:`M2.99986 8H3.19986C4.88002 8 5.7201 8 6.36183 7.67302C6.92632 7.3854 7.38526 6.92646 7.67288 6.36197C7.99986 5.72024 7.99986 4.88016 7.99986 3.2V3M2.99986 16H3.19986C4.88002 16 5.7201 16 6.36183 16.327C6.92632 16.6146 7.38526 17.0735 7.67288 17.638C7.99986 18.2798 7.99986 19.1198 7.99986 20.8V21M15.9999 3V3.2C15.9999 4.88016 15.9999 5.72024 16.3268 6.36197C16.6145 6.92646 17.0734 7.3854 17.6379 7.67302C18.2796 8 19.1197 8 20.7999 8H20.9999M15.9999 21V20.8C15.9999 19.1198 15.9999 18.2798 16.3268 17.638C16.6145 17.0735 17.0734 16.6146 17.6379 16.327C18.2796 16 19.1197 16 20.7999 16H20.9999`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})}var cu=[{value:`home`},{value:`insert`},{value:`equation`},{value:`image`},{value:`table`}];function lu({isFullscreen:e,onToggleFullscreen:n}){let[r]=(0,h.useLexicalComposerContext)(),i=U(),[a,o]=P.default.useState(`home`),s=In(),c=H(e=>e.toolbar.isEquationSelected),l=H(e=>e.toolbar.isImageSelected),d=H(e=>e.toolbar.isInTable),p=c?`equation`:l?`image`:a===`table`&&!d||a===`image`&&!l||a===`equation`&&!c?`home`:a,g=cu.filter(e=>(e.value!==`table`||d)&&(e.value!==`equation`||c)&&(e.value!==`image`||l));return P.default.useEffect(()=>{let e=()=>{let e=(0,t.$getSelection)(),n=au(),r=hs(),i=Fl();if(s(kn(n)),s(An(r)),s(Mn(i)),!(0,t.$isRangeSelection)(e))return;let a=e.anchor.getNode(),o=a.getTopLevelElementOrThrow(),c=(0,m.$getNearestNodeOfType)(a,f.ListNode);s(Nn({isBold:e.hasFormat(`bold`),isCode:e.hasFormat(`code`),isItalic:e.hasFormat(`italic`),isStrikethrough:e.hasFormat(`strikethrough`),isSubscript:e.hasFormat(`subscript`),isSuperscript:e.hasFormat(`superscript`),isUnderline:e.hasFormat(`underline`)})),s(jn({backgroundColor:(0,E.$getSelectionStyleValueForProperty)(e,`background-color`,``),fontFamily:Ye((0,E.$getSelectionStyleValueForProperty)(e,`font-family`,``)),fontSize:Ze((0,E.$getSelectionStyleValueForProperty)(e,`font-size`,``)),lineHeight:(0,E.$getSelectionStyleValueForProperty)(e,`line-height`,``)||void 0,textColor:(0,E.$getSelectionStyleValueForProperty)(e,`color`,``)})),s(En({alignment:o.getFormatType(),listType:(0,f.$isListNode)(c)?c.getListType():void 0}))},n=r.registerCommand(t.SELECTION_CHANGE_COMMAND,()=>(r.getEditorState().read(e),!1),t.COMMAND_PRIORITY_LOW),i=r.registerUpdateListener(({editorState:t})=>{t.read(e)}),a=r.registerCommand(t.CAN_UNDO_COMMAND,e=>(s(On(e)),!1),t.COMMAND_PRIORITY_LOW),o=r.registerCommand(t.CAN_REDO_COMMAND,e=>(s(Dn(e)),!1),t.COMMAND_PRIORITY_LOW);return()=>{n(),i(),a(),o()}},[s,r]),(0,u.jsxs)(`div`,{className:`rj-editor-toolbar`,"aria-label":`Editor toolbar`,children:[(0,u.jsxs)(`div`,{className:`rj-editor-toolbar-tabs`,children:[(0,u.jsx)(`div`,{className:`rj-editor-toolbar-tabs-list`,role:`tablist`,children:g.map(e=>(0,u.jsx)(`button`,{"aria-selected":p===e.value,className:p===e.value?`is-active`:void 0,onClick:()=>{o(e.value),window.requestAnimationFrame(()=>{r.focus()})},onMouseDown:e=>{e.preventDefault()},role:`tab`,type:`button`,children:i.toolbar.tabs[e.value]},e.value))}),(0,u.jsx)(`button`,{"aria-label":e?i.toolbar.fullscreen.close:i.toolbar.fullscreen.open,className:`rj-editor-toolbar-fullscreen`,onClick:n,type:`button`,children:e?(0,u.jsx)(su,{"aria-hidden":`true`}):(0,u.jsx)(ou,{"aria-hidden":`true`})})]}),p===`home`?(0,u.jsx)(ss,{editor:r}):null,p===`image`?(0,u.jsx)(ws,{}):null,p===`insert`?(0,u.jsx)(El,{onTableInserted:()=>o(`table`)}):null,p===`table`?(0,u.jsx)(ru,{}):null,p===`layout`?(0,u.jsx)(Dl,{}):null,(0,u.jsx)(_l,{showButton:!1})]})}function uu(){let[e]=(0,h.useLexicalComposerContext)();return(0,P.useEffect)(()=>e.registerCommand(He,e=>{let n=$i(e);(0,m.$insertNodeToNearestRoot)(n),e.displayMode!==`inline`&&n.insertAfter((0,t.$createParagraphNode)());let r=(0,t.$createNodeSelection)();return r.add(n.getKey()),(0,t.$setSelection)(r),!0},t.COMMAND_PRIORITY_EDITOR),[e]),null}var du=[`pnpm`,`npm`,`yarn`,`bun`,`terminal`],fu=`data-rj-code-title`,pu=`data-rj-code-custom-title`,mu=[`[data-line]`,`[data-highlighted-line]`,`.line`,`.code-line`].join(`, `);function hu(e){return e instanceof HTMLElement&&e.innerText?e.innerText:e.textContent||``}function gu(e){let t=[e.getAttribute(`data-language`),e.getAttribute(`data-lang`)].find(Boolean);return[e.className,e.querySelector(`code`)?.className].find(e=>/(?:^|\s)language-[a-z0-9-]+(?:\s|$)/i.test(e||``))?.match(/(?:^|\s)language-([a-z0-9-]+)/i)?.[1]||t||`plain`}function _u(e){let t=Array.from(e.querySelectorAll(mu));return t.length>1?t.map(e=>hu(e).replace(/\u00a0/g,` `)).join(`
67
+ `).replace(/\n+$/g,``):hu(e).replace(/\u00a0/g,` `).replace(/^\n+|\n+$/g,``)}function vu(e,t){let n=hu(e).toLowerCase().replace(t.toLowerCase(),``);return!!e.querySelector(`button, [role="tab"], [role="tablist"]`)||du.some(e=>n.includes(e))}function yu(e){let t=e.parentElement;for(;t&&t!==t.ownerDocument.body&&!(t.querySelectorAll(`pre`).length>1);){if(vu(t,hu(e)))return t;t=t.parentElement}return e}function bu(e,t){return hu(e).toLowerCase().includes(`terminal`)?`terminal`:gu(t)}function xu(e,t,n){let r=t.getAttribute(pu)||t.getAttribute(fu)||t.getAttribute(`data-title`)||t.getAttribute(`data-filename`);if(r)return r;let i=hu(e).toLowerCase(),a=hu(t).toLowerCase(),o=i.replace(a,``);return du.find(e=>o.includes(e))||n}function Su(e,t,n){let r=e.createElement(`pre`),i=bu(n,t),a=xu(n,t,i);return r.setAttribute(`data-language`,i),r.setAttribute(fu,a),a!==i&&r.setAttribute(pu,a),r.textContent=_u(t),r}function Cu(e){if(!e.trim()||typeof DOMParser>`u`)return null;let t=new DOMParser().parseFromString(e,`text/html`),n=Array.from(t.querySelectorAll(`pre`));return n.length===0?null:(n.forEach(e=>{let n=e,r=yu(n),i=Su(t,n,r);r.replaceWith(i)}),t.body.innerHTML)}Li();function wu(){let[e]=(0,h.useLexicalComposerContext)();return P.default.useEffect(()=>{let n=e.registerCommand(Ve,({code:e=``,language:n,title:r})=>{let i=ua(n,r);return e&&i.append((0,t.$createTextNode)(e)),(0,m.$insertNodeToNearestRoot)(i),i.insertAfter((0,t.$createParagraphNode)()),i.selectEnd(),!0},t.COMMAND_PRIORITY_EDITOR),r=e.registerCommand(t.PASTE_COMMAND,n=>{let r=(n instanceof ClipboardEvent?n.clipboardData:null)?.getData(`text/html`),a=r?Cu(r):null;return a?(n.preventDefault(),e.update(()=>{let n=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(n))return;let r=(0,i.$generateNodesFromDOM)(e,new DOMParser().parseFromString(a,`text/html`));n.insertNodes(r)},{tag:t.PASTE_TAG}),!0):!1},t.COMMAND_PRIORITY_HIGH),a=e.registerUpdateListener(({editorState:n})=>{let r=!1;n.read(()=>{r=q((0,t.$getRoot)().getLastChild())}),r&&e.update(()=>{let e=(0,t.$getRoot)().getLastChild();q(e)&&e.insertAfter((0,t.$createParagraphNode)())})});return()=>{a(),r(),n()}},[e]),null}Li();var Tu=8,Eu=1,Du={codeNodeKey:``,items:[],left:0,prefix:``,selectedIndex:0,top:0,visible:!1},Ou={bun:`terminal`,javascript:`js`,node:`js`,npm:`terminal`,pnpm:`terminal`,shell:`terminal`,sh:`terminal`,terminal:`terminal`,text:`plain`,ts:`typescript`,yarn:`terminal`},ku={bash:[`alias`,`case`,`cd`,`chmod`,`cp`,`curl`,`do`,`done`,`echo`,`elif`,`else`,`export`,`fi`,`for`,`function`,`grep`,`if`,`mkdir`,`mv`,`npm`,`npx`,`pnpm`,`then`,`while`,`yarn`],css:[`align-items`,`background`,`border`,`color`,`display`,`flex`,`font-size`,`gap`,`grid`,`height`,`justify-content`,`margin`,`padding`,`position`,`width`],html:[`article`,`aside`,`button`,`class`,`div`,`footer`,`header`,`href`,`img`,`input`,`main`,`nav`,`section`,`span`,`type`],java:[`abstract`,`boolean`,`class`,`extends`,`final`,`implements`,`import`,`interface`,`new`,`private`,`protected`,`public`,`return`,`static`,`void`],js:`async.await.break.case.catch.class.const.continue.default.else.export.false.finally.for.function.if.import.let.new.null.return.switch.this.throw.true.try.typeof.undefined.var.while`.split(`.`),json:[`false`,`null`,`true`],markdown:[`blockquote`,`code`,`heading`,`image`,`link`,`list`,`table`],powershell:[`cd`,`Copy-Item`,`ForEach-Object`,`Get-ChildItem`,`Get-Content`,`if`,`Import-Module`,`New-Item`,`Set-Location`,`Where-Object`],py:[`as`,`async`,`await`,`class`,`def`,`elif`,`else`,`except`,`False`,`finally`,`for`,`from`,`if`,`import`,`in`,`lambda`,`None`,`return`,`self`,`True`,`try`,`while`],rust:[`async`,`await`,`enum`,`fn`,`impl`,`let`,`match`,`mod`,`mut`,`pub`,`return`,`self`,`struct`,`trait`,`use`],sql:[`ALTER`,`CREATE`,`DELETE`,`FROM`,`GROUP BY`,`INSERT`,`JOIN`,`ORDER BY`,`SELECT`,`UPDATE`,`VALUES`,`WHERE`],terminal:[`bun`,`bun add`,`bun install`,`cd`,`mkdir`,`npm`,`npm install`,`npm run build`,`npm run dev`,`npx`,`pnpm`,`pnpm add`,`pnpm create`,`pnpm dev`,`pnpm install`,`yarn`,`yarn add`],typescript:`abstract.async.await.break.catch.class.const.declare.else.enum.export.extends.false.finally.for.function.if.implements.import.interface.let.new.null.private.protected.public.readonly.return.satisfies.type.undefined`.split(`.`),yaml:[`apiVersion`,`containers`,`env`,`image`,`kind`,`metadata`,`name`,`services`,`spec`,`version`]};ku.jsx=[...ku.js,`Fragment`,`props`,`React`,`useCallback`,`useEffect`,`useMemo`,`useRef`,`useState`],ku.tsx=[...ku.typescript,`Fragment`,`React`,`useCallback`,`useEffect`,`useMemo`,`useRef`,`useState`],ku.xml=ku.html,ku.dockerfile=[`ADD`,`ARG`,`CMD`,`COPY`,`ENTRYPOINT`,`ENV`,`EXPOSE`,`FROM`,`LABEL`,`RUN`,`USER`,`WORKDIR`];function Au(e){let t=(e||`plain`).trim().toLowerCase();return Ou[t]||t}function ju(e){let t=e.anchor.getNode();if(q(t))return t;let n=t.getParent();return q(n)?n:null}function Mu(e,t){let n=t.anchor,r=n.getNode(),i=e.getChildren(),a=0;if(n.type===`element`&&r.is(e)){for(let e=0;e<n.offset;e+=1)a+=i[e]?.getTextContentSize()||0;return a}for(let e of i){if(e.is(r))return a+n.offset;a+=e.getTextContentSize()}return a}function Nu(e,t){let n=e.slice(0,t);return/[A-Za-z_$@./-][\w$@./:-]*$/.exec(n)?.[0]||``}function Pu(e,t){if(![`js`,`jsx`,`tsx`,`typescript`].includes(t))return[];let n=new Set,r=/\b(?:const|let|var|function|class|interface|type|enum)\s+([A-Za-z_$][\w$]*)/g,i;for(;(i=r.exec(e))!==null;)n.add(i[1]);return Array.from(n)}function Fu(e){return e===`plain`?[]:ku[e]||[]}function Iu(e){let t=e.prefix.toLowerCase(),n=[...Pu(e.text,e.language),...Fu(e.language)],r=new Set;return n.filter(e=>{let n=e.toLowerCase(),i=n.startsWith(t)&&n!==t&&!r.has(n);return r.add(n),i}).slice(0,Tu)}function Lu(){let e=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(e)||!e.isCollapsed())return null;let n=ju(e);if(!n)return null;let r=e.anchor.getNode();if(!(0,t.$isTextNode)(r)&&!r.is(n))return null;let i=Mu(n,e),a=n.getTextContent(),o=Nu(a,i);return o.length<Eu?null:{codeNode:n,language:Au(n.getLanguage()),offset:i,prefix:o,text:a}}function Ru(e){let t=window.getSelection();if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0).getBoundingClientRect(),r=e.getBoundingClientRect(),i=e.getBoundingClientRect(),a=n.width||n.height?n:i;return{left:Math.max(8,a.left-r.left),top:Math.max(8,a.bottom-r.top+6)}}function zu(e){return e.key.length===1&&(e.metaKey||e.ctrlKey||e.altKey)}function Bu(e,t){return e.visible===t.visible&&e.codeNodeKey===t.codeNodeKey&&e.left===t.left&&e.prefix===t.prefix&&e.selectedIndex===t.selectedIndex&&e.top===t.top&&e.items.length===t.items.length&&e.items.every((e,n)=>e===t.items[n])}function Vu(e,n){let r=e.slice(n.length);if(!r)return;let i=(0,t.$getSelection)();(0,t.$isRangeSelection)(i)&&i.isCollapsed()&&i.insertText(r)}function Hu(e){return q(e)||q(e?.getParent())}function Uu(){let[e]=(0,h.useLexicalComposerContext)(),[n,r]=P.default.useState(Du),i=P.default.useRef(n),a=P.default.useCallback(()=>{let t=Du;e.getEditorState().read(()=>{let n=Lu();if(!n)return;let r=e.getRootElement()?.closest(`.rj-editor-body`),i=r instanceof HTMLElement?Ru(r):null;if(!i)return;let a=Iu(n);a.length!==0&&(t={codeNodeKey:n.codeNode.getKey(),items:a,left:i.left,prefix:n.prefix,selectedIndex:0,top:i.top,visible:!0})}),r(e=>Bu(e,t)?e:t)},[e]),o=P.default.useCallback((n,i)=>{e.update(()=>{let e=(0,t.$getSelection)();Hu((0,t.$isRangeSelection)(e)?e.anchor.getNode():null)&&Vu(n,i)}),r(Du)},[e]);return P.default.useEffect(()=>{i.current=n},[n]),P.default.useEffect(()=>{let n=e.registerUpdateListener(()=>{a()}),s=e.registerCommand(t.SELECTION_CHANGE_COMMAND,()=>(a(),!1),t.COMMAND_PRIORITY_HIGH),c=e.registerCommand(t.KEY_DOWN_COMMAND,e=>{let t=i.current;if(!t.visible)return!1;if(zu(e))return r(Du),!1;if(e.key===`Escape`)return e.preventDefault(),r(Du),!0;if(e.key===`ArrowDown`||e.key===`ArrowUp`)return e.preventDefault(),r(t=>{if(!t.visible)return t;let n=e.key===`ArrowDown`?1:-1,r=(t.selectedIndex+n+t.items.length)%t.items.length;return{...t,selectedIndex:r}}),!0;if(e.key===`Enter`||e.key===`Tab`){e.preventDefault();let n=t.items[t.selectedIndex];return n&&o(n,t.prefix),!0}return!1},t.COMMAND_PRIORITY_HIGH);return()=>{c(),s(),n()}},[e,o,a]),n.visible?(0,u.jsx)(`div`,{className:`rj-editor-code-completion`,contentEditable:!1,onMouseDown:e=>e.preventDefault(),style:{left:n.left,top:n.top},children:n.items.map((e,t)=>(0,u.jsx)(`button`,{className:t===n.selectedIndex?`is-active`:void 0,onClick:()=>o(e,n.prefix),onMouseEnter:()=>{r(e=>e.visible?{...e,selectedIndex:t}:e)},type:`button`,children:e},e))}):null}var Wu=M(((e,t)=>{var n=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,`__id`,{value:++n}),e.__id},clone:function e(t,n){n||={};var r,a;switch(i.util.type(t)){case`Object`:if(a=i.util.objId(t),n[a])return n[a];for(var o in r={},n[a]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case`Array`:return a=i.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return`none`},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,`gi`),``),e.classList.add(`language-`+n)},currentScript:function(){if(typeof document>`u`)return null;if(document.currentScript&&document.currentScript.tagName===`SCRIPT`)return document.currentScript;try{throw Error()}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName(`script`);for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=i.languages;var a=r[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=r[e];return r[e]=o,i.languages.DFS(i.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,a){a||={};var o=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var c=t[s],l=i.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:`code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code`};i.hooks.run(`before-highlightall`,r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run(`before-all-elements-highlight`,r);for(var a=0,o;o=r.elements[a++];)i.highlightElement(o,t===!0,r.callback)},highlightElement:function(t,n,r){var a=i.util.getLanguage(t),o=i.languages[a];i.util.setLanguage(t,a);var s=t.parentElement;s&&s.nodeName.toLowerCase()===`pre`&&i.util.setLanguage(s,a);var c={element:t,language:a,grammar:o,code:t.textContent};function l(e){c.highlightedCode=e,i.hooks.run(`before-insert`,c),c.element.innerHTML=c.highlightedCode,i.hooks.run(`after-highlight`,c),i.hooks.run(`complete`,c),r&&r.call(c.element)}if(i.hooks.run(`before-sanity-check`,c),s=c.element.parentElement,s&&s.nodeName.toLowerCase()===`pre`&&!s.hasAttribute(`tabindex`)&&s.setAttribute(`tabindex`,`0`),!c.code){i.hooks.run(`complete`,c),r&&r.call(c.element);return}if(i.hooks.run(`before-highlight`,c),!c.grammar){l(i.util.encode(c.code));return}if(n&&e.Worker){var u=new Worker(i.filename);u.onmessage=function(e){l(e.data)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(i.highlight(c.code,c.grammar,c.language))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(i.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run(`after-tokenize`,r),a.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new c;return l(i,i.head,e),s(e,i,t,i.head,0),d(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(!(!n||!n.length))for(var r=0,a;a=n[r++];)a(t)}},Token:a};e.Prism=i,globalThis.Prism=i;function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}a.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var r=``;return t.forEach(function(t){r+=e(t,n)}),r}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),i.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`&quot;`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function o(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function s(e,t,n,r,c,d){for(var f in n)if(!(!n.hasOwnProperty(f)||!n[f])){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+`g`)}for(var x=h.pattern||h,S=r.next,C=c;S!==t.tail&&!(d&&C>=d.reach);C+=S.value.length,S=S.next){var w=S.value;if(t.length>e.length)return;if(!(w instanceof a)){var T=1,E;if(v){if(E=o(x,C,e,_),!E||E.index>=e.length)break;var D=E.index,O=E.index+E[0].length,k=C;for(k+=S.value.length;D>=k;)S=S.next,k+=S.value.length;if(k-=S.value.length,C=k,S.value instanceof a)continue;for(var A=S;A!==t.tail&&(k<O||typeof A.value==`string`);A=A.next)T++,k+=A.value.length;T--,w=e.slice(C,k),E.index-=C}else if(E=o(x,0,w,_),!E)continue;var D=E.index,ee=E[0],te=w.slice(0,D),ne=w.slice(D+ee.length),j=C+w.length;d&&j>d.reach&&(d.reach=j);var M=S.prev;te&&(M=l(t,M,te),C+=te.length),u(t,M,T);var re=new a(f,g?i.tokenize(ee,g):ee,y,ee);if(S=l(t,M,re),ne&&l(t,S,ne),T>1){var ie={cause:f+`,`+m,reach:j};s(e,t,n,S.prev,C,ie),d&&ie.reach>d.reach&&(d.reach=ie.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function d(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}if(!e.document)return e.addEventListener&&(i.disableWorkerMessageHandler||e.addEventListener(`message`,function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()},!1)),i;var f=i.util.currentScript();f&&(i.filename=f.src,f.hasAttribute(`data-manual`)&&(i.manual=!0));function p(){i.manual||i.highlightAll()}if(!i.manual){var m=document.readyState;m===`loading`||m===`interactive`&&f&&f.defer?document.addEventListener(`DOMContentLoaded`,p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return i}(typeof window<`u`?window:typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:{});t!==void 0&&t.exports&&(t.exports=n),typeof global<`u`&&(global.Prism=n),globalThis.Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},globalThis.Prism.languages.markup.tag.inside[`attr-value`].inside.entity=globalThis.Prism.languages.markup.entity,globalThis.Prism.languages.markup.doctype.inside[`internal-subset`].inside=globalThis.Prism.languages.markup,globalThis.Prism.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&amp;/,`&`))}),Object.defineProperty(globalThis.Prism.languages.markup.tag,`addInlined`,{value:function(e,t){var n={};n[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:globalThis.Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r[`language-`+t]={pattern:/[\s\S]+/,inside:globalThis.Prism.languages[t]};var i={};i[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:r},globalThis.Prism.languages.insertBefore(`markup`,`cdata`,i)}}),Object.defineProperty(globalThis.Prism.languages.markup.tag,`addAttribute`,{value:function(e,t){globalThis.Prism.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:globalThis.Prism.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),globalThis.Prism.languages.html=globalThis.Prism.languages.markup,globalThis.Prism.languages.mathml=globalThis.Prism.languages.markup,globalThis.Prism.languages.svg=globalThis.Prism.languages.markup,globalThis.Prism.languages.xml=globalThis.Prism.languages.extend(`markup`,{}),globalThis.Prism.languages.ssml=globalThis.Prism.languages.xml,globalThis.Prism.languages.atom=globalThis.Prism.languages.xml,globalThis.Prism.languages.rss=globalThis.Prism.languages.xml,(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;globalThis.Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},globalThis.Prism.languages.css.atrule.inside.rest=globalThis.Prism.languages.css;var n=globalThis.Prism.languages.markup;n&&(n.tag.addInlined(`style`,`css`),n.tag.addAttribute(`style`,`css`))})(globalThis.Prism),globalThis.Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},globalThis.Prism.languages.javascript=globalThis.Prism.languages.extend(`clike`,{"class-name":[globalThis.Prism.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),globalThis.Prism.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,globalThis.Prism.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:globalThis.Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:globalThis.Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:globalThis.Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:globalThis.Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:globalThis.Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),globalThis.Prism.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:globalThis.Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),globalThis.Prism.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),globalThis.Prism.languages.markup&&(globalThis.Prism.languages.markup.tag.addInlined(`script`,`javascript`),globalThis.Prism.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),globalThis.Prism.languages.js=globalThis.Prism.languages.javascript,(function(){if(n===void 0||typeof document>`u`)return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=`Loading…`,t=function(e,t){return`✖ Error `+e+` while fetching file: `+t},r=`✖ Error: File does not exist or is empty`,i={js:`javascript`,py:`python`,rb:`ruby`,ps1:`powershell`,psm1:`powershell`,sh:`bash`,bat:`batch`,h:`c`,tex:`latex`},a=`data-src-status`,o=`loading`,s=`loaded`,c=`failed`,l=`pre[data-src]:not([`+a+`="`+s+`"]):not([`+a+`="`+o+`"])`;function u(e,n,i){var a=new XMLHttpRequest;a.open(`GET`,e,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?n(a.responseText):a.status>=400?i(t(a.status,a.statusText)):i(r))},a.send(null)}function d(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||``);if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}globalThis.Prism.hooks.add(`before-highlightall`,function(e){e.selector+=`, `+l}),globalThis.Prism.hooks.add(`before-sanity-check`,function(t){var r=t.element;if(r.matches(l)){t.code=``,r.setAttribute(a,o);var f=r.appendChild(document.createElement(`CODE`));f.textContent=e;var p=r.getAttribute(`data-src`),m=t.language;if(m===`none`){var h=(/\.(\w+)$/.exec(p)||[,`none`])[1];m=i[h]||h}n.util.setLanguage(f,m),n.util.setLanguage(r,m);var g=globalThis.Prism.plugins.autoloader;g&&g.loadLanguages(m),u(p,function(e){r.setAttribute(a,s);var t=d(r.getAttribute(`data-range`));if(t){var i=e.split(/\r\n?|\n/g),o=t[0],c=t[1]==null?i.length:t[1];o<0&&(o+=i.length),o=Math.max(0,Math.min(o-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(o,c).join(`
68
+ `),r.hasAttribute(`data-start`)||r.setAttribute(`data-start`,String(o+1))}f.textContent=e,n.highlightElement(f)},function(e){r.setAttribute(a,c),f.textContent=e})}}),globalThis.Prism.plugins.fileHighlight={highlight:function(e){for(var t=(e||document).querySelectorAll(l),r=0,i;i=t[r++];)n.highlightElement(i)}};var f=!1;globalThis.Prism.fileHighlight=function(){f||=(console.warn("globalThis.Prism.fileHighlight is deprecated. Use `globalThis.Prism.plugins.fileHighlight.highlight` instead."),!0),globalThis.Prism.plugins.fileHighlight.highlight.apply(this,arguments)}})()})),Gu=j((()=>{globalThis.Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}})),Ku=j((()=>{globalThis.Prism.languages.javascript=globalThis.Prism.languages.extend(`clike`,{"class-name":[globalThis.Prism.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),globalThis.Prism.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,globalThis.Prism.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:globalThis.Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:globalThis.Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:globalThis.Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:globalThis.Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:globalThis.Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),globalThis.Prism.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:globalThis.Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),globalThis.Prism.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),globalThis.Prism.languages.markup&&(globalThis.Prism.languages.markup.tag.addInlined(`script`,`javascript`),globalThis.Prism.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),globalThis.Prism.languages.js=globalThis.Prism.languages.javascript})),qu=j((()=>{globalThis.Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},globalThis.Prism.languages.markup.tag.inside[`attr-value`].inside.entity=globalThis.Prism.languages.markup.entity,globalThis.Prism.languages.markup.doctype.inside[`internal-subset`].inside=globalThis.Prism.languages.markup,globalThis.Prism.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&amp;/,`&`))}),Object.defineProperty(globalThis.Prism.languages.markup.tag,`addInlined`,{value:function(e,t){var n={};n[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:globalThis.Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r[`language-`+t]={pattern:/[\s\S]+/,inside:globalThis.Prism.languages[t]};var i={};i[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:r},globalThis.Prism.languages.insertBefore(`markup`,`cdata`,i)}}),Object.defineProperty(globalThis.Prism.languages.markup.tag,`addAttribute`,{value:function(e,t){globalThis.Prism.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:globalThis.Prism.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),globalThis.Prism.languages.html=globalThis.Prism.languages.markup,globalThis.Prism.languages.mathml=globalThis.Prism.languages.markup,globalThis.Prism.languages.svg=globalThis.Prism.languages.markup,globalThis.Prism.languages.xml=globalThis.Prism.languages.extend(`markup`,{}),globalThis.Prism.languages.ssml=globalThis.Prism.languages.xml,globalThis.Prism.languages.atom=globalThis.Prism.languages.xml,globalThis.Prism.languages.rss=globalThis.Prism.languages.xml})),Ju=j((()=>{(function(e){var t=`(?:\\\\.|[^\\\\\\n\\r]|(?:\\n|\\r\\n?)(?![\\r\\n]))`;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(`((?:^|[^\\\\])(?:\\\\{2})*)(?:`+e+`)`)}var r="(?:\\\\.|``(?:[^`\\r\\n]|`(?!`))+``|`[^`\\r\\n]+`|[^\\\\|\\r\\n`])+",i=`\\|?__(?:\\|__)+\\|?(?:(?:\\n|\\r\\n?)|(?![\\s\\S]))`.replace(/__/g,function(){return r}),a=`\\|?[ \\t]*:?-{3,}:?[ \\t]*(?:\\|[ \\t]*:?-{3,}:?[ \\t]*)+\\|?(?:\\n|\\r\\n?)`;globalThis.Prism.languages.markdown=globalThis.Prism.languages.extend(`markup`,{}),globalThis.Prism.languages.insertBefore(`markdown`,`prolog`,{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:[`yaml`,`language-yaml`],inside:globalThis.Prism.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:`punctuation`},table:{pattern:RegExp(`^`+i+a+`(?:`+i+`)*`,`m`),inside:{"table-data-rows":{pattern:RegExp(`^(`+i+a+`)(?:`+i+`)*$`),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:globalThis.Prism.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp(`^(`+i+`)`+a+`$`),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp(`^`+i+`$`),inside:{"table-header":{pattern:RegExp(r),alias:`important`,inside:globalThis.Prism.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:`keyword`},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:`important`,inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:`important`,inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:`punctuation`},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:`punctuation`},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:`url`},bold:{pattern:n(`\\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\\b|\\*\\*(?:(?!\\*)<inner>|\\*(?:(?!\\*)<inner>)+\\*)+\\*\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(`\\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\\b|\\*(?:(?!\\*)<inner>|\\*\\*(?:(?!\\*)<inner>)+\\*\\*)+\\*`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(`(~~?)(?:(?!~)<inner>)+\\2`),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:[`code`,`keyword`]},url:{pattern:n(`!?\\[(?:(?!\\])<inner>)+\\](?:\\([^\\s)]+(?:[\\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \\t]?\\[(?:(?!\\])<inner>)+\\])`),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),[`url`,`bold`,`italic`,`strike`].forEach(function(e){[`url`,`bold`,`italic`,`strike`,`code-snippet`].forEach(function(t){e!==t&&(globalThis.Prism.languages.markdown[e].inside.content.inside[t]=globalThis.Prism.languages.markdown[t])})}),globalThis.Prism.hooks.add(`after-tokenize`,function(e){if(e.language!==`markdown`&&e.language!==`md`)return;function t(e){if(!(!e||typeof e==`string`))for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i.type!==`code`){t(i.content);continue}var a=i.content[1],o=i.content[3];if(a&&o&&a.type===`code-language`&&o.type===`code-block`&&typeof a.content==`string`){var s=a.content.replace(/\b#/g,`sharp`).replace(/\b\+\+/g,`pp`);s=(/[a-z][\w-]*/i.exec(s)||[``])[0].toLowerCase();var c=`language-`+s;o.alias?typeof o.alias==`string`?o.alias=[o.alias,c]:o.alias.push(c):o.alias=[c]}}}t(e.tokens)}),globalThis.Prism.hooks.add(`wrap`,function(e){if(e.type===`code-block`){for(var t=``,n=0,r=e.classes.length;n<r;n++){var i=e.classes[n],a=/language-(.+)/.exec(i);if(a){t=a[1];break}}var o=globalThis.Prism.languages[t];if(o)e.content=globalThis.Prism.highlight(l(e.content),o,t);else if(t&&t!==`none`&&globalThis.Prism.plugins.autoloader){var s=`md-`+new Date().valueOf()+`-`+Math.floor(Math.random()*0x2386f26fc10000);e.attributes.id=s,globalThis.Prism.plugins.autoloader.loadLanguages(t,function(){var e=document.getElementById(s);e&&(e.innerHTML=globalThis.Prism.highlight(e.textContent,globalThis.Prism.languages[t],t))})}}});var o=RegExp(globalThis.Prism.languages.markup.tag.pattern.source,`gi`),s={amp:`&`,lt:`<`,gt:`>`,quot:`"`},c=String.fromCodePoint||String.fromCharCode;function l(e){var t=e.replace(o,``);return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){return t=t.toLowerCase(),t[0]===`#`?c(t[1]===`x`?parseInt(t.slice(2),16):Number(t.slice(1))):s[t]||e}),t}globalThis.Prism.languages.md=globalThis.Prism.languages.markdown})(globalThis.Prism)})),Yu=j((()=>{globalThis.Prism.languages.c=globalThis.Prism.languages.extend(`clike`,{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),globalThis.Prism.languages.insertBefore(`c`,`string`,{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),globalThis.Prism.languages.insertBefore(`c`,`string`,{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:`property`,inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},globalThis.Prism.languages.c.string],char:globalThis.Prism.languages.c.char,comment:globalThis.Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:`function`}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:`keyword`},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:globalThis.Prism.languages.c}}}}),globalThis.Prism.languages.insertBefore(`c`,`function`,{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete globalThis.Prism.languages.c.boolean})),Xu=j((()=>{(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;globalThis.Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},globalThis.Prism.languages.css.atrule.inside.rest=globalThis.Prism.languages.css;var n=globalThis.Prism.languages.markup;n&&(n.tag.addInlined(`style`,`css`),n.tag.addAttribute(`style`,`css`))})(globalThis.Prism)})),Zu=j((()=>{globalThis.Prism.languages.objectivec=globalThis.Prism.languages.extend(`c`,{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete globalThis.Prism.languages.objectivec[`class-name`],globalThis.Prism.languages.objc=globalThis.Prism.languages.objectivec})),Qu=j((()=>{globalThis.Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}})),$u=j((()=>{(function(e){var t=globalThis.Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}})(globalThis.Prism)})),ed=j((()=>{globalThis.Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:`punctuation`},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:`string`},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:[`annotation`,`punctuation`],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},globalThis.Prism.languages.python[`string-interpolation`].inside.interpolation.inside.rest=globalThis.Prism.languages.python,globalThis.Prism.languages.py=globalThis.Prism.languages.python})),td=j((()=>{(function(e){for(var t=`\\/\\*(?:[^*/]|\\*(?!\\/)|\\/(?!\\*)|<self>)*\\*\\/`,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return`[^\\s\\S]`}),globalThis.Prism.languages.rust={comment:[{pattern:RegExp(`(^|[^\\\\])`+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:`attr-name`,inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:`punctuation`},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:`symbol`},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:`punctuation`},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:`function`},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:`class-name`},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:`namespace`},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:`namespace`,inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:`property`},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},globalThis.Prism.languages.rust[`closure-params`].inside.rest=globalThis.Prism.languages.rust,globalThis.Prism.languages.rust.attribute.inside.string=globalThis.Prism.languages.rust.string})(globalThis.Prism)})),nd=j((()=>{globalThis.Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(`(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^(])|[^\\\\\\r\\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:`punctuation`},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(`(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\\r\\n|[^#])|[^\\\\\\r\\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2`),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:`punctuation`},string:/[\s\S]+/}}],directive:{pattern:RegExp(`#(?:(?:elseif|if)\\b(?:[ ]*(?:![ \\t]*)?(?:\\b\\w+\\b(?:[ \\t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \\t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)`),alias:`property`,inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:`constant`},"other-directive":{pattern:/#\w+\b/,alias:`property`},attribute:{pattern:/@\w+/,alias:`atrule`},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:`function`},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:`important`},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:`constant`},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:`keyword`},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},globalThis.Prism.languages.swift[`string-literal`].forEach(function(e){e.inside.interpolation.inside=globalThis.Prism.languages.swift})})),rd=j((()=>{(function(e){globalThis.Prism.languages.typescript=globalThis.Prism.languages.extend(`javascript`,{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),globalThis.Prism.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete globalThis.Prism.languages.typescript.parameter,delete globalThis.Prism.languages.typescript[`literal-property`];var t=globalThis.Prism.languages.extend(`typescript`,{});delete t[`class-name`],globalThis.Prism.languages.typescript[`class-name`].inside=t,globalThis.Prism.languages.insertBefore(`typescript`,`function`,{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:`operator`},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:t}}}}),globalThis.Prism.languages.ts=globalThis.Prism.languages.typescript})(globalThis.Prism)})),id=j((()=>{(function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=`(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*`,r={pattern:RegExp(`(^|[^\\w.])`+n+`[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b`),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};globalThis.Prism.languages.java=globalThis.Prism.languages.extend(`clike`,{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(`(^|[^\\w.])`+n+`[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)`),lookbehind:!0,inside:r.inside},{pattern:RegExp(`(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)`+n+`[A-Z]\\w*\\b`),lookbehind:!0,inside:r.inside}],keyword:t,function:[globalThis.Prism.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),globalThis.Prism.languages.insertBefore(`java`,`string`,{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:`string`},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),globalThis.Prism.languages.insertBefore(`java`,`class-name`,{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:`punctuation`},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(`(\\bimport\\s+)`+n+`(?:[A-Z]\\w*|\\*)(?=\\s*;)`),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(`(\\bimport\\s+static\\s+)`+n+`(?:\\w+|\\*)(?=\\s*;)`),lookbehind:!0,alias:`static`,inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(`(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!<keyword>)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?`.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(globalThis.Prism)})),ad=j((()=>{(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=`\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b`.replace(/<keyword>/g,function(){return t.source});globalThis.Prism.languages.cpp=globalThis.Prism.languages.extend(`c`,{"class-name":[{pattern:RegExp(`(\\b(?:class|concept|enum|struct|typename)\\s+)(?!<keyword>)\\w+`.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),globalThis.Prism.languages.insertBefore(`cpp`,`string`,{module:{pattern:RegExp(`(\\b(?:import|module)\\s+)(?:"(?:\\\\(?:\\r\\n|[\\s\\S])|[^"\\\\\\r\\n])*"|<[^<>\\r\\n]*>|`+`<mod-name>(?:\\s*:\\s*<mod-name>)?|:\\s*<mod-name>`.replace(/<mod-name>/g,function(){return n})+`)`),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:`string`,greedy:!0}}),globalThis.Prism.languages.insertBefore(`cpp`,`keyword`,{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:`class-name`,inside:globalThis.Prism.languages.cpp}}}}),globalThis.Prism.languages.insertBefore(`cpp`,`operator`,{"double-colon":{pattern:/::/,alias:`punctuation`}}),globalThis.Prism.languages.insertBefore(`cpp`,`class-name`,{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:globalThis.Prism.languages.extend(`cpp`,{})}}),globalThis.Prism.languages.insertBefore(`inside`,`double-colon`,{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},globalThis.Prism.languages.cpp[`base-clause`])})(globalThis.Prism)})),od=re({CODE_LANGUAGE_FRIENDLY_NAME_MAP:()=>Dd,CODE_LANGUAGE_MAP:()=>Od,CodePrismExtension:()=>jd,PrismTokenizer:()=>Ad,getCodeLanguageOptions:()=>ud,getCodeLanguages:()=>kd,getCodeThemeOptions:()=>dd,getLanguageFriendlyName:()=>ld,isCodeLanguageLoaded:()=>fd,loadCodeLanguage:()=>pd,normalizeCodeLanguage:()=>cd,registerCodeHighlighting:()=>Ed});function sd(e,...t){let n=new URL(`https://lexical.dev/docs/error`),r=new URLSearchParams;r.append(`code`,e);for(let e of t)r.append(`v`,e);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function cd(e){return Od[e]||e}function ld(e){let t=cd(e);return Dd[t]||t}function ud(){let e=[];for(let[t,n]of Object.entries(Dd))e.push([t,n]);return e}function dd(){return[]}function fd(e){let t=function(e){let t=/^diff-([\w-]+)/i.exec(e);return t?t[1]:null}(e)||e;try{return!!t&&$.languages.hasOwnProperty(t)}catch{return!1}}async function pd(e,t,n){}function md(e){return typeof e==`string`?e:Array.isArray(e)?e.map(md).join(``):md(e.content)}function hd(e,t){let n=/^diff-([\w-]+)/i.exec(t),r=e.getTextContent(),i=$.tokenize(r,$.languages[n?`diff`:t]);return n&&(i=function(e,t){let n=t,r=$.languages[n],i={tokens:e},a=$.languages.diff.PREFIXES;for(let e of i.tokens){if(typeof e==`string`||!(e.type in a)||!Array.isArray(e.content))continue;let t=e.type,n=0,i=()=>(n++,new $.Token(`prefix`,a[t],t.replace(/^(\w+).*/,`$1`))),o=e.content.filter(e=>typeof e==`string`||e.type!==`prefix`),s=e.content.length-o.length,c=$.tokenize(md(o),r);c.unshift(i());let l=/\r\n|\n/g,u=e=>{let t=[];l.lastIndex=0;let r,a=0;for(;n<s&&(r=l.exec(e));){let n=r.index+r[0].length;t.push(e.slice(a,n)),a=n,t.push(i())}if(t.length!==0)return a<e.length&&t.push(e.slice(a)),t},d=e=>{for(let t=0;t<e.length&&n<s;t++){let n=e[t];if(typeof n==`string`){let r=u(n);r&&(e.splice(t,1,...r),t+=r.length-1)}else if(typeof n.content==`string`){let e=u(n.content);e&&(n.content=e)}else Array.isArray(n.content)?d(n.content):d([n.content])}};d(c),n<s&&c.push(i()),e.content=c}return i.tokens}(i,n[1])),gd(i)}function gd(e,n){let r=[];for(let i of e)if(typeof i==`string`){let e=i.split(/(\n|\t)/),a=e.length;for(let i=0;i<a;i++){let a=e[i];a===`
69
69
  `||a===`\r
70
- `?r.push((0,t.$createLineBreakNode)()):a===` `?r.push((0,t.$createTabNode)()):a.length>0&&r.push(Ni(a,n))}}else{let{content:e,alias:t}=i;typeof e==`string`?r.push(..._d([e],i.type===`prefix`&&typeof t==`string`?t:i.type)):Array.isArray(e)&&r.push(..._d(e,i.type===`unchanged`?void 0:i.type))}return r}function vd(e,n,r,i){let a=i.getParent();q(a)?bd(e,n,r,a):J(i)&&i.replace((0,t.$createTextNode)(i.__text))}function yd(e,n){let r=n.getElementByKey(e.getKey());if(r===null)return;let i=e.getChildren(),a=i.length;if(a===r.__cachedChildrenLength)return;r.__cachedChildrenLength=a;let o=`1`,s=1;for(let e=0;e<a;e++)(0,t.$isLineBreakNode)(i[e])&&(o+=`
71
- `+ ++s);r.setAttribute(`data-gutter`,o)}function bd(e,n,r,i){let{nodesCurrentlyHighlighting:a}=r,o=i.getKey();if(i.getLanguage()===void 0&&i.setLanguage(n.defaultLanguage),!pd(i.getLanguage()||n.defaultLanguage))return i.getIsSyntaxHighlightSupported()&&i.setIsSyntaxHighlightSupported(!1),void md();i.getIsSyntaxHighlightSupported()||i.setIsSyntaxHighlightSupported(!0),a.has(o)||(a.add(o),r.didTransform||(r.didTransform=!0,(0,t.$onUpdate)(()=>{r.didTransform=!1,a.clear()})),function(e,n){let r=(0,t.$getNodeByKey)(e);if(!q(r)||!r.isAttached())return;let i=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(i))return void n();let a=i.anchor,o=a.offset,s=a.type===`element`&&(0,t.$isLineBreakNode)(r.getChildAtIndex(a.offset-1)),c=0;if(s||(c=o+a.getNode().getPreviousSiblings().reduce((e,t)=>e+t.getTextContentSize(),0)),n()){if(s)return void a.getNode().select(o,o);r.getChildren().some(e=>{let n=(0,t.$isTextNode)(e);if(n||(0,t.$isLineBreakNode)(e)){let t=e.getTextContentSize();if(n&&t>=c)return e.select(c,c),!0;c-=t}return!1})}}(o,()=>{let e=(0,t.$getNodeByKey)(o);if(!q(e)||!e.isAttached())return!1;let r=e.getLanguage()||n.defaultLanguage,a=n.$tokenize(e,r),{from:s,to:c,nodesForReplacement:l}=function(e,t){let n=0;for(;n<e.length&&xd(e[n],t[n]);)n++;let r=e.length,i=t.length,a=Math.min(r,i)-n,o=0;for(;o<a;)if(o++,!xd(e[r-o],t[i-o])){o--;break}let s=n,c=r-o;return{from:s,nodesForReplacement:t.slice(n,i-o),to:c}}(e.getChildren(),a);return!(s===c&&!l.length)&&(i.splice(s,c-s,l),!0)}))}function xd(e,n){return J(e)&&J(n)&&e.__text===n.__text&&e.__highlightType===n.__highlightType||(0,t.$isTabNode)(e)&&(0,t.$isTabNode)(n)||(0,t.$isLineBreakNode)(e)&&(0,t.$isLineBreakNode)(n)}function Sd(e){if(!(0,t.$isRangeSelection)(e))return!1;let n=e.anchor.getNode(),r=q(n)?n:n.getParent(),i=e.focus.getNode(),a=q(i)?i:i.getParent();return q(r)&&r.is(a)}function Cd(e){let n=e.getNodes(),r=[];if(n.length===1&&q(n[0]))return r;let i=[];for(let e=0;e<n.length;e++){let a=n[e];J(a)||(0,t.$isTabNode)(a)||(0,t.$isLineBreakNode)(a)||cd(169),(0,t.$isLineBreakNode)(a)?i.length>0&&(r.push(i),i=[]):i.push(a)}if(i.length>0){let n=e.isBackward()?e.anchor:e.focus,a=(0,t.$createPoint)(i[0].getKey(),0,`text`);n.is(a)||r.push(i)}return r}function wd(e){let n=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(n)||!Sd(n))return!1;let r=Cd(n),i=r.length;if(i===0&&n.isCollapsed())return e===t.INDENT_CONTENT_COMMAND&&n.insertNodes([(0,t.$createTabNode)()]),!0;if(i===0&&e===t.INDENT_CONTENT_COMMAND&&n.getTextContent()===`
72
- `){let e=(0,t.$createTabNode)(),r=(0,t.$createLineBreakNode)(),i=n.isBackward()?`previous`:`next`;return n.insertNodes([e,r]),(0,t.$setSelectionFromCaretRange)((0,t.$getCaretRangeInDirection)((0,t.$getCaretRange)((0,t.$getTextPointCaret)(e,`next`,0),(0,t.$normalizeCaret)((0,t.$getSiblingCaret)(r,`next`))),i)),!0}for(let a=0;a<i;a++){let i=r[a];if(i.length>0){let r=i[0];if(a===0&&(r=vi(r)),e===t.INDENT_CONTENT_COMMAND){let e=(0,t.$createTabNode)();if(r.insertBefore(e),a===0){let i=n.isBackward()?`focus`:`anchor`,a=(0,t.$createPoint)(r.getKey(),0,`text`);n[i].is(a)&&n[i].set(e.getKey(),0,`text`)}}else (0,t.$isTabNode)(r)&&r.remove()}}return!0}function Td(e,n){let r=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(r))return!1;let{anchor:i,focus:a}=r,o=i.offset,s=a.offset,c=i.getNode(),l=a.getNode(),u=e===t.KEY_ARROW_UP_COMMAND;if(!Sd(r)||!J(c)&&!(0,t.$isTabNode)(c)||!J(l)&&!(0,t.$isTabNode)(l))return!1;if(!n.altKey){if(r.isCollapsed()){let e=c.getParentOrThrow();if(u&&o===0&&c.getPreviousSibling()===null){if(e.getPreviousSibling()===null)return e.selectPrevious(),n.preventDefault(),!0}else if(!u&&o===c.getTextContentSize()&&c.getNextSibling()===null&&e.getNextSibling()===null)return e.selectNext(),n.preventDefault(),!0}return!1}let d,f;if(c.isBefore(l)?(d=vi(c),f=yi(l)):(d=vi(l),f=yi(c)),d==null||f==null)return!1;let p=d.getNodesBetween(f);for(let e=0;e<p.length;e++){let n=p[e];if(!J(n)&&!(0,t.$isTabNode)(n)&&!(0,t.$isLineBreakNode)(n))return!1}n.preventDefault(),n.stopPropagation();let m=u?d.getPreviousSibling():f.getNextSibling();if(!(0,t.$isLineBreakNode)(m))return!0;let h=u?m.getPreviousSibling():m.getNextSibling();if(h==null)return!0;let g=(J(h)||(0,t.$isTabNode)(h)||(0,t.$isLineBreakNode)(h)?u?vi(h):yi(h):null)??h;return m.remove(),p.forEach(e=>e.remove()),e===t.KEY_ARROW_UP_COMMAND?(p.forEach(e=>g.insertBefore(e)),g.insertBefore(m)):(g.insertAfter(m),g=m,p.forEach(e=>{g.insertAfter(e),g=e})),r.setTextNodeRange(c,o,l,s),!0}function Ed(e,n){let r=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(r))return!1;let{anchor:i,focus:a}=r,o=i.getNode(),s=a.getNode(),c=e===t.MOVE_TO_START;if(!Sd(r)||!J(o)&&!(0,t.$isTabNode)(o)||!J(s)&&!(0,t.$isTabNode)(s))return!1;let l=s;if(bi(l)===`rtl`?!c:c){let e=xi(l,a.offset);if(e!==null){let{node:n,offset:i}=e;(0,t.$isLineBreakNode)(n)?n.selectNext(0,0):r.setTextNodeRange(n,i,n,i)}else l.getParentOrThrow().selectStart()}else Si(l).select();return n.preventDefault(),n.stopPropagation(),!0}function Dd(e,n){if(!e.hasNodes([Y,Ri]))throw Error(`CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor`);n??=jd;let r=[];!0!==e._headless&&r.push(e.registerMutationListener(Y,n=>{e.getEditorState().read(()=>{for(let[r,i]of n)if(i!==`destroyed`){let n=(0,t.$getNodeByKey)(r);n!==null&&yd(n,e)}})},{skipInitialization:!1}));let i={didTransform:!1,nodesCurrentlyHighlighting:new Set};return r.push(e.registerNodeTransform(Y,bd.bind(null,e,n,i)),e.registerNodeTransform(t.TextNode,vd.bind(null,e,n,i)),e.registerNodeTransform(Ri,vd.bind(null,e,n,i)),e.registerCommand(t.KEY_TAB_COMMAND,n=>{let r=function(e){let n=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(n)||!Sd(n))return null;let r=e?t.OUTDENT_CONTENT_COMMAND:t.INDENT_CONTENT_COMMAND,i=e?t.OUTDENT_CONTENT_COMMAND:t.INSERT_TAB_COMMAND,a=n.anchor,o=n.focus;if(a.is(o))return i;let s=Cd(n);if(s.length!==1)return r;let c=s[0],l,u;c.length===0&&cd(285),n.isBackward()?(l=o,u=a):(l=a,u=o);let d=vi(c[0]),f=yi(c[0]),p=(0,t.$createPoint)(d.getKey(),0,`text`),m=(0,t.$createPoint)(f.getKey(),f.getTextContentSize(),`text`);return l.isBefore(p)||m.isBefore(u)?r:p.isBefore(l)||u.isBefore(m)?i:r}(n.shiftKey);return r!==null&&(n.preventDefault(),e.dispatchCommand(r,void 0),!0)},t.COMMAND_PRIORITY_LOW),e.registerCommand(t.INSERT_TAB_COMMAND,()=>!!Sd((0,t.$getSelection)())&&((0,t.$insertNodes)([(0,t.$createTabNode)()]),!0),t.COMMAND_PRIORITY_LOW),e.registerCommand(t.INDENT_CONTENT_COMMAND,e=>wd(t.INDENT_CONTENT_COMMAND),t.COMMAND_PRIORITY_LOW),e.registerCommand(t.OUTDENT_CONTENT_COMMAND,e=>wd(t.OUTDENT_CONTENT_COMMAND),t.COMMAND_PRIORITY_LOW),e.registerCommand(t.KEY_ARROW_UP_COMMAND,e=>{let n=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(n)||!Sd(n))return!1;let r=(0,t.$getRoot)().getFirstDescendant(),{anchor:i}=n,a=i.getNode();return(!r||!a||r.getKey()!==a.getKey())&&Td(t.KEY_ARROW_UP_COMMAND,e)},t.COMMAND_PRIORITY_LOW),e.registerCommand(t.KEY_ARROW_DOWN_COMMAND,e=>{let n=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(n)||!Sd(n))return!1;let r=(0,t.$getRoot)().getLastDescendant(),{anchor:i}=n,a=i.getNode();return(!r||!a||r.getKey()!==a.getKey())&&Td(t.KEY_ARROW_DOWN_COMMAND,e)},t.COMMAND_PRIORITY_LOW),e.registerCommand(t.MOVE_TO_START,e=>Ed(t.MOVE_TO_START,e),t.COMMAND_PRIORITY_LOW),e.registerCommand(t.MOVE_TO_END,e=>Ed(t.MOVE_TO_END,e),t.COMMAND_PRIORITY_LOW)),(0,t.mergeRegister)(...r)}var $,Od,kd,Ad,jd,Md,Nd=j((()=>{Bi(),hi(),Gu(),Ku(),qu(),Ju(),Yu(),Xu(),Zu(),Qu(),$u(),ed(),td(),nd(),rd(),id(),ad(),od(),(function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":`-`,"deleted-arrow":`<`,"inserted-sign":`+`,"inserted-arrow":`>`,unchanged:` `,diff:`!`};Object.keys(t).forEach(function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),n===`diff`&&i.push(`bold`),e.languages.diff[n]={pattern:RegExp(`^(?:[`+r+`].*(?:\r
70
+ `?r.push((0,t.$createLineBreakNode)()):a===` `?r.push((0,t.$createTabNode)()):a.length>0&&r.push(Ai(a,n))}}else{let{content:e,alias:t}=i;typeof e==`string`?r.push(...gd([e],i.type===`prefix`&&typeof t==`string`?t:i.type)):Array.isArray(e)&&r.push(...gd(e,i.type===`unchanged`?void 0:i.type))}return r}function _d(e,n,r,i){let a=i.getParent();q(a)?yd(e,n,r,a):J(i)&&i.replace((0,t.$createTextNode)(i.__text))}function vd(e,n){let r=n.getElementByKey(e.getKey());if(r===null)return;let i=e.getChildren(),a=i.length;if(a===r.__cachedChildrenLength)return;r.__cachedChildrenLength=a;let o=`1`,s=1;for(let e=0;e<a;e++)(0,t.$isLineBreakNode)(i[e])&&(o+=`
71
+ `+ ++s);r.setAttribute(`data-gutter`,o)}function yd(e,n,r,i){let{nodesCurrentlyHighlighting:a}=r,o=i.getKey();if(i.getLanguage()===void 0&&i.setLanguage(n.defaultLanguage),!fd(i.getLanguage()||n.defaultLanguage))return i.getIsSyntaxHighlightSupported()&&i.setIsSyntaxHighlightSupported(!1),void pd();i.getIsSyntaxHighlightSupported()||i.setIsSyntaxHighlightSupported(!0),a.has(o)||(a.add(o),r.didTransform||(r.didTransform=!0,(0,t.$onUpdate)(()=>{r.didTransform=!1,a.clear()})),function(e,n){let r=(0,t.$getNodeByKey)(e);if(!q(r)||!r.isAttached())return;let i=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(i))return void n();let a=i.anchor,o=a.offset,s=a.type===`element`&&(0,t.$isLineBreakNode)(r.getChildAtIndex(a.offset-1)),c=0;if(s||(c=o+a.getNode().getPreviousSiblings().reduce((e,t)=>e+t.getTextContentSize(),0)),n()){if(s)return void a.getNode().select(o,o);r.getChildren().some(e=>{let n=(0,t.$isTextNode)(e);if(n||(0,t.$isLineBreakNode)(e)){let t=e.getTextContentSize();if(n&&t>=c)return e.select(c,c),!0;c-=t}return!1})}}(o,()=>{let e=(0,t.$getNodeByKey)(o);if(!q(e)||!e.isAttached())return!1;let r=e.getLanguage()||n.defaultLanguage,a=n.$tokenize(e,r),{from:s,to:c,nodesForReplacement:l}=function(e,t){let n=0;for(;n<e.length&&bd(e[n],t[n]);)n++;let r=e.length,i=t.length,a=Math.min(r,i)-n,o=0;for(;o<a;)if(o++,!bd(e[r-o],t[i-o])){o--;break}let s=n,c=r-o;return{from:s,nodesForReplacement:t.slice(n,i-o),to:c}}(e.getChildren(),a);return!(s===c&&!l.length)&&(i.splice(s,c-s,l),!0)}))}function bd(e,n){return J(e)&&J(n)&&e.__text===n.__text&&e.__highlightType===n.__highlightType||(0,t.$isTabNode)(e)&&(0,t.$isTabNode)(n)||(0,t.$isLineBreakNode)(e)&&(0,t.$isLineBreakNode)(n)}function xd(e){if(!(0,t.$isRangeSelection)(e))return!1;let n=e.anchor.getNode(),r=q(n)?n:n.getParent(),i=e.focus.getNode(),a=q(i)?i:i.getParent();return q(r)&&r.is(a)}function Sd(e){let n=e.getNodes(),r=[];if(n.length===1&&q(n[0]))return r;let i=[];for(let e=0;e<n.length;e++){let a=n[e];J(a)||(0,t.$isTabNode)(a)||(0,t.$isLineBreakNode)(a)||sd(169),(0,t.$isLineBreakNode)(a)?i.length>0&&(r.push(i),i=[]):i.push(a)}if(i.length>0){let n=e.isBackward()?e.anchor:e.focus,a=(0,t.$createPoint)(i[0].getKey(),0,`text`);n.is(a)||r.push(i)}return r}function Cd(e){let n=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(n)||!xd(n))return!1;let r=Sd(n),i=r.length;if(i===0&&n.isCollapsed())return e===t.INDENT_CONTENT_COMMAND&&n.insertNodes([(0,t.$createTabNode)()]),!0;if(i===0&&e===t.INDENT_CONTENT_COMMAND&&n.getTextContent()===`
72
+ `){let e=(0,t.$createTabNode)(),r=(0,t.$createLineBreakNode)(),i=n.isBackward()?`previous`:`next`;return n.insertNodes([e,r]),(0,t.$setSelectionFromCaretRange)((0,t.$getCaretRangeInDirection)((0,t.$getCaretRange)((0,t.$getTextPointCaret)(e,`next`,0),(0,t.$normalizeCaret)((0,t.$getSiblingCaret)(r,`next`))),i)),!0}for(let a=0;a<i;a++){let i=r[a];if(i.length>0){let r=i[0];if(a===0&&(r=hi(r)),e===t.INDENT_CONTENT_COMMAND){let e=(0,t.$createTabNode)();if(r.insertBefore(e),a===0){let i=n.isBackward()?`focus`:`anchor`,a=(0,t.$createPoint)(r.getKey(),0,`text`);n[i].is(a)&&n[i].set(e.getKey(),0,`text`)}}else (0,t.$isTabNode)(r)&&r.remove()}}return!0}function wd(e,n){let r=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(r))return!1;let{anchor:i,focus:a}=r,o=i.offset,s=a.offset,c=i.getNode(),l=a.getNode(),u=e===t.KEY_ARROW_UP_COMMAND;if(!xd(r)||!J(c)&&!(0,t.$isTabNode)(c)||!J(l)&&!(0,t.$isTabNode)(l))return!1;if(!n.altKey){if(r.isCollapsed()){let e=c.getParentOrThrow();if(u&&o===0&&c.getPreviousSibling()===null){if(e.getPreviousSibling()===null)return e.selectPrevious(),n.preventDefault(),!0}else if(!u&&o===c.getTextContentSize()&&c.getNextSibling()===null&&e.getNextSibling()===null)return e.selectNext(),n.preventDefault(),!0}return!1}let d,f;if(c.isBefore(l)?(d=hi(c),f=gi(l)):(d=hi(l),f=gi(c)),d==null||f==null)return!1;let p=d.getNodesBetween(f);for(let e=0;e<p.length;e++){let n=p[e];if(!J(n)&&!(0,t.$isTabNode)(n)&&!(0,t.$isLineBreakNode)(n))return!1}n.preventDefault(),n.stopPropagation();let m=u?d.getPreviousSibling():f.getNextSibling();if(!(0,t.$isLineBreakNode)(m))return!0;let h=u?m.getPreviousSibling():m.getNextSibling();if(h==null)return!0;let g=(J(h)||(0,t.$isTabNode)(h)||(0,t.$isLineBreakNode)(h)?u?hi(h):gi(h):null)??h;return m.remove(),p.forEach(e=>e.remove()),e===t.KEY_ARROW_UP_COMMAND?(p.forEach(e=>g.insertBefore(e)),g.insertBefore(m)):(g.insertAfter(m),g=m,p.forEach(e=>{g.insertAfter(e),g=e})),r.setTextNodeRange(c,o,l,s),!0}function Td(e,n){let r=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(r))return!1;let{anchor:i,focus:a}=r,o=i.getNode(),s=a.getNode(),c=e===t.MOVE_TO_START;if(!xd(r)||!J(o)&&!(0,t.$isTabNode)(o)||!J(s)&&!(0,t.$isTabNode)(s))return!1;let l=s;if(_i(l)===`rtl`?!c:c){let e=vi(l,a.offset);if(e!==null){let{node:n,offset:i}=e;(0,t.$isLineBreakNode)(n)?n.selectNext(0,0):r.setTextNodeRange(n,i,n,i)}else l.getParentOrThrow().selectStart()}else yi(l).select();return n.preventDefault(),n.stopPropagation(),!0}function Ed(e,n){if(!e.hasNodes([Y,Fi]))throw Error(`CodeHighlightPlugin: CodeNode or CodeHighlightNode not registered on editor`);n??=Ad;let r=[];!0!==e._headless&&r.push(e.registerMutationListener(Y,n=>{e.getEditorState().read(()=>{for(let[r,i]of n)if(i!==`destroyed`){let n=(0,t.$getNodeByKey)(r);n!==null&&vd(n,e)}})},{skipInitialization:!1}));let i={didTransform:!1,nodesCurrentlyHighlighting:new Set};return r.push(e.registerNodeTransform(Y,yd.bind(null,e,n,i)),e.registerNodeTransform(t.TextNode,_d.bind(null,e,n,i)),e.registerNodeTransform(Fi,_d.bind(null,e,n,i)),e.registerCommand(t.KEY_TAB_COMMAND,n=>{let r=function(e){let n=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(n)||!xd(n))return null;let r=e?t.OUTDENT_CONTENT_COMMAND:t.INDENT_CONTENT_COMMAND,i=e?t.OUTDENT_CONTENT_COMMAND:t.INSERT_TAB_COMMAND,a=n.anchor,o=n.focus;if(a.is(o))return i;let s=Sd(n);if(s.length!==1)return r;let c=s[0],l,u;c.length===0&&sd(285),n.isBackward()?(l=o,u=a):(l=a,u=o);let d=hi(c[0]),f=gi(c[0]),p=(0,t.$createPoint)(d.getKey(),0,`text`),m=(0,t.$createPoint)(f.getKey(),f.getTextContentSize(),`text`);return l.isBefore(p)||m.isBefore(u)?r:p.isBefore(l)||u.isBefore(m)?i:r}(n.shiftKey);return r!==null&&(n.preventDefault(),e.dispatchCommand(r,void 0),!0)},t.COMMAND_PRIORITY_LOW),e.registerCommand(t.INSERT_TAB_COMMAND,()=>!!xd((0,t.$getSelection)())&&((0,t.$insertNodes)([(0,t.$createTabNode)()]),!0),t.COMMAND_PRIORITY_LOW),e.registerCommand(t.INDENT_CONTENT_COMMAND,e=>Cd(t.INDENT_CONTENT_COMMAND),t.COMMAND_PRIORITY_LOW),e.registerCommand(t.OUTDENT_CONTENT_COMMAND,e=>Cd(t.OUTDENT_CONTENT_COMMAND),t.COMMAND_PRIORITY_LOW),e.registerCommand(t.KEY_ARROW_UP_COMMAND,e=>{let n=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(n)||!xd(n))return!1;let r=(0,t.$getRoot)().getFirstDescendant(),{anchor:i}=n,a=i.getNode();return(!r||!a||r.getKey()!==a.getKey())&&wd(t.KEY_ARROW_UP_COMMAND,e)},t.COMMAND_PRIORITY_LOW),e.registerCommand(t.KEY_ARROW_DOWN_COMMAND,e=>{let n=(0,t.$getSelection)();if(!(0,t.$isRangeSelection)(n)||!xd(n))return!1;let r=(0,t.$getRoot)().getLastDescendant(),{anchor:i}=n,a=i.getNode();return(!r||!a||r.getKey()!==a.getKey())&&wd(t.KEY_ARROW_DOWN_COMMAND,e)},t.COMMAND_PRIORITY_LOW),e.registerCommand(t.MOVE_TO_START,e=>Td(t.MOVE_TO_START,e),t.COMMAND_PRIORITY_LOW),e.registerCommand(t.MOVE_TO_END,e=>Td(t.MOVE_TO_END,e),t.COMMAND_PRIORITY_LOW)),(0,t.mergeRegister)(...r)}var $,Dd,Od,kd,Ad,jd,Md=j((()=>{Li(),fi(),Wu(),Gu(),Ku(),qu(),Ju(),Yu(),Xu(),Zu(),Qu(),$u(),ed(),td(),nd(),rd(),id(),ad(),(function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":`-`,"deleted-arrow":`<`,"inserted-sign":`+`,"inserted-arrow":`>`,unchanged:` `,diff:`!`};Object.keys(t).forEach(function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),n===`diff`&&i.push(`bold`),e.languages.diff[n]={pattern:RegExp(`^(?:[`+r+`].*(?:\r
73
73
  ?|
74
- |(?![\\s\\S])))+`,`m`),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,`PREFIXES`,{value:t})})(globalThis.Prism),$=globalThis.Prism||window.Prism,Od={c:`C`,clike:`C-like`,cpp:`C++`,css:`CSS`,html:`HTML`,java:`Java`,js:`JavaScript`,markdown:`Markdown`,objc:`Objective-C`,plain:`Plain Text`,powershell:`PowerShell`,py:`Python`,rust:`Rust`,sql:`SQL`,swift:`Swift`,typescript:`TypeScript`,xml:`XML`},kd={cpp:`cpp`,java:`java`,javascript:`js`,md:`markdown`,plaintext:`plain`,python:`py`,text:`plain`,ts:`typescript`},Ad=()=>Object.keys($.languages).filter(e=>typeof $.languages[e]!=`function`).sort(),jd={$tokenize(e,t){return gd(e,t||this.defaultLanguage)},defaultLanguage:Pi,tokenize(e,t){return $.tokenize(e,$.languages[t||``]||$.languages[this.defaultLanguage])}},Md=(0,t.defineExtension)({build:(e,t)=>yr(t),config:(0,t.safeCast)({disabled:!1,tokenizer:jd}),dependencies:[zi],name:`@lexical/code-prism`,register:(e,t,n)=>{let r=n.getOutput();return vr(()=>{if(!r.disabled.value)return Dd(e,r.tokenizer.value)})}})})),Pd=M((()=>{(function(e){var t=`\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b`,n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:`punctuation`,inside:null},r={bash:n,environment:{pattern:RegExp(`\\$`+t),alias:`constant`},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp(`(\\{)`+t),lookbehind:!0,alias:`constant`}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};globalThis.Prism.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:`important`},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:`function`},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:`function`}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:`variable`,lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp(`(^|[\\s;|&]|[<>]\\()`+t),lookbehind:!0,alias:`constant`}},alias:`variable`,lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:`variable`,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp(`\\$?`+t),alias:`constant`},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:`class-name`},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:`important`},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:`important`}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=globalThis.Prism.languages.bash;for(var i=[`comment`,`function-name`,`for-or-select`,`assign-left`,`parameter`,`string`,`environment`,`function`,`keyword`,`builtin`,`boolean`,`file-descriptor`,`operator`,`punctuation`,`number`],a=r.variable[1].inside,o=0;o<i.length;o++)a[i[o]]=globalThis.Prism.languages.bash[i[o]];globalThis.Prism.languages.sh=globalThis.Prism.languages.bash,globalThis.Prism.languages.shell=globalThis.Prism.languages.bash})(globalThis.Prism)})),Fd=M((()=>{(function(e){var t=`\\\\[\\r\\n](?:\\s|\\\\[\\r\\n]|#.*(?!.))*(?![\\s#]|\\\\[\\r\\n])`,n=`(?:[ \\t]+(?![ \\t])(?:<SP_BS>)?|<SP_BS>)`.replace(/<SP_BS>/g,function(){return t}),r=`"(?:[^"\\\\\\r\\n]|\\\\(?:\\r\\n|[\\s\\S]))*"|'(?:[^'\\\\\\r\\n]|\\\\(?:\\r\\n|[\\s\\S]))*'`,i=`--[\\w-]+=(?:<STR>|(?!["'])(?:[^\\s\\\\]|\\\\.)+)`.replace(/<STR>/g,function(){return r}),a={pattern:RegExp(r),greedy:!0},o={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function s(e,t){return e=e.replace(/<OPT>/g,function(){return i}).replace(/<SP>/g,function(){return n}),RegExp(e,t)}globalThis.Prism.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:s(`(^(?:ONBUILD<SP>)?\\w+<SP>)<OPT>(?:<SP><OPT>)*`,`i`),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[a,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:s(`(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\\b`,`i`),lookbehind:!0,greedy:!0},{pattern:s(`(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \\t\\\\]+<SP>)AS`,`i`),lookbehind:!0,greedy:!0},{pattern:s(`(^ONBUILD<SP>)\\w+`,`i`),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:o,string:a,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:o},globalThis.Prism.languages.dockerfile=globalThis.Prism.languages.docker})(globalThis.Prism)})),Id=M((()=>{globalThis.Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}},globalThis.Prism.languages.webmanifest=globalThis.Prism.languages.json})),Ld=M((()=>{(function(e){var t=e.util.clone(globalThis.Prism.languages.javascript),n=`(?:\\s|\\/\\/.*(?!.)|\\/\\*(?:[^*]|\\*(?!\\/))\\*\\/)`,r=`(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})`,i=`(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})`;function a(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(e,t)}i=a(i).source,globalThis.Prism.languages.jsx=globalThis.Prism.languages.extend(`markup`,t),globalThis.Prism.languages.jsx.tag.pattern=a(`<\\/?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:"(?:\\\\[\\s\\S]|[^\\\\"])*"|'(?:\\\\[\\s\\S]|[^\\\\'])*'|[^\\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\\/?)?>`),globalThis.Prism.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,globalThis.Prism.languages.jsx.tag.inside[`attr-value`].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,globalThis.Prism.languages.jsx.tag.inside.tag.inside[`class-name`]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,globalThis.Prism.languages.jsx.tag.inside.comment=t.comment,globalThis.Prism.languages.insertBefore(`inside`,`attr-name`,{spread:{pattern:a(`<SPREAD>`),inside:globalThis.Prism.languages.jsx}},globalThis.Prism.languages.jsx.tag),globalThis.Prism.languages.insertBefore(`inside`,`special-attr`,{script:{pattern:a(`=<BRACES>`),alias:`language-javascript`,inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:`punctuation`},rest:globalThis.Prism.languages.jsx}}},globalThis.Prism.languages.jsx.tag);var o=function(e){return e?typeof e==`string`?e:typeof e.content==`string`?e.content:e.content.map(o).join(``):``},s=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=!1;if(typeof r!=`string`&&(r.type===`tag`&&r.content[0]&&r.content[0].type===`tag`?r.content[0].content[0].content===`</`?t.length>0&&t[t.length-1].tagName===o(r.content[0].content[1])&&t.pop():r.content[r.content.length-1].content===`/>`||t.push({tagName:o(r.content[0].content[1]),openedBraces:0}):t.length>0&&r.type===`punctuation`&&r.content===`{`?t[t.length-1].openedBraces++:t.length>0&&t[t.length-1].openedBraces>0&&r.type===`punctuation`&&r.content===`}`?t[t.length-1].openedBraces--:i=!0),(i||typeof r==`string`)&&t.length>0&&t[t.length-1].openedBraces===0){var a=o(r);n<e.length-1&&(typeof e[n+1]==`string`||e[n+1].type===`plain-text`)&&(a+=o(e[n+1]),e.splice(n+1,1)),n>0&&(typeof e[n-1]==`string`||e[n-1].type===`plain-text`)&&(a=o(e[n-1])+a,e.splice(n-1,1),n--),e[n]=new globalThis.Prism.Token(`plain-text`,a,null,a)}r.content&&typeof r.content!=`string`&&s(r.content)}};globalThis.Prism.hooks.add(`after-tokenize`,function(e){e.language!==`jsx`&&e.language!==`tsx`||s(e.tokens)})})(globalThis.Prism)})),Rd=M((()=>{(function(e){var t=e.util.clone(globalThis.Prism.languages.typescript);globalThis.Prism.languages.tsx=globalThis.Prism.languages.extend(`jsx`,t),delete globalThis.Prism.languages.tsx.parameter,delete globalThis.Prism.languages.tsx[`literal-property`];var n=globalThis.Prism.languages.tsx.tag;n.pattern=RegExp(`(^|[^\\w$]|(?=<\\/))(?:`+n.pattern.source+`)`,n.pattern.flags),n.lookbehind=!0})(globalThis.Prism)})),zd=M((()=>{(function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r=`(?:`+n.source+`(?:[ ]+`+t.source+`)?|`+t.source+`(?:[ ]+`+n.source+`)?)`,i=`(?:[^\\s\\x00-\\x08\\x0e-\\x1f!"#%&'*,\\-:>?@[\\]\`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*`.replace(/<PLAIN>/g,function(){return`[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]`}),a=`"(?:[^"\\\\\\r\\n]|\\\\.)*"|'(?:[^'\\\\\\r\\n]|\\\\.)*'`;function o(e,t){t=(t||``).replace(/m/g,``)+`m`;var n=`([:\\-,[{]\\s*(?:\\s<<prop>>[ \\t]+)?)(?:<<value>>)(?=[ \\t]*(?:$|,|\\]|\\}|(?:[\\r\\n]\\s*)?#))`.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return e});return RegExp(n,t)}globalThis.Prism.languages.yaml={scalar:{pattern:RegExp(`([\\-:]\\s*(?:\\s<<prop>>[ \\t]+)?[|>])[ \\t]*(?:((?:\\r?\\n|\\r)[ \\t]+)\\S[^\\r\\n]*(?:\\2[^\\r\\n]+)*)`.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:`string`},comment:/#.*/,key:{pattern:RegExp(`((?:^|[:\\-,[{\\r\\n?])[ \\t]*(?:<<prop>>[ \\t]+)?)<<key>>(?=\\s*:\\s)`.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return`(?:`+i+`|`+a+`)`})),lookbehind:!0,greedy:!0,alias:`atrule`},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:`important`},datetime:{pattern:o(`\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \\t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \\t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?`),lookbehind:!0,alias:`number`},boolean:{pattern:o(`false|true`,`i`),lookbehind:!0,alias:`important`},null:{pattern:o(`null|~`,`i`),lookbehind:!0,alias:`important`},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(`[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)`,`i`),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},globalThis.Prism.languages.yml=globalThis.Prism.languages.yaml})(globalThis.Prism)})),Bd=N(Gu(),1),Vd={bun:`bash`,dockerfile:`docker`,npm:`bash`,pnpm:`bash`,shell:`bash`,terminal:`bash`,yarn:`bash`};function Hd(){let e=globalThis;e.Prism=Bd.default,Object.entries(Vd).forEach(([e,t])=>{let n=Bd.default.languages[t];n&&!Bd.default.languages[e]&&(Bd.default.languages[e]=n)})}async function Ud(){Hd();let{registerCodeHighlighting:e}=await Promise.resolve().then(()=>(Nd(),sd));return await Promise.resolve().then(()=>N(Pd(),1)),await Promise.resolve().then(()=>N(Fd(),1)),await Promise.resolve().then(()=>N(Id(),1)),await Promise.resolve().then(()=>N(Ld(),1)),await Promise.resolve().then(()=>N(Rd(),1)),await Promise.resolve().then(()=>N(zd(),1)),Hd(),e}function Wd(){let[e]=(0,h.useLexicalComposerContext)();return P.default.useEffect(()=>{let t=!1,n;return Ud().then(r=>{t||(n=r(e))}).catch(e=>{console.error(`Failed to load code highlighting.`,e)}),()=>{t=!0,n?.()}},[e]),null}function Gd(e,t){let n=new Map;return Array.from(e||[]).forEach(e=>{e.type.startsWith(`image/`)&&n.set(`${e.name}-${e.size}-${e.lastModified}`,e)}),Array.from(t||[]).forEach(e=>{if(e.kind!==`file`||!e.type.startsWith(`image/`))return;let t=e.getAsFile();t&&n.set(`${t.name}-${t.size}-${t.lastModified}`,t)}),Array.from(n.values())}async function Kd(e,t,n){if(e.size>5242880)return window.alert(t),null;let r=await n(e);return{altText:e.name,src:r}}function qd(){let[e]=(0,h.useLexicalComposerContext)(),n=U(),r=ja();return(0,P.useEffect)(()=>{let i=async t=>{for(let i of t){let t=null;try{t=await Kd(i,n.alerts.imageSizeLimit,r)}catch(e){console.error(e),window.alert(n.alerts.imageUploadFailed)}t&&e.dispatchCommand(Ue,t)}},a=e.registerCommand(Ue,e=>{let n=no(e);return(0,m.$insertNodeToNearestRoot)(n),n.insertAfter((0,t.$createParagraphNode)()),!0},t.COMMAND_PRIORITY_EDITOR),o=e.registerCommand(t.PASTE_COMMAND,e=>{if(!(e instanceof ClipboardEvent))return!1;let t=Gd(e.clipboardData?.files,e.clipboardData?.items);return t.length===0?!1:(e.preventDefault(),i(t),!0)},t.COMMAND_PRIORITY_LOW),s=e.registerCommand(t.DRAGOVER_COMMAND,e=>Gd(e.dataTransfer?.files,e.dataTransfer?.items).length===0?!1:(e.preventDefault(),!0),t.COMMAND_PRIORITY_LOW),c=e.registerCommand(t.DROP_COMMAND,e=>{let t=Gd(e.dataTransfer?.files,e.dataTransfer?.items);return t.length===0?!1:(e.preventDefault(),i(t),!0)},t.COMMAND_PRIORITY_LOW);return()=>{a(),o(),s(),c()}},[e,n.alerts.imageSizeLimit,n.alerts.imageUploadFailed,r]),null}var Jd=`pre.rj-editor-code-block`,Yd=`.rj-editor-text-code`,Xd=`--rj-editor-inline-code-current-bg`,Zd=`--rj-editor-inline-code-current-text`;function Qd(e){return e.classList.contains(`rj-editor-text-code`)||!!e.querySelector(Yd)}function $d(e,t){return Array.from(e.querySelectorAll(`*`)).find(e=>e.style[t])?.style[t]}function ef(e,t,n){if(n){e.style.setProperty(t,n);return}e.style.removeProperty(t)}function tf(e){e?.querySelectorAll(`code`).forEach(e=>{e.closest(Jd)||Qd(e)&&(ef(e,Xd,$d(e,`backgroundColor`)),ef(e,Zd,$d(e,`color`)))})}function nf(){let[e]=(0,h.useLexicalComposerContext)(),t=P.default.useRef(null),n=P.default.useCallback(()=>{t.current!==null&&window.cancelAnimationFrame(t.current),t.current=window.requestAnimationFrame(()=>{t.current=null,tf(e.getRootElement())})},[e]);return P.default.useEffect(()=>(n(),()=>{t.current!==null&&window.cancelAnimationFrame(t.current)}),[n]),P.default.useEffect(()=>e.registerUpdateListener(n),[e,n]),null}function rf(e){return e.metaKey||e.ctrlKey}function af(e){return e instanceof HTMLElement?[`INPUT`,`SELECT`,`TEXTAREA`].includes(e.tagName):!1}function of(){let[e]=(0,h.useLexicalComposerContext)(),n=zn();return(0,P.useEffect)(()=>{let r=()=>{Uo(e),n(In({isBold:!1,isCode:!1,isItalic:!1,isStrikethrough:!1,isSubscript:!1,isSuperscript:!1,isUnderline:!1})),n(Pn({backgroundColor:L.backgroundColor,fontFamily:L.fontFamily,fontSize:L.fontSize,lineHeight:L.lineHeight,textColor:L.textColor})),n(kn({alignment:L.alignment,listType:L.listType}))};return e.registerCommand(t.KEY_DOWN_COMMAND,n=>{if(!rf(n)||n.altKey||af(n.target))return!1;let i=n.key.toLowerCase(),a=n.shiftKey;return i===`b`&&!a?(n.preventDefault(),e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`bold`),!0):i===`i`&&!a?(n.preventDefault(),e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`italic`),!0):i===`u`&&!a?(n.preventDefault(),e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`underline`),!0):i===`x`&&a?(n.preventDefault(),e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`strikethrough`),!0):n.key===`=`&&!a?(n.preventDefault(),e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`subscript`),!0):(n.key===`=`||n.key===`+`)&&a?(n.preventDefault(),e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`superscript`),!0):i===`z`&&!a?(n.preventDefault(),e.dispatchCommand(t.UNDO_COMMAND,void 0),!0):i===`z`&&a||i===`y`?(n.preventDefault(),e.dispatchCommand(t.REDO_COMMAND,void 0),!0):i===`k`&&!a?(n.preventDefault(),window.dispatchEvent(new CustomEvent(Ke)),!0):n.key===`7`&&a?(n.preventDefault(),e.dispatchCommand(f.INSERT_ORDERED_LIST_COMMAND,void 0),!0):n.key===`8`&&a?(n.preventDefault(),e.dispatchCommand(f.INSERT_UNORDERED_LIST_COMMAND,void 0),!0):n.key===`[`&&!a?(n.preventDefault(),e.dispatchCommand(t.OUTDENT_CONTENT_COMMAND,void 0),!0):n.key===`]`&&!a?(n.preventDefault(),e.dispatchCommand(t.INDENT_CONTENT_COMMAND,void 0),!0):n.key===`\\`&&!a?(n.preventDefault(),r(),!0):a?i===`l`?(n.preventDefault(),e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`left`),!0):i===`c`?(n.preventDefault(),e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`center`),!0):i===`r`?(n.preventDefault(),e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`right`),!0):i===`j`?(n.preventDefault(),e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`justify`),!0):!1:!1},t.COMMAND_PRIORITY_CRITICAL)},[n,e]),null}function sf(e){return(0,p.$isTableNode)(e)||ro(e)||lo(e)}function cf(){let[e]=(0,h.useLexicalComposerContext)();return(0,P.useEffect)(()=>e.registerUpdateListener(({editorState:n})=>{let r=!1,i=null;n.read(()=>{let e=(0,t.$getRoot)().getChildren();r=sf(e.at(-1));for(let t=0;t<e.length-1;t+=1)if(sf(e[t])&&sf(e[t+1])){i=e[t].getKey();break}}),!(!r&&!i)&&e.update(()=>{if(i){let e=(0,t.$getRoot)().getChildren().find(e=>e.getKey()===i);if(sf(e)){e.insertAfter((0,t.$createParagraphNode)());return}}let e=(0,t.$getRoot)().getLastChild();sf(e)&&e.insertAfter((0,t.$createParagraphNode)())})}),[e]),null}function lf(){let[e]=(0,h.useLexicalComposerContext)();return(0,P.useEffect)(()=>{let n=e.registerCommand(We,e=>{let n=co(e),r=(0,t.$createParagraphNode)();return(0,m.$insertNodeToNearestRoot)(n),n.insertAfter(r),r.select(),!0},t.COMMAND_PRIORITY_EDITOR),r=e.registerUpdateListener(({editorState:n})=>{let r=!1;n.read(()=>{r=lo((0,t.$getRoot)().getLastChild())}),r&&e.update(()=>{let e=(0,t.$getRoot)().getLastChild();lo(e)&&e.insertAfter((0,t.$createParagraphNode)())})});return()=>{n(),r()}},[e]),null}var uf=[`words`,`characters`,`selection`,`language`,`mode`,`zoom`],df={characters:0,isSelectionCollapsed:!0,selectedCharacters:0,selectedWords:0,words:0};function ff(e,t){return e.characters===t.characters&&e.isSelectionCollapsed===t.isSelectionCollapsed&&e.selectedCharacters===t.selectedCharacters&&e.selectedWords===t.selectedWords&&e.words===t.words}function pf(e,t,n){return e===`words`?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{className:`rj-editor-footer-item-value`,children:t.words}),(0,u.jsx)(`span`,{children:n.footer.words})]}):e===`characters`?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{className:`rj-editor-footer-item-value`,children:t.characters}),(0,u.jsx)(`span`,{children:n.footer.characters})]}):e===`selection`?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{children:n.footer.selected}),(0,u.jsxs)(`span`,{className:`rj-editor-footer-item-value`,children:[t.selectedWords,`/`,t.selectedCharacters]})]}):e===`language`?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{children:n.footer.language}),(0,u.jsx)(`span`,{className:`rj-editor-footer-item-value`,children:t.language})]}):e===`mode`?(0,u.jsx)(`span`,{className:`rj-editor-footer-item-value`,children:t.isFullscreen?n.footer.fullscreen:t.isFocused?n.footer.focus:n.footer.editing}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{children:n.footer.zoom}),(0,u.jsxs)(`span`,{className:`rj-editor-footer-item-value`,children:[t.zoom,`%`]})]})}var mf=P.default.memo(function({customFooter:e,isFocused:n,isFullscreen:r,items:i,language:a,zoom:o}){let[s]=(0,h.useLexicalComposerContext)(),c=U(),[l,d]=P.default.useState(df),f=P.default.useCallback(()=>{s.getEditorState().read(()=>{let e=(0,t.$getRoot)().getTextContent(),n=(0,t.$getSelection)(),r=(0,t.$isRangeSelection)(n)?n.getTextContent():``,i={characters:_e(e),isSelectionCollapsed:!(0,t.$isRangeSelection)(n)||n.isCollapsed(),selectedCharacters:_e(r),selectedWords:ve(r),words:ve(e)};d(e=>ff(e,i)?e:i)})},[s]);P.default.useEffect(()=>(f(),s.registerUpdateListener(()=>{f()})),[s,f]),P.default.useEffect(()=>s.registerCommand(t.SELECTION_CHANGE_COMMAND,()=>(f(),!1),t.COMMAND_PRIORITY_LOW),[s,f]);let p=P.default.useMemo(()=>({...l,isFocused:n,isFullscreen:r,language:a,zoom:o}),[n,r,a,l,o]);if(e)return(0,u.jsx)(`footer`,{"aria-label":c.footer.statusBar,className:`rj-editor-footer`,children:e(p)});let m=i?.length?i:uf;return(0,u.jsx)(`footer`,{"aria-label":c.footer.statusBar,className:`rj-editor-footer`,children:(0,u.jsx)(`div`,{className:`rj-editor-footer-items`,children:m.map((e,t)=>(0,u.jsxs)(P.default.Fragment,{children:[t>0&&e===`mode`?(0,u.jsx)(`span`,{className:`rj-editor-footer-spacer`}):null,(0,u.jsx)(`span`,{className:`rj-editor-footer-item`,"data-rj-editor-footer-item":e,children:pf(e,p,c)})]},`${e}-${t}`))})})});function hf(e,t,n){n&&e.read(()=>{n(sn((0,i.$generateHtmlFromNodes)(t),t),JSON.stringify(e.toJSON()),e)})}function gf({lastHtmlRef:e,value:t}){let[n]=(0,h.useLexicalComposerContext)();return P.default.useEffect(()=>{t===void 0||t===e.current||n.update(()=>{Dn(n,t),e.current=t})},[n,e,t]),null}function _f({autofocus:e,className:t,editorRef:n,footer:r,footerItems:a,footerLanguageLabel:o,footerZoom:s,id:c,isFullscreen:l,onBlur:d,onChange:f,onFocus:p,onToggleFullscreen:m,placeholder:h,showFooter:g,theme:E,value:D}){let O=U(),k=P.default.useRef(D),[A,ee]=P.default.useState(!1);return(0,u.jsxs)(`div`,{className:[`rj-editor`,l?`rj-editor--fullscreen`:``,t].filter(Boolean).join(` `),"data-rj-editor-theme":E,id:c,onBlur:e=>{let t=e.relatedTarget;e.currentTarget.contains(t)||ee(!1),d?.(e)},onFocus:e=>{ee(!0),p?.(e)},ref:n,children:[(0,u.jsx)(uu,{isFullscreen:l,onToggleFullscreen:m}),(0,u.jsxs)(`div`,{className:`rj-editor-body`,children:[(0,u.jsx)(w.RichTextPlugin,{contentEditable:(0,u.jsx)(v.ContentEditable,{className:`rj-editor-input`}),ErrorBoundary:y.LexicalErrorBoundary,placeholder:(0,u.jsx)(`div`,{className:`rj-editor-placeholder`,children:h===void 0?O.placeholders.editor:h})}),(0,u.jsx)(b.HistoryPlugin,{}),(0,u.jsx)(Tu,{}),(0,u.jsx)(Wd,{}),(0,u.jsx)(Wu,{}),(0,u.jsx)(du,{}),(0,u.jsx)(qd,{}),(0,u.jsx)(nf,{}),(0,u.jsx)(of,{}),(0,u.jsx)(lf,{}),(0,u.jsx)(x.LinkPlugin,{}),(0,u.jsx)(S.ListPlugin,{}),(0,u.jsx)(T.TablePlugin,{}),(0,u.jsx)(cf,{}),(0,u.jsx)(Do,{}),(0,u.jsx)(gf,{lastHtmlRef:k,value:D}),(0,u.jsx)(C.OnChangePlugin,{onChange:(e,t)=>{e.read(()=>{k.current=sn((0,i.$generateHtmlFromNodes)(t),t)}),hf(e,t,f)}}),e?(0,u.jsx)(_.AutoFocusPlugin,{}):null]}),g?(0,u.jsx)(mf,{customFooter:r,isFocused:A,isFullscreen:l,items:a,language:o,zoom:s}):null]})}function vf({autofocus:e=!1,className:t,defaultValue:n,footer:r,footerItems:i,footerLanguageLabel:s,footerZoom:l=100,id:d,locale:f=`en`,locales:p,namespace:m=`RJEditor`,onBlur:h,onChange:g,onFocus:_,onUpload:v,placeholder:y,showFooter:b=!1,translations:x,theme:S=`auto`,value:C}){let w=P.default.useMemo(()=>Rn(),[]),T=P.default.useRef(null),[E,D]=P.default.useState(!1),O=rr(S),k=P.default.useMemo(()=>Xn(O),[O]),A=fo({defaultValue:n,namespace:m,value:C});P.default.useEffect(()=>{let e=()=>{D(document.fullscreenElement===T.current)};return document.addEventListener(`fullscreenchange`,e),()=>{document.removeEventListener(`fullscreenchange`,e)}},[]);let ee=async()=>{if(document.fullscreenElement===T.current){await document.exitFullscreen();return}await T.current?.requestFullscreen()},te=P.default.useCallback(e=>document.fullscreenElement||T.current||e?.parentElement||document.body,[]);return(0,u.jsx)(c.Provider,{store:w,children:(0,u.jsx)(qn,{locale:f,locales:p,translations:x,children:(0,u.jsx)(Zn.Provider,{value:O,children:(0,u.jsx)(o.ConfigProvider,{getPopupContainer:te,theme:k,children:(0,u.jsx)(a.LexicalComposer,{initialConfig:A,children:(0,u.jsx)(po,{onImageUpload:v,children:(0,u.jsx)(_f,{autofocus:e,className:t,editorRef:T,footer:r,footerItems:i,footerLanguageLabel:s||yf(f),footerZoom:l,id:d,isFullscreen:E,onBlur:h,onChange:g,onFocus:_,onToggleFullscreen:ee,placeholder:y,showFooter:b,theme:O,value:C})})})})})})})}function yf(e){return e===`uz`?`O‘zbek`:e===`ru`?`Русский`:e===`en`?`English`:e}gn(),e.RJEditorI18nProvider=qn,e.RJTextEditor=vf,e.enTranslations=Bn,e.mergeTranslations=Hn,e.ruTranslations=Un,e.useRJEditorI18n=U,e.uzTranslations=Wn});
74
+ |(?![\\s\\S])))+`,`m`),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,`PREFIXES`,{value:t})})(globalThis.Prism),$=globalThis.Prism||window.Prism,Dd={c:`C`,clike:`C-like`,cpp:`C++`,css:`CSS`,html:`HTML`,java:`Java`,js:`JavaScript`,markdown:`Markdown`,objc:`Objective-C`,plain:`Plain Text`,powershell:`PowerShell`,py:`Python`,rust:`Rust`,sql:`SQL`,swift:`Swift`,typescript:`TypeScript`,xml:`XML`},Od={cpp:`cpp`,java:`java`,javascript:`js`,md:`markdown`,plaintext:`plain`,python:`py`,text:`plain`,ts:`typescript`},kd=()=>Object.keys($.languages).filter(e=>typeof $.languages[e]!=`function`).sort(),Ad={$tokenize(e,t){return hd(e,t||this.defaultLanguage)},defaultLanguage:ji,tokenize(e,t){return $.tokenize(e,$.languages[t||``]||$.languages[this.defaultLanguage])}},jd=(0,t.defineExtension)({build:(e,t)=>gr(t),config:(0,t.safeCast)({disabled:!1,tokenizer:Ad}),dependencies:[Ii],name:`@lexical/code-prism`,register:(e,t,n)=>{let r=n.getOutput();return hr(()=>{if(!r.disabled.value)return Ed(e,r.tokenizer.value)})}})})),Nd=M((()=>{(function(e){var t=`\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b`,n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:`punctuation`,inside:null},r={bash:n,environment:{pattern:RegExp(`\\$`+t),alias:`constant`},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp(`(\\{)`+t),lookbehind:!0,alias:`constant`}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};globalThis.Prism.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:`important`},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:`function`},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:`function`}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:`variable`,lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp(`(^|[\\s;|&]|[<>]\\()`+t),lookbehind:!0,alias:`constant`}},alias:`variable`,lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:`variable`,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp(`\\$?`+t),alias:`constant`},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:`class-name`},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:`important`},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:`important`}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=globalThis.Prism.languages.bash;for(var i=[`comment`,`function-name`,`for-or-select`,`assign-left`,`parameter`,`string`,`environment`,`function`,`keyword`,`builtin`,`boolean`,`file-descriptor`,`operator`,`punctuation`,`number`],a=r.variable[1].inside,o=0;o<i.length;o++)a[i[o]]=globalThis.Prism.languages.bash[i[o]];globalThis.Prism.languages.sh=globalThis.Prism.languages.bash,globalThis.Prism.languages.shell=globalThis.Prism.languages.bash})(globalThis.Prism)})),Pd=M((()=>{(function(e){var t=`\\\\[\\r\\n](?:\\s|\\\\[\\r\\n]|#.*(?!.))*(?![\\s#]|\\\\[\\r\\n])`,n=`(?:[ \\t]+(?![ \\t])(?:<SP_BS>)?|<SP_BS>)`.replace(/<SP_BS>/g,function(){return t}),r=`"(?:[^"\\\\\\r\\n]|\\\\(?:\\r\\n|[\\s\\S]))*"|'(?:[^'\\\\\\r\\n]|\\\\(?:\\r\\n|[\\s\\S]))*'`,i=`--[\\w-]+=(?:<STR>|(?!["'])(?:[^\\s\\\\]|\\\\.)+)`.replace(/<STR>/g,function(){return r}),a={pattern:RegExp(r),greedy:!0},o={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function s(e,t){return e=e.replace(/<OPT>/g,function(){return i}).replace(/<SP>/g,function(){return n}),RegExp(e,t)}globalThis.Prism.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:s(`(^(?:ONBUILD<SP>)?\\w+<SP>)<OPT>(?:<SP><OPT>)*`,`i`),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[a,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:s(`(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\\b`,`i`),lookbehind:!0,greedy:!0},{pattern:s(`(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \\t\\\\]+<SP>)AS`,`i`),lookbehind:!0,greedy:!0},{pattern:s(`(^ONBUILD<SP>)\\w+`,`i`),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:o,string:a,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:o},globalThis.Prism.languages.dockerfile=globalThis.Prism.languages.docker})(globalThis.Prism)})),Fd=M((()=>{globalThis.Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:`keyword`}},globalThis.Prism.languages.webmanifest=globalThis.Prism.languages.json})),Id=M((()=>{(function(e){var t=e.util.clone(globalThis.Prism.languages.javascript),n=`(?:\\s|\\/\\/.*(?!.)|\\/\\*(?:[^*]|\\*(?!\\/))\\*\\/)`,r=`(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})`,i=`(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})`;function a(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(e,t)}i=a(i).source,globalThis.Prism.languages.jsx=globalThis.Prism.languages.extend(`markup`,t),globalThis.Prism.languages.jsx.tag.pattern=a(`<\\/?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:"(?:\\\\[\\s\\S]|[^\\\\"])*"|'(?:\\\\[\\s\\S]|[^\\\\'])*'|[^\\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\\/?)?>`),globalThis.Prism.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,globalThis.Prism.languages.jsx.tag.inside[`attr-value`].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,globalThis.Prism.languages.jsx.tag.inside.tag.inside[`class-name`]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,globalThis.Prism.languages.jsx.tag.inside.comment=t.comment,globalThis.Prism.languages.insertBefore(`inside`,`attr-name`,{spread:{pattern:a(`<SPREAD>`),inside:globalThis.Prism.languages.jsx}},globalThis.Prism.languages.jsx.tag),globalThis.Prism.languages.insertBefore(`inside`,`special-attr`,{script:{pattern:a(`=<BRACES>`),alias:`language-javascript`,inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:`punctuation`},rest:globalThis.Prism.languages.jsx}}},globalThis.Prism.languages.jsx.tag);var o=function(e){return e?typeof e==`string`?e:typeof e.content==`string`?e.content:e.content.map(o).join(``):``},s=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=!1;if(typeof r!=`string`&&(r.type===`tag`&&r.content[0]&&r.content[0].type===`tag`?r.content[0].content[0].content===`</`?t.length>0&&t[t.length-1].tagName===o(r.content[0].content[1])&&t.pop():r.content[r.content.length-1].content===`/>`||t.push({tagName:o(r.content[0].content[1]),openedBraces:0}):t.length>0&&r.type===`punctuation`&&r.content===`{`?t[t.length-1].openedBraces++:t.length>0&&t[t.length-1].openedBraces>0&&r.type===`punctuation`&&r.content===`}`?t[t.length-1].openedBraces--:i=!0),(i||typeof r==`string`)&&t.length>0&&t[t.length-1].openedBraces===0){var a=o(r);n<e.length-1&&(typeof e[n+1]==`string`||e[n+1].type===`plain-text`)&&(a+=o(e[n+1]),e.splice(n+1,1)),n>0&&(typeof e[n-1]==`string`||e[n-1].type===`plain-text`)&&(a=o(e[n-1])+a,e.splice(n-1,1),n--),e[n]=new globalThis.Prism.Token(`plain-text`,a,null,a)}r.content&&typeof r.content!=`string`&&s(r.content)}};globalThis.Prism.hooks.add(`after-tokenize`,function(e){e.language!==`jsx`&&e.language!==`tsx`||s(e.tokens)})})(globalThis.Prism)})),Ld=M((()=>{(function(e){var t=e.util.clone(globalThis.Prism.languages.typescript);globalThis.Prism.languages.tsx=globalThis.Prism.languages.extend(`jsx`,t),delete globalThis.Prism.languages.tsx.parameter,delete globalThis.Prism.languages.tsx[`literal-property`];var n=globalThis.Prism.languages.tsx.tag;n.pattern=RegExp(`(^|[^\\w$]|(?=<\\/))(?:`+n.pattern.source+`)`,n.pattern.flags),n.lookbehind=!0})(globalThis.Prism)})),Rd=M((()=>{(function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r=`(?:`+n.source+`(?:[ ]+`+t.source+`)?|`+t.source+`(?:[ ]+`+n.source+`)?)`,i=`(?:[^\\s\\x00-\\x08\\x0e-\\x1f!"#%&'*,\\-:>?@[\\]\`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*`.replace(/<PLAIN>/g,function(){return`[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]`}),a=`"(?:[^"\\\\\\r\\n]|\\\\.)*"|'(?:[^'\\\\\\r\\n]|\\\\.)*'`;function o(e,t){t=(t||``).replace(/m/g,``)+`m`;var n=`([:\\-,[{]\\s*(?:\\s<<prop>>[ \\t]+)?)(?:<<value>>)(?=[ \\t]*(?:$|,|\\]|\\}|(?:[\\r\\n]\\s*)?#))`.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return e});return RegExp(n,t)}globalThis.Prism.languages.yaml={scalar:{pattern:RegExp(`([\\-:]\\s*(?:\\s<<prop>>[ \\t]+)?[|>])[ \\t]*(?:((?:\\r?\\n|\\r)[ \\t]+)\\S[^\\r\\n]*(?:\\2[^\\r\\n]+)*)`.replace(/<<prop>>/g,function(){return r})),lookbehind:!0,alias:`string`},comment:/#.*/,key:{pattern:RegExp(`((?:^|[:\\-,[{\\r\\n?])[ \\t]*(?:<<prop>>[ \\t]+)?)<<key>>(?=\\s*:\\s)`.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return`(?:`+i+`|`+a+`)`})),lookbehind:!0,greedy:!0,alias:`atrule`},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:`important`},datetime:{pattern:o(`\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \\t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \\t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?`),lookbehind:!0,alias:`number`},boolean:{pattern:o(`false|true`,`i`),lookbehind:!0,alias:`important`},null:{pattern:o(`null|~`,`i`),lookbehind:!0,alias:`important`},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(`[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)`,`i`),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},globalThis.Prism.languages.yml=globalThis.Prism.languages.yaml})(globalThis.Prism)})),zd=N(Wu(),1),Bd={bun:`bash`,dockerfile:`docker`,npm:`bash`,pnpm:`bash`,shell:`bash`,terminal:`bash`,yarn:`bash`};function Vd(){let e=globalThis;e.Prism=zd.default,Object.entries(Bd).forEach(([e,t])=>{let n=zd.default.languages[t];n&&!zd.default.languages[e]&&(zd.default.languages[e]=n)})}async function Hd(){Vd();let{registerCodeHighlighting:e}=await Promise.resolve().then(()=>(Md(),od));return await Promise.resolve().then(()=>N(Nd(),1)),await Promise.resolve().then(()=>N(Pd(),1)),await Promise.resolve().then(()=>N(Fd(),1)),await Promise.resolve().then(()=>N(Id(),1)),await Promise.resolve().then(()=>N(Ld(),1)),await Promise.resolve().then(()=>N(Rd(),1)),Vd(),e}function Ud(){let[e]=(0,h.useLexicalComposerContext)();return P.default.useEffect(()=>{let t=!1,n;return Hd().then(r=>{t||(n=r(e))}).catch(e=>{console.error(`Failed to load code highlighting.`,e)}),()=>{t=!0,n?.()}},[e]),null}var Wd=750;function Gd(e){return`${e.type||`application/octet-stream`}:${e.size}`}function Kd(e){return e.map(Gd).sort().join(`|`)}function qd(e,t){let n=new Map;return Array.from(e||[]).forEach(e=>{e.type.startsWith(`image/`)&&n.set(Gd(e),e)}),Array.from(t||[]).forEach(e=>{if(e.kind!==`file`||!e.type.startsWith(`image/`))return;let t=e.getAsFile();t&&n.set(Gd(t),t)}),Array.from(n.values())}async function Jd(e,t,n){if(e.size>5242880)return window.alert(t),null;let r=await n(e);return{altText:e.name,src:r}}function Yd(){let[e]=(0,h.useLexicalComposerContext)(),n=U(),r=Oa(),i=(0,P.useRef)({signature:``,timestamp:0});return(0,P.useEffect)(()=>{let a=async t=>{for(let i of t){let t=null;try{t=await Jd(i,n.alerts.imageSizeLimit,r)}catch(e){console.error(e),window.alert(n.alerts.imageUploadFailed)}t&&e.dispatchCommand(Ue,t)}},o=e.registerCommand(Ue,e=>{let n=eo(e);return(0,m.$insertNodeToNearestRoot)(n),n.insertAfter((0,t.$createParagraphNode)()),!0},t.COMMAND_PRIORITY_EDITOR),s=e.registerCommand(t.PASTE_COMMAND,e=>{if(!(e instanceof ClipboardEvent))return!1;let t=qd(e.clipboardData?.files,e.clipboardData?.items);if(t.length===0)return!1;e.preventDefault();let n=Kd(t),r=Date.now();return i.current.signature===n&&r-i.current.timestamp<Wd?!0:(i.current={signature:n,timestamp:r},a(t),!0)},t.COMMAND_PRIORITY_HIGH),c=e.registerCommand(t.DRAGOVER_COMMAND,e=>qd(e.dataTransfer?.files,e.dataTransfer?.items).length===0?!1:(e.preventDefault(),!0),t.COMMAND_PRIORITY_LOW),l=e.registerCommand(t.DROP_COMMAND,e=>{let t=qd(e.dataTransfer?.files,e.dataTransfer?.items);return t.length===0?!1:(e.preventDefault(),a(t),!0)},t.COMMAND_PRIORITY_LOW);return()=>{o(),s(),c(),l()}},[e,n.alerts.imageSizeLimit,n.alerts.imageUploadFailed,r]),null}var Xd=`pre.rj-editor-code-block`,Zd=`.rj-editor-text-code`,Qd=`--rj-editor-inline-code-current-bg`,$d=`--rj-editor-inline-code-current-text`;function ef(e){return e.classList.contains(`rj-editor-text-code`)||!!e.querySelector(Zd)}function tf(e,t){return Array.from(e.querySelectorAll(`*`)).find(e=>e.style[t])?.style[t]}function nf(e,t,n){if(n){e.style.setProperty(t,n);return}e.style.removeProperty(t)}function rf(e){e?.querySelectorAll(`code`).forEach(e=>{e.closest(Xd)||ef(e)&&(nf(e,Qd,tf(e,`backgroundColor`)),nf(e,$d,tf(e,`color`)))})}function af(){let[e]=(0,h.useLexicalComposerContext)(),t=P.default.useRef(null),n=P.default.useCallback(()=>{t.current!==null&&window.cancelAnimationFrame(t.current),t.current=window.requestAnimationFrame(()=>{t.current=null,rf(e.getRootElement())})},[e]);return P.default.useEffect(()=>(n(),()=>{t.current!==null&&window.cancelAnimationFrame(t.current)}),[n]),P.default.useEffect(()=>e.registerUpdateListener(n),[e,n]),null}function of(e){return e.metaKey||e.ctrlKey}function sf(e){return e instanceof HTMLElement?[`INPUT`,`SELECT`,`TEXTAREA`].includes(e.tagName):!1}function cf(){let[e]=(0,h.useLexicalComposerContext)(),n=In();return(0,P.useEffect)(()=>{let r=()=>{Ho(e),n(Nn({isBold:!1,isCode:!1,isItalic:!1,isStrikethrough:!1,isSubscript:!1,isSuperscript:!1,isUnderline:!1})),n(jn({backgroundColor:L.backgroundColor,fontFamily:L.fontFamily,fontSize:L.fontSize,lineHeight:L.lineHeight,textColor:L.textColor})),n(En({alignment:L.alignment,listType:L.listType}))};return e.registerCommand(t.KEY_DOWN_COMMAND,n=>{if(!of(n)||n.altKey||sf(n.target))return!1;let i=n.key.toLowerCase(),a=n.shiftKey;return i===`b`&&!a?(n.preventDefault(),e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`bold`),!0):i===`i`&&!a?(n.preventDefault(),e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`italic`),!0):i===`u`&&!a?(n.preventDefault(),e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`underline`),!0):i===`x`&&a?(n.preventDefault(),e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`strikethrough`),!0):n.key===`=`&&!a?(n.preventDefault(),e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`subscript`),!0):(n.key===`=`||n.key===`+`)&&a?(n.preventDefault(),e.dispatchCommand(t.FORMAT_TEXT_COMMAND,`superscript`),!0):i===`z`&&!a?(n.preventDefault(),e.dispatchCommand(t.UNDO_COMMAND,void 0),!0):i===`z`&&a||i===`y`?(n.preventDefault(),e.dispatchCommand(t.REDO_COMMAND,void 0),!0):i===`k`&&!a?(n.preventDefault(),window.dispatchEvent(new CustomEvent(Ke)),!0):n.key===`7`&&a?(n.preventDefault(),e.dispatchCommand(f.INSERT_ORDERED_LIST_COMMAND,void 0),!0):n.key===`8`&&a?(n.preventDefault(),e.dispatchCommand(f.INSERT_UNORDERED_LIST_COMMAND,void 0),!0):n.key===`[`&&!a?(n.preventDefault(),e.dispatchCommand(t.OUTDENT_CONTENT_COMMAND,void 0),!0):n.key===`]`&&!a?(n.preventDefault(),e.dispatchCommand(t.INDENT_CONTENT_COMMAND,void 0),!0):n.key===`\\`&&!a?(n.preventDefault(),r(),!0):a?i===`l`?(n.preventDefault(),e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`left`),!0):i===`c`?(n.preventDefault(),e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`center`),!0):i===`r`?(n.preventDefault(),e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`right`),!0):i===`j`?(n.preventDefault(),e.dispatchCommand(t.FORMAT_ELEMENT_COMMAND,`justify`),!0):!1:!1},t.COMMAND_PRIORITY_CRITICAL)},[n,e]),null}function lf(e){return(0,p.$isTableNode)(e)||to(e)||so(e)}function uf(){let[e]=(0,h.useLexicalComposerContext)();return(0,P.useEffect)(()=>e.registerUpdateListener(({editorState:n})=>{let r=!1,i=null;n.read(()=>{let e=(0,t.$getRoot)().getChildren();r=lf(e.at(-1));for(let t=0;t<e.length-1;t+=1)if(lf(e[t])&&lf(e[t+1])){i=e[t].getKey();break}}),!(!r&&!i)&&e.update(()=>{if(i){let e=(0,t.$getRoot)().getChildren().find(e=>e.getKey()===i);if(lf(e)){e.insertAfter((0,t.$createParagraphNode)());return}}let e=(0,t.$getRoot)().getLastChild();lf(e)&&e.insertAfter((0,t.$createParagraphNode)())})}),[e]),null}function df(){let[e]=(0,h.useLexicalComposerContext)();return(0,P.useEffect)(()=>{let n=e.registerCommand(We,e=>{let n=oo(e),r=(0,t.$createParagraphNode)();return(0,m.$insertNodeToNearestRoot)(n),n.insertAfter(r),r.select(),!0},t.COMMAND_PRIORITY_EDITOR),r=e.registerUpdateListener(({editorState:n})=>{let r=!1;n.read(()=>{r=so((0,t.$getRoot)().getLastChild())}),r&&e.update(()=>{let e=(0,t.$getRoot)().getLastChild();so(e)&&e.insertAfter((0,t.$createParagraphNode)())})});return()=>{n(),r()}},[e]),null}var ff=[`words`,`characters`,`selection`,`language`,`mode`,`zoom`],pf={characters:0,isSelectionCollapsed:!0,selectedCharacters:0,selectedWords:0,words:0};function mf(e,t){return e.characters===t.characters&&e.isSelectionCollapsed===t.isSelectionCollapsed&&e.selectedCharacters===t.selectedCharacters&&e.selectedWords===t.selectedWords&&e.words===t.words}function hf(e,t,n){return e===`words`?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{className:`rj-editor-footer-item-value`,children:t.words}),(0,u.jsx)(`span`,{children:n.footer.words})]}):e===`characters`?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{className:`rj-editor-footer-item-value`,children:t.characters}),(0,u.jsx)(`span`,{children:n.footer.characters})]}):e===`selection`?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{children:n.footer.selected}),(0,u.jsxs)(`span`,{className:`rj-editor-footer-item-value`,children:[t.selectedWords,`/`,t.selectedCharacters]})]}):e===`language`?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{children:n.footer.language}),(0,u.jsx)(`span`,{className:`rj-editor-footer-item-value`,children:t.language})]}):e===`mode`?(0,u.jsx)(`span`,{className:`rj-editor-footer-item-value`,children:t.isFullscreen?n.footer.fullscreen:t.isFocused?n.footer.focus:n.footer.editing}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`span`,{children:n.footer.zoom}),(0,u.jsxs)(`span`,{className:`rj-editor-footer-item-value`,children:[t.zoom,`%`]})]})}var gf=P.default.memo(function({customFooter:e,isFocused:n,isFullscreen:r,items:i,language:a,zoom:o}){let[s]=(0,h.useLexicalComposerContext)(),c=U(),[l,d]=P.default.useState(pf),f=P.default.useCallback(()=>{s.getEditorState().read(()=>{let e=(0,t.$getRoot)().getTextContent(),n=(0,t.$getSelection)(),r=(0,t.$isRangeSelection)(n)?n.getTextContent():``,i={characters:_e(e),isSelectionCollapsed:!(0,t.$isRangeSelection)(n)||n.isCollapsed(),selectedCharacters:_e(r),selectedWords:ve(r),words:ve(e)};d(e=>mf(e,i)?e:i)})},[s]);P.default.useEffect(()=>(f(),s.registerUpdateListener(()=>{f()})),[s,f]),P.default.useEffect(()=>s.registerCommand(t.SELECTION_CHANGE_COMMAND,()=>(f(),!1),t.COMMAND_PRIORITY_LOW),[s,f]);let p=P.default.useMemo(()=>({...l,isFocused:n,isFullscreen:r,language:a,zoom:o}),[n,r,a,l,o]);if(e)return(0,u.jsx)(`footer`,{"aria-label":c.footer.statusBar,className:`rj-editor-footer`,children:e(p)});let m=i?.length?i:ff;return(0,u.jsx)(`footer`,{"aria-label":c.footer.statusBar,className:`rj-editor-footer`,children:(0,u.jsx)(`div`,{className:`rj-editor-footer-items`,children:m.map((e,t)=>(0,u.jsxs)(P.default.Fragment,{children:[t>0&&e===`mode`?(0,u.jsx)(`span`,{className:`rj-editor-footer-spacer`}):null,(0,u.jsx)(`span`,{className:`rj-editor-footer-item`,"data-rj-editor-footer-item":e,children:hf(e,p,c)})]},`${e}-${t}`))})})});function _f(e,t,n){n&&e.read(()=>{n(rn((0,i.$generateHtmlFromNodes)(t),t),JSON.stringify(e.toJSON()),e)})}function vf({lastHtmlRef:e,value:t}){let[n]=(0,h.useLexicalComposerContext)();return P.default.useEffect(()=>{t===void 0||t===e.current||n.update(()=>{wn(n,t),e.current=t})},[n,e,t]),null}function yf({autofocus:e,className:t,editorRef:n,footer:r,footerItems:a,footerLanguageLabel:o,footerZoom:s,id:c,isFullscreen:l,onBlur:d,onChange:f,onFocus:p,onToggleFullscreen:m,placeholder:h,showFooter:g,theme:E,value:D}){let O=U(),k=P.default.useRef(D),[A,ee]=P.default.useState(!1);return(0,u.jsxs)(`div`,{className:[`rj-editor`,l?`rj-editor--fullscreen`:``,t].filter(Boolean).join(` `),"data-rj-editor-theme":E,id:c,onBlur:e=>{let t=e.relatedTarget;e.currentTarget.contains(t)||ee(!1),d?.(e)},onFocus:e=>{ee(!0),p?.(e)},ref:n,children:[(0,u.jsx)(lu,{isFullscreen:l,onToggleFullscreen:m}),(0,u.jsxs)(`div`,{className:`rj-editor-body`,children:[(0,u.jsx)(w.RichTextPlugin,{contentEditable:(0,u.jsx)(v.ContentEditable,{className:`rj-editor-input`}),ErrorBoundary:y.LexicalErrorBoundary,placeholder:(0,u.jsx)(`div`,{className:`rj-editor-placeholder`,children:h===void 0?O.placeholders.editor:h})}),(0,u.jsx)(b.HistoryPlugin,{}),(0,u.jsx)(wu,{}),(0,u.jsx)(Ud,{}),(0,u.jsx)(Uu,{}),(0,u.jsx)(uu,{}),(0,u.jsx)(Yd,{}),(0,u.jsx)(af,{}),(0,u.jsx)(cf,{}),(0,u.jsx)(df,{}),(0,u.jsx)(x.LinkPlugin,{}),(0,u.jsx)(S.ListPlugin,{}),(0,u.jsx)(T.TablePlugin,{}),(0,u.jsx)(uf,{}),(0,u.jsx)(Eo,{}),(0,u.jsx)(vf,{lastHtmlRef:k,value:D}),(0,u.jsx)(C.OnChangePlugin,{onChange:(e,t)=>{e.read(()=>{k.current=rn((0,i.$generateHtmlFromNodes)(t),t)}),_f(e,t,f)}}),e?(0,u.jsx)(_.AutoFocusPlugin,{}):null]}),g?(0,u.jsx)(gf,{customFooter:r,isFocused:A,isFullscreen:l,items:a,language:o,zoom:s}):null]})}function bf({autofocus:e=!1,className:t,defaultValue:n,footer:r,footerItems:i,footerLanguageLabel:s,footerZoom:l=100,id:d,locale:f=`en`,locales:p,namespace:m=`RJEditor`,onBlur:h,onChange:g,onFocus:_,onUpload:v,placeholder:y,showFooter:b=!1,translations:x,theme:S=`auto`,value:C}){let w=P.default.useMemo(()=>Fn(),[]),T=P.default.useRef(null),[E,D]=P.default.useState(!1),O=er(S),k=P.default.useMemo(()=>qn(O),[O]),A=lo({defaultValue:n,namespace:m,value:C});P.default.useEffect(()=>{let e=()=>{D(document.fullscreenElement===T.current)};return document.addEventListener(`fullscreenchange`,e),()=>{document.removeEventListener(`fullscreenchange`,e)}},[]);let ee=async()=>{if(document.fullscreenElement===T.current){await document.exitFullscreen();return}await T.current?.requestFullscreen()},te=P.default.useCallback(e=>document.fullscreenElement||T.current||e?.parentElement||document.body,[]);return(0,u.jsx)(c.Provider,{store:w,children:(0,u.jsx)(Wn,{locale:f,locales:p,translations:x,children:(0,u.jsx)(Jn.Provider,{value:O,children:(0,u.jsx)(o.ConfigProvider,{getPopupContainer:te,theme:k,children:(0,u.jsx)(a.LexicalComposer,{initialConfig:A,children:(0,u.jsx)(fo,{onImageUpload:v,children:(0,u.jsx)(yf,{autofocus:e,className:t,editorRef:T,footer:r,footerItems:i,footerLanguageLabel:s||xf(f),footerZoom:l,id:d,isFullscreen:E,onBlur:h,onChange:g,onFocus:_,onToggleFullscreen:ee,placeholder:y,showFooter:b,theme:O,value:C})})})})})})})}function xf(e){return e===`uz`?`O‘zbek`:e===`ru`?`Русский`:e===`en`?`English`:e}pn(),e.RJEditorI18nProvider=Wn,e.RJTextEditor=bf,e.enTranslations=Ln,e.mergeTranslations=zn,e.registerCodeBlockCopyHandler=pn,e.ruTranslations=Bn,e.useRJEditorI18n=U,e.uzTranslations=Vn});