adminizer 4.7.0-build.224 → 5.0.0-build.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +2 -1
- package/assets/add-De0wyF0A.js +1 -0
- package/assets/add-group-CMWybgIR.js +1 -0
- package/assets/add-user-BxP23daH.js +1 -0
- package/assets/app-CtWuWD5N.css +1 -0
- package/assets/app-layout-GYMU2HO1.js +1 -0
- package/assets/app.js +45 -50
- package/assets/catalog-tImW1BnS.js +6 -0
- package/assets/controls/chunks/_commonjsHelpers-C6fGbg64.js +6 -0
- package/assets/controls/chunks/index-CjiZ2FIa.js +93 -0
- package/assets/controls/chunks/jsx-runtime-jIxVPx5o.js +31 -0
- package/assets/controls/chunks/use-appearance-CFLOwiSX.js +38 -0
- package/assets/controls/chunks/use-window-size-BXgBKW65.js +19 -0
- package/assets/controls/chunks/vanilla-picker-Dg97NL4h.js +529 -0
- package/assets/controls/ckeditor.es.js +83683 -0
- package/assets/controls/handsontable.css +1 -0
- package/assets/controls/handsontable.es.js +70585 -0
- package/assets/controls/jsoneditor.css +1 -0
- package/assets/controls/jsoneditor.es.js +42082 -0
- package/assets/controls/leaflet.css +1 -0
- package/assets/controls/leaflet.es.js +10299 -0
- package/assets/controls/monaco.es.js +618 -0
- package/assets/controls/toast-ui.css +1 -0
- package/assets/controls/toast-ui.es.js +41797 -0
- package/assets/dashboard-CQ4atH3N.js +3 -0
- package/assets/debounce-BMmXVQ06.js +1 -0
- package/assets/history-BileQPEi.js +1 -0
- package/assets/init-user-8aUohVDq.js +1 -0
- package/assets/list-Pz_5mfSq.js +4 -0
- package/assets/login-CO4laf6m.js +1 -0
- package/assets/manifest.json +66 -602
- package/assets/media-manager-BDbpSSjH.js +6 -0
- package/assets/media-manager-BZPjl98I.css +1 -0
- package/assets/module-CQiOdgZN.js +1 -0
- package/assets/notification-BIyv1smE.js +20 -0
- package/assets/register-DBYIMXGQ.js +1 -0
- package/assets/ru-rYKdQbWF.js +1 -0
- package/assets/use-appearance-_EbbjHTh.js +1 -0
- package/assets/user-filters-list-Aq8CvCeh.js +1 -0
- package/assets/welcome-DxhWYzUL.js +1 -0
- package/controllers/add.d.ts +1 -1
- package/controllers/addGroup.js +3 -3
- package/controllers/addUser.js +3 -3
- package/controllers/catalog/Catalog.d.ts +1 -1
- package/controllers/catalog/Catalog.js +2 -1
- package/controllers/catalog/FrontendCatalogAdapter.d.ts +2 -12
- package/controllers/catalog/FrontendCatalogAdapter.js +3 -16
- package/controllers/catalog/FrontentCatalogAdapter.d.ts +2 -12
- package/controllers/catalog/FrontentCatalogAdapter.js +0 -16
- package/controllers/edit.js +6 -11
- package/controllers/editGroup.d.ts +1 -1
- package/controllers/editGroup.js +3 -3
- package/controllers/editUser.d.ts +1 -1
- package/controllers/editUser.js +3 -3
- package/controllers/feed.js +1 -1
- package/controllers/filter-fields/columns.js +1 -1
- package/controllers/filter-fields/getAllUserFilters.js +2 -2
- package/controllers/filter-fields/groups.js +2 -2
- package/controllers/filter-fields/savedFilters.js +1 -1
- package/controllers/history-actions/HistoryController.js +1 -1
- package/controllers/initUser.js +2 -2
- package/controllers/list.d.ts +1 -1
- package/controllers/login.d.ts +1 -1
- package/controllers/login.js +3 -3
- package/controllers/media-manager/ThumbController.js +2 -2
- package/controllers/media-manager/mediaManagerApi.js +13 -15
- package/controllers/register.d.ts +1 -1
- package/controllers/register.js +5 -5
- package/controllers/remove.d.ts +1 -1
- package/controllers/userApiKey.js +2 -2
- package/controllers/view.d.ts +1 -1
- package/controllers/view.js +5 -5
- package/controllers/widgets/Action.js +5 -2
- package/controllers/widgets/filterInfo.js +1 -1
- package/files/favicon.png +0 -0
- package/helpers/accessRightsHelper.d.ts +6 -4
- package/helpers/accessRightsHelper.js +13 -0
- package/helpers/diffHelpers.js +1 -1
- package/helpers/fieldsHelper.d.ts +1 -1
- package/helpers/fieldsHelper.js +8 -4
- package/helpers/filterDatetimeHelper.d.ts +1 -1
- package/helpers/inertiaAddHelper.d.ts +6 -5
- package/helpers/inertiaAddHelper.js +45 -37
- package/helpers/inertiaAutHelper.js +5 -5
- package/helpers/inertiaGroupHelper.d.ts +4 -4
- package/helpers/inertiaMenuHelper.js +1 -1
- package/helpers/inertiaUserHelper.d.ts +3 -3
- package/helpers/inertiaUserHelper.js +1 -1
- package/helpers/menuHelper.d.ts +2 -2
- package/index.d.ts +19 -6
- package/index.js +19 -6
- package/interfaces/adminpanelConfig.d.ts +10 -33
- package/interfaces/global.d.ts +10 -15
- package/interfaces/listQueryBuilder.d.ts +1 -1
- package/lib/Adminizer.d.ts +25 -2
- package/lib/Adminizer.js +124 -50
- package/lib/DataAccessor.d.ts +9 -5
- package/lib/DataAccessor.js +89 -42
- package/lib/access-rights/AccessRightsHandler.d.ts +17 -0
- package/lib/access-rights/AccessRightsHandler.js +63 -0
- package/lib/ai-assistant/AbstractAiModelService.d.ts +5 -8
- package/lib/ai-assistant/AbstractAiModelService.js +3 -14
- package/lib/ai-assistant/AiAssistantHandler.d.ts +2 -2
- package/lib/app-manager/AdminizerApp.d.ts +228 -0
- package/lib/app-manager/AdminizerApp.js +17 -0
- package/lib/app-manager/AppManager.d.ts +18 -0
- package/lib/app-manager/AppManager.js +537 -0
- package/lib/app-manager/AssetHandler.d.ts +17 -0
- package/lib/app-manager/AssetHandler.js +67 -0
- package/lib/app-manager/ConfigLayerHandler.d.ts +18 -0
- package/lib/app-manager/ConfigLayerHandler.js +119 -0
- package/lib/app-manager/ControllerHandler.d.ts +25 -0
- package/lib/app-manager/ControllerHandler.js +140 -0
- package/lib/catalog/AbstractCatalog.d.ts +28 -19
- package/lib/catalog/AbstractCatalog.js +41 -10
- package/lib/catalog/CatalogHandler.d.ts +13 -0
- package/lib/catalog/CatalogHandler.js +48 -2
- package/lib/catalog/CatalogTemplateComponentHandler.d.ts +23 -0
- package/lib/catalog/CatalogTemplateComponentHandler.js +59 -0
- package/lib/controls/Control.d.ts +17 -0
- package/lib/controls/Control.js +1 -0
- package/lib/controls/ControlsHandler.d.ts +5 -6
- package/lib/controls/ControlsHandler.js +0 -13
- package/lib/controls/codeEditor/MonacoEditor.d.ts +3 -4
- package/lib/controls/codeEditor/MonacoEditor.js +13 -8
- package/lib/controls/geojsoneditor/GeoEditor.d.ts +3 -4
- package/lib/controls/geojsoneditor/GeoEditor.js +14 -9
- package/lib/controls/jsoneditor/JsonEditor.d.ts +5 -6
- package/lib/controls/jsoneditor/JsonEditor.js +14 -13
- package/lib/controls/markdown/ToastUiEditor.d.ts +5 -6
- package/lib/controls/markdown/ToastUiEditor.js +14 -13
- package/lib/controls/table/Handsontable.d.ts +5 -6
- package/lib/controls/table/Handsontable.js +14 -13
- package/lib/controls/wysiwyg/CKeditor.d.ts +5 -6
- package/lib/controls/wysiwyg/CKeditor.js +14 -13
- package/lib/filters/ConditionValidator.d.ts +1 -1
- package/lib/filters/FilterService.d.ts +18 -18
- package/lib/filters/FilterService.js +11 -11
- package/lib/history-actions/AbstractHistoryAdapter.d.ts +14 -14
- package/lib/history-actions/AbstractHistoryAdapter.js +5 -6
- package/lib/history-actions/DefaultHistoryAdapter.d.ts +7 -7
- package/lib/history-actions/DefaultHistoryAdapter.js +2 -2
- package/lib/list-query-builder/ListQueryBuilder.d.ts +1 -1
- package/lib/media-manager/AbstractMediaManager.d.ts +14 -3
- package/lib/media-manager/AbstractMediaManager.js +16 -5
- package/lib/media-manager/MediaManagerHandler.d.ts +3 -0
- package/lib/media-manager/MediaManagerHandler.js +30 -5
- package/lib/media-manager/Thumb.js +7 -13
- package/lib/media-manager/helpers/MediaManagerHelper.d.ts +6 -4
- package/lib/media-manager/helpers/MediaManagerHelper.js +18 -18
- package/lib/model/AbstractModel.d.ts +9 -5
- package/lib/model/AbstractModel.js +9 -13
- package/lib/model/InternalModelAccessFactory.js +9 -10
- package/lib/model/ModelHandler.d.ts +45 -7
- package/lib/model/ModelHandler.js +168 -11
- package/lib/model/adapter/sequelize.d.ts +2 -4
- package/lib/model/adapter/sequelize.js +16 -193
- package/lib/model/adapter/typeorm.d.ts +2 -4
- package/lib/model/adapter/typeorm.js +2 -35
- package/lib/notifications/AbstractNotificationService.d.ts +9 -9
- package/lib/notifications/AbstractNotificationService.js +8 -8
- package/lib/notifications/GeneralNotificationService.js +1 -1
- package/lib/notifications/SystemNotificationService.js +1 -1
- package/lib/ui-i18n/uiTranslationKeys.d.ts +1 -1
- package/lib/ui-i18n/uiTranslationKeys.js +1 -0
- package/lib/widgets/abstractCustom.d.ts +5 -2
- package/lib/widgets/abstractCustom.js +4 -0
- package/lib/widgets/widgetHandler.d.ts +5 -2
- package/lib/widgets/widgetHandler.js +60 -14
- package/models/{FilterAP.d.ts → Filter.d.ts} +4 -70
- package/models/Filter.js +1 -0
- package/models/FilterColumn.d.ts +10 -0
- package/models/FilterColumn.js +1 -0
- package/models/Group.d.ts +8 -0
- package/models/Group.js +1 -0
- package/models/HistoryActions.d.ts +14 -0
- package/models/HistoryActions.js +1 -0
- package/models/MediaManagerAP.d.ts +2 -54
- package/models/MediaManagerAP.js +1 -51
- package/models/MediaManagerAssociationsAP.d.ts +1 -35
- package/models/MediaManagerAssociationsAP.js +1 -33
- package/models/MediaManagerMetaAP.d.ts +2 -30
- package/models/MediaManagerMetaAP.js +1 -27
- package/models/Notification.d.ts +13 -0
- package/models/Notification.js +1 -0
- package/models/User.d.ts +23 -0
- package/models/User.js +1 -0
- package/models/UserNotification.d.ts +7 -0
- package/models/UserNotification.js +1 -0
- package/package.json +25 -30
- package/services/FeedService.d.ts +5 -5
- package/services/FeedService.js +1 -1
- package/system/Router.js +2 -10
- package/system/bindAccessRights.js +1 -1
- package/system/bindAuthorization.js +2 -2
- package/system/bindControls.js +7 -6
- package/system/bindDashboardWidgets.js +3 -2
- package/system/bindDev.js +1 -1
- package/system/bindHistory.d.ts +1 -1
- package/system/bindHistory.js +1 -1
- package/system/bindInertia.js +0 -6
- package/system/bindMediaManager.js +4 -17
- package/system/bindNotifications.d.ts +1 -1
- package/system/bindNotifications.js +1 -1
- package/system/bindReqFunctions.d.ts +1 -0
- package/system/bindReqFunctions.js +20 -3
- package/system/buildInternalModelAccess.js +2 -15
- package/system/defaults.js +5 -10
- package/system/systemModelContracts.d.ts +22 -0
- package/system/systemModelContracts.js +155 -0
- package/system/validateSystemModels.d.ts +2 -0
- package/system/validateSystemModels.js +101 -0
- package/translations/ar.json +2 -1
- package/translations/cn.json +2 -1
- package/translations/de.json +2 -1
- package/translations/en.json +1 -0
- package/translations/es.json +2 -1
- package/translations/fr.json +2 -1
- package/translations/hi.json +2 -1
- package/translations/jp.json +2 -1
- package/translations/ko.json +2 -1
- package/translations/pt.json +2 -1
- package/translations/ru.json +2 -1
- package/translations/ua.json +2 -1
- package/translations/uz.json +2 -1
- package/translations/vi.json +2 -1
- package/assets/RelationDialogStack-DhThUMep.js +0 -20
- package/assets/add-group-L8lMigab.js +0 -1
- package/assets/add-group-form-o7F6t6qW.js +0 -1
- package/assets/add-user-BE4-TNJw.js +0 -1
- package/assets/add-user-form-BP_8TjxN.js +0 -1
- package/assets/add-w398ZkhF.js +0 -1
- package/assets/app-C7J5ccrI.css +0 -1
- package/assets/app-layout-Bg455MIY.js +0 -1
- package/assets/app-shell-BT2kF0We.js +0 -1
- package/assets/app-sidebar-CZfPUXck.js +0 -1
- package/assets/app-sidebar-header-UVcKhNm6.js +0 -1
- package/assets/breadcrumbs-CrqIBT84.js +0 -1
- package/assets/catalog-btkCCwiv.js +0 -6
- package/assets/dashboard-Bvasc1cr.js +0 -3
- package/assets/date-picker-kxQWOxHk.js +0 -1
- package/assets/del-modal-C39LR5aQ.js +0 -1
- package/assets/dynamic-controls-DyPP5sTC.js +0 -1
- package/assets/geo-json-CGNQFl6J.js +0 -1
- package/assets/handsontable-Dv59QFH5.js +0 -336
- package/assets/history-DwKR8MPu.js +0 -1
- package/assets/home-BrtAkCRj.js +0 -2
- package/assets/icon-DpUVVHmK.js +0 -1
- package/assets/init-user-8PiKR1zX.js +0 -1
- package/assets/input-error-Cbt-Y3Fj.js +0 -1
- package/assets/jsoneditor-CiPXPMho.js +0 -3869
- package/assets/list-DGsL_qii.js +0 -4
- package/assets/login-Br_FcBU_.js +0 -1
- package/assets/material-icon-DOkM71fv.js +0 -1
- package/assets/module-EgfgIEhF.js +0 -1
- package/assets/monaco-ompgKQ3_.js +0 -11
- package/assets/nav-footer-DzLwfBAE.js +0 -1
- package/assets/nav-main-CSEbjYgs.js +0 -1
- package/assets/nav-user-DJ0hfhfH.js +0 -1
- package/assets/notification-B19ZLro7.js +0 -20
- package/assets/pagination-render-8GvJxq55.js +0 -1
- package/assets/register-CZzIeT2G.js +0 -1
- package/assets/ru-1NdRIQNV.js +0 -1
- package/assets/theme-switcher-CBbEj1u-.js +0 -1
- package/assets/toast-editor-DwVqd1rz.js +0 -668
- package/assets/user-filters-list-7Im79QyS.js +0 -1
- package/assets/user-info-YiU17Mmy.js +0 -1
- package/assets/user-menu-content-gdpNF5-8.js +0 -1
- package/assets/vanilla-picker-B3LgXoKV.js +0 -2
- package/assets/vendor-l0sNRNKZ.js +0 -1
- package/assets/welcome-nT0eFWHb.js +0 -1
- package/controllers/navigation/edit.d.ts +0 -1
- package/controllers/navigation/edit.js +0 -8
- package/lib/ai-assistant/DummyAiModelService.d.ts +0 -8
- package/lib/ai-assistant/DummyAiModelService.js +0 -14
- package/lib/ai-assistant/OpenAiModelService.d.ts +0 -24
- package/lib/ai-assistant/OpenAiModelService.js +0 -184
- package/lib/catalog/Navigation.d.ts +0 -49
- package/lib/catalog/Navigation.js +0 -492
- package/lib/controls/AbstractControls.d.ts +0 -30
- package/lib/controls/AbstractControls.js +0 -14
- package/lib/media-manager/DefaultMediaManager.d.ts +0 -20
- package/lib/media-manager/DefaultMediaManager.js +0 -127
- package/lib/media-manager/Items.d.ts +0 -50
- package/lib/media-manager/Items.js +0 -296
- package/models/FilterAP.js +0 -68
- package/models/FilterColumnAP.d.ts +0 -32
- package/models/FilterColumnAP.js +0 -21
- package/models/GroupAP.d.ts +0 -31
- package/models/GroupAP.js +0 -22
- package/models/HistoryActionsAP.d.ts +0 -56
- package/models/HistoryActionsAP.js +0 -42
- package/models/NavigationAP.d.ts +0 -22
- package/models/NavigationAP.js +0 -16
- package/models/NotificationAP.d.ts +0 -44
- package/models/NotificationAP.js +0 -30
- package/models/UserAP.d.ts +0 -81
- package/models/UserAP.js +0 -57
- package/models/UserNotificationAP.d.ts +0 -26
- package/models/UserNotificationAP.js +0 -18
- package/system/bindAiAssistant.d.ts +0 -2
- package/system/bindAiAssistant.js +0 -30
- package/system/bindModels.d.ts +0 -2
- package/system/bindModels.js +0 -48
- package/system/bindNavigation.d.ts +0 -2
- package/system/bindNavigation.js +0 -38
- /package/assets/{RelationDialogStack-B00Ot5qS.css → controls/ckeditor.css} +0 -0
|
@@ -1,668 +0,0 @@
|
|
|
1
|
-
import{b6 as XZ,b7 as ZZ,j as Tv}from"./app.js";import{R as Do,r as bo}from"./handsontable-Dv59QFH5.js";import{k as QZ,b as eQ,g as tQ}from"./jsoneditor-CiPXPMho.js";import"./monaco-ompgKQ3_.js";function Br(r){this.content=r}Br.prototype={constructor:Br,find:function(r){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===r)return e;return-1},get:function(r){var e=this.find(r);return e==-1?void 0:this.content[e+1]},update:function(r,e,t){var n=t&&t!=r?this.remove(t):this,i=n.find(r),a=n.content.slice();return i==-1?a.push(t||r,e):(a[i+1]=e,t&&(a[i]=t)),new Br(a)},remove:function(r){var e=this.find(r);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Br(t)},addToStart:function(r,e){return new Br([r,e].concat(this.remove(r).content))},addToEnd:function(r,e){var t=this.remove(r).content.slice();return t.push(r,e),new Br(t)},addBefore:function(r,e,t){var n=this.remove(e),i=n.content.slice(),a=n.find(r);return i.splice(a==-1?i.length:a,0,e,t),new Br(i)},forEach:function(r){for(var e=0;e<this.content.length;e+=2)r(this.content[e],this.content[e+1])},prepend:function(r){return r=Br.from(r),r.size?new Br(r.content.concat(this.subtract(r).content)):this},append:function(r){return r=Br.from(r),r.size?new Br(this.subtract(r).content.concat(r.content)):this},subtract:function(r){var e=this;r=Br.from(r);for(var t=0;t<r.content.length;t+=2)e=e.remove(r.content[t]);return e},toObject:function(){var r={};return this.forEach(function(e,t){r[e]=t}),r},get size(){return this.content.length>>1}};Br.from=function(r){if(r instanceof Br)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new Br(e)};function Jy(r,e,t){for(let n=0;;n++){if(n==r.childCount||n==e.childCount)return r.childCount==e.childCount?null:t;let i=r.child(n),a=e.child(n);if(i==a){t+=i.nodeSize;continue}if(!i.sameMarkup(a))return t;if(i.isText&&i.text!=a.text){let o=i.text,s=a.text,l=0;for(;o[l]==s[l];l++)t++;return l&&l<o.length&&l<s.length&&Zy(o.charCodeAt(l-1))&&Xy(o.charCodeAt(l))&&t--,t}if(i.content.size||a.content.size){let o=Jy(i.content,a.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function Yy(r,e,t,n){for(let i=r.childCount,a=e.childCount;;){if(i==0||a==0)return i==a?null:{a:t,b:n};let o=r.child(--i),s=e.child(--a),l=o.nodeSize;if(o==s){t-=l,n-=l;continue}if(!o.sameMarkup(s))return{a:t,b:n};if(o.isText&&o.text!=s.text){let f=o.text,p=s.text,b=f.length,T=p.length;for(;b>0&&T>0&&f[b-1]==p[T-1];)b--,T--,t--,n--;return b&&T&&b<f.length&&Zy(f.charCodeAt(b-1))&&Xy(f.charCodeAt(b))&&(t++,n++),{a:t,b:n}}if(o.content.size||s.content.size){let f=Yy(o.content,s.content,t-1,n-1);if(f)return f}t-=l,n-=l}}function Xy(r){return r>=56320&&r<57344}function Zy(r){return r>=55296&&r<56320}class De{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,i=0,a){for(let o=0,s=0;s<t;o++){let l=this.content[o],f=s+l.nodeSize;if(f>e&&n(l,i+s,a||null,o)!==!1&&l.content.size){let p=s+1;l.nodesBetween(Math.max(0,e-p),Math.min(l.content.size,t-p),n,i+p)}s=f}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,i){let a="",o=!0;return this.nodesBetween(e,t,(s,l)=>{let f=s.isText?s.text.slice(Math.max(e,l)-l,t-l):s.isLeaf?i?typeof i=="function"?i(s):i:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&f||s.isTextblock)&&n&&(o?o=!1:a+=n),a+=f},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,i=this.content.slice(),a=0;for(t.isText&&t.sameMarkup(n)&&(i[i.length-1]=t.withText(t.text+n.text),a=1);a<e.content.length;a++)i.push(e.content[a]);return new De(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let n=[],i=0;if(t>e)for(let a=0,o=0;o<t;a++){let s=this.content[a],l=o+s.nodeSize;l>e&&((o<e||l>t)&&(s.isText?s=s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s=s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),n.push(s),i+=s.nodeSize),o=l}return new De(n,i)}cutByIndex(e,t){return e==t?De.empty:e==0&&t==this.content.length?this:new De(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let i=this.content.slice(),a=this.size+t.nodeSize-n.nodeSize;return i[e]=t,new De(i,a)}addToStart(e){return new De([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new De(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let i=this.content[t];e(i,n,t),n+=i.nodeSize}}findDiffStart(e,t=0){return Jy(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Yy(this,e,t,n)}findIndex(e){if(e==0)return Pl(0,e);if(e==this.size)return Pl(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let i=this.child(t),a=n+i.nodeSize;if(a>=e)return a==e?Pl(t+1,a):Pl(t,n);n=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return De.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return De.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return De.empty;let t,n=0;for(let i=0;i<e.length;i++){let a=e[i];n+=a.nodeSize,i&&a.isText&&e[i-1].sameMarkup(a)?(t||(t=e.slice(0,i)),t[t.length-1]=a.withText(t[t.length-1].text+a.text)):t&&t.push(a)}return new De(t||e,n)}static from(e){if(!e)return De.empty;if(e instanceof De)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new De([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}De.empty=new De([],0);const Of={index:0,offset:0};function Pl(r,e){return Of.index=r,Of.offset=e,Of}function su(r,e){if(r===e)return!0;if(!(r&&typeof r=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(r);if(Array.isArray(e)!=t)return!1;if(t){if(r.length!=e.length)return!1;for(let n=0;n<r.length;n++)if(!su(r[n],e[n]))return!1}else{for(let n in r)if(!(n in e)||!su(r[n],e[n]))return!1;for(let n in e)if(!(n in r))return!1}return!0}let qt=class md{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let i=0;i<e.length;i++){let a=e[i];if(this.eq(a))return e;if(this.type.excludes(a.type))t||(t=e.slice(0,i));else{if(a.type.excludes(this.type))return e;!n&&a.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),n=!0),t&&t.push(a)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&su(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);let i=n.create(t.attrs);return n.checkAttrs(i.attrs),i}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return md.none;if(e instanceof md)return[e];let t=e.slice();return t.sort((n,i)=>n.type.rank-i.type.rank),t}};qt.none=[];class Ms extends Error{}class $e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=eb(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return n&&new $e(n,this.openStart,this.openEnd)}removeBetween(e,t){return new $e(Qy(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return $e.empty;let n=t.openStart||0,i=t.openEnd||0;if(typeof n!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new $e(De.fromJSON(e,t.content),n,i)}static maxOpen(e,t=!0){let n=0,i=0;for(let a=e.firstChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.firstChild)n++;for(let a=e.lastChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.lastChild)i++;return new $e(e,n,i)}}$e.empty=new $e(De.empty,0,0);function Qy(r,e,t){let{index:n,offset:i}=r.findIndex(e),a=r.maybeChild(n),{index:o,offset:s}=r.findIndex(t);if(i==e||a.isText){if(s!=t&&!r.child(o).isText)throw new RangeError("Removing non-flat range");return r.cut(0,e).append(r.cut(t))}if(n!=o)throw new RangeError("Removing non-flat range");return r.replaceChild(n,a.copy(Qy(a.content,e-i-1,t-i-1)))}function eb(r,e,t,n,i,a){let{index:o,offset:s}=r.findIndex(e),l=r.maybeChild(o);if(s==e||l.isText)return a&&n<=0&&i<=0&&!a.canReplace(o,o,t)?null:r.cut(0,e).append(t).append(r.cut(e));let f=eb(l.content,e-s-1,t,o==0?n-1:0,o==r.childCount-1?i-1:0,l);return f&&r.replaceChild(o,l.copy(f))}function rQ(r,e,t){if(t.openStart>r.depth)throw new Ms("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new Ms("Inconsistent open depths");return tb(r,e,t,0)}function tb(r,e,t,n){let i=r.index(n),a=r.node(n);if(i==e.index(n)&&n<r.depth-t.openStart){let o=tb(r,e,t,n+1);return a.copy(a.content.replaceChild(i,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&r.depth==n&&e.depth==n){let o=r.parent,s=o.content;return $a(o,s.cut(0,r.parentOffset).append(t.content).append(s.cut(e.parentOffset)))}else{let{start:o,end:s}=nQ(t,r);return $a(a,nb(r,o,s,e,n))}else return $a(a,lu(r,e,n))}function rb(r,e){if(!e.type.compatibleContent(r.type))throw new Ms("Cannot join "+e.type.name+" onto "+r.type.name)}function gd(r,e,t){let n=r.node(t);return rb(n,e.node(t)),n}function Ua(r,e){let t=e.length-1;t>=0&&r.isText&&r.sameMarkup(e[t])?e[t]=r.withText(e[t].text+r.text):e.push(r)}function ws(r,e,t,n){let i=(e||r).node(t),a=0,o=e?e.index(t):i.childCount;r&&(a=r.index(t),r.depth>t?a++:r.textOffset&&(Ua(r.nodeAfter,n),a++));for(let s=a;s<o;s++)Ua(i.child(s),n);e&&e.depth==t&&e.textOffset&&Ua(e.nodeBefore,n)}function $a(r,e){if(!r.type.validContent(e))throw new Ms("Invalid content for node "+r.type.name);return r.copy(e)}function nb(r,e,t,n,i){let a=r.depth>i&&gd(r,e,i+1),o=n.depth>i&&gd(t,n,i+1),s=[];return ws(null,r,i,s),a&&o&&e.index(i)==t.index(i)?(rb(a,o),Ua($a(a,nb(r,e,t,n,i+1)),s)):(a&&Ua($a(a,lu(r,e,i+1)),s),ws(e,t,i,s),o&&Ua($a(o,lu(t,n,i+1)),s)),ws(n,null,i,s),new De(s)}function lu(r,e,t){let n=[];if(ws(null,r,t,n),r.depth>t){let i=gd(r,e,t+1);Ua($a(i,lu(r,e,t+1)),n)}return ws(e,null,t,n),new De(n)}function nQ(r,e){let t=e.depth-r.openStart,i=e.node(t).copy(r.content);for(let a=t-1;a>=0;a--)i=e.node(a).copy(De.from(i));return{start:i.resolveNoCache(r.openStart+t),end:i.resolveNoCache(i.content.size-r.openEnd-t)}}class As{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],i=e.child(t);return n?e.child(t).cut(n):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let a=0;a<e;a++)i+=n.child(a).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return qt.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),i=e.maybeChild(t);if(!n){let s=n;n=i,i=s}let a=n.marks;for(var o=0;o<a.length;o++)a[o].type.spec.inclusive===!1&&(!i||!a[o].isInSet(i.marks))&&(a=a[o--].removeFromSet(a));return a}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,i=e.parent.maybeChild(e.index());for(var a=0;a<n.length;a++)n[a].type.spec.inclusive===!1&&(!i||!n[a].isInSet(i.marks))&&(n=n[a--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new uu(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],i=0,a=t;for(let o=e;;){let{index:s,offset:l}=o.content.findIndex(a),f=a-l;if(n.push(o,s,i+l),!f||(o=o.child(s),o.isText))break;a=f-1,i+=l+1}return new As(t,n,a)}static resolveCached(e,t){let n=Sv.get(e);if(n)for(let a=0;a<n.elts.length;a++){let o=n.elts[a];if(o.pos==t)return o}else Sv.set(e,n=new iQ);let i=n.elts[n.i]=As.resolve(e,t);return n.i=(n.i+1)%aQ,i}}class iQ{constructor(){this.elts=[],this.i=0}}const aQ=12,Sv=new WeakMap;class uu{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const oQ=Object.create(null);let ia=class yd{constructor(e,t,n,i=qt.none){this.type=e,this.attrs=t,this.marks=i,this.content=n||De.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,i=0){this.content.nodesBetween(e,t,n,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,i){return this.content.textBetween(e,t,n,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&su(this.attrs,t||e.defaultAttrs||oQ)&&qt.sameSet(this.marks,n||qt.none)}copy(e=null){return e==this.content?this:new yd(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new yd(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return $e.empty;let i=this.resolve(e),a=this.resolve(t),o=n?0:i.sharedDepth(t),s=i.start(o),f=i.node(o).content.cut(i.pos-s,a.pos-s);return new $e(f,i.depth-o,a.depth-o)}replace(e,t,n){return rQ(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let i=this.content.child(t-1);return{node:i,index:t-1,offset:n-i.nodeSize}}resolve(e){return As.resolveCached(this,e)}resolveNoCache(e){return As.resolve(this,e)}rangeHasMark(e,t,n){let i=!1;return t>e&&this.nodesBetween(e,t,a=>(n.isInSet(a.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),ib(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=De.empty,i=0,a=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,i,a),s=o&&o.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let l=i;l<a;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,t,n,i){if(i&&!this.type.allowsMarks(i))return!1;let a=this.contentMatchAt(e).matchType(n),o=a&&a.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=qt.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!qt.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let i=De.fromJSON(e,t.content),a=e.nodeType(t.type).create(t.attrs,i,n);return a.type.checkAttrs(a.attrs),a}};ia.prototype.text=void 0;class cu extends ia{constructor(e,t,n,i){if(super(e,t,null,i),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ib(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new cu(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new cu(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function ib(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}class Ka{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new sQ(e,t);if(n.next==null)return Ka.empty;let i=ab(n);n.next&&n.err("Unexpected trailing text");let a=pQ(hQ(i));return vQ(a,n),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let i=this;for(let a=t;i&&a<n;a++)i=i.matchType(e.child(a).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let i=[this];function a(o,s){let l=o.matchFragment(e,n);if(l&&(!t||l.validEnd))return De.from(s.map(f=>f.createAndFill()));for(let f=0;f<o.next.length;f++){let{type:p,next:b}=o.next[f];if(!(p.isText||p.hasRequiredAttrs())&&i.indexOf(b)==-1){i.push(b);let T=a(b,s.concat(p));if(T)return T}}return null}return a(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let i=n.shift(),a=i.match;if(a.matchType(e)){let o=[];for(let s=i;s.type;s=s.via)o.push(s.type);return o.reverse()}for(let o=0;o<a.next.length;o++){let{type:s,next:l}=a.next[o];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in t)&&(!i.type||l.validEnd)&&(n.push({match:s.contentMatch,type:s,via:i}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let i=0;i<n.next.length;i++)e.indexOf(n.next[i].next)==-1&&t(n.next[i].next)}return t(this),e.map((n,i)=>{let a=i+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)a+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return a}).join(`
|
|
2
|
-
`)}}Ka.empty=new Ka(!0);class sQ{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function ab(r){let e=[];do e.push(lQ(r));while(r.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function lQ(r){let e=[];do e.push(uQ(r));while(r.next&&r.next!=")"&&r.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function uQ(r){let e=dQ(r);for(;;)if(r.eat("+"))e={type:"plus",expr:e};else if(r.eat("*"))e={type:"star",expr:e};else if(r.eat("?"))e={type:"opt",expr:e};else if(r.eat("{"))e=cQ(r,e);else break;return e}function xv(r){/\D/.test(r.next)&&r.err("Expected number, got '"+r.next+"'");let e=Number(r.next);return r.pos++,e}function cQ(r,e){let t=xv(r),n=t;return r.eat(",")&&(r.next!="}"?n=xv(r):n=-1),r.eat("}")||r.err("Unclosed braced range"),{type:"range",min:t,max:n,expr:e}}function fQ(r,e){let t=r.nodeTypes,n=t[e];if(n)return[n];let i=[];for(let a in t){let o=t[a];o.isInGroup(e)&&i.push(o)}return i.length==0&&r.err("No node type or group '"+e+"' found"),i}function dQ(r){if(r.eat("(")){let e=ab(r);return r.eat(")")||r.err("Missing closing paren"),e}else if(/\W/.test(r.next))r.err("Unexpected token '"+r.next+"'");else{let e=fQ(r,r.next).map(t=>(r.inline==null?r.inline=t.isInline:r.inline!=t.isInline&&r.err("Mixing inline and block content"),{type:"name",value:t}));return r.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function hQ(r){let e=[[]];return i(a(r,0),t()),e;function t(){return e.push([])-1}function n(o,s,l){let f={term:l,to:s};return e[o].push(f),f}function i(o,s){o.forEach(l=>l.to=s)}function a(o,s){if(o.type=="choice")return o.exprs.reduce((l,f)=>l.concat(a(f,s)),[]);if(o.type=="seq")for(let l=0;;l++){let f=a(o.exprs[l],s);if(l==o.exprs.length-1)return f;i(f,s=t())}else if(o.type=="star"){let l=t();return n(s,l),i(a(o.expr,l),l),[n(l)]}else if(o.type=="plus"){let l=t();return i(a(o.expr,s),l),i(a(o.expr,l),l),[n(l)]}else{if(o.type=="opt")return[n(s)].concat(a(o.expr,s));if(o.type=="range"){let l=s;for(let f=0;f<o.min;f++){let p=t();i(a(o.expr,l),p),l=p}if(o.max==-1)i(a(o.expr,l),l);else for(let f=o.min;f<o.max;f++){let p=t();n(l,p),i(a(o.expr,l),p),l=p}return[n(l)]}else{if(o.type=="name")return[n(s,void 0,o.value)];throw new Error("Unknown expr type")}}}}function ob(r,e){return e-r}function Ev(r,e){let t=[];return n(e),t.sort(ob);function n(i){let a=r[i];if(a.length==1&&!a[0].term)return n(a[0].to);t.push(i);for(let o=0;o<a.length;o++){let{term:s,to:l}=a[o];!s&&t.indexOf(l)==-1&&n(l)}}}function pQ(r){let e=Object.create(null);return t(Ev(r,0));function t(n){let i=[];n.forEach(o=>{r[o].forEach(({term:s,to:l})=>{if(!s)return;let f;for(let p=0;p<i.length;p++)i[p][0]==s&&(f=i[p][1]);Ev(r,l).forEach(p=>{f||i.push([s,f=[]]),f.indexOf(p)==-1&&f.push(p)})})});let a=e[n.join(",")]=new Ka(n.indexOf(r.length-1)>-1);for(let o=0;o<i.length;o++){let s=i[o][1].sort(ob);a.next.push({type:i[o][0],next:e[s.join(",")]||t(s)})}return a}}function vQ(r,e){for(let t=0,n=[r];t<n.length;t++){let i=n[t],a=!i.validEnd,o=[];for(let s=0;s<i.next.length;s++){let{type:l,next:f}=i.next[s];o.push(l.name),a&&!(l.isText||l.hasRequiredAttrs())&&(a=!1),n.indexOf(f)==-1&&n.push(f)}a&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function sb(r){let e=Object.create(null);for(let t in r){let n=r[t];if(!n.hasDefault)return null;e[t]=n.default}return e}function lb(r,e){let t=Object.create(null);for(let n in r){let i=e&&e[n];if(i===void 0){let a=r[n];if(a.hasDefault)i=a.default;else throw new RangeError("No value supplied for attribute "+n)}t[n]=i}return t}function ub(r,e,t,n){for(let i in e)if(!(i in r))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${n}`);for(let i in r)r[i].validate&&r[i].validate(e[i])}function cb(r,e){let t=Object.create(null);if(e)for(let n in e)t[n]=new gQ(r,n,e[n]);return t}let Mv=class fb{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=cb(e,n.attrs),this.defaultAttrs=sb(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ka.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:lb(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ia(this,this.computeAttrs(e),De.from(t),qt.setFrom(n))}createChecked(e=null,t,n){return t=De.from(t),this.checkContent(t),new ia(this,this.computeAttrs(e),t,qt.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=De.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),a=i&&i.fillBefore(De.empty,!0);return a?new ia(this,e,t.append(a),qt.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){ub(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:qt.none:e}static compile(e,t){let n=Object.create(null);e.forEach((a,o)=>n[a]=new fb(a,t,o));let i=t.spec.topNode||"doc";if(!n[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let a in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function mQ(r,e,t){let n=t.split("|");return i=>{let a=i===null?"null":typeof i;if(n.indexOf(a)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${r}, got ${a}`)}}class gQ{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?mQ(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class Pu{constructor(e,t,n,i){this.name=e,this.rank=t,this.schema=n,this.spec=i,this.attrs=cb(e,i.attrs),this.excluded=null;let a=sb(this.attrs);this.instance=a?new qt(this,a):null}create(e=null){return!e&&this.instance?this.instance:new qt(this,lb(this.attrs,e))}static compile(e,t){let n=Object.create(null),i=0;return e.forEach((a,o)=>n[a]=new Pu(a,i++,t,o)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){ub(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class db{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=Br.from(e.nodes),t.marks=Br.from(e.marks||{}),this.nodes=Mv.compile(this.spec.nodes,this),this.marks=Pu.compile(this.spec.marks,this);let n=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let a=this.nodes[i],o=a.spec.content||"",s=a.spec.marks;if(a.contentMatch=n[o]||(n[o]=Ka.parse(o,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=s=="_"?null:s?Av(this,s.split(" ")):s==""||!a.inlineContent?[]:null}for(let i in this.marks){let a=this.marks[i],o=a.spec.excludes;a.excluded=o==null?[a]:o==""?[]:Av(this,o.split(" "))}this.nodeFromJSON=i=>ia.fromJSON(this,i),this.markFromJSON=i=>qt.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Mv){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,n,i)}text(e,t){let n=this.nodes.text;return new cu(n,n.defaultAttrs,e,qt.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Av(r,e){let t=[];for(let n=0;n<e.length;n++){let i=e[n],a=r.marks[i],o=a;if(a)t.push(a);else for(let s in r.marks){let l=r.marks[s];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&t.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return t}function yQ(r){return r.tag!=null}function bQ(r){return r.style!=null}class Ja{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(i=>{if(yQ(i))this.tags.push(i);else if(bQ(i)){let a=/[^=]*/.exec(i.style)[0];n.indexOf(a)<0&&n.push(a),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let a=e.nodes[i.node];return a.contentMatch.matchType(a)})}parse(e,t={}){let n=new Nv(this,t,!1);return n.addAll(e,qt.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Nv(this,t,!0);return n.addAll(e,qt.none,t.from,t.to),$e.maxOpen(n.finish())}matchTag(e,t,n){for(let i=n?this.tags.indexOf(n)+1:0;i<this.tags.length;i++){let a=this.tags[i];if(CQ(e,a.tag)&&(a.namespace===void 0||e.namespaceURI==a.namespace)&&(!a.context||t.matchesContext(a.context))){if(a.getAttrs){let o=a.getAttrs(e);if(o===!1)continue;a.attrs=o||void 0}return a}}}matchStyle(e,t,n,i){for(let a=i?this.styles.indexOf(i)+1:0;a<this.styles.length;a++){let o=this.styles[a],s=o.style;if(!(s.indexOf(e)!=0||o.context&&!n.matchesContext(o.context)||s.length>e.length&&(s.charCodeAt(e.length)!=61||s.slice(e.length+1)!=t))){if(o.getAttrs){let l=o.getAttrs(t);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let t=[];function n(i){let a=i.priority==null?50:i.priority,o=0;for(;o<t.length;o++){let s=t[o];if((s.priority==null?50:s.priority)<a)break}t.splice(o,0,i)}for(let i in e.marks){let a=e.marks[i].spec.parseDOM;a&&a.forEach(o=>{n(o=Dv(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let a=e.nodes[i].spec.parseDOM;a&&a.forEach(o=>{n(o=Dv(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ja(e,Ja.schemaRules(e)))}}const hb={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},kQ={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},pb={ol:!0,ul:!0},Os=1,bd=2,Cs=4;function Ov(r,e,t){return e!=null?(e?Os:0)|(e==="full"?bd:0):r&&r.whitespace=="pre"?Os|bd:t&~Cs}class Bl{constructor(e,t,n,i,a,o){this.type=e,this.attrs=t,this.marks=n,this.solid=i,this.options=o,this.content=[],this.activeMarks=qt.none,this.match=a||(o&Cs?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(De.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let n=this.type.contentMatch,i;return(i=n.findWrapping(e.type))?(this.match=n,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Os)){let n=this.content[this.content.length-1],i;if(n&&n.isText&&(i=/[ \t\r\n\u000c]+$/.exec(n.text))){let a=n;n.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-i[0].length))}}let t=De.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(De.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!hb.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Nv{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let i=t.topNode,a,o=Ov(null,t.preserveWhitespace,0)|(n?Cs:0);i?a=new Bl(i.type,i.attrs,qt.none,!0,t.topMatch||i.type.contentMatch,o):n?a=new Bl(null,null,qt.none,!0,null,o):a=new Bl(e.schema.topNodeType,null,qt.none,!0,null,o),this.nodes=[a],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,i=this.top,a=i.options&bd?"full":this.localPreserveWS||(i.options&Os)>0,{schema:o}=this.parser;if(a==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(a)if(a==="full")n=n.replace(/\r\n?/g,`
|
|
3
|
-
`);else if(o.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(o.linebreakReplacement.create())){let s=n.split(/\r?\n|\r/);for(let l=0;l<s.length;l++)l&&this.insertNode(o.linebreakReplacement.create(),t,!0),s[l]&&this.insertNode(o.text(s[l]),t,!/\S/.test(s[l]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],l=e.previousSibling;(!s||l&&l.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(n=n.slice(1))}n&&this.insertNode(o.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let i=this.localPreserveWS,a=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),s;pb.hasOwnProperty(o)&&this.parser.normalizeLists&&wQ(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,n));e:if(l?l.ignore:kQ.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let f,p=this.needsBlock;if(hb.hasOwnProperty(o))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),f=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let b=l&&l.skip?t:this.readStyles(e,t);b&&this.addAll(e,b),f&&this.sync(a),this.needsBlock=p}else{let f=this.readStyles(e,t);f&&this.addElementByRule(e,l,f,l.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
|
-
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let a=this.parser.matchedStyles[i],o=n.getPropertyValue(a);if(o)for(let s=void 0;;){let l=this.parser.matchStyle(a,o,this,s);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(f=>!l.clearMark(f)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)s=l;else break}}return t}addElementByRule(e,t,n,i){let a,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),n,e.nodeName=="BR")||this.leafFallback(e,n);else{let l=this.enter(o,t.attrs||null,n,t.preserveWhitespace);l&&(a=!0,n=l)}else{let l=this.parser.schema.marks[t.mark];n=n.concat(l.create(t.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,n,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,n,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,n),this.findAround(e,l,!1)}a&&this.sync(s)&&this.open--}addAll(e,t,n,i){let a=n||0;for(let o=n?e.childNodes[n]:e.firstChild,s=i==null?null:e.childNodes[i];o!=s;o=o.nextSibling,++a)this.findAtPoint(e,a),this.addDOM(o,t);this.findAtPoint(e,a)}findPlace(e,t,n){let i,a;for(let o=this.open,s=0;o>=0;o--){let l=this.nodes[o],f=l.findWrapping(e);if(f&&(!i||i.length>f.length+s)&&(i=f,a=l,!f.length))break;if(l.solid){if(n)break;s+=2}}if(!i)return null;this.sync(a);for(let o=0;o<i.length;o++)t=this.enterInner(i[o],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(t=this.enterInner(a,null,t))}let i=this.findPlace(e,t,n);if(i){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(e.type));let o=qt.none;for(let s of i.concat(e.marks))(a.type?a.type.allowsMarkType(s.type):Lv(s.type,e.type))&&(o=s.addToSet(o));return a.content.push(e.mark(o)),!0}return!1}enter(e,t,n,i){let a=this.findPlace(e.create(t),n,!1);return a&&(a=this.enterInner(e,t,n,!0,i)),a}enterInner(e,t,n,i=!1,a){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let s=Ov(e,a,o.options);o.options&Cs&&o.content.length==0&&(s|=Cs);let l=qt.none;return n=n.filter(f=>(o.type?o.type.allowsMarkType(f.type):Lv(f.type,e))?(l=f.addToSet(l),!1):!0),this.nodes.push(new Bl(e,t,l,i,null,s)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Os)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let i=n.length-1;i>=0;i--)e+=n[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(n?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,i=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),a=-(n?n.depth+1:0)+(i?0:1),o=(s,l)=>{for(;s>=0;s--){let f=t[s];if(f==""){if(s==t.length-1||s==0)continue;for(;l>=a;l--)if(o(s-1,l))return!0;return!1}else{let p=l>0||l==0&&i?this.nodes[l].type:n&&l>=a?n.node(l-a).type:null;if(!p||p.name!=f&&!p.isInGroup(f))return!1;l--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let n=this.parser.schema.nodes[t];if(n.isTextblock&&n.defaultAttrs)return n}}}function wQ(r){for(let e=r.firstChild,t=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&pb.hasOwnProperty(n)&&t?(t.appendChild(e),e=t):n=="li"?t=e:n&&(t=null)}}function CQ(r,e){return(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,e)}function Dv(r){let e={};for(let t in r)e[t]=r[t];return e}function Lv(r,e){let t=e.schema.nodes;for(let n in t){let i=t[n];if(!i.allowsMarkType(r))continue;let a=[],o=s=>{a.push(s);for(let l=0;l<s.edgeCount;l++){let{type:f,next:p}=s.edge(l);if(f==e||a.indexOf(p)<0&&o(p))return!0}};if(o(i.contentMatch))return!0}}class Jo{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Fl(t).createDocumentFragment());let i=n,a=[];return e.forEach(o=>{if(a.length||o.marks.length){let s=0,l=0;for(;s<a.length&&l<o.marks.length;){let f=o.marks[l];if(!this.marks[f.type.name]){l++;continue}if(!f.eq(a[s][0])||f.type.spec.spanning===!1)break;s++,l++}for(;s<a.length;)i=a.pop()[1];for(;l<o.marks.length;){let f=o.marks[l++],p=this.serializeMark(f,o.isInline,t);p&&(a.push([f,i]),i.appendChild(p.dom),i=p.contentDOM||p.dom)}}i.appendChild(this.serializeNodeInner(o,t))}),n}serializeNodeInner(e,t){if(e.isText)return Fl(t).createTextNode(e.text);let{dom:n,contentDOM:i}=Xl(Fl(t),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let a=this.serializeMark(e.marks[i],e.isInline,t);a&&((a.contentDOM||a.dom).appendChild(n),n=a.dom)}return n}serializeMark(e,t,n={}){let i=this.marks[e.type.name];return i&&Xl(Fl(n),i(e,t),null,e.attrs)}static renderSpec(e,t,n=null,i){return typeof t=="string"?{dom:e.createTextNode(t)}:Xl(e,t,n,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Jo(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Rv(e.nodes);return t.text||(t.text=n=>n.text),t}static marksFromSchema(e){return Rv(e.marks)}}function Rv(r){let e={};for(let t in r){let n=r[t].spec.toDOM;n&&(e[t]=n)}return e}function Fl(r){return r.document||window.document}const Iv=new WeakMap;function TQ(r){let e=Iv.get(r);return e===void 0&&Iv.set(r,e=SQ(r)),e}function SQ(r){let e=null;function t(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let i=0;i<n.length;i++)t(n[i]);else for(let i in n)t(n[i])}return t(r),e}function Xl(r,e,t,n){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let i=e[0],a;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(a=TQ(n))&&a.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(t=i.slice(0,o),i=i.slice(o+1));let s,l=t?r.createElementNS(t,i):r.createElement(i),f=e[1],p=1;if(f&&typeof f=="object"&&f.nodeType==null&&!Array.isArray(f)){p=2;for(let b in f)if(f[b]!=null){let T=b.indexOf(" ");T>0?l.setAttributeNS(b.slice(0,T),b.slice(T+1),f[b]):b=="style"&&l.style?l.style.cssText=f[b]:l.setAttribute(b,f[b])}}for(let b=p;b<e.length;b++){let T=e[b];if(T===0){if(b<e.length-1||b>p)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else if(typeof T=="string")l.appendChild(r.createTextNode(T));else{let{dom:x,contentDOM:E}=Xl(r,T,t,n);if(l.appendChild(x),E){if(s)throw new RangeError("Multiple content holes");s=E}}}return{dom:l,contentDOM:s}}const vb=65535,mb=Math.pow(2,16);function xQ(r,e){return r+e*mb}function Pv(r){return r&vb}function EQ(r){return(r-(r&vb))/mb}const gb=1,yb=2,Zl=4,bb=8;class kd{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&bb)>0}get deletedBefore(){return(this.delInfo&(gb|Zl))>0}get deletedAfter(){return(this.delInfo&(yb|Zl))>0}get deletedAcross(){return(this.delInfo&Zl)>0}}class dn{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&dn.empty)return dn.empty}recover(e){let t=0,n=Pv(e);if(!this.inverted)for(let i=0;i<n;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[n*3]+t+EQ(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let i=0,a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?i:0);if(l>e)break;let f=this.ranges[s+a],p=this.ranges[s+o],b=l+f;if(e<=b){let T=f?e==l?-1:e==b?1:t:t,x=l+i+(T<0?0:p);if(n)return x;let E=e==(t<0?l:b)?null:xQ(s/3,e-l),B=e==l?yb:e==b?gb:Zl;return(t<0?e!=l:e!=b)&&(B|=bb),new kd(x,B,E)}i+=p-f}return n?e+i:new kd(e+i,0,null)}touches(e,t){let n=0,i=Pv(t),a=this.inverted?2:1,o=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let l=this.ranges[s]-(this.inverted?n:0);if(l>e)break;let f=this.ranges[s+a],p=l+f;if(e<=p&&s==i*3)return!0;n+=this.ranges[s+o]-f}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let i=0,a=0;i<this.ranges.length;i+=3){let o=this.ranges[i],s=o-(this.inverted?a:0),l=o+(this.inverted?0:a),f=this.ranges[i+t],p=this.ranges[i+n];e(s,s+f,l,l+p),a+=p-f}}invert(){return new dn(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?dn.empty:new dn(e<0?[0,-e,0]:[0,0,e])}}dn.empty=new dn([]);class Ns{constructor(e,t,n=0,i=e?e.length:0){this.mirror=t,this.from=n,this.to=i,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Ns(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let i=e.getMirror(t);this.appendMap(e._maps[t],i!=null&&i<t?n+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e._maps[t].invert(),i!=null&&i>t?n-i-1:void 0)}}invert(){let e=new Ns;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let i=0;for(let a=this.from;a<this.to;a++){let o=this._maps[a],s=o.mapResult(e,t);if(s.recover!=null){let l=this.getMirror(a);if(l!=null&&l>a&&l<this.to){a=l,e=this._maps[l].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return n?e:new kd(e,i,null)}}const Nf=Object.create(null);class jr{getMap(){return dn.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=Nf[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Nf)throw new RangeError("Duplicate use of step JSON ID "+e);return Nf[e]=t,t.prototype.jsonID=e,t}}class vr{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new vr(e,null)}static fail(e){return new vr(null,e)}static fromReplace(e,t,n,i){try{return vr.ok(e.replace(t,n,i))}catch(a){if(a instanceof Ms)return vr.fail(a.message);throw a}}}function ah(r,e,t){let n=[];for(let i=0;i<r.childCount;i++){let a=r.child(i);a.content.size&&(a=a.copy(ah(a.content,e,a))),a.isInline&&(a=e(a,t,i)),n.push(a)}return De.fromArray(n)}class ra extends jr{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),a=new $e(ah(t.content,(o,s)=>!o.isAtom||!s.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return vr.fromReplace(e,this.from,this.to,a)}invert(){return new ui(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new ra(t.pos,n.pos,this.mark)}merge(e){return e instanceof ra&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ra(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ra(t.from,t.to,e.markFromJSON(t.mark))}}jr.jsonID("addMark",ra);class ui extends jr{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new $e(ah(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return vr.fromReplace(e,this.from,this.to,n)}invert(){return new ra(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new ui(t.pos,n.pos,this.mark)}merge(e){return e instanceof ui&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ui(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ui(t.from,t.to,e.markFromJSON(t.mark))}}jr.jsonID("removeMark",ui);class na extends jr{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return vr.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return vr.fromReplace(e,this.pos,this.pos+1,new $e(De.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(n))return new na(this.pos,t.marks[i]);return new na(this.pos,this.mark)}}return new Ya(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new na(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new na(t.pos,e.markFromJSON(t.mark))}}jr.jsonID("addNodeMark",na);class Ya extends jr{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return vr.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return vr.fromReplace(e,this.pos,this.pos+1,new $e(De.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new na(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ya(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ya(t.pos,e.markFromJSON(t.mark))}}jr.jsonID("removeNodeMark",Ya);class Er extends jr{constructor(e,t,n,i=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=i}apply(e){return this.structure&&wd(e,this.from,this.to)?vr.fail("Structure replace would overwrite content"):vr.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new dn([this.from,this.to-this.from,this.slice.size])}invert(e){return new Er(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),n=this.from==this.to&&Er.MAP_BIAS<0?t:e.mapResult(this.from,1);return n.deletedAcross&&t.deletedAcross?null:new Er(n.pos,Math.max(n.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Er)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?$e.empty:new $e(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Er(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?$e.empty:new $e(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Er(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Er(t.from,t.to,$e.fromJSON(e,t.slice),!!t.structure)}}Er.MAP_BIAS=1;jr.jsonID("replace",Er);class Or extends jr{constructor(e,t,n,i,a,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=i,this.slice=a,this.insert=o,this.structure=s}apply(e){if(this.structure&&(wd(e,this.from,this.gapFrom)||wd(e,this.gapTo,this.to)))return vr.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return vr.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?vr.fromReplace(e,this.from,this.to,n):vr.fail("Content does not fit in gap")}getMap(){return new dn([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Or(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),a=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||i<t.pos||a>n.pos?null:new Or(t.pos,n.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Or(t.from,t.to,t.gapFrom,t.gapTo,$e.fromJSON(e,t.slice),t.insert,!!t.structure)}}jr.jsonID("replaceAround",Or);function wd(r,e,t){let n=r.resolve(e),i=t-e,a=n.depth;for(;i>0&&a>0&&n.indexAfter(a)==n.node(a).childCount;)a--,i--;if(i>0){let o=n.node(a).maybeChild(n.indexAfter(a));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function MQ(r,e,t,n){let i=[],a=[],o,s;r.doc.nodesBetween(e,t,(l,f,p)=>{if(!l.isInline)return;let b=l.marks;if(!n.isInSet(b)&&p.type.allowsMarkType(n.type)){let T=Math.max(f,e),x=Math.min(f+l.nodeSize,t),E=n.addToSet(b);for(let B=0;B<b.length;B++)b[B].isInSet(E)||(o&&o.to==T&&o.mark.eq(b[B])?o.to=x:i.push(o=new ui(T,x,b[B])));s&&s.to==T?s.to=x:a.push(s=new ra(T,x,n))}}),i.forEach(l=>r.step(l)),a.forEach(l=>r.step(l))}function AQ(r,e,t,n){let i=[],a=0;r.doc.nodesBetween(e,t,(o,s)=>{if(!o.isInline)return;a++;let l=null;if(n instanceof Pu){let f=o.marks,p;for(;p=n.isInSet(f);)(l||(l=[])).push(p),f=p.removeFromSet(f)}else n?n.isInSet(o.marks)&&(l=[n]):l=o.marks;if(l&&l.length){let f=Math.min(s+o.nodeSize,t);for(let p=0;p<l.length;p++){let b=l[p],T;for(let x=0;x<i.length;x++){let E=i[x];E.step==a-1&&b.eq(i[x].style)&&(T=E)}T?(T.to=f,T.step=a):i.push({style:b,from:Math.max(s,e),to:f,step:a})}}}),i.forEach(o=>r.step(new ui(o.from,o.to,o.style)))}function oh(r,e,t,n=t.contentMatch,i=!0){let a=r.doc.nodeAt(e),o=[],s=e+1;for(let l=0;l<a.childCount;l++){let f=a.child(l),p=s+f.nodeSize,b=n.matchType(f.type);if(!b)o.push(new Er(s,p,$e.empty));else{n=b;for(let T=0;T<f.marks.length;T++)t.allowsMarkType(f.marks[T].type)||r.step(new ui(s,p,f.marks[T]));if(i&&f.isText&&t.whitespace!="pre"){let T,x=/\r?\n|\r/g,E;for(;T=x.exec(f.text);)E||(E=new $e(De.from(t.schema.text(" ",t.allowedMarks(f.marks))),0,0)),o.push(new Er(s+T.index,s+T.index+T[0].length,E))}}s=p}if(!n.validEnd){let l=n.fillBefore(De.empty,!0);r.replace(s,s,new $e(l,0,0))}for(let l=o.length-1;l>=0;l--)r.step(o[l])}function OQ(r,e,t){return(e==0||r.canReplace(e,r.childCount))&&(t==r.childCount||r.canReplace(0,t))}function Bu(r){let t=r.parent.content.cutByIndex(r.startIndex,r.endIndex);for(let n=r.depth,i=0,a=0;;--n){let o=r.$from.node(n),s=r.$from.index(n)+i,l=r.$to.indexAfter(n)-a;if(n<r.depth&&o.canReplace(s,l,t))return n;if(n==0||o.type.spec.isolating||!OQ(o,s,l))break;s&&(i=1),l<o.childCount&&(a=1)}return null}function NQ(r,e,t){let{$from:n,$to:i,depth:a}=e,o=n.before(a+1),s=i.after(a+1),l=o,f=s,p=De.empty,b=0;for(let E=a,B=!1;E>t;E--)B||n.index(E)>0?(B=!0,p=De.from(n.node(E).copy(p)),b++):l--;let T=De.empty,x=0;for(let E=a,B=!1;E>t;E--)B||i.after(E+1)<i.end(E)?(B=!0,T=De.from(i.node(E).copy(T)),x++):f++;r.step(new Or(l,f,o,s,new $e(p.append(T),b,x),p.size-b,!0))}function DQ(r,e,t=null,n=r){let i=LQ(r,e),a=i&&RQ(n,e);return a?i.map(Bv).concat({type:e,attrs:t}).concat(a.map(Bv)):null}function Bv(r){return{type:r,attrs:null}}function LQ(r,e){let{parent:t,startIndex:n,endIndex:i}=r,a=t.contentMatchAt(n).findWrapping(e);if(!a)return null;let o=a.length?a[0]:e;return t.canReplaceWith(n,i,o)?a:null}function RQ(r,e){let{parent:t,startIndex:n,endIndex:i}=r,a=t.child(n),o=e.contentMatch.findWrapping(a.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let f=n;l&&f<i;f++)l=l.matchType(t.child(f).type);return!l||!l.validEnd?null:o}function IQ(r,e,t){let n=De.empty;for(let o=t.length-1;o>=0;o--){if(n.size){let s=t[o].type.contentMatch.matchFragment(n);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=De.from(t[o].type.create(t[o].attrs,n))}let i=e.start,a=e.end;r.step(new Or(i,a,i,a,new $e(n,0,0),t.length,!0))}function PQ(r,e,t,n,i){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=r.steps.length;r.doc.nodesBetween(e,t,(o,s)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(n,l)&&BQ(r.doc,r.mapping.slice(a).map(s),n)){let f=null;if(n.schema.linebreakReplacement){let x=n.whitespace=="pre",E=!!n.contentMatch.matchType(n.schema.linebreakReplacement);x&&!E?f=!1:!x&&E&&(f=!0)}f===!1&&wb(r,o,s,a),oh(r,r.mapping.slice(a).map(s,1),n,void 0,f===null);let p=r.mapping.slice(a),b=p.map(s,1),T=p.map(s+o.nodeSize,1);return r.step(new Or(b,T,b+1,T-1,new $e(De.from(n.create(l,null,o.marks)),0,0),1,!0)),f===!0&&kb(r,o,s,a),!1}})}function kb(r,e,t,n){e.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let l=r.mapping.slice(n).map(t+1+a+o.index);r.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function wb(r,e,t,n){e.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let o=r.mapping.slice(n).map(t+1+a);r.replaceWith(o,o+1,e.type.schema.text(`
|
|
5
|
-
`))}})}function BQ(r,e,t){let n=r.resolve(e),i=n.index();return n.parent.canReplaceWith(i,i+1,t)}function FQ(r,e,t,n,i){let a=r.doc.nodeAt(e);if(!a)throw new RangeError("No node at given position");t||(t=a.type);let o=t.create(n,null,i||a.marks);if(a.isLeaf)return r.replaceWith(e,e+a.nodeSize,o);if(!t.validContent(a.content))throw new RangeError("Invalid content for node type "+t.name);r.step(new Or(e,e+a.nodeSize,e+1,e+a.nodeSize-1,new $e(De.from(o),0,0),1,!0))}function Lo(r,e,t=1,n){let i=r.resolve(e),a=i.depth-t,o=n&&n[n.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let f=i.depth-1,p=t-2;f>a;f--,p--){let b=i.node(f),T=i.index(f);if(b.type.spec.isolating)return!1;let x=b.content.cutByIndex(T,b.childCount),E=n&&n[p+1];E&&(x=x.replaceChild(0,E.type.create(E.attrs)));let B=n&&n[p]||b;if(!b.canReplace(T+1,b.childCount)||!B.type.validContent(x))return!1}let s=i.indexAfter(a),l=n&&n[0];return i.node(a).canReplaceWith(s,s,l?l.type:i.node(a+1).type)}function qQ(r,e,t=1,n){let i=r.doc.resolve(e),a=De.empty,o=De.empty;for(let s=i.depth,l=i.depth-t,f=t-1;s>l;s--,f--){a=De.from(i.node(s).copy(a));let p=n&&n[f];o=De.from(p?p.type.create(p.attrs,o):i.node(s).copy(o))}r.step(new Er(e,e,new $e(a.append(o),t,t),!0))}function Cb(r,e){let t=r.resolve(e),n=t.index();return _Q(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(n,n+1)}function HQ(r,e){e.content.size||r.type.compatibleContent(e.type);let t=r.contentMatchAt(r.childCount),{linebreakReplacement:n}=r.type.schema;for(let i=0;i<e.childCount;i++){let a=e.child(i),o=a.type==n?r.type.schema.nodes.text:a.type;if(t=t.matchType(o),!t||!r.type.allowsMarks(a.marks))return!1}return t.validEnd}function _Q(r,e){return!!(r&&e&&!r.isLeaf&&HQ(r,e))}function zQ(r,e,t){let n=null,{linebreakReplacement:i}=r.doc.type.schema,a=r.doc.resolve(e-t),o=a.node().type;if(i&&o.inlineContent){let p=o.whitespace=="pre",b=!!o.contentMatch.matchType(i);p&&!b?n=!1:!p&&b&&(n=!0)}let s=r.steps.length;if(n===!1){let p=r.doc.resolve(e+t);wb(r,p.node(),p.before(),s)}o.inlineContent&&oh(r,e+t-1,o,a.node().contentMatchAt(a.index()),n==null);let l=r.mapping.slice(s),f=l.map(e-t);if(r.step(new Er(f,l.map(e+t,-1),$e.empty,!0)),n===!0){let p=r.doc.resolve(f);kb(r,p.node(),p.before(),r.steps.length)}return r}function VQ(r,e,t){let n=r.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),t))return e;if(n.parentOffset==0)for(let i=n.depth-1;i>=0;i--){let a=n.index(i);if(n.node(i).canReplaceWith(a,a,t))return n.before(i+1);if(a>0)return null}if(n.parentOffset==n.parent.content.size)for(let i=n.depth-1;i>=0;i--){let a=n.indexAfter(i);if(n.node(i).canReplaceWith(a,a,t))return n.after(i+1);if(a<n.node(i).childCount)return null}return null}function UQ(r,e,t){let n=r.resolve(e);if(!t.content.size)return e;let i=t.content;for(let a=0;a<t.openStart;a++)i=i.firstChild.content;for(let a=1;a<=(t.openStart==0&&t.size?2:1);a++)for(let o=n.depth;o>=0;o--){let s=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,l=n.index(o)+(s>0?1:0),f=n.node(o),p=!1;if(a==1)p=f.canReplace(l,l,i);else{let b=f.contentMatchAt(l).findWrapping(i.firstChild.type);p=b&&f.canReplaceWith(l,l,b[0])}if(p)return s==0?n.pos:s<0?n.before(o+1):n.after(o+1)}return null}function sh(r,e,t=e,n=$e.empty){if(e==t&&!n.size)return null;let i=r.resolve(e),a=r.resolve(t);return Tb(i,a,n)?new Er(e,t,n):new $Q(i,a,n).fit()}function Tb(r,e,t){return!t.openStart&&!t.openEnd&&r.start()==e.start()&&r.parent.canReplace(r.index(),e.index(),t.content)}class $Q{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=De.empty;for(let i=0;i<=e.depth;i++){let a=e.node(i);this.frontier.push({type:a.type,match:a.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=De.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let f=this.findFittable();f?this.placeNodes(f):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let a=this.placed,o=n.depth,s=i.depth;for(;o&&s&&a.childCount==1;)a=a.firstChild.content,o--,s--;let l=new $e(a,o,s);return e>-1?new Or(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new Er(n.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,i=this.unplaced.openEnd;n<e;n++){let a=t.firstChild;if(t.childCount>1&&(i=0),a.type.spec.isolating&&i<=n){e=n;break}t=a.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let i,a=null;n?(a=Df(this.unplaced.content,n-1).firstChild,i=a.content):i=this.unplaced.content;let o=i.firstChild;for(let s=this.depth;s>=0;s--){let{type:l,match:f}=this.frontier[s],p,b=null;if(t==1&&(o?f.matchType(o.type)||(b=f.fillBefore(De.from(o),!1)):a&&l.compatibleContent(a.type)))return{sliceDepth:n,frontierDepth:s,parent:a,inject:b};if(t==2&&o&&(p=f.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:s,parent:a,wrap:p};if(a&&f.matchType(a.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=Df(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new $e(e,t+1,Math.max(n,i.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=Df(e,t);if(i.childCount<=1&&t>0){let a=e.size-t<=t+i.size;this.unplaced=new $e(ms(e,t-1,1),t-1,a?t-1:n)}else this.unplaced=new $e(ms(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:a}){for(;this.depth>t;)this.closeFrontierNode();if(a)for(let B=0;B<a.length;B++)this.openFrontierNode(a[B]);let o=this.unplaced,s=n?n.content:o.content,l=o.openStart-e,f=0,p=[],{match:b,type:T}=this.frontier[t];if(i){for(let B=0;B<i.childCount;B++)p.push(i.child(B));b=b.matchFragment(i)}let x=s.size+e-(o.content.size-o.openEnd);for(;f<s.childCount;){let B=s.child(f),F=b.matchType(B.type);if(!F)break;f++,(f>1||l==0||B.content.size)&&(b=F,p.push(Sb(B.mark(T.allowedMarks(B.marks)),f==1?l:0,f==s.childCount?x:-1)))}let E=f==s.childCount;E||(x=-1),this.placed=gs(this.placed,t,De.from(p)),this.frontier[t].match=b,E&&x<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let B=0,F=s;B<x;B++){let _=F.lastChild;this.frontier.push({type:_.type,match:_.contentMatchAt(_.childCount)}),F=_.content}this.unplaced=E?e==0?$e.empty:new $e(ms(o.content,e-1,1),e-1,x<0?o.openEnd:e-1):new $e(ms(o.content,e,f),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Lf(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,i=this.$to.after(n);for(;n>1&&i==this.$to.end(--n);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:i}=this.frontier[t],a=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=Lf(e,t,i,n,a);if(o){for(let s=t-1;s>=0;s--){let{match:l,type:f}=this.frontier[s],p=Lf(e,s,f,l,!0);if(!p||p.childCount)continue e}return{depth:t,fit:o,move:a?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=gs(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let i=e.node(n),a=i.type.contentMatch.fillBefore(i.content,!0,e.index(n));this.openFrontierNode(i.type,i.attrs,a)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=gs(this.placed,this.depth,De.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(De.empty,!0);t.childCount&&(this.placed=gs(this.placed,this.frontier.length,t))}}function ms(r,e,t){return e==0?r.cutByIndex(t,r.childCount):r.replaceChild(0,r.firstChild.copy(ms(r.firstChild.content,e-1,t)))}function gs(r,e,t){return e==0?r.append(t):r.replaceChild(r.childCount-1,r.lastChild.copy(gs(r.lastChild.content,e-1,t)))}function Df(r,e){for(let t=0;t<e;t++)r=r.firstChild.content;return r}function Sb(r,e,t){if(e<=0)return r;let n=r.content;return e>1&&(n=n.replaceChild(0,Sb(n.firstChild,e-1,n.childCount==1?t-1:0))),e>0&&(n=r.type.contentMatch.fillBefore(n).append(n),t<=0&&(n=n.append(r.type.contentMatch.matchFragment(n).fillBefore(De.empty,!0)))),r.copy(n)}function Lf(r,e,t,n,i){let a=r.node(e),o=i?r.indexAfter(e):r.index(e);if(o==a.childCount&&!t.compatibleContent(a.type))return null;let s=n.fillBefore(a.content,!0,o);return s&&!WQ(t,a.content,o)?s:null}function WQ(r,e,t){for(let n=t;n<e.childCount;n++)if(!r.allowsMarks(e.child(n).marks))return!0;return!1}function jQ(r){return r.spec.defining||r.spec.definingForContent}function GQ(r,e,t,n){if(!n.size)return r.deleteRange(e,t);let i=r.doc.resolve(e),a=r.doc.resolve(t);if(Tb(i,a,n))return r.step(new Er(e,t,n));let o=Eb(i,a);o[o.length-1]==0&&o.pop();let s=-(i.depth+1);o.unshift(s);for(let T=i.depth,x=i.pos-1;T>0;T--,x--){let E=i.node(T).type.spec;if(E.defining||E.definingAsContext||E.isolating)break;o.indexOf(T)>-1?s=T:i.before(T)==x&&o.splice(1,0,-T)}let l=o.indexOf(s),f=[],p=n.openStart;for(let T=n.content,x=0;;x++){let E=T.firstChild;if(f.push(E),x==n.openStart)break;T=E.content}for(let T=p-1;T>=0;T--){let x=f[T],E=jQ(x.type);if(E&&!x.sameMarkup(i.node(Math.abs(s)-1)))p=T;else if(E||!x.type.isTextblock)break}for(let T=n.openStart;T>=0;T--){let x=(T+p+1)%(n.openStart+1),E=f[x];if(E)for(let B=0;B<o.length;B++){let F=o[(B+l)%o.length],_=!0;F<0&&(_=!1,F=-F);let X=i.node(F-1),ee=i.index(F-1);if(X.canReplaceWith(ee,ee,E.type,E.marks))return r.replace(i.before(F),_?a.after(F):t,new $e(xb(n.content,0,n.openStart,x),x,n.openEnd))}}let b=r.steps.length;for(let T=o.length-1;T>=0&&(r.replace(e,t,n),!(r.steps.length>b));T--){let x=o[T];x<0||(e=i.before(x),t=a.after(x))}}function xb(r,e,t,n,i){if(e<t){let a=r.firstChild;r=r.replaceChild(0,a.copy(xb(a.content,e+1,t,n,a)))}if(e>n){let a=i.contentMatchAt(0),o=a.fillBefore(r).append(r);r=o.append(a.matchFragment(o).fillBefore(De.empty,!0))}return r}function KQ(r,e,t,n){if(!n.isInline&&e==t&&r.doc.resolve(e).parent.content.size){let i=VQ(r.doc,e,n.type);i!=null&&(e=t=i)}r.replaceRange(e,t,new $e(De.from(n),0,0))}function JQ(r,e,t){let n=r.doc.resolve(e),i=r.doc.resolve(t);if(n.parent.isTextblock&&i.parent.isTextblock&&n.start()!=i.start()&&n.parentOffset==0&&i.parentOffset==0){let o=n.sharedDepth(t),s=!1;for(let l=n.depth;l>o;l--)n.node(l).type.spec.isolating&&(s=!0);for(let l=i.depth;l>o;l--)i.node(l).type.spec.isolating&&(s=!0);if(!s){for(let l=n.depth;l>0&&e==n.start(l);l--)e=n.before(l);for(let l=i.depth;l>0&&t==i.start(l);l--)t=i.before(l);n=r.doc.resolve(e),i=r.doc.resolve(t)}}let a=Eb(n,i);for(let o=0;o<a.length;o++){let s=a[o],l=o==a.length-1;if(l&&s==0||n.node(s).type.contentMatch.validEnd)return r.delete(n.start(s),i.end(s));if(s>0&&(l||n.node(s-1).canReplace(n.index(s-1),i.indexAfter(s-1))))return r.delete(n.before(s),i.after(s))}for(let o=1;o<=n.depth&&o<=i.depth;o++)if(e-n.start(o)==n.depth-o&&t>n.end(o)&&i.end(o)-t!=i.depth-o&&n.start(o-1)==i.start(o-1)&&n.node(o-1).canReplace(n.index(o-1),i.index(o-1)))return r.delete(n.before(o),t);r.delete(e,t)}function Eb(r,e){let t=[],n=Math.min(r.depth,e.depth);for(let i=n;i>=0;i--){let a=r.start(i);if(a<r.pos-(r.depth-i)||e.end(i)>e.pos+(e.depth-i)||r.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(a==e.start(i)||i==r.depth&&i==e.depth&&r.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==a-1)&&t.push(i)}return t}class Ro extends jr{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return vr.fail("No node at attribute step's position");let n=Object.create(null);for(let a in t.attrs)n[a]=t.attrs[a];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return vr.fromReplace(e,this.pos,this.pos+1,new $e(De.from(i),0,t.isLeaf?0:1))}getMap(){return dn.empty}invert(e){return new Ro(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ro(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Ro(t.pos,t.attr,t.value)}}jr.jsonID("attr",Ro);class Ds extends jr{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return vr.ok(n)}getMap(){return dn.empty}invert(e){return new Ds(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ds(t.attr,t.value)}}jr.jsonID("docAttr",Ds);let Io=class extends Error{};Io=function r(e){let t=Error.call(this,e);return t.__proto__=r.prototype,t};Io.prototype=Object.create(Error.prototype);Io.prototype.constructor=Io;Io.prototype.name="TransformError";class YQ{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ns}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Io(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let i=this.mapping.maps[n];n&&(e=i.map(e,1),t=i.map(t,-1)),i.forEach((a,o,s,l)=>{e=Math.min(e,s),t=Math.max(t,l)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=$e.empty){let i=sh(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new $e(De.from(n),0,0))}delete(e,t){return this.replace(e,t,$e.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return GQ(this,e,t,n),this}replaceRangeWith(e,t,n){return KQ(this,e,t,n),this}deleteRange(e,t){return JQ(this,e,t),this}lift(e,t){return NQ(this,e,t),this}join(e,t=1){return zQ(this,e,t),this}wrap(e,t){return IQ(this,e,t),this}setBlockType(e,t=e,n,i=null){return PQ(this,e,t,n,i),this}setNodeMarkup(e,t,n=null,i){return FQ(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new Ro(e,t,n)),this}setDocAttribute(e,t){return this.step(new Ds(e,t)),this}addNodeMark(e,t){return this.step(new na(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(t instanceof qt)t.isInSet(n.marks)&&this.step(new Ya(e,t));else{let i=n.marks,a,o=[];for(;a=t.isInSet(i);)o.push(new Ya(e,a)),i=a.removeFromSet(i);for(let s=o.length-1;s>=0;s--)this.step(o[s])}return this}split(e,t=1,n){return qQ(this,e,t,n),this}addMark(e,t,n){return MQ(this,e,t,n),this}removeMark(e,t,n){return AQ(this,e,t,n),this}clearIncompatible(e,t,n){return oh(this,e,t,n),this}}const Rf=Object.create(null);class xt{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Mb(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=$e.empty){let n=t.content.lastChild,i=null;for(let s=0;s<t.openEnd;s++)i=n,n=n.lastChild;let a=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:l,$to:f}=o[s],p=e.mapping.slice(a);e.replaceRange(p.map(l.pos),p.map(f.pos),s?$e.empty:t),s==0&&Hv(e,a,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){let{$from:o,$to:s}=i[a],l=e.mapping.slice(n),f=l.map(o.pos),p=l.map(s.pos);a?e.deleteRange(f,p):(e.replaceRangeWith(f,p,t),Hv(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let i=e.parent.inlineContent?new St(e):Eo(e.node(0),e.parent,e.pos,e.index(),t,n);if(i)return i;for(let a=e.depth-1;a>=0;a--){let o=t<0?Eo(e.node(0),e.node(a),e.before(a+1),e.index(a),t,n):Eo(e.node(0),e.node(a),e.after(a+1),e.index(a)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Qr(e.node(0))}static atStart(e){return Eo(e,e,0,0,1)||new Qr(e)}static atEnd(e){return Eo(e,e,e.content.size,e.childCount,-1)||new Qr(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Rf[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Rf)throw new RangeError("Duplicate use of selection JSON ID "+e);return Rf[e]=t,t.prototype.jsonID=e,t}getBookmark(){return St.between(this.$anchor,this.$head).getBookmark()}}xt.prototype.visible=!0;class Mb{constructor(e,t){this.$from=e,this.$to=t}}let Fv=!1;function qv(r){!Fv&&!r.parent.inlineContent&&(Fv=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+r.parent.type.name+")"))}class St extends xt{constructor(e,t=e){qv(e),qv(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return xt.near(n);let i=e.resolve(t.map(this.anchor));return new St(i.parent.inlineContent?i:n,n)}replace(e,t=$e.empty){if(super.replace(e,t),t==$e.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof St&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Fu(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new St(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let i=e.resolve(t);return new this(i,n==t?i:e.resolve(n))}static between(e,t,n){let i=e.pos-t.pos;if((!n||i)&&(n=i>=0?1:-1),!t.parent.inlineContent){let a=xt.findFrom(t,n,!0)||xt.findFrom(t,-n,!0);if(a)t=a.$head;else return xt.near(t,n)}return e.parent.inlineContent||(i==0?e=t:(e=(xt.findFrom(e,-n,!0)||xt.findFrom(e,n,!0)).$anchor,e.pos<t.pos!=i<0&&(e=t))),new St(e,t)}}xt.jsonID("text",St);class Fu{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Fu(e.map(this.anchor),e.map(this.head))}resolve(e){return St.between(e.resolve(this.anchor),e.resolve(this.head))}}class ht extends xt{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:i}=t.mapResult(this.anchor),a=e.resolve(i);return n?xt.near(a):new ht(a)}content(){return new $e(De.from(this.node),0,0)}eq(e){return e instanceof ht&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new lh(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ht(e.resolve(t.anchor))}static create(e,t){return new ht(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}ht.prototype.visible=!1;xt.jsonID("node",ht);class lh{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new Fu(n,n):new lh(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&ht.isSelectable(n)?new ht(t):xt.near(t)}}class Qr extends xt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=$e.empty){if(t==$e.empty){e.delete(0,e.doc.content.size);let n=xt.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Qr(e)}map(e){return new Qr(e)}eq(e){return e instanceof Qr}getBookmark(){return XQ}}xt.jsonID("all",Qr);const XQ={map(){return this},resolve(r){return new Qr(r)}};function Eo(r,e,t,n,i,a=!1){if(e.inlineContent)return St.create(r,t);for(let o=n-(i>0?0:1);i>0?o<e.childCount:o>=0;o+=i){let s=e.child(o);if(s.isAtom){if(!a&&ht.isSelectable(s))return ht.create(r,t-(i<0?s.nodeSize:0))}else{let l=Eo(r,s,t+i,i<0?s.childCount:0,i,a);if(l)return l}t+=s.nodeSize*i}return null}function Hv(r,e,t){let n=r.steps.length-1;if(n<e)return;let i=r.steps[n];if(!(i instanceof Er||i instanceof Or))return;let a=r.mapping.maps[n],o;a.forEach((s,l,f,p)=>{o==null&&(o=p)}),r.setSelection(xt.near(r.doc.resolve(o),t))}const _v=1,ql=2,zv=4;class ZQ extends YQ{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|_v)&~ql,this.storedMarks=null,this}get selectionSet(){return(this.updated&_v)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=ql,this}ensureMarks(e){return qt.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&ql)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~ql,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||qt.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(n==null&&(n=t),!e)return this.deleteRange(t,n);let a=this.storedMarks;if(!a){let o=this.doc.resolve(t);a=n==t?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,i.text(e,a)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(xt.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=zv,this}get scrolledIntoView(){return(this.updated&zv)>0}}function Vv(r,e){return!e||!r?r:r.bind(e)}class ys{constructor(e,t,n){this.name=e,this.init=Vv(t.init,n),this.apply=Vv(t.apply,n)}}const QQ=[new ys("doc",{init(r){return r.doc||r.schema.topNodeType.createAndFill()},apply(r){return r.doc}}),new ys("selection",{init(r,e){return r.selection||xt.atStart(e.doc)},apply(r){return r.selection}}),new ys("storedMarks",{init(r){return r.storedMarks||null},apply(r,e,t,n){return n.selection.$cursor?r.storedMarks:null}}),new ys("scrollToSelection",{init(){return 0},apply(r,e){return r.scrolledIntoView?e+1:e}})];class If{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=QQ.slice(),t&&t.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new ys(n.key,n.spec.state,n))})}}class _a{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let i=this.config.plugins[n];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),i=null;for(;;){let a=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let l=i?i[o].n:0,f=i?i[o].state:this,p=l<t.length&&s.spec.appendTransaction.call(s,l?t.slice(l):t,f,n);if(p&&n.filterTransaction(p,o)){if(p.setMeta("appendedTransaction",e),!i){i=[];for(let b=0;b<this.config.plugins.length;b++)i.push(b<o?{state:n,n:t.length}:{state:this,n:0})}t.push(p),n=n.applyInner(p),a=!0}i&&(i[o]={state:n,n:t.length})}}if(!a)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new _a(this.config),n=this.config.fields;for(let i=0;i<n.length;i++){let a=n[i];t[a.name]=a.apply(e,this[a.name],this,t)}return t}get tr(){return new ZQ(this)}static create(e){let t=new If(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new _a(t);for(let i=0;i<t.fields.length;i++)n[t.fields[i].name]=t.fields[i].init(e,n);return n}reconfigure(e){let t=new If(this.schema,e.plugins),n=t.fields,i=new _a(t);for(let a=0;a<n.length;a++){let o=n[a].name;i[o]=this.hasOwnProperty(o)?this[o]:n[a].init(e,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(n=>n.toJSON())),e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[n],a=i.spec.state;a&&a.toJSON&&(t[n]=a.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new If(e.schema,e.plugins),a=new _a(i);return i.fields.forEach(o=>{if(o.name=="doc")a.doc=ia.fromJSON(e.schema,t.doc);else if(o.name=="selection")a.selection=xt.fromJSON(a.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(a.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let s in n){let l=n[s],f=l.spec.state;if(l.key==o.name&&f&&f.fromJSON&&Object.prototype.hasOwnProperty.call(t,s)){a[o.name]=f.fromJSON.call(l,e,t[s],a);return}}a[o.name]=o.init(e,a)}}),a}}function Ab(r,e,t){for(let n in r){let i=r[n];i instanceof Function?i=i.bind(e):n=="handleDOMEvents"&&(i=Ab(i,e,{})),t[n]=i}return t}class mn{constructor(e){this.spec=e,this.props={},e.props&&Ab(e.props,this,this.props),this.key=e.key?e.key.key:Ob("plugin")}getState(e){return e[this.key]}}const Pf=Object.create(null);function Ob(r){return r in Pf?r+"$"+ ++Pf[r]:(Pf[r]=0,r+"$")}class qs{constructor(e="key"){this.key=Ob(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Hr=function(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e},Po=function(r){let e=r.assignedSlot||r.parentNode;return e&&e.nodeType==11?e.host:e};let Cd=null;const Di=function(r,e,t){let n=Cd||(Cd=document.createRange());return n.setEnd(r,t??r.nodeValue.length),n.setStart(r,e||0),n},eee=function(){Cd=null},Xa=function(r,e,t,n){return t&&(Uv(r,e,t,n,-1)||Uv(r,e,t,n,1))},tee=/^(img|br|input|textarea|hr)$/i;function Uv(r,e,t,n,i){for(var a;;){if(r==t&&e==n)return!0;if(e==(i<0?0:qn(r))){let o=r.parentNode;if(!o||o.nodeType!=1||Hs(r)||tee.test(r.nodeName)||r.contentEditable=="false")return!1;e=Hr(r)+(i<0?0:1),r=o}else if(r.nodeType==1){let o=r.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((a=o.pmViewDesc)===null||a===void 0)&&a.ignoreForSelection)e+=i;else return!1;else r=o,e=i<0?qn(r):0}else return!1}}function qn(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function ree(r,e){for(;;){if(r.nodeType==3&&e)return r;if(r.nodeType==1&&e>0){if(r.contentEditable=="false")return null;r=r.childNodes[e-1],e=qn(r)}else if(r.parentNode&&!Hs(r))e=Hr(r),r=r.parentNode;else return null}}function nee(r,e){for(;;){if(r.nodeType==3&&e<r.nodeValue.length)return r;if(r.nodeType==1&&e<r.childNodes.length){if(r.contentEditable=="false")return null;r=r.childNodes[e],e=0}else if(r.parentNode&&!Hs(r))e=Hr(r)+1,r=r.parentNode;else return null}}function iee(r,e,t){for(let n=e==0,i=e==qn(r);n||i;){if(r==t)return!0;let a=Hr(r);if(r=r.parentNode,!r)return!1;n=n&&a==0,i=i&&a==qn(r)}}function Hs(r){let e;for(let t=r;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==r||e.contentDOM==r)}const qu=function(r){return r.focusNode&&Xa(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)};function Ha(r,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=r,t.key=t.code=e,t}function aee(r){let e=r.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function oee(r,e,t){if(r.caretPositionFromPoint)try{let n=r.caretPositionFromPoint(e,t);if(n)return{node:n.offsetNode,offset:Math.min(qn(n.offsetNode),n.offset)}}catch{}if(r.caretRangeFromPoint){let n=r.caretRangeFromPoint(e,t);if(n)return{node:n.startContainer,offset:Math.min(qn(n.startContainer),n.startOffset)}}}const di=typeof navigator<"u"?navigator:null,$v=typeof document<"u"?document:null,ha=di&&di.userAgent||"",Td=/Edge\/(\d+)/.exec(ha),Nb=/MSIE \d/.exec(ha),Sd=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ha),pn=!!(Nb||Sd||Td),aa=Nb?document.documentMode:Sd?+Sd[1]:Td?+Td[1]:0,Hn=!pn&&/gecko\/(\d+)/i.test(ha);Hn&&+(/Firefox\/(\d+)/.exec(ha)||[0,0])[1];const xd=!pn&&/Chrome\/(\d+)/.exec(ha),Ar=!!xd,Db=xd?+xd[1]:0,Wr=!pn&&!!di&&/Apple Computer/.test(di.vendor),Bo=Wr&&(/Mobile\/\w+/.test(ha)||!!di&&di.maxTouchPoints>2),Fn=Bo||(di?/Mac/.test(di.platform):!1),Lb=di?/Win/.test(di.platform):!1,Ii=/Android \d/.test(ha),_s=!!$v&&"webkitFontSmoothing"in $v.documentElement.style,see=_s?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function lee(r){let e=r.defaultView&&r.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:r.documentElement.clientWidth,top:0,bottom:r.documentElement.clientHeight}}function Oi(r,e){return typeof r=="number"?r:r[e]}function uee(r){let e=r.getBoundingClientRect(),t=e.width/r.offsetWidth||1,n=e.height/r.offsetHeight||1;return{left:e.left,right:e.left+r.clientWidth*t,top:e.top,bottom:e.top+r.clientHeight*n}}function Wv(r,e,t){let n=r.someProp("scrollThreshold")||0,i=r.someProp("scrollMargin")||5,a=r.dom.ownerDocument;for(let o=t||r.dom;o;){if(o.nodeType!=1){o=Po(o);continue}let s=o,l=s==a.body,f=l?lee(a):uee(s),p=0,b=0;if(e.top<f.top+Oi(n,"top")?b=-(f.top-e.top+Oi(i,"top")):e.bottom>f.bottom-Oi(n,"bottom")&&(b=e.bottom-e.top>f.bottom-f.top?e.top+Oi(i,"top")-f.top:e.bottom-f.bottom+Oi(i,"bottom")),e.left<f.left+Oi(n,"left")?p=-(f.left-e.left+Oi(i,"left")):e.right>f.right-Oi(n,"right")&&(p=e.right-f.right+Oi(i,"right")),p||b)if(l)a.defaultView.scrollBy(p,b);else{let x=s.scrollLeft,E=s.scrollTop;b&&(s.scrollTop+=b),p&&(s.scrollLeft+=p);let B=s.scrollLeft-x,F=s.scrollTop-E;e={left:e.left-B,top:e.top-F,right:e.right-B,bottom:e.bottom-F}}let T=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(T))break;o=T=="absolute"?o.offsetParent:Po(o)}}function cee(r){let e=r.dom.getBoundingClientRect(),t=Math.max(0,e.top),n,i;for(let a=(e.left+e.right)/2,o=t+1;o<Math.min(innerHeight,e.bottom);o+=5){let s=r.root.elementFromPoint(a,o);if(!s||s==r.dom||!r.dom.contains(s))continue;let l=s.getBoundingClientRect();if(l.top>=t-20){n=s,i=l.top;break}}return{refDOM:n,refTop:i,stack:Rb(r.dom)}}function Rb(r){let e=[],t=r.ownerDocument;for(let n=r;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),r!=t);n=Po(n));return e}function fee({refDOM:r,refTop:e,stack:t}){let n=r?r.getBoundingClientRect().top:0;Ib(t,n==0?0:n-e)}function Ib(r,e){for(let t=0;t<r.length;t++){let{dom:n,top:i,left:a}=r[t];n.scrollTop!=i+e&&(n.scrollTop=i+e),n.scrollLeft!=a&&(n.scrollLeft=a)}}let ko=null;function dee(r){if(r.setActive)return r.setActive();if(ko)return r.focus(ko);let e=Rb(r);r.focus(ko==null?{get preventScroll(){return ko={preventScroll:!0},!0}}:void 0),ko||(ko=!1,Ib(e,0))}function Pb(r,e){let t,n=2e8,i,a=0,o=e.top,s=e.top,l,f;for(let p=r.firstChild,b=0;p;p=p.nextSibling,b++){let T;if(p.nodeType==1)T=p.getClientRects();else if(p.nodeType==3)T=Di(p).getClientRects();else continue;for(let x=0;x<T.length;x++){let E=T[x];if(E.top<=o&&E.bottom>=s){o=Math.max(E.bottom,o),s=Math.min(E.top,s);let B=E.left>e.left?E.left-e.left:E.right<e.left?e.left-E.right:0;if(B<n){t=p,n=B,i=B&&t.nodeType==3?{left:E.right<e.left?E.right:E.left,top:e.top}:e,p.nodeType==1&&B&&(a=b+(e.left>=(E.left+E.right)/2?1:0));continue}}else E.top>e.top&&!l&&E.left<=e.left&&E.right>=e.left&&(l=p,f={left:Math.max(E.left,Math.min(E.right,e.left)),top:E.top});!t&&(e.left>=E.right&&e.top>=E.top||e.left>=E.left&&e.top>=E.bottom)&&(a=b+1)}}return!t&&l&&(t=l,i=f,n=0),t&&t.nodeType==3?hee(t,i):!t||n&&t.nodeType==1?{node:r,offset:a}:Pb(t,i)}function hee(r,e){let t=r.nodeValue.length,n=document.createRange(),i;for(let a=0;a<t;a++){n.setEnd(r,a+1),n.setStart(r,a);let o=Xi(n,1);if(o.top!=o.bottom&&uh(e,o)){i={node:r,offset:a+(e.left>=(o.left+o.right)/2?1:0)};break}}return n.detach(),i||{node:r,offset:0}}function uh(r,e){return r.left>=e.left-1&&r.left<=e.right+1&&r.top>=e.top-1&&r.top<=e.bottom+1}function pee(r,e){let t=r.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<r.getBoundingClientRect().left?t:r}function vee(r,e,t){let{node:n,offset:i}=Pb(e,t),a=-1;if(n.nodeType==1&&!n.firstChild){let o=n.getBoundingClientRect();a=o.left!=o.right&&t.left>(o.left+o.right)/2?1:-1}return r.docView.posFromDOM(n,i,a)}function mee(r,e,t,n){let i=-1;for(let a=e,o=!1;a!=r.dom;){let s=r.docView.nearestDesc(a,!0),l;if(!s)return null;if(s.dom.nodeType==1&&(s.node.isBlock&&s.parent||!s.contentDOM)&&((l=s.dom.getBoundingClientRect()).width||l.height)&&(s.node.isBlock&&s.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(s.dom.nodeName)&&(!o&&l.left>n.left||l.top>n.top?i=s.posBefore:(!o&&l.right<n.left||l.bottom<n.top)&&(i=s.posAfter),o=!0),!s.contentDOM&&i<0&&!s.node.isText))return(s.node.isBlock?n.top<(l.top+l.bottom)/2:n.left<(l.left+l.right)/2)?s.posBefore:s.posAfter;a=s.dom.parentNode}return i>-1?i:r.docView.posFromDOM(e,t,-1)}function Bb(r,e,t){let n=r.childNodes.length;if(n&&t.top<t.bottom)for(let i=Math.max(0,Math.min(n-1,Math.floor(n*(e.top-t.top)/(t.bottom-t.top))-2)),a=i;;){let o=r.childNodes[a];if(o.nodeType==1){let s=o.getClientRects();for(let l=0;l<s.length;l++){let f=s[l];if(uh(e,f))return Bb(o,e,f)}}if((a=(a+1)%n)==i)break}return r}function gee(r,e){let t=r.dom.ownerDocument,n,i=0,a=oee(t,e.left,e.top);a&&({node:n,offset:i}=a);let o=(r.root.elementFromPoint?r.root:t).elementFromPoint(e.left,e.top),s;if(!o||!r.dom.contains(o.nodeType!=1?o.parentNode:o)){let f=r.dom.getBoundingClientRect();if(!uh(e,f)||(o=Bb(r.dom,e,f),!o))return null}if(Wr)for(let f=o;n&&f;f=Po(f))f.draggable&&(n=void 0);if(o=pee(o,e),n){if(Hn&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let p=n.childNodes[i],b;p.nodeName=="IMG"&&(b=p.getBoundingClientRect()).right<=e.left&&b.bottom>e.top&&i++}let f;_s&&i&&n.nodeType==1&&(f=n.childNodes[i-1]).nodeType==1&&f.contentEditable=="false"&&f.getBoundingClientRect().top>=e.top&&i--,n==r.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?s=r.state.doc.content.size:(i==0||n.nodeType!=1||n.childNodes[i-1].nodeName!="BR")&&(s=mee(r,n,i,e))}s==null&&(s=vee(r,o,e));let l=r.docView.nearestDesc(o,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function jv(r){return r.top<r.bottom||r.left<r.right}function Xi(r,e){let t=r.getClientRects();if(t.length){let n=t[e<0?0:t.length-1];if(jv(n))return n}return Array.prototype.find.call(t,jv)||r.getBoundingClientRect()}const yee=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Fb(r,e,t){let{node:n,offset:i,atom:a}=r.docView.domFromPos(e,t<0?-1:1),o=_s||Hn;if(n.nodeType==3)if(o&&(yee.test(n.nodeValue)||(t<0?!i:i==n.nodeValue.length))){let l=Xi(Di(n,i,i),t);if(Hn&&i&&/\s/.test(n.nodeValue[i-1])&&i<n.nodeValue.length){let f=Xi(Di(n,i-1,i-1),-1);if(f.top==l.top){let p=Xi(Di(n,i,i+1),-1);if(p.top!=l.top)return cs(p,p.left<f.left)}}return l}else{let l=i,f=i,p=t<0?1:-1;return t<0&&!i?(f++,p=-1):t>=0&&i==n.nodeValue.length?(l--,p=1):t<0?l--:f++,cs(Xi(Di(n,l,f),p),p<0)}if(!r.state.doc.resolve(e-(a||0)).parent.inlineContent){if(a==null&&i&&(t<0||i==qn(n))){let l=n.childNodes[i-1];if(l.nodeType==1)return Bf(l.getBoundingClientRect(),!1)}if(a==null&&i<qn(n)){let l=n.childNodes[i];if(l.nodeType==1)return Bf(l.getBoundingClientRect(),!0)}return Bf(n.getBoundingClientRect(),t>=0)}if(a==null&&i&&(t<0||i==qn(n))){let l=n.childNodes[i-1],f=l.nodeType==3?Di(l,qn(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(f)return cs(Xi(f,1),!1)}if(a==null&&i<qn(n)){let l=n.childNodes[i];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let f=l?l.nodeType==3?Di(l,0,o?0:1):l.nodeType==1?l:null:null;if(f)return cs(Xi(f,-1),!0)}return cs(Xi(n.nodeType==3?Di(n):n,-t),t>=0)}function cs(r,e){if(r.width==0)return r;let t=e?r.left:r.right;return{top:r.top,bottom:r.bottom,left:t,right:t}}function Bf(r,e){if(r.height==0)return r;let t=e?r.top:r.bottom;return{top:t,bottom:t,left:r.left,right:r.right}}function qb(r,e,t){let n=r.state,i=r.root.activeElement;n!=e&&r.updateState(e),i!=r.dom&&r.focus();try{return t()}finally{n!=e&&r.updateState(n),i!=r.dom&&i&&i.focus()}}function bee(r,e,t){let n=e.selection,i=t=="up"?n.$from:n.$to;return qb(r,e,()=>{let{node:a}=r.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let s=r.docView.nearestDesc(a,!0);if(!s)break;if(s.node.isBlock){a=s.contentDOM||s.dom;break}a=s.dom.parentNode}let o=Fb(r,i.pos,1);for(let s=a.firstChild;s;s=s.nextSibling){let l;if(s.nodeType==1)l=s.getClientRects();else if(s.nodeType==3)l=Di(s,0,s.nodeValue.length).getClientRects();else continue;for(let f=0;f<l.length;f++){let p=l[f];if(p.bottom>p.top+1&&(t=="up"?o.top-p.top>(p.bottom-o.top)*2:p.bottom-o.bottom>(o.bottom-p.top)*2))return!1}}return!0})}const kee=/[\u0590-\u08ac]/;function wee(r,e,t){let{$head:n}=e.selection;if(!n.parent.isTextblock)return!1;let i=n.parentOffset,a=!i,o=i==n.parent.content.size,s=r.domSelection();return s?!kee.test(n.parent.textContent)||!s.modify?t=="left"||t=="backward"?a:o:qb(r,e,()=>{let{focusNode:l,focusOffset:f,anchorNode:p,anchorOffset:b}=r.domSelectionRange(),T=s.caretBidiLevel;s.modify("move",t,"character");let x=n.depth?r.docView.domAfterPos(n.before()):r.dom,{focusNode:E,focusOffset:B}=r.domSelectionRange(),F=E&&!x.contains(E.nodeType==1?E:E.parentNode)||l==E&&f==B;try{s.collapse(p,b),l&&(l!=p||f!=b)&&s.extend&&s.extend(l,f)}catch{}return T!=null&&(s.caretBidiLevel=T),F}):n.pos==n.start()||n.pos==n.end()}let Gv=null,Kv=null,Jv=!1;function Cee(r,e,t){return Gv==e&&Kv==t?Jv:(Gv=e,Kv=t,Jv=t=="up"||t=="down"?bee(r,e,t):wee(r,e,t))}const _n=0,Yv=1,za=2,Xn=3;class zs{constructor(e,t,n,i){this.parent=e,this.children=t,this.dom=n,this.contentDOM=i,this.dirty=_n,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let i=this.children[t];if(i==e)return n;n+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let a,o;if(e==this.contentDOM)a=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;a=e.previousSibling}for(;a&&!((o=a.pmViewDesc)&&o.parent==this);)a=a.previousSibling;return a?this.posBeforeChild(o)+o.size:this.posAtStart}else{let a,o;if(e==this.contentDOM)a=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;a=e.nextSibling}for(;a&&!((o=a.pmViewDesc)&&o.parent==this);)a=a.nextSibling;return a?this.posBeforeChild(o):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=t>Hr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let a=e;;a=a.parentNode){if(a==this.dom){i=!1;break}if(a.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let a=e;;a=a.parentNode){if(a==this.dom){i=!0;break}if(a.nextSibling)break}}return i??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,i=e;i;i=i.parentNode){let a=this.getDesc(i),o;if(a&&(!t||a.node))if(n&&(o=a.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))n=!1;else return a}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let i=e;i;i=i.parentNode){let a=this.getDesc(i);if(a)return a.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let i=this.children[t],a=n+i.size;if(n==e&&a!=n){for(;!i.border&&i.children.length;)for(let o=0;o<i.children.length;o++){let s=i.children[o];if(s.size){i=s;break}}return i}if(e<a)return i.descAt(e-n-i.border);n=a}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,i=0;for(let a=0;n<this.children.length;n++){let o=this.children[n],s=a+o.size;if(s>e||o instanceof _b){i=e-a;break}a=s}if(i)return this.children[n].domFromPos(i-this.children[n].border,t);for(let a;n&&!(a=this.children[n-1]).size&&a instanceof Hb&&a.side>=0;n--);if(t<=0){let a,o=!0;for(;a=n?this.children[n-1]:null,!(!a||a.dom.parentNode==this.contentDOM);n--,o=!1);return a&&t&&o&&!a.border&&!a.domAtom?a.domFromPos(a.size,t):{node:this.contentDOM,offset:a?Hr(a.dom)+1:0}}else{let a,o=!0;for(;a=n<this.children.length?this.children[n]:null,!(!a||a.dom.parentNode==this.contentDOM);n++,o=!1);return a&&o&&!a.border&&!a.domAtom?a.domFromPos(0,t):{node:this.contentDOM,offset:a?Hr(a.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,a=-1;for(let o=n,s=0;;s++){let l=this.children[s],f=o+l.size;if(i==-1&&e<=f){let p=o+l.border;if(e>=p&&t<=f-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,p);e=o;for(let b=s;b>0;b--){let T=this.children[b-1];if(T.size&&T.dom.parentNode==this.contentDOM&&!T.emptyChildAt(1)){i=Hr(T.dom)+1;break}e-=T.size}i==-1&&(i=0)}if(i>-1&&(f>t||s==this.children.length-1)){t=f;for(let p=s+1;p<this.children.length;p++){let b=this.children[p];if(b.size&&b.dom.parentNode==this.contentDOM&&!b.emptyChildAt(-1)){a=Hr(b.dom);break}t+=b.size}a==-1&&(a=this.contentDOM.childNodes.length);break}o=f}return{node:this.contentDOM,from:e,to:t,fromOffset:i,toOffset:a}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(t.nodeType!=1||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,i=!1){let a=Math.min(e,t),o=Math.max(e,t);for(let x=0,E=0;x<this.children.length;x++){let B=this.children[x],F=E+B.size;if(a>E&&o<F)return B.setSelection(e-E-B.border,t-E-B.border,n,i);E=F}let s=this.domFromPos(e,e?-1:1),l=t==e?s:this.domFromPos(t,t?-1:1),f=n.root.getSelection(),p=n.domSelectionRange(),b=!1;if((Hn||Wr)&&e==t){let{node:x,offset:E}=s;if(x.nodeType==3){if(b=!!(E&&x.nodeValue[E-1]==`
|
|
6
|
-
`),b&&E==x.nodeValue.length)for(let B=x,F;B;B=B.parentNode){if(F=B.nextSibling){F.nodeName=="BR"&&(s=l={node:F.parentNode,offset:Hr(F)+1});break}let _=B.pmViewDesc;if(_&&_.node&&_.node.isBlock)break}}else{let B=x.childNodes[E-1];b=B&&(B.nodeName=="BR"||B.contentEditable=="false")}}if(Hn&&p.focusNode&&p.focusNode!=l.node&&p.focusNode.nodeType==1){let x=p.focusNode.childNodes[p.focusOffset];x&&x.contentEditable=="false"&&(i=!0)}if(!(i||b&&Wr)&&Xa(s.node,s.offset,p.anchorNode,p.anchorOffset)&&Xa(l.node,l.offset,p.focusNode,p.focusOffset))return;let T=!1;if((f.extend||e==t)&&!(b&&Hn)){f.collapse(s.node,s.offset);try{e!=t&&f.extend(l.node,l.offset),T=!0}catch{}}if(!T){if(e>t){let E=s;s=l,l=E}let x=document.createRange();x.setEnd(l.node,l.offset),x.setStart(s.node,s.offset),f.removeAllRanges(),f.addRange(x)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,i=0;i<this.children.length;i++){let a=this.children[i],o=n+a.size;if(n==o?e<=o&&t>=n:e<o&&t>n){let s=n+a.border,l=o-a.border;if(e>=s&&t<=l){this.dirty=e==n||t==o?za:Yv,e==s&&t==l&&(a.contentLost||a.dom.parentNode!=this.contentDOM)?a.dirty=Xn:a.markDirty(e-s,t-s);return}else a.dirty=a.dom==a.contentDOM&&a.dom.parentNode==this.contentDOM&&!a.children.length?za:Xn}n=o}this.dirty=za}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?za:Yv;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class Hb extends zs{constructor(e,t,n,i){let a,o=t.type.toDOM;if(typeof o=="function"&&(o=o(n,()=>{if(!a)return i;if(a.parent)return a.parent.posBeforeChild(a)})),!t.type.spec.raw){if(o.nodeType!=1){let s=document.createElement("span");s.appendChild(o),o=s}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,a=this}matchesWidget(e){return this.dirty==_n&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class Tee extends zs{constructor(e,t,n,i){super(e,[],t,null),this.textDOM=n,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class oa extends zs{constructor(e,t,n,i,a){super(e,[],n,i),this.mark=t,this.spec=a}static create(e,t,n,i){let a=i.nodeViews[t.type.name],o=a&&a(t,i,n);return(!o||!o.dom)&&(o=Jo.renderSpec(document,t.type.spec.toDOM(t,n),null,t.attrs)),new oa(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Xn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Xn&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=_n){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty<this.dirty&&(n.dirty=this.dirty),this.dirty=_n}}slice(e,t,n){let i=oa.create(this.parent,this.mark,!0,n),a=this.children,o=this.size;t<o&&(a=Md(a,t,o,n)),e>0&&(a=Md(a,0,e,n));for(let s=0;s<a.length;s++)a[s].parent=i;return i.children=a,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class sa extends zs{constructor(e,t,n,i,a,o,s){super(e,[],a,o),this.node=t,this.outerDeco=n,this.innerDeco=i,this.nodeDOM=s}static create(e,t,n,i,a,o){let s=a.nodeViews[t.type.name],l,f=s&&s(t,a,()=>{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},n,i),p=f&&f.dom,b=f&&f.contentDOM;if(t.isText){if(!p)p=document.createTextNode(t.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:b}=Jo.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!b&&!t.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),t.type.spec.draggable&&(p.draggable=!0));let T=p;return p=Ub(p,n,t),f?l=new See(e,t,n,i,p,b||null,T,f):t.isText?new Hu(e,t,n,i,p,T):new sa(e,t,n,i,p,b||null,T)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>De.empty)}return e}matchesNode(e,t,n){return this.dirty==_n&&e.eq(this.node)&&fu(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,i=t,a=e.composing?this.localCompositionInfo(e,t):null,o=a&&a.pos>-1?a:null,s=a&&a.pos<0,l=new Eee(this,o&&o.node,e);Oee(this.node,this.innerDeco,(f,p,b)=>{f.spec.marks?l.syncToMarks(f.spec.marks,n,e,p):f.type.side>=0&&!b&&l.syncToMarks(p==this.node.childCount?qt.none:this.node.child(p).marks,n,e,p),l.placeWidget(f,e,i)},(f,p,b,T)=>{l.syncToMarks(f.marks,n,e,T);let x;l.findNodeMatch(f,p,b,T)||s&&e.state.selection.from>i&&e.state.selection.to<i+f.nodeSize&&(x=l.findIndexWithChild(a.node))>-1&&l.updateNodeAt(f,p,b,x,e)||l.updateNextNode(f,p,b,e,T,i)||l.addNode(f,p,b,e,i),i+=f.nodeSize}),l.syncToMarks([],n,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==za)&&(o&&this.protectLocalComposition(e,o),zb(this.contentDOM,this.children,e),Bo&&Nee(this.dom))}localCompositionInfo(e,t){let{from:n,to:i}=e.state.selection;if(!(e.state.selection instanceof St)||n<t||i>t+this.node.content.size)return null;let a=e.input.compositionNode;if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){let o=a.nodeValue,s=Dee(this.node.content,o,n-t,i-t);return s<0?null:{node:a,pos:s,text:o}}else return{node:a,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:i}){if(this.getDesc(t))return;let a=t;for(;a.parentNode!=this.contentDOM;a=a.parentNode){for(;a.previousSibling;)a.parentNode.removeChild(a.previousSibling);for(;a.nextSibling;)a.parentNode.removeChild(a.nextSibling);a.pmViewDesc&&(a.pmViewDesc=void 0)}let o=new Tee(this,a,t,i);e.input.compositionNodes.push(o),this.children=Md(this.children,n,n+i.length,e,o)}update(e,t,n,i){return this.dirty==Xn||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,i),!0)}updateInner(e,t,n,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=_n}updateOuterDeco(e){if(fu(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=Vb(this.dom,this.nodeDOM,Ed(this.outerDeco,this.node,t),Ed(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Xv(r,e,t,n,i){Ub(n,e,r);let a=new sa(void 0,r,e,t,n,n,n);return a.contentDOM&&a.updateChildren(i,0),a}class Hu extends sa{constructor(e,t,n,i,a,o){super(e,t,n,i,a,null,o)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,i){return this.dirty==Xn||this.dirty!=_n&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=_n||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=_n,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,n){let i=this.node.cut(e,t),a=document.createTextNode(i.text);return new Hu(this.parent,i,this.outerDeco,this.innerDeco,a,a)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Xn)}get domAtom(){return!1}isText(e){return this.node.text==e}}class _b extends zs{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==_n&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class See extends sa{constructor(e,t,n,i,a,o,s,l){super(e,t,n,i,a,o,s),this.spec=l}update(e,t,n,i){if(this.dirty==Xn)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let a=this.spec.update(e,t,n);return a&&this.updateInner(e,t,n,i),a}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,n,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,i){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function zb(r,e,t){let n=r.firstChild,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=o.dom;if(s.parentNode==r){for(;s!=n;)n=Zv(n),i=!0;n=n.nextSibling}else i=!0,r.insertBefore(s,n);if(o instanceof oa){let l=n?n.previousSibling:r.lastChild;zb(o.contentDOM,o.children,t),n=l?l.nextSibling:r.firstChild}}for(;n;)n=Zv(n),i=!0;i&&t.trackWrites==r&&(t.trackWrites=null)}const Ts=function(r){r&&(this.nodeName=r)};Ts.prototype=Object.create(null);const Va=[new Ts];function Ed(r,e,t){if(r.length==0)return Va;let n=t?Va[0]:new Ts,i=[n];for(let a=0;a<r.length;a++){let o=r[a].type.attrs;if(o){o.nodeName&&i.push(n=new Ts(o.nodeName));for(let s in o){let l=o[s];l!=null&&(t&&i.length==1&&i.push(n=new Ts(e.isInline?"span":"div")),s=="class"?n.class=(n.class?n.class+" ":"")+l:s=="style"?n.style=(n.style?n.style+";":"")+l:s!="nodeName"&&(n[s]=l))}}}return i}function Vb(r,e,t,n){if(t==Va&&n==Va)return e;let i=e;for(let a=0;a<n.length;a++){let o=n[a],s=t[a];if(a){let l;s&&s.nodeName==o.nodeName&&i!=r&&(l=i.parentNode)&&l.nodeName.toLowerCase()==o.nodeName||(l=document.createElement(o.nodeName),l.pmIsDeco=!0,l.appendChild(i),s=Va[0]),i=l}xee(i,s||Va[0],o)}return i}function xee(r,e,t){for(let n in e)n!="class"&&n!="style"&&n!="nodeName"&&!(n in t)&&r.removeAttribute(n);for(let n in t)n!="class"&&n!="style"&&n!="nodeName"&&t[n]!=e[n]&&r.setAttribute(n,t[n]);if(e.class!=t.class){let n=e.class?e.class.split(" ").filter(Boolean):[],i=t.class?t.class.split(" ").filter(Boolean):[];for(let a=0;a<n.length;a++)i.indexOf(n[a])==-1&&r.classList.remove(n[a]);for(let a=0;a<i.length;a++)n.indexOf(i[a])==-1&&r.classList.add(i[a]);r.classList.length==0&&r.removeAttribute("class")}if(e.style!=t.style){if(e.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=n.exec(e.style);)r.style.removeProperty(i[1])}t.style&&(r.style.cssText+=t.style)}}function Ub(r,e,t){return Vb(r,r,Va,Ed(e,t,r.nodeType!=1))}function fu(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(!r[t].type.eq(e[t].type))return!1;return!0}function Zv(r){let e=r.nextSibling;return r.parentNode.removeChild(r),e}class Eee{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Mee(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,i){let a=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;a<s&&(a==o-1?this.top:this.stack[a+1<<1]).matchesMark(e[a])&&e[a].type.spec.spanning!==!1;)a++;for(;a<o;)this.destroyRest(),this.top.dirty=_n,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let l=-1,f=this.top.children.length;i<this.preMatch.index&&(f=Math.min(this.index+3,f));for(let p=this.index;p<f;p++){let b=this.top.children[p];if(b.matchesMark(e[o])&&!this.isLocked(b.dom)){l=p;break}}if(l<0&&this.index<this.top.children.length){let p=this.top.children[this.index];p instanceof oa&&p.dirty!=Xn&&p.mark.type==e[o].type&&p.spec.update&&!this.isLocked(p.dom)&&p.spec.update(e[o])&&(p.mark=e[o],l=this.index,this.changed=!0)}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let p=oa.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,p),this.top=p,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,i){let a=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))a=this.top.children.indexOf(o,this.index);else for(let s=this.index,l=Math.min(this.top.children.length,s+5);s<l;s++){let f=this.top.children[s];if(f.matchesNode(e,t,n)&&!this.preMatch.matched.has(f)){a=s;break}}return a<0?!1:(this.destroyBetween(this.index,a),this.index++,!0)}updateNodeAt(e,t,n,i,a){let o=this.top.children[i];return o.dirty==Xn&&o.dom==o.contentDOM&&(o.dirty=za),o.update(e,t,n,a)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let n=e.pmViewDesc;if(n){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==n)return i}return-1}e=t}}updateNextNode(e,t,n,i,a,o){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof sa){let f=this.preMatch.matched.get(l);if(f!=null&&f!=a)return!1;let p=l.dom,b,T=this.isLocked(p)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Xn&&fu(t,l.outerDeco));if(!T&&l.update(e,t,n,i))return this.destroyBetween(this.index,s),l.dom!=p&&(this.changed=!0),this.index++,!0;if(!T&&(b=this.recreateWrapper(l,e,t,n,i,o)))return this.destroyBetween(this.index,s),this.top.children[this.index]=b,b.contentDOM&&(b.dirty=za,b.updateChildren(i,o+1),b.dirty=_n),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,i,a,o){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!fu(n,e.outerDeco)||!i.eq(e.innerDeco))return null;let s=sa.create(this.top,t,n,i,a,o);if(s.contentDOM){s.children=e.children,e.children=[];for(let l of s.children)l.parent=s}return e.destroy(),s}addNode(e,t,n,i,a){let o=sa.create(this.top,e,t,n,i,a);o.contentDOM&&o.updateChildren(i,a+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,t,n){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let a=new Hb(this.top,e,t,n);this.top.children.splice(this.index++,0,a),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof oa;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Hu)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Wr||Ar)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e=="IMG"&&(n.className="ProseMirror-separator",n.alt=""),e=="BR"&&(n.className="ProseMirror-trailingBreak");let i=new _b(this.top,[],n,null);t!=this.top?t.children.push(i):t.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function Mee(r,e){let t=e,n=t.children.length,i=r.childCount,a=new Map,o=[];e:for(;i>0;){let s;for(;;)if(n){let f=t.children[n-1];if(f instanceof oa)t=f,n=f.children.length;else{s=f,n--;break}}else{if(t==e)break e;n=t.parent.children.indexOf(t),t=t.parent}let l=s.node;if(l){if(l!=r.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function Aee(r,e){return r.type.side-e.type.side}function Oee(r,e,t,n){let i=e.locals(r),a=0;if(i.length==0){for(let f=0;f<r.childCount;f++){let p=r.child(f);n(p,i,e.forChild(a,p),f),a+=p.nodeSize}return}let o=0,s=[],l=null;for(let f=0;;){let p,b;for(;o<i.length&&i[o].to==a;){let F=i[o++];F.widget&&(p?(b||(b=[p])).push(F):p=F)}if(p)if(b){b.sort(Aee);for(let F=0;F<b.length;F++)t(b[F],f,!!l)}else t(p,f,!!l);let T,x;if(l)x=-1,T=l,l=null;else if(f<r.childCount)x=f,T=r.child(f++);else break;for(let F=0;F<s.length;F++)s[F].to<=a&&s.splice(F--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let E=a+T.nodeSize;if(T.isText){let F=E;o<i.length&&i[o].from<F&&(F=i[o].from);for(let _=0;_<s.length;_++)s[_].to<F&&(F=s[_].to);F<E&&(l=T.cut(F-a),T=T.cut(0,F-a),E=F,x=-1)}else for(;o<i.length&&i[o].to<E;)o++;let B=T.isInline&&!T.isLeaf?s.filter(F=>!F.inline):s.slice();n(T,B,e.forChild(a,T),x),a=E}}function Nee(r){if(r.nodeName=="UL"||r.nodeName=="OL"){let e=r.style.cssText;r.style.cssText=e+"; list-style: square !important",window.getComputedStyle(r).listStyle,r.style.cssText=e}}function Dee(r,e,t,n){for(let i=0,a=0;i<r.childCount&&a<=n;){let o=r.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let l=o.text;for(;i<r.childCount;){let f=r.child(i++);if(a+=f.nodeSize,!f.isText)break;l+=f.text}if(a>=t){if(a>=n&&l.slice(n-e.length-s,n-s)==e)return n-e.length;let f=s<n?l.lastIndexOf(e,n-s-1):-1;if(f>=0&&f+e.length+s>=t)return s+f;if(t==n&&l.length>=n+e.length-s&&l.slice(n-s,n-s+e.length)==e)return n}}return-1}function Md(r,e,t,n,i){let a=[];for(let o=0,s=0;o<r.length;o++){let l=r[o],f=s,p=s+=l.size;f>=t||p<=e?a.push(l):(f<e&&a.push(l.slice(0,e-f,n)),i&&(a.push(i),i=void 0),p>t&&a.push(l.slice(t-f,l.size,n)))}return a}function ch(r,e=null){let t=r.domSelectionRange(),n=r.state.doc;if(!t.focusNode)return null;let i=r.docView.nearestDesc(t.focusNode),a=i&&i.size==0,o=r.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(o<0)return null;let s=n.resolve(o),l,f;if(qu(t)){for(l=o;i&&!i.node;)i=i.parent;let b=i.node;if(i&&b.isAtom&&ht.isSelectable(b)&&i.parent&&!(b.isInline&&iee(t.focusNode,t.focusOffset,i.dom))){let T=i.posBefore;f=new ht(o==T?s:n.resolve(T))}}else{if(t instanceof r.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let b=o,T=o;for(let x=0;x<t.rangeCount;x++){let E=t.getRangeAt(x);b=Math.min(b,r.docView.posFromDOM(E.startContainer,E.startOffset,1)),T=Math.max(T,r.docView.posFromDOM(E.endContainer,E.endOffset,-1))}if(b<0)return null;[l,o]=T==r.state.selection.anchor?[T,b]:[b,T],s=n.resolve(o)}else l=r.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(l<0)return null}let p=n.resolve(l);if(!f){let b=e=="pointer"||r.state.selection.head<s.pos&&!a?1:-1;f=fh(r,p,s,b)}return f}function $b(r){return r.editable?r.hasFocus():jb(r)&&document.activeElement&&document.activeElement.contains(r.dom)}function Fi(r,e=!1){let t=r.state.selection;if(Wb(r,t),!$b(r))return;let n=r.input.mouseDown;if(!e&&Ar&&n){let i=r.domSelectionRange(),a=r.domObserver.currentSelection;if(i.anchorNode&&a.anchorNode&&Xa(i.anchorNode,i.anchorOffset,a.anchorNode,a.anchorOffset)&&n.delaySelUpdate()){r.domObserver.setCurSelection();return}}if(r.domObserver.disconnectSelection(),r.cursorWrapper)Ree(r);else{let{anchor:i,head:a}=t,o,s;Qv&&!(t instanceof St)&&(t.$from.parent.inlineContent||(o=em(r,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(s=em(r,t.to))),r.docView.setSelection(i,a,r,e),Qv&&(o&&tm(o),s&&tm(s)),t.visible?r.dom.classList.remove("ProseMirror-hideselection"):(r.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Lee(r))}r.domObserver.setCurSelection(),r.domObserver.connectSelection()}const Qv=Wr||Ar&&Db<63;function em(r,e){let{node:t,offset:n}=r.docView.domFromPos(e,0),i=n<t.childNodes.length?t.childNodes[n]:null,a=n?t.childNodes[n-1]:null;if(Wr&&i&&i.contentEditable=="false")return Ff(i);if((!i||i.contentEditable=="false")&&(!a||a.contentEditable=="false")){if(i)return Ff(i);if(a)return Ff(a)}}function Ff(r){return r.contentEditable="true",Wr&&r.draggable&&(r.draggable=!1,r.wasDraggable=!0),r}function tm(r){r.contentEditable="false",r.wasDraggable&&(r.draggable=!0,r.wasDraggable=null)}function Lee(r){let e=r.dom.ownerDocument;e.removeEventListener("selectionchange",r.input.hideSelectionGuard);let t=r.domSelectionRange(),n=t.anchorNode,i=t.anchorOffset;e.addEventListener("selectionchange",r.input.hideSelectionGuard=()=>{(t.anchorNode!=n||t.anchorOffset!=i)&&(e.removeEventListener("selectionchange",r.input.hideSelectionGuard),setTimeout(()=>{(!$b(r)||r.state.selection.visible)&&r.dom.classList.remove("ProseMirror-hideselection")},20))})}function Ree(r){let e=r.domSelection();if(!e)return;let t=r.cursorWrapper.dom,n=t.nodeName=="IMG";n?e.collapse(t.parentNode,Hr(t)+1):e.collapse(t,0),!n&&!r.state.selection.visible&&pn&&aa<=11&&(t.disabled=!0,t.disabled=!1)}function Wb(r,e){if(e instanceof ht){let t=r.docView.descAt(e.from);t!=r.lastSelectedViewDesc&&(rm(r),t&&t.selectNode(),r.lastSelectedViewDesc=t)}else rm(r)}function rm(r){r.lastSelectedViewDesc&&(r.lastSelectedViewDesc.parent&&r.lastSelectedViewDesc.deselectNode(),r.lastSelectedViewDesc=void 0)}function fh(r,e,t,n){return r.someProp("createSelectionBetween",i=>i(r,e,t))||St.between(e,t,n)}function nm(r){return r.editable&&!r.hasFocus()?!1:jb(r)}function jb(r){let e=r.domSelectionRange();if(!e.anchorNode)return!1;try{return r.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(r.editable||r.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function Iee(r){let e=r.docView.domFromPos(r.state.selection.anchor,0),t=r.domSelectionRange();return Xa(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Ad(r,e){let{$anchor:t,$head:n}=r.selection,i=e>0?t.max(n):t.min(n),a=i.parent.inlineContent?i.depth?r.doc.resolve(e>0?i.after():i.before()):null:i;return a&&xt.findFrom(a,e)}function Zi(r,e){return r.dispatch(r.state.tr.setSelection(e).scrollIntoView()),!0}function im(r,e,t){let n=r.state.selection;if(n instanceof St)if(t.indexOf("s")>-1){let{$head:i}=n,a=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!a||a.isText||!a.isLeaf)return!1;let o=r.state.doc.resolve(i.pos+a.nodeSize*(e<0?-1:1));return Zi(r,new St(n.$anchor,o))}else if(n.empty){if(r.endOfTextblock(e>0?"forward":"backward")){let i=Ad(r.state,e);return i&&i instanceof ht?Zi(r,i):!1}else if(!(Fn&&t.indexOf("m")>-1)){let i=n.$head,a=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!a||a.isText)return!1;let s=e<0?i.pos-a.nodeSize:i.pos;return a.isAtom||(o=r.docView.descAt(s))&&!o.contentDOM?ht.isSelectable(a)?Zi(r,new ht(e<0?r.state.doc.resolve(i.pos-a.nodeSize):i)):_s?Zi(r,new St(r.state.doc.resolve(e<0?s:s+a.nodeSize))):!1:!1}}else return!1;else{if(n instanceof ht&&n.node.isInline)return Zi(r,new St(e>0?n.$to:n.$from));{let i=Ad(r.state,e);return i?Zi(r,i):!1}}}function du(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function Ss(r,e){let t=r.pmViewDesc;return t&&t.size==0&&(e<0||r.nextSibling||r.nodeName!="BR")}function wo(r,e){return e<0?Pee(r):Bee(r)}function Pee(r){let e=r.domSelectionRange(),t=e.focusNode,n=e.focusOffset;if(!t)return;let i,a,o=!1;for(Hn&&t.nodeType==1&&n<du(t)&&Ss(t.childNodes[n],-1)&&(o=!0);;)if(n>0){if(t.nodeType!=1)break;{let s=t.childNodes[n-1];if(Ss(s,-1))i=t,a=--n;else if(s.nodeType==3)t=s,n=t.nodeValue.length;else break}}else{if(Gb(t))break;{let s=t.previousSibling;for(;s&&Ss(s,-1);)i=t.parentNode,a=Hr(s),s=s.previousSibling;if(s)t=s,n=du(t);else{if(t=t.parentNode,t==r.dom)break;n=0}}}o?Od(r,t,n):i&&Od(r,i,a)}function Bee(r){let e=r.domSelectionRange(),t=e.focusNode,n=e.focusOffset;if(!t)return;let i=du(t),a,o;for(;;)if(n<i){if(t.nodeType!=1)break;let s=t.childNodes[n];if(Ss(s,1))a=t,o=++n;else break}else{if(Gb(t))break;{let s=t.nextSibling;for(;s&&Ss(s,1);)a=s.parentNode,o=Hr(s)+1,s=s.nextSibling;if(s)t=s,n=0,i=du(t);else{if(t=t.parentNode,t==r.dom)break;n=i=0}}}a&&Od(r,a,o)}function Gb(r){let e=r.pmViewDesc;return e&&e.node&&e.node.isBlock}function Fee(r,e){for(;r&&e==r.childNodes.length&&!Hs(r);)e=Hr(r)+1,r=r.parentNode;for(;r&&e<r.childNodes.length;){let t=r.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;r=t,e=0}}function qee(r,e){for(;r&&!e&&!Hs(r);)e=Hr(r),r=r.parentNode;for(;r&&e;){let t=r.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;r=t,e=r.childNodes.length}}function Od(r,e,t){if(e.nodeType!=3){let a,o;(o=Fee(e,t))?(e=o,t=0):(a=qee(e,t))&&(e=a,t=a.nodeValue.length)}let n=r.domSelection();if(!n)return;if(qu(n)){let a=document.createRange();a.setEnd(e,t),a.setStart(e,t),n.removeAllRanges(),n.addRange(a)}else n.extend&&n.extend(e,t);r.domObserver.setCurSelection();let{state:i}=r;setTimeout(()=>{r.state==i&&Fi(r)},50)}function am(r,e){let t=r.state.doc.resolve(e);if(!(Ar||Lb)&&t.parent.inlineContent){let i=r.coordsAtPos(e);if(e>t.start()){let a=r.coordsAtPos(e-1),o=(a.top+a.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(a.left-i.left)>1)return a.left<i.left?"ltr":"rtl"}if(e<t.end()){let a=r.coordsAtPos(e+1),o=(a.top+a.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(a.left-i.left)>1)return a.left>i.left?"ltr":"rtl"}}return getComputedStyle(r.dom).direction=="rtl"?"rtl":"ltr"}function om(r,e,t){let n=r.state.selection;if(n instanceof St&&!n.empty||t.indexOf("s")>-1||Fn&&t.indexOf("m")>-1)return!1;let{$from:i,$to:a}=n;if(!i.parent.inlineContent||r.endOfTextblock(e<0?"up":"down")){let o=Ad(r.state,e);if(o&&o instanceof ht)return Zi(r,o)}if(!i.parent.inlineContent){let o=e<0?i:a,s=n instanceof Qr?xt.near(o,e):xt.findFrom(o,e);return s?Zi(r,s):!1}return!1}function sm(r,e){if(!(r.state.selection instanceof St))return!0;let{$head:t,$anchor:n,empty:i}=r.state.selection;if(!t.sameParent(n))return!0;if(!i)return!1;if(r.endOfTextblock(e>0?"forward":"backward"))return!0;let a=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(a&&!a.isText){let o=r.state.tr;return e<0?o.delete(t.pos-a.nodeSize,t.pos):o.delete(t.pos,t.pos+a.nodeSize),r.dispatch(o),!0}return!1}function lm(r,e,t){r.domObserver.stop(),e.contentEditable=t,r.domObserver.start()}function Hee(r){if(!Wr||r.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=r.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let n=e.firstChild;lm(r,n,"true"),setTimeout(()=>lm(r,n,"false"),20)}return!1}function _ee(r){let e="";return r.ctrlKey&&(e+="c"),r.metaKey&&(e+="m"),r.altKey&&(e+="a"),r.shiftKey&&(e+="s"),e}function zee(r,e){let t=e.keyCode,n=_ee(e);if(t==8||Fn&&t==72&&n=="c")return sm(r,-1)||wo(r,-1);if(t==46&&!e.shiftKey||Fn&&t==68&&n=="c")return sm(r,1)||wo(r,1);if(t==13||t==27)return!0;if(t==37||Fn&&t==66&&n=="c"){let i=t==37?am(r,r.state.selection.from)=="ltr"?-1:1:-1;return im(r,i,n)||wo(r,i)}else if(t==39||Fn&&t==70&&n=="c"){let i=t==39?am(r,r.state.selection.from)=="ltr"?1:-1:1;return im(r,i,n)||wo(r,i)}else{if(t==38||Fn&&t==80&&n=="c")return om(r,-1,n)||wo(r,-1);if(t==40||Fn&&t==78&&n=="c")return Hee(r)||om(r,1,n)||wo(r,1);if(n==(Fn?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function dh(r,e){r.someProp("transformCopied",x=>{e=x(e,r)});let t=[],{content:n,openStart:i,openEnd:a}=e;for(;i>1&&a>1&&n.childCount==1&&n.firstChild.childCount==1;){i--,a--;let x=n.firstChild;t.push(x.type.name,x.attrs!=x.type.defaultAttrs?x.attrs:null),n=x.content}let o=r.someProp("clipboardSerializer")||Jo.fromSchema(r.state.schema),s=Qb(),l=s.createElement("div");l.appendChild(o.serializeFragment(n,{document:s}));let f=l.firstChild,p,b=0;for(;f&&f.nodeType==1&&(p=Zb[f.nodeName.toLowerCase()]);){for(let x=p.length-1;x>=0;x--){let E=s.createElement(p[x]);for(;l.firstChild;)E.appendChild(l.firstChild);l.appendChild(E),b++}f=l.firstChild}f&&f.nodeType==1&&f.setAttribute("data-pm-slice",`${i} ${a}${b?` -${b}`:""} ${JSON.stringify(t)}`);let T=r.someProp("clipboardTextSerializer",x=>x(e,r))||e.content.textBetween(0,e.content.size,`
|
|
7
|
-
|
|
8
|
-
`);return{dom:l,text:T,slice:e}}function Kb(r,e,t,n,i){let a=i.parent.type.spec.code,o,s;if(!t&&!e)return null;let l=!!e&&(n||a||!t);if(l){if(r.someProp("transformPastedText",T=>{e=T(e,a||n,r)}),a)return s=new $e(De.from(r.state.schema.text(e.replace(/\r\n?/g,`
|
|
9
|
-
`))),0,0),r.someProp("transformPasted",T=>{s=T(s,r,!0)}),s;let b=r.someProp("clipboardTextParser",T=>T(e,i,n,r));if(b)s=b;else{let T=i.marks(),{schema:x}=r.state,E=Jo.fromSchema(x);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(B=>{let F=o.appendChild(document.createElement("p"));B&&F.appendChild(E.serializeNode(x.text(B,T)))})}}else r.someProp("transformPastedHTML",b=>{t=b(t,r)}),o=Wee(t),_s&&jee(o);let f=o&&o.querySelector("[data-pm-slice]"),p=f&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(f.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let b=+p[3];b>0;b--){let T=o.firstChild;for(;T&&T.nodeType!=1;)T=T.nextSibling;if(!T)break;o=T}if(s||(s=(r.someProp("clipboardParser")||r.someProp("domParser")||Ja.fromSchema(r.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||p),context:i,ruleFromNode(T){return T.nodeName=="BR"&&!T.nextSibling&&T.parentNode&&!Vee.test(T.parentNode.nodeName)?{ignore:!0}:null}})),p)s=Gee(um(s,+p[1],+p[2]),p[4]);else if(s=$e.maxOpen(Uee(s.content,i),!0),s.openStart||s.openEnd){let b=0,T=0;for(let x=s.content.firstChild;b<s.openStart&&!x.type.spec.isolating;b++,x=x.firstChild);for(let x=s.content.lastChild;T<s.openEnd&&!x.type.spec.isolating;T++,x=x.lastChild);s=um(s,b,T)}return r.someProp("transformPasted",b=>{s=b(s,r,l)}),s}const Vee=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Uee(r,e){if(r.childCount<2)return r;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),a,o=[];if(r.forEach(s=>{if(!o)return;let l=i.findWrapping(s.type),f;if(!l)return o=null;if(f=o.length&&a.length&&Yb(l,a,s,o[o.length-1],0))o[o.length-1]=f;else{o.length&&(o[o.length-1]=Xb(o[o.length-1],a.length));let p=Jb(s,l);o.push(p),i=i.matchType(p.type),a=l}}),o)return De.from(o)}return r}function Jb(r,e,t=0){for(let n=e.length-1;n>=t;n--)r=e[n].create(null,De.from(r));return r}function Yb(r,e,t,n,i){if(i<r.length&&i<e.length&&r[i]==e[i]){let a=Yb(r,e,t,n.lastChild,i+1);if(a)return n.copy(n.content.replaceChild(n.childCount-1,a));if(n.contentMatchAt(n.childCount).matchType(i==r.length-1?t.type:r[i+1]))return n.copy(n.content.append(De.from(Jb(t,r,i+1))))}}function Xb(r,e){if(e==0)return r;let t=r.content.replaceChild(r.childCount-1,Xb(r.lastChild,e-1)),n=r.contentMatchAt(r.childCount).fillBefore(De.empty,!0);return r.copy(t.append(n))}function Nd(r,e,t,n,i,a){let o=e<0?r.firstChild:r.lastChild,s=o.content;return r.childCount>1&&(a=0),i<n-1&&(s=Nd(s,e,t,n,i+1,a)),i>=t&&(s=e<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(De.empty,!0))),r.replaceChild(e<0?0:r.childCount-1,o.copy(s))}function um(r,e,t){return e<r.openStart&&(r=new $e(Nd(r.content,-1,e,r.openStart,0,r.openEnd),e,r.openEnd)),t<r.openEnd&&(r=new $e(Nd(r.content,1,t,r.openEnd,0,0),r.openStart,t)),r}const Zb={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function Qb(){return document.implementation.createHTMLDocument("title")}let qf=null;function $ee(r){let e=window.trustedTypes;return e?(qf||(qf=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),qf.createHTML(r)):r}function Wee(r){let e=/^(\s*<meta [^>]*>)*/.exec(r);e&&(r=r.slice(e[0].length));let t=Qb(),n=t.body,i=/<([a-z][^>\s]+)/i.exec(r),a;if((a=i&&Zb[i[1].toLowerCase()])&&(r=a.map(o=>"<"+o+">").join("")+r+a.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=$ee(r),a)for(let o=0;o<a.length;o++)n=n.querySelector(a[o])||n;for(let o=0;o<t.styleSheets.length;o++){let s=t.styleSheets[o];for(let l=0;l<s.rules.length;l++){let f=s.rules[l];if(f instanceof CSSStyleRule){let p=n.querySelectorAll(f.selectorText);for(let b=0;b<p.length;b++)p[b].style.cssText+=f.style.cssText}}}return n}function jee(r){let e=r.querySelectorAll(Ar?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let n=e[t];n.childNodes.length==1&&n.textContent==" "&&n.parentNode&&n.parentNode.replaceChild(r.ownerDocument.createTextNode(" "),n)}}function Gee(r,e){if(!r.size)return r;let t=r.content.firstChild.type.schema,n;try{n=JSON.parse(e)}catch{return r}let{content:i,openStart:a,openEnd:o}=r;for(let s=n.length-2;s>=0;s-=2){let l=t.nodes[n[s]];if(!l||l.hasRequiredAttrs())break;i=De.from(l.create(n[s+1],i)),a++,o++}return new $e(i,a,o)}const en={},tn={},Kee={touchstart:!0,touchmove:!0};class Jee{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Yee(r){for(let e in en){let t=en[e];r.dom.addEventListener(e,r.input.eventHandlers[e]=n=>{Zee(r,n)&&!hh(r,n)&&(r.editable||!(n.type in tn))&&t(r,n)},Kee[e]?{passive:!0}:void 0)}Wr&&r.dom.addEventListener("input",()=>null),Dd(r)}function Pi(r,e){r.input.lastSelectionOrigin=e,r.input.lastSelectionTime=Date.now()}function Xee(r){r.input.mouseDown&&r.input.mouseDown.done(),r.domObserver.stop();for(let e in r.input.eventHandlers)r.dom.removeEventListener(e,r.input.eventHandlers[e]);clearTimeout(r.input.composingTimeout),clearTimeout(r.input.lastIOSEnterFallbackTimeout)}function Dd(r){r.someProp("handleDOMEvents",e=>{for(let t in e)r.input.eventHandlers[t]||r.dom.addEventListener(t,r.input.eventHandlers[t]=n=>hh(r,n))})}function hh(r,e){return r.someProp("handleDOMEvents",t=>{let n=t[e.type];return n?n(r,e)||e.defaultPrevented:!1})}function Zee(r,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=r.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function Qee(r,e){!hh(r,e)&&en[e.type]&&(r.editable||!(e.type in tn))&&en[e.type](r,e)}tn.keydown=(r,e)=>{let t=e;if(r.input.shiftKey=t.keyCode==16||t.shiftKey,!nk(r)&&(r.input.lastKeyCode=t.keyCode,r.input.lastKeyCodeTime=Date.now(),!(Ii&&Ar&&t.keyCode==13)))if(t.keyCode!=229&&r.domObserver.forceFlush(),Bo&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let n=Date.now();r.input.lastIOSEnter=n,r.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{r.input.lastIOSEnter==n&&(r.someProp("handleKeyDown",i=>i(r,Ha(13,"Enter"))),r.input.lastIOSEnter=0)},200)}else r.someProp("handleKeyDown",n=>n(r,t))||zee(r,t)?t.preventDefault():Pi(r,"key")};tn.keyup=(r,e)=>{e.keyCode==16&&(r.input.shiftKey=!1)};tn.keypress=(r,e)=>{let t=e;if(nk(r)||!t.charCode||t.ctrlKey&&!t.altKey||Fn&&t.metaKey)return;if(r.someProp("handleKeyPress",i=>i(r,t))){t.preventDefault();return}let n=r.state.selection;if(!(n instanceof St)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(t.charCode),a=()=>r.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!r.someProp("handleTextInput",o=>o(r,n.$from.pos,n.$to.pos,i,a))&&r.dispatch(a()),t.preventDefault()}};function Vs(r){return{left:r.clientX,top:r.clientY}}function ete(r,e){let t=e.x-r.clientX,n=e.y-r.clientY;return t*t+n*n<100}function ph(r,e,t,n,i){if(n==-1)return!1;let a=r.state.doc.resolve(n);for(let o=a.depth+1;o>0;o--)if(r.someProp(e,s=>o>a.depth?s(r,t,a.nodeAfter,a.before(o),i,!0):s(r,t,a.node(o),a.before(o),i,!1)))return!0;return!1}function Us(r,e,t){if(r.focused||r.focus(),r.state.selection.eq(e))return;let n=r.state.tr.setSelection(e);n.setMeta("pointer",!0),r.dispatch(n)}function tte(r,e){if(e==-1)return!1;let t=r.state.doc.resolve(e),n=t.nodeAfter;return n&&n.isAtom&&ht.isSelectable(n)?(Us(r,new ht(t)),!0):!1}function rte(r,e){if(e==-1)return!1;let t=r.state.selection,n,i;t instanceof ht&&(n=t.node);let a=r.state.doc.resolve(e);for(let o=a.depth+1;o>0;o--){let s=o>a.depth?a.nodeAfter:a.node(o);if(ht.isSelectable(s)){n&&t.$from.depth>0&&o>=t.$from.depth&&a.before(t.$from.depth+1)==t.$from.pos?i=a.before(t.$from.depth):i=a.before(o);break}}return i!=null?(Us(r,ht.create(r.state.doc,i)),!0):!1}function nte(r,e,t,n,i){return ph(r,"handleClickOn",e,t,n)||r.someProp("handleClick",a=>a(r,e,n))||(i?rte(r,t):tte(r,t))}function ite(r,e,t,n){return ph(r,"handleDoubleClickOn",e,t,n)||r.someProp("handleDoubleClick",i=>i(r,e,n))}function ate(r,e,t,n){return ph(r,"handleTripleClickOn",e,t,n)||r.someProp("handleTripleClick",i=>i(r,e,n))||ote(r,t,n)}function ote(r,e,t){if(t.button!=0)return!1;let n=ek(r,e,!0),i=r.state.doc;return n?(Us(r,n),n instanceof St&&i.eq(r.state.doc)&&(r.input.mouseDown=new lte(r,n)),!0):!1}function ek(r,e,t){let n=r.state.doc;if(e==-1)return n.inlineContent?St.create(n,0,n.content.size):null;let i=n.resolve(e);for(let a=i.depth+1;a>0;a--){let o=a>i.depth?i.nodeAfter:i.node(a),s=i.before(a);if(o.inlineContent)return St.create(n,s+1,s+1+o.content.size);if(t&&ht.isSelectable(o))return ht.create(n,s)}return null}function vh(r){return hu(r)}const tk=Fn?"metaKey":"ctrlKey";en.mousedown=(r,e)=>{let t=e;r.input.shiftKey=t.shiftKey;let n=vh(r),i=Date.now(),a="singleClick";i-r.input.lastClick.time<500&&ete(t,r.input.lastClick)&&!t[tk]&&r.input.lastClick.button==t.button&&(r.input.lastClick.type=="singleClick"?a="doubleClick":r.input.lastClick.type=="doubleClick"&&(a="tripleClick")),r.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:a,button:t.button},r.input.mouseDown&&r.input.mouseDown.done();let o=r.posAtCoords(Vs(t));o&&(a=="singleClick"?r.input.mouseDown=new ste(r,o,t,!!n):(a=="doubleClick"?ite:ate)(r,o.pos,o.inside,t)?t.preventDefault():Pi(r,"pointer"))};class rk{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(e){this.done()}move(e){e.buttons==0&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}}class ste extends rk{constructor(e,t,n,i){super(e),this.pos=t,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!n[tk],this.allowDefault=n.shiftKey;let a,o;if(t.inside>-1)a=e.state.doc.nodeAt(t.inside),o=t.inside;else{let p=e.state.doc.resolve(t.pos);a=p.parent,o=p.depth?p.before():0}const s=i?null:n.target,l=s?e.docView.nearestDesc(s,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:f}=e.state;n.button==0&&(a.type.spec.draggable&&a.type.spec.selectable!==!1||f instanceof ht&&f.from<=o&&f.to>o)&&(this.mightDrag={node:a,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Hn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),Pi(e,"pointer")}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||Fi(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Vs(e))),this.updateAllowDefault(e),this.allowDefault||!t?Pi(this.view,"pointer"):nte(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Wr&&this.mightDrag&&!this.mightDrag.node.isAtom||Ar&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Us(this.view,xt.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):Pi(this.view,"pointer")}move(e){this.updateAllowDefault(e),Pi(this.view,"pointer"),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}}class lte extends rk{constructor(e,t){super(e),this.startSelection=t,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),Pi(this.view,"pointer");let t=this.view.posAtCoords(Vs(e)),n=t&&ek(this.view,t.inside,!1);if(!n)return;let{doc:i}=this.view.state,a=this.startSelection,[o,s]=n.from<a.from?[a.to,n.from]:[a.from,n.to];Us(this.view,St.create(i,o,s))}}en.touchstart=r=>{r.input.lastTouch=Date.now(),vh(r),Pi(r,"pointer")};en.touchmove=r=>{r.input.lastTouch=Date.now(),Pi(r,"pointer")};en.contextmenu=r=>vh(r);function nk(r,e){return r.composing?!0:Wr&&Math.abs(Date.now()-r.input.compositionEndedAt)<500?(r.input.compositionEndedAt=-2e8,!0):!1}const ute=Ii?5e3:-1;tn.compositionstart=tn.compositionupdate=r=>{if(!r.composing){r.domObserver.flush();let{state:e}=r,t=e.selection.$to;if(e.selection instanceof St&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)||Ar&&Lb&&cte(r)))r.markCursor=r.state.storedMarks||t.marks(),hu(r,!0),r.markCursor=null;else if(hu(r,!e.selection.empty),Hn&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let n=r.domSelectionRange();for(let i=n.focusNode,a=n.focusOffset;i&&i.nodeType==1&&a!=0;){let o=a<0?i.lastChild:i.childNodes[a-1];if(!o)break;if(o.nodeType==3){let s=r.domSelection();s&&s.collapse(o,o.nodeValue.length);break}else i=o,a=-1}}r.input.composing=!0}ik(r,ute)};function cte(r){let{focusNode:e,focusOffset:t}=r.domSelectionRange();if(!e||e.nodeType!=1||t>=e.childNodes.length)return!1;let n=e.childNodes[t];return n.nodeType==1&&n.contentEditable=="false"}tn.compositionend=(r,e)=>{r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=Date.now(),r.input.compositionPendingChanges=r.domObserver.pendingRecords().length?r.input.compositionID:0,r.input.compositionNode=null,r.input.badSafariComposition?r.domObserver.forceFlush():r.input.compositionPendingChanges&&Promise.resolve().then(()=>r.domObserver.flush()),r.input.compositionID++,ik(r,20))};function ik(r,e){clearTimeout(r.input.composingTimeout),e>-1&&(r.input.composingTimeout=setTimeout(()=>hu(r),e))}function ak(r){for(r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=Date.now());r.input.compositionNodes.length>0;)r.input.compositionNodes.pop().markParentsDirty()}function fte(r){let e=r.domSelectionRange();if(!e.focusNode)return null;let t=ree(e.focusNode,e.focusOffset),n=nee(e.focusNode,e.focusOffset);if(t&&n&&t!=n){let i=n.pmViewDesc,a=r.domObserver.lastChangedTextNode;if(t==a||n==a)return a;if(!i||!i.isText(n.nodeValue))return n;if(r.input.compositionNode==n){let o=t.pmViewDesc;if(!(!o||!o.isText(t.nodeValue)))return n}}return t||n}function hu(r,e=!1){if(!(Ii&&r.domObserver.flushingSoon>=0)){if(r.domObserver.forceFlush(),ak(r),e||r.docView&&r.docView.dirty){let t=ch(r),n=r.state.selection;return t&&!t.eq(n)?r.dispatch(r.state.tr.setSelection(t)):(r.markCursor||e)&&!n.$from.node(n.$from.sharedDepth(n.to)).inlineContent?r.dispatch(r.state.tr.deleteSelection()):r.updateState(r.state),!0}return!1}}function dte(r,e){if(!r.dom.parentNode)return;let t=r.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),i=document.createRange();i.selectNodeContents(e),r.dom.blur(),n.removeAllRanges(),n.addRange(i),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),r.focus()},50)}const Ls=pn&&aa<15||Bo&&see<604;en.copy=tn.cut=(r,e)=>{let t=e,n=r.state.selection,i=t.type=="cut";if(n.empty)return;let a=Ls?null:t.clipboardData,o=n.content(),{dom:s,text:l}=dh(r,o);a?(t.preventDefault(),a.clearData(),a.setData("text/html",s.innerHTML),a.setData("text/plain",l)):dte(r,s),i&&r.dispatch(r.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function hte(r){return r.openStart==0&&r.openEnd==0&&r.content.childCount==1?r.content.firstChild:null}function pte(r,e){if(!r.dom.parentNode)return;let t=r.input.shiftKey||r.state.selection.$from.parent.type.spec.code,n=r.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let i=r.input.shiftKey&&r.input.lastKeyCode!=45;setTimeout(()=>{r.focus(),n.parentNode&&n.parentNode.removeChild(n),t?Rs(r,n.value,null,i,e):Rs(r,n.textContent,n.innerHTML,i,e)},50)}function Rs(r,e,t,n,i){let a=Kb(r,e,t,n,r.state.selection.$from);if(r.someProp("handlePaste",l=>l(r,i,a||$e.empty)))return!0;if(!a)return!1;let o=hte(a),s=o?r.state.tr.replaceSelectionWith(o,n):r.state.tr.replaceSelection(a);return r.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function ok(r){let e=r.getData("text/plain")||r.getData("Text");if(e)return e;let t=r.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}tn.paste=(r,e)=>{let t=e;if(r.composing&&!Ii)return;let n=Ls?null:t.clipboardData,i=r.input.shiftKey&&r.input.lastKeyCode!=45;n&&Rs(r,ok(n),n.getData("text/html"),i,t)?t.preventDefault():pte(r,t)};class sk{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}const vte=Fn?"altKey":"ctrlKey";function lk(r,e){let t;return r.someProp("dragCopies",n=>{t=t||n(e)}),t!=null?!t:!e[vte]}en.dragstart=(r,e)=>{let t=e,n=r.input.mouseDown;if(n&&n.done(),!t.dataTransfer)return;let i=r.state.selection,a=i.empty?null:r.posAtCoords(Vs(t)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof ht?i.to-1:i.to))){if(n&&n.mightDrag)o=ht.create(r.state.doc,n.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let b=r.docView.nearestDesc(t.target,!0);b&&b.node.type.spec.draggable&&b!=r.docView&&(o=ht.create(r.state.doc,b.posBefore))}}let s=(o||r.state.selection).content(),{dom:l,text:f,slice:p}=dh(r,s);(!t.dataTransfer.files.length||!Ar||Db>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(Ls?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",Ls||t.dataTransfer.setData("text/plain",f),r.dragging=new sk(p,lk(r,t),o)};en.dragend=r=>{let e=r.dragging;window.setTimeout(()=>{r.dragging==e&&(r.dragging=null)},50)};tn.dragover=tn.dragenter=(r,e)=>e.preventDefault();tn.drop=(r,e)=>{try{mte(r,e,r.dragging)}finally{r.dragging=null}};function mte(r,e,t){if(!e.dataTransfer)return;let n=r.posAtCoords(Vs(e));if(!n)return;let i=r.state.doc.resolve(n.pos),a=t&&t.slice;a?r.someProp("transformPasted",x=>{a=x(a,r,!1)}):a=Kb(r,ok(e.dataTransfer),Ls?null:e.dataTransfer.getData("text/html"),!1,i);let o=!!(t&&lk(r,e));if(r.someProp("handleDrop",x=>x(r,e,a||$e.empty,o))){e.preventDefault();return}if(!a)return;e.preventDefault();let s=a?UQ(r.state.doc,i.pos,a):i.pos;s==null&&(s=i.pos);let l=r.state.tr;if(o){let{node:x}=t;x?x.replace(l):l.deleteSelection()}let f=l.mapping.map(s),p=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,b=l.doc;if(p?l.replaceRangeWith(f,f,a.content.firstChild):l.replaceRange(f,f,a),l.doc.eq(b))return;let T=l.doc.resolve(f);if(p&&ht.isSelectable(a.content.firstChild)&&T.nodeAfter&&T.nodeAfter.sameMarkup(a.content.firstChild))l.setSelection(new ht(T));else{let x=l.mapping.map(s);l.mapping.maps[l.mapping.maps.length-1].forEach((E,B,F,_)=>x=_),l.setSelection(fh(r,T,l.doc.resolve(x)))}r.focus(),r.dispatch(l.setMeta("uiEvent","drop"))}en.focus=r=>{r.input.lastFocus=Date.now(),r.focused||(r.domObserver.stop(),r.dom.classList.add("ProseMirror-focused"),r.domObserver.start(),r.focused=!0,setTimeout(()=>{r.docView&&r.hasFocus()&&!r.domObserver.currentSelection.eq(r.domSelectionRange())&&Fi(r)},20))};en.blur=(r,e)=>{let t=e;r.focused&&(r.domObserver.stop(),r.dom.classList.remove("ProseMirror-focused"),r.domObserver.start(),t.relatedTarget&&r.dom.contains(t.relatedTarget)&&r.domObserver.currentSelection.clear(),r.focused=!1)};en.beforeinput=(r,e)=>{if(Ar&&Ii&&e.inputType=="deleteContentBackward"){r.domObserver.flushSoon();let{domChangeCount:n}=r.input;setTimeout(()=>{if(r.input.domChangeCount!=n||(r.dom.blur(),r.focus(),r.someProp("handleKeyDown",a=>a(r,Ha(8,"Backspace")))))return;let{$cursor:i}=r.state.selection;i&&i.pos>0&&r.dispatch(r.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let r in tn)en[r]=tn[r];function Is(r,e){if(r==e)return!0;for(let t in r)if(r[t]!==e[t])return!1;for(let t in e)if(!(t in r))return!1;return!0}class pu{constructor(e,t){this.toDOM=e,this.spec=t||Wa,this.side=this.spec.side||0}map(e,t,n,i){let{pos:a,deleted:o}=e.mapResult(t.from+i,this.side<0?-1:1);return o?null:new hn(a-n,a-n,this)}valid(){return!0}eq(e){return this==e||e instanceof pu&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Is(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class la{constructor(e,t){this.attrs=e,this.spec=t||Wa}map(e,t,n,i){let a=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-n;return a>=o?null:new hn(a,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof la&&Is(this.attrs,e.attrs)&&Is(this.spec,e.spec)}static is(e){return e.type instanceof la}destroy(){}}class mh{constructor(e,t){this.attrs=e,this.spec=t||Wa}map(e,t,n,i){let a=e.mapResult(t.from+i,1);if(a.deleted)return null;let o=e.mapResult(t.to+i,-1);return o.deleted||o.pos<=a.pos?null:new hn(a.pos-n,o.pos-n,this)}valid(e,t){let{index:n,offset:i}=e.content.findIndex(t.from),a;return i==t.from&&!(a=e.child(n)).isText&&i+a.nodeSize==t.to}eq(e){return this==e||e instanceof mh&&Is(this.attrs,e.attrs)&&Is(this.spec,e.spec)}destroy(){}}class hn{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new hn(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new hn(e,e,new pu(t,n))}static inline(e,t,n,i){return new hn(e,t,new la(n,i))}static node(e,t,n,i){return new hn(e,t,new mh(n,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof la}get widget(){return this.type instanceof pu}}const Mo=[],Wa={};class dr{constructor(e,t){this.local=e.length?e:Mo,this.children=t.length?t:Mo}static create(e,t){return t.length?vu(t,e,0,Wa):Ur}find(e,t,n){let i=[];return this.findInner(e??0,t??1e9,i,0,n),i}findInner(e,t,n,i,a){for(let o=0;o<this.local.length;o++){let s=this.local[o];s.from<=t&&s.to>=e&&(!a||a(s.spec))&&n.push(s.copy(s.from+i,s.to+i))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let s=this.children[o]+1;this.children[o+2].findInner(e-s,t-s,n,i+s,a)}}map(e,t,n){return this==Ur||e.maps.length==0?this:this.mapInner(e,t,0,0,n||Wa)}mapInner(e,t,n,i,a){let o;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(e,n,i);l&&l.type.valid(t,l)?(o||(o=[])).push(l):a.onRemove&&a.onRemove(this.local[s].spec)}return this.children.length?gte(this.children,o||[],e,t,n,i,a):o?new dr(o.sort(ja),Mo):Ur}add(e,t){return t.length?this==Ur?dr.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let i,a=0;e.forEach((s,l)=>{let f=l+n,p;if(p=ck(t,s,f)){for(i||(i=this.children.slice());a<i.length&&i[a]<l;)a+=3;i[a]==l?i[a+2]=i[a+2].addInner(s,p,f+1):i.splice(a,0,l,l+s.nodeSize,vu(p,s,f+1,Wa)),a+=3}});let o=uk(a?fk(t):t,-n);for(let s=0;s<o.length;s++)o[s].type.valid(e,o[s])||o.splice(s--,1);return new dr(o.length?this.local.concat(o).sort(ja):this.local,i||this.children)}remove(e){return e.length==0||this==Ur?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,i=this.local;for(let a=0;a<n.length;a+=3){let o,s=n[a]+t,l=n[a+1]+t;for(let p=0,b;p<e.length;p++)(b=e[p])&&b.from>s&&b.to<l&&(e[p]=null,(o||(o=[])).push(b));if(!o)continue;n==this.children&&(n=this.children.slice());let f=n[a+2].removeInner(o,s+1);f!=Ur?n[a+2]=f:(n.splice(a,3),a-=3)}if(i.length){for(let a=0,o;a<e.length;a++)if(o=e[a])for(let s=0;s<i.length;s++)i[s].eq(o,t)&&(i==this.local&&(i=this.local.slice()),i.splice(s--,1))}return n==this.children&&i==this.local?this:i.length||n.length?new dr(i,n):Ur}forChild(e,t){if(this==Ur)return this;if(t.isLeaf)return dr.empty;let n,i;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=e){this.children[s]==e&&(n=this.children[s+2]);break}let a=e+1,o=a+t.content.size;for(let s=0;s<this.local.length;s++){let l=this.local[s];if(l.from<o&&l.to>a&&l.type instanceof la){let f=Math.max(a,l.from)-a,p=Math.min(o,l.to)-a;f<p&&(i||(i=[])).push(l.copy(f,p))}}if(i){let s=new dr(i.sort(ja),Mo);return n?new ea([s,n]):s}return n||Ur}eq(e){if(this==e)return!0;if(!(e instanceof dr)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return gh(this.localsInner(e))}localsInner(e){if(this==Ur)return Mo;if(e.inlineContent||!this.local.some(la.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof la||t.push(this.local[n]);return t}forEachSet(e){e(this)}}dr.empty=new dr([],[]);dr.removeOverlap=gh;const Ur=dr.empty;class ea{constructor(e){this.members=e}map(e,t){const n=this.members.map(i=>i.map(e,t,Wa));return ea.from(n)}forChild(e,t){if(t.isLeaf)return dr.empty;let n=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(e,t);a!=Ur&&(a instanceof ea?n=n.concat(a.members):n.push(a))}return ea.from(n)}eq(e){if(!(e instanceof ea)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let i=0;i<this.members.length;i++){let a=this.members[i].localsInner(e);if(a.length)if(!t)t=a;else{n&&(t=t.slice(),n=!1);for(let o=0;o<a.length;o++)t.push(a[o])}}return t?gh(n?t:t.sort(ja)):Mo}static from(e){switch(e.length){case 0:return Ur;case 1:return e[0];default:return new ea(e.every(t=>t instanceof dr)?e:e.reduce((t,n)=>t.concat(n instanceof dr?n:n.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function gte(r,e,t,n,i,a,o){let s=r.slice();for(let f=0,p=a;f<t.maps.length;f++){let b=0;t.maps[f].forEach((T,x,E,B)=>{let F=B-E-(x-T);for(let _=0;_<s.length;_+=3){let X=s[_+1];if(X<0||T>X+p-b)continue;let ee=s[_]+p-b;x>=ee?s[_+1]=T<=ee?-2:-1:T>=p&&F&&(s[_]+=F,s[_+1]+=F)}b+=F}),p=t.maps[f].map(p,-1)}let l=!1;for(let f=0;f<s.length;f+=3)if(s[f+1]<0){if(s[f+1]==-2){l=!0,s[f+1]=-1;continue}let p=t.map(r[f]+a),b=p-i;if(b<0||b>=n.content.size){l=!0;continue}let T=t.map(r[f+1]+a,-1),x=T-i,{index:E,offset:B}=n.content.findIndex(b),F=n.maybeChild(E);if(F&&B==b&&B+F.nodeSize==x){let _=s[f+2].mapInner(t,F,p+1,r[f]+a+1,o);_!=Ur?(s[f]=b,s[f+1]=x,s[f+2]=_):(s[f+1]=-2,l=!0)}else l=!0}if(l){let f=yte(s,r,e,t,i,a,o),p=vu(f,n,0,o);e=p.local;for(let b=0;b<s.length;b+=3)s[b+1]<0&&(s.splice(b,3),b-=3);for(let b=0,T=0;b<p.children.length;b+=3){let x=p.children[b];for(;T<s.length&&s[T]<x;)T+=3;s.splice(T,0,p.children[b],p.children[b+1],p.children[b+2])}}return new dr(e.sort(ja),s)}function uk(r,e){if(!e||!r.length)return r;let t=[];for(let n=0;n<r.length;n++){let i=r[n];t.push(new hn(i.from+e,i.to+e,i.type))}return t}function yte(r,e,t,n,i,a,o){function s(l,f){for(let p=0;p<l.local.length;p++){let b=l.local[p].map(n,i,f);b?t.push(b):o.onRemove&&o.onRemove(l.local[p].spec)}for(let p=0;p<l.children.length;p+=3)s(l.children[p+2],l.children[p]+f+1)}for(let l=0;l<r.length;l+=3)r[l+1]==-1&&s(r[l+2],e[l]+a+1);return t}function ck(r,e,t){if(e.isLeaf)return null;let n=t+e.nodeSize,i=null;for(let a=0,o;a<r.length;a++)(o=r[a])&&o.from>t&&o.to<n&&((i||(i=[])).push(o),r[a]=null);return i}function fk(r){let e=[];for(let t=0;t<r.length;t++)r[t]!=null&&e.push(r[t]);return e}function vu(r,e,t,n){let i=[],a=!1;e.forEach((s,l)=>{let f=ck(r,s,l+t);if(f){a=!0;let p=vu(f,s,t+l+1,n);p!=Ur&&i.push(l,l+s.nodeSize,p)}});let o=uk(a?fk(r):r,-t).sort(ja);for(let s=0;s<o.length;s++)o[s].type.valid(e,o[s])||(n.onRemove&&n.onRemove(o[s].spec),o.splice(s--,1));return o.length||i.length?new dr(o,i):Ur}function ja(r,e){return r.from-e.from||r.to-e.to}function gh(r){let e=r;for(let t=0;t<e.length-1;t++){let n=e[t];if(n.from!=n.to)for(let i=t+1;i<e.length;i++){let a=e[i];if(a.from==n.from){a.to!=n.to&&(e==r&&(e=r.slice()),e[i]=a.copy(a.from,n.to),cm(e,i+1,a.copy(n.to,a.to)));continue}else{a.from<n.to&&(e==r&&(e=r.slice()),e[t]=n.copy(n.from,a.from),cm(e,i,n.copy(a.from,n.to)));break}}}return e}function cm(r,e,t){for(;e<r.length&&ja(t,r[e])>0;)e++;r.splice(e,0,t)}function Hf(r){let e=[];return r.someProp("decorations",t=>{let n=t(r.state);n&&n!=Ur&&e.push(n)}),r.cursorWrapper&&e.push(dr.create(r.state.doc,[r.cursorWrapper.deco])),ea.from(e)}const bte={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},kte=pn&&aa<=11;class wte{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Cte{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new wte,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let i=0;i<n.length;i++)this.queue.push(n[i]);pn&&aa<=11&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():Wr&&e.composing&&n.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),kte&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,bte)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(nm(this.view)){if(this.suppressingSelectionUpdates)return Fi(this.view);if(pn&&aa<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Xa(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let a=e.focusNode;a;a=Po(a))t.add(a);for(let a=e.anchorNode;a;a=Po(a))if(t.has(a)){n=a;break}let i=n&&this.view.docView.nearestDesc(n);if(i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&nm(e)&&!this.ignoreSelectionChange(n),a=-1,o=-1,s=!1,l=[];if(e.editable)for(let p=0;p<t.length;p++){let b=this.registerMutation(t[p],l);b&&(a=a<0?b.from:Math.min(b.from,a),o=o<0?b.to:Math.max(b.to,o),b.typeOver&&(s=!0))}if(l.some(p=>p.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||Ar&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&t.some(p=>p.type=="childList"&&p.removedNodes.length))){for(let p of l)if(p.nodeName=="BR"&&p.parentNode){let b=p.nextSibling;for(;b&&b.nodeType==1;){if(b.contentEditable=="false"){p.parentNode.removeChild(p);break}b=b.firstChild}}}else if(Hn&&l.length){let p=l.filter(b=>b.nodeName=="BR");if(p.length==2){let[b,T]=p;b.parentNode&&b.parentNode.parentNode==T.parentNode?T.remove():b.remove()}else{let{focusNode:b}=this.currentSelection;for(let T of p){let x=T.parentNode;x&&x.nodeName=="LI"&&(!b||xte(e,b)!=x)&&T.remove()}}}let f=null;a<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&qu(n)&&(f=ch(e))&&f.eq(xt.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Fi(e),this.currentSelection.set(n),e.scrollToSelection()):(a>-1||i)&&(a>-1&&(e.docView.markDirty(a,o),Tte(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,Ete(e,l)),this.handleDOMChange(a,o,s,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Fi(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(n==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if(e.type=="childList"){for(let p=0;p<e.addedNodes.length;p++){let b=e.addedNodes[p];t.push(b),b.nodeType==3&&(this.lastChangedTextNode=b)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let i=e.previousSibling,a=e.nextSibling;if(pn&&aa<=11&&e.addedNodes.length)for(let p=0;p<e.addedNodes.length;p++){let{previousSibling:b,nextSibling:T}=e.addedNodes[p];(!b||Array.prototype.indexOf.call(e.addedNodes,b)<0)&&(i=b),(!T||Array.prototype.indexOf.call(e.addedNodes,T)<0)&&(a=T)}let o=i&&i.parentNode==e.target?Hr(i)+1:0,s=n.localPosFromDOM(e.target,o,-1),l=a&&a.parentNode==e.target?Hr(a):e.target.childNodes.length,f=n.localPosFromDOM(e.target,l,1);return{from:s,to:f}}else return e.type=="attributes"?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let fm=new WeakMap,dm=!1;function Tte(r){if(!fm.has(r)&&(fm.set(r,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(r.dom).whiteSpace)!==-1)){if(r.requiresGeckoHackNode=Hn,dm)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),dm=!0}}function hm(r,e){let t=e.startContainer,n=e.startOffset,i=e.endContainer,a=e.endOffset,o=r.domAtPos(r.state.selection.anchor);return Xa(o.node,o.offset,i,a)&&([t,n,i,a]=[i,a,t,n]),{anchorNode:t,anchorOffset:n,focusNode:i,focusOffset:a}}function Ste(r,e){if(e.getComposedRanges){let i=e.getComposedRanges(r.root)[0];if(i)return hm(r,i)}let t;function n(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return r.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),r.dom.removeEventListener("beforeinput",n,!0),t?hm(r,t):null}function xte(r,e){for(let t=e.parentNode;t&&t!=r.dom;t=t.parentNode){let n=r.docView.nearestDesc(t,!0);if(n&&n.node.isBlock)return t}return null}function Ete(r,e){var t;let{focusNode:n,focusOffset:i}=r.domSelectionRange();for(let a of e)if(((t=a.parentNode)===null||t===void 0?void 0:t.nodeName)=="TR"){let o=a.nextSibling;for(;o&&o.nodeName!="TD"&&o.nodeName!="TH";)o=o.nextSibling;if(o){let s=o;for(;;){let l=s.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;s=l}s.insertBefore(a,s.firstChild),n==a&&r.domSelection().collapse(a,i)}else a.parentNode.removeChild(a)}}function Mte(r,e,t){let{node:n,fromOffset:i,toOffset:a,from:o,to:s}=r.docView.parseRange(e,t),l=r.domSelectionRange(),f,p=l.anchorNode;if(p&&r.dom.contains(p.nodeType==1?p:p.parentNode)&&(f=[{node:p,offset:l.anchorOffset}],qu(l)||f.push({node:l.focusNode,offset:l.focusOffset})),Ar&&r.input.lastKeyCode===8)for(let F=a;F>i;F--){let _=n.childNodes[F-1],X=_.pmViewDesc;if(_.nodeName=="BR"&&!X){a=F;break}if(!X||X.size)break}let b=r.state.doc,T=r.someProp("domParser")||Ja.fromSchema(r.state.schema),x=b.resolve(o),E=null,B=T.parse(n,{topNode:x.parent,topMatch:x.parent.contentMatchAt(x.index()),topOpen:!0,from:i,to:a,preserveWhitespace:x.parent.type.whitespace=="pre"?"full":!0,findPositions:f,ruleFromNode:Ate,context:x});if(f&&f[0].pos!=null){let F=f[0].pos,_=f[1]&&f[1].pos;_==null&&(_=F),E={anchor:F+o,head:_+o}}return{doc:B,sel:E,from:o,to:s}}function Ate(r){let e=r.pmViewDesc;if(e)return e.parseRule();if(r.nodeName=="BR"&&r.parentNode){if(Wr&&/^(ul|ol)$/i.test(r.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(r.parentNode.lastChild==r||Wr&&/^(tr|table)$/i.test(r.parentNode.nodeName))return{ignore:!0}}else if(r.nodeName=="IMG"&&r.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Ote=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Nte(r,e,t,n,i){let a=r.input.compositionPendingChanges||(r.composing?r.input.compositionID:0);if(r.input.compositionPendingChanges=0,e<0){let le=r.input.lastSelectionTime>Date.now()-50?r.input.lastSelectionOrigin:null,Te=ch(r,le);if(Te&&!r.state.selection.eq(Te)){if(Ar&&Ii&&r.input.lastKeyCode===13&&Date.now()-100<r.input.lastKeyCodeTime&&r.someProp("handleKeyDown",Le=>Le(r,Ha(13,"Enter"))))return;let xe=r.state.tr.setSelection(Te);le=="pointer"?xe.setMeta("pointer",!0):le=="key"&&xe.scrollIntoView(),a&&xe.setMeta("composition",a),r.dispatch(xe)}return}let o=r.state.doc.resolve(e),s=o.sharedDepth(t);e=o.before(s+1),t=r.state.doc.resolve(t).after(s+1);let l=r.state.selection,f=Mte(r,e,t),p=r.state.doc,b=p.slice(f.from,f.to),T,x;r.input.lastKeyCode===8&&Date.now()-100<r.input.lastKeyCodeTime?(T=r.state.selection.to,x="end"):(T=r.state.selection.from,x="start"),r.input.lastKeyCode=null;let E=Rte(b.content,f.doc.content,f.from,T,x);if(E&&r.input.domChangeCount++,(Bo&&r.input.lastIOSEnter>Date.now()-225||Ii)&&i.some(le=>le.nodeType==1&&!Ote.test(le.nodeName))&&(!E||E.endA>=E.endB)&&r.someProp("handleKeyDown",le=>le(r,Ha(13,"Enter")))){r.input.lastIOSEnter=0;return}if(!E)if(n&&l instanceof St&&!l.empty&&l.$head.sameParent(l.$anchor)&&!r.composing&&!(f.sel&&f.sel.anchor!=f.sel.head))E={start:l.from,endA:l.to,endB:l.to};else{if(f.sel){let le=pm(r,r.state.doc,f.sel);if(le&&!le.eq(r.state.selection)){let Te=r.state.tr.setSelection(le);a&&Te.setMeta("composition",a),r.dispatch(Te)}}return}r.state.selection.from<r.state.selection.to&&E.start==E.endB&&r.state.selection instanceof St&&(E.start>r.state.selection.from&&E.start<=r.state.selection.from+2&&r.state.selection.from>=f.from?E.start=r.state.selection.from:E.endA<r.state.selection.to&&E.endA>=r.state.selection.to-2&&r.state.selection.to<=f.to&&(E.endB+=r.state.selection.to-E.endA,E.endA=r.state.selection.to)),pn&&aa<=11&&E.endB==E.start+1&&E.endA==E.start&&E.start>f.from&&f.doc.textBetween(E.start-f.from-1,E.start-f.from+1)==" "&&(E.start--,E.endA--,E.endB--);let B=f.doc.resolveNoCache(E.start-f.from),F=f.doc.resolveNoCache(E.endB-f.from),_=p.resolve(E.start),X=B.sameParent(F)&&B.parent.inlineContent&&_.end()>=E.endA;if((Bo&&r.input.lastIOSEnter>Date.now()-225&&(!X||i.some(le=>le.nodeName=="DIV"||le.nodeName=="P"))||!X&&B.pos<f.doc.content.size&&(!B.sameParent(F)||!B.parent.inlineContent)&&B.pos<F.pos&&!/\S/.test(f.doc.textBetween(B.pos,F.pos,"","")))&&r.someProp("handleKeyDown",le=>le(r,Ha(13,"Enter")))){r.input.lastIOSEnter=0;return}if(r.state.selection.anchor>E.start&&Lte(p,E.start,E.endA,B,F)&&r.someProp("handleKeyDown",le=>le(r,Ha(8,"Backspace")))){Ii&&Ar&&r.domObserver.suppressSelectionUpdates();return}Ar&&E.endB==E.start&&(r.input.lastChromeDelete=Date.now()),Ii&&!X&&B.start()!=F.start()&&F.parentOffset==0&&B.depth==F.depth&&f.sel&&f.sel.anchor==f.sel.head&&f.sel.head==E.endA&&(E.endB-=2,F=f.doc.resolveNoCache(E.endB-f.from),setTimeout(()=>{r.someProp("handleKeyDown",function(le){return le(r,Ha(13,"Enter"))})},20));let ee=E.start,se=E.endA,de=le=>{let Te=le||r.state.tr.replace(ee,se,f.doc.slice(E.start-f.from,E.endB-f.from));if(f.sel){let xe=pm(r,Te.doc,f.sel);xe&&!(Ar&&r.composing&&xe.empty&&(E.start!=E.endB||r.input.lastChromeDelete<Date.now()-100)&&(xe.head==ee||xe.head==Te.mapping.map(se)-1)||pn&&xe.empty&&xe.head==ee)&&Te.setSelection(xe)}return a&&Te.setMeta("composition",a),Te.scrollIntoView()},ae;if(X)if(B.pos==F.pos){pn&&aa<=11&&B.parentOffset==0&&(r.domObserver.suppressSelectionUpdates(),setTimeout(()=>Fi(r),20));let le=de(r.state.tr.delete(ee,se)),Te=p.resolve(E.start).marksAcross(p.resolve(E.endA));Te&&le.ensureMarks(Te),r.dispatch(le)}else if(E.endA==E.endB&&(ae=Dte(B.parent.content.cut(B.parentOffset,F.parentOffset),_.parent.content.cut(_.parentOffset,E.endA-_.start())))){let le=de(r.state.tr);ae.type=="add"?le.addMark(ee,se,ae.mark):le.removeMark(ee,se,ae.mark),r.dispatch(le)}else if(B.parent.child(B.index()).isText&&B.index()==F.index()-(F.textOffset?0:1)){let le=B.parent.textBetween(B.parentOffset,F.parentOffset),Te=()=>de(r.state.tr.insertText(le,ee,se));r.someProp("handleTextInput",xe=>xe(r,ee,se,le,Te))||r.dispatch(Te())}else r.dispatch(de());else r.dispatch(de())}function pm(r,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:fh(r,e.resolve(t.anchor),e.resolve(t.head))}function Dte(r,e){let t=r.firstChild.marks,n=e.firstChild.marks,i=t,a=n,o,s,l;for(let p=0;p<n.length;p++)i=n[p].removeFromSet(i);for(let p=0;p<t.length;p++)a=t[p].removeFromSet(a);if(i.length==1&&a.length==0)s=i[0],o="add",l=p=>p.mark(s.addToSet(p.marks));else if(i.length==0&&a.length==1)s=a[0],o="remove",l=p=>p.mark(s.removeFromSet(p.marks));else return null;let f=[];for(let p=0;p<e.childCount;p++)f.push(l(e.child(p)));if(De.from(f).eq(r))return{mark:s,type:o}}function Lte(r,e,t,n,i){if(t-e<=i.pos-n.pos||_f(n,!0,!1)<i.pos)return!1;let a=r.resolve(e);if(!n.parent.isTextblock){let s=a.nodeAfter;return s!=null&&t==e+s.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=r.resolve(_f(a,!0,!0));return!o.parent.isTextblock||o.pos>t||_f(o,!0,!1)<t?!1:n.parent.content.cut(n.parentOffset).eq(o.parent.content)}function _f(r,e,t){let n=r.depth,i=e?r.end():r.pos;for(;n>0&&(e||r.indexAfter(n)==r.node(n).childCount);)n--,i++,e=!1;if(t){let a=r.node(n).maybeChild(r.indexAfter(n));for(;a&&!a.isLeaf;)a=a.firstChild,i++}return i}function Rte(r,e,t,n,i){let a=r.findDiffStart(e,t),o=t+r.size,s=t+e.size;if(a==null)return null;let{a:l,b:f}=r.findDiffEnd(e,o,s);if(i=="end"){let p=Math.max(0,a-Math.min(l,f));n-=l+p-a}if(l<a&&o<s){let p=n<=a&&n>=l?a-n:0;a-=p,f=a+(f-l),l=a}else if(f<a){let p=n<=a&&n>=f?a-n:0;a-=p,l=a+(l-f),f=a}return{start:a,endA:l,endB:f}}class _u{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Jee,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(bm),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=gm(this),mm(this),this.nodeViews=ym(this),this.docView=Xv(this.state.doc,vm(this),Hf(this),this.dom,this),this.domObserver=new Cte(this,(n,i,a,o)=>Nte(this,n,i,a,o)),this.domObserver.start(),Yee(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Dd(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(bm),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n;let i=this.state,a=!1,o=!1;e.storedMarks&&this.composing&&(ak(this),o=!0),this.state=e;let s=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(s||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let x=ym(this);Pte(x,this.nodeViews)&&(this.nodeViews=x,a=!0)}(s||t.handleDOMEvents!=this._props.handleDOMEvents)&&Dd(this),this.editable=gm(this),mm(this);let l=Hf(this),f=vm(this),p=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",b=a||!this.docView.matchesNode(e.doc,f,l);(b||!e.selection.eq(i.selection))&&(o=!0);let T=p=="preserve"&&o&&this.dom.style.overflowAnchor==null&&cee(this);if(o){this.domObserver.stop();let x=b&&(pn||Ar)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Ite(i.selection,e.selection);if(b){let B=Ar?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=fte(this)),(a||!this.docView.update(e.doc,f,l,this))&&(this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=Xv(e.doc,f,l,this.dom,this)),B&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(x=!0)}let E=this.input.mouseDown;x||!(E&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Iee(this)&&E.delaySelUpdate())?Fi(this,x):(Wb(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((n=this.dragging)===null||n===void 0)&&n.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),p=="reset"?this.dom.scrollTop=0:p=="to selection"?this.scrollToSelection():T&&fee(T)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof ht){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Wv(this,t.getBoundingClientRect(),e)}else Wv(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let n=this.directPlugins[t];n.spec.view&&this.pluginViews.push(n.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let n=this.state.plugins[t];n.spec.view&&this.pluginViews.push(n.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,i=-1;if(n.from<this.state.doc.content.size&&this.state.doc.nodeAt(n.from)==n.node)i=n.from;else{let a=n.from+(this.state.doc.content.size-t.doc.content.size);(a>0&&a<this.state.doc.content.size&&this.state.doc.nodeAt(a))==n.node&&(i=a)}this.dragging=new sk(e.slice,e.move,i<0?void 0:ht.create(this.state.doc,i))}someProp(e,t){let n=this._props&&this._props[e],i;if(n!=null&&(i=t?t(n):n))return i;for(let o=0;o<this.directPlugins.length;o++){let s=this.directPlugins[o].props[e];if(s!=null&&(i=t?t(s):s))return i}let a=this.state.plugins;if(a)for(let o=0;o<a.length;o++){let s=a[o].props[e];if(s!=null&&(i=t?t(s):s))return i}}hasFocus(){if(pn){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&dee(this.dom),Fi(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return gee(this,e)}coordsAtPos(e,t=1){return Fb(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let i=this.docView.posFromDOM(e,t,n);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return Cee(this,t||this.state,e)}pasteHTML(e,t){return Rs(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Rs(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return dh(this,e)}destroy(){this.docView&&(Xee(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Hf(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,eee())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Qee(this,e)}domSelectionRange(){let e=this.domSelection();return e?Wr&&this.root.nodeType===11&&aee(this.dom.ownerDocument)==this.dom&&Ste(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}_u.prototype.dispatch=function(r){let e=this._props.dispatchTransaction;e?e.call(this,r):this.updateState(this.state.apply(r))};function vm(r){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(r.editable),r.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(r.state)),t)for(let n in t)n=="class"?e.class+=" "+t[n]:n=="style"?e.style=(e.style?e.style+";":"")+t[n]:!e[n]&&n!="contenteditable"&&n!="nodeName"&&(e[n]=String(t[n]))}),e.translate||(e.translate="no"),[hn.node(0,r.state.doc.content.size,e)]}function mm(r){if(r.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),r.cursorWrapper={dom:e,deco:hn.widget(r.state.selection.from,e,{raw:!0,marks:r.markCursor})}}else r.cursorWrapper=null}function gm(r){return!r.someProp("editable",e=>e(r.state)===!1)}function Ite(r,e){let t=Math.min(r.$anchor.sharedDepth(r.head),e.$anchor.sharedDepth(e.head));return r.$anchor.start(t)!=e.$anchor.start(t)}function ym(r){let e=Object.create(null);function t(n){for(let i in n)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=n[i])}return r.someProp("nodeViews",t),r.someProp("markViews",t),e}function Pte(r,e){let t=0,n=0;for(let i in r){if(r[i]!=e[i])return!0;t++}for(let i in e)n++;return t!=n}function bm(r){if(r.spec.state||r.spec.filterTransaction||r.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}const Bte=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),Fte=typeof navigator<"u"&&/Win/.test(navigator.platform);function qte(r){let e=r.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let n,i,a,o;for(let s=0;s<e.length-1;s++){let l=e[s];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))n=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))a=!0;else if(/^mod$/i.test(l))Bte?o=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return n&&(t="Alt-"+t),i&&(t="Ctrl-"+t),o&&(t="Meta-"+t),a&&(t="Shift-"+t),t}function Hte(r){let e=Object.create(null);for(let t in r)e[qte(t)]=r[t];return e}function zf(r,e,t=!0){return e.altKey&&(r="Alt-"+r),e.ctrlKey&&(r="Ctrl-"+r),e.metaKey&&(r="Meta-"+r),t&&e.shiftKey&&(r="Shift-"+r),r}function Ps(r){return new mn({props:{handleKeyDown:_te(r)}})}function _te(r){let e=Hte(r);return function(t,n){let i=QZ(n),a,o=e[zf(i,n)];if(o&&o(t.state,t.dispatch,t))return!0;if(i.length==1&&i!=" "){if(n.shiftKey){let s=e[zf(i,n,!1)];if(s&&s(t.state,t.dispatch,t))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(Fte&&n.ctrlKey&&n.altKey)&&(a=eQ[n.keyCode])&&a!=i){let s=e[zf(a,n)];if(s&&s(t.state,t.dispatch,t))return!0}}return!1}}const yh=(r,e)=>r.selection.empty?!1:(e&&e(r.tr.deleteSelection().scrollIntoView()),!0);function zte(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("backward",r):t.parentOffset>0)?null:t}const Vte=(r,e,t)=>{let n=zte(r,t);if(!n)return!1;let i=dk(n);if(!i){let o=n.blockRange(),s=o&&Bu(o);return s==null?!1:(e&&e(r.tr.lift(o,s).scrollIntoView()),!0)}let a=i.nodeBefore;if(gk(r,i,e,-1))return!0;if(n.parent.content.size==0&&(Fo(a,"end")||ht.isSelectable(a)))for(let o=n.depth;;o--){let s=sh(r.doc,n.before(o),n.after(o),$e.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=r.tr.step(s);l.setSelection(Fo(a,"end")?xt.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):ht.create(l.doc,i.pos-a.nodeSize)),e(l.scrollIntoView())}return!0}if(o==1||n.node(o-1).childCount>1)break}return a.isAtom&&i.depth==n.depth-1?(e&&e(r.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1};function Fo(r,e,t=!1){for(let n=r;n;n=e=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(t&&n.childCount!=1)return!1}return!1}const Ute=(r,e,t)=>{let{$head:n,empty:i}=r.selection,a=n;if(!i)return!1;if(n.parent.isTextblock){if(t?!t.endOfTextblock("backward",r):n.parentOffset>0)return!1;a=dk(n)}let o=a&&a.nodeBefore;return!o||!ht.isSelectable(o)?!1:(e&&e(r.tr.setSelection(ht.create(r.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function dk(r){if(!r.parent.type.spec.isolating)for(let e=r.depth-1;e>=0;e--){if(r.index(e)>0)return r.doc.resolve(r.before(e+1));if(r.node(e).type.spec.isolating)break}return null}function $te(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("forward",r):t.parentOffset<t.parent.content.size)?null:t}const hk=(r,e,t)=>{let n=$te(r,t);if(!n)return!1;let i=pk(n);if(!i)return!1;let a=i.nodeAfter;if(gk(r,i,e,1))return!0;if(n.parent.content.size==0&&(Fo(a,"start")||ht.isSelectable(a))){let o=sh(r.doc,n.before(),n.after(),$e.empty);if(o&&o.slice.size<o.to-o.from){if(e){let s=r.tr.step(o);s.setSelection(Fo(a,"start")?xt.findFrom(s.doc.resolve(s.mapping.map(i.pos)),1):ht.create(s.doc,s.mapping.map(i.pos))),e(s.scrollIntoView())}return!0}}return a.isAtom&&i.depth==n.depth-1?(e&&e(r.tr.delete(i.pos,i.pos+a.nodeSize).scrollIntoView()),!0):!1},Wte=(r,e,t)=>{let{$head:n,empty:i}=r.selection,a=n;if(!i)return!1;if(n.parent.isTextblock){if(t?!t.endOfTextblock("forward",r):n.parentOffset<n.parent.content.size)return!1;a=pk(n)}let o=a&&a.nodeAfter;return!o||!ht.isSelectable(o)?!1:(e&&e(r.tr.setSelection(ht.create(r.doc,a.pos)).scrollIntoView()),!0)};function pk(r){if(!r.parent.type.spec.isolating)for(let e=r.depth-1;e>=0;e--){let t=r.node(e);if(r.index(e)+1<t.childCount)return r.doc.resolve(r.after(e+1));if(t.type.spec.isolating)break}return null}const vk=(r,e)=>{let{$head:t,$anchor:n}=r.selection;return!t.parent.type.spec.code||!t.sameParent(n)?!1:(e&&e(r.tr.insertText(`
|
|
10
|
-
`).scrollIntoView()),!0)};function bh(r){for(let e=0;e<r.edgeCount;e++){let{type:t}=r.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const kh=(r,e)=>{let{$head:t,$anchor:n}=r.selection;if(!t.parent.type.spec.code||!t.sameParent(n))return!1;let i=t.node(-1),a=t.indexAfter(-1),o=bh(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(e){let s=t.after(),l=r.tr.replaceWith(s,s,o.createAndFill());l.setSelection(xt.near(l.doc.resolve(s),1)),e(l.scrollIntoView())}return!0},jte=(r,e)=>{let t=r.selection,{$from:n,$to:i}=t;if(t instanceof Qr||n.parent.inlineContent||i.parent.inlineContent)return!1;let a=bh(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(e){let o=(!n.parentOffset&&i.index()<i.parent.childCount?n:i).pos,s=r.tr.insert(o,a.createAndFill());s.setSelection(St.create(s.doc,o+1)),e(s.scrollIntoView())}return!0},Gte=(r,e)=>{let{$cursor:t}=r.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let a=t.before();if(Lo(r.doc,a))return e&&e(r.tr.split(a).scrollIntoView()),!0}let n=t.blockRange(),i=n&&Bu(n);return i==null?!1:(e&&e(r.tr.lift(n,i).scrollIntoView()),!0)};function Kte(r){return(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof ht&&e.selection.node.isBlock)return!n.parentOffset||!Lo(e.doc,n.pos)?!1:(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let a=[],o,s,l=!1,f=!1;for(let x=n.depth;;x--)if(n.node(x).isBlock){l=n.end(x)==n.pos+(n.depth-x),f=n.start(x)==n.pos-(n.depth-x),s=bh(n.node(x-1).contentMatchAt(n.indexAfter(x-1))),a.unshift(l&&s?{type:s}:null),o=x;break}else{if(x==1)return!1;a.unshift(null)}let p=e.tr;(e.selection instanceof St||e.selection instanceof Qr)&&p.deleteSelection();let b=p.mapping.map(n.pos),T=Lo(p.doc,b,a.length,a);if(T||(a[0]=s?{type:s}:null,T=Lo(p.doc,b,a.length,a)),!T)return!1;if(p.split(b,a.length,a),!l&&f&&n.node(o).type!=s){let x=p.mapping.map(n.before(o)),E=p.doc.resolve(x);s&&n.node(o-1).canReplaceWith(E.index(),E.index()+1,s)&&p.setNodeMarkup(p.mapping.map(n.before(o)),s)}return t&&t(p.scrollIntoView()),!0}}const Jte=Kte(),mk=(r,e)=>(e&&e(r.tr.setSelection(new Qr(r.doc))),!0);function Yte(r,e,t){let n=e.nodeBefore,i=e.nodeAfter,a=e.index();return!n||!i||!n.type.compatibleContent(i.type)?!1:!n.content.size&&e.parent.canReplace(a-1,a)?(t&&t(r.tr.delete(e.pos-n.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(a,a+1)||!(i.isTextblock||Cb(r.doc,e.pos))?!1:(t&&t(r.tr.join(e.pos).scrollIntoView()),!0)}function gk(r,e,t,n){let i=e.nodeBefore,a=e.nodeAfter,o,s,l=i.type.spec.isolating||a.type.spec.isolating;if(!l&&Yte(r,e,t))return!0;let f=!l&&e.parent.canReplace(e.index(),e.index()+1);if(f&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&s.matchType(o[0]||a.type).validEnd){if(t){let x=e.pos+a.nodeSize,E=De.empty;for(let _=o.length-1;_>=0;_--)E=De.from(o[_].create(null,E));E=De.from(i.copy(E));let B=r.tr.step(new Or(e.pos-1,x,e.pos,x,new $e(E,1,0),o.length,!0)),F=B.doc.resolve(x+2*o.length);F.nodeAfter&&F.nodeAfter.type==i.type&&Cb(B.doc,F.pos)&&B.join(F.pos),t(B.scrollIntoView())}return!0}let p=a.type.spec.isolating||n>0&&l?null:xt.findFrom(e,1),b=p&&p.$from.blockRange(p.$to),T=b&&Bu(b);if(T!=null&&T>=e.depth)return t&&t(r.tr.lift(b,T).scrollIntoView()),!0;if(f&&Fo(a,"start",!0)&&Fo(i,"end")){let x=i,E=[];for(;E.push(x),!x.isTextblock;)x=x.lastChild;let B=a,F=1;for(;!B.isTextblock;B=B.firstChild)F++;if(x.canReplace(x.childCount,x.childCount,B.content)){if(t){let _=De.empty;for(let ee=E.length-1;ee>=0;ee--)_=De.from(E[ee].copy(_));let X=r.tr.step(new Or(e.pos-E.length,e.pos+a.nodeSize,e.pos+F,e.pos+a.nodeSize-F,new $e(_,E.length,0),0,!0));t(X.scrollIntoView())}return!0}}return!1}function yk(r){return function(e,t){let n=e.selection,i=r<0?n.$from:n.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(t&&t(e.tr.setSelection(St.create(e.doc,r<0?i.start(a):i.end(a)))),!0):!1}}const Xte=yk(-1),Zte=yk(1);function Qte(r,e=null){return function(t,n){let{$from:i,$to:a}=t.selection,o=i.blockRange(a),s=o&&DQ(o,r,e);return s?(n&&n(t.tr.wrap(o,s).scrollIntoView()),!0):!1}}function wh(r,e=null){return function(t,n){let i=!1;for(let a=0;a<t.selection.ranges.length&&!i;a++){let{$from:{pos:o},$to:{pos:s}}=t.selection.ranges[a];t.doc.nodesBetween(o,s,(l,f)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(r,e)))if(l.type==r)i=!0;else{let p=t.doc.resolve(f),b=p.index();i=p.parent.canReplaceWith(b,b+1,r)}})}if(!i)return!1;if(n){let a=t.tr;for(let o=0;o<t.selection.ranges.length;o++){let{$from:{pos:s},$to:{pos:l}}=t.selection.ranges[o];a.setBlockType(s,l,r,e)}n(a.scrollIntoView())}return!0}}function ere(r,e,t,n){for(let i=0;i<e.length;i++){let{$from:a,$to:o}=e[i],s=a.depth==0?r.inlineContent&&r.type.allowsMarkType(t):!1;if(r.nodesBetween(a.pos,o.pos,(l,f)=>{if(s)return!1;s=l.inlineContent&&l.type.allowsMarkType(t)}),s)return!0}return!1}function $s(r,e=null,t){return function(n,i){let{empty:a,$cursor:o,ranges:s}=n.selection;if(a&&!o||!ere(n.doc,s,r))return!1;if(i)if(o)r.isInSet(n.storedMarks||o.marks())?i(n.tr.removeStoredMark(r)):i(n.tr.addStoredMark(r.create(e)));else{let l,f=n.tr;l=!s.some(p=>n.doc.rangeHasMark(p.$from.pos,p.$to.pos,r));for(let p=0;p<s.length;p++){let{$from:b,$to:T}=s[p];if(!l)f.removeMark(b.pos,T.pos,r);else{let x=b.pos,E=T.pos,B=b.nodeAfter,F=T.nodeBefore,_=B&&B.isText?/^\s*/.exec(B.text)[0].length:0,X=F&&F.isText?/\s*$/.exec(F.text)[0].length:0;x+_<E&&(x+=_,E-=X),f.addMark(x,E,r.create(e))}}i(f.scrollIntoView())}return!0}}function zu(...r){return function(e,t,n){for(let i=0;i<r.length;i++)if(r[i](e,t,n))return!0;return!1}}let Vf=zu(yh,Vte,Ute),km=zu(yh,hk,Wte);const Li={Enter:zu(vk,jte,Gte,Jte),"Mod-Enter":kh,Backspace:Vf,"Mod-Backspace":Vf,"Shift-Backspace":Vf,Delete:km,"Mod-Delete":km,"Mod-a":mk},bk={"Ctrl-h":Li.Backspace,"Alt-Backspace":Li["Mod-Backspace"],"Ctrl-d":Li.Delete,"Ctrl-Alt-Backspace":Li["Mod-Delete"],"Alt-Delete":Li["Mod-Delete"],"Alt-d":Li["Mod-Delete"],"Ctrl-a":Xte,"Ctrl-e":Zte};for(let r in Li)bk[r]=Li[r];const tre=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,wm=tre?bk:Li;class pa{constructor(e,t,n={}){this.match=e,this.match=e,this.handler=typeof t=="string"?rre(t):t,this.undoable=n.undoable!==!1,this.inCode=n.inCode||!1,this.inCodeMark=n.inCodeMark!==!1}}function rre(r){return function(e,t,n,i){let a=r;if(t[1]){let o=t[0].lastIndexOf(t[1]);a+=t[0].slice(o+t[1].length),n+=o;let s=n-i;s>0&&(a=t[0].slice(o-s,o)+a,n=i)}return e.tr.insertText(a,n,i)}}const nre=500;function kk({rules:r}){let e=new mn({state:{init(){return null},apply(t,n){let i=t.getMeta(this);return i||(t.selectionSet||t.docChanged?null:n)}},props:{handleTextInput(t,n,i,a){return Cm(t,n,i,a,r,e)},handleDOMEvents:{compositionend:t=>{setTimeout(()=>{let{$cursor:n}=t.state.selection;n&&Cm(t,n.pos,n.pos,"",r,e)})}}},isInputRules:!0});return e}function Cm(r,e,t,n,i,a){if(r.composing)return!1;let o=r.state,s=o.doc.resolve(e),l=s.parent.textBetween(Math.max(0,s.parentOffset-nre),s.parentOffset,null,"")+n;for(let f=0;f<i.length;f++){let p=i[f];if(!p.inCodeMark&&s.marks().some(E=>E.type.spec.code))continue;if(s.parent.type.spec.code){if(!p.inCode)continue}else if(p.inCode==="only")continue;let b=p.match.exec(l);if(!b||b[0].length<n.length)continue;let T=e-(b[0].length-n.length);if(!p.inCodeMark){let E=!1;if(o.doc.nodesBetween(T,s.pos,B=>{B.isInline&&B.marks.some(F=>F.type.spec.code)&&(E=!0)}),E)continue}let x=p.handler(o,b,T,t);if(x)return p.undoable&&x.setMeta(a,{transform:x,from:e,to:t,text:n}),r.dispatch(x),!0}return!1}const ire=(r,e)=>{let t=r.plugins;for(let n=0;n<t.length;n++){let i=t[n],a;if(i.spec.isInputRules&&(a=i.getState(r))){if(e){let o=r.tr,s=a.transform;for(let l=s.steps.length-1;l>=0;l--)o.step(s.steps[l].invert(s.docs[l]));if(a.text){let l=o.doc.resolve(a.from).marks();o.replaceWith(a.from,a.to,r.schema.text(a.text,l))}else o.delete(a.from,a.to);e(o)}return!0}}return!1};new pa(/--$/,"—",{inCodeMark:!1});new pa(/\.\.\.$/,"…",{inCodeMark:!1});new pa(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1});new pa(/"$/,"”",{inCodeMark:!1});new pa(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1});new pa(/'$/,"’",{inCodeMark:!1});var mu=200,Nr=function(){};Nr.prototype.append=function(e){return e.length?(e=Nr.from(e),!this.length&&e||e.length<mu&&this.leafAppend(e)||this.length<mu&&e.leafPrepend(this)||this.appendInner(e)):this};Nr.prototype.prepend=function(e){return e.length?Nr.from(e).append(this):this};Nr.prototype.appendInner=function(e){return new are(this,e)};Nr.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?Nr.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};Nr.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Nr.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)};Nr.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var i=[];return this.forEach(function(a,o){return i.push(e(a,o))},t,n),i};Nr.from=function(e){return e instanceof Nr?e:e&&e.length?new wk(e):Nr.empty};var wk=(function(r){function e(n){r.call(this),this.values=n}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,a){return i==0&&a==this.length?this:new e(this.values.slice(i,a))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,a,o,s){for(var l=a;l<o;l++)if(i(this.values[l],s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,a,o,s){for(var l=a-1;l>=o;l--)if(i(this.values[l],s+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=mu)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=mu)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e})(Nr);Nr.empty=new wk([]);var are=(function(r){function e(t,n){r.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,i,a,o){var s=this.left.length;if(i<s&&this.left.forEachInner(n,i,Math.min(a,s),o)===!1||a>s&&this.right.forEachInner(n,Math.max(i-s,0),Math.min(this.length,a)-s,o+s)===!1)return!1},e.prototype.forEachInvertedInner=function(n,i,a,o){var s=this.left.length;if(i>s&&this.right.forEachInvertedInner(n,i-s,Math.max(a,s)-s,o+s)===!1||a<s&&this.left.forEachInvertedInner(n,Math.min(i,s),a,o)===!1)return!1},e.prototype.sliceInner=function(n,i){if(n==0&&i==this.length)return this;var a=this.left.length;return i<=a?this.left.slice(n,i):n>=a?this.right.slice(n-a,i-a):this.left.slice(n,a).append(this.right.slice(0,i-a))},e.prototype.leafAppend=function(n){var i=this.right.leafAppend(n);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(n){var i=this.left.leafPrepend(n);if(i)return new e(i,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e})(Nr);const ore=500;class Jn{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let i,a;t&&(i=this.remapping(n,this.items.length),a=i.maps.length);let o=e.tr,s,l,f=[],p=[];return this.items.forEach((b,T)=>{if(!b.step){i||(i=this.remapping(n,T+1),a=i.maps.length),a--,p.push(b);return}if(i){p.push(new li(b.map));let x=b.step.map(i.slice(a)),E;x&&o.maybeStep(x).doc&&(E=o.mapping.maps[o.mapping.maps.length-1],f.push(new li(E,void 0,void 0,f.length+p.length))),a--,E&&i.appendMap(E,a)}else o.maybeStep(b.step);if(b.selection)return s=i?b.selection.map(i.slice(a)):b.selection,l=new Jn(this.items.slice(0,n).append(p.reverse().concat(f)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:s}}addTransform(e,t,n,i){let a=[],o=this.eventCount,s=this.items,l=!i&&s.length?s.get(s.length-1):null;for(let p=0;p<e.steps.length;p++){let b=e.steps[p].invert(e.docs[p]),T=new li(e.mapping.maps[p],b,t),x;(x=l&&l.merge(T))&&(T=x,p?a.pop():s=s.slice(0,s.length-1)),a.push(T),t&&(o++,t=void 0),i||(l=T)}let f=o-n.depth;return f>lre&&(s=sre(s,f),o-=f),new Jn(s.append(a),o)}remapping(e,t){let n=new Ns;return this.items.forEach((i,a)=>{let o=i.mirrorOffset!=null&&a-i.mirrorOffset>=e?n.maps.length-i.mirrorOffset:void 0;n.appendMap(i.map,o)},e,t),n}addMaps(e){return this.eventCount==0?this:new Jn(this.items.append(e.map(t=>new li(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],i=Math.max(0,this.items.length-t),a=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach(T=>{T.selection&&s--},i);let l=t;this.items.forEach(T=>{let x=a.getMirror(--l);if(x==null)return;o=Math.min(o,x);let E=a.maps[x];if(T.step){let B=e.steps[x].invert(e.docs[x]),F=T.selection&&T.selection.map(a.slice(l+1,x));F&&s++,n.push(new li(E,B,F))}else n.push(new li(E))},i);let f=[];for(let T=t;T<o;T++)f.push(new li(a.maps[T]));let p=this.items.slice(0,i).append(f).append(n),b=new Jn(p,s);return b.emptyItemCount()>ore&&(b=b.compress(this.items.length-n.length)),b}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,i=[],a=0;return this.items.forEach((o,s)=>{if(s>=e)i.push(o),o.selection&&a++;else if(o.step){let l=o.step.map(t.slice(n)),f=l&&l.getMap();if(n--,f&&t.appendMap(f,n),l){let p=o.selection&&o.selection.map(t.slice(n));p&&a++;let b=new li(f.invert(),l,p),T,x=i.length-1;(T=i.length&&i[x].merge(b))?i[x]=T:i.push(b)}}else o.map&&n--},this.items.length,0),new Jn(Nr.from(i.reverse()),a)}}Jn.empty=new Jn(Nr.empty,0);function sre(r,e){let t;return r.forEach((n,i)=>{if(n.selection&&e--==0)return t=i,!1}),r.slice(t)}class li{constructor(e,t,n,i){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new li(t.getMap().invert(),t,this.selection)}}}class Qi{constructor(e,t,n,i,a){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i,this.prevComposition=a}}const lre=20;function ure(r,e,t,n){let i=t.getMeta(ua),a;if(i)return i.historyState;t.getMeta(dre)&&(r=new Qi(r.done,r.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return r;if(o&&o.getMeta(ua))return o.getMeta(ua).redo?new Qi(r.done.addTransform(t,void 0,n,Ql(e)),r.undone,Tm(t.mapping.maps),r.prevTime,r.prevComposition):new Qi(r.done,r.undone.addTransform(t,void 0,n,Ql(e)),null,r.prevTime,r.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let s=t.getMeta("composition"),l=r.prevTime==0||!o&&r.prevComposition!=s&&(r.prevTime<(t.time||0)-n.newGroupDelay||!cre(t,r.prevRanges)),f=o?Uf(r.prevRanges,t.mapping):Tm(t.mapping.maps);return new Qi(r.done.addTransform(t,l?e.selection.getBookmark():void 0,n,Ql(e)),Jn.empty,f,t.time,s??r.prevComposition)}else return(a=t.getMeta("rebased"))?new Qi(r.done.rebased(t,a),r.undone.rebased(t,a),Uf(r.prevRanges,t.mapping),r.prevTime,r.prevComposition):new Qi(r.done.addMaps(t.mapping.maps),r.undone.addMaps(t.mapping.maps),Uf(r.prevRanges,t.mapping),r.prevTime,r.prevComposition)}function cre(r,e){if(!e)return!1;if(!r.docChanged)return!0;let t=!1;return r.mapping.maps[0].forEach((n,i)=>{for(let a=0;a<e.length;a+=2)n<=e[a+1]&&i>=e[a]&&(t=!0)}),t}function Tm(r){let e=[];for(let t=r.length-1;t>=0&&e.length==0;t--)r[t].forEach((n,i,a,o)=>e.push(a,o));return e}function Uf(r,e){if(!r)return null;let t=[];for(let n=0;n<r.length;n+=2){let i=e.map(r[n],1),a=e.map(r[n+1],-1);i<=a&&t.push(i,a)}return t}function fre(r,e,t){let n=Ql(e),i=ua.get(e).spec.config,a=(t?r.undone:r.done).popEvent(e,n);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(t?r.done:r.undone).addTransform(a.transform,e.selection.getBookmark(),i,n),l=new Qi(t?s:a.remaining,t?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(ua,{redo:t,historyState:l})}let $f=!1,Sm=null;function Ql(r){let e=r.plugins;if(Sm!=e){$f=!1,Sm=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){$f=!0;break}}return $f}const ua=new qs("history"),dre=new qs("closeHistory");function Ck(r={}){return r={depth:r.depth||100,newGroupDelay:r.newGroupDelay||500},new mn({key:ua,state:{init(){return new Qi(Jn.empty,Jn.empty,null,0,-1)},apply(e,t,n){return ure(t,n,e,r)}},config:r,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i=n=="historyUndo"?xs:n=="historyRedo"?Ch:null;return!i||!e.editable?!1:(t.preventDefault(),i(e.state,e.dispatch))}}}})}function Tk(r,e){return(t,n)=>{let i=ua.getState(t);if(!i||(r?i.undone:i.done).eventCount==0)return!1;if(n){let a=fre(i,t,r);a&&n(e?a.scrollIntoView():a)}return!0}}const xs=Tk(!1,!0),Ch=Tk(!0,!0);function hre(r){let e=ua.getState(r);return e?e.done.eventCount:0}var Ld=function(r,e){return Ld=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Ld(r,e)};function Ge(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ld(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Ce=function(){return Ce=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Ce.apply(this,arguments)};function vn(r,e,t){if(arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}function Rt(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}function pre(r,e,t){var n;t=t||null;for(n in r)if(r.hasOwnProperty(n)&&e.call(t,r[n],n,r)===!1)break}var qo=pre;function vre(r,e){var t=Object.prototype.hasOwnProperty,n,i,a,o;for(a=1,o=arguments.length;a<o;a+=1){n=arguments[a];for(i in n)t.call(n,i)&&(r[i]=n[i])}return r}var Th=vre;function mre(r){return typeof r=="string"||r instanceof String}var zi=mre;function gre(r){return r instanceof Array}var Yo=gre;function yre(r,e,t){var n=0,i=r.length;for(t=t||null;n<i&&e.call(t,r[n],n,r)!==!1;n+=1);}var Ho=yre,bre=Yo,kre=Ho,wre=qo;function Cre(r,e,t){bre(r)?kre(r,e,t):wre(r,e,t)}var Vu=Cre,Tre=zi,Sre=Vu;function xre(r,e,t){var n=r.style;if(Tre(e)){n[e]=t;return}Sre(e,function(i,a){n[a]=i})}var hi=xre,Ere=Yo;function Mre(r,e,t){var n,i;if(t=t||0,!Ere(e))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(e,r,t);for(i=e.length,n=t;t>=0&&n<i;n+=1)if(e[n]===r)return n;return-1}var Za=Mre;function Are(r){return r===void 0}var ei=Are,Ore=ei;function Nre(r){return!r||!r.className?"":Ore(r.className.baseVal)?r.className:r.className.baseVal}var Sh=Nre,Dre=Yo,Lre=ei;function Rre(r,e){if(e=Dre(e)?e.join(" "):e,e=e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),Lre(r.className.baseVal)){r.className=e;return}r.className.baseVal=e}var Sk=Rre,xm=Vu,Ire=Za,Pre=Sh,Bre=Sk;function Fre(r){var e=Array.prototype.slice.call(arguments,1),t=r.classList,n=[],i;if(t){xm(e,function(a){r.classList.add(a)});return}i=Pre(r),i&&(e=[].concat(i.split(/\s+/),e)),xm(e,function(a){Ire(a,n)<0&&n.push(a)}),Bre(r,n)}var ci=Fre,Em=Ho,qre=Za,Hre=Sh,_re=Sk;function zre(r){var e=Array.prototype.slice.call(arguments,1),t=r.classList,n,i;if(t){Em(e,function(a){t.remove(a)});return}n=Hre(r).split(/\s+/),i=[],Em(n,function(a){qre(a,e)<0&&i.push(a)}),_re(r,i)}var Yn=zre;function Vre(r){return typeof r=="number"||r instanceof Number}var Ri=Vre;function Ure(r){return r===null}var gu=Ure,$re=qo;function Wre(r,e){var t=document.createElement("img"),n="";return $re(e,function(i,a){n+="&"+a+"="+i}),n=n.substring(1),t.src=r+"?"+n,t.style.display="none",document.body.appendChild(t),document.body.removeChild(t),t}var jre=Wre,Gre=ei,Kre=jre,Jre=10080*60*1e3;function Yre(r){var e=new Date().getTime();return e-r>Jre}function Xre(r,e){var t="https://www.google-analytics.com/collect",n=location.hostname,i="event",a="use",o="TOAST UI "+r+" for "+n+": Statistics",s=window.localStorage.getItem(o);!Gre(window.tui)&&window.tui.usageStatistics===!1||s&&!Yre(s)||(window.localStorage.setItem(o,new Date().getTime()),setTimeout(function(){(document.readyState==="interactive"||document.readyState==="complete")&&Kre(t,{v:1,t:i,tid:e,cid:n,dp:n,dh:r,el:r,ec:a})},1e3))}var Zre=Xre,Qre=/[\u0020]+/g,ene=/[>(){}[\]+-.!#|]/g,Mm=/<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[^\\>])*\/?>|<(\/)([a-zA-Z_][a-zA-Z0-9\-._]*)\s*\/?>|<!--[^-]+-->|<([a-zA-Z_][a-zA-Z0-9\-.:/]*)>/g,Am=/\\[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\\]/g,tne=/[*_~`]/g,Om=/!\[.*\]\(.*\)/g,rne=/[[\]]/g,Nm=/(?:^|[^\\])\\(?!\\)/g,nne='[&<>"]',Dm=new RegExp(nne,"g");function ine(r){switch(r){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return r}}function Oo(r){return Dm.test(r)?r.replace(Dm,ine):r}function ane(){Zre("editor","UA-129966929-1")}function zr(r,e){return r.indexOf(e)!==-1}var one=["rel","target","hreflang","type"],sne={codeblock:/(^ {4}[^\n]+\n*)+/,thematicBreak:/^ *((\* *){3,}|(- *){3,} *|(_ *){3,}) */,atxHeading:/^(#{1,6}) +[\s\S]+/,seTextheading:/^([^\n]+)\n *(=|-){2,} */,blockquote:/^( *>[^\n]+.*)+/,list:/^ *(\*+|-+|\d+\.) [\s\S]+/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? */,link:/!?\[.*\]\(.*\)/,reflink:/!?\[.*\]\s*\[([^\]]*)\]/,verticalBar:/\u007C/,fencedCodeblock:/^((`|~){3,})/};function xk(r){if(!r)return null;var e={};return one.forEach(function(t){ei(r[t])||(e[t]=r[t])}),e}function yu(r,e){for(var t="",n=0;n<e;n+=1)t+=r;return t}function lne(r){var e=!1;return qo(sne,function(t){return t.test(r)&&(e=!0),!e}),e}function bu(r){for(var e=[],t=Om.exec(r);t;)e.push([t.index,t.index+t[0].length]),t=Om.exec(r);return r.replace(rne,function(n,i){var a=e.some(function(o){return i>o[0]&&i<o[1]});return a?n:"\\"+n})}function une(r){var e=function(i){return"\\"+i},t=function(i){return i+"\\"},n=r.replace(Qre," ");return Am.test(n)&&(n=n.replace(Am,e)),Nm.test(n)&&(n=n.replace(Nm,t)),n=n.replace(tne,e),Mm.test(n)&&(n=n.replace(Mm,e)),lne(n)&&(n=n.replace(ene,e)),n}function cne(r){var e;return r.indexOf('"')===-1?e='""':e=r.indexOf("'")===-1?"''":"()",e[0]+r+e[1]}function Rd(r){return gu(r)||ei(r)}function xh(r,e){if(r===null&&r===e)return!0;if(typeof r!="object"||typeof e!="object"||Rd(r)||Rd(e))return r===e;for(var t in r)if(r[t]!==e[t])return!1;for(var t in e)if(!(t in r))return!1;return!0}function $r(r){return r[r.length-1]}function fne(r,e,t){return r>=e&&r<=t}function Eh(r){return typeof r=="object"&&r!==null}function ku(r,e){var t=Ce({},r);return r&&e&&Object.keys(e).forEach(function(n){Eh(t[n])?Array.isArray(e[n])?t[n]=Mh(e[n]):t.hasOwnProperty(n)?t[n]=ku(t[n],e[n]):t[n]=Ah(e[n]):t[n]=e[n]}),t}function Mh(r){return r.map(function(e){return Eh(e)?Array.isArray(e)?Mh(e):Ah(e):e})}function Ah(r){var e=Object.keys(r);return e.length?e.reduce(function(t,n){return Eh(r[n])?t[n]=Array.isArray(r[n])?Mh(r[n]):Ah(r[n]):t[n]=r[n],t},{}):r}function Oh(r,e){return e===void 0&&(e={}),Object.keys(e).forEach(function(t){r.hasOwnProperty(t)&&typeof r[t]=="object"?Array.isArray(e[t])?r[t]=e[t]:Oh(r[t],e[t]):r[t]=e[t]}),r}function Lm(r,e){return r>e?[e,r]:[r,e]}var dne=Ho;function hne(r){var e;try{e=Array.prototype.slice.call(r)}catch{e=[],dne(r,function(n){e.push(n)})}return e}var pi=hne;function wu(r,e){var t=r.nodes.paragraph;return e?t.create(null,zi(e)?r.text(e):e):t.createAndFill()}function _r(r,e,t){return r.text(e,t)}function er(r,e,t){t===void 0&&(t=e);var n=r.doc.content.size,i=n>0?n-1:1;return St.create(r.doc,Math.min(e,i),Math.min(t,i))}function Nh(r,e,t){var n=e.pos;return r.replaceWith(n,n,wu(t)),r.setSelection(er(r,n+1))}function Cu(r){for(var e=r.state,t=r.from,n=r.startIndex,i=r.endIndex,a=r.createText,o=e.tr,s=e.doc,l=e.schema,f=n;f<=i;f+=1){var p=s.child(f),b=p.nodeSize,T=p.textContent,x=p.content,E=a(T),B=E?_r(l,E):De.empty,F=o.mapping.map(t),_=F+x.size;o.replaceWith(F,_,B),t+=b}return o}function Dh(r,e,t,n){var i=t.length;r.split(e).delete(e-i,e).insert(r.mapping.map(e),n).setSelection(er(r,r.mapping.map(e)-i))}function Ws(r){return r.sourcepos[0][0]}function Uu(r){return r.sourcepos[1][0]}function $u(r){return r.sourcepos[0][1]}function ca(r){return r.sourcepos[1][1]}function pne(r){var e=r.type;return e==="htmlBlock"||e==="htmlInline"}function vne(r){var e=r.type;return e==="strike"||e==="strong"||e==="emph"||e==="code"||e==="link"||e==="image"}function mne(r){return r&&r.type==="codeBlock"}function Qa(r){return r&&(r.type==="item"||r.type==="list")}function Ek(r){return Qa(r)&&r.listData.type==="ordered"}function gne(r){return Qa(r)&&r.listData.type!=="ordered"}function Rm(r){return r&&(r.type==="tableCell"||r.type==="tableDelimCell")}function yne(r){switch(r.type){case"code":case"text":case"emph":case"strong":case"strike":case"link":case"image":case"htmlInline":case"linebreak":case"softbreak":case"customInline":return!0;default:return!1}}function _o(r,e,t){for(t===void 0&&(t=!0),r=t?r:r.parent;r&&r.type!=="document";){if(e(r))return r;r=r.parent}return null}function bne(r,e,t){for(t===void 0&&(t=!0),r=t?r:r.parent;r&&r.type!=="document";)e(r),r=r.parent}function Mr(r,e){return[r[0],r[1]+e]}function fa(r,e){return[r[0],e]}function kne(r){var e=r.firstChild.literal;switch(r.type){case"emph":return"*"+e+"*";case"strong":return"**"+e+"**";case"strike":return"~~"+e+"~~";case"code":return"`"+e+"`";case"link":case"image":var t=r,n=t.destination,i=t.title,a=r.type==="link"?"":"!";return a+"["+e+"]("+n+(i?' "'+i+'"':"")+")";default:return null}}function wne(r){switch(r.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}function Cne(r){for(var e=[],t=r.walker(),n=null;n=t.next();){var i=n.node;i.type==="text"&&e.push(i.literal)}return e.join("")}var Bs=[],Mk={},Im=/\$\$widget\d+\s/;function Wu(r){var e=r.search(Im);if(e!==-1){var t=r.substring(e),n=t.replace(Im,"").replace("$$","");r=r.substring(0,e),r+=Wu(n)}return r}function Ak(r,e){return"$$"+r+" "+e+"$$"}function Ok(r,e){var t=Mk[r],n=t.rule,i=t.toDOM,a=Wu(e).match(n);return a&&(e=a[0]),i(e)}function Tne(){return Bs}function Sne(r){Bs=r,Bs.forEach(function(e,t){Mk["widget"+t]=e})}function Wf(r,e,t,n){return r.concat(Ga(e,t,n))}function Ga(r,e,t){t===void 0&&(t=0);var n=[],i=(Bs[t]||{}).rule,a=t+1;if(r=Wu(r),i&&i.test(r)){for(var o=void 0;(o=r.search(i))!==-1;){var s=r.substring(0,o);s&&(n=Wf(n,s,e,a)),r=r.substring(o);var l=r.match(i)[0],f="widget"+t;n.push(e.nodes.widget.create({info:f},e.text(Ak(f,l)))),r=r.substring(l.length)}r&&(n=Wf(n,r,e,a))}else r&&(n=t<Bs.length-1?Wf(n,r,e,a):[e.text(r)]);return n}function Nk(r){for(var e,t="",n=r.walker();e=n.next();){var i=e.node,a=e.entering;a&&(i!==r&&i.type!=="text"?(t+=kne(i),n.resumeAt(r,!1),n.next()):i.type==="text"&&(t+=i.literal))}return t}function Dk(){return{deleteSelection:function(){return yh},selectAll:function(){return mk},undo:function(){return xs},redo:function(){return Ch}}}function xne(r){return new mn({props:{decorations:function(e){var t=e.doc;if(r.text&&t.childCount===1&&t.firstChild.isTextblock&&t.firstChild.content.size===0){var n=document.createElement("span");return ci(n,"placeholder"),r.className&&ci(n,r.className),n.textContent=r.text,dr.create(t,[hn.widget(1,n)])}return null}}})}var Ene=Za,Mne=Sh;function Ane(r,e){var t;return r.classList?r.classList.contains(e):(t=Mne(r).split(/\s+/),Ene(e,t)>-1)}var Lk=Ane,One=Za,Nne=pi,Hl=Element.prototype,Dne=Hl.matches||Hl.webkitMatchesSelector||Hl.mozMatchesSelector||Hl.msMatchesSelector||function(r){var e=this.document||this.ownerDocument;return One(this,Nne(e.querySelectorAll(r)))>-1};function Lne(r,e){return Dne.call(r,e)}var Rne=Lne,Rk="[A-Za-z][A-Za-z0-9-]*",Ine="[a-zA-Z_:][a-zA-Z0-9:._-]*",Pne="[^\"'=<>`\\x00-\\x20]+",Bne="'[^']*'",Fne='"[^"]*"',qne="(?:"+Pne+"|"+Bne+"|"+Fne+")",Hne="(?:\\s*=\\s*"+qne+")",Ik="(?:\\s+"+Ine+Hne+"?)",Pk="<("+Rk+")("+Ik+")*\\s*/?>",_ne="</("+Rk+")\\s*[>]",Bk="(?:"+Pk+"|"+_ne+")",zo=new RegExp("^"+Bk,"i"),Id=/<br\s*\/*>/i,zne=/<! ---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,Fk="</p><p>";function Lh(r,e,t){var n=parseInt(r.left,10),i=parseInt(r.top,10),a=parseInt(r.width,10)+parseInt(r.paddingLeft,10)+parseInt(r.paddingRight,10),o=parseInt(r.height,10)+parseInt(r.paddingTop,10)+parseInt(r.paddingBottom,10);return e>=n&&e<=n+a&&t>=i&&t<=i+o}var qk="toastui-editor-";function Ze(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=[],n=0,i=r;n<i.length;n++){var a=i[n],o=void 0;Array.isArray(a)?o=a[0]?a[1]:null:o=a,o&&t.push(""+qk+o)}return t.join(" ")}function Tr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.map(function(t){return qk+"md-"+t}).join(" ")}function Vne(r){return r?.nodeType===Node.TEXT_NODE}function ju(r){return r&&r.nodeType===Node.ELEMENT_NODE}function Une(r,e){var t=pi(r.querySelectorAll(e));return t.length?t:[]}function $ne(r,e){e=Yo(e)?pi(e):[e],e.forEach(function(t){r.appendChild(t)})}function Wne(r,e){e.parentNode&&e.parentNode.insertBefore(r,e)}function eo(r){r.parentNode&&r.parentNode.removeChild(r)}function jne(r){for(var e=[];r.firstChild;)e.push(r.firstChild),r.parentNode&&r.parentNode.insertBefore(r.firstChild,r);return eo(r),e}function Rh(r,e,t){ei(t)&&(t=!Lk(r,e));var n=t?ci:Yn;n(r,e)}function Hk(r,e){var t=document.createElement("div");zi(r)?t.innerHTML=r:t.appendChild(r);var n=t.firstChild;return e&&e.appendChild(n),n}function Ih(r){var e=window.getComputedStyle(r);return["margin-left","margin-right"].reduce(function(t,n){return t+parseInt(e.getPropertyValue(n),10)},0)+r.offsetWidth}function fi(r,e){var t;for(zi(e)?t=function(n){return Rne(n,e)}:t=function(n){return n===e};r&&r!==document;){if(ju(r)&&t(r))return r;r=r.parentNode}return null}function _k(r,e){for(var t=0,n=0;r&&r!==e;){var i=r.offsetTop,a=r.offsetLeft,o=r.offsetParent;if(t+=i,n+=a,o===e.offsetParent)break;r=r.offsetParent}return{offsetTop:t,offsetLeft:n}}function Ph(r,e){Object.keys(r).forEach(function(t){Rd(r[t])?e.removeAttribute(t):e.setAttribute(t,r[t])})}function Gne(r){var e=r.replace(/<p><br\s*\/*><\/p>/gi,"<p></p>"),t=new RegExp(Bk,"ig"),n=e.match(t);return n?.forEach(function(i,a){if(Id.test(i)){var o=Fk;if(a){var s=n[a-1],l=s.match(Pk);if(l&&!/br/i.test(l[1])){var f=l[1];o="</"+f+"><"+f+">"}}e=e.replace(Id,o)}}),e}function Bh(r){var e=/<img class="ProseMirror-separator" alt="">/g,t=/ class="ProseMirror-trailingBreak"/g,n=r;return n=n.replace(e,""),n=n.replace(t,""),n}var zk=new qs("widget"),Pm=5,Kne=(function(){function r(e,t){var n=this;this.popup=null,this.removeWidget=function(){n.popup&&(n.rootEl.removeChild(n.popup),n.popup=null)},this.rootEl=e.dom.parentElement,this.eventEmitter=t,this.eventEmitter.listen("blur",this.removeWidget),this.eventEmitter.listen("loadUI",function(){n.rootEl=fi(e.dom.parentElement,"."+Ze("defaultUI"))}),this.eventEmitter.listen("removePopupWidget",this.removeWidget)}return r.prototype.update=function(e){var t=zk.getState(e.state);if(this.removeWidget(),t){var n=t.node,i=t.style,a=e.coordsAtPos(t.pos),o=a.top,s=a.left,l=a.bottom,f=l-o,p=this.rootEl.getBoundingClientRect(),b=o-p.top;hi(n,{opacity:"0"}),this.rootEl.appendChild(n),hi(n,{position:"absolute",left:s-p.left+Pm+"px",top:(i==="bottom"?b+f-Pm:b-f)+"px",opacity:"1"}),this.popup=n,e.focus()}},r.prototype.destroy=function(){this.eventEmitter.removeEventHandler("blur",this.removeWidget)},r})();function Jne(r){return new mn({key:zk,state:{init:function(){return null},apply:function(e){return e.getMeta("widget")}},view:function(e){return new Kne(e,r)}})}function Yne(r){r.listen("addImageBlobHook",function(e,t){var n=new FileReader;n.onload=function(i){var a=i.target;return t(a.result)},n.readAsDataURL(e)})}function Fh(r,e,t){var n=function(i,a){r.emit("command","addImage",{imageUrl:i,altText:a||e.name||"image"})};r.emit("addImageBlobHook",e,n,t)}function Vk(r){var e=pi(r).filter(function(n){var i=n.type;return i.indexOf("image")!==-1});if(e.length===1){var t=e[0];if(t)return t.getAsFile()}return null}function Xne(r){var e=r.eventEmitter;return new mn({props:{handleDOMEvents:{drop:function(t,n){var i,a=(i=n.dataTransfer)===null||i===void 0?void 0:i.files;return a&&Ho(a,function(o){return o.type.indexOf("image")!==-1?(n.preventDefault(),n.stopPropagation(),Fh(e,o,n.type),!1):!0}),!0}}}})}var Jt=(function(){function r(){}return Object.defineProperty(r.prototype,"type",{get:function(){return"node"},enumerable:!1,configurable:!0}),r.prototype.setContext=function(e){this.context=e},r})();function Uk(r){var e=document.createElement("span"),t=Ok(r.attrs.info,r.textContent);return e.className="tui-widget",e.appendChild(t),{dom:e}}function Pd(r){return r.type.name==="widget"}var $k=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"widget"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{info:{default:null}},group:"inline",inline:!0,content:"text*",selectable:!1,atom:!0,toDOM:function(){return["span",{class:"tui-widget"},0]},parseDOM:[{tag:"span.tui-widget",getAttrs:function(t){var n=t.textContent,i=n.match(/\$\$(widget\d+)/),a=i[1];return{info:a}}}]}},enumerable:!1,configurable:!0}),e})(Jt),Wk=(function(){function r(e){this.timer=null,this.el=document.createElement("div"),this.el.className="toastui-editor",this.eventEmitter=e,this.placeholder={text:""}}return r.prototype.createState=function(){return _a.create({schema:this.schema,plugins:this.createPlugins()})},r.prototype.initEvent=function(){var e=this,t=e.eventEmitter,n=e.view,i=e.editorType;n.dom.addEventListener("focus",function(){return t.emit("focus",i)}),n.dom.addEventListener("blur",function(){return t.emit("blur",i)})},r.prototype.emitChangeEvent=function(e){this.eventEmitter.emit("caretChange",this.editorType),e.docChanged&&this.eventEmitter.emit("change",this.editorType)},Object.defineProperty(r.prototype,"defaultPlugins",{get:function(){var e=this.createInputRules(),t=vn(vn([],this.keymaps),[Ps(Ce({"Shift-Enter":wm.Enter},wm)),Ck(),xne(this.placeholder),Jne(this.eventEmitter),Xne(this.context)]);return e?t.concat(e):t},enumerable:!1,configurable:!0}),r.prototype.createInputRules=function(){var e=Tne(),t=e.map(function(n){var i=n.rule;return new pa(i,function(a,o,s,l){var f=a.schema,p=a.tr,b=a.doc,T=o.input.match(new RegExp(i,"g")),x=b.resolve(s),E=x.parent,B=0;if(Pd(E)&&(E=x.node(x.depth-1)),E.forEach(function(X){return Pd(X)&&(B+=1)}),T.length>B){var F=$r(T),_=Ga(F,f);return p.replaceWith(l-F.length+1,l,_)}return null})});return t.length?kk({rules:t}):null},r.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},r.prototype.createSchema=function(){return new db({nodes:this.specs.nodes,marks:this.specs.marks})},r.prototype.createKeymaps=function(e){var t=Dk(),n=t.undo,i=t.redo,a=this.specs.keymaps(e),o={"Mod-z":n(),"Shift-Mod-z":i()};return e?a.concat(Ps(o)):a},r.prototype.createCommands=function(){return this.specs.commands(this.view)},r.prototype.createPluginProps=function(){var e=this;return this.extraPlugins.map(function(t){return t(e.eventEmitter)})},r.prototype.focus=function(){var e=this;this.clearTimer(),this.timer=setTimeout(function(){e.view.focus(),e.view.dispatch(e.view.state.tr.scrollIntoView())})},r.prototype.blur=function(){this.view.dom.blur()},r.prototype.destroy=function(){var e=this;this.clearTimer(),this.view.destroy(),Object.keys(this).forEach(function(t){delete e[t]})},r.prototype.moveCursorToStart=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(er(t,1)).scrollIntoView()),e&&this.focus()},r.prototype.moveCursorToEnd=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(er(t,t.doc.content.size-1)).scrollIntoView()),e&&this.focus()},r.prototype.setScrollTop=function(e){this.view.dom.scrollTop=e},r.prototype.getScrollTop=function(){return this.view.dom.scrollTop},r.prototype.setPlaceholder=function(e){this.placeholder.text=e,this.view.dispatch(this.view.state.tr.scrollIntoView())},r.prototype.setHeight=function(e){hi(this.el,{height:e+"px"})},r.prototype.setMinHeight=function(e){hi(this.el,{minHeight:e+"px"})},r.prototype.getElement=function(){return this.el},r})();function Zne(r){return r instanceof Function}var zn=Zne,Qne=["Enter","Shift-Enter","Mod-Enter","Tab","Shift-Tab","Delete","Backspace","Mod-Delete","Mod-Backspace","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Mod-d","Mod-D","Alt-ArrowUp","Alt-ArrowDown"];function _l(r,e,t){return r.focus(),e(t)(r.state,r.dispatch,r)}var jk=(function(){function r(e){this.specs=e}return Object.defineProperty(r.prototype,"nodes",{get:function(){return this.specs.filter(function(e){return e.type==="node"}).reduce(function(e,t){var n,i=t.name,a=t.schema;return Ce(Ce({},e),(n={},n[i]=a,n))},{})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"marks",{get:function(){return this.specs.filter(function(e){return e.type==="mark"}).reduce(function(e,t){var n,i=t.name,a=t.schema;return Ce(Ce({},e),(n={},n[i]=a,n))},{})},enumerable:!1,configurable:!0}),r.prototype.commands=function(e,t){var n=this.specs.filter(function(a){var o=a.commands;return o}).reduce(function(a,o){var s={},l=o.commands();return zn(l)?s[o.name]=function(f){return _l(e,l,f)}:Object.keys(l).forEach(function(f){s[f]=function(p){return _l(e,l[f],p)}}),Ce(Ce({},a),s)},{}),i=Dk();return Object.keys(i).forEach(function(a){n[a]=function(o){return _l(e,i[a],o)}}),t&&Object.keys(t).forEach(function(a){n[a]=function(o){return _l(e,t[a],o)}}),n},r.prototype.keymaps=function(e){var t=this.specs.filter(function(n){return n.keymaps}).map(function(n){return n.keymaps()});return t.map(function(n){return e||Object.keys(n).forEach(function(i){zr(Qne,i)||delete n[i]}),Ps(n)})},r.prototype.setContext=function(e){this.specs.forEach(function(t){t.setContext(e)})},r})();function Gk(r){var e=r.from,t=r.to;return r instanceof Qr?[e+1,t-1]:[e,t]}function Bm(r){return r.index(0)+1}function Vo(r,e,t){t===void 0&&(t=1);var n=0;return r.forEach(function(i,a){Pd(i)&&a+2<e&&(n+=2*t)}),n}function eu(r,e,t){t===void 0&&(t=e);var n=e===t,i=r.resolve(e),a=Bm(i),o=a,s=i.start(1),l=s;if(!n){var f=r.resolve(t===r.content.size?t-1:t);l=f.start(1),o=Bm(f),f.pos===r.content.size&&(t=r.content.size-2)}var p=Math.max(e-s+1,1),b=Math.max(t-l+1,1);return[[a,p+Vo(r.child(a-1),p,-1)],[o,b+Vo(r.child(o-1),b,-1)]]}function Kk(r,e){for(var t=[],n=0,i=0;n<e;n+=1){var a=r.child(n);t[n]=i,i+=a.nodeSize}return t}function qa(r,e,t){var n=Kk(r,t[0]),i=e[0]-1,a=t[0]-1,o=r.child(i),s=r.child(a),l=n[i],f=n[a];return l+=e[1]+Vo(o,e[1]-1),f+=t[1]+Vo(s,t[1]-1),[l,Math.min(f,r.content.size)]}function Cr(r){var e=r.$from,t=r.$to,n=r.from,i=r.to,a=e.doc;return r instanceof Qr&&(e=a.resolve(n+1),t=a.resolve(i-1)),e.depth===0&&(e=a.resolve(n-1),t=e),{startFromOffset:e.start(1),endFromOffset:t.start(1),startToOffset:e.end(1),endToOffset:t.end(1),startIndex:e.index(0),endIndex:t.index(0),from:e.pos,to:t.pos}}function Tu(r,e){for(var t=1,n=1,i=0,a=0;i<r.childCount;i+=1){var o=r.child(i).nodeSize;if(t=a+1,n=a+o-1,i===e)break;a+=o}return{startOffset:t,endOffset:n}}var Fm="heading",eie="blockQuote",tie="listItem",rie="table",nie="tableCell",iie="codeBlock",aie="thematicBreak",tu="link",zl="code",Gu="meta",to="delimiter",oie="taskDelimiter",qh="markedText",sie="html",lie="customBlock",qm={strong:2,emph:1,strike:2};function Ht(r,e,t,n){return{start:r,end:e,spec:{type:t,attrs:n}}}function uie(r,e,t){var n=r.level,i=r.headingType,a=[Ht(e,t,Fm,{level:n})];return i==="atx"?a.push(Ht(e,Mr(e,n),to)):a.push(Ht(fa(t,0),t,Fm,{seText:!0})),a}function jf(r,e,t){var n=r.type,i=Mr(e,qm[n]),a=Mr(t,-qm[n]);return[Ht(i,a,n),Ht(e,i,to),Ht(a,t,to)]}function Jk(r,e,t,n){return[Ht(r,e,tu),Ht(fa(r,t[1]+1),fa(e,n),tu,{desc:!0}),Ht(fa(e,n+2),Mr(e,-1),tu,{url:!0})]}function cie(r,e,t){var n=r.lastChild,i=n?ca(n)+1:3,a=Mr(e,1);return vn([Ht(e,a,Gu)],Jk(e,t,a,i))}function fie(r,e,t){var n=r.lastChild,i=r.extendedAutolink,a=n?ca(n)+1:2;return i?[Ht(e,t,tu,{desc:!0})]:Jk(e,t,e,a)}function die(r,e,t){var n=r.tickCount,i=Mr(e,n),a=Mr(t,-n);return[Ht(e,t,zl),Ht(e,i,zl,{start:!0}),Ht(i,a,zl,{marked:!0}),Ht(a,t,zl,{end:!0})]}function Yk(r,e,t,n){var i={start:e,end:t,spec:{attrs:{className:n+"-line-background",codeStart:e[0],codeEnd:t[0]}},lineBackground:!0};return r.type!=="item"&&r.type!=="blockQuote"?[Ce(Ce({},i),{end:e,spec:{attrs:{className:n+"-line-background start"}}}),Ce(Ce({},i),{start:[Math.min(e[0]+1,t[0]),e[1]]})]:null}function hie(r,e,t,n){var i=r.fenceOffset,a=r.fenceLength,o=r.fenceChar,s=r.info,l=r.infoPadding,f=r.parent,p=i+a,b=[Ht(fa(e,1),t,iie)];o&&b.push(Ht(e,Mr(e,p),to)),s&&b.push(Ht(Mr(e,a),Mr(e,a+l+s.length),Gu));var T="^(\\s{0,4})("+o+"{"+a+",})",x=new RegExp(T);x.test(n)&&b.push(Ht(fa(t,1),t,to));var E=Yk(f,e,t,"code-block");return E?b.concat(E):b}function pie(r,e,t){var n=r,i=n.offset,a=n.syntaxLength,o=n.info,s=n.parent,l=i+a,f=[Ht(fa(e,1),t,lie)];f.push(Ht(e,Mr(e,l),to)),o&&f.push(Ht(Mr(e,l),Mr(e,a+o.length),Gu)),f.push(Ht(fa(t,1),t,to));var p=Yk(s,e,t,"custom-block");return p?f.concat(p):f}function Xk(r,e){for(var t=[];r;){var n=r.type;(n==="paragraph"||n==="codeBlock")&&t.push(Ht([Ws(r),$u(r)-1],[Uu(r),ca(r)+1],e)),r=r.next}return t}function vie(r){for(var e=[];r;)e.push(Ht([Ws(r),$u(r)],[Uu(r),ca(r)+1],qh)),r=r.next;return e}function mie(r,e,t){var n=r.parent&&r.parent.type!=="blockQuote"?[Ht(e,t,eie)]:[];if(r.firstChild){var i=[];r.firstChild.type==="paragraph"?i=vie(r.firstChild.firstChild):r.firstChild.type==="list"&&(i=Xk(r.firstChild,qh)),n=vn(vn([],n),i)}return n}function gie(r){for(var e=0;r.parent.parent&&r.parent.parent.type==="item";)r=r.parent.parent,e+=1;var t=[{odd:!0},{even:!0}][e%2];return[tie,Ce(Ce({},t),{listStyle:!0})]}function yie(r,e){var t=r.listData,n=t.padding,i=t.task,a=gie(r),o=[Ht.apply(void 0,vn([e,Mr(e,n)],a))];return i&&(o.push(Ht(Mr(e,n),Mr(e,n+3),oie)),o.push(Ht(Mr(e,n+1),Mr(e,n+2),Gu))),o.concat(Xk(r.firstChild,qh))}var Hm={heading:uie,strong:jf,emph:jf,strike:jf,link:fie,image:cie,code:die,codeBlock:hie,blockQuote:mie,item:yie,customBlock:pie},_m={thematicBreak:aie,table:rie,tableCell:nie,htmlInline:sie};function bie(r,e,t,n){var i=r.type;return zn(Hm[i])?Hm[i](r,e,t,n):_m[i]?[Ht(e,t,_m[i])]:null}var Fs={};function kie(r){var e=r.schema,t=r.toastMark;return new mn({appendTransaction:function(n,i,a){var o=n[0],s=a.tr;if(o.docChanged){var l=[],f=o.getMeta("editResult");f.forEach(function(p){var b=p.nodes,T=p.removedNodeRange;if(b.length){l=l.concat(Eie(s,b));for(var x=0,E=b;x<E.length;x++)for(var B=E[x],F=B.walker(),_=F.next();_;){var X=_.node,ee=_.entering;ee&&(l=l.concat(Mie(X,t))),_=F.next()}}else if(T)for(var se=s.doc.childCount-1,de=T.line,ae=de[0],le=de[1],Te=Math.min(ae,se),xe=Math.min(le,se),Le=Te;Le<=xe;Le+=1)Fs[Le]=!0}),Tie(s,e,l)}return s.setMeta("widget",o.getMeta("widget"))}})}function wie(r,e,t){return Object.keys(t).some(function(n){return t[n]!==r.child(e).attrs[n]})}function Cie(r,e,t,n,i){i===void 0&&(i={});for(var a=n.startIndex,o=n.endIndex,s=n.from,l=n.to,f=!1,p=a;p<=o;p+=1)delete Fs[p],f=wie(e,p,i);f&&r.setBlockType(s,l,t,i)}function Tie(r,e,t){var n=r.doc,i=e.nodes.paragraph,a=Kk(n,n.childCount);t.forEach(function(o){var s=o.start,l=o.end,f=o.spec,p=o.lineBackground,b=Math.min(s[0],n.childCount)-1,T=Math.min(l[0],n.childCount)-1,x=n.child(b),E=n.child(T),B=a[b],F=a[T];if(B+=s[1]+Vo(x,s[1]-1),F+=l[1]+Vo(E,l[1]-1),f)if(p){var _={from:B,to:F,startIndex:b,endIndex:T};Cie(r,n,i,_,f.attrs)}else r.addMark(B,F,e.mark(f.type,f.attrs));else r.removeMark(B,F)}),Sie(r,a,i)}function Sie(r,e,t){Object.keys(Fs).forEach(function(n){var i=Number(n),a=Math.min(Number(n)+1,r.doc.childCount-1),o=e[i],s=e[a]-1;i===a&&(s+=2),r.setBlockType(o,s,t)})}function xie(r,e,t){var n=[];Fs={};for(var i=e[0]-1;i<t[0];i+=1){var a=r.child(i),o=a.attrs.codeEnd,s=a.attrs.codeStart;if(s&&o&&!zr(n,s)){n.push(s),o=Math.min(o,r.childCount);for(var l=s-1,f=t[0],p=l;p<f;p+=1)Fs[p]=!0}}}function Eie(r,e){var t=r.doc,n=e[0].sourcepos[0],i=$r(e).sourcepos,a=i[1],o=[n[0],n[1]],s=[a[0],a[1]+1],l=[];return xie(t,n,a),l.push({start:o,end:s}),l}function Mie(r,e){var t=e.getLineTexts(),n=[Ws(r),$u(r)],i=[Uu(r),ca(r)+1],a=bie(r,n,i,t[i[0]-1]);return a??[]}var Aie=["taskList","orderedList","bulletList","table","strong","emph","strike","heading","thematicBreak","blockQuote","code","codeBlock","indent","outdent"];function Oie(r){var e=r.type;return Qa(r)?r.listData.task?"taskList":r.listData.type==="ordered"?"orderedList":"bulletList":e.indexOf("table")!==-1?"table":zr(Aie,e)?e:null}function Nie(r){var e={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}},t=!0;return bne(r,function(n){var i=Oie(n);i&&(i==="bulletList"||i==="orderedList"?t&&(e[i]={active:!0},e.indent.disabled=!1,e.outdent.disabled=!1,t=!1):e[i]={active:!0})}),e}function Die(r){var e=r.toastMark,t=r.eventEmitter;return new mn({view:function(){return{update:function(n,i){var a=n.state,o=a.doc,s=a.selection;if(!(i&&i.doc.eq(o)&&i.selection.eq(s))){var l=s.from,f=a.doc.resolve(l).start(),p=a.doc.content.findIndex(l).index+1,b=l-f;l===f&&(b+=1);var T=[p,b],x=e.findNodeAtPosition(T),E=Nie(x);t.emit("changeToolbarState",{cursorPos:T,mdNode:x,toolbarState:E}),t.emit("setFocusedNode",x)}}}}})}var Lie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"doc"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"block+"}},enumerable:!1,configurable:!0}),e})(Jt),tr=(function(){function r(){}return Object.defineProperty(r.prototype,"type",{get:function(){return"mark"},enumerable:!1,configurable:!0}),r.prototype.setContext=function(e){this.context=e},r})();function Tn(r,e){return da(r,e-1)}function da(r,e){return r.child(e).textContent}var bs=/^\s*> ?/,Rie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("block-quote")},0]}}},enumerable:!1,configurable:!0}),e.prototype.createBlockQuoteText=function(t,n){return n?t.replace(bs,"").trim():"> "+t.trim()},e.prototype.extendBlockQuote=function(){var t=this;return function(n,i){var a=n.selection,o=n.doc,s=n.tr,l=n.schema,f=Cr(a),p=f.endFromOffset,b=f.endToOffset,T=f.endIndex,x=f.to,E=da(o,T),B=bs.test(E);if(B&&x>p&&a.empty){var F=!E.replace(bs,"").trim();if(F)s.deleteRange(p,b).split(s.mapping.map(b));else{var _=E.slice(x-p).trim(),X=_r(l,t.createBlockQuoteText(_));Dh(s,b,_,X)}return i(s),!0}return!1}},e.prototype.commands=function(){var t=this;return function(){return function(n,i){var a=n.selection,o=n.doc,s=Cr(a),l=s.startFromOffset,f=s.endToOffset,p=s.startIndex,b=s.endIndex,T=bs.test(da(o,p)),x=Cu({state:n,startIndex:p,endIndex:b,from:l,createText:function(E){return t.createBlockQuoteText(E,T)}});return i(x.setSelection(er(x,x.mapping.map(f)))),!0}}},e.prototype.keymaps=function(){var t=this.commands()();return{"alt-q":t,"alt-Q":t,Enter:this.extendBlockQuote()}},e})(tr),ro=/(^\s*)([-*+] |[\d]+\. )/,Hh=/(^\s*)([\d])+\.( \[[ xX]])? /,qi=/^(\s*)((\d+)([.)]\s(?:\[(?:x|\s)\]\s)?))(.*)/,Su=/(^\s*)([-*+]|[\d]+\.)( \[[ xX]])? /,Iie=/^(\s*)([-*+]+(\s(?:\[(?:x|\s)\]\s)?))(.*)/,Pie=/(^\s*)([-*+] |[\d]+\. )(\[[ xX]] )/,Bie=/(^\s*)([-*+])( \[[ xX]]) /;function _h(r){return Hh.test(r)?"ordered":"bullet"}function zh(r){for(var e=0;r&&r.type!=="document";)r.type==="list"&&(e+=1),r=r.parent;return e}function Bd(r,e,t,n){for(var i=r.getLineTexts(),a=i.length,o=[],s=e;n?s<a:s>1;){s=n?s+1:s-1;var l=r.findFirstNodeAtLine(s),f=zh(l);if(f===t)o.push({line:s,depth:t,mdNode:l});else if(f<t)break}return o}function Fie(r){var e=r.toastMark,t=r.mdNode,n=r.line,i=zh(t),a=Bd(e,n,i,!1).reverse(),o=Bd(e,n,i,!0);return a.concat([{line:n,depth:i,mdNode:t}]).concat(o)}function qie(r){if(!ro.test(r))return"* "+r;var e=_h(r);return e==="bullet"&&Su.test(r)?r=r.replace(Bie,"$1$2 "):e==="ordered"&&(r=r.replace(Hh,"$1* ")),r}function Hie(r,e){if(!ro.test(r))return e+". "+r;var t=_h(r);if(t==="bullet"||t==="ordered"&&Su.test(r))r=r.replace(Su,"$1"+e+". ");else if(t==="ordered"){var n=qi.exec(r)[3];Number(n)!==e&&(r=r.replace(Hh,"$1"+e+". "))}return r}function Zk(r,e,t,n){n===void 0&&(n=0);var i=Number.MAX_VALUE,a=0,o=e.map(function(s,l){var f=s.line;i=Math.min(f-1,i),a=Math.max(f-1,a);var p=Tn(r,f);return p=t==="bullet"?qie(p):Hie(p,l+1+n),{text:p,line:f}});return{changedResults:o,firstIndex:i,lastIndex:a}}function zm(r,e){var t=Fie(e);return Zk(e.doc,t,r)}var _ie={bullet:function(r){return zm("bullet",r)},ordered:function(r){return zm("ordered",r)},task:function(r){var e=r.mdNode,t=r.doc,n=r.line,i=Tn(t,n);return e.listData.task?i=i.replace(Pie,"$1$2"):Qa(e)&&(i=i.replace(ro,"$1$2[ ] ")),{changedResults:[{text:i,line:n}]}}},zie={bullet:function(r){var e=r.doc,t=r.line,n=Tn(e,t),i=[{text:"* "+n,line:t}];return{changedResults:i}},ordered:function(r){for(var e=r.toastMark,t=r.doc,n=r.line,i=r.startLine,a=Tn(t,n),o=1,s=i,l=0,f=i-1;f>0;f-=1){var p=e.findFirstNodeAtLine(f),b=Tn(t,f),T=b&&!!_o(p,function(ee){return Qa(ee)}),x=qi.exec(Tn(t,f));if(!x&&!T)break;if(!x&&T){l+=1;continue}var E=x,B=E[1],F=E[3];if(!B){o=Number(F),s=f;break}}var _=o+n-s-l,X=[{text:_+". "+a,line:n}];return{changedResults:X}},task:function(r){var e=r.doc,t=r.line,n=Tn(e,t),i=[{text:"* [ ] "+n,line:t}];return{changedResults:i}}},Vie={bullet:function(r){var e=r.line,t=r.doc,n=Tn(t,e),i=Iie.exec(n),a=i[1],o=i[2];return{listSyntax:""+a+o}},ordered:function(r){var e=r.toastMark,t=r.line,n=r.mdNode,i=r.doc,a=zh(n),o=Tn(i,t),s=qi.exec(o),l=s[1],f=s[3],p=s[4],b=Number(f)+1,T=""+l+b+p,x=Bd(e,t,a,!0),E=x.filter(function(B){var F=qi.exec(Tn(i,B.line));return F&&F[1].length===l.length&&!!_o(B.mdNode,function(_){return Ek(_)})});return Ce({listSyntax:T},Zk(i,E,"ordered",b))}};function Qk(r,e,t,n,i){for(var a=[],o=Tn(r,t),s=qi.exec(o);s;){var l=s[1],f=s[4],p=s[5],b=l.length;if(b===i)a.push(_r(e,""+l+n+f+p)),n+=1,t+=1;else if(b>i){var T=Qk(r,e,t,1,b);t=T.line,a=a.concat(T.nodes)}if(b<i||t>r.childCount)break;o=Tn(r,t),s=qi.exec(o)}return{nodes:a,line:t}}var Vm=/(^\s{1,4})(.*)/;function Um(r,e,t){return r<e||ro.test(t)||bs.test(t)}function $m(r,e,t){var n=t.$from;n.depth===0&&(n=r.resolve(n.pos-1));var i=n.node(1),a=n.start(1),o=i.content.size;return i.rangeHasMark(0,o,e.marks.table)&&n.pos-a!==o&&n.pos!==a}function Wm(r,e){var t=e.from,n=e.to;if(e.type==="indent"){var i=4;t+=i,n+=(e.lineLen+1)*i}else{var a=e.spaceLenList;t-=a[0];for(var o=0;o<a.length;o+=1)n-=a[o]}return er(r,t,n)}var Uie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"paragraph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"inline*",attrs:{className:{default:null},codeStart:{default:null},codeEnd:{default:null}},selectable:!1,group:"block",parseDOM:[{tag:"div"}],toDOM:function(t){var n=t.attrs;return n.className?["div",{class:Tr(n.className)},0]:["div",0]}}},enumerable:!1,configurable:!0}),e.prototype.reorderList=function(t,n){for(var i=this.context,a=i.view,o=i.toastMark,s=i.schema,l=a.state,f=l.tr,p=l.selection,b=l.doc,T=o.findFirstNodeAtLine(t),x=T;T&&!gne(T)&&T.parent.type!=="document";)if(T=T.parent,Ek(T)){x=T;break}x&&(t=x.sourcepos[0][0]);var E=qi.exec(Tn(b,t)),B=E[1],F=E[3],_=B.length,X=Qk(b,s,t,Number(F),_),ee=X.line,se=X.nodes;n=Math.max(n,ee-1);for(var de=Tu(b,t-1).startOffset,ae=t-1;ae<=n-1;ae+=1){var le=b.child(ae),Te=le.nodeSize,xe=le.content,Le=f.mapping.map(de),ut=Le+xe.size;f.replaceWith(Le,ut,se[ae-t+1]),de+=Te}var Je=er(f,p.from,p.to);a.dispatch(f.setSelection(Je))},e.prototype.indent=function(t){var n=this;return t===void 0&&(t=!1),function(){return function(i,a){var o=i.schema,s=i.selection,l=i.doc,f=Cr(s),p=f.from,b=f.to,T=f.startFromOffset,x=f.startIndex,E=f.endIndex;if(t&&$m(l,o,s))return!1;var B=da(l,x);if(t&&Um(p,b,B)||!t&&ro.test(B)){var F=Cu({state:i,from:T,startIndex:x,endIndex:E,createText:function(X){return" "+X}}),_={type:"indent",from:p,to:b,lineLen:E-x};a(F.setSelection(Wm(F,_))),qi.test(B)&&n.reorderList(x+1,E+1)}else t&&a(i.tr.insert(b,_r(o," ")));return!0}}},e.prototype.outdent=function(t){var n=this;return t===void 0&&(t=!1),function(){return function(i,a){var o=i.selection,s=i.doc,l=i.schema,f=Cr(o),p=f.from,b=f.to,T=f.startFromOffset,x=f.startIndex,E=f.endIndex;if(t&&$m(s,l,o))return!1;var B=da(s,x);if(t&&Um(p,b,B)||!t&&ro.test(B)){var F=[],_=Cu({state:i,from:T,startIndex:x,endIndex:E,createText:function(ae){var le=Vm.exec(ae);return F.push(le?le[1].length:0),ae.replace(Vm,"$2")}}),X={type:"outdent",from:p,to:b,spaceLenList:F};a(_.setSelection(Wm(_,X))),qi.test(B)&&n.reorderList(x+1,E+1)}else if(t){var ee=B.slice(0,b-T),se=ee.replace(/\s{1,4}$/,""),de=b-(ee.length-se.length);a(i.tr.delete(de,b))}return!0}}},e.prototype.deleteLines=function(){var t=this;return function(n,i){var a=t.context.view,o=Cr(n.selection),s=o.startFromOffset,l=o.endToOffset,f=function(){return i(n.tr.deleteRange(s,l)),!0};return zu(f,hk)(n,i,a)}},e.prototype.moveDown=function(){return function(t,n){var i=t.doc,a=t.tr,o=t.selection,s=t.schema,l=Cr(o),f=l.startFromOffset,p=l.endToOffset,b=l.endIndex;if(b<i.content.childCount-1){var T=i.child(b+1),x=T.nodeSize,E=T.textContent;return a.delete(p,p+x).split(f).insert(a.mapping.map(f)-2,_r(s,E)),n(a),!0}return!1}},e.prototype.moveUp=function(){return function(t,n){var i=t.tr,a=t.doc,o=t.selection,s=t.schema,l=Cr(o),f=l.startFromOffset,p=l.endToOffset,b=l.startIndex;if(b>0){var T=a.child(b-1),x=T.nodeSize,E=T.textContent;return i.delete(f-x,f).split(i.mapping.map(p)).insert(i.mapping.map(p),_r(s,E)),n(i),!0}return!1}},e.prototype.commands=function(){return{indent:this.indent(),outdent:this.outdent()}},e.prototype.keymaps=function(){return{Tab:this.indent(!0)(),"Shift-Tab":this.outdent(!0)(),"Mod-d":this.deleteLines(),"Mod-D":this.deleteLines(),"Alt-ArrowUp":this.moveUp(),"Alt-ArrowDown":this.moveDown()}},e})(Jt),$ie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),e})(Jt),Wie=/^#{1,6}\s/,jie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{level:{default:1},seText:{default:!1}},toDOM:function(t){var n=t.attrs,i=n.level,a=n.seText,o="heading|heading"+i;return a&&(o+="|delimiter|setext"),["span",{class:Tr.apply(void 0,o.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.createHeadingText=function(t,n,i){for(var a=n.replace(i,"").trim(),o="";t>0;)o+="#",t-=1;return o+" "+a},e.prototype.commands=function(){var t=this;return function(n){return function(i,a){var o=n.level,s=Cr(i.selection),l=s.startFromOffset,f=s.endToOffset,p=s.startIndex,b=s.endIndex,T=Cu({state:i,from:l,startIndex:p,endIndex:b,createText:function(x){var E=x.match(Wie),B=E?E[0]:"";return t.createHeadingText(o,x,B)}});return a(T.setSelection(er(T,T.mapping.map(f)))),!0}}},e})(tr),Gf="```",Gie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("code-block")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){var i=t.selection,a=t.schema,o=t.tr,s=Cr(i),l=s.startFromOffset,f=s.endToOffset,p=_r(a,Gf);return o.insert(l,p).split(l+Gf.length),o.split(o.mapping.map(f)).insert(o.mapping.map(f),p),n(o.setSelection(er(o,o.mapping.map(f)-(Gf.length+2)))),!0}}},e.prototype.keepIndentation=function(){var t=this;return function(n,i){var a=n.selection,o=n.tr,s=n.doc,l=n.schema,f=t.context.toastMark,p=Cr(a),b=p.startFromOffset,T=p.endToOffset,x=p.endIndex,E=p.from,B=p.to,F=da(s,x);if(E===B&&F.trim()){var _=F.match(/^\s+/),X=f.findFirstNodeAtLine(x+1);if(mne(X)&&_){var ee=_[0],se=F.slice(B-b),de=_r(l,ee+se);return Dh(o,T,se,de),i(o),!0}}return!1}},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-p":t,"Shift-Mod-P":t,Enter:this.keepIndentation()}},e})(tr),Kie=/\||\s/g;function Jie(r){return[xu(r),xu(r,!0)]}function Yie(r,e){for(var t=[],n=0;n<e;n+=1)t.push(xu(r));return t}function xu(r,e){for(var t="|",n=0;n<r;n+=1)t+=e?" --- |":" |";return t}function Xie(r){return r?{type:"next",parentType:"tableHead",childType:"firstChild"}:{type:"prev",parentType:"tableBody",childType:"lastChild"}}var Zie=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("table")},0]}}},enumerable:!1,configurable:!0}),e.prototype.extendTable=function(){var t=this;return function(n,i){var a=n.selection,o=n.doc,s=n.tr,l=n.schema;if(!a.empty)return!1;var f=Cr(a),p=f.endFromOffset,b=f.endToOffset,T=f.endIndex,x=f.to,E=da(o,T),B=[T+1,x-p+1],F=t.context.toastMark.findNodeAtPosition(B),_=_o(F,function(ae){return Rm(ae)&&(ae.parent.type==="tableDelimRow"||ae.parent.parent.type==="tableBody")});if(_){var X=!E.replace(Kie,"").trim(),ee=_.parent,se=ee.parent.parent.columns.length,de=xu(se);return X?s.deleteRange(p,b).split(s.mapping.map(b)):s.split(b).insert(s.mapping.map(b),_r(l,de)).setSelection(er(s,s.mapping.map(b)-2)),i(s),!0}return!1}},e.prototype.moveTableCell=function(t){var n=this;return function(i,a){var o=i.selection,s=i.tr,l=Cr(o),f=l.endFromOffset,p=l.endIndex,b=l.to,T=[p+1,b-f],x=n.context.toastMark.findNodeAtPosition(T),E=_o(x,function(le){return Rm(le)});if(E){var B=E.parent,F=Xie(t),_=F.type,X=F.parentType,ee=F.childType,se=ca(E);if(E[_])se=ca(E[_])-1;else{var de=!B[_]&&B.parent.type===X?B.parent[_][ee]:B[_];if(_==="next"){var ae=de?ca(de[ee]):0;se+=ae+2}else _==="prev"&&(se=de?-4:0)}return a(s.setSelection(er(s,f+se))),!0}return!1}},e.prototype.addTable=function(){return function(t){return function(n,i){var a=n.selection,o=n.tr,s=n.schema,l=t,f=l.columnCount,p=l.rowCount,b=Cr(a).endToOffset,T=Jie(f),x=Yie(f,p-1),E=vn(vn([],T),x);return E.forEach(function(B){o.split(o.mapping.map(b)).insert(o.mapping.map(b),_r(s,B))}),i(o.setSelection(er(o,b+4))),!0}}},e.prototype.commands=function(){return{addTable:this.addTable()}},e.prototype.keymaps=function(){return{Enter:this.extendTable(),Tab:this.moveTableCell(!0),"Shift-Tab":this.moveTableCell(!1)}},e})(tr),Qie="***",eae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("thematic-break")},0]}}},enumerable:!1,configurable:!0}),e.prototype.hr=function(){return function(){return function(t,n){var i=t.selection,a=t.schema,o=t.tr,s=Cr(i),l=s.from,f=s.to,p=s.endToOffset,b=_r(a,Qie);return o.split(l).replaceWith(o.mapping.map(l),o.mapping.map(f),b).split(o.mapping.map(f)).setSelection(er(o,o.mapping.map(p))),n(o),!0}}},e.prototype.commands=function(){return{hr:this.hr()}},e.prototype.keymaps=function(){var t=this.hr()();return{"Mod-l":t,"Mod-L":t}},e})(tr);function tae(r,e){var t=r.type,n=r.sourcepos,i=n[0][0];return e<=i&&(t==="codeBlock"||t==="heading"||t.match("table"))}var rae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"listItem"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{odd:{default:!1},even:{default:!1},listStyle:{default:!1}},toDOM:function(t){var n=t.attrs,i=n.odd,a=n.even,o=n.listStyle,s="list-item";return o&&(s+="|list-item-style"),i&&(s+="|list-item-odd"),a&&(s+="|list-item-even"),["span",{class:Tr.apply(void 0,s.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.extendList=function(){var t=this;return function(n,i){var a=n.selection,o=n.doc,s=n.schema,l=n.tr,f=t.context.toastMark,p=Cr(a),b=p.to,T=p.startFromOffset,x=p.endFromOffset,E=p.endIndex,B=p.endToOffset,F=da(o,E),_=ro.test(F);if(!_||a.from===T||!a.empty)return!1;var X=!F.replace(Su,"").trim();if(X)l.deleteRange(x,B).split(l.mapping.map(B));else{var ee=_h(F),se=f.findFirstNodeAtLine(E+1),de=F.slice(b-x),ae={toastMark:f,mdNode:se,doc:o,line:E+1},le=Vie[ee](ae),Te=le.listSyntax,xe=le.changedResults;if(xe?.length){l.split(b),xe.unshift({text:Te+de,line:E+1}),t.changeToListPerLine(l,xe,{from:b,startLine:xe[0].line,endLine:$r(xe).line});var Le=l.mapping.map(B)-de.length;l.setSelection(er(l,Le))}else{var ut=_r(s,Te+de);Dh(l,B,de,ut)}}return i(l),!0}},e.prototype.toList=function(t){var n=this;return function(){return function(i,a){for(var o=i.doc,s=i.tr,l=i.selection,f=n.context.toastMark,p=Cr(l),b=p.startIndex+1,T=p.endIndex+1,x=p.endToOffset,E=[],B=b;B<=T;B+=1){var F=f.findFirstNodeAtLine(B);if(F&&tae(F,B))break;if(E.indexOf(B)===-1){var _={toastMark:f,mdNode:F,doc:o,line:B,startLine:b},X=(Qa(F)?_ie[t](_):zie[t](_)).changedResults,ee=n.changeToListPerLine(s,X,{from:Tu(o,X[0].line-1).startOffset,startLine:X[0].line,endLine:$r(X).line,indexDiff:1});x=Math.max(ee,x),X&&(E=E.concat(X.map(function(se){return se.line})))}}return a(s.setSelection(er(s,s.mapping.map(x)))),!0}}},e.prototype.changeToListPerLine=function(t,n,i){for(var a=i.from,o=i.startLine,s=i.endLine,l=i.indexDiff,f=l===void 0?0:l,p=0,b=function(E){var B=t.doc.child(E),F=B.nodeSize,_=B.content,X=t.mapping.map(a),ee=X+_.size,se=n.filter(function(de){return de.line-f===E})[0];se&&(t.replaceWith(X,ee,_r(T.context.schema,se.text)),p=Math.max(p,a+_.size)),a+=F},T=this,x=o-f;x<=s-f;x+=1)b(x);return p},e.prototype.toggleTask=function(){var t=this;return function(n,i){for(var a=n.selection,o=n.tr,s=n.doc,l=n.schema,f=t.context.toastMark,p=Cr(a),b=p.startIndex,T=p.endIndex,x=null,E=b;E<=T;E+=1){var B=f.findFirstNodeAtLine(E+1);if(Qa(B)&&B.listData.task){var F=B.listData,_=F.checked,X=F.padding,ee=_?" ":"x",se=B.sourcepos[0],de=Tu(s,se[0]-1).startOffset;de+=se[1]+X,x=o.replaceWith(de,de+1,l.text(ee))}}return x?(i(x),!0):!1}},e.prototype.commands=function(){return{bulletList:this.toList("bullet"),orderedList:this.toList("ordered"),taskList:this.toList("task")}},e.prototype.keymaps=function(){var t=this.toList("bullet")(),n=this.toList("ordered")(),i=this.toList("task")(),a=this.toggleTask();return{"Mod-u":t,"Mod-U":t,"Mod-o":n,"Mod-O":n,"alt-t":i,"alt-T":i,"Shift-Ctrl-x":a,"Shift-Ctrl-X":a,Enter:this.extendList()}},e})(tr);function Ku(r,e){return function(){return function(t,n){var i=t.tr,a=t.selection,o=zn(r)?r:function(ee){return r.test(ee)},s=e.length,l=i.doc,f=Gk(a),p=f[0],b=f[1],T=Math.max(p-s,1),x=Math.min(b+s,l.content.size-1),E=a.content(),B=E.content.textBetween(0,E.content.size,`
|
|
11
|
-
`),F=l.textBetween(T,p,`
|
|
12
|
-
`),_=l.textBetween(b,x,`
|
|
13
|
-
`);if(B=""+F+B+_,F&&_&&o(B))i.delete(x-s,x).delete(T,T+s);else{i.insertText(e,b).insertText(e,p);var X=a.empty?er(i,p+s):er(i,p+s,b+s);i.setSelection(X)}return n(i),!0}}}var nae=/^(\*{2}|_{2}).*([\s\S]*)\1$/m,iae="**",aae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("strong")},0]}}},enumerable:!1,configurable:!0}),e.prototype.bold=function(){return Ku(nae,iae)},e.prototype.commands=function(){return{bold:this.bold()}},e.prototype.keymaps=function(){var t=this.bold()();return{"Mod-b":t,"Mod-B":t}},e})(tr),oae=/^(~{2}).*([\s\S]*)\1$/m,sae="~~",lae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strike"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("strike")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return Ku(oae,sae)},e.prototype.keymaps=function(){var t=this.commands()();return{"Mod-s":t,"Mod-S":t}},e})(tr),uae=/^(\*|_).*([\s\S]*)\1$/m,cae="*",fae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"emph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("emph")},0]}}},enumerable:!1,configurable:!0}),e.prototype.italic=function(){return Ku(uae,cae)},e.prototype.commands=function(){return{italic:this.italic()}},e.prototype.keymaps=function(){var t=this.italic()();return{"Mod-i":t,"Mod-I":t}},e})(tr),dae=/^(`).*([\s\S]*)\1$/m,hae="`",pae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"code"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{start:{default:!1},end:{default:!1},marked:{default:!1}},toDOM:function(t){var n=t.attrs,i=n.start,a=n.end,o=n.marked,s="code";return i&&(s+="|delimiter|start"),a&&(s+="|delimiter|end"),o&&(s+="|marked-text"),["span",{class:Tr.apply(void 0,s.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return Ku(dae,hae)},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-c":t,"Shift-Mod-C":t}},e})(tr),vae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"link"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:{url:{default:!1},desc:{default:!1}},toDOM:function(t){var n=t.attrs,i=n.url,a=n.desc,o="link";return i&&(o+="|link-url|marked-text"),a&&(o+="|link-desc|marked-text"),["span",{class:Tr.apply(void 0,o.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.addLinkOrImage=function(t){return function(n){return function(i,a){var o=i.selection,s=i.tr,l=i.schema,f=Gk(o),p=f[0],b=f[1],T=n,x=T.linkText,E=T.altText,B=T.linkUrl,F=T.imageUrl,_=x,X=B,ee="";return t==="image"&&(_=E,X=F,ee="!"),_=bu(_),ee+="["+_+"]("+X+")",a(s.replaceWith(p,b,_r(l,ee))),!0}}},e.prototype.commands=function(){return{addImage:this.addLinkOrImage("image"),addLink:this.addLinkOrImage("link")}},e})(tr),mae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"taskDelimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("delimiter","list-item")},0]}}},enumerable:!1,configurable:!0}),e})(tr),gae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"delimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("delimiter")},0]}}},enumerable:!1,configurable:!0}),e})(tr),yae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"meta"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("meta")},0]}}},enumerable:!1,configurable:!0}),e})(tr),bae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"markedText"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("marked-text")},0]}}},enumerable:!1,configurable:!0}),e})(tr),kae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("table-cell")},0]}}},enumerable:!1,configurable:!0}),e})(tr),wae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"html"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("html")},0]}}},enumerable:!1,configurable:!0}),e})(tr),Kf="$$",Cae=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:Tr("custom-block")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(t){return function(n,i){var a=n.selection,o=n.schema,s=n.tr,l=Cr(a),f=l.startFromOffset,p=l.endToOffset;if(!t?.info)return!1;var b=""+Kf+t.info,T=_r(o,b),x=_r(o,Kf);return s.insert(f,T).split(f+b.length),s.split(s.mapping.map(p)).insert(s.mapping.map(p),x),i(s.setSelection(er(s,s.mapping.map(p)-(Kf.length+2)))),!0}}},e})(tr),Tae=/x|backspace/i,Sae=/^\[(\s*)(x?)(\s*)\](?:\s+)/i;function xae(r){var e=r.schema,t=r.toastMark;return new mn({props:{handleDOMEvents:{keyup:function(n,i){var a,o=n.state,s=o.doc,l=o.tr,f=o.selection;if(f.empty&&Tae.test(i.key)){var p=Cr(f),b=p.startIndex,T=p.startFromOffset,x=p.from,E=[b+1,x-T+1],B=t.findNodeAtPosition(E),F=_o(B,function(ut){var Je;return ut.type==="paragraph"&&((Je=ut.parent)===null||Je===void 0?void 0:Je.type)==="item"});if(!((a=F?.firstChild)===null||a===void 0)&&a.literal){var _=F.firstChild,X=_.literal.match(Sae);if(X){var ee=_.sourcepos[0],se=X[1],de=X[2],ae=X[3],le=se.length+ae.length,Te=Tu(s,ee[0]-1).startOffset,xe=ee[1]+Te;if(de){var Le=le?le+1:0;l.replaceWith(xe,Le+xe,e.text(de)),n.dispatch(l)}else le||(l.insertText(" ",xe),n.dispatch(l))}}}return!1}}}})}var Jf="cut",jm=/\r\n|\n|\r/,Eae=(function(r){Ge(e,r);function e(t,n){var i=r.call(this,t)||this,a=n.toastMark,o=n.useCommandShortcut,s=o===void 0?!0:o,l=n.mdPlugins,f=l===void 0?[]:l;return i.editorType="markdown",i.el.classList.add("md-mode"),i.toastMark=a,i.extraPlugins=f,i.specs=i.createSpecs(),i.schema=i.createSchema(),i.context=i.createContext(),i.keymaps=i.createKeymaps(s),i.view=i.createView(),i.commands=i.createCommands(),i.specs.setContext(Ce(Ce({},i.context),{view:i.view})),i.createClipboard(),i.eventEmitter.listen("changePreviewTabWrite",function(p){return i.toggleActive(!0,p)}),i.eventEmitter.listen("changePreviewTabPreview",function(){return i.toggleActive(!1)}),i.initEvent(),i}return e.prototype.toggleActive=function(t,n){Rh(this.el,"active",t),t?n||this.focus():this.blur()},e.prototype.createClipboard=function(){var t=this;this.clipboard=document.createElement("textarea"),this.clipboard.className=Ze("pseudo-clipboard"),this.clipboard.addEventListener("paste",function(n){var i=n.clipboardData||window.clipboardData,a=i&&i.items;if(a){var o=pi(a).some(function(l){return l.kind==="string"&&l.type==="text/rtf"});if(!o){var s=Vk(a);s&&(n.preventDefault(),Fh(t.eventEmitter,s,n.type))}}}),this.clipboard.addEventListener("input",function(n){var i=n.target.value;t.replaceSelection(i),n.preventDefault(),n.target.value=""}),this.el.insertBefore(this.clipboard,this.view.dom)},e.prototype.createContext=function(){return{toastMark:this.toastMark,schema:this.schema,eventEmitter:this.eventEmitter}},e.prototype.createSpecs=function(){return new jk([new Lie,new Uie,new $k,new $ie,new jie,new Rie,new Gie,new Cae,new Zie,new kae,new eae,new rae,new aae,new lae,new fae,new pae,new vae,new gae,new mae,new bae,new yae,new wae])},e.prototype.createPlugins=function(){return vn([kie(this.context),Die(this.context),xae(this.context)],this.createPluginProps()).concat(this.defaultPlugins)},e.prototype.createView=function(){var t=this;return new _u(this.el,{state:this.createState(),dispatchTransaction:function(n){t.updateMarkdown(n);var i=t.view.state.applyTransaction(n).state;t.view.updateState(i),t.emitChangeEvent(n)},handleKeyDown:function(n,i){return(i.metaKey||i.ctrlKey)&&i.key.toUpperCase()==="V"&&t.clipboard.focus(),t.eventEmitter.emit("keydown",t.editorType,i),!1},handleDOMEvents:{copy:function(n,i){return t.captureCopy(i)},cut:function(n,i){return t.captureCopy(i,Jf)},scroll:function(){return t.eventEmitter.emit("scroll","editor"),!0},keyup:function(n,i){return t.eventEmitter.emit("keyup",t.editorType,i),!1}},nodeViews:{widget:Uk}})},e.prototype.createCommands=function(){return this.specs.commands(this.view)},e.prototype.captureCopy=function(t,n){t.preventDefault();var i=this.view.state,a=i.selection,o=i.tr;if(a.empty)return!0;var s=this.getChanged(a.content());return t.clipboardData?t.clipboardData.setData("text/plain",s):window.clipboardData.setData("Text",s),n===Jf&&this.view.dispatch(o.deleteSelection().scrollIntoView().setMeta("uiEvent",Jf)),!0},e.prototype.updateMarkdown=function(t){var n=this;t.docChanged&&t.steps.forEach(function(i,a){if(i.slice&&!(i instanceof Or)){var o=t.docs[a],s=[i.from,i.to],l=s[0],f=s[1],p=eu(o,l,f),b=p[0],T=p[1],x=n.getChanged(i.slice);b[0]===T[0]&&b[1]===T[1]&&x===""&&(x=`
|
|
14
|
-
`);var E=n.toastMark.editMarkdown(b,T,x);n.eventEmitter.emit("updatePreview",E),t.setMeta("editResult",E).scrollIntoView()}})},e.prototype.getChanged=function(t){var n="",i=0,a=t.content.size;return t.content.nodesBetween(i,a,function(o,s){o.isText?n+=o.text.slice(Math.max(i,s)-s,a-s):o.isBlock&&s>0&&(n+=`
|
|
15
|
-
`)}),n},e.prototype.setSelection=function(t,n){n===void 0&&(n=t);var i=this.view.state.tr,a=qa(i.doc,t,n),o=a[0],s=a[1];this.view.dispatch(i.setSelection(er(i,o,s)).scrollIntoView())},e.prototype.replaceSelection=function(t,n,i){var a,o=this.view.state,s=o.tr,l=o.schema,f=o.doc,p=t.split(jm),b=p.map(function(F){return wu(l,Ga(F,l))}),T=new $e(De.from(b),1,1);if(this.focus(),n&&i){var x=qa(f,n,i),E=x[0],B=x[1];a=s.replaceRange(E,B,T)}else a=s.replaceSelection(T);this.view.dispatch(a.scrollIntoView())},e.prototype.deleteSelection=function(t,n){var i,a=this.view.state,o=a.tr,s=a.doc;if(t&&n){var l=qa(s,t,n),f=l[0],p=l[1];i=o.deleteRange(f,p)}else i=o.deleteSelection();this.view.dispatch(i.scrollIntoView())},e.prototype.getSelectedText=function(t,n){var i=this.view.state,a=i.doc,o=i.selection,s=o.from,l=o.to;if(t&&n){var f=qa(a,t,n);s=f[0],l=f[1]}return a.textBetween(s,l,`
|
|
16
|
-
`)},e.prototype.getSelection=function(){var t=this.view.state.selection,n=t.from,i=t.to;return eu(this.view.state.tr.doc,n,i)},e.prototype.setMarkdown=function(t,n){n===void 0&&(n=!0);var i=t.split(jm),a=this.view.state,o=a.tr,s=a.doc,l=a.schema,f=i.map(function(p){return wu(l,Ga(p,l))});this.view.dispatch(o.replaceWith(0,s.content.size,f)),n&&this.moveCursorToEnd(!0)},e.prototype.addWidget=function(t,n,i){var a=this.view.state,o=a.tr,s=a.doc,l=a.selection,f=i?qa(s,i,i)[0]:l.to;this.view.dispatch(o.setMeta("widget",{pos:f,node:t,style:n}))},e.prototype.replaceWithWidget=function(t,n,i){var a=this.view.state,o=a.tr,s=a.schema,l=a.doc,f=qa(l,t,n),p=Ga(i,s);this.view.dispatch(o.replaceWith(f[0],f[1],p))},e.prototype.getRangeInfoOfNode=function(t){var n=this.view.state,i=n.doc,a=n.selection,o=t||eu(i,a.from)[0],s=this.toastMark.findNodeAtPosition(o);return s.type==="text"&&s.parent.type!=="paragraph"&&(s=s.parent),s.sourcepos[1][1]+=1,{range:s.sourcepos,type:s.type}},e.prototype.getMarkdown=function(){return this.toastMark.getLineTexts().map(function(t){return Wu(t)}).join(`
|
|
17
|
-
`)},e.prototype.getToastMark=function(){return this.toastMark},e})(Wk),Gm="_feEventKey";function Mae(r,e){var t=r[Gm],n;return t||(t=r[Gm]={}),n=t[e],n||(n=t[e]=[]),n}var ew=Mae,Aae=zi,Eu=Vu,Oae=ew;function Nae(r,e,t){if(Aae(e)){Eu(e.split(/\s+/g),function(n){Km(r,n,t)});return}Eu(e,function(n,i){Km(r,i,n)})}function Km(r,e,t){var n=Oae(r,e),i;t?(Eu(n,function(a,o){return t===a.handler?(Jm(r,e,a.wrappedHandler),i=o,!1):!0}),n.splice(i,1)):(Eu(n,function(a){Jm(r,e,a.wrappedHandler)}),n.splice(0,n.length))}function Jm(r,e,t){"removeEventListener"in r?r.removeEventListener(e,t):"detachEvent"in r&&r.detachEvent("on"+e,t)}var tw=Nae,Dae=zi,Fd=Vu,Lae=ew;function Rae(r,e,t,n){if(Dae(e)){Fd(e.split(/\s+/g),function(i){Ym(r,i,t,n)});return}Fd(e,function(i,a){Ym(r,a,i,t)})}function Ym(r,e,t,n){function i(a){t.call(n||r,a||window.event)}"addEventListener"in r?r.addEventListener(e,i):"attachEvent"in r&&r.attachEvent("on"+e,i),Iae(r,e,t,i)}function Iae(r,e,t,n){var i=Lae(r,e),a=!1;Fd(i,function(o){return o.handler===t?(a=!0,!1):!0}),a||i.push({handler:t,wrappedHandler:n})}var rw=Rae;var qd=function(r,e){return qd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},qd(r,e)};function Vn(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");qd(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var qr=function(){return qr=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},qr.apply(this,arguments)};function Hd(r,e,t){if(arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}var Uo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Xm={};function Pae(r){var e,t,n=Xm[r];if(n)return n;for(n=Xm[r]=[],e=0;e<128;e++)t=String.fromCharCode(e),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e<r.length;e++)n[r.charCodeAt(e)]=r[e];return n}function Ju(r,e,t){var n,i,a,o,s,l="";for(typeof e!="string"&&(t=e,e=Ju.defaultChars),typeof t>"u"&&(t=!0),s=Pae(e),n=0,i=r.length;n<i;n++){if(a=r.charCodeAt(n),t&&a===37&&n+2<i&&/^[0-9a-f]{2}$/i.test(r.slice(n+1,n+3))){l+=r.slice(n,n+3),n+=2;continue}if(a<128){l+=s[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&n+1<i&&(o=r.charCodeAt(n+1),o>=56320&&o<=57343)){l+=encodeURIComponent(r[n]+r[n+1]),n++;continue}l+="%EF%BF%BD";continue}l+=encodeURIComponent(r[n])}return l}Ju.defaultChars=";/?:@&=+$,-_.!~*'()#";Ju.componentChars="-_.!~*'()";var Bae=Ju,Vh={},Hi={},Fae="Á",qae="á",Hae="Ă",_ae="ă",zae="∾",Vae="∿",Uae="∾̳",$ae="Â",Wae="â",jae="´",Gae="А",Kae="а",Jae="Æ",Yae="æ",Xae="",Zae="𝔄",Qae="𝔞",eoe="À",toe="à",roe="ℵ",noe="ℵ",ioe="Α",aoe="α",ooe="Ā",soe="ā",loe="⨿",uoe="&",coe="&",foe="⩕",doe="⩓",hoe="∧",poe="⩜",voe="⩘",moe="⩚",goe="∠",yoe="⦤",boe="∠",koe="⦨",woe="⦩",Coe="⦪",Toe="⦫",Soe="⦬",xoe="⦭",Eoe="⦮",Moe="⦯",Aoe="∡",Ooe="∟",Noe="⊾",Doe="⦝",Loe="∢",Roe="Å",Ioe="⍼",Poe="Ą",Boe="ą",Foe="𝔸",qoe="𝕒",Hoe="⩯",_oe="≈",zoe="⩰",Voe="≊",Uoe="≋",$oe="'",Woe="",joe="≈",Goe="≊",Koe="Å",Joe="å",Yoe="𝒜",Xoe="𝒶",Zoe="≔",Qoe="*",ese="≈",tse="≍",rse="Ã",nse="ã",ise="Ä",ase="ä",ose="∳",sse="⨑",lse="≌",use="϶",cse="‵",fse="∽",dse="⋍",hse="∖",pse="⫧",vse="⊽",mse="⌅",gse="⌆",yse="⌅",bse="⎵",kse="⎶",wse="≌",Cse="Б",Tse="б",Sse="„",xse="∵",Ese="∵",Mse="∵",Ase="⦰",Ose="϶",Nse="ℬ",Dse="ℬ",Lse="Β",Rse="β",Ise="ℶ",Pse="≬",Bse="𝔅",Fse="𝔟",qse="⋂",Hse="◯",_se="⋃",zse="⨀",Vse="⨁",Use="⨂",$se="⨆",Wse="★",jse="▽",Gse="△",Kse="⨄",Jse="⋁",Yse="⋀",Xse="⤍",Zse="⧫",Qse="▪",ele="▴",tle="▾",rle="◂",nle="▸",ile="␣",ale="▒",ole="░",sle="▓",lle="█",ule="=⃥",cle="≡⃥",fle="⫭",dle="⌐",hle="𝔹",ple="𝕓",vle="⊥",mle="⊥",gle="⋈",yle="⧉",ble="┐",kle="╕",wle="╖",Cle="╗",Tle="┌",Sle="╒",xle="╓",Ele="╔",Mle="─",Ale="═",Ole="┬",Nle="╤",Dle="╥",Lle="╦",Rle="┴",Ile="╧",Ple="╨",Ble="╩",Fle="⊟",qle="⊞",Hle="⊠",_le="┘",zle="╛",Vle="╜",Ule="╝",$le="└",Wle="╘",jle="╙",Gle="╚",Kle="│",Jle="║",Yle="┼",Xle="╪",Zle="╫",Qle="╬",eue="┤",tue="╡",rue="╢",nue="╣",iue="├",aue="╞",oue="╟",sue="╠",lue="‵",uue="˘",cue="˘",fue="¦",due="𝒷",hue="ℬ",pue="⁏",vue="∽",mue="⋍",gue="⧅",yue="\\",bue="⟈",kue="•",wue="•",Cue="≎",Tue="⪮",Sue="≏",xue="≎",Eue="≏",Mue="Ć",Aue="ć",Oue="⩄",Nue="⩉",Due="⩋",Lue="∩",Rue="⋒",Iue="⩇",Pue="⩀",Bue="ⅅ",Fue="∩︀",que="⁁",Hue="ˇ",_ue="ℭ",zue="⩍",Vue="Č",Uue="č",$ue="Ç",Wue="ç",jue="Ĉ",Gue="ĉ",Kue="∰",Jue="⩌",Yue="⩐",Xue="Ċ",Zue="ċ",Que="¸",ece="¸",tce="⦲",rce="¢",nce="·",ice="·",ace="𝔠",oce="ℭ",sce="Ч",lce="ч",uce="✓",cce="✓",fce="Χ",dce="χ",hce="ˆ",pce="≗",vce="↺",mce="↻",gce="⊛",yce="⊚",bce="⊝",kce="⊙",wce="®",Cce="Ⓢ",Tce="⊖",Sce="⊕",xce="⊗",Ece="○",Mce="⧃",Ace="≗",Oce="⨐",Nce="⫯",Dce="⧂",Lce="∲",Rce="”",Ice="’",Pce="♣",Bce="♣",Fce=":",qce="∷",Hce="⩴",_ce="≔",zce="≔",Vce=",",Uce="@",$ce="∁",Wce="∘",jce="∁",Gce="ℂ",Kce="≅",Jce="⩭",Yce="≡",Xce="∮",Zce="∯",Qce="∮",efe="𝕔",tfe="ℂ",rfe="∐",nfe="∐",ife="©",afe="©",ofe="℗",sfe="∳",lfe="↵",ufe="✗",cfe="⨯",ffe="𝒞",dfe="𝒸",hfe="⫏",pfe="⫑",vfe="⫐",mfe="⫒",gfe="⋯",yfe="⤸",bfe="⤵",kfe="⋞",wfe="⋟",Cfe="↶",Tfe="⤽",Sfe="⩈",xfe="⩆",Efe="≍",Mfe="∪",Afe="⋓",Ofe="⩊",Nfe="⊍",Dfe="⩅",Lfe="∪︀",Rfe="↷",Ife="⤼",Pfe="⋞",Bfe="⋟",Ffe="⋎",qfe="⋏",Hfe="¤",_fe="↶",zfe="↷",Vfe="⋎",Ufe="⋏",$fe="∲",Wfe="∱",jfe="⌭",Gfe="†",Kfe="‡",Jfe="ℸ",Yfe="↓",Xfe="↡",Zfe="⇓",Qfe="‐",ede="⫤",tde="⊣",rde="⤏",nde="˝",ide="Ď",ade="ď",ode="Д",sde="д",lde="‡",ude="⇊",cde="ⅅ",fde="ⅆ",dde="⤑",hde="⩷",pde="°",vde="∇",mde="Δ",gde="δ",yde="⦱",bde="⥿",kde="𝔇",wde="𝔡",Cde="⥥",Tde="⇃",Sde="⇂",xde="´",Ede="˙",Mde="˝",Ade="`",Ode="˜",Nde="⋄",Dde="⋄",Lde="⋄",Rde="♦",Ide="♦",Pde="¨",Bde="ⅆ",Fde="ϝ",qde="⋲",Hde="÷",_de="÷",zde="⋇",Vde="⋇",Ude="Ђ",$de="ђ",Wde="⌞",jde="⌍",Gde="$",Kde="𝔻",Jde="𝕕",Yde="¨",Xde="˙",Zde="⃜",Qde="≐",ehe="≑",the="≐",rhe="∸",nhe="∔",ihe="⊡",ahe="⌆",ohe="∯",she="¨",lhe="⇓",uhe="⇐",che="⇔",fhe="⫤",dhe="⟸",hhe="⟺",phe="⟹",vhe="⇒",mhe="⊨",ghe="⇑",yhe="⇕",bhe="∥",khe="⤓",whe="↓",Che="↓",The="⇓",She="⇵",xhe="̑",Ehe="⇊",Mhe="⇃",Ahe="⇂",Ohe="⥐",Nhe="⥞",Dhe="⥖",Lhe="↽",Rhe="⥟",Ihe="⥗",Phe="⇁",Bhe="↧",Fhe="⊤",qhe="⤐",Hhe="⌟",_he="⌌",zhe="𝒟",Vhe="𝒹",Uhe="Ѕ",$he="ѕ",Whe="⧶",jhe="Đ",Ghe="đ",Khe="⋱",Jhe="▿",Yhe="▾",Xhe="⇵",Zhe="⥯",Qhe="⦦",epe="Џ",tpe="џ",rpe="⟿",npe="É",ipe="é",ape="⩮",ope="Ě",spe="ě",lpe="Ê",upe="ê",cpe="≖",fpe="≕",dpe="Э",hpe="э",ppe="⩷",vpe="Ė",mpe="ė",gpe="≑",ype="ⅇ",bpe="≒",kpe="𝔈",wpe="𝔢",Cpe="⪚",Tpe="È",Spe="è",xpe="⪖",Epe="⪘",Mpe="⪙",Ape="∈",Ope="⏧",Npe="ℓ",Dpe="⪕",Lpe="⪗",Rpe="Ē",Ipe="ē",Ppe="∅",Bpe="∅",Fpe="◻",qpe="∅",Hpe="▫",_pe=" ",zpe=" ",Vpe=" ",Upe="Ŋ",$pe="ŋ",Wpe=" ",jpe="Ę",Gpe="ę",Kpe="𝔼",Jpe="𝕖",Ype="⋕",Xpe="⧣",Zpe="⩱",Qpe="ε",eve="Ε",tve="ε",rve="ϵ",nve="≖",ive="≕",ave="≂",ove="⪖",sve="⪕",lve="⩵",uve="=",cve="≂",fve="≟",dve="⇌",hve="≡",pve="⩸",vve="⧥",mve="⥱",gve="≓",yve="ℯ",bve="ℰ",kve="≐",wve="⩳",Cve="≂",Tve="Η",Sve="η",xve="Ð",Eve="ð",Mve="Ë",Ave="ë",Ove="€",Nve="!",Dve="∃",Lve="∃",Rve="ℰ",Ive="ⅇ",Pve="ⅇ",Bve="≒",Fve="Ф",qve="ф",Hve="♀",_ve="ffi",zve="ff",Vve="ffl",Uve="𝔉",$ve="𝔣",Wve="fi",jve="◼",Gve="▪",Kve="fj",Jve="♭",Yve="fl",Xve="▱",Zve="ƒ",Qve="𝔽",eme="𝕗",tme="∀",rme="∀",nme="⋔",ime="⫙",ame="ℱ",ome="⨍",sme="½",lme="⅓",ume="¼",cme="⅕",fme="⅙",dme="⅛",hme="⅔",pme="⅖",vme="¾",mme="⅗",gme="⅜",yme="⅘",bme="⅚",kme="⅝",wme="⅞",Cme="⁄",Tme="⌢",Sme="𝒻",xme="ℱ",Eme="ǵ",Mme="Γ",Ame="γ",Ome="Ϝ",Nme="ϝ",Dme="⪆",Lme="Ğ",Rme="ğ",Ime="Ģ",Pme="Ĝ",Bme="ĝ",Fme="Г",qme="г",Hme="Ġ",_me="ġ",zme="≥",Vme="≧",Ume="⪌",$me="⋛",Wme="≥",jme="≧",Gme="⩾",Kme="⪩",Jme="⩾",Yme="⪀",Xme="⪂",Zme="⪄",Qme="⋛︀",ege="⪔",tge="𝔊",rge="𝔤",nge="≫",ige="⋙",age="⋙",oge="ℷ",sge="Ѓ",lge="ѓ",uge="⪥",cge="≷",fge="⪒",dge="⪤",hge="⪊",pge="⪊",vge="⪈",mge="≩",gge="⪈",yge="≩",bge="⋧",kge="𝔾",wge="𝕘",Cge="`",Tge="≥",Sge="⋛",xge="≧",Ege="⪢",Mge="≷",Age="⩾",Oge="≳",Nge="𝒢",Dge="ℊ",Lge="≳",Rge="⪎",Ige="⪐",Pge="⪧",Bge="⩺",Fge=">",qge=">",Hge="≫",_ge="⋗",zge="⦕",Vge="⩼",Uge="⪆",$ge="⥸",Wge="⋗",jge="⋛",Gge="⪌",Kge="≷",Jge="≳",Yge="≩︀",Xge="≩︀",Zge="ˇ",Qge=" ",eye="½",tye="ℋ",rye="Ъ",nye="ъ",iye="⥈",aye="↔",oye="⇔",sye="↭",lye="^",uye="ℏ",cye="Ĥ",fye="ĥ",dye="♥",hye="♥",pye="…",vye="⊹",mye="𝔥",gye="ℌ",yye="ℋ",bye="⤥",kye="⤦",wye="⇿",Cye="∻",Tye="↩",Sye="↪",xye="𝕙",Eye="ℍ",Mye="―",Aye="─",Oye="𝒽",Nye="ℋ",Dye="ℏ",Lye="Ħ",Rye="ħ",Iye="≎",Pye="≏",Bye="⁃",Fye="‐",qye="Í",Hye="í",_ye="",zye="Î",Vye="î",Uye="И",$ye="и",Wye="İ",jye="Е",Gye="е",Kye="¡",Jye="⇔",Yye="𝔦",Xye="ℑ",Zye="Ì",Qye="ì",ebe="ⅈ",tbe="⨌",rbe="∭",nbe="⧜",ibe="℩",abe="IJ",obe="ij",sbe="Ī",lbe="ī",ube="ℑ",cbe="ⅈ",fbe="ℐ",dbe="ℑ",hbe="ı",pbe="ℑ",vbe="⊷",mbe="Ƶ",gbe="⇒",ybe="℅",bbe="∞",kbe="⧝",wbe="ı",Cbe="⊺",Tbe="∫",Sbe="∬",xbe="ℤ",Ebe="∫",Mbe="⊺",Abe="⋂",Obe="⨗",Nbe="⨼",Dbe="",Lbe="",Rbe="Ё",Ibe="ё",Pbe="Į",Bbe="į",Fbe="𝕀",qbe="𝕚",Hbe="Ι",_be="ι",zbe="⨼",Vbe="¿",Ube="𝒾",$be="ℐ",Wbe="∈",jbe="⋵",Gbe="⋹",Kbe="⋴",Jbe="⋳",Ybe="∈",Xbe="",Zbe="Ĩ",Qbe="ĩ",eke="І",tke="і",rke="Ï",nke="ï",ike="Ĵ",ake="ĵ",oke="Й",ske="й",lke="𝔍",uke="𝔧",cke="ȷ",fke="𝕁",dke="𝕛",hke="𝒥",pke="𝒿",vke="Ј",mke="ј",gke="Є",yke="є",bke="Κ",kke="κ",wke="ϰ",Cke="Ķ",Tke="ķ",Ske="К",xke="к",Eke="𝔎",Mke="𝔨",Ake="ĸ",Oke="Х",Nke="х",Dke="Ќ",Lke="ќ",Rke="𝕂",Ike="𝕜",Pke="𝒦",Bke="𝓀",Fke="⇚",qke="Ĺ",Hke="ĺ",_ke="⦴",zke="ℒ",Vke="Λ",Uke="λ",$ke="⟨",Wke="⟪",jke="⦑",Gke="⟨",Kke="⪅",Jke="ℒ",Yke="«",Xke="⇤",Zke="⤟",Qke="←",ewe="↞",twe="⇐",rwe="⤝",nwe="↩",iwe="↫",awe="⤹",owe="⥳",swe="↢",lwe="⤙",uwe="⤛",cwe="⪫",fwe="⪭",dwe="⪭︀",hwe="⤌",pwe="⤎",vwe="❲",mwe="{",gwe="[",ywe="⦋",bwe="⦏",kwe="⦍",wwe="Ľ",Cwe="ľ",Twe="Ļ",Swe="ļ",xwe="⌈",Ewe="{",Mwe="Л",Awe="л",Owe="⤶",Nwe="“",Dwe="„",Lwe="⥧",Rwe="⥋",Iwe="↲",Pwe="≤",Bwe="≦",Fwe="⟨",qwe="⇤",Hwe="←",_we="←",zwe="⇐",Vwe="⇆",Uwe="↢",$we="⌈",Wwe="⟦",jwe="⥡",Gwe="⥙",Kwe="⇃",Jwe="⌊",Ywe="↽",Xwe="↼",Zwe="⇇",Qwe="↔",e0e="↔",t0e="⇔",r0e="⇆",n0e="⇋",i0e="↭",a0e="⥎",o0e="↤",s0e="⊣",l0e="⥚",u0e="⋋",c0e="⧏",f0e="⊲",d0e="⊴",h0e="⥑",p0e="⥠",v0e="⥘",m0e="↿",g0e="⥒",y0e="↼",b0e="⪋",k0e="⋚",w0e="≤",C0e="≦",T0e="⩽",S0e="⪨",x0e="⩽",E0e="⩿",M0e="⪁",A0e="⪃",O0e="⋚︀",N0e="⪓",D0e="⪅",L0e="⋖",R0e="⋚",I0e="⪋",P0e="⋚",B0e="≦",F0e="≶",q0e="≶",H0e="⪡",_0e="≲",z0e="⩽",V0e="≲",U0e="⥼",$0e="⌊",W0e="𝔏",j0e="𝔩",G0e="≶",K0e="⪑",J0e="⥢",Y0e="↽",X0e="↼",Z0e="⥪",Q0e="▄",eCe="Љ",tCe="љ",rCe="⇇",nCe="≪",iCe="⋘",aCe="⌞",oCe="⇚",sCe="⥫",lCe="◺",uCe="Ŀ",cCe="ŀ",fCe="⎰",dCe="⎰",hCe="⪉",pCe="⪉",vCe="⪇",mCe="≨",gCe="⪇",yCe="≨",bCe="⋦",kCe="⟬",wCe="⇽",CCe="⟦",TCe="⟵",SCe="⟵",xCe="⟸",ECe="⟷",MCe="⟷",ACe="⟺",OCe="⟼",NCe="⟶",DCe="⟶",LCe="⟹",RCe="↫",ICe="↬",PCe="⦅",BCe="𝕃",FCe="𝕝",qCe="⨭",HCe="⨴",_Ce="∗",zCe="_",VCe="↙",UCe="↘",$Ce="◊",WCe="◊",jCe="⧫",GCe="(",KCe="⦓",JCe="⇆",YCe="⌟",XCe="⇋",ZCe="⥭",QCe="",e1e="⊿",t1e="‹",r1e="𝓁",n1e="ℒ",i1e="↰",a1e="↰",o1e="≲",s1e="⪍",l1e="⪏",u1e="[",c1e="‘",f1e="‚",d1e="Ł",h1e="ł",p1e="⪦",v1e="⩹",m1e="<",g1e="<",y1e="≪",b1e="⋖",k1e="⋋",w1e="⋉",C1e="⥶",T1e="⩻",S1e="◃",x1e="⊴",E1e="◂",M1e="⦖",A1e="⥊",O1e="⥦",N1e="≨︀",D1e="≨︀",L1e="¯",R1e="♂",I1e="✠",P1e="✠",B1e="↦",F1e="↦",q1e="↧",H1e="↤",_1e="↥",z1e="▮",V1e="⨩",U1e="М",$1e="м",W1e="—",j1e="∺",G1e="∡",K1e=" ",J1e="ℳ",Y1e="𝔐",X1e="𝔪",Z1e="℧",Q1e="µ",eTe="*",tTe="⫰",rTe="∣",nTe="·",iTe="⊟",aTe="−",oTe="∸",sTe="⨪",lTe="∓",uTe="⫛",cTe="…",fTe="∓",dTe="⊧",hTe="𝕄",pTe="𝕞",vTe="∓",mTe="𝓂",gTe="ℳ",yTe="∾",bTe="Μ",kTe="μ",wTe="⊸",CTe="⊸",TTe="∇",STe="Ń",xTe="ń",ETe="∠⃒",MTe="≉",ATe="⩰̸",OTe="≋̸",NTe="ʼn",DTe="≉",LTe="♮",RTe="ℕ",ITe="♮",PTe=" ",BTe="≎̸",FTe="≏̸",qTe="⩃",HTe="Ň",_Te="ň",zTe="Ņ",VTe="ņ",UTe="≇",$Te="⩭̸",WTe="⩂",jTe="Н",GTe="н",KTe="–",JTe="⤤",YTe="↗",XTe="⇗",ZTe="↗",QTe="≠",eSe="≐̸",tSe="",rSe="",nSe="",iSe="",aSe="≢",oSe="⤨",sSe="≂̸",lSe="≫",uSe="≪",cSe=`
|
|
18
|
-
`,fSe="∄",dSe="∄",hSe="𝔑",pSe="𝔫",vSe="≧̸",mSe="≱",gSe="≱",ySe="≧̸",bSe="⩾̸",kSe="⩾̸",wSe="⋙̸",CSe="≵",TSe="≫⃒",SSe="≯",xSe="≯",ESe="≫̸",MSe="↮",ASe="⇎",OSe="⫲",NSe="∋",DSe="⋼",LSe="⋺",RSe="∋",ISe="Њ",PSe="њ",BSe="↚",FSe="⇍",qSe="‥",HSe="≦̸",_Se="≰",zSe="↚",VSe="⇍",USe="↮",$Se="⇎",WSe="≰",jSe="≦̸",GSe="⩽̸",KSe="⩽̸",JSe="≮",YSe="⋘̸",XSe="≴",ZSe="≪⃒",QSe="≮",exe="⋪",txe="⋬",rxe="≪̸",nxe="∤",ixe="",axe=" ",oxe="𝕟",sxe="ℕ",lxe="⫬",uxe="¬",cxe="≢",fxe="≭",dxe="∦",hxe="∉",pxe="≠",vxe="≂̸",mxe="∄",gxe="≯",yxe="≱",bxe="≧̸",kxe="≫̸",wxe="≹",Cxe="⩾̸",Txe="≵",Sxe="≎̸",xxe="≏̸",Exe="∉",Mxe="⋵̸",Axe="⋹̸",Oxe="∉",Nxe="⋷",Dxe="⋶",Lxe="⧏̸",Rxe="⋪",Ixe="⋬",Pxe="≮",Bxe="≰",Fxe="≸",qxe="≪̸",Hxe="⩽̸",_xe="≴",zxe="⪢̸",Vxe="⪡̸",Uxe="∌",$xe="∌",Wxe="⋾",jxe="⋽",Gxe="⊀",Kxe="⪯̸",Jxe="⋠",Yxe="∌",Xxe="⧐̸",Zxe="⋫",Qxe="⋭",eEe="⊏̸",tEe="⋢",rEe="⊐̸",nEe="⋣",iEe="⊂⃒",aEe="⊈",oEe="⊁",sEe="⪰̸",lEe="⋡",uEe="≿̸",cEe="⊃⃒",fEe="⊉",dEe="≁",hEe="≄",pEe="≇",vEe="≉",mEe="∤",gEe="∦",yEe="∦",bEe="⫽⃥",kEe="∂̸",wEe="⨔",CEe="⊀",TEe="⋠",SEe="⊀",xEe="⪯̸",EEe="⪯̸",MEe="⤳̸",AEe="↛",OEe="⇏",NEe="↝̸",DEe="↛",LEe="⇏",REe="⋫",IEe="⋭",PEe="⊁",BEe="⋡",FEe="⪰̸",qEe="𝒩",HEe="𝓃",_Ee="∤",zEe="∦",VEe="≁",UEe="≄",$Ee="≄",WEe="∤",jEe="∦",GEe="⋢",KEe="⋣",JEe="⊄",YEe="⫅̸",XEe="⊈",ZEe="⊂⃒",QEe="⊈",eMe="⫅̸",tMe="⊁",rMe="⪰̸",nMe="⊅",iMe="⫆̸",aMe="⊉",oMe="⊃⃒",sMe="⊉",lMe="⫆̸",uMe="≹",cMe="Ñ",fMe="ñ",dMe="≸",hMe="⋪",pMe="⋬",vMe="⋫",mMe="⋭",gMe="Ν",yMe="ν",bMe="#",kMe="№",wMe=" ",CMe="≍⃒",TMe="⊬",SMe="⊭",xMe="⊮",EMe="⊯",MMe="≥⃒",AMe=">⃒",OMe="⤄",NMe="⧞",DMe="⤂",LMe="≤⃒",RMe="<⃒",IMe="⊴⃒",PMe="⤃",BMe="⊵⃒",FMe="∼⃒",qMe="⤣",HMe="↖",_Me="⇖",zMe="↖",VMe="⤧",UMe="Ó",$Me="ó",WMe="⊛",jMe="Ô",GMe="ô",KMe="⊚",JMe="О",YMe="о",XMe="⊝",ZMe="Ő",QMe="ő",eAe="⨸",tAe="⊙",rAe="⦼",nAe="Œ",iAe="œ",aAe="⦿",oAe="𝔒",sAe="𝔬",lAe="˛",uAe="Ò",cAe="ò",fAe="⧁",dAe="⦵",hAe="Ω",pAe="∮",vAe="↺",mAe="⦾",gAe="⦻",yAe="‾",bAe="⧀",kAe="Ō",wAe="ō",CAe="Ω",TAe="ω",SAe="Ο",xAe="ο",EAe="⦶",MAe="⊖",AAe="𝕆",OAe="𝕠",NAe="⦷",DAe="“",LAe="‘",RAe="⦹",IAe="⊕",PAe="↻",BAe="⩔",FAe="∨",qAe="⩝",HAe="ℴ",_Ae="ℴ",zAe="ª",VAe="º",UAe="⊶",$Ae="⩖",WAe="⩗",jAe="⩛",GAe="Ⓢ",KAe="𝒪",JAe="ℴ",YAe="Ø",XAe="ø",ZAe="⊘",QAe="Õ",eOe="õ",tOe="⨶",rOe="⨷",nOe="⊗",iOe="Ö",aOe="ö",oOe="⌽",sOe="‾",lOe="⏞",uOe="⎴",cOe="⏜",fOe="¶",dOe="∥",hOe="∥",pOe="⫳",vOe="⫽",mOe="∂",gOe="∂",yOe="П",bOe="п",kOe="%",wOe=".",COe="‰",TOe="⊥",SOe="‱",xOe="𝔓",EOe="𝔭",MOe="Φ",AOe="φ",OOe="ϕ",NOe="ℳ",DOe="☎",LOe="Π",ROe="π",IOe="⋔",POe="ϖ",BOe="ℏ",FOe="ℎ",qOe="ℏ",HOe="⨣",_Oe="⊞",zOe="⨢",VOe="+",UOe="∔",$Oe="⨥",WOe="⩲",jOe="±",GOe="±",KOe="⨦",JOe="⨧",YOe="±",XOe="ℌ",ZOe="⨕",QOe="𝕡",eNe="ℙ",tNe="£",rNe="⪷",nNe="⪻",iNe="≺",aNe="≼",oNe="⪷",sNe="≺",lNe="≼",uNe="≺",cNe="⪯",fNe="≼",dNe="≾",hNe="⪯",pNe="⪹",vNe="⪵",mNe="⋨",gNe="⪯",yNe="⪳",bNe="≾",kNe="′",wNe="″",CNe="ℙ",TNe="⪹",SNe="⪵",xNe="⋨",ENe="∏",MNe="∏",ANe="⌮",ONe="⌒",NNe="⌓",DNe="∝",LNe="∝",RNe="∷",INe="∝",PNe="≾",BNe="⊰",FNe="𝒫",qNe="𝓅",HNe="Ψ",_Ne="ψ",zNe=" ",VNe="𝔔",UNe="𝔮",$Ne="⨌",WNe="𝕢",jNe="ℚ",GNe="⁗",KNe="𝒬",JNe="𝓆",YNe="ℍ",XNe="⨖",ZNe="?",QNe="≟",eDe='"',tDe='"',rDe="⇛",nDe="∽̱",iDe="Ŕ",aDe="ŕ",oDe="√",sDe="⦳",lDe="⟩",uDe="⟫",cDe="⦒",fDe="⦥",dDe="⟩",hDe="»",pDe="⥵",vDe="⇥",mDe="⤠",gDe="⤳",yDe="→",bDe="↠",kDe="⇒",wDe="⤞",CDe="↪",TDe="↬",SDe="⥅",xDe="⥴",EDe="⤖",MDe="↣",ADe="↝",ODe="⤚",NDe="⤜",DDe="∶",LDe="ℚ",RDe="⤍",IDe="⤏",PDe="⤐",BDe="❳",FDe="}",qDe="]",HDe="⦌",_De="⦎",zDe="⦐",VDe="Ř",UDe="ř",$De="Ŗ",WDe="ŗ",jDe="⌉",GDe="}",KDe="Р",JDe="р",YDe="⤷",XDe="⥩",ZDe="”",QDe="”",eLe="↳",tLe="ℜ",rLe="ℛ",nLe="ℜ",iLe="ℝ",aLe="ℜ",oLe="▭",sLe="®",lLe="®",uLe="∋",cLe="⇋",fLe="⥯",dLe="⥽",hLe="⌋",pLe="𝔯",vLe="ℜ",mLe="⥤",gLe="⇁",yLe="⇀",bLe="⥬",kLe="Ρ",wLe="ρ",CLe="ϱ",TLe="⟩",SLe="⇥",xLe="→",ELe="→",MLe="⇒",ALe="⇄",OLe="↣",NLe="⌉",DLe="⟧",LLe="⥝",RLe="⥕",ILe="⇂",PLe="⌋",BLe="⇁",FLe="⇀",qLe="⇄",HLe="⇌",_Le="⇉",zLe="↝",VLe="↦",ULe="⊢",$Le="⥛",WLe="⋌",jLe="⧐",GLe="⊳",KLe="⊵",JLe="⥏",YLe="⥜",XLe="⥔",ZLe="↾",QLe="⥓",eRe="⇀",tRe="˚",rRe="≓",nRe="⇄",iRe="⇌",aRe="",oRe="⎱",sRe="⎱",lRe="⫮",uRe="⟭",cRe="⇾",fRe="⟧",dRe="⦆",hRe="𝕣",pRe="ℝ",vRe="⨮",mRe="⨵",gRe="⥰",yRe=")",bRe="⦔",kRe="⨒",wRe="⇉",CRe="⇛",TRe="›",SRe="𝓇",xRe="ℛ",ERe="↱",MRe="↱",ARe="]",ORe="’",NRe="’",DRe="⋌",LRe="⋊",RRe="▹",IRe="⊵",PRe="▸",BRe="⧎",FRe="⧴",qRe="⥨",HRe="℞",_Re="Ś",zRe="ś",VRe="‚",URe="⪸",$Re="Š",WRe="š",jRe="⪼",GRe="≻",KRe="≽",JRe="⪰",YRe="⪴",XRe="Ş",ZRe="ş",QRe="Ŝ",eIe="ŝ",tIe="⪺",rIe="⪶",nIe="⋩",iIe="⨓",aIe="≿",oIe="С",sIe="с",lIe="⊡",uIe="⋅",cIe="⩦",fIe="⤥",dIe="↘",hIe="⇘",pIe="↘",vIe="§",mIe=";",gIe="⤩",yIe="∖",bIe="∖",kIe="✶",wIe="𝔖",CIe="𝔰",TIe="⌢",SIe="♯",xIe="Щ",EIe="щ",MIe="Ш",AIe="ш",OIe="↓",NIe="←",DIe="∣",LIe="∥",RIe="→",IIe="↑",PIe="",BIe="Σ",FIe="σ",qIe="ς",HIe="ς",_Ie="∼",zIe="⩪",VIe="≃",UIe="≃",$Ie="⪞",WIe="⪠",jIe="⪝",GIe="⪟",KIe="≆",JIe="⨤",YIe="⥲",XIe="←",ZIe="∘",QIe="∖",ePe="⨳",tPe="⧤",rPe="∣",nPe="⌣",iPe="⪪",aPe="⪬",oPe="⪬︀",sPe="Ь",lPe="ь",uPe="⌿",cPe="⧄",fPe="/",dPe="𝕊",hPe="𝕤",pPe="♠",vPe="♠",mPe="∥",gPe="⊓",yPe="⊓︀",bPe="⊔",kPe="⊔︀",wPe="√",CPe="⊏",TPe="⊑",SPe="⊏",xPe="⊑",EPe="⊐",MPe="⊒",APe="⊐",OPe="⊒",NPe="□",DPe="□",LPe="⊓",RPe="⊏",IPe="⊑",PPe="⊐",BPe="⊒",FPe="⊔",qPe="▪",HPe="□",_Pe="▪",zPe="→",VPe="𝒮",UPe="𝓈",$Pe="∖",WPe="⌣",jPe="⋆",GPe="⋆",KPe="☆",JPe="★",YPe="ϵ",XPe="ϕ",ZPe="¯",QPe="⊂",eBe="⋐",tBe="⪽",rBe="⫅",nBe="⊆",iBe="⫃",aBe="⫁",oBe="⫋",sBe="⊊",lBe="⪿",uBe="⥹",cBe="⊂",fBe="⋐",dBe="⊆",hBe="⫅",pBe="⊆",vBe="⊊",mBe="⫋",gBe="⫇",yBe="⫕",bBe="⫓",kBe="⪸",wBe="≻",CBe="≽",TBe="≻",SBe="⪰",xBe="≽",EBe="≿",MBe="⪰",ABe="⪺",OBe="⪶",NBe="⋩",DBe="≿",LBe="∋",RBe="∑",IBe="∑",PBe="♪",BBe="¹",FBe="²",qBe="³",HBe="⊃",_Be="⋑",zBe="⪾",VBe="⫘",UBe="⫆",$Be="⊇",WBe="⫄",jBe="⊃",GBe="⊇",KBe="⟉",JBe="⫗",YBe="⥻",XBe="⫂",ZBe="⫌",QBe="⊋",eFe="⫀",tFe="⊃",rFe="⋑",nFe="⊇",iFe="⫆",aFe="⊋",oFe="⫌",sFe="⫈",lFe="⫔",uFe="⫖",cFe="⤦",fFe="↙",dFe="⇙",hFe="↙",pFe="⤪",vFe="ß",mFe=" ",gFe="⌖",yFe="Τ",bFe="τ",kFe="⎴",wFe="Ť",CFe="ť",TFe="Ţ",SFe="ţ",xFe="Т",EFe="т",MFe="⃛",AFe="⌕",OFe="𝔗",NFe="𝔱",DFe="∴",LFe="∴",RFe="∴",IFe="Θ",PFe="θ",BFe="ϑ",FFe="ϑ",qFe="≈",HFe="∼",_Fe=" ",zFe=" ",VFe=" ",UFe="≈",$Fe="∼",WFe="Þ",jFe="þ",GFe="˜",KFe="∼",JFe="≃",YFe="≅",XFe="≈",ZFe="⨱",QFe="⊠",eqe="×",tqe="⨰",rqe="∭",nqe="⤨",iqe="⌶",aqe="⫱",oqe="⊤",sqe="𝕋",lqe="𝕥",uqe="⫚",cqe="⤩",fqe="‴",dqe="™",hqe="™",pqe="▵",vqe="▿",mqe="◃",gqe="⊴",yqe="≜",bqe="▹",kqe="⊵",wqe="◬",Cqe="≜",Tqe="⨺",Sqe="⃛",xqe="⨹",Eqe="⧍",Mqe="⨻",Aqe="⏢",Oqe="𝒯",Nqe="𝓉",Dqe="Ц",Lqe="ц",Rqe="Ћ",Iqe="ћ",Pqe="Ŧ",Bqe="ŧ",Fqe="≬",qqe="↞",Hqe="↠",_qe="Ú",zqe="ú",Vqe="↑",Uqe="↟",$qe="⇑",Wqe="⥉",jqe="Ў",Gqe="ў",Kqe="Ŭ",Jqe="ŭ",Yqe="Û",Xqe="û",Zqe="У",Qqe="у",eHe="⇅",tHe="Ű",rHe="ű",nHe="⥮",iHe="⥾",aHe="𝔘",oHe="𝔲",sHe="Ù",lHe="ù",uHe="⥣",cHe="↿",fHe="↾",dHe="▀",hHe="⌜",pHe="⌜",vHe="⌏",mHe="◸",gHe="Ū",yHe="ū",bHe="¨",kHe="_",wHe="⏟",CHe="⎵",THe="⏝",SHe="⋃",xHe="⊎",EHe="Ų",MHe="ų",AHe="𝕌",OHe="𝕦",NHe="⤒",DHe="↑",LHe="↑",RHe="⇑",IHe="⇅",PHe="↕",BHe="↕",FHe="⇕",qHe="⥮",HHe="↿",_He="↾",zHe="⊎",VHe="↖",UHe="↗",$He="υ",WHe="ϒ",jHe="ϒ",GHe="Υ",KHe="υ",JHe="↥",YHe="⊥",XHe="⇈",ZHe="⌝",QHe="⌝",e_e="⌎",t_e="Ů",r_e="ů",n_e="◹",i_e="𝒰",a_e="𝓊",o_e="⋰",s_e="Ũ",l_e="ũ",u_e="▵",c_e="▴",f_e="⇈",d_e="Ü",h_e="ü",p_e="⦧",v_e="⦜",m_e="ϵ",g_e="ϰ",y_e="∅",b_e="ϕ",k_e="ϖ",w_e="∝",C_e="↕",T_e="⇕",S_e="ϱ",x_e="ς",E_e="⊊︀",M_e="⫋︀",A_e="⊋︀",O_e="⫌︀",N_e="ϑ",D_e="⊲",L_e="⊳",R_e="⫨",I_e="⫫",P_e="⫩",B_e="В",F_e="в",q_e="⊢",H_e="⊨",__e="⊩",z_e="⊫",V_e="⫦",U_e="⊻",$_e="∨",W_e="⋁",j_e="≚",G_e="⋮",K_e="|",J_e="‖",Y_e="|",X_e="‖",Z_e="∣",Q_e="|",eze="❘",tze="≀",rze=" ",nze="𝔙",ize="𝔳",aze="⊲",oze="⊂⃒",sze="⊃⃒",lze="𝕍",uze="𝕧",cze="∝",fze="⊳",dze="𝒱",hze="𝓋",pze="⫋︀",vze="⊊︀",mze="⫌︀",gze="⊋︀",yze="⊪",bze="⦚",kze="Ŵ",wze="ŵ",Cze="⩟",Tze="∧",Sze="⋀",xze="≙",Eze="℘",Mze="𝔚",Aze="𝔴",Oze="𝕎",Nze="𝕨",Dze="℘",Lze="≀",Rze="≀",Ize="𝒲",Pze="𝓌",Bze="⋂",Fze="◯",qze="⋃",Hze="▽",_ze="𝔛",zze="𝔵",Vze="⟷",Uze="⟺",$ze="Ξ",Wze="ξ",jze="⟵",Gze="⟸",Kze="⟼",Jze="⋻",Yze="⨀",Xze="𝕏",Zze="𝕩",Qze="⨁",eVe="⨂",tVe="⟶",rVe="⟹",nVe="𝒳",iVe="𝓍",aVe="⨆",oVe="⨄",sVe="△",lVe="⋁",uVe="⋀",cVe="Ý",fVe="ý",dVe="Я",hVe="я",pVe="Ŷ",vVe="ŷ",mVe="Ы",gVe="ы",yVe="¥",bVe="𝔜",kVe="𝔶",wVe="Ї",CVe="ї",TVe="𝕐",SVe="𝕪",xVe="𝒴",EVe="𝓎",MVe="Ю",AVe="ю",OVe="ÿ",NVe="Ÿ",DVe="Ź",LVe="ź",RVe="Ž",IVe="ž",PVe="З",BVe="з",FVe="Ż",qVe="ż",HVe="ℨ",_Ve="",zVe="Ζ",VVe="ζ",UVe="𝔷",$Ve="ℨ",WVe="Ж",jVe="ж",GVe="⇝",KVe="𝕫",JVe="ℤ",YVe="𝒵",XVe="𝓏",ZVe="",QVe="",nw={Aacute:Fae,aacute:qae,Abreve:Hae,abreve:_ae,ac:zae,acd:Vae,acE:Uae,Acirc:$ae,acirc:Wae,acute:jae,Acy:Gae,acy:Kae,AElig:Jae,aelig:Yae,af:Xae,Afr:Zae,afr:Qae,Agrave:eoe,agrave:toe,alefsym:roe,aleph:noe,Alpha:ioe,alpha:aoe,Amacr:ooe,amacr:soe,amalg:loe,amp:uoe,AMP:coe,andand:foe,And:doe,and:hoe,andd:poe,andslope:voe,andv:moe,ang:goe,ange:yoe,angle:boe,angmsdaa:koe,angmsdab:woe,angmsdac:Coe,angmsdad:Toe,angmsdae:Soe,angmsdaf:xoe,angmsdag:Eoe,angmsdah:Moe,angmsd:Aoe,angrt:Ooe,angrtvb:Noe,angrtvbd:Doe,angsph:Loe,angst:Roe,angzarr:Ioe,Aogon:Poe,aogon:Boe,Aopf:Foe,aopf:qoe,apacir:Hoe,ap:_oe,apE:zoe,ape:Voe,apid:Uoe,apos:$oe,ApplyFunction:Woe,approx:joe,approxeq:Goe,Aring:Koe,aring:Joe,Ascr:Yoe,ascr:Xoe,Assign:Zoe,ast:Qoe,asymp:ese,asympeq:tse,Atilde:rse,atilde:nse,Auml:ise,auml:ase,awconint:ose,awint:sse,backcong:lse,backepsilon:use,backprime:cse,backsim:fse,backsimeq:dse,Backslash:hse,Barv:pse,barvee:vse,barwed:mse,Barwed:gse,barwedge:yse,bbrk:bse,bbrktbrk:kse,bcong:wse,Bcy:Cse,bcy:Tse,bdquo:Sse,becaus:xse,because:Ese,Because:Mse,bemptyv:Ase,bepsi:Ose,bernou:Nse,Bernoullis:Dse,Beta:Lse,beta:Rse,beth:Ise,between:Pse,Bfr:Bse,bfr:Fse,bigcap:qse,bigcirc:Hse,bigcup:_se,bigodot:zse,bigoplus:Vse,bigotimes:Use,bigsqcup:$se,bigstar:Wse,bigtriangledown:jse,bigtriangleup:Gse,biguplus:Kse,bigvee:Jse,bigwedge:Yse,bkarow:Xse,blacklozenge:Zse,blacksquare:Qse,blacktriangle:ele,blacktriangledown:tle,blacktriangleleft:rle,blacktriangleright:nle,blank:ile,blk12:ale,blk14:ole,blk34:sle,block:lle,bne:ule,bnequiv:cle,bNot:fle,bnot:dle,Bopf:hle,bopf:ple,bot:vle,bottom:mle,bowtie:gle,boxbox:yle,boxdl:ble,boxdL:kle,boxDl:wle,boxDL:Cle,boxdr:Tle,boxdR:Sle,boxDr:xle,boxDR:Ele,boxh:Mle,boxH:Ale,boxhd:Ole,boxHd:Nle,boxhD:Dle,boxHD:Lle,boxhu:Rle,boxHu:Ile,boxhU:Ple,boxHU:Ble,boxminus:Fle,boxplus:qle,boxtimes:Hle,boxul:_le,boxuL:zle,boxUl:Vle,boxUL:Ule,boxur:$le,boxuR:Wle,boxUr:jle,boxUR:Gle,boxv:Kle,boxV:Jle,boxvh:Yle,boxvH:Xle,boxVh:Zle,boxVH:Qle,boxvl:eue,boxvL:tue,boxVl:rue,boxVL:nue,boxvr:iue,boxvR:aue,boxVr:oue,boxVR:sue,bprime:lue,breve:uue,Breve:cue,brvbar:fue,bscr:due,Bscr:hue,bsemi:pue,bsim:vue,bsime:mue,bsolb:gue,bsol:yue,bsolhsub:bue,bull:kue,bullet:wue,bump:Cue,bumpE:Tue,bumpe:Sue,Bumpeq:xue,bumpeq:Eue,Cacute:Mue,cacute:Aue,capand:Oue,capbrcup:Nue,capcap:Due,cap:Lue,Cap:Rue,capcup:Iue,capdot:Pue,CapitalDifferentialD:Bue,caps:Fue,caret:que,caron:Hue,Cayleys:_ue,ccaps:zue,Ccaron:Vue,ccaron:Uue,Ccedil:$ue,ccedil:Wue,Ccirc:jue,ccirc:Gue,Cconint:Kue,ccups:Jue,ccupssm:Yue,Cdot:Xue,cdot:Zue,cedil:Que,Cedilla:ece,cemptyv:tce,cent:rce,centerdot:nce,CenterDot:ice,cfr:ace,Cfr:oce,CHcy:sce,chcy:lce,check:uce,checkmark:cce,Chi:fce,chi:dce,circ:hce,circeq:pce,circlearrowleft:vce,circlearrowright:mce,circledast:gce,circledcirc:yce,circleddash:bce,CircleDot:kce,circledR:wce,circledS:Cce,CircleMinus:Tce,CirclePlus:Sce,CircleTimes:xce,cir:Ece,cirE:Mce,cire:Ace,cirfnint:Oce,cirmid:Nce,cirscir:Dce,ClockwiseContourIntegral:Lce,CloseCurlyDoubleQuote:Rce,CloseCurlyQuote:Ice,clubs:Pce,clubsuit:Bce,colon:Fce,Colon:qce,Colone:Hce,colone:_ce,coloneq:zce,comma:Vce,commat:Uce,comp:$ce,compfn:Wce,complement:jce,complexes:Gce,cong:Kce,congdot:Jce,Congruent:Yce,conint:Xce,Conint:Zce,ContourIntegral:Qce,copf:efe,Copf:tfe,coprod:rfe,Coproduct:nfe,copy:ife,COPY:afe,copysr:ofe,CounterClockwiseContourIntegral:sfe,crarr:lfe,cross:ufe,Cross:cfe,Cscr:ffe,cscr:dfe,csub:hfe,csube:pfe,csup:vfe,csupe:mfe,ctdot:gfe,cudarrl:yfe,cudarrr:bfe,cuepr:kfe,cuesc:wfe,cularr:Cfe,cularrp:Tfe,cupbrcap:Sfe,cupcap:xfe,CupCap:Efe,cup:Mfe,Cup:Afe,cupcup:Ofe,cupdot:Nfe,cupor:Dfe,cups:Lfe,curarr:Rfe,curarrm:Ife,curlyeqprec:Pfe,curlyeqsucc:Bfe,curlyvee:Ffe,curlywedge:qfe,curren:Hfe,curvearrowleft:_fe,curvearrowright:zfe,cuvee:Vfe,cuwed:Ufe,cwconint:$fe,cwint:Wfe,cylcty:jfe,dagger:Gfe,Dagger:Kfe,daleth:Jfe,darr:Yfe,Darr:Xfe,dArr:Zfe,dash:Qfe,Dashv:ede,dashv:tde,dbkarow:rde,dblac:nde,Dcaron:ide,dcaron:ade,Dcy:ode,dcy:sde,ddagger:lde,ddarr:ude,DD:cde,dd:fde,DDotrahd:dde,ddotseq:hde,deg:pde,Del:vde,Delta:mde,delta:gde,demptyv:yde,dfisht:bde,Dfr:kde,dfr:wde,dHar:Cde,dharl:Tde,dharr:Sde,DiacriticalAcute:xde,DiacriticalDot:Ede,DiacriticalDoubleAcute:Mde,DiacriticalGrave:Ade,DiacriticalTilde:Ode,diam:Nde,diamond:Dde,Diamond:Lde,diamondsuit:Rde,diams:Ide,die:Pde,DifferentialD:Bde,digamma:Fde,disin:qde,div:Hde,divide:_de,divideontimes:zde,divonx:Vde,DJcy:Ude,djcy:$de,dlcorn:Wde,dlcrop:jde,dollar:Gde,Dopf:Kde,dopf:Jde,Dot:Yde,dot:Xde,DotDot:Zde,doteq:Qde,doteqdot:ehe,DotEqual:the,dotminus:rhe,dotplus:nhe,dotsquare:ihe,doublebarwedge:ahe,DoubleContourIntegral:ohe,DoubleDot:she,DoubleDownArrow:lhe,DoubleLeftArrow:uhe,DoubleLeftRightArrow:che,DoubleLeftTee:fhe,DoubleLongLeftArrow:dhe,DoubleLongLeftRightArrow:hhe,DoubleLongRightArrow:phe,DoubleRightArrow:vhe,DoubleRightTee:mhe,DoubleUpArrow:ghe,DoubleUpDownArrow:yhe,DoubleVerticalBar:bhe,DownArrowBar:khe,downarrow:whe,DownArrow:Che,Downarrow:The,DownArrowUpArrow:She,DownBreve:xhe,downdownarrows:Ehe,downharpoonleft:Mhe,downharpoonright:Ahe,DownLeftRightVector:Ohe,DownLeftTeeVector:Nhe,DownLeftVectorBar:Dhe,DownLeftVector:Lhe,DownRightTeeVector:Rhe,DownRightVectorBar:Ihe,DownRightVector:Phe,DownTeeArrow:Bhe,DownTee:Fhe,drbkarow:qhe,drcorn:Hhe,drcrop:_he,Dscr:zhe,dscr:Vhe,DScy:Uhe,dscy:$he,dsol:Whe,Dstrok:jhe,dstrok:Ghe,dtdot:Khe,dtri:Jhe,dtrif:Yhe,duarr:Xhe,duhar:Zhe,dwangle:Qhe,DZcy:epe,dzcy:tpe,dzigrarr:rpe,Eacute:npe,eacute:ipe,easter:ape,Ecaron:ope,ecaron:spe,Ecirc:lpe,ecirc:upe,ecir:cpe,ecolon:fpe,Ecy:dpe,ecy:hpe,eDDot:ppe,Edot:vpe,edot:mpe,eDot:gpe,ee:ype,efDot:bpe,Efr:kpe,efr:wpe,eg:Cpe,Egrave:Tpe,egrave:Spe,egs:xpe,egsdot:Epe,el:Mpe,Element:Ape,elinters:Ope,ell:Npe,els:Dpe,elsdot:Lpe,Emacr:Rpe,emacr:Ipe,empty:Ppe,emptyset:Bpe,EmptySmallSquare:Fpe,emptyv:qpe,EmptyVerySmallSquare:Hpe,emsp13:_pe,emsp14:zpe,emsp:Vpe,ENG:Upe,eng:$pe,ensp:Wpe,Eogon:jpe,eogon:Gpe,Eopf:Kpe,eopf:Jpe,epar:Ype,eparsl:Xpe,eplus:Zpe,epsi:Qpe,Epsilon:eve,epsilon:tve,epsiv:rve,eqcirc:nve,eqcolon:ive,eqsim:ave,eqslantgtr:ove,eqslantless:sve,Equal:lve,equals:uve,EqualTilde:cve,equest:fve,Equilibrium:dve,equiv:hve,equivDD:pve,eqvparsl:vve,erarr:mve,erDot:gve,escr:yve,Escr:bve,esdot:kve,Esim:wve,esim:Cve,Eta:Tve,eta:Sve,ETH:xve,eth:Eve,Euml:Mve,euml:Ave,euro:Ove,excl:Nve,exist:Dve,Exists:Lve,expectation:Rve,exponentiale:Ive,ExponentialE:Pve,fallingdotseq:Bve,Fcy:Fve,fcy:qve,female:Hve,ffilig:_ve,fflig:zve,ffllig:Vve,Ffr:Uve,ffr:$ve,filig:Wve,FilledSmallSquare:jve,FilledVerySmallSquare:Gve,fjlig:Kve,flat:Jve,fllig:Yve,fltns:Xve,fnof:Zve,Fopf:Qve,fopf:eme,forall:tme,ForAll:rme,fork:nme,forkv:ime,Fouriertrf:ame,fpartint:ome,frac12:sme,frac13:lme,frac14:ume,frac15:cme,frac16:fme,frac18:dme,frac23:hme,frac25:pme,frac34:vme,frac35:mme,frac38:gme,frac45:yme,frac56:bme,frac58:kme,frac78:wme,frasl:Cme,frown:Tme,fscr:Sme,Fscr:xme,gacute:Eme,Gamma:Mme,gamma:Ame,Gammad:Ome,gammad:Nme,gap:Dme,Gbreve:Lme,gbreve:Rme,Gcedil:Ime,Gcirc:Pme,gcirc:Bme,Gcy:Fme,gcy:qme,Gdot:Hme,gdot:_me,ge:zme,gE:Vme,gEl:Ume,gel:$me,geq:Wme,geqq:jme,geqslant:Gme,gescc:Kme,ges:Jme,gesdot:Yme,gesdoto:Xme,gesdotol:Zme,gesl:Qme,gesles:ege,Gfr:tge,gfr:rge,gg:nge,Gg:ige,ggg:age,gimel:oge,GJcy:sge,gjcy:lge,gla:uge,gl:cge,glE:fge,glj:dge,gnap:hge,gnapprox:pge,gne:vge,gnE:mge,gneq:gge,gneqq:yge,gnsim:bge,Gopf:kge,gopf:wge,grave:Cge,GreaterEqual:Tge,GreaterEqualLess:Sge,GreaterFullEqual:xge,GreaterGreater:Ege,GreaterLess:Mge,GreaterSlantEqual:Age,GreaterTilde:Oge,Gscr:Nge,gscr:Dge,gsim:Lge,gsime:Rge,gsiml:Ige,gtcc:Pge,gtcir:Bge,gt:Fge,GT:qge,Gt:Hge,gtdot:_ge,gtlPar:zge,gtquest:Vge,gtrapprox:Uge,gtrarr:$ge,gtrdot:Wge,gtreqless:jge,gtreqqless:Gge,gtrless:Kge,gtrsim:Jge,gvertneqq:Yge,gvnE:Xge,Hacek:Zge,hairsp:Qge,half:eye,hamilt:tye,HARDcy:rye,hardcy:nye,harrcir:iye,harr:aye,hArr:oye,harrw:sye,Hat:lye,hbar:uye,Hcirc:cye,hcirc:fye,hearts:dye,heartsuit:hye,hellip:pye,hercon:vye,hfr:mye,Hfr:gye,HilbertSpace:yye,hksearow:bye,hkswarow:kye,hoarr:wye,homtht:Cye,hookleftarrow:Tye,hookrightarrow:Sye,hopf:xye,Hopf:Eye,horbar:Mye,HorizontalLine:Aye,hscr:Oye,Hscr:Nye,hslash:Dye,Hstrok:Lye,hstrok:Rye,HumpDownHump:Iye,HumpEqual:Pye,hybull:Bye,hyphen:Fye,Iacute:qye,iacute:Hye,ic:_ye,Icirc:zye,icirc:Vye,Icy:Uye,icy:$ye,Idot:Wye,IEcy:jye,iecy:Gye,iexcl:Kye,iff:Jye,ifr:Yye,Ifr:Xye,Igrave:Zye,igrave:Qye,ii:ebe,iiiint:tbe,iiint:rbe,iinfin:nbe,iiota:ibe,IJlig:abe,ijlig:obe,Imacr:sbe,imacr:lbe,image:ube,ImaginaryI:cbe,imagline:fbe,imagpart:dbe,imath:hbe,Im:pbe,imof:vbe,imped:mbe,Implies:gbe,incare:ybe,in:"∈",infin:bbe,infintie:kbe,inodot:wbe,intcal:Cbe,int:Tbe,Int:Sbe,integers:xbe,Integral:Ebe,intercal:Mbe,Intersection:Abe,intlarhk:Obe,intprod:Nbe,InvisibleComma:Dbe,InvisibleTimes:Lbe,IOcy:Rbe,iocy:Ibe,Iogon:Pbe,iogon:Bbe,Iopf:Fbe,iopf:qbe,Iota:Hbe,iota:_be,iprod:zbe,iquest:Vbe,iscr:Ube,Iscr:$be,isin:Wbe,isindot:jbe,isinE:Gbe,isins:Kbe,isinsv:Jbe,isinv:Ybe,it:Xbe,Itilde:Zbe,itilde:Qbe,Iukcy:eke,iukcy:tke,Iuml:rke,iuml:nke,Jcirc:ike,jcirc:ake,Jcy:oke,jcy:ske,Jfr:lke,jfr:uke,jmath:cke,Jopf:fke,jopf:dke,Jscr:hke,jscr:pke,Jsercy:vke,jsercy:mke,Jukcy:gke,jukcy:yke,Kappa:bke,kappa:kke,kappav:wke,Kcedil:Cke,kcedil:Tke,Kcy:Ske,kcy:xke,Kfr:Eke,kfr:Mke,kgreen:Ake,KHcy:Oke,khcy:Nke,KJcy:Dke,kjcy:Lke,Kopf:Rke,kopf:Ike,Kscr:Pke,kscr:Bke,lAarr:Fke,Lacute:qke,lacute:Hke,laemptyv:_ke,lagran:zke,Lambda:Vke,lambda:Uke,lang:$ke,Lang:Wke,langd:jke,langle:Gke,lap:Kke,Laplacetrf:Jke,laquo:Yke,larrb:Xke,larrbfs:Zke,larr:Qke,Larr:ewe,lArr:twe,larrfs:rwe,larrhk:nwe,larrlp:iwe,larrpl:awe,larrsim:owe,larrtl:swe,latail:lwe,lAtail:uwe,lat:cwe,late:fwe,lates:dwe,lbarr:hwe,lBarr:pwe,lbbrk:vwe,lbrace:mwe,lbrack:gwe,lbrke:ywe,lbrksld:bwe,lbrkslu:kwe,Lcaron:wwe,lcaron:Cwe,Lcedil:Twe,lcedil:Swe,lceil:xwe,lcub:Ewe,Lcy:Mwe,lcy:Awe,ldca:Owe,ldquo:Nwe,ldquor:Dwe,ldrdhar:Lwe,ldrushar:Rwe,ldsh:Iwe,le:Pwe,lE:Bwe,LeftAngleBracket:Fwe,LeftArrowBar:qwe,leftarrow:Hwe,LeftArrow:_we,Leftarrow:zwe,LeftArrowRightArrow:Vwe,leftarrowtail:Uwe,LeftCeiling:$we,LeftDoubleBracket:Wwe,LeftDownTeeVector:jwe,LeftDownVectorBar:Gwe,LeftDownVector:Kwe,LeftFloor:Jwe,leftharpoondown:Ywe,leftharpoonup:Xwe,leftleftarrows:Zwe,leftrightarrow:Qwe,LeftRightArrow:e0e,Leftrightarrow:t0e,leftrightarrows:r0e,leftrightharpoons:n0e,leftrightsquigarrow:i0e,LeftRightVector:a0e,LeftTeeArrow:o0e,LeftTee:s0e,LeftTeeVector:l0e,leftthreetimes:u0e,LeftTriangleBar:c0e,LeftTriangle:f0e,LeftTriangleEqual:d0e,LeftUpDownVector:h0e,LeftUpTeeVector:p0e,LeftUpVectorBar:v0e,LeftUpVector:m0e,LeftVectorBar:g0e,LeftVector:y0e,lEg:b0e,leg:k0e,leq:w0e,leqq:C0e,leqslant:T0e,lescc:S0e,les:x0e,lesdot:E0e,lesdoto:M0e,lesdotor:A0e,lesg:O0e,lesges:N0e,lessapprox:D0e,lessdot:L0e,lesseqgtr:R0e,lesseqqgtr:I0e,LessEqualGreater:P0e,LessFullEqual:B0e,LessGreater:F0e,lessgtr:q0e,LessLess:H0e,lesssim:_0e,LessSlantEqual:z0e,LessTilde:V0e,lfisht:U0e,lfloor:$0e,Lfr:W0e,lfr:j0e,lg:G0e,lgE:K0e,lHar:J0e,lhard:Y0e,lharu:X0e,lharul:Z0e,lhblk:Q0e,LJcy:eCe,ljcy:tCe,llarr:rCe,ll:nCe,Ll:iCe,llcorner:aCe,Lleftarrow:oCe,llhard:sCe,lltri:lCe,Lmidot:uCe,lmidot:cCe,lmoustache:fCe,lmoust:dCe,lnap:hCe,lnapprox:pCe,lne:vCe,lnE:mCe,lneq:gCe,lneqq:yCe,lnsim:bCe,loang:kCe,loarr:wCe,lobrk:CCe,longleftarrow:TCe,LongLeftArrow:SCe,Longleftarrow:xCe,longleftrightarrow:ECe,LongLeftRightArrow:MCe,Longleftrightarrow:ACe,longmapsto:OCe,longrightarrow:NCe,LongRightArrow:DCe,Longrightarrow:LCe,looparrowleft:RCe,looparrowright:ICe,lopar:PCe,Lopf:BCe,lopf:FCe,loplus:qCe,lotimes:HCe,lowast:_Ce,lowbar:zCe,LowerLeftArrow:VCe,LowerRightArrow:UCe,loz:$Ce,lozenge:WCe,lozf:jCe,lpar:GCe,lparlt:KCe,lrarr:JCe,lrcorner:YCe,lrhar:XCe,lrhard:ZCe,lrm:QCe,lrtri:e1e,lsaquo:t1e,lscr:r1e,Lscr:n1e,lsh:i1e,Lsh:a1e,lsim:o1e,lsime:s1e,lsimg:l1e,lsqb:u1e,lsquo:c1e,lsquor:f1e,Lstrok:d1e,lstrok:h1e,ltcc:p1e,ltcir:v1e,lt:m1e,LT:g1e,Lt:y1e,ltdot:b1e,lthree:k1e,ltimes:w1e,ltlarr:C1e,ltquest:T1e,ltri:S1e,ltrie:x1e,ltrif:E1e,ltrPar:M1e,lurdshar:A1e,luruhar:O1e,lvertneqq:N1e,lvnE:D1e,macr:L1e,male:R1e,malt:I1e,maltese:P1e,Map:"⤅",map:B1e,mapsto:F1e,mapstodown:q1e,mapstoleft:H1e,mapstoup:_1e,marker:z1e,mcomma:V1e,Mcy:U1e,mcy:$1e,mdash:W1e,mDDot:j1e,measuredangle:G1e,MediumSpace:K1e,Mellintrf:J1e,Mfr:Y1e,mfr:X1e,mho:Z1e,micro:Q1e,midast:eTe,midcir:tTe,mid:rTe,middot:nTe,minusb:iTe,minus:aTe,minusd:oTe,minusdu:sTe,MinusPlus:lTe,mlcp:uTe,mldr:cTe,mnplus:fTe,models:dTe,Mopf:hTe,mopf:pTe,mp:vTe,mscr:mTe,Mscr:gTe,mstpos:yTe,Mu:bTe,mu:kTe,multimap:wTe,mumap:CTe,nabla:TTe,Nacute:STe,nacute:xTe,nang:ETe,nap:MTe,napE:ATe,napid:OTe,napos:NTe,napprox:DTe,natural:LTe,naturals:RTe,natur:ITe,nbsp:PTe,nbump:BTe,nbumpe:FTe,ncap:qTe,Ncaron:HTe,ncaron:_Te,Ncedil:zTe,ncedil:VTe,ncong:UTe,ncongdot:$Te,ncup:WTe,Ncy:jTe,ncy:GTe,ndash:KTe,nearhk:JTe,nearr:YTe,neArr:XTe,nearrow:ZTe,ne:QTe,nedot:eSe,NegativeMediumSpace:tSe,NegativeThickSpace:rSe,NegativeThinSpace:nSe,NegativeVeryThinSpace:iSe,nequiv:aSe,nesear:oSe,nesim:sSe,NestedGreaterGreater:lSe,NestedLessLess:uSe,NewLine:cSe,nexist:fSe,nexists:dSe,Nfr:hSe,nfr:pSe,ngE:vSe,nge:mSe,ngeq:gSe,ngeqq:ySe,ngeqslant:bSe,nges:kSe,nGg:wSe,ngsim:CSe,nGt:TSe,ngt:SSe,ngtr:xSe,nGtv:ESe,nharr:MSe,nhArr:ASe,nhpar:OSe,ni:NSe,nis:DSe,nisd:LSe,niv:RSe,NJcy:ISe,njcy:PSe,nlarr:BSe,nlArr:FSe,nldr:qSe,nlE:HSe,nle:_Se,nleftarrow:zSe,nLeftarrow:VSe,nleftrightarrow:USe,nLeftrightarrow:$Se,nleq:WSe,nleqq:jSe,nleqslant:GSe,nles:KSe,nless:JSe,nLl:YSe,nlsim:XSe,nLt:ZSe,nlt:QSe,nltri:exe,nltrie:txe,nLtv:rxe,nmid:nxe,NoBreak:ixe,NonBreakingSpace:axe,nopf:oxe,Nopf:sxe,Not:lxe,not:uxe,NotCongruent:cxe,NotCupCap:fxe,NotDoubleVerticalBar:dxe,NotElement:hxe,NotEqual:pxe,NotEqualTilde:vxe,NotExists:mxe,NotGreater:gxe,NotGreaterEqual:yxe,NotGreaterFullEqual:bxe,NotGreaterGreater:kxe,NotGreaterLess:wxe,NotGreaterSlantEqual:Cxe,NotGreaterTilde:Txe,NotHumpDownHump:Sxe,NotHumpEqual:xxe,notin:Exe,notindot:Mxe,notinE:Axe,notinva:Oxe,notinvb:Nxe,notinvc:Dxe,NotLeftTriangleBar:Lxe,NotLeftTriangle:Rxe,NotLeftTriangleEqual:Ixe,NotLess:Pxe,NotLessEqual:Bxe,NotLessGreater:Fxe,NotLessLess:qxe,NotLessSlantEqual:Hxe,NotLessTilde:_xe,NotNestedGreaterGreater:zxe,NotNestedLessLess:Vxe,notni:Uxe,notniva:$xe,notnivb:Wxe,notnivc:jxe,NotPrecedes:Gxe,NotPrecedesEqual:Kxe,NotPrecedesSlantEqual:Jxe,NotReverseElement:Yxe,NotRightTriangleBar:Xxe,NotRightTriangle:Zxe,NotRightTriangleEqual:Qxe,NotSquareSubset:eEe,NotSquareSubsetEqual:tEe,NotSquareSuperset:rEe,NotSquareSupersetEqual:nEe,NotSubset:iEe,NotSubsetEqual:aEe,NotSucceeds:oEe,NotSucceedsEqual:sEe,NotSucceedsSlantEqual:lEe,NotSucceedsTilde:uEe,NotSuperset:cEe,NotSupersetEqual:fEe,NotTilde:dEe,NotTildeEqual:hEe,NotTildeFullEqual:pEe,NotTildeTilde:vEe,NotVerticalBar:mEe,nparallel:gEe,npar:yEe,nparsl:bEe,npart:kEe,npolint:wEe,npr:CEe,nprcue:TEe,nprec:SEe,npreceq:xEe,npre:EEe,nrarrc:MEe,nrarr:AEe,nrArr:OEe,nrarrw:NEe,nrightarrow:DEe,nRightarrow:LEe,nrtri:REe,nrtrie:IEe,nsc:PEe,nsccue:BEe,nsce:FEe,Nscr:qEe,nscr:HEe,nshortmid:_Ee,nshortparallel:zEe,nsim:VEe,nsime:UEe,nsimeq:$Ee,nsmid:WEe,nspar:jEe,nsqsube:GEe,nsqsupe:KEe,nsub:JEe,nsubE:YEe,nsube:XEe,nsubset:ZEe,nsubseteq:QEe,nsubseteqq:eMe,nsucc:tMe,nsucceq:rMe,nsup:nMe,nsupE:iMe,nsupe:aMe,nsupset:oMe,nsupseteq:sMe,nsupseteqq:lMe,ntgl:uMe,Ntilde:cMe,ntilde:fMe,ntlg:dMe,ntriangleleft:hMe,ntrianglelefteq:pMe,ntriangleright:vMe,ntrianglerighteq:mMe,Nu:gMe,nu:yMe,num:bMe,numero:kMe,numsp:wMe,nvap:CMe,nvdash:TMe,nvDash:SMe,nVdash:xMe,nVDash:EMe,nvge:MMe,nvgt:AMe,nvHarr:OMe,nvinfin:NMe,nvlArr:DMe,nvle:LMe,nvlt:RMe,nvltrie:IMe,nvrArr:PMe,nvrtrie:BMe,nvsim:FMe,nwarhk:qMe,nwarr:HMe,nwArr:_Me,nwarrow:zMe,nwnear:VMe,Oacute:UMe,oacute:$Me,oast:WMe,Ocirc:jMe,ocirc:GMe,ocir:KMe,Ocy:JMe,ocy:YMe,odash:XMe,Odblac:ZMe,odblac:QMe,odiv:eAe,odot:tAe,odsold:rAe,OElig:nAe,oelig:iAe,ofcir:aAe,Ofr:oAe,ofr:sAe,ogon:lAe,Ograve:uAe,ograve:cAe,ogt:fAe,ohbar:dAe,ohm:hAe,oint:pAe,olarr:vAe,olcir:mAe,olcross:gAe,oline:yAe,olt:bAe,Omacr:kAe,omacr:wAe,Omega:CAe,omega:TAe,Omicron:SAe,omicron:xAe,omid:EAe,ominus:MAe,Oopf:AAe,oopf:OAe,opar:NAe,OpenCurlyDoubleQuote:DAe,OpenCurlyQuote:LAe,operp:RAe,oplus:IAe,orarr:PAe,Or:BAe,or:FAe,ord:qAe,order:HAe,orderof:_Ae,ordf:zAe,ordm:VAe,origof:UAe,oror:$Ae,orslope:WAe,orv:jAe,oS:GAe,Oscr:KAe,oscr:JAe,Oslash:YAe,oslash:XAe,osol:ZAe,Otilde:QAe,otilde:eOe,otimesas:tOe,Otimes:rOe,otimes:nOe,Ouml:iOe,ouml:aOe,ovbar:oOe,OverBar:sOe,OverBrace:lOe,OverBracket:uOe,OverParenthesis:cOe,para:fOe,parallel:dOe,par:hOe,parsim:pOe,parsl:vOe,part:mOe,PartialD:gOe,Pcy:yOe,pcy:bOe,percnt:kOe,period:wOe,permil:COe,perp:TOe,pertenk:SOe,Pfr:xOe,pfr:EOe,Phi:MOe,phi:AOe,phiv:OOe,phmmat:NOe,phone:DOe,Pi:LOe,pi:ROe,pitchfork:IOe,piv:POe,planck:BOe,planckh:FOe,plankv:qOe,plusacir:HOe,plusb:_Oe,pluscir:zOe,plus:VOe,plusdo:UOe,plusdu:$Oe,pluse:WOe,PlusMinus:jOe,plusmn:GOe,plussim:KOe,plustwo:JOe,pm:YOe,Poincareplane:XOe,pointint:ZOe,popf:QOe,Popf:eNe,pound:tNe,prap:rNe,Pr:nNe,pr:iNe,prcue:aNe,precapprox:oNe,prec:sNe,preccurlyeq:lNe,Precedes:uNe,PrecedesEqual:cNe,PrecedesSlantEqual:fNe,PrecedesTilde:dNe,preceq:hNe,precnapprox:pNe,precneqq:vNe,precnsim:mNe,pre:gNe,prE:yNe,precsim:bNe,prime:kNe,Prime:wNe,primes:CNe,prnap:TNe,prnE:SNe,prnsim:xNe,prod:ENe,Product:MNe,profalar:ANe,profline:ONe,profsurf:NNe,prop:DNe,Proportional:LNe,Proportion:RNe,propto:INe,prsim:PNe,prurel:BNe,Pscr:FNe,pscr:qNe,Psi:HNe,psi:_Ne,puncsp:zNe,Qfr:VNe,qfr:UNe,qint:$Ne,qopf:WNe,Qopf:jNe,qprime:GNe,Qscr:KNe,qscr:JNe,quaternions:YNe,quatint:XNe,quest:ZNe,questeq:QNe,quot:eDe,QUOT:tDe,rAarr:rDe,race:nDe,Racute:iDe,racute:aDe,radic:oDe,raemptyv:sDe,rang:lDe,Rang:uDe,rangd:cDe,range:fDe,rangle:dDe,raquo:hDe,rarrap:pDe,rarrb:vDe,rarrbfs:mDe,rarrc:gDe,rarr:yDe,Rarr:bDe,rArr:kDe,rarrfs:wDe,rarrhk:CDe,rarrlp:TDe,rarrpl:SDe,rarrsim:xDe,Rarrtl:EDe,rarrtl:MDe,rarrw:ADe,ratail:ODe,rAtail:NDe,ratio:DDe,rationals:LDe,rbarr:RDe,rBarr:IDe,RBarr:PDe,rbbrk:BDe,rbrace:FDe,rbrack:qDe,rbrke:HDe,rbrksld:_De,rbrkslu:zDe,Rcaron:VDe,rcaron:UDe,Rcedil:$De,rcedil:WDe,rceil:jDe,rcub:GDe,Rcy:KDe,rcy:JDe,rdca:YDe,rdldhar:XDe,rdquo:ZDe,rdquor:QDe,rdsh:eLe,real:tLe,realine:rLe,realpart:nLe,reals:iLe,Re:aLe,rect:oLe,reg:sLe,REG:lLe,ReverseElement:uLe,ReverseEquilibrium:cLe,ReverseUpEquilibrium:fLe,rfisht:dLe,rfloor:hLe,rfr:pLe,Rfr:vLe,rHar:mLe,rhard:gLe,rharu:yLe,rharul:bLe,Rho:kLe,rho:wLe,rhov:CLe,RightAngleBracket:TLe,RightArrowBar:SLe,rightarrow:xLe,RightArrow:ELe,Rightarrow:MLe,RightArrowLeftArrow:ALe,rightarrowtail:OLe,RightCeiling:NLe,RightDoubleBracket:DLe,RightDownTeeVector:LLe,RightDownVectorBar:RLe,RightDownVector:ILe,RightFloor:PLe,rightharpoondown:BLe,rightharpoonup:FLe,rightleftarrows:qLe,rightleftharpoons:HLe,rightrightarrows:_Le,rightsquigarrow:zLe,RightTeeArrow:VLe,RightTee:ULe,RightTeeVector:$Le,rightthreetimes:WLe,RightTriangleBar:jLe,RightTriangle:GLe,RightTriangleEqual:KLe,RightUpDownVector:JLe,RightUpTeeVector:YLe,RightUpVectorBar:XLe,RightUpVector:ZLe,RightVectorBar:QLe,RightVector:eRe,ring:tRe,risingdotseq:rRe,rlarr:nRe,rlhar:iRe,rlm:aRe,rmoustache:oRe,rmoust:sRe,rnmid:lRe,roang:uRe,roarr:cRe,robrk:fRe,ropar:dRe,ropf:hRe,Ropf:pRe,roplus:vRe,rotimes:mRe,RoundImplies:gRe,rpar:yRe,rpargt:bRe,rppolint:kRe,rrarr:wRe,Rrightarrow:CRe,rsaquo:TRe,rscr:SRe,Rscr:xRe,rsh:ERe,Rsh:MRe,rsqb:ARe,rsquo:ORe,rsquor:NRe,rthree:DRe,rtimes:LRe,rtri:RRe,rtrie:IRe,rtrif:PRe,rtriltri:BRe,RuleDelayed:FRe,ruluhar:qRe,rx:HRe,Sacute:_Re,sacute:zRe,sbquo:VRe,scap:URe,Scaron:$Re,scaron:WRe,Sc:jRe,sc:GRe,sccue:KRe,sce:JRe,scE:YRe,Scedil:XRe,scedil:ZRe,Scirc:QRe,scirc:eIe,scnap:tIe,scnE:rIe,scnsim:nIe,scpolint:iIe,scsim:aIe,Scy:oIe,scy:sIe,sdotb:lIe,sdot:uIe,sdote:cIe,searhk:fIe,searr:dIe,seArr:hIe,searrow:pIe,sect:vIe,semi:mIe,seswar:gIe,setminus:yIe,setmn:bIe,sext:kIe,Sfr:wIe,sfr:CIe,sfrown:TIe,sharp:SIe,SHCHcy:xIe,shchcy:EIe,SHcy:MIe,shcy:AIe,ShortDownArrow:OIe,ShortLeftArrow:NIe,shortmid:DIe,shortparallel:LIe,ShortRightArrow:RIe,ShortUpArrow:IIe,shy:PIe,Sigma:BIe,sigma:FIe,sigmaf:qIe,sigmav:HIe,sim:_Ie,simdot:zIe,sime:VIe,simeq:UIe,simg:$Ie,simgE:WIe,siml:jIe,simlE:GIe,simne:KIe,simplus:JIe,simrarr:YIe,slarr:XIe,SmallCircle:ZIe,smallsetminus:QIe,smashp:ePe,smeparsl:tPe,smid:rPe,smile:nPe,smt:iPe,smte:aPe,smtes:oPe,SOFTcy:sPe,softcy:lPe,solbar:uPe,solb:cPe,sol:fPe,Sopf:dPe,sopf:hPe,spades:pPe,spadesuit:vPe,spar:mPe,sqcap:gPe,sqcaps:yPe,sqcup:bPe,sqcups:kPe,Sqrt:wPe,sqsub:CPe,sqsube:TPe,sqsubset:SPe,sqsubseteq:xPe,sqsup:EPe,sqsupe:MPe,sqsupset:APe,sqsupseteq:OPe,square:NPe,Square:DPe,SquareIntersection:LPe,SquareSubset:RPe,SquareSubsetEqual:IPe,SquareSuperset:PPe,SquareSupersetEqual:BPe,SquareUnion:FPe,squarf:qPe,squ:HPe,squf:_Pe,srarr:zPe,Sscr:VPe,sscr:UPe,ssetmn:$Pe,ssmile:WPe,sstarf:jPe,Star:GPe,star:KPe,starf:JPe,straightepsilon:YPe,straightphi:XPe,strns:ZPe,sub:QPe,Sub:eBe,subdot:tBe,subE:rBe,sube:nBe,subedot:iBe,submult:aBe,subnE:oBe,subne:sBe,subplus:lBe,subrarr:uBe,subset:cBe,Subset:fBe,subseteq:dBe,subseteqq:hBe,SubsetEqual:pBe,subsetneq:vBe,subsetneqq:mBe,subsim:gBe,subsub:yBe,subsup:bBe,succapprox:kBe,succ:wBe,succcurlyeq:CBe,Succeeds:TBe,SucceedsEqual:SBe,SucceedsSlantEqual:xBe,SucceedsTilde:EBe,succeq:MBe,succnapprox:ABe,succneqq:OBe,succnsim:NBe,succsim:DBe,SuchThat:LBe,sum:RBe,Sum:IBe,sung:PBe,sup1:BBe,sup2:FBe,sup3:qBe,sup:HBe,Sup:_Be,supdot:zBe,supdsub:VBe,supE:UBe,supe:$Be,supedot:WBe,Superset:jBe,SupersetEqual:GBe,suphsol:KBe,suphsub:JBe,suplarr:YBe,supmult:XBe,supnE:ZBe,supne:QBe,supplus:eFe,supset:tFe,Supset:rFe,supseteq:nFe,supseteqq:iFe,supsetneq:aFe,supsetneqq:oFe,supsim:sFe,supsub:lFe,supsup:uFe,swarhk:cFe,swarr:fFe,swArr:dFe,swarrow:hFe,swnwar:pFe,szlig:vFe,Tab:mFe,target:gFe,Tau:yFe,tau:bFe,tbrk:kFe,Tcaron:wFe,tcaron:CFe,Tcedil:TFe,tcedil:SFe,Tcy:xFe,tcy:EFe,tdot:MFe,telrec:AFe,Tfr:OFe,tfr:NFe,there4:DFe,therefore:LFe,Therefore:RFe,Theta:IFe,theta:PFe,thetasym:BFe,thetav:FFe,thickapprox:qFe,thicksim:HFe,ThickSpace:_Fe,ThinSpace:zFe,thinsp:VFe,thkap:UFe,thksim:$Fe,THORN:WFe,thorn:jFe,tilde:GFe,Tilde:KFe,TildeEqual:JFe,TildeFullEqual:YFe,TildeTilde:XFe,timesbar:ZFe,timesb:QFe,times:eqe,timesd:tqe,tint:rqe,toea:nqe,topbot:iqe,topcir:aqe,top:oqe,Topf:sqe,topf:lqe,topfork:uqe,tosa:cqe,tprime:fqe,trade:dqe,TRADE:hqe,triangle:pqe,triangledown:vqe,triangleleft:mqe,trianglelefteq:gqe,triangleq:yqe,triangleright:bqe,trianglerighteq:kqe,tridot:wqe,trie:Cqe,triminus:Tqe,TripleDot:Sqe,triplus:xqe,trisb:Eqe,tritime:Mqe,trpezium:Aqe,Tscr:Oqe,tscr:Nqe,TScy:Dqe,tscy:Lqe,TSHcy:Rqe,tshcy:Iqe,Tstrok:Pqe,tstrok:Bqe,twixt:Fqe,twoheadleftarrow:qqe,twoheadrightarrow:Hqe,Uacute:_qe,uacute:zqe,uarr:Vqe,Uarr:Uqe,uArr:$qe,Uarrocir:Wqe,Ubrcy:jqe,ubrcy:Gqe,Ubreve:Kqe,ubreve:Jqe,Ucirc:Yqe,ucirc:Xqe,Ucy:Zqe,ucy:Qqe,udarr:eHe,Udblac:tHe,udblac:rHe,udhar:nHe,ufisht:iHe,Ufr:aHe,ufr:oHe,Ugrave:sHe,ugrave:lHe,uHar:uHe,uharl:cHe,uharr:fHe,uhblk:dHe,ulcorn:hHe,ulcorner:pHe,ulcrop:vHe,ultri:mHe,Umacr:gHe,umacr:yHe,uml:bHe,UnderBar:kHe,UnderBrace:wHe,UnderBracket:CHe,UnderParenthesis:THe,Union:SHe,UnionPlus:xHe,Uogon:EHe,uogon:MHe,Uopf:AHe,uopf:OHe,UpArrowBar:NHe,uparrow:DHe,UpArrow:LHe,Uparrow:RHe,UpArrowDownArrow:IHe,updownarrow:PHe,UpDownArrow:BHe,Updownarrow:FHe,UpEquilibrium:qHe,upharpoonleft:HHe,upharpoonright:_He,uplus:zHe,UpperLeftArrow:VHe,UpperRightArrow:UHe,upsi:$He,Upsi:WHe,upsih:jHe,Upsilon:GHe,upsilon:KHe,UpTeeArrow:JHe,UpTee:YHe,upuparrows:XHe,urcorn:ZHe,urcorner:QHe,urcrop:e_e,Uring:t_e,uring:r_e,urtri:n_e,Uscr:i_e,uscr:a_e,utdot:o_e,Utilde:s_e,utilde:l_e,utri:u_e,utrif:c_e,uuarr:f_e,Uuml:d_e,uuml:h_e,uwangle:p_e,vangrt:v_e,varepsilon:m_e,varkappa:g_e,varnothing:y_e,varphi:b_e,varpi:k_e,varpropto:w_e,varr:C_e,vArr:T_e,varrho:S_e,varsigma:x_e,varsubsetneq:E_e,varsubsetneqq:M_e,varsupsetneq:A_e,varsupsetneqq:O_e,vartheta:N_e,vartriangleleft:D_e,vartriangleright:L_e,vBar:R_e,Vbar:I_e,vBarv:P_e,Vcy:B_e,vcy:F_e,vdash:q_e,vDash:H_e,Vdash:__e,VDash:z_e,Vdashl:V_e,veebar:U_e,vee:$_e,Vee:W_e,veeeq:j_e,vellip:G_e,verbar:K_e,Verbar:J_e,vert:Y_e,Vert:X_e,VerticalBar:Z_e,VerticalLine:Q_e,VerticalSeparator:eze,VerticalTilde:tze,VeryThinSpace:rze,Vfr:nze,vfr:ize,vltri:aze,vnsub:oze,vnsup:sze,Vopf:lze,vopf:uze,vprop:cze,vrtri:fze,Vscr:dze,vscr:hze,vsubnE:pze,vsubne:vze,vsupnE:mze,vsupne:gze,Vvdash:yze,vzigzag:bze,Wcirc:kze,wcirc:wze,wedbar:Cze,wedge:Tze,Wedge:Sze,wedgeq:xze,weierp:Eze,Wfr:Mze,wfr:Aze,Wopf:Oze,wopf:Nze,wp:Dze,wr:Lze,wreath:Rze,Wscr:Ize,wscr:Pze,xcap:Bze,xcirc:Fze,xcup:qze,xdtri:Hze,Xfr:_ze,xfr:zze,xharr:Vze,xhArr:Uze,Xi:$ze,xi:Wze,xlarr:jze,xlArr:Gze,xmap:Kze,xnis:Jze,xodot:Yze,Xopf:Xze,xopf:Zze,xoplus:Qze,xotime:eVe,xrarr:tVe,xrArr:rVe,Xscr:nVe,xscr:iVe,xsqcup:aVe,xuplus:oVe,xutri:sVe,xvee:lVe,xwedge:uVe,Yacute:cVe,yacute:fVe,YAcy:dVe,yacy:hVe,Ycirc:pVe,ycirc:vVe,Ycy:mVe,ycy:gVe,yen:yVe,Yfr:bVe,yfr:kVe,YIcy:wVe,yicy:CVe,Yopf:TVe,yopf:SVe,Yscr:xVe,yscr:EVe,YUcy:MVe,yucy:AVe,yuml:OVe,Yuml:NVe,Zacute:DVe,zacute:LVe,Zcaron:RVe,zcaron:IVe,Zcy:PVe,zcy:BVe,Zdot:FVe,zdot:qVe,zeetrf:HVe,ZeroWidthSpace:_Ve,Zeta:zVe,zeta:VVe,zfr:UVe,Zfr:$Ve,ZHcy:WVe,zhcy:jVe,zigrarr:GVe,zopf:KVe,Zopf:JVe,Zscr:YVe,zscr:XVe,zwj:ZVe,zwnj:QVe},eUe="Á",tUe="á",rUe="Â",nUe="â",iUe="´",aUe="Æ",oUe="æ",sUe="À",lUe="à",uUe="&",cUe="&",fUe="Å",dUe="å",hUe="Ã",pUe="ã",vUe="Ä",mUe="ä",gUe="¦",yUe="Ç",bUe="ç",kUe="¸",wUe="¢",CUe="©",TUe="©",SUe="¤",xUe="°",EUe="÷",MUe="É",AUe="é",OUe="Ê",NUe="ê",DUe="È",LUe="è",RUe="Ð",IUe="ð",PUe="Ë",BUe="ë",FUe="½",qUe="¼",HUe="¾",_Ue=">",zUe=">",VUe="Í",UUe="í",$Ue="Î",WUe="î",jUe="¡",GUe="Ì",KUe="ì",JUe="¿",YUe="Ï",XUe="ï",ZUe="«",QUe="<",e$e="<",t$e="¯",r$e="µ",n$e="·",i$e=" ",a$e="¬",o$e="Ñ",s$e="ñ",l$e="Ó",u$e="ó",c$e="Ô",f$e="ô",d$e="Ò",h$e="ò",p$e="ª",v$e="º",m$e="Ø",g$e="ø",y$e="Õ",b$e="õ",k$e="Ö",w$e="ö",C$e="¶",T$e="±",S$e="£",x$e='"',E$e='"',M$e="»",A$e="®",O$e="®",N$e="§",D$e="",L$e="¹",R$e="²",I$e="³",P$e="ß",B$e="Þ",F$e="þ",q$e="×",H$e="Ú",_$e="ú",z$e="Û",V$e="û",U$e="Ù",$$e="ù",W$e="¨",j$e="Ü",G$e="ü",K$e="Ý",J$e="ý",Y$e="¥",X$e="ÿ",Z$e={Aacute:eUe,aacute:tUe,Acirc:rUe,acirc:nUe,acute:iUe,AElig:aUe,aelig:oUe,Agrave:sUe,agrave:lUe,amp:uUe,AMP:cUe,Aring:fUe,aring:dUe,Atilde:hUe,atilde:pUe,Auml:vUe,auml:mUe,brvbar:gUe,Ccedil:yUe,ccedil:bUe,cedil:kUe,cent:wUe,copy:CUe,COPY:TUe,curren:SUe,deg:xUe,divide:EUe,Eacute:MUe,eacute:AUe,Ecirc:OUe,ecirc:NUe,Egrave:DUe,egrave:LUe,ETH:RUe,eth:IUe,Euml:PUe,euml:BUe,frac12:FUe,frac14:qUe,frac34:HUe,gt:_Ue,GT:zUe,Iacute:VUe,iacute:UUe,Icirc:$Ue,icirc:WUe,iexcl:jUe,Igrave:GUe,igrave:KUe,iquest:JUe,Iuml:YUe,iuml:XUe,laquo:ZUe,lt:QUe,LT:e$e,macr:t$e,micro:r$e,middot:n$e,nbsp:i$e,not:a$e,Ntilde:o$e,ntilde:s$e,Oacute:l$e,oacute:u$e,Ocirc:c$e,ocirc:f$e,Ograve:d$e,ograve:h$e,ordf:p$e,ordm:v$e,Oslash:m$e,oslash:g$e,Otilde:y$e,otilde:b$e,Ouml:k$e,ouml:w$e,para:C$e,plusmn:T$e,pound:S$e,quot:x$e,QUOT:E$e,raquo:M$e,reg:A$e,REG:O$e,sect:N$e,shy:D$e,sup1:L$e,sup2:R$e,sup3:I$e,szlig:P$e,THORN:B$e,thorn:F$e,times:q$e,Uacute:H$e,uacute:_$e,Ucirc:z$e,ucirc:V$e,Ugrave:U$e,ugrave:$$e,uml:W$e,Uuml:j$e,uuml:G$e,Yacute:K$e,yacute:J$e,yen:Y$e,yuml:X$e},Q$e="&",e2e="'",t2e=">",r2e="<",n2e='"',iw={amp:Q$e,apos:e2e,gt:t2e,lt:r2e,quot:n2e},Uh={},i2e={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},a2e=Uo&&Uo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Uh,"__esModule",{value:!0});var Zm=a2e(i2e),o2e=String.fromCodePoint||function(r){var e="";return r>65535&&(r-=65536,e+=String.fromCharCode(r>>>10&1023|55296),r=56320|r&1023),e+=String.fromCharCode(r),e};function s2e(r){return r>=55296&&r<=57343||r>1114111?"�":(r in Zm.default&&(r=Zm.default[r]),o2e(r))}Uh.default=s2e;var Yu=Uo&&Uo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hi,"__esModule",{value:!0});Hi.decodeHTML=Hi.decodeHTMLStrict=Hi.decodeXML=void 0;var _d=Yu(nw),l2e=Yu(Z$e),u2e=Yu(iw),Qm=Yu(Uh),c2e=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;Hi.decodeXML=aw(u2e.default);Hi.decodeHTMLStrict=aw(_d.default);function aw(r){var e=ow(r);return function(t){return String(t).replace(c2e,e)}}var eg=function(r,e){return r<e?1:-1};Hi.decodeHTML=(function(){for(var r=Object.keys(l2e.default).sort(eg),e=Object.keys(_d.default).sort(eg),t=0,n=0;t<e.length;t++)r[n]===e[t]?(e[t]+=";?",n++):e[t]+=";";var i=new RegExp("&(?:"+e.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),a=ow(_d.default);function o(s){return s.substr(-1)!==";"&&(s+=";"),a(s)}return function(s){return String(s).replace(i,o)}})();function ow(r){return function(t){if(t.charAt(1)==="#"){var n=t.charAt(2);return n==="X"||n==="x"?Qm.default(parseInt(t.substr(3),16)):Qm.default(parseInt(t.substr(2),10))}return r[t.slice(1,-1)]||t}}var Sn={},sw=Uo&&Uo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.escapeUTF8=Sn.escape=Sn.encodeNonAsciiHTML=Sn.encodeHTML=Sn.encodeXML=void 0;var f2e=sw(iw),lw=cw(f2e.default),uw=fw(lw);Sn.encodeXML=pw(lw);var d2e=sw(nw),$h=cw(d2e.default),h2e=fw($h);Sn.encodeHTML=v2e($h,h2e);Sn.encodeNonAsciiHTML=pw($h);function cw(r){return Object.keys(r).sort().reduce(function(e,t){return e[r[t]]="&"+t+";",e},{})}function fw(r){for(var e=[],t=[],n=0,i=Object.keys(r);n<i.length;n++){var a=i[n];a.length===1?e.push("\\"+a):t.push(a)}e.sort();for(var o=0;o<e.length-1;o++){for(var s=o;s<e.length-1&&e[s].charCodeAt(1)+1===e[s+1].charCodeAt(1);)s+=1;var l=1+s-o;l<3||e.splice(o,l,e[o]+"-"+e[s])}return t.unshift("["+e.join("")+"]"),new RegExp(t.join("|"),"g")}var dw=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,p2e=String.prototype.codePointAt!=null?function(r){return r.codePointAt(0)}:function(r){return(r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536};function Xu(r){return"&#x"+(r.length>1?p2e(r):r.charCodeAt(0)).toString(16).toUpperCase()+";"}function v2e(r,e){return function(t){return t.replace(e,function(n){return r[n]}).replace(dw,Xu)}}var hw=new RegExp(uw.source+"|"+dw.source,"g");function m2e(r){return r.replace(hw,Xu)}Sn.escape=m2e;function g2e(r){return r.replace(uw,Xu)}Sn.escapeUTF8=g2e;function pw(r){return function(e){return e.replace(hw,function(t){return r[t]||Xu(t)})}}(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.decodeXMLStrict=r.decodeHTML5Strict=r.decodeHTML4Strict=r.decodeHTML5=r.decodeHTML4=r.decodeHTMLStrict=r.decodeHTML=r.decodeXML=r.encodeHTML5=r.encodeHTML4=r.escapeUTF8=r.escape=r.encodeNonAsciiHTML=r.encodeHTML=r.encodeXML=r.encode=r.decodeStrict=r.decode=void 0;var e=Hi,t=Sn;function n(l,f){return(!f||f<=0?e.decodeXML:e.decodeHTML)(l)}r.decode=n;function i(l,f){return(!f||f<=0?e.decodeXML:e.decodeHTMLStrict)(l)}r.decodeStrict=i;function a(l,f){return(!f||f<=0?t.encodeXML:t.encodeHTML)(l)}r.encode=a;var o=Sn;Object.defineProperty(r,"encodeXML",{enumerable:!0,get:function(){return o.encodeXML}}),Object.defineProperty(r,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(r,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(r,"escape",{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(r,"escapeUTF8",{enumerable:!0,get:function(){return o.escapeUTF8}}),Object.defineProperty(r,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(r,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var s=Hi;Object.defineProperty(r,"decodeXML",{enumerable:!0,get:function(){return s.decodeXML}}),Object.defineProperty(r,"decodeHTML",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(r,"decodeHTMLStrict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(r,"decodeHTML4",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(r,"decodeHTML5",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(r,"decodeHTML4Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(r,"decodeHTML5Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(r,"decodeXMLStrict",{enumerable:!0,get:function(){return s.decodeXML}})})(Vh);var vw="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",y2e=92,b2e=/[\\&]/,Wh="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",k2e=new RegExp("\\\\"+Wh+"|"+vw,"gi"),w2e='[&<>"]',tg=new RegExp(w2e,"g"),C2e=function(r){return r.charCodeAt(0)===y2e?r.charAt(1):Vh.decodeHTML(r)};function Es(r){return b2e.test(r)?r.replace(k2e,C2e):r}function Vl(r){try{return Bae(r)}catch{return r}}function T2e(r){switch(r){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return r}}function Ao(r){return tg.test(r)?r.replace(tg,T2e):r}function zd(r,e){for(var t=[],n=0;n<e;n++)t.push(r);return t.join("")}function rg(r){return r?!/[^ \t]+/.test(r):!0}var S2e=(function(){function r(e){this.current=e,this.root=e,this.entering=!0}return r.prototype.next=function(){var e=this.current,t=this.entering;if(e===null)return null;var n=jh(e);return t&&n?e.firstChild?(this.current=e.firstChild,this.entering=!0):this.entering=!1:e===this.root?this.current=null:e.next===null?(this.current=e.parent,this.entering=!1):(this.current=e.next,this.entering=!0),{entering:t,node:e}},r.prototype.resumeAt=function(e,t){this.current=e,this.entering=t===!0},r})();function jh(r){switch(r.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}var x2e=1,Zu={};function E2e(r){return Zu[r]}function Vd(r){delete Zu[r]}function M2e(){Zu={}}var js=(function(){function r(e,t){this.parent=null,this.prev=null,this.next=null,this.firstChild=null,this.lastChild=null,this.literal=null,e==="document"?this.id=-1:this.id=x2e++,this.type=e,this.sourcepos=t,Zu[this.id]=this}return r.prototype.isContainer=function(){return jh(this)},r.prototype.unlink=function(){this.prev?this.prev.next=this.next:this.parent&&(this.parent.firstChild=this.next),this.next?this.next.prev=this.prev:this.parent&&(this.parent.lastChild=this.prev),this.parent=null,this.next=null,this.prev=null},r.prototype.replaceWith=function(e){this.insertBefore(e),this.unlink()},r.prototype.insertAfter=function(e){e.unlink(),e.next=this.next,e.next&&(e.next.prev=e),e.prev=this,this.next=e,this.parent&&(e.parent=this.parent,e.next||(e.parent.lastChild=e))},r.prototype.insertBefore=function(e){e.unlink(),e.prev=this.prev,e.prev&&(e.prev.next=e),e.next=this,this.prev=e,e.parent=this.parent,e.prev||(e.parent.firstChild=e)},r.prototype.appendChild=function(e){e.unlink(),e.parent=this,this.lastChild?(this.lastChild.next=e,e.prev=this.lastChild,this.lastChild=e):(this.firstChild=e,this.lastChild=e)},r.prototype.prependChild=function(e){e.unlink(),e.parent=this,this.firstChild?(this.firstChild.prev=e,e.next=this.firstChild,this.firstChild=e):(this.firstChild=e,this.lastChild=e)},r.prototype.walker=function(){return new S2e(this)},r})(),Vi=(function(r){Vn(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.open=!0,i.lineOffsets=null,i.stringContent=null,i.lastLineBlank=!1,i.lastLineChecked=!1,i.type=t,i}return e})(js),A2e=(function(r){Vn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.listData=null,t}return e})(Vi),O2e=(function(r){Vn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.level=0,t.headingType="atx",t}return e})(Vi),N2e=(function(r){Vn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.isFenced=!1,t.fenceChar=null,t.fenceLength=0,t.fenceOffset=-1,t.info=null,t.infoPadding=0,t}return e})(Vi),D2e=(function(r){Vn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.columns=[],t}return e})(Vi),L2e=(function(r){Vn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.startIdx=0,t.endIdx=0,t.paddingLeft=0,t.paddingRight=0,t.ignored=!1,t}return e})(Vi),R2e=(function(r){Vn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.title="",t.dest="",t.label="",t}return e})(Vi),I2e=(function(r){Vn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.syntaxLength=0,t.offset=-1,t.info="",t}return e})(Vi),P2e=(function(r){Vn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.htmlBlockType=-1,t}return e})(Vi),B2e=(function(r){Vn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.destination=null,t.title=null,t.extendedAutolink=!1,t}return e})(js),F2e=(function(r){Vn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.tickCount=0,t}return e})(js),q2e=(function(r){Vn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.info="",t}return e})(js);function fr(r,e){switch(r){case"heading":return new O2e(r,e);case"list":case"item":return new A2e(r,e);case"link":case"image":return new B2e(r,e);case"codeBlock":return new N2e(r,e);case"htmlBlock":return new P2e(r,e);case"table":return new D2e(r,e);case"tableCell":return new L2e(r,e);case"document":case"paragraph":case"blockQuote":case"thematicBreak":case"tableRow":case"tableBody":case"tableHead":case"frontMatter":return new Vi(r,e);case"code":return new F2e(r,e);case"refDef":return new R2e(r,e);case"customBlock":return new I2e(r,e);case"customInline":return new q2e(r,e);default:return new js(r,e)}}function mw(r){return r.type==="codeBlock"}function H2e(r){return r.type==="htmlBlock"}function _2e(r){return r.type==="heading"}function ng(r){return r.type==="list"}function z2e(r){return r.type==="table"}function Co(r){return r.type==="refDef"}function gw(r){return r.type==="customBlock"}function V2e(r){return r.type==="customInline"}function wr(r,e){var t=fr("text",e);return t.literal=r,t}var yw="[A-Za-z][A-Za-z0-9-]*",U2e="[a-zA-Z_:][a-zA-Z0-9:._-]*",$2e="[^\"'=<>`\\x00-\\x20]+",W2e="'[^']*'",j2e='"[^"]*"',G2e="(?:"+$2e+"|"+W2e+"|"+j2e+")",K2e="(?:\\s*=\\s*"+G2e+")",J2e="(?:\\s+"+U2e+K2e+"?)",bw="<"+yw+J2e+"*\\s*/?>",kw="</"+yw+"\\s*[>]",Y2e="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",X2e="[<][?].*?[?][>]",Z2e="<![A-Z]+\\s+[^>]*>",Q2e="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",eWe="(?:"+bw+"|"+kw+"|"+Y2e+"|"+X2e+"|"+Z2e+"|"+Q2e+")",tWe=new RegExp("^"+eWe,"i");var Ud;if(String.fromCodePoint)Ud=function(r){try{return String.fromCodePoint(r)}catch(e){if(e instanceof RangeError)return"�";throw e}};else{var rWe=String.fromCharCode,nWe=Math.floor;Ud=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=16384,n=[],i,a,o=-1,s=r.length;if(!s)return"";for(var l="";++o<s;){var f=Number(r[o]);if(!isFinite(f)||f<0||f>1114111||nWe(f)!==f)return"�";f<=65535?n.push(f):(f-=65536,i=(f>>10)+55296,a=f%1024+56320,n.push(i,a)),(o+1===s||n.length>t)&&(l+=rWe.apply(void 0,n),n.length=0)}return l}}var Yf=Ud,iWe="(?:[w-]+.)*[A-Za-z0-9-]+.[A-Za-z0-9-]+",aWe="[^<\\s]*[^<?!.,:*_?~\\s]",oWe="[\\w.+-]+@(?:[\\w-]+\\.)+[\\w-]+";function sWe(r){var e=/\)+$/.exec(r);if(e){for(var t=0,n=0,i=r;n<i.length;n++){var a=i[n];a==="("?t<0?t=1:t+=1:a===")"&&(t-=1)}if(t<0){var o=Math.min(-t,e[0].length);return r.substring(0,r.length-o)}}return r}function lWe(r){return r.replace(/&[A-Za-z0-9]+;$/,"")}function uWe(r){for(var e=new RegExp(oWe,"g"),t=[],n;n=e.exec(r);){var i=n[0];/[_-]+$/.test(i)||t.push({text:i,range:[n.index,n.index+i.length-1],url:"mailto:"+i})}return t}function cWe(r){for(var e=new RegExp("(www|https?://)."+iWe+aWe,"g"),t=[],n;n=e.exec(r);){var i=lWe(sWe(n[0])),a=n[1]==="www"?"http://":"";t.push({text:i,range:[n.index,n.index+i.length-1],url:""+a+i})}return t}function fWe(r){return Hd(Hd([],cWe(r)),uWe(r)).sort(function(e,t){return e.range[0]-t.range[0]})}function dWe(r,e){typeof e=="boolean"&&(e=fWe);for(var t,n=function(){var i=t.entering,a=t.node;if(i&&a.type==="text"&&a.parent.type!=="link"){var o=a.literal,s=e(o);if(!s||!s.length)return"continue";for(var l=0,f=a.sourcepos[0],p=f[0],b=f[1],T=function(Te,xe){return[[p,b+Te],[p,b+xe]]},x=[],E=0,B=s;E<B.length;E++){var F=B[E],_=F.range,X=F.url,ee=F.text;_[0]>l&&x.push(wr(o.substring(l,_[0]),T(l,_[0]-1)));var se=fr("link",T.apply(void 0,_));se.appendChild(wr(ee,T.apply(void 0,_))),se.destination=X,se.extendedAutolink=!0,x.push(se),l=_[1]+1}l<o.length&&x.push(wr(o.substring(l),T(l,o.length-1)));for(var de=0,ae=x;de<ae.length;de++){var le=ae[de];a.insertBefore(le)}a.unlink()}};t=r.next();)n()}function Mu(r){return r[r.length-1]}function ig(r){return r.slice(1,r.length-1).trim().replace(/[ \t\r\n]+/," ").toLowerCase().toUpperCase()}function Ul(r,e){Object.keys(r).forEach(function(t){e(t,r[t])})}function hWe(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var n=qr({},r);return e.forEach(function(i){delete n[i]}),n}function To(r){return!Object.keys(r).length}function pWe(r){Object.keys(r).forEach(function(e){delete r[e]})}var $d=10,Xf=42,$l=95,vWe=96,ag=91,mWe=93,Wl=126,og=60,gWe=33,sg=92,yWe=38,lg=40,Zf=41,bWe=58,Ra=39,Ia=34,Pa=36,Qf="\\\\"+Wh,ug=new RegExp(/[!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/),kWe=new RegExp('^(?:"('+Qf+'|[^"\\x00])*"|'+("'("+Qf+"|[^'\\x00])*'")+"|"+("\\(("+Qf+"|[^()\\x00])*\\))")),wWe=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,cg=new RegExp("^"+Wh),CWe=new RegExp("^"+vw,"i"),TWe=/`+/,SWe=/^`+/,xWe=/\.\.\./g,EWe=/--+/g,MWe=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,AWe=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,OWe=/^ *(?:\n *)?/,ed=/^[ \t\n\x0b\x0c\x0d]/,fg=/^\s/,NWe=/ *$/,DWe=/^ */,dg=/^ *(?:\n|$)/,LWe=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,RWe=/^[^\n`\[\]\\!<&*_'"~$]+/m,IWe=(function(){function r(e){this.subject="",this.delimiters=null,this.brackets=null,this.pos=0,this.lineStartNum=0,this.lineIdx=0,this.lineOffsets=[0],this.linePosOffset=0,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.options=e}return r.prototype.sourcepos=function(e,t){var n=this.linePosOffset+this.lineOffsets[this.lineIdx],i=this.lineStartNum+this.lineIdx,a=[i,e+n];return typeof t=="number"?[a,[i,t+n]]:a},r.prototype.nextLine=function(){this.lineIdx+=1,this.linePosOffset=-this.pos},r.prototype.match=function(e){var t=e.exec(this.subject.slice(this.pos));return t===null?null:(this.pos+=t.index+t[0].length,t[0])},r.prototype.peek=function(){return this.pos<this.subject.length?this.subject.charCodeAt(this.pos):-1},r.prototype.spnl=function(){return this.match(OWe),!0},r.prototype.parseBackticks=function(e){var t=this.pos+1,n=this.match(SWe);if(n===null)return!1;for(var i=this.pos,a;(a=this.match(TWe))!==null;)if(a===n){var o=this.subject.slice(i,this.pos-n.length),s=this.sourcepos(t,this.pos),l=o.split(`
|
|
19
|
-
`);if(l.length>1){var f=Mu(l);this.lineIdx+=l.length-1,this.linePosOffset=-(this.pos-f.length-n.length),s[1]=this.sourcepos(this.pos),o=l.join(" ")}var p=fr("code",s);return o.length>0&&o.match(/[^ ]/)!==null&&o[0]==" "&&o[o.length-1]==" "?p.literal=o.slice(1,o.length-1):p.literal=o,p.tickCount=n.length,e.appendChild(p),!0}return this.pos=i,e.appendChild(wr(n,this.sourcepos(t,this.pos-1))),!0},r.prototype.parseBackslash=function(e){var t=this.subject,n;this.pos+=1;var i=this.pos;return this.peek()===$d?(this.pos+=1,n=fr("linebreak",this.sourcepos(this.pos-1,this.pos)),e.appendChild(n),this.nextLine()):cg.test(t.charAt(this.pos))?(e.appendChild(wr(t.charAt(this.pos),this.sourcepos(i,this.pos))),this.pos+=1):e.appendChild(wr("\\",this.sourcepos(i,i))),!0},r.prototype.parseAutolink=function(e){var t,n,i,a=this.pos+1;return(t=this.match(MWe))?(n=t.slice(1,t.length-1),i=fr("link",this.sourcepos(a,this.pos)),i.destination=Vl("mailto:"+n),i.title="",i.appendChild(wr(n,this.sourcepos(a+1,this.pos-1))),e.appendChild(i),!0):(t=this.match(AWe))?(n=t.slice(1,t.length-1),i=fr("link",this.sourcepos(a,this.pos)),i.destination=Vl(n),i.title="",i.appendChild(wr(n,this.sourcepos(a+1,this.pos-1))),e.appendChild(i),!0):!1},r.prototype.parseHtmlTag=function(e){var t=this.pos+1,n=this.match(tWe);if(n===null)return!1;var i=fr("htmlInline",this.sourcepos(t,this.pos));return i.literal=n,e.appendChild(i),!0},r.prototype.scanDelims=function(e){var t=0,n=this.pos;if(e===Ra||e===Ia)t++,this.pos++;else for(;this.peek()===e;)t++,this.pos++;if(t===0||t<2&&(e===Wl||e===Pa))return this.pos=n,null;var i=n===0?`
|
|
20
|
-
`:this.subject.charAt(n-1),a=this.peek(),o;a===-1?o=`
|
|
21
|
-
`:o=Yf(a);var s=fg.test(o),l=ug.test(o),f=fg.test(i),p=ug.test(i),b=!s&&(!l||f||p),T=!f&&(!p||s||l),x,E;return e===$l?(x=b&&(!T||p),E=T&&(!b||l)):e===Ra||e===Ia?(x=b&&!T,E=T):e===Pa?(x=!s,E=!f):(x=b,E=T),this.pos=n,{numdelims:t,canOpen:x,canClose:E}},r.prototype.handleDelim=function(e,t){var n=this.scanDelims(e);if(!n)return!1;var i=n.numdelims,a=this.pos+1,o;this.pos+=i,e===Ra?o="’":e===Ia?o="“":o=this.subject.slice(a-1,this.pos);var s=wr(o,this.sourcepos(a,this.pos));return t.appendChild(s),(n.canOpen||n.canClose)&&(this.options.smart||e!==Ra&&e!==Ia)&&(this.delimiters={cc:e,numdelims:i,origdelims:i,node:s,previous:this.delimiters,next:null,canOpen:n.canOpen,canClose:n.canClose},this.delimiters.previous&&(this.delimiters.previous.next=this.delimiters)),!0},r.prototype.removeDelimiter=function(e){e.previous!==null&&(e.previous.next=e.next),e.next===null?this.delimiters=e.previous:e.next.previous=e.previous},r.prototype.removeDelimitersBetween=function(e,t){e.next!==t&&(e.next=t,t.previous=e)},r.prototype.processEmphasis=function(e){var t,n,i,a,o,s,l,f=!1,p=(t={},t[$l]=[e,e,e],t[Xf]=[e,e,e],t[Ra]=[e],t[Ia]=[e],t[Wl]=[e],t[Pa]=[e],t);for(i=this.delimiters;i!==null&&i.previous!==e;)i=i.previous;for(;i!==null;){var b=i.cc,T=b===$l||b===Xf;if(!i.canClose)i=i.next;else{for(n=i.previous,l=!1;n!==null&&n!==e&&n!==p[b][T?i.origdelims%3:0];){if(f=T&&(i.canOpen||n.canClose)&&i.origdelims%3!==0&&(n.origdelims+i.origdelims)%3===0,n.cc===i.cc&&n.canOpen&&!f){l=!0;break}n=n.previous}if(a=i,T||b===Wl||b===Pa){if(!l)i=i.next;else if(n){var x=i.numdelims>=2&&n.numdelims>=2?2:1,E=T?0:1;o=n.node,s=i.node;var B=T?x===1?"emph":"strong":"strike";b===Pa&&(B="customInline");var F=fr(B),_=o.sourcepos[1],X=s.sourcepos[0];F.sourcepos=[[_[0],_[1]-x+1],[X[0],X[1]+x-1]],o.sourcepos[1][1]-=x,s.sourcepos[0][1]+=x,o.literal=o.literal.slice(x),s.literal=s.literal.slice(x),n.numdelims-=x,i.numdelims-=x;for(var ee=o.next,se=void 0;ee&&ee!==s;)se=ee.next,ee.unlink(),F.appendChild(ee),ee=se;if(b===Pa){var de=F.firstChild,ae=de.literal||"",le=ae.split(/\s/)[0];F.info=le,ae.length<=le.length?de.unlink():(de.sourcepos[0][1]+=le.length,de.literal=ae.replace(le+" ",""))}if(o.insertAfter(F),this.removeDelimitersBetween(n,i),n.numdelims<=E&&(n.numdelims===0&&o.unlink(),this.removeDelimiter(n)),i.numdelims<=E){i.numdelims===0&&s.unlink();var Te=i.next;this.removeDelimiter(i),i=Te}}}else b===Ra?(i.node.literal="’",l&&(n.node.literal="‘"),i=i.next):b===Ia&&(i.node.literal="”",l&&(n.node.literal="“"),i=i.next);l||(p[b][T?a.origdelims%3:0]=a.previous,a.canOpen||this.removeDelimiter(a))}}for(;this.delimiters!==null&&this.delimiters!==e;)this.removeDelimiter(this.delimiters)},r.prototype.parseLinkTitle=function(){var e=this.match(kWe);return e===null?null:Es(e.substr(1,e.length-2))},r.prototype.parseLinkDestination=function(){var e=this.match(wWe);if(e===null){if(this.peek()===og)return null;for(var t=this.pos,n=0,i=void 0;(i=this.peek())!==-1;)if(i===sg&&cg.test(this.subject.charAt(this.pos+1)))this.pos+=1,this.peek()!==-1&&(this.pos+=1);else if(i===lg)this.pos+=1,n+=1;else if(i===Zf){if(n<1)break;this.pos+=1,n-=1}else{if(ed.exec(Yf(i))!==null)break;this.pos+=1}return this.pos===t&&i!==Zf||n!==0?null:(e=this.subject.substr(t,this.pos-t),Vl(Es(e)))}return Vl(Es(e.substr(1,e.length-2)))},r.prototype.parseLinkLabel=function(){var e=this.match(LWe);return e===null||e.length>1001?0:e.length},r.prototype.parseOpenBracket=function(e){var t=this.pos;this.pos+=1;var n=wr("[",this.sourcepos(this.pos,this.pos));return e.appendChild(n),this.addBracket(n,t,!1),!0},r.prototype.parseBang=function(e){var t=this.pos;if(this.pos+=1,this.peek()===ag){this.pos+=1;var n=wr("![",this.sourcepos(this.pos-1,this.pos));e.appendChild(n),this.addBracket(n,t+1,!0)}else{var n=wr("!",this.sourcepos(this.pos,this.pos));e.appendChild(n)}return!0},r.prototype.parseCloseBracket=function(e){var t=null,n=null,i=!1;this.pos+=1;var a=this.pos,o=this.brackets;if(o===null)return e.appendChild(wr("]",this.sourcepos(a,a))),!0;if(!o.active)return e.appendChild(wr("]",this.sourcepos(a,a))),this.removeBracket(),!0;var s=o.image,l=this.pos;this.peek()===lg&&(this.pos++,this.spnl()&&(t=this.parseLinkDestination())!==null&&this.spnl()&&(ed.test(this.subject.charAt(this.pos-1))&&(n=this.parseLinkTitle())||!0)&&this.spnl()&&this.peek()===Zf?(this.pos+=1,i=!0):this.pos=l);var f="";if(!i){var p=this.pos,b=this.parseLinkLabel();if(b>2?f=this.subject.slice(p,p+b):o.bracketAfter||(f=this.subject.slice(o.index,a)),b===0&&(this.pos=l),f){f=ig(f);var T=this.refMap[f];T&&(t=T.destination,n=T.title,i=!0)}}if(i){var x=fr(s?"image":"link");x.destination=t,x.title=n||"",x.sourcepos=[o.startpos,this.sourcepos(this.pos)];for(var E=o.node.next,B=void 0;E;)B=E.next,E.unlink(),x.appendChild(E),E=B;if(e.appendChild(x),this.processEmphasis(o.previousDelimiter),this.removeBracket(),o.node.unlink(),!s)for(o=this.brackets;o!==null;)o.image||(o.active=!1),o=o.previous;return this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:f}),!0}return this.removeBracket(),this.pos=a,e.appendChild(wr("]",this.sourcepos(a,a))),this.options.referenceDefinition&&(this.refLinkCandidateMap[e.id]={node:e,refLabel:f}),!0},r.prototype.addBracket=function(e,t,n){this.brackets!==null&&(this.brackets.bracketAfter=!0),this.brackets={node:e,startpos:this.sourcepos(t+(n?0:1)),previous:this.brackets,previousDelimiter:this.delimiters,index:t,image:n,active:!0}},r.prototype.removeBracket=function(){this.brackets&&(this.brackets=this.brackets.previous)},r.prototype.parseEntity=function(e){var t,n=this.pos+1;return(t=this.match(CWe))?(e.appendChild(wr(Vh.decodeHTML(t),this.sourcepos(n,this.pos))),!0):!1},r.prototype.parseString=function(e){var t,n=this.pos+1;if(t=this.match(RWe)){if(this.options.smart){var i=t.replace(xWe,"…").replace(EWe,function(o){var s=0,l=0;return o.length%3===0?l=o.length/3:o.length%2===0?s=o.length/2:o.length%3===2?(s=1,l=(o.length-2)/3):(s=2,l=(o.length-4)/3),zd("—",l)+zd("–",s)});e.appendChild(wr(i,this.sourcepos(n,this.pos)))}else{var a=wr(t,this.sourcepos(n,this.pos));e.appendChild(a)}return!0}return!1},r.prototype.parseNewline=function(e){this.pos+=1;var t=e.lastChild;if(t&&t.type==="text"&&t.literal[t.literal.length-1]===" "){var n=t.literal[t.literal.length-2]===" ",i=t.literal.length;t.literal=t.literal.replace(NWe,"");var a=i-t.literal.length;t.sourcepos[1][1]-=a,e.appendChild(fr(n?"linebreak":"softbreak",this.sourcepos(this.pos-a,this.pos)))}else e.appendChild(fr("softbreak",this.sourcepos(this.pos,this.pos)));return this.nextLine(),this.match(DWe),!0},r.prototype.parseReference=function(e,t){if(!this.options.referenceDefinition)return 0;this.subject=e.stringContent,this.pos=0;var n=null,i=this.pos,a=this.parseLinkLabel();if(a===0)return 0;var o=this.subject.substr(0,a);if(this.peek()===bWe)this.pos++;else return this.pos=i,0;this.spnl();var s=this.parseLinkDestination();if(s===null)return this.pos=i,0;var l=this.pos;this.spnl(),this.pos!==l&&(n=this.parseLinkTitle()),n===null&&(n="",this.pos=l);var f=!0;if(this.match(dg)===null&&(n===""?f=!1:(n="",this.pos=l,f=this.match(dg)!==null)),!f)return this.pos=i,0;var p=ig(o);if(p==="")return this.pos=i,0;var b=this.getReferenceDefSourcepos(e);e.sourcepos[0][0]=b[1][0]+1;var T=fr("refDef",b);return T.title=n,T.dest=s,T.label=p,e.insertBefore(T),t[p]?this.refDefCandidateMap[T.id]=T:t[p]=Gd(T),this.pos-i},r.prototype.mergeTextNodes=function(e){for(var t,n=[];t=e.next();){var i=t.entering,a=t.node;if(i&&a.type==="text")n.push(a);else if(n.length===1)n=[];else if(n.length>1){var o=n[0],s=n[n.length-1];o.sourcepos&&s.sourcepos&&(o.sourcepos[1]=s.sourcepos[1]),o.next=s.next,o.next&&(o.next.prev=o);for(var l=1;l<n.length;l+=1)o.literal+=n[l].literal,n[l].unlink();n=[]}}},r.prototype.getReferenceDefSourcepos=function(e){for(var t=e.stringContent.split(/\n|\r\n/),n=!1,i=0,a={line:0,ch:0},o=0;o<t.length;o+=1){var s=t[o];if(ed.test(s))break;if(/\:/.test(s)&&i===0){if(n)break;var l=s.indexOf(":")===s.length-1?o+1:o;a={line:l,ch:t[l].length},n=!0}var f=s.match(/'|"/g);if(f&&(i+=f.length),i===2){a={line:o,ch:s.length};break}}return[[e.sourcepos[0][0],e.sourcepos[0][1]],[e.sourcepos[0][0]+a.line,a.ch]]},r.prototype.parseInline=function(e){var t,n=!1,i=this.peek();if(i===-1)return!1;switch(i){case $d:n=this.parseNewline(e);break;case sg:n=this.parseBackslash(e);break;case vWe:n=this.parseBackticks(e);break;case Xf:case $l:case Wl:case Pa:n=this.handleDelim(i,e);break;case Ra:case Ia:n=!!(!((t=this.options)===null||t===void 0)&&t.smart)&&this.handleDelim(i,e);break;case ag:n=this.parseOpenBracket(e);break;case gWe:n=this.parseBang(e);break;case mWe:n=this.parseCloseBracket(e);break;case og:n=this.parseAutolink(e)||this.parseHtmlTag(e);break;case yWe:e.disabledEntityParse||(n=this.parseEntity(e));break;default:n=this.parseString(e);break}return n||(this.pos+=1,e.appendChild(wr(Yf(i),this.sourcepos(this.pos,this.pos+1)))),!0},r.prototype.parse=function(e){for(this.subject=e.stringContent.trim(),this.pos=0,this.delimiters=null,this.brackets=null,this.lineOffsets=e.lineOffsets||[0],this.lineIdx=0,this.linePosOffset=0,this.lineStartNum=e.sourcepos[0][0],_2e(e)&&(this.lineOffsets[0]+=e.level+1);this.parseInline(e););e.stringContent=null,this.processEmphasis(null),this.mergeTextNodes(e.walker());var t=this.options,n=t.extendedAutolinks,i=t.customParser;if(n&&dWe(e.walker(),n),i&&e.firstChild)for(var a,o=e.firstChild.walker();a=o.next();){var s=a.node,l=a.entering;i[s.type]&&i[s.type](s,{entering:l,options:this.options})}},r})(),PWe=/^\[([ \txX])\][ \t]+/;function BWe(r,e){if(e.firstChild&&e.firstChild.type==="paragraph"){var t=e.firstChild,n=t.stringContent.match(PWe);if(n){var i=n[0].length;t.stringContent=t.stringContent.substring(i-1),t.sourcepos[0][1]+=i,t.lineOffsets[0]+=i,e.listData.task=!0,e.listData.checked=/[xX]/.test(n[1])}}}var FWe={continue:function(){return 0},finalize:function(){},canContain:function(r){return r==="tableHead"||r==="tableBody"},acceptsLines:!1},qWe={continue:function(){return 0},finalize:function(){},canContain:function(r){return r==="tableRow"},acceptsLines:!1},HWe={continue:function(){return 1},finalize:function(){},canContain:function(r){return r==="tableRow"||r==="tableDelimRow"},acceptsLines:!1},_We={continue:function(){return 1},finalize:function(){},canContain:function(r){return r==="tableDelimCell"},acceptsLines:!1},zWe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},VWe={continue:function(){return 1},finalize:function(){},canContain:function(r){return r==="tableCell"},acceptsLines:!1},UWe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},Au=4,ww=9,Cw=62,$We=60,Tw=32,Sw=91,xw=/[^ \t\f\v\r\n]/,WWe=/^(?:`{3,}|~{3,})(?= *$)/;function hg(r){for(var e=r;e;){if(e.lastLineBlank)return!0;var t=e.type;if(!e.lastLineChecked&&(t==="list"||t==="item"))e.lastLineChecked=!0,e=e.lastChild;else{e.lastLineChecked=!0;break}}return!1}function xn(r,e){return e<r.length?r.charCodeAt(e):-1}function Ew(r){return!xw.test(r)}function $o(r){return r===Tw||r===ww}var jWe=/^\$\$$/,GWe={continue:function(r,e){var t=r.currentLine,n=t.match(jWe);if(n)return r.lastLineLength=n[0].length,r.finalize(e,r.lineNumber),2;for(var i=e.offset;i>0&&$o(xn(t,r.offset));)r.advanceOffset(1,!0),i--;return 0},finalize:function(r,e){if(e.stringContent!==null){var t=e.stringContent,n=t.indexOf(`
|
|
22
|
-
`),i=t.slice(0,n),a=t.slice(n+1),o=i.match(/^(\s*)(.*)/);e.info=Es(o[2].trim()),e.literal=a,e.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},Mw={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!0},KWe={continue:function(){return 0},finalize:function(){},canContain:function(r){return r!=="item"},acceptsLines:!1},JWe={continue:function(){return 0},finalize:function(r,e){for(var t=e.firstChild;t;){if(hg(t)&&t.next){e.listData.tight=!1;break}for(var n=t.firstChild;n;){if(hg(n)&&(t.next||n.next)){e.listData.tight=!1;break}n=n.next}t=t.next}},canContain:function(r){return r==="item"},acceptsLines:!1},YWe={continue:function(r){var e=r.currentLine;if(!r.indented&&xn(e,r.nextNonspace)===Cw)r.advanceNextNonspace(),r.advanceOffset(1,!1),$o(xn(e,r.offset))&&r.advanceOffset(1,!0);else return 1;return 0},finalize:function(){},canContain:function(r){return r!=="item"},acceptsLines:!1},XWe={continue:function(r,e){if(r.blank){if(e.firstChild===null)return 1;r.advanceNextNonspace()}else if(r.indent>=e.listData.markerOffset+e.listData.padding)r.advanceOffset(e.listData.markerOffset+e.listData.padding,!0);else return 1;return 0},finalize:BWe,canContain:function(r){return r!=="item"},acceptsLines:!1},ZWe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},QWe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},e3e={continue:function(r,e){var t=r.currentLine,n=r.indent;if(e.isFenced){var i=n<=3&&t.charAt(r.nextNonspace)===e.fenceChar&&t.slice(r.nextNonspace).match(WWe);if(i&&i[0].length>=e.fenceLength)return r.lastLineLength=r.offset+n+i[0].length,r.finalize(e,r.lineNumber),2;for(var a=e.fenceOffset;a>0&&$o(xn(t,r.offset));)r.advanceOffset(1,!0),a--}else if(n>=Au)r.advanceOffset(Au,!0);else if(r.blank)r.advanceNextNonspace();else return 1;return 0},finalize:function(r,e){var t;if(e.stringContent!==null){if(e.isFenced){var n=e.stringContent,i=n.indexOf(`
|
|
23
|
-
`),a=n.slice(0,i),o=n.slice(i+1),s=a.match(/^(\s*)(.*)/);e.infoPadding=s[1].length,e.info=Es(s[2].trim()),e.literal=o}else e.literal=(t=e.stringContent)===null||t===void 0?void 0:t.replace(/(\n *)+$/,`
|
|
24
|
-
`);e.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},t3e={continue:function(r,e){return r.blank&&(e.htmlBlockType===6||e.htmlBlockType===7)?1:0},finalize:function(r,e){var t;e.literal=((t=e.stringContent)===null||t===void 0?void 0:t.replace(/(\n *)+$/,""))||null,e.stringContent=null},canContain:function(){return!1},acceptsLines:!0},r3e={continue:function(r){return r.blank?1:0},finalize:function(r,e){if(e.stringContent!==null){for(var t,n=!1;xn(e.stringContent,0)===Sw&&(t=r.inlineParser.parseReference(e,r.refMap));)e.stringContent=e.stringContent.slice(t),n=!0;n&&Ew(e.stringContent)&&e.unlink()}},canContain:function(){return!1},acceptsLines:!0},n3e=Mw,i3e=Mw,So={document:KWe,list:JWe,blockQuote:YWe,item:XWe,heading:ZWe,thematicBreak:QWe,codeBlock:e3e,htmlBlock:t3e,paragraph:r3e,table:FWe,tableBody:qWe,tableHead:HWe,tableRow:VWe,tableCell:UWe,tableDelimRow:_We,tableDelimCell:zWe,refDef:n3e,customBlock:GWe,frontMatter:i3e};function Wd(r){for(var e=0,t=0,n=[],i=0;i<r.length;i+=1)if(r[i]==="|"&&r[i-1]!=="\\"){var a=r.substring(e,i);e===0&&rg(a)?t=i+1:n.push(a),e=i+1}if(e<r.length){var a=r.substring(e,r.length);rg(a)||n.push(a)}return[t,n]}function jd(r,e,t,n){for(var i=[],a=0,o=e;a<o.length;a++){var s=o[a],l=s.match(/^[ \t]+/),f=l?l[0].length:0,p=void 0,b=void 0;if(f===s.length)f=0,p=0,b="";else{var T=s.match(/[ \t]+$/);p=T?T[0].length:0,b=s.slice(f,s.length-p)}var x=n+f,E=fr(r,[[t,n],[t,n+s.length-1]]);E.stringContent=b.replace(/\\\|/g,"|"),E.startIdx=i.length,E.endIdx=i.length,E.lineOffsets=[x-1],E.paddingLeft=f,E.paddingRight=p,i.push(E),n+=s.length+1}return i}function a3e(r){var e=null,t=r.stringContent,n=t[0],i=t[t.length-1];return i===":"?e=n===":"?"center":"right":n===":"&&(e="left"),{align:e}}var o3e=function(r,e){var t=e.stringContent;if(e.type==="paragraph"&&!r.indented&&!r.blank){var n=t.length-1,i=t.lastIndexOf(`
|
|
25
|
-
`,n-1)+1,a=t.slice(i,n),o=r.currentLine.slice(r.nextNonspace),s=Wd(a),l=s[0],f=s[1],p=Wd(o),b=p[0],T=p[1],x=/^[ \t]*:?-+:?[ \t]*$/;if(!f.length||!T.length||T.some(function(Te){return!x.test(Te)})||T.length===1&&o.indexOf("|")!==0)return 0;var E=e.lineOffsets,B=r.lineNumber-1,F=Mu(E)+1,_=fr("table",[[B,F],[r.lineNumber,r.offset]]);if(_.columns=T.map(function(){return{align:null}}),e.insertAfter(_),E.length===1)e.unlink();else{e.stringContent=t.slice(0,i);var X=t.lastIndexOf(`
|
|
26
|
-
`,i-2)+1,ee=i-X-1;r.lastLineLength=E[E.length-2]+ee,r.finalize(e,B-1)}r.advanceOffset(r.currentLine.length-r.offset,!1);var se=fr("tableHead",[[B,F],[r.lineNumber,r.offset]]);_.appendChild(se);var de=fr("tableRow",[[B,F],[B,F+a.length-1]]),ae=fr("tableDelimRow",[[r.lineNumber,r.nextNonspace+1],[r.lineNumber,r.offset]]);se.appendChild(de),se.appendChild(ae),jd("tableCell",f,B,F+l).forEach(function(Te){de.appendChild(Te)});var le=jd("tableDelimCell",T,r.lineNumber,r.nextNonspace+1+b);return le.forEach(function(Te){ae.appendChild(Te)}),_.columns=le.map(a3e),r.tip=_,2}return 0},s3e=function(r,e){if(e.type!=="table"&&e.type!=="tableBody"||!r.blank&&r.currentLine.indexOf("|")===-1)return 0;if(r.advanceOffset(r.currentLine.length-r.offset,!1),r.blank){var t=e;return e.type==="tableBody"&&(t=e.parent,r.finalize(e,r.lineNumber-1)),r.finalize(t,r.lineNumber-1),0}var n=e;e.type==="table"&&(n=r.addChild("tableBody",r.nextNonspace),n.stringContent=null);var i=fr("tableRow",[[r.lineNumber,r.nextNonspace+1],[r.lineNumber,r.currentLine.length]]);n.appendChild(i);var a=n.parent,o=r.currentLine.slice(r.nextNonspace),s=Wd(o),l=s[0],f=s[1];return jd("tableCell",f,r.lineNumber,r.nextNonspace+1+l).forEach(function(p,b){b>=a.columns.length&&(p.ignored=!0),i.appendChild(p)}),2},l3e=/^(\$\$)(\s*[a-zA-Z])+/,u3e=/^(\$\$)(\s*[a-zA-Z])+.*(\$\$)/,c3e=function(r){var e;if(!r.indented&&!u3e.test(r.currentLine)&&(e=r.currentLine.match(l3e))){var t=e[1].length;r.closeUnmatchedBlocks();var n=r.addChild("customBlock",r.nextNonspace);return n.syntaxLength=t,n.offset=r.indent,r.advanceNextNonspace(),r.advanceOffset(t,!1),2}return 0},f3e=/^`{3,}(?!.*`)|^~{3,}/,d3e=[/./,/^<(?:script|pre|style)(?:\s|>|$)/i,/^<!--/,/^<[?]/,/^<![A-Z]/,/^<!\[CDATA\[/,/^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[123456]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)/i,new RegExp("^(?:"+bw+"|"+kw+")\\s*$","i")],h3e=/^(?:=+|-+)[ \t]*$/,p3e=/^#{1,6}(?:[ \t]+|$)/,v3e=/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})[ \t]*$/,Aw=/^[*+-]/,Ow=/^(\d{1,9})([.)])/;function m3e(r,e){var t=r.currentLine.slice(r.nextNonspace),n,i,a={type:"bullet",tight:!0,bulletChar:"",start:0,delimiter:"",padding:0,markerOffset:r.indent,task:!1,checked:!1};if(r.indent>=4)return null;if(n=t.match(Aw))a.type="bullet",a.bulletChar=n[0][0];else if((n=t.match(Ow))&&(e.type!=="paragraph"||n[1]==="1"))a.type="ordered",a.start=parseInt(n[1],10),a.delimiter=n[2];else return null;if(i=xn(r.currentLine,r.nextNonspace+n[0].length),!(i===-1||i===ww||i===Tw)||e.type==="paragraph"&&!r.currentLine.slice(r.nextNonspace+n[0].length).match(xw))return null;r.advanceNextNonspace(),r.advanceOffset(n[0].length,!0);var o=r.column,s=r.offset;do r.advanceOffset(1,!0),i=xn(r.currentLine,r.offset);while(r.column-o<5&&$o(i));var l=xn(r.currentLine,r.offset)===-1,f=r.column-o;return f>=5||f<1||l?(a.padding=n[0].length+1,r.column=o,r.offset=s,$o(xn(r.currentLine,r.offset))&&r.advanceOffset(1,!0)):a.padding=n[0].length+f,a}function g3e(r,e){return r.type===e.type&&r.delimiter===e.delimiter&&r.bulletChar===e.bulletChar}function Nw(r,e){return r.options.disallowDeepHeading&&(e.type==="blockQuote"||e.type==="item")}var y3e=function(r){return!r.indented&&xn(r.currentLine,r.nextNonspace)===Cw?(r.advanceNextNonspace(),r.advanceOffset(1,!1),$o(xn(r.currentLine,r.offset))&&r.advanceOffset(1,!0),r.closeUnmatchedBlocks(),r.addChild("blockQuote",r.nextNonspace),1):0},b3e=function(r,e){var t;if(!r.indented&&!Nw(r,e)&&(t=r.currentLine.slice(r.nextNonspace).match(p3e))){r.advanceNextNonspace(),r.advanceOffset(t[0].length,!1),r.closeUnmatchedBlocks();var n=r.addChild("heading",r.nextNonspace);return n.level=t[0].trim().length,n.headingType="atx",n.stringContent=r.currentLine.slice(r.offset).replace(/^[ \t]*#+[ \t]*$/,"").replace(/[ \t]+#+[ \t]*$/,""),r.advanceOffset(r.currentLine.length-r.offset),2}return 0},k3e=function(r){var e;if(!r.indented&&(e=r.currentLine.slice(r.nextNonspace).match(f3e))){var t=e[0].length;r.closeUnmatchedBlocks();var n=r.addChild("codeBlock",r.nextNonspace);return n.isFenced=!0,n.fenceLength=t,n.fenceChar=e[0][0],n.fenceOffset=r.indent,r.advanceNextNonspace(),r.advanceOffset(t,!1),2}return 0},w3e=function(r,e){if(!r.indented&&xn(r.currentLine,r.nextNonspace)===$We){var t=r.currentLine.slice(r.nextNonspace),n=r.options.disallowedHtmlBlockTags,i=void 0;for(i=1;i<=7;i++){var a=t.match(d3e[i]);if(a){if(i===7){if(e.type==="paragraph")return 0;if(n.length>0){var o=new RegExp("</?(?:"+n.join("|")+")","i");if(o.test(a[0]))return 0}}r.closeUnmatchedBlocks();var s=r.addChild("htmlBlock",r.offset);return s.htmlBlockType=i,2}}}return 0},C3e=function(r,e){var t;if(e.stringContent!==null&&!r.indented&&e.type==="paragraph"&&!Nw(r,e.parent)&&(t=r.currentLine.slice(r.nextNonspace).match(h3e))){r.closeUnmatchedBlocks();for(var n=void 0;xn(e.stringContent,0)===Sw&&(n=r.inlineParser.parseReference(e,r.refMap));)e.stringContent=e.stringContent.slice(n);if(e.stringContent.length>0){var i=fr("heading",e.sourcepos);return i.level=t[0][0]==="="?1:2,i.headingType="setext",i.stringContent=e.stringContent,e.insertAfter(i),e.unlink(),r.tip=i,r.advanceOffset(r.currentLine.length-r.offset,!1),2}return 0}return 0},T3e=function(r){return!r.indented&&v3e.test(r.currentLine.slice(r.nextNonspace))?(r.closeUnmatchedBlocks(),r.addChild("thematicBreak",r.nextNonspace),r.advanceOffset(r.currentLine.length-r.offset,!1),2):0},S3e=function(r,e){var t,n=e;return(!r.indented||e.type==="list")&&(t=m3e(r,n))?(r.closeUnmatchedBlocks(),(r.tip.type!=="list"||!g3e(n.listData,t))&&(n=r.addChild("list",r.nextNonspace),n.listData=t),n=r.addChild("item",r.nextNonspace),n.listData=t,1):0},x3e=function(r){return r.indented&&r.tip.type!=="paragraph"&&!r.blank?(r.advanceOffset(Au,!0),r.closeUnmatchedBlocks(),r.addChild("codeBlock",r.offset),2):0},td=[y3e,b3e,k3e,w3e,C3e,T3e,S3e,x3e,o3e,s3e,c3e],Dw=/^(-{3}|\+{3}|;{3})$/,E3e=function(r,e){var t=r.currentLine,n=r.lineNumber,i=r.indented;if(n===1&&!i&&e.type==="document"&&Dw.test(t)){r.closeUnmatchedBlocks();var a=r.addChild("frontMatter",r.nextNonspace);return a.stringContent=t,r.advanceNextNonspace(),r.advanceOffset(t.length,!1),2}return 0},M3e={continue:function(r,e){var t=r.currentLine,n=t.match(Dw);return e.type==="frontMatter"&&n?(e.stringContent+=t,r.lastLineLength=n[0].length,r.finalize(e,r.lineNumber),2):0},finalize:function(r,e){e.stringContent!==null&&(e.literal=e.stringContent,e.stringContent=null)},canContain:function(){return!1},acceptsLines:!0},A3e=[/./,/<\/(?:script|pre|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],O3e=/^[#`~*+_=<>0-9-;$]/,N3e=/\r\n|\n|\r/;function rd(){return fr("document",[[1,1],[0,0]])}var D3e={smart:!1,tagFilter:!1,extendedAutolinks:!1,disallowedHtmlBlockTags:[],referenceDefinition:!1,disallowDeepHeading:!1,customParser:null,frontMatter:!1},L3e=(function(){function r(e){this.options=qr(qr({},D3e),e),this.doc=rd(),this.tip=this.doc,this.oldtip=this.doc,this.lineNumber=0,this.offset=0,this.column=0,this.nextNonspace=0,this.nextNonspaceColumn=0,this.indent=0,this.currentLine="",this.indented=!1,this.blank=!1,this.partiallyConsumedTab=!1,this.allClosed=!0,this.lastMatchedContainer=this.doc,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.lastLineLength=0,this.lines=[],this.options.frontMatter&&(So.frontMatter=M3e,td.unshift(E3e)),this.inlineParser=new IWe(this.options)}return r.prototype.advanceOffset=function(e,t){t===void 0&&(t=!1);for(var n=this.currentLine,i,a,o;e>0&&(o=n[this.offset]);)o===" "?(i=4-this.column%4,t?(this.partiallyConsumedTab=i>e,a=i>e?e:i,this.column+=a,this.offset+=this.partiallyConsumedTab?0:1,e-=a):(this.partiallyConsumedTab=!1,this.column+=i,this.offset+=1,e-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,e-=1)},r.prototype.advanceNextNonspace=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},r.prototype.findNextNonspace=function(){for(var e=this.currentLine,t=this.offset,n=this.column,i;(i=e.charAt(t))!=="";)if(i===" ")t++,n++;else if(i===" ")t++,n+=4-n%4;else break;this.blank=i===`
|
|
27
|
-
`||i==="\r"||i==="",this.nextNonspace=t,this.nextNonspaceColumn=n,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=Au},r.prototype.addLine=function(){if(this.partiallyConsumedTab){this.offset+=1;var e=4-this.column%4;this.tip.stringContent+=zd(" ",e)}this.tip.lineOffsets?this.tip.lineOffsets.push(this.offset):this.tip.lineOffsets=[this.offset],this.tip.stringContent+=this.currentLine.slice(this.offset)+`
|
|
28
|
-
`},r.prototype.addChild=function(e,t){for(;!So[this.tip.type].canContain(e);)this.finalize(this.tip,this.lineNumber-1);var n=t+1,i=fr(e,[[this.lineNumber,n],[0,0]]);return i.stringContent="",this.tip.appendChild(i),this.tip=i,i},r.prototype.closeUnmatchedBlocks=function(){if(!this.allClosed){for(;this.oldtip!==this.lastMatchedContainer;){var e=this.oldtip.parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=e}this.allClosed=!0}},r.prototype.finalize=function(e,t){var n=e.parent;e.open=!1,e.sourcepos[1]=[t,this.lastLineLength],So[e.type].finalize(this,e),this.tip=n},r.prototype.processInlines=function(e){var t,n=this.options.customParser,i=e.walker();for(this.inlineParser.refMap=this.refMap,this.inlineParser.refLinkCandidateMap=this.refLinkCandidateMap,this.inlineParser.refDefCandidateMap=this.refDefCandidateMap,this.inlineParser.options=this.options;t=i.next();){var a=t.node,o=t.entering,s=a.type;n&&n[s]&&n[s](a,{entering:o,options:this.options}),!o&&(s==="paragraph"||s==="heading"||s==="tableCell"&&!a.ignored)&&this.inlineParser.parse(a)}},r.prototype.incorporateLine=function(e){var t=this.doc;this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,e.indexOf("\0")!==-1&&(e=e.replace(/\0/g,"�")),this.currentLine=e;for(var n=!0,i;(i=t.lastChild)&&i.open;){switch(t=i,this.findNextNonspace(),So[t.type].continue(this,t)){case 0:break;case 1:n=!1;break;case 2:this.lastLineLength=e.length;return;default:throw new Error("continue returned illegal value, must be 0, 1, or 2")}if(!n){t=t.parent;break}}this.allClosed=t===this.oldtip,this.lastMatchedContainer=t;for(var a=t.type!=="paragraph"&&So[t.type].acceptsLines,o=td.length;!a;){if(this.findNextNonspace(),t.type!=="table"&&t.type!=="tableBody"&&t.type!=="paragraph"&&!this.indented&&!O3e.test(e.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var s=0;s<o;){var l=td[s](this,t);if(l===1){t=this.tip;break}else if(l===2){t=this.tip,a=!0;break}else s++}if(s===o){this.advanceNextNonspace();break}}if(!this.allClosed&&!this.blank&&this.tip.type==="paragraph")this.addLine();else{this.closeUnmatchedBlocks(),this.blank&&t.lastChild&&(t.lastChild.lastLineBlank=!0);for(var f=t.type,p=this.blank&&!(f==="blockQuote"||mw(t)&&t.isFenced||f==="item"&&!t.firstChild&&t.sourcepos[0][0]===this.lineNumber),b=t;b;)b.lastLineBlank=p,b=b.parent;So[f].acceptsLines?(this.addLine(),H2e(t)&&t.htmlBlockType>=1&&t.htmlBlockType<=5&&A3e[t.htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=e.length,this.finalize(t,this.lineNumber))):this.offset<e.length&&!this.blank&&(t=this.addChild("paragraph",this.offset),this.advanceNextNonspace(),this.addLine())}this.lastLineLength=e.length},r.prototype.parse=function(e,t){this.doc=rd(),this.tip=this.doc,this.lineNumber=0,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";var n=e.split(N3e),i=n.length;this.lines=t||n,this.options.referenceDefinition&&this.clearRefMaps(),e.charCodeAt(e.length-1)===$d&&(i-=1);for(var a=0;a<i;a++)this.incorporateLine(n[a]);for(;this.tip;)this.finalize(this.tip,i);return this.processInlines(this.doc),this.doc},r.prototype.partialParseStart=function(e,t){this.doc=rd(),this.tip=this.doc,this.lineNumber=e-1,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";for(var n=t.length,i=0;i<n;i++)this.incorporateLine(t[i]);return this.doc},r.prototype.partialParseExtends=function(e){for(var t=0;t<e.length;t++)this.incorporateLine(e[t])},r.prototype.partialParseFinish=function(){for(;this.tip;)this.finalize(this.tip,this.lineNumber);this.processInlines(this.doc)},r.prototype.setRefMaps=function(e,t,n){this.refMap=e,this.refLinkCandidateMap=t,this.refDefCandidateMap=n},r.prototype.clearRefMaps=function(){[this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(e){pWe(e)})},r})();function pg(r,e){return r[0]<e[0]?1:r[0]>e[0]?-1:r[1]<e[1]?1:r[1]>e[1]?-1:0}function R3e(r,e){var t=r[0],n=r[1];return pg(n,e)===1?1:pg(t,e)===-1?-1:0}function I3e(r,e){if(!(r.parent!==e.parent||r===e)){for(var t=r.next;t&&t!==e;){for(var n=t.next,i=0,a=["parent","prev","next"];i<a.length;i++){var o=a[i];t[o]&&(Vd(t[o].id),t[o]=null)}t=n}r.next=e.next,e.next?e.next.prev=r:r.parent.lastChild=r}}function P3e(r){for(var e=[],t=r.firstChild;t;)e.push(t),t=t.next;return e}function vg(r,e){for(var t=0,n=e;t<n.length;t++){var i=n[t];r.insertBefore(i)}}function B3e(r,e){for(var t=e.length-1;t>=0;t-=1)r.prependChild(e[t])}function F3e(r,e){if(!(!r||!r.parent||e===0)){var t=r.parent.walker();t.resumeAt(r,!0);for(var n;n=t.next();){var i=n.node,a=n.entering;a&&(i.sourcepos[0][0]+=e,i.sourcepos[1][0]+=e)}}}function Lw(r,e){var t=r[0],n=r[1];return n[0]<e?1:t[0]>e?-1:0}function jl(r,e){for(var t=r.firstChild;t;){var n=Lw(t.sourcepos,e);if(n===0)return t;if(n===-1)return t.prev||t;t=t.next}return r.lastChild}function q3e(r){for(;r.lastChild;)r=r.lastChild;return r}function H3e(r){for(;r.parent&&r.parent.type!=="document"&&r.parent.sourcepos[0][0]===r.sourcepos[0][0];)r=r.parent;return r}function _3e(r,e){for(var t=r.firstChild,n=null;t;){var i=Lw(t.sourcepos,e);if(i===0){if(t.sourcepos[0][0]===e||!t.firstChild)return t;n=t,t=t.firstChild}else{if(i===-1)break;n=t,t=t.next}}return n?H3e(q3e(n)):null}function z3e(r,e){for(var t=r,n=null;t;){var i=R3e(t.sourcepos,e);if(i===0)if(t.firstChild)n=t,t=t.firstChild;else return t;else{if(i===-1)return n;if(t.next)t=t.next;else return n}}return t}function Rw(r){return E2e(r)||null}function nd(r,e,t){if(t===void 0&&(t=null),e)for(var n=e.walker();e&&e!==t;){r(e);var i=n.next();if(i)e=i.node;else break}}function V3e(r){var e=Rw(r);if(!e)return!0;for(;e&&e.type!=="document";){if(!e.parent&&!e.prev&&!e.next)return!0;e=e.parent}return!1}var mg=/\r\n|\n|\r/;function U3e(r){var e=r.match(/^[ \t]+/);if(e&&(e[0].length>=2||/\t/.test(e[0])))return!0;var t=e?r.slice(e.length):r;return Aw.test(t)||Ow.test(t)}function $3e(r){return!Ew(r)&&r.indexOf("|")!==-1}function Gd(r){var e=r.id,t=r.title,n=r.sourcepos,i=r.dest;return{id:e,title:t,sourcepos:n,unlinked:!1,destination:i}}var Iw=(function(){function r(e,t){this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.referenceDefinition=!!t?.referenceDefinition,this.parser=new L3e(t),this.parser.setRefMaps(this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap),this.eventHandlerMap={change:[]},e=e||"",this.lineTexts=e.split(mg),this.root=this.parser.parse(e,this.lineTexts)}return r.prototype.updateLineTexts=function(e,t,n){var i,a=e[0],o=e[1],s=t[0],l=t[1],f=n.split(mg),p=f.length,b=this.lineTexts[a-1],T=this.lineTexts[s-1];f[0]=b.slice(0,o-1)+f[0],f[p-1]=f[p-1]+T.slice(l-1);var x=s-a+1;return(i=this.lineTexts).splice.apply(i,Hd([a-1,x],f)),p-x},r.prototype.updateRootNodeState=function(){if(this.lineTexts.length===1&&this.lineTexts[0]===""){this.root.lastLineBlank=!0,this.root.sourcepos=[[1,1],[1,0]];return}this.root.lastChild&&(this.root.lastLineBlank=this.root.lastChild.lastLineBlank);for(var e=this.lineTexts,t=e.length-1;e[t]==="";)t-=1;e.length-2>t&&(t+=1),this.root.sourcepos[1]=[t+1,e[t].length]},r.prototype.replaceRangeNodes=function(e,t,n){e?(vg(e,n),I3e(e,t),[e.id,t.id].forEach(function(i){return Vd(i)}),e.unlink()):t?(vg(t,n),Vd(t.id),t.unlink()):B3e(this.root,n)},r.prototype.getNodeRange=function(e,t){var n=jl(this.root,e[0]),i=jl(this.root,t[0]);return i&&i.next&&t[0]+1===i.next.sourcepos[0][0]&&(i=i.next),[n,i]},r.prototype.trigger=function(e,t){this.eventHandlerMap[e].forEach(function(n){n(t)})},r.prototype.extendEndLine=function(e){for(;this.lineTexts[e]==="";)e+=1;return e},r.prototype.parseRange=function(e,t,n,i){e&&e.prev&&(ng(e.prev)&&U3e(this.lineTexts[n-1])||z2e(e.prev)&&$3e(this.lineTexts[n-1]))&&(e=e.prev,n=e.sourcepos[0][0]);for(var a=this.lineTexts.slice(n-1,i),o=this.parser.partialParseStart(n,a),s=t?t.next:this.root.firstChild,l=o.lastChild,f=l&&mw(l)&&l.open,p=l&&gw(l)&&l.open,b=l&&ng(l);(f||p)&&s||b&&s&&(s.type==="list"||s.sourcepos[0][1]>=2);){var T=this.extendEndLine(s.sourcepos[1][0]);this.parser.partialParseExtends(this.lineTexts.slice(i,T)),e||(e=t),t=s,i=T,s=s.next}this.parser.partialParseFinish();var x=P3e(o);return{newNodes:x,extStartNode:e,extEndNode:t}},r.prototype.getRemovedNodeRange=function(e,t){return!e||e&&Co(e)||t&&Co(t)?null:{id:[e.id,t.id],line:[e.sourcepos[0][0]-1,t.sourcepos[1][0]-1]}},r.prototype.markDeletedRefMap=function(e,t){var n=this;if(!To(this.refMap)){var i=function(a){if(Co(a)){var o=n.refMap[a.label];o&&a.id===o.id&&(o.unlinked=!0)}};e&&nd(i,e.parent,t),t&&nd(i,t)}},r.prototype.replaceWithNewRefDefState=function(e){var t=this;if(!To(this.refMap)){var n=function(i){if(Co(i)){var a=i.label,o=t.refMap[a];(!o||o.unlinked)&&(t.refMap[a]=Gd(i))}};e.forEach(function(i){nd(n,i)})}},r.prototype.replaceWithRefDefCandidate=function(){var e=this;To(this.refDefCandidateMap)||Ul(this.refDefCandidateMap,function(t,n){var i=n.label,a=n.sourcepos,o=e.refMap[i];(!o||o.unlinked||o.sourcepos[0][0]>a[0][0])&&(e.refMap[i]=Gd(n))})},r.prototype.getRangeWithRefDef=function(e,t,n,i,a){if(this.referenceDefinition&&!To(this.refMap)){var o=jl(this.root,e-1),s=jl(this.root,t+1);o&&Co(o)&&o!==n&&o!==i&&(n=o,e=n.sourcepos[0][0]),s&&Co(s)&&s!==n&&s!==i&&(i=s,t=this.extendEndLine(i.sourcepos[1][0]+a))}return[n,i,e,t]},r.prototype.parse=function(e,t,n){n===void 0&&(n=0);var i=this.getNodeRange(e,t),a=i[0],o=i[1],s=a?Math.min(a.sourcepos[0][0],e[0]):e[0],l=this.extendEndLine((o?Math.max(o.sourcepos[1][0],t[0]):t[0])+n),f=this.parseRange.apply(this,this.getRangeWithRefDef(s,l,a,o,n)),p=f.newNodes,b=f.extStartNode,T=f.extEndNode,x=this.getRemovedNodeRange(b,T),E=T?T.next:this.root.firstChild;return this.referenceDefinition?(this.markDeletedRefMap(b,T),this.replaceRangeNodes(b,T,p),this.replaceWithNewRefDefState(p)):this.replaceRangeNodes(b,T,p),{nodes:p,removedNodeRange:x,nextNode:E}},r.prototype.parseRefLink=function(){var e=this,t=[];return To(this.refMap)||Ul(this.refMap,function(n,i){i.unlinked&&delete e.refMap[n],Ul(e.refLinkCandidateMap,function(a,o){var s=o.node,l=o.refLabel;l===n&&t.push(e.parse(s.sourcepos[0],s.sourcepos[1]))})}),t},r.prototype.removeUnlinkedCandidate=function(){To(this.refDefCandidateMap)||[this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(e){Ul(e,function(t){V3e(t)&&delete e[t]})})},r.prototype.editMarkdown=function(e,t,n){var i=this.updateLineTexts(e,t,n),a=this.parse(e,t,i),o=hWe(a,"nextNode");F3e(a.nextNode,i),this.updateRootNodeState();var s=[o];return this.referenceDefinition&&(this.removeUnlinkedCandidate(),this.replaceWithRefDefCandidate(),s=s.concat(this.parseRefLink())),this.trigger("change",s),s},r.prototype.getLineTexts=function(){return this.lineTexts},r.prototype.getRootNode=function(){return this.root},r.prototype.findNodeAtPosition=function(e){var t=z3e(this.root,e);return!t||t===this.root?null:t},r.prototype.findFirstNodeAtLine=function(e){return _3e(this.root,e)},r.prototype.on=function(e,t){this.eventHandlerMap[e].push(t)},r.prototype.off=function(e,t){var n=this.eventHandlerMap[e],i=n.indexOf(t);n.splice(i,1)},r.prototype.findNodeById=function(e){return Rw(e)},r.prototype.removeAllNode=function(){M2e()},r})(),W3e=["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"],gg=new RegExp("<(/?(?:"+W3e.join("|")+")[^>]*>)","ig");function yg(r){return gg.test(r)?r.replace(gg,function(e,t){return"<"+t}):r}var bg={heading:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"h"+r.level,outerNewLine:!0}},text:function(r){return{type:"text",content:r.literal}},softbreak:function(r,e){var t=e.options;return{type:"html",content:t.softbreak}},linebreak:function(){return{type:"html",content:`<br />
|
|
29
|
-
`}},emph:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"em"}},strong:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"strong"}},paragraph:function(r,e){var t,n=e.entering,i=(t=r.parent)===null||t===void 0?void 0:t.parent;return i&&i.type==="list"&&i.listData.tight?null:{type:n?"openTag":"closeTag",tagName:"p",outerNewLine:!0}},thematicBreak:function(){return{type:"openTag",tagName:"hr",outerNewLine:!0,selfClose:!0}},blockQuote:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"blockquote",outerNewLine:!0,innerNewLine:!0}},list:function(r,e){var t=e.entering,n=r.listData,i=n.type,a=n.start,o=i==="bullet"?"ul":"ol",s={};return o==="ol"&&a!==null&&a!==1&&(s.start=a.toString()),{type:t?"openTag":"closeTag",tagName:o,attributes:s,outerNewLine:!0}},item:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"li",outerNewLine:!0}},htmlInline:function(r,e){var t=e.options,n=t.tagFilter?yg(r.literal):r.literal;return{type:"html",content:n}},htmlBlock:function(r,e){var t=e.options,n=t.tagFilter?yg(r.literal):r.literal;return t.nodeId?[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"html",content:n},{type:"closeTag",tagName:"div",outerNewLine:!0}]:{type:"html",content:n,outerNewLine:!0}},code:function(r){return[{type:"openTag",tagName:"code"},{type:"text",content:r.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(r){var e=r.info,t=e?e.split(/\s+/):[],n=[];return t.length>0&&t[0].length>0&&n.push("language-"+Ao(t[0])),[{type:"openTag",tagName:"pre",outerNewLine:!0},{type:"openTag",tagName:"code",classNames:n},{type:"text",content:r.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre",outerNewLine:!0}]},link:function(r,e){var t=e.entering;if(t){var n=r,i=n.title,a=n.destination;return{type:"openTag",tagName:"a",attributes:qr({href:Ao(a)},i&&{title:Ao(i)})}}return{type:"closeTag",tagName:"a"}},image:function(r,e){var t=e.getChildrenText,n=e.skipChildren,i=r,a=i.title,o=i.destination;return n(),{type:"openTag",tagName:"img",selfClose:!0,attributes:qr({src:Ao(o),alt:t(r)},a&&{title:Ao(a)})}},customBlock:function(r,e,t){var n=r.info.trim().toLowerCase(),i=t[n];if(i)try{return i(r,e)}catch(a){console.warn("[@toast-ui/editor] - The error occurred when "+n+" block node was parsed in markdown renderer: "+a)}return[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"text",content:r.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},frontMatter:function(r){return[{type:"openTag",tagName:"div",outerNewLine:!0,attributes:{style:"white-space: pre; display: none;"}},{type:"text",content:r.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},customInline:function(r,e,t){var n=r,i=n.info,a=n.firstChild,o=i.trim().toLowerCase(),s=t[o],l=e.entering;if(s)try{return s(r,e)}catch(f){console.warn("[@toast-ui/editor] - The error occurred when "+o+" inline node was parsed in markdown renderer: "+f)}return l?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+i+(a?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},kg={strike:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"del"}},item:function(r,e){var t=e.entering,n=r.listData,i=n.checked,a=n.task;if(t){var o={type:"openTag",tagName:"li",outerNewLine:!0};return a?[o,{type:"openTag",tagName:"input",selfClose:!0,attributes:qr(qr({},i&&{checked:""}),{disabled:"",type:"checkbox"})},{type:"text",content:" "}]:o}return{type:"closeTag",tagName:"li",outerNewLine:!0}},table:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"table",outerNewLine:!0}},tableHead:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"thead",outerNewLine:!0}},tableBody:function(r,e){var t=e.entering;return{type:t?"openTag":"closeTag",tagName:"tbody",outerNewLine:!0}},tableRow:function(r,e){var t=e.entering;if(t)return{type:"openTag",tagName:"tr",outerNewLine:!0};var n=[];if(r.lastChild)for(var i=r.parent.parent.columns.length,a=r.lastChild.endIdx,o=a+1;o<i;o+=1)n.push({type:"openTag",tagName:"td",outerNewLine:!0},{type:"closeTag",tagName:"td",outerNewLine:!0});return n.push({type:"closeTag",tagName:"tr",outerNewLine:!0}),n},tableCell:function(r,e){var t=e.entering;if(r.ignored)return{type:"text",content:""};var n=r.parent.parent,i=n.type==="tableHead"?"th":"td",a=n.parent,o=a.columns[r.startIdx],s=o?.align?{align:o.align}:null;return t?qr({type:"openTag",tagName:i,outerNewLine:!0},s&&{attributes:s}):{type:"closeTag",tagName:i,outerNewLine:!0}}},j3e={softbreak:`
|
|
30
|
-
`,gfm:!1,tagFilter:!1,nodeId:!1};function G3e(r){for(var e=[],t=r.walker(),n=null;n=t.next();){var i=n.node;i.type==="text"&&e.push(i.literal)}return e.join("")}var Gh=(function(){function r(e){this.buffer=[],this.options=qr(qr({},j3e),e),this.convertors=this.createConvertors(),delete this.options.convertors}return r.prototype.createConvertors=function(){var e=qr({},bg);if(this.options.gfm&&(e=qr(qr({},e),kg)),this.options.convertors){var t=this.options.convertors,n=Object.keys(t),i=qr(qr({},bg),kg);n.forEach(function(a){var o=e[a],s=t[a],l=Object.keys(i).indexOf(a)===-1?a.toLowerCase():a;o?e[l]=function(f,p,b){return p.origin=function(){return o(f,p,b)},s(f,p)}:e[l]=s})}return e},r.prototype.getConvertors=function(){return this.convertors},r.prototype.getOptions=function(){return this.options},r.prototype.render=function(e){var t=this;this.buffer=[];for(var n=e.walker(),i=null,a=function(){var s=i.node,l=i.entering,f=o.convertors[s.type];if(!f)return"continue";var p=!1,b={entering:l,leaf:!jh(s),options:o.options,getChildrenText:G3e,skipChildren:function(){p=!0}},T=gw(s)||V2e(s)?f(s,b,o.convertors):f(s,b);if(T){var x=Array.isArray(T)?T:[T];x.forEach(function(E,B){E.type==="openTag"&&t.options.nodeId&&B===0&&(E.attributes||(E.attributes={}),E.attributes["data-nodeid"]=String(s.id)),t.renderHTMLNode(E)}),p&&(n.resumeAt(s,!1),n.next())}},o=this;i=n.next();)a();return this.addNewLine(),this.buffer.join("")},r.prototype.renderHTMLNode=function(e){switch(e.type){case"openTag":case"closeTag":this.renderElementNode(e);break;case"text":this.renderTextNode(e);break;case"html":this.renderRawHtmlNode(e);break}},r.prototype.generateOpenTagString=function(e){var t=this,n=e.tagName,i=e.classNames,a=e.attributes;this.buffer.push("<"+n),i&&i.length>0&&this.buffer.push(' class="'+i.join(" ")+'"'),a&&Object.keys(a).forEach(function(o){var s=a[o];t.buffer.push(" "+o+'="'+s+'"')}),e.selfClose&&this.buffer.push(" /"),this.buffer.push(">")},r.prototype.generateCloseTagString=function(e){var t=e.tagName;this.buffer.push("</"+t+">")},r.prototype.addNewLine=function(){this.buffer.length&&Mu(Mu(this.buffer))!==`
|
|
31
|
-
`&&this.buffer.push(`
|
|
32
|
-
`)},r.prototype.addOuterNewLine=function(e){e.outerNewLine&&this.addNewLine()},r.prototype.addInnerNewLine=function(e){e.innerNewLine&&this.addNewLine()},r.prototype.renderTextNode=function(e){this.buffer.push(Ao(e.content))},r.prototype.renderRawHtmlNode=function(e){this.addOuterNewLine(e),this.buffer.push(e.content),this.addOuterNewLine(e)},r.prototype.renderElementNode=function(e){e.type==="openTag"?(this.addOuterNewLine(e),this.generateOpenTagString(e),e.selfClose?this.addOuterNewLine(e):this.addInnerNewLine(e)):(this.addInnerNewLine(e),this.generateCloseTagString(e),this.addOuterNewLine(e))},r})();function K3e(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var J3e=Object.hasOwnProperty,wg=Object.setPrototypeOf,Y3e=Object.isFrozen,X3e=Object.getPrototypeOf,Z3e=Object.getOwnPropertyDescriptor,rn=Object.freeze,_i=Object.seal,Q3e=Object.create,Pw=typeof Reflect<"u"&&Reflect,Ou=Pw.apply,Kd=Pw.construct;Ou||(Ou=function(e,t,n){return e.apply(t,n)});rn||(rn=function(e){return e});_i||(_i=function(e){return e});Kd||(Kd=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(K3e(t))))});var eje=ti(Array.prototype.forEach),Cg=ti(Array.prototype.pop),fs=ti(Array.prototype.push),ru=ti(String.prototype.toLowerCase),Tg=ti(String.prototype.match),Yi=ti(String.prototype.replace),tje=ti(String.prototype.indexOf),rje=ti(String.prototype.trim),Ni=ti(RegExp.prototype.test),Sg=nje(TypeError);function ti(r){return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Ou(r,e,n)}}function nje(r){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Kd(r,t)}}function kt(r,e){wg&&wg(r,null);for(var t=e.length;t--;){var n=e[t];if(typeof n=="string"){var i=ru(n);i!==n&&(Y3e(e)||(e[t]=i),n=i)}r[n]=!0}return r}function Ba(r){var e=Q3e(null),t=void 0;for(t in r)Ou(J3e,r,[t])&&(e[t]=r[t]);return e}function Gl(r,e){for(;r!==null;){var t=Z3e(r,e);if(t){if(t.get)return ti(t.get);if(typeof t.value=="function")return ti(t.value)}r=X3e(r)}function n(i){return console.warn("fallback value for",i),null}return n}var xg=rn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),id=rn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ad=rn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ije=rn(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),od=rn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),aje=rn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Eg=rn(["#text"]),Mg=rn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),sd=rn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ag=rn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Kl=rn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),oje=_i(/\{\{[\s\S]*|[\s\S]*\}\}/gm),sje=_i(/<%[\s\S]*|[\s\S]*%>/gm),lje=_i(/^data-[\-\w.\u00B7-\uFFFF]/),uje=_i(/^aria-[\-\w]+$/),cje=_i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fje=_i(/^(?:\w+script|data):/i),dje=_i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function oi(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var hje=function(){return typeof window>"u"?null:window},pje=function(e,t){if((typeof e>"u"?"undefined":ks(e))!=="object"||typeof e.createPolicy!="function")return null;var n=null,i="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(i)&&(n=t.currentScript.getAttribute(i));var a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function Bw(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hje(),e=function(J){return Bw(J)};if(e.version="2.3.3",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var t=r.document,n=r.document,i=r.DocumentFragment,a=r.HTMLTemplateElement,o=r.Node,s=r.Element,l=r.NodeFilter,f=r.NamedNodeMap,p=f===void 0?r.NamedNodeMap||r.MozNamedAttrMap:f,b=r.Text,T=r.Comment,x=r.DOMParser,E=r.trustedTypes,B=s.prototype,F=Gl(B,"cloneNode"),_=Gl(B,"nextSibling"),X=Gl(B,"childNodes"),ee=Gl(B,"parentNode");if(typeof a=="function"){var se=n.createElement("template");se.content&&se.content.ownerDocument&&(n=se.content.ownerDocument)}var de=pje(E,t),ae=de&&ct?de.createHTML(""):"",le=n,Te=le.implementation,xe=le.createNodeIterator,Le=le.createDocumentFragment,ut=le.getElementsByTagName,Je=t.importNode,wt={};try{wt=Ba(n).documentMode?n.documentMode:{}}catch{}var Ye={};e.isSupported=typeof ee=="function"&&Te&&typeof Te.createHTMLDocument<"u"&&wt!==9;var pt=oje,rt=sje,Et=lje,Bt=uje,$t=fje,Qe=dje,Ct=cje,ft=null,Mt=kt({},[].concat(oi(xg),oi(id),oi(ad),oi(od),oi(Eg))),Tt=null,jt=kt({},[].concat(oi(Mg),oi(sd),oi(Ag),oi(Kl))),Ut=null,Yt=null,ye=!0,he=!0,ne=!1,oe=!1,Q=!1,ke=!1,Ee=!1,He=!1,nt=!1,yt=!0,ct=!1,zt=!0,At=!0,Xt=!1,Nt={},ar=null,En=kt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),nn=null,hr=kt({},["audio","video","img","source","image","track"]),ze=null,Ue=kt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),lt="http://www.w3.org/1998/Math/MathML",dt="http://www.w3.org/2000/svg",Ot="http://www.w3.org/1999/xhtml",gr=Ot,Vt=!1,Gt=void 0,Lr=["application/xhtml+xml","text/html"],Kr="text/html",pr=void 0,Vr=null,Mn=n.createElement("form"),gn=function(J){Vr&&Vr===J||((!J||(typeof J>"u"?"undefined":ks(J))!=="object")&&(J={}),J=Ba(J),ft="ALLOWED_TAGS"in J?kt({},J.ALLOWED_TAGS):Mt,Tt="ALLOWED_ATTR"in J?kt({},J.ALLOWED_ATTR):jt,ze="ADD_URI_SAFE_ATTR"in J?kt(Ba(Ue),J.ADD_URI_SAFE_ATTR):Ue,nn="ADD_DATA_URI_TAGS"in J?kt(Ba(hr),J.ADD_DATA_URI_TAGS):hr,ar="FORBID_CONTENTS"in J?kt({},J.FORBID_CONTENTS):En,Ut="FORBID_TAGS"in J?kt({},J.FORBID_TAGS):{},Yt="FORBID_ATTR"in J?kt({},J.FORBID_ATTR):{},Nt="USE_PROFILES"in J?J.USE_PROFILES:!1,ye=J.ALLOW_ARIA_ATTR!==!1,he=J.ALLOW_DATA_ATTR!==!1,ne=J.ALLOW_UNKNOWN_PROTOCOLS||!1,oe=J.SAFE_FOR_TEMPLATES||!1,Q=J.WHOLE_DOCUMENT||!1,He=J.RETURN_DOM||!1,nt=J.RETURN_DOM_FRAGMENT||!1,yt=J.RETURN_DOM_IMPORT!==!1,ct=J.RETURN_TRUSTED_TYPE||!1,Ee=J.FORCE_BODY||!1,zt=J.SANITIZE_DOM!==!1,At=J.KEEP_CONTENT!==!1,Xt=J.IN_PLACE||!1,Ct=J.ALLOWED_URI_REGEXP||Ct,gr=J.NAMESPACE||Ot,Gt=Lr.indexOf(J.PARSER_MEDIA_TYPE)===-1?Gt=Kr:Gt=J.PARSER_MEDIA_TYPE,pr=Gt==="application/xhtml+xml"?function(ve){return ve}:ru,oe&&(he=!1),nt&&(He=!0),Nt&&(ft=kt({},[].concat(oi(Eg))),Tt=[],Nt.html===!0&&(kt(ft,xg),kt(Tt,Mg)),Nt.svg===!0&&(kt(ft,id),kt(Tt,sd),kt(Tt,Kl)),Nt.svgFilters===!0&&(kt(ft,ad),kt(Tt,sd),kt(Tt,Kl)),Nt.mathMl===!0&&(kt(ft,od),kt(Tt,Ag),kt(Tt,Kl))),J.ADD_TAGS&&(ft===Mt&&(ft=Ba(ft)),kt(ft,J.ADD_TAGS)),J.ADD_ATTR&&(Tt===jt&&(Tt=Ba(Tt)),kt(Tt,J.ADD_ATTR)),J.ADD_URI_SAFE_ATTR&&kt(ze,J.ADD_URI_SAFE_ATTR),J.FORBID_CONTENTS&&(ar===En&&(ar=Ba(ar)),kt(ar,J.FORBID_CONTENTS)),At&&(ft["#text"]=!0),Q&&kt(ft,["html","head","body"]),ft.table&&(kt(ft,["tbody"]),delete Ut.tbody),rn&&rn(J),Vr=J)},Jr=kt({},["mi","mo","mn","ms","mtext"]),Yr=kt({},["foreignobject","desc","title","annotation-xml"]),Xr=kt({},id);kt(Xr,ad),kt(Xr,ije);var or=kt({},od);kt(or,aje);var an=function(J){var ve=ee(J);(!ve||!ve.tagName)&&(ve={namespaceURI:Ot,tagName:"template"});var be=ru(J.tagName),Ie=ru(ve.tagName);if(J.namespaceURI===dt)return ve.namespaceURI===Ot?be==="svg":ve.namespaceURI===lt?be==="svg"&&(Ie==="annotation-xml"||Jr[Ie]):!!Xr[be];if(J.namespaceURI===lt)return ve.namespaceURI===Ot?be==="math":ve.namespaceURI===dt?be==="math"&&Yr[Ie]:!!or[be];if(J.namespaceURI===Ot){if(ve.namespaceURI===dt&&!Yr[Ie]||ve.namespaceURI===lt&&!Jr[Ie])return!1;var et=kt({},["title","style","font","a","script"]);return!or[be]&&(et[be]||!Xr[be])}return!1},Kt=function(J){fs(e.removed,{element:J});try{J.parentNode.removeChild(J)}catch{try{J.outerHTML=ae}catch{J.remove()}}},yr=function(J,ve){try{fs(e.removed,{attribute:ve.getAttributeNode(J),from:ve})}catch{fs(e.removed,{attribute:null,from:ve})}if(ve.removeAttribute(J),J==="is"&&!Tt[J])if(He||nt)try{Kt(ve)}catch{}else try{ve.setAttribute(J,"")}catch{}},W=function(J){var ve=void 0,be=void 0;if(Ee)J="<remove></remove>"+J;else{var Ie=Tg(J,/^[\r\n\t ]+/);be=Ie&&Ie[0]}Gt==="application/xhtml+xml"&&(J='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+J+"</body></html>");var et=de?de.createHTML(J):J;if(gr===Ot)try{ve=new x().parseFromString(et,Gt)}catch{}if(!ve||!ve.documentElement){ve=Te.createDocument(gr,"template",null);try{ve.documentElement.innerHTML=Vt?"":et}catch{}}var _e=ve.body||ve.documentElement;return J&&be&&_e.insertBefore(n.createTextNode(be),_e.childNodes[0]||null),gr===Ot?ut.call(ve,Q?"html":"body")[0]:Q?ve.documentElement:_e},$=function(J){return xe.call(J.ownerDocument||J,J,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},R=function(J){return J instanceof b||J instanceof T?!1:typeof J.nodeName!="string"||typeof J.textContent!="string"||typeof J.removeChild!="function"||!(J.attributes instanceof p)||typeof J.removeAttribute!="function"||typeof J.setAttribute!="function"||typeof J.namespaceURI!="string"||typeof J.insertBefore!="function"},N=function(J){return(typeof o>"u"?"undefined":ks(o))==="object"?J instanceof o:J&&(typeof J>"u"?"undefined":ks(J))==="object"&&typeof J.nodeType=="number"&&typeof J.nodeName=="string"},P=function(J,ve,be){Ye[J]&&eje(Ye[J],function(Ie){Ie.call(e,ve,be,Vr)})},H=function(J){var ve=void 0;if(P("beforeSanitizeElements",J,null),R(J)||Tg(J.nodeName,/[\u0080-\uFFFF]/))return Kt(J),!0;var be=pr(J.nodeName);if(P("uponSanitizeElement",J,{tagName:be,allowedTags:ft}),!N(J.firstElementChild)&&(!N(J.content)||!N(J.content.firstElementChild))&&Ni(/<[/\w]/g,J.innerHTML)&&Ni(/<[/\w]/g,J.textContent)||be==="select"&&Ni(/<template/i,J.innerHTML))return Kt(J),!0;if(!ft[be]||Ut[be]){if(At&&!ar[be]){var Ie=ee(J)||J.parentNode,et=X(J)||J.childNodes;if(et&&Ie)for(var _e=et.length,at=_e-1;at>=0;--at)Ie.insertBefore(F(et[at],!0),_(J))}return Kt(J),!0}return J instanceof s&&!an(J)||(be==="noscript"||be==="noembed")&&Ni(/<\/no(script|embed)/i,J.innerHTML)?(Kt(J),!0):(oe&&J.nodeType===3&&(ve=J.textContent,ve=Yi(ve,pt," "),ve=Yi(ve,rt," "),J.textContent!==ve&&(fs(e.removed,{element:J.cloneNode()}),J.textContent=ve)),P("afterSanitizeElements",J,null),!1)},K=function(J,ve,be){if(zt&&(ve==="id"||ve==="name")&&(be in n||be in Mn))return!1;if(!(he&&!Yt[ve]&&Ni(Et,ve))){if(!(ye&&Ni(Bt,ve))){if(!Tt[ve]||Yt[ve])return!1;if(!ze[ve]){if(!Ni(Ct,Yi(be,Qe,""))){if(!((ve==="src"||ve==="xlink:href"||ve==="href")&&J!=="script"&&tje(be,"data:")===0&&nn[J])){if(!(ne&&!Ni($t,Yi(be,Qe,"")))){if(be)return!1}}}}}}return!0},pe=function(J){var ve=void 0,be=void 0,Ie=void 0,et=void 0;P("beforeSanitizeAttributes",J,null);var _e=J.attributes;if(_e){var at={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Tt};for(et=_e.length;et--;){ve=_e[et];var I=ve,O=I.name,g=I.namespaceURI;if(be=rje(ve.value),Ie=pr(O),at.attrName=Ie,at.attrValue=be,at.keepAttr=!0,at.forceKeepAttr=void 0,P("uponSanitizeAttribute",J,at),be=at.attrValue,!at.forceKeepAttr&&(yr(O,J),!!at.keepAttr)){if(Ni(/\/>/i,be)){yr(O,J);continue}oe&&(be=Yi(be,pt," "),be=Yi(be,rt," "));var C=pr(J.nodeName);if(K(C,Ie,be))try{g?J.setAttributeNS(g,O,be):J.setAttribute(O,be),Cg(e.removed)}catch{}}}P("afterSanitizeAttributes",J,null)}},we=function ie(J){var ve=void 0,be=$(J);for(P("beforeSanitizeShadowDOM",J,null);ve=be.nextNode();)P("uponSanitizeShadowNode",ve,null),!H(ve)&&(ve.content instanceof i&&ie(ve.content),pe(ve));P("afterSanitizeShadowDOM",J,null)};return e.sanitize=function(ie,J){var ve=void 0,be=void 0,Ie=void 0,et=void 0,_e=void 0;if(Vt=!ie,Vt&&(ie="<!-->"),typeof ie!="string"&&!N(ie)){if(typeof ie.toString!="function")throw Sg("toString is not a function");if(ie=ie.toString(),typeof ie!="string")throw Sg("dirty is not a string, aborting")}if(!e.isSupported){if(ks(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof ie=="string")return r.toStaticHTML(ie);if(N(ie))return r.toStaticHTML(ie.outerHTML)}return ie}if(ke||gn(J),e.removed=[],typeof ie=="string"&&(Xt=!1),!Xt)if(ie instanceof o)ve=W("<!---->"),be=ve.ownerDocument.importNode(ie,!0),be.nodeType===1&&be.nodeName==="BODY"||be.nodeName==="HTML"?ve=be:ve.appendChild(be);else{if(!He&&!oe&&!Q&&ie.indexOf("<")===-1)return de&&ct?de.createHTML(ie):ie;if(ve=W(ie),!ve)return He?null:ae}ve&&Ee&&Kt(ve.firstChild);for(var at=$(Xt?ie:ve);Ie=at.nextNode();)Ie.nodeType===3&&Ie===et||H(Ie)||(Ie.content instanceof i&&we(Ie.content),pe(Ie),et=Ie);if(et=null,Xt)return ie;if(He){if(nt)for(_e=Le.call(ve.ownerDocument);ve.firstChild;)_e.appendChild(ve.firstChild);else _e=ve;return yt&&(_e=Je.call(t,_e,!0)),_e}var I=Q?ve.outerHTML:ve.innerHTML;return oe&&(I=Yi(I,pt," "),I=Yi(I,rt," ")),de&&ct?de.createHTML(I):I},e.setConfig=function(ie){gn(ie),ke=!0},e.clearConfig=function(){Vr=null,ke=!1},e.isValidAttribute=function(ie,J,ve){Vr||gn({});var be=pr(ie),Ie=pr(J);return K(be,Ie,ve)},e.addHook=function(ie,J){typeof J=="function"&&(Ye[ie]=Ye[ie]||[],fs(Ye[ie],J))},e.removeHook=function(ie){Ye[ie]&&Cg(Ye[ie])},e.removeHooks=function(ie){Ye[ie]&&(Ye[ie]=[])},e.removeAllHooks=function(){Ye={}},e}var vje=Bw(),mje=["iframe","embed"],Fw=[];function qw(r){zr(mje,r)&&Fw.push(r.toLowerCase())}function no(r,e){return vje.sanitize(r,Ce({ADD_TAGS:Fw,ADD_ATTR:["rel","target","hreflang","type"],FORBID_TAGS:["input","script","textarea","form","button","select","meta","style","link","title","object","base"]},e))}function Hw(r,e){return r.literal.replace(new RegExp("(<\\s*"+e+"[^>]*>)|(</"+e+"\\s*[>])","ig"),"").trim()}function Jd(r){r=r.match(zo)[0];var e=r.match(new RegExp(Ik,"g"));return e?e.reduce(function(t,n){var i=n.trim().split("="),a=i[0],o=i.slice(1);return o.length&&(t[a]=o.join("=").replace(/'|"/g,"").trim()),t},{}):{}}function Yd(r){return pi(r.attributes).reduce(function(e,t){return e[t.nodeName]=t.nodeValue,e},{})}function Og(r,e,t,n){var i=n.getToDOMNode(e)(r),a=t(i.outerHTML),o=document.createElement("div");o.innerHTML=a,i=o.firstChild;var s=Yd(i);return{dom:i,htmlAttrs:s}}var gje={htmlBlock:function(r,e,t){return{atom:!0,content:"block+",group:"block",attrs:{htmlAttrs:{default:{}},childrenHTML:{default:""},htmlBlock:{default:!0}},parseDOM:[{tag:r,getAttrs:function(n){return{htmlAttrs:Yd(n),childrenHTML:n.innerHTML}}}],toDOM:function(n){var i=Og(n,r,e,t),a=i.dom,o=i.htmlAttrs;return o.class=o.class?o.class+" html-block":"html-block",vn([r,o],pi(a.childNodes))}}},htmlInline:function(r,e,t){return{attrs:{htmlAttrs:{default:{}},htmlInline:{default:!0}},parseDOM:[{tag:r,getAttrs:function(n){return{htmlAttrs:Yd(n)}}}],toDOM:function(n){var i=Og(n,r,e,t).htmlAttrs;return[r,i,0]}}}};function yje(r,e,t){var n={nodes:{},marks:{}};return["htmlBlock","htmlInline"].forEach(function(i){r[i]&&Object.keys(r[i]).forEach(function(a){var o=i==="htmlBlock"?"nodes":"marks";qw(a),n[o][a]=gje[i](a,e,t)})}),n}var bje=/^\s*<\s*\//,kje={paragraph:function(r,e){var t=e.entering,n=e.origin,i=e.options;return i.nodeId?{type:t?"openTag":"closeTag",outerNewLine:!0,tagName:"p"}:n()},softbreak:function(r){var e=r.prev&&r.prev.type==="htmlInline",t=e&&/<br ?\/?>/.test(r.prev.literal),n=t?`
|
|
33
|
-
`:`<br>
|
|
34
|
-
`;return{type:"html",content:n}},item:function(r,e){var t=e.entering;if(t){var n={},i=[];return r.listData.task&&(n["data-task"]="",i.push("task-list-item"),r.listData.checked&&(i.push("checked"),n["data-task-checked"]="")),{type:"openTag",tagName:"li",classNames:i,attributes:n,outerNewLine:!0}}return{type:"closeTag",tagName:"li",outerNewLine:!0}},code:function(r){var e={"data-backticks":String(r.tickCount)};return[{type:"openTag",tagName:"code",attributes:e},{type:"text",content:r.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(r){var e=r,t=e.fenceLength,n=e.info,i=n?n.split(/\s+/):[],a=[],o={};if(t>3&&(o["data-backticks"]=t),i.length>0&&i[0].length>0){var s=i[0];a.push("lang-"+s),o["data-language"]=s}return[{type:"openTag",tagName:"pre",classNames:a},{type:"openTag",tagName:"code",attributes:o},{type:"text",content:r.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre"}]},customInline:function(r,e){var t=e.origin,n=e.entering,i=e.skipChildren,a=r.info;if(a.indexOf("widget")!==-1&&n){i();var o=Nk(r),s=Ok(a,o).outerHTML;return[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:s},{type:"closeTag",tagName:"span"}]}return t()}};function Kh(r,e){var t=Ce({},kje);return r&&(t.link=function(n,i){var a=i.entering,o=i.origin,s=o();return a&&(s.attributes=Ce(Ce({},s.attributes),r)),s}),e&&Object.keys(e).forEach(function(n){var i=t[n],a=e[n];i&&zn(a)?t[n]=function(o,s){var l=Ce({},s);return l.origin=function(){return i(o,s)},a(o,l)}:zr(["htmlBlock","htmlInline"],n)&&!zn(a)?t[n]=function(o,s){var l=o.literal.match(zo);if(l){var f=l[0],p=l[1],b=l[3],T=(p||b).toLowerCase(),x=a[T],E=Hw(o,T);if(x){var B=Ce({},o);return B.attrs=Jd(f),B.childrenHTML=E,B.type=T,s.entering=!bje.test(o.literal),x(B,s)}}return s.origin()}:t[n]=a}),t}var wje=["list","item","blockQuote"],Cje=["UL","OL","BLOCKQUOTE"];function Tje(r,e){var t,n=r.child(e);return!n.childCount||n.childCount===1&&!(!((t=n.firstChild.text)===null||t===void 0)&&t.trim())}function Ng(r,e,t){var n=Ws(e)-1,i=Uu(e)-1,a=t[n].getBoundingClientRect(),o=t[i].offsetTop-t[n].offsetTop+t[i].clientHeight;return{height:o<=0?t[n].clientHeight:o+Sje(r,t,Math.min(i+1,r.childCount-1)),rect:a}}function Sje(r,e,t){for(var n=r.childCount-1,i=0;t<=n&&Tje(r,t);)i+=e[t].clientHeight,t+=1;return i}function xje(r,e){for(;!r.getAttribute("data-nodeid")&&r.parentElement!==e;)r=r.parentElement;return r}function Nu(r,e){for(var t=0;r&&r!==e&&(zr(Cje,r.tagName)||(t+=r.offsetTop),r.offsetParent!==e.offsetParent);)r=r.parentElement;return t}function Eje(r,e){for(var t=e,n=null;t;){var i=t.firstElementChild;if(!i)break;var a=_w(i,r,Nu(t,e));n=t,t=a}var o=t||n;return o===e?null:o}function _w(r,e,t){return r&&e>t+r.offsetTop?_w(r.nextElementSibling,e,t)||r:null}function Mje(r,e,t,n){var i=Math.min((r-e)/t,1);return i*n}function ld(r,e){for(var t=r.querySelector('[data-nodeid="'+e.id+'"]');!t||vne(e);)e=e.parent,t=r.querySelector('[data-nodeid="'+e.id+'"]');return Aje({mdNode:e,el:t})}function Aje(r){for(var e=r.mdNode,t=r.el;(zr(wje,e.type)||e.type==="table")&&e.firstChild;)e=e.firstChild,t=t.firstElementChild;return{mdNode:e,el:t}}var Zn={};function Oje(r,e){Zn[r]=Zn[r]||{},Zn[r].height=e}function Nje(r,e){Zn[r]=Zn[r]||{},Zn[r].offsetTop=e}function Dje(r){return Zn[r]&&Zn[r].height}function Lje(r){return Zn[r]&&Zn[r].offsetTop}function Xd(r){r&&(delete Zn[Number(r.getAttribute("data-nodeid"))],pi(r.children).forEach(function(e){Xd(e)}))}function Rje(r,e,t){var n=Dje(t),i=Lje(t),a=n||r.clientHeight,o=i||Nu(r,e)||r.offsetTop;return n||Oje(t,a),i||Nje(t,o),{nodeHeight:a,offsetTop:o}}var ud=Ze("md-preview-highlight");function Ije(r,e){for(var t=r.firstChild;t&&t.next&&!($u(t.next)>e+1);)t=t.next;return t}var zw=(function(){function r(e,t){var n=document.createElement("div");this.el=n,this.eventEmitter=e,this.isViewer=!!t.isViewer,this.el.className=Ze("md-preview");var i=t.linkAttributes,a=t.customHTMLRenderer,o=t.sanitizer,s=t.highlight,l=s===void 0?!1:s;this.renderer=new Gh({gfm:!0,nodeId:!0,convertors:Kh(i,a)}),this.cursorNodeId=null,this.sanitizer=o,this.initEvent(l),this.initContentSection(),this.isViewer&&(this.previewContent.style.overflowWrap="break-word")}return r.prototype.initContentSection=function(){this.previewContent=Hk('<div class="'+Ze("contents")+'"></div>'),this.isViewer||this.el.appendChild(this.previewContent)},r.prototype.toggleActive=function(e){Rh(this.el,"active",e)},r.prototype.initEvent=function(e){var t=this;this.eventEmitter.listen("updatePreview",this.update.bind(this)),!this.isViewer&&(e&&(this.eventEmitter.listen("changeToolbarState",function(n){var i=n.mdNode,a=n.cursorPos;t.updateCursorNode(i,a)}),this.eventEmitter.listen("blur",function(){t.removeHighlight()})),rw(this.el,"scroll",function(n){t.eventEmitter.emit("scroll","preview",Eje(n.target.scrollTop,t.previewContent))}),this.eventEmitter.listen("changePreviewTabPreview",function(){return t.toggleActive(!0)}),this.eventEmitter.listen("changePreviewTabWrite",function(){return t.toggleActive(!1)}))},r.prototype.removeHighlight=function(){if(this.cursorNodeId){var e=this.getElementByNodeId(this.cursorNodeId);e&&Yn(e,ud)}},r.prototype.updateCursorNode=function(e,t){e&&(e=_o(e,function(o){return!yne(o)}),e.type==="tableRow"?e=Ije(e,t[1]):e.type==="tableBody"&&(e=null));var n=e?e.id:null;if(this.cursorNodeId!==n){var i=this.getElementByNodeId(this.cursorNodeId),a=this.getElementByNodeId(n);i&&Yn(i,ud),a&&ci(a,ud),this.cursorNodeId=n}},r.prototype.getElementByNodeId=function(e){return e?this.previewContent.querySelector('[data-nodeid="'+e+'"]'):null},r.prototype.update=function(e){var t=this;e.forEach(function(n){return t.replaceRangeNodes(n)}),this.eventEmitter.emit("afterPreviewRender",this)},r.prototype.replaceRangeNodes=function(e){var t=this,n=e.nodes,i=e.removedNodeRange,a=this.previewContent,o=this.eventEmitter.emitReduce("beforePreviewRender",this.sanitizer(n.map(function(E){return t.renderer.render(E)}).join("")));if(!i)a.insertAdjacentHTML("afterbegin",o);else{var s=i.id,l=s[0],f=s[1],p=this.getElementByNodeId(l),b=this.getElementByNodeId(f);if(p){p.insertAdjacentHTML("beforebegin",o);for(var T=p;T&&T!==b;){var x=T.nextElementSibling;eo(T),Xd(T),T=x}T?.parentNode&&(eo(T),Xd(T))}}},r.prototype.getRenderer=function(){return this.renderer},r.prototype.destroy=function(){tw(this.el,"scroll"),this.el=null},r.prototype.getElement=function(){return this.el},r.prototype.getHTML=function(){return Bh(this.previewContent.innerHTML)},r.prototype.setHTML=function(e){this.previewContent.innerHTML=e},r.prototype.setHeight=function(e){hi(this.el,{height:e+"px"})},r.prototype.setMinHeight=function(e){hi(this.el,{minHeight:e+"px"})},r})();function Bi(r,e){for(var t=r.depth;t;){var n=r.node(t);if(e(n,t))return{node:n,depth:t,offset:t>0?r.before(t):0};t-=1}return null}function Wo(r){return!!Bi(r,function(e){var t=e.type;return t.name==="listItem"||t.name==="bulletList"||t.name==="orderedList"})}function Du(r){return!!Bi(r,function(e){var t=e.type;return t.name==="tableHeadCell"||t.name==="tableBodyCell"})}function jo(r){return Bi(r,function(e){var t=e.type;return t.name==="listItem"})}function Qu(r){return{tag:r,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return Ce({},t&&{rawHTML:t})}}}function Vw(r){return Object.keys(r).reduce(function(e,t){return t!=="rawHTML"&&r[t]&&(t=t==="className"?"class":t,e[t]=r[t]),e},{})}function Uw(r){return{tag:r,getAttrs:function(e){return["rawHTML","colspan","rowspan","extended"].reduce(function(t,n){var i=n==="rawHTML"?"data-raw-html":n,a=e.getAttribute(i);return a&&(t[n]=zr(["rawHTML","extended"],n)?a:Number(a)),t},{})}}}function Dr(){return{htmlAttrs:{default:null},classNames:{default:null}}}function mr(r){var e=r.htmlAttrs,t=r.classNames;return Ce(Ce({},e),{class:t?t.join(" "):null})}function Pje(r,e){var t=r.parent,n=r.startIndex,i=r.endIndex,a=t.contentMatchAt(n).findWrapping(e);if(a){var o=a.length?a[0]:e;return t.canReplaceWith(n,i,o)?a:null}return null}function Bje(r,e){var t=r.parent,n=r.startIndex,i=r.endIndex,a=t.child(n),o=e.contentMatch.findWrapping(a.type);if(o){for(var s=o.length?o[o.length-1]:e,l=s.contentMatch,f=n;l&&f<i;f+=1)l=l.matchType(t.child(f).type);if(l&&l.validEnd)return o}return null}function Fje(r,e,t,n){var i=Pje(r,t),a=Bje(e,t);if(i&&a){var o=i.map(function(l){return{type:l}}),s=a.map(function(l){return{type:l,attrs:n}});return o.concat({type:t}).concat(s)}return null}function qje(r,e,t,n,i){for(var a=e.start,o=e.end,s=e.startIndex,l=e.endIndex,f=e.parent,p=De.empty,b=t.length-1;b>=0;b-=1)p=De.from(t[b].type.create(t[b].attrs,p));r.step(new Or(a-(n?2:0),o,a,o,new $e(p,0,0),t.length,!0));for(var T=0,b=0;b<t.length;b+=1)if(t[b].type===i){T=b+1;break}for(var x=t.length-T,E=a+t.length-(n?2:0),b=s,B=l;b<B;b+=1){var F=b===s;!F&&Lo(r.doc,E,x)&&(r.split(E,x),E+=x*2),E+=f.child(b).nodeSize}return r}function $w(r,e,t,n){var i=e.$from,a=e.$to,o=e.depth,s=e,l=!1;if(o>=2&&i.node(o-1).type.compatibleContent(t)&&e.startIndex===0&&i.index(o-1)){var f=r.doc.resolve(e.start-2);s=new uu(f,f,o),e.endIndex<e.parent.childCount&&(e=new uu(i,r.doc.resolve(a.end(o)),o)),l=!0}var p=Fje(s,e,t,n);return p?qje(r,e,p,l,t):r}function Ww(r,e){for(var t=r.resolve(e);t.node().type.name!=="paragraph";)e-=2,t=r.resolve(e);return jo(t)}function Hje(r,e){var t=e.$from,n=e.$to,i=jo(t),a=jo(n);if(i&&a)for(;a;){var o=a.offset,s=a.node,l={task:!s.attrs.task,checked:!1};if(r.setNodeMarkup(o,null,l),o===i.offset)break;a=Ww(r.doc,o)}return r}function _je(r,e,t){var n=e.$from,i=e.$to,a=jo(n),o=jo(i);if(a&&o)for(;o;){var s=o.offset,l=o.node,f=o.depth;l.attrs.task&&r.setNodeMarkup(s,null,{task:!1,checked:!1});var p=r.doc.resolve(s);if(p.parent.type!==t){var b=p.before(f-1);r.setNodeMarkup(b,t)}if(s===a.offset)break;o=Ww(r.doc,s)}return r}function jw(r){return function(e,t){var n=e.selection,i=e.tr,a=n.$from,o=n.$to,s=a.blockRange(o);if(s){var l=Wo(a)?_je(i,s,r):$w(i,s,r);return t(l),!0}return!1}}function zje(){return function(r,e){var t=r.selection,n=r.tr,i=r.schema,a=t.$from,o=t.$to,s=a.blockRange(o);if(s){var l=Wo(a)?Hje(n,s):$w(n,s,i.nodes.bulletList,{task:!0});return e(l),!0}return!1}}function Vje(r){return function(e,t){var n=e.tr,i=e.selection,a=i.$from,o=i.$to,s=a.blockRange(o,function(B){var F=B.childCount,_=B.firstChild;return!!F&&_.type===r});if(s&&s.startIndex>0){var l=s.parent,f=l.child(s.startIndex-1);if(f.type!==r)return!1;var p=f.lastChild&&f.lastChild.type===l.type,b=p?De.from(r.create()):null,T=new $e(De.from(r.create(null,De.from(l.type.create(null,b)))),p?3:1,0),x=s.start,E=s.end;return n.step(new Or(x-(p?3:1),E,x,E,T,1,!0)),t(n),!0}return!1}}function Uje(r,e,t){var n=e.$from,i=e.$to,a=e.end,o=e.depth,s=e.parent,l=i.end(o);return a<l&&(r.step(new Or(a-1,l,a,l,new $e(De.from(t.create(null,s.copy())),1,0),1,!0)),e=new uu(r.doc.resolve(n.pos),r.doc.resolve(l),o)),r.lift(e,Bu(e)),r}function $je(r,e){for(var t=e.parent,n=e.end,i=e.endIndex-1,a=e.startIndex;i>a;i-=1)n-=t.child(i).nodeSize,r.delete(n-1,n+1);var o=r.doc.resolve(e.start),s=o.nodeAfter,l=e.startIndex===0,f=e.endIndex===t.childCount,p=o.node(-1),b=o.index(-1),T=p.canReplace(b+(l?0:1),b+1,s?.content.append(f?De.empty:De.from(t)));if(s&&T){var x=o.pos,E=x+s.nodeSize;r.step(new Or(x-(l?1:0),E+(f?1:0),x+1,E-1,new $e((l?De.empty:De.from(t.copy(De.empty))).append(f?De.empty:De.from(t.copy(De.empty))),l?0:1,f?0:1),l?0:1))}return r}function Wje(r){return function(e,t){var n=e.tr,i=e.selection,a=i.$from,o=i.$to,s=a.blockRange(o,function(p){var b=p.childCount,T=p.firstChild;return!!b&&T.type===r});if(s){var l=a.node(s.depth-1).type===r,f=l?Uje(n,s,r):$je(n,s);return t(f),!0}return!1}}function jje(r){return function(e,t){var n=e.tr,i=e.selection,a=i.$from,o=i.$to;if(a.depth<2||!a.sameParent(o))return!1;var s=a.node(-1);if(s.type!==r)return!1;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==r||a.index(-2)!==a.node(-2).childCount-1)return!1;for(var l=a.index(-1)>0,f=De.empty,p=a.depth-(l?1:2);p>=a.depth-3;p-=1)f=De.from(a.node(p).copy(f));return f=f.append(De.from(r.createAndFill())),n.replace(l?a.before():a.before(-1),a.after(-3),new $e(f,l?3:2,2)),n.setSelection(xt.near(n.doc.resolve(a.pos+(l?3:2)))),t(n),!0}var b=o.pos===a.end()?s.contentMatchAt(0).defaultType:null,T=b&&[null,{type:b}];return n.delete(a.pos,o.pos),Lo(n.doc,a.pos,2,T)?(n.split(a.pos,2,T),t(n),!0):!1}}function Gje(){return function(){return function(r,e){var t=r.selection,n=r.schema,i=t.$from,a=t.$to,o=i.blockRange(a);return o&&Wo(i)?Vje(n.nodes.listItem)(r,e):!1}}}function Kje(){return function(){return function(r,e){var t=r.selection,n=r.schema,i=t.$from,a=t.$to,o=i.blockRange(a);return o&&Wo(i)?Wje(n.nodes.listItem)(r,e):!1}}}function Jh(){return{indent:Gje(),outdent:Kje()}}var Dg=new Map,Fr=(function(){function r(e,t,n,i){this.table=e,this.tableRows=t,this.tableStartPos=n,this.rowInfo=i}return r.create=function(e){var t=Bi(e,function(E){var B=E.type;return B.name==="table"});if(t){var n=t.node,i=t.depth,a=t.offset,o=Dg.get(n);if(o?.tableStartPos===a+1)return o;var s=[],l=e.start(i),f=n.child(0),p=n.child(1),b=Zd(f,l),T=Zd(p,l+f.nodeSize);f.forEach(function(E){return s.push(E)}),p.forEach(function(E){return s.push(E)});var x=new r(n,s,l,b.concat(T));return Dg.set(n,x),x}return null},Object.defineProperty(r.prototype,"totalRowCount",{get:function(){return this.rowInfo.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"totalColumnCount",{get:function(){return this.rowInfo[0].length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tableStartOffset",{get:function(){return this.tableStartPos},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tableEndOffset",{get:function(){return this.tableStartPos+this.table.nodeSize-1},enumerable:!1,configurable:!0}),r.prototype.getCellInfo=function(e,t){return this.rowInfo[e][t]},r.prototype.posAt=function(e,t){for(var n=0,i=this.tableStartPos;;n+=1){var a=i+this.tableRows[n].nodeSize;if(n===e){for(var o=t;o<this.totalColumnCount&&this.rowInfo[n][o].offset<i;)o+=1;return o===this.totalColumnCount?a:this.rowInfo[n][o].offset}i=a}},r.prototype.getNodeAndPos=function(e,t){var n=this.rowInfo[e][t];return{node:this.table.nodeAt(n.offset-this.tableStartOffset),pos:n.offset}},r.prototype.extendedRowspan=function(e,t){return!1},r.prototype.extendedColspan=function(e,t){return!1},r.prototype.getRowspanCount=function(e,t){return 0},r.prototype.getColspanCount=function(e,t){return 0},r.prototype.decreaseColspanCount=function(e,t){return 0},r.prototype.decreaseRowspanCount=function(e,t){return 0},r.prototype.getColspanStartInfo=function(e,t){return null},r.prototype.getRowspanStartInfo=function(e,t){return null},r.prototype.getCellStartOffset=function(e,t){var n=this.rowInfo[e][t].offset;return this.extendedRowspan(e,t)?this.posAt(e,t):n},r.prototype.getCellEndOffset=function(e,t){var n=this.rowInfo[e][t],i=n.offset,a=n.nodeSize;return this.extendedRowspan(e,t)?this.posAt(e,t):i+a},r.prototype.getCellIndex=function(e){for(var t=0;t<this.totalRowCount;t+=1)for(var n=this.rowInfo[t],i=0;i<this.totalColumnCount;i+=1)if(n[i].offset+1>e.pos)return[t,i];return[0,0]},r.prototype.getRectOffsets=function(e,t){var n,i,a;t===void 0&&(t=e),e.pos>t.pos&&(n=[t,e],e=n[0],t=n[1]);var o=this.getCellIndex(e),s=o[0],l=o[1],f=this.getCellIndex(t),p=f[0],b=f[1];return i=Lm(s,p),s=i[0],p=i[1],a=Lm(l,b),l=a[0],b=a[1],this.getSpannedOffsets({startRowIdx:s,startColIdx:l,endRowIdx:p,endColIdx:b})},r.prototype.getSpannedOffsets=function(e){return e},r})(),Zd=function(r,e){var t=[];return r.forEach(function(n,i){var a={rowspanMap:{},colspanMap:{},length:0};n.forEach(function(o,s){for(var l=o.nodeSize,f=0;a[f];)f+=1;a[f]={offset:e+i+s+2,nodeSize:l},a.length+=1}),t.push(a)}),t};function Jje(r,e){return Oh(Fr.prototype,r),Zd=e,Fr}function Yje(r,e,t){for(var n=t.startRowIdx,i=t.startColIdx,a=t.endRowIdx,o=t.endColIdx,s=[],l=n;l<=a;l+=1)for(var f=i;f<=o;f+=1){var p=e.getCellInfo(l,f),b=p.offset,T=p.nodeSize;s.push(new Mb(r.resolve(b+1),r.resolve(b+T-1)))}return s}function Xje(r,e){var t=[];return r.childCount&&t.push(r),e.childCount&&t.push(e),De.from(t)}var Yh=(function(r){Ge(e,r);function e(t,n){n===void 0&&(n=t);var i=this,a=t.node(0),o=Fr.create(t),s=o.getRectOffsets(t,n),l=Yje(a,o,s);return i=r.call(this,l[0].$from,l[0].$to,l)||this,i.startCell=t,i.endCell=n,i.offsetMap=o,i.isCellSelection=!0,i.visible=!1,i}return e.prototype.map=function(t,n){var i=this.startCell.pos,a=this.endCell.pos,o=t.resolve(n.map(i)),s=t.resolve(n.map(a)),l=Fr.create(o);if(this.offsetMap.totalColumnCount>l.totalColumnCount||this.offsetMap.totalRowCount>l.totalRowCount){var f={tableBody:1,tableRow:2,tableCell:3,paragraph:4},p=f[s.parent.type.name],b=s.end(s.depth-p),T=Math.min(b-4,s.pos);return St.create(t,T)}return new e(o,s)},e.prototype.eq=function(t){return t instanceof e&&t.startCell.pos===this.startCell.pos&&t.endCell.pos===this.endCell.pos},e.prototype.content=function(){for(var t=this.startCell.node(-2),n=this.startCell.start(-2),i=t.child(1).firstChild,a=t.child(0).type.create(),o=t.child(1).type.create(),s=Fr.create(this.startCell),l=s.getRectOffsets(this.startCell,this.endCell),f=l.startRowIdx,p=l.startColIdx,b=l.endRowIdx,T=l.endColIdx,x=!1,E=f;E<=b;E+=1){for(var B=[],F=p;F<=T;F+=1){var _=s.getCellInfo(E,F).offset,X=t.nodeAt(_-n);X&&(x=X.type.name==="tableHeadCell",s.extendedRowspan(E,F)||s.extendedColspan(E,F)?B.push(X.type.create({extended:!0})):B.push(X.copy(X.content)))}var ee=i.copy(De.from(B)),se=x?a:o;se.content=se.content.append(De.from(ee))}return new $e(Xje(a,o),1,1)},e.prototype.toJSON=function(){return JSON.stringify(this)},e})(xt);function Zje(r,e,t){for(var n=e.nodes,i=n.tableRow,a=n.tableHeadCell,o=n.paragraph,s=[],l=0;l<r;l+=1){var f=t&&t[l],p=o.create(null,f?e.text(f):[]);s.push(a.create(null,p))}return[i.create(null,s)]}function Gw(r,e,t,n){for(var i=t.nodes,a=i.tableRow,o=i.tableBodyCell,s=i.paragraph,l=[],f=0;f<r;f+=1){for(var p=[],b=0;b<e;b+=1){var T=n&&n[f*e+b],x=s.create(null,T?t.text(T):[]);p.push(o.create(null,x))}l.push(a.create(null,p))}return l}function nu(r,e,t,n){n===void 0&&(n=null);for(var i=t.nodes,a=i.tableHeadCell,o=i.tableBodyCell,s=i.paragraph,l=e===0?a:o,f=[],p=0;p<r;p+=1)f.push(l.create(n,s.create()));return f}function Kw(r,e){for(;r&&r!==e;){if(r.nodeName==="TD"||r.nodeName==="TH")return r;r=r.parentNode}return null}function Jw(r){return Bi(r,function(e){var t=e.type;return t.name==="tableHeadCell"||t.name==="tableBodyCell"})}function si(r){if(r instanceof St){var e=r.$anchor,t=Jw(e);if(t){var n=e.node(0).resolve(e.before(t.depth));return{anchor:n,head:n}}}var i=r,a=i.startCell,o=i.endCell;return{anchor:a,head:o}}function Yw(r){var e;if(r.size){var t=r.content,n=r.openStart,i=r.openEnd;if(t.childCount!==1)return null;for(;t.childCount===1&&(n>0&&i>0||((e=t.firstChild)===null||e===void 0?void 0:e.type.name)==="table");)n-=1,i-=1,t=t.firstChild.content;if(t.firstChild.type.name==="tableHead"||t.firstChild.type.name==="tableBody")return t}return null}function No(r){var e=r.startRowIdx,t=r.startColIdx,n=r.endRowIdx,i=r.endColIdx,a=n-e+1,o=i-t+1;return{rowCount:a,columnCount:o}}function Qje(r,e){return Ce(Ce({},r.attrs),e)}var ta=new qs("cellSelection"),eGe=2,tGe=(function(){function r(e){this.view=e,this.handlers={mousedown:this.handleMousedown.bind(this),mousemove:this.handleMousemove.bind(this),mouseup:this.handleMouseup.bind(this)},this.startCellPos=null,this.init()}return r.prototype.init=function(){this.view.dom.addEventListener("mousedown",this.handlers.mousedown)},r.prototype.handleMousedown=function(e){var t=Kw(e.target,this.view.dom);if(e.button===eGe){e.preventDefault();return}if(t){var n=this.getCellPos(e);n&&(this.startCellPos=n),this.bindEvent()}},r.prototype.handleMousemove=function(e){var t=ta.getState(this.view.state),n=this.getCellPos(e),i=this.startCellPos,a;t?a=this.view.state.doc.resolve(t):i!==n&&(a=i),a&&i&&n&&this.setCellSelection(i,n)},r.prototype.handleMouseup=function(){this.startCellPos=null,this.unbindEvent(),ta.getState(this.view.state)!==null&&this.view.dispatch(this.view.state.tr.setMeta(ta,-1))},r.prototype.bindEvent=function(){var e=this.view.dom;e.addEventListener("mousemove",this.handlers.mousemove),e.addEventListener("mouseup",this.handlers.mouseup)},r.prototype.unbindEvent=function(){var e=this.view.dom;e.removeEventListener("mousemove",this.handlers.mousemove),e.removeEventListener("mouseup",this.handlers.mouseup)},r.prototype.getCellPos=function(e){var t=e.clientX,n=e.clientY,i=this.view.posAtCoords({left:t,top:n});if(i){var a=this.view.state.doc,o=a.resolve(i.pos),s=Jw(o);if(s){var l=o.before(s.depth);return a.resolve(l)}}return null},r.prototype.setCellSelection=function(e,t){var n=this.view.state,i=n.selection,a=n.tr,o=ta.getState(this.view.state)===null,s=new Yh(e,t);if(o||!i.eq(s)){var l=a.setSelection(s);o&&l.setMeta(ta,t.pos),this.view.dispatch(l)}},r.prototype.destroy=function(){this.view.dom.removeEventListener("mousedown",this.handlers.mousedown)},r})(),rGe=Ze("cell-selected");function nGe(r){var e=r.selection,t=r.doc;if(e instanceof Yh){var n=[],i=e.ranges;return i.forEach(function(a){var o=a.$from,s=a.$to;n.push(hn.node(o.pos-1,s.pos+1,{class:rGe}))}),dr.create(t,n)}return null}function iGe(){return new mn({key:ta,state:{init:function(){return null},apply:function(r,e){var t=r.getMeta(ta);if(t)return t===-1?null:t;if(gu(e)||!r.docChanged)return e;var n=r.mapping.mapResult(e),i=n.deleted,a=n.pos;return i?null:a}},props:{decorations:nGe,createSelectionBetween:function(r){var e=r.state;return gu(ta.getState(e))?null:e.selection}},view:function(r){return new tGe(r)}})}var Xw=(function(){function r(){this.keys=[],this.values=[]}return r.prototype.getKeyIndex=function(e){return Za(e,this.keys)},r.prototype.get=function(e){return this.values[this.getKeyIndex(e)]},r.prototype.set=function(e,t){var n=this.getKeyIndex(e);return n>-1?this.values[n]=t:(this.keys.push(e),this.values.push(t)),this},r.prototype.has=function(e){return this.getKeyIndex(e)>-1},r.prototype.delete=function(e){var t=this.getKeyIndex(e);return t>-1?(this.keys.splice(t,1),this.values.splice(t,1),!0):!1},r.prototype.forEach=function(e,t){var n=this;t===void 0&&(t=this),this.values.forEach(function(i,a){i&&n.keys[a]&&e.call(t,i,n.keys[a],n)})},r.prototype.clear=function(){this.keys=[],this.values=[]},r})(),cd="en-US",aGe=(function(){function r(){this.code=cd,this.langs=new Xw}return r.prototype.setCode=function(e){this.code=e||cd},r.prototype.setLanguage=function(e,t){var n=this;e=[].concat(e),e.forEach(function(i){if(!n.langs.has(i))n.langs.set(i,t);else{var a=n.langs.get(i);n.langs.set(i,Th(a,t))}})},r.prototype.get=function(e,t){t||(t=this.code);var n=this.langs.get(t);n||(n=this.langs.get(cd));var i=n[e];if(!i)throw new Error('There is no text key "'+e+'" in '+t);return i},r})(),mt=new aGe,oGe=[[{action:"Add row to up",command:"addRowToUp",disableInThead:!0,className:"add-row-up"},{action:"Add row to down",command:"addRowToDown",disableInThead:!0,className:"add-row-down"},{action:"Remove row",command:"removeRow",disableInThead:!0,className:"remove-row"}],[{action:"Add column to left",command:"addColumnToLeft",className:"add-column-left"},{action:"Add column to right",command:"addColumnToRight",className:"add-column-right"},{action:"Remove column",command:"removeColumn",className:"remove-column"}],[{action:"Align column to left",command:"alignColumn",payload:{align:"left"},className:"align-column-left"},{action:"Align column to center",command:"alignColumn",payload:{align:"center"},className:"align-column-center"},{action:"Align column to right",command:"alignColumn",payload:{align:"right"},className:"align-column-right"}],[{action:"Remove table",command:"removeTable",className:"remove-table"}]];function sGe(r,e){return oGe.map(function(t){return t.map(function(n){var i=n.action,a=n.command,o=n.payload,s=n.disableInThead,l=n.className;return{label:mt.get(i),onClick:function(){r.emit("command",a,o)},disabled:e&&!!s,className:l}})}).concat()}function lGe(r){return new mn({props:{handleDOMEvents:{contextmenu:function(e,t){var n=Kw(t.target,e.dom);if(n){t.preventDefault();var i=t,a=i.clientX,o=i.clientY,s=e.dom.parentNode.getBoundingClientRect(),l=s.left,f=s.top,p=n.nodeName==="TH";return r.emit("contextmenu",{pos:{left:a-l+10+"px",top:o-f+30+"px"},menuGroups:sGe(r,p),tableCell:n}),!0}return!1}}}})}function uGe(){return new mn({props:{handleDOMEvents:{mousedown:function(r,e){var t=e,n=t.clientX,i=t.clientY,a=r.posAtCoords({left:n,top:i});if(a){var o=r.state,s=o.doc,l=o.tr,f=s.resolve(a.pos),p=jo(f),b=e.target,T=getComputedStyle(b,":before"),x=e,E=x.offsetX,B=x.offsetY;if(!p||!Lh(T,E,B))return!1;e.preventDefault();var F=f.before(p.depth),_=p.node.attrs;return l.setNodeMarkup(F,null,Ce(Ce({},_),{checked:!_.checked})),r.dispatch(l),!0}return!1}}}})}var cGe=["image","link","customBlock","frontMatter"],fGe=["strong","strike","emph","code"],Zw=["bulletList","orderedList","taskList"];function dGe(r,e){var t=r.type.name;return t==="listItem"?r.attrs.task?"taskList":e.type.name:t.indexOf("table")!==-1?"table":t}function hGe(r,e){e[r]={active:!0},Zw.filter(function(t){return t!==r}).forEach(function(t){e[t]&&delete e[t]})}function pGe(r,e,t,n){fGe.forEach(function(i){var a=t.marks[i],o=r.marksAcross(e)||[],s=!!a.isInSet(o);s&&(n[i]={active:!0})})}function vGe(r,e,t){var n=r.$from,i=r.$to,a=r.from,o=r.to,s={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}};return e.nodesBetween(a,o,function(l,f,p){var b=dGe(l,p);zr(cGe,b)||(zr(Zw,b)?(hGe(b,s),s.indent.disabled=!1,s.outdent.disabled=!1):b==="paragraph"||b==="text"?pGe(n,i,t,s):s[b]={active:!0})}),s}function mGe(r){return new mn({view:function(){return{update:function(e){var t=e.state,n=t.selection,i=t.doc,a=t.schema;r.emit("changeToolbarState",{toolbarState:vGe(n,i,a)})}}}})}var gGe=(function(){function r(e,t,n,i){var a=this;this.openEditor=function(){if(a.innerEditorView)throw new Error("The editor is already opened.");a.dom.draggable=!1,a.wrapper.style.display="none",a.innerViewContainer.style.display="block",a.innerEditorView=new _u(a.innerViewContainer,{state:_a.create({doc:a.node,plugins:[Ps({"Mod-z":function(){return xs(a.innerEditorView.state,a.innerEditorView.dispatch)},"Shift-Mod-z":function(){return Ch(a.innerEditorView.state,a.innerEditorView.dispatch)},Tab:function(o,s){return s(o.tr.insertText(" ")),!0},Enter:vk,Escape:function(){return a.cancelEditing(),!0},"Ctrl-Enter":function(){return a.saveAndFinishEditing(),!0}}),Ck()]}),dispatchTransaction:function(o){return a.dispatchInner(o)},handleDOMEvents:{mousedown:function(){return a.editorView.hasFocus()&&a.innerEditorView.focus(),!0},blur:function(){return a.saveAndFinishEditing(),!0}}}),a.innerEditorView.focus()},this.node=e,this.editorView=t,this.getPos=n,this.toDOMAdaptor=i,this.innerEditorView=null,this.canceled=!1,this.dom=document.createElement("div"),this.dom.className=Ze("custom-block"),this.wrapper=document.createElement("div"),this.wrapper.className=Ze("custom-block-view"),this.createInnerViewContainer(),this.renderCustomBlock(),this.dom.appendChild(this.innerViewContainer),this.dom.appendChild(this.wrapper)}return r.prototype.renderToolArea=function(){var e=this,t=document.createElement("div"),n=document.createElement("span"),i=document.createElement("button");t.className="tool",n.textContent=this.node.attrs.info,n.className="info",i.type="button",i.addEventListener("click",function(){return e.openEditor()}),t.appendChild(n),t.appendChild(i),this.wrapper.appendChild(t)},r.prototype.renderCustomBlock=function(){var e=this.toDOMAdaptor.getToDOMNode(this.node.attrs.info);if(e){for(var t=e(this.node);this.wrapper.hasChildNodes();)this.wrapper.removeChild(this.wrapper.lastChild);t&&this.wrapper.appendChild(t),this.renderToolArea()}},r.prototype.createInnerViewContainer=function(){this.innerViewContainer=document.createElement("div"),this.innerViewContainer.className=Ze("custom-block-editor"),this.innerViewContainer.style.display="none"},r.prototype.closeEditor=function(){this.innerEditorView&&(this.innerEditorView.destroy(),this.innerEditorView=null,this.innerViewContainer.style.display="none"),this.wrapper.style.display="block"},r.prototype.saveAndFinishEditing=function(){var e=this.editorView.state.selection.to,t=this.editorView.state;this.editorView.dispatch(t.tr.setSelection(er(t.tr,e))),this.editorView.focus(),this.renderCustomBlock(),this.closeEditor()},r.prototype.cancelEditing=function(){var e=hre(this.innerEditorView.state);for(this.canceled=!0;e--;)xs(this.innerEditorView.state,this.innerEditorView.dispatch),xs(this.editorView.state,this.editorView.dispatch);this.canceled=!1;var t=this.editorView.state.selection.to,n=this.editorView.state;this.editorView.dispatch(n.tr.setSelection(St.create(n.doc,t))),this.editorView.focus(),this.closeEditor()},r.prototype.dispatchInner=function(e){var t=this.innerEditorView.state.applyTransaction(e),n=t.state,i=t.transactions;if(this.innerEditorView.updateState(n),!this.canceled&&zn(this.getPos)){for(var a=this.editorView.state.tr,o=dn.offset(this.getPos()+1),s=0;s<i.length;s+=1)for(var l=i[s].steps,f=0;f<l.length;f+=1)a.step(l[f].map(o));a.docChanged&&this.editorView.dispatch(a)}},r.prototype.update=function(e){return e.sameMarkup(this.node)?(this.node=e,this.innerEditorView||this.renderCustomBlock(),!0):!1},r.prototype.stopEvent=function(e){return!!this.innerEditorView&&!!e.target&&this.innerEditorView.dom.contains(e.target)},r.prototype.ignoreMutation=function(){return!0},r.prototype.destroy=function(){this.dom.removeEventListener("dblclick",this.openEditor),this.closeEditor()},r})(),Lg="image-link",yGe=(function(){function r(e,t,n,i){var a=this,o;this.handleMousedown=function(s){s.preventDefault();var l=s.target,f=s.offsetX,p=s.offsetY;if(a.imageLink&&zn(a.getPos)&&Lk(l,Lg)){var b=getComputedStyle(l,":before");if(s.stopPropagation(),Lh(b,f,p)){var T=a.view.state.tr,x=a.getPos();T.setSelection(er(T,x,x+1)),a.view.dispatch(T),a.eventEmitter.emit("openPopup","link",a.imageLink.attrs)}}},this.node=e,this.view=t,this.getPos=n,this.eventEmitter=i,this.imageLink=(o=e.marks.filter(function(s){var l=s.type;return l.name==="link"})[0])!==null&&o!==void 0?o:null,this.dom=this.createElement(),this.bindEvent()}return r.prototype.createElement=function(){var e=this.createImageElement(this.node);if(this.imageLink){var t=document.createElement("span");return t.className=Lg,t.appendChild(e),t}return e},r.prototype.createImageElement=function(e){var t=document.createElement("img"),n=e.attrs,i=n.imageUrl,a=n.altText,o=mr(e.attrs);return t.src=i,a&&(t.alt=a),Ph(o,t),t},r.prototype.bindEvent=function(){this.imageLink&&this.dom.addEventListener("mousedown",this.handleMousedown)},r.prototype.stopEvent=function(){return!0},r.prototype.destroy=function(){this.imageLink&&this.dom.removeEventListener("mousedown",this.handleMousedown)},r})(),bGe="toastui-editor-ww-code-block",kGe="toastui-editor-ww-code-block-language",wGe=(function(){function r(e,t,n,i){var a=this;this.contentDOM=null,this.input=null,this.timer=null,this.handleMousedown=function(o){var s=o.target,l=getComputedStyle(s,":after");if(l.backgroundImage!=="none"&&zn(a.getPos)){var f=a.view.coordsAtPos(a.getPos()),p=f.top,b=f.right;a.createLanguageEditor({top:p,right:b})}},this.handleKeydown=function(o){o.key==="Enter"&&a.input&&(o.preventDefault(),a.changeLanguage())},this.node=e,this.view=t,this.getPos=n,this.eventEmitter=i,this.createElement(),this.bindDOMEvent(),this.bindEvent()}return r.prototype.createElement=function(){var e=this.node.attrs.language,t=document.createElement("div");t.setAttribute("data-language",e||"text"),t.className=bGe;var n=this.createCodeBlockElement(),i=n.firstChild;t.appendChild(n),this.dom=t,this.contentDOM=i},r.prototype.createCodeBlockElement=function(){var e=document.createElement("pre"),t=document.createElement("code"),n=this.node.attrs.language,i=mr(this.node.attrs);return n&&t.setAttribute("data-language",n),Ph(i,e),e.appendChild(t),e},r.prototype.createLanguageEditor=function(e){var t=this,n=e.top,i=e.right,a=document.createElement("span");a.className=kGe;var o=document.createElement("input");o.type="text",o.value=this.node.attrs.language,a.appendChild(o),this.view.dom.parentElement.appendChild(a);var s=a.clientWidth;hi(a,{top:n+10+"px",left:i-s-10+"px",width:s+"px"}),this.input=o,this.input.addEventListener("blur",function(){return t.changeLanguage()}),this.input.addEventListener("keydown",this.handleKeydown),this.clearTimer(),this.timer=setTimeout(function(){t.input.focus()})},r.prototype.bindDOMEvent=function(){this.dom&&this.dom.addEventListener("click",this.handleMousedown)},r.prototype.bindEvent=function(){var e=this;this.eventEmitter.listen("scroll",function(){e.input&&e.reset()})},r.prototype.changeLanguage=function(){if(this.input&&zn(this.getPos)){var e=this.input.value;this.reset();var t=this.getPos(),n=this.view.state.tr;n.setNodeMarkup(t,null,{language:e}),this.view.dispatch(n)}},r.prototype.reset=function(){var e;if(!((e=this.input)===null||e===void 0)&&e.parentElement){var t=this.input.parentElement;this.input=null,eo(t)}},r.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},r.prototype.stopEvent=function(){return!0},r.prototype.update=function(e){return e.sameMarkup(this.node)?(this.node=e,!0):!1},r.prototype.destroy=function(){this.reset(),this.clearTimer(),this.dom&&this.dom.removeEventListener("click",this.handleMousedown)},r})(),CGe=/MsoListParagraph/,Qw=/style=(.|\n)*mso-/,e0=/mso-list:(.*)/,TGe=/O:P/,SGe=/^(n|u|l)/,xGe="p.MsoListParagraph";function EGe(r){return Qw.test(r)}function MGe(r){for(var e=[],t=document.createTreeWalker(r,1,null,!1);t.nextNode();){var n=t.currentNode;if(ju(n)){var i=n,a=i.outerHTML,o=i.textContent,s=Qw.test(a),l=e0.test(a);s&&!l&&o?e.push([n,!0]):(TGe.test(n.nodeName)||s&&!o||l)&&e.push([n,!1])}}return e.forEach(function(f){var p=f[0],b=f[1];b?jne(p):eo(p)}),r.innerHTML.trim()}function AGe(r,e){var t=r.getAttribute("style");if(t){var n=t.match(e0),i=n[1],a=i.trim().split(" "),o=a[1],s=parseInt(o.replace("level",""),10),l=SGe.test(r.textContent||"");return{id:e,level:s,prev:null,parent:null,children:[],unordered:l,contents:MGe(r)}}return null}function OGe(r,e){if(e.level<r.level)e.children.push(r),r.parent=e;else{for(;e&&e.level!==r.level;)e=e.parent;e&&(r.prev=e,r.parent=e.parent,r.parent&&r.parent.children.push(r))}}function NGe(r){var e=[];return r.forEach(function(t,n){var i=e[n-1],a=AGe(t,n);a&&(i&&OGe(a,i),e.push(a))}),e}function t0(r){var e=r[0].unordered?"ul":"ol",t=document.createElement(e);return r.forEach(function(n){var i=n.children,a=n.contents,o=document.createElement("li");o.innerHTML=a,t.appendChild(o),i.length&&t.appendChild(t0(i))}),t}function DGe(r){var e=NGe(r),t=e.filter(function(n){var i=n.parent;return!i});return t0(t)}function LGe(r){for(;r&&!ju(r);)r=r.nextSibling;return r?!CGe.test(r.className):!0}function RGe(r){var e=document.createElement("div");e.innerHTML=r;var t=[],n=Une(e,xGe);n.forEach(function(a){var o=LGe(a.nextSibling);if(t.push(a),o){var s=DGe(t),l=a.nextSibling;l?Wne(s,l):$ne(e,s),t=[]}eo(a)});var i=n.length?"<p></p>":"";return""+i+e.innerHTML}var Rg="<!--StartFragment-->",IGe="<!--EndFragment-->";function PGe(r){var e=r.indexOf(Rg),t=r.lastIndexOf(IGe);return e>-1&&t>-1&&(r=r.slice(e+Rg.length,t)),r.replace(/<br[^>]*>/g,Fk)}function BGe(r){return/<\/td>((?!<\/tr>)[\s\S])*$/i.test(r)&&(r="<tr>"+r+"</tr>"),/<\/tr>((?!<\/table>)[\s\S])*$/i.test(r)&&(r="<table>"+r+"</table>"),r}function FGe(r){return r=PGe(r),r=BGe(r),EGe(r)&&(r=RGe(r)),r}function qGe(r){var e=r.reduce(function(t,n){return t.childCount>n.childCount?t:n});return e.childCount}function r0(r,e,t){for(var n=[],i=r.childCount,a=0;a<i;a+=1)if(!r.child(a).attrs.extended){var o=a<i?t.create(r.child(a).attrs,r.child(a).content):t.createAndFill();n.push(o)}return n}function n0(r,e,t){var n=t.nodes,i=n.tableRow,a=n.tableHeadCell,o=r0(r,e,a);return i.create(null,o)}function i0(r,e,t){var n=t.nodes,i=n.tableRow,a=n.tableBodyCell,o=r0(r,e,a);return i.create(null,o)}function HGe(r,e){for(var t=e.nodes,n=t.tableRow,i=t.tableBodyCell,a=[],o=0;o<r;o+=1){var s=i.createAndFill();a.push(s)}return n.create({dummyRowForPasting:!0},a)}function a0(r){var e=[],t=[];if(r.firstChild.type.name==="tableHead"){var n=r.firstChild;n.forEach(function(a){return e.push(a)})}if(r.lastChild.type.name==="tableBody"){var i=r.lastChild;i.forEach(function(a){return t.push(a)})}return vn(vn([],e),t)}function _Ge(r,e,t){var n=n0(r,e,t);return t.nodes.tableHead.create(null,n)}function Ig(r,e,t){var n=r.map(function(a){return i0(a,e,t)});if(!r.length){var i=HGe(e,t);n.push(i)}return t.nodes.tableBody.create(null,n)}function zGe(r,e,t,n){var i=qGe(r);if(t&&n)return e.nodes.table.create(null,[Ig(r,i,e)]);var a=r[0],o=r.slice(1),s=[_Ge(a,i,e)];return o.length&&s.push(Ig(o,i,e)),e.nodes.table.create(null,s)}function VGe(r,e,t){var n=[],i=r.content,a=r.openStart,o=r.openEnd;return i.forEach(function(s){if(s.type.name==="table"){var l=Yw(new $e(De.from(s),0,0));if(l){var f=a0(l),p=l.firstChild.type.name==="tableBody",b=zGe(f,e,p,t);n.push(b)}}else n.push(s)}),new $e(De.from(n),a,o)}var UGe=4,$Ge=2;function iu(r){return r*UGe}function WGe(r,e,t){var n=[],i=a0(r),a=i[0].childCount,o=i.length,s=e.startRowIdx===0,l=i.slice(0,o);if(s){var f=l.shift();if(f){var p=n0(f,a,t).content;n.push(p)}}return l.forEach(function(b){if(!b.attrs.dummyRowForPasting){var T=i0(b,a,t).content;n.push(T)}}),n}function jGe(r,e,t){for(var n=e.startRowIdx,i=e.startColIdx,a=t.length,o=0,s=function(x){var E=t[x].childCount;t[x].forEach(function(B){var F=B.attrs,_=F.colspan;_>1&&(E+=_-1)}),o=Math.max(o,E)},l=0;l<a;l+=1)s(l);var f=n+a-1,p=i+o-1,b=Math.max(f+1-r.totalRowCount,0),T=Math.max(p+1-r.totalColumnCount,0);return{startRowIdx:n,startColIdx:i,endRowIdx:f,endColIdx:p,addedRowCount:b,addedColumnCount:T}}function GGe(r,e){for(var t=r.startRowIdx,n=r.startColIdx,i=r.endRowIdx,a=r.endColIdx,o=r.addedRowCount,s=r.addedColumnCount,l=t;l<=i-o;l+=1)e.push({rowIdx:l,startColIdx:n,endColIdx:a-s})}function KGe(r,e,t,n,i){for(var a=n.startRowIdx,o=n.startColIdx,s=n.endRowIdx,l=n.endColIdx,f=n.addedRowCount,p=n.addedColumnCount,b=t.totalRowCount,T=0,x=0;x<b;x+=1){var E=t.getCellInfo(x,l-p),B=E.offset,F=E.nodeSize,_=r.mapping.map(B+F),X=nu(p,x,e);if(r.insert(_,X),x>=a&&x<=s-f){var ee=t.getCellInfo(x,l-p),se=r.mapping.map(ee.offset),de=_+iu(p);i[T]={rowIdx:x,startColIdx:o,endColIdx:l,dummyOffsets:[se,de]},T+=1}}}function JGe(r,e,t,n,i){var a=n.addedRowCount,o=n.addedColumnCount,s=n.startColIdx,l=n.endColIdx,f=r.mapping.maps.length,p=t.tableEndOffset-2,b=Gw(a,t.totalColumnCount+o,e),T=p;r.insert(r.mapping.slice(f).map(T),b);for(var x=0;x<a;x+=1){var E=T+iu(s)+1,B=T+iu(l+1)+1,F=T+iu(t.totalColumnCount+o)+$Ge;i.push({rowIdx:x+t.totalRowCount,startColIdx:s,endColIdx:l,dummyOffsets:[E,B]}),T=F}}function YGe(r,e,t,n){var i=r.mapping.maps.length;t.forEach(function(a,o){var s=a.rowIdx,l=a.startColIdx,f=a.endColIdx,p=a.dummyOffsets,b=r.mapping.slice(i),T=new $e(e[o],0,0),x=p?p[0]:n.getCellStartOffset(s,l),E=p?p[1]:n.getCellEndOffset(s,f);r.replace(b.map(x),b.map(E),T)})}function XGe(r,e){var t=r.state,n=t.selection,i=t.schema,a=t.tr,o=si(n),s=o.anchor,l=o.head;if(s&&l){var f=Yw(e);if(!f)return!1;var p=Fr.create(s),b=p.getRectOffsets(s,l),T=WGe(f,b,i),x=jGe(p,b,T),E=[];return QGe(p,x)&&(GGe(x,E),x.addedColumnCount&&KGe(a,i,p,x,E),x.addedRowCount&&JGe(a,i,p,x,E),YGe(a,T,E,p),r.dispatch(a),ZGe(r,E,p.getCellInfo(0,0).offset)),!0}return!1}function ZGe(r,e,t){var n=r.state,i=n.tr,a=n.doc,o=Fr.create(a.resolve(t)),s=e[0],l=s.rowIdx,f=s.startColIdx,p=$r(e),b=p.rowIdx,T=p.endColIdx,x=o.getCellInfo(l,f).offset,E=o.getCellInfo(b,T).offset;r.dispatch(i.setSelection(new Yh(a.resolve(x),a.resolve(E))))}function QGe(r,e){var t=r.getSpannedOffsets(e),n=No(t),i=n.rowCount,a=n.columnCount,o=No(e),s=o.rowCount,l=o.columnCount;return i===s&&a===l}var eKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"doc"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"block+"}},enumerable:!1,configurable:!0}),e})(Jt),tKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"paragraph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"inline*",group:"block",attrs:Ce({},Dr()),parseDOM:[{tag:"p"}],toDOM:function(t){var n=t.attrs;return["p",mr(n),0]}}},enumerable:!1,configurable:!0}),e})(Jt),rKe=/\s{1,4}$/,nKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"text"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{group:"inline"}},enumerable:!1,configurable:!0}),e.prototype.addSpaces=function(){return function(t,n){var i=t.selection,a=t.tr,o=i.$from,s=i.$to,l=o.blockRange(s);return l&&!Wo(o)&&!Du(o)?(n(a.insertText(" ",o.pos,s.pos)),!0):!1}},e.prototype.removeSpaces=function(){return function(t,n){var i=t.selection,a=t.tr,o=i.$from,s=i.$to,l=i.from,f=o.blockRange(s);if(f&&!Wo(o)&&!Du(o)){var p=o.nodeBefore;if(p&&p.isText){var b=p.text,T=b.replace(rKe,""),x=b.length-T.length;return n(a.delete(l-x,l)),!0}}return!1}},e.prototype.keymaps=function(){return{Tab:this.addSpaces(),"Shift-Tab":this.removeSpaces()}},e})(Jt),iKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"heading"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"levels",{get:function(){return[1,2,3,4,5,6]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=this.levels.map(function(n){return{tag:"h"+n,getAttrs:function(i){var a=i.getAttribute("data-raw-html");return Ce({level:n},a&&{rawHTML:a})}}});return{attrs:Ce({level:{default:1},headingType:{default:"atx"},rawHTML:{default:null}},Dr()),content:"inline*",group:"block",defining:!0,parseDOM:t,toDOM:function(n){var i=n.attrs;return["h"+i.level,mr(i),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(t){return function(n,i){var a=n.schema.nodes[t.level?"heading":"paragraph"];return wh(a,t)(n,i)}}},e})(Jt),aKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:Ce({language:{default:null},rawHTML:{default:null}},Dr()),code:!0,defining:!0,marks:"",parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:function(t){var n=t.getAttribute("data-raw-html"),i=t.firstElementChild;return Ce({language:i?.getAttribute("data-language")||null},n&&{rawHTML:n})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"pre",["code",Ce({"data-language":n.language},mr(n)),0]]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return wh(t.schema.nodes.codeBlock)(t,n)}}},e.prototype.moveCursor=function(t){var n=this;return function(i,a){var o=i.tr,s=i.doc,l=i.schema,f=i.selection.$from,p=n.context.view;if(p.endOfTextblock(t)&&f.node().type.name==="codeBlock"){var b=f.parent.textContent.split(`
|
|
35
|
-
`),T=t==="up"?f.start():f.end(),x=t==="up"?[T,b[0].length+T]:[T-$r(b).length,T],E=s.resolve(t==="up"?f.before():f.after()),B=t==="up"?E.nodeBefore:E.nodeAfter;if(fne(f.pos,x[0],x[1])&&!B){var F=Nh(o,E,l);if(F)return a(F),!0}}return!1}},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-p":t,"Shift-Mod-P":t,ArrowUp:this.moveCursor("up"),ArrowDown:this.moveCursor("down")}},e})(Jt),oKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"bulletList"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:Ce({rawHTML:{default:null}},Dr()),parseDOM:[Qu("ul")],toDOM:function(t){var n=t.attrs;return["ul",mr(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.changeList=function(){return function(t,n){return jw(t.schema.nodes.bulletList)(t,n)}},e.prototype.commands=function(){return{bulletList:this.changeList,taskList:zje}},e.prototype.keymaps=function(){var t=this.changeList(),n=Jh(),i=n.indent,a=n.outdent;return{"Mod-u":t,"Mod-U":t,Tab:i(),"Shift-Tab":a()}},e})(Jt),sKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"orderedList"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:Ce({order:{default:1},rawHTML:{default:null}},Dr()),parseDOM:[{tag:"ol",getAttrs:function(t){var n=t.getAttribute("start"),i=t.getAttribute("data-raw-html");return Ce({order:t.hasAttribute("start")?Number(n):1},i&&{rawHTML:i})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"ol",Ce({start:n.order===1?null:n.order},mr(n)),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return jw(t.schema.nodes.orderedList)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()(),n=Jh(),i=n.indent,a=n.outdent;return{"Mod-o":t,"Mod-O":t,Tab:i(),"Shift-Tab":a()}},e})(Jt),lKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"listItem"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"paragraph block*",selectable:!1,attrs:{task:{default:!1},checked:{default:!1},rawHTML:{default:null}},defining:!0,parseDOM:[{tag:"li",getAttrs:function(t){var n=t.getAttribute("data-raw-html");return Ce({task:t.hasAttribute("data-task"),checked:t.hasAttribute("data-task-checked")},n&&{rawHTML:n})}}],toDOM:function(t){var n=t.attrs,i=n.task,a=n.checked;if(!i)return[n.rawHTML||"li",0];var o=["task-list-item"];return a&&o.push("checked"),[n.rawHTML||"li",Ce({class:o.join(" "),"data-task":i},a&&{"data-task-checked":a}),0]}}},enumerable:!1,configurable:!0}),e.prototype.liftToPrevListItem=function(){return function(t,n){var i=t.selection,a=t.tr,o=t.schema,s=i.$from,l=i.empty,f=o.nodes.listItem,p=s.parent,b=s.node(-1);if(l&&!p.childCount&&b.type===f){if(s.index(-2)>=1)return a.delete(s.start(-1)-1,s.end(-1)),n(a),!0;var T=s.node(-3);if(T.type===f)return a.delete(s.start(-2)-1,s.end(-1)),n(a),!0}return!1}},e.prototype.keymaps=function(){var t=function(n,i){return jje(n.schema.nodes.listItem)(n,i)};return{Backspace:this.liftToPrevListItem(),Enter:t}},e})(Jt),uKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:Ce({rawHTML:{default:null}},Dr()),content:"block+",group:"block",parseDOM:[Qu("blockquote")],toDOM:function(t){var n=t.attrs;return["blockquote",mr(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return Qte(t.schema.nodes.blockQuote)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()();return{"Alt-q":t,"Alt-Q":t}},e})(Jt),cKe={left:yKe,right:gKe,up:bKe,down:kKe};function fKe(r,e,t){var n=t[0],i=t[1],a=e.resolve(r.before(n-1));return i===n&&!a.nodeBefore}function dKe(r){for(var e,t=r.depth,n;t&&(n=r.node(t),n.type.name!=="tableBodyCell");){if(n.type.name==="listItem"){var i=r.node(t-1),a=i.lastChild===n,o=((e=n.lastChild)===null||e===void 0?void 0:e.type.name)!=="paragraph";return a?!o:!1}t-=1}return!1}function hKe(r,e,t,n,i){var a=e[0],o=e[1],s=e[2];if(r==="left"||r==="up"){if(i&&!fKe(t,n,[a,o]))return!1;var l=t.before(s),f=n.resolve(l).nodeBefore;if(f)return!1}return!0}function pKe(r,e,t,n,i){if(r==="right"||r==="down"){if(i&&!dKe(t))return!1;var a=t.after(e),o=n.resolve(a).nodeAfter;if(o)return!1}return!0}function vKe(r,e,t,n){var i=e[0],a=e[1],o=i+3,s=a>=o,l=s?i+1:a,f=hKe(r,[a,o,l],t,n,s),p=pKe(r,l,t,n,s);return f&&p}function Pg(r,e,t){var n=t[0],i=t[1],a=e.getRowspanStartInfo(n,i),o=r==="up"&&n===0,s=r==="down"&&(a?.count>1?n+a.count-1:n)===e.totalRowCount-1;return o||s}function mKe(r,e,t){var n=r.doc.resolve(e.tableStartOffset-1);return n.nodeBefore?r.setSelection(xt.near(n,-1)):Nh(r,n,t)}function fd(r,e,t,n){n===void 0&&(n=!1);var i=r.doc.resolve(e.tableEndOffset);return n||!i.nodeAfter?Nh(r,i,t):r.setSelection(xt.near(i,1))}function gKe(r,e){var t=r[0],n=r[1],i=e.totalRowCount,a=e.totalColumnCount,o=n===a-1,s=t===i-1&&o;if(!s){var l=n+1,f=e.getColspanStartInfo(t,n);f?.count>1&&(l+=f.count-1),(o||l===a)&&(t+=1,l=0);var p=e.getCellInfo(t,l).offset;return p+2}return null}function yKe(r,e){var t=r[0],n=r[1],i=e.totalColumnCount,a=n===0,o=t===0&&a;if(!o){n-=1,a&&(t-=1,n=i-1);var s=e.getCellInfo(t,n),l=s.offset,f=s.nodeSize;return l+f-2}return null}function bKe(r,e){var t=r[0],n=r[1];if(t>0){var i=e.getCellInfo(t-1,n),a=i.offset,o=i.nodeSize;return a+o-2}return null}function kKe(r,e){var t=r[0],n=r[1],i=e.totalRowCount;if(t<i-1){var a=t+1,o=e.getRowspanStartInfo(t,n);o?.count>1&&(a+=o.count-1);var s=e.getCellInfo(a,n).offset;return s+2}return null}function Bg(r,e,t,n){var i=cKe[r],a=i(t,n);if(a){var o=r==="right"||r==="down"?1:-1;return e.setSelection(xt.near(e.doc.resolve(a),o))}return null}function wKe(r,e,t){var n=t[0],i=t[1];if(r==="up"||r==="down")return!1;var a=e.tableStartOffset,o=e.tableEndOffset,s=e.getCellInfo(n,i),l=s.offset,f=s.nodeSize,p=r==="left"?a:o,b=r==="left"?l-2:l+f+3;return p===b}function CKe(r,e,t){var n=r.doc.resolve(e.before(t-3));return r.setSelection(new ht(n))}function TKe(r,e,t){var n,i,a;return r==="up"?(n=t.startRowIdx,i=0,a=-1):(n=t.endRowIdx,i=e.totalColumnCount-1,a=e.getCellInfo(n,i).nodeSize+1),{targetRowIdx:n,insertColIdx:i,nodeSize:a}}function SKe(r,e,t){var n=r.getCellInfo(e,0).offset,i=r.getCellInfo(e,t-1),a=i.offset,o=i.nodeSize;return{from:n,to:a+o}}var xKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"table"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"tableHead{1} tableBody{1}",group:"block",attrs:Ce({rawHTML:{default:null}},Dr()),parseDOM:[Qu("table")],toDOM:function(t){var n=t.attrs;return["table",mr(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.addTable=function(){return function(t){return t===void 0&&(t={rowCount:2,columnCount:1,data:[]}),function(n,i){var a=t.rowCount,o=t.columnCount,s=t.data,l=n.schema,f=n.selection,p=n.tr,b=f.from,T=f.to,x=f.$from,E=b===T;if(E&&!Du(x)){var B=l.nodes,F=B.tableHead,_=B.tableBody,X=s?.slice(0,o),ee=s?.slice(o,s.length),se=Zje(o,l,X),de=Gw(a-1,o,l,ee),ae=l.nodes.table.create(null,[F.create(null,se),_.create(null,de)]);return i(p.replaceSelectionWith(ae)),!0}return!1}}},e.prototype.removeTable=function(){return function(){return function(t,n){var i=t.selection,a=t.tr,o=Fr.create(i.$anchor);if(o){var s=o.tableStartOffset,l=o.tableEndOffset,f=s-1,p=er(a.delete(f,l),f);return n(a.setSelection(p)),!0}return!1}}},e.prototype.addColumn=function(t){return function(){return function(n,i){var a=n.selection,o=n.tr,s=n.schema,l=si(a),f=l.anchor,p=l.head;if(f&&p){for(var b=Fr.create(f),T=b.getRectOffsets(f,p),x=t==="left"?T.startColIdx:T.endColIdx+1,E=No(T).columnCount,B=b.totalRowCount,F=0;F<B;F+=1){var _=nu(E,F,s);o.insert(o.mapping.map(b.posAt(F,x)),_)}return i(o),!0}return!1}}},e.prototype.removeColumn=function(){return function(){return function(t,n){var i=t.selection,a=t.tr,o=si(i),s=o.anchor,l=o.head;if(s&&l){var f=Fr.create(s),p=f.getRectOffsets(s,l),b=f.totalColumnCount,T=f.totalRowCount,x=No(p).columnCount,E=x===b;if(E)return!1;for(var B=p.startColIdx,F=p.endColIdx,_=a.mapping.maps.length,X=0;X<T;X+=1)for(var ee=F;ee>=B;ee-=1){var se=f.getCellInfo(X,ee),de=se.offset,ae=se.nodeSize,le=a.mapping.slice(_).map(de),Te=le+ae;a.delete(le,Te)}return n(a),!0}return!1}}},e.prototype.addRow=function(t){return function(){return function(n,i){var a=n.selection,o=n.schema,s=n.tr,l=si(a),f=l.anchor,p=l.head;if(f&&p){var b=Fr.create(f),T=b.totalColumnCount,x=b.getRectOffsets(f,p),E=No(x).rowCount,B=TKe(t,b,x),F=B.targetRowIdx,_=B.insertColIdx,X=B.nodeSize,ee=F===0;if(!ee){for(var se=[],de=s.mapping.map(b.posAt(F,_))+X,ae=[],le=0;le<T;le+=1)ae=ae.concat(nu(1,F,o));for(var Te=0;Te<E;Te+=1)se.push(o.nodes.tableRow.create(null,ae));return i(s.insert(de,se)),!0}}return!1}}},e.prototype.removeRow=function(){return function(){return function(t,n){var i=t.selection,a=t.tr,o=si(i),s=o.anchor,l=o.head;if(s&&l){var f=Fr.create(s),p=f.totalRowCount,b=f.totalColumnCount,T=f.getRectOffsets(s,l),x=No(T).rowCount,E=T.startRowIdx,B=T.endRowIdx,F=E===0,_=x===p-1;if(_||F)return!1;for(var X=B;X>=E;X-=1){var ee=SKe(f,X,b),se=ee.from,de=ee.to;a.delete(se-1,de+1)}return n(a),!0}return!1}}},e.prototype.alignColumn=function(){return function(t){return t===void 0&&(t={align:"center"}),function(n,i){var a=t.align,o=n.selection,s=n.tr,l=si(o),f=l.anchor,p=l.head;if(f&&p){for(var b=Fr.create(f),T=b.totalRowCount,x=b.getRectOffsets(f,p),E=x.startColIdx,B=x.endColIdx,F=0;F<T;F+=1)for(var _=E;_<=B;_+=1)if(!b.extendedRowspan(F,_)&&!b.extendedColspan(F,_)){var X=b.getNodeAndPos(F,_),ee=X.node,se=X.pos,de=Qje(ee,{align:a});s.setNodeMarkup(se,null,de)}return i(s),!0}return!1}}},e.prototype.moveToCell=function(t){return function(n,i){var a=n.selection,o=n.tr,s=n.schema,l=si(a),f=l.anchor,p=l.head;if(f&&p){var b=Fr.create(f),T=b.getCellIndex(f),x=void 0;if(Pg(t,b,T)?x=fd(o,b,s):x=Bg(t,o,T,b),x)return i(x),!0}return!1}},e.prototype.moveInCell=function(t){var n=this;return function(i,a){var o=i.selection,s=i.tr,l=i.doc,f=i.schema,p=o.$from,b=n.context.view;if(!b.endOfTextblock(t))return!1;var T=Bi(p,function(ee){var se=ee.type;return se.name==="tableHeadCell"||se.name==="tableBodyCell"});if(T){var x=Bi(p,function(ee){var se=ee.type;return se.name==="paragraph"}),E=T.depth;if(x&&vKe(t,[E,x.depth],p,l)){var B=si(o).anchor,F=Fr.create(B),_=F.getCellIndex(B),X=void 0;if(wKe(t,F,_)?X=CKe(s,p,E):Pg(t,F,_)?t==="up"?X=mKe(s,F,f):t==="down"&&(X=fd(s,F,f)):X=Bg(t,s,_,F),X)return a(X),!0}}return!1}},e.prototype.deleteCells=function(){return function(t,n){var i=t.schema,a=t.selection,o=t.tr,s=si(a),l=s.anchor,f=s.head,p=a instanceof St;if(l&&f&&!p){for(var b=Fr.create(l),T=b.getRectOffsets(l,f),x=T.startRowIdx,E=T.startColIdx,B=T.endRowIdx,F=T.endColIdx,_=x;_<=B;_+=1)for(var X=E;X<=F;X+=1)if(!b.extendedRowspan(_,X)&&!b.extendedColspan(_,X)){var ee=b.getNodeAndPos(_,X),se=ee.node,de=ee.pos,ae=nu(1,_,i,se.attrs);o.replaceWith(o.mapping.map(de),o.mapping.map(de+se.nodeSize),ae)}return n(o),!0}return!1}},e.prototype.exitTable=function(){return function(t,n){var i=t.selection,a=t.tr,o=t.schema,s=i.$from,l=Bi(s,function(T){var x=T.type;return x.name==="tableHeadCell"||x.name==="tableBodyCell"});if(l){var f=Bi(s,function(T){var x=T.type;return x.name==="paragraph"});if(f){var p=si(i).anchor,b=Fr.create(p);return n(fd(a,b,o,!0)),!0}}return!1}},e.prototype.commands=function(){return{addTable:this.addTable(),removeTable:this.removeTable(),addColumnToLeft:this.addColumn("left"),addColumnToRight:this.addColumn("right"),removeColumn:this.removeColumn(),addRowToUp:this.addRow("up"),addRowToDown:this.addRow("down"),removeRow:this.removeRow(),alignColumn:this.alignColumn()}},e.prototype.keymaps=function(){var t=this.deleteCells();return{Tab:this.moveToCell("right"),"Shift-Tab":this.moveToCell("left"),ArrowUp:this.moveInCell("up"),ArrowDown:this.moveInCell("down"),ArrowLeft:this.moveInCell("left"),ArrowRight:this.moveInCell("right"),Backspace:t,"Mod-Backspace":t,Delete:t,"Mod-Delete":t,"Mod-Enter":this.exitTable()}},e})(Jt),EKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableHead"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"tableRow{1}",attrs:Ce({rawHTML:{default:null}},Dr()),parseDOM:[Qu("thead")],toDOM:function(t){var n=t.attrs;return["thead",mr(n),0]}}},enumerable:!1,configurable:!0}),e})(Jt),MKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableBody"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"tableRow+",attrs:Ce({rawHTML:{default:null}},Dr()),parseDOM:[{tag:"tbody",getAttrs:function(t){var n=t.querySelectorAll("tr"),i=n[0].children.length,a=t.getAttribute("data-raw-html");return i?Ce({},a&&{rawHTML:a}):!1}}],toDOM:function(t){var n=t.attrs;return["tbody",mr(n),0]}}},enumerable:!1,configurable:!0}),e})(Jt),AKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableRow"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"(tableHeadCell | tableBodyCell)*",attrs:Ce({rawHTML:{default:null}},Dr()),parseDOM:[{tag:"tr",getAttrs:function(t){var n=t.children.length,i=t.getAttribute("data-raw-html");return n?Ce({},i&&{rawHTML:i}):!1}}],toDOM:function(t){var n=t.attrs;return["tr",mr(n),0]}}},enumerable:!1,configurable:!0}),e})(Jt),OKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableHeadCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"paragraph+",attrs:Ce({align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},extended:{default:null}},Dr()),isolating:!0,parseDOM:[Uw("th")],toDOM:function(t){var n=t.attrs,i=Vw(n);return["th",Ce(Ce({},i),mr(n)),0]}}},enumerable:!1,configurable:!0}),e})(Jt),NKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"tableBodyCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"(paragraph | bulletList | orderedList)+",attrs:{align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},rowspan:{default:null},extended:{default:null}},isolating:!0,parseDOM:[Uw("td")],toDOM:function(t){var n=t.attrs,i=Vw(n);return["td",i,0]}}},enumerable:!1,configurable:!0}),e})(Jt),DKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"image"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{inline:!0,attrs:Ce({imageUrl:{default:""},altText:{default:null},rawHTML:{default:null}},Dr()),group:"inline",selectable:!1,parseDOM:[{tag:"img[src]",getAttrs:function(t){var n=no(t,{RETURN_DOM_FRAGMENT:!0}).firstChild,i=n.getAttribute("src")||"",a=n.getAttribute("data-raw-html"),o=n.getAttribute("alt");return Ce({imageUrl:i,altText:o},a&&{rawHTML:a})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"img",Ce(Ce({src:Oo(n.imageUrl)},n.altText&&{alt:n.altText}),mr(n))]}}},enumerable:!1,configurable:!0}),e.prototype.addImage=function(){return function(t){return function(n,i){var a=n.schema,o=n.tr,s=t,l=s.imageUrl,f=s.altText;if(!l)return!1;var p=a.nodes.image.createAndFill(Ce({imageUrl:l},f&&{altText:f}));return i(o.replaceSelectionWith(p).scrollIntoView()),!0}}},e.prototype.commands=function(){return{addImage:this.addImage()}},e})(Jt),Fg=1,LKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:Ce({rawHTML:{default:null}},Dr()),group:"block",parseDOM:[{tag:"hr"}],selectable:!1,toDOM:function(t){var n=t.attrs;return["div",mr(n),[n.rawHTML||"hr"]]}}},enumerable:!1,configurable:!0}),e.prototype.hr=function(){var t=this;return function(){return function(n,i){var a,o=n.selection,s=o.$from,l=o.$to;if(s===l){var f=n.doc,p=n.schema.nodes,b=p.thematicBreak,T=p.paragraph,x=[b.create()],E=s.node(Fg),B=f.child(f.childCount-1)===E,F=f.resolve(s.after(Fg)),_=((a=s.nodeAfter)===null||a===void 0?void 0:a.type.name)===t.name;return(B||_)&&x.push(T.create()),i(n.tr.insert(F.pos,x).scrollIntoView()),!0}return!1}}},e.prototype.commands=function(){return{hr:this.hr()}},e.prototype.keymaps=function(){var t=this.hr()();return{"Mod-l":t,"Mod-L":t}},e})(Jt),RKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=["b","strong"].map(function(n){return{tag:n,getAttrs:function(i){var a=i.getAttribute("data-raw-html");return Ce({},a&&{rawHTML:a})}}});return{attrs:Ce({rawHTML:{default:null}},Dr()),parseDOM:t,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"strong",mr(i)]}}},enumerable:!1,configurable:!0}),e.prototype.bold=function(){return function(){return function(t,n){return $s(t.schema.marks.strong)(t,n)}}},e.prototype.commands=function(){return{bold:this.bold()}},e.prototype.keymaps=function(){var t=this.bold()();return{"Mod-b":t,"Mod-B":t}},e})(tr),IKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"emph"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=["i","em"].map(function(n){return{tag:n,getAttrs:function(i){var a=i.getAttribute("data-raw-html");return Ce({},a&&{rawHTML:a})}}});return{attrs:Ce({rawHTML:{default:null}},Dr()),parseDOM:t,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"em",mr(i)]}}},enumerable:!1,configurable:!0}),e.prototype.italic=function(){return function(){return function(t,n){return $s(t.schema.marks.emph)(t,n)}}},e.prototype.commands=function(){return{italic:this.italic()}},e.prototype.keymaps=function(){var t=this.italic()();return{"Mod-i":t,"Mod-I":t}},e})(tr),PKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"strike"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=["s","del"].map(function(n){return{tag:n,getAttrs:function(i){var a=i.getAttribute("data-raw-html");return Ce({},a&&{rawHTML:a})}}});return{attrs:Ce({rawHTML:{default:null}},Dr()),parseDOM:t,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"del",mr(i)]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return $s(t.schema.marks.strike)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()();return{"Mod-s":t,"Mod-S":t}},e})(tr),BKe=(function(r){Ge(e,r);function e(t){var n=r.call(this)||this;return n.linkAttributes=t,n}return Object.defineProperty(e.prototype,"name",{get:function(){return"link"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){var t=this;return{attrs:Ce({linkUrl:{default:""},title:{default:null},rawHTML:{default:null}},Dr()),inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(n){var i=no(n,{RETURN_DOM_FRAGMENT:!0}).firstChild,a=i.getAttribute("href")||"",o=i.getAttribute("title")||"",s=i.getAttribute("data-raw-html");return Ce({linkUrl:a,title:o},s&&{rawHTML:s})}}],toDOM:function(n){var i=n.attrs;return[i.rawHTML||"a",Ce(Ce({href:Oo(i.linkUrl)},t.linkAttributes),mr(i))]}}},enumerable:!1,configurable:!0}),e.prototype.addLink=function(){return function(t){return function(n,i){var a=t,o=a.linkUrl,s=a.linkText,l=s===void 0?"":s,f=n.schema,p=n.tr,b=n.selection,T=b.empty,x=b.from,E=b.to;if(x&&E&&o){var B={linkUrl:o},F=f.mark("link",B);if(T&&l){var _=_r(f,l,F);p.replaceRangeWith(x,E,_)}else p.addMark(x,E,F);return i(p.scrollIntoView()),!0}return!1}}},e.prototype.toggleLink=function(){return function(t){return function(n,i){return $s(n.schema.marks.link,t)(n,i)}}},e.prototype.commands=function(){return{addLink:this.addLink(),toggleLink:this.toggleLink()}},e})(tr),FKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"code"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:Ce({rawHTML:{default:null}},Dr()),parseDOM:[{tag:"code",getAttrs:function(t){var n=t.getAttribute("data-raw-html");return Ce({},n&&{rawHTML:n})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"code",mr(n)]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return $s(t.schema.marks.code)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-c":t,"Shift-Mod-C":t}},e})(tr),qKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:{info:{default:null}},atom:!0,code:!0,defining:!0,parseDOM:[{tag:"div[data-custom-info]",getAttrs:function(t){var n=t.getAttribute("data-custom-info");return{info:n}}}],toDOM:function(t){var n=t.attrs;return["div",{"data-custom-info":n.info||null},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(t){return function(n,i){return t?.info?wh(n.schema.nodes.customBlock,t)(n,i):!1}}},e})(Jt),HKe=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"frontMatter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",code:!0,defining:!0,parseDOM:[{preserveWhitespace:"full",tag:"div[data-front-matter]"}],toDOM:function(){return["div",{"data-front-matter":"true"},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n,i){var a=t.selection.$from;return i.endOfTextblock("down")&&a.node().type.name==="frontMatter"?kh(t,n):!1}}},e.prototype.keymaps=function(){return{Enter:this.commands()()}},e})(Jt),_Ke=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"name",{get:function(){return"htmlComment"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",code:!0,defining:!0,parseDOM:[{preserveWhitespace:"full",tag:"div[data-html-comment]"}],toDOM:function(){return["div",{"data-html-comment":"true"},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n,i){var a=t.selection.$from;return i.endOfTextblock("down")&&a.node().type.name==="htmlComment"?kh(t,n):!1}}},e.prototype.keymaps=function(){return{Enter:this.commands()()}},e})(Jt);function zKe(r){return new jk([new eKe,new tKe,new nKe,new iKe,new aKe,new oKe,new sKe,new lKe,new uKe,new xKe,new EKe,new MKe,new AKe,new OKe,new NKe,new DKe,new LKe,new RKe,new IKe,new PKe,new BKe(r),new FKe,new qKe,new HKe,new $k,new _Ke])}var VKe=Ze("contents"),UKe=(function(r){Ge(e,r);function e(t,n){var i=r.call(this,t)||this,a=n.toDOMAdaptor,o=n.htmlSchemaMap,s=o===void 0?{}:o,l=n.linkAttributes,f=l===void 0?{}:l,p=n.useCommandShortcut,b=p===void 0?!0:p,T=n.wwPlugins,x=T===void 0?[]:T,E=n.wwNodeViews,B=E===void 0?{}:E;return i.editorType="wysiwyg",i.el.classList.add("ww-mode"),i.toDOMAdaptor=a,i.linkAttributes=f,i.extraPlugins=x,i.pluginNodeViews=B,i.specs=i.createSpecs(),i.schema=i.createSchema(s),i.context=i.createContext(),i.keymaps=i.createKeymaps(b),i.view=i.createView(),i.commands=i.createCommands(),i.specs.setContext(Ce(Ce({},i.context),{view:i.view})),i.initEvent(),i}return e.prototype.createSpecs=function(){return zKe(this.linkAttributes)},e.prototype.createContext=function(){return{schema:this.schema,eventEmitter:this.eventEmitter}},e.prototype.createSchema=function(t){return new db({nodes:Ce(Ce({},this.specs.nodes),t.nodes),marks:Ce(Ce({},this.specs.marks),t.marks)})},e.prototype.createPlugins=function(){return vn([iGe(),lGe(this.eventEmitter),uGe(),mGe(this.eventEmitter)],this.createPluginProps()).concat(this.defaultPlugins)},e.prototype.createPluginNodeViews=function(){var t=this,n=t.eventEmitter,i=t.pluginNodeViews,a={};return i&&Object.keys(i).forEach(function(o){a[o]=function(s,l,f){return i[o](s,l,f,n)}}),a},e.prototype.createView=function(){var t=this,n=this,i=n.toDOMAdaptor,a=n.eventEmitter;return new _u(this.el,{state:this.createState(),attributes:{class:VKe},nodeViews:Ce({customBlock:function(o,s,l){return new gGe(o,s,l,i)},image:function(o,s,l){return new yGe(o,s,l,a)},codeBlock:function(o,s,l){return new wGe(o,s,l,a)},widget:Uk},this.createPluginNodeViews()),dispatchTransaction:function(o){var s=t.view.state.applyTransaction(o).state;t.view.updateState(s),t.emitChangeEvent(o.scrollIntoView()),t.eventEmitter.emit("setFocusedNode",s.selection.$from.node(1))},transformPastedHTML:FGe,transformPasted:function(o){return VGe(o,t.schema,Du(t.view.state.selection.$from))},handlePaste:function(o,s,l){return XGe(o,l)},handleKeyDown:function(o,s){return t.eventEmitter.emit("keydown",t.editorType,s),!1},handleDOMEvents:{paste:function(o,s){var l=s.clipboardData||window.clipboardData,f=l?.items;if(f){var p=pi(f).some(function(T){return T.kind==="string"&&T.type==="text/rtf"});if(!p){var b=Vk(f);b&&(s.preventDefault(),Fh(t.eventEmitter,b,s.type))}}return!1},keyup:function(o,s){return t.eventEmitter.emit("keyup",t.editorType,s),!1},scroll:function(){return t.eventEmitter.emit("scroll","editor"),!0}}})},e.prototype.createCommands=function(){return this.specs.commands(this.view,Jh())},e.prototype.getHTML=function(){return Bh(this.view.dom.innerHTML)},e.prototype.getModel=function(){return this.view.state.doc},e.prototype.getSelection=function(){var t=this.view.state.selection,n=t.from,i=t.to;return[n,i]},e.prototype.getSchema=function(){return this.view.state.schema},e.prototype.replaceSelection=function(t,n,i){var a=this.view.state,o=a.schema,s=a.tr,l=t.split(`
|
|
36
|
-
`),f=l.map(function(T){return wu(o,Ga(T,o))}),p=new $e(De.from(f),1,1),b=Ri(n)&&Ri(i)?s.replaceRange(n,i,p):s.replaceSelection(p);this.view.dispatch(b),this.focus()},e.prototype.deleteSelection=function(t,n){var i=this.view.state.tr,a=Ri(t)&&Ri(n)?i.deleteRange(t,n):i.deleteSelection();this.view.dispatch(a.scrollIntoView())},e.prototype.getSelectedText=function(t,n){var i=this.view.state,a=i.doc,o=i.selection,s=o.from,l=o.to;return Ri(t)&&Ri(n)&&(s=t,l=n),a.textBetween(s,l,`
|
|
37
|
-
`)},e.prototype.setModel=function(t,n){n===void 0&&(n=!1);var i=this.view.state,a=i.tr,o=i.doc;this.view.dispatch(a.replaceWith(0,o.content.size,t)),n&&this.moveCursorToEnd(!0)},e.prototype.setSelection=function(t,n){n===void 0&&(n=t);var i=this.view.state.tr,a=er(i,t,n);this.view.dispatch(i.setSelection(a).scrollIntoView())},e.prototype.addWidget=function(t,n,i){var a=this.view,o=a.dispatch,s=a.state;o(s.tr.setMeta("widget",{pos:i??s.selection.to,node:t,style:n}))},e.prototype.replaceWithWidget=function(t,n,i){var a=this.view.state,o=a.tr,s=a.schema,l=Ga(i,s);this.view.dispatch(o.replaceWith(t,n,l))},e.prototype.getRangeInfoOfNode=function(t){var n=this.view.state,i=n.doc,a=n.selection,o=t?i.resolve(t):a.$from,s=o.marks(),l=o.node(),f=o.start(),p=o.end(),b=l.type.name;if(s.length||b==="paragraph"){var T=s[s.length-1],x=function(E){return E.length?zr(E,T):!0};b=T?T.type.name:"text",l.forEach(function(E,B){var F=E.isText,_=E.nodeSize,X=E.marks,ee=o.pos-f;F&&B<=ee&&B+_>=ee&&x(X)&&(f=f+B,p=f+_)})}return{range:[f,p],type:b}},e})(Wk),$Ke=ei,WKe=gu;function jKe(r){return!$Ke(r)&&!WKe(r)}var GKe=jKe,KKe=GKe;function JKe(r){return KKe(r)&&r!==!1}var YKe=JKe,XKe=YKe;function ZKe(r){return!XKe(r)}var QKe=ZKe,qg=["afterPreviewRender","updatePreview","changeMode","needChangeMode","command","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","scroll","contextmenu","show","hide","changeLanguage","changeToolbarState","toggleScrollSync","mixinTableOffsetMapPrototype","setFocusedNode","removePopupWidget","query","openPopup","closePopup","addImageBlobHook","beforePreviewRender","beforeConvertWysiwygToMarkdown","load","loadUI","change","caretChange","destroy","focus","blur","keydown","keyup"],o0=(function(){function r(){var e=this;this.events=new Xw,this.eventTypes=qg.reduce(function(t,n){return Ce(Ce({},t),{type:n})},{}),this.hold=!1,qg.forEach(function(t){e.addEventType(t)})}return r.prototype.listen=function(e,t){var n=this.getTypeInfo(e),i=this.events.get(n.type)||[];if(!this.hasEventType(n.type))throw new Error("There is no event type "+n.type);n.namespace&&(t.namespace=n.namespace),i.push(t),this.events.set(n.type,i)},r.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=this.getTypeInfo(e),a=this.events.get(i.type),o=[];return!this.hold&&a&&a.forEach(function(s){var l=s.apply(void 0,t);ei(l)||o.push(l)}),o},r.prototype.emitReduce=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var a=this.events.get(e);return!this.hold&&a&&a.forEach(function(o){var s=o.apply(void 0,vn([t],n));QKe(s)||(t=s)}),t},r.prototype.getTypeInfo=function(e){var t=e.split(".");return{type:t[0],namespace:t[1]}},r.prototype.hasEventType=function(e){return!ei(this.eventTypes[this.getTypeInfo(e).type])},r.prototype.addEventType=function(e){if(this.hasEventType(e))throw new Error("There is already have event type "+e);this.eventTypes[e]=e},r.prototype.removeEventHandler=function(e,t){var n=this,i=this.getTypeInfo(e),a=i.type,o=i.namespace;a&&t?this.removeEventHandlerWithHandler(a,t):a&&!o?this.events.delete(a):!a&&o?this.events.forEach(function(s,l){n.removeEventHandlerWithTypeInfo(l,o)}):a&&o&&this.removeEventHandlerWithTypeInfo(a,o)},r.prototype.removeEventHandlerWithHandler=function(e,t){var n=this.events.get(e);if(n){var i=n.indexOf(t);n.indexOf(t)>=0&&n.splice(i,1)}},r.prototype.removeEventHandlerWithTypeInfo=function(e,t){var n=[],i=this.events.get(e);i&&(i.map(function(a){return a.namespace!==t&&n.push(a),null}),this.events.set(e,n))},r.prototype.getEvents=function(){return this.events},r.prototype.holdEventInvoke=function(e){this.hold=!0,e(),this.hold=!1},r})(),e4e=(function(){function r(e,t,n,i){this.eventEmitter=e,this.mdCommands=t,this.wwCommands=n,this.getEditorType=i,this.initEvent()}return r.prototype.initEvent=function(){var e=this;this.eventEmitter.listen("command",function(t,n){e.exec(t,n)})},r.prototype.addCommand=function(e,t,n){e==="markdown"?this.mdCommands[t]=n:this.wwCommands[t]=n},r.prototype.deleteCommand=function(e,t){e==="markdown"?delete this.mdCommands[t]:delete this.wwCommands[t]},r.prototype.exec=function(e,t){var n=this.getEditorType();n==="markdown"?this.mdCommands[e](t):this.wwCommands[e](t)},r})();function au(r){return r[r.length-1]===`
|
|
38
|
-
`?r.slice(0,r.length-1):r}function Qd(r,e){var t=r.schema,n=e.literal,i=n.match(zo);if(i){var a=i[1],o=i[3],s=(a||o).toLowerCase();return e.type==="htmlInline"&&!!(t.marks[s]||t.nodes[s])}return!1}function eh(r){var e=r.type;return zr(["text","strong","emph","strike","image","link","code"],e)}function Hg(r){return r?.type==="softbreak"}function ds(r){var e=r.type,t=r.literal,n=e==="htmlInline"&&t.match(zo);if(n){var i=n[1],a=n[3],o=i||a;if(o)return zr(["ul","ol","li"],o.toLowerCase())}return!1}function t4e(r){var e=r.literal,t=/data-task/.test(e),n=/data-task-checked/.test(e);return{task:t,checked:n}}function _g(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var n=document.createElement("div");n.innerHTML=no(r);var i=n.firstChild;return e.map(function(a){return i.getAttribute(a)||""})}function r4e(r){var e={};return Object.keys(r).forEach(function(t){var n=t.split(", ");n.forEach(function(i){var a=i.toLowerCase();e[a]=r[t]})}),e}var n4e={"b, strong":function(r,e,t){var n=r.schema.marks.strong;t?r.openMark(n.create({rawHTML:t})):r.closeMark(n)},"i, em":function(r,e,t){var n=r.schema.marks.emph;t?r.openMark(n.create({rawHTML:t})):r.closeMark(n)},"s, del":function(r,e,t){var n=r.schema.marks.strike;t?r.openMark(n.create({rawHTML:t})):r.closeMark(n)},code:function(r,e,t){var n=r.schema.marks.code;t?r.openMark(n.create({rawHTML:t})):r.closeMark(n)},a:function(r,e,t){var n=e.literal,i=r.schema.marks.link;if(t){var a=_g(n,"href")[0];r.openMark(i.create({linkUrl:a,rawHTML:t}))}else r.closeMark(i)},img:function(r,e,t){var n=e.literal;if(t){var i=_g(n,"src","alt"),a=i[0],o=i[1],s=r.schema.nodes.image;r.addNode(s,Ce({rawHTML:t,imageUrl:a},o&&{altText:o}))}},hr:function(r,e,t){r.addNode(r.schema.nodes.thematicBreak,{rawHTML:t})},br:function(r,e){var t=r.schema.nodes.paragraph,n=e.parent,i=e.prev,a=e.next;n?.type==="paragraph"?(Hg(i)&&r.openNode(t),Hg(a)?r.closeNode():a&&(r.closeNode(),r.openNode(t))):n?.type==="tableCell"&&(i&&(eh(i)||Qd(r,i))&&r.closeNode(),a&&(eh(a)||Qd(r,a))&&r.openNode(t))},pre:function(r,e,t){var n,i,a=document.createElement("div");a.innerHTML=e.literal;var o=(i=(n=a.firstChild)===null||n===void 0?void 0:n.firstChild)===null||i===void 0?void 0:i.textContent;r.openNode(r.schema.nodes.codeBlock,{rawHTML:t}),r.addText(au(o)),r.closeNode()},"ul, ol":function(r,e,t){if(e.parent.type==="tableCell"){var n=r.schema.nodes,i=n.bulletList,a=n.orderedList,o=n.paragraph,s=t==="ul"?i:a;t?(e.prev&&!ds(e.prev)&&r.closeNode(),r.openNode(s,{rawHTML:t})):(r.closeNode(),e.next&&!ds(e.next)&&r.openNode(o))}},li:function(r,e,t){var n;if(((n=e.parent)===null||n===void 0?void 0:n.type)==="tableCell"){var i=r.schema.nodes,a=i.listItem,o=i.paragraph;if(t){var s=t4e(e);e.prev&&!ds(e.prev)&&r.closeNode(),r.openNode(a,Ce({rawHTML:t},s)),e.next&&!ds(e.next)&&r.openNode(o)}else e.prev&&!ds(e.prev)&&r.closeNode(),r.closeNode()}}},i4e=r4e(n4e);function zg(r){return r.type==="htmlInline"&&Id.test(r.literal)}function s0(r){pi(r.childNodes).forEach(function(e){if(ju(e)){var t=e.nodeName.toLowerCase();e.setAttribute("data-raw-html",t),e.childNodes&&s0(e)}})}var Vg={text:function(r,e){r.addText(e.literal||"")},paragraph:function(r,e,t,n){var i,a=t.entering;if(a){var o=r.schema.nodes.paragraph;((i=e.prev)===null||i===void 0?void 0:i.type)==="paragraph"&&(r.openNode(o,n),r.closeNode()),r.openNode(o,n)}else r.closeNode()},heading:function(r,e,t,n){var i=t.entering;if(i){var a=e,o=a.level,s=a.headingType;r.openNode(r.schema.nodes.heading,Ce({level:o,headingType:s},n))}else r.closeNode()},codeBlock:function(r,e,t){var n=r.schema.nodes.codeBlock,i=e,a=i.info,o=i.literal;r.openNode(n,Ce({language:a},t)),r.addText(au(o||"")),r.closeNode()},list:function(r,e,t,n){var i=t.entering;if(i){var a=r.schema.nodes,o=a.bulletList,s=a.orderedList,l=e.listData,f=l.type,p=l.start;f==="bullet"?r.openNode(o,n):r.openNode(s,Ce({order:p},n))}else r.closeNode()},item:function(r,e,t,n){var i=t.entering,a=r.schema.nodes.listItem,o=e.listData,s=o.task,l=o.checked;if(i){var f=Ce(Ce(Ce({},s&&{task:s}),l&&{checked:l}),n);r.openNode(a,f)}else r.closeNode()},blockQuote:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.blockQuote,n):r.closeNode()},image:function(r,e,t,n){var i=t.entering,a=t.skipChildren,o=r.schema.nodes.image,s=e,l=s.destination,f=s.firstChild;i&&a&&a(),r.addNode(o,Ce(Ce({imageUrl:l},f&&{altText:f.literal}),n))},thematicBreak:function(r,e,t,n){r.addNode(r.schema.nodes.thematicBreak,n)},strong:function(r,e,t,n){var i=t.entering,a=r.schema.marks.strong;i?r.openMark(a.create(n)):r.closeMark(a)},emph:function(r,e,t,n){var i=t.entering,a=r.schema.marks.emph;i?r.openMark(a.create(n)):r.closeMark(a)},link:function(r,e,t,n){var i=t.entering,a=r.schema.marks.link,o=e,s=o.destination,l=o.title;if(i){var f=Ce({linkUrl:s,title:l},n);r.openMark(a.create(f))}else r.closeMark(a)},softbreak:function(r,e){if(e.parent.type==="paragraph"){var t=e.prev,n=e.next;t&&!zg(t)&&r.closeNode(),n&&!zg(n)&&r.openNode(r.schema.nodes.paragraph)}},table:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.table,n):r.closeNode()},tableHead:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.tableHead,n):r.closeNode()},tableBody:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.tableBody,n):r.closeNode()},tableRow:function(r,e,t,n){var i=t.entering;i?r.openNode(r.schema.nodes.tableRow,n):r.closeNode()},tableCell:function(r,e,t){var n=t.entering;if(!e.ignored){var i=function(E){return E&&(eh(E)||Qd(r,E))};if(n){var a=r.schema.nodes,o=a.tableHeadCell,s=a.tableBodyCell,l=a.paragraph,f=e.parent.parent,p=f.type==="tableHead"?o:s,b=f.parent,T=(b.columns[e.startIdx]||{}).align,x=Ce({},e.attrs);T&&(x.align=T),r.openNode(p,x),i(e.firstChild)&&r.openNode(l)}else i(e.lastChild)&&r.closeNode(),r.closeNode()}},strike:function(r,e,t,n){var i=t.entering,a=r.schema.marks.strike;i?r.openMark(a.create(n)):r.closeMark(a)},code:function(r,e,t,n){var i=r.schema.marks.code;r.openMark(i.create(n)),r.addText(au(e.literal||"")),r.closeMark(i)},customBlock:function(r,e){var t=r.schema.nodes,n=t.customBlock,i=t.paragraph,a=e,o=a.info,s=a.literal;r.openNode(n,{info:o}),r.addText(au(s||"")),r.closeNode(),e.next||(r.openNode(i),r.closeNode())},frontMatter:function(r,e){r.openNode(r.schema.nodes.frontMatter),r.addText(e.literal),r.closeNode()},htmlInline:function(r,e){var t=e.literal,n=t.match(zo),i=n[1],a=n[3],o=(i||a).toLowerCase(),s=r.schema.marks[o],l=no(t);if(s?.spec.attrs.htmlInline)if(i){var f=Jd(l);r.openMark(s.create({htmlAttrs:f}))}else r.closeMark(s);else{var p=i4e[o];p&&p(r,e,i)}},htmlBlock:function(r,e){var t=e.literal,n=document.createElement("div"),i=zne.test(t);if(i)r.openNode(r.schema.nodes.htmlComment),r.addText(e.literal),r.closeNode();else{var a=t.match(zo),o=a[1],s=a[3],l=(o||s).toLowerCase(),f=r.schema.nodes[l],p=no(t);if(f?.spec.attrs.htmlBlock){var b=Jd(p),T=Hw(e,l);r.addNode(f,{htmlAttrs:b,childrenHTML:T})}else n.innerHTML=p,s0(n),r.convertByDOMParser(n)}},customInline:function(r,e,t){var n=t.entering,i=t.skipChildren,a=e,o=a.info,s=a.firstChild,l=r.schema;if(o.indexOf("widget")!==-1&&n){var f=Nk(e);i(),r.addNode(l.nodes.widget,{info:o},[l.text(Ak(o,f))])}else{var p="$$";n&&(p+=s?o+" ":o),r.addText(p)}}};function a4e(r){var e=Object.keys(r),t=Ce({},Vg),n=new Gh({gfm:!0,nodeId:!0,convertors:r}),i=n.getConvertors();return e.forEach(function(a){var o=Vg[a];o&&!zr(["htmlBlock","htmlInline"],a)&&(t[a]=function(s,l,f){f.origin=function(){return i[a](l,f,i)};var p=r[a](l,f),b;if(p){var T=Array.isArray(p)?p[0]:p,x=T.attributes,E=T.classNames;b={htmlAttrs:x,classNames:E}}o(s,l,f,b)})}),t}function o4e(r,e){return r.isText&&e.isText&&qt.sameSet(r.marks,e.marks)?r.withText(r.text+e.text):!1}var s4e=(function(){function r(e,t){this.schema=e,this.convertors=t,this.stack=[{type:this.schema.topNodeType,attrs:null,content:[]}],this.marks=qt.none}return r.prototype.top=function(){return $r(this.stack)},r.prototype.push=function(e){this.stack.length&&this.top().content.push(e)},r.prototype.addText=function(e){if(e){var t=this.top().content,n=$r(t),i=this.schema.text(e,this.marks),a=n&&o4e(n,i);a?t[t.length-1]=a:t.push(i)}},r.prototype.openMark=function(e){this.marks=e.addToSet(this.marks)},r.prototype.closeMark=function(e){this.marks=e.removeFromSet(this.marks)},r.prototype.addNode=function(e,t,n){var i=e.createAndFill(t,n,this.marks);return i?(this.push(i),i):null},r.prototype.openNode=function(e,t){this.stack.push({type:e,attrs:t,content:[]})},r.prototype.closeNode=function(){this.marks.length&&(this.marks=qt.none);var e=this.stack.pop(),t=e.type,n=e.attrs,i=e.content;return this.addNode(t,n,i)},r.prototype.convertByDOMParser=function(e){var t=this,n=Ja.fromSchema(this.schema).parse(e);n.content.forEach(function(i){return t.push(i)})},r.prototype.closeUnmatchedHTMLInline=function(e,t){var n;if(!t&&e.type!=="htmlInline")for(var i=this.stack.length-1,a=i;a>=0;a-=1){var o=this.stack[a];if(!((n=o.attrs)===null||n===void 0)&&n.rawHTML)o.content.length?this.closeNode():this.stack.pop();else break}},r.prototype.convert=function(e,t){for(var n=e.walker(),i=n.next(),a=function(){var s=i.node,l=i.entering,f=o.convertors[s.type],p=!1;if(f){var b={entering:l,leaf:!wne(s),getChildrenText:Cne,options:{gfm:!0,nodeId:!1,tagFilter:!1,softbreak:`
|
|
39
|
-
`},skipChildren:function(){p=!0}};if(o.closeUnmatchedHTMLInline(s,l),f(o,s,b),t?.node===s){var T=o.stack.reduce(function(x,E){return x+E.content.reduce(function(B,F){return B+F.nodeSize},0)},0)+1;t.setMappedPos(T)}}p&&(n.resumeAt(s,!1),n.next()),i=n.next()},o=this;i;)a()},r.prototype.convertNode=function(e,t){return this.convert(e,t),this.stack.length?this.closeNode():null},r})();function l4e(r,e,t){var n=t[0],i=t[1];r.write(n),r.convertInline(e),r.write(i)}function u4e(r,e,t){var n=e.node,i=e.parent,a=t[0],o=t[1];r.stopNewline=!0,r.write(a),r.convertNode(n),r.write(o),i?.type.name==="doc"&&(r.closeBlock(n),r.stopNewline=!1)}function c4e(r,e){var t=r.length,n="",i="";return e==="left"?(n=":",t-=1):e==="right"?(i=":",t-=1):e==="center"&&(n=":",i=":",t-=2),""+n+yu("-",Math.max(t,3))+i}var th={text:function(r,e){var t,n=e.node,i=(t=n.text)!==null&&t!==void 0?t:"";(n.marks||[]).some(function(a){return a.type.name==="link"})?r.text(bu(i),!1):r.text(i)},paragraph:function(r,e){var t=e.node,n=e.parent,i=e.index,a=i===void 0?0:i;if(r.stopNewline)r.convertInline(t);else{var o=a===0,s=!o&&n.child(a-1),l=s&&s.childCount===0,f=a<n.childCount-1&&n.child(a+1),p=f&&f.type.name==="paragraph",b=t.childCount===0;if(b&&l)r.write(`<br>
|
|
40
|
-
`);else if(b&&!l&&!o){if(n?.type.name==="listItem"){var T=r.getDelim();r.setDelim(""),r.write("<br>"),r.setDelim(T)}r.write(`
|
|
41
|
-
`)}else r.convertInline(t),p?r.write(`
|
|
42
|
-
`):r.closeBlock(t)}},heading:function(r,e,t){var n=e.node,i=t.delim,a=n.attrs.headingType;a==="atx"?(r.write(i+" "),r.convertInline(n),r.closeBlock(n)):(r.convertInline(n),r.ensureNewLine(),r.write(i),r.closeBlock(n))},codeBlock:function(r,e,t){var n=e.node,i=t.delim,a=t.text,o=i,s=o[0],l=o[1];r.write(s),r.ensureNewLine(),r.text(a,!1),r.ensureNewLine(),r.write(l),r.closeBlock(n)},blockQuote:function(r,e,t){var n=e.node,i=e.parent,a=t.delim;i?.type.name===n.type.name&&r.flushClose(1),r.wrapBlock(a,null,n,function(){return r.convertNode(n)})},bulletList:function(r,e,t){var n=e.node,i=t.delim;r.convertList(n,yu(" ",4),function(){return i+" "})},orderedList:function(r,e){var t=e.node,n=t.attrs.order||1;r.convertList(t,yu(" ",4),function(i){var a=String(n+i);return a+". "})},listItem:function(r,e){var t=e.node,n=t.attrs,i=n.task,a=n.checked;i&&r.write("["+(a?"x":" ")+"] "),r.convertNode(t)},image:function(r,e,t){var n=t.attrs;r.write("")},thematicBreak:function(r,e,t){var n=e.node,i=t.delim;r.write(i),r.closeBlock(n)},table:function(r,e){var t=e.node;r.convertNode(t),r.closeBlock(t)},tableHead:function(r,e,t){var n=e.node,i=t.delim,a=n.firstChild;r.convertNode(n);var o=i??"";!i&&a&&a.forEach(function(s){var l=s.textContent,f=s.attrs,p=c4e(l,f.align);o+="| "+p+" "}),r.write(o+"|"),r.ensureNewLine()},tableBody:function(r,e){var t=e.node;r.convertNode(t)},tableRow:function(r,e){var t=e.node;r.convertNode(t),r.write("|"),r.ensureNewLine()},tableHeadCell:function(r,e,t){var n=e.node,i=t.delim,a=i===void 0?"| ":i;r.write(a),r.convertTableCell(n),r.write(" ")},tableBodyCell:function(r,e,t){var n=e.node,i=t.delim,a=i===void 0?"| ":i;r.write(a),r.convertTableCell(n),r.write(" ")},customBlock:function(r,e,t){var n=e.node,i=t.delim,a=t.text,o=i,s=o[0],l=o[1];r.write(s),r.ensureNewLine(),r.text(a,!1),r.ensureNewLine(),r.write(l),r.closeBlock(n)},frontMatter:function(r,e,t){var n=e.node,i=t.text;r.text(i,!1),r.closeBlock(n)},widget:function(r,e,t){var n=t.text;r.write(n)},html:function(r,e,t){var n=e.node,i=t.text;r.write(i),n.attrs.htmlBlock&&r.closeBlock(n)},htmlComment:function(r,e,t){var n=e.node,i=t.text;r.write(i),r.closeBlock(n)}};function f4e(r,e){var t=e.state,n=e.nodeInfo,i=e.params,a=i.rawHTML;a?Za(r,["heading","codeBlock"])>-1?l4e(t,n.node,a):Za(r,["image","thematicBreak"])>-1?t.write(a):u4e(t,n,a):th[r](t,n,i)}function Ug(r,e){var t=r.text,n=/`+/g,i=0;if(r.isText&&t)for(var a=n.exec(t);a;)i=Math.max(i,a[0].length),a=n.exec(t);for(var o=i>0&&e>0?" `":"`",s=0;s<i;s+=1)o+="`";return i>0&&e<0&&(o+=" "),o}function Gn(r){return r?["<"+r+">","</"+r+">"]:null}function hs(r){return r?"<"+r+">":null}function ps(r){return r?"</"+r+">":null}var vs={heading:function(r){var e=r.node,t=e.attrs,n=t.level,i=yu("#",n);return t.headingType==="setext"&&(i=n===1?"===":"---"),{delim:i,rawHTML:Gn(t.rawHTML)}},codeBlock:function(r){var e=r.node,t=e,n=t.attrs,i=t.textContent;return{delim:["```"+(n.language||""),"```"],rawHTML:Gn(n.rawHTML),text:i}},blockQuote:function(r){var e=r.node;return{delim:"> ",rawHTML:Gn(e.attrs.rawHTML)}},bulletList:function(r,e){var t=r.node,n=e.inTable,i=t.attrs.rawHTML;return n&&(i=i||"ul"),{delim:"*",rawHTML:Gn(i)}},orderedList:function(r,e){var t=r.node,n=e.inTable,i=t.attrs.rawHTML;return n&&(i=i||"ol"),{rawHTML:Gn(i)}},listItem:function(r,e){var t=r.node,n=e.inTable,i=t.attrs,a=i.task,o=i.checked,s=t.attrs.rawHTML;n&&(s=s||"li");var l=a?' class="task-list-item'+(o?" checked":"")+'"':"",f=a?" data-task"+(o?" data-task-checked":""):"";return{rawHTML:s?["<"+s+l+f+">","</"+s+">"]:null}},table:function(r){var e=r.node;return{rawHTML:Gn(e.attrs.rawHTML)}},tableHead:function(r){var e=r.node;return{rawHTML:Gn(e.attrs.rawHTML)}},tableBody:function(r){var e=r.node;return{rawHTML:Gn(e.attrs.rawHTML)}},tableRow:function(r){var e=r.node;return{rawHTML:Gn(e.attrs.rawHTML)}},tableHeadCell:function(r){var e=r.node;return{rawHTML:Gn(e.attrs.rawHTML)}},tableBodyCell:function(r){var e=r.node;return{rawHTML:Gn(e.attrs.rawHTML)}},image:function(r){var e=r.node,t=e.attrs,n=t.rawHTML,i=t.altText,a=t.imageUrl.replace(/&/g,"&"),o=i?' alt="'+Oo(i)+'"':"";return{rawHTML:n?"<"+n+' src="'+Oo(a)+'"'+o+">":null,attrs:{altText:bu(i||""),imageUrl:a}}},thematicBreak:function(r){var e=r.node;return{delim:"***",rawHTML:hs(e.attrs.rawHTML)}},customBlock:function(r){var e=r.node,t=e,n=t.attrs,i=t.textContent;return{delim:["$$"+n.info,"$$"],text:i}},frontMatter:function(r){var e=r.node;return{text:e.textContent}},widget:function(r){var e=r.node;return{text:e.textContent}},strong:function(r,e){var t=r.node,n=e.entering,i=t.attrs.rawHTML;return{delim:"**",rawHTML:n?hs(i):ps(i)}},emph:function(r,e){var t=r.node,n=e.entering,i=t.attrs.rawHTML;return{delim:"*",rawHTML:n?hs(i):ps(i)}},strike:function(r,e){var t=r.node,n=e.entering,i=t.attrs.rawHTML;return{delim:"~~",rawHTML:n?hs(i):ps(i)}},link:function(r,e){var t=r.node,n=e.entering,i=t.attrs,a=i.title,o=i.rawHTML,s=i.linkUrl.replace(/&/g,"&"),l=a?' title="'+Oo(a)+'"':"";return n?{delim:"[",rawHTML:o?"<"+o+' href="'+Oo(s)+'"'+l+">":null}:{delim:"]("+s+(a?" "+cne(bu(a)):"")+")",rawHTML:ps(o)}},code:function(r,e){var t=r.node,n=r.parent,i=r.index,a=i===void 0?0:i,o=e.entering,s=o?Ug(n.child(a),-1):Ug(n.child(a-1),1),l=o?hs(t.attrs.rawHTML):ps(t.attrs.rawHTML);return{delim:s,rawHTML:l}},htmlComment:function(r){var e=r.node;return{text:e.textContent}},html:function(r,e){var t=r.node,n=e.entering,i=t.type.name,a=t.attrs.htmlAttrs,o="<"+i,s="</"+i+">";return Object.keys(a).forEach(function(l){o+=" "+l+'="'+a[l].replace(/"/g,"'")+'"'}),o+=">",t.attrs.htmlInline?{rawHTML:n?o:s}:{text:""+o+t.attrs.childrenHTML+s}}},$g={strong:{mixable:!0,removedEnclosingWhitespace:!0},emph:{mixable:!0,removedEnclosingWhitespace:!0},strike:{mixable:!0,removedEnclosingWhitespace:!0},code:{escape:!1},link:null,html:null};function d4e(r){var e={},t=Object.keys(th);return t.forEach(function(n){e[n]=function(i,a){var o=th[n];if(o){var s=r[n],l=s?s(a,{inTable:i.inTable}):{};f4e(n,{state:i,nodeInfo:a,params:l})}}}),e}function h4e(r){var e={},t=Object.keys($g);return t.forEach(function(n){e[n]=function(i,a){var o=$g[n],s=r[n],l=s&&i&&!ei(a),f=l?s(i,{entering:a}):{};return Ce(Ce({},f),o)}}),e}function p4e(r){var e=Object.keys(r);e.forEach(function(i){var a=vs[i],o=r[i];a?vs[i]=function(s,l){return l.origin=function(){return a(s,l)},o(s,l)}:vs[i]=o,delete r[i]});var t=d4e(vs),n=h4e(vs);return{nodeTypeConvertors:t,markTypeConvertors:n}}var v4e=(function(){function r(e){var t=e.nodeTypeConvertors,n=e.markTypeConvertors;this.nodeTypeConvertors=t,this.markTypeConvertors=n,this.delim="",this.result="",this.closed=!1,this.tightList=!1,this.stopNewline=!1,this.inTable=!1}return r.prototype.getMarkConvertor=function(e){var t=e.attrs.htmlInline?"html":e.type.name;return this.markTypeConvertors[t]},r.prototype.isInBlank=function(){return/(^|\n)$/.test(this.result)},r.prototype.markText=function(e,t,n,i){var a=this.getMarkConvertor(e);if(a){var o=a({node:e,parent:n,index:i},t),s=o.delim,l=o.rawHTML;return l||s}return""},r.prototype.setDelim=function(e){this.delim=e},r.prototype.getDelim=function(){return this.delim},r.prototype.flushClose=function(e){if(!this.stopNewline&&this.closed){if(this.isInBlank()||(this.result+=`
|
|
43
|
-
`),e||(e=2),e>1){var t=this.delim,n=/\s+$/.exec(t);n&&(t=t.slice(0,t.length-n[0].length));for(var i=1;i<e;i+=1)this.result+=t+`
|
|
44
|
-
`}this.closed=!1}},r.prototype.wrapBlock=function(e,t,n,i){var a=this.getDelim();this.write(t||e),this.setDelim(this.getDelim()+e),i(),this.setDelim(a),this.closeBlock(n)},r.prototype.ensureNewLine=function(){this.isInBlank()||(this.result+=`
|
|
45
|
-
`)},r.prototype.write=function(e){e===void 0&&(e=""),this.flushClose(),this.delim&&this.isInBlank()&&(this.result+=this.delim),e&&(this.result+=e)},r.prototype.closeBlock=function(e){this.closed=e},r.prototype.text=function(e,t){t===void 0&&(t=!0);for(var n=e.split(`
|
|
46
|
-
`),i=0;i<n.length;i+=1)this.write(),this.result+=t?une(n[i]):n[i],i!==n.length-1&&(this.result+=`
|
|
47
|
-
`)},r.prototype.convertBlock=function(e,t,n){var i=e.type.name,a=this.nodeTypeConvertors[i],o={node:e,parent:t,index:n};e.attrs.htmlBlock?this.nodeTypeConvertors.html(this,o):a&&a(this,o)},r.prototype.convertInline=function(e){var t=this,n=[],i="",a=function(o,s,l){var f=o?o.marks:[],p=i;i="";var b=o&&o.isText&&f.some(function(Le){var ut=t.getMarkConvertor(Le),Je=ut&&ut();return Je&&Je.removedEnclosingWhitespace});if(b&&o&&o.text){var T=/^(\s*)(.*?)(\s*)$/m.exec(o.text),x=T[1],E=T[2],B=T[3];p+=x,i=B,(x||B)&&(o=E?o.withText(E):null,o||(f=n))}for(var F=f.length&&$r(f),_=F&&t.getMarkConvertor(F),X=_&&_(),ee=X&&X.escape===!1,se=f.length-(ee?1:0),de=0;de<se;de+=1){var E=f[de];if(X&&!X.mixable)break;for(var ae=0;ae<n.length;ae+=1){var le=n[ae];if(X&&!X.mixable)break;if(E.eq(le)){de>ae?f=f.slice(0,ae).concat(E).concat(f.slice(ae,de)).concat(f.slice(de+1,se)):ae>de&&(f=f.slice(0,de).concat(f.slice(de+1,ae)).concat(E).concat(f.slice(ae,se)));break}}}for(var Te=0;Te<Math.min(n.length,se)&&f[Te].eq(n[Te]);)Te+=1;for(;Te<n.length;){var xe=n.pop();xe&&t.text(t.markText(xe,!1,e,l),!1)}if(p&&t.text(p),o){for(;n.length<se;){var E=f[n.length];n.push(E),t.text(t.markText(E,!0,e,l),!1)}ee&&o.isText?t.text(t.markText(F,!0,e,l)+o.text+t.markText(F,!1,e,l+1),!1):t.convertBlock(o,e,l)}};e.forEach(a),a(null,null,e.childCount)},r.prototype.convertList=function(e,t,n){var i=this,a;this.closed&&this.closed.type===e.type?this.flushClose(3):this.tightList&&this.flushClose(1);var o=(a=e.attrs.tight)!==null&&a!==void 0?a:!0,s=this.tightList;this.tightList=o,e.forEach(function(l,f,p){p&&o&&i.flushClose(1),i.wrapBlock(t,n(p),e,function(){return i.convertBlock(l,e,p)})}),this.tightList=s},r.prototype.convertTableCell=function(e){var t=this;this.stopNewline=!0,this.inTable=!0,e.forEach(function(n,i,a){if(zr(["bulletList","orderedList"],n.type.name))t.convertBlock(n,e,a),t.closed=!1;else if(t.convertInline(n),a<e.childCount-1){var o=e.child(a+1);o.type.name==="paragraph"&&t.write("<br>")}}),this.stopNewline=!1,this.inTable=!1},r.prototype.convertNode=function(e,t){var n=this;return e.forEach(function(i,a,o){if(n.convertBlock(i,e,o),t?.node===i){var s=n.result.split(`
|
|
48
|
-
`);t.setMappedPos([s.length,$r(s).length+1])}}),this.result},r})(),m4e=(function(){function r(e,t,n,i){var a=this;this.setMappedPos=function(o){a.mappedPosWhenConverting=o},this.schema=e,this.eventEmitter=i,this.focusedNode=null,this.mappedPosWhenConverting=null,this.toWwConvertors=a4e(n),this.toMdConvertors=p4e(t||{}),this.eventEmitter.listen("setFocusedNode",function(o){return a.focusedNode=o})}return r.prototype.getMappedPos=function(){return this.mappedPosWhenConverting},r.prototype.getInfoForPosSync=function(){return{node:this.focusedNode,setMappedPos:this.setMappedPos}},r.prototype.toWysiwygModel=function(e){var t=new s4e(this.schema,this.toWwConvertors);return t.convertNode(e,this.getInfoForPosSync())},r.prototype.toMarkdownText=function(e){var t=new v4e(this.toMdConvertors),n=t.convertNode(e,this.getInfoForPosSync());return n=this.eventEmitter.emitReduce("beforeConvertWysiwygToMarkdown",n),n},r})();function g4e(r){var e=r.plugin,t=r.eventEmitter,n=r.usageStatistics,i=r.instance,a={Plugin:mn,PluginKey:qs,Selection:xt,TextSelection:St},o={Decoration:hn,DecorationSet:dr},s={Fragment:De},l={InputRule:pa,inputRules:kk,undoInputRule:ire},f={keymap:Ps},p={eventEmitter:t,usageStatistics:n,instance:i,pmState:a,pmView:o,pmModel:s,pmRules:l,pmKeymap:f,i18n:mt};if(Yo(e)){var b=e[0],T=e[1],x=T===void 0?{}:T;return b(p,x)}return e(p)}function l0(r){var e=r.plugins,t=r.eventEmitter,n=r.usageStatistics,i=r.instance;return t.listen("mixinTableOffsetMapPrototype",Jje),(e??[]).reduce(function(a,o){var s=g4e({plugin:o,eventEmitter:t,usageStatistics:n,instance:i});if(!s)throw new Error("The return value of the executed plugin is empty.");var l=s.markdownParsers,f=s.toHTMLRenderers,p=s.toMarkdownRenderers,b=s.markdownPlugins,T=s.wysiwygPlugins,x=s.wysiwygNodeViews,E=s.markdownCommands,B=s.wysiwygCommands,F=s.toolbarItems;return f&&(a.toHTMLRenderers=ku(a.toHTMLRenderers,f)),p&&(a.toMarkdownRenderers=ku(a.toMarkdownRenderers,p)),b&&(a.mdPlugins=a.mdPlugins.concat(b)),T&&(a.wwPlugins=a.wwPlugins.concat(T)),x&&(a.wwNodeViews=Ce(Ce({},a.wwNodeViews),x)),E&&(a.mdCommands=Ce(Ce({},a.mdCommands),E)),B&&(a.wwCommands=Ce(Ce({},a.wwCommands),B)),F&&(a.toolbarItems=a.toolbarItems.concat(F)),l&&(a.markdownParsers=Ce(Ce({},a.markdownParsers),l)),a},{toHTMLRenderers:{},toMarkdownRenderers:{},mdPlugins:[],wwPlugins:[],wwNodeViews:{},mdCommands:{},wwCommands:{},toolbarItems:[],markdownParsers:{}})}var y4e="data-task",b4e="data-task-disabled",k4e="checked";function w4e(r){["htmlBlock","htmlInline"].forEach(function(e){r[e]&&Object.keys(r[e]).forEach(function(t){return qw(t)})})}var u0=(function(){function r(e){var t=this;this.options=Th({linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,usageStatistics:!0,theme:"light"},e),this.eventEmitter=new o0;var n=xk(this.options.linkAttributes),i=l0({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this})||{},a=i.toHTMLRenderers,o=i.markdownParsers,s=this.options,l=s.customHTMLRenderer,f=s.extendedAutolinks,p=s.referenceDefinition,b=s.frontMatter,T=s.customHTMLSanitizer,x={linkAttributes:n,customHTMLRenderer:Ce(Ce({},a),l),extendedAutolinks:f,referenceDefinition:p,frontMatter:b,sanitizer:T||no};w4e(x.customHTMLRenderer),this.options.events&&qo(this.options.events,function(ee,se){t.on(se,ee)});var E=this.options,B=E.el,F=E.initialValue,_=E.theme,X=B.innerHTML;_!=="light"&&B.classList.add(Ze(_)),B.innerHTML="",this.toastMark=new Iw("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:f,referenceDefinition:p,disallowDeepHeading:!0,frontMatter:b,customParser:o}),this.preview=new zw(this.eventEmitter,Ce(Ce({},x),{isViewer:!0})),rw(this.preview.previewContent,"mousedown",this.toggleTask.bind(this)),F?this.setMarkdown(F):X&&this.preview.setHTML(X),B.appendChild(this.preview.previewContent),this.eventEmitter.emit("load",this)}return r.prototype.toggleTask=function(e){var t=e.target,n=getComputedStyle(t,":before");!t.hasAttribute(b4e)&&t.hasAttribute(y4e)&&Lh(n,e.offsetX,e.offsetY)&&(Rh(t,k4e),this.eventEmitter.emit("change",{source:"viewer",date:e}))},r.prototype.setMarkdown=function(e){var t=this.toastMark.getLineTexts(),n=t.length,i=$r(t),a=[n,i.length+1],o=this.toastMark.editMarkdown([1,1],a,e||"");this.eventEmitter.emit("updatePreview",o)},r.prototype.on=function(e,t){this.eventEmitter.listen(e,t)},r.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},r.prototype.addHook=function(e,t){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,t)},r.prototype.destroy=function(){tw(this.preview.el,"mousedown",this.toggleTask.bind(this)),this.preview.destroy(),this.eventEmitter.emit("destroy")},r.prototype.isViewer=function(){return!0},r.prototype.isMarkdownMode=function(){return!1},r.prototype.isWysiwygMode=function(){return!1},r})();function ou(r){return r instanceof ia}function c0(r){var e=["document","blockQuote","bulletList","orderedList","listItem","paragraph","heading","emph","strong","strike","link","image","table","tableHead","tableBody","tableRow","tableHeadCell","tableBodyCell"];return zr(e,r)}function C4e(r){var e=r.attrs,t=r.type,n=t.name,i={type:n,wysiwygNode:!0,literal:!c0(n)&&ou(r)?r.textContent:null},a={heading:{level:e.level},link:{destination:e.linkUrl,title:e.title},image:{destination:e.imageUrl},codeBlock:{info:e.language},bulletList:{type:"list",listData:{type:"bullet"}},orderedList:{type:"list",listData:{type:"ordered",start:e.order}},listItem:{type:"item",listData:{task:e.task,checked:e.checked}},tableHeadCell:{type:"tableCell",cellType:"head",align:e.align},tableBodyCell:{type:"tableCell",cellType:"body",align:e.align},customBlock:{info:e.info}},o=a[n],s=Ce(Ce({},i),o),l=r.attrs,f=l.htmlAttrs,p=l.childrenHTML;return f?Ce(Ce({},s),{attrs:f,childrenHTML:p}):s}var T4e={openTag:function(r,e){var t=r,n=t.tagName,i=t.classNames,a=t.attributes,o=document.createElement(n),s={};i&&(o.className=i.join(" ")),a&&(s=Ce(Ce({},s),a)),Ph(s,o),e.push(o)},closeTag:function(r,e){if(e.length>1){var t=e.pop();$r(e).appendChild(t)}},html:function(r,e){$r(e).insertAdjacentHTML("beforeend",r.content)},text:function(r,e){var t=document.createTextNode(r.content);$r(e).appendChild(t)}},S4e=(function(){function r(e,t){var n=Kh(e,t),i=Ce(Ce({},t.htmlBlock),t.htmlInline);this.customConvertorKeys=Object.keys(t).concat(Object.keys(i)),this.renderer=new Gh({gfm:!0,convertors:Ce(Ce({},n),i)}),this.convertors=this.renderer.getConvertors()}return r.prototype.generateTokens=function(e){var t=C4e(e),n={entering:!0,leaf:ou(e)?e.isLeaf:!1,options:this.renderer.getOptions(),getChildrenText:function(){return ou(e)?e.textContent:""},skipChildren:function(){return!1}},i=this.convertors[e.type.name],a=i(t,n,this.convertors),o=Yo(a)?a:[a];return(c0(e.type.name)||e.attrs.htmlInline)&&(n.entering=!1,o.push({type:"text",content:ou(e)?e.textContent:""}),o=o.concat(i(t,n,this.convertors))),o},r.prototype.toDOMNode=function(e){var t=this.generateTokens(e),n=[];return t.forEach(function(i){return T4e[i.type](i,n)}),n[0]},r.prototype.getToDOMNode=function(e){return zr(this.customConvertorKeys,e)?this.toDOMNode.bind(this):null},r})(),x4e=100,E4e=15,Jl=null,dd=null;function Wg(r,e){var t=e.syncScrollTop,n=e.releaseEventBlock;dd&&clearTimeout(dd),t(r),dd=setTimeout(function(){n()},E4e)}function M4e(r,e,t){var n=e-r,i=Date.now(),a=function(){var o=Date.now(),s=(o-i)/x4e,l;Jl&&clearTimeout(Jl),s<1?(l=r+n*Math.cos((1-s)*Math.PI/2),Wg(Math.ceil(l),t),Jl=setTimeout(a,1)):(Wg(e,t),Jl=null)};a()}var A4e=18,O4e=(function(){function r(e,t,n){this.latestEditorScrollTop=null,this.latestPreviewScrollTop=null,this.blockedScroll=null,this.active=!0,this.timer=null;var i=t.previewContent,a=t.el;this.previewRoot=i,this.previewEl=a,this.mdEditor=e,this.editorView=e.view,this.toastMark=e.getToastMark(),this.eventEmitter=n,this.addScrollSyncEvent()}return r.prototype.addScrollSyncEvent=function(){var e=this;this.eventEmitter.listen("afterPreviewRender",function(){e.clearTimer(),e.timer=setTimeout(function(){e.syncPreviewScrollTop(!0)},200)}),this.eventEmitter.listen("scroll",function(t,n){e.active&&(t==="editor"&&e.blockedScroll!=="editor"?e.syncPreviewScrollTop():t==="preview"&&e.blockedScroll!=="preview"&&e.syncEditorScrollTop(n))}),this.eventEmitter.listen("toggleScrollSync",function(t){e.active=t})},r.prototype.getMdNodeAtPos=function(e,t){var n=e.content.findIndex(t.pos),i=n.index;return this.toastMark.findFirstNodeAtLine(i+1)},r.prototype.getScrollTopByCaretPos=function(){var e=this.mdEditor.getSelection(),t=this.toastMark.findFirstNodeAtLine(e[0][0]),n=this.previewEl.clientHeight,i=ld(this.previewRoot,t).el,a=Nu(i,this.previewRoot)||i.offsetTop,o=i.clientHeight,s=a+o-n*.5;this.latestEditorScrollTop=null;var l=i.getBoundingClientRect().top-this.previewEl.getBoundingClientRect().top;return l<n?null:s},r.prototype.syncPreviewScrollTop=function(e){e===void 0&&(e=!1);var t=this,n=t.editorView,i=t.previewEl,a=t.previewRoot,o=n.dom.getBoundingClientRect(),s=o.left,l=o.top,f=n.posAtCoords({left:s,top:l}),p=n.state.doc,b=this.getMdNodeAtPos(p,f);if(!(!b||pne(b))){var T=i.scrollTop,x=n.dom,E=x.scrollTop,B=x.scrollHeight,F=x.clientHeight,_=x.children,X=B-E<=F+A4e,ee=X?i.scrollHeight:0;if(E&&!X){if(e){var se=this.getScrollTopByCaretPos();if(!se)return;ee=se}else{var de=ld(this.previewRoot,b),ae=de.el,le=de.mdNode,Te=Ng(p,le,_),xe=Te.height,Le=Te.rect,ut=Nu(ae,a)||ae.offsetTop,Je=ae.clientHeight,wt=l>Le.top?Math.min((l-Le.top)/xe,1):0;ee=ut+Je*wt}ee=this.getResolvedScrollTop("editor",E,ee,T),this.latestEditorScrollTop=E}ee!==T&&this.run("editor",ee,T)}},r.prototype.syncEditorScrollTop=function(e){var t=this,n=t.toastMark,i=t.editorView,a=t.previewRoot,o=t.previewEl,s=i.dom,l=i.state,f=o.scrollTop,p=o.clientHeight,b=o.scrollHeight,T=b-f<=p,x=s.scrollTop,E=T?s.scrollHeight:0;if(f&&e&&!T){if(e=xje(e,a),!e.getAttribute("data-nodeid"))return;var B=s.children,F=Number(e.getAttribute("data-nodeid")),_=ld(this.previewRoot,n.findNodeById(F)),X=_.mdNode,ee=_.el,se=Ws(X);E=B[se-1].offsetTop;var de=Ng(l.doc,X,B).height,ae=Rje(ee,a,F),le=ae.nodeHeight,Te=ae.offsetTop;E+=Mje(f,Te,le,de),E=this.getResolvedScrollTop("preview",f,E,x),this.latestPreviewScrollTop=f}E!==x&&this.run("preview",E,x)},r.prototype.getResolvedScrollTop=function(e,t,n,i){var a=e==="editor"?this.latestEditorScrollTop:this.latestPreviewScrollTop;return a===null?n:a<t?Math.max(n,i):Math.min(n,i)},r.prototype.run=function(e,t,n){var i=this,a;e==="editor"?(a=this.previewEl,this.blockedScroll="preview"):(a=this.editorView.dom,this.blockedScroll="editor");var o={syncScrollTop:function(s){return a.scrollTop=s},releaseEventBlock:function(){return i.blockedScroll=null}};M4e(n,t,o)},r.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},r.prototype.destroy=function(){this.clearTimer(),this.eventEmitter.removeEventHandler("scroll"),this.eventEmitter.removeEventHandler("afterPreviewRender")},r})(),N4e={getPopupInitialValues:function(r,e){var t=e.popupName;return t==="link"?{linkText:r.getSelectedText()}:{}}};function D4e(r){r.eventEmitter.listen("query",function(e,t){return N4e[e](r,t)})}var f0=(function(){function r(e){var t=this;this.initialHTML=e.el.innerHTML,e.el.innerHTML="",this.options=Th({previewStyle:"tab",previewHighlight:!0,initialEditType:"markdown",height:"300px",minHeight:"200px",language:"en-US",useCommandShortcut:!0,usageStatistics:!0,toolbarItems:[["heading","bold","italic","strike"],["hr","quote"],["ul","ol","task","indent","outdent"],["table","image","link"],["code","codeblock"],["scrollSync"]],hideModeSwitch:!1,linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,customMarkdownRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,widgetRules:[],theme:"light",autofocus:!0},e);var n=this.options,i=n.customHTMLRenderer,a=n.extendedAutolinks,o=n.referenceDefinition,s=n.frontMatter,l=n.customMarkdownRenderer,f=n.useCommandShortcut,p=n.initialEditType,b=n.widgetRules,T=n.customHTMLSanitizer;this.mode=p||"markdown",this.mdPreviewStyle=this.options.previewStyle,this.i18n=mt,this.i18n.setCode(this.options.language),this.eventEmitter=new o0,Sne(b);var x=xk(this.options.linkAttributes);this.pluginInfo=l0({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this});var E=this.pluginInfo,B=E.toHTMLRenderers,F=E.toMarkdownRenderers,_=E.mdPlugins,X=E.wwPlugins,ee=E.wwNodeViews,se=E.mdCommands,de=E.wwCommands,ae=E.markdownParsers,le={linkAttributes:x,customHTMLRenderer:ku(B,i),extendedAutolinks:a,referenceDefinition:o,frontMatter:s,sanitizer:T||no},Te=new S4e(x,le.customHTMLRenderer),xe=yje(le.customHTMLRenderer,le.sanitizer,Te);this.toastMark=new Iw("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:a,referenceDefinition:o,disallowDeepHeading:!0,frontMatter:s,customParser:ae}),this.mdEditor=new Eae(this.eventEmitter,{toastMark:this.toastMark,useCommandShortcut:f,mdPlugins:_}),this.preview=new zw(this.eventEmitter,Ce(Ce({},le),{isViewer:!1,highlight:this.options.previewHighlight})),this.wwEditor=new UKe(this.eventEmitter,{toDOMAdaptor:Te,useCommandShortcut:f,htmlSchemaMap:xe,linkAttributes:x,wwPlugins:X,wwNodeViews:ee}),this.convertor=new m4e(this.wwEditor.getSchema(),Ce(Ce({},F),l),Kh(x,le.customHTMLRenderer),this.eventEmitter),this.setMinHeight(this.options.minHeight),this.setHeight(this.options.height),this.setMarkdown(this.options.initialValue,!1),this.options.placeholder&&this.setPlaceholder(this.options.placeholder),this.options.initialValue||this.setHTML(this.initialHTML,!1),this.commandManager=new e4e(this.eventEmitter,this.mdEditor.commands,this.wwEditor.commands,function(){return t.mode}),this.options.usageStatistics&&ane(),this.scrollSync=new O4e(this.mdEditor,this.preview,this.eventEmitter),this.addInitEvent(),this.addInitCommand(se,de),D4e(this),this.options.hooks&&qo(this.options.hooks,function(Le,ut){return t.addHook(ut,Le)}),this.options.events&&qo(this.options.events,function(Le,ut){return t.on(ut,Le)}),this.eventEmitter.emit("load",this),this.moveCursorToStart(this.options.autofocus)}return r.prototype.addInitEvent=function(){var e=this;this.on("needChangeMode",this.changeMode.bind(this)),this.on("loadUI",function(){if(e.height!=="auto"){var t=Math.min(parseInt(e.minHeight,10),parseInt(e.height,10)-75)+"px";e.setMinHeight(t)}}),Yne(this.eventEmitter)},r.prototype.addInitCommand=function(e,t){var n=this,i=function(a,o){Object.keys(o).forEach(function(s){n.addCommand(a,s,o[s])})};this.addCommand("markdown","toggleScrollSync",function(a){return n.eventEmitter.emit("toggleScrollSync",a.active),!0}),i("markdown",e),i("wysiwyg",t)},r.prototype.getCurrentModeEditor=function(){return this.isMarkdownMode()?this.mdEditor:this.wwEditor},r.factory=function(e){return e.viewer?new u0(e):new r(e)},r.setLanguage=function(e,t){mt.setLanguage(e,t)},r.prototype.changePreviewStyle=function(e){this.mdPreviewStyle!==e&&(this.mdPreviewStyle=e,this.eventEmitter.emit("changePreviewStyle",e))},r.prototype.exec=function(e,t){this.commandManager.exec(e,t)},r.prototype.addCommand=function(e,t,n){var i=this,a=function(o){o===void 0&&(o={});var s=(e==="markdown"?i.mdEditor:i.wwEditor).view;n(o,s.state,s.dispatch,s)};this.commandManager.addCommand(e,t,a)},r.prototype.on=function(e,t){this.eventEmitter.listen(e,t)},r.prototype.off=function(e){this.eventEmitter.removeEventHandler(e)},r.prototype.addHook=function(e,t){this.eventEmitter.removeEventHandler(e),this.eventEmitter.listen(e,t)},r.prototype.removeHook=function(e){this.eventEmitter.removeEventHandler(e)},r.prototype.focus=function(){this.getCurrentModeEditor().focus()},r.prototype.blur=function(){this.getCurrentModeEditor().blur()},r.prototype.moveCursorToEnd=function(e){e===void 0&&(e=!0),this.getCurrentModeEditor().moveCursorToEnd(e)},r.prototype.moveCursorToStart=function(e){e===void 0&&(e=!0),this.getCurrentModeEditor().moveCursorToStart(e)},r.prototype.setMarkdown=function(e,t){if(e===void 0&&(e=""),t===void 0&&(t=!0),this.mdEditor.setMarkdown(e,t),this.isWysiwygMode()){var n=this.toastMark.getRootNode(),i=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(i,t)}},r.prototype.setHTML=function(e,t){e===void 0&&(e=""),t===void 0&&(t=!0);var n=document.createElement("div");n.innerHTML=Gne(e);var i=Ja.fromSchema(this.wwEditor.schema).parse(n);this.isMarkdownMode()?this.mdEditor.setMarkdown(this.convertor.toMarkdownText(i),t):this.wwEditor.setModel(i,t)},r.prototype.getMarkdown=function(){return this.isMarkdownMode()?this.mdEditor.getMarkdown():this.convertor.toMarkdownText(this.wwEditor.getModel())},r.prototype.getHTML=function(){var e=this;this.eventEmitter.holdEventInvoke(function(){if(e.isMarkdownMode()){var i=e.toastMark.getRootNode(),a=e.convertor.toWysiwygModel(i);e.wwEditor.setModel(a)}});var t=Bh(this.wwEditor.view.dom.innerHTML);if(this.placeholder){var n=new RegExp('<span class="placeholder[^>]+>'+this.placeholder+"</span>","i");return t.replace(n,"")}return t},r.prototype.insertText=function(e){this.getCurrentModeEditor().replaceSelection(e)},r.prototype.setSelection=function(e,t){this.getCurrentModeEditor().setSelection(e,t)},r.prototype.replaceSelection=function(e,t,n){this.getCurrentModeEditor().replaceSelection(e,t,n)},r.prototype.deleteSelection=function(e,t){this.getCurrentModeEditor().deleteSelection(e,t)},r.prototype.getSelectedText=function(e,t){return this.getCurrentModeEditor().getSelectedText(e,t)},r.prototype.getRangeInfoOfNode=function(e){return this.getCurrentModeEditor().getRangeInfoOfNode(e)},r.prototype.addWidget=function(e,t,n){this.getCurrentModeEditor().addWidget(e,t,n)},r.prototype.replaceWithWidget=function(e,t,n){this.getCurrentModeEditor().replaceWithWidget(e,t,n)},r.prototype.setHeight=function(e){var t=this.options.el;zi(e)&&(e==="auto"?ci(t,"auto-height"):Yn(t,"auto-height"),this.setMinHeight(this.getMinHeight())),hi(t,{height:e}),this.height=e},r.prototype.getHeight=function(){return this.height},r.prototype.setMinHeight=function(e){if(e!==this.minHeight){var t=this.height||this.options.height;t!=="auto"&&this.options.el.querySelector("."+Ze("main"))&&(e=Math.min(parseInt(e,10),parseInt(t,10)-75)+"px");var n=parseInt(e,10);this.minHeight=e,this.wwEditor.setMinHeight(n),this.mdEditor.setMinHeight(n),this.preview.setMinHeight(n)}},r.prototype.getMinHeight=function(){return this.minHeight},r.prototype.isMarkdownMode=function(){return this.mode==="markdown"},r.prototype.isWysiwygMode=function(){return this.mode==="wysiwyg"},r.prototype.isViewer=function(){return!1},r.prototype.getCurrentPreviewStyle=function(){return this.mdPreviewStyle},r.prototype.changeMode=function(e,t){if(this.mode!==e){if(this.mode=e,this.isWysiwygMode()){var n=this.toastMark.getRootNode(),i=this.convertor.toWysiwygModel(n);this.wwEditor.setModel(i)}else{var i=this.wwEditor.getModel();this.mdEditor.setMarkdown(this.convertor.toMarkdownText(i),!t)}if(this.eventEmitter.emit("removePopupWidget"),this.eventEmitter.emit("changeMode",e),!t){var a=this.convertor.getMappedPos();this.focus(),this.isWysiwygMode()&&Ri(a)?this.wwEditor.setSelection(a):Array.isArray(a)&&this.mdEditor.setSelection(a)}}},r.prototype.destroy=function(){var e=this;this.wwEditor.destroy(),this.mdEditor.destroy(),this.preview.destroy(),this.scrollSync.destroy(),this.eventEmitter.emit("destroy"),this.eventEmitter.getEvents().forEach(function(t,n){return e.off(n)})},r.prototype.hide=function(){this.eventEmitter.emit("hide")},r.prototype.show=function(){this.eventEmitter.emit("show")},r.prototype.setScrollTop=function(e){this.getCurrentModeEditor().setScrollTop(e)},r.prototype.getScrollTop=function(){return this.getCurrentModeEditor().getScrollTop()},r.prototype.reset=function(){this.wwEditor.setModel([]),this.mdEditor.setMarkdown("")},r.prototype.getSelection=function(){return this.getCurrentModeEditor().getSelection()},r.prototype.setPlaceholder=function(e){this.placeholder=e,this.mdEditor.setPlaceholder(e),this.wwEditor.setPlaceholder(e)},r.prototype.getEditorElements=function(){return{mdEditor:this.mdEditor.getElement(),mdPreview:this.preview.getElement(),wwEditor:this.wwEditor.getElement()}},r.prototype.convertPosToMatchEditorMode=function(e,t,n){var i,a;t===void 0&&(t=e),n===void 0&&(n=this.mode);var o=this.mdEditor.view.state.doc,s=Array.isArray(e),l=Array.isArray(t),f=e,p=t;if(s!==l)throw new Error("Types of arguments must be same");return n==="markdown"&&!s&&!l?(i=eu(o,e,t),f=i[0],p=i[1]):n==="wysiwyg"&&s&&l&&(a=qa(o,e,t),f=a[0],p=a[1]),[f,p]},r})();function L4e(r){for(var e,t,n=arguments,i=1,a="",o="",s=[0],l=function(p){i===1&&(p||(a=a.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(p?n[p]:a):i===3&&(p||a)?(s[1]=p?n[p]:a,i=2):i===2&&a==="..."&&p?s[2]=Oh(s[2]||{},n[p]):i===2&&a&&!p?(s[2]=s[2]||{})[a]=!0:i>=5&&(i===5?((s[2]=s[2]||{})[t]=p?a?a+n[p]:n[p]:a,i=6):(p||a)&&(s[2][t]+=p?a+n[p]:a)),a=""},f=0;f<r.length;f++){f&&(i===1&&l(),l(f));for(let p=0;p<r[f].length;p++)e=r[f][p],i===1?e==="<"?(l(),s=[s,"",null],i=3):a+=e:i===4?a==="--"&&e===">"?(i=1,a=""):a=e+a[0]:o?e===o?o="":a+=e:e==='"'||e==="'"?o=e:e===">"?(l(),i=1):i&&(e==="="?(i=5,t=a,a=""):e==="/"&&(i<5||r[f][p+1]===">")?(l(),i===3&&(s=s[0]),i=s,(s=s[0]).push(this.apply(null,i.slice(1))),i=0):e===" "||e===" "||e===`
|
|
49
|
-
`||e==="\r"?(l(),i=2):a+=e),i===3&&a==="!--"&&(i=4,s=s[0])}return l(),s.length>2?s.slice(1):s[1]}function R4e(r){return typeof r=="boolean"||r instanceof Boolean}var I4e=R4e,P4e=(function(){function r(e){this.current=e,this.root=e,this.entering=!0}return r.prototype.walk=function(){var e=this,t=e.entering,n=e.current;return n?(t?n.firstChild?(this.current=n.firstChild,this.entering=!0):this.entering=!1:n===this.root?this.current=null:n.next?(this.current=n.next,this.entering=!0):(this.current=n.parent,this.entering=!1),{vnode:n,entering:t}):null},r})(),Qn=(function(){function r(e,t,n){this.parent=null,this.old=null,this.firstChild=null,this.next=null,this.skip=!1,this.type=e,this.props=t,this.children=n,this.props.children=n,t.ref&&(this.ref=t.ref,delete t.ref),t.key&&(this.key=t.key,delete t.key)}return r.prototype.walker=function(){return new P4e(this)},r.removalNodes=[],r})();function B4e(r){return new Qn("TEXT_NODE",{nodeValue:r},[])}function jg(r,e){var t=r;I4e(r)||r==null?t=null:(zi(r)||Ri(r))&&(t=B4e(String(r))),t&&e.push(t)}function F4e(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i=[];return t.forEach(function(a){Array.isArray(a)?a.forEach(function(o){jg(o,i)}):jg(a,i)}),new Qn(r,e||{},i)}var It=L4e.bind(F4e);function q4e(r){return r===Object(r)}var H4e=q4e;function _4e(r){var e;return r.type==="TEXT_NODE"?e=document.createTextNode(r.props.nodeValue):(e=document.createElement(r.type),h0(e,{},r.props)),e}function d0(r,e){r.node?e.removeChild(r.node):d0(r.firstChild,e)}function z4e(r,e,t){Object.keys(e).forEach(function(n){if(/^on/.test(n)){if(!t[n]||e[n]!==t[n]){var i=n.slice(2).toLowerCase();r.removeEventListener(i,e[n])}}else n!=="children"&&!t[n]&&!Vne(r)&&r.removeAttribute(n)}),h0(r,e,t,function(n){return!xh(e[n],t[n])})}var V4e=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function h0(r,e,t,n){Object.keys(t).forEach(function(i){if(!n||n(i))if(/^on/.test(i)){var a=i.slice(2).toLowerCase();r.addEventListener(a,t[i])}else i==="nodeValue"?r[i]=t[i]:i==="style"&&H4e(t[i])?U4e(r,e[i],t[i]):i!=="children"&&(t[i]===!1?r.removeAttribute(i):r.setAttribute(i,t[i]))})}function U4e(r,e,t){e&&Object.keys(e).forEach(function(n){r.style[n]=""}),Object.keys(t).forEach(function(n){var i=t[n];r.style[n]=Ri(i)&&!V4e.test(n)?i+"px":i})}function Xh(r){if(Qn.removalNodes.forEach(function(a){return Kg(a)}),r){for(var e=void 0,t=r.walker();e=t.walk();)if(r=e.vnode,e.entering)Kg(r);else if(zn(r.type)){var n=r.component;if(!r.old&&n.mounted&&n.mounted(),r.old&&n.updated){var i=n.prevProps||{};n.updated(i)}}}}function Gg(r){for(var e=r.parent;!e.node;)e=e.parent;return e.node}function Kg(r){if(!(!r||!r.parent)){if(r.node){var e=Gg(r);r.effect==="A"?e.appendChild(r.node):r.effect==="U"&&z4e(r.node,r.old.props,r.props)}if(r.effect==="D"){for(var t=void 0,n=r.walker();t=n.walk();)if(r=t.vnode,!t.entering)if(zn(r.type)){var i=r.component;i.beforeDestroy&&i.beforeDestroy()}else{var e=Gg(r);d0(r,e)}}r.ref&&(r.component?r.ref(r.component):r.node&&r.ref(r.node))}}function $4e(r,e){var t=e.props,n=e.component;return n?(n.prevProps=n.props,n.props=e.props,n):new r(t)}function p0(r){for(var e=r;r&&!r.skip;){if(zn(r.type)){var t=$4e(r.type,r);t.vnode=r,r.component=t,r.props.children=r.children=[t.render()],Jg(r)}else r.node||(r.node=_4e(r)),Jg(r);if(r.firstChild)r=r.firstChild;else{for(;r&&r.parent&&!r.next&&(r=r.parent,r!==e););r=r.next}}}function W4e(r,e){return r&&e&&e.type===r.type&&(!e.key||e.key===r.key)}function Jg(r){var e=r.children,t=r.old?r.old.firstChild:null,n=null;e.forEach(function(a,o){var s=W4e(t,a);s&&(a.old=t,a.parent=r,a.node=t.node,a.component=t.component,a.effect="U"),a&&!s&&(a.old=null,a.parent=r,a.node=null,a.effect="A"),t&&!s&&(Qn.removalNodes.push(t),t.effect="D"),t&&(t=t.next),o===0?r.firstChild=a:a&&(n.next=a),n=a});var i=$r(e);if(!e.length)for(;t;)Qn.removalNodes.push(t),t.effect="D",t=t.next;for(;t&&i;)t&&i.old!==t&&(Qn.removalNodes.push(t),t.effect="D",t=t.next)}function j4e(r){r.effect="D",Qn.removalNodes=[r],Xh(),Qn.removalNodes=[]}function G4e(r){var e=r.vnode;e.effect="U",e.old=e,e.next&&(e.next.skip=!0),Qn.removalNodes=[],p0(e),Xh(e),e.next&&(e.next.skip=!1)}function K4e(r,e){var t=new Qn(r.tagName.toLowerCase(),{},[e]);return t.node=r,Qn.removalNodes=[],p0(t),Xh(t),function(){return j4e(t.firstChild)}}var Gr=(function(){function r(e){this.props=e,this.state={},this.refs={}}return r.prototype.setState=function(e){var t=Ce(Ce({},this.state),e);xh(this.state,t)||(this.state=t,G4e(this))},r})(),J4e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.state={hide:!1},n}return e.prototype.show=function(){this.setState({hide:!1})},e.prototype.hide=function(){this.setState({hide:!0})},e.prototype.render=function(){var t=this.props,n=t.editorType,i=t.eventEmitter;return It(Yg||(Yg=Rt([`
|
|
50
|
-
<div class="`,'" style="display: ',`">
|
|
51
|
-
<div
|
|
52
|
-
class="tab-item`,`"
|
|
53
|
-
onClick=`,`
|
|
54
|
-
>
|
|
55
|
-
`,`
|
|
56
|
-
</div>
|
|
57
|
-
<div
|
|
58
|
-
class="tab-item`,`"
|
|
59
|
-
onClick=`,`
|
|
60
|
-
>
|
|
61
|
-
`,`
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
`],[`
|
|
65
|
-
<div class="`,'" style="display: ',`">
|
|
66
|
-
<div
|
|
67
|
-
class="tab-item`,`"
|
|
68
|
-
onClick=`,`
|
|
69
|
-
>
|
|
70
|
-
`,`
|
|
71
|
-
</div>
|
|
72
|
-
<div
|
|
73
|
-
class="tab-item`,`"
|
|
74
|
-
onClick=`,`
|
|
75
|
-
>
|
|
76
|
-
`,`
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
`])),Ze("mode-switch"),this.state.hide?"none":"block",n==="markdown"?" active":"",function(){i.emit("needChangeMode","markdown")},mt.get("Markdown"),n==="wysiwyg"?" active":"",function(){i.emit("needChangeMode","wysiwyg")},mt.get("WYSIWYG"))},e})(Gr),Yg;function Y4e(r,e){var t,n;e=e||0;function i(){n=Array.prototype.slice.call(arguments),window.clearTimeout(t),t=window.setTimeout(function(){r.apply(null,n)},e)}return i}var X4e=Y4e,Z4e=X4e;function Q4e(r,e){var t,n=!0,i=function(p){r.apply(null,p),t=null},a,o,s;e=e||0,a=Z4e(i,e);function l(){if(s=Array.prototype.slice.call(arguments),n){i(s),n=!1;return}o=Number(new Date),t=t||o,a(s),o-t>=e&&i(s)}function f(){n=!0,t=null}return l.reset=f,l}var e8e=Q4e,v0=(function(){if(typeof Map<"u")return Map;function r(e,t){var n=-1;return e.some(function(i,a){return i[0]===t?(n=a,!0):!1}),n}return(function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(t){var n=r(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(t,n){var i=r(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},e.prototype.delete=function(t){var n=this.__entries__,i=r(n,t);~i&&n.splice(i,1)},e.prototype.has=function(t){return!!~r(this.__entries__,t)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,n){n===void 0&&(n=null);for(var i=0,a=this.__entries__;i<a.length;i++){var o=a[i];t.call(n,o[1],o[0])}},e})()})(),rh=typeof window<"u"&&typeof document<"u"&&window.document===document,Lu=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),t8e=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Lu):function(r){return setTimeout(function(){return r(Date.now())},1e3/60)}})(),r8e=2;function n8e(r,e){var t=!1,n=!1,i=0;function a(){t&&(t=!1,r()),n&&s()}function o(){t8e(a)}function s(){var l=Date.now();if(t){if(l-i<r8e)return;n=!0}else t=!0,n=!1,setTimeout(o,e);i=l}return s}var i8e=20,a8e=["top","right","bottom","left","width","height","size","weight"],o8e=typeof MutationObserver<"u",s8e=(function(){function r(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=n8e(this.refresh.bind(this),i8e)}return r.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},r.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},r.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},r.prototype.updateObservers_=function(){var e=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return e.forEach(function(t){return t.broadcastActive()}),e.length>0},r.prototype.connect_=function(){!rh||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),o8e?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},r.prototype.disconnect_=function(){!rh||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},r.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?"":t,i=a8e.some(function(a){return!!~n.indexOf(a)});i&&this.refresh()},r.getInstance=function(){return this.instance_||(this.instance_=new r),this.instance_},r.instance_=null,r})(),m0=(function(r,e){for(var t=0,n=Object.keys(e);t<n.length;t++){var i=n[t];Object.defineProperty(r,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return r}),Go=(function(r){var e=r&&r.ownerDocument&&r.ownerDocument.defaultView;return e||Lu}),g0=ec(0,0,0,0);function Ru(r){return parseFloat(r)||0}function Xg(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return e.reduce(function(n,i){var a=r["border-"+i+"-width"];return n+Ru(a)},0)}function l8e(r){for(var e=["top","right","bottom","left"],t={},n=0,i=e;n<i.length;n++){var a=i[n],o=r["padding-"+a];t[a]=Ru(o)}return t}function u8e(r){var e=r.getBBox();return ec(0,0,e.width,e.height)}function c8e(r){var e=r.clientWidth,t=r.clientHeight;if(!e&&!t)return g0;var n=Go(r).getComputedStyle(r),i=l8e(n),a=i.left+i.right,o=i.top+i.bottom,s=Ru(n.width),l=Ru(n.height);if(n.boxSizing==="border-box"&&(Math.round(s+a)!==e&&(s-=Xg(n,"left","right")+a),Math.round(l+o)!==t&&(l-=Xg(n,"top","bottom")+o)),!d8e(r)){var f=Math.round(s+a)-e,p=Math.round(l+o)-t;Math.abs(f)!==1&&(s-=f),Math.abs(p)!==1&&(l-=p)}return ec(i.left,i.top,s,l)}var f8e=(function(){return typeof SVGGraphicsElement<"u"?function(r){return r instanceof Go(r).SVGGraphicsElement}:function(r){return r instanceof Go(r).SVGElement&&typeof r.getBBox=="function"}})();function d8e(r){return r===Go(r).document.documentElement}function h8e(r){return rh?f8e(r)?u8e(r):c8e(r):g0}function p8e(r){var e=r.x,t=r.y,n=r.width,i=r.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(a.prototype);return m0(o,{x:e,y:t,width:n,height:i,top:t,right:e+n,bottom:i+t,left:e}),o}function ec(r,e,t,n){return{x:r,y:e,width:t,height:n}}var v8e=(function(){function r(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ec(0,0,0,0),this.target=e}return r.prototype.isActive=function(){var e=h8e(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},r.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},r})(),m8e=(function(){function r(e,t){var n=p8e(t);m0(this,{target:e,contentRect:n})}return r})(),g8e=(function(){function r(e,t,n){if(this.activeObservations_=[],this.observations_=new v0,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return r.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Go(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v8e(e)),this.controller_.addObserver(this),this.controller_.refresh())}},r.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Go(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},r.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},r.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},r.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(n){return new m8e(n.target,n.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},r.prototype.clearActive=function(){this.activeObservations_.splice(0)},r.prototype.hasActive=function(){return this.activeObservations_.length>0},r})(),y0=typeof WeakMap<"u"?new WeakMap:new v0,b0=(function(){function r(e){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=s8e.getInstance(),n=new g8e(e,t,this);y0.set(this,n)}return r})();["observe","unobserve","disconnect"].forEach(function(r){b0.prototype[r]=function(){var e;return(e=y0.get(this))[r].apply(e,arguments)}});var y8e=(function(){return typeof Lu.ResizeObserver<"u"?Lu.ResizeObserver:b0})(),b8e=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.execCommand=function(t){var n=fi(t.target,"li");this.props.execCommand("heading",{level:Number(n.getAttribute("data-level"))})},e.prototype.render=function(){var t=this;return It(Qg||(Qg=Rt([`
|
|
80
|
-
<ul
|
|
81
|
-
onClick=`,`
|
|
82
|
-
aria-role="menu"
|
|
83
|
-
aria-label="`,`"
|
|
84
|
-
>
|
|
85
|
-
`,`
|
|
86
|
-
<li data-type="Paragraph" aria-role="menuitem">
|
|
87
|
-
<div>`,`</div>
|
|
88
|
-
</li>
|
|
89
|
-
</ul>
|
|
90
|
-
`],[`
|
|
91
|
-
<ul
|
|
92
|
-
onClick=`,`
|
|
93
|
-
aria-role="menu"
|
|
94
|
-
aria-label="`,`"
|
|
95
|
-
>
|
|
96
|
-
`,`
|
|
97
|
-
<li data-type="Paragraph" aria-role="menuitem">
|
|
98
|
-
<div>`,`</div>
|
|
99
|
-
</li>
|
|
100
|
-
</ul>
|
|
101
|
-
`])),function(n){return t.execCommand(n)},mt.get("Headings"),[1,2,3,4,5,6].map(function(n){return It(Zg||(Zg=Rt([`
|
|
102
|
-
<li data-level="`,`" data-type="Heading" aria-role="menuitem">
|
|
103
|
-
<`,">"," ",`</$>
|
|
104
|
-
</li>
|
|
105
|
-
`],[`
|
|
106
|
-
<li data-level="`,`" data-type="Heading" aria-role="menuitem">
|
|
107
|
-
<`,">"," ",`</$>
|
|
108
|
-
</li>
|
|
109
|
-
`])),n,"h"+n,mt.get("Heading"),n)}),mt.get("Paragraph"))},e})(Gr),Zg,Qg,k0=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.toggleTab=function(t,n){this.props.onClick(t,n)},e.prototype.render=function(){var t=this;return It(ty||(ty=Rt([`
|
|
110
|
-
<div class="`,`" aria-role="tabpanel">
|
|
111
|
-
`,`
|
|
112
|
-
</div>
|
|
113
|
-
`],[`
|
|
114
|
-
<div class="`,`" aria-role="tabpanel">
|
|
115
|
-
`,`
|
|
116
|
-
</div>
|
|
117
|
-
`])),Ze("tabs"),this.props.tabs.map(function(n){var i=n.name,a=n.text,o=t.props.activeTab===i;return It(ey||(ey=Rt([`
|
|
118
|
-
<div
|
|
119
|
-
class="tab-item`,`"
|
|
120
|
-
onClick=`,`
|
|
121
|
-
aria-role="tab"
|
|
122
|
-
aria-label="`,`"
|
|
123
|
-
aria-selected="`,`"
|
|
124
|
-
tabindex="`,`"
|
|
125
|
-
>
|
|
126
|
-
`,`
|
|
127
|
-
</div>
|
|
128
|
-
`],[`
|
|
129
|
-
<div
|
|
130
|
-
class="tab-item`,`"
|
|
131
|
-
onClick=`,`
|
|
132
|
-
aria-role="tab"
|
|
133
|
-
aria-label="`,`"
|
|
134
|
-
aria-selected="`,`"
|
|
135
|
-
tabindex="`,`"
|
|
136
|
-
>
|
|
137
|
-
`,`
|
|
138
|
-
</div>
|
|
139
|
-
`])),o?" active":"",function(s){return t.toggleTab(s,i)},mt.get(a),o?"true":"false",o?"0":"-1",mt.get(a))}))},e})(Gr),ey,ty,k8e="ui",w8e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.initialize=function(i){i===void 0&&(i="file");var a=n.refs.url;a.value="",n.refs.altText.value="",n.refs.file.value="",Yn(a,"wrong"),n.setState({activeTab:i,file:null,fileNameElClassName:""})},n.execCommand=function(){n.state.activeTab==="file"?n.emitAddImageBlob():n.emitAddImage()},n.toggleTab=function(i,a){a!==n.state.activeTab&&n.initialize(a)},n.showFileSelectBox=function(){n.refs.file.click()},n.changeFile=function(i){var a=i.target.files;a?.length&&n.setState({file:a[0]})},n.state={activeTab:"file",file:null,fileNameElClassName:""},n.tabs=[{name:"file",text:"File"},{name:"url",text:"URL"}],n}return e.prototype.emitAddImageBlob=function(){var t=this,n=this.refs.file.files,i=this.refs.altText,a=" wrong";if(n?.length){a="";var o=n.item(0),s=function(l,f){return t.props.execCommand("addImage",{imageUrl:l,altText:f||i.value})};this.props.eventEmitter.emit("addImageBlobHook",o,s,k8e)}this.setState({fileNameElClassName:a})},e.prototype.emitAddImage=function(){var t=this.refs.url,n=this.refs.altText,i=t.value,a=n.value||"image";if(Yn(t,"wrong"),!i.length){ci(t,"wrong");return}i&&this.props.execCommand("addImage",{imageUrl:i,altText:a})},e.prototype.preventSelectStart=function(t){t.preventDefault()},e.prototype.updated=function(){this.props.show||this.initialize()},e.prototype.render=function(){var t=this,n=this.state,i=n.activeTab,a=n.file,o=n.fileNameElClassName;return It(ry||(ry=Rt([`
|
|
140
|
-
<div aria-label="`,`">
|
|
141
|
-
<`," tabs="," activeTab="," onClick=",` />
|
|
142
|
-
<div style="display:`,`">
|
|
143
|
-
<label for="toastuiImageUrlInput">`,`</label>
|
|
144
|
-
<input
|
|
145
|
-
id="toastuiImageUrlInput"
|
|
146
|
-
type="text"
|
|
147
|
-
ref=`,`
|
|
148
|
-
/>
|
|
149
|
-
</div>
|
|
150
|
-
<div style="display:`,`;position: relative;">
|
|
151
|
-
<label for="toastuiImageFileInput">`,`</label>
|
|
152
|
-
<span
|
|
153
|
-
class="`,"",`"
|
|
154
|
-
onClick=`,`
|
|
155
|
-
onSelectstart=`,`
|
|
156
|
-
>
|
|
157
|
-
`,`
|
|
158
|
-
</span>
|
|
159
|
-
<button
|
|
160
|
-
type="button"
|
|
161
|
-
class="`,`"
|
|
162
|
-
onClick=`,`
|
|
163
|
-
>
|
|
164
|
-
`,`
|
|
165
|
-
</button>
|
|
166
|
-
<input
|
|
167
|
-
id="toastuiImageFileInput"
|
|
168
|
-
type="file"
|
|
169
|
-
accept="image/*"
|
|
170
|
-
onChange=`,`
|
|
171
|
-
ref=`,`
|
|
172
|
-
/>
|
|
173
|
-
</div>
|
|
174
|
-
<label for="toastuiAltTextInput">`,`</label>
|
|
175
|
-
<input
|
|
176
|
-
id="toastuiAltTextInput"
|
|
177
|
-
type="text"
|
|
178
|
-
ref=`,`
|
|
179
|
-
/>
|
|
180
|
-
<div class="`,`">
|
|
181
|
-
<button type="button" class="`,'" onClick=',`>
|
|
182
|
-
`,`
|
|
183
|
-
</button>
|
|
184
|
-
<button type="button" class="`,'" onClick=',`>
|
|
185
|
-
`,`
|
|
186
|
-
</button>
|
|
187
|
-
</div>
|
|
188
|
-
</div>
|
|
189
|
-
`],[`
|
|
190
|
-
<div aria-label="`,`">
|
|
191
|
-
<`," tabs="," activeTab="," onClick=",` />
|
|
192
|
-
<div style="display:`,`">
|
|
193
|
-
<label for="toastuiImageUrlInput">`,`</label>
|
|
194
|
-
<input
|
|
195
|
-
id="toastuiImageUrlInput"
|
|
196
|
-
type="text"
|
|
197
|
-
ref=`,`
|
|
198
|
-
/>
|
|
199
|
-
</div>
|
|
200
|
-
<div style="display:`,`;position: relative;">
|
|
201
|
-
<label for="toastuiImageFileInput">`,`</label>
|
|
202
|
-
<span
|
|
203
|
-
class="`,"",`"
|
|
204
|
-
onClick=`,`
|
|
205
|
-
onSelectstart=`,`
|
|
206
|
-
>
|
|
207
|
-
`,`
|
|
208
|
-
</span>
|
|
209
|
-
<button
|
|
210
|
-
type="button"
|
|
211
|
-
class="`,`"
|
|
212
|
-
onClick=`,`
|
|
213
|
-
>
|
|
214
|
-
`,`
|
|
215
|
-
</button>
|
|
216
|
-
<input
|
|
217
|
-
id="toastuiImageFileInput"
|
|
218
|
-
type="file"
|
|
219
|
-
accept="image/*"
|
|
220
|
-
onChange=`,`
|
|
221
|
-
ref=`,`
|
|
222
|
-
/>
|
|
223
|
-
</div>
|
|
224
|
-
<label for="toastuiAltTextInput">`,`</label>
|
|
225
|
-
<input
|
|
226
|
-
id="toastuiAltTextInput"
|
|
227
|
-
type="text"
|
|
228
|
-
ref=`,`
|
|
229
|
-
/>
|
|
230
|
-
<div class="`,`">
|
|
231
|
-
<button type="button" class="`,'" onClick=',`>
|
|
232
|
-
`,`
|
|
233
|
-
</button>
|
|
234
|
-
<button type="button" class="`,'" onClick=',`>
|
|
235
|
-
`,`
|
|
236
|
-
</button>
|
|
237
|
-
</div>
|
|
238
|
-
</div>
|
|
239
|
-
`])),mt.get("Insert image"),k0,this.tabs,i,this.toggleTab,i==="url"?"block":"none",mt.get("Image URL"),function(s){return t.refs.url=s},i==="file"?"block":"none",mt.get("Select image file"),Ze("file-name"),a?" has-file":o,this.showFileSelectBox,this.preventSelectStart,a?a.name:mt.get("No file"),Ze("file-select-button"),this.showFileSelectBox,mt.get("Choose a file"),this.changeFile,function(s){return t.refs.file=s},mt.get("Description"),function(s){return t.refs.altText=s},Ze("button-container"),Ze("close-button"),this.props.hidePopup,mt.get("Cancel"),Ze("ok-button"),this.execCommand,mt.get("OK"))},e})(Gr),ry,C8e=(function(r){Ge(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.execCommand=function(){var n=t.refs.url,i=t.refs.text;if(Yn(n,"wrong"),Yn(i,"wrong"),n.value.length<1){ci(n,"wrong");return}var a=ei(t.props.initialValues.linkUrl);if(a&&i.value.length<1){ci(i,"wrong");return}t.props.execCommand("addLink",{linkUrl:n.value,linkText:i.value})},t}return e.prototype.initialize=function(){var t=this.props.initialValues,n=t.linkUrl,i=t.linkText,a=this.refs.url,o=this.refs.text;Yn(a,"wrong"),Yn(o,"wrong","disabled"),o.removeAttribute("disabled"),n&&(ci(o,"disabled"),o.setAttribute("disabled","disabled")),a.value=n||"",o.value=i||""},e.prototype.mounted=function(){this.initialize()},e.prototype.updated=function(t){!t.show&&this.props.show&&this.initialize()},e.prototype.render=function(){var t=this;return It(ny||(ny=Rt([`
|
|
240
|
-
<div aria-label="`,`">
|
|
241
|
-
<label for="toastuiLinkUrlInput">`,`</label>
|
|
242
|
-
<input
|
|
243
|
-
id="toastuiLinkUrlInput"
|
|
244
|
-
type="text"
|
|
245
|
-
ref=`,`
|
|
246
|
-
/>
|
|
247
|
-
<label for="toastuiLinkTextInput">`,`</label>
|
|
248
|
-
<input
|
|
249
|
-
id="toastuiLinkTextInput"
|
|
250
|
-
type="text"
|
|
251
|
-
ref=`,`
|
|
252
|
-
/>
|
|
253
|
-
<div class="`,`">
|
|
254
|
-
<button type="button" class="`,'" onClick=',`>
|
|
255
|
-
`,`
|
|
256
|
-
</button>
|
|
257
|
-
<button type="button" class="`,'" onClick=',`>
|
|
258
|
-
`,`
|
|
259
|
-
</button>
|
|
260
|
-
</div>
|
|
261
|
-
</div>
|
|
262
|
-
`],[`
|
|
263
|
-
<div aria-label="`,`">
|
|
264
|
-
<label for="toastuiLinkUrlInput">`,`</label>
|
|
265
|
-
<input
|
|
266
|
-
id="toastuiLinkUrlInput"
|
|
267
|
-
type="text"
|
|
268
|
-
ref=`,`
|
|
269
|
-
/>
|
|
270
|
-
<label for="toastuiLinkTextInput">`,`</label>
|
|
271
|
-
<input
|
|
272
|
-
id="toastuiLinkTextInput"
|
|
273
|
-
type="text"
|
|
274
|
-
ref=`,`
|
|
275
|
-
/>
|
|
276
|
-
<div class="`,`">
|
|
277
|
-
<button type="button" class="`,'" onClick=',`>
|
|
278
|
-
`,`
|
|
279
|
-
</button>
|
|
280
|
-
<button type="button" class="`,'" onClick=',`>
|
|
281
|
-
`,`
|
|
282
|
-
</button>
|
|
283
|
-
</div>
|
|
284
|
-
</div>
|
|
285
|
-
`])),mt.get("Insert link"),mt.get("URL"),function(n){return t.refs.url=n},mt.get("Link text"),function(n){return t.refs.text=n},Ze("button-container"),Ze("close-button"),this.props.hidePopup,mt.get("Cancel"),Ze("ok-button"),this.execCommand,mt.get("OK"))},e})(Gr),ny,iy=20,ay=20,oy=5,sy=14,ly=5,uy=9,T8e=1,S8e=1,cy=1,x8e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.extendSelectionRange=function(i){var a=i.pageX,o=i.pageY,s=a-n.offsetRect.left,l=o-n.offsetRect.top,f=n.getSelectionRangeByOffset(s,l);n.setState(Ce({},f))},n.execCommand=function(){n.props.execCommand("addTable",{rowCount:n.state.rowIdx+1,columnCount:n.state.colIdx+1})},n.state={rowIdx:-1,colIdx:-1},n}return e.prototype.getDescription=function(){return this.state.colIdx===-1?"":this.state.colIdx+1+" x "+(this.state.rowIdx+1)},e.prototype.getBoundByRange=function(t,n){return{width:(t+1)*iy,height:(n+1)*ay}},e.prototype.getRangeByOffset=function(t,n){return{colIdx:Math.floor(t/iy),rowIdx:Math.floor(n/ay)}},e.prototype.getTableRange=function(){var t=this.state,n=t.colIdx,i=t.rowIdx,a=Math.max(n,ly),o=Math.max(i,oy);return n>=ly&&a<uy&&(a+=1),i>=oy&&o<sy&&(o+=1),{colIdx:a+1,rowIdx:o+1}},e.prototype.getSelectionAreaBound=function(){var t=this.getBoundByRange(this.state.colIdx,this.state.rowIdx),n=t.width,i=t.height;return!n&&!i?{display:"none"}:{width:n-cy,height:i-cy,display:"block"}},e.prototype.getSelectionRangeByOffset=function(t,n){var i=this.getRangeByOffset(t,n);return i.rowIdx=Math.min(Math.max(i.rowIdx,T8e),sy),i.colIdx=Math.min(Math.max(i.colIdx,S8e),uy),i},e.prototype.updated=function(){if(!this.props.show)this.setState({colIdx:-1,rowIdx:-1});else if(this.state.colIdx===-1&&this.state.rowIdx===-1){var t=this.refs.tableEl.getBoundingClientRect(),n=t.left,i=t.top;this.offsetRect={left:window.pageXOffset+n,top:window.pageYOffset+i}}},e.prototype.createTableArea=function(t){for(var n=t.colIdx,i=t.rowIdx,a=[],o=0;o<i;o+=1){for(var s=[],l=0;l<n;l+=1){var f=""+Ze("table-cell")+(o>0?"":" header");s.push(It(fy||(fy=Rt(['<div class="','"></div>'],['<div class="','"></div>'])),f))}a.push(It(dy||(dy=Rt(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),Ze("table-row"),s))}return It(hy||(hy=Rt(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),Ze("table"),a)},e.prototype.render=function(){var t=this,n=this.getTableRange(),i=this.getSelectionAreaBound();return It(py||(py=Rt([`
|
|
286
|
-
<div aria-label="`,`">
|
|
287
|
-
<div
|
|
288
|
-
class="`,`"
|
|
289
|
-
ref=`,`
|
|
290
|
-
onMousemove=`,`
|
|
291
|
-
onClick=`,`
|
|
292
|
-
>
|
|
293
|
-
`,`
|
|
294
|
-
<div class="`,'" style=',`></div>
|
|
295
|
-
</div>
|
|
296
|
-
<p class="`,'">',`</p>
|
|
297
|
-
</div>
|
|
298
|
-
`],[`
|
|
299
|
-
<div aria-label="`,`">
|
|
300
|
-
<div
|
|
301
|
-
class="`,`"
|
|
302
|
-
ref=`,`
|
|
303
|
-
onMousemove=`,`
|
|
304
|
-
onClick=`,`
|
|
305
|
-
>
|
|
306
|
-
`,`
|
|
307
|
-
<div class="`,'" style=',`></div>
|
|
308
|
-
</div>
|
|
309
|
-
<p class="`,'">',`</p>
|
|
310
|
-
</div>
|
|
311
|
-
`])),mt.get("Insert table"),Ze("table-selection"),function(a){return t.refs.tableEl=a},this.extendSelectionRange,this.execCommand,this.createTableArea(n),Ze("table-selection-layer"),i,Ze("table-description"),this.getDescription())},e})(Gr),fy,dy,hy,py,E8e=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mounted=function(){this.refs.el.appendChild(this.props.body)},e.prototype.updated=function(t){this.refs.el.replaceChild(this.props.body,t.body)},e.prototype.render=function(){var t=this;return It(vy||(vy=Rt(["<div ref=","></div>"],["<div ref=","></div>"])),function(n){return t.refs.el=n})},e})(Gr),vy;function nh(r){return zi(r)?A8e(r):r}function M8e(){var r=document.createElement("label"),e=document.createElement("input"),t=document.createElement("span");r.className="scroll-sync active",e.type="checkbox",e.checked=!0,t.className="switch";var n=function(i){return e.addEventListener("change",function(a){var o=a.target.checked;o?ci(r,"active"):Yn(r,"active"),i("toggleScrollSync",{active:o})})};return r.appendChild(e),r.appendChild(t),{name:"scrollSync",el:r,onMounted:n}}function A8e(r){var e;switch(r){case"heading":e={name:"heading",className:"heading",tooltip:mt.get("Headings"),state:"heading"};break;case"bold":e={name:"bold",className:"bold",command:"bold",tooltip:mt.get("Bold"),state:"strong"};break;case"italic":e={name:"italic",className:"italic",command:"italic",tooltip:mt.get("Italic"),state:"emph"};break;case"strike":e={name:"strike",className:"strike",command:"strike",tooltip:mt.get("Strike"),state:"strike"};break;case"hr":e={name:"hr",className:"hrline",command:"hr",tooltip:mt.get("Line"),state:"thematicBreak"};break;case"quote":e={name:"quote",className:"quote",command:"blockQuote",tooltip:mt.get("Blockquote"),state:"blockQuote"};break;case"ul":e={name:"ul",className:"bullet-list",command:"bulletList",tooltip:mt.get("Unordered list"),state:"bulletList"};break;case"ol":e={name:"ol",className:"ordered-list",command:"orderedList",tooltip:mt.get("Ordered list"),state:"orderedList"};break;case"task":e={name:"task",className:"task-list",command:"taskList",tooltip:mt.get("Task"),state:"taskList"};break;case"table":e={name:"table",className:"table",tooltip:mt.get("Insert table"),state:"table"};break;case"image":e={name:"image",className:"image",tooltip:mt.get("Insert image")};break;case"link":e={name:"link",className:"link",tooltip:mt.get("Insert link")};break;case"code":e={name:"code",className:"code",command:"code",tooltip:mt.get("Code"),state:"code"};break;case"codeblock":e={name:"codeblock",className:"codeblock",command:"codeBlock",tooltip:mt.get("Insert CodeBlock"),state:"codeBlock"};break;case"indent":e={name:"indent",className:"indent",command:"indent",tooltip:mt.get("Indent"),state:"indent"};break;case"outdent":e={name:"outdent",className:"outdent",command:"outdent",tooltip:mt.get("Outdent"),state:"outdent"};break;case"scrollSync":e=M8e();break;case"more":e={name:"more",className:"more",tooltip:mt.get("More")};break}return e.name!=="scrollSync"&&(e.className+=" "+Ze("toolbar-icons")),e}function Zh(r,e){var t=e.el,n=e.pos,i=e.popup,a=e.initialValues;switch(r){case"heading":return{render:function(o){return It(my||(my=Rt(["<"," ..."," />"],["<"," ..."," />"])),b8e,o)},className:Ze("popup-add-heading"),fromEl:t,pos:n};case"link":return{render:function(o){return It(gy||(gy=Rt(["<"," ..."," />"],["<"," ..."," />"])),C8e,o)},className:Ze("popup-add-link"),fromEl:t,pos:n,initialValues:a};case"image":return{render:function(o){return It(yy||(yy=Rt(["<"," ..."," />"],["<"," ..."," />"])),w8e,o)},className:Ze("popup-add-image"),fromEl:t,pos:n};case"table":return{render:function(o){return It(by||(by=Rt(["<"," ..."," />"],["<"," ..."," />"])),x8e,o)},className:Ze("popup-add-table"),fromEl:t,pos:n};case"customPopupBody":return i?Ce({render:function(o){return It(ky||(ky=Rt(["<"," ..."," body="," />"],["<"," ..."," body="," />"])),E8e,o,i.body)},fromEl:t,pos:n},i):null;default:return null}}function Iu(r){r.hidden=r.length===r.filter(function(e){return e.hidden}).length}function O8e(r,e){var t=function(n){return n.hidden=n.name==="scrollSync"&&e,n};return r.reduce(function(n,i){n.push(i.map(function(o){return t(nh(o))}));var a=n[(n.length||1)-1];return a&&Iu(a),n},[])}function N8e(r,e){r.forEach(function(t){t.forEach(function(n){return n.hidden=n.name==="scrollSync"&&e}),Iu(t)})}var my,gy,yy,by,ky,D8e=20,L8e=(function(r){Ge(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handleMousedown=function(n){!fi(n.target,"."+Ze("popup"))&&!fi(n.target,t.props.info.fromEl)&&t.props.hidePopup()},t}return e.prototype.mounted=function(){document.addEventListener("mousedown",this.handleMousedown),this.props.eventEmitter.listen("closePopup",this.props.hidePopup)},e.prototype.beforeDestroy=function(){document.removeEventListener("mousedown",this.handleMousedown)},e.prototype.updated=function(t){var n=this.props,i=n.show,a=n.info;if(i&&a.pos&&t.show!==i){var o=Ce({},a.pos),s=this.refs.el.offsetWidth,l=fi(this.refs.el,"."+Ze("toolbar")),f=l.offsetWidth;o.left+s>=f&&(o.left=f-s-D8e),xh(this.state.popupPos,o)||this.setState({popupPos:o})}},e.prototype.render=function(){var t=this,n=this.props,i=n.info,a=n.show,o=n.hidePopup,s=n.eventEmitter,l=n.execCommand,f=i||{},p=f.className,b=p===void 0?"":p,T=f.style,x=f.render,E=f.initialValues,B=E===void 0?{}:E,F=Ce(Ce({display:a?"block":"none"},T),this.state.popupPos);return It(wy||(wy=Rt([`
|
|
312
|
-
<div
|
|
313
|
-
class="`," ",`"
|
|
314
|
-
style=`,`
|
|
315
|
-
ref=`,`
|
|
316
|
-
aria-role="dialog"
|
|
317
|
-
>
|
|
318
|
-
<div class="`,`">
|
|
319
|
-
`,`
|
|
320
|
-
</div>
|
|
321
|
-
</div>
|
|
322
|
-
`],[`
|
|
323
|
-
<div
|
|
324
|
-
class="`," ",`"
|
|
325
|
-
style=`,`
|
|
326
|
-
ref=`,`
|
|
327
|
-
aria-role="dialog"
|
|
328
|
-
>
|
|
329
|
-
<div class="`,`">
|
|
330
|
-
`,`
|
|
331
|
-
</div>
|
|
332
|
-
</div>
|
|
333
|
-
`])),Ze("popup"),b,F,function(_){return t.refs.el=_},Ze("popup-body"),x&&x({eventEmitter:s,show:a,hidePopup:o,execCommand:l,initialValues:B}))},e})(Gr),wy,Cy=6;function Qh(r){return(function(e){Ge(t,e);function t(n){var i=e.call(this,n)||this;return i.showTooltip=function(a){var o=i.props.item.tooltip;if(!i.props.disabled&&o){var s=i.getBound(a),l=s.left+Cy+"px",f=s.top+Cy+"px";hi(i.props.tooltipRef.current,{display:"block",left:l,top:f}),i.props.tooltipRef.current.querySelector(".text").textContent=o}},i.hideTooltip=function(){hi(i.props.tooltipRef.current,"display","none")},i.state={active:!1,disabled:n.disabled},i.addEvent(),i}return t.prototype.addEvent=function(){var n=this,i=this.props,a=i.item,o=i.eventEmitter;a.state&&o.listen("changeToolbarState",function(s){var l,f=s.toolbarState,p=(l=f[a.state])!==null&&l!==void 0?l:{},b=p.active,T=p.disabled;n.setState({active:!!b,disabled:T??n.props.disabled})})},t.prototype.getBound=function(n){var i=_k(n,fi(n,"."+Ze("toolbar"))),a=i.offsetLeft,o=i.offsetTop;return{left:a,top:n.offsetHeight+o}},t.prototype.render=function(){return It(Ty||(Ty=Rt([`
|
|
334
|
-
<`,`
|
|
335
|
-
...`,`
|
|
336
|
-
active=`,`
|
|
337
|
-
showTooltip=`,`
|
|
338
|
-
hideTooltip=`,`
|
|
339
|
-
getBound=`,`
|
|
340
|
-
disabled=`,`
|
|
341
|
-
/>
|
|
342
|
-
`],[`
|
|
343
|
-
<`,`
|
|
344
|
-
...`,`
|
|
345
|
-
active=`,`
|
|
346
|
-
showTooltip=`,`
|
|
347
|
-
hideTooltip=`,`
|
|
348
|
-
getBound=`,`
|
|
349
|
-
disabled=`,`
|
|
350
|
-
/>
|
|
351
|
-
`])),r,this.props,this.state.active,this.showTooltip,this.hideTooltip,this.getBound,this.state.disabled||this.props.disabled)},t})(Gr)}var Ty,R8e=80,I8e=(function(r){Ge(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.showTooltip=function(){t.props.showTooltip(t.refs.el)},t.execCommand=function(){var n=t.props,i=n.item,a=n.execCommand,o=n.setPopupInfo,s=n.getBound,l=n.eventEmitter,f=i.command,p=i.name,b=i.popup;if(f)a(f);else{var T=b?"customPopupBody":p,x=l.emit("query","getPopupInitialValues",{popupName:T})[0],E=Zh(T,{el:t.refs.el,pos:s(t.refs.el),popup:b,initialValues:x});E&&o(E)}},t}return e.prototype.mounted=function(){this.setItemWidth()},e.prototype.updated=function(t){t.item.name!==this.props.item.name&&this.setItemWidth()},e.prototype.setItemWidth=function(){var t=this.props,n=t.setItemWidth,i=t.item;n&&n(i.name,Ih(this.refs.el)+(i.hidden?R8e:0))},e.prototype.render=function(){var t=this,n=this.props,i=n.hideTooltip,a=n.disabled,o=n.item,s=n.active,l=Ce({display:o.hidden?"none":null},o.style),f=""+(o.className||"")+(s?" active":"");return It(Sy||(Sy=Rt([`
|
|
352
|
-
<button
|
|
353
|
-
ref=`,`
|
|
354
|
-
type="button"
|
|
355
|
-
style=`,`
|
|
356
|
-
class=`,`
|
|
357
|
-
onClick=`,`
|
|
358
|
-
onMouseover=`,`
|
|
359
|
-
onMouseout=`,`
|
|
360
|
-
disabled=`,`
|
|
361
|
-
aria-label=`,`
|
|
362
|
-
>
|
|
363
|
-
`,`
|
|
364
|
-
</button>
|
|
365
|
-
`],[`
|
|
366
|
-
<button
|
|
367
|
-
ref=`,`
|
|
368
|
-
type="button"
|
|
369
|
-
style=`,`
|
|
370
|
-
class=`,`
|
|
371
|
-
onClick=`,`
|
|
372
|
-
onMouseover=`,`
|
|
373
|
-
onMouseout=`,`
|
|
374
|
-
disabled=`,`
|
|
375
|
-
aria-label=`,`
|
|
376
|
-
>
|
|
377
|
-
`,`
|
|
378
|
-
</button>
|
|
379
|
-
`])),function(p){return t.refs.el=p},l,f,this.execCommand,this.showTooltip,i,!!a,o.text||o.tooltip||"",o.text||"")},e})(Gr),P8e=Qh(I8e),Sy,B8e=(function(r){Ge(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.showTooltip=function(){t.props.showTooltip(t.refs.el)},t.showPopup=function(){var n=Zh("customPopupBody",{el:t.refs.el,pos:t.props.getBound(t.refs.el),popup:t.props.item.popup});n&&t.props.setPopupInfo(n)},t}return e.prototype.mounted=function(){var t=this.props,n=t.setItemWidth,i=t.item;this.refs.el.appendChild(i.el),n&&n(i.name,Ih(this.refs.el)),i.onMounted&&i.onMounted(this.props.execCommand)},e.prototype.updated=function(t){var n,i=this.props,a=i.item,o=i.active,s=i.disabled;(t.active!==o||t.disabled!==s)&&((n=a.onUpdated)===null||n===void 0||n.call(a,{active:o,disabled:s}))},e.prototype.render=function(){var t=this,n=this.props,i=n.disabled,a=n.item,o={display:a.hidden?"none":"inline-block"},s=function(l){return i?null:l};return It(xy||(xy=Rt([`
|
|
380
|
-
<div
|
|
381
|
-
ref=`,`
|
|
382
|
-
style=`,`
|
|
383
|
-
class=`,`
|
|
384
|
-
onClick=`,`
|
|
385
|
-
onMouseover=`,`
|
|
386
|
-
onMouseout=`,`
|
|
387
|
-
></div>
|
|
388
|
-
`],[`
|
|
389
|
-
<div
|
|
390
|
-
ref=`,`
|
|
391
|
-
style=`,`
|
|
392
|
-
class=`,`
|
|
393
|
-
onClick=`,`
|
|
394
|
-
onMouseover=`,`
|
|
395
|
-
onMouseout=`,`
|
|
396
|
-
></div>
|
|
397
|
-
`])),function(l){return t.refs.el=l},o,Ze("toolbar-item-wrapper"),s(this.showPopup),s(this.showTooltip),s(this.props.hideTooltip))},e})(Gr),F8e=Qh(B8e),xy,w0=(function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(){var t=this,n=this.props,i=n.group,a=n.hiddenDivider,o=i.hidden?{display:"none"}:null,s=a?{display:"none"}:null;return It(My||(My=Rt([`
|
|
398
|
-
<div class="`,'" style=',`>
|
|
399
|
-
`,`
|
|
400
|
-
<div class="`,'" style=',`></div>
|
|
401
|
-
</div>
|
|
402
|
-
`],[`
|
|
403
|
-
<div class="`,'" style=',`>
|
|
404
|
-
`,`
|
|
405
|
-
<div class="`,'" style=',`></div>
|
|
406
|
-
</div>
|
|
407
|
-
`])),Ze("toolbar-group"),o,i.map(function(l){var f=l.el?F8e:P8e;return It(Ey||(Ey=Rt(["<"," key="," ..."," item="," />"],["<"," key="," ..."," item="," />"])),f,l.name,t.props,l)}),Ze("toolbar-divider"),s)},e})(Gr),Ey,My,q8e=4,H8e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.handleClickDocument=function(i){var a=i.target;!fi(a,"."+Ze("dropdown-toolbar"))&&!fi(a,".more")&&n.setState({showDropdown:!1,dropdownPos:null})},n.showTooltip=function(){n.props.showTooltip(n.refs.el)},n.state={showDropdown:!1,dropdownPos:null},n}return e.prototype.getBound=function(){var t=this.props.getBound(this.refs.el);return t.top+=q8e,Ce(Ce({},t),{left:null,right:10})},e.prototype.mounted=function(){document.addEventListener("click",this.handleClickDocument)},e.prototype.updated=function(){this.state.showDropdown&&!this.state.dropdownPos&&this.setState({dropdownPos:this.getBound()})},e.prototype.beforeDestroy=function(){document.removeEventListener("click",this.handleClickDocument)},e.prototype.render=function(){var t=this,n=this.state,i=n.showDropdown,a=n.dropdownPos,o=this.props,s=o.disabled,l=o.item,f=o.items,p=o.hideTooltip,b=f.filter(function(E){return!E.hidden}),T=b.length?null:{display:"none"},x=i?null:{display:"none"};return It(Oy||(Oy=Rt([`
|
|
408
|
-
<div class="`,'" style=',`>
|
|
409
|
-
<button
|
|
410
|
-
ref=`,`
|
|
411
|
-
type="button"
|
|
412
|
-
class=`,`
|
|
413
|
-
onClick=`,`
|
|
414
|
-
onMouseover=`,`
|
|
415
|
-
onMouseout=`,`
|
|
416
|
-
disabled=`,`
|
|
417
|
-
></button>
|
|
418
|
-
<div
|
|
419
|
-
class="`,`"
|
|
420
|
-
style=`,`
|
|
421
|
-
ref=`,`
|
|
422
|
-
>
|
|
423
|
-
`,`
|
|
424
|
-
</div>
|
|
425
|
-
</div>
|
|
426
|
-
`],[`
|
|
427
|
-
<div class="`,'" style=',`>
|
|
428
|
-
<button
|
|
429
|
-
ref=`,`
|
|
430
|
-
type="button"
|
|
431
|
-
class=`,`
|
|
432
|
-
onClick=`,`
|
|
433
|
-
onMouseover=`,`
|
|
434
|
-
onMouseout=`,`
|
|
435
|
-
disabled=`,`
|
|
436
|
-
></button>
|
|
437
|
-
<div
|
|
438
|
-
class="`,`"
|
|
439
|
-
style=`,`
|
|
440
|
-
ref=`,`
|
|
441
|
-
>
|
|
442
|
-
`,`
|
|
443
|
-
</div>
|
|
444
|
-
</div>
|
|
445
|
-
`])),Ze("toolbar-group"),T,function(E){return t.refs.el=E},l.className,function(){return t.setState({showDropdown:!0})},this.showTooltip,p,s,Ze("dropdown-toolbar"),Ce(Ce({},x),a),function(E){return t.refs.dropdownEl=E},b.length?b.map(function(E,B){var F;return It(Ay||(Ay=Rt([`
|
|
446
|
-
<`,`
|
|
447
|
-
group=`,`
|
|
448
|
-
hiddenDivider=`,`
|
|
449
|
-
...`,`
|
|
450
|
-
/>
|
|
451
|
-
`],[`
|
|
452
|
-
<`,`
|
|
453
|
-
group=`,`
|
|
454
|
-
hiddenDivider=`,`
|
|
455
|
-
...`,`
|
|
456
|
-
/>
|
|
457
|
-
`])),w0,E,B===b.length-1||((F=b[B+1])===null||F===void 0?void 0:F.hidden),t.props)}):null)},e})(Gr),_8e=Qh(H8e),Ay,Oy,z8e=50,V8e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.toggleTab=function(i,a){var o=n.props.eventEmitter;if(n.state.activeTab!==a){var s=a==="write"?"changePreviewTabWrite":"changePreviewTabPreview";o.emit(s),n.setState({activeTab:a})}},n.setItemWidth=function(i,a){n.itemWidthMap[i]=a},n.setPopupInfo=function(i){n.setState({showPopup:!0,popupInfo:i})},n.openPopup=function(i,a){a===void 0&&(a={});var o=n.refs.el.querySelector("."+Ze("toolbar-group")+" ."+i);if(o){var s=_k(o,fi(o,"."+Ze("toolbar"))),l=s.offsetLeft,f=s.offsetTop,p=Zh(i,{el:o,pos:{left:l,top:o.offsetHeight+f},initialValues:a});p&&n.setPopupInfo(p)}},n.hidePopup=function(){n.state.showPopup&&n.setState({showPopup:!1})},n.execCommand=function(i,a){var o=n.props.eventEmitter;o.emit("command",i,a),n.hidePopup()},n.tabs=[{name:"write",text:"Write"},{name:"preview",text:"Preview"}],n.itemWidthMap={},n.initialItems=O8e(t.toolbarItems||[],n.hiddenScrollSync()),n.state={items:n.initialItems,dropdownItems:[],showPopup:!1,popupInfo:{},activeTab:"write"},n.tooltipRef={current:null},n.resizeObserver=new y8e(function(){return n.handleResize()}),n.addEvent(),n}return e.prototype.insertToolbarItem=function(t,n){var i=t.groupIndex,a=t.itemIndex,o=this.initialItems[i];n=nh(n),o?o.splice(a,0,n):this.initialItems.push([n]),this.setState(this.classifyToolbarItems())},e.prototype.removeToolbarItem=function(t){var n=this;Ho(this.initialItems,function(i){var a=!1;return Ho(i,function(o,s){return o.name===t?(a=!0,i.splice(s,1),n.setState(n.classifyToolbarItems()),!1):!0}),!a})},e.prototype.addEvent=function(){var t=this,n=this.props.eventEmitter;this.handleResize=e8e(function(){t.setState({items:t.initialItems,dropdownItems:[]}),t.setState(t.classifyToolbarItems())},200),n.listen("openPopup",this.openPopup)},e.prototype.appendTooltipToRoot=function(){var t='<div class="'+Ze("tooltip")+`" style="display:none">
|
|
458
|
-
<div class="arrow"></div>
|
|
459
|
-
<span class="text"></span>
|
|
460
|
-
</div>`;this.tooltipRef.current=Hk(t,this.refs.el)},e.prototype.hiddenScrollSync=function(){return this.props.editorType==="wysiwyg"||this.props.previewStyle==="tab"},e.prototype.movePrevItemToDropdownToolbar=function(t,n,i,a){var o=function(l){var f=l.pop();f&&a.push(f)};if(t>1)o(i);else{var s=$r(n);s&&o(s)}},e.prototype.classifyToolbarItems=function(){var t=this,n=0,i=this.refs.el.clientWidth,a=this.refs.el.querySelector("."+Ze("toolbar-divider")),o=a?Ih(a):0,s=[],l=[],f=!1;return this.initialItems.forEach(function(p,b){var T=[],x=[];p.forEach(function(E,B){E.hidden||(n+=t.itemWidthMap[E.name],n>i-z8e?(f||(t.movePrevItemToDropdownToolbar(B,s,T,x),f=!0),x.push(E)):T.push(E))}),T.length&&(Iu(T),s.push(T)),x.length&&(Iu(x),l.push(x)),b<t.state.items.length-1&&(n+=o)}),{items:s,dropdownItems:l}},e.prototype.mounted=function(){this.props.previewStyle==="tab"&&this.props.eventEmitter.emit("changePreviewTabWrite",!0),this.setState(this.classifyToolbarItems()),this.appendTooltipToRoot(),this.resizeObserver.observe(this.refs.el)},e.prototype.updated=function(t){var n=this.props,i=n.editorType,a=n.previewStyle,o=n.eventEmitter,s=a!==t.previewStyle,l=i!==t.editorType;if(s||l){N8e(this.initialItems,this.hiddenScrollSync());var f=this.classifyToolbarItems();(s||a==="tab"&&i==="markdown")&&(o.emit("changePreviewTabWrite"),f.activeTab="write"),this.setState(f)}},e.prototype.beforeDestroy=function(){window.removeEventListener("resize",this.handleResize),this.resizeObserver.disconnect(),eo(this.tooltipRef.current)},e.prototype.render=function(){var t=this,n=this.props,i=n.previewStyle,a=n.eventEmitter,o=n.editorType,s=this.state,l=s.popupInfo,f=s.showPopup,p=s.activeTab,b=s.items,T=s.dropdownItems,x={eventEmitter:a,tooltipRef:this.tooltipRef,disabled:o==="markdown"&&i==="tab"&&p==="preview",execCommand:this.execCommand,setPopupInfo:this.setPopupInfo},E=i==="tab"?{borderTopLeftRadius:0}:null;return It(Dy||(Dy=Rt([`
|
|
461
|
-
<div class="`,`">
|
|
462
|
-
<div
|
|
463
|
-
class="`,`"
|
|
464
|
-
style="display: `,`"
|
|
465
|
-
>
|
|
466
|
-
<`," tabs="," activeTab="," onClick=",` />
|
|
467
|
-
</div>
|
|
468
|
-
<div
|
|
469
|
-
class="`,`"
|
|
470
|
-
ref=`,`
|
|
471
|
-
style=`,`
|
|
472
|
-
>
|
|
473
|
-
`,`
|
|
474
|
-
<`,`
|
|
475
|
-
item=`,`
|
|
476
|
-
items=`,`
|
|
477
|
-
...`,`
|
|
478
|
-
/>
|
|
479
|
-
</div>
|
|
480
|
-
<`,`
|
|
481
|
-
info=`,`
|
|
482
|
-
show=`,`
|
|
483
|
-
eventEmitter=`,`
|
|
484
|
-
hidePopup=`,`
|
|
485
|
-
execCommand=`,`
|
|
486
|
-
/>
|
|
487
|
-
</div>
|
|
488
|
-
`],[`
|
|
489
|
-
<div class="`,`">
|
|
490
|
-
<div
|
|
491
|
-
class="`,`"
|
|
492
|
-
style="display: `,`"
|
|
493
|
-
>
|
|
494
|
-
<`," tabs="," activeTab="," onClick=",` />
|
|
495
|
-
</div>
|
|
496
|
-
<div
|
|
497
|
-
class="`,`"
|
|
498
|
-
ref=`,`
|
|
499
|
-
style=`,`
|
|
500
|
-
>
|
|
501
|
-
`,`
|
|
502
|
-
<`,`
|
|
503
|
-
item=`,`
|
|
504
|
-
items=`,`
|
|
505
|
-
...`,`
|
|
506
|
-
/>
|
|
507
|
-
</div>
|
|
508
|
-
<`,`
|
|
509
|
-
info=`,`
|
|
510
|
-
show=`,`
|
|
511
|
-
eventEmitter=`,`
|
|
512
|
-
hidePopup=`,`
|
|
513
|
-
execCommand=`,`
|
|
514
|
-
/>
|
|
515
|
-
</div>
|
|
516
|
-
`])),Ze("toolbar"),Ze("md-tab-container"),o==="wysiwyg"||i==="vertical"?"none":"block",k0,this.tabs,p,this.toggleTab,Ze("defaultUI-toolbar"),function(B){return t.refs.el=B},E,b.map(function(B,F){var _;return It(Ny||(Ny=Rt([`
|
|
517
|
-
<`,`
|
|
518
|
-
group=`,`
|
|
519
|
-
hiddenDivider=`,`
|
|
520
|
-
setItemWidth=`,`
|
|
521
|
-
...`,`
|
|
522
|
-
/>
|
|
523
|
-
`],[`
|
|
524
|
-
<`,`
|
|
525
|
-
group=`,`
|
|
526
|
-
hiddenDivider=`,`
|
|
527
|
-
setItemWidth=`,`
|
|
528
|
-
...`,`
|
|
529
|
-
/>
|
|
530
|
-
`])),w0,B,F===b.length-1||((_=b[F+1])===null||_===void 0?void 0:_.hidden),t.setItemWidth,x)}),_8e,nh("more"),T,x,L8e,l,f,a,this.hidePopup,this.execCommand)},e})(Gr),Ny,Dy,U8e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.handleClickDocument=function(i){fi(i.target,"."+Ze("context-menu"))||n.setState({pos:null})},n.state={pos:null,menuGroups:[]},n.addEvent(),n}return e.prototype.addEvent=function(){var t=this;this.props.eventEmitter.listen("contextmenu",function(n){var i=n.pos,a=n.menuGroups;t.setState({pos:i,menuGroups:a})})},e.prototype.mounted=function(){document.addEventListener("click",this.handleClickDocument)},e.prototype.beforeDestroy=function(){document.removeEventListener("click",this.handleClickDocument)},e.prototype.getMenuGroupElements=function(){var t=this,n=this.state,i=n.pos,a=n.menuGroups;return i?a.reduce(function(o,s){var l=[];return s.forEach(function(f){var p=f.label,b=f.className,T=b===void 0?!1:b,x=f.disabled,E=f.onClick,B=function(){x||(E(),t.setState({pos:null}))};l.push(It(Ly||(Ly=Rt([`
|
|
531
|
-
<li
|
|
532
|
-
onClick=`,`
|
|
533
|
-
class="menu-item`,`"
|
|
534
|
-
aria-role="menuitem"
|
|
535
|
-
>
|
|
536
|
-
<span class="`,'">',`</span>
|
|
537
|
-
</li>
|
|
538
|
-
`],[`
|
|
539
|
-
<li
|
|
540
|
-
onClick=`,`
|
|
541
|
-
class="menu-item`,`"
|
|
542
|
-
aria-role="menuitem"
|
|
543
|
-
>
|
|
544
|
-
<span class="`,'">',`</span>
|
|
545
|
-
</li>
|
|
546
|
-
`])),B,x?" disabled":"",T,p))}),o.push(It(Ry||(Ry=Rt([`<ul class="menu-group">
|
|
547
|
-
`,`
|
|
548
|
-
</ul>`],[`<ul class="menu-group">
|
|
549
|
-
`,`
|
|
550
|
-
</ul>`])),l)),o},[]):[]},e.prototype.render=function(){var t=Ce({display:this.state.pos?"block":"none"},this.state.pos);return It(Iy||(Iy=Rt(['<div class="','" style=',` aria-role="menu">
|
|
551
|
-
`,`
|
|
552
|
-
</div>`],['<div class="','" style=',` aria-role="menu">
|
|
553
|
-
`,`
|
|
554
|
-
</div>`])),Ze("context-menu"),t,this.getMenuGroupElements())},e})(Gr),Ly,Ry,Iy,$8e=(function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;n.changeMode=function(o){o!==n.state.editorType&&n.setState({editorType:o})},n.changePreviewStyle=function(o){o!==n.state.previewStyle&&n.setState({previewStyle:o})},n.hide=function(){n.setState({hide:!0})},n.show=function(){n.setState({hide:!1})};var i=t.editorType,a=t.previewStyle;return n.state={editorType:i,previewStyle:a,hide:!1},n.addEvent(),n}return e.prototype.mounted=function(){var t=this.props.slots,n=t.wwEditor,i=t.mdEditor,a=t.mdPreview;this.refs.wwContainer.appendChild(n),this.refs.mdContainer.insertAdjacentElement("afterbegin",i),this.refs.mdContainer.appendChild(a)},e.prototype.insertToolbarItem=function(t,n){this.toolbar.insertToolbarItem(t,n)},e.prototype.removeToolbarItem=function(t){this.toolbar.removeToolbarItem(t)},e.prototype.render=function(){var t=this,n=this.props,i=n.eventEmitter,a=n.hideModeSwitch,o=n.toolbarItems,s=n.theme,l=this.state,f=l.hide,p=l.previewStyle,b=l.editorType,T=f?" hidden":"",x=Ze(b==="markdown"?"md-mode":"ww-mode"),E=Ze("md")+"-"+p+"-style",B=Ze([s!=="light",s+" "]);return It(By||(By=Rt([`
|
|
555
|
-
<div
|
|
556
|
-
class="`,"","",`"
|
|
557
|
-
ref=`,`
|
|
558
|
-
>
|
|
559
|
-
<`,`
|
|
560
|
-
ref=`,`
|
|
561
|
-
eventEmitter=`,`
|
|
562
|
-
previewStyle=`,`
|
|
563
|
-
toolbarItems=`,`
|
|
564
|
-
editorType=`,`
|
|
565
|
-
/>
|
|
566
|
-
<div
|
|
567
|
-
class="`," ",`"
|
|
568
|
-
ref=`,`
|
|
569
|
-
>
|
|
570
|
-
<div class="`,`">
|
|
571
|
-
<div
|
|
572
|
-
class="`," ",`"
|
|
573
|
-
ref=`,`
|
|
574
|
-
>
|
|
575
|
-
<div class="`,`"></div>
|
|
576
|
-
</div>
|
|
577
|
-
<div
|
|
578
|
-
class="`,`"
|
|
579
|
-
ref=`,`
|
|
580
|
-
/>
|
|
581
|
-
</div>
|
|
582
|
-
</div>
|
|
583
|
-
`,`
|
|
584
|
-
<`," eventEmitter=",` />
|
|
585
|
-
</div>
|
|
586
|
-
`],[`
|
|
587
|
-
<div
|
|
588
|
-
class="`,"","",`"
|
|
589
|
-
ref=`,`
|
|
590
|
-
>
|
|
591
|
-
<`,`
|
|
592
|
-
ref=`,`
|
|
593
|
-
eventEmitter=`,`
|
|
594
|
-
previewStyle=`,`
|
|
595
|
-
toolbarItems=`,`
|
|
596
|
-
editorType=`,`
|
|
597
|
-
/>
|
|
598
|
-
<div
|
|
599
|
-
class="`," ",`"
|
|
600
|
-
ref=`,`
|
|
601
|
-
>
|
|
602
|
-
<div class="`,`">
|
|
603
|
-
<div
|
|
604
|
-
class="`," ",`"
|
|
605
|
-
ref=`,`
|
|
606
|
-
>
|
|
607
|
-
<div class="`,`"></div>
|
|
608
|
-
</div>
|
|
609
|
-
<div
|
|
610
|
-
class="`,`"
|
|
611
|
-
ref=`,`
|
|
612
|
-
/>
|
|
613
|
-
</div>
|
|
614
|
-
</div>
|
|
615
|
-
`,`
|
|
616
|
-
<`," eventEmitter=",` />
|
|
617
|
-
</div>
|
|
618
|
-
`])),B,Ze("defaultUI"),T,function(F){return t.refs.el=F},V8e,function(F){return t.toolbar=F},i,p,o,b,Ze("main"),x,function(F){return t.refs.editorSection=F},Ze("main-container"),Ze("md-container"),E,function(F){return t.refs.mdContainer=F},Ze("md-splitter"),Ze("ww-container"),function(F){return t.refs.wwContainer=F},!a&&It(Py||(Py=Rt(["<"," eventEmitter="," editorType="," />"],["<"," eventEmitter="," editorType="," />"])),J4e,i,b),U8e,i)},e.prototype.addEvent=function(){var t=this.props.eventEmitter;t.listen("hide",this.hide),t.listen("show",this.show),t.listen("changeMode",this.changeMode),t.listen("changePreviewStyle",this.changePreviewStyle)},e})(Gr),Py,By,rr=(function(r){Ge(e,r);function e(t){var n,i=r.call(this,t)||this,a,o=K4e(i.options.el,It(Fy||(Fy=Rt([`
|
|
619
|
-
<`,`
|
|
620
|
-
ref=`,`
|
|
621
|
-
eventEmitter=`,`
|
|
622
|
-
slots=`,`
|
|
623
|
-
hideModeSwitch=`,`
|
|
624
|
-
toolbarItems=`,`
|
|
625
|
-
previewStyle=`,`
|
|
626
|
-
editorType=`,`
|
|
627
|
-
theme=`,`
|
|
628
|
-
/>
|
|
629
|
-
`],[`
|
|
630
|
-
<`,`
|
|
631
|
-
ref=`,`
|
|
632
|
-
eventEmitter=`,`
|
|
633
|
-
slots=`,`
|
|
634
|
-
hideModeSwitch=`,`
|
|
635
|
-
toolbarItems=`,`
|
|
636
|
-
previewStyle=`,`
|
|
637
|
-
editorType=`,`
|
|
638
|
-
theme=`,`
|
|
639
|
-
/>
|
|
640
|
-
`])),$8e,function(s){return a=s},i.eventEmitter,i.getEditorElements(),i.options.hideModeSwitch,i.options.toolbarItems,i.options.previewStyle,i.options.initialEditType,i.options.theme));return i.setMinHeight(i.options.minHeight),i.setHeight(i.options.height),i.defaultUI={insertToolbarItem:a.insertToolbarItem.bind(a),removeToolbarItem:a.removeToolbarItem.bind(a),destroy:o},(n=i.pluginInfo.toolbarItems)===null||n===void 0||n.forEach(function(s){var l=s.groupIndex,f=s.itemIndex,p=s.item;i.defaultUI.insertToolbarItem({groupIndex:l,itemIndex:f},p)}),i.eventEmitter.emit("loadUI",i),i}return e.factory=function(t){return t.viewer?new u0(t):new e(t)},e.prototype.insertToolbarItem=function(t,n){this.defaultUI.insertToolbarItem(t,n)},e.prototype.removeToolbarItem=function(t){this.defaultUI.removeToolbarItem(t)},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.defaultUI.destroy()},e})(f0),Fy;f0.setLanguage(["en","en-US"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Write",Preview:"Preview",Headings:"Headings",Paragraph:"Paragraph",Bold:"Bold",Italic:"Italic",Strike:"Strike",Code:"Inline code",Line:"Line",Blockquote:"Blockquote","Unordered list":"Unordered list","Ordered list":"Ordered list",Task:"Task",Indent:"Indent",Outdent:"Outdent","Insert link":"Insert link","Insert CodeBlock":"Insert codeBlock","Insert table":"Insert table","Insert image":"Insert image",Heading:"Heading","Image URL":"Image URL","Select image file":"Select image file","Choose a file":"Choose a file","No file":"No file",Description:"Description",OK:"OK",More:"More",Cancel:"Cancel",File:"File",URL:"URL","Link text":"Link text","Add row to up":"Add row to up","Add row to down":"Add row to down","Add column to left":"Add column to left","Add column to right":"Add column to right","Remove row":"Remove row","Remove column":"Remove column","Align column to left":"Align column to left","Align column to center":"Align column to center","Align column to right":"Align column to right","Remove table":"Remove table","Would you like to paste as table?":"Would you like to paste as table?","Text color":"Text color","Auto scroll enabled":"Auto scroll enabled","Auto scroll disabled":"Auto scroll disabled","Choose language":"Choose language"});var hd={exports:{}},fn={},Kn={},Zr={},pd,qy;function W8e(){if(qy)return pd;qy=1;function r(e){this.content=e}return r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,a=i.find(e),o=i.content.slice();return a==-1?o.push(n||e,t):(o[a+1]=t,n&&(o[a]=n)),new r(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var i=this.remove(t),a=i.content.slice(),o=i.find(e);return a.splice(o==-1?a.length:o,0,t,n),new r(a)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=r.from(e),e.size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=r.from(e),e.size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)},pd=r,pd}var Hy;function tc(){if(Hy)return Zr;Hy=1;function r(I,O){var g=typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(!g){if(Array.isArray(I)||(g=e(I))||O){g&&(I=g);var C=0,D=function(){};return{s:D,n:function(){return C>=I.length?{done:!0}:{done:!1,value:I[C++]}},e:function(me){throw me},f:D}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
641
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var z=!0,j=!1,Y;return{s:function(){g=g.call(I)},n:function(){var me=g.next();return z=me.done,me},e:function(me){j=!0,Y=me},f:function(){try{!z&&g.return!=null&&g.return()}finally{if(j)throw Y}}}}function e(I,O){if(I){if(typeof I=="string")return t(I,O);var g=Object.prototype.toString.call(I).slice(8,-1);if(g==="Object"&&I.constructor&&(g=I.constructor.name),g==="Map"||g==="Set")return Array.from(I);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return t(I,O)}}function t(I,O){(O==null||O>I.length)&&(O=I.length);for(var g=0,C=new Array(O);g<O;g++)C[g]=I[g];return C}function n(){return typeof Reflect<"u"&&Reflect.get?n=Reflect.get.bind():n=function(O,g,C){var D=i(O,g);if(D){var z=Object.getOwnPropertyDescriptor(D,g);return z.get?z.get.call(arguments.length<3?O:C):z.value}},n.apply(this,arguments)}function i(I,O){for(;!Object.prototype.hasOwnProperty.call(I,O)&&(I=E(I),I!==null););return I}function a(I,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(O&&O.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),Object.defineProperty(I,"prototype",{writable:!1}),O&&x(I,O)}function o(I){var O=b();return function(){var C=E(I),D;if(O){var z=E(this).constructor;D=Reflect.construct(C,arguments,z)}else D=C.apply(this,arguments);return s(this,D)}}function s(I,O){if(O&&(B(O)==="object"||typeof O=="function"))return O;if(O!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(I)}function l(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}function f(I){var O=typeof Map=="function"?new Map:void 0;return f=function(C){if(C===null||!T(C))return C;if(typeof C!="function")throw new TypeError("Super expression must either be null or a function");if(typeof O<"u"){if(O.has(C))return O.get(C);O.set(C,D)}function D(){return p(C,arguments,E(this).constructor)}return D.prototype=Object.create(C.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),x(D,C)},f(I)}function p(I,O,g){return b()?p=Reflect.construct.bind():p=function(D,z,j){var Y=[null];Y.push.apply(Y,z);var ce=Function.bind.apply(D,Y),me=new ce;return j&&x(me,j.prototype),me},p.apply(null,arguments)}function b(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function T(I){try{return Function.toString.call(I).indexOf("[native code]")!==-1}catch{return typeof I=="function"}}function x(I,O){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,D){return C.__proto__=D,C},x(I,O)}function E(I){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g)},E(I)}function B(I){"@babel/helpers - typeof";return B=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},B(I)}function F(I,O){if(!(I instanceof O))throw new TypeError("Cannot call a class as a function")}function _(I,O){for(var g=0;g<O.length;g++){var C=O[g];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(I,ee(C.key),C)}}function X(I,O,g){return O&&_(I.prototype,O),g&&_(I,g),Object.defineProperty(I,"prototype",{writable:!1}),I}function ee(I){var O=se(I,"string");return B(O)==="symbol"?O:String(O)}function se(I,O){if(B(I)!=="object"||I===null)return I;var g=I[Symbol.toPrimitive];if(g!==void 0){var C=g.call(I,O);if(B(C)!=="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(I)}var de=W8e();function ae(I,O,g){for(var C=0;;C++){if(C==I.childCount||C==O.childCount)return I.childCount==O.childCount?null:g;var D=I.child(C),z=O.child(C);if(D==z){g+=D.nodeSize;continue}if(!D.sameMarkup(z))return g;if(D.isText&&D.text!=z.text){for(var j=D.text,Y=z.text,ce=0;j[ce]==Y[ce];ce++)g++;return ce&&ce<j.length&&ce<Y.length&&xe(j.charCodeAt(ce-1))&&Te(j.charCodeAt(ce))&&g--,g}if(D.content.size||z.content.size){var me=ae(D.content,z.content,g+1);if(me!=null)return me}g+=D.nodeSize}}function le(I,O,g,C){for(var D=I.childCount,z=O.childCount;;){if(D==0||z==0)return D==z?null:{a:g,b:C};var j=I.child(--D),Y=O.child(--z),ce=j.nodeSize;if(j==Y){g-=ce,C-=ce;continue}if(!j.sameMarkup(Y))return{a:g,b:C};if(j.isText&&j.text!=Y.text){for(var me=j.text,Ne=Y.text,Ae=me.length,Pe=Ne.length;Ae>0&&Pe>0&&me[Ae-1]==Ne[Pe-1];)Ae--,Pe--,g--,C--;return Ae&&Pe&&Ae<me.length&&xe(me.charCodeAt(Ae-1))&&Te(me.charCodeAt(Ae))&&(g++,C++),{a:g,b:C}}if(j.content.size||Y.content.size){var Ke=le(j.content,Y.content,g-1,C-1);if(Ke)return Ke}g-=ce,C-=ce}}function Te(I){return I>=56320&&I<57344}function xe(I){return I>=55296&&I<56320}var Le=(function(){function I(O,g){if(F(this,I),this.content=O,this.size=g||0,g==null)for(var C=0;C<O.length;C++)this.size+=O[C].nodeSize}return X(I,[{key:"nodesBetween",value:function(g,C,D){for(var z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,j=arguments.length>4?arguments[4]:void 0,Y=0,ce=0;ce<C;Y++){var me=this.content[Y],Ne=ce+me.nodeSize;if(Ne>g&&D(me,z+ce,j||null,Y)!==!1&&me.content.size){var Ae=ce+1;me.nodesBetween(Math.max(0,g-Ae),Math.min(me.content.size,C-Ae),D,z+Ae)}ce=Ne}}},{key:"descendants",value:function(g){this.nodesBetween(0,this.size,g)}},{key:"textBetween",value:function(g,C,D,z){var j="",Y=!0;return this.nodesBetween(g,C,function(ce,me){var Ne=ce.isText?ce.text.slice(Math.max(g,me)-me,C-me):ce.isLeaf?z?typeof z=="function"?z(ce):z:ce.type.spec.leafText?ce.type.spec.leafText(ce):"":"";ce.isBlock&&(ce.isLeaf&&Ne||ce.isTextblock)&&D&&(Y?Y=!1:j+=D),j+=Ne},0),j}},{key:"append",value:function(g){if(!g.size)return this;if(!this.size)return g;var C=this.lastChild,D=g.firstChild,z=this.content.slice(),j=0;for(C.isText&&C.sameMarkup(D)&&(z[z.length-1]=C.withText(C.text+D.text),j=1);j<g.content.length;j++)z.push(g.content[j]);return new I(z,this.size+g.size)}},{key:"cut",value:function(g){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.size;if(g==0&&C==this.size)return this;var D=[],z=0;if(C>g)for(var j=0,Y=0;Y<C;j++){var ce=this.content[j],me=Y+ce.nodeSize;me>g&&((Y<g||me>C)&&(ce.isText?ce=ce.cut(Math.max(0,g-Y),Math.min(ce.text.length,C-Y)):ce=ce.cut(Math.max(0,g-Y-1),Math.min(ce.content.size,C-Y-1))),D.push(ce),z+=ce.nodeSize),Y=me}return new I(D,z)}},{key:"cutByIndex",value:function(g,C){return g==C?I.empty:g==0&&C==this.content.length?this:new I(this.content.slice(g,C))}},{key:"replaceChild",value:function(g,C){var D=this.content[g];if(D==C)return this;var z=this.content.slice(),j=this.size+C.nodeSize-D.nodeSize;return z[g]=C,new I(z,j)}},{key:"addToStart",value:function(g){return new I([g].concat(this.content),this.size+g.nodeSize)}},{key:"addToEnd",value:function(g){return new I(this.content.concat(g),this.size+g.nodeSize)}},{key:"eq",value:function(g){if(this.content.length!=g.content.length)return!1;for(var C=0;C<this.content.length;C++)if(!this.content[C].eq(g.content[C]))return!1;return!0}},{key:"firstChild",get:function(){return this.content.length?this.content[0]:null}},{key:"lastChild",get:function(){return this.content.length?this.content[this.content.length-1]:null}},{key:"childCount",get:function(){return this.content.length}},{key:"child",value:function(g){var C=this.content[g];if(!C)throw new RangeError("Index "+g+" out of range for "+this);return C}},{key:"maybeChild",value:function(g){return this.content[g]||null}},{key:"forEach",value:function(g){for(var C=0,D=0;C<this.content.length;C++){var z=this.content[C];g(z,D,C),D+=z.nodeSize}}},{key:"findDiffStart",value:function(g){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ae(this,g,C)}},{key:"findDiffEnd",value:function(g){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.size,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.size;return le(this,g,C,D)}},{key:"findIndex",value:function(g){if(g==0)return Je(0,g);if(g==this.size)return Je(this.content.length,g);if(g>this.size||g<0)throw new RangeError("Position ".concat(g," outside of fragment (").concat(this,")"));for(var C=0,D=0;;C++){var z=this.child(C),j=D+z.nodeSize;if(j>=g)return j==g?Je(C+1,j):Je(C,D);D=j}}},{key:"toString",value:function(){return"<"+this.toStringInner()+">"}},{key:"toStringInner",value:function(){return this.content.join(", ")}},{key:"toJSON",value:function(){return this.content.length?this.content.map(function(g){return g.toJSON()}):null}}],[{key:"fromJSON",value:function(g,C){if(!C)return I.empty;if(!Array.isArray(C))throw new RangeError("Invalid input for Fragment.fromJSON");return I.fromArray(C.map(g.nodeFromJSON))}},{key:"fromArray",value:function(g){if(!g.length)return I.empty;for(var C,D=0,z=0;z<g.length;z++){var j=g[z];D+=j.nodeSize,z&&j.isText&&g[z-1].sameMarkup(j)?(C||(C=g.slice(0,z)),C[C.length-1]=j.withText(C[C.length-1].text+j.text)):C&&C.push(j)}return new I(C||g,D)}},{key:"from",value:function(g){if(!g)return I.empty;if(g instanceof I)return g;if(Array.isArray(g))return this.fromArray(g);if(g.attrs)return new I([g],g.nodeSize);throw new RangeError("Can not convert "+g+" to a Fragment"+(g.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}]),I})();Le.empty=new Le([],0);var ut={index:0,offset:0};function Je(I,O){return ut.index=I,ut.offset=O,ut}function wt(I,O){if(I===O)return!0;if(!(I&&B(I)=="object")||!(O&&B(O)=="object"))return!1;var g=Array.isArray(I);if(Array.isArray(O)!=g)return!1;if(g){if(I.length!=O.length)return!1;for(var C=0;C<I.length;C++)if(!wt(I[C],O[C]))return!1}else{for(var D in I)if(!(D in O)||!wt(I[D],O[D]))return!1;for(var z in O)if(!(z in I))return!1}return!0}var Ye=(function(){function I(O,g){F(this,I),this.type=O,this.attrs=g}return X(I,[{key:"addToSet",value:function(g){for(var C,D=!1,z=0;z<g.length;z++){var j=g[z];if(this.eq(j))return g;if(this.type.excludes(j.type))C||(C=g.slice(0,z));else{if(j.type.excludes(this.type))return g;!D&&j.type.rank>this.type.rank&&(C||(C=g.slice(0,z)),C.push(this),D=!0),C&&C.push(j)}}return C||(C=g.slice()),D||C.push(this),C}},{key:"removeFromSet",value:function(g){for(var C=0;C<g.length;C++)if(this.eq(g[C]))return g.slice(0,C).concat(g.slice(C+1));return g}},{key:"isInSet",value:function(g){for(var C=0;C<g.length;C++)if(this.eq(g[C]))return!0;return!1}},{key:"eq",value:function(g){return this==g||this.type==g.type&&wt(this.attrs,g.attrs)}},{key:"toJSON",value:function(){var g={type:this.type.name};for(var C in this.attrs){g.attrs=this.attrs;break}return g}}],[{key:"fromJSON",value:function(g,C){if(!C)throw new RangeError("Invalid input for Mark.fromJSON");var D=g.marks[C.type];if(!D)throw new RangeError("There is no mark type ".concat(C.type," in this schema"));var z=D.create(C.attrs);return D.checkAttrs(z.attrs),z}},{key:"sameSet",value:function(g,C){if(g==C)return!0;if(g.length!=C.length)return!1;for(var D=0;D<g.length;D++)if(!g[D].eq(C[D]))return!1;return!0}},{key:"setFrom",value:function(g){if(!g||Array.isArray(g)&&g.length==0)return I.none;if(g instanceof I)return[g];var C=g.slice();return C.sort(function(D,z){return D.type.rank-z.type.rank}),C}}]),I})();Ye.none=[];var pt=(function(I){a(g,I);var O=o(g);function g(){return F(this,g),O.apply(this,arguments)}return X(g)})(f(Error)),rt=(function(){function I(O,g,C){F(this,I),this.content=O,this.openStart=g,this.openEnd=C}return X(I,[{key:"size",get:function(){return this.content.size-this.openStart-this.openEnd}},{key:"insertAt",value:function(g,C){var D=Bt(this.content,g+this.openStart,C,this.openStart+1,this.openEnd+1);return D&&new I(D,this.openStart,this.openEnd)}},{key:"removeBetween",value:function(g,C){return new I(Et(this.content,g+this.openStart,C+this.openStart),this.openStart,this.openEnd)}},{key:"eq",value:function(g){return this.content.eq(g.content)&&this.openStart==g.openStart&&this.openEnd==g.openEnd}},{key:"toString",value:function(){return this.content+"("+this.openStart+","+this.openEnd+")"}},{key:"toJSON",value:function(){if(!this.content.size)return null;var g={content:this.content.toJSON()};return this.openStart>0&&(g.openStart=this.openStart),this.openEnd>0&&(g.openEnd=this.openEnd),g}}],[{key:"fromJSON",value:function(g,C){if(!C)return I.empty;var D=C.openStart||0,z=C.openEnd||0;if(typeof D!="number"||typeof z!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new I(Le.fromJSON(g,C.content),D,z)}},{key:"maxOpen",value:function(g){for(var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,D=0,z=0,j=g.firstChild;j&&!j.isLeaf&&(C||!j.type.spec.isolating);j=j.firstChild)D++;for(var Y=g.lastChild;Y&&!Y.isLeaf&&(C||!Y.type.spec.isolating);Y=Y.lastChild)z++;return new I(g,D,z)}}]),I})();rt.empty=new rt(Le.empty,0,0);function Et(I,O,g){var C=I.findIndex(O),D=C.index,z=C.offset,j=I.maybeChild(D),Y=I.findIndex(g),ce=Y.index,me=Y.offset;if(z==O||j.isText){if(me!=g&&!I.child(ce).isText)throw new RangeError("Removing non-flat range");return I.cut(0,O).append(I.cut(g))}if(D!=ce)throw new RangeError("Removing non-flat range");return I.replaceChild(D,j.copy(Et(j.content,O-z-1,g-z-1)))}function Bt(I,O,g,C,D,z){var j=I.findIndex(O),Y=j.index,ce=j.offset,me=I.maybeChild(Y);if(ce==O||me.isText)return z&&C<=0&&D<=0&&!z.canReplace(Y,Y,g)?null:I.cut(0,O).append(g).append(I.cut(O));var Ne=Bt(me.content,O-ce-1,g,Y==0?C-1:0,Y==I.childCount-1?D-1:0,me);return Ne&&I.replaceChild(Y,me.copy(Ne))}function $t(I,O,g){if(g.openStart>I.depth)throw new pt("Inserted content deeper than insertion position");if(I.depth-g.openStart!=O.depth-g.openEnd)throw new pt("Inconsistent open depths");return Qe(I,O,g,0)}function Qe(I,O,g,C){var D=I.index(C),z=I.node(C);if(D==O.index(C)&&C<I.depth-g.openStart){var j=Qe(I,O,g,C+1);return z.copy(z.content.replaceChild(D,j))}else if(g.content.size)if(!g.openStart&&!g.openEnd&&I.depth==C&&O.depth==C){var Y=I.parent,ce=Y.content;return jt(Y,ce.cut(0,I.parentOffset).append(g.content).append(ce.cut(O.parentOffset)))}else{var me=ye(g,I),Ne=me.start,Ae=me.end;return jt(z,Ut(I,Ne,Ae,O,C))}else return jt(z,Yt(I,O,C))}function Ct(I,O){if(!O.type.compatibleContent(I.type))throw new pt("Cannot join "+O.type.name+" onto "+I.type.name)}function ft(I,O,g){var C=I.node(g);return Ct(C,O.node(g)),C}function Mt(I,O){var g=O.length-1;g>=0&&I.isText&&I.sameMarkup(O[g])?O[g]=I.withText(O[g].text+I.text):O.push(I)}function Tt(I,O,g,C){var D=(O||I).node(g),z=0,j=O?O.index(g):D.childCount;I&&(z=I.index(g),I.depth>g?z++:I.textOffset&&(Mt(I.nodeAfter,C),z++));for(var Y=z;Y<j;Y++)Mt(D.child(Y),C);O&&O.depth==g&&O.textOffset&&Mt(O.nodeBefore,C)}function jt(I,O){if(!I.type.validContent(O))throw new pt("Invalid content for node "+I.type.name);return I.copy(O)}function Ut(I,O,g,C,D){var z=I.depth>D&&ft(I,O,D+1),j=C.depth>D&&ft(g,C,D+1),Y=[];return Tt(null,I,D,Y),z&&j&&O.index(D)==g.index(D)?(Ct(z,j),Mt(jt(z,Ut(I,O,g,C,D+1)),Y)):(z&&Mt(jt(z,Yt(I,O,D+1)),Y),Tt(O,g,D,Y),j&&Mt(jt(j,Yt(g,C,D+1)),Y)),Tt(C,null,D,Y),new Le(Y)}function Yt(I,O,g){var C=[];if(Tt(null,I,g,C),I.depth>g){var D=ft(I,O,g+1);Mt(jt(D,Yt(I,O,g+1)),C)}return Tt(O,null,g,C),new Le(C)}function ye(I,O){for(var g=O.depth-I.openStart,C=O.node(g),D=C.copy(I.content),z=g-1;z>=0;z--)D=O.node(z).copy(Le.from(D));return{start:D.resolveNoCache(I.openStart+g),end:D.resolveNoCache(D.content.size-I.openEnd-g)}}var he=(function(){function I(O,g,C){F(this,I),this.pos=O,this.path=g,this.parentOffset=C,this.depth=g.length/3-1}return X(I,[{key:"resolveDepth",value:function(g){return g==null?this.depth:g<0?this.depth+g:g}},{key:"parent",get:function(){return this.node(this.depth)}},{key:"doc",get:function(){return this.node(0)}},{key:"node",value:function(g){return this.path[this.resolveDepth(g)*3]}},{key:"index",value:function(g){return this.path[this.resolveDepth(g)*3+1]}},{key:"indexAfter",value:function(g){return g=this.resolveDepth(g),this.index(g)+(g==this.depth&&!this.textOffset?0:1)}},{key:"start",value:function(g){return g=this.resolveDepth(g),g==0?0:this.path[g*3-1]+1}},{key:"end",value:function(g){return g=this.resolveDepth(g),this.start(g)+this.node(g).content.size}},{key:"before",value:function(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position before the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]}},{key:"after",value:function(g){if(g=this.resolveDepth(g),!g)throw new RangeError("There is no position after the top-level node");return g==this.depth+1?this.pos:this.path[g*3-1]+this.path[g*3].nodeSize}},{key:"textOffset",get:function(){return this.pos-this.path[this.path.length-1]}},{key:"nodeAfter",get:function(){var g=this.parent,C=this.index(this.depth);if(C==g.childCount)return null;var D=this.pos-this.path[this.path.length-1],z=g.child(C);return D?g.child(C).cut(D):z}},{key:"nodeBefore",get:function(){var g=this.index(this.depth),C=this.pos-this.path[this.path.length-1];return C?this.parent.child(g).cut(0,C):g==0?null:this.parent.child(g-1)}},{key:"posAtIndex",value:function(g,C){C=this.resolveDepth(C);for(var D=this.path[C*3],z=C==0?0:this.path[C*3-1]+1,j=0;j<g;j++)z+=D.child(j).nodeSize;return z}},{key:"marks",value:function(){var g=this.parent,C=this.index();if(g.content.size==0)return Ye.none;if(this.textOffset)return g.child(C).marks;var D=g.maybeChild(C-1),z=g.maybeChild(C);if(!D){var j=D;D=z,z=j}for(var Y=D.marks,ce=0;ce<Y.length;ce++)Y[ce].type.spec.inclusive===!1&&(!z||!Y[ce].isInSet(z.marks))&&(Y=Y[ce--].removeFromSet(Y));return Y}},{key:"marksAcross",value:function(g){var C=this.parent.maybeChild(this.index());if(!C||!C.isInline)return null;for(var D=C.marks,z=g.parent.maybeChild(g.index()),j=0;j<D.length;j++)D[j].type.spec.inclusive===!1&&(!z||!D[j].isInSet(z.marks))&&(D=D[j--].removeFromSet(D));return D}},{key:"sharedDepth",value:function(g){for(var C=this.depth;C>0;C--)if(this.start(C)<=g&&this.end(C)>=g)return C;return 0}},{key:"blockRange",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this,C=arguments.length>1?arguments[1]:void 0;if(g.pos<this.pos)return g.blockRange(this);for(var D=this.depth-(this.parent.inlineContent||this.pos==g.pos?1:0);D>=0;D--)if(g.pos<=this.end(D)&&(!C||C(this.node(D))))return new ke(this,g,D);return null}},{key:"sameParent",value:function(g){return this.pos-this.parentOffset==g.pos-g.parentOffset}},{key:"max",value:function(g){return g.pos>this.pos?g:this}},{key:"min",value:function(g){return g.pos<this.pos?g:this}},{key:"toString",value:function(){for(var g="",C=1;C<=this.depth;C++)g+=(g?"/":"")+this.node(C).type.name+"_"+this.index(C-1);return g+":"+this.parentOffset}}],[{key:"resolve",value:function(g,C){if(!(C>=0&&C<=g.content.size))throw new RangeError("Position "+C+" out of range");for(var D=[],z=0,j=C,Y=g;;){var ce=Y.content.findIndex(j),me=ce.index,Ne=ce.offset,Ae=j-Ne;if(D.push(Y,me,z+Ne),!Ae||(Y=Y.child(me),Y.isText))break;j=Ae-1,z+=Ne+1}return new I(C,D,j)}},{key:"resolveCached",value:function(g,C){var D=Q.get(g);if(D)for(var z=0;z<D.elts.length;z++){var j=D.elts[z];if(j.pos==C)return j}else Q.set(g,D=new ne);var Y=D.elts[D.i]=I.resolve(g,C);return D.i=(D.i+1)%oe,Y}}]),I})(),ne=X(function I(){F(this,I),this.elts=[],this.i=0}),oe=12,Q=new WeakMap,ke=(function(){function I(O,g,C){F(this,I),this.$from=O,this.$to=g,this.depth=C}return X(I,[{key:"start",get:function(){return this.$from.before(this.depth+1)}},{key:"end",get:function(){return this.$to.after(this.depth+1)}},{key:"parent",get:function(){return this.$from.node(this.depth)}},{key:"startIndex",get:function(){return this.$from.index(this.depth)}},{key:"endIndex",get:function(){return this.$to.indexAfter(this.depth)}}]),I})(),Ee=Object.create(null),He=(function(){function I(O,g,C){var D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ye.none;F(this,I),this.type=O,this.attrs=g,this.marks=D,this.content=C||Le.empty}return X(I,[{key:"children",get:function(){return this.content.content}},{key:"nodeSize",get:function(){return this.isLeaf?1:2+this.content.size}},{key:"childCount",get:function(){return this.content.childCount}},{key:"child",value:function(g){return this.content.child(g)}},{key:"maybeChild",value:function(g){return this.content.maybeChild(g)}},{key:"forEach",value:function(g){this.content.forEach(g)}},{key:"nodesBetween",value:function(g,C,D){var z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;this.content.nodesBetween(g,C,D,z,this)}},{key:"descendants",value:function(g){this.nodesBetween(0,this.content.size,g)}},{key:"textContent",get:function(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}},{key:"textBetween",value:function(g,C,D,z){return this.content.textBetween(g,C,D,z)}},{key:"firstChild",get:function(){return this.content.firstChild}},{key:"lastChild",get:function(){return this.content.lastChild}},{key:"eq",value:function(g){return this==g||this.sameMarkup(g)&&this.content.eq(g.content)}},{key:"sameMarkup",value:function(g){return this.hasMarkup(g.type,g.attrs,g.marks)}},{key:"hasMarkup",value:function(g,C,D){return this.type==g&&wt(this.attrs,C||g.defaultAttrs||Ee)&&Ye.sameSet(this.marks,D||Ye.none)}},{key:"copy",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return g==this.content?this:new I(this.type,this.attrs,g,this.marks)}},{key:"mark",value:function(g){return g==this.marks?this:new I(this.type,this.attrs,this.content,g)}},{key:"cut",value:function(g){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.content.size;return g==0&&C==this.content.size?this:this.copy(this.content.cut(g,C))}},{key:"slice",value:function(g){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.content.size,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(g==C)return rt.empty;var z=this.resolve(g),j=this.resolve(C),Y=D?0:z.sharedDepth(C),ce=z.start(Y),me=z.node(Y),Ne=me.content.cut(z.pos-ce,j.pos-ce);return new rt(Ne,z.depth-Y,j.depth-Y)}},{key:"replace",value:function(g,C,D){return $t(this.resolve(g),this.resolve(C),D)}},{key:"nodeAt",value:function(g){for(var C=this;;){var D=C.content.findIndex(g),z=D.index,j=D.offset;if(C=C.maybeChild(z),!C)return null;if(j==g||C.isText)return C;g-=j+1}}},{key:"childAfter",value:function(g){var C=this.content.findIndex(g),D=C.index,z=C.offset;return{node:this.content.maybeChild(D),index:D,offset:z}}},{key:"childBefore",value:function(g){if(g==0)return{node:null,index:0,offset:0};var C=this.content.findIndex(g),D=C.index,z=C.offset;if(z<g)return{node:this.content.child(D),index:D,offset:z};var j=this.content.child(D-1);return{node:j,index:D-1,offset:z-j.nodeSize}}},{key:"resolve",value:function(g){return he.resolveCached(this,g)}},{key:"resolveNoCache",value:function(g){return he.resolve(this,g)}},{key:"rangeHasMark",value:function(g,C,D){var z=!1;return C>g&&this.nodesBetween(g,C,function(j){return D.isInSet(j.marks)&&(z=!0),!z}),z}},{key:"isBlock",get:function(){return this.type.isBlock}},{key:"isTextblock",get:function(){return this.type.isTextblock}},{key:"inlineContent",get:function(){return this.type.inlineContent}},{key:"isInline",get:function(){return this.type.isInline}},{key:"isText",get:function(){return this.type.isText}},{key:"isLeaf",get:function(){return this.type.isLeaf}},{key:"isAtom",get:function(){return this.type.isAtom}},{key:"toString",value:function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var g=this.type.name;return this.content.size&&(g+="("+this.content.toStringInner()+")"),yt(this.marks,g)}},{key:"contentMatchAt",value:function(g){var C=this.type.contentMatch.matchFragment(this.content,0,g);if(!C)throw new Error("Called contentMatchAt on a node with invalid content");return C}},{key:"canReplace",value:function(g,C){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Le.empty,z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,j=arguments.length>4&&arguments[4]!==void 0?arguments[4]:D.childCount,Y=this.contentMatchAt(g).matchFragment(D,z,j),ce=Y&&Y.matchFragment(this.content,C);if(!ce||!ce.validEnd)return!1;for(var me=z;me<j;me++)if(!this.type.allowsMarks(D.child(me).marks))return!1;return!0}},{key:"canReplaceWith",value:function(g,C,D,z){if(z&&!this.type.allowsMarks(z))return!1;var j=this.contentMatchAt(g).matchType(D),Y=j&&j.matchFragment(this.content,C);return Y?Y.validEnd:!1}},{key:"canAppend",value:function(g){return g.content.size?this.canReplace(this.childCount,this.childCount,g.content):this.type.compatibleContent(g.type)}},{key:"check",value:function(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);for(var g=Ye.none,C=0;C<this.marks.length;C++){var D=this.marks[C];D.type.checkAttrs(D.attrs),g=D.addToSet(g)}if(!Ye.sameSet(g,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map(function(z){return z.type.name})));this.content.forEach(function(z){return z.check()})}},{key:"toJSON",value:function(){var g={type:this.type.name};for(var C in this.attrs){g.attrs=this.attrs;break}return this.content.size&&(g.content=this.content.toJSON()),this.marks.length&&(g.marks=this.marks.map(function(D){return D.toJSON()})),g}}],[{key:"fromJSON",value:function(g,C){if(!C)throw new RangeError("Invalid input for Node.fromJSON");var D=void 0;if(C.marks){if(!Array.isArray(C.marks))throw new RangeError("Invalid mark data for Node.fromJSON");D=C.marks.map(g.markFromJSON)}if(C.type=="text"){if(typeof C.text!="string")throw new RangeError("Invalid text node in JSON");return g.text(C.text,D)}var z=Le.fromJSON(g,C.content),j=g.nodeType(C.type).create(C.attrs,z,D);return j.type.checkAttrs(j.attrs),j}}]),I})();He.prototype.text=void 0;var nt=(function(I){a(g,I);var O=o(g);function g(C,D,z,j){var Y;if(F(this,g),Y=O.call(this,C,D,null,j),!z)throw new RangeError("Empty text nodes are not allowed");return Y.text=z,Y}return X(g,[{key:"toString",value:function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):yt(this.marks,JSON.stringify(this.text))}},{key:"textContent",get:function(){return this.text}},{key:"textBetween",value:function(D,z){return this.text.slice(D,z)}},{key:"nodeSize",get:function(){return this.text.length}},{key:"mark",value:function(D){return D==this.marks?this:new g(this.type,this.attrs,this.text,D)}},{key:"withText",value:function(D){return D==this.text?this:new g(this.type,this.attrs,D,this.marks)}},{key:"cut",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.text.length;return D==0&&z==this.text.length?this:this.withText(this.text.slice(D,z))}},{key:"eq",value:function(D){return this.sameMarkup(D)&&this.text==D.text}},{key:"toJSON",value:function(){var D=n(E(g.prototype),"toJSON",this).call(this);return D.text=this.text,D}}]),g})(He);function yt(I,O){for(var g=I.length-1;g>=0;g--)O=I[g].type.name+"("+O+")";return O}var ct=(function(){function I(O){F(this,I),this.validEnd=O,this.next=[],this.wrapCache=[]}return X(I,[{key:"matchType",value:function(g){for(var C=0;C<this.next.length;C++)if(this.next[C].type==g)return this.next[C].next;return null}},{key:"matchFragment",value:function(g){for(var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.childCount,z=this,j=C;z&&j<D;j++)z=z.matchType(g.child(j).type);return z}},{key:"inlineContent",get:function(){return this.next.length!=0&&this.next[0].type.isInline}},{key:"defaultType",get:function(){for(var g=0;g<this.next.length;g++){var C=this.next[g].type;if(!(C.isText||C.hasRequiredAttrs()))return C}return null}},{key:"compatible",value:function(g){for(var C=0;C<this.next.length;C++)for(var D=0;D<g.next.length;D++)if(this.next[C].type==g.next[D].type)return!0;return!1}},{key:"fillBefore",value:function(g){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,z=[this];function j(Y,ce){var me=Y.matchFragment(g,D);if(me&&(!C||me.validEnd))return Le.from(ce.map(function(br){return br.createAndFill()}));for(var Ne=0;Ne<Y.next.length;Ne++){var Ae=Y.next[Ne],Pe=Ae.type,Ke=Ae.next;if(!(Pe.isText||Pe.hasRequiredAttrs())&&z.indexOf(Ke)==-1){z.push(Ke);var Dt=j(Ke,ce.concat(Pe));if(Dt)return Dt}}return null}return j(this,[])}},{key:"findWrapping",value:function(g){for(var C=0;C<this.wrapCache.length;C+=2)if(this.wrapCache[C]==g)return this.wrapCache[C+1];var D=this.computeWrapping(g);return this.wrapCache.push(g,D),D}},{key:"computeWrapping",value:function(g){for(var C=Object.create(null),D=[{match:this,type:null,via:null}];D.length;){var z=D.shift(),j=z.match;if(j.matchType(g)){for(var Y=[],ce=z;ce.type;ce=ce.via)Y.push(ce.type);return Y.reverse()}for(var me=0;me<j.next.length;me++){var Ne=j.next[me],Ae=Ne.type,Pe=Ne.next;!Ae.isLeaf&&!Ae.hasRequiredAttrs()&&!(Ae.name in C)&&(!z.type||Pe.validEnd)&&(D.push({match:Ae.contentMatch,type:Ae,via:z}),C[Ae.name]=!0)}}return null}},{key:"edgeCount",get:function(){return this.next.length}},{key:"edge",value:function(g){if(g>=this.next.length)throw new RangeError("There's no ".concat(g,"th edge in this content match"));return this.next[g]}},{key:"toString",value:function(){var g=[];function C(D){g.push(D);for(var z=0;z<D.next.length;z++)g.indexOf(D.next[z].next)==-1&&C(D.next[z].next)}return C(this),g.map(function(D,z){for(var j=z+(D.validEnd?"*":" ")+" ",Y=0;Y<D.next.length;Y++)j+=(Y?", ":"")+D.next[Y].type.name+"->"+g.indexOf(D.next[Y].next);return j}).join(`
|
|
642
|
-
`)}}],[{key:"parse",value:function(g,C){var D=new zt(g,C);if(D.next==null)return I.empty;var z=At(D);D.next&&D.err("Unexpected trailing text");var j=dt(ze(z));return Ot(j,D),j}}]),I})();ct.empty=new ct(!0);var zt=(function(){function I(O,g){F(this,I),this.string=O,this.nodeTypes=g,this.inline=null,this.pos=0,this.tokens=O.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}return X(I,[{key:"next",get:function(){return this.tokens[this.pos]}},{key:"eat",value:function(g){return this.next==g&&(this.pos++||!0)}},{key:"err",value:function(g){throw new SyntaxError(g+" (in content expression '"+this.string+"')")}}]),I})();function At(I){var O=[];do O.push(Xt(I));while(I.eat("|"));return O.length==1?O[0]:{type:"choice",exprs:O}}function Xt(I){var O=[];do O.push(Nt(I));while(I.next&&I.next!=")"&&I.next!="|");return O.length==1?O[0]:{type:"seq",exprs:O}}function Nt(I){for(var O=hr(I);;)if(I.eat("+"))O={type:"plus",expr:O};else if(I.eat("*"))O={type:"star",expr:O};else if(I.eat("?"))O={type:"opt",expr:O};else if(I.eat("{"))O=En(I,O);else break;return O}function ar(I){/\D/.test(I.next)&&I.err("Expected number, got '"+I.next+"'");var O=Number(I.next);return I.pos++,O}function En(I,O){var g=ar(I),C=g;return I.eat(",")&&(I.next!="}"?C=ar(I):C=-1),I.eat("}")||I.err("Unclosed braced range"),{type:"range",min:g,max:C,expr:O}}function nn(I,O){var g=I.nodeTypes,C=g[O];if(C)return[C];var D=[];for(var z in g){var j=g[z];j.isInGroup(O)&&D.push(j)}return D.length==0&&I.err("No node type or group '"+O+"' found"),D}function hr(I){if(I.eat("(")){var O=At(I);return I.eat(")")||I.err("Missing closing paren"),O}else if(/\W/.test(I.next))I.err("Unexpected token '"+I.next+"'");else{var g=nn(I,I.next).map(function(C){return I.inline==null?I.inline=C.isInline:I.inline!=C.isInline&&I.err("Mixing inline and block content"),{type:"name",value:C}});return I.pos++,g.length==1?g[0]:{type:"choice",exprs:g}}}function ze(I){var O=[[]];return D(z(I,0),g()),O;function g(){return O.push([])-1}function C(j,Y,ce){var me={term:ce,to:Y};return O[j].push(me),me}function D(j,Y){j.forEach(function(ce){return ce.to=Y})}function z(j,Y){if(j.type=="choice")return j.exprs.reduce(function(Un,vi){return Un.concat(z(vi,Y))},[]);if(j.type=="seq")for(var ce=0;;ce++){var me=z(j.exprs[ce],Y);if(ce==j.exprs.length-1)return me;D(me,Y=g())}else if(j.type=="star"){var Ne=g();return C(Y,Ne),D(z(j.expr,Ne),Ne),[C(Ne)]}else if(j.type=="plus"){var Ae=g();return D(z(j.expr,Y),Ae),D(z(j.expr,Ae),Ae),[C(Ae)]}else{if(j.type=="opt")return[C(Y)].concat(z(j.expr,Y));if(j.type=="range"){for(var Pe=Y,Ke=0;Ke<j.min;Ke++){var Dt=g();D(z(j.expr,Pe),Dt),Pe=Dt}if(j.max==-1)D(z(j.expr,Pe),Pe);else for(var br=j.min;br<j.max;br++){var on=g();C(Pe,on),D(z(j.expr,Pe),on),Pe=on}return[C(Pe)]}else{if(j.type=="name")return[C(Y,void 0,j.value)];throw new Error("Unknown expr type")}}}}function Ue(I,O){return O-I}function lt(I,O){var g=[];return C(O),g.sort(Ue);function C(D){var z=I[D];if(z.length==1&&!z[0].term)return C(z[0].to);g.push(D);for(var j=0;j<z.length;j++){var Y=z[j],ce=Y.term,me=Y.to;!ce&&g.indexOf(me)==-1&&C(me)}}}function dt(I){var O=Object.create(null);return g(lt(I,0));function g(C){var D=[];C.forEach(function(ce){I[ce].forEach(function(me){var Ne=me.term,Ae=me.to;if(Ne){for(var Pe,Ke=0;Ke<D.length;Ke++)D[Ke][0]==Ne&&(Pe=D[Ke][1]);lt(I,Ae).forEach(function(Dt){Pe||D.push([Ne,Pe=[]]),Pe.indexOf(Dt)==-1&&Pe.push(Dt)})}})});for(var z=O[C.join(",")]=new ct(C.indexOf(I.length-1)>-1),j=0;j<D.length;j++){var Y=D[j][1].sort(Ue);z.next.push({type:D[j][0],next:O[Y.join(",")]||g(Y)})}return z}}function Ot(I,O){for(var g=0,C=[I];g<C.length;g++){for(var D=C[g],z=!D.validEnd,j=[],Y=0;Y<D.next.length;Y++){var ce=D.next[Y],me=ce.type,Ne=ce.next;j.push(me.name),z&&!(me.isText||me.hasRequiredAttrs())&&(z=!1),C.indexOf(Ne)==-1&&C.push(Ne)}z&&O.err("Only non-generatable nodes ("+j.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function gr(I){var O=Object.create(null);for(var g in I){var C=I[g];if(!C.hasDefault)return null;O[g]=C.default}return O}function Vt(I,O){var g=Object.create(null);for(var C in I){var D=O&&O[C];if(D===void 0){var z=I[C];if(z.hasDefault)D=z.default;else throw new RangeError("No value supplied for attribute "+C)}g[C]=D}return g}function Gt(I,O,g,C){for(var D in O)if(!(D in I))throw new RangeError("Unsupported attribute ".concat(D," for ").concat(g," of type ").concat(C));for(var z in I)I[z].validate&&I[z].validate(O[z])}function Lr(I,O){var g=Object.create(null);if(O)for(var C in O)g[C]=new Vr(I,C,O[C]);return g}var Kr=(function(){function I(O,g,C){F(this,I),this.name=O,this.schema=g,this.spec=C,this.markSet=null,this.groups=C.group?C.group.split(" "):[],this.attrs=Lr(O,C.attrs),this.defaultAttrs=gr(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(C.inline||O=="text"),this.isText=O=="text"}return X(I,[{key:"isInline",get:function(){return!this.isBlock}},{key:"isTextblock",get:function(){return this.isBlock&&this.inlineContent}},{key:"isLeaf",get:function(){return this.contentMatch==ct.empty}},{key:"isAtom",get:function(){return this.isLeaf||!!this.spec.atom}},{key:"isInGroup",value:function(g){return this.groups.indexOf(g)>-1}},{key:"whitespace",get:function(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}},{key:"hasRequiredAttrs",value:function(){for(var g in this.attrs)if(this.attrs[g].isRequired)return!0;return!1}},{key:"compatibleContent",value:function(g){return this==g||this.contentMatch.compatible(g.contentMatch)}},{key:"computeAttrs",value:function(g){return!g&&this.defaultAttrs?this.defaultAttrs:Vt(this.attrs,g)}},{key:"create",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,C=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new He(this,this.computeAttrs(g),Le.from(C),Ye.setFrom(D))}},{key:"createChecked",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,C=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0;return C=Le.from(C),this.checkContent(C),new He(this,this.computeAttrs(g),C,Ye.setFrom(D))}},{key:"createAndFill",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,C=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0;if(g=this.computeAttrs(g),C=Le.from(C),C.size){var z=this.contentMatch.fillBefore(C);if(!z)return null;C=z.append(C)}var j=this.contentMatch.matchFragment(C),Y=j&&j.fillBefore(Le.empty,!0);return Y?new He(this,g,C.append(Y),Ye.setFrom(D)):null}},{key:"validContent",value:function(g){var C=this.contentMatch.matchFragment(g);if(!C||!C.validEnd)return!1;for(var D=0;D<g.childCount;D++)if(!this.allowsMarks(g.child(D).marks))return!1;return!0}},{key:"checkContent",value:function(g){if(!this.validContent(g))throw new RangeError("Invalid content for node ".concat(this.name,": ").concat(g.toString().slice(0,50)))}},{key:"checkAttrs",value:function(g){Gt(this.attrs,g,"node",this.name)}},{key:"allowsMarkType",value:function(g){return this.markSet==null||this.markSet.indexOf(g)>-1}},{key:"allowsMarks",value:function(g){if(this.markSet==null)return!0;for(var C=0;C<g.length;C++)if(!this.allowsMarkType(g[C].type))return!1;return!0}},{key:"allowedMarks",value:function(g){if(this.markSet==null)return g;for(var C,D=0;D<g.length;D++)this.allowsMarkType(g[D].type)?C&&C.push(g[D]):C||(C=g.slice(0,D));return C?C.length?C:Ye.none:g}}],[{key:"compile",value:function(g,C){var D=Object.create(null);g.forEach(function(Y,ce){return D[Y]=new I(Y,C,ce)});var z=C.spec.topNode||"doc";if(!D[z])throw new RangeError("Schema is missing its top node type ('"+z+"')");if(!D.text)throw new RangeError("Every schema needs a 'text' type");for(var j in D.text.attrs)throw new RangeError("The text node type should not have attributes");return D}}]),I})();function pr(I,O,g){var C=g.split("|");return function(D){var z=D===null?"null":B(D);if(C.indexOf(z)<0)throw new RangeError("Expected value of type ".concat(C," for attribute ").concat(O," on type ").concat(I,", got ").concat(z))}}var Vr=(function(){function I(O,g,C){F(this,I),this.hasDefault=Object.prototype.hasOwnProperty.call(C,"default"),this.default=C.default,this.validate=typeof C.validate=="string"?pr(O,g,C.validate):C.validate}return X(I,[{key:"isRequired",get:function(){return!this.hasDefault}}]),I})(),Mn=(function(){function I(O,g,C,D){F(this,I),this.name=O,this.rank=g,this.schema=C,this.spec=D,this.attrs=Lr(O,D.attrs),this.excluded=null;var z=gr(this.attrs);this.instance=z?new Ye(this,z):null}return X(I,[{key:"create",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return!g&&this.instance?this.instance:new Ye(this,Vt(this.attrs,g))}},{key:"removeFromSet",value:function(g){for(var C=0;C<g.length;C++)g[C].type==this&&(g=g.slice(0,C).concat(g.slice(C+1)),C--);return g}},{key:"isInSet",value:function(g){for(var C=0;C<g.length;C++)if(g[C].type==this)return g[C]}},{key:"checkAttrs",value:function(g){Gt(this.attrs,g,"mark",this.name)}},{key:"excludes",value:function(g){return this.excluded.indexOf(g)>-1}}],[{key:"compile",value:function(g,C){var D=Object.create(null),z=0;return g.forEach(function(j,Y){return D[j]=new I(j,z++,C,Y)}),D}}]),I})(),gn=(function(){function I(O){var g=this;F(this,I),this.linebreakReplacement=null,this.cached=Object.create(null);var C=this.spec={};for(var D in O)C[D]=O[D];C.nodes=de.from(O.nodes),C.marks=de.from(O.marks||{}),this.nodes=Kr.compile(this.spec.nodes,this),this.marks=Mn.compile(this.spec.marks,this);var z=Object.create(null);for(var j in this.nodes){if(j in this.marks)throw new RangeError(j+" can not be both a node and a mark");var Y=this.nodes[j],ce=Y.spec.content||"",me=Y.spec.marks;if(Y.contentMatch=z[ce]||(z[ce]=ct.parse(ce,this.nodes)),Y.inlineContent=Y.contentMatch.inlineContent,Y.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!Y.isInline||!Y.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=Y}Y.markSet=me=="_"?null:me?Jr(this,me.split(" ")):me==""||!Y.inlineContent?[]:null}for(var Ne in this.marks){var Ae=this.marks[Ne],Pe=Ae.spec.excludes;Ae.excluded=Pe==null?[Ae]:Pe==""?[]:Jr(this,Pe.split(" "))}this.nodeFromJSON=function(Ke){return He.fromJSON(g,Ke)},this.markFromJSON=function(Ke){return Ye.fromJSON(g,Ke)},this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}return X(I,[{key:"node",value:function(g){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,D=arguments.length>2?arguments[2]:void 0,z=arguments.length>3?arguments[3]:void 0;if(typeof g=="string")g=this.nodeType(g);else if(g instanceof Kr){if(g.schema!=this)throw new RangeError("Node type from different schema used ("+g.name+")")}else throw new RangeError("Invalid node type: "+g);return g.createChecked(C,D,z)}},{key:"text",value:function(g,C){var D=this.nodes.text;return new nt(D,D.defaultAttrs,g,Ye.setFrom(C))}},{key:"mark",value:function(g,C){return typeof g=="string"&&(g=this.marks[g]),g.create(C)}},{key:"nodeType",value:function(g){var C=this.nodes[g];if(!C)throw new RangeError("Unknown node type: "+g);return C}}]),I})();function Jr(I,O){for(var g=[],C=0;C<O.length;C++){var D=O[C],z=I.marks[D],j=z;if(z)g.push(z);else for(var Y in I.marks){var ce=I.marks[Y];(D=="_"||ce.spec.group&&ce.spec.group.split(" ").indexOf(D)>-1)&&g.push(j=ce)}if(!j)throw new SyntaxError("Unknown mark type: '"+O[C]+"'")}return g}function Yr(I){return I.tag!=null}function Xr(I){return I.style!=null}var or=(function(){function I(O,g){var C=this;F(this,I),this.schema=O,this.rules=g,this.tags=[],this.styles=[];var D=this.matchedStyles=[];g.forEach(function(z){if(Yr(z))C.tags.push(z);else if(Xr(z)){var j=/[^=]*/.exec(z.style)[0];D.indexOf(j)<0&&D.push(j),C.styles.push(z)}}),this.normalizeLists=!this.tags.some(function(z){if(!/^(ul|ol)\b/.test(z.tag)||!z.node)return!1;var j=O.nodes[z.node];return j.contentMatch.matchType(j)})}return X(I,[{key:"parse",value:function(g){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=new H(this,C,!1);return D.addAll(g,Ye.none,C.from,C.to),D.finish()}},{key:"parseSlice",value:function(g){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=new H(this,C,!0);return D.addAll(g,Ye.none,C.from,C.to),rt.maxOpen(D.finish())}},{key:"matchTag",value:function(g,C,D){for(var z=D?this.tags.indexOf(D)+1:0;z<this.tags.length;z++){var j=this.tags[z];if(pe(g,j.tag)&&(j.namespace===void 0||g.namespaceURI==j.namespace)&&(!j.context||C.matchesContext(j.context))){if(j.getAttrs){var Y=j.getAttrs(g);if(Y===!1)continue;j.attrs=Y||void 0}return j}}}},{key:"matchStyle",value:function(g,C,D,z){for(var j=z?this.styles.indexOf(z)+1:0;j<this.styles.length;j++){var Y=this.styles[j],ce=Y.style;if(!(ce.indexOf(g)!=0||Y.context&&!D.matchesContext(Y.context)||ce.length>g.length&&(ce.charCodeAt(g.length)!=61||ce.slice(g.length+1)!=C))){if(Y.getAttrs){var me=Y.getAttrs(C);if(me===!1)continue;Y.attrs=me||void 0}return Y}}}}],[{key:"schemaRules",value:function(g){var C=[];function D(me){for(var Ne=me.priority==null?50:me.priority,Ae=0;Ae<C.length;Ae++){var Pe=C[Ae],Ke=Pe.priority==null?50:Pe.priority;if(Ke<Ne)break}C.splice(Ae,0,me)}var z=function(Ne){var Ae=g.marks[Ne].spec.parseDOM;Ae&&Ae.forEach(function(Pe){D(Pe=we(Pe)),Pe.mark||Pe.ignore||Pe.clearMark||(Pe.mark=Ne)})};for(var j in g.marks)z(j);var Y=function(Ne){var Ae=g.nodes[Ne].spec.parseDOM;Ae&&Ae.forEach(function(Pe){D(Pe=we(Pe)),Pe.node||Pe.ignore||Pe.mark||(Pe.node=Ne)})};for(var ce in g.nodes)Y(ce);return C}},{key:"fromSchema",value:function(g){return g.cached.domParser||(g.cached.domParser=new I(g,I.schemaRules(g)))}}]),I})(),an={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Kt={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},yr={ol:!0,ul:!0},W=1,$=2,R=4;function N(I,O,g){return O!=null?(O?W:0)|(O==="full"?$:0):I&&I.whitespace=="pre"?W|$:g&~R}var P=(function(){function I(O,g,C,D,z,j){F(this,I),this.type=O,this.attrs=g,this.marks=C,this.solid=D,this.options=j,this.content=[],this.activeMarks=Ye.none,this.match=z||(j&R?null:O.contentMatch)}return X(I,[{key:"findWrapping",value:function(g){if(!this.match){if(!this.type)return[];var C=this.type.contentMatch.fillBefore(Le.from(g));if(C)this.match=this.type.contentMatch.matchFragment(C);else{var D=this.type.contentMatch,z;return(z=D.findWrapping(g.type))?(this.match=D,z):null}}return this.match.findWrapping(g.type)}},{key:"finish",value:function(g){if(!(this.options&W)){var C=this.content[this.content.length-1],D;if(C&&C.isText&&(D=/[ \t\r\n\u000c]+$/.exec(C.text))){var z=C;C.text.length==D[0].length?this.content.pop():this.content[this.content.length-1]=z.withText(z.text.slice(0,z.text.length-D[0].length))}}var j=Le.from(this.content);return!g&&this.match&&(j=j.append(this.match.fillBefore(Le.empty,!0))),this.type?this.type.create(this.attrs,j,this.marks):j}},{key:"inlineContext",value:function(g){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:g.parentNode&&!an.hasOwnProperty(g.parentNode.nodeName.toLowerCase())}}]),I})(),H=(function(){function I(O,g,C){F(this,I),this.parser=O,this.options=g,this.isOpen=C,this.open=0,this.localPreserveWS=!1;var D=g.topNode,z,j=N(null,g.preserveWhitespace,0)|(C?R:0);D?z=new P(D.type,D.attrs,Ye.none,!0,g.topMatch||D.type.contentMatch,j):C?z=new P(null,null,Ye.none,!0,null,j):z=new P(O.schema.topNodeType,null,Ye.none,!0,null,j),this.nodes=[z],this.find=g.findPositions,this.needsBlock=!1}return X(I,[{key:"top",get:function(){return this.nodes[this.open]}},{key:"addDOM",value:function(g,C){g.nodeType==3?this.addTextNode(g,C):g.nodeType==1&&this.addElement(g,C)}},{key:"addTextNode",value:function(g,C){var D=g.nodeValue,z=this.top,j=z.options&$?"full":this.localPreserveWS||(z.options&W)>0,Y=this.parser.schema;if(j==="full"||z.inlineContext(g)||/[^ \t\r\n\u000c]/.test(D)){if(j)if(j==="full")D=D.replace(/\r\n?/g,`
|
|
643
|
-
`);else if(Y.linebreakReplacement&&/[\r\n]/.test(D)&&this.top.findWrapping(Y.linebreakReplacement.create())){for(var Ne=D.split(/\r?\n|\r/),Ae=0;Ae<Ne.length;Ae++)Ae&&this.insertNode(Y.linebreakReplacement.create(),C,!0),Ne[Ae]&&this.insertNode(Y.text(Ne[Ae]),C,!/\S/.test(Ne[Ae]));D=""}else D=D.replace(/\r?\n|\r/g," ");else if(D=D.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(D)&&this.open==this.nodes.length-1){var ce=z.content[z.content.length-1],me=g.previousSibling;(!ce||me&&me.nodeName=="BR"||ce.isText&&/[ \t\r\n\u000c]$/.test(ce.text))&&(D=D.slice(1))}D&&this.insertNode(Y.text(D),C,!/\S/.test(D)),this.findInText(g)}else this.findInside(g)}},{key:"addElement",value:function(g,C,D){var z=this.localPreserveWS,j=this.top;(g.tagName=="PRE"||/pre/.test(g.style&&g.style.whiteSpace))&&(this.localPreserveWS=!0);var Y=g.nodeName.toLowerCase(),ce;yr.hasOwnProperty(Y)&&this.parser.normalizeLists&&K(g);var me=this.options.ruleFromNode&&this.options.ruleFromNode(g)||(ce=this.parser.matchTag(g,this,D));e:if(me?me.ignore:Kt.hasOwnProperty(Y))this.findInside(g),this.ignoreFallback(g,C);else if(!me||me.skip||me.closeParent){me&&me.closeParent?this.open=Math.max(0,this.open-1):me&&me.skip.nodeType&&(g=me.skip);var Ne,Ae=this.needsBlock;if(an.hasOwnProperty(Y))j.content.length&&j.content[0].isInline&&this.open&&(this.open--,j=this.top),Ne=!0,j.type||(this.needsBlock=!0);else if(!g.firstChild){this.leafFallback(g,C);break e}var Pe=me&&me.skip?C:this.readStyles(g,C);Pe&&this.addAll(g,Pe),Ne&&this.sync(j),this.needsBlock=Ae}else{var Ke=this.readStyles(g,C);Ke&&this.addElementByRule(g,me,Ke,me.consuming===!1?ce:void 0)}this.localPreserveWS=z}},{key:"leafFallback",value:function(g,C){g.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(g.ownerDocument.createTextNode(`
|
|
644
|
-
`),C)}},{key:"ignoreFallback",value:function(g,C){g.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),C,!0)}},{key:"readStyles",value:function(g,C){var D=this,z=g.style;if(z&&z.length)for(var j=0;j<this.parser.matchedStyles.length;j++){var Y=this.parser.matchedStyles[j],ce=z.getPropertyValue(Y);if(ce){for(var me=function(Ke){var Dt=D.parser.matchStyle(Y,ce,D,Ke);if(!Dt)return Ae=Ke,0;if(Dt.ignore)return{v:null};if(Dt.clearMark?C=C.filter(function(br){return!Dt.clearMark(br)}):C=C.concat(D.parser.schema.marks[Dt.mark].create(Dt.attrs)),Dt.consuming===!1)Ke=Dt;else return Ae=Ke,0;Ae=Ke},Ne,Ae=void 0;Ne=me(Ae),Ne!==0;)if(Ne)return Ne.v}}return C}},{key:"addElementByRule",value:function(g,C,D,z){var j=this,Y,ce;if(C.node)if(ce=this.parser.schema.nodes[C.node],ce.isLeaf)this.insertNode(ce.create(C.attrs),D,g.nodeName=="BR")||this.leafFallback(g,D);else{var me=this.enter(ce,C.attrs||null,D,C.preserveWhitespace);me&&(Y=!0,D=me)}else{var Ne=this.parser.schema.marks[C.mark];D=D.concat(Ne.create(C.attrs))}var Ae=this.top;if(ce&&ce.isLeaf)this.findInside(g);else if(z)this.addElement(g,D,z);else if(C.getContent)this.findInside(g),C.getContent(g,this.parser.schema).forEach(function(Ke){return j.insertNode(Ke,D,!1)});else{var Pe=g;typeof C.contentElement=="string"?Pe=g.querySelector(C.contentElement):typeof C.contentElement=="function"?Pe=C.contentElement(g):C.contentElement&&(Pe=C.contentElement),this.findAround(g,Pe,!0),this.addAll(Pe,D),this.findAround(g,Pe,!1)}Y&&this.sync(Ae)&&this.open--}},{key:"addAll",value:function(g,C,D,z){for(var j=D||0,Y=D?g.childNodes[D]:g.firstChild,ce=z==null?null:g.childNodes[z];Y!=ce;Y=Y.nextSibling,++j)this.findAtPoint(g,j),this.addDOM(Y,C);this.findAtPoint(g,j)}},{key:"findPlace",value:function(g,C,D){for(var z,j,Y=this.open,ce=0;Y>=0;Y--){var me=this.nodes[Y],Ne=me.findWrapping(g);if(Ne&&(!z||z.length>Ne.length+ce)&&(z=Ne,j=me,!Ne.length))break;if(me.solid){if(D)break;ce+=2}}if(!z)return null;this.sync(j);for(var Ae=0;Ae<z.length;Ae++)C=this.enterInner(z[Ae],null,C,!1);return C}},{key:"insertNode",value:function(g,C,D){if(g.isInline&&this.needsBlock&&!this.top.type){var z=this.textblockFromContext();z&&(C=this.enterInner(z,null,C))}var j=this.findPlace(g,C,D);if(j){this.closeExtra();var Y=this.top;Y.match&&(Y.match=Y.match.matchType(g.type));var ce=Ye.none,me=r(j.concat(g.marks)),Ne;try{for(me.s();!(Ne=me.n()).done;){var Ae=Ne.value;(Y.type?Y.type.allowsMarkType(Ae.type):ie(Ae.type,g.type))&&(ce=Ae.addToSet(ce))}}catch(Pe){me.e(Pe)}finally{me.f()}return Y.content.push(g.mark(ce)),!0}return!1}},{key:"enter",value:function(g,C,D,z){var j=this.findPlace(g.create(C),D,!1);return j&&(j=this.enterInner(g,C,D,!0,z)),j}},{key:"enterInner",value:function(g,C,D){var z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,j=arguments.length>4?arguments[4]:void 0;this.closeExtra();var Y=this.top;Y.match=Y.match&&Y.match.matchType(g);var ce=N(g,j,Y.options);Y.options&R&&Y.content.length==0&&(ce|=R);var me=Ye.none;return D=D.filter(function(Ne){return(Y.type?Y.type.allowsMarkType(Ne.type):ie(Ne.type,g))?(me=Ne.addToSet(me),!1):!0}),this.nodes.push(new P(g,C,me,z,null,ce)),this.open++,D}},{key:"closeExtra",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,C=this.nodes.length-1;if(C>this.open){for(;C>this.open;C--)this.nodes[C-1].content.push(this.nodes[C].finish(g));this.nodes.length=this.open+1}}},{key:"finish",value:function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}},{key:"sync",value:function(g){for(var C=this.open;C>=0;C--){if(this.nodes[C]==g)return this.open=C,!0;this.localPreserveWS&&(this.nodes[C].options|=W)}return!1}},{key:"currentPos",get:function(){this.closeExtra();for(var g=0,C=this.open;C>=0;C--){for(var D=this.nodes[C].content,z=D.length-1;z>=0;z--)g+=D[z].nodeSize;C&&g++}return g}},{key:"findAtPoint",value:function(g,C){if(this.find)for(var D=0;D<this.find.length;D++)this.find[D].node==g&&this.find[D].offset==C&&(this.find[D].pos=this.currentPos)}},{key:"findInside",value:function(g){if(this.find)for(var C=0;C<this.find.length;C++)this.find[C].pos==null&&g.nodeType==1&&g.contains(this.find[C].node)&&(this.find[C].pos=this.currentPos)}},{key:"findAround",value:function(g,C,D){if(g!=C&&this.find){for(var z=0;z<this.find.length;z++)if(this.find[z].pos==null&&g.nodeType==1&&g.contains(this.find[z].node)){var j=C.compareDocumentPosition(this.find[z].node);j&(D?2:4)&&(this.find[z].pos=this.currentPos)}}}},{key:"findInText",value:function(g){if(this.find)for(var C=0;C<this.find.length;C++)this.find[C].node==g&&(this.find[C].pos=this.currentPos-(g.nodeValue.length-this.find[C].offset))}},{key:"matchesContext",value:function(g){var C=this;if(g.indexOf("|")>-1)return g.split(/\s*\|\s*/).some(this.matchesContext,this);var D=g.split("/"),z=this.options.context,j=!this.isOpen&&(!z||z.parent.type==this.nodes[0].type),Y=-(z?z.depth+1:0)+(j?0:1),ce=function me(Ne,Ae){for(;Ne>=0;Ne--){var Pe=D[Ne];if(Pe==""){if(Ne==D.length-1||Ne==0)continue;for(;Ae>=Y;Ae--)if(me(Ne-1,Ae))return!0;return!1}else{var Ke=Ae>0||Ae==0&&j?C.nodes[Ae].type:z&&Ae>=Y?z.node(Ae-Y).type:null;if(!Ke||Ke.name!=Pe&&!Ke.isInGroup(Pe))return!1;Ae--}}return!0};return ce(D.length-1,this.open)}},{key:"textblockFromContext",value:function(){var g=this.options.context;if(g)for(var C=g.depth;C>=0;C--){var D=g.node(C).contentMatchAt(g.indexAfter(C)).defaultType;if(D&&D.isTextblock&&D.defaultAttrs)return D}for(var z in this.parser.schema.nodes){var j=this.parser.schema.nodes[z];if(j.isTextblock&&j.defaultAttrs)return j}}}]),I})();function K(I){for(var O=I.firstChild,g=null;O;O=O.nextSibling){var C=O.nodeType==1?O.nodeName.toLowerCase():null;C&&yr.hasOwnProperty(C)&&g?(g.appendChild(O),O=g):C=="li"?g=O:C&&(g=null)}}function pe(I,O){return(I.matches||I.msMatchesSelector||I.webkitMatchesSelector||I.mozMatchesSelector).call(I,O)}function we(I){var O={};for(var g in I)O[g]=I[g];return O}function ie(I,O){var g=O.schema.nodes,C=function(){var Y=g[z];if(!Y.allowsMarkType(I))return 0;var ce=[],me=function Ne(Ae){ce.push(Ae);for(var Pe=0;Pe<Ae.edgeCount;Pe++){var Ke=Ae.edge(Pe),Dt=Ke.type,br=Ke.next;if(Dt==O||ce.indexOf(br)<0&&Ne(br))return!0}};if(me(Y.contentMatch))return{v:!0}},D;for(var z in g)if(D=C(),D!==0&&D)return D.v}var J=(function(){function I(O,g){F(this,I),this.nodes=O,this.marks=g}return X(I,[{key:"serializeFragment",value:function(g){var C=this,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=arguments.length>2?arguments[2]:void 0;z||(z=be(D).createDocumentFragment());var j=z,Y=[];return g.forEach(function(ce){if(Y.length||ce.marks.length){for(var me=0,Ne=0;me<Y.length&&Ne<ce.marks.length;){var Ae=ce.marks[Ne];if(!C.marks[Ae.type.name]){Ne++;continue}if(!Ae.eq(Y[me][0])||Ae.type.spec.spanning===!1)break;me++,Ne++}for(;me<Y.length;)j=Y.pop()[1];for(;Ne<ce.marks.length;){var Pe=ce.marks[Ne++],Ke=C.serializeMark(Pe,ce.isInline,D);Ke&&(Y.push([Pe,j]),j.appendChild(Ke.dom),j=Ke.contentDOM||Ke.dom)}}j.appendChild(C.serializeNodeInner(ce,D))}),z}},{key:"serializeNodeInner",value:function(g,C){if(g.isText)return be(C).createTextNode(g.text);var D=at(be(C),this.nodes[g.type.name](g),null,g.attrs),z=D.dom,j=D.contentDOM;if(j){if(g.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(g.content,C,j)}return z}},{key:"serializeNode",value:function(g){for(var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=this.serializeNodeInner(g,C),z=g.marks.length-1;z>=0;z--){var j=this.serializeMark(g.marks[z],g.isInline,C);j&&((j.contentDOM||j.dom).appendChild(D),D=j.dom)}return D}},{key:"serializeMark",value:function(g,C){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},z=this.marks[g.type.name];return z&&at(be(D),z(g,C),null,g.attrs)}}],[{key:"renderSpec",value:function(g,C){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,z=arguments.length>3?arguments[3]:void 0;return typeof C=="string"?{dom:g.createTextNode(C)}:at(g,C,D,z)}},{key:"fromSchema",value:function(g){return g.cached.domSerializer||(g.cached.domSerializer=new I(this.nodesFromSchema(g),this.marksFromSchema(g)))}},{key:"nodesFromSchema",value:function(g){var C=ve(g.nodes);return C.text||(C.text=function(D){return D.text}),C}},{key:"marksFromSchema",value:function(g){return ve(g.marks)}}]),I})();function ve(I){var O={};for(var g in I){var C=I[g].spec.toDOM;C&&(O[g]=C)}return O}function be(I){return I.document||window.document}var Ie=new WeakMap;function et(I){var O=Ie.get(I);return O===void 0&&Ie.set(I,O=_e(I)),O}function _e(I){var O=null;function g(C){if(C&&B(C)=="object")if(Array.isArray(C))if(typeof C[0]=="string")O||(O=[]),O.push(C);else for(var D=0;D<C.length;D++)g(C[D]);else for(var z in C)g(C[z])}return g(I),O}function at(I,O,g,C){if(O.nodeType==1)return{dom:O};if(O.dom&&O.dom.nodeType==1)return O;var D=O[0],z;if(typeof D!="string")throw new RangeError("Invalid array passed to renderSpec");if(C&&(z=et(C))&&z.indexOf(O)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");var j=D.indexOf(" ");j>0&&(g=D.slice(0,j),D=D.slice(j+1));var Y,ce=g?I.createElementNS(g,D):I.createElement(D),me=O[1],Ne=1;if(me&&B(me)=="object"&&me.nodeType==null&&!Array.isArray(me)){Ne=2;for(var Ae in me)if(me[Ae]!=null){var Pe=Ae.indexOf(" ");Pe>0?ce.setAttributeNS(Ae.slice(0,Pe),Ae.slice(Pe+1),me[Ae]):Ae=="style"&&ce.style?ce.style.cssText=me[Ae]:ce.setAttribute(Ae,me[Ae])}}for(var Ke=Ne;Ke<O.length;Ke++){var Dt=O[Ke];if(Dt===0){if(Ke<O.length-1||Ke>Ne)throw new RangeError("Content hole must be the only child of its parent node");return{dom:ce,contentDOM:ce}}else if(typeof Dt=="string")ce.appendChild(I.createTextNode(Dt));else{var br=at(I,Dt,g,C),on=br.dom,Un=br.contentDOM;if(ce.appendChild(on),Un){if(Y)throw new RangeError("Multiple content holes");Y=Un}}}return{dom:ce,contentDOM:Y}}return Zr.ContentMatch=ct,Zr.DOMParser=or,Zr.DOMSerializer=J,Zr.Fragment=Le,Zr.Mark=Ye,Zr.MarkType=Mn,Zr.Node=He,Zr.NodeRange=ke,Zr.NodeType=Kr,Zr.ReplaceError=pt,Zr.ResolvedPos=he,Zr.Schema=gn,Zr.Slice=rt,Zr}var vd={},_y;function ep(){return _y||(_y=1,(function(r){function e(W){var $=typeof Map=="function"?new Map:void 0;return e=function(N){if(N===null||!n(N))return N;if(typeof N!="function")throw new TypeError("Super expression must either be null or a function");if(typeof $<"u"){if($.has(N))return $.get(N);$.set(N,P)}function P(){return t(N,arguments,p(this).constructor)}return P.prototype=Object.create(N.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),a(P,N)},e(W)}function t(W,$,R){return f()?t=Reflect.construct.bind():t=function(P,H,K){var pe=[null];pe.push.apply(pe,H);var we=Function.bind.apply(P,pe),ie=new we;return K&&a(ie,K.prototype),ie},t.apply(null,arguments)}function n(W){try{return Function.toString.call(W).indexOf("[native code]")!==-1}catch{return typeof W=="function"}}function i(W,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create($&&$.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),Object.defineProperty(W,"prototype",{writable:!1}),$&&a(W,$)}function a(W,$){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,P){return N.__proto__=P,N},a(W,$)}function o(W){var $=f();return function(){var N=p(W),P;if($){var H=p(this).constructor;P=Reflect.construct(N,arguments,H)}else P=N.apply(this,arguments);return s(this,P)}}function s(W,$){if($&&(b($)==="object"||typeof $=="function"))return $;if($!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(W)}function l(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function f(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function p(W){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},p(W)}function b(W){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},b(W)}function T(W,$){if(!(W instanceof $))throw new TypeError("Cannot call a class as a function")}function x(W,$){for(var R=0;R<$.length;R++){var N=$[R];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(W,B(N.key),N)}}function E(W,$,R){return $&&x(W.prototype,$),R&&x(W,R),Object.defineProperty(W,"prototype",{writable:!1}),W}function B(W){var $=F(W,"string");return b($)==="symbol"?$:String($)}function F(W,$){if(b(W)!=="object"||W===null)return W;var R=W[Symbol.toPrimitive];if(R!==void 0){var N=R.call(W,$);if(b(N)!=="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(W)}var _=tc(),X=65535,ee=Math.pow(2,16);function se(W,$){return W+$*ee}function de(W){return W&X}function ae(W){return(W-(W&X))/ee}var le=1,Te=2,xe=4,Le=8,ut=(function(){function W($,R,N){T(this,W),this.pos=$,this.delInfo=R,this.recover=N}return E(W,[{key:"deleted",get:function(){return(this.delInfo&Le)>0}},{key:"deletedBefore",get:function(){return(this.delInfo&(le|xe))>0}},{key:"deletedAfter",get:function(){return(this.delInfo&(Te|xe))>0}},{key:"deletedAcross",get:function(){return(this.delInfo&xe)>0}}]),W})(),Je=(function(){function W($){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(T(this,W),this.ranges=$,this.inverted=R,!$.length&&W.empty)return W.empty}return E(W,[{key:"recover",value:function(R){var N=0,P=de(R);if(!this.inverted)for(var H=0;H<P;H++)N+=this.ranges[H*3+2]-this.ranges[H*3+1];return this.ranges[P*3]+N+ae(R)}},{key:"mapResult",value:function(R){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this._map(R,N,!1)}},{key:"map",value:function(R){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this._map(R,N,!0)}},{key:"_map",value:function(R,N,P){for(var H=0,K=this.inverted?2:1,pe=this.inverted?1:2,we=0;we<this.ranges.length;we+=3){var ie=this.ranges[we]-(this.inverted?H:0);if(ie>R)break;var J=this.ranges[we+K],ve=this.ranges[we+pe],be=ie+J;if(R<=be){var Ie=J?R==ie?-1:R==be?1:N:N,et=ie+H+(Ie<0?0:ve);if(P)return et;var _e=R==(N<0?ie:be)?null:se(we/3,R-ie),at=R==ie?Te:R==be?le:xe;return(N<0?R!=ie:R!=be)&&(at|=Le),new ut(et,at,_e)}H+=ve-J}return P?R+H:new ut(R+H,0,null)}},{key:"touches",value:function(R,N){for(var P=0,H=de(N),K=this.inverted?2:1,pe=this.inverted?1:2,we=0;we<this.ranges.length;we+=3){var ie=this.ranges[we]-(this.inverted?P:0);if(ie>R)break;var J=this.ranges[we+K],ve=ie+J;if(R<=ve&&we==H*3)return!0;P+=this.ranges[we+pe]-J}return!1}},{key:"forEach",value:function(R){for(var N=this.inverted?2:1,P=this.inverted?1:2,H=0,K=0;H<this.ranges.length;H+=3){var pe=this.ranges[H],we=pe-(this.inverted?K:0),ie=pe+(this.inverted?0:K),J=this.ranges[H+N],ve=this.ranges[H+P];R(we,we+J,ie,ie+ve),K+=ve-J}}},{key:"invert",value:function(){return new W(this.ranges,!this.inverted)}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function(R){return R==0?W.empty:new W(R<0?[0,-R,0]:[0,0,R])}}]),W})();Je.empty=new Je([]);var wt=(function(){function W($,R){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$?$.length:0;T(this,W),this.mirror=R,this.from=N,this.to=P,this._maps=$||[],this.ownData=!($||R)}return E(W,[{key:"maps",get:function(){return this._maps}},{key:"slice",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.maps.length;return new W(this._maps,this.mirror,R,N)}},{key:"appendMap",value:function(R,N){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(R),N!=null&&this.setMirror(this._maps.length-1,N)}},{key:"appendMapping",value:function(R){for(var N=0,P=this._maps.length;N<R._maps.length;N++){var H=R.getMirror(N);this.appendMap(R._maps[N],H!=null&&H<N?P+H:void 0)}}},{key:"getMirror",value:function(R){if(this.mirror){for(var N=0;N<this.mirror.length;N++)if(this.mirror[N]==R)return this.mirror[N+(N%2?-1:1)]}}},{key:"setMirror",value:function(R,N){this.mirror||(this.mirror=[]),this.mirror.push(R,N)}},{key:"appendMappingInverted",value:function(R){for(var N=R.maps.length-1,P=this._maps.length+R._maps.length;N>=0;N--){var H=R.getMirror(N);this.appendMap(R._maps[N].invert(),H!=null&&H>N?P-H-1:void 0)}}},{key:"invert",value:function(){var R=new W;return R.appendMappingInverted(this),R}},{key:"map",value:function(R){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;if(this.mirror)return this._map(R,N,!0);for(var P=this.from;P<this.to;P++)R=this._maps[P].map(R,N);return R}},{key:"mapResult",value:function(R){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this._map(R,N,!1)}},{key:"_map",value:function(R,N,P){for(var H=0,K=this.from;K<this.to;K++){var pe=this._maps[K],we=pe.mapResult(R,N);if(we.recover!=null){var ie=this.getMirror(K);if(ie!=null&&ie>K&&ie<this.to){K=ie,R=this._maps[ie].recover(we.recover);continue}}H|=we.delInfo,R=we.pos}return P?R:new ut(R,H,null)}}]),W})(),Ye=Object.create(null),pt=(function(){function W(){T(this,W)}return E(W,[{key:"getMap",value:function(){return Je.empty}},{key:"merge",value:function(R){return null}}],[{key:"fromJSON",value:function(R,N){if(!N||!N.stepType)throw new RangeError("Invalid input for Step.fromJSON");var P=Ye[N.stepType];if(!P)throw new RangeError("No step type ".concat(N.stepType," defined"));return P.fromJSON(R,N)}},{key:"jsonID",value:function(R,N){if(R in Ye)throw new RangeError("Duplicate use of step JSON ID "+R);return Ye[R]=N,N.prototype.jsonID=R,N}}]),W})(),rt=(function(){function W($,R){T(this,W),this.doc=$,this.failed=R}return E(W,null,[{key:"ok",value:function(R){return new W(R,null)}},{key:"fail",value:function(R){return new W(null,R)}},{key:"fromReplace",value:function(R,N,P,H){try{return W.ok(R.replace(N,P,H))}catch(K){if(K instanceof _.ReplaceError)return W.fail(K.message);throw K}}}]),W})();function Et(W,$,R){for(var N=[],P=0;P<W.childCount;P++){var H=W.child(P);H.content.size&&(H=H.copy(Et(H.content,$,H))),H.isInline&&(H=$(H,R,P)),N.push(H)}return _.Fragment.fromArray(N)}var Bt=(function(W){i(R,W);var $=o(R);function R(N,P,H){var K;return T(this,R),K=$.call(this),K.from=N,K.to=P,K.mark=H,K}return E(R,[{key:"apply",value:function(P){var H=this,K=P.slice(this.from,this.to),pe=P.resolve(this.from),we=pe.node(pe.sharedDepth(this.to)),ie=new _.Slice(Et(K.content,function(J,ve){return!J.isAtom||!ve.type.allowsMarkType(H.mark.type)?J:J.mark(H.mark.addToSet(J.marks))},we),K.openStart,K.openEnd);return rt.fromReplace(P,this.from,this.to,ie)}},{key:"invert",value:function(){return new $t(this.from,this.to,this.mark)}},{key:"map",value:function(P){var H=P.mapResult(this.from,1),K=P.mapResult(this.to,-1);return H.deleted&&K.deleted||H.pos>=K.pos?null:new R(H.pos,K.pos,this.mark)}},{key:"merge",value:function(P){return P instanceof R&&P.mark.eq(this.mark)&&this.from<=P.to&&this.to>=P.from?new R(Math.min(this.from,P.from),Math.max(this.to,P.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(P,H){if(typeof H.from!="number"||typeof H.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new R(H.from,H.to,P.markFromJSON(H.mark))}}]),R})(pt);pt.jsonID("addMark",Bt);var $t=(function(W){i(R,W);var $=o(R);function R(N,P,H){var K;return T(this,R),K=$.call(this),K.from=N,K.to=P,K.mark=H,K}return E(R,[{key:"apply",value:function(P){var H=this,K=P.slice(this.from,this.to),pe=new _.Slice(Et(K.content,function(we){return we.mark(H.mark.removeFromSet(we.marks))},P),K.openStart,K.openEnd);return rt.fromReplace(P,this.from,this.to,pe)}},{key:"invert",value:function(){return new Bt(this.from,this.to,this.mark)}},{key:"map",value:function(P){var H=P.mapResult(this.from,1),K=P.mapResult(this.to,-1);return H.deleted&&K.deleted||H.pos>=K.pos?null:new R(H.pos,K.pos,this.mark)}},{key:"merge",value:function(P){return P instanceof R&&P.mark.eq(this.mark)&&this.from<=P.to&&this.to>=P.from?new R(Math.min(this.from,P.from),Math.max(this.to,P.to),this.mark):null}},{key:"toJSON",value:function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}}],[{key:"fromJSON",value:function(P,H){if(typeof H.from!="number"||typeof H.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new R(H.from,H.to,P.markFromJSON(H.mark))}}]),R})(pt);pt.jsonID("removeMark",$t);var Qe=(function(W){i(R,W);var $=o(R);function R(N,P){var H;return T(this,R),H=$.call(this),H.pos=N,H.mark=P,H}return E(R,[{key:"apply",value:function(P){var H=P.nodeAt(this.pos);if(!H)return rt.fail("No node at mark step's position");var K=H.type.create(H.attrs,null,this.mark.addToSet(H.marks));return rt.fromReplace(P,this.pos,this.pos+1,new _.Slice(_.Fragment.from(K),0,H.isLeaf?0:1))}},{key:"invert",value:function(P){var H=P.nodeAt(this.pos);if(H){var K=this.mark.addToSet(H.marks);if(K.length==H.marks.length){for(var pe=0;pe<H.marks.length;pe++)if(!H.marks[pe].isInSet(K))return new R(this.pos,H.marks[pe]);return new R(this.pos,this.mark)}}return new Ct(this.pos,this.mark)}},{key:"map",value:function(P){var H=P.mapResult(this.pos,1);return H.deletedAfter?null:new R(H.pos,this.mark)}},{key:"toJSON",value:function(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}}],[{key:"fromJSON",value:function(P,H){if(typeof H.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new R(H.pos,P.markFromJSON(H.mark))}}]),R})(pt);pt.jsonID("addNodeMark",Qe);var Ct=(function(W){i(R,W);var $=o(R);function R(N,P){var H;return T(this,R),H=$.call(this),H.pos=N,H.mark=P,H}return E(R,[{key:"apply",value:function(P){var H=P.nodeAt(this.pos);if(!H)return rt.fail("No node at mark step's position");var K=H.type.create(H.attrs,null,this.mark.removeFromSet(H.marks));return rt.fromReplace(P,this.pos,this.pos+1,new _.Slice(_.Fragment.from(K),0,H.isLeaf?0:1))}},{key:"invert",value:function(P){var H=P.nodeAt(this.pos);return!H||!this.mark.isInSet(H.marks)?this:new Qe(this.pos,this.mark)}},{key:"map",value:function(P){var H=P.mapResult(this.pos,1);return H.deletedAfter?null:new R(H.pos,this.mark)}},{key:"toJSON",value:function(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}}],[{key:"fromJSON",value:function(P,H){if(typeof H.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new R(H.pos,P.markFromJSON(H.mark))}}]),R})(pt);pt.jsonID("removeNodeMark",Ct);var ft=(function(W){i(R,W);var $=o(R);function R(N,P,H){var K,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return T(this,R),K=$.call(this),K.from=N,K.to=P,K.slice=H,K.structure=pe,K}return E(R,[{key:"apply",value:function(P){return this.structure&&Tt(P,this.from,this.to)?rt.fail("Structure replace would overwrite content"):rt.fromReplace(P,this.from,this.to,this.slice)}},{key:"getMap",value:function(){return new Je([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(P){return new R(this.from,this.from+this.slice.size,P.slice(this.from,this.to))}},{key:"map",value:function(P){var H=P.mapResult(this.to,-1),K=this.from==this.to&&R.MAP_BIAS<0?H:P.mapResult(this.from,1);return K.deletedAcross&&H.deletedAcross?null:new R(K.pos,Math.max(K.pos,H.pos),this.slice,this.structure)}},{key:"merge",value:function(P){if(!(P instanceof R)||P.structure||this.structure)return null;if(this.from+this.slice.size==P.from&&!this.slice.openEnd&&!P.slice.openStart){var H=this.slice.size+P.slice.size==0?_.Slice.empty:new _.Slice(this.slice.content.append(P.slice.content),this.slice.openStart,P.slice.openEnd);return new R(this.from,this.to+(P.to-P.from),H,this.structure)}else if(P.to==this.from&&!this.slice.openStart&&!P.slice.openEnd){var K=this.slice.size+P.slice.size==0?_.Slice.empty:new _.Slice(P.slice.content.append(this.slice.content),P.slice.openStart,this.slice.openEnd);return new R(P.from,this.to,K,this.structure)}else return null}},{key:"toJSON",value:function(){var P={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(P.slice=this.slice.toJSON()),this.structure&&(P.structure=!0),P}}],[{key:"fromJSON",value:function(P,H){if(typeof H.from!="number"||typeof H.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new R(H.from,H.to,_.Slice.fromJSON(P,H.slice),!!H.structure)}}]),R})(pt);ft.MAP_BIAS=1,pt.jsonID("replace",ft);var Mt=(function(W){i(R,W);var $=o(R);function R(N,P,H,K,pe,we){var ie,J=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1;return T(this,R),ie=$.call(this),ie.from=N,ie.to=P,ie.gapFrom=H,ie.gapTo=K,ie.slice=pe,ie.insert=we,ie.structure=J,ie}return E(R,[{key:"apply",value:function(P){if(this.structure&&(Tt(P,this.from,this.gapFrom)||Tt(P,this.gapTo,this.to)))return rt.fail("Structure gap-replace would overwrite content");var H=P.slice(this.gapFrom,this.gapTo);if(H.openStart||H.openEnd)return rt.fail("Gap is not a flat range");var K=this.slice.insertAt(this.insert,H.content);return K?rt.fromReplace(P,this.from,this.to,K):rt.fail("Content does not fit in gap")}},{key:"getMap",value:function(){return new Je([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(P){var H=this.gapTo-this.gapFrom;return new R(this.from,this.from+this.slice.size+H,this.from+this.insert,this.from+this.insert+H,P.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(P){var H=P.mapResult(this.from,1),K=P.mapResult(this.to,-1),pe=this.from==this.gapFrom?H.pos:P.map(this.gapFrom,-1),we=this.to==this.gapTo?K.pos:P.map(this.gapTo,1);return H.deletedAcross&&K.deletedAcross||pe<H.pos||we>K.pos?null:new R(H.pos,K.pos,pe,we,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function(){var P={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(P.slice=this.slice.toJSON()),this.structure&&(P.structure=!0),P}}],[{key:"fromJSON",value:function(P,H){if(typeof H.from!="number"||typeof H.to!="number"||typeof H.gapFrom!="number"||typeof H.gapTo!="number"||typeof H.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new R(H.from,H.to,H.gapFrom,H.gapTo,_.Slice.fromJSON(P,H.slice),H.insert,!!H.structure)}}]),R})(pt);pt.jsonID("replaceAround",Mt);function Tt(W,$,R){for(var N=W.resolve($),P=R-$,H=N.depth;P>0&&H>0&&N.indexAfter(H)==N.node(H).childCount;)H--,P--;if(P>0)for(var K=N.node(H).maybeChild(N.indexAfter(H));P>0;){if(!K||K.isLeaf)return!0;K=K.firstChild,P--}return!1}function jt(W,$,R,N){var P=[],H=[],K,pe;W.doc.nodesBetween($,R,function(we,ie,J){if(we.isInline){var ve=we.marks;if(!N.isInSet(ve)&&J.type.allowsMarkType(N.type)){for(var be=Math.max(ie,$),Ie=Math.min(ie+we.nodeSize,R),et=N.addToSet(ve),_e=0;_e<ve.length;_e++)ve[_e].isInSet(et)||(K&&K.to==be&&K.mark.eq(ve[_e])?K.to=Ie:P.push(K=new $t(be,Ie,ve[_e])));pe&&pe.to==be?pe.to=Ie:H.push(pe=new Bt(be,Ie,N))}}}),P.forEach(function(we){return W.step(we)}),H.forEach(function(we){return W.step(we)})}function Ut(W,$,R,N){var P=[],H=0;W.doc.nodesBetween($,R,function(K,pe){if(K.isInline){H++;var we=null;if(N instanceof _.MarkType)for(var ie=K.marks,J;J=N.isInSet(ie);)(we||(we=[])).push(J),ie=J.removeFromSet(ie);else N?N.isInSet(K.marks)&&(we=[N]):we=K.marks;if(we&&we.length)for(var ve=Math.min(pe+K.nodeSize,R),be=0;be<we.length;be++){for(var Ie=we[be],et=void 0,_e=0;_e<P.length;_e++){var at=P[_e];at.step==H-1&&Ie.eq(P[_e].style)&&(et=at)}et?(et.to=ve,et.step=H):P.push({style:Ie,from:Math.max(pe,$),to:ve,step:H})}}}),P.forEach(function(K){return W.step(new $t(K.from,K.to,K.style))})}function Yt(W,$,R){for(var N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:R.contentMatch,P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,H=W.doc.nodeAt($),K=[],pe=$+1,we=0;we<H.childCount;we++){var ie=H.child(we),J=pe+ie.nodeSize,ve=N.matchType(ie.type);if(!ve)K.push(new ft(pe,J,_.Slice.empty));else{N=ve;for(var be=0;be<ie.marks.length;be++)R.allowsMarkType(ie.marks[be].type)||W.step(new $t(pe,J,ie.marks[be]));if(P&&ie.isText&&R.whitespace!="pre")for(var Ie=void 0,et=/\r?\n|\r/g,_e=void 0;Ie=et.exec(ie.text);)_e||(_e=new _.Slice(_.Fragment.from(R.schema.text(" ",R.allowedMarks(ie.marks))),0,0)),K.push(new ft(pe+Ie.index,pe+Ie.index+Ie[0].length,_e))}pe=J}if(!N.validEnd){var at=N.fillBefore(_.Fragment.empty,!0);W.replace(pe,pe,new _.Slice(at,0,0))}for(var I=K.length-1;I>=0;I--)W.step(K[I])}function ye(W,$,R){return($==0||W.canReplace($,W.childCount))&&(R==W.childCount||W.canReplace(0,R))}function he(W){for(var $=W.parent,R=$.content.cutByIndex(W.startIndex,W.endIndex),N=W.depth,P=0,H=0;;--N){var K=W.$from.node(N),pe=W.$from.index(N)+P,we=W.$to.indexAfter(N)-H;if(N<W.depth&&K.canReplace(pe,we,R))return N;if(N==0||K.type.spec.isolating||!ye(K,pe,we))break;pe&&(P=1),we<K.childCount&&(H=1)}return null}function ne(W,$,R){for(var N=$.$from,P=$.$to,H=$.depth,K=N.before(H+1),pe=P.after(H+1),we=K,ie=pe,J=_.Fragment.empty,ve=0,be=H,Ie=!1;be>R;be--)Ie||N.index(be)>0?(Ie=!0,J=_.Fragment.from(N.node(be).copy(J)),ve++):we--;for(var et=_.Fragment.empty,_e=0,at=H,I=!1;at>R;at--)I||P.after(at+1)<P.end(at)?(I=!0,et=_.Fragment.from(P.node(at).copy(et)),_e++):ie++;W.step(new Mt(we,ie,K,pe,new _.Slice(J.append(et),ve,_e),J.size-ve,!0))}function oe(W,$){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:W,P=ke(W,$),H=P&&Ee(N,$);return H?P.map(Q).concat({type:$,attrs:R}).concat(H.map(Q)):null}function Q(W){return{type:W,attrs:null}}function ke(W,$){var R=W.parent,N=W.startIndex,P=W.endIndex,H=R.contentMatchAt(N).findWrapping($);if(!H)return null;var K=H.length?H[0]:$;return R.canReplaceWith(N,P,K)?H:null}function Ee(W,$){var R=W.parent,N=W.startIndex,P=W.endIndex,H=R.child(N),K=$.contentMatch.findWrapping(H.type);if(!K)return null;for(var pe=K.length?K[K.length-1]:$,we=pe.contentMatch,ie=N;we&&ie<P;ie++)we=we.matchType(R.child(ie).type);return!we||!we.validEnd?null:K}function He(W,$,R){for(var N=_.Fragment.empty,P=R.length-1;P>=0;P--){if(N.size){var H=R[P].type.contentMatch.matchFragment(N);if(!H||!H.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}N=_.Fragment.from(R[P].type.create(R[P].attrs,N))}var K=$.start,pe=$.end;W.step(new Mt(K,pe,K,pe,new _.Slice(N,0,0),R.length,!0))}function nt(W,$,R,N,P){if(!N.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var H=W.steps.length;W.doc.nodesBetween($,R,function(K,pe){var we=typeof P=="function"?P(K):P;if(K.isTextblock&&!K.hasMarkup(N,we)&&zt(W.doc,W.mapping.slice(H).map(pe),N)){var ie=null;if(N.schema.linebreakReplacement){var J=N.whitespace=="pre",ve=!!N.contentMatch.matchType(N.schema.linebreakReplacement);J&&!ve?ie=!1:!J&&ve&&(ie=!0)}ie===!1&&ct(W,K,pe,H),Yt(W,W.mapping.slice(H).map(pe,1),N,void 0,ie===null);var be=W.mapping.slice(H),Ie=be.map(pe,1),et=be.map(pe+K.nodeSize,1);return W.step(new Mt(Ie,et,Ie+1,et-1,new _.Slice(_.Fragment.from(N.create(we,null,K.marks)),0,0),1,!0)),ie===!0&&yt(W,K,pe,H),!1}})}function yt(W,$,R,N){$.forEach(function(P,H){if(P.isText)for(var K,pe=/\r?\n|\r/g;K=pe.exec(P.text);){var we=W.mapping.slice(N).map(R+1+H+K.index);W.replaceWith(we,we+1,$.type.schema.linebreakReplacement.create())}})}function ct(W,$,R,N){$.forEach(function(P,H){if(P.type==P.type.schema.linebreakReplacement){var K=W.mapping.slice(N).map(R+1+H);W.replaceWith(K,K+1,$.type.schema.text(`
|
|
645
|
-
`))}})}function zt(W,$,R){var N=W.resolve($),P=N.index();return N.parent.canReplaceWith(P,P+1,R)}function At(W,$,R,N,P){var H=W.doc.nodeAt($);if(!H)throw new RangeError("No node at given position");R||(R=H.type);var K=R.create(N,null,P||H.marks);if(H.isLeaf)return W.replaceWith($,$+H.nodeSize,K);if(!R.validContent(H.content))throw new RangeError("Invalid content for node type "+R.name);W.step(new Mt($,$+H.nodeSize,$+1,$+H.nodeSize-1,new _.Slice(_.Fragment.from(K),0,0),1,!0))}function Xt(W,$){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,N=arguments.length>3?arguments[3]:void 0,P=W.resolve($),H=P.depth-R,K=N&&N[N.length-1]||P.parent;if(H<0||P.parent.type.spec.isolating||!P.parent.canReplace(P.index(),P.parent.childCount)||!K.type.validContent(P.parent.content.cutByIndex(P.index(),P.parent.childCount)))return!1;for(var pe=P.depth-1,we=R-2;pe>H;pe--,we--){var ie=P.node(pe),J=P.index(pe);if(ie.type.spec.isolating)return!1;var ve=ie.content.cutByIndex(J,ie.childCount),be=N&&N[we+1];be&&(ve=ve.replaceChild(0,be.type.create(be.attrs)));var Ie=N&&N[we]||ie;if(!ie.canReplace(J+1,ie.childCount)||!Ie.type.validContent(ve))return!1}var et=P.indexAfter(H),_e=N&&N[0];return P.node(H).canReplaceWith(et,et,_e?_e.type:P.node(H+1).type)}function Nt(W,$){for(var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,N=arguments.length>3?arguments[3]:void 0,P=W.doc.resolve($),H=_.Fragment.empty,K=_.Fragment.empty,pe=P.depth,we=P.depth-R,ie=R-1;pe>we;pe--,ie--){H=_.Fragment.from(P.node(pe).copy(H));var J=N&&N[ie];K=_.Fragment.from(J?J.type.create(J.attrs,K):P.node(pe).copy(K))}W.step(new ft($,$,new _.Slice(H.append(K),R,R),!0))}function ar(W,$){var R=W.resolve($),N=R.index();return nn(R.nodeBefore,R.nodeAfter)&&R.parent.canReplace(N,N+1)}function En(W,$){$.content.size||W.type.compatibleContent($.type);for(var R=W.contentMatchAt(W.childCount),N=W.type.schema.linebreakReplacement,P=0;P<$.childCount;P++){var H=$.child(P),K=H.type==N?W.type.schema.nodes.text:H.type;if(R=R.matchType(K),!R||!W.type.allowsMarks(H.marks))return!1}return R.validEnd}function nn(W,$){return!!(W&&$&&!W.isLeaf&&En(W,$))}function hr(W,$){for(var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,N=W.resolve($),P=N.depth;;P--){var H=void 0,K=void 0,pe=N.index(P);if(P==N.depth?(H=N.nodeBefore,K=N.nodeAfter):R>0?(H=N.node(P+1),pe++,K=N.node(P).maybeChild(pe)):(H=N.node(P).maybeChild(pe-1),K=N.node(P+1)),H&&!H.isTextblock&&nn(H,K)&&N.node(P).canReplace(pe,pe+1))return $;if(P==0)break;$=R<0?N.before(P):N.after(P)}}function ze(W,$,R){var N=null,P=W.doc.type.schema.linebreakReplacement,H=W.doc.resolve($-R),K=H.node().type;if(P&&K.inlineContent){var pe=K.whitespace=="pre",we=!!K.contentMatch.matchType(P);pe&&!we?N=!1:!pe&&we&&(N=!0)}var ie=W.steps.length;if(N===!1){var J=W.doc.resolve($+R);ct(W,J.node(),J.before(),ie)}K.inlineContent&&Yt(W,$+R-1,K,H.node().contentMatchAt(H.index()),N==null);var ve=W.mapping.slice(ie),be=ve.map($-R);if(W.step(new ft(be,ve.map($+R,-1),_.Slice.empty,!0)),N===!0){var Ie=W.doc.resolve(be);yt(W,Ie.node(),Ie.before(),W.steps.length)}return W}function Ue(W,$,R){var N=W.resolve($);if(N.parent.canReplaceWith(N.index(),N.index(),R))return $;if(N.parentOffset==0)for(var P=N.depth-1;P>=0;P--){var H=N.index(P);if(N.node(P).canReplaceWith(H,H,R))return N.before(P+1);if(H>0)return null}if(N.parentOffset==N.parent.content.size)for(var K=N.depth-1;K>=0;K--){var pe=N.indexAfter(K);if(N.node(K).canReplaceWith(pe,pe,R))return N.after(K+1);if(pe<N.node(K).childCount)return null}return null}function lt(W,$,R){var N=W.resolve($);if(!R.content.size)return $;for(var P=R.content,H=0;H<R.openStart;H++)P=P.firstChild.content;for(var K=1;K<=(R.openStart==0&&R.size?2:1);K++)for(var pe=N.depth;pe>=0;pe--){var we=pe==N.depth?0:N.pos<=(N.start(pe+1)+N.end(pe+1))/2?-1:1,ie=N.index(pe)+(we>0?1:0),J=N.node(pe),ve=!1;if(K==1)ve=J.canReplace(ie,ie,P);else{var be=J.contentMatchAt(ie).findWrapping(P.firstChild.type);ve=be&&J.canReplaceWith(ie,ie,be[0])}if(ve)return we==0?N.pos:we<0?N.before(pe+1):N.after(pe+1)}return null}function dt(W,$){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$,N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:_.Slice.empty;if($==R&&!N.size)return null;var P=W.resolve($),H=W.resolve(R);return Ot(P,H,N)?new ft($,R,N):new gr(P,H,N).fit()}function Ot(W,$,R){return!R.openStart&&!R.openEnd&&W.start()==$.start()&&W.parent.canReplace(W.index(),$.index(),R.content)}var gr=(function(){function W($,R,N){T(this,W),this.$from=$,this.$to=R,this.unplaced=N,this.frontier=[],this.placed=_.Fragment.empty;for(var P=0;P<=$.depth;P++){var H=$.node(P);this.frontier.push({type:H.type,match:H.contentMatchAt($.indexAfter(P))})}for(var K=$.depth;K>0;K--)this.placed=_.Fragment.from($.node(K).copy(this.placed))}return E(W,[{key:"depth",get:function(){return this.frontier.length-1}},{key:"fit",value:function(){for(;this.unplaced.size;){var R=this.findFittable();R?this.placeNodes(R):this.openMore()||this.dropNode()}var N=this.mustMoveInline(),P=this.placed.size-this.depth-this.$from.depth,H=this.$from,K=this.close(N<0?this.$to:H.doc.resolve(N));if(!K)return null;for(var pe=this.placed,we=H.depth,ie=K.depth;we&&ie&&pe.childCount==1;)pe=pe.firstChild.content,we--,ie--;var J=new _.Slice(pe,we,ie);return N>-1?new Mt(H.pos,N,this.$to.pos,this.$to.end(),J,P):J.size||H.pos!=this.$to.pos?new ft(H.pos,K.pos,J):null}},{key:"findFittable",value:function(){for(var R=this.unplaced.openStart,N=this.unplaced.content,P=0,H=this.unplaced.openEnd;P<R;P++){var K=N.firstChild;if(N.childCount>1&&(H=0),K.type.spec.isolating&&H<=P){R=P;break}N=K.content}for(var pe=1;pe<=2;pe++)for(var we=pe==1?R:this.unplaced.openStart;we>=0;we--){var ie=void 0,J=null;we?(J=Lr(this.unplaced.content,we-1).firstChild,ie=J.content):ie=this.unplaced.content;for(var ve=ie.firstChild,be=this.depth;be>=0;be--){var Ie=this.frontier[be],et=Ie.type,_e=Ie.match,at=void 0,I=null;if(pe==1&&(ve?_e.matchType(ve.type)||(I=_e.fillBefore(_.Fragment.from(ve),!1)):J&&et.compatibleContent(J.type)))return{sliceDepth:we,frontierDepth:be,parent:J,inject:I};if(pe==2&&ve&&(at=_e.findWrapping(ve.type)))return{sliceDepth:we,frontierDepth:be,parent:J,wrap:at};if(J&&_e.matchType(J.type))break}}}},{key:"openMore",value:function(){var R=this.unplaced,N=R.content,P=R.openStart,H=R.openEnd,K=Lr(N,P);return!K.childCount||K.firstChild.isLeaf?!1:(this.unplaced=new _.Slice(N,P+1,Math.max(H,K.size+P>=N.size-H?P+1:0)),!0)}},{key:"dropNode",value:function(){var R=this.unplaced,N=R.content,P=R.openStart,H=R.openEnd,K=Lr(N,P);if(K.childCount<=1&&P>0){var pe=N.size-P<=P+K.size;this.unplaced=new _.Slice(Vt(N,P-1,1),P-1,pe?P-1:H)}else this.unplaced=new _.Slice(Vt(N,P,1),P,H)}},{key:"placeNodes",value:function(R){for(var N=R.sliceDepth,P=R.frontierDepth,H=R.parent,K=R.inject,pe=R.wrap;this.depth>P;)this.closeFrontierNode();if(pe)for(var we=0;we<pe.length;we++)this.openFrontierNode(pe[we]);var ie=this.unplaced,J=H?H.content:ie.content,ve=ie.openStart-N,be=0,Ie=[],et=this.frontier[P],_e=et.match,at=et.type;if(K){for(var I=0;I<K.childCount;I++)Ie.push(K.child(I));_e=_e.matchFragment(K)}for(var O=J.size+N-(ie.content.size-ie.openEnd);be<J.childCount;){var g=J.child(be),C=_e.matchType(g.type);if(!C)break;be++,(be>1||ve==0||g.content.size)&&(_e=C,Ie.push(Kr(g.mark(at.allowedMarks(g.marks)),be==1?ve:0,be==J.childCount?O:-1)))}var D=be==J.childCount;D||(O=-1),this.placed=Gt(this.placed,P,_.Fragment.from(Ie)),this.frontier[P].match=_e,D&&O<0&&H&&H.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var z=0,j=J;z<O;z++){var Y=j.lastChild;this.frontier.push({type:Y.type,match:Y.contentMatchAt(Y.childCount)}),j=Y.content}this.unplaced=D?N==0?_.Slice.empty:new _.Slice(Vt(ie.content,N-1,1),N-1,O<0?ie.openEnd:N-1):new _.Slice(Vt(ie.content,N,be),ie.openStart,ie.openEnd)}},{key:"mustMoveInline",value:function(){if(!this.$to.parent.isTextblock)return-1;var R=this.frontier[this.depth],N;if(!R.type.isTextblock||!pr(this.$to,this.$to.depth,R.type,R.match,!1)||this.$to.depth==this.depth&&(N=this.findCloseLevel(this.$to))&&N.depth==this.depth)return-1;for(var P=this.$to.depth,H=this.$to.after(P);P>1&&H==this.$to.end(--P);)++H;return H}},{key:"findCloseLevel",value:function(R){e:for(var N=Math.min(this.depth,R.depth);N>=0;N--){var P=this.frontier[N],H=P.match,K=P.type,pe=N<R.depth&&R.end(N+1)==R.pos+(R.depth-(N+1)),we=pr(R,N,K,H,pe);if(we){for(var ie=N-1;ie>=0;ie--){var J=this.frontier[ie],ve=J.match,be=J.type,Ie=pr(R,ie,be,ve,!0);if(!Ie||Ie.childCount)continue e}return{depth:N,fit:we,move:pe?R.doc.resolve(R.after(N+1)):R}}}}},{key:"close",value:function(R){var N=this.findCloseLevel(R);if(!N)return null;for(;this.depth>N.depth;)this.closeFrontierNode();N.fit.childCount&&(this.placed=Gt(this.placed,N.depth,N.fit)),R=N.move;for(var P=N.depth+1;P<=R.depth;P++){var H=R.node(P),K=H.type.contentMatch.fillBefore(H.content,!0,R.index(P));this.openFrontierNode(H.type,H.attrs,K)}return R}},{key:"openFrontierNode",value:function(R){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,P=arguments.length>2?arguments[2]:void 0,H=this.frontier[this.depth];H.match=H.match.matchType(R),this.placed=Gt(this.placed,this.depth,_.Fragment.from(R.create(N,P))),this.frontier.push({type:R,match:R.contentMatch})}},{key:"closeFrontierNode",value:function(){var R=this.frontier.pop(),N=R.match.fillBefore(_.Fragment.empty,!0);N.childCount&&(this.placed=Gt(this.placed,this.frontier.length,N))}}]),W})();function Vt(W,$,R){return $==0?W.cutByIndex(R,W.childCount):W.replaceChild(0,W.firstChild.copy(Vt(W.firstChild.content,$-1,R)))}function Gt(W,$,R){return $==0?W.append(R):W.replaceChild(W.childCount-1,W.lastChild.copy(Gt(W.lastChild.content,$-1,R)))}function Lr(W,$){for(var R=0;R<$;R++)W=W.firstChild.content;return W}function Kr(W,$,R){if($<=0)return W;var N=W.content;return $>1&&(N=N.replaceChild(0,Kr(N.firstChild,$-1,N.childCount==1?R-1:0))),$>0&&(N=W.type.contentMatch.fillBefore(N).append(N),R<=0&&(N=N.append(W.type.contentMatch.matchFragment(N).fillBefore(_.Fragment.empty,!0)))),W.copy(N)}function pr(W,$,R,N,P){var H=W.node($),K=P?W.indexAfter($):W.index($);if(K==H.childCount&&!R.compatibleContent(H.type))return null;var pe=N.fillBefore(H.content,!0,K);return pe&&!Vr(R,H.content,K)?pe:null}function Vr(W,$,R){for(var N=R;N<$.childCount;N++)if(!W.allowsMarks($.child(N).marks))return!0;return!1}function Mn(W){return W.spec.defining||W.spec.definingForContent}function gn(W,$,R,N){if(!N.size)return W.deleteRange($,R);var P=W.doc.resolve($),H=W.doc.resolve(R);if(Ot(P,H,N))return W.step(new ft($,R,N));var K=or(P,H);K[K.length-1]==0&&K.pop();var pe=-(P.depth+1);K.unshift(pe);for(var we=P.depth,ie=P.pos-1;we>0;we--,ie--){var J=P.node(we).type.spec;if(J.defining||J.definingAsContext||J.isolating)break;K.indexOf(we)>-1?pe=we:P.before(we)==ie&&K.splice(1,0,-we)}for(var ve=K.indexOf(pe),be=[],Ie=N.openStart,et=N.content,_e=0;;_e++){var at=et.firstChild;if(be.push(at),_e==N.openStart)break;et=at.content}for(var I=Ie-1;I>=0;I--){var O=be[I],g=Mn(O.type);if(g&&!O.sameMarkup(P.node(Math.abs(pe)-1)))Ie=I;else if(g||!O.type.isTextblock)break}for(var C=N.openStart;C>=0;C--){var D=(C+Ie+1)%(N.openStart+1),z=be[D];if(z)for(var j=0;j<K.length;j++){var Y=K[(j+ve)%K.length],ce=!0;Y<0&&(ce=!1,Y=-Y);var me=P.node(Y-1),Ne=P.index(Y-1);if(me.canReplaceWith(Ne,Ne,z.type,z.marks))return W.replace(P.before(Y),ce?H.after(Y):R,new _.Slice(Jr(N.content,0,N.openStart,D),D,N.openEnd))}}for(var Ae=W.steps.length,Pe=K.length-1;Pe>=0&&(W.replace($,R,N),!(W.steps.length>Ae));Pe--){var Ke=K[Pe];Ke<0||($=P.before(Ke),R=H.after(Ke))}}function Jr(W,$,R,N,P){if($<R){var H=W.firstChild;W=W.replaceChild(0,H.copy(Jr(H.content,$+1,R,N,H)))}if($>N){var K=P.contentMatchAt(0),pe=K.fillBefore(W).append(W);W=pe.append(K.matchFragment(pe).fillBefore(_.Fragment.empty,!0))}return W}function Yr(W,$,R,N){if(!N.isInline&&$==R&&W.doc.resolve($).parent.content.size){var P=Ue(W.doc,$,N.type);P!=null&&($=R=P)}W.replaceRange($,R,new _.Slice(_.Fragment.from(N),0,0))}function Xr(W,$,R){var N=W.doc.resolve($),P=W.doc.resolve(R);if(N.parent.isTextblock&&P.parent.isTextblock&&N.start()!=P.start()&&N.parentOffset==0&&P.parentOffset==0){for(var H=N.sharedDepth(R),K=!1,pe=N.depth;pe>H;pe--)N.node(pe).type.spec.isolating&&(K=!0);for(var we=P.depth;we>H;we--)P.node(we).type.spec.isolating&&(K=!0);if(!K){for(var ie=N.depth;ie>0&&$==N.start(ie);ie--)$=N.before(ie);for(var J=P.depth;J>0&&R==P.start(J);J--)R=P.before(J);N=W.doc.resolve($),P=W.doc.resolve(R)}}for(var ve=or(N,P),be=0;be<ve.length;be++){var Ie=ve[be],et=be==ve.length-1;if(et&&Ie==0||N.node(Ie).type.contentMatch.validEnd)return W.delete(N.start(Ie),P.end(Ie));if(Ie>0&&(et||N.node(Ie-1).canReplace(N.index(Ie-1),P.indexAfter(Ie-1))))return W.delete(N.before(Ie),P.after(Ie))}for(var _e=1;_e<=N.depth&&_e<=P.depth;_e++)if($-N.start(_e)==N.depth-_e&&R>N.end(_e)&&P.end(_e)-R!=P.depth-_e&&N.start(_e-1)==P.start(_e-1)&&N.node(_e-1).canReplace(N.index(_e-1),P.index(_e-1)))return W.delete(N.before(_e),R);W.delete($,R)}function or(W,$){for(var R=[],N=Math.min(W.depth,$.depth),P=N;P>=0;P--){var H=W.start(P);if(H<W.pos-(W.depth-P)||$.end(P)>$.pos+($.depth-P)||W.node(P).type.spec.isolating||$.node(P).type.spec.isolating)break;(H==$.start(P)||P==W.depth&&P==$.depth&&W.parent.inlineContent&&$.parent.inlineContent&&P&&$.start(P-1)==H-1)&&R.push(P)}return R}var an=(function(W){i(R,W);var $=o(R);function R(N,P,H){var K;return T(this,R),K=$.call(this),K.pos=N,K.attr=P,K.value=H,K}return E(R,[{key:"apply",value:function(P){var H=P.nodeAt(this.pos);if(!H)return rt.fail("No node at attribute step's position");var K=Object.create(null);for(var pe in H.attrs)K[pe]=H.attrs[pe];K[this.attr]=this.value;var we=H.type.create(K,null,H.marks);return rt.fromReplace(P,this.pos,this.pos+1,new _.Slice(_.Fragment.from(we),0,H.isLeaf?0:1))}},{key:"getMap",value:function(){return Je.empty}},{key:"invert",value:function(P){return new R(this.pos,this.attr,P.nodeAt(this.pos).attrs[this.attr])}},{key:"map",value:function(P){var H=P.mapResult(this.pos,1);return H.deletedAfter?null:new R(H.pos,this.attr,this.value)}},{key:"toJSON",value:function(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}}],[{key:"fromJSON",value:function(P,H){if(typeof H.pos!="number"||typeof H.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new R(H.pos,H.attr,H.value)}}]),R})(pt);pt.jsonID("attr",an);var Kt=(function(W){i(R,W);var $=o(R);function R(N,P){var H;return T(this,R),H=$.call(this),H.attr=N,H.value=P,H}return E(R,[{key:"apply",value:function(P){var H=Object.create(null);for(var K in P.attrs)H[K]=P.attrs[K];H[this.attr]=this.value;var pe=P.type.create(H,P.content,P.marks);return rt.ok(pe)}},{key:"getMap",value:function(){return Je.empty}},{key:"invert",value:function(P){return new R(this.attr,P.attrs[this.attr])}},{key:"map",value:function(P){return this}},{key:"toJSON",value:function(){return{stepType:"docAttr",attr:this.attr,value:this.value}}}],[{key:"fromJSON",value:function(P,H){if(typeof H.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new R(H.attr,H.value)}}]),R})(pt);pt.jsonID("docAttr",Kt),r.TransformError=(function(W){i(R,W);var $=o(R);function R(){return T(this,R),$.apply(this,arguments)}return E(R)})(e(Error)),r.TransformError=function W($){var R=Error.call(this,$);return R.__proto__=W.prototype,R},r.TransformError.prototype=Object.create(Error.prototype),r.TransformError.prototype.constructor=r.TransformError,r.TransformError.prototype.name="TransformError";var yr=(function(){function W($){T(this,W),this.doc=$,this.steps=[],this.docs=[],this.mapping=new wt}return E(W,[{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}},{key:"step",value:function(R){var N=this.maybeStep(R);if(N.failed)throw new r.TransformError(N.failed);return this}},{key:"maybeStep",value:function(R){var N=R.apply(this.doc);return N.failed||this.addStep(R,N.doc),N}},{key:"docChanged",get:function(){return this.steps.length>0}},{key:"changedRange",value:function(){for(var R=1e9,N=-1e9,P=0;P<this.mapping.maps.length;P++){var H=this.mapping.maps[P];P&&(R=H.map(R,1),N=H.map(N,-1)),H.forEach(function(K,pe,we,ie){R=Math.min(R,we),N=Math.max(N,ie)})}return R==1e9?null:{from:R,to:N}}},{key:"addStep",value:function(R,N){this.docs.push(this.doc),this.steps.push(R),this.mapping.appendMap(R.getMap()),this.doc=N}},{key:"replace",value:function(R){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_.Slice.empty,H=dt(this.doc,R,N,P);return H&&this.step(H),this}},{key:"replaceWith",value:function(R,N,P){return this.replace(R,N,new _.Slice(_.Fragment.from(P),0,0))}},{key:"delete",value:function(R,N){return this.replace(R,N,_.Slice.empty)}},{key:"insert",value:function(R,N){return this.replaceWith(R,R,N)}},{key:"replaceRange",value:function(R,N,P){return gn(this,R,N,P),this}},{key:"replaceRangeWith",value:function(R,N,P){return Yr(this,R,N,P),this}},{key:"deleteRange",value:function(R,N){return Xr(this,R,N),this}},{key:"lift",value:function(R,N){return ne(this,R,N),this}},{key:"join",value:function(R){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return ze(this,R,N),this}},{key:"wrap",value:function(R,N){return He(this,R,N),this}},{key:"setBlockType",value:function(R){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,P=arguments.length>2?arguments[2]:void 0,H=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return nt(this,R,N,P,H),this}},{key:"setNodeMarkup",value:function(R,N){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,H=arguments.length>3?arguments[3]:void 0;return At(this,R,N,P,H),this}},{key:"setNodeAttribute",value:function(R,N,P){return this.step(new an(R,N,P)),this}},{key:"setDocAttribute",value:function(R,N){return this.step(new Kt(R,N)),this}},{key:"addNodeMark",value:function(R,N){return this.step(new Qe(R,N)),this}},{key:"removeNodeMark",value:function(R,N){var P=this.doc.nodeAt(R);if(!P)throw new RangeError("No node at position "+R);if(N instanceof _.Mark)N.isInSet(P.marks)&&this.step(new Ct(R,N));else{for(var H=P.marks,K,pe=[];K=N.isInSet(H);)pe.push(new Ct(R,K)),H=K.removeFromSet(H);for(var we=pe.length-1;we>=0;we--)this.step(pe[we])}return this}},{key:"split",value:function(R){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,P=arguments.length>2?arguments[2]:void 0;return Nt(this,R,N,P),this}},{key:"addMark",value:function(R,N,P){return jt(this,R,N,P),this}},{key:"removeMark",value:function(R,N,P){return Ut(this,R,N,P),this}},{key:"clearIncompatible",value:function(R,N,P){return Yt(this,R,N,P),this}}]),W})();r.AddMarkStep=Bt,r.AddNodeMarkStep=Qe,r.AttrStep=an,r.DocAttrStep=Kt,r.MapResult=ut,r.Mapping=wt,r.RemoveMarkStep=$t,r.RemoveNodeMarkStep=Ct,r.ReplaceAroundStep=Mt,r.ReplaceStep=ft,r.Step=pt,r.StepMap=Je,r.StepResult=rt,r.Transform=yr,r.canJoin=ar,r.canSplit=Xt,r.dropPoint=lt,r.findWrapping=oe,r.insertPoint=Ue,r.joinPoint=hr,r.liftTarget=he,r.replaceStep=dt})(vd)),vd}var zy;function rc(){if(zy)return Kn;zy=1;function r(){return typeof Reflect<"u"&&Reflect.get?r=Reflect.get.bind():r=function(he,ne,oe){var Q=e(he,ne);if(Q){var ke=Object.getOwnPropertyDescriptor(Q,ne);return ke.get?ke.get.call(arguments.length<3?he:oe):ke.value}},r.apply(this,arguments)}function e(ye,he){for(;!Object.prototype.hasOwnProperty.call(ye,he)&&(ye=l(ye),ye!==null););return ye}function t(ye,he){if(typeof he!="function"&&he!==null)throw new TypeError("Super expression must either be null or a function");ye.prototype=Object.create(he&&he.prototype,{constructor:{value:ye,writable:!0,configurable:!0}}),Object.defineProperty(ye,"prototype",{writable:!1}),he&&n(ye,he)}function n(ye,he){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(oe,Q){return oe.__proto__=Q,oe},n(ye,he)}function i(ye){var he=s();return function(){var oe=l(ye),Q;if(he){var ke=l(this).constructor;Q=Reflect.construct(oe,arguments,ke)}else Q=oe.apply(this,arguments);return a(this,Q)}}function a(ye,he){if(he&&(f(he)==="object"||typeof he=="function"))return he;if(he!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o(ye)}function o(ye){if(ye===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ye}function s(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function l(ye){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ne){return ne.__proto__||Object.getPrototypeOf(ne)},l(ye)}function f(ye){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(he){return typeof he}:function(he){return he&&typeof Symbol=="function"&&he.constructor===Symbol&&he!==Symbol.prototype?"symbol":typeof he},f(ye)}function p(ye,he){if(!(ye instanceof he))throw new TypeError("Cannot call a class as a function")}function b(ye,he){for(var ne=0;ne<he.length;ne++){var oe=he[ne];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(ye,x(oe.key),oe)}}function T(ye,he,ne){return he&&b(ye.prototype,he),ne&&b(ye,ne),Object.defineProperty(ye,"prototype",{writable:!1}),ye}function x(ye){var he=E(ye,"string");return f(he)==="symbol"?he:String(he)}function E(ye,he){if(f(ye)!=="object"||ye===null)return ye;var ne=ye[Symbol.toPrimitive];if(ne!==void 0){var oe=ne.call(ye,he);if(f(oe)!=="object")return oe;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ye)}var B=tc(),F=ep(),_=Object.create(null),X=(function(){function ye(he,ne,oe){p(this,ye),this.$anchor=he,this.$head=ne,this.ranges=oe||[new ee(he.min(ne),he.max(ne))]}return T(ye,[{key:"anchor",get:function(){return this.$anchor.pos}},{key:"head",get:function(){return this.$head.pos}},{key:"from",get:function(){return this.$from.pos}},{key:"to",get:function(){return this.$to.pos}},{key:"$from",get:function(){return this.ranges[0].$from}},{key:"$to",get:function(){return this.ranges[0].$to}},{key:"empty",get:function(){for(var ne=this.ranges,oe=0;oe<ne.length;oe++)if(ne[oe].$from.pos!=ne[oe].$to.pos)return!1;return!0}},{key:"content",value:function(){return this.$from.doc.slice(this.from,this.to,!0)}},{key:"replace",value:function(ne){for(var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:B.Slice.empty,Q=oe.content.lastChild,ke=null,Ee=0;Ee<oe.openEnd;Ee++)ke=Q,Q=Q.lastChild;for(var He=ne.steps.length,nt=this.ranges,yt=0;yt<nt.length;yt++){var ct=nt[yt],zt=ct.$from,At=ct.$to,Xt=ne.mapping.slice(He);ne.replaceRange(Xt.map(zt.pos),Xt.map(At.pos),yt?B.Slice.empty:oe),yt==0&&wt(ne,He,(Q?Q.isInline:ke&&ke.isTextblock)?-1:1)}}},{key:"replaceWith",value:function(ne,oe){for(var Q=ne.steps.length,ke=this.ranges,Ee=0;Ee<ke.length;Ee++){var He=ke[Ee],nt=He.$from,yt=He.$to,ct=ne.mapping.slice(Q),zt=ct.map(nt.pos),At=ct.map(yt.pos);Ee?ne.deleteRange(zt,At):(ne.replaceRangeWith(zt,At,oe),wt(ne,Q,oe.isInline?-1:1))}}},{key:"getBookmark",value:function(){return ae.between(this.$anchor,this.$head).getBookmark()}}],[{key:"findFrom",value:function(ne,oe){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ke=ne.parent.inlineContent?new ae(ne):Je(ne.node(0),ne.parent,ne.pos,ne.index(),oe,Q);if(ke)return ke;for(var Ee=ne.depth-1;Ee>=0;Ee--){var He=oe<0?Je(ne.node(0),ne.node(Ee),ne.before(Ee+1),ne.index(Ee),oe,Q):Je(ne.node(0),ne.node(Ee),ne.after(Ee+1),ne.index(Ee)+1,oe,Q);if(He)return He}return null}},{key:"near",value:function(ne){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this.findFrom(ne,oe)||this.findFrom(ne,-oe)||new Le(ne.node(0))}},{key:"atStart",value:function(ne){return Je(ne,ne,0,0,1)||new Le(ne)}},{key:"atEnd",value:function(ne){return Je(ne,ne,ne.content.size,ne.childCount,-1)||new Le(ne)}},{key:"fromJSON",value:function(ne,oe){if(!oe||!oe.type)throw new RangeError("Invalid input for Selection.fromJSON");var Q=_[oe.type];if(!Q)throw new RangeError("No selection type ".concat(oe.type," defined"));return Q.fromJSON(ne,oe)}},{key:"jsonID",value:function(ne,oe){if(ne in _)throw new RangeError("Duplicate use of selection JSON ID "+ne);return _[ne]=oe,oe.prototype.jsonID=ne,oe}}]),ye})();X.prototype.visible=!0;var ee=T(function ye(he,ne){p(this,ye),this.$from=he,this.$to=ne}),se=!1;function de(ye){!se&&!ye.parent.inlineContent&&(se=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+ye.parent.type.name+")"))}var ae=(function(ye){t(ne,ye);var he=i(ne);function ne(oe){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oe;return p(this,ne),de(oe),de(Q),he.call(this,oe,Q)}return T(ne,[{key:"$cursor",get:function(){return this.$anchor.pos==this.$head.pos?this.$head:null}},{key:"map",value:function(Q,ke){var Ee=Q.resolve(ke.map(this.head));if(!Ee.parent.inlineContent)return X.near(Ee);var He=Q.resolve(ke.map(this.anchor));return new ne(He.parent.inlineContent?He:Ee,Ee)}},{key:"replace",value:function(Q){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:B.Slice.empty;if(r(l(ne.prototype),"replace",this).call(this,Q,ke),ke==B.Slice.empty){var Ee=this.$from.marksAcross(this.$to);Ee&&Q.ensureMarks(Ee)}}},{key:"eq",value:function(Q){return Q instanceof ne&&Q.anchor==this.anchor&&Q.head==this.head}},{key:"getBookmark",value:function(){return new le(this.anchor,this.head)}},{key:"toJSON",value:function(){return{type:"text",anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(Q,ke){if(typeof ke.anchor!="number"||typeof ke.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ne(Q.resolve(ke.anchor),Q.resolve(ke.head))}},{key:"create",value:function(Q,ke){var Ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ke,He=Q.resolve(ke);return new this(He,Ee==ke?He:Q.resolve(Ee))}},{key:"between",value:function(Q,ke,Ee){var He=Q.pos-ke.pos;if((!Ee||He)&&(Ee=He>=0?1:-1),!ke.parent.inlineContent){var nt=X.findFrom(ke,Ee,!0)||X.findFrom(ke,-Ee,!0);if(nt)ke=nt.$head;else return X.near(ke,Ee)}return Q.parent.inlineContent||(He==0?Q=ke:(Q=(X.findFrom(Q,-Ee,!0)||X.findFrom(Q,Ee,!0)).$anchor,Q.pos<ke.pos!=He<0&&(Q=ke))),new ne(Q,ke)}}]),ne})(X);X.jsonID("text",ae);var le=(function(){function ye(he,ne){p(this,ye),this.anchor=he,this.head=ne}return T(ye,[{key:"map",value:function(ne){return new ye(ne.map(this.anchor),ne.map(this.head))}},{key:"resolve",value:function(ne){return ae.between(ne.resolve(this.anchor),ne.resolve(this.head))}}]),ye})(),Te=(function(ye){t(ne,ye);var he=i(ne);function ne(oe){var Q;p(this,ne);var ke=oe.nodeAfter,Ee=oe.node(0).resolve(oe.pos+ke.nodeSize);return Q=he.call(this,oe,Ee),Q.node=ke,Q}return T(ne,[{key:"map",value:function(Q,ke){var Ee=ke.mapResult(this.anchor),He=Ee.deleted,nt=Ee.pos,yt=Q.resolve(nt);return He?X.near(yt):new ne(yt)}},{key:"content",value:function(){return new B.Slice(B.Fragment.from(this.node),0,0)}},{key:"eq",value:function(Q){return Q instanceof ne&&Q.anchor==this.anchor}},{key:"toJSON",value:function(){return{type:"node",anchor:this.anchor}}},{key:"getBookmark",value:function(){return new xe(this.anchor)}}],[{key:"fromJSON",value:function(Q,ke){if(typeof ke.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ne(Q.resolve(ke.anchor))}},{key:"create",value:function(Q,ke){return new ne(Q.resolve(ke))}},{key:"isSelectable",value:function(Q){return!Q.isText&&Q.type.spec.selectable!==!1}}]),ne})(X);Te.prototype.visible=!1,X.jsonID("node",Te);var xe=(function(){function ye(he){p(this,ye),this.anchor=he}return T(ye,[{key:"map",value:function(ne){var oe=ne.mapResult(this.anchor),Q=oe.deleted,ke=oe.pos;return Q?new le(ke,ke):new ye(ke)}},{key:"resolve",value:function(ne){var oe=ne.resolve(this.anchor),Q=oe.nodeAfter;return Q&&Te.isSelectable(Q)?new Te(oe):X.near(oe)}}]),ye})(),Le=(function(ye){t(ne,ye);var he=i(ne);function ne(oe){return p(this,ne),he.call(this,oe.resolve(0),oe.resolve(oe.content.size))}return T(ne,[{key:"replace",value:function(Q){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:B.Slice.empty;if(ke==B.Slice.empty){Q.delete(0,Q.doc.content.size);var Ee=X.atStart(Q.doc);Ee.eq(Q.selection)||Q.setSelection(Ee)}else r(l(ne.prototype),"replace",this).call(this,Q,ke)}},{key:"toJSON",value:function(){return{type:"all"}}},{key:"map",value:function(Q){return new ne(Q)}},{key:"eq",value:function(Q){return Q instanceof ne}},{key:"getBookmark",value:function(){return ut}}],[{key:"fromJSON",value:function(Q){return new ne(Q)}}]),ne})(X);X.jsonID("all",Le);var ut={map:function(){return this},resolve:function(he){return new Le(he)}};function Je(ye,he,ne,oe,Q){var ke=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1;if(he.inlineContent)return ae.create(ye,ne);for(var Ee=oe-(Q>0?0:1);Q>0?Ee<he.childCount:Ee>=0;Ee+=Q){var He=he.child(Ee);if(He.isAtom){if(!ke&&Te.isSelectable(He))return Te.create(ye,ne-(Q<0?He.nodeSize:0))}else{var nt=Je(ye,He,ne+Q,Q<0?He.childCount:0,Q,ke);if(nt)return nt}ne+=He.nodeSize*Q}return null}function wt(ye,he,ne){var oe=ye.steps.length-1;if(!(oe<he)){var Q=ye.steps[oe];if(Q instanceof F.ReplaceStep||Q instanceof F.ReplaceAroundStep){var ke=ye.mapping.maps[oe],Ee;ke.forEach(function(He,nt,yt,ct){Ee==null&&(Ee=ct)}),ye.setSelection(X.near(ye.doc.resolve(Ee),ne))}}}var Ye=1,pt=2,rt=4,Et=(function(ye){t(ne,ye);var he=i(ne);function ne(oe){var Q;return p(this,ne),Q=he.call(this,oe.doc),Q.curSelectionFor=0,Q.updated=0,Q.meta=Object.create(null),Q.time=Date.now(),Q.curSelection=oe.selection,Q.storedMarks=oe.storedMarks,Q}return T(ne,[{key:"selection",get:function(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}},{key:"setSelection",value:function(Q){if(Q.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=Q,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Ye)&~pt,this.storedMarks=null,this}},{key:"selectionSet",get:function(){return(this.updated&Ye)>0}},{key:"setStoredMarks",value:function(Q){return this.storedMarks=Q,this.updated|=pt,this}},{key:"ensureMarks",value:function(Q){return B.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),Q)||this.setStoredMarks(Q),this}},{key:"addStoredMark",value:function(Q){return this.ensureMarks(Q.addToSet(this.storedMarks||this.selection.$head.marks()))}},{key:"removeStoredMark",value:function(Q){return this.ensureMarks(Q.removeFromSet(this.storedMarks||this.selection.$head.marks()))}},{key:"storedMarksSet",get:function(){return(this.updated&pt)>0}},{key:"addStep",value:function(Q,ke){r(l(ne.prototype),"addStep",this).call(this,Q,ke),this.updated=this.updated&~pt,this.storedMarks=null}},{key:"setTime",value:function(Q){return this.time=Q,this}},{key:"replaceSelection",value:function(Q){return this.selection.replace(this,Q),this}},{key:"replaceSelectionWith",value:function(Q){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Ee=this.selection;return ke&&(Q=Q.mark(this.storedMarks||(Ee.empty?Ee.$from.marks():Ee.$from.marksAcross(Ee.$to)||B.Mark.none))),Ee.replaceWith(this,Q),this}},{key:"deleteSelection",value:function(){return this.selection.replace(this),this}},{key:"insertText",value:function(Q,ke,Ee){var He=this.doc.type.schema;if(ke==null)return Q?this.replaceSelectionWith(He.text(Q),!0):this.deleteSelection();if(Ee==null&&(Ee=ke),!Q)return this.deleteRange(ke,Ee);var nt=this.storedMarks;if(!nt){var yt=this.doc.resolve(ke);nt=Ee==ke?yt.marks():yt.marksAcross(this.doc.resolve(Ee))}return this.replaceRangeWith(ke,Ee,He.text(Q,nt)),!this.selection.empty&&this.selection.to==ke+Q.length&&this.setSelection(X.near(this.selection.$to)),this}},{key:"setMeta",value:function(Q,ke){return this.meta[typeof Q=="string"?Q:Q.key]=ke,this}},{key:"getMeta",value:function(Q){return this.meta[typeof Q=="string"?Q:Q.key]}},{key:"isGeneric",get:function(){for(var Q in this.meta)return!1;return!0}},{key:"scrollIntoView",value:function(){return this.updated|=rt,this}},{key:"scrolledIntoView",get:function(){return(this.updated&rt)>0}}]),ne})(F.Transform);function Bt(ye,he){return!he||!ye?ye:ye.bind(he)}var $t=T(function ye(he,ne,oe){p(this,ye),this.name=he,this.init=Bt(ne.init,oe),this.apply=Bt(ne.apply,oe)}),Qe=[new $t("doc",{init:function(he){return he.doc||he.schema.topNodeType.createAndFill()},apply:function(he){return he.doc}}),new $t("selection",{init:function(he,ne){return he.selection||X.atStart(ne.doc)},apply:function(he){return he.selection}}),new $t("storedMarks",{init:function(he){return he.storedMarks||null},apply:function(he,ne,oe,Q){return Q.selection.$cursor?he.storedMarks:null}}),new $t("scrollToSelection",{init:function(){return 0},apply:function(he,ne){return he.scrolledIntoView?ne+1:ne}})],Ct=T(function ye(he,ne){var oe=this;p(this,ye),this.schema=he,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Qe.slice(),ne&&ne.forEach(function(Q){if(oe.pluginsByKey[Q.key])throw new RangeError("Adding different instances of a keyed plugin ("+Q.key+")");oe.plugins.push(Q),oe.pluginsByKey[Q.key]=Q,Q.spec.state&&oe.fields.push(new $t(Q.key,Q.spec.state,Q))})}),ft=(function(){function ye(he){p(this,ye),this.config=he}return T(ye,[{key:"schema",get:function(){return this.config.schema}},{key:"plugins",get:function(){return this.config.plugins}},{key:"apply",value:function(ne){return this.applyTransaction(ne).state}},{key:"filterTransaction",value:function(ne){for(var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,Q=0;Q<this.config.plugins.length;Q++)if(Q!=oe){var ke=this.config.plugins[Q];if(ke.spec.filterTransaction&&!ke.spec.filterTransaction.call(ke,ne,this))return!1}return!0}},{key:"applyTransaction",value:function(ne){if(!this.filterTransaction(ne))return{state:this,transactions:[]};for(var oe=[ne],Q=this.applyInner(ne),ke=null;;){for(var Ee=!1,He=0;He<this.config.plugins.length;He++){var nt=this.config.plugins[He];if(nt.spec.appendTransaction){var yt=ke?ke[He].n:0,ct=ke?ke[He].state:this,zt=yt<oe.length&&nt.spec.appendTransaction.call(nt,yt?oe.slice(yt):oe,ct,Q);if(zt&&Q.filterTransaction(zt,He)){if(zt.setMeta("appendedTransaction",ne),!ke){ke=[];for(var At=0;At<this.config.plugins.length;At++)ke.push(At<He?{state:Q,n:oe.length}:{state:this,n:0})}oe.push(zt),Q=Q.applyInner(zt),Ee=!0}ke&&(ke[He]={state:Q,n:oe.length})}}if(!Ee)return{state:Q,transactions:oe}}}},{key:"applyInner",value:function(ne){if(!ne.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var oe=new ye(this.config),Q=this.config.fields,ke=0;ke<Q.length;ke++){var Ee=Q[ke];oe[Ee.name]=Ee.apply(ne,this[Ee.name],this,oe)}return oe}},{key:"tr",get:function(){return new Et(this)}},{key:"reconfigure",value:function(ne){for(var oe=new Ct(this.schema,ne.plugins),Q=oe.fields,ke=new ye(oe),Ee=0;Ee<Q.length;Ee++){var He=Q[Ee].name;ke[He]=this.hasOwnProperty(He)?this[He]:Q[Ee].init(ne,ke)}return ke}},{key:"toJSON",value:function(ne){var oe={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(oe.storedMarks=this.storedMarks.map(function(He){return He.toJSON()})),ne&&f(ne)=="object")for(var Q in ne){if(Q=="doc"||Q=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");var ke=ne[Q],Ee=ke.spec.state;Ee&&Ee.toJSON&&(oe[Q]=Ee.toJSON.call(ke,this[ke.key]))}return oe}}],[{key:"create",value:function(ne){for(var oe=new Ct(ne.doc?ne.doc.type.schema:ne.schema,ne.plugins),Q=new ye(oe),ke=0;ke<oe.fields.length;ke++)Q[oe.fields[ke].name]=oe.fields[ke].init(ne,Q);return Q}},{key:"fromJSON",value:function(ne,oe,Q){if(!oe)throw new RangeError("Invalid input for EditorState.fromJSON");if(!ne.schema)throw new RangeError("Required config field 'schema' missing");var ke=new Ct(ne.schema,ne.plugins),Ee=new ye(ke);return ke.fields.forEach(function(He){if(He.name=="doc")Ee.doc=B.Node.fromJSON(ne.schema,oe.doc);else if(He.name=="selection")Ee.selection=X.fromJSON(Ee.doc,oe.selection);else if(He.name=="storedMarks")oe.storedMarks&&(Ee.storedMarks=oe.storedMarks.map(ne.schema.markFromJSON));else{if(Q)for(var nt in Q){var yt=Q[nt],ct=yt.spec.state;if(yt.key==He.name&&ct&&ct.fromJSON&&Object.prototype.hasOwnProperty.call(oe,nt)){Ee[He.name]=ct.fromJSON.call(yt,ne,oe[nt],Ee);return}}Ee[He.name]=He.init(ne,Ee)}}),Ee}}]),ye})();function Mt(ye,he,ne){for(var oe in ye){var Q=ye[oe];Q instanceof Function?Q=Q.bind(he):oe=="handleDOMEvents"&&(Q=Mt(Q,he,{})),ne[oe]=Q}return ne}var Tt=(function(){function ye(he){p(this,ye),this.spec=he,this.props={},he.props&&Mt(he.props,this,this.props),this.key=he.key?he.key.key:Ut("plugin")}return T(ye,[{key:"getState",value:function(ne){return ne[this.key]}}]),ye})(),jt=Object.create(null);function Ut(ye){return ye in jt?ye+"$"+ ++jt[ye]:(jt[ye]=0,ye+"$")}var Yt=(function(){function ye(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"key";p(this,ye),this.key=Ut(he)}return T(ye,[{key:"get",value:function(ne){return ne.config.pluginsByKey[this.key]}},{key:"getState",value:function(ne){return ne[this.key]}}]),ye})();return Kn.AllSelection=Le,Kn.EditorState=ft,Kn.NodeSelection=Te,Kn.Plugin=Tt,Kn.PluginKey=Yt,Kn.Selection=X,Kn.SelectionRange=ee,Kn.TextSelection=ae,Kn.Transaction=Et,Kn}var Vy;function j8e(){if(Vy)return fn;Vy=1;function r(ee,se,de){return Object.defineProperty(ee,"prototype",{writable:!1}),ee}function e(ee,se){if(!(ee instanceof se))throw new TypeError("Cannot call a class as a function")}var t=rc(),n=ep(),i=r(function ee(se,de){var ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};e(this,ee),this.match=se,this.match=se,this.handler=typeof de=="string"?a(de):de,this.undoable=ae.undoable!==!1,this.inCode=ae.inCode||!1,this.inCodeMark=ae.inCodeMark!==!1});function a(ee){return function(se,de,ae,le){var Te=ee;if(de[1]){var xe=de[0].lastIndexOf(de[1]);Te+=de[0].slice(xe+de[1].length),ae+=xe;var Le=ae-le;Le>0&&(Te=de[0].slice(xe-Le,xe)+Te,ae=le)}return se.tr.insertText(Te,ae,le)}}var o=500;function s(ee){var se=ee.rules,de=new t.Plugin({state:{init:function(){return null},apply:function(le,Te){var xe=le.getMeta(this);return xe||(le.selectionSet||le.docChanged?null:Te)}},props:{handleTextInput:function(le,Te,xe,Le){return l(le,Te,xe,Le,se,de)},handleDOMEvents:{compositionend:function(le){setTimeout(function(){var Te=le.state.selection.$cursor;Te&&l(le,Te.pos,Te.pos,"",se,de)})}}},isInputRules:!0});return de}function l(ee,se,de,ae,le,Te){if(ee.composing)return!1;for(var xe=ee.state,Le=xe.doc.resolve(se),ut=Le.parent.textBetween(Math.max(0,Le.parentOffset-o),Le.parentOffset,null,"")+ae,Je=function(){var rt=le[Ye];if(!rt.inCodeMark&&Le.marks().some(function(Ct){return Ct.type.spec.code}))return 0;if(Le.parent.type.spec.code){if(!rt.inCode)return 0}else if(rt.inCode==="only")return 0;var Et=rt.match.exec(ut);if(!Et||Et[0].length<ae.length)return 0;var Bt=se-(Et[0].length-ae.length);if(!rt.inCodeMark){var $t=!1;if(xe.doc.nodesBetween(Bt,Le.pos,function(Ct){Ct.isInline&&Ct.marks.some(function(ft){return ft.type.spec.code})&&($t=!0)}),$t)return 0}var Qe=rt.handler(xe,Et,Bt,de);return Qe?(rt.undoable&&Qe.setMeta(Te,{transform:Qe,from:se,to:de,text:ae}),ee.dispatch(Qe),{v:!0}):0},wt,Ye=0;Ye<le.length;Ye++)if(wt=Je(),wt!==0&&wt)return wt.v;return!1}var f=function(se,de){for(var ae=se.plugins,le=0;le<ae.length;le++){var Te=ae[le],xe=void 0;if(Te.spec.isInputRules&&(xe=Te.getState(se))){if(de){for(var Le=se.tr,ut=xe.transform,Je=ut.steps.length-1;Je>=0;Je--)Le.step(ut.steps[Je].invert(ut.docs[Je]));if(xe.text){var wt=Le.doc.resolve(xe.from).marks();Le.replaceWith(xe.from,xe.to,se.schema.text(xe.text,wt))}else Le.delete(xe.from,xe.to);de(Le)}return!0}}return!1},p=new i(/--$/,"—",{inCodeMark:!1}),b=new i(/\.\.\.$/,"…",{inCodeMark:!1}),T=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1}),x=new i(/"$/,"”",{inCodeMark:!1}),E=new i(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1}),B=new i(/'$/,"’",{inCodeMark:!1}),F=[T,x,E,B];function _(ee,se){var de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ae=arguments.length>3?arguments[3]:void 0;return new i(ee,function(le,Te,xe,Le){var ut=de instanceof Function?de(Te):de,Je=le.tr.delete(xe,Le),wt=Je.doc.resolve(xe),Ye=wt.blockRange(),pt=Ye&&n.findWrapping(Ye,se,ut);if(!pt)return null;Je.wrap(Ye,pt);var rt=Je.doc.resolve(xe-1).nodeBefore;return rt&&rt.type==se&&n.canJoin(Je.doc,xe-1)&&(!ae||ae(Te,rt))&&Je.join(xe-1),Je})}function X(ee,se){var de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;return new i(ee,function(ae,le,Te,xe){var Le=ae.doc.resolve(Te),ut=de instanceof Function?de(le):de;return Le.node(-1).canReplaceWith(Le.index(-1),Le.indexAfter(-1),se)?ae.tr.delete(Te,xe).setBlockType(Te,Te,se,ut):null})}return fn.InputRule=i,fn.closeDoubleQuote=x,fn.closeSingleQuote=B,fn.ellipsis=b,fn.emDash=p,fn.inputRules=s,fn.openDoubleQuote=T,fn.openSingleQuote=E,fn.smartQuotes=F,fn.textblockTypeInputRule=X,fn.undoInputRule=f,fn.wrappingInputRule=_,fn}var Yl={},xo={},Uy;function G8e(){if(Uy)return xo;Uy=1,Object.defineProperty(xo,"__esModule",{value:!0});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},e={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},t=typeof navigator<"u"&&/Mac/.test(navigator.platform),n=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),i=0;i<10;i++)r[48+i]=r[96+i]=String(i);for(var i=1;i<=24;i++)r[i+111]="F"+i;for(var i=65;i<=90;i++)r[i]=String.fromCharCode(i+32),e[i]=String.fromCharCode(i);for(var a in r)e.hasOwnProperty(a)||(e[a]=r[a]);function o(s){var l=t&&s.metaKey&&s.shiftKey&&!s.ctrlKey&&!s.altKey||n&&s.shiftKey&&s.key&&s.key.length==1||s.key=="Unidentified",f=!l&&s.key||(s.shiftKey?e:r)[s.keyCode]||s.key||"Unidentified";return f=="Esc"&&(f="Escape"),f=="Del"&&(f="Delete"),f=="Left"&&(f="ArrowLeft"),f=="Up"&&(f="ArrowUp"),f=="Right"&&(f="ArrowRight"),f=="Down"&&(f="ArrowDown"),f}return xo.base=r,xo.keyName=o,xo.shift=e,xo}var $y;function K8e(){if($y)return Yl;$y=1;var r=G8e(),e=rc(),t=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),n=typeof navigator<"u"&&/Win/.test(navigator.platform);function i(f){var p=f.split(/-(?!$)/),b=p[p.length-1];b=="Space"&&(b=" ");for(var T,x,E,B,F=0;F<p.length-1;F++){var _=p[F];if(/^(cmd|meta|m)$/i.test(_))B=!0;else if(/^a(lt)?$/i.test(_))T=!0;else if(/^(c|ctrl|control)$/i.test(_))x=!0;else if(/^s(hift)?$/i.test(_))E=!0;else if(/^mod$/i.test(_))t?B=!0:x=!0;else throw new Error("Unrecognized modifier name: "+_)}return T&&(b="Alt-"+b),x&&(b="Ctrl-"+b),B&&(b="Meta-"+b),E&&(b="Shift-"+b),b}function a(f){var p=Object.create(null);for(var b in f)p[i(b)]=f[b];return p}function o(f,p){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return p.altKey&&(f="Alt-"+f),p.ctrlKey&&(f="Ctrl-"+f),p.metaKey&&(f="Meta-"+f),b&&p.shiftKey&&(f="Shift-"+f),f}function s(f){return new e.Plugin({props:{handleKeyDown:l(f)}})}function l(f){var p=a(f);return function(b,T){var x=r.keyName(T),E,B=p[o(x,T)];if(B&&B(b.state,b.dispatch,b))return!0;if(x.length==1&&x!=" "){if(T.shiftKey){var F=p[o(x,T,!1)];if(F&&F(b.state,b.dispatch,b))return!0}if((T.altKey||T.metaKey||T.ctrlKey)&&!(n&&T.ctrlKey&&T.altKey)&&(E=r.base[T.keyCode])&&E!=x){var _=p[o(E,T)];if(_&&_(b.state,b.dispatch,b))return!0}}return!1}}return Yl.keydownHandler=l,Yl.keymap=s,Yl}var Fa={},Wy;function J8e(){if(Wy)return Fa;Wy=1;function r(u,m){return n(u)||t(u,m)||a(u,m)||e()}function e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
646
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t(u,m){var c=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(c!=null){var v,k,w,A,M=[],q=!0,V=!1;try{if(w=(c=c.call(u)).next,m!==0)for(;!(q=(v=w.call(c)).done)&&(M.push(v.value),M.length!==m);q=!0);}catch(Z){V=!0,k=Z}finally{try{if(!q&&c.return!=null&&(A=c.return(),Object(A)!==A))return}finally{if(V)throw k}}return M}}function n(u){if(Array.isArray(u))return u}function i(u,m){var c=typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(!c){if(Array.isArray(u)||(c=a(u))||m){c&&(u=c);var v=0,k=function(){};return{s:k,n:function(){return v>=u.length?{done:!0}:{done:!1,value:u[v++]}},e:function(V){throw V},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
647
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var w=!0,A=!1,M;return{s:function(){c=c.call(u)},n:function(){var V=c.next();return w=V.done,V},e:function(V){A=!0,M=V},f:function(){try{!w&&c.return!=null&&c.return()}finally{if(A)throw M}}}}function a(u,m){if(u){if(typeof u=="string")return o(u,m);var c=Object.prototype.toString.call(u).slice(8,-1);if(c==="Object"&&u.constructor&&(c=u.constructor.name),c==="Map"||c==="Set")return Array.from(u);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return o(u,m)}}function o(u,m){(m==null||m>u.length)&&(m=u.length);for(var c=0,v=new Array(m);c<m;c++)v[c]=u[c];return v}function s(){return typeof Reflect<"u"&&Reflect.get?s=Reflect.get.bind():s=function(m,c,v){var k=l(m,c);if(k){var w=Object.getOwnPropertyDescriptor(k,c);return w.get?w.get.call(arguments.length<3?m:v):w.value}},s.apply(this,arguments)}function l(u,m){for(;!Object.prototype.hasOwnProperty.call(u,m)&&(u=B(u),u!==null););return u}function f(u,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(m&&m.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),m&&p(u,m)}function p(u,m){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(v,k){return v.__proto__=k,v},p(u,m)}function b(u){var m=E();return function(){var v=B(u),k;if(m){var w=B(this).constructor;k=Reflect.construct(v,arguments,w)}else k=v.apply(this,arguments);return T(this,k)}}function T(u,m){if(m&&(F(m)==="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x(u)}function x(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function E(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(u){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c)},B(u)}function F(u){"@babel/helpers - typeof";return F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},F(u)}function _(u,m){if(!(u instanceof m))throw new TypeError("Cannot call a class as a function")}function X(u,m){for(var c=0;c<m.length;c++){var v=m[c];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(u,se(v.key),v)}}function ee(u,m,c){return m&&X(u.prototype,m),c&&X(u,c),Object.defineProperty(u,"prototype",{writable:!1}),u}function se(u){var m=de(u,"string");return F(m)==="symbol"?m:String(m)}function de(u,m){if(F(u)!=="object"||u===null)return u;var c=u[Symbol.toPrimitive];if(c!==void 0){var v=c.call(u,m);if(F(v)!=="object")return v;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(u)}var ae=rc(),le=tc(),Te=ep(),xe=function(m){for(var c=0;;c++)if(m=m.previousSibling,!m)return c},Le=function(m){var c=m.assignedSlot||m.parentNode;return c&&c.nodeType==11?c.host:c},ut=null,Je=function(m,c,v){var k=ut||(ut=document.createRange());return k.setEnd(m,v??m.nodeValue.length),k.setStart(m,c||0),k},wt=function(){ut=null},Ye=function(m,c,v,k){return v&&(rt(m,c,v,k,-1)||rt(m,c,v,k,1))},pt=/^(img|br|input|textarea|hr)$/i;function rt(u,m,c,v,k){for(var w;;){if(u==c&&m==v)return!0;if(m==(k<0?0:Et(u))){var A=u.parentNode;if(!A||A.nodeType!=1||Ct(u)||pt.test(u.nodeName)||u.contentEditable=="false")return!1;m=xe(u)+(k<0?0:1),u=A}else if(u.nodeType==1){var M=u.childNodes[m+(k<0?-1:0)];if(M.nodeType==1&&M.contentEditable=="false")if(!((w=M.pmViewDesc)===null||w===void 0)&&w.ignoreForSelection)m+=k;else return!1;else u=M,m=k<0?Et(u):0}else return!1}}function Et(u){return u.nodeType==3?u.nodeValue.length:u.childNodes.length}function Bt(u,m){for(;;){if(u.nodeType==3&&m)return u;if(u.nodeType==1&&m>0){if(u.contentEditable=="false")return null;u=u.childNodes[m-1],m=Et(u)}else if(u.parentNode&&!Ct(u))m=xe(u),u=u.parentNode;else return null}}function $t(u,m){for(;;){if(u.nodeType==3&&m<u.nodeValue.length)return u;if(u.nodeType==1&&m<u.childNodes.length){if(u.contentEditable=="false")return null;u=u.childNodes[m],m=0}else if(u.parentNode&&!Ct(u))m=xe(u)+1,u=u.parentNode;else return null}}function Qe(u,m,c){for(var v=m==0,k=m==Et(u);v||k;){if(u==c)return!0;var w=xe(u);if(u=u.parentNode,!u)return!1;v=v&&w==0,k=k&&w==Et(u)}}function Ct(u){for(var m,c=u;c&&!(m=c.pmViewDesc);c=c.parentNode);return m&&m.node&&m.node.isBlock&&(m.dom==u||m.contentDOM==u)}var ft=function(m){return m.focusNode&&Ye(m.focusNode,m.focusOffset,m.anchorNode,m.anchorOffset)};function Mt(u,m){var c=document.createEvent("Event");return c.initEvent("keydown",!0,!0),c.keyCode=u,c.key=c.code=m,c}function Tt(u){for(var m=u.activeElement;m&&m.shadowRoot;)m=m.shadowRoot.activeElement;return m}function jt(u,m,c){if(u.caretPositionFromPoint)try{var v=u.caretPositionFromPoint(m,c);if(v)return{node:v.offsetNode,offset:Math.min(Et(v.offsetNode),v.offset)}}catch{}if(u.caretRangeFromPoint){var k=u.caretRangeFromPoint(m,c);if(k)return{node:k.startContainer,offset:Math.min(Et(k.startContainer),k.startOffset)}}}var Ut=typeof navigator<"u"?navigator:null,Yt=typeof document<"u"?document:null,ye=Ut&&Ut.userAgent||"",he=/Edge\/(\d+)/.exec(ye),ne=/MSIE \d/.exec(ye),oe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ye),Q=!!(ne||oe||he),ke=ne?document.documentMode:oe?+oe[1]:he?+he[1]:0,Ee=!Q&&/gecko\/(\d+)/i.test(ye);Ee&&+(/Firefox\/(\d+)/.exec(ye)||[0,0])[1];var He=!Q&&/Chrome\/(\d+)/.exec(ye),nt=!!He,yt=He?+He[1]:0,ct=!Q&&!!Ut&&/Apple Computer/.test(Ut.vendor),zt=ct&&(/Mobile\/\w+/.test(ye)||!!Ut&&Ut.maxTouchPoints>2),At=zt||(Ut?/Mac/.test(Ut.platform):!1),Xt=Ut?/Win/.test(Ut.platform):!1,Nt=/Android \d/.test(ye),ar=!!Yt&&"webkitFontSmoothing"in Yt.documentElement.style,En=ar?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function nn(u){var m=u.defaultView&&u.defaultView.visualViewport;return m?{left:0,right:m.width,top:0,bottom:m.height}:{left:0,right:u.documentElement.clientWidth,top:0,bottom:u.documentElement.clientHeight}}function hr(u,m){return typeof u=="number"?u:u[m]}function ze(u){var m=u.getBoundingClientRect(),c=m.width/u.offsetWidth||1,v=m.height/u.offsetHeight||1;return{left:m.left,right:m.left+u.clientWidth*c,top:m.top,bottom:m.top+u.clientHeight*v}}function Ue(u,m,c){for(var v=u.someProp("scrollThreshold")||0,k=u.someProp("scrollMargin")||5,w=u.dom.ownerDocument,A=c||u.dom;A;){if(A.nodeType!=1){A=Le(A);continue}var M=A,q=M==w.body,V=q?nn(w):ze(M),Z=0,ue=0;if(m.top<V.top+hr(v,"top")?ue=-(V.top-m.top+hr(k,"top")):m.bottom>V.bottom-hr(v,"bottom")&&(ue=m.bottom-m.top>V.bottom-V.top?m.top+hr(k,"top")-V.top:m.bottom-V.bottom+hr(k,"bottom")),m.left<V.left+hr(v,"left")?Z=-(V.left-m.left+hr(k,"left")):m.right>V.right-hr(v,"right")&&(Z=m.right-V.right+hr(k,"right")),Z||ue)if(q)w.defaultView.scrollBy(Z,ue);else{var re=M.scrollLeft,ge=M.scrollTop;ue&&(M.scrollTop+=ue),Z&&(M.scrollLeft+=Z);var Me=M.scrollLeft-re,Fe=M.scrollTop-ge;m={left:m.left-Me,top:m.top-Fe,right:m.right-Me,bottom:m.bottom-Fe}}var je=q?"fixed":getComputedStyle(A).position;if(/^(fixed|sticky)$/.test(je))break;A=je=="absolute"?A.offsetParent:Le(A)}}function lt(u){for(var m=u.dom.getBoundingClientRect(),c=Math.max(0,m.top),v,k,w=(m.left+m.right)/2,A=c+1;A<Math.min(innerHeight,m.bottom);A+=5){var M=u.root.elementFromPoint(w,A);if(!(!M||M==u.dom||!u.dom.contains(M))){var q=M.getBoundingClientRect();if(q.top>=c-20){v=M,k=q.top;break}}}return{refDOM:v,refTop:k,stack:dt(u.dom)}}function dt(u){for(var m=[],c=u.ownerDocument,v=u;v&&(m.push({dom:v,top:v.scrollTop,left:v.scrollLeft}),u!=c);v=Le(v));return m}function Ot(u){var m=u.refDOM,c=u.refTop,v=u.stack,k=m?m.getBoundingClientRect().top:0;gr(v,k==0?0:k-c)}function gr(u,m){for(var c=0;c<u.length;c++){var v=u[c],k=v.dom,w=v.top,A=v.left;k.scrollTop!=w+m&&(k.scrollTop=w+m),k.scrollLeft!=A&&(k.scrollLeft=A)}}var Vt=null;function Gt(u){if(u.setActive)return u.setActive();if(Vt)return u.focus(Vt);var m=dt(u);u.focus(Vt==null?{get preventScroll(){return Vt={preventScroll:!0},!0}}:void 0),Vt||(Vt=!1,gr(m,0))}function Lr(u,m){for(var c,v=2e8,k,w=0,A=m.top,M=m.top,q,V,Z=u.firstChild,ue=0;Z;Z=Z.nextSibling,ue++){var re=void 0;if(Z.nodeType==1)re=Z.getClientRects();else if(Z.nodeType==3)re=Je(Z).getClientRects();else continue;for(var ge=0;ge<re.length;ge++){var Me=re[ge];if(Me.top<=A&&Me.bottom>=M){A=Math.max(Me.bottom,A),M=Math.min(Me.top,M);var Fe=Me.left>m.left?Me.left-m.left:Me.right<m.left?m.left-Me.right:0;if(Fe<v){c=Z,v=Fe,k=Fe&&c.nodeType==3?{left:Me.right<m.left?Me.right:Me.left,top:m.top}:m,Z.nodeType==1&&Fe&&(w=ue+(m.left>=(Me.left+Me.right)/2?1:0));continue}}else Me.top>m.top&&!q&&Me.left<=m.left&&Me.right>=m.left&&(q=Z,V={left:Math.max(Me.left,Math.min(Me.right,m.left)),top:Me.top});!c&&(m.left>=Me.right&&m.top>=Me.top||m.left>=Me.left&&m.top>=Me.bottom)&&(w=ue+1)}}return!c&&q&&(c=q,k=V,v=0),c&&c.nodeType==3?Kr(c,k):!c||v&&c.nodeType==1?{node:u,offset:w}:Lr(c,k)}function Kr(u,m){for(var c=u.nodeValue.length,v=document.createRange(),k,w=0;w<c;w++){v.setEnd(u,w+1),v.setStart(u,w);var A=or(v,1);if(A.top!=A.bottom&&pr(m,A)){k={node:u,offset:w+(m.left>=(A.left+A.right)/2?1:0)};break}}return v.detach(),k||{node:u,offset:0}}function pr(u,m){return u.left>=m.left-1&&u.left<=m.right+1&&u.top>=m.top-1&&u.top<=m.bottom+1}function Vr(u,m){var c=u.parentNode;return c&&/^li$/i.test(c.nodeName)&&m.left<u.getBoundingClientRect().left?c:u}function Mn(u,m,c){var v=Lr(m,c),k=v.node,w=v.offset,A=-1;if(k.nodeType==1&&!k.firstChild){var M=k.getBoundingClientRect();A=M.left!=M.right&&c.left>(M.left+M.right)/2?1:-1}return u.docView.posFromDOM(k,w,A)}function gn(u,m,c,v){for(var k=-1,w=m,A=!1;w!=u.dom;){var M=u.docView.nearestDesc(w,!0),q=void 0;if(!M)return null;if(M.dom.nodeType==1&&(M.node.isBlock&&M.parent||!M.contentDOM)&&((q=M.dom.getBoundingClientRect()).width||q.height)&&(M.node.isBlock&&M.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(M.dom.nodeName)&&(!A&&q.left>v.left||q.top>v.top?k=M.posBefore:(!A&&q.right<v.left||q.bottom<v.top)&&(k=M.posAfter),A=!0),!M.contentDOM&&k<0&&!M.node.isText)){var V=M.node.isBlock?v.top<(q.top+q.bottom)/2:v.left<(q.left+q.right)/2;return V?M.posBefore:M.posAfter}w=M.dom.parentNode}return k>-1?k:u.docView.posFromDOM(m,c,-1)}function Jr(u,m,c){var v=u.childNodes.length;if(v&&c.top<c.bottom)for(var k=Math.max(0,Math.min(v-1,Math.floor(v*(m.top-c.top)/(c.bottom-c.top))-2)),w=k;;){var A=u.childNodes[w];if(A.nodeType==1)for(var M=A.getClientRects(),q=0;q<M.length;q++){var V=M[q];if(pr(m,V))return Jr(A,m,V)}if((w=(w+1)%v)==k)break}return u}function Yr(u,m){var c=u.dom.ownerDocument,v,k=0,w=jt(c,m.left,m.top);w&&(v=w.node,k=w.offset);var A=(u.root.elementFromPoint?u.root:c).elementFromPoint(m.left,m.top),M;if(!A||!u.dom.contains(A.nodeType!=1?A.parentNode:A)){var q=u.dom.getBoundingClientRect();if(!pr(m,q)||(A=Jr(u.dom,m,q),!A))return null}if(ct)for(var V=A;v&&V;V=Le(V))V.draggable&&(v=void 0);if(A=Vr(A,m),v){if(Ee&&v.nodeType==1&&(k=Math.min(k,v.childNodes.length),k<v.childNodes.length)){var Z=v.childNodes[k],ue;Z.nodeName=="IMG"&&(ue=Z.getBoundingClientRect()).right<=m.left&&ue.bottom>m.top&&k++}var re;ar&&k&&v.nodeType==1&&(re=v.childNodes[k-1]).nodeType==1&&re.contentEditable=="false"&&re.getBoundingClientRect().top>=m.top&&k--,v==u.dom&&k==v.childNodes.length-1&&v.lastChild.nodeType==1&&m.top>v.lastChild.getBoundingClientRect().bottom?M=u.state.doc.content.size:(k==0||v.nodeType!=1||v.childNodes[k-1].nodeName!="BR")&&(M=gn(u,v,k,m))}M==null&&(M=Mn(u,A,m));var ge=u.docView.nearestDesc(A,!0);return{pos:M,inside:ge?ge.posAtStart-ge.border:-1}}function Xr(u){return u.top<u.bottom||u.left<u.right}function or(u,m){var c=u.getClientRects();if(c.length){var v=c[m<0?0:c.length-1];if(Xr(v))return v}return Array.prototype.find.call(c,Xr)||u.getBoundingClientRect()}var an=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Kt(u,m,c){var v=u.docView.domFromPos(m,c<0?-1:1),k=v.node,w=v.offset,A=v.atom,M=ar||Ee;if(k.nodeType==3)if(M&&(an.test(k.nodeValue)||(c<0?!w:w==k.nodeValue.length))){var q=or(Je(k,w,w),c);if(Ee&&w&&/\s/.test(k.nodeValue[w-1])&&w<k.nodeValue.length){var V=or(Je(k,w-1,w-1),-1);if(V.top==q.top){var Z=or(Je(k,w,w+1),-1);if(Z.top!=q.top)return yr(Z,Z.left<V.left)}}return q}else{var ue=w,re=w,ge=c<0?1:-1;return c<0&&!w?(re++,ge=-1):c>=0&&w==k.nodeValue.length?(ue--,ge=1):c<0?ue--:re++,yr(or(Je(k,ue,re),ge),ge<0)}var Me=u.state.doc.resolve(m-(A||0));if(!Me.parent.inlineContent){if(A==null&&w&&(c<0||w==Et(k))){var Fe=k.childNodes[w-1];if(Fe.nodeType==1)return W(Fe.getBoundingClientRect(),!1)}if(A==null&&w<Et(k)){var je=k.childNodes[w];if(je.nodeType==1)return W(je.getBoundingClientRect(),!0)}return W(k.getBoundingClientRect(),c>=0)}if(A==null&&w&&(c<0||w==Et(k))){var Re=k.childNodes[w-1],bt=Re.nodeType==3?Je(Re,Et(Re)-(M?0:1)):Re.nodeType==1&&(Re.nodeName!="BR"||!Re.nextSibling)?Re:null;if(bt)return yr(or(bt,1),!1)}if(A==null&&w<Et(k)){for(var gt=k.childNodes[w];gt.pmViewDesc&>.pmViewDesc.ignoreForCoords;)gt=gt.nextSibling;var st=gt?gt.nodeType==3?Je(gt,0,M?0:1):gt.nodeType==1?gt:null:null;if(st)return yr(or(st,-1),!0)}return yr(or(k.nodeType==3?Je(k):k,-c),c>=0)}function yr(u,m){if(u.width==0)return u;var c=m?u.left:u.right;return{top:u.top,bottom:u.bottom,left:c,right:c}}function W(u,m){if(u.height==0)return u;var c=m?u.top:u.bottom;return{top:c,bottom:c,left:u.left,right:u.right}}function $(u,m,c){var v=u.state,k=u.root.activeElement;v!=m&&u.updateState(m),k!=u.dom&&u.focus();try{return c()}finally{v!=m&&u.updateState(v),k!=u.dom&&k&&k.focus()}}function R(u,m,c){var v=m.selection,k=c=="up"?v.$from:v.$to;return $(u,m,function(){for(var w=u.docView.domFromPos(k.pos,c=="up"?-1:1),A=w.node;;){var M=u.docView.nearestDesc(A,!0);if(!M)break;if(M.node.isBlock){A=M.contentDOM||M.dom;break}A=M.dom.parentNode}for(var q=Kt(u,k.pos,1),V=A.firstChild;V;V=V.nextSibling){var Z=void 0;if(V.nodeType==1)Z=V.getClientRects();else if(V.nodeType==3)Z=Je(V,0,V.nodeValue.length).getClientRects();else continue;for(var ue=0;ue<Z.length;ue++){var re=Z[ue];if(re.bottom>re.top+1&&(c=="up"?q.top-re.top>(re.bottom-q.top)*2:re.bottom-q.bottom>(q.bottom-re.top)*2))return!1}}return!0})}var N=/[\u0590-\u08ac]/;function P(u,m,c){var v=m.selection.$head;if(!v.parent.isTextblock)return!1;var k=v.parentOffset,w=!k,A=k==v.parent.content.size,M=u.domSelection();return M?!N.test(v.parent.textContent)||!M.modify?c=="left"||c=="backward"?w:A:$(u,m,function(){var q=u.domSelectionRange(),V=q.focusNode,Z=q.focusOffset,ue=q.anchorNode,re=q.anchorOffset,ge=M.caretBidiLevel;M.modify("move",c,"character");var Me=v.depth?u.docView.domAfterPos(v.before()):u.dom,Fe=u.domSelectionRange(),je=Fe.focusNode,Re=Fe.focusOffset,bt=je&&!Me.contains(je.nodeType==1?je:je.parentNode)||V==je&&Z==Re;try{M.collapse(ue,re),V&&(V!=ue||Z!=re)&&M.extend&&M.extend(V,Z)}catch{}return ge!=null&&(M.caretBidiLevel=ge),bt}):v.pos==v.start()||v.pos==v.end()}var H=null,K=null,pe=!1;function we(u,m,c){return H==m&&K==c?pe:(H=m,K=c,pe=c=="up"||c=="down"?R(u,m,c):P(u,m,c))}var ie=0,J=1,ve=2,be=3,Ie=(function(){function u(m,c,v,k){_(this,u),this.parent=m,this.children=c,this.dom=v,this.contentDOM=k,this.dirty=ie,v.pmViewDesc=this}return ee(u,[{key:"matchesWidget",value:function(c){return!1}},{key:"matchesMark",value:function(c){return!1}},{key:"matchesNode",value:function(c,v,k){return!1}},{key:"matchesHack",value:function(c){return!1}},{key:"parseRule",value:function(){return null}},{key:"stopEvent",value:function(c){return!1}},{key:"size",get:function(){for(var c=0,v=0;v<this.children.length;v++)c+=this.children[v].size;return c}},{key:"border",get:function(){return 0}},{key:"destroy",value:function(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(var c=0;c<this.children.length;c++)this.children[c].destroy()}},{key:"posBeforeChild",value:function(c){for(var v=0,k=this.posAtStart;;v++){var w=this.children[v];if(w==c)return k;k+=w.size}}},{key:"posBefore",get:function(){return this.parent.posBeforeChild(this)}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}},{key:"posAfter",get:function(){return this.posBefore+this.size}},{key:"posAtEnd",get:function(){return this.posAtStart+this.size-2*this.border}},{key:"localPosFromDOM",value:function(c,v,k){if(this.contentDOM&&this.contentDOM.contains(c.nodeType==1?c:c.parentNode))if(k<0){var w,A;if(c==this.contentDOM)w=c.childNodes[v-1];else{for(;c.parentNode!=this.contentDOM;)c=c.parentNode;w=c.previousSibling}for(;w&&!((A=w.pmViewDesc)&&A.parent==this);)w=w.previousSibling;return w?this.posBeforeChild(A)+A.size:this.posAtStart}else{var M,q;if(c==this.contentDOM)M=c.childNodes[v];else{for(;c.parentNode!=this.contentDOM;)c=c.parentNode;M=c.nextSibling}for(;M&&!((q=M.pmViewDesc)&&q.parent==this);)M=M.nextSibling;return M?this.posBeforeChild(q):this.posAtEnd}var V;if(c==this.dom&&this.contentDOM)V=v>xe(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))V=c.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(v==0)for(var Z=c;;Z=Z.parentNode){if(Z==this.dom){V=!1;break}if(Z.previousSibling)break}if(V==null&&v==c.childNodes.length)for(var ue=c;;ue=ue.parentNode){if(ue==this.dom){V=!0;break}if(ue.nextSibling)break}}return V??k>0?this.posAtEnd:this.posAtStart}},{key:"nearestDesc",value:function(c){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,k=!0,w=c;w;w=w.parentNode){var A=this.getDesc(w),M=void 0;if(A&&(!v||A.node))if(k&&(M=A.nodeDOM)&&!(M.nodeType==1?M.contains(c.nodeType==1?c:c.parentNode):M==c))k=!1;else return A}}},{key:"getDesc",value:function(c){for(var v=c.pmViewDesc,k=v;k;k=k.parent)if(k==this)return v}},{key:"posFromDOM",value:function(c,v,k){for(var w=c;w;w=w.parentNode){var A=this.getDesc(w);if(A)return A.localPosFromDOM(c,v,k)}return-1}},{key:"descAt",value:function(c){for(var v=0,k=0;v<this.children.length;v++){var w=this.children[v],A=k+w.size;if(k==c&&A!=k){for(;!w.border&&w.children.length;)for(var M=0;M<w.children.length;M++){var q=w.children[M];if(q.size){w=q;break}}return w}if(c<A)return w.descAt(c-k-w.border);k=A}}},{key:"domFromPos",value:function(c,v){if(!this.contentDOM)return{node:this.dom,offset:0,atom:c+1};for(var k=0,w=0,A=0;k<this.children.length;k++){var M=this.children[k],q=A+M.size;if(q>c||M instanceof C){w=c-A;break}A=q}if(w)return this.children[k].domFromPos(w-this.children[k].border,v);for(var V;k&&!(V=this.children[k-1]).size&&V instanceof et&&V.side>=0;k--);if(v<=0){for(var Z,ue=!0;Z=k?this.children[k-1]:null,!(!Z||Z.dom.parentNode==this.contentDOM);k--,ue=!1);return Z&&v&&ue&&!Z.border&&!Z.domAtom?Z.domFromPos(Z.size,v):{node:this.contentDOM,offset:Z?xe(Z.dom)+1:0}}else{for(var re,ge=!0;re=k<this.children.length?this.children[k]:null,!(!re||re.dom.parentNode==this.contentDOM);k++,ge=!1);return re&&ge&&!re.border&&!re.domAtom?re.domFromPos(0,v):{node:this.contentDOM,offset:re?xe(re.dom):this.contentDOM.childNodes.length}}}},{key:"parseRange",value:function(c,v){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.children.length==0)return{node:this.contentDOM,from:c,to:v,fromOffset:0,toOffset:this.contentDOM.childNodes.length};for(var w=-1,A=-1,M=k,q=0;;q++){var V=this.children[q],Z=M+V.size;if(w==-1&&c<=Z){var ue=M+V.border;if(c>=ue&&v<=Z-V.border&&V.node&&V.contentDOM&&this.contentDOM.contains(V.contentDOM))return V.parseRange(c,v,ue);c=M;for(var re=q;re>0;re--){var ge=this.children[re-1];if(ge.size&&ge.dom.parentNode==this.contentDOM&&!ge.emptyChildAt(1)){w=xe(ge.dom)+1;break}c-=ge.size}w==-1&&(w=0)}if(w>-1&&(Z>v||q==this.children.length-1)){v=Z;for(var Me=q+1;Me<this.children.length;Me++){var Fe=this.children[Me];if(Fe.size&&Fe.dom.parentNode==this.contentDOM&&!Fe.emptyChildAt(-1)){A=xe(Fe.dom);break}v+=Fe.size}A==-1&&(A=this.contentDOM.childNodes.length);break}M=Z}return{node:this.contentDOM,from:c,to:v,fromOffset:w,toOffset:A}}},{key:"emptyChildAt",value:function(c){if(this.border||!this.contentDOM||!this.children.length)return!1;var v=this.children[c<0?0:this.children.length-1];return v.size==0||v.emptyChildAt(c)}},{key:"domAfterPos",value:function(c){var v=this.domFromPos(c,0),k=v.node,w=v.offset;if(k.nodeType!=1||w==k.childNodes.length)throw new RangeError("No node after pos "+c);return k.childNodes[w]}},{key:"setSelection",value:function(c,v,k){for(var w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,A=Math.min(c,v),M=Math.max(c,v),q=0,V=0;q<this.children.length;q++){var Z=this.children[q],ue=V+Z.size;if(A>V&&M<ue)return Z.setSelection(c-V-Z.border,v-V-Z.border,k,w);V=ue}var re=this.domFromPos(c,c?-1:1),ge=v==c?re:this.domFromPos(v,v?-1:1),Me=k.root.getSelection(),Fe=k.domSelectionRange(),je=!1;if((Ee||ct)&&c==v){var Re=re,bt=Re.node,gt=Re.offset;if(bt.nodeType==3){if(je=!!(gt&&bt.nodeValue[gt-1]==`
|
|
648
|
-
`),je&>==bt.nodeValue.length)for(var st=bt,vt;st;st=st.parentNode){if(vt=st.nextSibling){vt.nodeName=="BR"&&(re=ge={node:vt.parentNode,offset:xe(vt)+1});break}var Ft=st.pmViewDesc;if(Ft&&Ft.node&&Ft.node.isBlock)break}}else{var _t=bt.childNodes[gt-1];je=_t&&(_t.nodeName=="BR"||_t.contentEditable=="false")}}if(Ee&&Fe.focusNode&&Fe.focusNode!=ge.node&&Fe.focusNode.nodeType==1){var Zt=Fe.focusNode.childNodes[Fe.focusOffset];Zt&&Zt.contentEditable=="false"&&(w=!0)}if(!(!(w||je&&ct)&&Ye(re.node,re.offset,Fe.anchorNode,Fe.anchorOffset)&&Ye(ge.node,ge.offset,Fe.focusNode,Fe.focusOffset))){var ir=!1;if((Me.extend||c==v)&&!(je&&Ee)){Me.collapse(re.node,re.offset);try{c!=v&&Me.extend(ge.node,ge.offset),ir=!0}catch{}}if(!ir){if(c>v){var Wt=re;re=ge,ge=Wt}var In=document.createRange();In.setEnd(ge.node,ge.offset),In.setStart(re.node,re.offset),Me.removeAllRanges(),Me.addRange(In)}}}},{key:"ignoreMutation",value:function(c){return!this.contentDOM&&c.type!="selection"}},{key:"contentLost",get:function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}},{key:"markDirty",value:function(c,v){for(var k=0,w=0;w<this.children.length;w++){var A=this.children[w],M=k+A.size;if(k==M?c<=M&&v>=k:c<M&&v>k){var q=k+A.border,V=M-A.border;if(c>=q&&v<=V){this.dirty=c==k||v==M?ve:J,c==q&&v==V&&(A.contentLost||A.dom.parentNode!=this.contentDOM)?A.dirty=be:A.markDirty(c-q,v-q);return}else A.dirty=A.dom==A.contentDOM&&A.dom.parentNode==this.contentDOM&&!A.children.length?ve:be}k=M}this.dirty=ve}},{key:"markParentsDirty",value:function(){for(var c=1,v=this.parent;v;v=v.parent,c++){var k=c==1?ve:J;v.dirty<k&&(v.dirty=k)}}},{key:"domAtom",get:function(){return!1}},{key:"ignoreForCoords",get:function(){return!1}},{key:"ignoreForSelection",get:function(){return!1}},{key:"isText",value:function(c){return!1}}]),u})(),et=(function(u){f(c,u);var m=b(c);function c(v,k,w,A){var M;_(this,c);var q,V=k.type.toDOM;if(typeof V=="function"&&(V=V(w,function(){if(!q)return A;if(q.parent)return q.parent.posBeforeChild(q)})),!k.type.spec.raw){if(V.nodeType!=1){var Z=document.createElement("span");Z.appendChild(V),V=Z}V.contentEditable="false",V.classList.add("ProseMirror-widget")}return M=m.call(this,v,[],V,null),M.widget=k,M.widget=k,q=x(M),M}return ee(c,[{key:"matchesWidget",value:function(k){return this.dirty==ie&&k.type.eq(this.widget.type)}},{key:"parseRule",value:function(){return{ignore:!0}}},{key:"stopEvent",value:function(k){var w=this.widget.spec.stopEvent;return w?w(k):!1}},{key:"ignoreMutation",value:function(k){return k.type!="selection"||this.widget.spec.ignoreSelection}},{key:"destroy",value:function(){this.widget.type.destroy(this.dom),s(B(c.prototype),"destroy",this).call(this)}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForSelection",get:function(){return!!this.widget.type.spec.relaxedSide}},{key:"side",get:function(){return this.widget.type.side}}]),c})(Ie),_e=(function(u){f(c,u);var m=b(c);function c(v,k,w,A){var M;return _(this,c),M=m.call(this,v,[],k,null),M.textDOM=w,M.text=A,M}return ee(c,[{key:"size",get:function(){return this.text.length}},{key:"localPosFromDOM",value:function(k,w){return k!=this.textDOM?this.posAtStart+(w?this.size:0):this.posAtStart+w}},{key:"domFromPos",value:function(k){return{node:this.textDOM,offset:k}}},{key:"ignoreMutation",value:function(k){return k.type==="characterData"&&k.target.nodeValue==k.oldValue}}]),c})(Ie),at=(function(u){f(c,u);var m=b(c);function c(v,k,w,A,M){var q;return _(this,c),q=m.call(this,v,[],w,A),q.mark=k,q.spec=M,q}return ee(c,[{key:"parseRule",value:function(){return this.dirty&be||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}},{key:"matchesMark",value:function(k){return this.dirty!=be&&this.mark.eq(k)}},{key:"markDirty",value:function(k,w){if(s(B(c.prototype),"markDirty",this).call(this,k,w),this.dirty!=ie){for(var A=this.parent;!A.node;)A=A.parent;A.dirty<this.dirty&&(A.dirty=this.dirty),this.dirty=ie}}},{key:"slice",value:function(k,w,A){var M=c.create(this.parent,this.mark,!0,A),q=this.children,V=this.size;w<V&&(q=An(q,w,V,A)),k>0&&(q=An(q,0,k,A));for(var Z=0;Z<q.length;Z++)q[Z].parent=M;return M.children=q,M}},{key:"ignoreMutation",value:function(k){return this.spec.ignoreMutation?this.spec.ignoreMutation(k):s(B(c.prototype),"ignoreMutation",this).call(this,k)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),s(B(c.prototype),"destroy",this).call(this)}}],[{key:"create",value:function(k,w,A,M){var q=M.nodeViews[w.type.name],V=q&&q(w,M,A);return(!V||!V.dom)&&(V=le.DOMSerializer.renderSpec(document,w.type.spec.toDOM(w,A),null,w.attrs)),new c(k,w,V.dom,V.contentDOM||V.dom,V)}}]),c})(Ie),I=(function(u){f(c,u);var m=b(c);function c(v,k,w,A,M,q,V){var Z;return _(this,c),Z=m.call(this,v,[],M,q),Z.node=k,Z.outerDeco=w,Z.innerDeco=A,Z.nodeDOM=V,Z}return ee(c,[{key:"parseRule",value:function(){var k=this;if(this.node.type.spec.reparseInView)return null;var w={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(w.preserveWhitespace="full"),!this.contentDOM)w.getContent=function(){return k.node.content};else if(!this.contentLost)w.contentElement=this.contentDOM;else{for(var A=this.children.length-1;A>=0;A--){var M=this.children[A];if(this.dom.contains(M.dom.parentNode)){w.contentElement=M.dom.parentNode;break}}w.contentElement||(w.getContent=function(){return le.Fragment.empty})}return w}},{key:"matchesNode",value:function(k,w,A){return this.dirty==ie&&k.eq(this.node)&&Pe(w,this.outerDeco)&&A.eq(this.innerDeco)}},{key:"size",get:function(){return this.node.nodeSize}},{key:"border",get:function(){return this.node.isLeaf?0:1}},{key:"updateChildren",value:function(k,w){var A=this,M=this.node.inlineContent,q=w,V=k.composing?this.localCompositionInfo(k,w):null,Z=V&&V.pos>-1?V:null,ue=V&&V.pos<0,re=new Dt(this,Z&&Z.node,k);Un(this.node,this.innerDeco,function(ge,Me,Fe){ge.spec.marks?re.syncToMarks(ge.spec.marks,M,k,Me):ge.type.side>=0&&!Fe&&re.syncToMarks(Me==A.node.childCount?le.Mark.none:A.node.child(Me).marks,M,k,Me),re.placeWidget(ge,k,q)},function(ge,Me,Fe,je){re.syncToMarks(ge.marks,M,k,je);var Re;re.findNodeMatch(ge,Me,Fe,je)||ue&&k.state.selection.from>q&&k.state.selection.to<q+ge.nodeSize&&(Re=re.findIndexWithChild(V.node))>-1&&re.updateNodeAt(ge,Me,Fe,Re,k)||re.updateNextNode(ge,Me,Fe,k,je,q)||re.addNode(ge,Me,Fe,k,q),q+=ge.nodeSize}),re.syncToMarks([],M,k,0),this.node.isTextblock&&re.addTextblockHacks(),re.destroyRest(),(re.changed||this.dirty==ve)&&(Z&&this.protectLocalComposition(k,Z),z(this.contentDOM,this.children,k),zt&&vi(this.dom))}},{key:"localCompositionInfo",value:function(k,w){var A=k.state.selection,M=A.from,q=A.to;if(!(k.state.selection instanceof ae.TextSelection)||M<w||q>w+this.node.content.size)return null;var V=k.input.compositionNode;if(!V||!this.dom.contains(V.parentNode))return null;if(this.node.inlineContent){var Z=V.nodeValue,ue=mi(this.node.content,Z,M-w,q-w);return ue<0?null:{node:V,pos:ue,text:Z}}else return{node:V,pos:-1,text:""}}},{key:"protectLocalComposition",value:function(k,w){var A=w.node,M=w.pos,q=w.text;if(!this.getDesc(A)){for(var V=A;V.parentNode!=this.contentDOM;V=V.parentNode){for(;V.previousSibling;)V.parentNode.removeChild(V.previousSibling);for(;V.nextSibling;)V.parentNode.removeChild(V.nextSibling);V.pmViewDesc&&(V.pmViewDesc=void 0)}var Z=new _e(this,V,A,q);k.input.compositionNodes.push(Z),this.children=An(this.children,M,M+q.length,k,Z)}}},{key:"update",value:function(k,w,A,M){return this.dirty==be||!k.sameMarkup(this.node)?!1:(this.updateInner(k,w,A,M),!0)}},{key:"updateInner",value:function(k,w,A,M){this.updateOuterDeco(w),this.node=k,this.innerDeco=A,this.contentDOM&&this.updateChildren(M,this.posAtStart),this.dirty=ie}},{key:"updateOuterDeco",value:function(k){if(!Pe(k,this.outerDeco)){var w=this.nodeDOM.nodeType!=1,A=this.dom;this.dom=me(this.dom,this.nodeDOM,ce(this.outerDeco,this.node,w),ce(k,this.node,w)),this.dom!=A&&(A.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=k}}},{key:"selectNode",value:function(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}},{key:"deselectNode",value:function(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}},{key:"domAtom",get:function(){return this.node.isAtom}}],[{key:"create",value:function(k,w,A,M,q,V){var Z=q.nodeViews[w.type.name],ue,re=Z&&Z(w,q,function(){if(!ue)return V;if(ue.parent)return ue.parent.posBeforeChild(ue)},A,M),ge=re&&re.dom,Me=re&&re.contentDOM;if(w.isText){if(!ge)ge=document.createTextNode(w.text);else if(ge.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else if(!ge){var Fe=le.DOMSerializer.renderSpec(document,w.type.spec.toDOM(w),null,w.attrs);ge=Fe.dom,Me=Fe.contentDOM}!Me&&!w.isText&&ge.nodeName!="BR"&&(ge.hasAttribute("contenteditable")||(ge.contentEditable="false"),w.type.spec.draggable&&(ge.draggable=!0));var je=ge;return ge=Ae(ge,A,w),re?ue=new D(k,w,A,M,ge,Me||null,je,re):w.isText?new g(k,w,A,M,ge,je):new c(k,w,A,M,ge,Me||null,je)}}]),c})(Ie);function O(u,m,c,v,k){Ae(v,m,u);var w=new I(void 0,u,m,c,v,v,v);return w.contentDOM&&w.updateChildren(k,0),w}var g=(function(u){f(c,u);var m=b(c);function c(v,k,w,A,M,q){return _(this,c),m.call(this,v,k,w,A,M,null,q)}return ee(c,[{key:"parseRule",value:function(){for(var k=this.nodeDOM.parentNode;k&&k!=this.dom&&!k.pmIsDeco;)k=k.parentNode;return{skip:k||!0}}},{key:"update",value:function(k,w,A,M){return this.dirty==be||this.dirty!=ie&&!this.inParent()||!k.sameMarkup(this.node)?!1:(this.updateOuterDeco(w),(this.dirty!=ie||k.text!=this.node.text)&&k.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=k.text,M.trackWrites==this.nodeDOM&&(M.trackWrites=null)),this.node=k,this.dirty=ie,!0)}},{key:"inParent",value:function(){for(var k=this.parent.contentDOM,w=this.nodeDOM;w;w=w.parentNode)if(w==k)return!0;return!1}},{key:"domFromPos",value:function(k){return{node:this.nodeDOM,offset:k}}},{key:"localPosFromDOM",value:function(k,w,A){return k==this.nodeDOM?this.posAtStart+Math.min(w,this.node.text.length):s(B(c.prototype),"localPosFromDOM",this).call(this,k,w,A)}},{key:"ignoreMutation",value:function(k){return k.type!="characterData"&&k.type!="selection"}},{key:"slice",value:function(k,w,A){var M=this.node.cut(k,w),q=document.createTextNode(M.text);return new c(this.parent,M,this.outerDeco,this.innerDeco,q,q)}},{key:"markDirty",value:function(k,w){s(B(c.prototype),"markDirty",this).call(this,k,w),this.dom!=this.nodeDOM&&(k==0||w==this.nodeDOM.nodeValue.length)&&(this.dirty=be)}},{key:"domAtom",get:function(){return!1}},{key:"isText",value:function(k){return this.node.text==k}}]),c})(I),C=(function(u){f(c,u);var m=b(c);function c(){return _(this,c),m.apply(this,arguments)}return ee(c,[{key:"parseRule",value:function(){return{ignore:!0}}},{key:"matchesHack",value:function(k){return this.dirty==ie&&this.dom.nodeName==k}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForCoords",get:function(){return this.dom.nodeName=="IMG"}}]),c})(Ie),D=(function(u){f(c,u);var m=b(c);function c(v,k,w,A,M,q,V,Z){var ue;return _(this,c),ue=m.call(this,v,k,w,A,M,q,V),ue.spec=Z,ue}return ee(c,[{key:"update",value:function(k,w,A,M){if(this.dirty==be)return!1;if(this.spec.update&&(this.node.type==k.type||this.spec.multiType)){var q=this.spec.update(k,w,A);return q&&this.updateInner(k,w,A,M),q}else return!this.contentDOM&&!k.isLeaf?!1:s(B(c.prototype),"update",this).call(this,k,w,A,M)}},{key:"selectNode",value:function(){this.spec.selectNode?this.spec.selectNode():s(B(c.prototype),"selectNode",this).call(this)}},{key:"deselectNode",value:function(){this.spec.deselectNode?this.spec.deselectNode():s(B(c.prototype),"deselectNode",this).call(this)}},{key:"setSelection",value:function(k,w,A,M){this.spec.setSelection?this.spec.setSelection(k,w,A.root):s(B(c.prototype),"setSelection",this).call(this,k,w,A,M)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),s(B(c.prototype),"destroy",this).call(this)}},{key:"stopEvent",value:function(k){return this.spec.stopEvent?this.spec.stopEvent(k):!1}},{key:"ignoreMutation",value:function(k){return this.spec.ignoreMutation?this.spec.ignoreMutation(k):s(B(c.prototype),"ignoreMutation",this).call(this,k)}}]),c})(I);function z(u,m,c){for(var v=u.firstChild,k=!1,w=0;w<m.length;w++){var A=m[w],M=A.dom;if(M.parentNode==u){for(;M!=v;)v=Ke(v),k=!0;v=v.nextSibling}else k=!0,u.insertBefore(M,v);if(A instanceof at){var q=v?v.previousSibling:u.lastChild;z(A.contentDOM,A.children,c),v=q?q.nextSibling:u.firstChild}}for(;v;)v=Ke(v),k=!0;k&&c.trackWrites==u&&(c.trackWrites=null)}var j=function(m){m&&(this.nodeName=m)};j.prototype=Object.create(null);var Y=[new j];function ce(u,m,c){if(u.length==0)return Y;for(var v=c?Y[0]:new j,k=[v],w=0;w<u.length;w++){var A=u[w].type.attrs;if(A){A.nodeName&&k.push(v=new j(A.nodeName));for(var M in A){var q=A[M];q!=null&&(c&&k.length==1&&k.push(v=new j(m.isInline?"span":"div")),M=="class"?v.class=(v.class?v.class+" ":"")+q:M=="style"?v.style=(v.style?v.style+";":"")+q:M!="nodeName"&&(v[M]=q))}}}return k}function me(u,m,c,v){if(c==Y&&v==Y)return m;for(var k=m,w=0;w<v.length;w++){var A=v[w],M=c[w];if(w){var q=void 0;M&&M.nodeName==A.nodeName&&k!=u&&(q=k.parentNode)&&q.nodeName.toLowerCase()==A.nodeName||(q=document.createElement(A.nodeName),q.pmIsDeco=!0,q.appendChild(k),M=Y[0]),k=q}Ne(k,M||Y[0],A)}return k}function Ne(u,m,c){for(var v in m)v!="class"&&v!="style"&&v!="nodeName"&&!(v in c)&&u.removeAttribute(v);for(var k in c)k!="class"&&k!="style"&&k!="nodeName"&&c[k]!=m[k]&&u.setAttribute(k,c[k]);if(m.class!=c.class){for(var w=m.class?m.class.split(" ").filter(Boolean):[],A=c.class?c.class.split(" ").filter(Boolean):[],M=0;M<w.length;M++)A.indexOf(w[M])==-1&&u.classList.remove(w[M]);for(var q=0;q<A.length;q++)w.indexOf(A[q])==-1&&u.classList.add(A[q]);u.classList.length==0&&u.removeAttribute("class")}if(m.style!=c.style){if(m.style)for(var V=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,Z;Z=V.exec(m.style);)u.style.removeProperty(Z[1]);c.style&&(u.style.cssText+=c.style)}}function Ae(u,m,c){return me(u,u,Y,ce(m,c,u.nodeType!=1))}function Pe(u,m){if(u.length!=m.length)return!1;for(var c=0;c<u.length;c++)if(!u[c].type.eq(m[c].type))return!1;return!0}function Ke(u){var m=u.nextSibling;return u.parentNode.removeChild(u),m}var Dt=(function(){function u(m,c,v){_(this,u),this.lock=c,this.view=v,this.index=0,this.stack=[],this.changed=!1,this.top=m,this.preMatch=br(m.node.content,m)}return ee(u,[{key:"destroyBetween",value:function(c,v){if(c!=v){for(var k=c;k<v;k++)this.top.children[k].destroy();this.top.children.splice(c,v-c),this.changed=!0}}},{key:"destroyRest",value:function(){this.destroyBetween(this.index,this.top.children.length)}},{key:"syncToMarks",value:function(c,v,k,w){for(var A=0,M=this.stack.length>>1,q=Math.min(M,c.length);A<q&&(A==M-1?this.top:this.stack[A+1<<1]).matchesMark(c[A])&&c[A].type.spec.spanning!==!1;)A++;for(;A<M;)this.destroyRest(),this.top.dirty=ie,this.index=this.stack.pop(),this.top=this.stack.pop(),M--;for(;M<c.length;){this.stack.push(this.top,this.index+1);var V=-1,Z=this.top.children.length;w<this.preMatch.index&&(Z=Math.min(this.index+3,Z));for(var ue=this.index;ue<Z;ue++){var re=this.top.children[ue];if(re.matchesMark(c[M])&&!this.isLocked(re.dom)){V=ue;break}}if(V<0&&this.index<this.top.children.length){var ge=this.top.children[this.index];ge instanceof at&&ge.dirty!=be&&ge.mark.type==c[M].type&&ge.spec.update&&!this.isLocked(ge.dom)&&ge.spec.update(c[M])&&(ge.mark=c[M],V=this.index,this.changed=!0)}if(V>-1)V>this.index&&(this.changed=!0,this.destroyBetween(this.index,V)),this.top=this.top.children[this.index];else{var Me=at.create(this.top,c[M],v,k);this.top.children.splice(this.index,0,Me),this.top=Me,this.changed=!0}this.index=0,M++}}},{key:"findNodeMatch",value:function(c,v,k,w){var A=-1,M;if(w>=this.preMatch.index&&(M=this.preMatch.matches[w-this.preMatch.index]).parent==this.top&&M.matchesNode(c,v,k))A=this.top.children.indexOf(M,this.index);else for(var q=this.index,V=Math.min(this.top.children.length,q+5);q<V;q++){var Z=this.top.children[q];if(Z.matchesNode(c,v,k)&&!this.preMatch.matched.has(Z)){A=q;break}}return A<0?!1:(this.destroyBetween(this.index,A),this.index++,!0)}},{key:"updateNodeAt",value:function(c,v,k,w,A){var M=this.top.children[w];return M.dirty==be&&M.dom==M.contentDOM&&(M.dirty=ve),M.update(c,v,k,A)?(this.destroyBetween(this.index,w),this.index++,!0):!1}},{key:"findIndexWithChild",value:function(c){for(;;){var v=c.parentNode;if(!v)return-1;if(v==this.top.contentDOM){var k=c.pmViewDesc;if(k){for(var w=this.index;w<this.top.children.length;w++)if(this.top.children[w]==k)return w}return-1}c=v}}},{key:"updateNextNode",value:function(c,v,k,w,A,M){for(var q=this.index;q<this.top.children.length;q++){var V=this.top.children[q];if(V instanceof I){var Z=this.preMatch.matched.get(V);if(Z!=null&&Z!=A)return!1;var ue=V.dom,re=void 0,ge=this.isLocked(ue)&&!(c.isText&&V.node&&V.node.isText&&V.nodeDOM.nodeValue==c.text&&V.dirty!=be&&Pe(v,V.outerDeco));if(!ge&&V.update(c,v,k,w))return this.destroyBetween(this.index,q),V.dom!=ue&&(this.changed=!0),this.index++,!0;if(!ge&&(re=this.recreateWrapper(V,c,v,k,w,M)))return this.destroyBetween(this.index,q),this.top.children[this.index]=re,re.contentDOM&&(re.dirty=ve,re.updateChildren(w,M+1),re.dirty=ie),this.changed=!0,this.index++,!0;break}}return!1}},{key:"recreateWrapper",value:function(c,v,k,w,A,M){if(c.dirty||v.isAtom||!c.children.length||!c.node.content.eq(v.content)||!Pe(k,c.outerDeco)||!w.eq(c.innerDeco))return null;var q=I.create(this.top,v,k,w,A,M);if(q.contentDOM){q.children=c.children,c.children=[];var V=i(q.children),Z;try{for(V.s();!(Z=V.n()).done;){var ue=Z.value;ue.parent=q}}catch(re){V.e(re)}finally{V.f()}}return c.destroy(),q}},{key:"addNode",value:function(c,v,k,w,A){var M=I.create(this.top,c,v,k,w,A);M.contentDOM&&M.updateChildren(w,A+1),this.top.children.splice(this.index++,0,M),this.changed=!0}},{key:"placeWidget",value:function(c,v,k){var w=this.index<this.top.children.length?this.top.children[this.index]:null;if(w&&w.matchesWidget(c)&&(c==w.widget||!w.widget.type.toDOM.parentNode))this.index++;else{var A=new et(this.top,c,v,k);this.top.children.splice(this.index++,0,A),this.changed=!0}}},{key:"addTextblockHacks",value:function(){for(var c=this.top.children[this.index-1],v=this.top;c instanceof at;)v=c,c=v.children[v.children.length-1];(!c||!(c instanceof g)||/\n$/.test(c.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(c.node.text))&&((ct||nt)&&c&&c.dom.contentEditable=="false"&&this.addHackNode("IMG",v),this.addHackNode("BR",this.top))}},{key:"addHackNode",value:function(c,v){if(v==this.top&&this.index<v.children.length&&v.children[this.index].matchesHack(c))this.index++;else{var k=document.createElement(c);c=="IMG"&&(k.className="ProseMirror-separator",k.alt=""),c=="BR"&&(k.className="ProseMirror-trailingBreak");var w=new C(this.top,[],k,null);v!=this.top?v.children.push(w):v.children.splice(this.index++,0,w),this.changed=!0}}},{key:"isLocked",value:function(c){return this.lock&&(c==this.lock||c.nodeType==1&&c.contains(this.lock.parentNode))}}]),u})();function br(u,m){var c=m,v=c.children.length,k=u.childCount,w=new Map,A=[];e:for(;k>0;){for(var M=void 0;;)if(v){var q=c.children[v-1];if(q instanceof at)c=q,v=q.children.length;else{M=q,v--;break}}else{if(c==m)break e;v=c.parent.children.indexOf(c),c=c.parent}var V=M.node;if(V){if(V!=u.child(k-1))break;--k,w.set(M,k),A.push(M)}}return{index:k,matched:w,matches:A.reverse()}}function on(u,m){return u.type.side-m.type.side}function Un(u,m,c,v){var k=m.locals(u),w=0;if(k.length==0){for(var A=0;A<u.childCount;A++){var M=u.child(A);v(M,k,m.forChild(w,M),A),w+=M.nodeSize}return}for(var q=0,V=[],Z=null,ue=0;;){for(var re=void 0,ge=void 0;q<k.length&&k[q].to==w;){var Me=k[q++];Me.widget&&(re?(ge||(ge=[re])).push(Me):re=Me)}if(re)if(ge){ge.sort(on);for(var Fe=0;Fe<ge.length;Fe++)c(ge[Fe],ue,!!Z)}else c(re,ue,!!Z);var je=void 0,Re=void 0;if(Z)Re=-1,je=Z,Z=null;else if(ue<u.childCount)Re=ue,je=u.child(ue++);else break;for(var bt=0;bt<V.length;bt++)V[bt].to<=w&&V.splice(bt--,1);for(;q<k.length&&k[q].from<=w&&k[q].to>w;)V.push(k[q++]);var gt=w+je.nodeSize;if(je.isText){var st=gt;q<k.length&&k[q].from<st&&(st=k[q].from);for(var vt=0;vt<V.length;vt++)V[vt].to<st&&(st=V[vt].to);st<gt&&(Z=je.cut(st-w),je=je.cut(0,st-w),gt=st,Re=-1)}else for(;q<k.length&&k[q].to<gt;)q++;var Ft=je.isInline&&!je.isLeaf?V.filter(function(_t){return!_t.inline}):V.slice();v(je,Ft,m.forChild(w,je),Re),w=gt}}function vi(u){if(u.nodeName=="UL"||u.nodeName=="OL"){var m=u.style.cssText;u.style.cssText=m+"; list-style: square !important",window.getComputedStyle(u).listStyle,u.style.cssText=m}}function mi(u,m,c,v){for(var k=0,w=0;k<u.childCount&&w<=v;){var A=u.child(k++),M=w;if(w+=A.nodeSize,!!A.isText){for(var q=A.text;k<u.childCount;){var V=u.child(k++);if(w+=V.nodeSize,!V.isText)break;q+=V.text}if(w>=c){if(w>=v&&q.slice(v-m.length-M,v-M)==m)return v-m.length;var Z=M<v?q.lastIndexOf(m,v-M-1):-1;if(Z>=0&&Z+m.length+M>=c)return M+Z;if(c==v&&q.length>=v+m.length-M&&q.slice(v-M,v-M+m.length)==m)return v}}}return-1}function An(u,m,c,v,k){for(var w=[],A=0,M=0;A<u.length;A++){var q=u[A],V=M,Z=M+=q.size;V>=c||Z<=m?w.push(q):(V<m&&w.push(q.slice(0,m-V,v)),k&&(w.push(k),k=void 0),Z>c&&w.push(q.slice(c-V,q.size,v)))}return w}function On(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,c=u.domSelectionRange(),v=u.state.doc;if(!c.focusNode)return null;var k=u.docView.nearestDesc(c.focusNode),w=k&&k.size==0,A=u.docView.posFromDOM(c.focusNode,c.focusOffset,1);if(A<0)return null;var M=v.resolve(A),q,V;if(ft(c)){for(q=A;k&&!k.node;)k=k.parent;var Z=k.node;if(k&&Z.isAtom&&ae.NodeSelection.isSelectable(Z)&&k.parent&&!(Z.isInline&&Qe(c.focusNode,c.focusOffset,k.dom))){var ue=k.posBefore;V=new ae.NodeSelection(A==ue?M:v.resolve(ue))}}else{if(c instanceof u.dom.ownerDocument.defaultView.Selection&&c.rangeCount>1){for(var re=A,ge=A,Me=0;Me<c.rangeCount;Me++){var Fe=c.getRangeAt(Me);re=Math.min(re,u.docView.posFromDOM(Fe.startContainer,Fe.startOffset,1)),ge=Math.max(ge,u.docView.posFromDOM(Fe.endContainer,Fe.endOffset,-1))}if(re<0)return null;var je=ge==u.state.selection.anchor?[ge,re]:[re,ge],Re=r(je,2);q=Re[0],A=Re[1],M=v.resolve(A)}else q=u.docView.posFromDOM(c.anchorNode,c.anchorOffset,1);if(q<0)return null}var bt=v.resolve(q);if(!V){var gt=m=="pointer"||u.state.selection.head<M.pos&&!w?1:-1;V=Dn(u,bt,M,gt)}return V}function va(u){return u.editable?u.hasFocus():ao(u)&&document.activeElement&&document.activeElement.contains(u.dom)}function sn(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=u.state.selection;if(gi(u,c),!!va(u)){var v=u.input.mouseDown;if(!m&&nt&&v){var k=u.domSelectionRange(),w=u.domObserver.currentSelection;if(k.anchorNode&&w.anchorNode&&Ye(k.anchorNode,k.anchorOffset,w.anchorNode,w.anchorOffset)&&v.delaySelUpdate()){u.domObserver.setCurSelection();return}}if(u.domObserver.disconnectSelection(),u.cursorWrapper)Nn(u);else{var A=c.anchor,M=c.head,q,V;ma&&!(c instanceof ae.TextSelection)&&(c.$from.parent.inlineContent||(q=Ui(u,c.from)),!c.empty&&!c.$from.parent.inlineContent&&(V=Ui(u,c.to))),u.docView.setSelection(A,M,u,m),ma&&(q&&Wi(q),V&&Wi(V)),c.visible?u.dom.classList.remove("ProseMirror-hideselection"):(u.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&ga(u))}u.domObserver.setCurSelection(),u.domObserver.connectSelection()}}var ma=ct||nt&&yt<63;function Ui(u,m){var c=u.docView.domFromPos(m,0),v=c.node,k=c.offset,w=k<v.childNodes.length?v.childNodes[k]:null,A=k?v.childNodes[k-1]:null;if(ct&&w&&w.contentEditable=="false")return $i(w);if((!w||w.contentEditable=="false")&&(!A||A.contentEditable=="false")){if(w)return $i(w);if(A)return $i(A)}}function $i(u){return u.contentEditable="true",ct&&u.draggable&&(u.draggable=!1,u.wasDraggable=!0),u}function Wi(u){u.contentEditable="false",u.wasDraggable&&(u.draggable=!0,u.wasDraggable=null)}function ga(u){var m=u.dom.ownerDocument;m.removeEventListener("selectionchange",u.input.hideSelectionGuard);var c=u.domSelectionRange(),v=c.anchorNode,k=c.anchorOffset;m.addEventListener("selectionchange",u.input.hideSelectionGuard=function(){(c.anchorNode!=v||c.anchorOffset!=k)&&(m.removeEventListener("selectionchange",u.input.hideSelectionGuard),setTimeout(function(){(!va(u)||u.state.selection.visible)&&u.dom.classList.remove("ProseMirror-hideselection")},20))})}function Nn(u){var m=u.domSelection();if(m){var c=u.cursorWrapper.dom,v=c.nodeName=="IMG";v?m.collapse(c.parentNode,xe(c)+1):m.collapse(c,0),!v&&!u.state.selection.visible&&Q&&ke<=11&&(c.disabled=!0,c.disabled=!1)}}function gi(u,m){if(m instanceof ae.NodeSelection){var c=u.docView.descAt(m.from);c!=u.lastSelectedViewDesc&&(ji(u),c&&c.selectNode(),u.lastSelectedViewDesc=c)}else ji(u)}function ji(u){u.lastSelectedViewDesc&&(u.lastSelectedViewDesc.parent&&u.lastSelectedViewDesc.deselectNode(),u.lastSelectedViewDesc=void 0)}function Dn(u,m,c,v){return u.someProp("createSelectionBetween",function(k){return k(u,m,c)})||ae.TextSelection.between(m,c,v)}function io(u){return u.editable&&!u.hasFocus()?!1:ao(u)}function ao(u){var m=u.domSelectionRange();if(!m.anchorNode)return!1;try{return u.dom.contains(m.anchorNode.nodeType==3?m.anchorNode.parentNode:m.anchorNode)&&(u.editable||u.dom.contains(m.focusNode.nodeType==3?m.focusNode.parentNode:m.focusNode))}catch{return!1}}function ri(u){var m=u.docView.domFromPos(u.state.selection.anchor,0),c=u.domSelectionRange();return Ye(m.node,m.offset,c.anchorNode,c.anchorOffset)}function Ln(u,m){var c=u.selection,v=c.$anchor,k=c.$head,w=m>0?v.max(k):v.min(k),A=w.parent.inlineContent?w.depth?u.doc.resolve(m>0?w.after():w.before()):null:w;return A&&ae.Selection.findFrom(A,m)}function Rn(u,m){return u.dispatch(u.state.tr.setSelection(m).scrollIntoView()),!0}function Gi(u,m,c){var v=u.state.selection;if(v instanceof ae.TextSelection)if(c.indexOf("s")>-1){var k=v.$head,w=k.textOffset?null:m<0?k.nodeBefore:k.nodeAfter;if(!w||w.isText||!w.isLeaf)return!1;var A=u.state.doc.resolve(k.pos+w.nodeSize*(m<0?-1:1));return Rn(u,new ae.TextSelection(v.$anchor,A))}else if(v.empty){if(u.endOfTextblock(m>0?"forward":"backward")){var M=Ln(u.state,m);return M&&M instanceof ae.NodeSelection?Rn(u,M):!1}else if(!(At&&c.indexOf("m")>-1)){var q=v.$head,V=q.textOffset?null:m<0?q.nodeBefore:q.nodeAfter,Z;if(!V||V.isText)return!1;var ue=m<0?q.pos-V.nodeSize:q.pos;return V.isAtom||(Z=u.docView.descAt(ue))&&!Z.contentDOM?ae.NodeSelection.isSelectable(V)?Rn(u,new ae.NodeSelection(m<0?u.state.doc.resolve(q.pos-V.nodeSize):q)):ar?Rn(u,new ae.TextSelection(u.state.doc.resolve(m<0?ue:ue+V.nodeSize))):!1:!1}}else return!1;else{if(v instanceof ae.NodeSelection&&v.node.isInline)return Rn(u,new ae.TextSelection(m>0?v.$to:v.$from));var re=Ln(u.state,m);return re?Rn(u,re):!1}}function yi(u){return u.nodeType==3?u.nodeValue.length:u.childNodes.length}function ni(u,m){var c=u.pmViewDesc;return c&&c.size==0&&(m<0||u.nextSibling||u.nodeName!="BR")}function yn(u,m){return m<0?ya(u):Xo(u)}function ya(u){var m=u.domSelectionRange(),c=m.focusNode,v=m.focusOffset;if(c){var k,w,A=!1;for(Ee&&c.nodeType==1&&v<yi(c)&&ni(c.childNodes[v],-1)&&(A=!0);;)if(v>0){if(c.nodeType!=1)break;var M=c.childNodes[v-1];if(ni(M,-1))k=c,w=--v;else if(M.nodeType==3)c=M,v=c.nodeValue.length;else break}else{if(ln(c))break;for(var q=c.previousSibling;q&&ni(q,-1);)k=c.parentNode,w=xe(q),q=q.previousSibling;if(q)c=q,v=yi(c);else{if(c=c.parentNode,c==u.dom)break;v=0}}A?Ki(u,c,v):k&&Ki(u,k,w)}}function Xo(u){var m=u.domSelectionRange(),c=m.focusNode,v=m.focusOffset;if(c){for(var k=yi(c),w,A;;)if(v<k){if(c.nodeType!=1)break;var M=c.childNodes[v];if(ni(M,1))w=c,A=++v;else break}else{if(ln(c))break;for(var q=c.nextSibling;q&&ni(q,1);)w=q.parentNode,A=xe(q)+1,q=q.nextSibling;if(q)c=q,v=0,k=yi(c);else{if(c=c.parentNode,c==u.dom)break;v=k=0}}w&&Ki(u,w,A)}}function ln(u){var m=u.pmViewDesc;return m&&m.node&&m.node.isBlock}function oo(u,m){for(;u&&m==u.childNodes.length&&!Ct(u);)m=xe(u)+1,u=u.parentNode;for(;u&&m<u.childNodes.length;){var c=u.childNodes[m];if(c.nodeType==3)return c;if(c.nodeType==1&&c.contentEditable=="false")break;u=c,m=0}}function so(u,m){for(;u&&!m&&!Ct(u);)m=xe(u),u=u.parentNode;for(;u&&m;){var c=u.childNodes[m-1];if(c.nodeType==3)return c;if(c.nodeType==1&&c.contentEditable=="false")break;u=c,m=u.childNodes.length}}function Ki(u,m,c){if(m.nodeType!=3){var v,k;(k=oo(m,c))?(m=k,c=0):(v=so(m,c))&&(m=v,c=v.nodeValue.length)}var w=u.domSelection();if(w){if(ft(w)){var A=document.createRange();A.setEnd(m,c),A.setStart(m,c),w.removeAllRanges(),w.addRange(A)}else w.extend&&w.extend(m,c);u.domObserver.setCurSelection();var M=u.state;setTimeout(function(){u.state==M&&sn(u)},50)}}function lo(u,m){var c=u.state.doc.resolve(m);if(!(nt||Xt)&&c.parent.inlineContent){var v=u.coordsAtPos(m);if(m>c.start()){var k=u.coordsAtPos(m-1),w=(k.top+k.bottom)/2;if(w>v.top&&w<v.bottom&&Math.abs(k.left-v.left)>1)return k.left<v.left?"ltr":"rtl"}if(m<c.end()){var A=u.coordsAtPos(m+1),M=(A.top+A.bottom)/2;if(M>v.top&&M<v.bottom&&Math.abs(A.left-v.left)>1)return A.left>v.left?"ltr":"rtl"}}var q=getComputedStyle(u.dom).direction;return q=="rtl"?"rtl":"ltr"}function ii(u,m,c){var v=u.state.selection;if(v instanceof ae.TextSelection&&!v.empty||c.indexOf("s")>-1||At&&c.indexOf("m")>-1)return!1;var k=v.$from,w=v.$to;if(!k.parent.inlineContent||u.endOfTextblock(m<0?"up":"down")){var A=Ln(u.state,m);if(A&&A instanceof ae.NodeSelection)return Rn(u,A)}if(!k.parent.inlineContent){var M=m<0?k:w,q=v instanceof ae.AllSelection?ae.Selection.near(M,m):ae.Selection.findFrom(M,m);return q?Rn(u,q):!1}return!1}function un(u,m){if(!(u.state.selection instanceof ae.TextSelection))return!0;var c=u.state.selection,v=c.$head,k=c.$anchor,w=c.empty;if(!v.sameParent(k))return!0;if(!w)return!1;if(u.endOfTextblock(m>0?"forward":"backward"))return!0;var A=!v.textOffset&&(m<0?v.nodeBefore:v.nodeAfter);if(A&&!A.isText){var M=u.state.tr;return m<0?M.delete(v.pos-A.nodeSize,v.pos):M.delete(v.pos,v.pos+A.nodeSize),u.dispatch(M),!0}return!1}function ba(u,m,c){u.domObserver.stop(),m.contentEditable=c,u.domObserver.start()}function uo(u){if(!ct||u.state.selection.$head.parentOffset>0)return!1;var m=u.domSelectionRange(),c=m.focusNode,v=m.focusOffset;if(c&&c.nodeType==1&&v==0&&c.firstChild&&c.firstChild.contentEditable=="false"){var k=c.firstChild;ba(u,k,"true"),setTimeout(function(){return ba(u,k,"false")},20)}return!1}function co(u){var m="";return u.ctrlKey&&(m+="c"),u.metaKey&&(m+="m"),u.altKey&&(m+="a"),u.shiftKey&&(m+="s"),m}function Zo(u,m){var c=m.keyCode,v=co(m);if(c==8||At&&c==72&&v=="c")return un(u,-1)||yn(u,-1);if(c==46&&!m.shiftKey||At&&c==68&&v=="c")return un(u,1)||yn(u,1);if(c==13||c==27)return!0;if(c==37||At&&c==66&&v=="c"){var k=c==37?lo(u,u.state.selection.from)=="ltr"?-1:1:-1;return Gi(u,k,v)||yn(u,k)}else if(c==39||At&&c==70&&v=="c"){var w=c==39?lo(u,u.state.selection.from)=="ltr"?1:-1:1;return Gi(u,w,v)||yn(u,w)}else{if(c==38||At&&c==80&&v=="c")return ii(u,-1,v)||yn(u,-1);if(c==40||At&&c==78&&v=="c")return uo(u)||ii(u,1,v)||yn(u,1);if(v==(At?"m":"c")&&(c==66||c==73||c==89||c==90))return!0}return!1}function tt(u,m){u.someProp("transformCopied",function(Re){m=Re(m,u)});for(var c=[],v=m,k=v.content,w=v.openStart,A=v.openEnd;w>1&&A>1&&k.childCount==1&&k.firstChild.childCount==1;){w--,A--;var M=k.firstChild;c.push(M.type.name,M.attrs!=M.type.defaultAttrs?M.attrs:null),k=M.content}var q=u.someProp("clipboardSerializer")||le.DOMSerializer.fromSchema(u.state.schema),V=ka(),Z=V.createElement("div");Z.appendChild(q.serializeFragment(k,{document:V}));for(var ue=Z.firstChild,re,ge=0;ue&&ue.nodeType==1&&(re=ai[ue.nodeName.toLowerCase()]);){for(var Me=re.length-1;Me>=0;Me--){for(var Fe=V.createElement(re[Me]);Z.firstChild;)Fe.appendChild(Z.firstChild);Z.appendChild(Fe),ge++}ue=Z.firstChild}ue&&ue.nodeType==1&&ue.setAttribute("data-pm-slice","".concat(w," ").concat(A).concat(ge?" -".concat(ge):""," ").concat(JSON.stringify(c)));var je=u.someProp("clipboardTextSerializer",function(Re){return Re(m,u)})||m.content.textBetween(0,m.content.size,`
|
|
649
|
-
|
|
650
|
-
`);return{dom:Z,text:je,slice:m}}function fe(u,m,c,v,k){var w=k.parent.type.spec.code,A,M;if(!c&&!m)return null;var q=!!m&&(v||w||!c);if(q){if(u.someProp("transformPastedText",function(Ft){m=Ft(m,w||v,u)}),w)return M=new le.Slice(le.Fragment.from(u.state.schema.text(m.replace(/\r\n?/g,`
|
|
651
|
-
`))),0,0),u.someProp("transformPasted",function(Ft){M=Ft(M,u,!0)}),M;var V=u.someProp("clipboardTextParser",function(Ft){return Ft(m,k,v,u)});if(V)M=V;else{var Z=k.marks(),ue=u.state.schema,re=le.DOMSerializer.fromSchema(ue);A=document.createElement("div"),m.split(/(?:\r\n?|\n)+/).forEach(function(Ft){var _t=A.appendChild(document.createElement("p"));Ft&&_t.appendChild(re.serializeNode(ue.text(Ft,Z)))})}}else u.someProp("transformPastedHTML",function(Ft){c=Ft(c,u)}),A=nc(c),ar&&ic(A);var ge=A&&A.querySelector("[data-pm-slice]"),Me=ge&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(ge.getAttribute("data-pm-slice")||"");if(Me&&Me[3])for(var Fe=+Me[3];Fe>0;Fe--){for(var je=A.firstChild;je&&je.nodeType!=1;)je=je.nextSibling;if(!je)break;A=je}if(!M){var Re=u.someProp("clipboardParser")||u.someProp("domParser")||le.DOMParser.fromSchema(u.state.schema);M=Re.parseSlice(A,{preserveWhitespace:!!(q||Me),context:k,ruleFromNode:function(_t){return _t.nodeName=="BR"&&!_t.nextSibling&&_t.parentNode&&!Be.test(_t.parentNode.nodeName)?{ignore:!0}:null}})}if(Me)M=ac(cn(M,+Me[1],+Me[2]),Me[4]);else if(M=le.Slice.maxOpen(Xe(M.content,k),!0),M.openStart||M.openEnd){for(var bt=0,gt=0,st=M.content.firstChild;bt<M.openStart&&!st.type.spec.isolating;bt++,st=st.firstChild);for(var vt=M.content.lastChild;gt<M.openEnd&&!vt.type.spec.isolating;gt++,vt=vt.lastChild);M=cn(M,bt,gt)}return u.someProp("transformPasted",function(Ft){M=Ft(M,u,q)}),M}var Be=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Xe(u,m){if(u.childCount<2)return u;for(var c=function(){var A=m.node(k),M=A.contentMatchAt(m.index(k)),q,V=[];if(u.forEach(function(Z){if(V){var ue=M.findWrapping(Z.type),re;if(!ue)return V=null;if(re=V.length&&q.length&&sr(ue,q,Z,V[V.length-1],0))V[V.length-1]=re;else{V.length&&(V[V.length-1]=lr(V[V.length-1],q.length));var ge=Lt(Z,ue);V.push(ge),M=M.matchType(ge.type),q=ue}}}),V)return{v:le.Fragment.from(V)}},v,k=m.depth;k>=0;k--)if(v=c(),v)return v.v;return u}function Lt(u,m){for(var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,v=m.length-1;v>=c;v--)u=m[v].create(null,le.Fragment.from(u));return u}function sr(u,m,c,v,k){if(k<u.length&&k<m.length&&u[k]==m[k]){var w=sr(u,m,c,v.lastChild,k+1);if(w)return v.copy(v.content.replaceChild(v.childCount-1,w));var A=v.contentMatchAt(v.childCount);if(A.matchType(k==u.length-1?c.type:u[k+1]))return v.copy(v.content.append(le.Fragment.from(Lt(c,u,k+1))))}}function lr(u,m){if(m==0)return u;var c=u.content.replaceChild(u.childCount-1,lr(u.lastChild,m-1)),v=u.contentMatchAt(u.childCount).fillBefore(le.Fragment.empty,!0);return u.copy(c.append(v))}function nr(u,m,c,v,k,w){var A=m<0?u.firstChild:u.lastChild,M=A.content;return u.childCount>1&&(w=0),k<v-1&&(M=nr(M,m,c,v,k+1,w)),k>=c&&(M=m<0?A.contentMatchAt(0).fillBefore(M,w<=k).append(M):M.append(A.contentMatchAt(A.childCount).fillBefore(le.Fragment.empty,!0))),u.replaceChild(m<0?0:u.childCount-1,A.copy(M))}function cn(u,m,c){return m<u.openStart&&(u=new le.Slice(nr(u.content,-1,m,u.openStart,0,u.openEnd),m,u.openEnd)),c<u.openEnd&&(u=new le.Slice(nr(u.content,1,c,u.openEnd,0,0),u.openStart,c)),u}var ai={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function ka(){return document.implementation.createHTMLDocument("title")}var wa=null;function Gs(u){var m=window.trustedTypes;return m?(wa||(wa=m.defaultPolicy||m.createPolicy("ProseMirrorClipboard",{createHTML:function(v){return v}})),wa.createHTML(u)):u}function nc(u){var m=/^(\s*<meta [^>]*>)*/.exec(u);m&&(u=u.slice(m[0].length));var c=ka(),v=c.body,k=/<([a-z][^>\s]+)/i.exec(u),w;if((w=k&&ai[k[1].toLowerCase()])&&(u=w.map(function(ge){return"<"+ge+">"}).join("")+u+w.map(function(ge){return"</"+ge+">"}).reverse().join("")),v.innerHTML=Gs(u),w)for(var A=0;A<w.length;A++)v=v.querySelector(w[A])||v;for(var M=0;M<c.styleSheets.length;M++)for(var q=c.styleSheets[M],V=0;V<q.rules.length;V++){var Z=q.rules[V];if(Z instanceof CSSStyleRule)for(var ue=v.querySelectorAll(Z.selectorText),re=0;re<ue.length;re++)ue[re].style.cssText+=Z.style.cssText}return v}function ic(u){for(var m=u.querySelectorAll(nt?"span:not([class]):not([style])":"span.Apple-converted-space"),c=0;c<m.length;c++){var v=m[c];v.childNodes.length==1&&v.textContent==" "&&v.parentNode&&v.parentNode.replaceChild(u.ownerDocument.createTextNode(" "),v)}}function ac(u,m){if(!u.size)return u;var c=u.content.firstChild.type.schema,v;try{v=JSON.parse(m)}catch{return u}for(var k=u.content,w=u.openStart,A=u.openEnd,M=v.length-2;M>=0;M-=2){var q=c.nodes[v[M]];if(!q||q.hasRequiredAttrs())break;k=le.Fragment.from(q.create(v[M+1],k)),w++,A++}return new le.Slice(k,w,A)}var Rr={},Ir={},oc={touchstart:!0,touchmove:!0},sc=ee(function u(){_(this,u),this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null});function lc(u){var m=function(){var k=Rr[c];u.dom.addEventListener(c,u.input.eventHandlers[c]=function(w){cc(u,w)&&!es(u,w)&&(u.editable||!(w.type in Ir))&&k(u,w)},oc[c]?{passive:!0}:void 0)};for(var c in Rr)m();ct&&u.dom.addEventListener("input",function(){return null}),Qo(u)}function $n(u,m){u.input.lastSelectionOrigin=m,u.input.lastSelectionTime=Date.now()}function uc(u){u.input.mouseDown&&u.input.mouseDown.done(),u.domObserver.stop();for(var m in u.input.eventHandlers)u.dom.removeEventListener(m,u.input.eventHandlers[m]);clearTimeout(u.input.composingTimeout),clearTimeout(u.input.lastIOSEnterFallbackTimeout)}function Qo(u){u.someProp("handleDOMEvents",function(m){for(var c in m)u.input.eventHandlers[c]||u.dom.addEventListener(c,u.input.eventHandlers[c]=function(v){return es(u,v)})})}function es(u,m){return u.someProp("handleDOMEvents",function(c){var v=c[m.type];return v?v(u,m)||m.defaultPrevented:!1})}function cc(u,m){if(!m.bubbles)return!0;if(m.defaultPrevented)return!1;for(var c=m.target;c!=u.dom;c=c.parentNode)if(!c||c.nodeType==11||c.pmViewDesc&&c.pmViewDesc.stopEvent(m))return!1;return!0}function fc(u,m){!es(u,m)&&Rr[m.type]&&(u.editable||!(m.type in Ir))&&Rr[m.type](u,m)}Ir.keydown=function(u,m){var c=m;if(u.input.shiftKey=c.keyCode==16||c.shiftKey,!Xs(u)&&(u.input.lastKeyCode=c.keyCode,u.input.lastKeyCodeTime=Date.now(),!(Nt&&nt&&c.keyCode==13)))if(c.keyCode!=229&&u.domObserver.forceFlush(),zt&&c.keyCode==13&&!c.ctrlKey&&!c.altKey&&!c.metaKey){var v=Date.now();u.input.lastIOSEnter=v,u.input.lastIOSEnterFallbackTimeout=setTimeout(function(){u.input.lastIOSEnter==v&&(u.someProp("handleKeyDown",function(k){return k(u,Mt(13,"Enter"))}),u.input.lastIOSEnter=0)},200)}else u.someProp("handleKeyDown",function(k){return k(u,c)})||Zo(u,c)?c.preventDefault():$n(u,"key")},Ir.keyup=function(u,m){m.keyCode==16&&(u.input.shiftKey=!1)},Ir.keypress=function(u,m){var c=m;if(!(Xs(u)||!c.charCode||c.ctrlKey&&!c.altKey||At&&c.metaKey)){if(u.someProp("handleKeyPress",function(A){return A(u,c)})){c.preventDefault();return}var v=u.state.selection;if(!(v instanceof ae.TextSelection)||!v.$from.sameParent(v.$to)){var k=String.fromCharCode(c.charCode),w=function(){return u.state.tr.insertText(k).scrollIntoView()};!/[\r\n]/.test(k)&&!u.someProp("handleTextInput",function(A){return A(u,v.$from.pos,v.$to.pos,k,w)})&&u.dispatch(w()),c.preventDefault()}}};function Ca(u){return{left:u.clientX,top:u.clientY}}function dc(u,m){var c=m.x-u.clientX,v=m.y-u.clientY;return c*c+v*v<100}function ts(u,m,c,v,k){if(v==-1)return!1;for(var w=u.state.doc.resolve(v),A=function(Z){if(u.someProp(m,function(ue){return Z>w.depth?ue(u,c,w.nodeAfter,w.before(Z),k,!0):ue(u,c,w.node(Z),w.before(Z),k,!1)}))return{v:!0}},M,q=w.depth+1;q>0;q--)if(M=A(q),M)return M.v;return!1}function Ta(u,m,c){if(u.focused||u.focus(),!u.state.selection.eq(m)){var v=u.state.tr.setSelection(m);v.setMeta("pointer",!0),u.dispatch(v)}}function hc(u,m){if(m==-1)return!1;var c=u.state.doc.resolve(m),v=c.nodeAfter;return v&&v.isAtom&&ae.NodeSelection.isSelectable(v)?(Ta(u,new ae.NodeSelection(c)),!0):!1}function pc(u,m){if(m==-1)return!1;var c=u.state.selection,v,k;c instanceof ae.NodeSelection&&(v=c.node);for(var w=u.state.doc.resolve(m),A=w.depth+1;A>0;A--){var M=A>w.depth?w.nodeAfter:w.node(A);if(ae.NodeSelection.isSelectable(M)){v&&c.$from.depth>0&&A>=c.$from.depth&&w.before(c.$from.depth+1)==c.$from.pos?k=w.before(c.$from.depth):k=w.before(A);break}}return k!=null?(Ta(u,ae.NodeSelection.create(u.state.doc,k)),!0):!1}function vc(u,m,c,v,k){return ts(u,"handleClickOn",m,c,v)||u.someProp("handleClick",function(w){return w(u,m,v)})||(k?pc(u,c):hc(u,c))}function mc(u,m,c,v){return ts(u,"handleDoubleClickOn",m,c,v)||u.someProp("handleDoubleClick",function(k){return k(u,m,v)})}function gc(u,m,c,v){return ts(u,"handleTripleClickOn",m,c,v)||u.someProp("handleTripleClick",function(k){return k(u,m,v)})||yc(u,c,v)}function yc(u,m,c){if(c.button!=0)return!1;var v=Ks(u,m,!0),k=u.state.doc;return v?(Ta(u,v),v instanceof ae.TextSelection&&k.eq(u.state.doc)&&(u.input.mouseDown=new kc(u,v)),!0):!1}function Ks(u,m,c){var v=u.state.doc;if(m==-1)return v.inlineContent?ae.TextSelection.create(v,0,v.content.size):null;for(var k=v.resolve(m),w=k.depth+1;w>0;w--){var A=w>k.depth?k.nodeAfter:k.node(w),M=k.before(w);if(A.inlineContent)return ae.TextSelection.create(v,M+1,M+1+A.content.size);if(c&&ae.NodeSelection.isSelectable(A))return ae.NodeSelection.create(v,M)}return null}function rs(u){return Sa(u)}var Js=At?"metaKey":"ctrlKey";Rr.mousedown=function(u,m){var c=m;u.input.shiftKey=c.shiftKey;var v=rs(u),k=Date.now(),w="singleClick";k-u.input.lastClick.time<500&&dc(c,u.input.lastClick)&&!c[Js]&&u.input.lastClick.button==c.button&&(u.input.lastClick.type=="singleClick"?w="doubleClick":u.input.lastClick.type=="doubleClick"&&(w="tripleClick")),u.input.lastClick={time:k,x:c.clientX,y:c.clientY,type:w,button:c.button},u.input.mouseDown&&u.input.mouseDown.done();var A=u.posAtCoords(Ca(c));A&&(w=="singleClick"?u.input.mouseDown=new bc(u,A,c,!!v):(w=="doubleClick"?mc:gc)(u,A.pos,A.inside,c)?c.preventDefault():$n(u,"pointer"))};var Ys=(function(){function u(m){_(this,u),this.view=m,this.mightDrag=null,m.root.addEventListener("mouseup",this.up=this.up.bind(this)),m.root.addEventListener("mousemove",this.move=this.move.bind(this))}return ee(u,[{key:"up",value:function(c){this.done()}},{key:"move",value:function(c){c.buttons==0&&this.done()}},{key:"done",value:function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}},{key:"delaySelUpdate",value:function(){return!1}}]),u})(),bc=(function(u){f(c,u);var m=b(c);function c(v,k,w,A){var M;_(this,c),M=m.call(this,v),M.pos=k,M.event=w,M.flushed=A,M.delayedSelectionSync=!1,M.startDoc=v.state.doc,M.selectNode=!!w[Js],M.allowDefault=w.shiftKey;var q,V;if(k.inside>-1)q=v.state.doc.nodeAt(k.inside),V=k.inside;else{var Z=v.state.doc.resolve(k.pos);q=Z.parent,V=Z.depth?Z.before():0}var ue=A?null:w.target,re=ue?v.docView.nearestDesc(ue,!0):null;M.target=re&&re.nodeDOM.nodeType==1?re.nodeDOM:null;var ge=v.state.selection;return w.button==0&&(q.type.spec.draggable&&q.type.spec.selectable!==!1||ge instanceof ae.NodeSelection&&ge.from<=V&&ge.to>V)&&(M.mightDrag={node:q,pos:V,addAttr:!!(M.target&&!M.target.draggable),setUneditable:!!(M.target&&Ee&&!M.target.hasAttribute("contentEditable"))}),M.target&&M.mightDrag&&(M.mightDrag.addAttr||M.mightDrag.setUneditable)&&(M.view.domObserver.stop(),M.mightDrag.addAttr&&(M.target.draggable=!0),M.mightDrag.setUneditable&&setTimeout(function(){M.view.input.mouseDown==x(M)&&M.target.setAttribute("contentEditable","false")},20),M.view.domObserver.start()),$n(v,"pointer"),M}return ee(c,[{key:"done",value:function(){var k=this;s(B(c.prototype),"done",this).call(this),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(function(){k.view.isDestroyed||sn(k.view)})}},{key:"up",value:function(k){if(this.done(),!!this.view.dom.contains(k.target)){var w=this.pos;this.view.state.doc!=this.startDoc&&(w=this.view.posAtCoords(Ca(k))),this.updateAllowDefault(k),this.allowDefault||!w?$n(this.view,"pointer"):vc(this.view,w.pos,w.inside,k,this.selectNode)?k.preventDefault():k.button==0&&(this.flushed||ct&&this.mightDrag&&!this.mightDrag.node.isAtom||nt&&!this.view.state.selection.visible&&Math.min(Math.abs(w.pos-this.view.state.selection.from),Math.abs(w.pos-this.view.state.selection.to))<=2)?(Ta(this.view,ae.Selection.near(this.view.state.doc.resolve(w.pos))),k.preventDefault()):$n(this.view,"pointer")}}},{key:"move",value:function(k){this.updateAllowDefault(k),$n(this.view,"pointer"),s(B(c.prototype),"move",this).call(this,k)}},{key:"updateAllowDefault",value:function(k){!this.allowDefault&&(Math.abs(this.event.x-k.clientX)>4||Math.abs(this.event.y-k.clientY)>4)&&(this.allowDefault=!0)}},{key:"delaySelUpdate",value:function(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}}]),c})(Ys),kc=(function(u){f(c,u);var m=b(c);function c(v,k){var w;return _(this,c),w=m.call(this,v),w.startSelection=k,w.startDoc=v.state.doc,w}return ee(c,[{key:"move",value:function(k){if(k.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}k.preventDefault(),$n(this.view,"pointer");var w=this.view.posAtCoords(Ca(k)),A=w&&Ks(this.view,w.inside,!1);if(A){var M=this.view.state.doc,q=this.startSelection,V=A.from<q.from?[q.to,A.from]:[q.from,A.to],Z=r(V,2),ue=Z[0],re=Z[1];Ta(this.view,ae.TextSelection.create(M,ue,re))}}}]),c})(Ys);Rr.touchstart=function(u){u.input.lastTouch=Date.now(),rs(u),$n(u,"pointer")},Rr.touchmove=function(u){u.input.lastTouch=Date.now(),$n(u,"pointer")},Rr.contextmenu=function(u){return rs(u)};function Xs(u,m){return u.composing?!0:ct&&Math.abs(Date.now()-u.input.compositionEndedAt)<500?(u.input.compositionEndedAt=-2e8,!0):!1}var wc=Nt?5e3:-1;Ir.compositionstart=Ir.compositionupdate=function(u){if(!u.composing){u.domObserver.flush();var m=u.state,c=m.selection.$to;if(m.selection instanceof ae.TextSelection&&(m.storedMarks||!c.textOffset&&c.parentOffset&&c.nodeBefore.marks.some(function(q){return q.type.spec.inclusive===!1})||nt&&Xt&&Cc(u)))u.markCursor=u.state.storedMarks||c.marks(),Sa(u,!0),u.markCursor=null;else if(Sa(u,!m.selection.empty),Ee&&m.selection.empty&&c.parentOffset&&!c.textOffset&&c.nodeBefore.marks.length)for(var v=u.domSelectionRange(),k=v.focusNode,w=v.focusOffset;k&&k.nodeType==1&&w!=0;){var A=w<0?k.lastChild:k.childNodes[w-1];if(!A)break;if(A.nodeType==3){var M=u.domSelection();M&&M.collapse(A,A.nodeValue.length);break}else k=A,w=-1}u.input.composing=!0}Zs(u,wc)};function Cc(u){var m=u.domSelectionRange(),c=m.focusNode,v=m.focusOffset;if(!c||c.nodeType!=1||v>=c.childNodes.length)return!1;var k=c.childNodes[v];return k.nodeType==1&&k.contentEditable=="false"}Ir.compositionend=function(u,m){u.composing&&(u.input.composing=!1,u.input.compositionEndedAt=Date.now(),u.input.compositionPendingChanges=u.domObserver.pendingRecords().length?u.input.compositionID:0,u.input.compositionNode=null,u.input.badSafariComposition?u.domObserver.forceFlush():u.input.compositionPendingChanges&&Promise.resolve().then(function(){return u.domObserver.flush()}),u.input.compositionID++,Zs(u,20))};function Zs(u,m){clearTimeout(u.input.composingTimeout),m>-1&&(u.input.composingTimeout=setTimeout(function(){return Sa(u)},m))}function Qs(u){for(u.composing&&(u.input.composing=!1,u.input.compositionEndedAt=Date.now());u.input.compositionNodes.length>0;)u.input.compositionNodes.pop().markParentsDirty()}function Tc(u){var m=u.domSelectionRange();if(!m.focusNode)return null;var c=Bt(m.focusNode,m.focusOffset),v=$t(m.focusNode,m.focusOffset);if(c&&v&&c!=v){var k=v.pmViewDesc,w=u.domObserver.lastChangedTextNode;if(c==w||v==w)return w;if(!k||!k.isText(v.nodeValue))return v;if(u.input.compositionNode==v){var A=c.pmViewDesc;if(!(!A||!A.isText(c.nodeValue)))return v}}return c||v}function Sa(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!(Nt&&u.domObserver.flushingSoon>=0)){if(u.domObserver.forceFlush(),Qs(u),m||u.docView&&u.docView.dirty){var c=On(u),v=u.state.selection;return c&&!c.eq(v)?u.dispatch(u.state.tr.setSelection(c)):(u.markCursor||m)&&!v.$from.node(v.$from.sharedDepth(v.to)).inlineContent?u.dispatch(u.state.tr.deleteSelection()):u.updateState(u.state),!0}return!1}}function Sc(u,m){if(u.dom.parentNode){var c=u.dom.parentNode.appendChild(document.createElement("div"));c.appendChild(m),c.style.cssText="position: fixed; left: -10000px; top: 10px";var v=getSelection(),k=document.createRange();k.selectNodeContents(m),u.dom.blur(),v.removeAllRanges(),v.addRange(k),setTimeout(function(){c.parentNode&&c.parentNode.removeChild(c),u.focus()},50)}}var xa=Q&&ke<15||zt&&En<604;Rr.copy=Ir.cut=function(u,m){var c=m,v=u.state.selection,k=c.type=="cut";if(!v.empty){var w=xa?null:c.clipboardData,A=v.content(),M=tt(u,A),q=M.dom,V=M.text;w?(c.preventDefault(),w.clearData(),w.setData("text/html",q.innerHTML),w.setData("text/plain",V)):Sc(u,q),k&&u.dispatch(u.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}};function xc(u){return u.openStart==0&&u.openEnd==0&&u.content.childCount==1?u.content.firstChild:null}function Ec(u,m){if(u.dom.parentNode){var c=u.input.shiftKey||u.state.selection.$from.parent.type.spec.code,v=u.dom.parentNode.appendChild(document.createElement(c?"textarea":"div"));c||(v.contentEditable="true"),v.style.cssText="position: fixed; left: -10000px; top: 10px",v.focus();var k=u.input.shiftKey&&u.input.lastKeyCode!=45;setTimeout(function(){u.focus(),v.parentNode&&v.parentNode.removeChild(v),c?Ea(u,v.value,null,k,m):Ea(u,v.textContent,v.innerHTML,k,m)},50)}}function Ea(u,m,c,v,k){var w=fe(u,m,c,v,u.state.selection.$from);if(u.someProp("handlePaste",function(q){return q(u,k,w||le.Slice.empty)}))return!0;if(!w)return!1;var A=xc(w),M=A?u.state.tr.replaceSelectionWith(A,v):u.state.tr.replaceSelection(w);return u.dispatch(M.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function el(u){var m=u.getData("text/plain")||u.getData("Text");if(m)return m;var c=u.getData("text/uri-list");return c?c.replace(/\r?\n/g," "):""}Ir.paste=function(u,m){var c=m;if(!(u.composing&&!Nt)){var v=xa?null:c.clipboardData,k=u.input.shiftKey&&u.input.lastKeyCode!=45;v&&Ea(u,el(v),v.getData("text/html"),k,c)?c.preventDefault():Ec(u,c)}};var tl=ee(function u(m,c,v){_(this,u),this.slice=m,this.move=c,this.node=v}),Mc=At?"altKey":"ctrlKey";function rl(u,m){var c;return u.someProp("dragCopies",function(v){c=c||v(m)}),c!=null?!c:!m[Mc]}Rr.dragstart=function(u,m){var c=m,v=u.input.mouseDown;if(v&&v.done(),!!c.dataTransfer){var k=u.state.selection,w=k.empty?null:u.posAtCoords(Ca(c)),A;if(!(w&&w.pos>=k.from&&w.pos<=(k instanceof ae.NodeSelection?k.to-1:k.to))){if(v&&v.mightDrag)A=ae.NodeSelection.create(u.state.doc,v.mightDrag.pos);else if(c.target&&c.target.nodeType==1){var M=u.docView.nearestDesc(c.target,!0);M&&M.node.type.spec.draggable&&M!=u.docView&&(A=ae.NodeSelection.create(u.state.doc,M.posBefore))}}var q=(A||u.state.selection).content(),V=tt(u,q),Z=V.dom,ue=V.text,re=V.slice;(!c.dataTransfer.files.length||!nt||yt>120)&&c.dataTransfer.clearData(),c.dataTransfer.setData(xa?"Text":"text/html",Z.innerHTML),c.dataTransfer.effectAllowed="copyMove",xa||c.dataTransfer.setData("text/plain",ue),u.dragging=new tl(re,rl(u,c),A)}},Rr.dragend=function(u){var m=u.dragging;window.setTimeout(function(){u.dragging==m&&(u.dragging=null)},50)},Ir.dragover=Ir.dragenter=function(u,m){return m.preventDefault()},Ir.drop=function(u,m){try{Ac(u,m,u.dragging)}finally{u.dragging=null}};function Ac(u,m,c){if(m.dataTransfer){var v=u.posAtCoords(Ca(m));if(v){var k=u.state.doc.resolve(v.pos),w=c&&c.slice;w?u.someProp("transformPasted",function(Fe){w=Fe(w,u,!1)}):w=fe(u,el(m.dataTransfer),xa?null:m.dataTransfer.getData("text/html"),!1,k);var A=!!(c&&rl(u,m));if(u.someProp("handleDrop",function(Fe){return Fe(u,m,w||le.Slice.empty,A)})){m.preventDefault();return}if(w){m.preventDefault();var M=w?Te.dropPoint(u.state.doc,k.pos,w):k.pos;M==null&&(M=k.pos);var q=u.state.tr;if(A){var V=c.node;V?V.replace(q):q.deleteSelection()}var Z=q.mapping.map(M),ue=w.openStart==0&&w.openEnd==0&&w.content.childCount==1,re=q.doc;if(ue?q.replaceRangeWith(Z,Z,w.content.firstChild):q.replaceRange(Z,Z,w),!q.doc.eq(re)){var ge=q.doc.resolve(Z);if(ue&&ae.NodeSelection.isSelectable(w.content.firstChild)&&ge.nodeAfter&&ge.nodeAfter.sameMarkup(w.content.firstChild))q.setSelection(new ae.NodeSelection(ge));else{var Me=q.mapping.map(M);q.mapping.maps[q.mapping.maps.length-1].forEach(function(Fe,je,Re,bt){return Me=bt}),q.setSelection(Dn(u,ge,q.doc.resolve(Me)))}u.focus(),u.dispatch(q.setMeta("uiEvent","drop"))}}}}}Rr.focus=function(u){u.input.lastFocus=Date.now(),u.focused||(u.domObserver.stop(),u.dom.classList.add("ProseMirror-focused"),u.domObserver.start(),u.focused=!0,setTimeout(function(){u.docView&&u.hasFocus()&&!u.domObserver.currentSelection.eq(u.domSelectionRange())&&sn(u)},20))},Rr.blur=function(u,m){var c=m;u.focused&&(u.domObserver.stop(),u.dom.classList.remove("ProseMirror-focused"),u.domObserver.start(),c.relatedTarget&&u.dom.contains(c.relatedTarget)&&u.domObserver.currentSelection.clear(),u.focused=!1)},Rr.beforeinput=function(u,m){var c=m;if(nt&&Nt&&c.inputType=="deleteContentBackward"){u.domObserver.flushSoon();var v=u.input.domChangeCount;setTimeout(function(){if(u.input.domChangeCount==v&&(u.dom.blur(),u.focus(),!u.someProp("handleKeyDown",function(w){return w(u,Mt(8,"Backspace"))}))){var k=u.state.selection.$cursor;k&&k.pos>0&&u.dispatch(u.state.tr.delete(k.pos-1,k.pos).scrollIntoView())}},50)}};for(var nl in Ir)Rr[nl]=Ir[nl];function Ma(u,m){if(u==m)return!0;for(var c in u)if(u[c]!==m[c])return!1;for(var v in m)if(!(v in u))return!1;return!0}var il=(function(){function u(m,c){_(this,u),this.toDOM=m,this.spec=c||ki,this.side=this.spec.side||0}return ee(u,[{key:"map",value:function(c,v,k,w){var A=c.mapResult(v.from+w,this.side<0?-1:1),M=A.pos,q=A.deleted;return q?null:new bi(M-k,M-k,this)}},{key:"valid",value:function(){return!0}},{key:"eq",value:function(c){return this==c||c instanceof u&&(this.spec.key&&this.spec.key==c.spec.key||this.toDOM==c.toDOM&&Ma(this.spec,c.spec))}},{key:"destroy",value:function(c){this.spec.destroy&&this.spec.destroy(c)}}]),u})(),Aa=(function(){function u(m,c){_(this,u),this.attrs=m,this.spec=c||ki}return ee(u,[{key:"map",value:function(c,v,k,w){var A=c.map(v.from+w,this.spec.inclusiveStart?-1:1)-k,M=c.map(v.to+w,this.spec.inclusiveEnd?1:-1)-k;return A>=M?null:new bi(A,M,this)}},{key:"valid",value:function(c,v){return v.from<v.to}},{key:"eq",value:function(c){return this==c||c instanceof u&&Ma(this.attrs,c.attrs)&&Ma(this.spec,c.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(c){return c.type instanceof u}}]),u})(),Oc=(function(){function u(m,c){_(this,u),this.attrs=m,this.spec=c||ki}return ee(u,[{key:"map",value:function(c,v,k,w){var A=c.mapResult(v.from+w,1);if(A.deleted)return null;var M=c.mapResult(v.to+w,-1);return M.deleted||M.pos<=A.pos?null:new bi(A.pos-k,M.pos-k,this)}},{key:"valid",value:function(c,v){var k=c.content.findIndex(v.from),w=k.index,A=k.offset,M;return A==v.from&&!(M=c.child(w)).isText&&A+M.nodeSize==v.to}},{key:"eq",value:function(c){return this==c||c instanceof u&&Ma(this.attrs,c.attrs)&&Ma(this.spec,c.spec)}},{key:"destroy",value:function(){}}]),u})(),bi=(function(){function u(m,c,v){_(this,u),this.from=m,this.to=c,this.type=v}return ee(u,[{key:"copy",value:function(c,v){return new u(c,v,this.type)}},{key:"eq",value:function(c){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this.type.eq(c.type)&&this.from+v==c.from&&this.to+v==c.to}},{key:"map",value:function(c,v,k){return this.type.map(c,this,v,k)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof Aa}},{key:"widget",get:function(){return this.type instanceof il}}],[{key:"widget",value:function(c,v,k){return new u(c,c,new il(v,k))}},{key:"inline",value:function(c,v,k,w){return new u(c,v,new Aa(k,w))}},{key:"node",value:function(c,v,k,w){return new u(c,v,new Oc(k,w))}}]),u})(),Ji=[],ki={},bn=(function(){function u(m,c){_(this,u),this.local=m.length?m:Ji,this.children=c.length?c:Ji}return ee(u,[{key:"find",value:function(c,v,k){var w=[];return this.findInner(c??0,v??1e9,w,0,k),w}},{key:"findInner",value:function(c,v,k,w,A){for(var M=0;M<this.local.length;M++){var q=this.local[M];q.from<=v&&q.to>=c&&(!A||A(q.spec))&&k.push(q.copy(q.from+w,q.to+w))}for(var V=0;V<this.children.length;V+=3)if(this.children[V]<v&&this.children[V+1]>c){var Z=this.children[V]+1;this.children[V+2].findInner(c-Z,v-Z,k,w+Z,A)}}},{key:"map",value:function(c,v,k){return this==Sr||c.maps.length==0?this:this.mapInner(c,v,0,0,k||ki)}},{key:"mapInner",value:function(c,v,k,w,A){for(var M,q=0;q<this.local.length;q++){var V=this.local[q].map(c,k,w);V&&V.type.valid(v,V)?(M||(M=[])).push(V):A.onRemove&&A.onRemove(this.local[q].spec)}return this.children.length?Nc(this.children,M||[],c,v,k,w,A):M?new u(M.sort(wi),Ji):Sr}},{key:"add",value:function(c,v){return v.length?this==Sr?u.create(c,v):this.addInner(c,v,0):this}},{key:"addInner",value:function(c,v,k){var w=this,A,M=0;c.forEach(function(Z,ue){var re=ue+k,ge;if(ge=sl(v,Z,re)){for(A||(A=w.children.slice());M<A.length&&A[M]<ue;)M+=3;A[M]==ue?A[M+2]=A[M+2].addInner(Z,ge,re+1):A.splice(M,0,ue,ue+Z.nodeSize,fo(ge,Z,re+1,ki)),M+=3}});for(var q=ol(M?ll(v):v,-k),V=0;V<q.length;V++)q[V].type.valid(c,q[V])||q.splice(V--,1);return new u(q.length?this.local.concat(q).sort(wi):this.local,A||this.children)}},{key:"remove",value:function(c){return c.length==0||this==Sr?this:this.removeInner(c,0)}},{key:"removeInner",value:function(c,v){for(var k=this.children,w=this.local,A=0;A<k.length;A+=3){for(var M=void 0,q=k[A]+v,V=k[A+1]+v,Z=0,ue;Z<c.length;Z++)(ue=c[Z])&&ue.from>q&&ue.to<V&&(c[Z]=null,(M||(M=[])).push(ue));if(M){k==this.children&&(k=this.children.slice());var re=k[A+2].removeInner(M,q+1);re!=Sr?k[A+2]=re:(k.splice(A,3),A-=3)}}if(w.length){for(var ge=0,Me;ge<c.length;ge++)if(Me=c[ge])for(var Fe=0;Fe<w.length;Fe++)w[Fe].eq(Me,v)&&(w==this.local&&(w=this.local.slice()),w.splice(Fe--,1))}return k==this.children&&w==this.local?this:w.length||k.length?new u(w,k):Sr}},{key:"forChild",value:function(c,v){if(this==Sr)return this;if(v.isLeaf)return u.empty;for(var k,w,A=0;A<this.children.length;A+=3)if(this.children[A]>=c){this.children[A]==c&&(k=this.children[A+2]);break}for(var M=c+1,q=M+v.content.size,V=0;V<this.local.length;V++){var Z=this.local[V];if(Z.from<q&&Z.to>M&&Z.type instanceof Aa){var ue=Math.max(M,Z.from)-M,re=Math.min(q,Z.to)-M;ue<re&&(w||(w=[])).push(Z.copy(ue,re))}}if(w){var ge=new u(w.sort(wi),Ji);return k?new al([ge,k]):ge}return k||Sr}},{key:"eq",value:function(c){if(this==c)return!0;if(!(c instanceof u)||this.local.length!=c.local.length||this.children.length!=c.children.length)return!1;for(var v=0;v<this.local.length;v++)if(!this.local[v].eq(c.local[v]))return!1;for(var k=0;k<this.children.length;k+=3)if(this.children[k]!=c.children[k]||this.children[k+1]!=c.children[k+1]||!this.children[k+2].eq(c.children[k+2]))return!1;return!0}},{key:"locals",value:function(c){return ns(this.localsInner(c))}},{key:"localsInner",value:function(c){if(this==Sr)return Ji;if(c.inlineContent||!this.local.some(Aa.is))return this.local;for(var v=[],k=0;k<this.local.length;k++)this.local[k].type instanceof Aa||v.push(this.local[k]);return v}},{key:"forEachSet",value:function(c){c(this)}}],[{key:"create",value:function(c,v){return v.length?fo(v,c,0,ki):Sr}}]),u})();bn.empty=new bn([],[]),bn.removeOverlap=ns;var Sr=bn.empty,al=(function(){function u(m){_(this,u),this.members=m}return ee(u,[{key:"map",value:function(c,v){var k=this.members.map(function(w){return w.map(c,v,ki)});return u.from(k)}},{key:"forChild",value:function(c,v){if(v.isLeaf)return bn.empty;for(var k=[],w=0;w<this.members.length;w++){var A=this.members[w].forChild(c,v);A!=Sr&&(A instanceof u?k=k.concat(A.members):k.push(A))}return u.from(k)}},{key:"eq",value:function(c){if(!(c instanceof u)||c.members.length!=this.members.length)return!1;for(var v=0;v<this.members.length;v++)if(!this.members[v].eq(c.members[v]))return!1;return!0}},{key:"locals",value:function(c){for(var v,k=!0,w=0;w<this.members.length;w++){var A=this.members[w].localsInner(c);if(A.length)if(!v)v=A;else{k&&(v=v.slice(),k=!1);for(var M=0;M<A.length;M++)v.push(A[M])}}return v?ns(k?v:v.sort(wi)):Ji}},{key:"forEachSet",value:function(c){for(var v=0;v<this.members.length;v++)this.members[v].forEachSet(c)}}],[{key:"from",value:function(c){switch(c.length){case 0:return Sr;case 1:return c[0];default:return new u(c.every(function(v){return v instanceof bn})?c:c.reduce(function(v,k){return v.concat(k instanceof bn?k:k.members)},[]))}}}]),u})();function Nc(u,m,c,v,k,w,A){for(var M=u.slice(),q=function(Wn){var Ci=0;c.maps[V].forEach(function(Ti,Oa,Qt,ss){for(var Pn=ss-Qt-(Oa-Ti),Pr=0;Pr<M.length;Pr+=3){var kl=M[Pr+1];if(!(kl<0||Ti>kl+Wn-Ci)){var wl=M[Pr]+Wn-Ci;Oa>=wl?M[Pr+1]=Ti<=wl?-2:-1:Ti>=Wn&&Pn&&(M[Pr]+=Pn,M[Pr+1]+=Pn)}}Ci+=Pn}),Wn=c.maps[V].map(Wn,-1),Z=Wn},V=0,Z=w;V<c.maps.length;V++)q(Z);for(var ue=!1,re=0;re<M.length;re+=3)if(M[re+1]<0){if(M[re+1]==-2){ue=!0,M[re+1]=-1;continue}var ge=c.map(u[re]+w),Me=ge-k;if(Me<0||Me>=v.content.size){ue=!0;continue}var Fe=c.map(u[re+1]+w,-1),je=Fe-k,Re=v.content.findIndex(Me),bt=Re.index,gt=Re.offset,st=v.maybeChild(bt);if(st&>==Me&>+st.nodeSize==je){var vt=M[re+2].mapInner(c,st,ge+1,u[re]+w+1,A);vt!=Sr?(M[re]=Me,M[re+1]=je,M[re+2]=vt):(M[re+1]=-2,ue=!0)}else ue=!0}if(ue){var Ft=Dc(M,u,m,c,k,w,A),_t=fo(Ft,v,0,A);m=_t.local;for(var Zt=0;Zt<M.length;Zt+=3)M[Zt+1]<0&&(M.splice(Zt,3),Zt-=3);for(var ir=0,Wt=0;ir<_t.children.length;ir+=3){for(var In=_t.children[ir];Wt<M.length&&M[Wt]<In;)Wt+=3;M.splice(Wt,0,_t.children[ir],_t.children[ir+1],_t.children[ir+2])}}return new bn(m.sort(wi),M)}function ol(u,m){if(!m||!u.length)return u;for(var c=[],v=0;v<u.length;v++){var k=u[v];c.push(new bi(k.from+m,k.to+m,k.type))}return c}function Dc(u,m,c,v,k,w,A){function M(V,Z){for(var ue=0;ue<V.local.length;ue++){var re=V.local[ue].map(v,k,Z);re?c.push(re):A.onRemove&&A.onRemove(V.local[ue].spec)}for(var ge=0;ge<V.children.length;ge+=3)M(V.children[ge+2],V.children[ge]+Z+1)}for(var q=0;q<u.length;q+=3)u[q+1]==-1&&M(u[q+2],m[q]+w+1);return c}function sl(u,m,c){if(m.isLeaf)return null;for(var v=c+m.nodeSize,k=null,w=0,A;w<u.length;w++)(A=u[w])&&A.from>c&&A.to<v&&((k||(k=[])).push(A),u[w]=null);return k}function ll(u){for(var m=[],c=0;c<u.length;c++)u[c]!=null&&m.push(u[c]);return m}function fo(u,m,c,v){var k=[],w=!1;m.forEach(function(q,V){var Z=sl(u,q,V+c);if(Z){w=!0;var ue=fo(Z,q,c+V+1,v);ue!=Sr&&k.push(V,V+q.nodeSize,ue)}});for(var A=ol(w?ll(u):u,-c).sort(wi),M=0;M<A.length;M++)A[M].type.valid(m,A[M])||(v.onRemove&&v.onRemove(A[M].spec),A.splice(M--,1));return A.length||k.length?new bn(A,k):Sr}function wi(u,m){return u.from-m.from||u.to-m.to}function ns(u){for(var m=u,c=0;c<m.length-1;c++){var v=m[c];if(v.from!=v.to)for(var k=c+1;k<m.length;k++){var w=m[k];if(w.from==v.from){w.to!=v.to&&(m==u&&(m=u.slice()),m[k]=w.copy(w.from,v.to),ul(m,k+1,w.copy(v.to,w.to)));continue}else{w.from<v.to&&(m==u&&(m=u.slice()),m[c]=v.copy(v.from,w.from),ul(m,k,v.copy(w.from,v.to)));break}}}return m}function ul(u,m,c){for(;m<u.length&&wi(c,u[m])>0;)m++;u.splice(m,0,c)}function is(u){var m=[];return u.someProp("decorations",function(c){var v=c(u.state);v&&v!=Sr&&m.push(v)}),u.cursorWrapper&&m.push(bn.create(u.state.doc,[u.cursorWrapper.deco])),al.from(m)}var Lc={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Rc=Q&&ke<=11,Ic=(function(){function u(){_(this,u),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return ee(u,[{key:"set",value:function(c){this.anchorNode=c.anchorNode,this.anchorOffset=c.anchorOffset,this.focusNode=c.focusNode,this.focusOffset=c.focusOffset}},{key:"clear",value:function(){this.anchorNode=this.focusNode=null}},{key:"eq",value:function(c){return c.anchorNode==this.anchorNode&&c.anchorOffset==this.anchorOffset&&c.focusNode==this.focusNode&&c.focusOffset==this.focusOffset}}]),u})(),Pc=(function(){function u(m,c){var v=this;_(this,u),this.view=m,this.handleDOMChange=c,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Ic,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(function(k){for(var w=0;w<k.length;w++)v.queue.push(k[w]);Q&&ke<=11&&k.some(function(A){return A.type=="childList"&&A.removedNodes.length||A.type=="characterData"&&A.oldValue.length>A.target.nodeValue.length})?v.flushSoon():ct&&m.composing&&k.some(function(A){return A.type=="childList"&&A.target.nodeName=="TR"})?(m.input.badSafariComposition=!0,v.flushSoon()):v.flush()}),Rc&&(this.onCharData=function(k){v.queue.push({target:k.target,type:"characterData",oldValue:k.prevValue}),v.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}return ee(u,[{key:"flushSoon",value:function(){var c=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(function(){c.flushingSoon=-1,c.flush()},20))}},{key:"forceFlush",value:function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}},{key:"start",value:function(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Lc)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}},{key:"stop",value:function(){var c=this;if(this.observer){var v=this.observer.takeRecords();if(v.length){for(var k=0;k<v.length;k++)this.queue.push(v[k]);window.setTimeout(function(){return c.flush()},20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}},{key:"connectSelection",value:function(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}},{key:"disconnectSelection",value:function(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"suppressSelectionUpdates",value:function(){var c=this;this.suppressingSelectionUpdates=!0,setTimeout(function(){return c.suppressingSelectionUpdates=!1},50)}},{key:"onSelectionChange",value:function(){if(io(this.view)){if(this.suppressingSelectionUpdates)return sn(this.view);if(Q&&ke<=11&&!this.view.state.selection.empty){var c=this.view.domSelectionRange();if(c.focusNode&&Ye(c.focusNode,c.focusOffset,c.anchorNode,c.anchorOffset))return this.flushSoon()}this.flush()}}},{key:"setCurSelection",value:function(){this.currentSelection.set(this.view.domSelectionRange())}},{key:"ignoreSelectionChange",value:function(c){if(!c.focusNode)return!0;for(var v=new Set,k,w=c.focusNode;w;w=Le(w))v.add(w);for(var A=c.anchorNode;A;A=Le(A))if(v.has(A)){k=A;break}var M=k&&this.view.docView.nearestDesc(k);if(M&&M.ignoreMutation({type:"selection",target:k.nodeType==3?k.parentNode:k}))return this.setCurSelection(),!0}},{key:"pendingRecords",value:function(){if(this.observer){var c=i(this.observer.takeRecords()),v;try{for(c.s();!(v=c.n()).done;){var k=v.value;this.queue.push(k)}}catch(w){c.e(w)}finally{c.f()}}return this.queue}},{key:"flush",value:function(){var c=this.view;if(!(!c.docView||this.flushingSoon>-1)){var v=this.pendingRecords();v.length&&(this.queue=[]);var k=c.domSelectionRange(),w=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(k)&&io(c)&&!this.ignoreSelectionChange(k),A=-1,M=-1,q=!1,V=[];if(c.editable)for(var Z=0;Z<v.length;Z++){var ue=this.registerMutation(v[Z],V);ue&&(A=A<0?ue.from:Math.min(ue.from,A),M=M<0?ue.to:Math.max(ue.to,M),ue.typeOver&&(q=!0))}if(V.some(function(Wt){return Wt.nodeName=="BR"})&&(c.input.lastKeyCode==8||c.input.lastKeyCode==46||nt&&(c.composing||c.input.compositionEndedAt>Date.now()-50)&&v.some(function(Wt){return Wt.type=="childList"&&Wt.removedNodes.length}))){var re=i(V),ge;try{for(re.s();!(ge=re.n()).done;){var Me=ge.value;if(Me.nodeName=="BR"&&Me.parentNode)for(var Fe=Me.nextSibling;Fe&&Fe.nodeType==1;){if(Fe.contentEditable=="false"){Me.parentNode.removeChild(Me);break}Fe=Fe.firstChild}}}catch(Wt){re.e(Wt)}finally{re.f()}}else if(Ee&&V.length){var je=V.filter(function(Wt){return Wt.nodeName=="BR"});if(je.length==2){var Re=r(je,2),bt=Re[0],gt=Re[1];bt.parentNode&&bt.parentNode.parentNode==gt.parentNode?gt.remove():bt.remove()}else{var st=this.currentSelection.focusNode,vt=i(je),Ft;try{for(vt.s();!(Ft=vt.n()).done;){var _t=Ft.value,Zt=_t.parentNode;Zt&&Zt.nodeName=="LI"&&(!st||qc(c,st)!=Zt)&&_t.remove()}}catch(Wt){vt.e(Wt)}finally{vt.f()}}}var ir=null;A<0&&w&&c.input.lastFocus>Date.now()-200&&Math.max(c.input.lastTouch,c.input.lastClick.time)<Date.now()-300&&ft(k)&&(ir=On(c))&&ir.eq(ae.Selection.near(c.state.doc.resolve(0),1))?(c.input.lastFocus=0,sn(c),this.currentSelection.set(k),c.scrollToSelection()):(A>-1||w)&&(A>-1&&(c.docView.markDirty(A,M),Bc(c)),c.input.badSafariComposition&&(c.input.badSafariComposition=!1,Hc(c,V)),this.handleDOMChange(A,M,q,V),c.docView&&c.docView.dirty?c.updateState(c.state):this.currentSelection.eq(k)||sn(c),this.currentSelection.set(k))}}},{key:"registerMutation",value:function(c,v){if(v.indexOf(c.target)>-1)return null;var k=this.view.docView.nearestDesc(c.target);if(c.type=="attributes"&&(k==this.view.docView||c.attributeName=="contenteditable"||c.attributeName=="style"&&!c.oldValue&&!c.target.getAttribute("style"))||!k||k.ignoreMutation(c))return null;if(c.type=="childList"){for(var w=0;w<c.addedNodes.length;w++){var A=c.addedNodes[w];v.push(A),A.nodeType==3&&(this.lastChangedTextNode=A)}if(k.contentDOM&&k.contentDOM!=k.dom&&!k.contentDOM.contains(c.target))return{from:k.posBefore,to:k.posAfter};var M=c.previousSibling,q=c.nextSibling;if(Q&&ke<=11&&c.addedNodes.length)for(var V=0;V<c.addedNodes.length;V++){var Z=c.addedNodes[V],ue=Z.previousSibling,re=Z.nextSibling;(!ue||Array.prototype.indexOf.call(c.addedNodes,ue)<0)&&(M=ue),(!re||Array.prototype.indexOf.call(c.addedNodes,re)<0)&&(q=re)}var ge=M&&M.parentNode==c.target?xe(M)+1:0,Me=k.localPosFromDOM(c.target,ge,-1),Fe=q&&q.parentNode==c.target?xe(q):c.target.childNodes.length,je=k.localPosFromDOM(c.target,Fe,1);return{from:Me,to:je}}else return c.type=="attributes"?{from:k.posAtStart-k.border,to:k.posAtEnd+k.border}:(this.lastChangedTextNode=c.target,{from:k.posAtStart,to:k.posAtEnd,typeOver:c.target.nodeValue==c.oldValue})}}]),u})(),cl=new WeakMap,fl=!1;function Bc(u){if(!cl.has(u)&&(cl.set(u,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(u.dom).whiteSpace)!==-1)){if(u.requiresGeckoHackNode=Ee,fl)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),fl=!0}}function dl(u,m){var c=m.startContainer,v=m.startOffset,k=m.endContainer,w=m.endOffset,A=u.domAtPos(u.state.selection.anchor);if(Ye(A.node,A.offset,k,w)){var M=[k,w,c,v];c=M[0],v=M[1],k=M[2],w=M[3]}return{anchorNode:c,anchorOffset:v,focusNode:k,focusOffset:w}}function Fc(u,m){if(m.getComposedRanges){var c=m.getComposedRanges(u.root)[0];if(c)return dl(u,c)}var v;function k(w){w.preventDefault(),w.stopImmediatePropagation(),v=w.getTargetRanges()[0]}return u.dom.addEventListener("beforeinput",k,!0),document.execCommand("indent"),u.dom.removeEventListener("beforeinput",k,!0),v?dl(u,v):null}function qc(u,m){for(var c=m.parentNode;c&&c!=u.dom;c=c.parentNode){var v=u.docView.nearestDesc(c,!0);if(v&&v.node.isBlock)return c}return null}function Hc(u,m){var c,v=u.domSelectionRange(),k=v.focusNode,w=v.focusOffset,A=i(m),M;try{for(A.s();!(M=A.n()).done;){var q=M.value;if(((c=q.parentNode)===null||c===void 0?void 0:c.nodeName)=="TR"){for(var V=q.nextSibling;V&&V.nodeName!="TD"&&V.nodeName!="TH";)V=V.nextSibling;if(V){for(var Z=V;;){var ue=Z.firstChild;if(!ue||ue.nodeType!=1||ue.contentEditable=="false"||/^(BR|IMG)$/.test(ue.nodeName))break;Z=ue}Z.insertBefore(q,Z.firstChild),k==q&&u.domSelection().collapse(q,w)}else q.parentNode.removeChild(q)}}}catch(re){A.e(re)}finally{A.f()}}function _c(u,m,c){var v=u.docView.parseRange(m,c),k=v.node,w=v.fromOffset,A=v.toOffset,M=v.from,q=v.to,V=u.domSelectionRange(),Z,ue=V.anchorNode;if(ue&&u.dom.contains(ue.nodeType==1?ue:ue.parentNode)&&(Z=[{node:ue,offset:V.anchorOffset}],ft(V)||Z.push({node:V.focusNode,offset:V.focusOffset})),nt&&u.input.lastKeyCode===8)for(var re=A;re>w;re--){var ge=k.childNodes[re-1],Me=ge.pmViewDesc;if(ge.nodeName=="BR"&&!Me){A=re;break}if(!Me||Me.size)break}var Fe=u.state.doc,je=u.someProp("domParser")||le.DOMParser.fromSchema(u.state.schema),Re=Fe.resolve(M),bt=null,gt=je.parse(k,{topNode:Re.parent,topMatch:Re.parent.contentMatchAt(Re.index()),topOpen:!0,from:w,to:A,preserveWhitespace:Re.parent.type.whitespace=="pre"?"full":!0,findPositions:Z,ruleFromNode:zc,context:Re});if(Z&&Z[0].pos!=null){var st=Z[0].pos,vt=Z[1]&&Z[1].pos;vt==null&&(vt=st),bt={anchor:st+M,head:vt+M}}return{doc:gt,sel:bt,from:M,to:q}}function zc(u){var m=u.pmViewDesc;if(m)return m.parseRule();if(u.nodeName=="BR"&&u.parentNode){if(ct&&/^(ul|ol)$/i.test(u.parentNode.nodeName)){var c=document.createElement("div");return c.appendChild(document.createElement("li")),{skip:c}}else if(u.parentNode.lastChild==u||ct&&/^(tr|table)$/i.test(u.parentNode.nodeName))return{ignore:!0}}else if(u.nodeName=="IMG"&&u.getAttribute("mark-placeholder"))return{ignore:!0};return null}var Vc=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Uc(u,m,c,v,k){var w=u.input.compositionPendingChanges||(u.composing?u.input.compositionID:0);if(u.input.compositionPendingChanges=0,m<0){var A=u.input.lastSelectionTime>Date.now()-50?u.input.lastSelectionOrigin:null,M=On(u,A);if(M&&!u.state.selection.eq(M)){if(nt&&Nt&&u.input.lastKeyCode===13&&Date.now()-100<u.input.lastKeyCodeTime&&u.someProp("handleKeyDown",function(Qt){return Qt(u,Mt(13,"Enter"))}))return;var q=u.state.tr.setSelection(M);A=="pointer"?q.setMeta("pointer",!0):A=="key"&&q.scrollIntoView(),w&&q.setMeta("composition",w),u.dispatch(q)}return}var V=u.state.doc.resolve(m),Z=V.sharedDepth(c);m=V.before(Z+1),c=u.state.doc.resolve(c).after(Z+1);var ue=u.state.selection,re=_c(u,m,c),ge=u.state.doc,Me=ge.slice(re.from,re.to),Fe,je;u.input.lastKeyCode===8&&Date.now()-100<u.input.lastKeyCodeTime?(Fe=u.state.selection.to,je="end"):(Fe=u.state.selection.from,je="start"),u.input.lastKeyCode=null;var Re=jc(Me.content,re.doc.content,re.from,Fe,je);if(Re&&u.input.domChangeCount++,(zt&&u.input.lastIOSEnter>Date.now()-225||Nt)&&k.some(function(Qt){return Qt.nodeType==1&&!Vc.test(Qt.nodeName)})&&(!Re||Re.endA>=Re.endB)&&u.someProp("handleKeyDown",function(Qt){return Qt(u,Mt(13,"Enter"))})){u.input.lastIOSEnter=0;return}if(!Re)if(v&&ue instanceof ae.TextSelection&&!ue.empty&&ue.$head.sameParent(ue.$anchor)&&!u.composing&&!(re.sel&&re.sel.anchor!=re.sel.head))Re={start:ue.from,endA:ue.to,endB:ue.to};else{if(re.sel){var bt=hl(u,u.state.doc,re.sel);if(bt&&!bt.eq(u.state.selection)){var gt=u.state.tr.setSelection(bt);w&>.setMeta("composition",w),u.dispatch(gt)}}return}u.state.selection.from<u.state.selection.to&&Re.start==Re.endB&&u.state.selection instanceof ae.TextSelection&&(Re.start>u.state.selection.from&&Re.start<=u.state.selection.from+2&&u.state.selection.from>=re.from?Re.start=u.state.selection.from:Re.endA<u.state.selection.to&&Re.endA>=u.state.selection.to-2&&u.state.selection.to<=re.to&&(Re.endB+=u.state.selection.to-Re.endA,Re.endA=u.state.selection.to)),Q&&ke<=11&&Re.endB==Re.start+1&&Re.endA==Re.start&&Re.start>re.from&&re.doc.textBetween(Re.start-re.from-1,Re.start-re.from+1)==" "&&(Re.start--,Re.endA--,Re.endB--);var st=re.doc.resolveNoCache(Re.start-re.from),vt=re.doc.resolveNoCache(Re.endB-re.from),Ft=ge.resolve(Re.start),_t=st.sameParent(vt)&&st.parent.inlineContent&&Ft.end()>=Re.endA;if((zt&&u.input.lastIOSEnter>Date.now()-225&&(!_t||k.some(function(Qt){return Qt.nodeName=="DIV"||Qt.nodeName=="P"}))||!_t&&st.pos<re.doc.content.size&&(!st.sameParent(vt)||!st.parent.inlineContent)&&st.pos<vt.pos&&!/\S/.test(re.doc.textBetween(st.pos,vt.pos,"","")))&&u.someProp("handleKeyDown",function(Qt){return Qt(u,Mt(13,"Enter"))})){u.input.lastIOSEnter=0;return}if(u.state.selection.anchor>Re.start&&Wc(ge,Re.start,Re.endA,st,vt)&&u.someProp("handleKeyDown",function(Qt){return Qt(u,Mt(8,"Backspace"))})){Nt&&nt&&u.domObserver.suppressSelectionUpdates();return}nt&&Re.endB==Re.start&&(u.input.lastChromeDelete=Date.now()),Nt&&!_t&&st.start()!=vt.start()&&vt.parentOffset==0&&st.depth==vt.depth&&re.sel&&re.sel.anchor==re.sel.head&&re.sel.head==Re.endA&&(Re.endB-=2,vt=re.doc.resolveNoCache(Re.endB-re.from),setTimeout(function(){u.someProp("handleKeyDown",function(Qt){return Qt(u,Mt(13,"Enter"))})},20));var Zt=Re.start,ir=Re.endA,Wt=function(ss){var Pn=ss||u.state.tr.replace(Zt,ir,re.doc.slice(Re.start-re.from,Re.endB-re.from));if(re.sel){var Pr=hl(u,Pn.doc,re.sel);Pr&&!(nt&&u.composing&&Pr.empty&&(Re.start!=Re.endB||u.input.lastChromeDelete<Date.now()-100)&&(Pr.head==Zt||Pr.head==Pn.mapping.map(ir)-1)||Q&&Pr.empty&&Pr.head==Zt)&&Pn.setSelection(Pr)}return w&&Pn.setMeta("composition",w),Pn.scrollIntoView()},In;if(_t)if(st.pos==vt.pos){Q&&ke<=11&&st.parentOffset==0&&(u.domObserver.suppressSelectionUpdates(),setTimeout(function(){return sn(u)},20));var ho=Wt(u.state.tr.delete(Zt,ir)),Wn=ge.resolve(Re.start).marksAcross(ge.resolve(Re.endA));Wn&&ho.ensureMarks(Wn),u.dispatch(ho)}else if(Re.endA==Re.endB&&(In=$c(st.parent.content.cut(st.parentOffset,vt.parentOffset),Ft.parent.content.cut(Ft.parentOffset,Re.endA-Ft.start())))){var Ci=Wt(u.state.tr);In.type=="add"?Ci.addMark(Zt,ir,In.mark):Ci.removeMark(Zt,ir,In.mark),u.dispatch(Ci)}else if(st.parent.child(st.index()).isText&&st.index()==vt.index()-(vt.textOffset?0:1)){var Ti=st.parent.textBetween(st.parentOffset,vt.parentOffset),Oa=function(){return Wt(u.state.tr.insertText(Ti,Zt,ir))};u.someProp("handleTextInput",function(Qt){return Qt(u,Zt,ir,Ti,Oa)})||u.dispatch(Oa())}else u.dispatch(Wt());else u.dispatch(Wt())}function hl(u,m,c){return Math.max(c.anchor,c.head)>m.content.size?null:Dn(u,m.resolve(c.anchor),m.resolve(c.head))}function $c(u,m){for(var c=u.firstChild.marks,v=m.firstChild.marks,k=c,w=v,A,M,q,V=0;V<v.length;V++)k=v[V].removeFromSet(k);for(var Z=0;Z<c.length;Z++)w=c[Z].removeFromSet(w);if(k.length==1&&w.length==0)M=k[0],A="add",q=function(Me){return Me.mark(M.addToSet(Me.marks))};else if(k.length==0&&w.length==1)M=w[0],A="remove",q=function(Me){return Me.mark(M.removeFromSet(Me.marks))};else return null;for(var ue=[],re=0;re<m.childCount;re++)ue.push(q(m.child(re)));if(le.Fragment.from(ue).eq(u))return{mark:M,type:A}}function Wc(u,m,c,v,k){if(c-m<=k.pos-v.pos||as(v,!0,!1)<k.pos)return!1;var w=u.resolve(m);if(!v.parent.isTextblock){var A=w.nodeAfter;return A!=null&&c==m+A.nodeSize}if(w.parentOffset<w.parent.content.size||!w.parent.isTextblock)return!1;var M=u.resolve(as(w,!0,!0));return!M.parent.isTextblock||M.pos>c||as(M,!0,!1)<c?!1:v.parent.content.cut(v.parentOffset).eq(M.parent.content)}function as(u,m,c){for(var v=u.depth,k=m?u.end():u.pos;v>0&&(m||u.indexAfter(v)==u.node(v).childCount);)v--,k++,m=!1;if(c)for(var w=u.node(v).maybeChild(u.indexAfter(v));w&&!w.isLeaf;)w=w.firstChild,k++;return k}function jc(u,m,c,v,k){var w=u.findDiffStart(m,c),A=c+u.size,M=c+m.size;if(w==null)return null;var q=u.findDiffEnd(m,A,M),V=q.a,Z=q.b;if(k=="end"){var ue=Math.max(0,w-Math.min(V,Z));v-=V+ue-w}if(V<w&&A<M){var re=v<=w&&v>=V?w-v:0;w-=re,Z=w+(Z-V),V=w}else if(Z<w){var ge=v<=w&&v>=Z?w-v:0;w-=ge,V=w+(V-Z),Z=w}return{start:w,endA:V,endB:Z}}var Gc=fe,Kc=Sa,pl=(function(){function u(m,c){var v=this;_(this,u),this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new sc,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=c,this.state=c.state,this.directPlugins=c.plugins||[],this.directPlugins.forEach(bl),this.dispatch=this.dispatch.bind(this),this.dom=m&&m.mount||document.createElement("div"),m&&(m.appendChild?m.appendChild(this.dom):typeof m=="function"?m(this.dom):m.mount&&(this.mounted=!0)),this.editable=gl(this),ml(this),this.nodeViews=yl(this),this.docView=O(this.state.doc,vl(this),is(this),this.dom,this),this.domObserver=new Pc(this,function(k,w,A,M){return Uc(v,k,w,A,M)}),this.domObserver.start(),lc(this),this.updatePluginViews()}return ee(u,[{key:"composing",get:function(){return this.input.composing}},{key:"props",get:function(){if(this._props.state!=this.state){var c=this._props;this._props={};for(var v in c)this._props[v]=c[v];this._props.state=this.state}return this._props}},{key:"update",value:function(c){c.handleDOMEvents!=this._props.handleDOMEvents&&Qo(this);var v=this._props;this._props=c,c.plugins&&(c.plugins.forEach(bl),this.directPlugins=c.plugins),this.updateStateInner(c.state,v)}},{key:"setProps",value:function(c){var v={};for(var k in this._props)v[k]=this._props[k];v.state=this.state;for(var w in c)v[w]=c[w];this.update(v)}},{key:"updateState",value:function(c){this.updateStateInner(c,this._props)}},{key:"updateStateInner",value:function(c,v){var k,w=this.state,A=!1,M=!1;c.storedMarks&&this.composing&&(Qs(this),M=!0),this.state=c;var q=w.plugins!=c.plugins||this._props.plugins!=v.plugins;if(q||this._props.plugins!=v.plugins||this._props.nodeViews!=v.nodeViews){var V=yl(this);Yc(V,this.nodeViews)&&(this.nodeViews=V,A=!0)}(q||v.handleDOMEvents!=this._props.handleDOMEvents)&&Qo(this),this.editable=gl(this),ml(this);var Z=is(this),ue=vl(this),re=w.plugins!=c.plugins&&!w.doc.eq(c.doc)?"reset":c.scrollToSelection>w.scrollToSelection?"to selection":"preserve",ge=A||!this.docView.matchesNode(c.doc,ue,Z);(ge||!c.selection.eq(w.selection))&&(M=!0);var Me=re=="preserve"&&M&&this.dom.style.overflowAnchor==null&<(this);if(M){this.domObserver.stop();var Fe=ge&&(Q||nt)&&!this.composing&&!w.selection.empty&&!c.selection.empty&&Jc(w.selection,c.selection);if(ge){var je=nt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Tc(this)),(A||!this.docView.update(c.doc,ue,Z,this))&&(this.docView.updateOuterDeco(ue),this.docView.destroy(),this.docView=O(c.doc,ue,Z,this.dom,this)),je&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(Fe=!0)}var Re=this.input.mouseDown;Fe||!(Re&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&ri(this)&&Re.delaySelUpdate())?sn(this,Fe):(gi(this,c.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(w),!((k=this.dragging)===null||k===void 0)&&k.node&&!w.doc.eq(c.doc)&&this.updateDraggedNode(this.dragging,w),re=="reset"?this.dom.scrollTop=0:re=="to selection"?this.scrollToSelection():Me&&Ot(Me)}},{key:"scrollToSelection",value:function(){var c=this,v=this.domSelectionRange().focusNode;if(!(!v||!this.dom.contains(v.nodeType==1?v:v.parentNode))){if(!this.someProp("handleScrollToSelection",function(w){return w(c)}))if(this.state.selection instanceof ae.NodeSelection){var k=this.docView.domAfterPos(this.state.selection.from);k.nodeType==1&&Ue(this,k.getBoundingClientRect(),v)}else Ue(this,this.coordsAtPos(this.state.selection.head,1),v)}}},{key:"destroyPluginViews",value:function(){for(var c;c=this.pluginViews.pop();)c.destroy&&c.destroy()}},{key:"updatePluginViews",value:function(c){if(!c||c.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(var v=0;v<this.directPlugins.length;v++){var k=this.directPlugins[v];k.spec.view&&this.pluginViews.push(k.spec.view(this))}for(var w=0;w<this.state.plugins.length;w++){var A=this.state.plugins[w];A.spec.view&&this.pluginViews.push(A.spec.view(this))}}else for(var M=0;M<this.pluginViews.length;M++){var q=this.pluginViews[M];q.update&&q.update(this,c)}}},{key:"updateDraggedNode",value:function(c,v){var k=c.node,w=-1;if(k.from<this.state.doc.content.size&&this.state.doc.nodeAt(k.from)==k.node)w=k.from;else{var A=k.from+(this.state.doc.content.size-v.doc.content.size),M=A>0&&A<this.state.doc.content.size&&this.state.doc.nodeAt(A);M==k.node&&(w=A)}this.dragging=new tl(c.slice,c.move,w<0?void 0:ae.NodeSelection.create(this.state.doc,w))}},{key:"someProp",value:function(c,v){var k=this._props&&this._props[c],w;if(k!=null&&(w=v?v(k):k))return w;for(var A=0;A<this.directPlugins.length;A++){var M=this.directPlugins[A].props[c];if(M!=null&&(w=v?v(M):M))return w}var q=this.state.plugins;if(q)for(var V=0;V<q.length;V++){var Z=q[V].props[c];if(Z!=null&&(w=v?v(Z):Z))return w}}},{key:"hasFocus",value:function(){if(Q){var c=this.root.activeElement;if(c==this.dom)return!0;if(!c||!this.dom.contains(c))return!1;for(;c&&this.dom!=c&&this.dom.contains(c);){if(c.contentEditable=="false")return!1;c=c.parentElement}return!0}return this.root.activeElement==this.dom}},{key:"focus",value:function(){this.domObserver.stop(),this.editable&&Gt(this.dom),sn(this),this.domObserver.start()}},{key:"root",get:function(){var c=this,v=this._root;if(v==null){for(var k=function(q){if(q.nodeType==9||q.nodeType==11&&q.host)return q.getSelection||(Object.getPrototypeOf(q).getSelection=function(){return q.ownerDocument.getSelection()}),{v:c._root=q}},w,A=this.dom.parentNode;A;A=A.parentNode)if(w=k(A),w)return w.v}return v||document}},{key:"updateRoot",value:function(){this._root=null}},{key:"posAtCoords",value:function(c){return Yr(this,c)}},{key:"coordsAtPos",value:function(c){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Kt(this,c,v)}},{key:"domAtPos",value:function(c){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return this.docView.domFromPos(c,v)}},{key:"nodeDOM",value:function(c){var v=this.docView.descAt(c);return v?v.nodeDOM:null}},{key:"posAtDOM",value:function(c,v){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,w=this.docView.posFromDOM(c,v,k);if(w==null)throw new RangeError("DOM position not inside the editor");return w}},{key:"endOfTextblock",value:function(c,v){return we(this,v||this.state,c)}},{key:"pasteHTML",value:function(c,v){return Ea(this,"",c,!1,v||new ClipboardEvent("paste"))}},{key:"pasteText",value:function(c,v){return Ea(this,c,null,!0,v||new ClipboardEvent("paste"))}},{key:"serializeForClipboard",value:function(c){return tt(this,c)}},{key:"destroy",value:function(){this.docView&&(uc(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],is(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,wt())}},{key:"isDestroyed",get:function(){return this.docView==null}},{key:"dispatchEvent",value:function(c){return fc(this,c)}},{key:"domSelectionRange",value:function(){var c=this.domSelection();return c?ct&&this.root.nodeType===11&&Tt(this.dom.ownerDocument)==this.dom&&Fc(this,c)||c:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}},{key:"domSelection",value:function(){return this.root.getSelection()}}]),u})();pl.prototype.dispatch=function(u){var m=this._props.dispatchTransaction;m?m.call(this,u):this.updateState(this.state.apply(u))};function vl(u){var m=Object.create(null);return m.class="ProseMirror",m.contenteditable=String(u.editable),u.someProp("attributes",function(c){if(typeof c=="function"&&(c=c(u.state)),c)for(var v in c)v=="class"?m.class+=" "+c[v]:v=="style"?m.style=(m.style?m.style+";":"")+c[v]:!m[v]&&v!="contenteditable"&&v!="nodeName"&&(m[v]=String(c[v]))}),m.translate||(m.translate="no"),[bi.node(0,u.state.doc.content.size,m)]}function ml(u){if(u.markCursor){var m=document.createElement("img");m.className="ProseMirror-separator",m.setAttribute("mark-placeholder","true"),m.setAttribute("alt",""),u.cursorWrapper={dom:m,deco:bi.widget(u.state.selection.from,m,{raw:!0,marks:u.markCursor})}}else u.cursorWrapper=null}function gl(u){return!u.someProp("editable",function(m){return m(u.state)===!1})}function Jc(u,m){var c=Math.min(u.$anchor.sharedDepth(u.head),m.$anchor.sharedDepth(m.head));return u.$anchor.start(c)!=m.$anchor.start(c)}function yl(u){var m=Object.create(null);function c(v){for(var k in v)Object.prototype.hasOwnProperty.call(m,k)||(m[k]=v[k])}return u.someProp("nodeViews",c),u.someProp("markViews",c),m}function Yc(u,m){var c=0,v=0;for(var k in u){if(u[k]!=m[k])return!0;c++}for(var w in m)v++;return c!=v}function bl(u){if(u.spec.state||u.spec.filterTransaction||u.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}return Fa.Decoration=bi,Fa.DecorationSet=bn,Fa.EditorView=pl,Fa.__endComposition=Kc,Fa.__parseFromClipboard=Gc,Fa}var jy;function Y8e(){return jy||(jy=1,(function(r,e){(function(n,i){r.exports=i(j8e(),K8e(),tc(),rc(),J8e())})(self,function(t,n,i,a,o){return(function(){var s={368:(function(b){(function(T,x){b.exports=x()})(this,function(){function T(ze){if(Array.isArray(ze)){for(var Ue=0,lt=Array(ze.length);Ue<ze.length;Ue++)lt[Ue]=ze[Ue];return lt}else return Array.from(ze)}var x=Object.hasOwnProperty,E=Object.setPrototypeOf,B=Object.isFrozen,F=Object.getPrototypeOf,_=Object.getOwnPropertyDescriptor,X=Object.freeze,ee=Object.seal,se=Object.create,de=typeof Reflect<"u"&&Reflect,ae=de.apply,le=de.construct;ae||(ae=function(Ue,lt,dt){return Ue.apply(lt,dt)}),X||(X=function(Ue){return Ue}),ee||(ee=function(Ue){return Ue}),le||(le=function(Ue,lt){return new(Function.prototype.bind.apply(Ue,[null].concat(T(lt))))});var Te=Bt(Array.prototype.forEach),xe=Bt(Array.prototype.pop),Le=Bt(Array.prototype.push),ut=Bt(String.prototype.toLowerCase),Je=Bt(String.prototype.match),wt=Bt(String.prototype.replace),Ye=Bt(String.prototype.indexOf),pt=Bt(String.prototype.trim),rt=Bt(RegExp.prototype.test),Et=$t(TypeError);function Bt(ze){return function(Ue){for(var lt=arguments.length,dt=Array(lt>1?lt-1:0),Ot=1;Ot<lt;Ot++)dt[Ot-1]=arguments[Ot];return ae(ze,Ue,dt)}}function $t(ze){return function(){for(var Ue=arguments.length,lt=Array(Ue),dt=0;dt<Ue;dt++)lt[dt]=arguments[dt];return le(ze,lt)}}function Qe(ze,Ue){E&&E(ze,null);for(var lt=Ue.length;lt--;){var dt=Ue[lt];if(typeof dt=="string"){var Ot=ut(dt);Ot!==dt&&(B(Ue)||(Ue[lt]=Ot),dt=Ot)}ze[dt]=!0}return ze}function Ct(ze){var Ue=se(null),lt=void 0;for(lt in ze)ae(x,ze,[lt])&&(Ue[lt]=ze[lt]);return Ue}function ft(ze,Ue){for(;ze!==null;){var lt=_(ze,Ue);if(lt){if(lt.get)return Bt(lt.get);if(typeof lt.value=="function")return Bt(lt.value)}ze=F(ze)}function dt(Ot){return console.warn("fallback value for",Ot),null}return dt}var Mt=X(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Tt=X(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),jt=X(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ut=X(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Yt=X(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),ye=X(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),he=X(["#text"]),ne=X(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),oe=X(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Q=X(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ke=X(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ee=ee(/\{\{[\s\S]*|[\s\S]*\}\}/gm),He=ee(/<%[\s\S]*|[\s\S]*%>/gm),nt=ee(/^data-[\-\w.\u00B7-\uFFFF]/),yt=ee(/^aria-[\-\w]+$/),ct=ee(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zt=ee(/^(?:\w+script|data):/i),At=ee(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ze){return typeof ze}:function(ze){return ze&&typeof Symbol=="function"&&ze.constructor===Symbol&&ze!==Symbol.prototype?"symbol":typeof ze};function Nt(ze){if(Array.isArray(ze)){for(var Ue=0,lt=Array(ze.length);Ue<ze.length;Ue++)lt[Ue]=ze[Ue];return lt}else return Array.from(ze)}var ar=function(){return typeof window>"u"?null:window},En=function(Ue,lt){if((typeof Ue>"u"?"undefined":Xt(Ue))!=="object"||typeof Ue.createPolicy!="function")return null;var dt=null,Ot="data-tt-policy-suffix";lt.currentScript&<.currentScript.hasAttribute(Ot)&&(dt=lt.currentScript.getAttribute(Ot));var gr="dompurify"+(dt?"#"+dt:"");try{return Ue.createPolicy(gr,{createHTML:function(Gt){return Gt}})}catch{return console.warn("TrustedTypes policy "+gr+" could not be created."),null}};function nn(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ar(),Ue=function(fe){return nn(fe)};if(Ue.version="2.3.3",Ue.removed=[],!ze||!ze.document||ze.document.nodeType!==9)return Ue.isSupported=!1,Ue;var lt=ze.document,dt=ze.document,Ot=ze.DocumentFragment,gr=ze.HTMLTemplateElement,Vt=ze.Node,Gt=ze.Element,Lr=ze.NodeFilter,Kr=ze.NamedNodeMap,pr=Kr===void 0?ze.NamedNodeMap||ze.MozNamedAttrMap:Kr,Vr=ze.Text,Mn=ze.Comment,gn=ze.DOMParser,Jr=ze.trustedTypes,Yr=Gt.prototype,Xr=ft(Yr,"cloneNode"),or=ft(Yr,"nextSibling"),an=ft(Yr,"childNodes"),Kt=ft(Yr,"parentNode");if(typeof gr=="function"){var yr=dt.createElement("template");yr.content&&yr.content.ownerDocument&&(dt=yr.content.ownerDocument)}var W=En(Jr,lt),$=W&&on?W.createHTML(""):"",R=dt,N=R.implementation,P=R.createNodeIterator,H=R.createDocumentFragment,K=R.getElementsByTagName,pe=lt.importNode,we={};try{we=Ct(dt).documentMode?dt.documentMode:{}}catch{}var ie={};Ue.isSupported=typeof Kt=="function"&&N&&typeof N.createHTMLDocument<"u"&&we!==9;var J=Ee,ve=He,be=nt,Ie=yt,et=zt,_e=At,at=ct,I=null,O=Qe({},[].concat(Nt(Mt),Nt(Tt),Nt(jt),Nt(Yt),Nt(he))),g=null,C=Qe({},[].concat(Nt(ne),Nt(oe),Nt(Q),Nt(ke))),D=null,z=null,j=!0,Y=!0,ce=!1,me=!1,Ne=!1,Ae=!1,Pe=!1,Ke=!1,Dt=!1,br=!0,on=!1,Un=!0,vi=!0,mi=!1,An={},On=null,va=Qe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),sn=null,ma=Qe({},["audio","video","img","source","image","track"]),Ui=null,$i=Qe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Wi="http://www.w3.org/1998/Math/MathML",ga="http://www.w3.org/2000/svg",Nn="http://www.w3.org/1999/xhtml",gi=Nn,ji=!1,Dn=void 0,io=["application/xhtml+xml","text/html"],ao="text/html",ri=void 0,Ln=null,Rn=dt.createElement("form"),Gi=function(fe){Ln&&Ln===fe||((!fe||(typeof fe>"u"?"undefined":Xt(fe))!=="object")&&(fe={}),fe=Ct(fe),I="ALLOWED_TAGS"in fe?Qe({},fe.ALLOWED_TAGS):O,g="ALLOWED_ATTR"in fe?Qe({},fe.ALLOWED_ATTR):C,Ui="ADD_URI_SAFE_ATTR"in fe?Qe(Ct($i),fe.ADD_URI_SAFE_ATTR):$i,sn="ADD_DATA_URI_TAGS"in fe?Qe(Ct(ma),fe.ADD_DATA_URI_TAGS):ma,On="FORBID_CONTENTS"in fe?Qe({},fe.FORBID_CONTENTS):va,D="FORBID_TAGS"in fe?Qe({},fe.FORBID_TAGS):{},z="FORBID_ATTR"in fe?Qe({},fe.FORBID_ATTR):{},An="USE_PROFILES"in fe?fe.USE_PROFILES:!1,j=fe.ALLOW_ARIA_ATTR!==!1,Y=fe.ALLOW_DATA_ATTR!==!1,ce=fe.ALLOW_UNKNOWN_PROTOCOLS||!1,me=fe.SAFE_FOR_TEMPLATES||!1,Ne=fe.WHOLE_DOCUMENT||!1,Ke=fe.RETURN_DOM||!1,Dt=fe.RETURN_DOM_FRAGMENT||!1,br=fe.RETURN_DOM_IMPORT!==!1,on=fe.RETURN_TRUSTED_TYPE||!1,Pe=fe.FORCE_BODY||!1,Un=fe.SANITIZE_DOM!==!1,vi=fe.KEEP_CONTENT!==!1,mi=fe.IN_PLACE||!1,at=fe.ALLOWED_URI_REGEXP||at,gi=fe.NAMESPACE||Nn,Dn=io.indexOf(fe.PARSER_MEDIA_TYPE)===-1?Dn=ao:Dn=fe.PARSER_MEDIA_TYPE,ri=Dn==="application/xhtml+xml"?function(Be){return Be}:ut,me&&(Y=!1),Dt&&(Ke=!0),An&&(I=Qe({},[].concat(Nt(he))),g=[],An.html===!0&&(Qe(I,Mt),Qe(g,ne)),An.svg===!0&&(Qe(I,Tt),Qe(g,oe),Qe(g,ke)),An.svgFilters===!0&&(Qe(I,jt),Qe(g,oe),Qe(g,ke)),An.mathMl===!0&&(Qe(I,Yt),Qe(g,Q),Qe(g,ke))),fe.ADD_TAGS&&(I===O&&(I=Ct(I)),Qe(I,fe.ADD_TAGS)),fe.ADD_ATTR&&(g===C&&(g=Ct(g)),Qe(g,fe.ADD_ATTR)),fe.ADD_URI_SAFE_ATTR&&Qe(Ui,fe.ADD_URI_SAFE_ATTR),fe.FORBID_CONTENTS&&(On===va&&(On=Ct(On)),Qe(On,fe.FORBID_CONTENTS)),vi&&(I["#text"]=!0),Ne&&Qe(I,["html","head","body"]),I.table&&(Qe(I,["tbody"]),delete D.tbody),X&&X(fe),Ln=fe)},yi=Qe({},["mi","mo","mn","ms","mtext"]),ni=Qe({},["foreignobject","desc","title","annotation-xml"]),yn=Qe({},Tt);Qe(yn,jt),Qe(yn,Ut);var ya=Qe({},Yt);Qe(ya,ye);var Xo=function(fe){var Be=Kt(fe);(!Be||!Be.tagName)&&(Be={namespaceURI:Nn,tagName:"template"});var Xe=ut(fe.tagName),Lt=ut(Be.tagName);if(fe.namespaceURI===ga)return Be.namespaceURI===Nn?Xe==="svg":Be.namespaceURI===Wi?Xe==="svg"&&(Lt==="annotation-xml"||yi[Lt]):!!yn[Xe];if(fe.namespaceURI===Wi)return Be.namespaceURI===Nn?Xe==="math":Be.namespaceURI===ga?Xe==="math"&&ni[Lt]:!!ya[Xe];if(fe.namespaceURI===Nn){if(Be.namespaceURI===ga&&!ni[Lt]||Be.namespaceURI===Wi&&!yi[Lt])return!1;var sr=Qe({},["title","style","font","a","script"]);return!ya[Xe]&&(sr[Xe]||!yn[Xe])}return!1},ln=function(fe){Le(Ue.removed,{element:fe});try{fe.parentNode.removeChild(fe)}catch{try{fe.outerHTML=$}catch{fe.remove()}}},oo=function(fe,Be){try{Le(Ue.removed,{attribute:Be.getAttributeNode(fe),from:Be})}catch{Le(Ue.removed,{attribute:null,from:Be})}if(Be.removeAttribute(fe),fe==="is"&&!g[fe])if(Ke||Dt)try{ln(Be)}catch{}else try{Be.setAttribute(fe,"")}catch{}},so=function(fe){var Be=void 0,Xe=void 0;if(Pe)fe="<remove></remove>"+fe;else{var Lt=Je(fe,/^[\r\n\t ]+/);Xe=Lt&&Lt[0]}Dn==="application/xhtml+xml"&&(fe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+fe+"</body></html>");var sr=W?W.createHTML(fe):fe;if(gi===Nn)try{Be=new gn().parseFromString(sr,Dn)}catch{}if(!Be||!Be.documentElement){Be=N.createDocument(gi,"template",null);try{Be.documentElement.innerHTML=ji?"":sr}catch{}}var lr=Be.body||Be.documentElement;return fe&&Xe&&lr.insertBefore(dt.createTextNode(Xe),lr.childNodes[0]||null),gi===Nn?K.call(Be,Ne?"html":"body")[0]:Ne?Be.documentElement:lr},Ki=function(fe){return P.call(fe.ownerDocument||fe,fe,Lr.SHOW_ELEMENT|Lr.SHOW_COMMENT|Lr.SHOW_TEXT,null,!1)},lo=function(fe){return fe instanceof Vr||fe instanceof Mn?!1:typeof fe.nodeName!="string"||typeof fe.textContent!="string"||typeof fe.removeChild!="function"||!(fe.attributes instanceof pr)||typeof fe.removeAttribute!="function"||typeof fe.setAttribute!="function"||typeof fe.namespaceURI!="string"||typeof fe.insertBefore!="function"},ii=function(fe){return(typeof Vt>"u"?"undefined":Xt(Vt))==="object"?fe instanceof Vt:fe&&(typeof fe>"u"?"undefined":Xt(fe))==="object"&&typeof fe.nodeType=="number"&&typeof fe.nodeName=="string"},un=function(fe,Be,Xe){ie[fe]&&Te(ie[fe],function(Lt){Lt.call(Ue,Be,Xe,Ln)})},ba=function(fe){var Be=void 0;if(un("beforeSanitizeElements",fe,null),lo(fe)||Je(fe.nodeName,/[\u0080-\uFFFF]/))return ln(fe),!0;var Xe=ri(fe.nodeName);if(un("uponSanitizeElement",fe,{tagName:Xe,allowedTags:I}),!ii(fe.firstElementChild)&&(!ii(fe.content)||!ii(fe.content.firstElementChild))&&rt(/<[/\w]/g,fe.innerHTML)&&rt(/<[/\w]/g,fe.textContent)||Xe==="select"&&rt(/<template/i,fe.innerHTML))return ln(fe),!0;if(!I[Xe]||D[Xe]){if(vi&&!On[Xe]){var Lt=Kt(fe)||fe.parentNode,sr=an(fe)||fe.childNodes;if(sr&&Lt)for(var lr=sr.length,nr=lr-1;nr>=0;--nr)Lt.insertBefore(Xr(sr[nr],!0),or(fe))}return ln(fe),!0}return fe instanceof Gt&&!Xo(fe)||(Xe==="noscript"||Xe==="noembed")&&rt(/<\/no(script|embed)/i,fe.innerHTML)?(ln(fe),!0):(me&&fe.nodeType===3&&(Be=fe.textContent,Be=wt(Be,J," "),Be=wt(Be,ve," "),fe.textContent!==Be&&(Le(Ue.removed,{element:fe.cloneNode()}),fe.textContent=Be)),un("afterSanitizeElements",fe,null),!1)},uo=function(fe,Be,Xe){if(Un&&(Be==="id"||Be==="name")&&(Xe in dt||Xe in Rn))return!1;if(!(Y&&!z[Be]&&rt(be,Be))){if(!(j&&rt(Ie,Be))){if(!g[Be]||z[Be])return!1;if(!Ui[Be]){if(!rt(at,wt(Xe,_e,""))){if(!((Be==="src"||Be==="xlink:href"||Be==="href")&&fe!=="script"&&Ye(Xe,"data:")===0&&sn[fe])){if(!(ce&&!rt(et,wt(Xe,_e,"")))){if(Xe)return!1}}}}}}return!0},co=function(fe){var Be=void 0,Xe=void 0,Lt=void 0,sr=void 0;un("beforeSanitizeAttributes",fe,null);var lr=fe.attributes;if(lr){var nr={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:g};for(sr=lr.length;sr--;){Be=lr[sr];var cn=Be,ai=cn.name,ka=cn.namespaceURI;if(Xe=pt(Be.value),Lt=ri(ai),nr.attrName=Lt,nr.attrValue=Xe,nr.keepAttr=!0,nr.forceKeepAttr=void 0,un("uponSanitizeAttribute",fe,nr),Xe=nr.attrValue,!nr.forceKeepAttr&&(oo(ai,fe),!!nr.keepAttr)){if(rt(/\/>/i,Xe)){oo(ai,fe);continue}me&&(Xe=wt(Xe,J," "),Xe=wt(Xe,ve," "));var wa=ri(fe.nodeName);if(uo(wa,Lt,Xe))try{ka?fe.setAttributeNS(ka,ai,Xe):fe.setAttribute(ai,Xe),xe(Ue.removed)}catch{}}}un("afterSanitizeAttributes",fe,null)}},Zo=function tt(fe){var Be=void 0,Xe=Ki(fe);for(un("beforeSanitizeShadowDOM",fe,null);Be=Xe.nextNode();)un("uponSanitizeShadowNode",Be,null),!ba(Be)&&(Be.content instanceof Ot&&tt(Be.content),co(Be));un("afterSanitizeShadowDOM",fe,null)};return Ue.sanitize=function(tt,fe){var Be=void 0,Xe=void 0,Lt=void 0,sr=void 0,lr=void 0;if(ji=!tt,ji&&(tt="<!-->"),typeof tt!="string"&&!ii(tt)){if(typeof tt.toString!="function")throw Et("toString is not a function");if(tt=tt.toString(),typeof tt!="string")throw Et("dirty is not a string, aborting")}if(!Ue.isSupported){if(Xt(ze.toStaticHTML)==="object"||typeof ze.toStaticHTML=="function"){if(typeof tt=="string")return ze.toStaticHTML(tt);if(ii(tt))return ze.toStaticHTML(tt.outerHTML)}return tt}if(Ae||Gi(fe),Ue.removed=[],typeof tt=="string"&&(mi=!1),!mi)if(tt instanceof Vt)Be=so("<!---->"),Xe=Be.ownerDocument.importNode(tt,!0),Xe.nodeType===1&&Xe.nodeName==="BODY"||Xe.nodeName==="HTML"?Be=Xe:Be.appendChild(Xe);else{if(!Ke&&!me&&!Ne&&tt.indexOf("<")===-1)return W&&on?W.createHTML(tt):tt;if(Be=so(tt),!Be)return Ke?null:$}Be&&Pe&&ln(Be.firstChild);for(var nr=Ki(mi?tt:Be);Lt=nr.nextNode();)Lt.nodeType===3&&Lt===sr||ba(Lt)||(Lt.content instanceof Ot&&Zo(Lt.content),co(Lt),sr=Lt);if(sr=null,mi)return tt;if(Ke){if(Dt)for(lr=H.call(Be.ownerDocument);Be.firstChild;)lr.appendChild(Be.firstChild);else lr=Be;return br&&(lr=pe.call(lt,lr,!0)),lr}var cn=Ne?Be.outerHTML:Be.innerHTML;return me&&(cn=wt(cn,J," "),cn=wt(cn,ve," ")),W&&on?W.createHTML(cn):cn},Ue.setConfig=function(tt){Gi(tt),Ae=!0},Ue.clearConfig=function(){Ln=null,Ae=!1},Ue.isValidAttribute=function(tt,fe,Be){Ln||Gi({});var Xe=ri(tt),Lt=ri(fe);return uo(Xe,Lt,Be)},Ue.addHook=function(tt,fe){typeof fe=="function"&&(ie[tt]=ie[tt]||[],Le(ie[tt],fe))},Ue.removeHook=function(tt){ie[tt]&&xe(ie[tt])},Ue.removeHooks=function(tt){ie[tt]&&(ie[tt]=[])},Ue.removeAllHooks=function(){ie={}},Ue}var hr=nn();return hr})}),928:(function(b,T,x){var E=x(322);function B(F,_,X){var ee,se;if(X=X||0,!E(_))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(_,F,X);for(se=_.length,ee=X;X>=0&&ee<se;ee+=1)if(_[ee]===F)return ee;return-1}b.exports=B}),690:(function(b,T,x){var E=x(322),B=x(893),F=x(956);function _(X,ee,se){E(X)?B(X,ee,se):F(X,ee,se)}b.exports=_}),893:(function(b){function T(x,E,B){var F=0,_=x.length;for(B=B||null;F<_&&E.call(B,x[F],F,x)!==!1;F+=1);}b.exports=T}),956:(function(b){function T(x,E,B){var F;B=B||null;for(F in x)if(x.hasOwnProperty(F)&&E.call(B,x[F],F,x)===!1)break}b.exports=T}),990:(function(b,T,x){var E=x(893);function B(F){var _;try{_=Array.prototype.slice.call(F)}catch{_=[],E(F,function(ee){_.push(ee)})}return _}b.exports=B}),755:(function(b){var T="_feEventKey";function x(E,B){var F=E[T],_;return F||(F=E[T]={}),_=F[B],_||(_=F[B]=[]),_}b.exports=x}),349:(function(b,T,x){var E=x(758),B=x(690),F=x(755);function _(se,de,ae){if(E(de)){B(de.split(/\s+/g),function(le){X(se,le,ae)});return}B(de,function(le,Te){X(se,Te,le)})}function X(se,de,ae){var le=F(se,de),Te;ae?(B(le,function(xe,Le){return ae===xe.handler?(ee(se,de,xe.wrappedHandler),Te=Le,!1):!0}),le.splice(Te,1)):(B(le,function(xe){ee(se,de,xe.wrappedHandler)}),le.splice(0,le.length))}function ee(se,de,ae){"removeEventListener"in se?se.removeEventListener(de,ae):"detachEvent"in se&&se.detachEvent("on"+de,ae)}b.exports=_}),348:(function(b,T,x){var E=x(758),B=x(690),F=x(755);function _(se,de,ae,le){if(E(de)){B(de.split(/\s+/g),function(Te){X(se,Te,ae,le)});return}B(de,function(Te,xe){X(se,xe,Te,ae)})}function X(se,de,ae,le){function Te(xe){ae.call(le||se,xe||window.event)}"addEventListener"in se?se.addEventListener(de,Te):"attachEvent"in se&&se.attachEvent("on"+de,Te),ee(se,de,ae,Te)}function ee(se,de,ae,le){var Te=F(se,de),xe=!1;B(Te,function(Le){return Le.handler===ae?(xe=!0,!1):!0}),xe||Te.push({handler:ae,wrappedHandler:le})}b.exports=_}),24:(function(b,T,x){var E=x(322),B=x(929);function F(_,X){if(X=E(X)?X.join(" "):X,X=X.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),B(_.className.baseVal)){_.className=X;return}_.className.baseVal=X}b.exports=F}),204:(function(b,T,x){var E=x(690),B=x(928),F=x(902),_=x(24);function X(ee){var se=Array.prototype.slice.call(arguments,1),de=ee.classList,ae=[],le;if(de){E(se,function(Te){ee.classList.add(Te)});return}le=F(ee),le&&(se=[].concat(le.split(/\s+/),se)),E(se,function(Te){B(Te,ae)<0&&ae.push(Te)}),_(ee,ae)}b.exports=X}),522:(function(b,T,x){var E=x(758),B=x(690);function F(_,X,ee){var se=_.style;if(E(X)){se[X]=ee;return}B(X,function(de,ae){se[ae]=de})}b.exports=F}),902:(function(b,T,x){var E=x(929);function B(F){return!F||!F.className?"":E(F.className.baseVal)?F.className:F.className.baseVal}b.exports=B}),714:(function(b,T,x){var E=x(928),B=x(902);function F(_,X){var ee;return _.classList?_.classList.contains(X):(ee=B(_).split(/\s+/),E(X,ee)>-1)}b.exports=F}),471:(function(b,T,x){var E=x(928),B=x(990),F=Element.prototype,_=F.matches||F.webkitMatchesSelector||F.mozMatchesSelector||F.msMatchesSelector||function(ee){var se=this.document||this.ownerDocument;return E(this,B(se.querySelectorAll(ee)))>-1};function X(ee,se){return _.call(ee,se)}b.exports=X}),462:(function(b,T,x){var E=x(893),B=x(928),F=x(902),_=x(24);function X(ee){var se=Array.prototype.slice.call(arguments,1),de=ee.classList,ae,le;if(de){E(se,function(Te){de.remove(Te)});return}ae=F(ee).split(/\s+/),le=[],E(ae,function(Te){B(Te,se)<0&&le.push(Te)}),_(ee,le)}b.exports=X}),969:(function(b){function T(x,E){var B=Object.prototype.hasOwnProperty,F,_,X,ee;for(X=1,ee=arguments.length;X<ee;X+=1){F=arguments[X];for(_ in F)B.call(F,_)&&(x[_]=F[_])}return x}b.exports=T}),254:(function(b,T,x){var E=x(956);function B(F,_){var X=document.createElement("img"),ee="";return E(_,function(se,de){ee+="&"+de+"="+se}),ee=ee.substring(1),X.src=F+"?"+ee,X.style.display="none",document.body.appendChild(X),document.body.removeChild(X),X}b.exports=B}),391:(function(b,T,x){var E=x(929),B=x(254),F=10080*60*1e3;function _(ee){var se=new Date().getTime();return se-ee>F}function X(ee,se){var de="https://www.google-analytics.com/collect",ae=location.hostname,le="event",Te="use",xe="TOAST UI "+ee+" for "+ae+": Statistics",Le=window.localStorage.getItem(xe);!E(window.tui)&&window.tui.usageStatistics===!1||Le&&!_(Le)||(window.localStorage.setItem(xe,new Date().getTime()),setTimeout(function(){(document.readyState==="interactive"||document.readyState==="complete")&&B(de,{v:1,t:le,tid:se,cid:ae,dp:ae,dh:ee,el:ee,ec:Te})},1e3))}b.exports=X}),322:(function(b){function T(x){return x instanceof Array}b.exports=T}),65:(function(b,T,x){var E=x(929),B=x(934);function F(_){return!E(_)&&!B(_)}b.exports=F}),404:(function(b,T,x){var E=x(790);function B(F){return!E(F)}b.exports=B}),294:(function(b){function T(x){return x instanceof Function}b.exports=T}),934:(function(b){function T(x){return x===null}b.exports=T}),758:(function(b){function T(x){return typeof x=="string"||x instanceof String}b.exports=T}),790:(function(b,T,x){var E=x(65);function B(F){return E(F)&&F!==!1}b.exports=B}),929:(function(b){function T(x){return x===void 0}b.exports=T}),479:(function(b){b.exports=t}),481:(function(b){b.exports=n}),43:(function(b){b.exports=i}),814:(function(b){b.exports=a}),311:(function(b){b.exports=o})},l={};function f(b){var T=l[b];if(T!==void 0)return T.exports;var x=l[b]={exports:{}};return s[b].call(x.exports,x,x.exports,f),x.exports}(function(){f.n=function(b){var T=b&&b.__esModule?function(){return b.default}:function(){return b};return f.d(T,{a:T}),T}})(),(function(){f.d=function(b,T){for(var x in T)f.o(T,x)&&!f.o(b,x)&&Object.defineProperty(b,x,{enumerable:!0,get:T[x]})}})(),(function(){f.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})()})(),(function(){f.o=function(b,T){return Object.prototype.hasOwnProperty.call(b,T)}})();var p={};return(function(){f.d(p,{default:function(){return JZ}});var b=function(){return b=Object.assign||function(d){for(var y,S=1,L=arguments.length;S<L;S++){y=arguments[S];for(var U in y)Object.prototype.hasOwnProperty.call(y,U)&&(d[U]=y[U])}return d},b.apply(this,arguments)};function T(h,d,y){if(arguments.length===2)for(var S=0,L=d.length,U;S<L;S++)(U||!(S in d))&&(U||(U=Array.prototype.slice.call(d,0,S)),U[S]=d[S]);return h.concat(U||Array.prototype.slice.call(d))}var x=function(h,d){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,S){y.__proto__=S}||function(y,S){for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(y[L]=S[L])},x(h,d)};function E(h,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");x(h,d);function y(){this.constructor=h}h.prototype=d===null?Object.create(d):(y.prototype=d.prototype,new y)}var B=function(){return B=Object.assign||function(d){for(var y,S=1,L=arguments.length;S<L;S++){y=arguments[S];for(var U in y)Object.prototype.hasOwnProperty.call(y,U)&&(d[U]=y[U])}return d},B.apply(this,arguments)};function F(h,d,y){if(arguments.length===2)for(var S=0,L=d.length,U;S<L;S++)(U||!(S in d))&&(U||(U=Array.prototype.slice.call(d,0,S)),U[S]=d[S]);return h.concat(U||Array.prototype.slice.call(d))}var _=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof f.g<"u"?f.g:typeof self<"u"?self:{},X={};function ee(h){var d,y,S=X[h];if(S)return S;for(S=X[h]=[],d=0;d<128;d++)y=String.fromCharCode(d),/^[0-9a-z]$/i.test(y)?S.push(y):S.push("%"+("0"+d.toString(16).toUpperCase()).slice(-2));for(d=0;d<h.length;d++)S[h.charCodeAt(d)]=h[d];return S}function se(h,d,y){var S,L,U,G,te,Se="";for(typeof d!="string"&&(y=d,d=se.defaultChars),typeof y>"u"&&(y=!0),te=ee(d),S=0,L=h.length;S<L;S++){if(U=h.charCodeAt(S),y&&U===37&&S+2<L&&/^[0-9a-f]{2}$/i.test(h.slice(S+1,S+3))){Se+=h.slice(S,S+3),S+=2;continue}if(U<128){Se+=te[U];continue}if(U>=55296&&U<=57343){if(U>=55296&&U<=56319&&S+1<L&&(G=h.charCodeAt(S+1),G>=56320&&G<=57343)){Se+=encodeURIComponent(h[S]+h[S+1]),S++;continue}Se+="%EF%BF%BD";continue}Se+=encodeURIComponent(h[S])}return Se}se.defaultChars=";/?:@&=+$,-_.!~*'()#",se.componentChars="-_.!~*'()";var de=se,ae={},le={},Te="Á",xe="á",Le="Ă",ut="ă",Je="∾",wt="∿",Ye="∾̳",pt="Â",rt="â",Et="´",Bt="А",$t="а",Qe="Æ",Ct="æ",ft="",Mt="𝔄",Tt="𝔞",jt="À",Ut="à",Yt="ℵ",ye="ℵ",he="Α",ne="α",oe="Ā",Q="ā",ke="⨿",Ee="&",He="&",nt="⩕",yt="⩓",ct="∧",zt="⩜",At="⩘",Xt="⩚",Nt="∠",ar="⦤",En="∠",nn="⦨",hr="⦩",ze="⦪",Ue="⦫",lt="⦬",dt="⦭",Ot="⦮",gr="⦯",Vt="∡",Gt="∟",Lr="⊾",Kr="⦝",pr="∢",Vr="Å",Mn="⍼",gn="Ą",Jr="ą",Yr="𝔸",Xr="𝕒",or="⩯",an="≈",Kt="⩰",yr="≊",W="≋",$="'",R="",N="≈",P="≊",H="Å",K="å",pe="𝒜",we="𝒶",ie="≔",J="*",ve="≈",be="≍",Ie="Ã",et="ã",_e="Ä",at="ä",I="∳",O="⨑",g="≌",C="϶",D="‵",z="∽",j="⋍",Y="∖",ce="⫧",me="⊽",Ne="⌅",Ae="⌆",Pe="⌅",Ke="⎵",Dt="⎶",br="≌",on="Б",Un="б",vi="„",mi="∵",An="∵",On="∵",va="⦰",sn="϶",ma="ℬ",Ui="ℬ",$i="Β",Wi="β",ga="ℶ",Nn="≬",gi="𝔅",ji="𝔟",Dn="⋂",io="◯",ao="⋃",ri="⨀",Ln="⨁",Rn="⨂",Gi="⨆",yi="★",ni="▽",yn="△",ya="⨄",Xo="⋁",ln="⋀",oo="⤍",so="⧫",Ki="▪",lo="▴",ii="▾",un="◂",ba="▸",uo="␣",co="▒",Zo="░",tt="▓",fe="█",Be="=⃥",Xe="≡⃥",Lt="⫭",sr="⌐",lr="𝔹",nr="𝕓",cn="⊥",ai="⊥",ka="⋈",wa="⧉",Gs="┐",nc="╕",ic="╖",ac="╗",Rr="┌",Ir="╒",oc="╓",sc="╔",lc="─",$n="═",uc="┬",Qo="╤",es="╥",cc="╦",fc="┴",Ca="╧",dc="╨",ts="╩",Ta="⊟",hc="⊞",pc="⊠",vc="┘",mc="╛",gc="╜",yc="╝",Ks="└",rs="╘",Js="╙",Ys="╚",bc="│",kc="║",Xs="┼",wc="╪",Cc="╫",Zs="╬",Qs="┤",Tc="╡",Sa="╢",Sc="╣",xa="├",xc="╞",Ec="╟",Ea="╠",el="‵",tl="˘",Mc="˘",rl="¦",Ac="𝒷",nl="ℬ",Ma="⁏",il="∽",Aa="⋍",Oc="⧅",bi="\\",Ji="⟈",ki="•",bn="•",Sr="≎",al="⪮",Nc="≏",ol="≎",Dc="≏",sl="Ć",ll="ć",fo="⩄",wi="⩉",ns="⩋",ul="∩",is="⋒",Lc="⩇",Rc="⩀",Ic="ⅅ",Pc="∩︀",cl="⁁",fl="ˇ",Bc="ℭ",dl="⩍",Fc="Č",qc="č",Hc="Ç",_c="ç",zc="Ĉ",Vc="ĉ",Uc="∰",hl="⩌",$c="⩐",Wc="Ċ",as="ċ",jc="¸",Gc="¸",Kc="⦲",pl="¢",vl="·",ml="·",gl="𝔠",Jc="ℭ",yl="Ч",Yc="ч",bl="✓",u="✓",m="Χ",c="χ",v="ˆ",k="≗",w="↺",A="↻",M="⊛",q="⊚",V="⊝",Z="⊙",ue="®",re="Ⓢ",ge="⊖",Me="⊕",Fe="⊗",je="○",Re="⧃",bt="≗",gt="⨐",st="⫯",vt="⧂",Ft="∲",_t="”",Zt="’",ir="♣",Wt="♣",In=":",ho="∷",Wn="⩴",Ci="≔",Ti="≔",Oa=",",Qt="@",ss="∁",Pn="∘",Pr="∁",kl="ℂ",wl="≅",T0="⩭",S0="≡",x0="∮",E0="∯",M0="∮",A0="𝕔",O0="ℂ",N0="∐",D0="∐",L0="©",R0="©",I0="℗",P0="∳",B0="↵",F0="✗",q0="⨯",H0="𝒞",_0="𝒸",z0="⫏",V0="⫑",U0="⫐",$0="⫒",W0="⋯",j0="⤸",G0="⤵",K0="⋞",J0="⋟",Y0="↶",X0="⤽",Z0="⩈",Q0="⩆",eC="≍",tC="∪",rC="⋓",nC="⩊",iC="⊍",aC="⩅",oC="∪︀",sC="↷",lC="⤼",uC="⋞",cC="⋟",fC="⋎",dC="⋏",hC="¤",pC="↶",vC="↷",mC="⋎",gC="⋏",yC="∲",bC="∱",kC="⌭",wC="†",CC="‡",TC="ℸ",SC="↓",xC="↡",EC="⇓",MC="‐",AC="⫤",OC="⊣",NC="⤏",DC="˝",LC="Ď",RC="ď",IC="Д",PC="д",BC="‡",FC="⇊",qC="ⅅ",HC="ⅆ",_C="⤑",zC="⩷",VC="°",UC="∇",$C="Δ",WC="δ",jC="⦱",GC="⥿",KC="𝔇",JC="𝔡",YC="⥥",XC="⇃",ZC="⇂",QC="´",e1="˙",t1="˝",r1="`",n1="˜",i1="⋄",a1="⋄",o1="⋄",s1="♦",l1="♦",u1="¨",c1="ⅆ",f1="ϝ",d1="⋲",h1="÷",p1="÷",v1="⋇",m1="⋇",g1="Ђ",y1="ђ",b1="⌞",k1="⌍",w1="$",C1="𝔻",T1="𝕕",S1="¨",x1="˙",E1="⃜",M1="≐",A1="≑",O1="≐",N1="∸",D1="∔",L1="⊡",R1="⌆",I1="∯",P1="¨",B1="⇓",F1="⇐",q1="⇔",H1="⫤",_1="⟸",z1="⟺",V1="⟹",U1="⇒",$1="⊨",W1="⇑",j1="⇕",G1="∥",K1="⤓",J1="↓",Y1="↓",X1="⇓",Z1="⇵",Q1="̑",eT="⇊",tT="⇃",rT="⇂",nT="⥐",iT="⥞",aT="⥖",oT="↽",sT="⥟",lT="⥗",uT="⇁",cT="↧",fT="⊤",dT="⤐",hT="⌟",pT="⌌",vT="𝒟",mT="𝒹",gT="Ѕ",yT="ѕ",bT="⧶",kT="Đ",wT="đ",CT="⋱",TT="▿",ST="▾",xT="⇵",ET="⥯",MT="⦦",AT="Џ",OT="џ",NT="⟿",DT="É",LT="é",RT="⩮",IT="Ě",PT="ě",BT="Ê",FT="ê",qT="≖",HT="≕",_T="Э",zT="э",VT="⩷",UT="Ė",$T="ė",WT="≑",jT="ⅇ",GT="≒",KT="𝔈",JT="𝔢",YT="⪚",XT="È",ZT="è",QT="⪖",eS="⪘",tS="⪙",rS="∈",nS="⏧",iS="ℓ",aS="⪕",oS="⪗",sS="Ē",lS="ē",uS="∅",cS="∅",fS="◻",dS="∅",hS="▫",pS=" ",vS=" ",mS=" ",gS="Ŋ",yS="ŋ",bS=" ",kS="Ę",wS="ę",CS="𝔼",TS="𝕖",SS="⋕",xS="⧣",ES="⩱",MS="ε",AS="Ε",OS="ε",NS="ϵ",DS="≖",LS="≕",RS="≂",IS="⪖",PS="⪕",BS="⩵",FS="=",qS="≂",HS="≟",_S="⇌",zS="≡",VS="⩸",US="⧥",$S="⥱",WS="≓",jS="ℯ",GS="ℰ",KS="≐",JS="⩳",YS="≂",XS="Η",ZS="η",QS="Ð",ex="ð",tx="Ë",rx="ë",nx="€",ix="!",ax="∃",ox="∃",sx="ℰ",lx="ⅇ",ux="ⅇ",cx="≒",fx="Ф",dx="ф",hx="♀",px="ffi",vx="ff",mx="ffl",gx="𝔉",yx="𝔣",bx="fi",kx="◼",wx="▪",Cx="fj",Tx="♭",Sx="fl",xx="▱",Ex="ƒ",Mx="𝔽",Ax="𝕗",Ox="∀",Nx="∀",Dx="⋔",Lx="⫙",Rx="ℱ",Ix="⨍",Px="½",Bx="⅓",Fx="¼",qx="⅕",Hx="⅙",_x="⅛",zx="⅔",Vx="⅖",Ux="¾",$x="⅗",Wx="⅜",jx="⅘",Gx="⅚",Kx="⅝",Jx="⅞",Yx="⁄",Xx="⌢",Zx="𝒻",Qx="ℱ",eE="ǵ",tE="Γ",rE="γ",nE="Ϝ",iE="ϝ",aE="⪆",oE="Ğ",sE="ğ",lE="Ģ",uE="Ĝ",cE="ĝ",fE="Г",dE="г",hE="Ġ",pE="ġ",vE="≥",mE="≧",gE="⪌",yE="⋛",bE="≥",kE="≧",wE="⩾",CE="⪩",TE="⩾",SE="⪀",xE="⪂",EE="⪄",ME="⋛︀",AE="⪔",OE="𝔊",NE="𝔤",DE="≫",LE="⋙",RE="⋙",IE="ℷ",PE="Ѓ",BE="ѓ",FE="⪥",qE="≷",HE="⪒",_E="⪤",zE="⪊",VE="⪊",UE="⪈",$E="≩",WE="⪈",jE="≩",GE="⋧",KE="𝔾",JE="𝕘",YE="`",XE="≥",ZE="⋛",QE="≧",eM="⪢",tM="≷",rM="⩾",nM="≳",iM="𝒢",aM="ℊ",oM="≳",sM="⪎",lM="⪐",uM="⪧",cM="⩺",fM=">",dM=">",hM="≫",pM="⋗",vM="⦕",mM="⩼",gM="⪆",yM="⥸",bM="⋗",kM="⋛",wM="⪌",CM="≷",TM="≳",SM="≩︀",xM="≩︀",EM="ˇ",MM=" ",AM="½",OM="ℋ",NM="Ъ",DM="ъ",LM="⥈",RM="↔",IM="⇔",PM="↭",BM="^",FM="ℏ",qM="Ĥ",HM="ĥ",_M="♥",zM="♥",VM="…",UM="⊹",$M="𝔥",WM="ℌ",jM="ℋ",GM="⤥",KM="⤦",JM="⇿",YM="∻",XM="↩",ZM="↪",QM="𝕙",eA="ℍ",tA="―",rA="─",nA="𝒽",iA="ℋ",aA="ℏ",oA="Ħ",sA="ħ",lA="≎",uA="≏",cA="⁃",fA="‐",dA="Í",hA="í",pA="",vA="Î",mA="î",gA="И",yA="и",bA="İ",kA="Е",wA="е",CA="¡",TA="⇔",SA="𝔦",xA="ℑ",EA="Ì",MA="ì",AA="ⅈ",OA="⨌",NA="∭",DA="⧜",LA="℩",RA="IJ",IA="ij",PA="Ī",BA="ī",FA="ℑ",qA="ⅈ",HA="ℐ",_A="ℑ",zA="ı",VA="ℑ",UA="⊷",$A="Ƶ",WA="⇒",jA="℅",GA="∞",KA="⧝",JA="ı",YA="⊺",XA="∫",ZA="∬",QA="ℤ",eO="∫",tO="⊺",rO="⋂",nO="⨗",iO="⨼",aO="",oO="",sO="Ё",lO="ё",uO="Į",cO="į",fO="𝕀",dO="𝕚",hO="Ι",pO="ι",vO="⨼",mO="¿",gO="𝒾",yO="ℐ",bO="∈",kO="⋵",wO="⋹",CO="⋴",TO="⋳",SO="∈",xO="",EO="Ĩ",MO="ĩ",AO="І",OO="і",NO="Ï",DO="ï",LO="Ĵ",RO="ĵ",IO="Й",PO="й",BO="𝔍",FO="𝔧",qO="ȷ",HO="𝕁",_O="𝕛",zO="𝒥",VO="𝒿",UO="Ј",$O="ј",WO="Є",jO="є",GO="Κ",KO="κ",JO="ϰ",YO="Ķ",XO="ķ",ZO="К",QO="к",eN="𝔎",tN="𝔨",rN="ĸ",nN="Х",iN="х",aN="Ќ",oN="ќ",sN="𝕂",lN="𝕜",uN="𝒦",cN="𝓀",fN="⇚",dN="Ĺ",hN="ĺ",pN="⦴",vN="ℒ",mN="Λ",gN="λ",yN="⟨",bN="⟪",kN="⦑",wN="⟨",CN="⪅",TN="ℒ",SN="«",xN="⇤",EN="⤟",MN="←",AN="↞",ON="⇐",NN="⤝",DN="↩",LN="↫",RN="⤹",IN="⥳",PN="↢",BN="⤙",FN="⤛",qN="⪫",HN="⪭",_N="⪭︀",zN="⤌",VN="⤎",UN="❲",$N="{",WN="[",jN="⦋",GN="⦏",KN="⦍",JN="Ľ",YN="ľ",XN="Ļ",ZN="ļ",QN="⌈",eD="{",tD="Л",rD="л",nD="⤶",iD="“",aD="„",oD="⥧",sD="⥋",lD="↲",uD="≤",cD="≦",fD="⟨",dD="⇤",hD="←",pD="←",vD="⇐",mD="⇆",gD="↢",yD="⌈",bD="⟦",kD="⥡",wD="⥙",CD="⇃",TD="⌊",SD="↽",xD="↼",ED="⇇",MD="↔",AD="↔",OD="⇔",ND="⇆",DD="⇋",LD="↭",RD="⥎",ID="↤",PD="⊣",BD="⥚",FD="⋋",qD="⧏",HD="⊲",_D="⊴",zD="⥑",VD="⥠",UD="⥘",$D="↿",WD="⥒",jD="↼",GD="⪋",KD="⋚",JD="≤",YD="≦",XD="⩽",ZD="⪨",QD="⩽",eL="⩿",tL="⪁",rL="⪃",nL="⋚︀",iL="⪓",aL="⪅",oL="⋖",sL="⋚",lL="⪋",uL="⋚",cL="≦",fL="≶",dL="≶",hL="⪡",pL="≲",vL="⩽",mL="≲",gL="⥼",yL="⌊",bL="𝔏",kL="𝔩",wL="≶",CL="⪑",TL="⥢",SL="↽",xL="↼",EL="⥪",ML="▄",AL="Љ",OL="љ",NL="⇇",DL="≪",LL="⋘",RL="⌞",IL="⇚",PL="⥫",BL="◺",FL="Ŀ",qL="ŀ",HL="⎰",_L="⎰",zL="⪉",VL="⪉",UL="⪇",$L="≨",WL="⪇",jL="≨",GL="⋦",KL="⟬",JL="⇽",YL="⟦",XL="⟵",ZL="⟵",QL="⟸",eR="⟷",tR="⟷",rR="⟺",nR="⟼",iR="⟶",aR="⟶",oR="⟹",sR="↫",lR="↬",uR="⦅",cR="𝕃",fR="𝕝",dR="⨭",hR="⨴",pR="∗",vR="_",mR="↙",gR="↘",yR="◊",bR="◊",kR="⧫",wR="(",CR="⦓",TR="⇆",SR="⌟",xR="⇋",ER="⥭",MR="",AR="⊿",OR="‹",NR="𝓁",DR="ℒ",LR="↰",RR="↰",IR="≲",PR="⪍",BR="⪏",FR="[",qR="‘",HR="‚",_R="Ł",zR="ł",VR="⪦",UR="⩹",$R="<",WR="<",jR="≪",GR="⋖",KR="⋋",JR="⋉",YR="⥶",XR="⩻",ZR="◃",QR="⊴",eI="◂",tI="⦖",rI="⥊",nI="⥦",iI="≨︀",aI="≨︀",oI="¯",sI="♂",lI="✠",uI="✠",cI="↦",fI="↦",dI="↧",hI="↤",pI="↥",vI="▮",mI="⨩",gI="М",yI="м",bI="—",kI="∺",wI="∡",CI=" ",TI="ℳ",SI="𝔐",xI="𝔪",EI="℧",MI="µ",AI="*",OI="⫰",NI="∣",DI="·",LI="⊟",RI="−",II="∸",PI="⨪",BI="∓",FI="⫛",qI="…",HI="∓",_I="⊧",zI="𝕄",VI="𝕞",UI="∓",$I="𝓂",WI="ℳ",jI="∾",GI="Μ",KI="μ",JI="⊸",YI="⊸",XI="∇",ZI="Ń",QI="ń",eP="∠⃒",tP="≉",rP="⩰̸",nP="≋̸",iP="ʼn",aP="≉",oP="♮",sP="ℕ",lP="♮",uP=" ",cP="≎̸",fP="≏̸",dP="⩃",hP="Ň",pP="ň",vP="Ņ",mP="ņ",gP="≇",yP="⩭̸",bP="⩂",kP="Н",wP="н",CP="–",TP="⤤",SP="↗",xP="⇗",EP="↗",MP="≠",AP="≐̸",OP="",NP="",DP="",LP="",RP="≢",IP="⤨",PP="≂̸",BP="≫",FP="≪",qP=`
|
|
652
|
-
`,HP="∄",_P="∄",zP="𝔑",VP="𝔫",UP="≧̸",$P="≱",WP="≱",jP="≧̸",GP="⩾̸",KP="⩾̸",JP="⋙̸",YP="≵",XP="≫⃒",ZP="≯",QP="≯",eB="≫̸",tB="↮",rB="⇎",nB="⫲",iB="∋",aB="⋼",oB="⋺",sB="∋",lB="Њ",uB="њ",cB="↚",fB="⇍",dB="‥",hB="≦̸",pB="≰",vB="↚",mB="⇍",gB="↮",yB="⇎",bB="≰",kB="≦̸",wB="⩽̸",CB="⩽̸",TB="≮",SB="⋘̸",xB="≴",EB="≪⃒",MB="≮",AB="⋪",OB="⋬",NB="≪̸",DB="∤",LB="",RB=" ",IB="𝕟",PB="ℕ",BB="⫬",FB="¬",qB="≢",HB="≭",_B="∦",zB="∉",VB="≠",UB="≂̸",$B="∄",WB="≯",jB="≱",GB="≧̸",KB="≫̸",JB="≹",YB="⩾̸",XB="≵",ZB="≎̸",QB="≏̸",eF="∉",tF="⋵̸",rF="⋹̸",nF="∉",iF="⋷",aF="⋶",oF="⧏̸",sF="⋪",lF="⋬",uF="≮",cF="≰",fF="≸",dF="≪̸",hF="⩽̸",pF="≴",vF="⪢̸",mF="⪡̸",gF="∌",yF="∌",bF="⋾",kF="⋽",wF="⊀",CF="⪯̸",TF="⋠",SF="∌",xF="⧐̸",EF="⋫",MF="⋭",AF="⊏̸",OF="⋢",NF="⊐̸",DF="⋣",LF="⊂⃒",RF="⊈",IF="⊁",PF="⪰̸",BF="⋡",FF="≿̸",qF="⊃⃒",HF="⊉",_F="≁",zF="≄",VF="≇",UF="≉",$F="∤",WF="∦",jF="∦",GF="⫽⃥",KF="∂̸",JF="⨔",YF="⊀",XF="⋠",ZF="⊀",QF="⪯̸",eq="⪯̸",tq="⤳̸",rq="↛",nq="⇏",iq="↝̸",aq="↛",oq="⇏",sq="⋫",lq="⋭",uq="⊁",cq="⋡",fq="⪰̸",dq="𝒩",hq="𝓃",pq="∤",vq="∦",mq="≁",gq="≄",yq="≄",bq="∤",kq="∦",wq="⋢",Cq="⋣",Tq="⊄",Sq="⫅̸",xq="⊈",Eq="⊂⃒",Mq="⊈",Aq="⫅̸",Oq="⊁",Nq="⪰̸",Dq="⊅",Lq="⫆̸",Rq="⊉",Iq="⊃⃒",Pq="⊉",Bq="⫆̸",Fq="≹",qq="Ñ",Hq="ñ",_q="≸",zq="⋪",Vq="⋬",Uq="⋫",$q="⋭",Wq="Ν",jq="ν",Gq="#",Kq="№",Jq=" ",Yq="≍⃒",Xq="⊬",Zq="⊭",Qq="⊮",eH="⊯",tH="≥⃒",rH=">⃒",nH="⤄",iH="⧞",aH="⤂",oH="≤⃒",sH="<⃒",lH="⊴⃒",uH="⤃",cH="⊵⃒",fH="∼⃒",dH="⤣",hH="↖",pH="⇖",vH="↖",mH="⤧",gH="Ó",yH="ó",bH="⊛",kH="Ô",wH="ô",CH="⊚",TH="О",SH="о",xH="⊝",EH="Ő",MH="ő",AH="⨸",OH="⊙",NH="⦼",DH="Œ",LH="œ",RH="⦿",IH="𝔒",PH="𝔬",BH="˛",FH="Ò",qH="ò",HH="⧁",_H="⦵",zH="Ω",VH="∮",UH="↺",$H="⦾",WH="⦻",jH="‾",GH="⧀",KH="Ō",JH="ō",YH="Ω",XH="ω",ZH="Ο",QH="ο",e_="⦶",t_="⊖",r_="𝕆",n_="𝕠",i_="⦷",a_="“",o_="‘",s_="⦹",l_="⊕",u_="↻",c_="⩔",f_="∨",d_="⩝",h_="ℴ",p_="ℴ",v_="ª",m_="º",g_="⊶",y_="⩖",b_="⩗",k_="⩛",w_="Ⓢ",C_="𝒪",T_="ℴ",S_="Ø",x_="ø",E_="⊘",M_="Õ",A_="õ",O_="⨶",N_="⨷",D_="⊗",L_="Ö",R_="ö",I_="⌽",P_="‾",B_="⏞",F_="⎴",q_="⏜",H_="¶",__="∥",z_="∥",V_="⫳",U_="⫽",$_="∂",W_="∂",j_="П",G_="п",K_="%",J_=".",Y_="‰",X_="⊥",Z_="‱",Q_="𝔓",ez="𝔭",tz="Φ",rz="φ",nz="ϕ",iz="ℳ",az="☎",oz="Π",sz="π",lz="⋔",uz="ϖ",cz="ℏ",fz="ℎ",dz="ℏ",hz="⨣",pz="⊞",vz="⨢",mz="+",gz="∔",yz="⨥",bz="⩲",kz="±",wz="±",Cz="⨦",Tz="⨧",Sz="±",xz="ℌ",Ez="⨕",Mz="𝕡",Az="ℙ",Oz="£",Nz="⪷",Dz="⪻",Lz="≺",Rz="≼",Iz="⪷",Pz="≺",Bz="≼",Fz="≺",qz="⪯",Hz="≼",_z="≾",zz="⪯",Vz="⪹",Uz="⪵",$z="⋨",Wz="⪯",jz="⪳",Gz="≾",Kz="′",Jz="″",Yz="ℙ",Xz="⪹",Zz="⪵",Qz="⋨",eV="∏",tV="∏",rV="⌮",nV="⌒",iV="⌓",aV="∝",oV="∝",sV="∷",lV="∝",uV="≾",cV="⊰",fV="𝒫",dV="𝓅",hV="Ψ",pV="ψ",vV=" ",mV="𝔔",gV="𝔮",yV="⨌",bV="𝕢",kV="ℚ",wV="⁗",CV="𝒬",TV="𝓆",SV="ℍ",xV="⨖",EV="?",MV="≟",AV='"',OV='"',NV="⇛",DV="∽̱",LV="Ŕ",RV="ŕ",IV="√",PV="⦳",BV="⟩",FV="⟫",qV="⦒",HV="⦥",_V="⟩",zV="»",VV="⥵",UV="⇥",$V="⤠",WV="⤳",jV="→",GV="↠",KV="⇒",JV="⤞",YV="↪",XV="↬",ZV="⥅",QV="⥴",eU="⤖",tU="↣",rU="↝",nU="⤚",iU="⤜",aU="∶",oU="ℚ",sU="⤍",lU="⤏",uU="⤐",cU="❳",fU="}",dU="]",hU="⦌",pU="⦎",vU="⦐",mU="Ř",gU="ř",yU="Ŗ",bU="ŗ",kU="⌉",wU="}",CU="Р",TU="р",SU="⤷",xU="⥩",EU="”",MU="”",AU="↳",OU="ℜ",NU="ℛ",DU="ℜ",LU="ℝ",RU="ℜ",IU="▭",PU="®",BU="®",FU="∋",qU="⇋",HU="⥯",_U="⥽",zU="⌋",VU="𝔯",UU="ℜ",$U="⥤",WU="⇁",jU="⇀",GU="⥬",KU="Ρ",JU="ρ",YU="ϱ",XU="⟩",ZU="⇥",QU="→",e$="→",t$="⇒",r$="⇄",n$="↣",i$="⌉",a$="⟧",o$="⥝",s$="⥕",l$="⇂",u$="⌋",c$="⇁",f$="⇀",d$="⇄",h$="⇌",p$="⇉",v$="↝",m$="↦",g$="⊢",y$="⥛",b$="⋌",k$="⧐",w$="⊳",C$="⊵",T$="⥏",S$="⥜",x$="⥔",E$="↾",M$="⥓",A$="⇀",O$="˚",N$="≓",D$="⇄",L$="⇌",R$="",I$="⎱",P$="⎱",B$="⫮",F$="⟭",q$="⇾",H$="⟧",_$="⦆",z$="𝕣",V$="ℝ",U$="⨮",$$="⨵",W$="⥰",j$=")",G$="⦔",K$="⨒",J$="⇉",Y$="⇛",X$="›",Z$="𝓇",Q$="ℛ",e2="↱",t2="↱",r2="]",n2="’",i2="’",a2="⋌",o2="⋊",s2="▹",l2="⊵",u2="▸",c2="⧎",f2="⧴",d2="⥨",h2="℞",p2="Ś",v2="ś",m2="‚",g2="⪸",y2="Š",b2="š",k2="⪼",w2="≻",C2="≽",T2="⪰",S2="⪴",x2="Ş",E2="ş",M2="Ŝ",A2="ŝ",O2="⪺",N2="⪶",D2="⋩",L2="⨓",R2="≿",I2="С",P2="с",B2="⊡",F2="⋅",q2="⩦",H2="⤥",_2="↘",z2="⇘",V2="↘",U2="§",$2=";",W2="⤩",j2="∖",G2="∖",K2="✶",J2="𝔖",Y2="𝔰",X2="⌢",Z2="♯",Q2="Щ",eW="щ",tW="Ш",rW="ш",nW="↓",iW="←",aW="∣",oW="∥",sW="→",lW="↑",uW="",cW="Σ",fW="σ",dW="ς",hW="ς",pW="∼",vW="⩪",mW="≃",gW="≃",yW="⪞",bW="⪠",kW="⪝",wW="⪟",CW="≆",TW="⨤",SW="⥲",xW="←",EW="∘",MW="∖",AW="⨳",OW="⧤",NW="∣",DW="⌣",LW="⪪",RW="⪬",IW="⪬︀",PW="Ь",BW="ь",FW="⌿",qW="⧄",HW="/",_W="𝕊",zW="𝕤",VW="♠",UW="♠",$W="∥",WW="⊓",jW="⊓︀",GW="⊔",KW="⊔︀",JW="√",YW="⊏",XW="⊑",ZW="⊏",QW="⊑",e3="⊐",t3="⊒",r3="⊐",n3="⊒",i3="□",a3="□",o3="⊓",s3="⊏",l3="⊑",u3="⊐",c3="⊒",f3="⊔",d3="▪",h3="□",p3="▪",v3="→",m3="𝒮",g3="𝓈",y3="∖",b3="⌣",k3="⋆",w3="⋆",C3="☆",T3="★",S3="ϵ",x3="ϕ",E3="¯",M3="⊂",A3="⋐",O3="⪽",N3="⫅",D3="⊆",L3="⫃",R3="⫁",I3="⫋",P3="⊊",B3="⪿",F3="⥹",q3="⊂",H3="⋐",_3="⊆",z3="⫅",V3="⊆",U3="⊊",$3="⫋",W3="⫇",j3="⫕",G3="⫓",K3="⪸",J3="≻",Y3="≽",X3="≻",Z3="⪰",Q3="≽",ej="≿",tj="⪰",rj="⪺",nj="⪶",ij="⋩",aj="≿",oj="∋",sj="∑",lj="∑",uj="♪",cj="¹",fj="²",dj="³",hj="⊃",pj="⋑",vj="⪾",mj="⫘",gj="⫆",yj="⊇",bj="⫄",kj="⊃",wj="⊇",Cj="⟉",Tj="⫗",Sj="⥻",xj="⫂",Ej="⫌",Mj="⊋",Aj="⫀",Oj="⊃",Nj="⋑",Dj="⊇",Lj="⫆",Rj="⊋",Ij="⫌",Pj="⫈",Bj="⫔",Fj="⫖",qj="⤦",Hj="↙",_j="⇙",zj="↙",Vj="⤪",Uj="ß",$j=" ",Wj="⌖",jj="Τ",Gj="τ",Kj="⎴",Jj="Ť",Yj="ť",Xj="Ţ",Zj="ţ",Qj="Т",eG="т",tG="⃛",rG="⌕",nG="𝔗",iG="𝔱",aG="∴",oG="∴",sG="∴",lG="Θ",uG="θ",cG="ϑ",fG="ϑ",dG="≈",hG="∼",pG=" ",vG=" ",mG=" ",gG="≈",yG="∼",bG="Þ",kG="þ",wG="˜",CG="∼",TG="≃",SG="≅",xG="≈",EG="⨱",MG="⊠",AG="×",OG="⨰",NG="∭",DG="⤨",LG="⌶",RG="⫱",IG="⊤",PG="𝕋",BG="𝕥",FG="⫚",qG="⤩",HG="‴",_G="™",zG="™",VG="▵",UG="▿",$G="◃",WG="⊴",jG="≜",GG="▹",KG="⊵",JG="◬",YG="≜",XG="⨺",ZG="⃛",QG="⨹",eK="⧍",tK="⨻",rK="⏢",nK="𝒯",iK="𝓉",aK="Ц",oK="ц",sK="Ћ",lK="ћ",uK="Ŧ",cK="ŧ",fK="≬",dK="↞",hK="↠",pK="Ú",vK="ú",mK="↑",gK="↟",yK="⇑",bK="⥉",kK="Ў",wK="ў",CK="Ŭ",TK="ŭ",SK="Û",xK="û",EK="У",MK="у",AK="⇅",OK="Ű",NK="ű",DK="⥮",LK="⥾",RK="𝔘",IK="𝔲",PK="Ù",BK="ù",FK="⥣",qK="↿",HK="↾",_K="▀",zK="⌜",VK="⌜",UK="⌏",$K="◸",WK="Ū",jK="ū",GK="¨",KK="_",JK="⏟",YK="⎵",XK="⏝",ZK="⋃",QK="⊎",e4="Ų",t4="ų",r4="𝕌",n4="𝕦",i4="⤒",a4="↑",o4="↑",s4="⇑",l4="⇅",u4="↕",c4="↕",f4="⇕",d4="⥮",h4="↿",p4="↾",v4="⊎",m4="↖",g4="↗",y4="υ",b4="ϒ",k4="ϒ",w4="Υ",C4="υ",T4="↥",S4="⊥",x4="⇈",E4="⌝",M4="⌝",A4="⌎",O4="Ů",N4="ů",D4="◹",L4="𝒰",R4="𝓊",I4="⋰",P4="Ũ",B4="ũ",F4="▵",q4="▴",H4="⇈",_4="Ü",z4="ü",V4="⦧",U4="⦜",$4="ϵ",W4="ϰ",j4="∅",G4="ϕ",K4="ϖ",J4="∝",Y4="↕",X4="⇕",Z4="ϱ",Q4="ς",e8="⊊︀",t8="⫋︀",r8="⊋︀",n8="⫌︀",i8="ϑ",a8="⊲",o8="⊳",s8="⫨",l8="⫫",u8="⫩",c8="В",f8="в",d8="⊢",h8="⊨",p8="⊩",v8="⊫",m8="⫦",g8="⊻",y8="∨",b8="⋁",k8="≚",w8="⋮",C8="|",T8="‖",S8="|",x8="‖",E8="∣",M8="|",A8="❘",O8="≀",N8=" ",D8="𝔙",L8="𝔳",R8="⊲",I8="⊂⃒",P8="⊃⃒",B8="𝕍",F8="𝕧",q8="∝",H8="⊳",_8="𝒱",z8="𝓋",V8="⫋︀",U8="⊊︀",$8="⫌︀",W8="⊋︀",j8="⊪",G8="⦚",K8="Ŵ",J8="ŵ",Y8="⩟",X8="∧",Z8="⋀",Q8="≙",e5="℘",t5="𝔚",r5="𝔴",n5="𝕎",i5="𝕨",a5="℘",o5="≀",s5="≀",l5="𝒲",u5="𝓌",c5="⋂",f5="◯",d5="⋃",h5="▽",p5="𝔛",v5="𝔵",m5="⟷",g5="⟺",y5="Ξ",b5="ξ",k5="⟵",w5="⟸",C5="⟼",T5="⋻",S5="⨀",x5="𝕏",E5="𝕩",M5="⨁",A5="⨂",O5="⟶",N5="⟹",D5="𝒳",L5="𝓍",R5="⨆",I5="⨄",P5="△",B5="⋁",F5="⋀",q5="Ý",H5="ý",_5="Я",z5="я",V5="Ŷ",U5="ŷ",$5="Ы",W5="ы",j5="¥",G5="𝔜",K5="𝔶",J5="Ї",Y5="ї",X5="𝕐",Z5="𝕪",Q5="𝒴",eJ="𝓎",tJ="Ю",rJ="ю",nJ="ÿ",iJ="Ÿ",aJ="Ź",oJ="ź",sJ="Ž",lJ="ž",uJ="З",cJ="з",fJ="Ż",dJ="ż",hJ="ℨ",pJ="",vJ="Ζ",mJ="ζ",gJ="𝔷",yJ="ℨ",bJ="Ж",kJ="ж",wJ="⇝",CJ="𝕫",TJ="ℤ",SJ="𝒵",xJ="𝓏",EJ="",MJ="",tp={Aacute:Te,aacute:xe,Abreve:Le,abreve:ut,ac:Je,acd:wt,acE:Ye,Acirc:pt,acirc:rt,acute:Et,Acy:Bt,acy:$t,AElig:Qe,aelig:Ct,af:ft,Afr:Mt,afr:Tt,Agrave:jt,agrave:Ut,alefsym:Yt,aleph:ye,Alpha:he,alpha:ne,Amacr:oe,amacr:Q,amalg:ke,amp:Ee,AMP:He,andand:nt,And:yt,and:ct,andd:zt,andslope:At,andv:Xt,ang:Nt,ange:ar,angle:En,angmsdaa:nn,angmsdab:hr,angmsdac:ze,angmsdad:Ue,angmsdae:lt,angmsdaf:dt,angmsdag:Ot,angmsdah:gr,angmsd:Vt,angrt:Gt,angrtvb:Lr,angrtvbd:Kr,angsph:pr,angst:Vr,angzarr:Mn,Aogon:gn,aogon:Jr,Aopf:Yr,aopf:Xr,apacir:or,ap:an,apE:Kt,ape:yr,apid:W,apos:$,ApplyFunction:R,approx:N,approxeq:P,Aring:H,aring:K,Ascr:pe,ascr:we,Assign:ie,ast:J,asymp:ve,asympeq:be,Atilde:Ie,atilde:et,Auml:_e,auml:at,awconint:I,awint:O,backcong:g,backepsilon:C,backprime:D,backsim:z,backsimeq:j,Backslash:Y,Barv:ce,barvee:me,barwed:Ne,Barwed:Ae,barwedge:Pe,bbrk:Ke,bbrktbrk:Dt,bcong:br,Bcy:on,bcy:Un,bdquo:vi,becaus:mi,because:An,Because:On,bemptyv:va,bepsi:sn,bernou:ma,Bernoullis:Ui,Beta:$i,beta:Wi,beth:ga,between:Nn,Bfr:gi,bfr:ji,bigcap:Dn,bigcirc:io,bigcup:ao,bigodot:ri,bigoplus:Ln,bigotimes:Rn,bigsqcup:Gi,bigstar:yi,bigtriangledown:ni,bigtriangleup:yn,biguplus:ya,bigvee:Xo,bigwedge:ln,bkarow:oo,blacklozenge:so,blacksquare:Ki,blacktriangle:lo,blacktriangledown:ii,blacktriangleleft:un,blacktriangleright:ba,blank:uo,blk12:co,blk14:Zo,blk34:tt,block:fe,bne:Be,bnequiv:Xe,bNot:Lt,bnot:sr,Bopf:lr,bopf:nr,bot:cn,bottom:ai,bowtie:ka,boxbox:wa,boxdl:Gs,boxdL:nc,boxDl:ic,boxDL:ac,boxdr:Rr,boxdR:Ir,boxDr:oc,boxDR:sc,boxh:lc,boxH:$n,boxhd:uc,boxHd:Qo,boxhD:es,boxHD:cc,boxhu:fc,boxHu:Ca,boxhU:dc,boxHU:ts,boxminus:Ta,boxplus:hc,boxtimes:pc,boxul:vc,boxuL:mc,boxUl:gc,boxUL:yc,boxur:Ks,boxuR:rs,boxUr:Js,boxUR:Ys,boxv:bc,boxV:kc,boxvh:Xs,boxvH:wc,boxVh:Cc,boxVH:Zs,boxvl:Qs,boxvL:Tc,boxVl:Sa,boxVL:Sc,boxvr:xa,boxvR:xc,boxVr:Ec,boxVR:Ea,bprime:el,breve:tl,Breve:Mc,brvbar:rl,bscr:Ac,Bscr:nl,bsemi:Ma,bsim:il,bsime:Aa,bsolb:Oc,bsol:bi,bsolhsub:Ji,bull:ki,bullet:bn,bump:Sr,bumpE:al,bumpe:Nc,Bumpeq:ol,bumpeq:Dc,Cacute:sl,cacute:ll,capand:fo,capbrcup:wi,capcap:ns,cap:ul,Cap:is,capcup:Lc,capdot:Rc,CapitalDifferentialD:Ic,caps:Pc,caret:cl,caron:fl,Cayleys:Bc,ccaps:dl,Ccaron:Fc,ccaron:qc,Ccedil:Hc,ccedil:_c,Ccirc:zc,ccirc:Vc,Cconint:Uc,ccups:hl,ccupssm:$c,Cdot:Wc,cdot:as,cedil:jc,Cedilla:Gc,cemptyv:Kc,cent:pl,centerdot:vl,CenterDot:ml,cfr:gl,Cfr:Jc,CHcy:yl,chcy:Yc,check:bl,checkmark:u,Chi:m,chi:c,circ:v,circeq:k,circlearrowleft:w,circlearrowright:A,circledast:M,circledcirc:q,circleddash:V,CircleDot:Z,circledR:ue,circledS:re,CircleMinus:ge,CirclePlus:Me,CircleTimes:Fe,cir:je,cirE:Re,cire:bt,cirfnint:gt,cirmid:st,cirscir:vt,ClockwiseContourIntegral:Ft,CloseCurlyDoubleQuote:_t,CloseCurlyQuote:Zt,clubs:ir,clubsuit:Wt,colon:In,Colon:ho,Colone:Wn,colone:Ci,coloneq:Ti,comma:Oa,commat:Qt,comp:ss,compfn:Pn,complement:Pr,complexes:kl,cong:wl,congdot:T0,Congruent:S0,conint:x0,Conint:E0,ContourIntegral:M0,copf:A0,Copf:O0,coprod:N0,Coproduct:D0,copy:L0,COPY:R0,copysr:I0,CounterClockwiseContourIntegral:P0,crarr:B0,cross:F0,Cross:q0,Cscr:H0,cscr:_0,csub:z0,csube:V0,csup:U0,csupe:$0,ctdot:W0,cudarrl:j0,cudarrr:G0,cuepr:K0,cuesc:J0,cularr:Y0,cularrp:X0,cupbrcap:Z0,cupcap:Q0,CupCap:eC,cup:tC,Cup:rC,cupcup:nC,cupdot:iC,cupor:aC,cups:oC,curarr:sC,curarrm:lC,curlyeqprec:uC,curlyeqsucc:cC,curlyvee:fC,curlywedge:dC,curren:hC,curvearrowleft:pC,curvearrowright:vC,cuvee:mC,cuwed:gC,cwconint:yC,cwint:bC,cylcty:kC,dagger:wC,Dagger:CC,daleth:TC,darr:SC,Darr:xC,dArr:EC,dash:MC,Dashv:AC,dashv:OC,dbkarow:NC,dblac:DC,Dcaron:LC,dcaron:RC,Dcy:IC,dcy:PC,ddagger:BC,ddarr:FC,DD:qC,dd:HC,DDotrahd:_C,ddotseq:zC,deg:VC,Del:UC,Delta:$C,delta:WC,demptyv:jC,dfisht:GC,Dfr:KC,dfr:JC,dHar:YC,dharl:XC,dharr:ZC,DiacriticalAcute:QC,DiacriticalDot:e1,DiacriticalDoubleAcute:t1,DiacriticalGrave:r1,DiacriticalTilde:n1,diam:i1,diamond:a1,Diamond:o1,diamondsuit:s1,diams:l1,die:u1,DifferentialD:c1,digamma:f1,disin:d1,div:h1,divide:p1,divideontimes:v1,divonx:m1,DJcy:g1,djcy:y1,dlcorn:b1,dlcrop:k1,dollar:w1,Dopf:C1,dopf:T1,Dot:S1,dot:x1,DotDot:E1,doteq:M1,doteqdot:A1,DotEqual:O1,dotminus:N1,dotplus:D1,dotsquare:L1,doublebarwedge:R1,DoubleContourIntegral:I1,DoubleDot:P1,DoubleDownArrow:B1,DoubleLeftArrow:F1,DoubleLeftRightArrow:q1,DoubleLeftTee:H1,DoubleLongLeftArrow:_1,DoubleLongLeftRightArrow:z1,DoubleLongRightArrow:V1,DoubleRightArrow:U1,DoubleRightTee:$1,DoubleUpArrow:W1,DoubleUpDownArrow:j1,DoubleVerticalBar:G1,DownArrowBar:K1,downarrow:J1,DownArrow:Y1,Downarrow:X1,DownArrowUpArrow:Z1,DownBreve:Q1,downdownarrows:eT,downharpoonleft:tT,downharpoonright:rT,DownLeftRightVector:nT,DownLeftTeeVector:iT,DownLeftVectorBar:aT,DownLeftVector:oT,DownRightTeeVector:sT,DownRightVectorBar:lT,DownRightVector:uT,DownTeeArrow:cT,DownTee:fT,drbkarow:dT,drcorn:hT,drcrop:pT,Dscr:vT,dscr:mT,DScy:gT,dscy:yT,dsol:bT,Dstrok:kT,dstrok:wT,dtdot:CT,dtri:TT,dtrif:ST,duarr:xT,duhar:ET,dwangle:MT,DZcy:AT,dzcy:OT,dzigrarr:NT,Eacute:DT,eacute:LT,easter:RT,Ecaron:IT,ecaron:PT,Ecirc:BT,ecirc:FT,ecir:qT,ecolon:HT,Ecy:_T,ecy:zT,eDDot:VT,Edot:UT,edot:$T,eDot:WT,ee:jT,efDot:GT,Efr:KT,efr:JT,eg:YT,Egrave:XT,egrave:ZT,egs:QT,egsdot:eS,el:tS,Element:rS,elinters:nS,ell:iS,els:aS,elsdot:oS,Emacr:sS,emacr:lS,empty:uS,emptyset:cS,EmptySmallSquare:fS,emptyv:dS,EmptyVerySmallSquare:hS,emsp13:pS,emsp14:vS,emsp:mS,ENG:gS,eng:yS,ensp:bS,Eogon:kS,eogon:wS,Eopf:CS,eopf:TS,epar:SS,eparsl:xS,eplus:ES,epsi:MS,Epsilon:AS,epsilon:OS,epsiv:NS,eqcirc:DS,eqcolon:LS,eqsim:RS,eqslantgtr:IS,eqslantless:PS,Equal:BS,equals:FS,EqualTilde:qS,equest:HS,Equilibrium:_S,equiv:zS,equivDD:VS,eqvparsl:US,erarr:$S,erDot:WS,escr:jS,Escr:GS,esdot:KS,Esim:JS,esim:YS,Eta:XS,eta:ZS,ETH:QS,eth:ex,Euml:tx,euml:rx,euro:nx,excl:ix,exist:ax,Exists:ox,expectation:sx,exponentiale:lx,ExponentialE:ux,fallingdotseq:cx,Fcy:fx,fcy:dx,female:hx,ffilig:px,fflig:vx,ffllig:mx,Ffr:gx,ffr:yx,filig:bx,FilledSmallSquare:kx,FilledVerySmallSquare:wx,fjlig:Cx,flat:Tx,fllig:Sx,fltns:xx,fnof:Ex,Fopf:Mx,fopf:Ax,forall:Ox,ForAll:Nx,fork:Dx,forkv:Lx,Fouriertrf:Rx,fpartint:Ix,frac12:Px,frac13:Bx,frac14:Fx,frac15:qx,frac16:Hx,frac18:_x,frac23:zx,frac25:Vx,frac34:Ux,frac35:$x,frac38:Wx,frac45:jx,frac56:Gx,frac58:Kx,frac78:Jx,frasl:Yx,frown:Xx,fscr:Zx,Fscr:Qx,gacute:eE,Gamma:tE,gamma:rE,Gammad:nE,gammad:iE,gap:aE,Gbreve:oE,gbreve:sE,Gcedil:lE,Gcirc:uE,gcirc:cE,Gcy:fE,gcy:dE,Gdot:hE,gdot:pE,ge:vE,gE:mE,gEl:gE,gel:yE,geq:bE,geqq:kE,geqslant:wE,gescc:CE,ges:TE,gesdot:SE,gesdoto:xE,gesdotol:EE,gesl:ME,gesles:AE,Gfr:OE,gfr:NE,gg:DE,Gg:LE,ggg:RE,gimel:IE,GJcy:PE,gjcy:BE,gla:FE,gl:qE,glE:HE,glj:_E,gnap:zE,gnapprox:VE,gne:UE,gnE:$E,gneq:WE,gneqq:jE,gnsim:GE,Gopf:KE,gopf:JE,grave:YE,GreaterEqual:XE,GreaterEqualLess:ZE,GreaterFullEqual:QE,GreaterGreater:eM,GreaterLess:tM,GreaterSlantEqual:rM,GreaterTilde:nM,Gscr:iM,gscr:aM,gsim:oM,gsime:sM,gsiml:lM,gtcc:uM,gtcir:cM,gt:fM,GT:dM,Gt:hM,gtdot:pM,gtlPar:vM,gtquest:mM,gtrapprox:gM,gtrarr:yM,gtrdot:bM,gtreqless:kM,gtreqqless:wM,gtrless:CM,gtrsim:TM,gvertneqq:SM,gvnE:xM,Hacek:EM,hairsp:MM,half:AM,hamilt:OM,HARDcy:NM,hardcy:DM,harrcir:LM,harr:RM,hArr:IM,harrw:PM,Hat:BM,hbar:FM,Hcirc:qM,hcirc:HM,hearts:_M,heartsuit:zM,hellip:VM,hercon:UM,hfr:$M,Hfr:WM,HilbertSpace:jM,hksearow:GM,hkswarow:KM,hoarr:JM,homtht:YM,hookleftarrow:XM,hookrightarrow:ZM,hopf:QM,Hopf:eA,horbar:tA,HorizontalLine:rA,hscr:nA,Hscr:iA,hslash:aA,Hstrok:oA,hstrok:sA,HumpDownHump:lA,HumpEqual:uA,hybull:cA,hyphen:fA,Iacute:dA,iacute:hA,ic:pA,Icirc:vA,icirc:mA,Icy:gA,icy:yA,Idot:bA,IEcy:kA,iecy:wA,iexcl:CA,iff:TA,ifr:SA,Ifr:xA,Igrave:EA,igrave:MA,ii:AA,iiiint:OA,iiint:NA,iinfin:DA,iiota:LA,IJlig:RA,ijlig:IA,Imacr:PA,imacr:BA,image:FA,ImaginaryI:qA,imagline:HA,imagpart:_A,imath:zA,Im:VA,imof:UA,imped:$A,Implies:WA,incare:jA,in:"∈",infin:GA,infintie:KA,inodot:JA,intcal:YA,int:XA,Int:ZA,integers:QA,Integral:eO,intercal:tO,Intersection:rO,intlarhk:nO,intprod:iO,InvisibleComma:aO,InvisibleTimes:oO,IOcy:sO,iocy:lO,Iogon:uO,iogon:cO,Iopf:fO,iopf:dO,Iota:hO,iota:pO,iprod:vO,iquest:mO,iscr:gO,Iscr:yO,isin:bO,isindot:kO,isinE:wO,isins:CO,isinsv:TO,isinv:SO,it:xO,Itilde:EO,itilde:MO,Iukcy:AO,iukcy:OO,Iuml:NO,iuml:DO,Jcirc:LO,jcirc:RO,Jcy:IO,jcy:PO,Jfr:BO,jfr:FO,jmath:qO,Jopf:HO,jopf:_O,Jscr:zO,jscr:VO,Jsercy:UO,jsercy:$O,Jukcy:WO,jukcy:jO,Kappa:GO,kappa:KO,kappav:JO,Kcedil:YO,kcedil:XO,Kcy:ZO,kcy:QO,Kfr:eN,kfr:tN,kgreen:rN,KHcy:nN,khcy:iN,KJcy:aN,kjcy:oN,Kopf:sN,kopf:lN,Kscr:uN,kscr:cN,lAarr:fN,Lacute:dN,lacute:hN,laemptyv:pN,lagran:vN,Lambda:mN,lambda:gN,lang:yN,Lang:bN,langd:kN,langle:wN,lap:CN,Laplacetrf:TN,laquo:SN,larrb:xN,larrbfs:EN,larr:MN,Larr:AN,lArr:ON,larrfs:NN,larrhk:DN,larrlp:LN,larrpl:RN,larrsim:IN,larrtl:PN,latail:BN,lAtail:FN,lat:qN,late:HN,lates:_N,lbarr:zN,lBarr:VN,lbbrk:UN,lbrace:$N,lbrack:WN,lbrke:jN,lbrksld:GN,lbrkslu:KN,Lcaron:JN,lcaron:YN,Lcedil:XN,lcedil:ZN,lceil:QN,lcub:eD,Lcy:tD,lcy:rD,ldca:nD,ldquo:iD,ldquor:aD,ldrdhar:oD,ldrushar:sD,ldsh:lD,le:uD,lE:cD,LeftAngleBracket:fD,LeftArrowBar:dD,leftarrow:hD,LeftArrow:pD,Leftarrow:vD,LeftArrowRightArrow:mD,leftarrowtail:gD,LeftCeiling:yD,LeftDoubleBracket:bD,LeftDownTeeVector:kD,LeftDownVectorBar:wD,LeftDownVector:CD,LeftFloor:TD,leftharpoondown:SD,leftharpoonup:xD,leftleftarrows:ED,leftrightarrow:MD,LeftRightArrow:AD,Leftrightarrow:OD,leftrightarrows:ND,leftrightharpoons:DD,leftrightsquigarrow:LD,LeftRightVector:RD,LeftTeeArrow:ID,LeftTee:PD,LeftTeeVector:BD,leftthreetimes:FD,LeftTriangleBar:qD,LeftTriangle:HD,LeftTriangleEqual:_D,LeftUpDownVector:zD,LeftUpTeeVector:VD,LeftUpVectorBar:UD,LeftUpVector:$D,LeftVectorBar:WD,LeftVector:jD,lEg:GD,leg:KD,leq:JD,leqq:YD,leqslant:XD,lescc:ZD,les:QD,lesdot:eL,lesdoto:tL,lesdotor:rL,lesg:nL,lesges:iL,lessapprox:aL,lessdot:oL,lesseqgtr:sL,lesseqqgtr:lL,LessEqualGreater:uL,LessFullEqual:cL,LessGreater:fL,lessgtr:dL,LessLess:hL,lesssim:pL,LessSlantEqual:vL,LessTilde:mL,lfisht:gL,lfloor:yL,Lfr:bL,lfr:kL,lg:wL,lgE:CL,lHar:TL,lhard:SL,lharu:xL,lharul:EL,lhblk:ML,LJcy:AL,ljcy:OL,llarr:NL,ll:DL,Ll:LL,llcorner:RL,Lleftarrow:IL,llhard:PL,lltri:BL,Lmidot:FL,lmidot:qL,lmoustache:HL,lmoust:_L,lnap:zL,lnapprox:VL,lne:UL,lnE:$L,lneq:WL,lneqq:jL,lnsim:GL,loang:KL,loarr:JL,lobrk:YL,longleftarrow:XL,LongLeftArrow:ZL,Longleftarrow:QL,longleftrightarrow:eR,LongLeftRightArrow:tR,Longleftrightarrow:rR,longmapsto:nR,longrightarrow:iR,LongRightArrow:aR,Longrightarrow:oR,looparrowleft:sR,looparrowright:lR,lopar:uR,Lopf:cR,lopf:fR,loplus:dR,lotimes:hR,lowast:pR,lowbar:vR,LowerLeftArrow:mR,LowerRightArrow:gR,loz:yR,lozenge:bR,lozf:kR,lpar:wR,lparlt:CR,lrarr:TR,lrcorner:SR,lrhar:xR,lrhard:ER,lrm:MR,lrtri:AR,lsaquo:OR,lscr:NR,Lscr:DR,lsh:LR,Lsh:RR,lsim:IR,lsime:PR,lsimg:BR,lsqb:FR,lsquo:qR,lsquor:HR,Lstrok:_R,lstrok:zR,ltcc:VR,ltcir:UR,lt:$R,LT:WR,Lt:jR,ltdot:GR,lthree:KR,ltimes:JR,ltlarr:YR,ltquest:XR,ltri:ZR,ltrie:QR,ltrif:eI,ltrPar:tI,lurdshar:rI,luruhar:nI,lvertneqq:iI,lvnE:aI,macr:oI,male:sI,malt:lI,maltese:uI,Map:"⤅",map:cI,mapsto:fI,mapstodown:dI,mapstoleft:hI,mapstoup:pI,marker:vI,mcomma:mI,Mcy:gI,mcy:yI,mdash:bI,mDDot:kI,measuredangle:wI,MediumSpace:CI,Mellintrf:TI,Mfr:SI,mfr:xI,mho:EI,micro:MI,midast:AI,midcir:OI,mid:NI,middot:DI,minusb:LI,minus:RI,minusd:II,minusdu:PI,MinusPlus:BI,mlcp:FI,mldr:qI,mnplus:HI,models:_I,Mopf:zI,mopf:VI,mp:UI,mscr:$I,Mscr:WI,mstpos:jI,Mu:GI,mu:KI,multimap:JI,mumap:YI,nabla:XI,Nacute:ZI,nacute:QI,nang:eP,nap:tP,napE:rP,napid:nP,napos:iP,napprox:aP,natural:oP,naturals:sP,natur:lP,nbsp:uP,nbump:cP,nbumpe:fP,ncap:dP,Ncaron:hP,ncaron:pP,Ncedil:vP,ncedil:mP,ncong:gP,ncongdot:yP,ncup:bP,Ncy:kP,ncy:wP,ndash:CP,nearhk:TP,nearr:SP,neArr:xP,nearrow:EP,ne:MP,nedot:AP,NegativeMediumSpace:OP,NegativeThickSpace:NP,NegativeThinSpace:DP,NegativeVeryThinSpace:LP,nequiv:RP,nesear:IP,nesim:PP,NestedGreaterGreater:BP,NestedLessLess:FP,NewLine:qP,nexist:HP,nexists:_P,Nfr:zP,nfr:VP,ngE:UP,nge:$P,ngeq:WP,ngeqq:jP,ngeqslant:GP,nges:KP,nGg:JP,ngsim:YP,nGt:XP,ngt:ZP,ngtr:QP,nGtv:eB,nharr:tB,nhArr:rB,nhpar:nB,ni:iB,nis:aB,nisd:oB,niv:sB,NJcy:lB,njcy:uB,nlarr:cB,nlArr:fB,nldr:dB,nlE:hB,nle:pB,nleftarrow:vB,nLeftarrow:mB,nleftrightarrow:gB,nLeftrightarrow:yB,nleq:bB,nleqq:kB,nleqslant:wB,nles:CB,nless:TB,nLl:SB,nlsim:xB,nLt:EB,nlt:MB,nltri:AB,nltrie:OB,nLtv:NB,nmid:DB,NoBreak:LB,NonBreakingSpace:RB,nopf:IB,Nopf:PB,Not:BB,not:FB,NotCongruent:qB,NotCupCap:HB,NotDoubleVerticalBar:_B,NotElement:zB,NotEqual:VB,NotEqualTilde:UB,NotExists:$B,NotGreater:WB,NotGreaterEqual:jB,NotGreaterFullEqual:GB,NotGreaterGreater:KB,NotGreaterLess:JB,NotGreaterSlantEqual:YB,NotGreaterTilde:XB,NotHumpDownHump:ZB,NotHumpEqual:QB,notin:eF,notindot:tF,notinE:rF,notinva:nF,notinvb:iF,notinvc:aF,NotLeftTriangleBar:oF,NotLeftTriangle:sF,NotLeftTriangleEqual:lF,NotLess:uF,NotLessEqual:cF,NotLessGreater:fF,NotLessLess:dF,NotLessSlantEqual:hF,NotLessTilde:pF,NotNestedGreaterGreater:vF,NotNestedLessLess:mF,notni:gF,notniva:yF,notnivb:bF,notnivc:kF,NotPrecedes:wF,NotPrecedesEqual:CF,NotPrecedesSlantEqual:TF,NotReverseElement:SF,NotRightTriangleBar:xF,NotRightTriangle:EF,NotRightTriangleEqual:MF,NotSquareSubset:AF,NotSquareSubsetEqual:OF,NotSquareSuperset:NF,NotSquareSupersetEqual:DF,NotSubset:LF,NotSubsetEqual:RF,NotSucceeds:IF,NotSucceedsEqual:PF,NotSucceedsSlantEqual:BF,NotSucceedsTilde:FF,NotSuperset:qF,NotSupersetEqual:HF,NotTilde:_F,NotTildeEqual:zF,NotTildeFullEqual:VF,NotTildeTilde:UF,NotVerticalBar:$F,nparallel:WF,npar:jF,nparsl:GF,npart:KF,npolint:JF,npr:YF,nprcue:XF,nprec:ZF,npreceq:QF,npre:eq,nrarrc:tq,nrarr:rq,nrArr:nq,nrarrw:iq,nrightarrow:aq,nRightarrow:oq,nrtri:sq,nrtrie:lq,nsc:uq,nsccue:cq,nsce:fq,Nscr:dq,nscr:hq,nshortmid:pq,nshortparallel:vq,nsim:mq,nsime:gq,nsimeq:yq,nsmid:bq,nspar:kq,nsqsube:wq,nsqsupe:Cq,nsub:Tq,nsubE:Sq,nsube:xq,nsubset:Eq,nsubseteq:Mq,nsubseteqq:Aq,nsucc:Oq,nsucceq:Nq,nsup:Dq,nsupE:Lq,nsupe:Rq,nsupset:Iq,nsupseteq:Pq,nsupseteqq:Bq,ntgl:Fq,Ntilde:qq,ntilde:Hq,ntlg:_q,ntriangleleft:zq,ntrianglelefteq:Vq,ntriangleright:Uq,ntrianglerighteq:$q,Nu:Wq,nu:jq,num:Gq,numero:Kq,numsp:Jq,nvap:Yq,nvdash:Xq,nvDash:Zq,nVdash:Qq,nVDash:eH,nvge:tH,nvgt:rH,nvHarr:nH,nvinfin:iH,nvlArr:aH,nvle:oH,nvlt:sH,nvltrie:lH,nvrArr:uH,nvrtrie:cH,nvsim:fH,nwarhk:dH,nwarr:hH,nwArr:pH,nwarrow:vH,nwnear:mH,Oacute:gH,oacute:yH,oast:bH,Ocirc:kH,ocirc:wH,ocir:CH,Ocy:TH,ocy:SH,odash:xH,Odblac:EH,odblac:MH,odiv:AH,odot:OH,odsold:NH,OElig:DH,oelig:LH,ofcir:RH,Ofr:IH,ofr:PH,ogon:BH,Ograve:FH,ograve:qH,ogt:HH,ohbar:_H,ohm:zH,oint:VH,olarr:UH,olcir:$H,olcross:WH,oline:jH,olt:GH,Omacr:KH,omacr:JH,Omega:YH,omega:XH,Omicron:ZH,omicron:QH,omid:e_,ominus:t_,Oopf:r_,oopf:n_,opar:i_,OpenCurlyDoubleQuote:a_,OpenCurlyQuote:o_,operp:s_,oplus:l_,orarr:u_,Or:c_,or:f_,ord:d_,order:h_,orderof:p_,ordf:v_,ordm:m_,origof:g_,oror:y_,orslope:b_,orv:k_,oS:w_,Oscr:C_,oscr:T_,Oslash:S_,oslash:x_,osol:E_,Otilde:M_,otilde:A_,otimesas:O_,Otimes:N_,otimes:D_,Ouml:L_,ouml:R_,ovbar:I_,OverBar:P_,OverBrace:B_,OverBracket:F_,OverParenthesis:q_,para:H_,parallel:__,par:z_,parsim:V_,parsl:U_,part:$_,PartialD:W_,Pcy:j_,pcy:G_,percnt:K_,period:J_,permil:Y_,perp:X_,pertenk:Z_,Pfr:Q_,pfr:ez,Phi:tz,phi:rz,phiv:nz,phmmat:iz,phone:az,Pi:oz,pi:sz,pitchfork:lz,piv:uz,planck:cz,planckh:fz,plankv:dz,plusacir:hz,plusb:pz,pluscir:vz,plus:mz,plusdo:gz,plusdu:yz,pluse:bz,PlusMinus:kz,plusmn:wz,plussim:Cz,plustwo:Tz,pm:Sz,Poincareplane:xz,pointint:Ez,popf:Mz,Popf:Az,pound:Oz,prap:Nz,Pr:Dz,pr:Lz,prcue:Rz,precapprox:Iz,prec:Pz,preccurlyeq:Bz,Precedes:Fz,PrecedesEqual:qz,PrecedesSlantEqual:Hz,PrecedesTilde:_z,preceq:zz,precnapprox:Vz,precneqq:Uz,precnsim:$z,pre:Wz,prE:jz,precsim:Gz,prime:Kz,Prime:Jz,primes:Yz,prnap:Xz,prnE:Zz,prnsim:Qz,prod:eV,Product:tV,profalar:rV,profline:nV,profsurf:iV,prop:aV,Proportional:oV,Proportion:sV,propto:lV,prsim:uV,prurel:cV,Pscr:fV,pscr:dV,Psi:hV,psi:pV,puncsp:vV,Qfr:mV,qfr:gV,qint:yV,qopf:bV,Qopf:kV,qprime:wV,Qscr:CV,qscr:TV,quaternions:SV,quatint:xV,quest:EV,questeq:MV,quot:AV,QUOT:OV,rAarr:NV,race:DV,Racute:LV,racute:RV,radic:IV,raemptyv:PV,rang:BV,Rang:FV,rangd:qV,range:HV,rangle:_V,raquo:zV,rarrap:VV,rarrb:UV,rarrbfs:$V,rarrc:WV,rarr:jV,Rarr:GV,rArr:KV,rarrfs:JV,rarrhk:YV,rarrlp:XV,rarrpl:ZV,rarrsim:QV,Rarrtl:eU,rarrtl:tU,rarrw:rU,ratail:nU,rAtail:iU,ratio:aU,rationals:oU,rbarr:sU,rBarr:lU,RBarr:uU,rbbrk:cU,rbrace:fU,rbrack:dU,rbrke:hU,rbrksld:pU,rbrkslu:vU,Rcaron:mU,rcaron:gU,Rcedil:yU,rcedil:bU,rceil:kU,rcub:wU,Rcy:CU,rcy:TU,rdca:SU,rdldhar:xU,rdquo:EU,rdquor:MU,rdsh:AU,real:OU,realine:NU,realpart:DU,reals:LU,Re:RU,rect:IU,reg:PU,REG:BU,ReverseElement:FU,ReverseEquilibrium:qU,ReverseUpEquilibrium:HU,rfisht:_U,rfloor:zU,rfr:VU,Rfr:UU,rHar:$U,rhard:WU,rharu:jU,rharul:GU,Rho:KU,rho:JU,rhov:YU,RightAngleBracket:XU,RightArrowBar:ZU,rightarrow:QU,RightArrow:e$,Rightarrow:t$,RightArrowLeftArrow:r$,rightarrowtail:n$,RightCeiling:i$,RightDoubleBracket:a$,RightDownTeeVector:o$,RightDownVectorBar:s$,RightDownVector:l$,RightFloor:u$,rightharpoondown:c$,rightharpoonup:f$,rightleftarrows:d$,rightleftharpoons:h$,rightrightarrows:p$,rightsquigarrow:v$,RightTeeArrow:m$,RightTee:g$,RightTeeVector:y$,rightthreetimes:b$,RightTriangleBar:k$,RightTriangle:w$,RightTriangleEqual:C$,RightUpDownVector:T$,RightUpTeeVector:S$,RightUpVectorBar:x$,RightUpVector:E$,RightVectorBar:M$,RightVector:A$,ring:O$,risingdotseq:N$,rlarr:D$,rlhar:L$,rlm:R$,rmoustache:I$,rmoust:P$,rnmid:B$,roang:F$,roarr:q$,robrk:H$,ropar:_$,ropf:z$,Ropf:V$,roplus:U$,rotimes:$$,RoundImplies:W$,rpar:j$,rpargt:G$,rppolint:K$,rrarr:J$,Rrightarrow:Y$,rsaquo:X$,rscr:Z$,Rscr:Q$,rsh:e2,Rsh:t2,rsqb:r2,rsquo:n2,rsquor:i2,rthree:a2,rtimes:o2,rtri:s2,rtrie:l2,rtrif:u2,rtriltri:c2,RuleDelayed:f2,ruluhar:d2,rx:h2,Sacute:p2,sacute:v2,sbquo:m2,scap:g2,Scaron:y2,scaron:b2,Sc:k2,sc:w2,sccue:C2,sce:T2,scE:S2,Scedil:x2,scedil:E2,Scirc:M2,scirc:A2,scnap:O2,scnE:N2,scnsim:D2,scpolint:L2,scsim:R2,Scy:I2,scy:P2,sdotb:B2,sdot:F2,sdote:q2,searhk:H2,searr:_2,seArr:z2,searrow:V2,sect:U2,semi:$2,seswar:W2,setminus:j2,setmn:G2,sext:K2,Sfr:J2,sfr:Y2,sfrown:X2,sharp:Z2,SHCHcy:Q2,shchcy:eW,SHcy:tW,shcy:rW,ShortDownArrow:nW,ShortLeftArrow:iW,shortmid:aW,shortparallel:oW,ShortRightArrow:sW,ShortUpArrow:lW,shy:uW,Sigma:cW,sigma:fW,sigmaf:dW,sigmav:hW,sim:pW,simdot:vW,sime:mW,simeq:gW,simg:yW,simgE:bW,siml:kW,simlE:wW,simne:CW,simplus:TW,simrarr:SW,slarr:xW,SmallCircle:EW,smallsetminus:MW,smashp:AW,smeparsl:OW,smid:NW,smile:DW,smt:LW,smte:RW,smtes:IW,SOFTcy:PW,softcy:BW,solbar:FW,solb:qW,sol:HW,Sopf:_W,sopf:zW,spades:VW,spadesuit:UW,spar:$W,sqcap:WW,sqcaps:jW,sqcup:GW,sqcups:KW,Sqrt:JW,sqsub:YW,sqsube:XW,sqsubset:ZW,sqsubseteq:QW,sqsup:e3,sqsupe:t3,sqsupset:r3,sqsupseteq:n3,square:i3,Square:a3,SquareIntersection:o3,SquareSubset:s3,SquareSubsetEqual:l3,SquareSuperset:u3,SquareSupersetEqual:c3,SquareUnion:f3,squarf:d3,squ:h3,squf:p3,srarr:v3,Sscr:m3,sscr:g3,ssetmn:y3,ssmile:b3,sstarf:k3,Star:w3,star:C3,starf:T3,straightepsilon:S3,straightphi:x3,strns:E3,sub:M3,Sub:A3,subdot:O3,subE:N3,sube:D3,subedot:L3,submult:R3,subnE:I3,subne:P3,subplus:B3,subrarr:F3,subset:q3,Subset:H3,subseteq:_3,subseteqq:z3,SubsetEqual:V3,subsetneq:U3,subsetneqq:$3,subsim:W3,subsub:j3,subsup:G3,succapprox:K3,succ:J3,succcurlyeq:Y3,Succeeds:X3,SucceedsEqual:Z3,SucceedsSlantEqual:Q3,SucceedsTilde:ej,succeq:tj,succnapprox:rj,succneqq:nj,succnsim:ij,succsim:aj,SuchThat:oj,sum:sj,Sum:lj,sung:uj,sup1:cj,sup2:fj,sup3:dj,sup:hj,Sup:pj,supdot:vj,supdsub:mj,supE:gj,supe:yj,supedot:bj,Superset:kj,SupersetEqual:wj,suphsol:Cj,suphsub:Tj,suplarr:Sj,supmult:xj,supnE:Ej,supne:Mj,supplus:Aj,supset:Oj,Supset:Nj,supseteq:Dj,supseteqq:Lj,supsetneq:Rj,supsetneqq:Ij,supsim:Pj,supsub:Bj,supsup:Fj,swarhk:qj,swarr:Hj,swArr:_j,swarrow:zj,swnwar:Vj,szlig:Uj,Tab:$j,target:Wj,Tau:jj,tau:Gj,tbrk:Kj,Tcaron:Jj,tcaron:Yj,Tcedil:Xj,tcedil:Zj,Tcy:Qj,tcy:eG,tdot:tG,telrec:rG,Tfr:nG,tfr:iG,there4:aG,therefore:oG,Therefore:sG,Theta:lG,theta:uG,thetasym:cG,thetav:fG,thickapprox:dG,thicksim:hG,ThickSpace:pG,ThinSpace:vG,thinsp:mG,thkap:gG,thksim:yG,THORN:bG,thorn:kG,tilde:wG,Tilde:CG,TildeEqual:TG,TildeFullEqual:SG,TildeTilde:xG,timesbar:EG,timesb:MG,times:AG,timesd:OG,tint:NG,toea:DG,topbot:LG,topcir:RG,top:IG,Topf:PG,topf:BG,topfork:FG,tosa:qG,tprime:HG,trade:_G,TRADE:zG,triangle:VG,triangledown:UG,triangleleft:$G,trianglelefteq:WG,triangleq:jG,triangleright:GG,trianglerighteq:KG,tridot:JG,trie:YG,triminus:XG,TripleDot:ZG,triplus:QG,trisb:eK,tritime:tK,trpezium:rK,Tscr:nK,tscr:iK,TScy:aK,tscy:oK,TSHcy:sK,tshcy:lK,Tstrok:uK,tstrok:cK,twixt:fK,twoheadleftarrow:dK,twoheadrightarrow:hK,Uacute:pK,uacute:vK,uarr:mK,Uarr:gK,uArr:yK,Uarrocir:bK,Ubrcy:kK,ubrcy:wK,Ubreve:CK,ubreve:TK,Ucirc:SK,ucirc:xK,Ucy:EK,ucy:MK,udarr:AK,Udblac:OK,udblac:NK,udhar:DK,ufisht:LK,Ufr:RK,ufr:IK,Ugrave:PK,ugrave:BK,uHar:FK,uharl:qK,uharr:HK,uhblk:_K,ulcorn:zK,ulcorner:VK,ulcrop:UK,ultri:$K,Umacr:WK,umacr:jK,uml:GK,UnderBar:KK,UnderBrace:JK,UnderBracket:YK,UnderParenthesis:XK,Union:ZK,UnionPlus:QK,Uogon:e4,uogon:t4,Uopf:r4,uopf:n4,UpArrowBar:i4,uparrow:a4,UpArrow:o4,Uparrow:s4,UpArrowDownArrow:l4,updownarrow:u4,UpDownArrow:c4,Updownarrow:f4,UpEquilibrium:d4,upharpoonleft:h4,upharpoonright:p4,uplus:v4,UpperLeftArrow:m4,UpperRightArrow:g4,upsi:y4,Upsi:b4,upsih:k4,Upsilon:w4,upsilon:C4,UpTeeArrow:T4,UpTee:S4,upuparrows:x4,urcorn:E4,urcorner:M4,urcrop:A4,Uring:O4,uring:N4,urtri:D4,Uscr:L4,uscr:R4,utdot:I4,Utilde:P4,utilde:B4,utri:F4,utrif:q4,uuarr:H4,Uuml:_4,uuml:z4,uwangle:V4,vangrt:U4,varepsilon:$4,varkappa:W4,varnothing:j4,varphi:G4,varpi:K4,varpropto:J4,varr:Y4,vArr:X4,varrho:Z4,varsigma:Q4,varsubsetneq:e8,varsubsetneqq:t8,varsupsetneq:r8,varsupsetneqq:n8,vartheta:i8,vartriangleleft:a8,vartriangleright:o8,vBar:s8,Vbar:l8,vBarv:u8,Vcy:c8,vcy:f8,vdash:d8,vDash:h8,Vdash:p8,VDash:v8,Vdashl:m8,veebar:g8,vee:y8,Vee:b8,veeeq:k8,vellip:w8,verbar:C8,Verbar:T8,vert:S8,Vert:x8,VerticalBar:E8,VerticalLine:M8,VerticalSeparator:A8,VerticalTilde:O8,VeryThinSpace:N8,Vfr:D8,vfr:L8,vltri:R8,vnsub:I8,vnsup:P8,Vopf:B8,vopf:F8,vprop:q8,vrtri:H8,Vscr:_8,vscr:z8,vsubnE:V8,vsubne:U8,vsupnE:$8,vsupne:W8,Vvdash:j8,vzigzag:G8,Wcirc:K8,wcirc:J8,wedbar:Y8,wedge:X8,Wedge:Z8,wedgeq:Q8,weierp:e5,Wfr:t5,wfr:r5,Wopf:n5,wopf:i5,wp:a5,wr:o5,wreath:s5,Wscr:l5,wscr:u5,xcap:c5,xcirc:f5,xcup:d5,xdtri:h5,Xfr:p5,xfr:v5,xharr:m5,xhArr:g5,Xi:y5,xi:b5,xlarr:k5,xlArr:w5,xmap:C5,xnis:T5,xodot:S5,Xopf:x5,xopf:E5,xoplus:M5,xotime:A5,xrarr:O5,xrArr:N5,Xscr:D5,xscr:L5,xsqcup:R5,xuplus:I5,xutri:P5,xvee:B5,xwedge:F5,Yacute:q5,yacute:H5,YAcy:_5,yacy:z5,Ycirc:V5,ycirc:U5,Ycy:$5,ycy:W5,yen:j5,Yfr:G5,yfr:K5,YIcy:J5,yicy:Y5,Yopf:X5,yopf:Z5,Yscr:Q5,yscr:eJ,YUcy:tJ,yucy:rJ,yuml:nJ,Yuml:iJ,Zacute:aJ,zacute:oJ,Zcaron:sJ,zcaron:lJ,Zcy:uJ,zcy:cJ,Zdot:fJ,zdot:dJ,zeetrf:hJ,ZeroWidthSpace:pJ,Zeta:vJ,zeta:mJ,zfr:gJ,Zfr:yJ,ZHcy:bJ,zhcy:kJ,zigrarr:wJ,zopf:CJ,Zopf:TJ,Zscr:SJ,zscr:xJ,zwj:EJ,zwnj:MJ},AJ="Á",OJ="á",NJ="Â",DJ="â",LJ="´",RJ="Æ",IJ="æ",PJ="À",BJ="à",FJ="&",qJ="&",HJ="Å",_J="å",zJ="Ã",VJ="ã",UJ="Ä",$J="ä",WJ="¦",jJ="Ç",GJ="ç",KJ="¸",JJ="¢",YJ="©",XJ="©",ZJ="¤",QJ="°",e9="÷",t9="É",r9="é",n9="Ê",i9="ê",a9="È",o9="è",s9="Ð",l9="ð",u9="Ë",c9="ë",f9="½",d9="¼",h9="¾",p9=">",v9=">",m9="Í",g9="í",y9="Î",b9="î",k9="¡",w9="Ì",C9="ì",T9="¿",S9="Ï",x9="ï",E9="«",M9="<",A9="<",O9="¯",N9="µ",D9="·",L9=" ",R9="¬",I9="Ñ",P9="ñ",B9="Ó",F9="ó",q9="Ô",H9="ô",_9="Ò",z9="ò",V9="ª",U9="º",$9="Ø",W9="ø",j9="Õ",G9="õ",K9="Ö",J9="ö",Y9="¶",X9="±",Z9="£",Q9='"',e6='"',t6="»",r6="®",n6="®",i6="§",a6="",o6="¹",s6="²",l6="³",u6="ß",c6="Þ",f6="þ",d6="×",h6="Ú",p6="ú",v6="Û",m6="û",g6="Ù",y6="ù",b6="¨",k6="Ü",w6="ü",C6="Ý",T6="ý",S6="¥",x6="ÿ",E6={Aacute:AJ,aacute:OJ,Acirc:NJ,acirc:DJ,acute:LJ,AElig:RJ,aelig:IJ,Agrave:PJ,agrave:BJ,amp:FJ,AMP:qJ,Aring:HJ,aring:_J,Atilde:zJ,atilde:VJ,Auml:UJ,auml:$J,brvbar:WJ,Ccedil:jJ,ccedil:GJ,cedil:KJ,cent:JJ,copy:YJ,COPY:XJ,curren:ZJ,deg:QJ,divide:e9,Eacute:t9,eacute:r9,Ecirc:n9,ecirc:i9,Egrave:a9,egrave:o9,ETH:s9,eth:l9,Euml:u9,euml:c9,frac12:f9,frac14:d9,frac34:h9,gt:p9,GT:v9,Iacute:m9,iacute:g9,Icirc:y9,icirc:b9,iexcl:k9,Igrave:w9,igrave:C9,iquest:T9,Iuml:S9,iuml:x9,laquo:E9,lt:M9,LT:A9,macr:O9,micro:N9,middot:D9,nbsp:L9,not:R9,Ntilde:I9,ntilde:P9,Oacute:B9,oacute:F9,Ocirc:q9,ocirc:H9,Ograve:_9,ograve:z9,ordf:V9,ordm:U9,Oslash:$9,oslash:W9,Otilde:j9,otilde:G9,Ouml:K9,ouml:J9,para:Y9,plusmn:X9,pound:Z9,quot:Q9,QUOT:e6,raquo:t6,reg:r6,REG:n6,sect:i6,shy:a6,sup1:o6,sup2:s6,sup3:l6,szlig:u6,THORN:c6,thorn:f6,times:d6,Uacute:h6,uacute:p6,Ucirc:v6,ucirc:m6,Ugrave:g6,ugrave:y6,uml:b6,Uuml:k6,uuml:w6,Yacute:C6,yacute:T6,yen:S6,yuml:x6},M6="&",A6="'",O6=">",N6="<",D6='"',rp={amp:M6,apos:A6,gt:O6,lt:N6,quot:D6},Xc={},L6={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},R6=_&&_.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(Xc,"__esModule",{value:!0});var np=R6(L6),I6=String.fromCodePoint||function(h){var d="";return h>65535&&(h-=65536,d+=String.fromCharCode(h>>>10&1023|55296),h=56320|h&1023),d+=String.fromCharCode(h),d};function P6(h){return h>=55296&&h<=57343||h>1114111?"�":(h in np.default&&(h=np.default[h]),I6(h))}Xc.default=P6;var Cl=_&&_.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(le,"__esModule",{value:!0}),le.decodeHTML=le.decodeHTMLStrict=le.decodeXML=void 0;var Zc=Cl(tp),B6=Cl(E6),F6=Cl(rp),ip=Cl(Xc),q6=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;le.decodeXML=ap(F6.default),le.decodeHTMLStrict=ap(Zc.default);function ap(h){var d=sp(h);return function(y){return String(y).replace(q6,d)}}var op=function(h,d){return h<d?1:-1};le.decodeHTML=(function(){for(var h=Object.keys(B6.default).sort(op),d=Object.keys(Zc.default).sort(op),y=0,S=0;y<d.length;y++)h[S]===d[y]?(d[y]+=";?",S++):d[y]+=";";var L=new RegExp("&(?:"+d.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),U=sp(Zc.default);function G(te){return te.substr(-1)!==";"&&(te+=";"),U(te)}return function(te){return String(te).replace(L,G)}})();function sp(h){return function(y){if(y.charAt(1)==="#"){var S=y.charAt(2);return S==="X"||S==="x"?ip.default(parseInt(y.substr(3),16)):ip.default(parseInt(y.substr(2),10))}return h[y.slice(1,-1)]||y}}var kn={},lp=_&&_.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(kn,"__esModule",{value:!0}),kn.escapeUTF8=kn.escape=kn.encodeNonAsciiHTML=kn.encodeHTML=kn.encodeXML=void 0;var H6=lp(rp),up=fp(H6.default),cp=dp(up);kn.encodeXML=vp(up);var _6=lp(tp),Qc=fp(_6.default),z6=dp(Qc);kn.encodeHTML=U6(Qc,z6),kn.encodeNonAsciiHTML=vp(Qc);function fp(h){return Object.keys(h).sort().reduce(function(d,y){return d[h[y]]="&"+y+";",d},{})}function dp(h){for(var d=[],y=[],S=0,L=Object.keys(h);S<L.length;S++){var U=L[S];U.length===1?d.push("\\"+U):y.push(U)}d.sort();for(var G=0;G<d.length-1;G++){for(var te=G;te<d.length-1&&d[te].charCodeAt(1)+1===d[te+1].charCodeAt(1);)te+=1;var Se=1+te-G;Se<3||d.splice(G,Se,d[G]+"-"+d[te])}return y.unshift("["+d.join("")+"]"),new RegExp(y.join("|"),"g")}var hp=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,V6=String.prototype.codePointAt!=null?function(h){return h.codePointAt(0)}:function(h){return(h.charCodeAt(0)-55296)*1024+h.charCodeAt(1)-56320+65536};function Tl(h){return"&#x"+(h.length>1?V6(h):h.charCodeAt(0)).toString(16).toUpperCase()+";"}function U6(h,d){return function(y){return y.replace(d,function(S){return h[S]}).replace(hp,Tl)}}var pp=new RegExp(cp.source+"|"+hp.source,"g");function $6(h){return h.replace(pp,Tl)}kn.escape=$6;function W6(h){return h.replace(cp,Tl)}kn.escapeUTF8=W6;function vp(h){return function(d){return d.replace(pp,function(y){return h[y]||Tl(y)})}}(function(h){Object.defineProperty(h,"__esModule",{value:!0}),h.decodeXMLStrict=h.decodeHTML5Strict=h.decodeHTML4Strict=h.decodeHTML5=h.decodeHTML4=h.decodeHTMLStrict=h.decodeHTML=h.decodeXML=h.encodeHTML5=h.encodeHTML4=h.escapeUTF8=h.escape=h.encodeNonAsciiHTML=h.encodeHTML=h.encodeXML=h.encode=h.decodeStrict=h.decode=void 0;var d=le,y=kn;function S(Se,Oe){return(!Oe||Oe<=0?d.decodeXML:d.decodeHTML)(Se)}h.decode=S;function L(Se,Oe){return(!Oe||Oe<=0?d.decodeXML:d.decodeHTMLStrict)(Se)}h.decodeStrict=L;function U(Se,Oe){return(!Oe||Oe<=0?y.encodeXML:y.encodeHTML)(Se)}h.encode=U;var G=kn;Object.defineProperty(h,"encodeXML",{enumerable:!0,get:function(){return G.encodeXML}}),Object.defineProperty(h,"encodeHTML",{enumerable:!0,get:function(){return G.encodeHTML}}),Object.defineProperty(h,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return G.encodeNonAsciiHTML}}),Object.defineProperty(h,"escape",{enumerable:!0,get:function(){return G.escape}}),Object.defineProperty(h,"escapeUTF8",{enumerable:!0,get:function(){return G.escapeUTF8}}),Object.defineProperty(h,"encodeHTML4",{enumerable:!0,get:function(){return G.encodeHTML}}),Object.defineProperty(h,"encodeHTML5",{enumerable:!0,get:function(){return G.encodeHTML}});var te=le;Object.defineProperty(h,"decodeXML",{enumerable:!0,get:function(){return te.decodeXML}}),Object.defineProperty(h,"decodeHTML",{enumerable:!0,get:function(){return te.decodeHTML}}),Object.defineProperty(h,"decodeHTMLStrict",{enumerable:!0,get:function(){return te.decodeHTMLStrict}}),Object.defineProperty(h,"decodeHTML4",{enumerable:!0,get:function(){return te.decodeHTML}}),Object.defineProperty(h,"decodeHTML5",{enumerable:!0,get:function(){return te.decodeHTML}}),Object.defineProperty(h,"decodeHTML4Strict",{enumerable:!0,get:function(){return te.decodeHTMLStrict}}),Object.defineProperty(h,"decodeHTML5Strict",{enumerable:!0,get:function(){return te.decodeHTMLStrict}}),Object.defineProperty(h,"decodeXMLStrict",{enumerable:!0,get:function(){return te.decodeXML}})})(ae);var mp="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",j6=92,G6=/[\\&]/,ef="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",K6=new RegExp("\\\\"+ef+"|"+mp,"gi"),J6='[&<>"]',gp=new RegExp(J6,"g"),Y6=function(h){return h.charCodeAt(0)===j6?h.charAt(1):ae.decodeHTML(h)};function ls(h){return G6.test(h)?h.replace(K6,Y6):h}function Sl(h){try{return de(h)}catch{return h}}function X6(h){switch(h){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return h}}function po(h){return gp.test(h)?h.replace(gp,X6):h}function tf(h,d){for(var y=[],S=0;S<d;S++)y.push(h);return y.join("")}function yp(h){return h?!/[^ \t]+/.test(h):!0}var Z6=(function(){function h(d){this.current=d,this.root=d,this.entering=!0}return h.prototype.next=function(){var d=this.current,y=this.entering;if(d===null)return null;var S=rf(d);return y&&S?d.firstChild?(this.current=d.firstChild,this.entering=!0):this.entering=!1:d===this.root?this.current=null:d.next===null?(this.current=d.parent,this.entering=!1):(this.current=d.next,this.entering=!0),{entering:y,node:d}},h.prototype.resumeAt=function(d,y){this.current=d,this.entering=y===!0},h})();function rf(h){switch(h.type){case"document":case"blockQuote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"strike":case"link":case"image":case"table":case"tableHead":case"tableBody":case"tableRow":case"tableCell":case"tableDelimRow":case"customInline":return!0;default:return!1}}var Q6=1,xl={};function eY(h){return xl[h]}function nf(h){delete xl[h]}function tY(){xl={}}var us=(function(){function h(d,y){this.parent=null,this.prev=null,this.next=null,this.firstChild=null,this.lastChild=null,this.literal=null,d==="document"?this.id=-1:this.id=Q6++,this.type=d,this.sourcepos=y,xl[this.id]=this}return h.prototype.isContainer=function(){return rf(this)},h.prototype.unlink=function(){this.prev?this.prev.next=this.next:this.parent&&(this.parent.firstChild=this.next),this.next?this.next.prev=this.prev:this.parent&&(this.parent.lastChild=this.prev),this.parent=null,this.next=null,this.prev=null},h.prototype.replaceWith=function(d){this.insertBefore(d),this.unlink()},h.prototype.insertAfter=function(d){d.unlink(),d.next=this.next,d.next&&(d.next.prev=d),d.prev=this,this.next=d,this.parent&&(d.parent=this.parent,d.next||(d.parent.lastChild=d))},h.prototype.insertBefore=function(d){d.unlink(),d.prev=this.prev,d.prev&&(d.prev.next=d),d.next=this,this.prev=d,d.parent=this.parent,d.prev||(d.parent.firstChild=d)},h.prototype.appendChild=function(d){d.unlink(),d.parent=this,this.lastChild?(this.lastChild.next=d,d.prev=this.lastChild,this.lastChild=d):(this.firstChild=d,this.lastChild=d)},h.prototype.prependChild=function(d){d.unlink(),d.parent=this,this.firstChild?(this.firstChild.prev=d,d.next=this.firstChild,this.firstChild=d):(this.firstChild=d,this.lastChild=d)},h.prototype.walker=function(){return new Z6(this)},h})(),Si=(function(h){E(d,h);function d(y,S){var L=h.call(this,y,S)||this;return L.open=!0,L.lineOffsets=null,L.stringContent=null,L.lastLineBlank=!1,L.lastLineChecked=!1,L.type=y,L}return d})(us),rY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.listData=null,y}return d})(Si),nY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.level=0,y.headingType="atx",y}return d})(Si),iY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.isFenced=!1,y.fenceChar=null,y.fenceLength=0,y.fenceOffset=-1,y.info=null,y.infoPadding=0,y}return d})(Si),aY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.columns=[],y}return d})(Si),oY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.startIdx=0,y.endIdx=0,y.paddingLeft=0,y.paddingRight=0,y.ignored=!1,y}return d})(Si),sY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.title="",y.dest="",y.label="",y}return d})(Si),lY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.syntaxLength=0,y.offset=-1,y.info="",y}return d})(Si),uY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.htmlBlockType=-1,y}return d})(Si),cY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.destination=null,y.title=null,y.extendedAutolink=!1,y}return d})(us),fY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.tickCount=0,y}return d})(us),dY=(function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.info="",y}return d})(us);function ur(h,d){switch(h){case"heading":return new nY(h,d);case"list":case"item":return new rY(h,d);case"link":case"image":return new cY(h,d);case"codeBlock":return new iY(h,d);case"htmlBlock":return new uY(h,d);case"table":return new aY(h,d);case"tableCell":return new oY(h,d);case"document":case"paragraph":case"blockQuote":case"thematicBreak":case"tableRow":case"tableBody":case"tableHead":case"frontMatter":return new Si(h,d);case"code":return new fY(h,d);case"refDef":return new sY(h,d);case"customBlock":return new lY(h,d);case"customInline":return new dY(h,d);default:return new us(h,d)}}function bp(h){return h.type==="codeBlock"}function hY(h){return h.type==="htmlBlock"}function pY(h){return h.type==="heading"}function kp(h){return h.type==="list"}function vY(h){return h.type==="table"}function vo(h){return h.type==="refDef"}function wp(h){return h.type==="customBlock"}function mY(h){return h.type==="customInline"}function kr(h,d){var y=ur("text",d);return y.literal=h,y}var Cp="[A-Za-z][A-Za-z0-9-]*",gY="[a-zA-Z_:][a-zA-Z0-9:._-]*",yY="[^\"'=<>`\\x00-\\x20]+",bY="'[^']*'",kY='"[^"]*"',wY="(?:"+yY+"|"+bY+"|"+kY+")",CY="(?:\\s*=\\s*"+wY+")",TY="(?:\\s+"+gY+CY+"?)",Tp="<"+Cp+TY+"*\\s*/?>",Sp="</"+Cp+"\\s*[>]",SY="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",xY="[<][?].*?[?][>]",EY="<![A-Z]+\\s+[^>]*>",MY="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",AY="(?:"+Tp+"|"+Sp+"|"+SY+"|"+xY+"|"+EY+"|"+MY+")",OY=new RegExp("^"+AY,"i");var af;if(String.fromCodePoint)af=function(h){try{return String.fromCodePoint(h)}catch(d){if(d instanceof RangeError)return"�";throw d}};else{var NY=String.fromCharCode,DY=Math.floor;af=function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];var y=16384,S=[],L,U,G=-1,te=h.length;if(!te)return"";for(var Se="";++G<te;){var Oe=Number(h[G]);if(!isFinite(Oe)||Oe<0||Oe>1114111||DY(Oe)!==Oe)return"�";Oe<=65535?S.push(Oe):(Oe-=65536,L=(Oe>>10)+55296,U=Oe%1024+56320,S.push(L,U)),(G+1===te||S.length>y)&&(Se+=NY.apply(void 0,S),S.length=0)}return Se}}var of=af,LY="(?:[w-]+.)*[A-Za-z0-9-]+.[A-Za-z0-9-]+",RY="[^<\\s]*[^<?!.,:*_?~\\s]",IY="[\\w.+-]+@(?:[\\w-]+\\.)+[\\w-]+";function PY(h){var d=/\)+$/.exec(h);if(d){for(var y=0,S=0,L=h;S<L.length;S++){var U=L[S];U==="("?y<0?y=1:y+=1:U===")"&&(y-=1)}if(y<0){var G=Math.min(-y,d[0].length);return h.substring(0,h.length-G)}}return h}function BY(h){return h.replace(/&[A-Za-z0-9]+;$/,"")}function FY(h){for(var d=new RegExp(IY,"g"),y=[],S;S=d.exec(h);){var L=S[0];/[_-]+$/.test(L)||y.push({text:L,range:[S.index,S.index+L.length-1],url:"mailto:"+L})}return y}function qY(h){for(var d=new RegExp("(www|https?://)."+LY+RY,"g"),y=[],S;S=d.exec(h);){var L=BY(PY(S[0])),U=S[1]==="www"?"http://":"";y.push({text:L,range:[S.index,S.index+L.length-1],url:""+U+L})}return y}function HY(h){return F(F([],qY(h)),FY(h)).sort(function(d,y){return d.range[0]-y.range[0]})}function _Y(h,d){typeof d=="boolean"&&(d=HY);for(var y,S=function(){var L=y.entering,U=y.node;if(L&&U.type==="text"&&U.parent.type!=="link"){var G=U.literal,te=d(G);if(!te||!te.length)return"continue";for(var Se=0,Oe=U.sourcepos[0],Ve=Oe[0],We=Oe[1],qe=function(Ai,YZ){return[[Ve,We+Ai],[Ve,We+YZ]]},ot=[],it=0,Pt=te;it<Pt.length;it++){var cr=Pt[it],xr=cr.range,xi=cr.url,Bn=cr.text;xr[0]>Se&&ot.push(kr(G.substring(Se,xr[0]),qe(Se,xr[0]-1)));var Cn=ur("link",qe.apply(void 0,xr));Cn.appendChild(kr(Bn,qe.apply(void 0,xr))),Cn.destination=xi,Cn.extendedAutolink=!0,ot.push(Cn),Se=xr[1]+1}Se<G.length&&ot.push(kr(G.substring(Se),qe(Se,G.length-1)));for(var jn=0,Ei=ot;jn<Ei.length;jn++){var Mi=Ei[jn];U.insertBefore(Mi)}U.unlink()}};y=h.next();)S()}function El(h){return h[h.length-1]}function xp(h){return h.slice(1,h.length-1).trim().replace(/[ \t\r\n]+/," ").toLowerCase().toUpperCase()}function Ml(h,d){Object.keys(h).forEach(function(y){d(y,h[y])})}function zY(h){for(var d=[],y=1;y<arguments.length;y++)d[y-1]=arguments[y];var S=B({},h);return d.forEach(function(L){delete S[L]}),S}function mo(h){return!Object.keys(h).length}function VY(h){Object.keys(h).forEach(function(d){delete h[d]})}var sf=10,lf=42,Al=95,UY=96,Ep=91,$Y=93,Ol=126,Mp=60,WY=33,Ap=92,jY=38,Op=40,uf=41,GY=58,Na=39,Da=34,La=36,cf="\\\\"+ef,Np=new RegExp(/[!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/),KY=new RegExp('^(?:"('+cf+'|[^"\\x00])*"|'+("'("+cf+"|[^'\\x00])*'")+"|"+("\\(("+cf+"|[^()\\x00])*\\))")),JY=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,Dp=new RegExp("^"+ef),YY=new RegExp("^"+mp,"i"),XY=/`+/,ZY=/^`+/,QY=/\.\.\./g,e7=/--+/g,t7=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,r7=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,n7=/^ *(?:\n *)?/,ff=/^[ \t\n\x0b\x0c\x0d]/,Lp=/^\s/,i7=/ *$/,a7=/^ */,Rp=/^ *(?:\n|$)/,o7=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,s7=/^[^\n`\[\]\\!<&*_'"~$]+/m,l7=(function(){function h(d){this.subject="",this.delimiters=null,this.brackets=null,this.pos=0,this.lineStartNum=0,this.lineIdx=0,this.lineOffsets=[0],this.linePosOffset=0,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.options=d}return h.prototype.sourcepos=function(d,y){var S=this.linePosOffset+this.lineOffsets[this.lineIdx],L=this.lineStartNum+this.lineIdx,U=[L,d+S];return typeof y=="number"?[U,[L,y+S]]:U},h.prototype.nextLine=function(){this.lineIdx+=1,this.linePosOffset=-this.pos},h.prototype.match=function(d){var y=d.exec(this.subject.slice(this.pos));return y===null?null:(this.pos+=y.index+y[0].length,y[0])},h.prototype.peek=function(){return this.pos<this.subject.length?this.subject.charCodeAt(this.pos):-1},h.prototype.spnl=function(){return this.match(n7),!0},h.prototype.parseBackticks=function(d){var y=this.pos+1,S=this.match(ZY);if(S===null)return!1;for(var L=this.pos,U;(U=this.match(XY))!==null;)if(U===S){var G=this.subject.slice(L,this.pos-S.length),te=this.sourcepos(y,this.pos),Se=G.split(`
|
|
653
|
-
`);if(Se.length>1){var Oe=El(Se);this.lineIdx+=Se.length-1,this.linePosOffset=-(this.pos-Oe.length-S.length),te[1]=this.sourcepos(this.pos),G=Se.join(" ")}var Ve=ur("code",te);return G.length>0&&G.match(/[^ ]/)!==null&&G[0]==" "&&G[G.length-1]==" "?Ve.literal=G.slice(1,G.length-1):Ve.literal=G,Ve.tickCount=S.length,d.appendChild(Ve),!0}return this.pos=L,d.appendChild(kr(S,this.sourcepos(y,this.pos-1))),!0},h.prototype.parseBackslash=function(d){var y=this.subject,S;this.pos+=1;var L=this.pos;return this.peek()===sf?(this.pos+=1,S=ur("linebreak",this.sourcepos(this.pos-1,this.pos)),d.appendChild(S),this.nextLine()):Dp.test(y.charAt(this.pos))?(d.appendChild(kr(y.charAt(this.pos),this.sourcepos(L,this.pos))),this.pos+=1):d.appendChild(kr("\\",this.sourcepos(L,L))),!0},h.prototype.parseAutolink=function(d){var y,S,L,U=this.pos+1;return(y=this.match(t7))?(S=y.slice(1,y.length-1),L=ur("link",this.sourcepos(U,this.pos)),L.destination=Sl("mailto:"+S),L.title="",L.appendChild(kr(S,this.sourcepos(U+1,this.pos-1))),d.appendChild(L),!0):(y=this.match(r7))?(S=y.slice(1,y.length-1),L=ur("link",this.sourcepos(U,this.pos)),L.destination=Sl(S),L.title="",L.appendChild(kr(S,this.sourcepos(U+1,this.pos-1))),d.appendChild(L),!0):!1},h.prototype.parseHtmlTag=function(d){var y=this.pos+1,S=this.match(OY);if(S===null)return!1;var L=ur("htmlInline",this.sourcepos(y,this.pos));return L.literal=S,d.appendChild(L),!0},h.prototype.scanDelims=function(d){var y=0,S=this.pos;if(d===Na||d===Da)y++,this.pos++;else for(;this.peek()===d;)y++,this.pos++;if(y===0||y<2&&(d===Ol||d===La))return this.pos=S,null;var L=S===0?`
|
|
654
|
-
`:this.subject.charAt(S-1),U=this.peek(),G;U===-1?G=`
|
|
655
|
-
`:G=of(U);var te=Lp.test(G),Se=Np.test(G),Oe=Lp.test(L),Ve=Np.test(L),We=!te&&(!Se||Oe||Ve),qe=!Oe&&(!Ve||te||Se),ot,it;return d===Al?(ot=We&&(!qe||Ve),it=qe&&(!We||Se)):d===Na||d===Da?(ot=We&&!qe,it=qe):d===La?(ot=!te,it=!Oe):(ot=We,it=qe),this.pos=S,{numdelims:y,canOpen:ot,canClose:it}},h.prototype.handleDelim=function(d,y){var S=this.scanDelims(d);if(!S)return!1;var L=S.numdelims,U=this.pos+1,G;this.pos+=L,d===Na?G="’":d===Da?G="“":G=this.subject.slice(U-1,this.pos);var te=kr(G,this.sourcepos(U,this.pos));return y.appendChild(te),(S.canOpen||S.canClose)&&(this.options.smart||d!==Na&&d!==Da)&&(this.delimiters={cc:d,numdelims:L,origdelims:L,node:te,previous:this.delimiters,next:null,canOpen:S.canOpen,canClose:S.canClose},this.delimiters.previous&&(this.delimiters.previous.next=this.delimiters)),!0},h.prototype.removeDelimiter=function(d){d.previous!==null&&(d.previous.next=d.next),d.next===null?this.delimiters=d.previous:d.next.previous=d.previous},h.prototype.removeDelimitersBetween=function(d,y){d.next!==y&&(d.next=y,y.previous=d)},h.prototype.processEmphasis=function(d){var y,S,L,U,G,te,Se,Oe=!1,Ve=(y={},y[Al]=[d,d,d],y[lf]=[d,d,d],y[Na]=[d],y[Da]=[d],y[Ol]=[d],y[La]=[d],y);for(L=this.delimiters;L!==null&&L.previous!==d;)L=L.previous;for(;L!==null;){var We=L.cc,qe=We===Al||We===lf;if(!L.canClose)L=L.next;else{for(S=L.previous,Se=!1;S!==null&&S!==d&&S!==Ve[We][qe?L.origdelims%3:0];){if(Oe=qe&&(L.canOpen||S.canClose)&&L.origdelims%3!==0&&(S.origdelims+L.origdelims)%3===0,S.cc===L.cc&&S.canOpen&&!Oe){Se=!0;break}S=S.previous}if(U=L,qe||We===Ol||We===La){if(!Se)L=L.next;else if(S){var ot=L.numdelims>=2&&S.numdelims>=2?2:1,it=qe?0:1;G=S.node,te=L.node;var Pt=qe?ot===1?"emph":"strong":"strike";We===La&&(Pt="customInline");var cr=ur(Pt),xr=G.sourcepos[1],xi=te.sourcepos[0];cr.sourcepos=[[xr[0],xr[1]-ot+1],[xi[0],xi[1]+ot-1]],G.sourcepos[1][1]-=ot,te.sourcepos[0][1]+=ot,G.literal=G.literal.slice(ot),te.literal=te.literal.slice(ot),S.numdelims-=ot,L.numdelims-=ot;for(var Bn=G.next,Cn=void 0;Bn&&Bn!==te;)Cn=Bn.next,Bn.unlink(),cr.appendChild(Bn),Bn=Cn;if(We===La){var jn=cr.firstChild,Ei=jn.literal||"",Mi=Ei.split(/\s/)[0];cr.info=Mi,Ei.length<=Mi.length?jn.unlink():(jn.sourcepos[0][1]+=Mi.length,jn.literal=Ei.replace(Mi+" ",""))}if(G.insertAfter(cr),this.removeDelimitersBetween(S,L),S.numdelims<=it&&(S.numdelims===0&&G.unlink(),this.removeDelimiter(S)),L.numdelims<=it){L.numdelims===0&&te.unlink();var Ai=L.next;this.removeDelimiter(L),L=Ai}}}else We===Na?(L.node.literal="’",Se&&(S.node.literal="‘"),L=L.next):We===Da&&(L.node.literal="”",Se&&(S.node.literal="“"),L=L.next);Se||(Ve[We][qe?U.origdelims%3:0]=U.previous,U.canOpen||this.removeDelimiter(U))}}for(;this.delimiters!==null&&this.delimiters!==d;)this.removeDelimiter(this.delimiters)},h.prototype.parseLinkTitle=function(){var d=this.match(KY);return d===null?null:ls(d.substr(1,d.length-2))},h.prototype.parseLinkDestination=function(){var d=this.match(JY);if(d===null){if(this.peek()===Mp)return null;for(var y=this.pos,S=0,L=void 0;(L=this.peek())!==-1;)if(L===Ap&&Dp.test(this.subject.charAt(this.pos+1)))this.pos+=1,this.peek()!==-1&&(this.pos+=1);else if(L===Op)this.pos+=1,S+=1;else if(L===uf){if(S<1)break;this.pos+=1,S-=1}else{if(ff.exec(of(L))!==null)break;this.pos+=1}return this.pos===y&&L!==uf||S!==0?null:(d=this.subject.substr(y,this.pos-y),Sl(ls(d)))}return Sl(ls(d.substr(1,d.length-2)))},h.prototype.parseLinkLabel=function(){var d=this.match(o7);return d===null||d.length>1001?0:d.length},h.prototype.parseOpenBracket=function(d){var y=this.pos;this.pos+=1;var S=kr("[",this.sourcepos(this.pos,this.pos));return d.appendChild(S),this.addBracket(S,y,!1),!0},h.prototype.parseBang=function(d){var y=this.pos;if(this.pos+=1,this.peek()===Ep){this.pos+=1;var S=kr("![",this.sourcepos(this.pos-1,this.pos));d.appendChild(S),this.addBracket(S,y+1,!0)}else{var S=kr("!",this.sourcepos(this.pos,this.pos));d.appendChild(S)}return!0},h.prototype.parseCloseBracket=function(d){var y=null,S=null,L=!1;this.pos+=1;var U=this.pos,G=this.brackets;if(G===null)return d.appendChild(kr("]",this.sourcepos(U,U))),!0;if(!G.active)return d.appendChild(kr("]",this.sourcepos(U,U))),this.removeBracket(),!0;var te=G.image,Se=this.pos;this.peek()===Op&&(this.pos++,this.spnl()&&(y=this.parseLinkDestination())!==null&&this.spnl()&&(ff.test(this.subject.charAt(this.pos-1))&&(S=this.parseLinkTitle())||!0)&&this.spnl()&&this.peek()===uf?(this.pos+=1,L=!0):this.pos=Se);var Oe="";if(!L){var Ve=this.pos,We=this.parseLinkLabel();if(We>2?Oe=this.subject.slice(Ve,Ve+We):G.bracketAfter||(Oe=this.subject.slice(G.index,U)),We===0&&(this.pos=Se),Oe){Oe=xp(Oe);var qe=this.refMap[Oe];qe&&(y=qe.destination,S=qe.title,L=!0)}}if(L){var ot=ur(te?"image":"link");ot.destination=y,ot.title=S||"",ot.sourcepos=[G.startpos,this.sourcepos(this.pos)];for(var it=G.node.next,Pt=void 0;it;)Pt=it.next,it.unlink(),ot.appendChild(it),it=Pt;if(d.appendChild(ot),this.processEmphasis(G.previousDelimiter),this.removeBracket(),G.node.unlink(),!te)for(G=this.brackets;G!==null;)G.image||(G.active=!1),G=G.previous;return this.options.referenceDefinition&&(this.refLinkCandidateMap[d.id]={node:d,refLabel:Oe}),!0}return this.removeBracket(),this.pos=U,d.appendChild(kr("]",this.sourcepos(U,U))),this.options.referenceDefinition&&(this.refLinkCandidateMap[d.id]={node:d,refLabel:Oe}),!0},h.prototype.addBracket=function(d,y,S){this.brackets!==null&&(this.brackets.bracketAfter=!0),this.brackets={node:d,startpos:this.sourcepos(y+(S?0:1)),previous:this.brackets,previousDelimiter:this.delimiters,index:y,image:S,active:!0}},h.prototype.removeBracket=function(){this.brackets&&(this.brackets=this.brackets.previous)},h.prototype.parseEntity=function(d){var y,S=this.pos+1;return(y=this.match(YY))?(d.appendChild(kr(ae.decodeHTML(y),this.sourcepos(S,this.pos))),!0):!1},h.prototype.parseString=function(d){var y,S=this.pos+1;if(y=this.match(s7)){if(this.options.smart){var L=y.replace(QY,"…").replace(e7,function(G){var te=0,Se=0;return G.length%3===0?Se=G.length/3:G.length%2===0?te=G.length/2:G.length%3===2?(te=1,Se=(G.length-2)/3):(te=2,Se=(G.length-4)/3),tf("—",Se)+tf("–",te)});d.appendChild(kr(L,this.sourcepos(S,this.pos)))}else{var U=kr(y,this.sourcepos(S,this.pos));d.appendChild(U)}return!0}return!1},h.prototype.parseNewline=function(d){this.pos+=1;var y=d.lastChild;if(y&&y.type==="text"&&y.literal[y.literal.length-1]===" "){var S=y.literal[y.literal.length-2]===" ",L=y.literal.length;y.literal=y.literal.replace(i7,"");var U=L-y.literal.length;y.sourcepos[1][1]-=U,d.appendChild(ur(S?"linebreak":"softbreak",this.sourcepos(this.pos-U,this.pos)))}else d.appendChild(ur("softbreak",this.sourcepos(this.pos,this.pos)));return this.nextLine(),this.match(a7),!0},h.prototype.parseReference=function(d,y){if(!this.options.referenceDefinition)return 0;this.subject=d.stringContent,this.pos=0;var S=null,L=this.pos,U=this.parseLinkLabel();if(U===0)return 0;var G=this.subject.substr(0,U);if(this.peek()===GY)this.pos++;else return this.pos=L,0;this.spnl();var te=this.parseLinkDestination();if(te===null)return this.pos=L,0;var Se=this.pos;this.spnl(),this.pos!==Se&&(S=this.parseLinkTitle()),S===null&&(S="",this.pos=Se);var Oe=!0;if(this.match(Rp)===null&&(S===""?Oe=!1:(S="",this.pos=Se,Oe=this.match(Rp)!==null)),!Oe)return this.pos=L,0;var Ve=xp(G);if(Ve==="")return this.pos=L,0;var We=this.getReferenceDefSourcepos(d);d.sourcepos[0][0]=We[1][0]+1;var qe=ur("refDef",We);return qe.title=S,qe.dest=te,qe.label=Ve,d.insertBefore(qe),y[Ve]?this.refDefCandidateMap[qe.id]=qe:y[Ve]=gf(qe),this.pos-L},h.prototype.mergeTextNodes=function(d){for(var y,S=[];y=d.next();){var L=y.entering,U=y.node;if(L&&U.type==="text")S.push(U);else if(S.length===1)S=[];else if(S.length>1){var G=S[0],te=S[S.length-1];G.sourcepos&&te.sourcepos&&(G.sourcepos[1]=te.sourcepos[1]),G.next=te.next,G.next&&(G.next.prev=G);for(var Se=1;Se<S.length;Se+=1)G.literal+=S[Se].literal,S[Se].unlink();S=[]}}},h.prototype.getReferenceDefSourcepos=function(d){for(var y=d.stringContent.split(/\n|\r\n/),S=!1,L=0,U={line:0,ch:0},G=0;G<y.length;G+=1){var te=y[G];if(ff.test(te))break;if(/\:/.test(te)&&L===0){if(S)break;var Se=te.indexOf(":")===te.length-1?G+1:G;U={line:Se,ch:y[Se].length},S=!0}var Oe=te.match(/'|"/g);if(Oe&&(L+=Oe.length),L===2){U={line:G,ch:te.length};break}}return[[d.sourcepos[0][0],d.sourcepos[0][1]],[d.sourcepos[0][0]+U.line,U.ch]]},h.prototype.parseInline=function(d){var y,S=!1,L=this.peek();if(L===-1)return!1;switch(L){case sf:S=this.parseNewline(d);break;case Ap:S=this.parseBackslash(d);break;case UY:S=this.parseBackticks(d);break;case lf:case Al:case Ol:case La:S=this.handleDelim(L,d);break;case Na:case Da:S=!!(!((y=this.options)===null||y===void 0)&&y.smart)&&this.handleDelim(L,d);break;case Ep:S=this.parseOpenBracket(d);break;case WY:S=this.parseBang(d);break;case $Y:S=this.parseCloseBracket(d);break;case Mp:S=this.parseAutolink(d)||this.parseHtmlTag(d);break;case jY:d.disabledEntityParse||(S=this.parseEntity(d));break;default:S=this.parseString(d);break}return S||(this.pos+=1,d.appendChild(kr(of(L),this.sourcepos(this.pos,this.pos+1)))),!0},h.prototype.parse=function(d){for(this.subject=d.stringContent.trim(),this.pos=0,this.delimiters=null,this.brackets=null,this.lineOffsets=d.lineOffsets||[0],this.lineIdx=0,this.linePosOffset=0,this.lineStartNum=d.sourcepos[0][0],pY(d)&&(this.lineOffsets[0]+=d.level+1);this.parseInline(d););d.stringContent=null,this.processEmphasis(null),this.mergeTextNodes(d.walker());var y=this.options,S=y.extendedAutolinks,L=y.customParser;if(S&&_Y(d.walker(),S),L&&d.firstChild)for(var U,G=d.firstChild.walker();U=G.next();){var te=U.node,Se=U.entering;L[te.type]&&L[te.type](te,{entering:Se,options:this.options})}},h})(),u7=/^\[([ \txX])\][ \t]+/;function c7(h,d){if(d.firstChild&&d.firstChild.type==="paragraph"){var y=d.firstChild,S=y.stringContent.match(u7);if(S){var L=S[0].length;y.stringContent=y.stringContent.substring(L-1),y.sourcepos[0][1]+=L,y.lineOffsets[0]+=L,d.listData.task=!0,d.listData.checked=/[xX]/.test(S[1])}}}var f7={continue:function(){return 0},finalize:function(){},canContain:function(h){return h==="tableHead"||h==="tableBody"},acceptsLines:!1},d7={continue:function(){return 0},finalize:function(){},canContain:function(h){return h==="tableRow"},acceptsLines:!1},h7={continue:function(){return 1},finalize:function(){},canContain:function(h){return h==="tableRow"||h==="tableDelimRow"},acceptsLines:!1},p7={continue:function(){return 1},finalize:function(){},canContain:function(h){return h==="tableDelimCell"},acceptsLines:!1},v7={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},m7={continue:function(){return 1},finalize:function(){},canContain:function(h){return h==="tableCell"},acceptsLines:!1},g7={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},Nl=4,Ip=9,Pp=62,y7=60,Bp=32,Fp=91,qp=/[^ \t\f\v\r\n]/,b7=/^(?:`{3,}|~{3,})(?= *$)/;function Hp(h){for(var d=h;d;){if(d.lastLineBlank)return!0;var y=d.type;if(!d.lastLineChecked&&(y==="list"||y==="item"))d.lastLineChecked=!0,d=d.lastChild;else{d.lastLineChecked=!0;break}}return!1}function wn(h,d){return d<h.length?h.charCodeAt(d):-1}function _p(h){return!qp.test(h)}function go(h){return h===Bp||h===Ip}var k7=/^\$\$$/,w7={continue:function(h,d){var y=h.currentLine,S=y.match(k7);if(S)return h.lastLineLength=S[0].length,h.finalize(d,h.lineNumber),2;for(var L=d.offset;L>0&&go(wn(y,h.offset));)h.advanceOffset(1,!0),L--;return 0},finalize:function(h,d){if(d.stringContent!==null){var y=d.stringContent,S=y.indexOf(`
|
|
656
|
-
`),L=y.slice(0,S),U=y.slice(S+1),G=L.match(/^(\s*)(.*)/);d.info=ls(G[2].trim()),d.literal=U,d.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},zp={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!0},C7={continue:function(){return 0},finalize:function(){},canContain:function(h){return h!=="item"},acceptsLines:!1},T7={continue:function(){return 0},finalize:function(h,d){for(var y=d.firstChild;y;){if(Hp(y)&&y.next){d.listData.tight=!1;break}for(var S=y.firstChild;S;){if(Hp(S)&&(y.next||S.next)){d.listData.tight=!1;break}S=S.next}y=y.next}},canContain:function(h){return h==="item"},acceptsLines:!1},S7={continue:function(h){var d=h.currentLine;if(!h.indented&&wn(d,h.nextNonspace)===Pp)h.advanceNextNonspace(),h.advanceOffset(1,!1),go(wn(d,h.offset))&&h.advanceOffset(1,!0);else return 1;return 0},finalize:function(){},canContain:function(h){return h!=="item"},acceptsLines:!1},x7={continue:function(h,d){if(h.blank){if(d.firstChild===null)return 1;h.advanceNextNonspace()}else if(h.indent>=d.listData.markerOffset+d.listData.padding)h.advanceOffset(d.listData.markerOffset+d.listData.padding,!0);else return 1;return 0},finalize:c7,canContain:function(h){return h!=="item"},acceptsLines:!1},E7={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},M7={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},A7={continue:function(h,d){var y=h.currentLine,S=h.indent;if(d.isFenced){var L=S<=3&&y.charAt(h.nextNonspace)===d.fenceChar&&y.slice(h.nextNonspace).match(b7);if(L&&L[0].length>=d.fenceLength)return h.lastLineLength=h.offset+S+L[0].length,h.finalize(d,h.lineNumber),2;for(var U=d.fenceOffset;U>0&&go(wn(y,h.offset));)h.advanceOffset(1,!0),U--}else if(S>=Nl)h.advanceOffset(Nl,!0);else if(h.blank)h.advanceNextNonspace();else return 1;return 0},finalize:function(h,d){var y;if(d.stringContent!==null){if(d.isFenced){var S=d.stringContent,L=S.indexOf(`
|
|
657
|
-
`),U=S.slice(0,L),G=S.slice(L+1),te=U.match(/^(\s*)(.*)/);d.infoPadding=te[1].length,d.info=ls(te[2].trim()),d.literal=G}else d.literal=(y=d.stringContent)===null||y===void 0?void 0:y.replace(/(\n *)+$/,`
|
|
658
|
-
`);d.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},O7={continue:function(h,d){return h.blank&&(d.htmlBlockType===6||d.htmlBlockType===7)?1:0},finalize:function(h,d){var y;d.literal=((y=d.stringContent)===null||y===void 0?void 0:y.replace(/(\n *)+$/,""))||null,d.stringContent=null},canContain:function(){return!1},acceptsLines:!0},N7={continue:function(h){return h.blank?1:0},finalize:function(h,d){if(d.stringContent!==null){for(var y,S=!1;wn(d.stringContent,0)===Fp&&(y=h.inlineParser.parseReference(d,h.refMap));)d.stringContent=d.stringContent.slice(y),S=!0;S&&_p(d.stringContent)&&d.unlink()}},canContain:function(){return!1},acceptsLines:!0},D7=zp,L7=zp,yo={document:C7,list:T7,blockQuote:S7,item:x7,heading:E7,thematicBreak:M7,codeBlock:A7,htmlBlock:O7,paragraph:N7,table:f7,tableBody:d7,tableHead:h7,tableRow:m7,tableCell:g7,tableDelimRow:p7,tableDelimCell:v7,refDef:D7,customBlock:w7,frontMatter:L7};function df(h){for(var d=0,y=0,S=[],L=0;L<h.length;L+=1)if(h[L]==="|"&&h[L-1]!=="\\"){var U=h.substring(d,L);d===0&&yp(U)?y=L+1:S.push(U),d=L+1}if(d<h.length){var U=h.substring(d,h.length);yp(U)||S.push(U)}return[y,S]}function hf(h,d,y,S){for(var L=[],U=0,G=d;U<G.length;U++){var te=G[U],Se=te.match(/^[ \t]+/),Oe=Se?Se[0].length:0,Ve=void 0,We=void 0;if(Oe===te.length)Oe=0,Ve=0,We="";else{var qe=te.match(/[ \t]+$/);Ve=qe?qe[0].length:0,We=te.slice(Oe,te.length-Ve)}var ot=S+Oe,it=ur(h,[[y,S],[y,S+te.length-1]]);it.stringContent=We.replace(/\\\|/g,"|"),it.startIdx=L.length,it.endIdx=L.length,it.lineOffsets=[ot-1],it.paddingLeft=Oe,it.paddingRight=Ve,L.push(it),S+=te.length+1}return L}function R7(h){var d=null,y=h.stringContent,S=y[0],L=y[y.length-1];return L===":"?d=S===":"?"center":"right":S===":"&&(d="left"),{align:d}}var I7=function(h,d){var y=d.stringContent;if(d.type==="paragraph"&&!h.indented&&!h.blank){var S=y.length-1,L=y.lastIndexOf(`
|
|
659
|
-
`,S-1)+1,U=y.slice(L,S),G=h.currentLine.slice(h.nextNonspace),te=df(U),Se=te[0],Oe=te[1],Ve=df(G),We=Ve[0],qe=Ve[1],ot=/^[ \t]*:?-+:?[ \t]*$/;if(!Oe.length||!qe.length||qe.some(function(Ai){return!ot.test(Ai)})||qe.length===1&&G.indexOf("|")!==0)return 0;var it=d.lineOffsets,Pt=h.lineNumber-1,cr=El(it)+1,xr=ur("table",[[Pt,cr],[h.lineNumber,h.offset]]);if(xr.columns=qe.map(function(){return{align:null}}),d.insertAfter(xr),it.length===1)d.unlink();else{d.stringContent=y.slice(0,L);var xi=y.lastIndexOf(`
|
|
660
|
-
`,L-2)+1,Bn=L-xi-1;h.lastLineLength=it[it.length-2]+Bn,h.finalize(d,Pt-1)}h.advanceOffset(h.currentLine.length-h.offset,!1);var Cn=ur("tableHead",[[Pt,cr],[h.lineNumber,h.offset]]);xr.appendChild(Cn);var jn=ur("tableRow",[[Pt,cr],[Pt,cr+U.length-1]]),Ei=ur("tableDelimRow",[[h.lineNumber,h.nextNonspace+1],[h.lineNumber,h.offset]]);Cn.appendChild(jn),Cn.appendChild(Ei),hf("tableCell",Oe,Pt,cr+Se).forEach(function(Ai){jn.appendChild(Ai)});var Mi=hf("tableDelimCell",qe,h.lineNumber,h.nextNonspace+1+We);return Mi.forEach(function(Ai){Ei.appendChild(Ai)}),xr.columns=Mi.map(R7),h.tip=xr,2}return 0},P7=function(h,d){if(d.type!=="table"&&d.type!=="tableBody"||!h.blank&&h.currentLine.indexOf("|")===-1)return 0;if(h.advanceOffset(h.currentLine.length-h.offset,!1),h.blank){var y=d;return d.type==="tableBody"&&(y=d.parent,h.finalize(d,h.lineNumber-1)),h.finalize(y,h.lineNumber-1),0}var S=d;d.type==="table"&&(S=h.addChild("tableBody",h.nextNonspace),S.stringContent=null);var L=ur("tableRow",[[h.lineNumber,h.nextNonspace+1],[h.lineNumber,h.currentLine.length]]);S.appendChild(L);var U=S.parent,G=h.currentLine.slice(h.nextNonspace),te=df(G),Se=te[0],Oe=te[1];return hf("tableCell",Oe,h.lineNumber,h.nextNonspace+1+Se).forEach(function(Ve,We){We>=U.columns.length&&(Ve.ignored=!0),L.appendChild(Ve)}),2},B7=/^(\$\$)(\s*[a-zA-Z])+/,F7=/^(\$\$)(\s*[a-zA-Z])+.*(\$\$)/,q7=function(h){var d;if(!h.indented&&!F7.test(h.currentLine)&&(d=h.currentLine.match(B7))){var y=d[1].length;h.closeUnmatchedBlocks();var S=h.addChild("customBlock",h.nextNonspace);return S.syntaxLength=y,S.offset=h.indent,h.advanceNextNonspace(),h.advanceOffset(y,!1),2}return 0},H7=/^`{3,}(?!.*`)|^~{3,}/,_7=[/./,/^<(?:script|pre|style)(?:\s|>|$)/i,/^<!--/,/^<[?]/,/^<![A-Z]/,/^<!\[CDATA\[/,/^<[/]?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[123456]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|[/]?[>]|$)/i,new RegExp("^(?:"+Tp+"|"+Sp+")\\s*$","i")],z7=/^(?:=+|-+)[ \t]*$/,V7=/^#{1,6}(?:[ \t]+|$)/,U7=/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})[ \t]*$/,Vp=/^[*+-]/,Up=/^(\d{1,9})([.)])/;function $7(h,d){var y=h.currentLine.slice(h.nextNonspace),S,L,U={type:"bullet",tight:!0,bulletChar:"",start:0,delimiter:"",padding:0,markerOffset:h.indent,task:!1,checked:!1};if(h.indent>=4)return null;if(S=y.match(Vp))U.type="bullet",U.bulletChar=S[0][0];else if((S=y.match(Up))&&(d.type!=="paragraph"||S[1]==="1"))U.type="ordered",U.start=parseInt(S[1],10),U.delimiter=S[2];else return null;if(L=wn(h.currentLine,h.nextNonspace+S[0].length),!(L===-1||L===Ip||L===Bp)||d.type==="paragraph"&&!h.currentLine.slice(h.nextNonspace+S[0].length).match(qp))return null;h.advanceNextNonspace(),h.advanceOffset(S[0].length,!0);var G=h.column,te=h.offset;do h.advanceOffset(1,!0),L=wn(h.currentLine,h.offset);while(h.column-G<5&&go(L));var Se=wn(h.currentLine,h.offset)===-1,Oe=h.column-G;return Oe>=5||Oe<1||Se?(U.padding=S[0].length+1,h.column=G,h.offset=te,go(wn(h.currentLine,h.offset))&&h.advanceOffset(1,!0)):U.padding=S[0].length+Oe,U}function W7(h,d){return h.type===d.type&&h.delimiter===d.delimiter&&h.bulletChar===d.bulletChar}function $p(h,d){return h.options.disallowDeepHeading&&(d.type==="blockQuote"||d.type==="item")}var j7=function(h){return!h.indented&&wn(h.currentLine,h.nextNonspace)===Pp?(h.advanceNextNonspace(),h.advanceOffset(1,!1),go(wn(h.currentLine,h.offset))&&h.advanceOffset(1,!0),h.closeUnmatchedBlocks(),h.addChild("blockQuote",h.nextNonspace),1):0},G7=function(h,d){var y;if(!h.indented&&!$p(h,d)&&(y=h.currentLine.slice(h.nextNonspace).match(V7))){h.advanceNextNonspace(),h.advanceOffset(y[0].length,!1),h.closeUnmatchedBlocks();var S=h.addChild("heading",h.nextNonspace);return S.level=y[0].trim().length,S.headingType="atx",S.stringContent=h.currentLine.slice(h.offset).replace(/^[ \t]*#+[ \t]*$/,"").replace(/[ \t]+#+[ \t]*$/,""),h.advanceOffset(h.currentLine.length-h.offset),2}return 0},K7=function(h){var d;if(!h.indented&&(d=h.currentLine.slice(h.nextNonspace).match(H7))){var y=d[0].length;h.closeUnmatchedBlocks();var S=h.addChild("codeBlock",h.nextNonspace);return S.isFenced=!0,S.fenceLength=y,S.fenceChar=d[0][0],S.fenceOffset=h.indent,h.advanceNextNonspace(),h.advanceOffset(y,!1),2}return 0},J7=function(h,d){if(!h.indented&&wn(h.currentLine,h.nextNonspace)===y7){var y=h.currentLine.slice(h.nextNonspace),S=h.options.disallowedHtmlBlockTags,L=void 0;for(L=1;L<=7;L++){var U=y.match(_7[L]);if(U){if(L===7){if(d.type==="paragraph")return 0;if(S.length>0){var G=new RegExp("</?(?:"+S.join("|")+")","i");if(G.test(U[0]))return 0}}h.closeUnmatchedBlocks();var te=h.addChild("htmlBlock",h.offset);return te.htmlBlockType=L,2}}}return 0},Y7=function(h,d){var y;if(d.stringContent!==null&&!h.indented&&d.type==="paragraph"&&!$p(h,d.parent)&&(y=h.currentLine.slice(h.nextNonspace).match(z7))){h.closeUnmatchedBlocks();for(var S=void 0;wn(d.stringContent,0)===Fp&&(S=h.inlineParser.parseReference(d,h.refMap));)d.stringContent=d.stringContent.slice(S);if(d.stringContent.length>0){var L=ur("heading",d.sourcepos);return L.level=y[0][0]==="="?1:2,L.headingType="setext",L.stringContent=d.stringContent,d.insertAfter(L),d.unlink(),h.tip=L,h.advanceOffset(h.currentLine.length-h.offset,!1),2}return 0}return 0},X7=function(h){return!h.indented&&U7.test(h.currentLine.slice(h.nextNonspace))?(h.closeUnmatchedBlocks(),h.addChild("thematicBreak",h.nextNonspace),h.advanceOffset(h.currentLine.length-h.offset,!1),2):0},Z7=function(h,d){var y,S=d;return(!h.indented||d.type==="list")&&(y=$7(h,S))?(h.closeUnmatchedBlocks(),(h.tip.type!=="list"||!W7(S.listData,y))&&(S=h.addChild("list",h.nextNonspace),S.listData=y),S=h.addChild("item",h.nextNonspace),S.listData=y,1):0},Q7=function(h){return h.indented&&h.tip.type!=="paragraph"&&!h.blank?(h.advanceOffset(Nl,!0),h.closeUnmatchedBlocks(),h.addChild("codeBlock",h.offset),2):0},pf=[j7,G7,K7,J7,Y7,X7,Z7,Q7,I7,P7,q7],Wp=/^(-{3}|\+{3}|;{3})$/,eX=function(h,d){var y=h.currentLine,S=h.lineNumber,L=h.indented;if(S===1&&!L&&d.type==="document"&&Wp.test(y)){h.closeUnmatchedBlocks();var U=h.addChild("frontMatter",h.nextNonspace);return U.stringContent=y,h.advanceNextNonspace(),h.advanceOffset(y.length,!1),2}return 0},tX={continue:function(h,d){var y=h.currentLine,S=y.match(Wp);return d.type==="frontMatter"&&S?(d.stringContent+=y,h.lastLineLength=S[0].length,h.finalize(d,h.lineNumber),2):0},finalize:function(h,d){d.stringContent!==null&&(d.literal=d.stringContent,d.stringContent=null)},canContain:function(){return!1},acceptsLines:!0},rX=[/./,/<\/(?:script|pre|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],nX=/^[#`~*+_=<>0-9-;$]/,iX=/\r\n|\n|\r/;function vf(){return ur("document",[[1,1],[0,0]])}var aX={smart:!1,tagFilter:!1,extendedAutolinks:!1,disallowedHtmlBlockTags:[],referenceDefinition:!1,disallowDeepHeading:!1,customParser:null,frontMatter:!1},oX=(function(){function h(d){this.options=B(B({},aX),d),this.doc=vf(),this.tip=this.doc,this.oldtip=this.doc,this.lineNumber=0,this.offset=0,this.column=0,this.nextNonspace=0,this.nextNonspaceColumn=0,this.indent=0,this.currentLine="",this.indented=!1,this.blank=!1,this.partiallyConsumedTab=!1,this.allClosed=!0,this.lastMatchedContainer=this.doc,this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.lastLineLength=0,this.lines=[],this.options.frontMatter&&(yo.frontMatter=tX,pf.unshift(eX)),this.inlineParser=new l7(this.options)}return h.prototype.advanceOffset=function(d,y){y===void 0&&(y=!1);for(var S=this.currentLine,L,U,G;d>0&&(G=S[this.offset]);)G===" "?(L=4-this.column%4,y?(this.partiallyConsumedTab=L>d,U=L>d?d:L,this.column+=U,this.offset+=this.partiallyConsumedTab?0:1,d-=U):(this.partiallyConsumedTab=!1,this.column+=L,this.offset+=1,d-=1)):(this.partiallyConsumedTab=!1,this.offset+=1,this.column+=1,d-=1)},h.prototype.advanceNextNonspace=function(){this.offset=this.nextNonspace,this.column=this.nextNonspaceColumn,this.partiallyConsumedTab=!1},h.prototype.findNextNonspace=function(){for(var d=this.currentLine,y=this.offset,S=this.column,L;(L=d.charAt(y))!=="";)if(L===" ")y++,S++;else if(L===" ")y++,S+=4-S%4;else break;this.blank=L===`
|
|
661
|
-
`||L==="\r"||L==="",this.nextNonspace=y,this.nextNonspaceColumn=S,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=Nl},h.prototype.addLine=function(){if(this.partiallyConsumedTab){this.offset+=1;var d=4-this.column%4;this.tip.stringContent+=tf(" ",d)}this.tip.lineOffsets?this.tip.lineOffsets.push(this.offset):this.tip.lineOffsets=[this.offset],this.tip.stringContent+=this.currentLine.slice(this.offset)+`
|
|
662
|
-
`},h.prototype.addChild=function(d,y){for(;!yo[this.tip.type].canContain(d);)this.finalize(this.tip,this.lineNumber-1);var S=y+1,L=ur(d,[[this.lineNumber,S],[0,0]]);return L.stringContent="",this.tip.appendChild(L),this.tip=L,L},h.prototype.closeUnmatchedBlocks=function(){if(!this.allClosed){for(;this.oldtip!==this.lastMatchedContainer;){var d=this.oldtip.parent;this.finalize(this.oldtip,this.lineNumber-1),this.oldtip=d}this.allClosed=!0}},h.prototype.finalize=function(d,y){var S=d.parent;d.open=!1,d.sourcepos[1]=[y,this.lastLineLength],yo[d.type].finalize(this,d),this.tip=S},h.prototype.processInlines=function(d){var y,S=this.options.customParser,L=d.walker();for(this.inlineParser.refMap=this.refMap,this.inlineParser.refLinkCandidateMap=this.refLinkCandidateMap,this.inlineParser.refDefCandidateMap=this.refDefCandidateMap,this.inlineParser.options=this.options;y=L.next();){var U=y.node,G=y.entering,te=U.type;S&&S[te]&&S[te](U,{entering:G,options:this.options}),!G&&(te==="paragraph"||te==="heading"||te==="tableCell"&&!U.ignored)&&this.inlineParser.parse(U)}},h.prototype.incorporateLine=function(d){var y=this.doc;this.oldtip=this.tip,this.offset=0,this.column=0,this.blank=!1,this.partiallyConsumedTab=!1,this.lineNumber+=1,d.indexOf("\0")!==-1&&(d=d.replace(/\0/g,"�")),this.currentLine=d;for(var S=!0,L;(L=y.lastChild)&&L.open;){switch(y=L,this.findNextNonspace(),yo[y.type].continue(this,y)){case 0:break;case 1:S=!1;break;case 2:this.lastLineLength=d.length;return;default:throw new Error("continue returned illegal value, must be 0, 1, or 2")}if(!S){y=y.parent;break}}this.allClosed=y===this.oldtip,this.lastMatchedContainer=y;for(var U=y.type!=="paragraph"&&yo[y.type].acceptsLines,G=pf.length;!U;){if(this.findNextNonspace(),y.type!=="table"&&y.type!=="tableBody"&&y.type!=="paragraph"&&!this.indented&&!nX.test(d.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var te=0;te<G;){var Se=pf[te](this,y);if(Se===1){y=this.tip;break}else if(Se===2){y=this.tip,U=!0;break}else te++}if(te===G){this.advanceNextNonspace();break}}if(!this.allClosed&&!this.blank&&this.tip.type==="paragraph")this.addLine();else{this.closeUnmatchedBlocks(),this.blank&&y.lastChild&&(y.lastChild.lastLineBlank=!0);for(var Oe=y.type,Ve=this.blank&&!(Oe==="blockQuote"||bp(y)&&y.isFenced||Oe==="item"&&!y.firstChild&&y.sourcepos[0][0]===this.lineNumber),We=y;We;)We.lastLineBlank=Ve,We=We.parent;yo[Oe].acceptsLines?(this.addLine(),hY(y)&&y.htmlBlockType>=1&&y.htmlBlockType<=5&&rX[y.htmlBlockType].test(this.currentLine.slice(this.offset))&&(this.lastLineLength=d.length,this.finalize(y,this.lineNumber))):this.offset<d.length&&!this.blank&&(y=this.addChild("paragraph",this.offset),this.advanceNextNonspace(),this.addLine())}this.lastLineLength=d.length},h.prototype.parse=function(d,y){this.doc=vf(),this.tip=this.doc,this.lineNumber=0,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";var S=d.split(iX),L=S.length;this.lines=y||S,this.options.referenceDefinition&&this.clearRefMaps(),d.charCodeAt(d.length-1)===sf&&(L-=1);for(var U=0;U<L;U++)this.incorporateLine(S[U]);for(;this.tip;)this.finalize(this.tip,L);return this.processInlines(this.doc),this.doc},h.prototype.partialParseStart=function(d,y){this.doc=vf(),this.tip=this.doc,this.lineNumber=d-1,this.lastLineLength=0,this.offset=0,this.column=0,this.lastMatchedContainer=this.doc,this.currentLine="";for(var S=y.length,L=0;L<S;L++)this.incorporateLine(y[L]);return this.doc},h.prototype.partialParseExtends=function(d){for(var y=0;y<d.length;y++)this.incorporateLine(d[y])},h.prototype.partialParseFinish=function(){for(;this.tip;)this.finalize(this.tip,this.lineNumber);this.processInlines(this.doc)},h.prototype.setRefMaps=function(d,y,S){this.refMap=d,this.refLinkCandidateMap=y,this.refDefCandidateMap=S},h.prototype.clearRefMaps=function(){[this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(d){VY(d)})},h})();function jp(h,d){return h[0]<d[0]?1:h[0]>d[0]?-1:h[1]<d[1]?1:h[1]>d[1]?-1:0}function sX(h,d){var y=h[0],S=h[1];return jp(S,d)===1?1:jp(y,d)===-1?-1:0}function lX(h,d){if(!(h.parent!==d.parent||h===d)){for(var y=h.next;y&&y!==d;){for(var S=y.next,L=0,U=["parent","prev","next"];L<U.length;L++){var G=U[L];y[G]&&(nf(y[G].id),y[G]=null)}y=S}h.next=d.next,d.next?d.next.prev=h:h.parent.lastChild=h}}function uX(h){for(var d=[],y=h.firstChild;y;)d.push(y),y=y.next;return d}function Gp(h,d){for(var y=0,S=d;y<S.length;y++){var L=S[y];h.insertBefore(L)}}function cX(h,d){for(var y=d.length-1;y>=0;y-=1)h.prependChild(d[y])}function fX(h,d){if(!(!h||!h.parent||d===0)){var y=h.parent.walker();y.resumeAt(h,!0);for(var S;S=y.next();){var L=S.node,U=S.entering;U&&(L.sourcepos[0][0]+=d,L.sourcepos[1][0]+=d)}}}function Kp(h,d){var y=h[0],S=h[1];return S[0]<d?1:y[0]>d?-1:0}function Dl(h,d){for(var y=h.firstChild;y;){var S=Kp(y.sourcepos,d);if(S===0)return y;if(S===-1)return y.prev||y;y=y.next}return h.lastChild}function dX(h){for(;h.lastChild;)h=h.lastChild;return h}function hX(h){for(;h.parent&&h.parent.type!=="document"&&h.parent.sourcepos[0][0]===h.sourcepos[0][0];)h=h.parent;return h}function pX(h,d){for(var y=h.firstChild,S=null;y;){var L=Kp(y.sourcepos,d);if(L===0){if(y.sourcepos[0][0]===d||!y.firstChild)return y;S=y,y=y.firstChild}else{if(L===-1)break;S=y,y=y.next}}return S?hX(dX(S)):null}function vX(h,d){for(var y=h,S=null;y;){var L=sX(y.sourcepos,d);if(L===0)if(y.firstChild)S=y,y=y.firstChild;else return y;else{if(L===-1)return S;if(y.next)y=y.next;else return S}}return y}function Jp(h){return eY(h)||null}function mf(h,d,y){if(y===void 0&&(y=null),d)for(var S=d.walker();d&&d!==y;){h(d);var L=S.next();if(L)d=L.node;else break}}function mX(h){var d=Jp(h);if(!d)return!0;for(;d&&d.type!=="document";){if(!d.parent&&!d.prev&&!d.next)return!0;d=d.parent}return!1}var Yp=/\r\n|\n|\r/;function gX(h){var d=h.match(/^[ \t]+/);if(d&&(d[0].length>=2||/\t/.test(d[0])))return!0;var y=d?h.slice(d.length):h;return Vp.test(y)||Up.test(y)}function yX(h){return!_p(h)&&h.indexOf("|")!==-1}function gf(h){var d=h.id,y=h.title,S=h.sourcepos,L=h.dest;return{id:d,title:y,sourcepos:S,unlinked:!1,destination:L}}var bX=(function(){function h(d,y){this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.referenceDefinition=!!y?.referenceDefinition,this.parser=new oX(y),this.parser.setRefMaps(this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap),this.eventHandlerMap={change:[]},d=d||"",this.lineTexts=d.split(Yp),this.root=this.parser.parse(d,this.lineTexts)}return h.prototype.updateLineTexts=function(d,y,S){var L,U=d[0],G=d[1],te=y[0],Se=y[1],Oe=S.split(Yp),Ve=Oe.length,We=this.lineTexts[U-1],qe=this.lineTexts[te-1];Oe[0]=We.slice(0,G-1)+Oe[0],Oe[Ve-1]=Oe[Ve-1]+qe.slice(Se-1);var ot=te-U+1;return(L=this.lineTexts).splice.apply(L,F([U-1,ot],Oe)),Ve-ot},h.prototype.updateRootNodeState=function(){if(this.lineTexts.length===1&&this.lineTexts[0]===""){this.root.lastLineBlank=!0,this.root.sourcepos=[[1,1],[1,0]];return}this.root.lastChild&&(this.root.lastLineBlank=this.root.lastChild.lastLineBlank);for(var d=this.lineTexts,y=d.length-1;d[y]==="";)y-=1;d.length-2>y&&(y+=1),this.root.sourcepos[1]=[y+1,d[y].length]},h.prototype.replaceRangeNodes=function(d,y,S){d?(Gp(d,S),lX(d,y),[d.id,y.id].forEach(function(L){return nf(L)}),d.unlink()):y?(Gp(y,S),nf(y.id),y.unlink()):cX(this.root,S)},h.prototype.getNodeRange=function(d,y){var S=Dl(this.root,d[0]),L=Dl(this.root,y[0]);return L&&L.next&&y[0]+1===L.next.sourcepos[0][0]&&(L=L.next),[S,L]},h.prototype.trigger=function(d,y){this.eventHandlerMap[d].forEach(function(S){S(y)})},h.prototype.extendEndLine=function(d){for(;this.lineTexts[d]==="";)d+=1;return d},h.prototype.parseRange=function(d,y,S,L){d&&d.prev&&(kp(d.prev)&&gX(this.lineTexts[S-1])||vY(d.prev)&&yX(this.lineTexts[S-1]))&&(d=d.prev,S=d.sourcepos[0][0]);for(var U=this.lineTexts.slice(S-1,L),G=this.parser.partialParseStart(S,U),te=y?y.next:this.root.firstChild,Se=G.lastChild,Oe=Se&&bp(Se)&&Se.open,Ve=Se&&wp(Se)&&Se.open,We=Se&&kp(Se);(Oe||Ve)&&te||We&&te&&(te.type==="list"||te.sourcepos[0][1]>=2);){var qe=this.extendEndLine(te.sourcepos[1][0]);this.parser.partialParseExtends(this.lineTexts.slice(L,qe)),d||(d=y),y=te,L=qe,te=te.next}this.parser.partialParseFinish();var ot=uX(G);return{newNodes:ot,extStartNode:d,extEndNode:y}},h.prototype.getRemovedNodeRange=function(d,y){return!d||d&&vo(d)||y&&vo(y)?null:{id:[d.id,y.id],line:[d.sourcepos[0][0]-1,y.sourcepos[1][0]-1]}},h.prototype.markDeletedRefMap=function(d,y){var S=this;if(!mo(this.refMap)){var L=function(U){if(vo(U)){var G=S.refMap[U.label];G&&U.id===G.id&&(G.unlinked=!0)}};d&&mf(L,d.parent,y),y&&mf(L,y)}},h.prototype.replaceWithNewRefDefState=function(d){var y=this;if(!mo(this.refMap)){var S=function(L){if(vo(L)){var U=L.label,G=y.refMap[U];(!G||G.unlinked)&&(y.refMap[U]=gf(L))}};d.forEach(function(L){mf(S,L)})}},h.prototype.replaceWithRefDefCandidate=function(){var d=this;mo(this.refDefCandidateMap)||Ml(this.refDefCandidateMap,function(y,S){var L=S.label,U=S.sourcepos,G=d.refMap[L];(!G||G.unlinked||G.sourcepos[0][0]>U[0][0])&&(d.refMap[L]=gf(S))})},h.prototype.getRangeWithRefDef=function(d,y,S,L,U){if(this.referenceDefinition&&!mo(this.refMap)){var G=Dl(this.root,d-1),te=Dl(this.root,y+1);G&&vo(G)&&G!==S&&G!==L&&(S=G,d=S.sourcepos[0][0]),te&&vo(te)&&te!==S&&te!==L&&(L=te,y=this.extendEndLine(L.sourcepos[1][0]+U))}return[S,L,d,y]},h.prototype.parse=function(d,y,S){S===void 0&&(S=0);var L=this.getNodeRange(d,y),U=L[0],G=L[1],te=U?Math.min(U.sourcepos[0][0],d[0]):d[0],Se=this.extendEndLine((G?Math.max(G.sourcepos[1][0],y[0]):y[0])+S),Oe=this.parseRange.apply(this,this.getRangeWithRefDef(te,Se,U,G,S)),Ve=Oe.newNodes,We=Oe.extStartNode,qe=Oe.extEndNode,ot=this.getRemovedNodeRange(We,qe),it=qe?qe.next:this.root.firstChild;return this.referenceDefinition?(this.markDeletedRefMap(We,qe),this.replaceRangeNodes(We,qe,Ve),this.replaceWithNewRefDefState(Ve)):this.replaceRangeNodes(We,qe,Ve),{nodes:Ve,removedNodeRange:ot,nextNode:it}},h.prototype.parseRefLink=function(){var d=this,y=[];return mo(this.refMap)||Ml(this.refMap,function(S,L){L.unlinked&&delete d.refMap[S],Ml(d.refLinkCandidateMap,function(U,G){var te=G.node,Se=G.refLabel;Se===S&&y.push(d.parse(te.sourcepos[0],te.sourcepos[1]))})}),y},h.prototype.removeUnlinkedCandidate=function(){mo(this.refDefCandidateMap)||[this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(d){Ml(d,function(y){mX(y)&&delete d[y]})})},h.prototype.editMarkdown=function(d,y,S){var L=this.updateLineTexts(d,y,S),U=this.parse(d,y,L),G=zY(U,"nextNode");fX(U.nextNode,L),this.updateRootNodeState();var te=[G];return this.referenceDefinition&&(this.removeUnlinkedCandidate(),this.replaceWithRefDefCandidate(),te=te.concat(this.parseRefLink())),this.trigger("change",te),te},h.prototype.getLineTexts=function(){return this.lineTexts},h.prototype.getRootNode=function(){return this.root},h.prototype.findNodeAtPosition=function(d){var y=vX(this.root,d);return!y||y===this.root?null:y},h.prototype.findFirstNodeAtLine=function(d){return pX(this.root,d)},h.prototype.on=function(d,y){this.eventHandlerMap[d].push(y)},h.prototype.off=function(d,y){var S=this.eventHandlerMap[d],L=S.indexOf(y);S.splice(L,1)},h.prototype.findNodeById=function(d){return Jp(d)},h.prototype.removeAllNode=function(){tY()},h})(),kX=["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"],Xp=new RegExp("<(/?(?:"+kX.join("|")+")[^>]*>)","ig");function Zp(h){return Xp.test(h)?h.replace(Xp,function(d,y){return"<"+y}):h}var Qp={heading:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"h"+h.level,outerNewLine:!0}},text:function(h){return{type:"text",content:h.literal}},softbreak:function(h,d){var y=d.options;return{type:"html",content:y.softbreak}},linebreak:function(){return{type:"html",content:`<br />
|
|
663
|
-
`}},emph:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"em"}},strong:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"strong"}},paragraph:function(h,d){var y,S=d.entering,L=(y=h.parent)===null||y===void 0?void 0:y.parent;return L&&L.type==="list"&&L.listData.tight?null:{type:S?"openTag":"closeTag",tagName:"p",outerNewLine:!0}},thematicBreak:function(){return{type:"openTag",tagName:"hr",outerNewLine:!0,selfClose:!0}},blockQuote:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"blockquote",outerNewLine:!0,innerNewLine:!0}},list:function(h,d){var y=d.entering,S=h.listData,L=S.type,U=S.start,G=L==="bullet"?"ul":"ol",te={};return G==="ol"&&U!==null&&U!==1&&(te.start=U.toString()),{type:y?"openTag":"closeTag",tagName:G,attributes:te,outerNewLine:!0}},item:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"li",outerNewLine:!0}},htmlInline:function(h,d){var y=d.options,S=y.tagFilter?Zp(h.literal):h.literal;return{type:"html",content:S}},htmlBlock:function(h,d){var y=d.options,S=y.tagFilter?Zp(h.literal):h.literal;return y.nodeId?[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"html",content:S},{type:"closeTag",tagName:"div",outerNewLine:!0}]:{type:"html",content:S,outerNewLine:!0}},code:function(h){return[{type:"openTag",tagName:"code"},{type:"text",content:h.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(h){var d=h.info,y=d?d.split(/\s+/):[],S=[];return y.length>0&&y[0].length>0&&S.push("language-"+po(y[0])),[{type:"openTag",tagName:"pre",outerNewLine:!0},{type:"openTag",tagName:"code",classNames:S},{type:"text",content:h.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre",outerNewLine:!0}]},link:function(h,d){var y=d.entering;if(y){var S=h,L=S.title,U=S.destination;return{type:"openTag",tagName:"a",attributes:B({href:po(U)},L&&{title:po(L)})}}return{type:"closeTag",tagName:"a"}},image:function(h,d){var y=d.getChildrenText,S=d.skipChildren,L=h,U=L.title,G=L.destination;return S(),{type:"openTag",tagName:"img",selfClose:!0,attributes:B({src:po(G),alt:y(h)},U&&{title:po(U)})}},customBlock:function(h,d,y){var S=h.info.trim().toLowerCase(),L=y[S];if(L)try{return L(h,d)}catch(U){console.warn("[@toast-ui/editor] - The error occurred when "+S+" block node was parsed in markdown renderer: "+U)}return[{type:"openTag",tagName:"div",outerNewLine:!0},{type:"text",content:h.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},frontMatter:function(h){return[{type:"openTag",tagName:"div",outerNewLine:!0,attributes:{style:"white-space: pre; display: none;"}},{type:"text",content:h.literal},{type:"closeTag",tagName:"div",outerNewLine:!0}]},customInline:function(h,d,y){var S=h,L=S.info,U=S.firstChild,G=L.trim().toLowerCase(),te=y[G],Se=d.entering;if(te)try{return te(h,d)}catch(Oe){console.warn("[@toast-ui/editor] - The error occurred when "+G+" inline node was parsed in markdown renderer: "+Oe)}return Se?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+L+(U?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},ev={strike:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"del"}},item:function(h,d){var y=d.entering,S=h.listData,L=S.checked,U=S.task;if(y){var G={type:"openTag",tagName:"li",outerNewLine:!0};return U?[G,{type:"openTag",tagName:"input",selfClose:!0,attributes:B(B({},L&&{checked:""}),{disabled:"",type:"checkbox"})},{type:"text",content:" "}]:G}return{type:"closeTag",tagName:"li",outerNewLine:!0}},table:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"table",outerNewLine:!0}},tableHead:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"thead",outerNewLine:!0}},tableBody:function(h,d){var y=d.entering;return{type:y?"openTag":"closeTag",tagName:"tbody",outerNewLine:!0}},tableRow:function(h,d){var y=d.entering;if(y)return{type:"openTag",tagName:"tr",outerNewLine:!0};var S=[];if(h.lastChild)for(var L=h.parent.parent.columns.length,U=h.lastChild.endIdx,G=U+1;G<L;G+=1)S.push({type:"openTag",tagName:"td",outerNewLine:!0},{type:"closeTag",tagName:"td",outerNewLine:!0});return S.push({type:"closeTag",tagName:"tr",outerNewLine:!0}),S},tableCell:function(h,d){var y=d.entering;if(h.ignored)return{type:"text",content:""};var S=h.parent.parent,L=S.type==="tableHead"?"th":"td",U=S.parent,G=U.columns[h.startIdx],te=G?.align?{align:G.align}:null;return y?B({type:"openTag",tagName:L,outerNewLine:!0},te&&{attributes:te}):{type:"closeTag",tagName:L,outerNewLine:!0}}},wX={softbreak:`
|
|
664
|
-
`,gfm:!1,tagFilter:!1,nodeId:!1};function CX(h){for(var d=[],y=h.walker(),S=null;S=y.next();){var L=S.node;L.type==="text"&&d.push(L.literal)}return d.join("")}var TX=(function(){function h(d){this.buffer=[],this.options=B(B({},wX),d),this.convertors=this.createConvertors(),delete this.options.convertors}return h.prototype.createConvertors=function(){var d=B({},Qp);if(this.options.gfm&&(d=B(B({},d),ev)),this.options.convertors){var y=this.options.convertors,S=Object.keys(y),L=B(B({},Qp),ev);S.forEach(function(U){var G=d[U],te=y[U],Se=Object.keys(L).indexOf(U)===-1?U.toLowerCase():U;G?d[Se]=function(Oe,Ve,We){return Ve.origin=function(){return G(Oe,Ve,We)},te(Oe,Ve)}:d[Se]=te})}return d},h.prototype.getConvertors=function(){return this.convertors},h.prototype.getOptions=function(){return this.options},h.prototype.render=function(d){var y=this;this.buffer=[];for(var S=d.walker(),L=null,U=function(){var te=L.node,Se=L.entering,Oe=G.convertors[te.type];if(!Oe)return"continue";var Ve=!1,We={entering:Se,leaf:!rf(te),options:G.options,getChildrenText:CX,skipChildren:function(){Ve=!0}},qe=wp(te)||mY(te)?Oe(te,We,G.convertors):Oe(te,We);if(qe){var ot=Array.isArray(qe)?qe:[qe];ot.forEach(function(it,Pt){it.type==="openTag"&&y.options.nodeId&&Pt===0&&(it.attributes||(it.attributes={}),it.attributes["data-nodeid"]=String(te.id)),y.renderHTMLNode(it)}),Ve&&(S.resumeAt(te,!1),S.next())}},G=this;L=S.next();)U();return this.addNewLine(),this.buffer.join("")},h.prototype.renderHTMLNode=function(d){switch(d.type){case"openTag":case"closeTag":this.renderElementNode(d);break;case"text":this.renderTextNode(d);break;case"html":this.renderRawHtmlNode(d);break}},h.prototype.generateOpenTagString=function(d){var y=this,S=d.tagName,L=d.classNames,U=d.attributes;this.buffer.push("<"+S),L&&L.length>0&&this.buffer.push(' class="'+L.join(" ")+'"'),U&&Object.keys(U).forEach(function(G){var te=U[G];y.buffer.push(" "+G+'="'+te+'"')}),d.selfClose&&this.buffer.push(" /"),this.buffer.push(">")},h.prototype.generateCloseTagString=function(d){var y=d.tagName;this.buffer.push("</"+y+">")},h.prototype.addNewLine=function(){this.buffer.length&&El(El(this.buffer))!==`
|
|
665
|
-
`&&this.buffer.push(`
|
|
666
|
-
`)},h.prototype.addOuterNewLine=function(d){d.outerNewLine&&this.addNewLine()},h.prototype.addInnerNewLine=function(d){d.innerNewLine&&this.addNewLine()},h.prototype.renderTextNode=function(d){this.buffer.push(po(d.content))},h.prototype.renderRawHtmlNode=function(d){this.addOuterNewLine(d),this.buffer.push(d.content),this.addOuterNewLine(d)},h.prototype.renderElementNode=function(d){d.type==="openTag"?(this.addOuterNewLine(d),this.generateOpenTagString(d),d.selfClose?this.addOuterNewLine(d):this.addInnerNewLine(d)):(this.addInnerNewLine(d),this.generateCloseTagString(d),this.addOuterNewLine(d))},h})(),SX=f(956),xX=f.n(SX),EX=f(969),tv=f.n(EX),MX=f(348),rv=f.n(MX),AX=f(349),nv=f.n(AX),OX=f(204),iv=f.n(OX),NX=f(462),yf=f.n(NX),DX=f(522),av=f.n(DX),LX=f(990),RX=f.n(LX),IX=f(322),PX=f.n(IX),BX=f(758),FX=f.n(BX),qX=f(929),Ll=f.n(qX),HX=f(714),_X=f.n(HX);f(471);var ov="[A-Za-z][A-Za-z0-9-]*",zX="[a-zA-Z_:][a-zA-Z0-9:._-]*",VX="[^\"'=<>`\\x00-\\x20]+",UX="'[^']*'",$X='"[^"]*"',WX="(?:"+VX+"|"+UX+"|"+$X+")",jX="(?:\\s*=\\s*"+WX+")",sv="(?:\\s+"+zX+jX+"?)",GX="<("+ov+")("+sv+")*\\s*/?>",KX="</("+ov+")\\s*[>]",JX="(?:"+GX+"|"+KX+")",lv=new RegExp("^"+JX,"i");f(934),f(391);function bf(h,d){return h.indexOf(d)!==-1}var YX=["rel","target","hreflang","type"];function XX(h){if(!h)return null;var d={};return YX.forEach(function(y){Ll()(h[y])||(d[y]=h[y])}),d}function ZX(h){return h[h.length-1]}function kf(h){return typeof h=="object"&&h!==null}function wf(h,d){var y=b({},h);return h&&d&&Object.keys(d).forEach(function(S){kf(y[S])?Array.isArray(d[S])?y[S]=Cf(d[S]):y.hasOwnProperty(S)?y[S]=wf(y[S],d[S]):y[S]=Tf(d[S]):y[S]=d[S]}),y}function Cf(h){return h.map(function(d){return kf(d)?Array.isArray(d)?Cf(d):Tf(d):d})}function Tf(h){var d=Object.keys(h);return d.length?d.reduce(function(y,S){return kf(h[S])?y[S]=Array.isArray(h[S])?Cf(h[S]):Tf(h[S]):y[S]=h[S],y},{}):h}function uv(h,d){return d===void 0&&(d={}),Object.keys(d).forEach(function(y){h.hasOwnProperty(y)&&typeof h[y]=="object"?Array.isArray(d[y])?h[y]=d[y]:uv(h[y],d[y]):h[y]=d[y]}),h}function cv(h,d){return h>d?[d,h]:[h,d]}function QX(h,d,y){var S=parseInt(h.left,10),L=parseInt(h.top,10),U=parseInt(h.width,10)+parseInt(h.paddingLeft,10)+parseInt(h.paddingRight,10),G=parseInt(h.height,10)+parseInt(h.paddingTop,10)+parseInt(h.paddingBottom,10);return d>=S&&d<=S+U&&y>=L&&y<=L+G}var eZ="toastui-editor-";function Rl(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];for(var y=[],S=0,L=h;S<L.length;S++){var U=L[S],G=void 0;Array.isArray(U)?G=U[0]?U[1]:null:G=U,G&&y.push(""+eZ+G)}return y.join(" ")}function fv(h){h.parentNode&&h.parentNode.removeChild(h)}function dv(h,d,y){Ll()(y)&&(y=!_X()(h,d));var S=y?iv():yf();S(h,d)}function tZ(h,d){var y=document.createElement("div");FX()(h)?y.innerHTML=h:y.appendChild(h);var S=y.firstChild;return S}function rZ(h){var d=/<img class="ProseMirror-separator" alt="">/g,y=/ class="ProseMirror-trailingBreak"/g,S=h;return S=S.replace(d,""),S=S.replace(y,""),S}var nZ=f(294),hv=f.n(nZ);function iZ(h){return h.sourcepos[0][1]}function aZ(h){switch(h.type){case"code":case"text":case"emph":case"strong":case"strike":case"link":case"image":case"htmlInline":case"linebreak":case"softbreak":case"customInline":return!0;default:return!1}}function oZ(h,d,y){for(y===void 0&&(y=!0),h=y?h:h.parent;h&&h.type!=="document";){if(d(h))return h;h=h.parent}return null}function sZ(h){var d=h.firstChild.literal;switch(h.type){case"emph":return"*"+d+"*";case"strong":return"**"+d+"**";case"strike":return"~~"+d+"~~";case"code":return"`"+d+"`";case"link":case"image":var y=h,S=y.destination,L=y.title,U=h.type==="link"?"":"!";return U+"["+d+"]("+S+(L?' "'+L+'"':"")+")";default:return null}}var lZ={},pv=/\$\$widget\d+\s/;function vv(h){var d=h.search(pv);if(d!==-1){var y=h.substring(d),S=y.replace(pv,"").replace("$$","");h=h.substring(0,d),h+=vv(S)}return h}function uZ(h,d){var y=lZ[h],S=y.rule,L=y.toDOM,U=vv(d).match(S);return U&&(d=U[0]),L(d)}function cZ(h){for(var d,y="",S=h.walker();d=S.next();){var L=d.node,U=d.entering;U&&(L!==h&&L.type!=="text"?(y+=sZ(L),S.resumeAt(h,!1),S.next()):L.type==="text"&&(y+=L.literal))}return y}var fZ=f(368),dZ=f.n(fZ),hZ=["iframe","embed"],mv=[];function pZ(h){bf(hZ,h)&&mv.push(h.toLowerCase())}function vZ(h,d){return dZ().sanitize(h,b({ADD_TAGS:mv,ADD_ATTR:["rel","target","hreflang","type"],FORBID_TAGS:["input","script","textarea","form","button","select","meta","style","link","title","object","base"]},d))}function mZ(h,d){return h.literal.replace(new RegExp("(<\\s*"+d+"[^>]*>)|(</"+d+"\\s*[>])","ig"),"").trim()}function gZ(h){h=h.match(lv)[0];var d=h.match(new RegExp(sv,"g"));return d?d.reduce(function(y,S){var L=S.trim().split("="),U=L[0],G=L.slice(1);return G.length&&(y[U]=G.join("=").replace(/'|"/g,"").trim()),y},{}):{}}var yZ=/^\s*<\s*\//,bZ={paragraph:function(h,d){var y=d.entering,S=d.origin,L=d.options;return L.nodeId?{type:y?"openTag":"closeTag",outerNewLine:!0,tagName:"p"}:S()},softbreak:function(h){var d=h.prev&&h.prev.type==="htmlInline",y=d&&/<br ?\/?>/.test(h.prev.literal),S=y?`
|
|
667
|
-
`:`<br>
|
|
668
|
-
`;return{type:"html",content:S}},item:function(h,d){var y=d.entering;if(y){var S={},L=[];return h.listData.task&&(S["data-task"]="",L.push("task-list-item"),h.listData.checked&&(L.push("checked"),S["data-task-checked"]="")),{type:"openTag",tagName:"li",classNames:L,attributes:S,outerNewLine:!0}}return{type:"closeTag",tagName:"li",outerNewLine:!0}},code:function(h){var d={"data-backticks":String(h.tickCount)};return[{type:"openTag",tagName:"code",attributes:d},{type:"text",content:h.literal},{type:"closeTag",tagName:"code"}]},codeBlock:function(h){var d=h,y=d.fenceLength,S=d.info,L=S?S.split(/\s+/):[],U=[],G={};if(y>3&&(G["data-backticks"]=y),L.length>0&&L[0].length>0){var te=L[0];U.push("lang-"+te),G["data-language"]=te}return[{type:"openTag",tagName:"pre",classNames:U},{type:"openTag",tagName:"code",attributes:G},{type:"text",content:h.literal},{type:"closeTag",tagName:"code"},{type:"closeTag",tagName:"pre"}]},customInline:function(h,d){var y=d.origin,S=d.entering,L=d.skipChildren,U=h.info;if(U.indexOf("widget")!==-1&&S){L();var G=cZ(h),te=uZ(U,G).outerHTML;return[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:te},{type:"closeTag",tagName:"span"}]}return y()}};function kZ(h,d){var y=b({},bZ);return h&&(y.link=function(S,L){var U=L.entering,G=L.origin,te=G();return U&&(te.attributes=b(b({},te.attributes),h)),te}),d&&Object.keys(d).forEach(function(S){var L=y[S],U=d[S];L&&hv()(U)?y[S]=function(G,te){var Se=b({},te);return Se.origin=function(){return L(G,te)},U(G,Se)}:bf(["htmlBlock","htmlInline"],S)&&!hv()(U)?y[S]=function(G,te){var Se=G.literal.match(lv);if(Se){var Oe=Se[0],Ve=Se[1],We=Se[3],qe=(Ve||We).toLowerCase(),ot=U[qe],it=mZ(G,qe);if(ot){var Pt=b({},G);return Pt.attrs=gZ(Oe),Pt.childrenHTML=it,Pt.type=qe,te.entering=!yZ.test(G.literal),ot(Pt,te)}}return te.origin()}:y[S]=U}),y}var wZ=["UL","OL","BLOCKQUOTE"];function CZ(h,d){for(var y=0;h&&h!==d&&(bf(wZ,h.tagName)||(y+=h.offsetTop),h.offsetParent!==d.offsetParent);)h=h.parentElement;return y}function TZ(h,d){for(var y=d,S=null;y;){var L=y.firstElementChild;if(!L)break;var U=gv(L,h,CZ(y,d));S=y,y=U}var G=y||S;return G===d?null:G}function gv(h,d,y){return h&&d>y+h.offsetTop?gv(h.nextElementSibling,d,y)||h:null}var SZ={};function Sf(h){h&&(delete SZ[Number(h.getAttribute("data-nodeid"))],RX()(h.children).forEach(function(d){Sf(d)}))}var xf=Rl("md-preview-highlight");function xZ(h,d){for(var y=h.firstChild;y&&y.next&&!(iZ(y.next)>d+1);)y=y.next;return y}var EZ=(function(){function h(d,y){var S=document.createElement("div");this.el=S,this.eventEmitter=d,this.isViewer=!!y.isViewer,this.el.className=Rl("md-preview");var L=y.linkAttributes,U=y.customHTMLRenderer,G=y.sanitizer,te=y.highlight,Se=te===void 0?!1:te;this.renderer=new TX({gfm:!0,nodeId:!0,convertors:kZ(L,U)}),this.cursorNodeId=null,this.sanitizer=G,this.initEvent(Se),this.initContentSection(),this.isViewer&&(this.previewContent.style.overflowWrap="break-word")}return h.prototype.initContentSection=function(){this.previewContent=tZ('<div class="'+Rl("contents")+'"></div>'),this.isViewer||this.el.appendChild(this.previewContent)},h.prototype.toggleActive=function(d){dv(this.el,"active",d)},h.prototype.initEvent=function(d){var y=this;this.eventEmitter.listen("updatePreview",this.update.bind(this)),!this.isViewer&&(d&&(this.eventEmitter.listen("changeToolbarState",function(S){var L=S.mdNode,U=S.cursorPos;y.updateCursorNode(L,U)}),this.eventEmitter.listen("blur",function(){y.removeHighlight()})),rv()(this.el,"scroll",function(S){y.eventEmitter.emit("scroll","preview",TZ(S.target.scrollTop,y.previewContent))}),this.eventEmitter.listen("changePreviewTabPreview",function(){return y.toggleActive(!0)}),this.eventEmitter.listen("changePreviewTabWrite",function(){return y.toggleActive(!1)}))},h.prototype.removeHighlight=function(){if(this.cursorNodeId){var d=this.getElementByNodeId(this.cursorNodeId);d&&yf()(d,xf)}},h.prototype.updateCursorNode=function(d,y){d&&(d=oZ(d,function(G){return!aZ(G)}),d.type==="tableRow"?d=xZ(d,y[1]):d.type==="tableBody"&&(d=null));var S=d?d.id:null;if(this.cursorNodeId!==S){var L=this.getElementByNodeId(this.cursorNodeId),U=this.getElementByNodeId(S);L&&yf()(L,xf),U&&iv()(U,xf),this.cursorNodeId=S}},h.prototype.getElementByNodeId=function(d){return d?this.previewContent.querySelector('[data-nodeid="'+d+'"]'):null},h.prototype.update=function(d){var y=this;d.forEach(function(S){return y.replaceRangeNodes(S)}),this.eventEmitter.emit("afterPreviewRender",this)},h.prototype.replaceRangeNodes=function(d){var y=this,S=d.nodes,L=d.removedNodeRange,U=this.previewContent,G=this.eventEmitter.emitReduce("beforePreviewRender",this.sanitizer(S.map(function(it){return y.renderer.render(it)}).join("")));if(!L)U.insertAdjacentHTML("afterbegin",G);else{var te=L.id,Se=te[0],Oe=te[1],Ve=this.getElementByNodeId(Se),We=this.getElementByNodeId(Oe);if(Ve){Ve.insertAdjacentHTML("beforebegin",G);for(var qe=Ve;qe&&qe!==We;){var ot=qe.nextElementSibling;fv(qe),Sf(qe),qe=ot}qe?.parentNode&&(fv(qe),Sf(qe))}}},h.prototype.getRenderer=function(){return this.renderer},h.prototype.destroy=function(){nv()(this.el,"scroll"),this.el=null},h.prototype.getElement=function(){return this.el},h.prototype.getHTML=function(){return rZ(this.previewContent.innerHTML)},h.prototype.setHTML=function(d){this.previewContent.innerHTML=d},h.prototype.setHeight=function(d){av()(this.el,{height:d+"px"})},h.prototype.setMinHeight=function(d){av()(this.el,{minHeight:d+"px"})},h})(),MZ=EZ,Il=f(814),Ef=f(479),yv=f(311),AZ=f(481),OZ=f(43),NZ=f(928),DZ=f.n(NZ),LZ=(function(){function h(){this.keys=[],this.values=[]}return h.prototype.getKeyIndex=function(d){return DZ()(d,this.keys)},h.prototype.get=function(d){return this.values[this.getKeyIndex(d)]},h.prototype.set=function(d,y){var S=this.getKeyIndex(d);return S>-1?this.values[S]=y:(this.keys.push(d),this.values.push(y)),this},h.prototype.has=function(d){return this.getKeyIndex(d)>-1},h.prototype.delete=function(d){var y=this.getKeyIndex(d);return y>-1?(this.keys.splice(y,1),this.values.splice(y,1),!0):!1},h.prototype.forEach=function(d,y){var S=this;y===void 0&&(y=this),this.values.forEach(function(L,U){L&&S.keys[U]&&d.call(y,L,S.keys[U],S)})},h.prototype.clear=function(){this.keys=[],this.values=[]},h})(),bv=LZ,Mf="en-US",RZ=(function(){function h(){this.code=Mf,this.langs=new bv}return h.prototype.setCode=function(d){this.code=d||Mf},h.prototype.setLanguage=function(d,y){var S=this;d=[].concat(d),d.forEach(function(L){if(!S.langs.has(L))S.langs.set(L,y);else{var U=S.langs.get(L);S.langs.set(L,tv()(U,y))}})},h.prototype.get=function(d,y){y||(y=this.code);var S=this.langs.get(y);S||(S=this.langs.get(Mf));var L=S[d];if(!L)throw new Error('There is no text key "'+d+'" in '+y);return L},h})(),IZ=new RZ;function PZ(h,d){for(var y=h.depth;y;){var S=h.node(y);if(d(S,y))return{node:S,depth:y,offset:y>0?h.before(y):0};y-=1}return null}var kv=new Map,wv=(function(){function h(d,y,S,L){this.table=d,this.tableRows=y,this.tableStartPos=S,this.rowInfo=L}return h.create=function(d){var y=PZ(d,function(it){var Pt=it.type;return Pt.name==="table"});if(y){var S=y.node,L=y.depth,U=y.offset,G=kv.get(S);if(G?.tableStartPos===U+1)return G;var te=[],Se=d.start(L),Oe=S.child(0),Ve=S.child(1),We=Af(Oe,Se),qe=Af(Ve,Se+Oe.nodeSize);Oe.forEach(function(it){return te.push(it)}),Ve.forEach(function(it){return te.push(it)});var ot=new h(S,te,Se,We.concat(qe));return kv.set(S,ot),ot}return null},Object.defineProperty(h.prototype,"totalRowCount",{get:function(){return this.rowInfo.length},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"totalColumnCount",{get:function(){return this.rowInfo[0].length},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"tableStartOffset",{get:function(){return this.tableStartPos},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"tableEndOffset",{get:function(){return this.tableStartPos+this.table.nodeSize-1},enumerable:!1,configurable:!0}),h.prototype.getCellInfo=function(d,y){return this.rowInfo[d][y]},h.prototype.posAt=function(d,y){for(var S=0,L=this.tableStartPos;;S+=1){var U=L+this.tableRows[S].nodeSize;if(S===d){for(var G=y;G<this.totalColumnCount&&this.rowInfo[S][G].offset<L;)G+=1;return G===this.totalColumnCount?U:this.rowInfo[S][G].offset}L=U}},h.prototype.getNodeAndPos=function(d,y){var S=this.rowInfo[d][y];return{node:this.table.nodeAt(S.offset-this.tableStartOffset),pos:S.offset}},h.prototype.extendedRowspan=function(d,y){return!1},h.prototype.extendedColspan=function(d,y){return!1},h.prototype.getRowspanCount=function(d,y){return 0},h.prototype.getColspanCount=function(d,y){return 0},h.prototype.decreaseColspanCount=function(d,y){return 0},h.prototype.decreaseRowspanCount=function(d,y){return 0},h.prototype.getColspanStartInfo=function(d,y){return null},h.prototype.getRowspanStartInfo=function(d,y){return null},h.prototype.getCellStartOffset=function(d,y){var S=this.rowInfo[d][y].offset;return this.extendedRowspan(d,y)?this.posAt(d,y):S},h.prototype.getCellEndOffset=function(d,y){var S=this.rowInfo[d][y],L=S.offset,U=S.nodeSize;return this.extendedRowspan(d,y)?this.posAt(d,y):L+U},h.prototype.getCellIndex=function(d){for(var y=0;y<this.totalRowCount;y+=1)for(var S=this.rowInfo[y],L=0;L<this.totalColumnCount;L+=1)if(S[L].offset+1>d.pos)return[y,L];return[0,0]},h.prototype.getRectOffsets=function(d,y){var S,L,U;y===void 0&&(y=d),d.pos>y.pos&&(S=[y,d],d=S[0],y=S[1]);var G=this.getCellIndex(d),te=G[0],Se=G[1],Oe=this.getCellIndex(y),Ve=Oe[0],We=Oe[1];return L=cv(te,Ve),te=L[0],Ve=L[1],U=cv(Se,We),Se=U[0],We=U[1],this.getSpannedOffsets({startRowIdx:te,startColIdx:Se,endRowIdx:Ve,endColIdx:We})},h.prototype.getSpannedOffsets=function(d){return d},h})(),Af=function(h,d){var y=[];return h.forEach(function(S,L){var U={rowspanMap:{},colspanMap:{},length:0};S.forEach(function(G,te){for(var Se=G.nodeSize,Oe=0;U[Oe];)Oe+=1;U[Oe]={offset:d+L+te+2,nodeSize:Se},U.length+=1}),y.push(U)}),y};function BZ(h,d){return uv(wv.prototype,h),Af=d,wv}function FZ(h){var d=h.plugin,y=h.eventEmitter,S=h.usageStatistics,L=h.instance,U={Plugin:Il.Plugin,PluginKey:Il.PluginKey,Selection:Il.Selection,TextSelection:Il.TextSelection},G={Decoration:yv.Decoration,DecorationSet:yv.DecorationSet},te={Fragment:OZ.Fragment},Se={InputRule:Ef.InputRule,inputRules:Ef.inputRules,undoInputRule:Ef.undoInputRule},Oe={keymap:AZ.keymap},Ve={eventEmitter:y,usageStatistics:S,instance:L,pmState:U,pmView:G,pmModel:te,pmRules:Se,pmKeymap:Oe,i18n:IZ};if(PX()(d)){var We=d[0],qe=d[1],ot=qe===void 0?{}:qe;return We(Ve,ot)}return d(Ve)}function qZ(h){var d=h.plugins,y=h.eventEmitter,S=h.usageStatistics,L=h.instance;return y.listen("mixinTableOffsetMapPrototype",BZ),(d??[]).reduce(function(U,G){var te=FZ({plugin:G,eventEmitter:y,usageStatistics:S,instance:L});if(!te)throw new Error("The return value of the executed plugin is empty.");var Se=te.markdownParsers,Oe=te.toHTMLRenderers,Ve=te.toMarkdownRenderers,We=te.markdownPlugins,qe=te.wysiwygPlugins,ot=te.wysiwygNodeViews,it=te.markdownCommands,Pt=te.wysiwygCommands,cr=te.toolbarItems;return Oe&&(U.toHTMLRenderers=wf(U.toHTMLRenderers,Oe)),Ve&&(U.toMarkdownRenderers=wf(U.toMarkdownRenderers,Ve)),We&&(U.mdPlugins=U.mdPlugins.concat(We)),qe&&(U.wwPlugins=U.wwPlugins.concat(qe)),ot&&(U.wwNodeViews=b(b({},U.wwNodeViews),ot)),it&&(U.mdCommands=b(b({},U.mdCommands),it)),Pt&&(U.wwCommands=b(b({},U.wwCommands),Pt)),cr&&(U.toolbarItems=U.toolbarItems.concat(cr)),Se&&(U.markdownParsers=b(b({},U.markdownParsers),Se)),U},{toHTMLRenderers:{},toMarkdownRenderers:{},mdPlugins:[],wwPlugins:[],wwNodeViews:{},mdCommands:{},wwCommands:{},toolbarItems:[],markdownParsers:{}})}var HZ=f(404),_Z=f.n(HZ),Cv=["afterPreviewRender","updatePreview","changeMode","needChangeMode","command","changePreviewStyle","changePreviewTabPreview","changePreviewTabWrite","scroll","contextmenu","show","hide","changeLanguage","changeToolbarState","toggleScrollSync","mixinTableOffsetMapPrototype","setFocusedNode","removePopupWidget","query","openPopup","closePopup","addImageBlobHook","beforePreviewRender","beforeConvertWysiwygToMarkdown","load","loadUI","change","caretChange","destroy","focus","blur","keydown","keyup"],zZ=(function(){function h(){var d=this;this.events=new bv,this.eventTypes=Cv.reduce(function(y,S){return b(b({},y),{type:S})},{}),this.hold=!1,Cv.forEach(function(y){d.addEventType(y)})}return h.prototype.listen=function(d,y){var S=this.getTypeInfo(d),L=this.events.get(S.type)||[];if(!this.hasEventType(S.type))throw new Error("There is no event type "+S.type);S.namespace&&(y.namespace=S.namespace),L.push(y),this.events.set(S.type,L)},h.prototype.emit=function(d){for(var y=[],S=1;S<arguments.length;S++)y[S-1]=arguments[S];var L=this.getTypeInfo(d),U=this.events.get(L.type),G=[];return!this.hold&&U&&U.forEach(function(te){var Se=te.apply(void 0,y);Ll()(Se)||G.push(Se)}),G},h.prototype.emitReduce=function(d,y){for(var S=[],L=2;L<arguments.length;L++)S[L-2]=arguments[L];var U=this.events.get(d);return!this.hold&&U&&U.forEach(function(G){var te=G.apply(void 0,T([y],S));_Z()(te)||(y=te)}),y},h.prototype.getTypeInfo=function(d){var y=d.split(".");return{type:y[0],namespace:y[1]}},h.prototype.hasEventType=function(d){return!Ll()(this.eventTypes[this.getTypeInfo(d).type])},h.prototype.addEventType=function(d){if(this.hasEventType(d))throw new Error("There is already have event type "+d);this.eventTypes[d]=d},h.prototype.removeEventHandler=function(d,y){var S=this,L=this.getTypeInfo(d),U=L.type,G=L.namespace;U&&y?this.removeEventHandlerWithHandler(U,y):U&&!G?this.events.delete(U):!U&&G?this.events.forEach(function(te,Se){S.removeEventHandlerWithTypeInfo(Se,G)}):U&&G&&this.removeEventHandlerWithTypeInfo(U,G)},h.prototype.removeEventHandlerWithHandler=function(d,y){var S=this.events.get(d);if(S){var L=S.indexOf(y);S.indexOf(y)>=0&&S.splice(L,1)}},h.prototype.removeEventHandlerWithTypeInfo=function(d,y){var S=[],L=this.events.get(d);L&&(L.map(function(U){return U.namespace!==y&&S.push(U),null}),this.events.set(d,S))},h.prototype.getEvents=function(){return this.events},h.prototype.holdEventInvoke=function(d){this.hold=!0,d(),this.hold=!1},h})(),VZ=zZ,UZ="data-task",$Z="data-task-disabled",WZ="checked";function jZ(h){["htmlBlock","htmlInline"].forEach(function(d){h[d]&&Object.keys(h[d]).forEach(function(y){return pZ(y)})})}var GZ=(function(){function h(d){var y=this;this.options=tv()({linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,usageStatistics:!0,theme:"light"},d),this.eventEmitter=new VZ;var S=XX(this.options.linkAttributes),L=qZ({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this})||{},U=L.toHTMLRenderers,G=L.markdownParsers,te=this.options,Se=te.customHTMLRenderer,Oe=te.extendedAutolinks,Ve=te.referenceDefinition,We=te.frontMatter,qe=te.customHTMLSanitizer,ot={linkAttributes:S,customHTMLRenderer:b(b({},U),Se),extendedAutolinks:Oe,referenceDefinition:Ve,frontMatter:We,sanitizer:qe||vZ};jZ(ot.customHTMLRenderer),this.options.events&&xX()(this.options.events,function(Bn,Cn){y.on(Cn,Bn)});var it=this.options,Pt=it.el,cr=it.initialValue,xr=it.theme,xi=Pt.innerHTML;xr!=="light"&&Pt.classList.add(Rl(xr)),Pt.innerHTML="",this.toastMark=new bX("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:Oe,referenceDefinition:Ve,disallowDeepHeading:!0,frontMatter:We,customParser:G}),this.preview=new MZ(this.eventEmitter,b(b({},ot),{isViewer:!0})),rv()(this.preview.previewContent,"mousedown",this.toggleTask.bind(this)),cr?this.setMarkdown(cr):xi&&this.preview.setHTML(xi),Pt.appendChild(this.preview.previewContent),this.eventEmitter.emit("load",this)}return h.prototype.toggleTask=function(d){var y=d.target,S=getComputedStyle(y,":before");!y.hasAttribute($Z)&&y.hasAttribute(UZ)&&QX(S,d.offsetX,d.offsetY)&&(dv(y,WZ),this.eventEmitter.emit("change",{source:"viewer",date:d}))},h.prototype.setMarkdown=function(d){var y=this.toastMark.getLineTexts(),S=y.length,L=ZX(y),U=[S,L.length+1],G=this.toastMark.editMarkdown([1,1],U,d||"");this.eventEmitter.emit("updatePreview",G)},h.prototype.on=function(d,y){this.eventEmitter.listen(d,y)},h.prototype.off=function(d){this.eventEmitter.removeEventHandler(d)},h.prototype.addHook=function(d,y){this.eventEmitter.removeEventHandler(d),this.eventEmitter.listen(d,y)},h.prototype.destroy=function(){nv()(this.preview.el,"mousedown",this.toggleTask.bind(this)),this.preview.destroy(),this.eventEmitter.emit("destroy")},h.prototype.isViewer=function(){return!0},h.prototype.isMarkdownMode=function(){return!1},h.prototype.isWysiwygMode=function(){return!1},h})(),KZ=GZ,JZ=KZ})(),p=p.default,p})()})})(hd)),hd.exports}var X8e=Y8e();const Z8e=tQ(X8e);var ih=function(r,e){return ih=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},ih(r,e)};function C0(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ih(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Ko=function(){return Ko=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Ko.apply(this,arguments)},Q8e=(function(r){C0(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.rootEl=Do.createRef(),t}return e.prototype.getRootElement=function(){return this.rootEl.current},e.prototype.getInstance=function(){return this.editorInst},e.prototype.getBindingEventNames=function(){var t=this;return Object.keys(this.props).filter(function(n){return/^on[A-Z][a-zA-Z]+/.test(n)}).filter(function(n){return t.props[n]})},e.prototype.bindEventHandlers=function(t){var n=this;this.getBindingEventNames().forEach(function(i){var a=i[2].toLowerCase()+i.slice(3);n.editorInst.off(a),n.editorInst.on(a,t[i])})},e.prototype.getInitEvents=function(){var t=this;return this.getBindingEventNames().reduce(function(n,i){var a=i[2].toLowerCase()+i.slice(3);return n[a]=t.props[i],n},{})},e.prototype.componentDidMount=function(){this.editorInst=new rr(Ko(Ko({el:this.rootEl.current},this.props),{events:this.getInitEvents()}))},e.prototype.shouldComponentUpdate=function(t){var n=this.getInstance(),i=t.height,a=t.previewStyle;return i&&this.props.height!==i&&n.setHeight(i),a&&this.props.previewStyle!==a&&n.changePreviewStyle(a),this.bindEventHandlers(t),!1},e.prototype.render=function(){return Do.createElement("div",{ref:this.rootEl})},e})(Do.Component);(function(r){C0(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.rootEl=Do.createRef(),t}return e.prototype.getRootElement=function(){return this.rootEl.current},e.prototype.getInstance=function(){return this.viewerInst},e.prototype.getBindingEventNames=function(){var t=this;return Object.keys(this.props).filter(function(n){return/^on[A-Z][a-zA-Z]+/.test(n)}).filter(function(n){return t.props[n]})},e.prototype.bindEventHandlers=function(t){var n=this;this.getBindingEventNames().forEach(function(i){var a=i[2].toLowerCase()+i.slice(3);n.viewerInst.off(a),n.viewerInst.on(a,t[i])})},e.prototype.getInitEvents=function(){var t=this;return this.getBindingEventNames().reduce(function(n,i){var a=i[2].toLowerCase()+i.slice(3);return n[a]=t.props[i],n},{})},e.prototype.componentDidMount=function(){this.viewerInst=new Z8e(Ko(Ko({el:this.rootEl.current},this.props),{events:this.getInitEvents()}))},e.prototype.shouldComponentUpdate=function(t){return this.bindEventHandlers(t),!1},e.prototype.render=function(){return Do.createElement("div",{ref:this.rootEl})},e})(Do.Component);rr.setLanguage("ar",{Markdown:"لغة ترميز",WYSIWYG:"ما تراه هو ما تحصل عليه",Write:"يكتب",Preview:"عرض مسبق",Headings:"العناوين",Paragraph:"فقرة",Bold:"خط عريض",Italic:"خط مائل",Strike:"إضراب",Code:"رمز",Line:"خط",Blockquote:"فقرة مقتبسة","Unordered list":"قائمة غير مرتبة","Ordered list":"قائمة مرتبة",Task:"مهمة",Indent:"المسافة البادئة",Outdent:"المسافة الخارجة","Insert link":"أدخل الرابط","Insert CodeBlock":"أدخل الكود","Insert table":"أدخل جدول","Insert image":"أدخل صورة",Heading:"عنوان","Image URL":"رابط الصورة","Select image file":"حدد ملف الصورة","Choose a file":"اختيار الملف","No file":"لا ملف",Description:"وصف",OK:"موافقة",More:"أكثر",Cancel:"إلغاء",File:"ملف",URL:"رابط","Link text":"نص الرابط","Add row to up":"أضف صفًا لأعلى","Add row to down":"أضف صفًا إلى أسفل","Add column to left":"أضف العمود على اليسار","Add column to right":"أضف عمودًا إلى اليمين","Remove row":"حذف سطر","Remove column":"حذف عمود","Align column to left":"محاذاة اليسار","Align column to center":"محاذاة الوسط","Align column to right":"محاذاة اليمين","Remove table":"حذف الجدول","Would you like to paste as table?":"هل تريد اللصق كجدول","Text color":"لون النص","Auto scroll enabled":"التحريك التلقائي ممكّن","Auto scroll disabled":"التحريك التلقائي معطّل","Choose language":"اختر اللغة"});rr.setLanguage("zh-CN",{Markdown:"Markdown",WYSIWYG:"所见即所得",Write:"编辑",Preview:"预览",Headings:"标题",Paragraph:"文本",Bold:"加粗",Italic:"斜体字",Strike:"删除线",Code:"内嵌代码",Line:"水平线",Blockquote:"引用块","Unordered list":"无序列表","Ordered list":"有序列表",Task:"任务",Indent:"缩进",Outdent:"减少缩进","Insert link":"插入链接","Insert CodeBlock":"插入代码块","Insert table":"插入表格","Insert image":"插入图片",Heading:"标题","Image URL":"图片网址","Select image file":"选择图片文件","Choose a file":"选择一个文件","No file":"没有文件",Description:"说明",OK:"确认",More:"更多",Cancel:"取消",File:"文件",URL:"URL","Link text":"链接文本","Add row to up":"向上添加行","Add row to down":"在下方添加行","Add column to left":"在左侧添加列","Add column to right":"在右侧添加列","Remove row":"删除行","Remove column":"删除列","Align column to left":"左对齐","Align column to center":"居中对齐","Align column to right":"右对齐","Remove table":"删除表格","Would you like to paste as table?":"需要粘贴为表格吗?","Text color":"文字颜色","Auto scroll enabled":"自动滚动已启用","Auto scroll disabled":"自动滚动已禁用","Choose language":"选择语言"});rr.setLanguage("zh-TW",{Markdown:"Markdown",WYSIWYG:"所見即所得",Write:"編輯",Preview:"預覽",Headings:"標題",Paragraph:"內文",Bold:"粗體",Italic:"斜體",Strike:"刪除線",Code:"內嵌程式碼",Line:"分隔線",Blockquote:"引言","Unordered list":"項目符號清單","Ordered list":"編號清單",Task:"核取方塊清單",Indent:"增加縮排",Outdent:"減少縮排","Insert link":"插入超連結","Insert CodeBlock":"插入程式碼區塊","Insert table":"插入表格","Insert image":"插入圖片",Heading:"標題","Image URL":"圖片網址","Select image file":"選擇圖片檔案","Choose a file":"選擇一個文件","No file":"沒有文件",Description:"描述",OK:"確認",More:"更多",Cancel:"取消",File:"檔案",URL:"URL","Link text":"超連結文字","Add row to up":"向上添加行","Add row to down":"在下方添加行","Add column to left":"在左側添加列","Add column to right":"在右側添加列","Remove row":"刪除行","Remove column":"刪除列","Align column to left":"靠左對齊","Align column to center":"置中","Align column to right":"靠右對齊","Remove table":"刪除表格","Would you like to paste as table?":"您要以表格貼上嗎?","Text color":"文字顏色","Auto scroll enabled":"已啟用自動滾動","Auto scroll disabled":"已停用自動滾動","Choose language":"選擇語言"});rr.setLanguage(["hr","hr-HR"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Piši",Preview:"Pregled",Headings:"Naslovi",Paragraph:"Paragraf",Bold:"podebljano",Italic:"kurziv",Strike:"prcrtano",Code:"Uklopljeni kôd",Line:"Linija",Blockquote:"Blok citat","Unordered list":"Neporedana lista","Ordered list":"Poredana lista",Task:"Task",Indent:"Povećaj uvlaku",Outdent:"Smanji uvlaku","Insert link":"Umetni link","Insert CodeBlock":"Umetni blok kôda","Insert table":"Umetni tablicu","Insert image":"Umetni sliku",Heading:"Naslov","Image URL":"URL slike","Select image file":"Odaberi slikovnu datoteku","Choose a file":"Odaberite datoteka","No file":"Nema datoteka",Description:"Opis",OK:"OK",More:"Više",Cancel:"Odustani",File:"Datoteka",URL:"URL","Link text":"Tekst linka","Add row to up":"Dodaj redak prema gore","Add row to down":"Dodaj redak prema dolje","Add column to left":"Dodaj stupac s lijeve strane","Add column to right":"Dodajte stupac s desne strane","Remove row":"Ukloni redak","Remove column":"Remove stupac","Align column to left":"Poravnaj lijevo","Align column to center":"Poravnaj centrirano","Align column to right":"Poravnaj desno","Remove table":"Ukloni tablicu","Would you like to paste as table?":"Zalite li zalijepiti kao tablicu?","Text color":"Boja teksta","Auto scroll enabled":"Omogući auto klizanje","Auto scroll disabled":"Onemogući auto klizanje","Choose language":"Odabir jezika"});rr.setLanguage(["cs","cs-CZ"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Napsat",Preview:"Náhled",Headings:"Nadpisy",Paragraph:"Odstavec",Bold:"Tučné",Italic:"Kurzíva",Strike:"Přeškrtnuté",Code:"Kód",Line:"Vodorovná čára",Blockquote:"Citace","Unordered list":"Seznam s odrážkami","Ordered list":"Číslovaný seznam",Task:"Úkol",Indent:"Zvětšit odsazení",Outdent:"Zmenšit odsazení","Insert link":"Vložit odkaz","Insert CodeBlock":"Vložit blok kódu","Insert table":"Vložit tabulku","Insert image":"Vložit obrázek",Heading:"Nadpis","Image URL":"URL obrázku","Select image file":"Vybrat obrázek","Choose a file":"Vyberte soubor","No file":"Žádný soubor",Description:"Popis",OK:"OK",More:"Více",Cancel:"Zrušit",File:"Soubor",URL:"URL","Link text":"Text odkazu","Add row to up":"Přidejte řádek nahoru","Add row to down":"Přidejte řádek dolů","Add column to left":"Přidat sloupec vlevo","Add column to right":"Přidat sloupec doprava","Remove row":"Odebrat řádek","Remove column":"Odebrat sloupec","Align column to left":"Zarovnat vlevo","Align column to center":"Zarovnat na střed","Align column to right":"Zarovnat vpravo","Remove table":"Odstranit tabulku","Would you like to paste as table?":"Chcete vložit jako tabulku?","Text color":"Barva textu","Auto scroll enabled":"Automatické rolování zapnuto","Auto scroll disabled":"Automatické rolování vypnuto","Choose language":"Vybrat jazyk"});rr.setLanguage(["nl","nl-NL"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Opslaan",Preview:"Voorbeeld",Headings:"Koppen",Paragraph:"Alinea",Bold:"Vet",Italic:"Cursief",Strike:"Doorhalen",Code:"Inline code",Line:"Regel",Blockquote:"Citaatblok","Unordered list":"Opsomming","Ordered list":"Genummerde opsomming",Task:"Taak",Indent:"Niveau verhogen",Outdent:"Niveau verlagen","Insert link":"Link invoegen","Insert CodeBlock":"Codeblok toevoegen","Insert table":"Tabel invoegen","Insert image":"Afbeelding invoegen",Heading:"Kop","Image URL":"Afbeelding URL","Select image file":"Selecteer een afbeelding","Choose a file":"Kies een bestand","No file":"Geen bestand",Description:"Omschrijving",OK:"OK",More:"Meer",Cancel:"Annuleren",File:"Bestand",URL:"URL","Link text":"Link tekst","Add row to up":"Voeg rij toe aan omhoog","Add row to down":"Rij naar beneden toevoegen","Add column to left":"Voeg kolom aan de linkerkant toe","Add column to right":"Voeg een kolom aan de rechterkant toe","Remove row":"Rij verwijderen","Remove column":"Kolom verwijderen","Align column to left":"Links uitlijnen","Align column to center":"Centreren","Align column to right":"Rechts uitlijnen","Remove table":"Verwijder tabel","Would you like to paste as table?":"Wil je dit als tabel plakken?","Text color":"Tekstkleur","Auto scroll enabled":"Autoscroll ingeschakeld","Auto scroll disabled":"Autoscroll uitgeschakeld","Choose language":"Kies een taal"});rr.setLanguage(["en","en-US"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Write",Preview:"Preview",Headings:"Headings",Paragraph:"Paragraph",Bold:"Bold",Italic:"Italic",Strike:"Strike",Code:"Inline code",Line:"Line",Blockquote:"Blockquote","Unordered list":"Unordered list","Ordered list":"Ordered list",Task:"Task",Indent:"Indent",Outdent:"Outdent","Insert link":"Insert link","Insert CodeBlock":"Insert codeBlock","Insert table":"Insert table","Insert image":"Insert image",Heading:"Heading","Image URL":"Image URL","Select image file":"Select image file","Choose a file":"Choose a file","No file":"No file",Description:"Description",OK:"OK",More:"More",Cancel:"Cancel",File:"File",URL:"URL","Link text":"Link text","Add row to up":"Add row to up","Add row to down":"Add row to down","Add column to left":"Add column to left","Add column to right":"Add column to right","Remove row":"Remove row","Remove column":"Remove column","Align column to left":"Align column to left","Align column to center":"Align column to center","Align column to right":"Align column to right","Remove table":"Remove table","Would you like to paste as table?":"Would you like to paste as table?","Text color":"Text color","Auto scroll enabled":"Auto scroll enabled","Auto scroll disabled":"Auto scroll disabled","Choose language":"Choose language"});rr.setLanguage(["fi","fi-FI"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Kirjoita",Preview:"Esikatselu",Headings:"Otsikot",Paragraph:"Kappale",Bold:"Lihavointi",Italic:"Kursivointi",Strike:"Yliviivaus",Code:"Koodi",Line:"Vaakaviiva",Blockquote:"Lainaus","Unordered list":"Luettelo","Ordered list":"Numeroitu luettelo",Task:"Tehtävä",Indent:"Suurenna sisennystä",Outdent:"Pienennä sisennystä","Insert link":"Lisää linkki","Insert CodeBlock":"Lisää koodia","Insert table":"Lisää taulukko","Insert image":"Lisää kuva",Heading:"Otsikko","Image URL":"Kuvan URL","Select image file":"Valitse kuvatiedosto","Choose a file":"Valitse tiedosto","No file":"Ei tiedosto",Description:"Kuvaus",OK:"OK",More:"Lisää",Cancel:"Peruuta",File:"Tiedosto",URL:"URL","Link text":"Linkkiteksti","Add row to up":"Lisää rivi ylöspäin","Add row to down":"Lisää rivi alaspäin","Add column to left":"Lisää sarake vasemmalla","Add column to right":"Lisää sarake oikealle","Remove row":"Poista rivi","Remove column":"Poista sarake","Align column to left":"Tasaus vasemmalle","Align column to center":"Keskitä","Align column to right":"Tasaus oikealle","Remove table":"Poista taulukko","Would you like to paste as table?":"Haluatko liittää taulukkomuodossa?","Text color":"Tekstin väri","Auto scroll enabled":"Automaattinen skrollaus käytössä","Auto scroll disabled":"Automaattinen skrollaus pois käytöstä","Choose language":"Valitse kieli"});rr.setLanguage(["fr","fr-FR"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Écrire",Preview:"Aperçu",Headings:"En-têtes",Paragraph:"Paragraphe",Bold:"Gras",Italic:"Italique",Strike:"Barré",Code:"Code en ligne",Line:"Ligne",Blockquote:"Citation","Unordered list":"Liste non-ordonnée","Ordered list":"Liste ordonnée",Task:"Tâche",Indent:"Retrait",Outdent:"Sortir","Insert link":"Insérer un lien","Insert CodeBlock":"Insérer un bloc de code","Insert table":"Insérer un tableau","Insert image":"Insérer une image",Heading:"En-tête","Image URL":"URL de l'image","Select image file":"Sélectionnez un fichier image","Choose a file":"Choisissez un fichier","No file":"Pas de fichier",Description:"Description",OK:"OK",More:"de plus",Cancel:"Annuler",File:"Fichier",URL:"URL","Link text":"Texte du lien","Add row to up":"Ajouter une ligne vers le haut","Add row to down":"Ajouter une ligne vers le bas","Add column to left":"Ajouter une colonne à gauche","Add column to right":"Ajouter une colonne à droite","Remove row":"Supprimer une ligne","Remove column":"Supprimer une colonne","Align column to left":"Aligner à gauche","Align column to center":"Aligner au centre","Align column to right":"Aligner à droite","Remove table":"Supprimer le tableau","Would you like to paste as table?":"Voulez-vous coller ce contenu en tant que tableau ?","Text color":"Couleur du texte","Auto scroll enabled":"Défilement automatique activé","Auto scroll disabled":"Défilement automatique désactivé","Choose language":"Choix de la langue"});rr.setLanguage(["gl","gl-ES"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Escribir",Preview:"Vista previa",Headings:"Encabezados",Paragraph:"Parágrafo",Bold:"Negriña",Italic:"Cursiva",Strike:"Riscado",Code:"Código",Line:"Liña",Blockquote:"Cita","Unordered list":"Lista desordenada","Ordered list":"Lista ordenada",Task:"Tarefa",Indent:"Sangría",Outdent:"Anular sangría","Insert link":"Inserir enlace","Insert CodeBlock":"Inserir bloque de código","Insert table":"Inserir táboa","Insert image":"Inserir imaxe",Heading:"Encabezado","Image URL":"URL da imaxe","Select image file":"Seleccionar arquivo da imaxe","Choose a file":"Escoge un archivo","No file":"Ningún archivo",Description:"Descrición",OK:"Aceptar",More:"Máis",Cancel:"Cancelar",File:"Arquivo",URL:"URL","Link text":"Texto do enlace","Add row to up":"Engade fila para arriba","Add row to down":"Engade fila para abaixo","Add column to left":"Engade columna á esquerda","Add column to right":"Engade columna á dereita","Remove row":"Eliminar fila","Remove column":"Eliminar columna","Align column to left":"Aliñar á esquerda","Align column to center":"Centrar","Align column to right":"Aliñar á dereita","Remove table":"Eliminar táboa","Would you like to paste as table?":"Desexa pegar como táboa?","Text color":"Cor do texto","Auto scroll enabled":"Desprazamento automático habilitado","Auto scroll disabled":"Desprazamento automático deshabilitado","Choose language":"Elixir idioma"});rr.setLanguage(["de","de-DE"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Verfassen",Preview:"Vorschau",Headings:"Überschriften",Paragraph:"Text",Bold:"Fett",Italic:"Kursiv",Strike:"Durchgestrichen",Code:"Code",Line:"Trennlinie",Blockquote:"Blocktext","Unordered list":"Aufzählung","Ordered list":"Nummerierte Aufzählung",Task:"Aufgabe",Indent:"Einrücken",Outdent:"Ausrücken","Insert link":"Link einfügen","Insert CodeBlock":"Codeblock einfügen","Insert table":"Tabelle einfügen","Insert image":"Grafik einfügen",Heading:"Titel","Image URL":"Bild URL","Select image file":"Grafik auswählen","Choose a file":"Wähle eine Datei","No file":"Keine Datei",Description:"Beschreibung",OK:"OK",More:"Mehr",Cancel:"Abbrechen",File:"Datei",URL:"URL","Link text":"Anzuzeigender Text","Add row to up":"Zeile nach oben hinzufügen","Add row to down":"Zeile nach unten hinzufügen","Add column to left":"Spalte links hinzufügen","Add column to right":"Spalte rechts hinzufügen","Remove row":"Zeile entfernen","Remove column":"Spalte entfernen","Align column to left":"Links ausrichten","Align column to center":"Zentrieren","Align column to right":"Rechts ausrichten","Remove table":"Tabelle entfernen","Would you like to paste as table?":"Möchten Sie eine Tabelle einfügen?","Text color":"Textfarbe","Auto scroll enabled":"Autoscrollen aktiviert","Auto scroll disabled":"Autoscrollen deaktiviert","Choose language":"Sprache auswählen"});rr.setLanguage(["it","it-IT"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Scrivere",Preview:"Anteprima",Headings:"Intestazioni",Paragraph:"Paragrafo",Bold:"Grassetto",Italic:"Corsivo",Strike:"Barrato",Code:"Codice",Line:"Linea",Blockquote:"Blocco citazione","Unordered list":"Lista puntata","Ordered list":"Lista numerata",Task:"Attività",Indent:"Aggiungi indentazione",Outdent:"Rimuovi indentazione","Insert link":"Inserisci link","Insert CodeBlock":"Inserisci blocco di codice","Insert table":"Inserisci tabella","Insert image":"Inserisci immagine",Heading:"Intestazione","Image URL":"URL immagine","Select image file":"Seleziona file immagine","Choose a file":"Scegli un file","No file":"Nessun file",Description:"Descrizione",OK:"OK",More:"Più",Cancel:"Cancella",File:"File",URL:"URL","Link text":"Testo del collegamento","Add row to up":"Aggiungi riga in alto","Add row to down":"Aggiungi riga in basso","Add column to left":"Aggiungi colonna a sinistra","Add column to right":"Aggiungi colonna a destra","Remove row":"Rimuovi riga","Remove column":"Rimuovi colonna","Align column to left":"Allinea a sinistra","Align column to center":"Allinea al centro","Align column to right":"Allinea a destra","Remove table":"Rimuovi tabella","Would you like to paste as table?":"Desideri incollare sotto forma di tabella?","Text color":"Colore del testo","Auto scroll enabled":"Scrolling automatico abilitato","Auto scroll disabled":"Scrolling automatico disabilitato","Choose language":"Scegli la lingua"});rr.setLanguage(["ja","ja-JP"],{Markdown:"マークダウン",WYSIWYG:"WYSIWYG",Write:"編集する",Preview:"プレビュー",Headings:"見出し",Paragraph:"本文",Bold:"太字",Italic:"イタリック",Strike:"ストライク",Code:"インラインコード",Line:"ライン",Blockquote:"引用","Unordered list":"番号なしリスト","Ordered list":"順序付きリスト",Task:"タスク",Indent:"インデント",Outdent:"アウトデント","Insert link":"リンク挿入","Insert CodeBlock":"コードブロック挿入","Insert table":"テーブル挿入","Insert image":"画像挿入",Heading:"見出し","Image URL":"イメージURL","Select image file":"画像ファイル選択","Choose a file":"ファイルの選択","No file":"ファイルがない",Description:"ディスクリプション ",OK:"はい",More:"もっと",Cancel:"キャンセル",File:"ファイル",URL:"URL","Link text":"リンクテキスト","Add row to up":"行を上に追加","Add row to down":"下に行を追加","Add column to left":"左側に列を追加","Add column to right":"右側に列を追加","Remove row":"行削除","Remove column":"列削除","Align column to left":"左揃え","Align column to center":"中央揃え","Align column to right":"右揃え","Remove table":"テーブル削除","Would you like to paste as table?":"テーブルを貼り付けますか?","Text color":"文字色相","Auto scroll enabled":"自動スクロールが有効","Auto scroll disabled":"自動スクロールを無効に","Choose language":"言語選択"});rr.setLanguage(["ko","ko-KR"],{Markdown:"마크다운",WYSIWYG:"위지윅",Write:"편집하기",Preview:"미리보기",Headings:"제목크기",Paragraph:"본문",Bold:"굵게",Italic:"기울임꼴",Strike:"취소선",Code:"인라인 코드",Line:"문단나눔",Blockquote:"인용구","Unordered list":"글머리 기호","Ordered list":"번호 매기기",Task:"체크박스",Indent:"들여쓰기",Outdent:"내어쓰기","Insert link":"링크 삽입","Insert CodeBlock":"코드블럭 삽입","Insert table":"표 삽입","Insert image":"이미지 삽입",Heading:"제목","Image URL":"이미지 주소","Select image file":"이미지 파일을 선택하세요.","Choose a file":"파일 선택","No file":"선택된 파일 없음",Description:"설명",OK:"확인",More:"더 보기",Cancel:"취소",File:"파일",URL:"주소","Link text":"링크 텍스트","Add row to up":"위에 행 추가","Add row to down":"아래에 행 추가","Add column to left":"왼쪽에 열 추가","Add column to right":"오른쪽에 열 추가","Remove row":"행 삭제","Remove column":"열 삭제","Align column to left":"열 왼쪽 정렬","Align column to center":"열 가운데 정렬","Align column to right":"열 오른쪽 정렬","Remove table":"표 삭제","Would you like to paste as table?":"표형태로 붙여 넣겠습니까?","Text color":"글자 색상","Auto scroll enabled":"자동 스크롤 켜짐","Auto scroll disabled":"자동 스크롤 꺼짐","Choose language":"언어 선택"});rr.setLanguage(["nb","nb-NO"],{Markdown:"Funksjonaliteter",WYSIWYG:"WYSIWYG",Write:"Skriv",Preview:"Forhåndsvisning",Headings:"Overskrift",Paragraph:"Paragraf",Bold:"Fet skrift",Italic:"Italic",Strike:"Strike",Code:"Kode",Line:"Linje",Blockquote:"Blokksitat","Unordered list":"Usortert liste","Ordered list":"Sortert liste",Task:"Task",Indent:"Indent",Outdent:"Outdent","Insert link":"Sett inn lenke","Insert CodeBlock":"Sett inn CodeStreng","Insert table":"Sett inn diagram","Insert image":"Sett inn bilde",Heading:"Overskrift","Image URL":"BildeURL","Select image file":"Velg bildefil","Choose a file":"Velg en fil","No file":"Ingen fil",Description:"Beskrivelse",OK:"OK",More:"Mer",Cancel:"Angre",File:"Fil",URL:"URL","Link text":"Lenketekst","Add row to up":"Legg rad til opp","Add row to down":"Legg rad til ned","Add column to left":"Legg til kolonne til venstre","Add column to right":"Legg til kolonne til høyre","Remove row":"Fjern rad","Remove column":"Fjern kolonne","Align column to left":"Venstreorienter","Align column to center":"Senterorienter","Align column to right":"Høyreorienter","Remove table":"Fjern diagram","Would you like to paste as table?":"Ønsker du å lime inn som et diagram?","Text color":"Tekstfarge","Auto scroll enabled":"Auto-scroll aktivert","Auto scroll disabled":"Auto-scroll deaktivert","Choose language":"Velg språl"});rr.setLanguage(["pl","pl-PL"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Napisz",Preview:"Podgląd",Headings:"Nagłówki",Paragraph:"Akapit",Bold:"Pogrubienie",Italic:"Kursywa",Strike:"Przekreślenie",Code:"Fragment kodu",Line:"Linia",Blockquote:"Cytat","Unordered list":"Lista nieuporządkowana","Ordered list":"Lista uporządkowana",Task:"Zadanie",Indent:"Utwórz wcięcie",Outdent:"Usuń wcięcie","Insert link":"Umieść odnośnik","Insert CodeBlock":"Umieść blok kodu","Insert table":"Umieść tabelę","Insert image":"Umieść obraz",Heading:"Nagłówek","Image URL":"Adres URL obrazu","Select image file":"Wybierz plik obrazu","Choose a file":"Wybierz plik","No file":"Brak plik",Description:"Opis",OK:"OK",More:"Więcej",Cancel:"Anuluj",File:"Plik",URL:"URL","Link text":"Tekst odnośnika","Add row to up":"Dodaj wiersz do góry","Add row to down":"Dodaj wiersz w dół","Add column to left":"Dodaj kolumnę po lewej stronie","Add column to right":"Dodaj kolumnę po prawej stronie","Remove row":"Usuń rząd","Remove column":"Usuń kolumnę","Align column to left":"Wyrównaj do lewej","Align column to center":"Wyśrodkuj","Align column to right":"Wyrównaj do prawej","Remove table":"Usuń tabelę","Would you like to paste as table?":"Czy chcesz wkleić tekst jako tabelę?","Text color":"Kolor tekstu","Auto scroll enabled":"Włączono automatyczne przewijanie","Auto scroll disabled":"Wyłączono automatyczne przewijanie","Choose language":"Wybierz język"});rr.setLanguage(["pt","pt-BR"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Escrever",Preview:"Pré-visualizar",Headings:"Cabeçalhos",Paragraph:"Parágrafo",Bold:"Negrito",Italic:"Itálico",Strike:"Traçado",Code:"Código",Line:"Linha",Blockquote:"Bloco de citação","Unordered list":"Lista não ordenada","Ordered list":"Lista ordenada",Task:"Tarefa",Indent:"Recuo à esquerda",Outdent:"Recuo à direita","Insert link":"Inserir link","Insert CodeBlock":"Inserir bloco de código","Insert table":"Inserir tabela","Insert image":"Inserir imagem",Heading:"Título","Image URL":"URL da imagem","Select image file":"Selecione um arquivo de imagem","Choose a file":"Escolha um arquivo","No file":"Nenhum arquivo",Description:"Descrição",OK:"OK",More:"Mais",Cancel:"Cancelar",File:"Arquivo",URL:"URL","Link text":"Link de texto","Add row to up":"Adicionar linha para cima","Add row to down":"Adicionar linha para baixo","Add column to left":"Adicionar coluna à esquerda","Add column to right":"Adicionar coluna à direita","Remove row":"Remover linha","Remove column":"Remover coluna","Align column to left":"Alinhar à esquerda","Align column to center":"Alinhar ao centro","Align column to right":"Alinhar à direita","Remove table":"Remover tabela","Would you like to paste as table?":"Você gostaria de colar como mesa?","Text color":"Cor do texto","Auto scroll enabled":"Rolagem automática habilitada","Auto scroll disabled":"Rolagem automática desabilitada","Choose language":"Escolher linguagem"});rr.setLanguage(["ru","ru-RU"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Редактор",Preview:"Просмотр",Headings:"Заголовки",Paragraph:"Абзац",Bold:"Жирный",Italic:"Курсив",Strike:"Зачеркнутый",Code:"Код",Line:"Линия",Blockquote:"Цитата","Unordered list":"Неупорядоченный список","Ordered list":"Упорядоченный список",Task:"Галочка",Indent:"Увеличить отступ",Outdent:"Уменьшить отступ","Insert link":"Вставить ссылку","Insert CodeBlock":"Вставить блок кода","Insert table":"Вставить таблицу","Insert image":"Вставить изображение",Heading:"Заголовок","Image URL":"URL изображения","Select image file":"Выбрать файл изображения","Choose a file":"Выбрать","No file":"Нет файла",Description:"Описание",OK:"Хорошо",More:"Еще",Cancel:"Отмена",File:"Файл",URL:"URL","Link text":"Текст ссылки","Add row to up":"Добавить строку вверх","Add row to down":"Добавить строку вниз","Add column to left":"Добавить столбец слева","Add column to right":"Добавить столбец справа","Remove row":"Удалить ряд","Remove column":"Удалить столбец","Align column to left":"Выровнять по левому краю","Align column to center":"Выровнять по центру","Align column to right":"Выровнять по правому краю","Remove table":"Удалить таблицу","Would you like to paste as table?":"Вы хотите вставить в виде таблицы?","Text color":"Цвет текста","Auto scroll enabled":"Автопрокрутка включена","Auto scroll disabled":"Автопрокрутка отключена","Choose language":"Выбрать язык"});rr.setLanguage(["es","es-ES"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Escribir",Preview:"Vista previa",Headings:"Encabezados",Paragraph:"Párrafo",Bold:"Negrita",Italic:"Itálica",Strike:"Tachado",Code:"Código",Line:"Línea",Blockquote:"Cita","Unordered list":"Lista desordenada","Ordered list":"Lista ordenada",Task:"Tarea",Indent:"Sangría",Outdent:"Saliendo","Insert link":"Insertar enlace","Insert CodeBlock":"Insertar bloque de código","Insert table":"Insertar tabla","Insert image":"Insertar imagen",Heading:"Encabezado","Image URL":"URL de la imagen","Select image file":"Seleccionar archivo de imagen","Choose a file":"Escoge un archivo","No file":"Ningún archivo",Description:"Descripción",OK:"Aceptar",More:"Más",Cancel:"Cancelar",File:"Archivo",URL:"URL","Link text":"Texto del enlace","Add row to up":"Agregar fila para subir","Add row to down":"Agregar fila hacia abajo","Add column to left":"Agregar columna a la izquierda","Add column to right":"Agregar columna a la derecha","Remove row":"Eliminar fila","Remove column":"Eliminar columna","Align column to left":"Alinear a la izquierda","Align column to center":"Centrar","Align column to right":"Alinear a la derecha","Remove table":"Eliminar tabla","Would you like to paste as table?":"¿Desea pegar como tabla?","Text color":"Color del texto","Auto scroll enabled":"Desplazamiento automático habilitado","Auto scroll disabled":"Desplazamiento automático deshabilitado","Choose language":"Elegir idioma"});rr.setLanguage(["sv","sv-SE"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Skriv",Preview:"Förhandsgranska",Headings:"Överskrifter",Paragraph:"Paragraf",Bold:"Fet",Italic:"Kursiv",Strike:"Genomstruken",Code:"Kodrad",Line:"Linje",Blockquote:"Citatblock","Unordered list":"Punktlista","Ordered list":"Numrerad lista",Task:"Att göra",Indent:"Öka indrag",Outdent:"Minska indrag","Insert link":"Infoga länk","Insert CodeBlock":"Infoga kodblock","Insert table":"Infoga tabell","Insert image":"Infoga bild",Heading:"Överskrift","Image URL":"Bildadress","Select image file":"Välj en bildfil","Choose a file":"Välj en fil","No file":"Ingen fil",Description:"Beskrivning",OK:"OK",More:"Mer",Cancel:"Avbryt",File:"Fil",URL:"Adress","Link text":"Länktext","Add row to up":"Lägg till rad till upp","Add row to down":"Lägg till rad till ner","Add column to left":"Lägg till kolumn till vänster","Add column to right":"Lägg till kolumn till höger","Remove row":"Radera rad","Remove column":"Radera kolumn","Align column to left":"Vänsterjustera","Align column to center":"Centrera","Align column to right":"Högerjustera","Remove table":"Radera tabell","Would you like to paste as table?":"Vill du klistra in som en tabell?","Text color":"Textfärg","Auto scroll enabled":"Automatisk scroll aktiverad","Auto scroll disabled":"Automatisk scroll inaktiverad","Choose language":"Välj språk"});rr.setLanguage(["tr","tr-TR"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Düzenle",Preview:"Ön izleme",Headings:"Başlıklar",Paragraph:"Paragraf",Bold:"Kalın",Italic:"İtalik",Strike:"Altı çizgili",Code:"Satır içi kod",Line:"Çizgi",Blockquote:"Alıntı","Unordered list":"Sıralanmamış liste","Ordered list":"Sıralı liste",Task:"Görev kutusu",Indent:"Girintiyi arttır",Outdent:"Girintiyi azalt","Insert link":"Bağlantı ekle","Insert CodeBlock":"Kod bloku ekle","Insert table":"Tablo ekle","Insert image":"İmaj ekle",Heading:"Başlık","Image URL":"İmaj URL","Select image file":"İmaj dosyası seç","Choose a file":"Bir dosya seçin","No file":"Dosya yok",Description:"Açıklama",OK:"Onay",More:"Daha Fazla",Cancel:"İptal",File:"Dosya",URL:"URL","Link text":"Bağlantı yazısı","Add row to up":"Yukarı satır ekle","Add row to down":"Aşağı satır ekle","Add column to left":"Sola sütun ekleyin","Add column to right":"Sağa sütun ekle","Remove row":"Satır sil","Remove column":"Sütun sil","Align column to left":"Sola hizala","Align column to center":"Merkeze hizala","Align column to right":"Sağa hizala","Remove table":"Tabloyu kaldır","Would you like to paste as table?":"Tablo olarak yapıştırmak ister misiniz?","Text color":"Metin rengi","Auto scroll enabled":"Otomatik kaydırma açık","Auto scroll disabled":"Otomatik kaydırma kapalı","Choose language":"Dil seçiniz"});rr.setLanguage(["uk","uk-UA"],{Markdown:"Markdown",WYSIWYG:"WYSIWYG",Write:"Написати",Preview:"Попередній перегляд",Headings:"Заголовки",Paragraph:"Абзац",Bold:"Жирний",Italic:"Курсив",Strike:"Закреслений",Code:"Вбудований код",Line:"Лінія",Blockquote:"Блок цитування","Unordered list":"Невпорядкований список","Ordered list":"Упорядкований список",Task:"Завдання",Indent:"відступ",Outdent:"застарілий","Insert link":"Вставити посилання","Insert CodeBlock":"Вставити код","Insert table":"Вставити таблицю","Insert image":"Вставити зображення",Heading:"Заголовок","Image URL":"URL зображення","Select image file":"Вибрати файл зображення","Choose a file":"Виберіть файл","No file":"Немає файлу",Description:"Опис",OK:"OK",More:"ще",Cancel:"Скасувати",File:"Файл",URL:"URL","Link text":"Текст посилання","Add row to up":"Додати рядок вгору","Add row to down":"Додати рядок вниз","Add column to left":"Додайте стовпець зліва","Add column to right":"Додайте стовпець праворуч","Remove row":"Видалити ряд","Remove column":"Видалити стовпчик","Align column to left":"Вирівняти по лівому краю","Align column to center":"Вирівняти по центру","Align column to right":"Вирівняти по правому краю","Remove table":"Видалити таблицю","Would you like to paste as table?":"Ви хочете вставити у вигляді таблиці?","Text color":"Колір тексту","Auto scroll enabled":"Автоматична прокрутка включена","Auto scroll disabled":"Автоматична прокрутка відключена","Choose language":"Вибрати мову"});const e5e=["ar","zh","hr","cs","nl","en","fi","fr","gl","de","it","ja","ko","nb","pl","pt","ru","es","sv","tr","uk"],Gy=document.documentElement.lang,Ky=e5e.includes(Gy)?Gy:"en",a5e=({initialValue:r,onChange:e,options:t,disabled:n})=>{const i=bo.useRef(null),{width:a}=XZ(),{appearance:o}=ZZ(),s=o==="dark"?"dark":"light",[l,f]=bo.useState({height:"600px",initialEditType:"markdown",useCommandShortcut:!0,language:Ky});bo.useEffect(()=>{if(i.current&&r){const b=i.current.getInstance();b.getMarkdown().trim()||b.setMarkdown(r)}},[]),bo.useEffect(()=>{if(i.current&&r!==void 0){const b=i.current.getInstance();b.getMarkdown()!==r&&(console.log("Syncing editor with new value:",r),b.setMarkdown(r))}},[r]),bo.useEffect(()=>{const b=a<1200;f(T=>({...T,...t,previewStyle:b?"tab":t?.previewStyle||"vertical",height:t?.height||"600px",initialEditType:t?.initialEditType||"markdown",useCommandShortcut:t?.useCommandShortcut!==void 0?t.useCommandShortcut:!0})),i.current&&i.current.getInstance().changePreviewStyle(b?"tab":t?.previewStyle||"vertical")},[a,t,s]);const p=bo.useCallback(()=>{const T=i.current?.getInstance()?.getMarkdown();e&&T&&e(T)},[e]);return Tv.jsx("div",{className:`${n?"pointer-events-none opacity-50":""}`,children:Tv.jsx(Q8e,{ref:i,onChange:p,autofocus:!1,theme:s,...l},`editor-${s}-${Ky}`)})};export{a5e as default};
|