adminizer 4.2.0 → 4.3.0-build.100
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/assets/add-1E1UsMVZ.js +1 -0
- package/assets/add-form-CGa9QbwE.js +1 -0
- package/assets/add-group-7yAK6uFY.js +1 -0
- package/assets/add-group-form-BNmpvW8K.js +1 -0
- package/assets/add-user-NoYkTfZi.js +1 -0
- package/assets/add-user-form-DrclnTOd.js +1 -0
- package/assets/{app-CVnUv8s_.css → app-D8oqdt8J.css} +1 -1
- package/assets/app-layout-i2zN9Rn-.js +1 -0
- package/assets/app-shell-CHEYhVco.js +1 -0
- package/assets/app-sidebar-DeF8WNmW.js +1 -0
- package/assets/app-sidebar-header-DdM1EOrb.js +1 -0
- package/assets/app.js +1699 -1657
- package/assets/breadcrumbs-C439DWrC.js +1 -0
- package/assets/catalog-B9hdop59.js +6 -0
- package/assets/dashboard-Bi5KeZu2.js +3 -0
- package/assets/date-picker-DbJ8nHp5.js +1 -0
- package/assets/del-modal-_b3CSNHb.js +1 -0
- package/assets/dynamic-controls-BOYmRX_z.js +1 -0
- package/assets/field-renderer-4obZ_jUo.js +407 -0
- package/assets/{field-renderer-CsBa_tMB.css → field-renderer-CRNLShJD.css} +1 -1
- package/assets/form-Bte5kzjB.js +1 -0
- package/assets/form-oUlsuu7h.js +1 -0
- package/assets/geo-json-CadjdhwW.js +4 -0
- package/assets/handsontable-PVakPtJV.js +281 -0
- package/assets/home-CsUXA-O6.js +2 -0
- package/assets/icon-DM49pZW3.js +1 -0
- package/assets/init-user-DNrB8Xt5.js +1 -0
- package/assets/input-error--IOnWghB.js +1 -0
- package/assets/jsoneditor-D95dIAP2.js +3878 -0
- package/assets/list-CdfSnSN1.js +1 -0
- package/assets/list-table-Byzv346I.js +22 -0
- package/assets/login-6Xb8bcPq.js +1 -0
- package/assets/manifest.json +331 -221
- package/assets/material-icon-BedgD2NE.js +1 -0
- package/assets/media-manager-UQT6RhI8.js +14 -0
- package/assets/module-B4-7WkY5.js +1 -0
- package/assets/monaco-ICtx6xoc.js +11 -0
- package/assets/nav-footer-BwkQkwow.js +1 -0
- package/assets/nav-main-9Eb_A0rf.js +1 -0
- package/assets/nav-user-CRAfyE-x.js +1 -0
- package/assets/notification-ma2x7vka.js +27 -0
- package/assets/pagination-render-xsEktzA8.js +1 -0
- package/assets/register-BIyjCy8M.js +1 -0
- package/assets/tabs-BK_5wdPA.js +1 -0
- package/assets/theme-switcher-CKiJbMkh.js +1 -0
- package/assets/toast-editor-BZM5RHph.js +845 -0
- package/assets/user-info-CcYdmjMZ.js +1 -0
- package/assets/user-menu-content-DbUk8ZeY.js +1 -0
- package/assets/vanilla-picker-l5rcX3cq.js +8 -0
- package/assets/vendor-wzZzN_Jv.js +17 -0
- package/assets/welcome-cWh1qnl_.js +1 -0
- package/controllers/add.js +1 -1
- package/controllers/catalog/FrontentCatalogAdapter.d.ts +4 -4
- package/controllers/ckeditorUpload.d.ts +1 -1
- package/controllers/ckeditorUpload.js +50 -26
- package/controllers/edit.js +2 -2
- package/controllers/form.js +28 -13
- package/controllers/list.js +2 -2
- package/controllers/login.js +2 -2
- package/controllers/media-manager/mediaManagerAdapter.js +13 -2
- package/controllers/media-manager/mediaManagerApi.js +4 -3
- package/controllers/navigation/edit.js +1 -1
- package/controllers/notifications/NotificationController.d.ts +11 -0
- package/controllers/notifications/NotificationController.js +219 -0
- package/controllers/remove.js +2 -1
- package/controllers/view.js +1 -1
- package/files/favicon.png +0 -0
- package/helpers/configHelper.d.ts +1 -1
- package/helpers/controllerHelper.js +1 -1
- package/helpers/diffHelpers.d.ts +2 -0
- package/helpers/diffHelpers.js +69 -0
- package/helpers/fieldsHelper.d.ts +1 -1
- package/helpers/fieldsHelper.js +1 -1
- package/helpers/formHelper.js +3 -1
- package/helpers/inertiaAddHelper.d.ts +1 -1
- package/helpers/inertiaAutHelper.js +19 -0
- package/helpers/inertiaFromHelper.js +12 -0
- package/helpers/translationHelper.d.ts +1 -1
- package/helpers/translationHelper.js +1 -1
- package/index.d.ts +16 -14
- package/index.js +16 -14
- package/interfaces/adminpanelConfig.d.ts +18 -0
- package/interfaces/global.d.ts +3 -3
- package/interfaces/types.d.ts +44 -2
- package/lib/Adminizer.d.ts +16 -8
- package/lib/Adminizer.js +95 -12
- package/lib/{v4/DataAccessor.d.ts → DataAccessor.d.ts} +5 -5
- package/lib/{v4/DataAccessor.js → DataAccessor.js} +3 -3
- package/lib/{v4/I18n.js → I18n.js} +2 -2
- package/lib/{v4/PolicyManager.d.ts → PolicyManager.d.ts} +1 -1
- package/lib/{v4/PolicyManager.js → PolicyManager.js} +2 -2
- package/lib/{v4/catalog → catalog}/AbstractCatalog.d.ts +1 -1
- package/lib/{v4/catalog → catalog}/Navigation.d.ts +2 -2
- package/lib/{v4/catalog → catalog}/Navigation.js +1 -1
- package/lib/{v4/controls → controls}/AbstractControls.d.ts +1 -1
- package/lib/{v4/controls → controls}/codeEditor/MonacoEditor.d.ts +1 -1
- package/lib/{v4/controls → controls}/geojsoneditor/GeoEditor.d.ts +1 -1
- package/lib/{v4/controls → controls}/jsoneditor/JsonEditor.d.ts +1 -1
- package/lib/{v4/controls → controls}/markdown/ToastUiEditor.d.ts +1 -1
- package/lib/{v4/controls → controls}/table/Handsontable.d.ts +1 -1
- package/lib/{v4/controls → controls}/wysiwyg/CKeditor.d.ts +1 -1
- package/lib/{v4/controls → controls}/wysiwyg/CKeditor.js +1 -1
- package/lib/{v4/datatable → datatable}/NodeTable.d.ts +1 -1
- package/lib/media-manager/AbstractMediaManager.d.ts +3 -3
- package/lib/media-manager/AbstractMediaManager.js +2 -2
- package/lib/media-manager/DefaultMediaManager.d.ts +1 -1
- package/lib/media-manager/DefaultMediaManager.js +6 -8
- package/lib/media-manager/Items.d.ts +2 -1
- package/lib/media-manager/Items.js +7 -0
- package/lib/media-manager/helpers/MediaManagerHelper.d.ts +10 -0
- package/lib/media-manager/helpers/MediaManagerHelper.js +27 -10
- package/lib/{v4/model → model}/AbstractModel.d.ts +12 -0
- package/lib/model/AbstractModel.js +178 -0
- package/lib/{v4/model → model}/ModelHandler.js +1 -1
- package/lib/{v4/model → model}/adapter/sequelize.d.ts +3 -4
- package/lib/{v4/model → model}/adapter/sequelize.js +41 -14
- package/lib/notifications/AbstractNotificationService.d.ts +163 -0
- package/lib/notifications/AbstractNotificationService.js +353 -0
- package/lib/notifications/GeneralNotificationService.d.ts +8 -0
- package/lib/notifications/GeneralNotificationService.js +61 -0
- package/lib/notifications/NotificationHandler.d.ts +27 -0
- package/lib/notifications/NotificationHandler.js +41 -0
- package/lib/notifications/SystemNotificationService.d.ts +19 -0
- package/lib/notifications/SystemNotificationService.js +173 -0
- package/lib/{v4/widgets → widgets}/abstractCustom.d.ts +1 -1
- package/lib/{v4/widgets → widgets}/abstractLink.d.ts +1 -1
- package/lib/{v4/widgets → widgets}/abstractWidgetBase.d.ts +1 -1
- package/lib/{v4/widgets → widgets}/widgetHandler.d.ts +2 -2
- package/migrations/index.d.ts +3 -0
- package/migrations/index.js +4 -0
- package/migrations/umzug/0001.d.ts +7 -0
- package/migrations/umzug/0001.js +121 -0
- package/migrations/umzugExports.d.ts +2 -0
- package/migrations/umzugExports.js +9 -0
- package/models/MediaManagerAP.d.ts +9 -3
- package/models/MediaManagerAP.js +11 -5
- package/models/MediaManagerAssociationsAP.d.ts +9 -3
- package/models/MediaManagerAssociationsAP.js +11 -5
- package/models/MediaManagerMetaAP.d.ts +9 -3
- package/models/MediaManagerMetaAP.js +11 -5
- package/models/NotificationAP.d.ts +44 -0
- package/models/NotificationAP.js +30 -0
- package/models/UserAP.d.ts +1 -1
- package/models/UserNotificationAP.d.ts +26 -0
- package/models/UserNotificationAP.js +18 -0
- package/package.json +17 -8
- package/system/Router.js +21 -7
- package/system/bindAssets.js +1 -0
- package/system/bindControls.js +6 -6
- package/system/bindInertia.js +9 -3
- package/system/bindMediaManager.js +2 -1
- package/system/bindNavigation.js +3 -4
- package/system/bindNotifications.d.ts +2 -0
- package/system/bindNotifications.js +14 -0
- package/system/bindReqFunctions.js +8 -25
- package/system/defaults.js +6 -0
- package/translations/ar.json +5 -4
- package/translations/cn.json +5 -4
- package/translations/de.json +72 -71
- package/translations/en.json +5 -4
- package/translations/es.json +5 -4
- package/translations/fr.json +5 -4
- package/translations/hi.json +5 -4
- package/translations/jp.json +5 -4
- package/translations/ko.json +5 -4
- package/translations/pt.json +5 -4
- package/translations/ru.json +2 -1
- package/translations/ua.json +5 -4
- package/translations/uz.json +73 -72
- package/translations/vi.json +5 -4
- package/ui/components/VanillaJSONEditor.d.ts +2 -0
- package/ui/components/VanillaJSONEditor.js +101 -0
- package/ui/components/handsontable.d.ts +10 -0
- package/ui/components/handsontable.js +51 -0
- package/ui/components/monaco-editor.d.ts +11 -0
- package/ui/components/monaco-editor.js +57 -0
- package/ui/components/ui/table.d.ts +1 -1
- package/ui/components/ui/table.js +2 -2
- package/ui/hooks/form-state.d.ts +4 -0
- package/ui/hooks/form-state.js +45 -0
- package/ui/hooks/use-appearance.d.ts +7 -0
- package/ui/hooks/use-appearance.js +76 -0
- package/ui/hooks/use-window-size.d.ts +5 -0
- package/ui/hooks/use-window-size.js +21 -0
- package/assets/VanillaJSONEditor-x8tDbio1.js +0 -3833
- package/assets/add-DOaZgoTz.js +0 -1
- package/assets/add-form-BjackXJe.js +0 -1
- package/assets/add-group-Br44s2D6.js +0 -1
- package/assets/add-group-form-YI6KS37x.js +0 -1
- package/assets/add-user-DWcH0s9-.js +0 -1
- package/assets/add-user-form-bv5BNX5A.js +0 -1
- package/assets/app-layout-DecN527i.js +0 -1
- package/assets/app-shell-DHzMWA1L.js +0 -1
- package/assets/app-sidebar-4JFP8UdU.js +0 -1
- package/assets/app-sidebar-header-CIKLfLsF.js +0 -1
- package/assets/breadcrumbs-Bo2z-LNC.js +0 -1
- package/assets/catalog-DVyrGTNR.js +0 -6
- package/assets/dashboard-Dy3pk9t7.js +0 -3
- package/assets/date-picker-B2z-aeuv.js +0 -1
- package/assets/debounce-D6eaSoDg.js +0 -1
- package/assets/del-modal-l3LxJWCN.js +0 -1
- package/assets/dynamic-controls-CSVVCONh.js +0 -1
- package/assets/field-renderer-BHo944Cn.js +0 -407
- package/assets/form-BXfnz6h5.js +0 -1
- package/assets/form-hP8sjbND.js +0 -1
- package/assets/form-state-702tb_BV.js +0 -1
- package/assets/geo-json-CVaNUZbb.js +0 -4
- package/assets/handsontable-CZQ5Ietj.js +0 -347
- package/assets/home-BD4MWmm9.js +0 -2
- package/assets/icon-C_X2cQ6W.js +0 -1
- package/assets/index-C148XJoK.js +0 -1
- package/assets/index-Vcq4gwWv.js +0 -1
- package/assets/init-user-DgCD4ZN1.js +0 -1
- package/assets/input-error-Bab-HPbn.js +0 -1
- package/assets/list-C-27EH39.js +0 -1
- package/assets/list-table-_OiQmr2A.js +0 -22
- package/assets/login-jzvVXgAV.js +0 -1
- package/assets/material-icon-DsiW0iQG.js +0 -1
- package/assets/media-manager-CSB_XRcE.js +0 -14
- package/assets/module-Ceq6vuwa.js +0 -1
- package/assets/monaco-editor-XX8Hz76f.js +0 -11
- package/assets/multi-select-BbKSrMw2.js +0 -1
- package/assets/nav-footer-B8gMV6Wp.js +0 -1
- package/assets/nav-main-BUp9qA8R.js +0 -1
- package/assets/nav-user-DeF3SDRj.js +0 -1
- package/assets/pagination-render-B9U_hVbB.js +0 -1
- package/assets/register-C6acWsLe.js +0 -1
- package/assets/theme-switcher-D8T9NgWG.js +0 -1
- package/assets/toast-editor-C0550yms.js +0 -845
- package/assets/use-appearance-CXP5cHaQ.js +0 -1
- package/assets/use-window-size-DLSEoR6e.js +0 -1
- package/assets/user-info-CAgkqARx.js +0 -1
- package/assets/user-menu-content-BxL0QMC9.js +0 -1
- package/assets/vanilla-picker-B6E6ObS_.js +0 -8
- package/assets/welcome-Dk7GoS5R.js +0 -1
- package/lib/v4/model/AbstractModel.js +0 -67
- package/lib/v4/model/adapter/typeorm.d.ts +0 -23
- package/lib/v4/model/adapter/typeorm.js +0 -68
- package/migrations/20230303171134-adminpanel-init.js +0 -122
- package/migrations/20231223215835-add-widgets.js +0 -32
- package/migrations/20240804191001-added-navigationap.js +0 -53
- package/migrations/20241121184236-v4-init.js +0 -134
- /package/lib/{v4/I18n.d.ts → I18n.d.ts} +0 -0
- /package/lib/{v4/POWCaptcha.d.ts → POWCaptcha.d.ts} +0 -0
- /package/lib/{v4/POWCaptcha.js → POWCaptcha.js} +0 -0
- /package/lib/{v4/catalog → catalog}/AbstractCatalog.js +0 -0
- /package/lib/{v4/catalog → catalog}/CatalogHandler.d.ts +0 -0
- /package/lib/{v4/catalog → catalog}/CatalogHandler.js +0 -0
- /package/lib/{v4/controls → controls}/AbstractControls.js +0 -0
- /package/lib/{v4/controls → controls}/ControlsHandler.d.ts +0 -0
- /package/lib/{v4/controls → controls}/ControlsHandler.js +0 -0
- /package/lib/{v4/controls → controls}/codeEditor/MonacoEditor.js +0 -0
- /package/lib/{v4/controls → controls}/geojsoneditor/GeoEditor.js +0 -0
- /package/lib/{v4/controls → controls}/jsoneditor/JsonEditor.js +0 -0
- /package/lib/{v4/controls → controls}/markdown/ToastUiEditor.js +0 -0
- /package/lib/{v4/controls → controls}/table/Handsontable.js +0 -0
- /package/lib/{v4/datatable → datatable}/NodeTable.js +0 -0
- /package/lib/{v4/helper → helper}/jwt.d.ts +0 -0
- /package/lib/{v4/helper → helper}/jwt.js +0 -0
- /package/lib/{v4/inertia → inertia}/flash.d.ts +0 -0
- /package/lib/{v4/inertia → inertia}/flash.js +0 -0
- /package/lib/{v4/inertia → inertia}/inertiaAdapter.d.ts +0 -0
- /package/lib/{v4/inertia → inertia}/inertiaAdapter.js +0 -0
- /package/lib/{v4/model → model}/ModelHandler.d.ts +0 -0
- /package/lib/{v4/model → model}/adapter/waterline.d.ts +0 -0
- /package/lib/{v4/model → model}/adapter/waterline.js +0 -0
- /package/lib/{v4/widgets → widgets}/abstractAction.d.ts +0 -0
- /package/lib/{v4/widgets → widgets}/abstractAction.js +0 -0
- /package/lib/{v4/widgets → widgets}/abstractCustom.js +0 -0
- /package/lib/{v4/widgets → widgets}/abstractInfo.d.ts +0 -0
- /package/lib/{v4/widgets → widgets}/abstractInfo.js +0 -0
- /package/lib/{v4/widgets → widgets}/abstractLink.js +0 -0
- /package/lib/{v4/widgets → widgets}/abstractSwitch.d.ts +0 -0
- /package/lib/{v4/widgets → widgets}/abstractSwitch.js +0 -0
- /package/lib/{v4/widgets → widgets}/abstractWidgetBase.js +0 -0
- /package/lib/{v4/widgets → widgets}/widgetHandler.js +0 -0
|
@@ -1,845 +0,0 @@
|
|
|
1
|
-
import{g as KZ,e as No,c as JZ,r as Cf,j as bv}from"./app.js";import{k as YZ,b as XZ}from"./index-Vcq4gwWv.js";import{u as ZZ}from"./use-window-size-DLSEoR6e.js";import{u as QZ}from"./use-appearance-CXP5cHaQ.js";function Or(r){this.content=r}Or.prototype={constructor:Or,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 Or(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 Or(t)},addToStart:function(r,e){return new Or([r,e].concat(this.remove(r).content))},addToEnd:function(r,e){var t=this.remove(r).content.slice();return t.push(r,e),new Or(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 Or(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=Or.from(r),r.size?new Or(r.content.concat(this.subtract(r).content)):this},append:function(r){return r=Or.from(r),r.size?new Or(this.subtract(r).content.concat(r.content)):this},subtract:function(r){var e=this;r=Or.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}};Or.from=function(r){if(r instanceof Or)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new Or(e)};function Ky(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){for(let o=0;i.text[o]==a.text[o];o++)t++;return t}if(i.content.size||a.content.size){let o=Ky(i.content,a.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function Jy(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=0,p=Math.min(o.text.length,s.text.length);for(;f<p&&o.text[o.text.length-f-1]==s.text[s.text.length-f-1];)f++,t--,n--;return{a:t,b:n}}if(o.content.size||s.content.size){let f=Jy(o.content,s.content,t-1,n-1);if(f)return f}t-=l,n-=l}}class Oe{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 Oe(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 Oe(n,i)}cutByIndex(e,t){return e==t?Oe.empty:e==0&&t==this.content.length?this:new Oe(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 Oe(i,a)}addToStart(e){return new Oe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Oe(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 Ky(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Jy(this,e,t,n)}findIndex(e,t=-1){if(e==0)return Al(0,e);if(e==this.size)return Al(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,i=0;;n++){let a=this.child(n),o=i+a.nodeSize;if(o>=e)return o==e||t>0?Al(n+1,o):Al(n,i);i=o}}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 Oe.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new Oe(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Oe.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 Oe(t||e,n)}static from(e){if(!e)return Oe.empty;if(e instanceof Oe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Oe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Oe.empty=new Oe([],0);const Tf={index:0,offset:0};function Al(r,e){return Tf.index=r,Tf.offset=e,Tf}function Zl(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(!Zl(r[n],e[n]))return!1}else{for(let n in r)if(!(n in e)||!Zl(r[n],e[n]))return!1;for(let n in e)if(!(n in r))return!1}return!0}let Pt=class fd{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&&Zl(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 fd.none;if(e instanceof fd)return[e];let t=e.slice();return t.sort((n,i)=>n.type.rank-i.type.rank),t}};Pt.none=[];class Ql extends Error{}class Ue{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=Xy(this.content,e+this.openStart,t);return n&&new Ue(n,this.openStart,this.openEnd)}removeBetween(e,t){return new Ue(Yy(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 Ue.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 Ue(Oe.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 Ue(e,n,i)}}Ue.empty=new Ue(Oe.empty,0,0);function Yy(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(Yy(a.content,e-i-1,t-i-1)))}function Xy(r,e,t,n){let{index:i,offset:a}=r.findIndex(e),o=r.maybeChild(i);if(a==e||o.isText)return r.cut(0,e).append(t).append(r.cut(e));let s=Xy(o.content,e-a-1,t);return s&&r.replaceChild(i,o.copy(s))}function eQ(r,e,t){if(t.openStart>r.depth)throw new Ql("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new Ql("Inconsistent open depths");return Zy(r,e,t,0)}function Zy(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=Zy(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 Ha(o,s.cut(0,r.parentOffset).append(t.content).append(s.cut(e.parentOffset)))}else{let{start:o,end:s}=tQ(t,r);return Ha(a,eb(r,o,s,e,n))}else return Ha(a,eu(r,e,n))}function Qy(r,e){if(!e.type.compatibleContent(r.type))throw new Ql("Cannot join "+e.type.name+" onto "+r.type.name)}function dd(r,e,t){let n=r.node(t);return Qy(n,e.node(t)),n}function qa(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&&(qa(r.nodeAfter,n),a++));for(let s=a;s<o;s++)qa(i.child(s),n);e&&e.depth==t&&e.textOffset&&qa(e.nodeBefore,n)}function Ha(r,e){return r.type.checkContent(e),r.copy(e)}function eb(r,e,t,n,i){let a=r.depth>i&&dd(r,e,i+1),o=n.depth>i&&dd(t,n,i+1),s=[];return ws(null,r,i,s),a&&o&&e.index(i)==t.index(i)?(Qy(a,o),qa(Ha(a,eb(r,e,t,n,i+1)),s)):(a&&qa(Ha(a,eu(r,e,i+1)),s),ws(e,t,i,s),o&&qa(Ha(o,eu(t,n,i+1)),s)),ws(n,null,i,s),new Oe(s)}function eu(r,e,t){let n=[];if(ws(null,r,t,n),r.depth>t){let i=dd(r,e,t+1);qa(Ha(i,eu(r,e,t+1)),n)}return ws(e,null,t,n),new Oe(n)}function tQ(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(Oe.from(i));return{start:i.resolveNoCache(r.openStart+t),end:i.resolveNoCache(i.content.size-r.openEnd-t)}}class Es{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 Pt.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 tu(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 Es(t,n,a)}static resolveCached(e,t){let n=kv.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 kv.set(e,n=new rQ);let i=n.elts[n.i]=Es.resolve(e,t);return n.i=(n.i+1)%nQ,i}}class rQ{constructor(){this.elts=[],this.i=0}}const nQ=12,kv=new WeakMap;class tu{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 iQ=Object.create(null);let ra=class hd{constructor(e,t,n,i=Pt.none){this.type=e,this.attrs=t,this.marks=i,this.content=n||Oe.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&&Zl(this.attrs,t||e.defaultAttrs||iQ)&&Pt.sameSet(this.marks,n||Pt.none)}copy(e=null){return e==this.content?this:new hd(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new hd(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 Ue.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 Ue(f,i.depth-o,a.depth-o)}replace(e,t,n){return eQ(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 Es.resolveCached(this,e)}resolveNoCache(e){return Es.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()+")"),tb(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=Oe.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=Pt.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(!Pt.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=Oe.fromJSON(e,t.content),a=e.nodeType(t.type).create(t.attrs,i,n);return a.type.checkAttrs(a.attrs),a}};ra.prototype.text=void 0;class ru extends ra{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):tb(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 ru(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ru(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 tb(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}class Ua{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new aQ(e,t);if(n.next==null)return Ua.empty;let i=rb(n);n.next&&n.err("Unexpected trailing text");let a=dQ(fQ(i));return hQ(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 Oe.from(s.map(f=>f.createAndFill()));for(let f=0;f<o.next.length;f++){let{type:p,next:k}=o.next[f];if(!(p.isText||p.hasRequiredAttrs())&&i.indexOf(k)==-1){i.push(k);let T=a(k,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
|
-
`)}}Ua.empty=new Ua(!0);class aQ{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 rb(r){let e=[];do e.push(oQ(r));while(r.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function oQ(r){let e=[];do e.push(sQ(r));while(r.next&&r.next!=")"&&r.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function sQ(r){let e=cQ(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=lQ(r,e);else break;return e}function wv(r){/\D/.test(r.next)&&r.err("Expected number, got '"+r.next+"'");let e=Number(r.next);return r.pos++,e}function lQ(r,e){let t=wv(r),n=t;return r.eat(",")&&(r.next!="}"?n=wv(r):n=-1),r.eat("}")||r.err("Unclosed braced range"),{type:"range",min:t,max:n,expr:e}}function uQ(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 cQ(r){if(r.eat("(")){let e=rb(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=uQ(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 fQ(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 nb(r,e){return e-r}function Cv(r,e){let t=[];return n(e),t.sort(nb);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 dQ(r){let e=Object.create(null);return t(Cv(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]);Cv(r,l).forEach(p=>{f||i.push([s,f=[]]),f.indexOf(p)==-1&&f.push(p)})})});let a=e[n.join(",")]=new Ua(n.indexOf(r.length-1)>-1);for(let o=0;o<i.length;o++){let s=i[o][1].sort(nb);a.next.push({type:i[o][0],next:e[s.join(",")]||t(s)})}return a}}function hQ(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 ib(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 ab(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 ob(r,e,t,n){for(let i in e)if(!(i in r))throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);for(let i in r){let a=r[i];a.validate&&a.validate(e[i])}}function sb(r,e){let t=Object.create(null);if(e)for(let n in e)t[n]=new vQ(r,n,e[n]);return t}let Tv=class lb{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=sb(e,n.attrs),this.defaultAttrs=ib(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==Ua.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:ab(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ra(this,this.computeAttrs(e),Oe.from(t),Pt.setFrom(n))}createChecked(e=null,t,n){return t=Oe.from(t),this.checkContent(t),new ra(this,this.computeAttrs(e),t,Pt.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=Oe.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(Oe.empty,!0);return a?new ra(this,e,t.append(a),Pt.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){ob(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:Pt.none:e}static compile(e,t){let n=Object.create(null);e.forEach((a,o)=>n[a]=new lb(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 pQ(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 vQ{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?pQ(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class Mu{constructor(e,t,n,i){this.name=e,this.rank=t,this.schema=n,this.spec=i,this.attrs=sb(e,i.attrs),this.excluded=null;let a=ib(this.attrs);this.instance=a?new Pt(this,a):null}create(e=null){return!e&&this.instance?this.instance:new Pt(this,ab(this.attrs,e))}static compile(e,t){let n=Object.create(null),i=0;return e.forEach((a,o)=>n[a]=new Mu(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){ob(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class ub{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=Or.from(e.nodes),t.marks=Or.from(e.marks||{}),this.nodes=Tv.compile(this.spec.nodes,this),this.marks=Mu.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]=Ua.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?Sv(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==""?[]:Sv(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),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 Tv){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 ru(n,n.defaultAttrs,e,Pt.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return ra.fromJSON(this,e)}markFromJSON(e){return Pt.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Sv(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 mQ(r){return r.tag!=null}function gQ(r){return r.style!=null}class $a{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(i=>{if(mQ(i))this.tags.push(i);else if(gQ(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 Ev(this,t,!1);return n.addAll(e,Pt.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Ev(this,t,!0);return n.addAll(e,Pt.none,t.from,t.to),Ue.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(kQ(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=Mv(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=Mv(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new $a(e,$a.schemaRules(e)))}}const cb={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},yQ={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},fb={ol:!0,ul:!0},Ms=1,pd=2,zl=4;function xv(r,e,t){return e!=null?(e?Ms:0)|(e==="full"?pd:0):r&&r.whitespace=="pre"?Ms|pd:t&-5}class Ol{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=Pt.none,this.match=a||(o&zl?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(Oe.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&Ms)){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=Oe.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(Oe.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&&!cb.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ev{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=xv(null,t.preserveWhitespace,0)|(n?zl:0);i?a=new Ol(i.type,i.attrs,Pt.none,!0,t.topMatch||i.type.contentMatch,o):n?a=new Ol(null,null,Pt.none,!0,null,o):a=new Ol(e.schema.topNodeType,null,Pt.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&pd?"full":this.localPreserveWS||(i.options&Ms)>0;if(a==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(a)a!=="full"?n=n.replace(/\r?\n|\r/g," "):n=n.replace(/\r\n?/g,`
|
|
3
|
-
`);else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],s=e.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.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;fb.hasOwnProperty(o)&&this.parser.normalizeLists&&bQ(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,n));e:if(l?l.ignore:yQ.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(cb.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 k=l&&l.skip?t:this.readStyles(e,t);k&&this.addAll(e,k),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=Pt.none;for(let s of i.concat(e.marks))(a.type?a.type.allowsMarkType(s.type):Av(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=xv(e,a,o.options);o.options&zl&&o.content.length==0&&(s|=zl);let l=Pt.none;return n=n.filter(f=>(o.type?o.type.allowsMarkType(f.type):Av(f.type,e))?(l=f.addToSet(l),!1):!0),this.nodes.push(new Ol(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|=Ms)}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 bQ(r){for(let e=r.firstChild,t=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&fb.hasOwnProperty(n)&&t?(t.appendChild(e),e=t):n=="li"?t=e:n&&(t=null)}}function kQ(r,e){return(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,e)}function Mv(r){let e={};for(let t in r)e[t]=r[t];return e}function Av(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=Sf(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){let{dom:n,contentDOM:i}=Vl(Sf(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&&Vl(Sf(n),i(e,t),null,e.attrs)}static renderSpec(e,t,n=null,i){return Vl(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=Ov(e.nodes);return t.text||(t.text=n=>n.text),t}static marksFromSchema(e){return Ov(e.marks)}}function Ov(r){let e={};for(let t in r){let n=r[t].spec.toDOM;n&&(e[t]=n)}return e}function Sf(r){return r.document||window.document}const Nv=new WeakMap;function wQ(r){let e=Nv.get(r);return e===void 0&&Nv.set(r,e=CQ(r)),e}function CQ(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 Vl(r,e,t,n){if(typeof e=="string")return{dom:r.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],a;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(a=wQ(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 k in f)if(f[k]!=null){let T=k.indexOf(" ");T>0?l.setAttributeNS(k.slice(0,T),k.slice(T+1),f[k]):l.setAttribute(k,f[k])}}for(let k=p;k<e.length;k++){let T=e[k];if(T===0){if(k<e.length-1||k>p)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:x,contentDOM:E}=Vl(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 db=65535,hb=Math.pow(2,16);function TQ(r,e){return r+e*hb}function Dv(r){return r&db}function SQ(r){return(r-(r&db))/hb}const pb=1,vb=2,Ul=4,mb=8;class vd{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&mb)>0}get deletedBefore(){return(this.delInfo&(pb|Ul))>0}get deletedAfter(){return(this.delInfo&(vb|Ul))>0}get deletedAcross(){return(this.delInfo&Ul)>0}}class un{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&un.empty)return un.empty}recover(e){let t=0,n=Dv(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+SQ(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],k=l+f;if(e<=k){let T=f?e==l?-1:e==k?1:t:t,x=l+i+(T<0?0:p);if(n)return x;let E=e==(t<0?l:k)?null:TQ(s/3,e-l),P=e==l?vb:e==k?pb:Ul;return(t<0?e!=l:e!=k)&&(P|=mb),new vd(x,P,E)}i+=p-f}return n?e+i:new vd(e+i,0,null)}touches(e,t){let n=0,i=Dv(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 un(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?un.empty:new un(e<0?[0,-e,0]:[0,0,e])}}un.empty=new un([]);class As{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 As(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 As;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 vd(e,i,null)}}const xf=Object.create(null);class Ur{getMap(){return un.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=xf[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 xf)throw new RangeError("Duplicate use of step JSON ID "+e);return xf[e]=t,t.prototype.jsonID=e,t}}class hr{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new hr(e,null)}static fail(e){return new hr(null,e)}static fromReplace(e,t,n,i){try{return hr.ok(e.replace(t,n,i))}catch(a){if(a instanceof Ql)return hr.fail(a.message);throw a}}}function eh(r,e,t){let n=[];for(let i=0;i<r.childCount;i++){let a=r.child(i);a.content.size&&(a=a.copy(eh(a.content,e,a))),a.isInline&&(a=e(a,t,i)),n.push(a)}return Oe.fromArray(n)}class Qi extends Ur{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 Ue(eh(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 hr.fromReplace(e,this.from,this.to,a)}invert(){return new oi(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 Qi(t.pos,n.pos,this.mark)}merge(e){return e instanceof Qi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Qi(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 Qi(t.from,t.to,e.markFromJSON(t.mark))}}Ur.jsonID("addMark",Qi);class oi extends Ur{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 Ue(eh(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return hr.fromReplace(e,this.from,this.to,n)}invert(){return new Qi(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 oi(t.pos,n.pos,this.mark)}merge(e){return e instanceof oi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new oi(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 oi(t.from,t.to,e.markFromJSON(t.mark))}}Ur.jsonID("removeMark",oi);class ea extends Ur{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return hr.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return hr.fromReplace(e,this.pos,this.pos+1,new Ue(Oe.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 ea(this.pos,t.marks[i]);return new ea(this.pos,this.mark)}}return new Wa(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ea(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 ea(t.pos,e.markFromJSON(t.mark))}}Ur.jsonID("addNodeMark",ea);class Wa extends Ur{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return hr.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return hr.fromReplace(e,this.pos,this.pos+1,new Ue(Oe.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new ea(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Wa(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 Wa(t.pos,e.markFromJSON(t.mark))}}Ur.jsonID("removeNodeMark",Wa);class _r extends Ur{constructor(e,t,n,i=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=i}apply(e){return this.structure&&md(e,this.from,this.to)?hr.fail("Structure replace would overwrite content"):hr.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new un([this.from,this.to-this.from,this.slice.size])}invert(e){return new _r(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new _r(t.pos,Math.max(t.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof _r)||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?Ue.empty:new Ue(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new _r(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?Ue.empty:new Ue(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new _r(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 _r(t.from,t.to,Ue.fromJSON(e,t.slice),!!t.structure)}}Ur.jsonID("replace",_r);class Sr extends Ur{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&&(md(e,this.from,this.gapFrom)||md(e,this.gapTo,this.to)))return hr.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return hr.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?hr.fromReplace(e,this.from,this.to,n):hr.fail("Content does not fit in gap")}getMap(){return new un([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 Sr(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 Sr(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 Sr(t.from,t.to,t.gapFrom,t.gapTo,Ue.fromJSON(e,t.slice),t.insert,!!t.structure)}}Ur.jsonID("replaceAround",Sr);function md(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 xQ(r,e,t,n){let i=[],a=[],o,s;r.doc.nodesBetween(e,t,(l,f,p)=>{if(!l.isInline)return;let k=l.marks;if(!n.isInSet(k)&&p.type.allowsMarkType(n.type)){let T=Math.max(f,e),x=Math.min(f+l.nodeSize,t),E=n.addToSet(k);for(let P=0;P<k.length;P++)k[P].isInSet(E)||(o&&o.to==T&&o.mark.eq(k[P])?o.to=x:i.push(o=new oi(T,x,k[P])));s&&s.to==T?s.to=x:a.push(s=new Qi(T,x,n))}}),i.forEach(l=>r.step(l)),a.forEach(l=>r.step(l))}function EQ(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 Mu){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 k=l[p],T;for(let x=0;x<i.length;x++){let E=i[x];E.step==a-1&&k.eq(i[x].style)&&(T=E)}T?(T.to=f,T.step=a):i.push({style:k,from:Math.max(s,e),to:f,step:a})}}}),i.forEach(o=>r.step(new oi(o.from,o.to,o.style)))}function th(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,k=n.matchType(f.type);if(!k)o.push(new _r(s,p,Ue.empty));else{n=k;for(let T=0;T<f.marks.length;T++)t.allowsMarkType(f.marks[T].type)||r.step(new oi(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 Ue(Oe.from(t.schema.text(" ",t.allowedMarks(f.marks))),0,0)),o.push(new _r(s+T.index,s+T.index+T[0].length,E))}}s=p}if(!n.validEnd){let l=n.fillBefore(Oe.empty,!0);r.replace(s,s,new Ue(l,0,0))}for(let l=o.length-1;l>=0;l--)r.step(o[l])}function MQ(r,e,t){return(e==0||r.canReplace(e,r.childCount))&&(t==r.childCount||r.canReplace(0,t))}function Au(r){let t=r.parent.content.cutByIndex(r.startIndex,r.endIndex);for(let n=r.depth;;--n){let i=r.$from.node(n),a=r.$from.index(n),o=r.$to.indexAfter(n);if(n<r.depth&&i.canReplace(a,o,t))return n;if(n==0||i.type.spec.isolating||!MQ(i,a,o))break}return null}function AQ(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=Oe.empty,k=0;for(let E=a,P=!1;E>t;E--)P||n.index(E)>0?(P=!0,p=Oe.from(n.node(E).copy(p)),k++):l--;let T=Oe.empty,x=0;for(let E=a,P=!1;E>t;E--)P||i.after(E+1)<i.end(E)?(P=!0,T=Oe.from(i.node(E).copy(T)),x++):f++;r.step(new Sr(l,f,o,s,new Ue(p.append(T),k,x),p.size-k,!0))}function OQ(r,e,t=null,n=r){let i=NQ(r,e),a=i&&DQ(n,e);return a?i.map(Lv).concat({type:e,attrs:t}).concat(a.map(Lv)):null}function Lv(r){return{type:r,attrs:null}}function NQ(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 DQ(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 LQ(r,e,t){let n=Oe.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=Oe.from(t[o].type.create(t[o].attrs,n))}let i=e.start,a=e.end;r.step(new Sr(i,a,i,a,new Ue(n,0,0),t.length,!0))}function RQ(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)&&IQ(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&&yb(r,o,s,a),th(r,r.mapping.slice(a).map(s,1),n,void 0,f===null);let p=r.mapping.slice(a),k=p.map(s,1),T=p.map(s+o.nodeSize,1);return r.step(new Sr(k,T,k+1,T-1,new Ue(Oe.from(n.create(l,null,o.marks)),0,0),1,!0)),f===!0&&gb(r,o,s,a),!1}})}function gb(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 yb(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 IQ(r,e,t){let n=r.resolve(e),i=n.index();return n.parent.canReplaceWith(i,i+1,t)}function PQ(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 Sr(e,e+a.nodeSize,e+1,e+a.nodeSize-1,new Ue(Oe.from(o),0,0),1,!0))}function Do(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 k=i.node(f),T=i.index(f);if(k.type.spec.isolating)return!1;let x=k.content.cutByIndex(T,k.childCount),E=n&&n[p+1];E&&(x=x.replaceChild(0,E.type.create(E.attrs)));let P=n&&n[p]||k;if(!k.canReplace(T+1,k.childCount)||!P.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 BQ(r,e,t=1,n){let i=r.doc.resolve(e),a=Oe.empty,o=Oe.empty;for(let s=i.depth,l=i.depth-t,f=t-1;s>l;s--,f--){a=Oe.from(i.node(s).copy(a));let p=n&&n[f];o=Oe.from(p?p.type.create(p.attrs,o):i.node(s).copy(o))}r.step(new _r(e,e,new Ue(a.append(o),t,t),!0))}function bb(r,e){let t=r.resolve(e),n=t.index();return qQ(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(n,n+1)}function FQ(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 qQ(r,e){return!!(r&&e&&!r.isLeaf&&FQ(r,e))}function HQ(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",k=!!o.contentMatch.matchType(i);p&&!k?n=!1:!p&&k&&(n=!0)}let s=r.steps.length;if(n===!1){let p=r.doc.resolve(e+t);yb(r,p.node(),p.before(),s)}o.inlineContent&&th(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 _r(f,l.map(e+t,-1),Ue.empty,!0)),n===!0){let p=r.doc.resolve(f);gb(r,p.node(),p.before(),r.steps.length)}return r}function _Q(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 zQ(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 k=f.contentMatchAt(l).findWrapping(i.firstChild.type);p=k&&f.canReplaceWith(l,l,k[0])}if(p)return s==0?n.pos:s<0?n.before(o+1):n.after(o+1)}return null}function rh(r,e,t=e,n=Ue.empty){if(e==t&&!n.size)return null;let i=r.resolve(e),a=r.resolve(t);return kb(i,a,n)?new _r(e,t,n):new VQ(i,a,n).fit()}function kb(r,e,t){return!t.openStart&&!t.openEnd&&r.start()==e.start()&&r.parent.canReplace(r.index(),e.index(),t.content)}class VQ{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=Oe.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=Oe.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 Ue(a,o,s);return e>-1?new Sr(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new _r(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=Ef(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,k=null;if(t==1&&(o?f.matchType(o.type)||(k=f.fillBefore(Oe.from(o),!1)):a&&l.compatibleContent(a.type)))return{sliceDepth:n,frontierDepth:s,parent:a,inject:k};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=Ef(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new Ue(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=Ef(e,t);if(i.childCount<=1&&t>0){let a=e.size-t<=t+i.size;this.unplaced=new Ue(ms(e,t-1,1),t-1,a?t-1:n)}else this.unplaced=new Ue(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 P=0;P<a.length;P++)this.openFrontierNode(a[P]);let o=this.unplaced,s=n?n.content:o.content,l=o.openStart-e,f=0,p=[],{match:k,type:T}=this.frontier[t];if(i){for(let P=0;P<i.childCount;P++)p.push(i.child(P));k=k.matchFragment(i)}let x=s.size+e-(o.content.size-o.openEnd);for(;f<s.childCount;){let P=s.child(f),F=k.matchType(P.type);if(!F)break;f++,(f>1||l==0||P.content.size)&&(k=F,p.push(wb(P.mark(T.allowedMarks(P.marks)),f==1?l:0,f==s.childCount?x:-1)))}let E=f==s.childCount;E||(x=-1),this.placed=gs(this.placed,t,Oe.from(p)),this.frontier[t].match=k,E&&x<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let P=0,F=s;P<x;P++){let z=F.lastChild;this.frontier.push({type:z.type,match:z.contentMatchAt(z.childCount)}),F=z.content}this.unplaced=E?e==0?Ue.empty:new Ue(ms(o.content,e-1,1),e-1,x<0?o.openEnd:e-1):new Ue(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||!Mf(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=Mf(e,t,i,n,a);if(o){for(let s=t-1;s>=0;s--){let{match:l,type:f}=this.frontier[s],p=Mf(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,Oe.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(Oe.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 Ef(r,e){for(let t=0;t<e;t++)r=r.firstChild.content;return r}function wb(r,e,t){if(e<=0)return r;let n=r.content;return e>1&&(n=n.replaceChild(0,wb(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(Oe.empty,!0)))),r.copy(n)}function Mf(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&&!UQ(t,a.content,o)?s:null}function UQ(r,e,t){for(let n=t;n<e.childCount;n++)if(!r.allowsMarks(e.child(n).marks))return!0;return!1}function $Q(r){return r.spec.defining||r.spec.definingForContent}function WQ(r,e,t,n){if(!n.size)return r.deleteRange(e,t);let i=r.doc.resolve(e),a=r.doc.resolve(t);if(kb(i,a,n))return r.step(new _r(e,t,n));let o=Tb(i,r.doc.resolve(t));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=$Q(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 P=0;P<o.length;P++){let F=o[(P+l)%o.length],z=!0;F<0&&(z=!1,F=-F);let Y=i.node(F-1),Z=i.index(F-1);if(Y.canReplaceWith(Z,Z,E.type,E.marks))return r.replace(i.before(F),z?a.after(F):t,new Ue(Cb(n.content,0,n.openStart,x),x,n.openEnd))}}let k=r.steps.length;for(let T=o.length-1;T>=0&&(r.replace(e,t,n),!(r.steps.length>k));T--){let x=o[T];x<0||(e=i.before(x),t=a.after(x))}}function Cb(r,e,t,n,i){if(e<t){let a=r.firstChild;r=r.replaceChild(0,a.copy(Cb(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(Oe.empty,!0))}return r}function jQ(r,e,t,n){if(!n.isInline&&e==t&&r.doc.resolve(e).parent.content.size){let i=_Q(r.doc,e,n.type);i!=null&&(e=t=i)}r.replaceRange(e,t,new Ue(Oe.from(n),0,0))}function GQ(r,e,t){let n=r.doc.resolve(e),i=r.doc.resolve(t),a=Tb(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 Tb(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 Lo extends Ur{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 hr.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 hr.fromReplace(e,this.pos,this.pos+1,new Ue(Oe.from(i),0,t.isLeaf?0:1))}getMap(){return un.empty}invert(e){return new Lo(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 Lo(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 Lo(t.pos,t.attr,t.value)}}Ur.jsonID("attr",Lo);class Os extends Ur{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 hr.ok(n)}getMap(){return un.empty}invert(e){return new Os(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 Os(t.attr,t.value)}}Ur.jsonID("docAttr",Os);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 KQ{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new As}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}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=Ue.empty){let i=rh(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new Ue(Oe.from(n),0,0))}delete(e,t){return this.replace(e,t,Ue.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return WQ(this,e,t,n),this}replaceRangeWith(e,t,n){return jQ(this,e,t,n),this}deleteRange(e,t){return GQ(this,e,t),this}lift(e,t){return AQ(this,e,t),this}join(e,t=1){return HQ(this,e,t),this}wrap(e,t){return LQ(this,e,t),this}setBlockType(e,t=e,n,i=null){return RQ(this,e,t,n,i),this}setNodeMarkup(e,t,n=null,i){return PQ(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new Lo(e,t,n)),this}setDocAttribute(e,t){return this.step(new Os(e,t)),this}addNodeMark(e,t){return this.step(new ea(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 Pt)t.isInSet(n.marks)&&this.step(new Wa(e,t));else{let i=n.marks,a,o=[];for(;a=t.isInSet(i);)o.push(new Wa(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 BQ(this,e,t,n),this}addMark(e,t,n){return xQ(this,e,t,n),this}removeMark(e,t,n){return EQ(this,e,t,n),this}clearIncompatible(e,t,n){return th(this,e,t,n),this}}const Af=Object.create(null);class Tt{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Sb(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=Ue.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?Ue.empty:t),s==0&&Pv(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),Pv(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let i=e.parent.inlineContent?new Mt(e):xo(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?xo(e.node(0),e.node(a),e.before(a+1),e.index(a),t,n):xo(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 Gr(e.node(0))}static atStart(e){return xo(e,e,0,0,1)||new Gr(e)}static atEnd(e){return xo(e,e,e.content.size,e.childCount,-1)||new Gr(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Af[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 Af)throw new RangeError("Duplicate use of selection JSON ID "+e);return Af[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Mt.between(this.$anchor,this.$head).getBookmark()}}Tt.prototype.visible=!0;class Sb{constructor(e,t){this.$from=e,this.$to=t}}let Rv=!1;function Iv(r){!Rv&&!r.parent.inlineContent&&(Rv=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+r.parent.type.name+")"))}class Mt extends Tt{constructor(e,t=e){Iv(e),Iv(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 Tt.near(n);let i=e.resolve(t.map(this.anchor));return new Mt(i.parent.inlineContent?i:n,n)}replace(e,t=Ue.empty){if(super.replace(e,t),t==Ue.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof Mt&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Ou(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 Mt(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=Tt.findFrom(t,n,!0)||Tt.findFrom(t,-n,!0);if(a)t=a.$head;else return Tt.near(t,n)}return e.parent.inlineContent||(i==0?e=t:(e=(Tt.findFrom(e,-n,!0)||Tt.findFrom(e,n,!0)).$anchor,e.pos<t.pos!=i<0&&(e=t))),new Mt(e,t)}}Tt.jsonID("text",Mt);class Ou{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Ou(e.map(this.anchor),e.map(this.head))}resolve(e){return Mt.between(e.resolve(this.anchor),e.resolve(this.head))}}class ft extends Tt{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?Tt.near(a):new ft(a)}content(){return new Ue(Oe.from(this.node),0,0)}eq(e){return e instanceof ft&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new nh(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ft(e.resolve(t.anchor))}static create(e,t){return new ft(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}ft.prototype.visible=!1;Tt.jsonID("node",ft);class nh{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new Ou(n,n):new nh(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&ft.isSelectable(n)?new ft(t):Tt.near(t)}}class Gr extends Tt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=Ue.empty){if(t==Ue.empty){e.delete(0,e.doc.content.size);let n=Tt.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Gr(e)}map(e){return new Gr(e)}eq(e){return e instanceof Gr}getBookmark(){return JQ}}Tt.jsonID("all",Gr);const JQ={map(){return this},resolve(r){return new Gr(r)}};function xo(r,e,t,n,i,a=!1){if(e.inlineContent)return Mt.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&&ft.isSelectable(s))return ft.create(r,t-(i<0?s.nodeSize:0))}else{let l=xo(r,s,t+i,i<0?s.childCount:0,i,a);if(l)return l}t+=s.nodeSize*i}return null}function Pv(r,e,t){let n=r.steps.length-1;if(n<e)return;let i=r.steps[n];if(!(i instanceof _r||i instanceof Sr))return;let a=r.mapping.maps[n],o;a.forEach((s,l,f,p)=>{o==null&&(o=p)}),r.setSelection(Tt.near(r.doc.resolve(o),t))}const Bv=1,Fv=2,qv=4;class YQ extends KQ{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|Bv)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&Bv)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Fv,this}ensureMarks(e){return Pt.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&Fv)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&-3,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)||Pt.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),n=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.setSelection(Tt.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|=qv,this}get scrolledIntoView(){return(this.updated&qv)>0}}function Hv(r,e){return!e||!r?r:r.bind(e)}class ys{constructor(e,t,n){this.name=e,this.init=Hv(t.init,n),this.apply=Hv(t.apply,n)}}const XQ=[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||Tt.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 Of{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=XQ.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 Pa{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 k=0;k<this.config.plugins.length;k++)i.push(k<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 Pa(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 YQ(this)}static create(e){let t=new Of(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new Pa(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 Of(this.schema,e.plugins),n=t.fields,i=new Pa(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 Of(e.schema,e.plugins),a=new Pa(i);return i.fields.forEach(o=>{if(o.name=="doc")a.doc=ra.fromJSON(e.schema,t.doc);else if(o.name=="selection")a.selection=Tt.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 xb(r,e,t){for(let n in r){let i=r[n];i instanceof Function?i=i.bind(e):n=="handleDOMEvents"&&(i=xb(i,e,{})),t[n]=i}return t}class hn{constructor(e){this.spec=e,this.props={},e.props&&xb(e.props,this,this.props),this.key=e.key?e.key.key:Eb("plugin")}getState(e){return e[this.key]}}const Nf=Object.create(null);function Eb(r){return r in Nf?r+"$"+ ++Nf[r]:(Nf[r]=0,r+"$")}class Bs{constructor(e="key"){this.key=Eb(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Lr=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 gd=null;const Mi=function(r,e,t){let n=gd||(gd=document.createRange());return n.setEnd(r,t??r.nodeValue.length),n.setStart(r,e||0),n},ZQ=function(){gd=null},ja=function(r,e,t,n){return t&&(_v(r,e,t,n,-1)||_v(r,e,t,n,1))},QQ=/^(img|br|input|textarea|hr)$/i;function _v(r,e,t,n,i){for(;;){if(r==t&&e==n)return!0;if(e==(i<0?0:Fn(r))){let a=r.parentNode;if(!a||a.nodeType!=1||Fs(r)||QQ.test(r.nodeName)||r.contentEditable=="false")return!1;e=Lr(r)+(i<0?0:1),r=a}else if(r.nodeType==1){if(r=r.childNodes[e+(i<0?-1:0)],r.contentEditable=="false")return!1;e=i<0?Fn(r):0}else return!1}}function Fn(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function eee(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=Fn(r)}else if(r.parentNode&&!Fs(r))e=Lr(r),r=r.parentNode;else return null}}function tee(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&&!Fs(r))e=Lr(r)+1,r=r.parentNode;else return null}}function ree(r,e,t){for(let n=e==0,i=e==Fn(r);n||i;){if(r==t)return!0;let a=Lr(r);if(r=r.parentNode,!r)return!1;n=n&&a==0,i=i&&a==Fn(r)}}function Fs(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 Nu=function(r){return r.focusNode&&ja(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)};function Ia(r,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=r,t.key=t.code=e,t}function nee(r){let e=r.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function iee(r,e,t){if(r.caretPositionFromPoint)try{let n=r.caretPositionFromPoint(e,t);if(n)return{node:n.offsetNode,offset:Math.min(Fn(n.offsetNode),n.offset)}}catch{}if(r.caretRangeFromPoint){let n=r.caretRangeFromPoint(e,t);if(n)return{node:n.startContainer,offset:Math.min(Fn(n.startContainer),n.startOffset)}}}const ui=typeof navigator<"u"?navigator:null,zv=typeof document<"u"?document:null,ca=ui&&ui.userAgent||"",yd=/Edge\/(\d+)/.exec(ca),Mb=/MSIE \d/.exec(ca),bd=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ca),fn=!!(Mb||bd||yd),na=Mb?document.documentMode:bd?+bd[1]:yd?+yd[1]:0,Kn=!fn&&/gecko\/(\d+)/i.test(ca);Kn&&+(/Firefox\/(\d+)/.exec(ca)||[0,0])[1];const kd=!fn&&/Chrome\/(\d+)/.exec(ca),zr=!!kd,Ab=kd?+kd[1]:0,Kr=!fn&&!!ui&&/Apple Computer/.test(ui.vendor),Bo=Kr&&(/Mobile\/\w+/.test(ca)||!!ui&&ui.maxTouchPoints>2),Bn=Bo||(ui?/Mac/.test(ui.platform):!1),aee=ui?/Win/.test(ui.platform):!1,Ni=/Android \d/.test(ca),qs=!!zv&&"webkitFontSmoothing"in zv.documentElement.style,oee=qs?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function see(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 xi(r,e){return typeof r=="number"?r:r[e]}function lee(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 Vv(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?see(a):lee(s),p=0,k=0;if(e.top<f.top+xi(n,"top")?k=-(f.top-e.top+xi(i,"top")):e.bottom>f.bottom-xi(n,"bottom")&&(k=e.bottom-e.top>f.bottom-f.top?e.top+xi(i,"top")-f.top:e.bottom-f.bottom+xi(i,"bottom")),e.left<f.left+xi(n,"left")?p=-(f.left-e.left+xi(i,"left")):e.right>f.right-xi(n,"right")&&(p=e.right-f.right+xi(i,"right")),p||k)if(l)a.defaultView.scrollBy(p,k);else{let x=s.scrollLeft,E=s.scrollTop;k&&(s.scrollTop+=k),p&&(s.scrollLeft+=p);let P=s.scrollLeft-x,F=s.scrollTop-E;e={left:e.left-P,top:e.top-F,right:e.right-P,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 uee(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:Ob(r.dom)}}function Ob(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 cee({refDOM:r,refTop:e,stack:t}){let n=r?r.getBoundingClientRect().top:0;Nb(t,n==0?0:n-e)}function Nb(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 bo=null;function fee(r){if(r.setActive)return r.setActive();if(bo)return r.focus(bo);let e=Ob(r);r.focus(bo==null?{get preventScroll(){return bo={preventScroll:!0},!0}}:void 0),bo||(bo=!1,Nb(e,0))}function Db(r,e){let t,n=2e8,i,a=0,o=e.top,s=e.top,l,f;for(let p=r.firstChild,k=0;p;p=p.nextSibling,k++){let T;if(p.nodeType==1)T=p.getClientRects();else if(p.nodeType==3)T=Mi(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 P=E.left>e.left?E.left-e.left:E.right<e.left?e.left-E.right:0;if(P<n){t=p,n=P,i=P&&t.nodeType==3?{left:E.right<e.left?E.right:E.left,top:e.top}:e,p.nodeType==1&&P&&(a=k+(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=k+1)}}return!t&&l&&(t=l,i=f,n=0),t&&t.nodeType==3?dee(t,i):!t||n&&t.nodeType==1?{node:r,offset:a}:Db(t,i)}function dee(r,e){let t=r.nodeValue.length,n=document.createRange();for(let i=0;i<t;i++){n.setEnd(r,i+1),n.setStart(r,i);let a=Ki(n,1);if(a.top!=a.bottom&&ih(e,a))return{node:r,offset:i+(e.left>=(a.left+a.right)/2?1:0)}}return{node:r,offset:0}}function ih(r,e){return r.left>=e.left-1&&r.left<=e.right+1&&r.top>=e.top-1&&r.top<=e.bottom+1}function hee(r,e){let t=r.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<r.getBoundingClientRect().left?t:r}function pee(r,e,t){let{node:n,offset:i}=Db(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 vee(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&&(!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 Lb(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(ih(e,f))return Lb(o,e,f)}}if((a=(a+1)%n)==i)break}return r}function mee(r,e){let t=r.dom.ownerDocument,n,i=0,a=iee(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(!ih(e,f)||(o=Lb(r.dom,e,f),!o))return null}if(Kr)for(let f=o;n&&f;f=Po(f))f.draggable&&(n=void 0);if(o=hee(o,e),n){if(Kn&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let p=n.childNodes[i],k;p.nodeName=="IMG"&&(k=p.getBoundingClientRect()).right<=e.left&&k.bottom>e.top&&i++}let f;qs&&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=vee(r,n,i,e))}s==null&&(s=pee(r,o,e));let l=r.docView.nearestDesc(o,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function Uv(r){return r.top<r.bottom||r.left<r.right}function Ki(r,e){let t=r.getClientRects();if(t.length){let n=t[e<0?0:t.length-1];if(Uv(n))return n}return Array.prototype.find.call(t,Uv)||r.getBoundingClientRect()}const gee=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Rb(r,e,t){let{node:n,offset:i,atom:a}=r.docView.domFromPos(e,t<0?-1:1),o=qs||Kn;if(n.nodeType==3)if(o&&(gee.test(n.nodeValue)||(t<0?!i:i==n.nodeValue.length))){let l=Ki(Mi(n,i,i),t);if(Kn&&i&&/\s/.test(n.nodeValue[i-1])&&i<n.nodeValue.length){let f=Ki(Mi(n,i-1,i-1),-1);if(f.top==l.top){let p=Ki(Mi(n,i,i+1),-1);if(p.top!=l.top)return us(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++,us(Ki(Mi(n,l,f),p),p<0)}if(!r.state.doc.resolve(e-(a||0)).parent.inlineContent){if(a==null&&i&&(t<0||i==Fn(n))){let l=n.childNodes[i-1];if(l.nodeType==1)return Df(l.getBoundingClientRect(),!1)}if(a==null&&i<Fn(n)){let l=n.childNodes[i];if(l.nodeType==1)return Df(l.getBoundingClientRect(),!0)}return Df(n.getBoundingClientRect(),t>=0)}if(a==null&&i&&(t<0||i==Fn(n))){let l=n.childNodes[i-1],f=l.nodeType==3?Mi(l,Fn(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(f)return us(Ki(f,1),!1)}if(a==null&&i<Fn(n)){let l=n.childNodes[i];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let f=l?l.nodeType==3?Mi(l,0,o?0:1):l.nodeType==1?l:null:null;if(f)return us(Ki(f,-1),!0)}return us(Ki(n.nodeType==3?Mi(n):n,-t),t>=0)}function us(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 Df(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 Ib(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 yee(r,e,t){let n=e.selection,i=t=="up"?n.$from:n.$to;return Ib(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=Rb(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=Mi(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 bee=/[\u0590-\u08ac]/;function kee(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?!bee.test(n.parent.textContent)||!s.modify?t=="left"||t=="backward"?a:o:Ib(r,e,()=>{let{focusNode:l,focusOffset:f,anchorNode:p,anchorOffset:k}=r.domSelectionRange(),T=s.caretBidiLevel;s.modify("move",t,"character");let x=n.depth?r.docView.domAfterPos(n.before()):r.dom,{focusNode:E,focusOffset:P}=r.domSelectionRange(),F=E&&!x.contains(E.nodeType==1?E:E.parentNode)||l==E&&f==P;try{s.collapse(p,k),l&&(l!=p||f!=k)&&s.extend&&s.extend(l,f)}catch{}return T!=null&&(s.caretBidiLevel=T),F}):n.pos==n.start()||n.pos==n.end()}let $v=null,Wv=null,jv=!1;function wee(r,e,t){return $v==e&&Wv==t?jv:($v=e,Wv=t,jv=t=="up"||t=="down"?yee(r,e,t):kee(r,e,t))}const qn=0,Gv=1,Ba=2,ci=3;class Hs{constructor(e,t,n,i){this.parent=e,this.children=t,this.dom=n,this.contentDOM=i,this.dirty=qn,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>Lr(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 Bb){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 Pb&&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?Lr(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?Lr(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 k=s;k>0;k--){let T=this.children[k-1];if(T.size&&T.dom.parentNode==this.contentDOM&&!T.emptyChildAt(1)){i=Lr(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 k=this.children[p];if(k.size&&k.dom.parentNode==this.contentDOM&&!k.emptyChildAt(-1)){a=Lr(k.dom);break}t+=k.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 P=this.children[x],F=E+P.size;if(a>E&&o<F)return P.setSelection(e-E-P.border,t-E-P.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(),k=!1;if((Kn||Kr)&&e==t){let{node:x,offset:E}=s;if(x.nodeType==3){if(k=!!(E&&x.nodeValue[E-1]==`
|
|
6
|
-
`),k&&E==x.nodeValue.length)for(let P=x,F;P;P=P.parentNode){if(F=P.nextSibling){F.nodeName=="BR"&&(s=l={node:F.parentNode,offset:Lr(F)+1});break}let z=P.pmViewDesc;if(z&&z.node&&z.node.isBlock)break}}else{let P=x.childNodes[E-1];k=P&&(P.nodeName=="BR"||P.contentEditable=="false")}}if(Kn&&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||k&&Kr)&&ja(s.node,s.offset,p.anchorNode,p.anchorOffset)&&ja(l.node,l.offset,p.focusNode,p.focusOffset))return;let T=!1;if((f.extend||e==t)&&!k){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?Ba:Gv,e==s&&t==l&&(a.contentLost||a.dom.parentNode!=this.contentDOM)?a.dirty=ci:a.markDirty(e-s,t-s);return}else a.dirty=a.dom==a.contentDOM&&a.dom.parentNode==this.contentDOM&&!a.children.length?Ba:ci}n=o}this.dirty=Ba}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?Ba:Gv;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class Pb extends Hs{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==qn&&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 side(){return this.widget.type.side}}class Cee extends Hs{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 Ga extends Hs{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 Ga(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&ci||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ci&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=qn){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty<this.dirty&&(n.dirty=this.dirty),this.dirty=qn}}slice(e,t,n){let i=Ga.create(this.parent,this.mark,!0,n),a=this.children,o=this.size;t<o&&(a=Cd(a,t,o,n)),e>0&&(a=Cd(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 ia extends Hs{constructor(e,t,n,i,a,o,s,l,f){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,k=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:k}=Jo.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!k&&!t.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),t.type.spec.draggable&&(p.draggable=!0));let T=p;return p=Hb(p,n,t),f?l=new Tee(e,t,n,i,p,k||null,T,f,a,o+1):t.isText?new Du(e,t,n,i,p,T,a):new ia(e,t,n,i,p,k||null,T,a,o+1)}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=()=>Oe.empty)}return e}matchesNode(e,t,n){return this.dirty==qn&&e.eq(this.node)&&nu(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 xee(this,o&&o.node,e);Aee(this.node,this.innerDeco,(f,p,k)=>{f.spec.marks?l.syncToMarks(f.spec.marks,n,e):f.type.side>=0&&!k&&l.syncToMarks(p==this.node.childCount?Pt.none:this.node.child(p).marks,n,e),l.placeWidget(f,e,i)},(f,p,k,T)=>{l.syncToMarks(f.marks,n,e);let x;l.findNodeMatch(f,p,k,T)||s&&e.state.selection.from>i&&e.state.selection.to<i+f.nodeSize&&(x=l.findIndexWithChild(a.node))>-1&&l.updateNodeAt(f,p,k,x,e)||l.updateNextNode(f,p,k,e,T,i)||l.addNode(f,p,k,e,i),i+=f.nodeSize}),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Ba)&&(o&&this.protectLocalComposition(e,o),Fb(this.contentDOM,this.children,e),Bo&&Oee(this.dom))}localCompositionInfo(e,t){let{from:n,to:i}=e.state.selection;if(!(e.state.selection instanceof Mt)||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=Nee(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 Cee(this,a,t,i);e.input.compositionNodes.push(o),this.children=Cd(this.children,n,n+i.length,e,o)}update(e,t,n,i){return this.dirty==ci||!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=qn}updateOuterDeco(e){if(nu(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=qb(this.dom,this.nodeDOM,wd(this.outerDeco,this.node,t),wd(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.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Kv(r,e,t,n,i){Hb(n,e,r);let a=new ia(void 0,r,e,t,n,n,n,i,0);return a.contentDOM&&a.updateChildren(i,0),a}class Du extends ia{constructor(e,t,n,i,a,o,s){super(e,t,n,i,a,null,o,s,0)}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==ci||this.dirty!=qn&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=qn||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=qn,!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 Du(this.parent,i,this.outerDeco,this.innerDeco,a,a,n)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=ci)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Bb extends Hs{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==qn&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Tee extends ia{constructor(e,t,n,i,a,o,s,l,f,p){super(e,t,n,i,a,o,s,f,p),this.spec=l}update(e,t,n,i){if(this.dirty==ci)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 Fb(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=Jv(n),i=!0;n=n.nextSibling}else i=!0,r.insertBefore(s,n);if(o instanceof Ga){let l=n?n.previousSibling:r.lastChild;Fb(o.contentDOM,o.children,t),n=l?l.nextSibling:r.firstChild}}for(;n;)n=Jv(n),i=!0;i&&t.trackWrites==r&&(t.trackWrites=null)}const Cs=function(r){r&&(this.nodeName=r)};Cs.prototype=Object.create(null);const Fa=[new Cs];function wd(r,e,t){if(r.length==0)return Fa;let n=t?Fa[0]:new Cs,i=[n];for(let a=0;a<r.length;a++){let o=r[a].type.attrs;if(o){o.nodeName&&i.push(n=new Cs(o.nodeName));for(let s in o){let l=o[s];l!=null&&(t&&i.length==1&&i.push(n=new Cs(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 qb(r,e,t,n){if(t==Fa&&n==Fa)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=Fa[0]),i=l}See(i,s||Fa[0],o)}return i}function See(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 Hb(r,e,t){return qb(r,r,Fa,wd(e,t,r.nodeType!=1))}function nu(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 Jv(r){let e=r.nextSibling;return r.parentNode.removeChild(r),e}class xee{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Eee(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){let i=0,a=this.stack.length>>1,o=Math.min(a,e.length);for(;i<o&&(i==a-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<a;)this.destroyRest(),this.top.dirty=qn,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let s=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let f=this.top.children[l];if(f.matchesMark(e[a])&&!this.isLocked(f.dom)){s=l;break}}if(s>-1)s>this.index&&(this.changed=!0,this.destroyBetween(this.index,s)),this.top=this.top.children[this.index];else{let l=Ga.create(this.top,e[a],t,n);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,a++}}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==ci&&o.dom==o.contentDOM&&(o.dirty=Ba),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 ia){let f=this.preMatch.matched.get(l);if(f!=null&&f!=a)return!1;let p=l.dom,k,T=this.isLocked(p)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=ci&&nu(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&&(k=this.recreateWrapper(l,e,t,n,i,o)))return this.destroyBetween(this.index,s),this.top.children[this.index]=k,k.contentDOM&&(k.dirty=Ba,k.updateChildren(i,o+1),k.dirty=qn),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)||!nu(n,e.outerDeco)||!i.eq(e.innerDeco))return null;let s=ia.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=ia.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 Pb(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 Ga;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Du)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Kr||zr)&&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 Bb(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 Eee(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 Ga)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 Mee(r,e){return r.type.side-e.type.side}function Aee(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,k;for(;o<i.length&&i[o].to==a;){let F=i[o++];F.widget&&(p?(k||(k=[p])).push(F):p=F)}if(p)if(k){k.sort(Mee);for(let F=0;F<k.length;F++)t(k[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 z=0;z<s.length;z++)s[z].to<F&&(F=s[z].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 P=T.isInline&&!T.isLeaf?s.filter(F=>!F.inline):s.slice();n(T,P,e.forChild(a,T),x),a=E}}function Oee(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 Nee(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 Cd(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 ah(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(Nu(t)){for(l=o;i&&!i.node;)i=i.parent;let k=i.node;if(i&&k.isAtom&&ft.isSelectable(k)&&i.parent&&!(k.isInline&&ree(t.focusNode,t.focusOffset,i.dom))){let T=i.posBefore;f=new ft(o==T?s:n.resolve(T))}}else{if(t instanceof r.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let k=o,T=o;for(let x=0;x<t.rangeCount;x++){let E=t.getRangeAt(x);k=Math.min(k,r.docView.posFromDOM(E.startContainer,E.startOffset,1)),T=Math.max(T,r.docView.posFromDOM(E.endContainer,E.endOffset,-1))}if(k<0)return null;[l,o]=T==r.state.selection.anchor?[T,k]:[k,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 k=e=="pointer"||r.state.selection.head<s.pos&&!a?1:-1;f=oh(r,p,s,k)}return f}function _b(r){return r.editable?r.hasFocus():Vb(r)&&document.activeElement&&document.activeElement.contains(r.dom)}function Li(r,e=!1){let t=r.state.selection;if(zb(r,t),!!_b(r)){if(!e&&r.input.mouseDown&&r.input.mouseDown.allowDefault&&zr){let n=r.domSelectionRange(),i=r.domObserver.currentSelection;if(n.anchorNode&&i.anchorNode&&ja(n.anchorNode,n.anchorOffset,i.anchorNode,i.anchorOffset)){r.input.mouseDown.delayedSelectionSync=!0,r.domObserver.setCurSelection();return}}if(r.domObserver.disconnectSelection(),r.cursorWrapper)Lee(r);else{let{anchor:n,head:i}=t,a,o;Yv&&!(t instanceof Mt)&&(t.$from.parent.inlineContent||(a=Xv(r,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(o=Xv(r,t.to))),r.docView.setSelection(n,i,r,e),Yv&&(a&&Zv(a),o&&Zv(o)),t.visible?r.dom.classList.remove("ProseMirror-hideselection"):(r.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Dee(r))}r.domObserver.setCurSelection(),r.domObserver.connectSelection()}}const Yv=Kr||zr&&Ab<63;function Xv(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(Kr&&i&&i.contentEditable=="false")return Lf(i);if((!i||i.contentEditable=="false")&&(!a||a.contentEditable=="false")){if(i)return Lf(i);if(a)return Lf(a)}}function Lf(r){return r.contentEditable="true",Kr&&r.draggable&&(r.draggable=!1,r.wasDraggable=!0),r}function Zv(r){r.contentEditable="false",r.wasDraggable&&(r.draggable=!0,r.wasDraggable=null)}function Dee(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 Lee(r){let e=r.domSelection(),t=document.createRange();if(!e)return;let n=r.cursorWrapper.dom,i=n.nodeName=="IMG";i?t.setStart(n.parentNode,Lr(n)+1):t.setStart(n,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!i&&!r.state.selection.visible&&fn&&na<=11&&(n.disabled=!0,n.disabled=!1)}function zb(r,e){if(e instanceof ft){let t=r.docView.descAt(e.from);t!=r.lastSelectedViewDesc&&(Qv(r),t&&t.selectNode(),r.lastSelectedViewDesc=t)}else Qv(r)}function Qv(r){r.lastSelectedViewDesc&&(r.lastSelectedViewDesc.parent&&r.lastSelectedViewDesc.deselectNode(),r.lastSelectedViewDesc=void 0)}function oh(r,e,t,n){return r.someProp("createSelectionBetween",i=>i(r,e,t))||Mt.between(e,t,n)}function em(r){return r.editable&&!r.hasFocus()?!1:Vb(r)}function Vb(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 Ree(r){let e=r.docView.domFromPos(r.state.selection.anchor,0),t=r.domSelectionRange();return ja(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Td(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&&Tt.findFrom(a,e)}function Ji(r,e){return r.dispatch(r.state.tr.setSelection(e).scrollIntoView()),!0}function tm(r,e,t){let n=r.state.selection;if(n instanceof Mt)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 Ji(r,new Mt(n.$anchor,o))}else if(n.empty){if(r.endOfTextblock(e>0?"forward":"backward")){let i=Td(r.state,e);return i&&i instanceof ft?Ji(r,i):!1}else if(!(Bn&&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?ft.isSelectable(a)?Ji(r,new ft(e<0?r.state.doc.resolve(i.pos-a.nodeSize):i)):qs?Ji(r,new Mt(r.state.doc.resolve(e<0?s:s+a.nodeSize))):!1:!1}}else return!1;else{if(n instanceof ft&&n.node.isInline)return Ji(r,new Mt(e>0?n.$to:n.$from));{let i=Td(r.state,e);return i?Ji(r,i):!1}}}function iu(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function Ts(r,e){let t=r.pmViewDesc;return t&&t.size==0&&(e<0||r.nextSibling||r.nodeName!="BR")}function ko(r,e){return e<0?Iee(r):Pee(r)}function Iee(r){let e=r.domSelectionRange(),t=e.focusNode,n=e.focusOffset;if(!t)return;let i,a,o=!1;for(Kn&&t.nodeType==1&&n<iu(t)&&Ts(t.childNodes[n],-1)&&(o=!0);;)if(n>0){if(t.nodeType!=1)break;{let s=t.childNodes[n-1];if(Ts(s,-1))i=t,a=--n;else if(s.nodeType==3)t=s,n=t.nodeValue.length;else break}}else{if(Ub(t))break;{let s=t.previousSibling;for(;s&&Ts(s,-1);)i=t.parentNode,a=Lr(s),s=s.previousSibling;if(s)t=s,n=iu(t);else{if(t=t.parentNode,t==r.dom)break;n=0}}}o?Sd(r,t,n):i&&Sd(r,i,a)}function Pee(r){let e=r.domSelectionRange(),t=e.focusNode,n=e.focusOffset;if(!t)return;let i=iu(t),a,o;for(;;)if(n<i){if(t.nodeType!=1)break;let s=t.childNodes[n];if(Ts(s,1))a=t,o=++n;else break}else{if(Ub(t))break;{let s=t.nextSibling;for(;s&&Ts(s,1);)a=s.parentNode,o=Lr(s)+1,s=s.nextSibling;if(s)t=s,n=0,i=iu(t);else{if(t=t.parentNode,t==r.dom)break;n=i=0}}}a&&Sd(r,a,o)}function Ub(r){let e=r.pmViewDesc;return e&&e.node&&e.node.isBlock}function Bee(r,e){for(;r&&e==r.childNodes.length&&!Fs(r);)e=Lr(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 Fee(r,e){for(;r&&!e&&!Fs(r);)e=Lr(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 Sd(r,e,t){if(e.nodeType!=3){let a,o;(o=Bee(e,t))?(e=o,t=0):(a=Fee(e,t))&&(e=a,t=a.nodeValue.length)}let n=r.domSelection();if(!n)return;if(Nu(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&&Li(r)},50)}function rm(r,e){let t=r.state.doc.resolve(e);if(!(zr||aee)&&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 nm(r,e,t){let n=r.state.selection;if(n instanceof Mt&&!n.empty||t.indexOf("s")>-1||Bn&&t.indexOf("m")>-1)return!1;let{$from:i,$to:a}=n;if(!i.parent.inlineContent||r.endOfTextblock(e<0?"up":"down")){let o=Td(r.state,e);if(o&&o instanceof ft)return Ji(r,o)}if(!i.parent.inlineContent){let o=e<0?i:a,s=n instanceof Gr?Tt.near(o,e):Tt.findFrom(o,e);return s?Ji(r,s):!1}return!1}function im(r,e){if(!(r.state.selection instanceof Mt))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 am(r,e,t){r.domObserver.stop(),e.contentEditable=t,r.domObserver.start()}function qee(r){if(!Kr||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;am(r,n,"true"),setTimeout(()=>am(r,n,"false"),20)}return!1}function Hee(r){let e="";return r.ctrlKey&&(e+="c"),r.metaKey&&(e+="m"),r.altKey&&(e+="a"),r.shiftKey&&(e+="s"),e}function _ee(r,e){let t=e.keyCode,n=Hee(e);if(t==8||Bn&&t==72&&n=="c")return im(r,-1)||ko(r,-1);if(t==46&&!e.shiftKey||Bn&&t==68&&n=="c")return im(r,1)||ko(r,1);if(t==13||t==27)return!0;if(t==37||Bn&&t==66&&n=="c"){let i=t==37?rm(r,r.state.selection.from)=="ltr"?-1:1:-1;return tm(r,i,n)||ko(r,i)}else if(t==39||Bn&&t==70&&n=="c"){let i=t==39?rm(r,r.state.selection.from)=="ltr"?1:-1:1;return tm(r,i,n)||ko(r,i)}else{if(t==38||Bn&&t==80&&n=="c")return nm(r,-1,n)||ko(r,-1);if(t==40||Bn&&t==78&&n=="c")return qee(r)||nm(r,1,n)||ko(r,1);if(n==(Bn?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function sh(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=Jb(),l=s.createElement("div");l.appendChild(o.serializeFragment(n,{document:s}));let f=l.firstChild,p,k=0;for(;f&&f.nodeType==1&&(p=Kb[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),k++}f=l.firstChild}f&&f.nodeType==1&&f.setAttribute("data-pm-slice",`${i} ${a}${k?` -${k}`:""} ${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 $b(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 e?new Ue(Oe.from(r.state.schema.text(e.replace(/\r\n?/g,`
|
|
9
|
-
`))),0,0):Ue.empty;let k=r.someProp("clipboardTextParser",T=>T(e,i,n,r));if(k)s=k;else{let T=i.marks(),{schema:x}=r.state,E=Jo.fromSchema(x);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(P=>{let F=o.appendChild(document.createElement("p"));P&&F.appendChild(E.serializeNode(x.text(P,T)))})}}else r.someProp("transformPastedHTML",k=>{t=k(t,r)}),o=$ee(t),qs&&Wee(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 k=+p[3];k>0;k--){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")||$a.fromSchema(r.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||p),context:i,ruleFromNode(T){return T.nodeName=="BR"&&!T.nextSibling&&T.parentNode&&!zee.test(T.parentNode.nodeName)?{ignore:!0}:null}})),p)s=jee(om(s,+p[1],+p[2]),p[4]);else if(s=Ue.maxOpen(Vee(s.content,i),!0),s.openStart||s.openEnd){let k=0,T=0;for(let x=s.content.firstChild;k<s.openStart&&!x.type.spec.isolating;k++,x=x.firstChild);for(let x=s.content.lastChild;T<s.openEnd&&!x.type.spec.isolating;T++,x=x.lastChild);s=om(s,k,T)}return r.someProp("transformPasted",k=>{s=k(s,r)}),s}const zee=/^(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 Vee(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&&jb(l,a,s,o[o.length-1],0))o[o.length-1]=f;else{o.length&&(o[o.length-1]=Gb(o[o.length-1],a.length));let p=Wb(s,l);o.push(p),i=i.matchType(p.type),a=l}}),o)return Oe.from(o)}return r}function Wb(r,e,t=0){for(let n=e.length-1;n>=t;n--)r=e[n].create(null,Oe.from(r));return r}function jb(r,e,t,n,i){if(i<r.length&&i<e.length&&r[i]==e[i]){let a=jb(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(Oe.from(Wb(t,r,i+1))))}}function Gb(r,e){if(e==0)return r;let t=r.content.replaceChild(r.childCount-1,Gb(r.lastChild,e-1)),n=r.contentMatchAt(r.childCount).fillBefore(Oe.empty,!0);return r.copy(t.append(n))}function xd(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=xd(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(Oe.empty,!0))),r.replaceChild(e<0?0:r.childCount-1,o.copy(s))}function om(r,e,t){return e<r.openStart&&(r=new Ue(xd(r.content,-1,e,r.openStart,0,r.openEnd),e,r.openEnd)),t<r.openEnd&&(r=new Ue(xd(r.content,1,t,r.openEnd,0,0),r.openStart,t)),r}const Kb={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let sm=null;function Jb(){return sm||(sm=document.implementation.createHTMLDocument("title"))}let Rf=null;function Uee(r){let e=window.trustedTypes;return e?(Rf||(Rf=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),Rf.createHTML(r)):r}function $ee(r){let e=/^(\s*<meta [^>]*>)*/.exec(r);e&&(r=r.slice(e[0].length));let t=Jb().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(r),i;if((i=n&&Kb[n[1].toLowerCase()])&&(r=i.map(a=>"<"+a+">").join("")+r+i.map(a=>"</"+a+">").reverse().join("")),t.innerHTML=Uee(r),i)for(let a=0;a<i.length;a++)t=t.querySelector(i[a])||t;return t}function Wee(r){let e=r.querySelectorAll(zr?"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 jee(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=Oe.from(l.create(n[s+1],i)),a++,o++}return new Ue(i,a,o)}const Jr={},Yr={},Gee={touchstart:!0,touchmove:!0};class Kee{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},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.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Jee(r){for(let e in Jr){let t=Jr[e];r.dom.addEventListener(e,r.input.eventHandlers[e]=n=>{Xee(r,n)&&!lh(r,n)&&(r.editable||!(n.type in Yr))&&t(r,n)},Gee[e]?{passive:!0}:void 0)}Kr&&r.dom.addEventListener("input",()=>null),Ed(r)}function ta(r,e){r.input.lastSelectionOrigin=e,r.input.lastSelectionTime=Date.now()}function Yee(r){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 Ed(r){r.someProp("handleDOMEvents",e=>{for(let t in e)r.input.eventHandlers[t]||r.dom.addEventListener(t,r.input.eventHandlers[t]=n=>lh(r,n))})}function lh(r,e){return r.someProp("handleDOMEvents",t=>{let n=t[e.type];return n?n(r,e)||e.defaultPrevented:!1})}function Xee(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 Zee(r,e){!lh(r,e)&&Jr[e.type]&&(r.editable||!(e.type in Yr))&&Jr[e.type](r,e)}Yr.keydown=(r,e)=>{let t=e;if(r.input.shiftKey=t.keyCode==16||t.shiftKey,!Xb(r,t)&&(r.input.lastKeyCode=t.keyCode,r.input.lastKeyCodeTime=Date.now(),!(Ni&&zr&&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,Ia(13,"Enter"))),r.input.lastIOSEnter=0)},200)}else r.someProp("handleKeyDown",n=>n(r,t))||_ee(r,t)?t.preventDefault():ta(r,"key")};Yr.keyup=(r,e)=>{e.keyCode==16&&(r.input.shiftKey=!1)};Yr.keypress=(r,e)=>{let t=e;if(Xb(r,t)||!t.charCode||t.ctrlKey&&!t.altKey||Bn&&t.metaKey)return;if(r.someProp("handleKeyPress",i=>i(r,t))){t.preventDefault();return}let n=r.state.selection;if(!(n instanceof Mt)||!n.$from.sameParent(n.$to)){let i=String.fromCharCode(t.charCode);!/[\r\n]/.test(i)&&!r.someProp("handleTextInput",a=>a(r,n.$from.pos,n.$to.pos,i))&&r.dispatch(r.state.tr.insertText(i).scrollIntoView()),t.preventDefault()}};function Lu(r){return{left:r.clientX,top:r.clientY}}function Qee(r,e){let t=e.x-r.clientX,n=e.y-r.clientY;return t*t+n*n<100}function uh(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 Ro(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 ete(r,e){if(e==-1)return!1;let t=r.state.doc.resolve(e),n=t.nodeAfter;return n&&n.isAtom&&ft.isSelectable(n)?(Ro(r,new ft(t)),!0):!1}function tte(r,e){if(e==-1)return!1;let t=r.state.selection,n,i;t instanceof ft&&(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(ft.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?(Ro(r,ft.create(r.state.doc,i)),!0):!1}function rte(r,e,t,n,i){return uh(r,"handleClickOn",e,t,n)||r.someProp("handleClick",a=>a(r,e,n))||(i?tte(r,t):ete(r,t))}function nte(r,e,t,n){return uh(r,"handleDoubleClickOn",e,t,n)||r.someProp("handleDoubleClick",i=>i(r,e,n))}function ite(r,e,t,n){return uh(r,"handleTripleClickOn",e,t,n)||r.someProp("handleTripleClick",i=>i(r,e,n))||ate(r,t,n)}function ate(r,e,t){if(t.button!=0)return!1;let n=r.state.doc;if(e==-1)return n.inlineContent?(Ro(r,Mt.create(n,0,n.content.size)),!0):!1;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)Ro(r,Mt.create(n,s+1,s+1+o.content.size));else if(ft.isSelectable(o))Ro(r,ft.create(n,s));else continue;return!0}}function ch(r){return au(r)}const Yb=Bn?"metaKey":"ctrlKey";Jr.mousedown=(r,e)=>{let t=e;r.input.shiftKey=t.shiftKey;let n=ch(r),i=Date.now(),a="singleClick";i-r.input.lastClick.time<500&&Qee(t,r.input.lastClick)&&!t[Yb]&&(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};let o=r.posAtCoords(Lu(t));o&&(a=="singleClick"?(r.input.mouseDown&&r.input.mouseDown.done(),r.input.mouseDown=new ote(r,o,t,!!n)):(a=="doubleClick"?nte:ite)(r,o.pos,o.inside,t)?t.preventDefault():ta(r,"pointer"))};class ote{constructor(e,t,n,i){this.view=e,this.pos=t,this.event=n,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[Yb],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.dom.nodeType==1?l.dom:null;let{selection:f}=e.state;(n.button==0&&a.type.spec.draggable&&a.type.spec.selectable!==!1||f instanceof ft&&f.from<=o&&f.to>o)&&(this.mightDrag={node:a,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Kn&&!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()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ta(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),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(()=>Li(this.view)),this.view.input.mouseDown=null}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(Lu(e))),this.updateAllowDefault(e),this.allowDefault||!t?ta(this.view,"pointer"):rte(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Kr&&this.mightDrag&&!this.mightDrag.node.isAtom||zr&&!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)?(Ro(this.view,Tt.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):ta(this.view,"pointer")}move(e){this.updateAllowDefault(e),ta(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Jr.touchstart=r=>{r.input.lastTouch=Date.now(),ch(r),ta(r,"pointer")};Jr.touchmove=r=>{r.input.lastTouch=Date.now(),ta(r,"pointer")};Jr.contextmenu=r=>ch(r);function Xb(r,e){return r.composing?!0:Kr&&Math.abs(e.timeStamp-r.input.compositionEndedAt)<500?(r.input.compositionEndedAt=-2e8,!0):!1}const ste=Ni?5e3:-1;Yr.compositionstart=Yr.compositionupdate=r=>{if(!r.composing){r.domObserver.flush();let{state:e}=r,t=e.selection.$to;if(e.selection instanceof Mt&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))r.markCursor=r.state.storedMarks||t.marks(),au(r,!0),r.markCursor=null;else if(au(r,!e.selection.empty),Kn&&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}Zb(r,ste)};Yr.compositionend=(r,e)=>{r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=e.timeStamp,r.input.compositionPendingChanges=r.domObserver.pendingRecords().length?r.input.compositionID:0,r.input.compositionNode=null,r.input.compositionPendingChanges&&Promise.resolve().then(()=>r.domObserver.flush()),r.input.compositionID++,Zb(r,20))};function Zb(r,e){clearTimeout(r.input.composingTimeout),e>-1&&(r.input.composingTimeout=setTimeout(()=>au(r),e))}function Qb(r){for(r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=ute());r.input.compositionNodes.length>0;)r.input.compositionNodes.pop().markParentsDirty()}function lte(r){let e=r.domSelectionRange();if(!e.focusNode)return null;let t=eee(e.focusNode,e.focusOffset),n=tee(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 ute(){let r=document.createEvent("Event");return r.initEvent("event",!0,!0),r.timeStamp}function au(r,e=!1){if(!(Ni&&r.domObserver.flushingSoon>=0)){if(r.domObserver.forceFlush(),Qb(r),e||r.docView&&r.docView.dirty){let t=ah(r);return t&&!t.eq(r.state.selection)?r.dispatch(r.state.tr.setSelection(t)):(r.markCursor||e)&&!r.state.selection.empty?r.dispatch(r.state.tr.deleteSelection()):r.updateState(r.state),!0}return!1}}function cte(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 Ns=fn&&na<15||Bo&&oee<604;Jr.copy=Yr.cut=(r,e)=>{let t=e,n=r.state.selection,i=t.type=="cut";if(n.empty)return;let a=Ns?null:t.clipboardData,o=n.content(),{dom:s,text:l}=sh(r,o);a?(t.preventDefault(),a.clearData(),a.setData("text/html",s.innerHTML),a.setData("text/plain",l)):cte(r,s),i&&r.dispatch(r.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function fte(r){return r.openStart==0&&r.openEnd==0&&r.content.childCount==1?r.content.firstChild:null}function dte(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?Ds(r,n.value,null,i,e):Ds(r,n.textContent,n.innerHTML,i,e)},50)}function Ds(r,e,t,n,i){let a=$b(r,e,t,n,r.state.selection.$from);if(r.someProp("handlePaste",l=>l(r,i,a||Ue.empty)))return!0;if(!a)return!1;let o=fte(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 ek(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," "):""}Yr.paste=(r,e)=>{let t=e;if(r.composing&&!Ni)return;let n=Ns?null:t.clipboardData,i=r.input.shiftKey&&r.input.lastKeyCode!=45;n&&Ds(r,ek(n),n.getData("text/html"),i,t)?t.preventDefault():dte(r,t)};class tk{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}const hte=Bn?"altKey":"ctrlKey";function rk(r,e){let t=r.someProp("dragCopies",n=>!n(e));return t??!e[hte]}Jr.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(Lu(t)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof ft?i.to-1:i.to))){if(n&&n.mightDrag)o=ft.create(r.state.doc,n.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let k=r.docView.nearestDesc(t.target,!0);k&&k.node.type.spec.draggable&&k!=r.docView&&(o=ft.create(r.state.doc,k.posBefore))}}let s=(o||r.state.selection).content(),{dom:l,text:f,slice:p}=sh(r,s);(!t.dataTransfer.files.length||!zr||Ab>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(Ns?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",Ns||t.dataTransfer.setData("text/plain",f),r.dragging=new tk(p,rk(r,t),o)};Jr.dragend=r=>{let e=r.dragging;window.setTimeout(()=>{r.dragging==e&&(r.dragging=null)},50)};Yr.dragover=Yr.dragenter=(r,e)=>e.preventDefault();Yr.drop=(r,e)=>{let t=e,n=r.dragging;if(r.dragging=null,!t.dataTransfer)return;let i=r.posAtCoords(Lu(t));if(!i)return;let a=r.state.doc.resolve(i.pos),o=n&&n.slice;o?r.someProp("transformPasted",E=>{o=E(o,r)}):o=$b(r,ek(t.dataTransfer),Ns?null:t.dataTransfer.getData("text/html"),!1,a);let s=!!(n&&rk(r,t));if(r.someProp("handleDrop",E=>E(r,t,o||Ue.empty,s))){t.preventDefault();return}if(!o)return;t.preventDefault();let l=o?zQ(r.state.doc,a.pos,o):a.pos;l==null&&(l=a.pos);let f=r.state.tr;if(s){let{node:E}=n;E?E.replace(f):f.deleteSelection()}let p=f.mapping.map(l),k=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,T=f.doc;if(k?f.replaceRangeWith(p,p,o.content.firstChild):f.replaceRange(p,p,o),f.doc.eq(T))return;let x=f.doc.resolve(p);if(k&&ft.isSelectable(o.content.firstChild)&&x.nodeAfter&&x.nodeAfter.sameMarkup(o.content.firstChild))f.setSelection(new ft(x));else{let E=f.mapping.map(l);f.mapping.maps[f.mapping.maps.length-1].forEach((P,F,z,Y)=>E=Y),f.setSelection(oh(r,x,f.doc.resolve(E)))}r.focus(),r.dispatch(f.setMeta("uiEvent","drop"))};Jr.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())&&Li(r)},20))};Jr.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)};Jr.beforeinput=(r,e)=>{if(zr&&Ni&&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,Ia(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 Yr)Jr[r]=Yr[r];function Ls(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 ou{constructor(e,t){this.toDOM=e,this.spec=t||_a,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 cn(a-n,a-n,this)}valid(){return!0}eq(e){return this==e||e instanceof ou&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Ls(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class aa{constructor(e,t){this.attrs=e,this.spec=t||_a}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 cn(a,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof aa&&Ls(this.attrs,e.attrs)&&Ls(this.spec,e.spec)}static is(e){return e.type instanceof aa}destroy(){}}class fh{constructor(e,t){this.attrs=e,this.spec=t||_a}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 cn(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 fh&&Ls(this.attrs,e.attrs)&&Ls(this.spec,e.spec)}destroy(){}}class cn{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new cn(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 cn(e,e,new ou(t,n))}static inline(e,t,n,i){return new cn(e,t,new aa(n,i))}static node(e,t,n,i){return new cn(e,t,new fh(n,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof aa}get widget(){return this.type instanceof ou}}const Eo=[],_a={};class sr{constructor(e,t){this.local=e.length?e:Eo,this.children=t.length?t:Eo}static create(e,t){return t.length?su(t,e,0,_a):Hr}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==Hr||e.maps.length==0?this:this.mapInner(e,t,0,0,n||_a)}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?pte(this.children,o||[],e,t,n,i,a):o?new sr(o.sort(za),Eo):Hr}add(e,t){return t.length?this==Hr?sr.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=ik(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,su(p,s,f+1,_a)),a+=3}});let o=nk(a?ak(t):t,-n);for(let s=0;s<o.length;s++)o[s].type.valid(e,o[s])||o.splice(s--,1);return new sr(o.length?this.local.concat(o).sort(za):this.local,i||this.children)}remove(e){return e.length==0||this==Hr?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,k;p<e.length;p++)(k=e[p])&&k.from>s&&k.to<l&&(e[p]=null,(o||(o=[])).push(k));if(!o)continue;n==this.children&&(n=this.children.slice());let f=n[a+2].removeInner(o,s+1);f!=Hr?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 sr(i,n):Hr}forChild(e,t){if(this==Hr)return this;if(t.isLeaf)return sr.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 aa){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 sr(i.sort(za),Eo);return n?new Xi([s,n]):s}return n||Hr}eq(e){if(this==e)return!0;if(!(e instanceof sr)||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 dh(this.localsInner(e))}localsInner(e){if(this==Hr)return Eo;if(e.inlineContent||!this.local.some(aa.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof aa||t.push(this.local[n]);return t}forEachSet(e){e(this)}}sr.empty=new sr([],[]);sr.removeOverlap=dh;const Hr=sr.empty;class Xi{constructor(e){this.members=e}map(e,t){const n=this.members.map(i=>i.map(e,t,_a));return Xi.from(n)}forChild(e,t){if(t.isLeaf)return sr.empty;let n=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(e,t);a!=Hr&&(a instanceof Xi?n=n.concat(a.members):n.push(a))}return Xi.from(n)}eq(e){if(!(e instanceof Xi)||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?dh(n?t:t.sort(za)):Eo}static from(e){switch(e.length){case 0:return Hr;case 1:return e[0];default:return new Xi(e.every(t=>t instanceof sr)?e:e.reduce((t,n)=>t.concat(n instanceof sr?n:n.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function pte(r,e,t,n,i,a,o){let s=r.slice();for(let f=0,p=a;f<t.maps.length;f++){let k=0;t.maps[f].forEach((T,x,E,P)=>{let F=P-E-(x-T);for(let z=0;z<s.length;z+=3){let Y=s[z+1];if(Y<0||T>Y+p-k)continue;let Z=s[z]+p-k;x>=Z?s[z+1]=T<=Z?-2:-1:T>=p&&F&&(s[z]+=F,s[z+1]+=F)}k+=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),k=p-i;if(k<0||k>=n.content.size){l=!0;continue}let T=t.map(r[f+1]+a,-1),x=T-i,{index:E,offset:P}=n.content.findIndex(k),F=n.maybeChild(E);if(F&&P==k&&P+F.nodeSize==x){let z=s[f+2].mapInner(t,F,p+1,r[f]+a+1,o);z!=Hr?(s[f]=k,s[f+1]=x,s[f+2]=z):(s[f+1]=-2,l=!0)}else l=!0}if(l){let f=vte(s,r,e,t,i,a,o),p=su(f,n,0,o);e=p.local;for(let k=0;k<s.length;k+=3)s[k+1]<0&&(s.splice(k,3),k-=3);for(let k=0,T=0;k<p.children.length;k+=3){let x=p.children[k];for(;T<s.length&&s[T]<x;)T+=3;s.splice(T,0,p.children[k],p.children[k+1],p.children[k+2])}}return new sr(e.sort(za),s)}function nk(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 cn(i.from+e,i.to+e,i.type))}return t}function vte(r,e,t,n,i,a,o){function s(l,f){for(let p=0;p<l.local.length;p++){let k=l.local[p].map(n,i,f);k?t.push(k):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 ik(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 ak(r){let e=[];for(let t=0;t<r.length;t++)r[t]!=null&&e.push(r[t]);return e}function su(r,e,t,n){let i=[],a=!1;e.forEach((s,l)=>{let f=ik(r,s,l+t);if(f){a=!0;let p=su(f,s,t+l+1,n);p!=Hr&&i.push(l,l+s.nodeSize,p)}});let o=nk(a?ak(r):r,-t).sort(za);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 sr(o,i):Hr}function za(r,e){return r.from-e.from||r.to-e.to}function dh(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),lm(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),lm(e,i,n.copy(a.from,n.to)));break}}}return e}function lm(r,e,t){for(;e<r.length&&za(t,r[e])>0;)e++;r.splice(e,0,t)}function If(r){let e=[];return r.someProp("decorations",t=>{let n=t(r.state);n&&n!=Hr&&e.push(n)}),r.cursorWrapper&&e.push(sr.create(r.state.doc,[r.cursorWrapper.deco])),Xi.from(e)}const mte={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},gte=fn&&na<=11;class yte{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 bte{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new yte,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]);fn&&na<=11&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),gte&&(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,mte)),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(em(this.view)){if(this.suppressingSelectionUpdates)return Li(this.view);if(fn&&na<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ja(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)&&em(e)&&!this.ignoreSelectionChange(n),a=-1,o=-1,s=!1,l=[];if(e.editable)for(let p=0;p<t.length;p++){let k=this.registerMutation(t[p],l);k&&(a=a<0?k.from:Math.min(k.from,a),o=o<0?k.to:Math.max(k.to,o),k.typeOver&&(s=!0))}if(Kn&&l.length){let p=l.filter(k=>k.nodeName=="BR");if(p.length==2){let[k,T]=p;k.parentNode&&k.parentNode.parentNode==T.parentNode?T.remove():k.remove()}else{let{focusNode:k}=this.currentSelection;for(let T of p){let x=T.parentNode;x&&x.nodeName=="LI"&&(!k||Cte(e,k)!=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&&Nu(n)&&(f=ah(e))&&f.eq(Tt.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Li(e),this.currentSelection.set(n),e.scrollToSelection()):(a>-1||i)&&(a>-1&&(e.docView.markDirty(a,o),kte(e)),this.handleDOMChange(a,o,s,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Li(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 k=e.addedNodes[p];t.push(k),k.nodeType==3&&(this.lastChangedTextNode=k)}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(fn&&na<=11&&e.addedNodes.length)for(let p=0;p<e.addedNodes.length;p++){let{previousSibling:k,nextSibling:T}=e.addedNodes[p];(!k||Array.prototype.indexOf.call(e.addedNodes,k)<0)&&(i=k),(!T||Array.prototype.indexOf.call(e.addedNodes,T)<0)&&(a=T)}let o=i&&i.parentNode==e.target?Lr(i)+1:0,s=n.localPosFromDOM(e.target,o,-1),l=a&&a.parentNode==e.target?Lr(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 um=new WeakMap,cm=!1;function kte(r){if(!um.has(r)&&(um.set(r,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(r.dom).whiteSpace)!==-1)){if(r.requiresGeckoHackNode=Kn,cm)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."),cm=!0}}function fm(r,e){let t=e.startContainer,n=e.startOffset,i=e.endContainer,a=e.endOffset,o=r.domAtPos(r.state.selection.anchor);return ja(o.node,o.offset,i,a)&&([t,n,i,a]=[i,a,t,n]),{anchorNode:t,anchorOffset:n,focusNode:i,focusOffset:a}}function wte(r,e){if(e.getComposedRanges){let i=e.getComposedRanges(r.root)[0];if(i)return fm(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?fm(r,t):null}function Cte(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 Tte(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}],Nu(l)||f.push({node:l.focusNode,offset:l.focusOffset})),zr&&r.input.lastKeyCode===8)for(let F=a;F>i;F--){let z=n.childNodes[F-1],Y=z.pmViewDesc;if(z.nodeName=="BR"&&!Y){a=F;break}if(!Y||Y.size)break}let k=r.state.doc,T=r.someProp("domParser")||$a.fromSchema(r.state.schema),x=k.resolve(o),E=null,P=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:Ste,context:x});if(f&&f[0].pos!=null){let F=f[0].pos,z=f[1]&&f[1].pos;z==null&&(z=F),E={anchor:F+o,head:z+o}}return{doc:P,sel:E,from:o,to:s}}function Ste(r){let e=r.pmViewDesc;if(e)return e.parseRule();if(r.nodeName=="BR"&&r.parentNode){if(Kr&&/^(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||Kr&&/^(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 xte=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Ete(r,e,t,n,i){let a=r.input.compositionPendingChanges||(r.composing?r.input.compositionID:0);if(r.input.compositionPendingChanges=0,e<0){let ye=r.input.lastSelectionTime>Date.now()-50?r.input.lastSelectionOrigin:null,Re=ah(r,ye);if(Re&&!r.state.selection.eq(Re)){if(zr&&Ni&&r.input.lastKeyCode===13&&Date.now()-100<r.input.lastKeyCodeTime&&r.someProp("handleKeyDown",Be=>Be(r,Ia(13,"Enter"))))return;let Ze=r.state.tr.setSelection(Re);ye=="pointer"?Ze.setMeta("pointer",!0):ye=="key"&&Ze.scrollIntoView(),a&&Ze.setMeta("composition",a),r.dispatch(Ze)}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=Tte(r,e,t),p=r.state.doc,k=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=Ote(k.content,f.doc.content,f.from,T,x);if(E&&r.input.domChangeCount++,(Bo&&r.input.lastIOSEnter>Date.now()-225||Ni)&&i.some(ye=>ye.nodeType==1&&!xte.test(ye.nodeName))&&(!E||E.endA>=E.endB)&&r.someProp("handleKeyDown",ye=>ye(r,Ia(13,"Enter")))){r.input.lastIOSEnter=0;return}if(!E)if(n&&l instanceof Mt&&!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 ye=dm(r,r.state.doc,f.sel);if(ye&&!ye.eq(r.state.selection)){let Re=r.state.tr.setSelection(ye);a&&Re.setMeta("composition",a),r.dispatch(Re)}}return}r.state.selection.from<r.state.selection.to&&E.start==E.endB&&r.state.selection instanceof Mt&&(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)),fn&&na<=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 P=f.doc.resolveNoCache(E.start-f.from),F=f.doc.resolveNoCache(E.endB-f.from),z=p.resolve(E.start),Y=P.sameParent(F)&&P.parent.inlineContent&&z.end()>=E.endA,Z;if((Bo&&r.input.lastIOSEnter>Date.now()-225&&(!Y||i.some(ye=>ye.nodeName=="DIV"||ye.nodeName=="P"))||!Y&&P.pos<f.doc.content.size&&(!P.sameParent(F)||!P.parent.inlineContent)&&!/\S/.test(f.doc.textBetween(P.pos,F.pos,"",""))&&(Z=Tt.findFrom(f.doc.resolve(P.pos+1),1,!0))&&Z.head>P.pos)&&r.someProp("handleKeyDown",ye=>ye(r,Ia(13,"Enter")))){r.input.lastIOSEnter=0;return}if(r.state.selection.anchor>E.start&&Ate(p,E.start,E.endA,P,F)&&r.someProp("handleKeyDown",ye=>ye(r,Ia(8,"Backspace")))){Ni&&zr&&r.domObserver.suppressSelectionUpdates();return}zr&&E.endB==E.start&&(r.input.lastChromeDelete=Date.now()),Ni&&!Y&&P.start()!=F.start()&&F.parentOffset==0&&P.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(ye){return ye(r,Ia(13,"Enter"))})},20));let oe=E.start,le=E.endA,re,he,ge;if(Y){if(P.pos==F.pos)fn&&na<=11&&P.parentOffset==0&&(r.domObserver.suppressSelectionUpdates(),setTimeout(()=>Li(r),20)),re=r.state.tr.delete(oe,le),he=p.resolve(E.start).marksAcross(p.resolve(E.endA));else if(E.endA==E.endB&&(ge=Mte(P.parent.content.cut(P.parentOffset,F.parentOffset),z.parent.content.cut(z.parentOffset,E.endA-z.start()))))re=r.state.tr,ge.type=="add"?re.addMark(oe,le,ge.mark):re.removeMark(oe,le,ge.mark);else if(P.parent.child(P.index()).isText&&P.index()==F.index()-(F.textOffset?0:1)){let ye=P.parent.textBetween(P.parentOffset,F.parentOffset);if(r.someProp("handleTextInput",Re=>Re(r,oe,le,ye)))return;re=r.state.tr.insertText(ye,oe,le)}}if(re||(re=r.state.tr.replace(oe,le,f.doc.slice(E.start-f.from,E.endB-f.from))),f.sel){let ye=dm(r,re.doc,f.sel);ye&&!(zr&&r.composing&&ye.empty&&(E.start!=E.endB||r.input.lastChromeDelete<Date.now()-100)&&(ye.head==oe||ye.head==re.mapping.map(le)-1)||fn&&ye.empty&&ye.head==oe)&&re.setSelection(ye)}he&&re.ensureMarks(he),a&&re.setMeta("composition",a),r.dispatch(re.scrollIntoView())}function dm(r,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:oh(r,e.resolve(t.anchor),e.resolve(t.head))}function Mte(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(Oe.from(f).eq(r))return{mark:s,type:o}}function Ate(r,e,t,n,i){if(t-e<=i.pos-n.pos||Pf(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(Pf(a,!0,!0));return!o.parent.isTextblock||o.pos>t||Pf(o,!0,!1)<t?!1:n.parent.content.cut(n.parentOffset).eq(o.parent.content)}function Pf(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 Ote(r,e,t,n,i){let a=r.findDiffStart(e,t);if(a==null)return null;let{a:o,b:s}=r.findDiffEnd(e,t+r.size,t+e.size);if(i=="end"){let l=Math.max(0,a-Math.min(o,s));n-=o+l-a}if(o<a&&r.size<e.size){let l=n<=a&&n>=o?a-n:0;a-=l,a&&a<e.size&&hm(e.textBetween(a-1,a+1))&&(a+=l?1:-1),s=a+(s-o),o=a}else if(s<a){let l=n<=a&&n>=s?a-n:0;a-=l,a&&a<r.size&&hm(r.textBetween(a-1,a+1))&&(a+=l?1:-1),o=a+(o-s),s=a}return{start:a,endA:o,endB:s}}function hm(r){if(r.length!=2)return!1;let e=r.charCodeAt(0),t=r.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class hh{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 Kee,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(ym),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=mm(this),vm(this),this.nodeViews=gm(this),this.docView=Kv(this.state.doc,pm(this),If(this),this.dom,this),this.domObserver=new bte(this,(n,i,a,o)=>Ete(this,n,i,a,o)),this.domObserver.start(),Jee(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&&Ed(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(ym),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&&(Qb(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=gm(this);Dte(x,this.nodeViews)&&(this.nodeViews=x,a=!0)}(s||t.handleDOMEvents!=this._props.handleDOMEvents)&&Ed(this),this.editable=mm(this),vm(this);let l=If(this),f=pm(this),p=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",k=a||!this.docView.matchesNode(e.doc,f,l);(k||!e.selection.eq(i.selection))&&(o=!0);let T=p=="preserve"&&o&&this.dom.style.overflowAnchor==null&&uee(this);if(o){this.domObserver.stop();let x=k&&(fn||zr)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&Nte(i.selection,e.selection);if(k){let E=zr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=lte(this)),(a||!this.docView.update(e.doc,f,l,this))&&(this.docView.updateOuterDeco(f),this.docView.destroy(),this.docView=Kv(e.doc,f,l,this.dom,this)),E&&!this.trackWrites&&(x=!0)}x||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Ree(this))?Li(this,x):(zb(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&&cee(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 ft){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Vv(this,t.getBoundingClientRect(),e)}else Vv(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(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&&this.state.doc.nodeAt(a))==n.node&&(i=a)}this.dragging=new tk(e.slice,e.move,i<0?void 0:ft.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(fn){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&&fee(this.dom),Li(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 mee(this,e)}coordsAtPos(e,t=1){return Rb(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 wee(this,t||this.state,e)}pasteHTML(e,t){return Ds(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Ds(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return sh(this,e)}destroy(){this.docView&&(Yee(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],If(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,ZQ())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Zee(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?Kr&&this.root.nodeType===11&&nee(this.dom.ownerDocument)==this.dom&&wte(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function pm(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"),[cn.node(0,r.state.doc.content.size,e)]}function vm(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:cn.widget(r.state.selection.from,e,{raw:!0,marks:r.markCursor})}}else r.cursorWrapper=null}function mm(r){return!r.someProp("editable",e=>e(r.state)===!1)}function Nte(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 gm(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 Dte(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 ym(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 Lte=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Rte(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))Lte?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 Ite(r){let e=Object.create(null);for(let t in r)e[Rte(t)]=r[t];return e}function Bf(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 Rs(r){return new hn({props:{handleKeyDown:Pte(r)}})}function Pte(r){let e=Ite(r);return function(t,n){let i=YZ(n),a,o=e[Bf(i,n)];if(o&&o(t.state,t.dispatch,t))return!0;if(i.length==1&&i!=" "){if(n.shiftKey){let s=e[Bf(i,n,!1)];if(s&&s(t.state,t.dispatch,t))return!0}if((n.shiftKey||n.altKey||n.metaKey||i.charCodeAt(0)>127)&&(a=XZ[n.keyCode])&&a!=i){let s=e[Bf(a,n)];if(s&&s(t.state,t.dispatch,t))return!0}}return!1}}const ph=(r,e)=>r.selection.empty?!1:(e&&e(r.tr.deleteSelection().scrollIntoView()),!0);function Bte(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("backward",r):t.parentOffset>0)?null:t}const Fte=(r,e,t)=>{let n=Bte(r,t);if(!n)return!1;let i=ok(n);if(!i){let o=n.blockRange(),s=o&&Au(o);return s==null?!1:(e&&e(r.tr.lift(o,s).scrollIntoView()),!0)}let a=i.nodeBefore;if(fk(r,i,e,-1))return!0;if(n.parent.content.size==0&&(Fo(a,"end")||ft.isSelectable(a)))for(let o=n.depth;;o--){let s=rh(r.doc,n.before(o),n.after(o),Ue.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=r.tr.step(s);l.setSelection(Fo(a,"end")?Tt.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):ft.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 qte=(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=ok(n)}let o=a&&a.nodeBefore;return!o||!ft.isSelectable(o)?!1:(e&&e(r.tr.setSelection(ft.create(r.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function ok(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 Hte(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("forward",r):t.parentOffset<t.parent.content.size)?null:t}const sk=(r,e,t)=>{let n=Hte(r,t);if(!n)return!1;let i=lk(n);if(!i)return!1;let a=i.nodeAfter;if(fk(r,i,e,1))return!0;if(n.parent.content.size==0&&(Fo(a,"start")||ft.isSelectable(a))){let o=rh(r.doc,n.before(),n.after(),Ue.empty);if(o&&o.slice.size<o.to-o.from){if(e){let s=r.tr.step(o);s.setSelection(Fo(a,"start")?Tt.findFrom(s.doc.resolve(s.mapping.map(i.pos)),1):ft.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},_te=(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=lk(n)}let o=a&&a.nodeAfter;return!o||!ft.isSelectable(o)?!1:(e&&e(r.tr.setSelection(ft.create(r.doc,a.pos)).scrollIntoView()),!0)};function lk(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 uk=(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 vh(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 mh=(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=vh(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(Tt.near(l.doc.resolve(s),1)),e(l.scrollIntoView())}return!0},zte=(r,e)=>{let t=r.selection,{$from:n,$to:i}=t;if(t instanceof Gr||n.parent.inlineContent||i.parent.inlineContent)return!1;let a=vh(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(Mt.create(s.doc,o+1)),e(s.scrollIntoView())}return!0},Vte=(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(Do(r.doc,a))return e&&e(r.tr.split(a).scrollIntoView()),!0}let n=t.blockRange(),i=n&&Au(n);return i==null?!1:(e&&e(r.tr.lift(n,i).scrollIntoView()),!0)};function Ute(r){return(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof ft&&e.selection.node.isBlock)return!n.parentOffset||!Do(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=vh(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 Mt||e.selection instanceof Gr)&&p.deleteSelection();let k=p.mapping.map(n.pos),T=Do(p.doc,k,a.length,a);if(T||(a[0]=s?{type:s}:null,T=Do(p.doc,k,a.length,a)),!T)return!1;if(p.split(k,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 $te=Ute(),ck=(r,e)=>(e&&e(r.tr.setSelection(new Gr(r.doc))),!0);function Wte(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||bb(r.doc,e.pos))?!1:(t&&t(r.tr.join(e.pos).scrollIntoView()),!0)}function fk(r,e,t,n){let i=e.nodeBefore,a=e.nodeAfter,o,s,l=i.type.spec.isolating||a.type.spec.isolating;if(!l&&Wte(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=Oe.empty;for(let z=o.length-1;z>=0;z--)E=Oe.from(o[z].create(null,E));E=Oe.from(i.copy(E));let P=r.tr.step(new Sr(e.pos-1,x,e.pos,x,new Ue(E,1,0),o.length,!0)),F=P.doc.resolve(x+2*o.length);F.nodeAfter&&F.nodeAfter.type==i.type&&bb(P.doc,F.pos)&&P.join(F.pos),t(P.scrollIntoView())}return!0}let p=a.type.spec.isolating||n>0&&l?null:Tt.findFrom(e,1),k=p&&p.$from.blockRange(p.$to),T=k&&Au(k);if(T!=null&&T>=e.depth)return t&&t(r.tr.lift(k,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 P=a,F=1;for(;!P.isTextblock;P=P.firstChild)F++;if(x.canReplace(x.childCount,x.childCount,P.content)){if(t){let z=Oe.empty;for(let Z=E.length-1;Z>=0;Z--)z=Oe.from(E[Z].copy(z));let Y=r.tr.step(new Sr(e.pos-E.length,e.pos+a.nodeSize,e.pos+F,e.pos+a.nodeSize-F,new Ue(z,E.length,0),0,!0));t(Y.scrollIntoView())}return!0}}return!1}function dk(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(Mt.create(e.doc,r<0?i.start(a):i.end(a)))),!0):!1}}const jte=dk(-1),Gte=dk(1);function Kte(r,e=null){return function(t,n){let{$from:i,$to:a}=t.selection,o=i.blockRange(a),s=o&&OQ(o,r,e);return s?(n&&n(t.tr.wrap(o,s).scrollIntoView()),!0):!1}}function gh(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),k=p.index();i=p.parent.canReplaceWith(k,k+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 Jte(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||!Jte(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:k,$to:T}=s[p];if(!l)f.removeMark(k.pos,T.pos,r);else{let x=k.pos,E=T.pos,P=k.nodeAfter,F=T.nodeBefore,z=P&&P.isText?/^\s*/.exec(P.text)[0].length:0,Y=F&&F.isText?/\s*$/.exec(F.text)[0].length:0;x+z<E&&(x+=z,E-=Y),f.addMark(x,E,r.create(e))}}i(f.scrollIntoView())}return!0}}function Ru(...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 Ff=Ru(ph,Fte,qte),bm=Ru(ph,sk,_te);const Ai={Enter:Ru(uk,zte,Vte,$te),"Mod-Enter":mh,Backspace:Ff,"Mod-Backspace":Ff,"Shift-Backspace":Ff,Delete:bm,"Mod-Delete":bm,"Mod-a":ck},hk={"Ctrl-h":Ai.Backspace,"Alt-Backspace":Ai["Mod-Backspace"],"Ctrl-d":Ai.Delete,"Ctrl-Alt-Backspace":Ai["Mod-Delete"],"Alt-Delete":Ai["Mod-Delete"],"Alt-d":Ai["Mod-Delete"],"Ctrl-a":jte,"Ctrl-e":Gte};for(let r in Ai)hk[r]=Ai[r];const Yte=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,km=Yte?hk:Ai;class fa{constructor(e,t,n={}){this.match=e,this.match=e,this.handler=typeof t=="string"?Xte(t):t,this.undoable=n.undoable!==!1,this.inCode=n.inCode||!1,this.inCodeMark=n.inCodeMark!==!1}}function Xte(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 Zte=500;function pk({rules:r}){let e=new hn({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 wm(t,n,i,a,r,e)},handleDOMEvents:{compositionend:t=>{setTimeout(()=>{let{$cursor:n}=t.state.selection;n&&wm(t,n.pos,n.pos,"",r,e)})}}},isInputRules:!0});return e}function wm(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-Zte),s.parentOffset,null,"")+n;for(let f=0;f<i.length;f++){let p=i[f];if(!p.inCodeMark&&s.marks().some(x=>x.type.spec.code))continue;if(s.parent.type.spec.code){if(!p.inCode)continue}else if(p.inCode==="only")continue;let k=p.match.exec(l),T=k&&k[0].length>=n.length&&p.handler(o,k,e-(k[0].length-n.length),t);if(T)return p.undoable&&T.setMeta(a,{transform:T,from:e,to:t,text:n}),r.dispatch(T),!0}return!1}const Qte=(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 fa(/--$/,"—",{inCodeMark:!1});new fa(/\.\.\.$/,"…",{inCodeMark:!1});new fa(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“",{inCodeMark:!1});new fa(/"$/,"”",{inCodeMark:!1});new fa(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘",{inCodeMark:!1});new fa(/'$/,"’",{inCodeMark:!1});var lu=200,xr=function(){};xr.prototype.append=function(e){return e.length?(e=xr.from(e),!this.length&&e||e.length<lu&&this.leafAppend(e)||this.length<lu&&e.leafPrepend(this)||this.appendInner(e)):this};xr.prototype.prepend=function(e){return e.length?xr.from(e).append(this):this};xr.prototype.appendInner=function(e){return new ere(this,e)};xr.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?xr.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};xr.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};xr.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)};xr.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};xr.from=function(e){return e instanceof xr?e:e&&e.length?new vk(e):xr.empty};var vk=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<=lu)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=lu)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}(xr);xr.empty=new vk([]);var ere=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}(xr);const tre=500;class $n{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((k,T)=>{if(!k.step){i||(i=this.remapping(n,T+1),a=i.maps.length),a--,p.push(k);return}if(i){p.push(new ai(k.map));let x=k.step.map(i.slice(a)),E;x&&o.maybeStep(x).doc&&(E=o.mapping.maps[o.mapping.maps.length-1],f.push(new ai(E,void 0,void 0,f.length+p.length))),a--,E&&i.appendMap(E,a)}else o.maybeStep(k.step);if(k.selection)return s=i?k.selection.map(i.slice(a)):k.selection,l=new $n(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 k=e.steps[p].invert(e.docs[p]),T=new ai(e.mapping.maps[p],k,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>nre&&(s=rre(s,f),o-=f),new $n(s.append(a),o)}remapping(e,t){let n=new As;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 $n(this.items.append(e.map(t=>new ai(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 P=e.steps[x].invert(e.docs[x]),F=T.selection&&T.selection.map(a.slice(l+1,x));F&&s++,n.push(new ai(E,P,F))}else n.push(new ai(E))},i);let f=[];for(let T=t;T<o;T++)f.push(new ai(a.maps[T]));let p=this.items.slice(0,i).append(f).append(n),k=new $n(p,s);return k.emptyItemCount()>tre&&(k=k.compress(this.items.length-n.length)),k}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 k=new ai(f.invert(),l,p),T,x=i.length-1;(T=i.length&&i[x].merge(k))?i[x]=T:i.push(k)}}else o.map&&n--},this.items.length,0),new $n(xr.from(i.reverse()),a)}}$n.empty=new $n(xr.empty,0);function rre(r,e){let t;return r.forEach((n,i)=>{if(n.selection&&e--==0)return t=i,!1}),r.slice(t)}class ai{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 ai(t.getMap().invert(),t,this.selection)}}}class Yi{constructor(e,t,n,i,a){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=i,this.prevComposition=a}}const nre=20;function ire(r,e,t,n){let i=t.getMeta(oa),a;if(i)return i.historyState;t.getMeta(sre)&&(r=new Yi(r.done,r.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return r;if(o&&o.getMeta(oa))return o.getMeta(oa).redo?new Yi(r.done.addTransform(t,void 0,n,$l(e)),r.undone,Cm(t.mapping.maps),r.prevTime,r.prevComposition):new Yi(r.done,r.undone.addTransform(t,void 0,n,$l(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||!are(t,r.prevRanges)),f=o?qf(r.prevRanges,t.mapping):Cm(t.mapping.maps);return new Yi(r.done.addTransform(t,l?e.selection.getBookmark():void 0,n,$l(e)),$n.empty,f,t.time,s??r.prevComposition)}else return(a=t.getMeta("rebased"))?new Yi(r.done.rebased(t,a),r.undone.rebased(t,a),qf(r.prevRanges,t.mapping),r.prevTime,r.prevComposition):new Yi(r.done.addMaps(t.mapping.maps),r.undone.addMaps(t.mapping.maps),qf(r.prevRanges,t.mapping),r.prevTime,r.prevComposition)}function are(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 Cm(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 qf(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 ore(r,e,t){let n=$l(e),i=oa.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 Yi(t?s:a.remaining,t?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(oa,{redo:t,historyState:l})}let Hf=!1,Tm=null;function $l(r){let e=r.plugins;if(Tm!=e){Hf=!1,Tm=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){Hf=!0;break}}return Hf}const oa=new Bs("history"),sre=new Bs("closeHistory");function mk(r={}){return r={depth:r.depth||100,newGroupDelay:r.newGroupDelay||500},new hn({key:oa,state:{init(){return new Yi($n.empty,$n.empty,null,0,-1)},apply(e,t,n){return ire(t,n,e,r)}},config:r,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,i=n=="historyUndo"?Ss:n=="historyRedo"?yh:null;return i?(t.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function gk(r,e){return(t,n)=>{let i=oa.getState(t);if(!i||(r?i.undone:i.done).eventCount==0)return!1;if(n){let a=ore(i,t,r);a&&n(e?a.scrollIntoView():a)}return!0}}const Ss=gk(!1,!0),yh=gk(!0,!0);function lre(r){let e=oa.getState(r);return e?e.done.eventCount:0}/**
|
|
11
|
-
* @toast-ui/editor
|
|
12
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
13
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
14
|
-
* @license MIT
|
|
15
|
-
*//*! *****************************************************************************
|
|
16
|
-
Copyright (c) Microsoft Corporation.
|
|
17
|
-
|
|
18
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
19
|
-
purpose with or without fee is hereby granted.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
22
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
23
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
24
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
25
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
26
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
27
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
28
|
-
***************************************************************************** */var Md=function(r,e){return Md=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])},Md(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");Md(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var we=function(){return we=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},we.apply(this,arguments)};function dn(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 Nt(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}function ure(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=ure;function cre(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 bh=cre;function fre(r){return typeof r=="string"||r instanceof String}var Bi=fre;function dre(r){return r instanceof Array}var Yo=dre;function hre(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=hre,pre=Yo,vre=Ho,mre=qo;function gre(r,e,t){pre(r)?vre(r,e,t):mre(r,e,t)}var Iu=gre,yre=Bi,bre=Iu;function kre(r,e,t){var n=r.style;if(yre(e)){n[e]=t;return}bre(e,function(i,a){n[a]=i})}var fi=kre,wre=Yo;function Cre(r,e,t){var n,i;if(t=t||0,!wre(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 Ka=Cre;function Tre(r){return r===void 0}var Jn=Tre,Sre=Jn;function xre(r){return!r||!r.className?"":Sre(r.className.baseVal)?r.className:r.className.baseVal}var kh=xre,Ere=Yo,Mre=Jn;function Are(r,e){if(e=Ere(e)?e.join(" "):e,e=e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),Mre(r.className.baseVal)){r.className=e;return}r.className.baseVal=e}var yk=Are,Sm=Iu,Ore=Ka,Nre=kh,Dre=yk;function Lre(r){var e=Array.prototype.slice.call(arguments,1),t=r.classList,n=[],i;if(t){Sm(e,function(a){r.classList.add(a)});return}i=Nre(r),i&&(e=[].concat(i.split(/\s+/),e)),Sm(e,function(a){Ore(a,n)<0&&n.push(a)}),Dre(r,n)}var si=Lre,xm=Ho,Rre=Ka,Ire=kh,Pre=yk;function Bre(r){var e=Array.prototype.slice.call(arguments,1),t=r.classList,n,i;if(t){xm(e,function(a){t.remove(a)});return}n=Ire(r).split(/\s+/),i=[],xm(n,function(a){Rre(a,e)<0&&i.push(a)}),Pre(r,i)}var Wn=Bre;function Fre(r){return typeof r=="number"||r instanceof Number}var Oi=Fre;function qre(r){return r===null}var uu=qre,Hre=qo;function _re(r,e){var t=document.createElement("img"),n="";return Hre(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 zre=_re,Vre=Jn,Ure=zre,$re=7*24*60*60*1e3;function Wre(r){var e=new Date().getTime();return e-r>$re}function jre(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);!Vre(window.tui)&&window.tui.usageStatistics===!1||s&&!Wre(s)||(window.localStorage.setItem(o,new Date().getTime()),setTimeout(function(){(document.readyState==="interactive"||document.readyState==="complete")&&Ure(t,{v:1,t:i,tid:e,cid:n,dp:n,dh:r,el:r,ec:a})},1e3))}var Gre=jre,Kre=/[\u0020]+/g,Jre=/[>(){}[\]+-.!#|]/g,Em=/<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[^\\>])*\/?>|<(\/)([a-zA-Z_][a-zA-Z0-9\-._]*)\s*\/?>|<!--[^-]+-->|<([a-zA-Z_][a-zA-Z0-9\-.:/]*)>/g,Mm=/\\[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\\]/g,Yre=/[*_~`]/g,Am=/!\[.*\]\(.*\)/g,Xre=/[[\]]/g,Om=/(?:^|[^\\])\\(?!\\)/g,Zre='[&<>"]',Nm=new RegExp(Zre,"g");function Qre(r){switch(r){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return r}}function Ao(r){return Nm.test(r)?r.replace(Nm,Qre):r}function ene(){Gre("editor","UA-129966929-1")}function Ir(r,e){return r.indexOf(e)!==-1}var tne=["rel","target","hreflang","type"],rne={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 bk(r){if(!r)return null;var e={};return tne.forEach(function(t){Jn(r[t])||(e[t]=r[t])}),e}function cu(r,e){for(var t="",n=0;n<e;n+=1)t+=r;return t}function nne(r){var e=!1;return qo(rne,function(t){return t.test(r)&&(e=!0),!e}),e}function fu(r){for(var e=[],t=Am.exec(r);t;)e.push([t.index,t.index+t[0].length]),t=Am.exec(r);return r.replace(Xre,function(n,i){var a=e.some(function(o){return i>o[0]&&i<o[1]});return a?n:"\\"+n})}function ine(r){var e=function(i){return"\\"+i},t=function(i){return i+"\\"},n=r.replace(Kre," ");return Mm.test(n)&&(n=n.replace(Mm,e)),Om.test(n)&&(n=n.replace(Om,t)),n=n.replace(Yre,e),Em.test(n)&&(n=n.replace(Em,e)),nne(n)&&(n=n.replace(Jre,e)),n}function ane(r){var e;return r.indexOf('"')===-1?e='""':e=r.indexOf("'")===-1?"''":"()",e[0]+r+e[1]}function Ad(r){return uu(r)||Jn(r)}function wh(r,e){if(r===null&&r===e)return!0;if(typeof r!="object"||typeof e!="object"||Ad(r)||Ad(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 Vr(r){return r[r.length-1]}function one(r,e,t){return r>=e&&r<=t}function Ch(r){return typeof r=="object"&&r!==null}function du(r,e){var t=we({},r);return r&&e&&Object.keys(e).forEach(function(n){Ch(t[n])?Array.isArray(e[n])?t[n]=Th(e[n]):t.hasOwnProperty(n)?t[n]=du(t[n],e[n]):t[n]=Sh(e[n]):t[n]=e[n]}),t}function Th(r){return r.map(function(e){return Ch(e)?Array.isArray(e)?Th(e):Sh(e):e})}function Sh(r){var e=Object.keys(r);return e.length?e.reduce(function(t,n){return Ch(r[n])?t[n]=Array.isArray(r[n])?Th(r[n]):Sh(r[n]):t[n]=r[n],t},{}):r}function xh(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]:xh(r[t],e[t]):r[t]=e[t]}),r}function Dm(r,e){return r>e?[e,r]:[r,e]}var sne=Ho;function lne(r){var e;try{e=Array.prototype.slice.call(r)}catch{e=[],sne(r,function(n){e.push(n)})}return e}var di=lne;function hu(r,e){var t=r.nodes.paragraph;return e?t.create(null,Bi(e)?r.text(e):e):t.createAndFill()}function Rr(r,e,t){return r.text(e,t)}function jt(r,e,t){t===void 0&&(t=e);var n=r.doc.content.size,i=n>0?n-1:1;return Mt.create(r.doc,Math.min(e,i),Math.min(t,i))}function Eh(r,e,t){var n=e.pos;return r.replaceWith(n,n,hu(t)),r.setSelection(jt(r,n+1))}function pu(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),k=p.nodeSize,T=p.textContent,x=p.content,E=a(T),P=E?Rr(l,E):Oe.empty,F=o.mapping.map(t),z=F+x.size;o.replaceWith(F,z,P),t+=k}return o}function Mh(r,e,t,n){var i=t.length;r.split(e).delete(e-i,e).insert(r.mapping.map(e),n).setSelection(jt(r,r.mapping.map(e)-i))}function zs(r){return r.sourcepos[0][0]}function Pu(r){return r.sourcepos[1][0]}function Bu(r){return r.sourcepos[0][1]}function sa(r){return r.sourcepos[1][1]}function une(r){var e=r.type;return e==="htmlBlock"||e==="htmlInline"}function cne(r){var e=r.type;return e==="strike"||e==="strong"||e==="emph"||e==="code"||e==="link"||e==="image"}function fne(r){return r&&r.type==="codeBlock"}function Ja(r){return r&&(r.type==="item"||r.type==="list")}function kk(r){return Ja(r)&&r.listData.type==="ordered"}function dne(r){return Ja(r)&&r.listData.type!=="ordered"}function Lm(r){return r&&(r.type==="tableCell"||r.type==="tableDelimCell")}function hne(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 pne(r,e,t){for(t===void 0&&(t=!0),r=t?r:r.parent;r&&r.type!=="document";)e(r),r=r.parent}function Tr(r,e){return[r[0],r[1]+e]}function la(r,e){return[r[0],e]}function vne(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 mne(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 gne(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 Is=[],wk={},Rm=/\$\$widget\d+\s/;function Fu(r){var e=r.search(Rm);if(e!==-1){var t=r.substring(e),n=t.replace(Rm,"").replace("$$","");r=r.substring(0,e),r+=Fu(n)}return r}function Ck(r,e){return"$$"+r+" "+e+"$$"}function Tk(r,e){var t=wk[r],n=t.rule,i=t.toDOM,a=Fu(e).match(n);return a&&(e=a[0]),i(e)}function yne(){return Is}function bne(r){Is=r,Is.forEach(function(e,t){wk["widget"+t]=e})}function _f(r,e,t,n){return r.concat(Va(e,t,n))}function Va(r,e,t){t===void 0&&(t=0);var n=[],i=(Is[t]||{}).rule,a=t+1;if(r=Fu(r),i&&i.test(r)){for(var o=void 0;(o=r.search(i))!==-1;){var s=r.substring(0,o);s&&(n=_f(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(Ck(f,l)))),r=r.substring(l.length)}r&&(n=_f(n,r,e,a))}else r&&(n=t<Is.length-1?_f(n,r,e,a):[e.text(r)]);return n}function Sk(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+=vne(i),n.resumeAt(r,!1),n.next()):i.type==="text"&&(t+=i.literal))}return t}function xk(){return{deleteSelection:function(){return ph},selectAll:function(){return ck},undo:function(){return Ss},redo:function(){return yh}}}function kne(r){return new hn({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 si(n,"placeholder"),r.className&&si(n,r.className),n.textContent=r.text,sr.create(t,[cn.widget(1,n)])}return null}}})}var wne=Ka,Cne=kh;function Tne(r,e){var t;return r.classList?r.classList.contains(e):(t=Cne(r).split(/\s+/),wne(e,t)>-1)}var Ek=Tne,Sne=Ka,xne=di,Nl=Element.prototype,Ene=Nl.matches||Nl.webkitMatchesSelector||Nl.mozMatchesSelector||Nl.msMatchesSelector||function(r){var e=this.document||this.ownerDocument;return Sne(this,xne(e.querySelectorAll(r)))>-1};function Mne(r,e){return Ene.call(r,e)}var Ane=Mne,Mk="[A-Za-z][A-Za-z0-9-]*",One="[a-zA-Z_:][a-zA-Z0-9:._-]*",Nne="[^\"'=<>`\\x00-\\x20]+",Dne="'[^']*'",Lne='"[^"]*"',Rne="(?:"+Nne+"|"+Dne+"|"+Lne+")",Ine="(?:\\s*=\\s*"+Rne+")",Ak="(?:\\s+"+One+Ine+"?)",Ok="<("+Mk+")("+Ak+")*\\s*/?>",Pne="</("+Mk+")\\s*[>]",Nk="(?:"+Ok+"|"+Pne+")",zo=new RegExp("^"+Nk,"i"),Od=/<br\s*\/*>/i,Bne=/<! ---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,Dk="</p><p>";function Ah(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 Lk="toastui-editor-";function Je(){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(""+Lk+o)}return t.join(" ")}function kr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.map(function(t){return Lk+"md-"+t}).join(" ")}function Fne(r){return(r==null?void 0:r.nodeType)===Node.TEXT_NODE}function qu(r){return r&&r.nodeType===Node.ELEMENT_NODE}function qne(r,e){var t=di(r.querySelectorAll(e));return t.length?t:[]}function Hne(r,e){e=Yo(e)?di(e):[e],e.forEach(function(t){r.appendChild(t)})}function _ne(r,e){e.parentNode&&e.parentNode.insertBefore(r,e)}function Ya(r){r.parentNode&&r.parentNode.removeChild(r)}function zne(r){for(var e=[];r.firstChild;)e.push(r.firstChild),r.parentNode&&r.parentNode.insertBefore(r.firstChild,r);return Ya(r),e}function Oh(r,e,t){Jn(t)&&(t=!Ek(r,e));var n=t?si:Wn;n(r,e)}function Rk(r,e){var t=document.createElement("div");Bi(r)?t.innerHTML=r:t.appendChild(r);var n=t.firstChild;return e&&e.appendChild(n),n}function Nh(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 li(r,e){var t;for(Bi(e)?t=function(n){return Ane(n,e)}:t=function(n){return n===e};r&&r!==document;){if(qu(r)&&t(r))return r;r=r.parentNode}return null}function Ik(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 Dh(r,e){Object.keys(r).forEach(function(t){Ad(r[t])?e.removeAttribute(t):e.setAttribute(t,r[t])})}function Vne(r){var e=r.replace(/<p><br\s*\/*><\/p>/gi,"<p></p>"),t=new RegExp(Nk,"ig"),n=e.match(t);return n==null||n.forEach(function(i,a){if(Od.test(i)){var o=Dk;if(a){var s=n[a-1],l=s.match(Ok);if(l&&!/br/i.test(l[1])){var f=l[1];o="</"+f+"><"+f+">"}}e=e.replace(Od,o)}}),e}function Lh(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 Pk=new Bs("widget"),Im=5,Une=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=li(e.dom.parentElement,"."+Je("defaultUI"))}),this.eventEmitter.listen("removePopupWidget",this.removeWidget)}return r.prototype.update=function(e){var t=Pk.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(),k=o-p.top;fi(n,{opacity:"0"}),this.rootEl.appendChild(n),fi(n,{position:"absolute",left:s-p.left+Im+"px",top:(i==="bottom"?k+f-Im:k-f)+"px",opacity:"1"}),this.popup=n,e.focus()}},r.prototype.destroy=function(){this.eventEmitter.removeEventHandler("blur",this.removeWidget)},r}();function $ne(r){return new hn({key:Pk,state:{init:function(){return null},apply:function(e){return e.getMeta("widget")}},view:function(e){return new Une(e,r)}})}function Wne(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 Rh(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 Bk(r){var e=di(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 jne(r){var e=r.eventEmitter;return new hn({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(),Rh(e,o,n.type),!1):!0}),!0}}}})}var Wt=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 Fk(r){var e=document.createElement("span"),t=Tk(r.attrs.info,r.textContent);return e.className="tui-widget",e.appendChild(t),{dom:e}}function Nd(r){return r.type.name==="widget"}var qk=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}(Wt),Hk=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 Pa.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=dn(dn([],this.keymaps),[Rs(we({"Shift-Enter":km.Enter},km)),mk(),kne(this.placeholder),$ne(this.eventEmitter),jne(this.context)]);return e?t.concat(e):t},enumerable:!1,configurable:!0}),r.prototype.createInputRules=function(){var e=yne(),t=e.map(function(n){var i=n.rule;return new fa(i,function(a,o,s,l){var f=a.schema,p=a.tr,k=a.doc,T=o.input.match(new RegExp(i,"g")),x=k.resolve(s),E=x.parent,P=0;if(Nd(E)&&(E=x.node(x.depth-1)),E.forEach(function(Y){return Nd(Y)&&(P+=1)}),T.length>P){var F=Vr(T),z=Va(F,f);return p.replaceWith(l-F.length+1,l,z)}return null})});return t.length?pk({rules:t}):null},r.prototype.clearTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},r.prototype.createSchema=function(){return new ub({nodes:this.specs.nodes,marks:this.specs.marks})},r.prototype.createKeymaps=function(e){var t=xk(),n=t.undo,i=t.redo,a=this.specs.keymaps(e),o={"Mod-z":n(),"Shift-Mod-z":i()};return e?a.concat(Rs(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(jt(t,1)).scrollIntoView()),e&&this.focus()},r.prototype.moveCursorToEnd=function(e){var t=this.view.state.tr;this.view.dispatch(t.setSelection(jt(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){fi(this.el,{height:e+"px"})},r.prototype.setMinHeight=function(e){fi(this.el,{minHeight:e+"px"})},r.prototype.getElement=function(){return this.el},r}();function Gne(r){return r instanceof Function}var Hn=Gne,Kne=["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 Dl(r,e,t){return r.focus(),e(t)(r.state,r.dispatch,r)}var _k=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 we(we({},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 we(we({},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 Hn(l)?s[o.name]=function(f){return Dl(e,l,f)}:Object.keys(l).forEach(function(f){s[f]=function(p){return Dl(e,l[f],p)}}),we(we({},a),s)},{}),i=xk();return Object.keys(i).forEach(function(a){n[a]=function(o){return Dl(e,i[a],o)}}),t&&Object.keys(t).forEach(function(a){n[a]=function(o){return Dl(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){Ir(Kne,i)||delete n[i]}),Rs(n)})},r.prototype.setContext=function(e){this.specs.forEach(function(t){t.setContext(e)})},r}();function zk(r){var e=r.from,t=r.to;return r instanceof Gr?[e+1,t-1]:[e,t]}function Pm(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){Nd(i)&&a+2<e&&(n+=2*t)}),n}function Wl(r,e,t){t===void 0&&(t=e);var n=e===t,i=r.resolve(e),a=Pm(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=Pm(f),f.pos===r.content.size&&(t=r.content.size-2)}var p=Math.max(e-s+1,1),k=Math.max(t-l+1,1);return[[a,p+Vo(r.child(a-1),p,-1)],[o,k+Vo(r.child(o-1),k,-1)]]}function Vk(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 Ra(r,e,t){var n=Vk(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 br(r){var e=r.$from,t=r.$to,n=r.from,i=r.to,a=e.doc;return r instanceof Gr&&(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 vu(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 Bm="heading",Jne="blockQuote",Yne="listItem",Xne="table",Zne="tableCell",Qne="codeBlock",eie="thematicBreak",jl="link",Ll="code",Hu="meta",Xa="delimiter",tie="taskDelimiter",Ih="markedText",rie="html",nie="customBlock",Fm={strong:2,emph:1,strike:2};function Bt(r,e,t,n){return{start:r,end:e,spec:{type:t,attrs:n}}}function iie(r,e,t){var n=r.level,i=r.headingType,a=[Bt(e,t,Bm,{level:n})];return i==="atx"?a.push(Bt(e,Tr(e,n),Xa)):a.push(Bt(la(t,0),t,Bm,{seText:!0})),a}function zf(r,e,t){var n=r.type,i=Tr(e,Fm[n]),a=Tr(t,-Fm[n]);return[Bt(i,a,n),Bt(e,i,Xa),Bt(a,t,Xa)]}function Uk(r,e,t,n){return[Bt(r,e,jl),Bt(la(r,t[1]+1),la(e,n),jl,{desc:!0}),Bt(la(e,n+2),Tr(e,-1),jl,{url:!0})]}function aie(r,e,t){var n=r.lastChild,i=n?sa(n)+1:3,a=Tr(e,1);return dn([Bt(e,a,Hu)],Uk(e,t,a,i))}function oie(r,e,t){var n=r.lastChild,i=r.extendedAutolink,a=n?sa(n)+1:2;return i?[Bt(e,t,jl,{desc:!0})]:Uk(e,t,e,a)}function sie(r,e,t){var n=r.tickCount,i=Tr(e,n),a=Tr(t,-n);return[Bt(e,t,Ll),Bt(e,i,Ll,{start:!0}),Bt(i,a,Ll,{marked:!0}),Bt(a,t,Ll,{end:!0})]}function $k(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"?[we(we({},i),{end:e,spec:{attrs:{className:n+"-line-background start"}}}),we(we({},i),{start:[Math.min(e[0]+1,t[0]),e[1]]})]:null}function lie(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,k=[Bt(la(e,1),t,Qne)];o&&k.push(Bt(e,Tr(e,p),Xa)),s&&k.push(Bt(Tr(e,a),Tr(e,a+l+s.length),Hu));var T="^(\\s{0,4})("+o+"{"+a+",})",x=new RegExp(T);x.test(n)&&k.push(Bt(la(t,1),t,Xa));var E=$k(f,e,t,"code-block");return E?k.concat(E):k}function uie(r,e,t){var n=r,i=n.offset,a=n.syntaxLength,o=n.info,s=n.parent,l=i+a,f=[Bt(la(e,1),t,nie)];f.push(Bt(e,Tr(e,l),Xa)),o&&f.push(Bt(Tr(e,l),Tr(e,a+o.length),Hu)),f.push(Bt(la(t,1),t,Xa));var p=$k(s,e,t,"custom-block");return p?f.concat(p):f}function Wk(r,e){for(var t=[];r;){var n=r.type;(n==="paragraph"||n==="codeBlock")&&t.push(Bt([zs(r),Bu(r)-1],[Pu(r),sa(r)+1],e)),r=r.next}return t}function cie(r){for(var e=[];r;)e.push(Bt([zs(r),Bu(r)],[Pu(r),sa(r)+1],Ih)),r=r.next;return e}function fie(r,e,t){var n=r.parent&&r.parent.type!=="blockQuote"?[Bt(e,t,Jne)]:[];if(r.firstChild){var i=[];r.firstChild.type==="paragraph"?i=cie(r.firstChild.firstChild):r.firstChild.type==="list"&&(i=Wk(r.firstChild,Ih)),n=dn(dn([],n),i)}return n}function die(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[Yne,we(we({},t),{listStyle:!0})]}function hie(r,e){var t=r.listData,n=t.padding,i=t.task,a=die(r),o=[Bt.apply(void 0,dn([e,Tr(e,n)],a))];return i&&(o.push(Bt(Tr(e,n),Tr(e,n+3),tie)),o.push(Bt(Tr(e,n+1),Tr(e,n+2),Hu))),o.concat(Wk(r.firstChild,Ih))}var qm={heading:iie,strong:zf,emph:zf,strike:zf,link:oie,image:aie,code:sie,codeBlock:lie,blockQuote:fie,item:hie,customBlock:uie},Hm={thematicBreak:eie,table:Xne,tableCell:Zne,htmlInline:rie};function pie(r,e,t,n){var i=r.type;return Hn(qm[i])?qm[i](r,e,t,n):Hm[i]?[Bt(e,t,Hm[i])]:null}var Ps={};function vie(r){var e=r.schema,t=r.toastMark;return new hn({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 k=p.nodes,T=p.removedNodeRange;if(k.length){l=l.concat(wie(s,k));for(var x=0,E=k;x<E.length;x++)for(var P=E[x],F=P.walker(),z=F.next();z;){var Y=z.node,Z=z.entering;Z&&(l=l.concat(Cie(Y,t))),z=F.next()}}else if(T)for(var oe=s.doc.childCount-1,le=T.line,re=le[0],he=le[1],ge=Math.min(re,oe),ye=Math.min(he,oe),Re=ge;Re<=ye;Re+=1)Ps[Re]=!0}),yie(s,e,l)}return s.setMeta("widget",o.getMeta("widget"))}})}function mie(r,e,t){return Object.keys(t).some(function(n){return t[n]!==r.child(e).attrs[n]})}function gie(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 Ps[p],f=mie(e,p,i);f&&r.setBlockType(s,l,t,i)}function yie(r,e,t){var n=r.doc,i=e.nodes.paragraph,a=Vk(n,n.childCount);t.forEach(function(o){var s=o.start,l=o.end,f=o.spec,p=o.lineBackground,k=Math.min(s[0],n.childCount)-1,T=Math.min(l[0],n.childCount)-1,x=n.child(k),E=n.child(T),P=a[k],F=a[T];if(P+=s[1]+Vo(x,s[1]-1),F+=l[1]+Vo(E,l[1]-1),f)if(p){var z={from:P,to:F,startIndex:k,endIndex:T};gie(r,n,i,z,f.attrs)}else r.addMark(P,F,e.mark(f.type,f.attrs));else r.removeMark(P,F)}),bie(r,a,i)}function bie(r,e,t){Object.keys(Ps).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 kie(r,e,t){var n=[];Ps={};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&&!Ir(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)Ps[p]=!0}}}function wie(r,e){var t=r.doc,n=e[0].sourcepos[0],i=Vr(e).sourcepos,a=i[1],o=[n[0],n[1]],s=[a[0],a[1]+1],l=[];return kie(t,n,a),l.push({start:o,end:s}),l}function Cie(r,e){var t=e.getLineTexts(),n=[zs(r),Bu(r)],i=[Pu(r),sa(r)+1],a=pie(r,n,i,t[i[0]-1]);return a??[]}var Tie=["taskList","orderedList","bulletList","table","strong","emph","strike","heading","thematicBreak","blockQuote","code","codeBlock","indent","outdent"];function Sie(r){var e=r.type;return Ja(r)?r.listData.task?"taskList":r.listData.type==="ordered"?"orderedList":"bulletList":e.indexOf("table")!==-1?"table":Ir(Tie,e)?e:null}function xie(r){var e={indent:{active:!1,disabled:!0},outdent:{active:!1,disabled:!0}},t=!0;return pne(r,function(n){var i=Sie(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 Eie(r){var e=r.toastMark,t=r.eventEmitter;return new hn({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,k=l-f;l===f&&(k+=1);var T=[p,k],x=e.findNodeAtPosition(T),E=xie(x);t.emit("changeToolbarState",{cursorPos:T,mdNode:x,toolbarState:E}),t.emit("setFocusedNode",x)}}}}})}var Mie=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}(Wt),Gt=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 ua(r,e-1)}function ua(r,e){return r.child(e).textContent}var bs=/^\s*> ?/,Aie=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:kr("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=br(a),p=f.endFromOffset,k=f.endToOffset,T=f.endIndex,x=f.to,E=ua(o,T),P=bs.test(E);if(P&&x>p&&a.empty){var F=!E.replace(bs,"").trim();if(F)s.deleteRange(p,k).split(s.mapping.map(k));else{var z=E.slice(x-p).trim(),Y=Rr(l,t.createBlockQuoteText(z));Mh(s,k,z,Y)}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=br(a),l=s.startFromOffset,f=s.endToOffset,p=s.startIndex,k=s.endIndex,T=bs.test(ua(o,p)),x=pu({state:n,startIndex:p,endIndex:k,from:l,createText:function(E){return t.createBlockQuoteText(E,T)}});return i(x.setSelection(jt(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}(Gt),Za=/(^\s*)([-*+] |[\d]+\. )/,Ph=/(^\s*)([\d])+\.( \[[ xX]])? /,Ri=/^(\s*)((\d+)([.)]\s(?:\[(?:x|\s)\]\s)?))(.*)/,mu=/(^\s*)([-*+]|[\d]+\.)( \[[ xX]])? /,Oie=/^(\s*)([-*+]+(\s(?:\[(?:x|\s)\]\s)?))(.*)/,Nie=/(^\s*)([-*+] |[\d]+\. )(\[[ xX]] )/,Die=/(^\s*)([-*+])( \[[ xX]]) /;function Bh(r){return Ph.test(r)?"ordered":"bullet"}function Fh(r){for(var e=0;r&&r.type!=="document";)r.type==="list"&&(e+=1),r=r.parent;return e}function Dd(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=Fh(l);if(f===t)o.push({line:s,depth:t,mdNode:l});else if(f<t)break}return o}function Lie(r){var e=r.toastMark,t=r.mdNode,n=r.line,i=Fh(t),a=Dd(e,n,i,!1).reverse(),o=Dd(e,n,i,!0);return a.concat([{line:n,depth:i,mdNode:t}]).concat(o)}function Rie(r){if(!Za.test(r))return"* "+r;var e=Bh(r);return e==="bullet"&&mu.test(r)?r=r.replace(Die,"$1$2 "):e==="ordered"&&(r=r.replace(Ph,"$1* ")),r}function Iie(r,e){if(!Za.test(r))return e+". "+r;var t=Bh(r);if(t==="bullet"||t==="ordered"&&mu.test(r))r=r.replace(mu,"$1"+e+". ");else if(t==="ordered"){var n=Ri.exec(r)[3];Number(n)!==e&&(r=r.replace(Ph,"$1"+e+". "))}return r}function jk(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"?Rie(p):Iie(p,l+1+n),{text:p,line:f}});return{changedResults:o,firstIndex:i,lastIndex:a}}function _m(r,e){var t=Lie(e);return jk(e.doc,t,r)}var Pie={bullet:function(r){return _m("bullet",r)},ordered:function(r){return _m("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(Nie,"$1$2"):Ja(e)&&(i=i.replace(Za,"$1$2[ ] ")),{changedResults:[{text:i,line:n}]}}},Bie={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),k=Tn(t,f),T=k&&!!_o(p,function(Z){return Ja(Z)}),x=Ri.exec(Tn(t,f));if(!x&&!T)break;if(!x&&T){l+=1;continue}var E=x,P=E[1],F=E[3];if(!P){o=Number(F),s=f;break}}var z=o+n-s-l,Y=[{text:z+". "+a,line:n}];return{changedResults:Y}},task:function(r){var e=r.doc,t=r.line,n=Tn(e,t),i=[{text:"* [ ] "+n,line:t}];return{changedResults:i}}},Fie={bullet:function(r){var e=r.line,t=r.doc,n=Tn(t,e),i=Oie.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=Fh(n),o=Tn(i,t),s=Ri.exec(o),l=s[1],f=s[3],p=s[4],k=Number(f)+1,T=""+l+k+p,x=Dd(e,t,a,!0),E=x.filter(function(P){var F=Ri.exec(Tn(i,P.line));return F&&F[1].length===l.length&&!!_o(P.mdNode,function(z){return kk(z)})});return we({listSyntax:T},jk(i,E,"ordered",k))}};function Gk(r,e,t,n,i){for(var a=[],o=Tn(r,t),s=Ri.exec(o);s;){var l=s[1],f=s[4],p=s[5],k=l.length;if(k===i)a.push(Rr(e,""+l+n+f+p)),n+=1,t+=1;else if(k>i){var T=Gk(r,e,t,1,k);t=T.line,a=a.concat(T.nodes)}if(k<i||t>r.childCount)break;o=Tn(r,t),s=Ri.exec(o)}return{nodes:a,line:t}}var zm=/(^\s{1,4})(.*)/;function Vm(r,e,t){return r<e||Za.test(t)||bs.test(t)}function Um(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 $m(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 jt(r,t,n)}var qie=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:kr(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,k=l.doc,T=o.findFirstNodeAtLine(t),x=T;T&&!dne(T)&&T.parent.type!=="document";)if(T=T.parent,kk(T)){x=T;break}x&&(t=x.sourcepos[0][0]);var E=Ri.exec(Tn(k,t)),P=E[1],F=E[3],z=P.length,Y=Gk(k,s,t,Number(F),z),Z=Y.line,oe=Y.nodes;n=Math.max(n,Z-1);for(var le=vu(k,t-1).startOffset,re=t-1;re<=n-1;re+=1){var he=k.child(re),ge=he.nodeSize,ye=he.content,Re=f.mapping.map(le),Ze=Re+ye.size;f.replaceWith(Re,Ze,oe[re-t+1]),le+=ge}var Be=jt(f,p.from,p.to);a.dispatch(f.setSelection(Be))},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=br(s),p=f.from,k=f.to,T=f.startFromOffset,x=f.startIndex,E=f.endIndex;if(t&&Um(l,o,s))return!1;var P=ua(l,x);if(t&&Vm(p,k,P)||!t&&Za.test(P)){var F=pu({state:i,from:T,startIndex:x,endIndex:E,createText:function(Y){return" "+Y}}),z={type:"indent",from:p,to:k,lineLen:E-x};a(F.setSelection($m(F,z))),Ri.test(P)&&n.reorderList(x+1,E+1)}else t&&a(i.tr.insert(k,Rr(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=br(o),p=f.from,k=f.to,T=f.startFromOffset,x=f.startIndex,E=f.endIndex;if(t&&Um(s,l,o))return!1;var P=ua(s,x);if(t&&Vm(p,k,P)||!t&&Za.test(P)){var F=[],z=pu({state:i,from:T,startIndex:x,endIndex:E,createText:function(re){var he=zm.exec(re);return F.push(he?he[1].length:0),re.replace(zm,"$2")}}),Y={type:"outdent",from:p,to:k,spaceLenList:F};a(z.setSelection($m(z,Y))),Ri.test(P)&&n.reorderList(x+1,E+1)}else if(t){var Z=P.slice(0,k-T),oe=Z.replace(/\s{1,4}$/,""),le=k-(Z.length-oe.length);a(i.tr.delete(le,k))}return!0}}},e.prototype.deleteLines=function(){var t=this;return function(n,i){var a=t.context.view,o=br(n.selection),s=o.startFromOffset,l=o.endToOffset,f=function(){return i(n.tr.deleteRange(s,l)),!0};return Ru(f,sk)(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=br(o),f=l.startFromOffset,p=l.endToOffset,k=l.endIndex;if(k<i.content.childCount-1){var T=i.child(k+1),x=T.nodeSize,E=T.textContent;return a.delete(p,p+x).split(f).insert(a.mapping.map(f)-2,Rr(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=br(o),f=l.startFromOffset,p=l.endToOffset,k=l.startIndex;if(k>0){var T=a.child(k-1),x=T.nodeSize,E=T.textContent;return i.delete(f-x,f).split(i.mapping.map(p)).insert(i.mapping.map(p),Rr(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}(Wt),Hie=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}(Wt),_ie=/^#{1,6}\s/,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"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:kr.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=br(i.selection),l=s.startFromOffset,f=s.endToOffset,p=s.startIndex,k=s.endIndex,T=pu({state:i,from:l,startIndex:p,endIndex:k,createText:function(x){var E=x.match(_ie),P=E?E[0]:"";return t.createHeadingText(o,x,P)}});return a(T.setSelection(jt(T,T.mapping.map(f)))),!0}}},e}(Gt),Vf="```",Vie=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:kr("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=br(i),l=s.startFromOffset,f=s.endToOffset,p=Rr(a,Vf);return o.insert(l,p).split(l+Vf.length),o.split(o.mapping.map(f)).insert(o.mapping.map(f),p),n(o.setSelection(jt(o,o.mapping.map(f)-(Vf.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=br(a),k=p.startFromOffset,T=p.endToOffset,x=p.endIndex,E=p.from,P=p.to,F=ua(s,x);if(E===P&&F.trim()){var z=F.match(/^\s+/),Y=f.findFirstNodeAtLine(x+1);if(fne(Y)&&z){var Z=z[0],oe=F.slice(P-k),le=Rr(l,Z+oe);return Mh(o,T,oe,le),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}(Gt),Uie=/\||\s/g;function $ie(r){return[gu(r),gu(r,!0)]}function Wie(r,e){for(var t=[],n=0;n<e;n+=1)t.push(gu(r));return t}function gu(r,e){for(var t="|",n=0;n<r;n+=1)t+=e?" --- |":" |";return t}function jie(r){return r?{type:"next",parentType:"tableHead",childType:"firstChild"}:{type:"prev",parentType:"tableBody",childType:"lastChild"}}var 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"table"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:kr("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=br(a),p=f.endFromOffset,k=f.endToOffset,T=f.endIndex,x=f.to,E=ua(o,T),P=[T+1,x-p+1],F=t.context.toastMark.findNodeAtPosition(P),z=_o(F,function(re){return Lm(re)&&(re.parent.type==="tableDelimRow"||re.parent.parent.type==="tableBody")});if(z){var Y=!E.replace(Uie,"").trim(),Z=z.parent,oe=Z.parent.parent.columns.length,le=gu(oe);return Y?s.deleteRange(p,k).split(s.mapping.map(k)):s.split(k).insert(s.mapping.map(k),Rr(l,le)).setSelection(jt(s,s.mapping.map(k)-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=br(o),f=l.endFromOffset,p=l.endIndex,k=l.to,T=[p+1,k-f],x=n.context.toastMark.findNodeAtPosition(T),E=_o(x,function(he){return Lm(he)});if(E){var P=E.parent,F=jie(t),z=F.type,Y=F.parentType,Z=F.childType,oe=sa(E);if(E[z])oe=sa(E[z])-1;else{var le=!P[z]&&P.parent.type===Y?P.parent[z][Z]:P[z];if(z==="next"){var re=le?sa(le[Z]):0;oe+=re+2}else z==="prev"&&(oe=le?-4:0)}return a(s.setSelection(jt(s,f+oe))),!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,k=br(a).endToOffset,T=$ie(f),x=Wie(f,p-1),E=dn(dn([],T),x);return E.forEach(function(P){o.split(o.mapping.map(k)).insert(o.mapping.map(k),Rr(s,P))}),i(o.setSelection(jt(o,k+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}(Gt),Kie="***",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"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:kr("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=br(i),l=s.from,f=s.to,p=s.endToOffset,k=Rr(a,Kie);return o.split(l).replaceWith(o.mapping.map(l),o.mapping.map(f),k).split(o.mapping.map(f)).setSelection(jt(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}(Gt);function Yie(r,e){var t=r.type,n=r.sourcepos,i=n[0][0];return e<=i&&(t==="codeBlock"||t==="heading"||t.match("table"))}var Xie=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:kr.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=br(a),k=p.to,T=p.startFromOffset,x=p.endFromOffset,E=p.endIndex,P=p.endToOffset,F=ua(o,E),z=Za.test(F);if(!z||a.from===T||!a.empty)return!1;var Y=!F.replace(mu,"").trim();if(Y)l.deleteRange(x,P).split(l.mapping.map(P));else{var Z=Bh(F),oe=f.findFirstNodeAtLine(E+1),le=F.slice(k-x),re={toastMark:f,mdNode:oe,doc:o,line:E+1},he=Fie[Z](re),ge=he.listSyntax,ye=he.changedResults;if(ye!=null&&ye.length){l.split(k),ye.unshift({text:ge+le,line:E+1}),t.changeToListPerLine(l,ye,{from:k,startLine:ye[0].line,endLine:Vr(ye).line});var Re=l.mapping.map(P)-le.length;l.setSelection(jt(l,Re))}else{var Ze=Rr(s,ge+le);Mh(l,P,le,Ze)}}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=br(l),k=p.startIndex+1,T=p.endIndex+1,x=p.endToOffset,E=[],P=k;P<=T;P+=1){var F=f.findFirstNodeAtLine(P);if(F&&Yie(F,P))break;if(E.indexOf(P)===-1){var z={toastMark:f,mdNode:F,doc:o,line:P,startLine:k},Y=(Ja(F)?Pie[t](z):Bie[t](z)).changedResults,Z=n.changeToListPerLine(s,Y,{from:vu(o,Y[0].line-1).startOffset,startLine:Y[0].line,endLine:Vr(Y).line,indexDiff:1});x=Math.max(Z,x),Y&&(E=E.concat(Y.map(function(oe){return oe.line})))}}return a(s.setSelection(jt(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,k=function(E){var P=t.doc.child(E),F=P.nodeSize,z=P.content,Y=t.mapping.map(a),Z=Y+z.size,oe=n.filter(function(le){return le.line-f===E})[0];oe&&(t.replaceWith(Y,Z,Rr(T.context.schema,oe.text)),p=Math.max(p,a+z.size)),a+=F},T=this,x=o-f;x<=s-f;x+=1)k(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=br(a),k=p.startIndex,T=p.endIndex,x=null,E=k;E<=T;E+=1){var P=f.findFirstNodeAtLine(E+1);if(Ja(P)&&P.listData.task){var F=P.listData,z=F.checked,Y=F.padding,Z=z?" ":"x",oe=P.sourcepos[0],le=vu(s,oe[0]-1).startOffset;le+=oe[1]+Y,x=o.replaceWith(le,le+1,l.text(Z))}}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}(Gt);function _u(r,e){return function(){return function(t,n){var i=t.tr,a=t.selection,o=Hn(r)?r:function(Z){return r.test(Z)},s=e.length,l=i.doc,f=zk(a),p=f[0],k=f[1],T=Math.max(p-s,1),x=Math.min(k+s,l.content.size-1),E=a.content(),P=E.content.textBetween(0,E.content.size,`
|
|
29
|
-
`),F=l.textBetween(T,p,`
|
|
30
|
-
`),z=l.textBetween(k,x,`
|
|
31
|
-
`);if(P=""+F+P+z,F&&z&&o(P))i.delete(x-s,x).delete(T,T+s);else{i.insertText(e,k).insertText(e,p);var Y=a.empty?jt(i,p+s):jt(i,p+s,k+s);i.setSelection(Y)}return n(i),!0}}}var Zie=/^(\*{2}|_{2}).*([\s\S]*)\1$/m,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"strong"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:kr("strong")},0]}}},enumerable:!1,configurable:!0}),e.prototype.bold=function(){return _u(Zie,Qie)},e.prototype.commands=function(){return{bold:this.bold()}},e.prototype.keymaps=function(){var t=this.bold()();return{"Mod-b":t,"Mod-B":t}},e}(Gt),tae=/^(~{2}).*([\s\S]*)\1$/m,rae="~~",nae=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:kr("strike")},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return _u(tae,rae)},e.prototype.keymaps=function(){var t=this.commands()();return{"Mod-s":t,"Mod-S":t}},e}(Gt),iae=/^(\*|_).*([\s\S]*)\1$/m,aae="*",oae=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:kr("emph")},0]}}},enumerable:!1,configurable:!0}),e.prototype.italic=function(){return _u(iae,aae)},e.prototype.commands=function(){return{italic:this.italic()}},e.prototype.keymaps=function(){var t=this.italic()();return{"Mod-i":t,"Mod-I":t}},e}(Gt),sae=/^(`).*([\s\S]*)\1$/m,lae="`",uae=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:kr.apply(void 0,s.split("|"))},0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return _u(sae,lae)},e.prototype.keymaps=function(){var t=this.commands()();return{"Shift-Mod-c":t,"Shift-Mod-C":t}},e}(Gt),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"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:kr.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=zk(o),p=f[0],k=f[1],T=n,x=T.linkText,E=T.altText,P=T.linkUrl,F=T.imageUrl,z=x,Y=P,Z="";return t==="image"&&(z=E,Y=F,Z="!"),z=fu(z),Z+="["+z+"]("+Y+")",a(s.replaceWith(p,k,Rr(l,Z))),!0}}},e.prototype.commands=function(){return{addImage:this.addLinkOrImage("image"),addLink:this.addLinkOrImage("link")}},e}(Gt),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"taskDelimiter"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:kr("delimiter","list-item")},0]}}},enumerable:!1,configurable:!0}),e}(Gt),dae=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:kr("delimiter")},0]}}},enumerable:!1,configurable:!0}),e}(Gt),hae=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:kr("meta")},0]}}},enumerable:!1,configurable:!0}),e}(Gt),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"markedText"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:kr("marked-text")},0]}}},enumerable:!1,configurable:!0}),e}(Gt),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"tableCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:kr("table-cell")},0]}}},enumerable:!1,configurable:!0}),e}(Gt),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"html"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:kr("html")},0]}}},enumerable:!1,configurable:!0}),e}(Gt),Uf="$$",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"customBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{toDOM:function(){return["span",{class:kr("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=br(a),f=l.startFromOffset,p=l.endToOffset;if(!(t!=null&&t.info))return!1;var k=""+Uf+t.info,T=Rr(o,k),x=Rr(o,Uf);return s.insert(f,T).split(f+k.length),s.split(s.mapping.map(p)).insert(s.mapping.map(p),x),i(s.setSelection(jt(s,s.mapping.map(p)-(Uf.length+2)))),!0}}},e}(Gt),yae=/x|backspace/i,bae=/^\[(\s*)(x?)(\s*)\](?:\s+)/i;function kae(r){var e=r.schema,t=r.toastMark;return new hn({props:{handleDOMEvents:{keyup:function(n,i){var a,o=n.state,s=o.doc,l=o.tr,f=o.selection;if(f.empty&&yae.test(i.key)){var p=br(f),k=p.startIndex,T=p.startFromOffset,x=p.from,E=[k+1,x-T+1],P=t.findNodeAtPosition(E),F=_o(P,function(Ze){var Be;return Ze.type==="paragraph"&&((Be=Ze.parent)===null||Be===void 0?void 0:Be.type)==="item"});if(!((a=F==null?void 0:F.firstChild)===null||a===void 0)&&a.literal){var z=F.firstChild,Y=z.literal.match(bae);if(Y){var Z=z.sourcepos[0],oe=Y[1],le=Y[2],re=Y[3],he=oe.length+re.length,ge=vu(s,Z[0]-1).startOffset,ye=Z[1]+ge;if(le){var Re=he?he+1:0;l.replaceWith(ye,Re+ye,e.text(le)),n.dispatch(l)}else he||(l.insertText(" ",ye),n.dispatch(l))}}}return!1}}}})}var $f="cut",Wm=/\r\n|\n|\r/,wae=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(we(we({},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){Oh(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=Je("pseudo-clipboard"),this.clipboard.addEventListener("paste",function(n){var i=n.clipboardData||window.clipboardData,a=i&&i.items;if(a){var o=di(a).some(function(l){return l.kind==="string"&&l.type==="text/rtf"});if(!o){var s=Bk(a);s&&(n.preventDefault(),Rh(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 _k([new Mie,new qie,new qk,new Hie,new zie,new Aie,new Vie,new gae,new Gie,new vae,new Jie,new Xie,new eae,new nae,new oae,new uae,new cae,new dae,new fae,new pae,new hae,new mae])},e.prototype.createPlugins=function(){return dn([vie(this.context),Eie(this.context),kae(this.context)],this.createPluginProps()).concat(this.defaultPlugins)},e.prototype.createView=function(){var t=this;return new hh(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,$f)},scroll:function(){return t.eventEmitter.emit("scroll","editor"),!0},keyup:function(n,i){return t.eventEmitter.emit("keyup",t.editorType,i),!1}},nodeViews:{widget:Fk}})},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===$f&&this.view.dispatch(o.deleteSelection().scrollIntoView().setMeta("uiEvent",$f)),!0},e.prototype.updateMarkdown=function(t){var n=this;t.docChanged&&t.steps.forEach(function(i,a){if(i.slice&&!(i instanceof Sr)){var o=t.docs[a],s=[i.from,i.to],l=s[0],f=s[1],p=Wl(o,l,f),k=p[0],T=p[1],x=n.getChanged(i.slice);k[0]===T[0]&&k[1]===T[1]&&x===""&&(x=`
|
|
32
|
-
`);var E=n.toastMark.editMarkdown(k,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+=`
|
|
33
|
-
`)}),n},e.prototype.setSelection=function(t,n){n===void 0&&(n=t);var i=this.view.state.tr,a=Ra(i.doc,t,n),o=a[0],s=a[1];this.view.dispatch(i.setSelection(jt(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(Wm),k=p.map(function(F){return hu(l,Va(F,l))}),T=new Ue(Oe.from(k),1,1);if(this.focus(),n&&i){var x=Ra(f,n,i),E=x[0],P=x[1];a=s.replaceRange(E,P,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=Ra(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=Ra(a,t,n);s=f[0],l=f[1]}return a.textBetween(s,l,`
|
|
34
|
-
`)},e.prototype.getSelection=function(){var t=this.view.state.selection,n=t.from,i=t.to;return Wl(this.view.state.tr.doc,n,i)},e.prototype.setMarkdown=function(t,n){n===void 0&&(n=!0);var i=t.split(Wm),a=this.view.state,o=a.tr,s=a.doc,l=a.schema,f=i.map(function(p){return hu(l,Va(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?Ra(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=Ra(l,t,n),p=Va(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||Wl(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 Fu(t)}).join(`
|
|
35
|
-
`)},e.prototype.getToastMark=function(){return this.toastMark},e}(Hk),jm="_feEventKey";function Cae(r,e){var t=r[jm],n;return t||(t=r[jm]={}),n=t[e],n||(n=t[e]=[]),n}var Kk=Cae,Tae=Bi,yu=Iu,Sae=Kk;function xae(r,e,t){if(Tae(e)){yu(e.split(/\s+/g),function(n){Gm(r,n,t)});return}yu(e,function(n,i){Gm(r,i,n)})}function Gm(r,e,t){var n=Sae(r,e),i;t?(yu(n,function(a,o){return t===a.handler?(Km(r,e,a.wrappedHandler),i=o,!1):!0}),n.splice(i,1)):(yu(n,function(a){Km(r,e,a.wrappedHandler)}),n.splice(0,n.length))}function Km(r,e,t){"removeEventListener"in r?r.removeEventListener(e,t):"detachEvent"in r&&r.detachEvent("on"+e,t)}var Jk=xae,Eae=Bi,Ld=Iu,Mae=Kk;function Aae(r,e,t,n){if(Eae(e)){Ld(e.split(/\s+/g),function(i){Jm(r,i,t,n)});return}Ld(e,function(i,a){Jm(r,a,i,t)})}function Jm(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),Oae(r,e,t,i)}function Oae(r,e,t,n){var i=Mae(r,e),a=!1;Ld(i,function(o){return o.handler===t?(a=!0,!1):!0}),a||i.push({handler:t,wrappedHandler:n})}var Yk=Aae;/*! *****************************************************************************
|
|
36
|
-
Copyright (c) Microsoft Corporation.
|
|
37
|
-
|
|
38
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
39
|
-
purpose with or without fee is hereby granted.
|
|
40
|
-
|
|
41
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
42
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
43
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
44
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
45
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
46
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
47
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
48
|
-
***************************************************************************** */var Rd=function(r,e){return Rd=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])},Rd(r,e)};function _n(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Rd(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Dr=function(){return Dr=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},Dr.apply(this,arguments)};function Id(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:{},Ym={};function Nae(r){var e,t,n=Ym[r];if(n)return n;for(n=Ym[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 zu(r,e,t){var n,i,a,o,s,l="";for(typeof e!="string"&&(t=e,e=zu.defaultChars),typeof t>"u"&&(t=!0),s=Nae(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}zu.defaultChars=";/?:@&=+$,-_.!~*'()#";zu.componentChars="-_.!~*'()";var Dae=zu,qh={},Ii={},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="Ä",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="ffi",Bve="ff",Fve="ffl",qve="𝔉",Hve="𝔣",_ve="fi",zve="◼",Vve="▪",Uve="fj",$ve="♭",Wve="fl",jve="▱",Gve="ƒ",Kve="𝔽",Jve="𝕗",Yve="∀",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="IJ",tbe="ij",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="Ĵ",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="ʼn",ETe="≉",MTe="♮",ATe="ℕ",OTe="♮",NTe=" ",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=`
|
|
49
|
-
`,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="",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="",Xk={Aacute:Lae,aacute:Rae,Abreve:Iae,abreve:Pae,ac:Bae,acd:Fae,acE:qae,Acirc:Hae,acirc:_ae,acute:zae,Acy:Vae,acy:Uae,AElig:$ae,aelig:Wae,af:jae,Afr:Gae,afr:Kae,Agrave:Jae,agrave:Yae,alefsym:Xae,aleph:Zae,Alpha:Qae,alpha:eoe,Amacr:toe,amacr:roe,amalg:noe,amp:ioe,AMP:aoe,andand:ooe,And:soe,and:loe,andd:uoe,andslope:coe,andv:foe,ang:doe,ange:hoe,angle:poe,angmsdaa:voe,angmsdab:moe,angmsdac:goe,angmsdad:yoe,angmsdae:boe,angmsdaf:koe,angmsdag:woe,angmsdah:Coe,angmsd:Toe,angrt:Soe,angrtvb:xoe,angrtvbd:Eoe,angsph:Moe,angst:Aoe,angzarr:Ooe,Aogon:Noe,aogon:Doe,Aopf:Loe,aopf:Roe,apacir:Ioe,ap:Poe,apE:Boe,ape:Foe,apid:qoe,apos:Hoe,ApplyFunction:_oe,approx:zoe,approxeq:Voe,Aring:Uoe,aring:$oe,Ascr:Woe,ascr:joe,Assign:Goe,ast:Koe,asymp:Joe,asympeq:Yoe,Atilde:Xoe,atilde:Zoe,Auml:Qoe,auml:ese,awconint:tse,awint:rse,backcong:nse,backepsilon:ise,backprime:ase,backsim:ose,backsimeq:sse,Backslash:lse,Barv:use,barvee:cse,barwed:fse,Barwed:dse,barwedge:hse,bbrk:pse,bbrktbrk:vse,bcong:mse,Bcy:gse,bcy:yse,bdquo:bse,becaus:kse,because:wse,Because:Cse,bemptyv:Tse,bepsi:Sse,bernou:xse,Bernoullis:Ese,Beta:Mse,beta:Ase,beth:Ose,between:Nse,Bfr:Dse,bfr:Lse,bigcap:Rse,bigcirc:Ise,bigcup:Pse,bigodot:Bse,bigoplus:Fse,bigotimes:qse,bigsqcup:Hse,bigstar:_se,bigtriangledown:zse,bigtriangleup:Vse,biguplus:Use,bigvee:$se,bigwedge:Wse,bkarow:jse,blacklozenge:Gse,blacksquare:Kse,blacktriangle:Jse,blacktriangledown:Yse,blacktriangleleft:Xse,blacktriangleright:Zse,blank:Qse,blk12:ele,blk14:tle,blk34:rle,block:nle,bne:ile,bnequiv:ale,bNot:ole,bnot:sle,Bopf:lle,bopf:ule,bot:cle,bottom:fle,bowtie:dle,boxbox:hle,boxdl:ple,boxdL:vle,boxDl:mle,boxDL:gle,boxdr:yle,boxdR:ble,boxDr:kle,boxDR:wle,boxh:Cle,boxH:Tle,boxhd:Sle,boxHd:xle,boxhD:Ele,boxHD:Mle,boxhu:Ale,boxHu:Ole,boxhU:Nle,boxHU:Dle,boxminus:Lle,boxplus:Rle,boxtimes:Ile,boxul:Ple,boxuL:Ble,boxUl:Fle,boxUL:qle,boxur:Hle,boxuR:_le,boxUr:zle,boxUR:Vle,boxv:Ule,boxV:$le,boxvh:Wle,boxvH:jle,boxVh:Gle,boxVH:Kle,boxvl:Jle,boxvL:Yle,boxVl:Xle,boxVL:Zle,boxvr:Qle,boxvR:eue,boxVr:tue,boxVR:rue,bprime:nue,breve:iue,Breve:aue,brvbar:oue,bscr:sue,Bscr:lue,bsemi:uue,bsim:cue,bsime:fue,bsolb:due,bsol:hue,bsolhsub:pue,bull:vue,bullet:mue,bump:gue,bumpE:yue,bumpe:bue,Bumpeq:kue,bumpeq:wue,Cacute:Cue,cacute:Tue,capand:Sue,capbrcup:xue,capcap:Eue,cap:Mue,Cap:Aue,capcup:Oue,capdot:Nue,CapitalDifferentialD:Due,caps:Lue,caret:Rue,caron:Iue,Cayleys:Pue,ccaps:Bue,Ccaron:Fue,ccaron:que,Ccedil:Hue,ccedil:_ue,Ccirc:zue,ccirc:Vue,Cconint:Uue,ccups:$ue,ccupssm:Wue,Cdot:jue,cdot:Gue,cedil:Kue,Cedilla:Jue,cemptyv:Yue,cent:Xue,centerdot:Zue,CenterDot:Que,cfr:ece,Cfr:tce,CHcy:rce,chcy:nce,check:ice,checkmark:ace,Chi:oce,chi:sce,circ:lce,circeq:uce,circlearrowleft:cce,circlearrowright:fce,circledast:dce,circledcirc:hce,circleddash:pce,CircleDot:vce,circledR:mce,circledS:gce,CircleMinus:yce,CirclePlus:bce,CircleTimes:kce,cir:wce,cirE:Cce,cire:Tce,cirfnint:Sce,cirmid:xce,cirscir:Ece,ClockwiseContourIntegral:Mce,CloseCurlyDoubleQuote:Ace,CloseCurlyQuote:Oce,clubs:Nce,clubsuit:Dce,colon:Lce,Colon:Rce,Colone:Ice,colone:Pce,coloneq:Bce,comma:Fce,commat:qce,comp:Hce,compfn:_ce,complement:zce,complexes:Vce,cong:Uce,congdot:$ce,Congruent:Wce,conint:jce,Conint:Gce,ContourIntegral:Kce,copf:Jce,Copf:Yce,coprod:Xce,Coproduct:Zce,copy:Qce,COPY:efe,copysr:tfe,CounterClockwiseContourIntegral:rfe,crarr:nfe,cross:ife,Cross:afe,Cscr:ofe,cscr:sfe,csub:lfe,csube:ufe,csup:cfe,csupe:ffe,ctdot:dfe,cudarrl:hfe,cudarrr:pfe,cuepr:vfe,cuesc:mfe,cularr:gfe,cularrp:yfe,cupbrcap:bfe,cupcap:kfe,CupCap:wfe,cup:Cfe,Cup:Tfe,cupcup:Sfe,cupdot:xfe,cupor:Efe,cups:Mfe,curarr:Afe,curarrm:Ofe,curlyeqprec:Nfe,curlyeqsucc:Dfe,curlyvee:Lfe,curlywedge:Rfe,curren:Ife,curvearrowleft:Pfe,curvearrowright:Bfe,cuvee:Ffe,cuwed:qfe,cwconint:Hfe,cwint:_fe,cylcty:zfe,dagger:Vfe,Dagger:Ufe,daleth:$fe,darr:Wfe,Darr:jfe,dArr:Gfe,dash:Kfe,Dashv:Jfe,dashv:Yfe,dbkarow:Xfe,dblac:Zfe,Dcaron:Qfe,dcaron:ede,Dcy:tde,dcy:rde,ddagger:nde,ddarr:ide,DD:ade,dd:ode,DDotrahd:sde,ddotseq:lde,deg:ude,Del:cde,Delta:fde,delta:dde,demptyv:hde,dfisht:pde,Dfr:vde,dfr:mde,dHar:gde,dharl:yde,dharr:bde,DiacriticalAcute:kde,DiacriticalDot:wde,DiacriticalDoubleAcute:Cde,DiacriticalGrave:Tde,DiacriticalTilde:Sde,diam:xde,diamond:Ede,Diamond:Mde,diamondsuit:Ade,diams:Ode,die:Nde,DifferentialD:Dde,digamma:Lde,disin:Rde,div:Ide,divide:Pde,divideontimes:Bde,divonx:Fde,DJcy:qde,djcy:Hde,dlcorn:_de,dlcrop:zde,dollar:Vde,Dopf:Ude,dopf:$de,Dot:Wde,dot:jde,DotDot:Gde,doteq:Kde,doteqdot:Jde,DotEqual:Yde,dotminus:Xde,dotplus:Zde,dotsquare:Qde,doublebarwedge:ehe,DoubleContourIntegral:the,DoubleDot:rhe,DoubleDownArrow:nhe,DoubleLeftArrow:ihe,DoubleLeftRightArrow:ahe,DoubleLeftTee:ohe,DoubleLongLeftArrow:she,DoubleLongLeftRightArrow:lhe,DoubleLongRightArrow:uhe,DoubleRightArrow:che,DoubleRightTee:fhe,DoubleUpArrow:dhe,DoubleUpDownArrow:hhe,DoubleVerticalBar:phe,DownArrowBar:vhe,downarrow:mhe,DownArrow:ghe,Downarrow:yhe,DownArrowUpArrow:bhe,DownBreve:khe,downdownarrows:whe,downharpoonleft:Che,downharpoonright:The,DownLeftRightVector:She,DownLeftTeeVector:xhe,DownLeftVectorBar:Ehe,DownLeftVector:Mhe,DownRightTeeVector:Ahe,DownRightVectorBar:Ohe,DownRightVector:Nhe,DownTeeArrow:Dhe,DownTee:Lhe,drbkarow:Rhe,drcorn:Ihe,drcrop:Phe,Dscr:Bhe,dscr:Fhe,DScy:qhe,dscy:Hhe,dsol:_he,Dstrok:zhe,dstrok:Vhe,dtdot:Uhe,dtri:$he,dtrif:Whe,duarr:jhe,duhar:Ghe,dwangle:Khe,DZcy:Jhe,dzcy:Yhe,dzigrarr:Xhe,Eacute:Zhe,eacute:Qhe,easter:epe,Ecaron:tpe,ecaron:rpe,Ecirc:npe,ecirc:ipe,ecir:ape,ecolon:ope,Ecy:spe,ecy:lpe,eDDot:upe,Edot:cpe,edot:fpe,eDot:dpe,ee:hpe,efDot:ppe,Efr:vpe,efr:mpe,eg:gpe,Egrave:ype,egrave:bpe,egs:kpe,egsdot:wpe,el:Cpe,Element:Tpe,elinters:Spe,ell:xpe,els:Epe,elsdot:Mpe,Emacr:Ape,emacr:Ope,empty:Npe,emptyset:Dpe,EmptySmallSquare:Lpe,emptyv:Rpe,EmptyVerySmallSquare:Ipe,emsp13:Ppe,emsp14:Bpe,emsp:Fpe,ENG:qpe,eng:Hpe,ensp:_pe,Eogon:zpe,eogon:Vpe,Eopf:Upe,eopf:$pe,epar:Wpe,eparsl:jpe,eplus:Gpe,epsi:Kpe,Epsilon:Jpe,epsilon:Ype,epsiv:Xpe,eqcirc:Zpe,eqcolon:Qpe,eqsim:eve,eqslantgtr:tve,eqslantless:rve,Equal:nve,equals:ive,EqualTilde:ave,equest:ove,Equilibrium:sve,equiv:lve,equivDD:uve,eqvparsl:cve,erarr:fve,erDot:dve,escr:hve,Escr:pve,esdot:vve,Esim:mve,esim:gve,Eta:yve,eta:bve,ETH:kve,eth:wve,Euml:Cve,euml:Tve,euro:Sve,excl:xve,exist:Eve,Exists:Mve,expectation:Ave,exponentiale:Ove,ExponentialE:Nve,fallingdotseq:Dve,Fcy:Lve,fcy:Rve,female:Ive,ffilig:Pve,fflig:Bve,ffllig:Fve,Ffr:qve,ffr:Hve,filig:_ve,FilledSmallSquare:zve,FilledVerySmallSquare:Vve,fjlig:Uve,flat:$ve,fllig:Wve,fltns:jve,fnof:Gve,Fopf:Kve,fopf:Jve,forall:Yve,ForAll:Xve,fork:Zve,forkv:Qve,Fouriertrf:eme,fpartint:tme,frac12:rme,frac13:nme,frac14:ime,frac15:ame,frac16:ome,frac18:sme,frac23:lme,frac25:ume,frac34:cme,frac35:fme,frac38:dme,frac45:hme,frac56:pme,frac58:vme,frac78:mme,frasl:gme,frown:yme,fscr:bme,Fscr:kme,gacute:wme,Gamma:Cme,gamma:Tme,Gammad:Sme,gammad:xme,gap:Eme,Gbreve:Mme,gbreve:Ame,Gcedil:Ome,Gcirc:Nme,gcirc:Dme,Gcy:Lme,gcy:Rme,Gdot:Ime,gdot:Pme,ge:Bme,gE:Fme,gEl:qme,gel:Hme,geq:_me,geqq:zme,geqslant:Vme,gescc:Ume,ges:$me,gesdot:Wme,gesdoto:jme,gesdotol:Gme,gesl:Kme,gesles:Jme,Gfr:Yme,gfr:Xme,gg:Zme,Gg:Qme,ggg:ege,gimel:tge,GJcy:rge,gjcy:nge,gla:ige,gl:age,glE:oge,glj:sge,gnap:lge,gnapprox:uge,gne:cge,gnE:fge,gneq:dge,gneqq:hge,gnsim:pge,Gopf:vge,gopf:mge,grave:gge,GreaterEqual:yge,GreaterEqualLess:bge,GreaterFullEqual:kge,GreaterGreater:wge,GreaterLess:Cge,GreaterSlantEqual:Tge,GreaterTilde:Sge,Gscr:xge,gscr:Ege,gsim:Mge,gsime:Age,gsiml:Oge,gtcc:Nge,gtcir:Dge,gt:Lge,GT:Rge,Gt:Ige,gtdot:Pge,gtlPar:Bge,gtquest:Fge,gtrapprox:qge,gtrarr:Hge,gtrdot:_ge,gtreqless:zge,gtreqqless:Vge,gtrless:Uge,gtrsim:$ge,gvertneqq:Wge,gvnE:jge,Hacek:Gge,hairsp:Kge,half:Jge,hamilt:Yge,HARDcy:Xge,hardcy:Zge,harrcir:Qge,harr:eye,hArr:tye,harrw:rye,Hat:nye,hbar:iye,Hcirc:aye,hcirc:oye,hearts:sye,heartsuit:lye,hellip:uye,hercon:cye,hfr:fye,Hfr:dye,HilbertSpace:hye,hksearow:pye,hkswarow:vye,hoarr:mye,homtht:gye,hookleftarrow:yye,hookrightarrow:bye,hopf:kye,Hopf:wye,horbar:Cye,HorizontalLine:Tye,hscr:Sye,Hscr:xye,hslash:Eye,Hstrok:Mye,hstrok:Aye,HumpDownHump:Oye,HumpEqual:Nye,hybull:Dye,hyphen:Lye,Iacute:Rye,iacute:Iye,ic:Pye,Icirc:Bye,icirc:Fye,Icy:qye,icy:Hye,Idot:_ye,IEcy:zye,iecy:Vye,iexcl:Uye,iff:$ye,ifr:Wye,Ifr:jye,Igrave:Gye,igrave:Kye,ii:Jye,iiiint:Yye,iiint:Xye,iinfin:Zye,iiota:Qye,IJlig:ebe,ijlig:tbe,Imacr:rbe,imacr:nbe,image:ibe,ImaginaryI:abe,imagline:obe,imagpart:sbe,imath:lbe,Im:ube,imof:cbe,imped:fbe,Implies:dbe,incare:hbe,in:"∈",infin:pbe,infintie:vbe,inodot:mbe,intcal:gbe,int:ybe,Int:bbe,integers:kbe,Integral:wbe,intercal:Cbe,Intersection:Tbe,intlarhk:Sbe,intprod:xbe,InvisibleComma:Ebe,InvisibleTimes:Mbe,IOcy:Abe,iocy:Obe,Iogon:Nbe,iogon:Dbe,Iopf:Lbe,iopf:Rbe,Iota:Ibe,iota:Pbe,iprod:Bbe,iquest:Fbe,iscr:qbe,Iscr:Hbe,isin:_be,isindot:zbe,isinE:Vbe,isins:Ube,isinsv:$be,isinv:Wbe,it:jbe,Itilde:Gbe,itilde:Kbe,Iukcy:Jbe,iukcy:Ybe,Iuml:Xbe,iuml:Zbe,Jcirc:Qbe,jcirc:eke,Jcy:tke,jcy:rke,Jfr:nke,jfr:ike,jmath:ake,Jopf:oke,jopf:ske,Jscr:lke,jscr:uke,Jsercy:cke,jsercy:fke,Jukcy:dke,jukcy:hke,Kappa:pke,kappa:vke,kappav:mke,Kcedil:gke,kcedil:yke,Kcy:bke,kcy:kke,Kfr:wke,kfr:Cke,kgreen:Tke,KHcy:Ske,khcy:xke,KJcy:Eke,kjcy:Mke,Kopf:Ake,kopf:Oke,Kscr:Nke,kscr:Dke,lAarr:Lke,Lacute:Rke,lacute:Ike,laemptyv:Pke,lagran:Bke,Lambda:Fke,lambda:qke,lang:Hke,Lang:_ke,langd:zke,langle:Vke,lap:Uke,Laplacetrf:$ke,laquo:Wke,larrb:jke,larrbfs:Gke,larr:Kke,Larr:Jke,lArr:Yke,larrfs:Xke,larrhk:Zke,larrlp:Qke,larrpl:ewe,larrsim:twe,larrtl:rwe,latail:nwe,lAtail:iwe,lat:awe,late:owe,lates:swe,lbarr:lwe,lBarr:uwe,lbbrk:cwe,lbrace:fwe,lbrack:dwe,lbrke:hwe,lbrksld:pwe,lbrkslu:vwe,Lcaron:mwe,lcaron:gwe,Lcedil:ywe,lcedil:bwe,lceil:kwe,lcub:wwe,Lcy:Cwe,lcy:Twe,ldca:Swe,ldquo:xwe,ldquor:Ewe,ldrdhar:Mwe,ldrushar:Awe,ldsh:Owe,le:Nwe,lE:Dwe,LeftAngleBracket:Lwe,LeftArrowBar:Rwe,leftarrow:Iwe,LeftArrow:Pwe,Leftarrow:Bwe,LeftArrowRightArrow:Fwe,leftarrowtail:qwe,LeftCeiling:Hwe,LeftDoubleBracket:_we,LeftDownTeeVector:zwe,LeftDownVectorBar:Vwe,LeftDownVector:Uwe,LeftFloor:$we,leftharpoondown:Wwe,leftharpoonup:jwe,leftleftarrows:Gwe,leftrightarrow:Kwe,LeftRightArrow:Jwe,Leftrightarrow:Ywe,leftrightarrows:Xwe,leftrightharpoons:Zwe,leftrightsquigarrow:Qwe,LeftRightVector:e0e,LeftTeeArrow:t0e,LeftTee:r0e,LeftTeeVector:n0e,leftthreetimes:i0e,LeftTriangleBar:a0e,LeftTriangle:o0e,LeftTriangleEqual:s0e,LeftUpDownVector:l0e,LeftUpTeeVector:u0e,LeftUpVectorBar:c0e,LeftUpVector:f0e,LeftVectorBar:d0e,LeftVector:h0e,lEg:p0e,leg:v0e,leq:m0e,leqq:g0e,leqslant:y0e,lescc:b0e,les:k0e,lesdot:w0e,lesdoto:C0e,lesdotor:T0e,lesg:S0e,lesges:x0e,lessapprox:E0e,lessdot:M0e,lesseqgtr:A0e,lesseqqgtr:O0e,LessEqualGreater:N0e,LessFullEqual:D0e,LessGreater:L0e,lessgtr:R0e,LessLess:I0e,lesssim:P0e,LessSlantEqual:B0e,LessTilde:F0e,lfisht:q0e,lfloor:H0e,Lfr:_0e,lfr:z0e,lg:V0e,lgE:U0e,lHar:$0e,lhard:W0e,lharu:j0e,lharul:G0e,lhblk:K0e,LJcy:J0e,ljcy:Y0e,llarr:X0e,ll:Z0e,Ll:Q0e,llcorner:eCe,Lleftarrow:tCe,llhard:rCe,lltri:nCe,Lmidot:iCe,lmidot:aCe,lmoustache:oCe,lmoust:sCe,lnap:lCe,lnapprox:uCe,lne:cCe,lnE:fCe,lneq:dCe,lneqq:hCe,lnsim:pCe,loang:vCe,loarr:mCe,lobrk:gCe,longleftarrow:yCe,LongLeftArrow:bCe,Longleftarrow:kCe,longleftrightarrow:wCe,LongLeftRightArrow:CCe,Longleftrightarrow:TCe,longmapsto:SCe,longrightarrow:xCe,LongRightArrow:ECe,Longrightarrow:MCe,looparrowleft:ACe,looparrowright:OCe,lopar:NCe,Lopf:DCe,lopf:LCe,loplus:RCe,lotimes:ICe,lowast:PCe,lowbar:BCe,LowerLeftArrow:FCe,LowerRightArrow:qCe,loz:HCe,lozenge:_Ce,lozf:zCe,lpar:VCe,lparlt:UCe,lrarr:$Ce,lrcorner:WCe,lrhar:jCe,lrhard:GCe,lrm:KCe,lrtri:JCe,lsaquo:YCe,lscr:XCe,Lscr:ZCe,lsh:QCe,Lsh:e1e,lsim:t1e,lsime:r1e,lsimg:n1e,lsqb:i1e,lsquo:a1e,lsquor:o1e,Lstrok:s1e,lstrok:l1e,ltcc:u1e,ltcir:c1e,lt:f1e,LT:d1e,Lt:h1e,ltdot:p1e,lthree:v1e,ltimes:m1e,ltlarr:g1e,ltquest:y1e,ltri:b1e,ltrie:k1e,ltrif:w1e,ltrPar:C1e,lurdshar:T1e,luruhar:S1e,lvertneqq:x1e,lvnE:E1e,macr:M1e,male:A1e,malt:O1e,maltese:N1e,Map:"⤅",map:D1e,mapsto:L1e,mapstodown:R1e,mapstoleft:I1e,mapstoup:P1e,marker:B1e,mcomma:F1e,Mcy:q1e,mcy:H1e,mdash:_1e,mDDot:z1e,measuredangle:V1e,MediumSpace:U1e,Mellintrf:$1e,Mfr:W1e,mfr:j1e,mho:G1e,micro:K1e,midast:J1e,midcir:Y1e,mid:X1e,middot:Z1e,minusb:Q1e,minus:eTe,minusd:tTe,minusdu:rTe,MinusPlus:nTe,mlcp:iTe,mldr:aTe,mnplus:oTe,models:sTe,Mopf:lTe,mopf:uTe,mp:cTe,mscr:fTe,Mscr:dTe,mstpos:hTe,Mu:pTe,mu:vTe,multimap:mTe,mumap:gTe,nabla:yTe,Nacute:bTe,nacute:kTe,nang:wTe,nap:CTe,napE:TTe,napid:STe,napos:xTe,napprox:ETe,natural:MTe,naturals:ATe,natur:OTe,nbsp:NTe,nbump:DTe,nbumpe:LTe,ncap:RTe,Ncaron:ITe,ncaron:PTe,Ncedil:BTe,ncedil:FTe,ncong:qTe,ncongdot:HTe,ncup:_Te,Ncy:zTe,ncy:VTe,ndash:UTe,nearhk:$Te,nearr:WTe,neArr:jTe,nearrow:GTe,ne:KTe,nedot:JTe,NegativeMediumSpace:YTe,NegativeThickSpace:XTe,NegativeThinSpace:ZTe,NegativeVeryThinSpace:QTe,nequiv:eSe,nesear:tSe,nesim:rSe,NestedGreaterGreater:nSe,NestedLessLess:iSe,NewLine:aSe,nexist:oSe,nexists:sSe,Nfr:lSe,nfr:uSe,ngE:cSe,nge:fSe,ngeq:dSe,ngeqq:hSe,ngeqslant:pSe,nges:vSe,nGg:mSe,ngsim:gSe,nGt:ySe,ngt:bSe,ngtr:kSe,nGtv:wSe,nharr:CSe,nhArr:TSe,nhpar:SSe,ni:xSe,nis:ESe,nisd:MSe,niv:ASe,NJcy:OSe,njcy:NSe,nlarr:DSe,nlArr:LSe,nldr:RSe,nlE:ISe,nle:PSe,nleftarrow:BSe,nLeftarrow:FSe,nleftrightarrow:qSe,nLeftrightarrow:HSe,nleq:_Se,nleqq:zSe,nleqslant:VSe,nles:USe,nless:$Se,nLl:WSe,nlsim:jSe,nLt:GSe,nlt:KSe,nltri:JSe,nltrie:YSe,nLtv:XSe,nmid:ZSe,NoBreak:QSe,NonBreakingSpace:exe,nopf:txe,Nopf:rxe,Not:nxe,not:ixe,NotCongruent:axe,NotCupCap:oxe,NotDoubleVerticalBar:sxe,NotElement:lxe,NotEqual:uxe,NotEqualTilde:cxe,NotExists:fxe,NotGreater:dxe,NotGreaterEqual:hxe,NotGreaterFullEqual:pxe,NotGreaterGreater:vxe,NotGreaterLess:mxe,NotGreaterSlantEqual:gxe,NotGreaterTilde:yxe,NotHumpDownHump:bxe,NotHumpEqual:kxe,notin:wxe,notindot:Cxe,notinE:Txe,notinva:Sxe,notinvb:xxe,notinvc:Exe,NotLeftTriangleBar:Mxe,NotLeftTriangle:Axe,NotLeftTriangleEqual:Oxe,NotLess:Nxe,NotLessEqual:Dxe,NotLessGreater:Lxe,NotLessLess:Rxe,NotLessSlantEqual:Ixe,NotLessTilde:Pxe,NotNestedGreaterGreater:Bxe,NotNestedLessLess:Fxe,notni:qxe,notniva:Hxe,notnivb:_xe,notnivc:zxe,NotPrecedes:Vxe,NotPrecedesEqual:Uxe,NotPrecedesSlantEqual:$xe,NotReverseElement:Wxe,NotRightTriangleBar:jxe,NotRightTriangle:Gxe,NotRightTriangleEqual:Kxe,NotSquareSubset:Jxe,NotSquareSubsetEqual:Yxe,NotSquareSuperset:Xxe,NotSquareSupersetEqual:Zxe,NotSubset:Qxe,NotSubsetEqual:eEe,NotSucceeds:tEe,NotSucceedsEqual:rEe,NotSucceedsSlantEqual:nEe,NotSucceedsTilde:iEe,NotSuperset:aEe,NotSupersetEqual:oEe,NotTilde:sEe,NotTildeEqual:lEe,NotTildeFullEqual:uEe,NotTildeTilde:cEe,NotVerticalBar:fEe,nparallel:dEe,npar:hEe,nparsl:pEe,npart:vEe,npolint:mEe,npr:gEe,nprcue:yEe,nprec:bEe,npreceq:kEe,npre:wEe,nrarrc:CEe,nrarr:TEe,nrArr:SEe,nrarrw:xEe,nrightarrow:EEe,nRightarrow:MEe,nrtri:AEe,nrtrie:OEe,nsc:NEe,nsccue:DEe,nsce:LEe,Nscr:REe,nscr:IEe,nshortmid:PEe,nshortparallel:BEe,nsim:FEe,nsime:qEe,nsimeq:HEe,nsmid:_Ee,nspar:zEe,nsqsube:VEe,nsqsupe:UEe,nsub:$Ee,nsubE:WEe,nsube:jEe,nsubset:GEe,nsubseteq:KEe,nsubseteqq:JEe,nsucc:YEe,nsucceq:XEe,nsup:ZEe,nsupE:QEe,nsupe:eMe,nsupset:tMe,nsupseteq:rMe,nsupseteqq:nMe,ntgl:iMe,Ntilde:aMe,ntilde:oMe,ntlg:sMe,ntriangleleft:lMe,ntrianglelefteq:uMe,ntriangleright:cMe,ntrianglerighteq:fMe,Nu:dMe,nu:hMe,num:pMe,numero:vMe,numsp:mMe,nvap:gMe,nvdash:yMe,nvDash:bMe,nVdash:kMe,nVDash:wMe,nvge:CMe,nvgt:TMe,nvHarr:SMe,nvinfin:xMe,nvlArr:EMe,nvle:MMe,nvlt:AMe,nvltrie:OMe,nvrArr:NMe,nvrtrie:DMe,nvsim:LMe,nwarhk:RMe,nwarr:IMe,nwArr:PMe,nwarrow:BMe,nwnear:FMe,Oacute:qMe,oacute:HMe,oast:_Me,Ocirc:zMe,ocirc:VMe,ocir:UMe,Ocy:$Me,ocy:WMe,odash:jMe,Odblac:GMe,odblac:KMe,odiv:JMe,odot:YMe,odsold:XMe,OElig:ZMe,oelig:QMe,ofcir:eAe,Ofr:tAe,ofr:rAe,ogon:nAe,Ograve:iAe,ograve:aAe,ogt:oAe,ohbar:sAe,ohm:lAe,oint:uAe,olarr:cAe,olcir:fAe,olcross:dAe,oline:hAe,olt:pAe,Omacr:vAe,omacr:mAe,Omega:gAe,omega:yAe,Omicron:bAe,omicron:kAe,omid:wAe,ominus:CAe,Oopf:TAe,oopf:SAe,opar:xAe,OpenCurlyDoubleQuote:EAe,OpenCurlyQuote:MAe,operp:AAe,oplus:OAe,orarr:NAe,Or:DAe,or:LAe,ord:RAe,order:IAe,orderof:PAe,ordf:BAe,ordm:FAe,origof:qAe,oror:HAe,orslope:_Ae,orv:zAe,oS:VAe,Oscr:UAe,oscr:$Ae,Oslash:WAe,oslash:jAe,osol:GAe,Otilde:KAe,otilde:JAe,otimesas:YAe,Otimes:XAe,otimes:ZAe,Ouml:QAe,ouml:eOe,ovbar:tOe,OverBar:rOe,OverBrace:nOe,OverBracket:iOe,OverParenthesis:aOe,para:oOe,parallel:sOe,par:lOe,parsim:uOe,parsl:cOe,part:fOe,PartialD:dOe,Pcy:hOe,pcy:pOe,percnt:vOe,period:mOe,permil:gOe,perp:yOe,pertenk:bOe,Pfr:kOe,pfr:wOe,Phi:COe,phi:TOe,phiv:SOe,phmmat:xOe,phone:EOe,Pi:MOe,pi:AOe,pitchfork:OOe,piv:NOe,planck:DOe,planckh:LOe,plankv:ROe,plusacir:IOe,plusb:POe,pluscir:BOe,plus:FOe,plusdo:qOe,plusdu:HOe,pluse:_Oe,PlusMinus:zOe,plusmn:VOe,plussim:UOe,plustwo:$Oe,pm:WOe,Poincareplane:jOe,pointint:GOe,popf:KOe,Popf:JOe,pound:YOe,prap:XOe,Pr:ZOe,pr:QOe,prcue:eNe,precapprox:tNe,prec:rNe,preccurlyeq:nNe,Precedes:iNe,PrecedesEqual:aNe,PrecedesSlantEqual:oNe,PrecedesTilde:sNe,preceq:lNe,precnapprox:uNe,precneqq:cNe,precnsim:fNe,pre:dNe,prE:hNe,precsim:pNe,prime:vNe,Prime:mNe,primes:gNe,prnap:yNe,prnE:bNe,prnsim:kNe,prod:wNe,Product:CNe,profalar:TNe,profline:SNe,profsurf:xNe,prop:ENe,Proportional:MNe,Proportion:ANe,propto:ONe,prsim:NNe,prurel:DNe,Pscr:LNe,pscr:RNe,Psi:INe,psi:PNe,puncsp:BNe,Qfr:FNe,qfr:qNe,qint:HNe,qopf:_Ne,Qopf:zNe,qprime:VNe,Qscr:UNe,qscr:$Ne,quaternions:WNe,quatint:jNe,quest:GNe,questeq:KNe,quot:JNe,QUOT:YNe,rAarr:XNe,race:ZNe,Racute:QNe,racute:eDe,radic:tDe,raemptyv:rDe,rang:nDe,Rang:iDe,rangd:aDe,range:oDe,rangle:sDe,raquo:lDe,rarrap:uDe,rarrb:cDe,rarrbfs:fDe,rarrc:dDe,rarr:hDe,Rarr:pDe,rArr:vDe,rarrfs:mDe,rarrhk:gDe,rarrlp:yDe,rarrpl:bDe,rarrsim:kDe,Rarrtl:wDe,rarrtl:CDe,rarrw:TDe,ratail:SDe,rAtail:xDe,ratio:EDe,rationals:MDe,rbarr:ADe,rBarr:ODe,RBarr:NDe,rbbrk:DDe,rbrace:LDe,rbrack:RDe,rbrke:IDe,rbrksld:PDe,rbrkslu:BDe,Rcaron:FDe,rcaron:qDe,Rcedil:HDe,rcedil:_De,rceil:zDe,rcub:VDe,Rcy:UDe,rcy:$De,rdca:WDe,rdldhar:jDe,rdquo:GDe,rdquor:KDe,rdsh:JDe,real:YDe,realine:XDe,realpart:ZDe,reals:QDe,Re:eLe,rect:tLe,reg:rLe,REG:nLe,ReverseElement:iLe,ReverseEquilibrium:aLe,ReverseUpEquilibrium:oLe,rfisht:sLe,rfloor:lLe,rfr:uLe,Rfr:cLe,rHar:fLe,rhard:dLe,rharu:hLe,rharul:pLe,Rho:vLe,rho:mLe,rhov:gLe,RightAngleBracket:yLe,RightArrowBar:bLe,rightarrow:kLe,RightArrow:wLe,Rightarrow:CLe,RightArrowLeftArrow:TLe,rightarrowtail:SLe,RightCeiling:xLe,RightDoubleBracket:ELe,RightDownTeeVector:MLe,RightDownVectorBar:ALe,RightDownVector:OLe,RightFloor:NLe,rightharpoondown:DLe,rightharpoonup:LLe,rightleftarrows:RLe,rightleftharpoons:ILe,rightrightarrows:PLe,rightsquigarrow:BLe,RightTeeArrow:FLe,RightTee:qLe,RightTeeVector:HLe,rightthreetimes:_Le,RightTriangleBar:zLe,RightTriangle:VLe,RightTriangleEqual:ULe,RightUpDownVector:$Le,RightUpTeeVector:WLe,RightUpVectorBar:jLe,RightUpVector:GLe,RightVectorBar:KLe,RightVector:JLe,ring:YLe,risingdotseq:XLe,rlarr:ZLe,rlhar:QLe,rlm:eRe,rmoustache:tRe,rmoust:rRe,rnmid:nRe,roang:iRe,roarr:aRe,robrk:oRe,ropar:sRe,ropf:lRe,Ropf:uRe,roplus:cRe,rotimes:fRe,RoundImplies:dRe,rpar:hRe,rpargt:pRe,rppolint:vRe,rrarr:mRe,Rrightarrow:gRe,rsaquo:yRe,rscr:bRe,Rscr:kRe,rsh:wRe,Rsh:CRe,rsqb:TRe,rsquo:SRe,rsquor:xRe,rthree:ERe,rtimes:MRe,rtri:ARe,rtrie:ORe,rtrif:NRe,rtriltri:DRe,RuleDelayed:LRe,ruluhar:RRe,rx:IRe,Sacute:PRe,sacute:BRe,sbquo:FRe,scap:qRe,Scaron:HRe,scaron:_Re,Sc:zRe,sc:VRe,sccue:URe,sce:$Re,scE:WRe,Scedil:jRe,scedil:GRe,Scirc:KRe,scirc:JRe,scnap:YRe,scnE:XRe,scnsim:ZRe,scpolint:QRe,scsim:eIe,Scy:tIe,scy:rIe,sdotb:nIe,sdot:iIe,sdote:aIe,searhk:oIe,searr:sIe,seArr:lIe,searrow:uIe,sect:cIe,semi:fIe,seswar:dIe,setminus:hIe,setmn:pIe,sext:vIe,Sfr:mIe,sfr:gIe,sfrown:yIe,sharp:bIe,SHCHcy:kIe,shchcy:wIe,SHcy:CIe,shcy:TIe,ShortDownArrow:SIe,ShortLeftArrow:xIe,shortmid:EIe,shortparallel:MIe,ShortRightArrow:AIe,ShortUpArrow:OIe,shy:NIe,Sigma:DIe,sigma:LIe,sigmaf:RIe,sigmav:IIe,sim:PIe,simdot:BIe,sime:FIe,simeq:qIe,simg:HIe,simgE:_Ie,siml:zIe,simlE:VIe,simne:UIe,simplus:$Ie,simrarr:WIe,slarr:jIe,SmallCircle:GIe,smallsetminus:KIe,smashp:JIe,smeparsl:YIe,smid:XIe,smile:ZIe,smt:QIe,smte:ePe,smtes:tPe,SOFTcy:rPe,softcy:nPe,solbar:iPe,solb:aPe,sol:oPe,Sopf:sPe,sopf:lPe,spades:uPe,spadesuit:cPe,spar:fPe,sqcap:dPe,sqcaps:hPe,sqcup:pPe,sqcups:vPe,Sqrt:mPe,sqsub:gPe,sqsube:yPe,sqsubset:bPe,sqsubseteq:kPe,sqsup:wPe,sqsupe:CPe,sqsupset:TPe,sqsupseteq:SPe,square:xPe,Square:EPe,SquareIntersection:MPe,SquareSubset:APe,SquareSubsetEqual:OPe,SquareSuperset:NPe,SquareSupersetEqual:DPe,SquareUnion:LPe,squarf:RPe,squ:IPe,squf:PPe,srarr:BPe,Sscr:FPe,sscr:qPe,ssetmn:HPe,ssmile:_Pe,sstarf:zPe,Star:VPe,star:UPe,starf:$Pe,straightepsilon:WPe,straightphi:jPe,strns:GPe,sub:KPe,Sub:JPe,subdot:YPe,subE:XPe,sube:ZPe,subedot:QPe,submult:eBe,subnE:tBe,subne:rBe,subplus:nBe,subrarr:iBe,subset:aBe,Subset:oBe,subseteq:sBe,subseteqq:lBe,SubsetEqual:uBe,subsetneq:cBe,subsetneqq:fBe,subsim:dBe,subsub:hBe,subsup:pBe,succapprox:vBe,succ:mBe,succcurlyeq:gBe,Succeeds:yBe,SucceedsEqual:bBe,SucceedsSlantEqual:kBe,SucceedsTilde:wBe,succeq:CBe,succnapprox:TBe,succneqq:SBe,succnsim:xBe,succsim:EBe,SuchThat:MBe,sum:ABe,Sum:OBe,sung:NBe,sup1:DBe,sup2:LBe,sup3:RBe,sup:IBe,Sup:PBe,supdot:BBe,supdsub:FBe,supE:qBe,supe:HBe,supedot:_Be,Superset:zBe,SupersetEqual:VBe,suphsol:UBe,suphsub:$Be,suplarr:WBe,supmult:jBe,supnE:GBe,supne:KBe,supplus:JBe,supset:YBe,Supset:XBe,supseteq:ZBe,supseteqq:QBe,supsetneq:eFe,supsetneqq:tFe,supsim:rFe,supsub:nFe,supsup:iFe,swarhk:aFe,swarr:oFe,swArr:sFe,swarrow:lFe,swnwar:uFe,szlig:cFe,Tab:fFe,target:dFe,Tau:hFe,tau:pFe,tbrk:vFe,Tcaron:mFe,tcaron:gFe,Tcedil:yFe,tcedil:bFe,Tcy:kFe,tcy:wFe,tdot:CFe,telrec:TFe,Tfr:SFe,tfr:xFe,there4:EFe,therefore:MFe,Therefore:AFe,Theta:OFe,theta:NFe,thetasym:DFe,thetav:LFe,thickapprox:RFe,thicksim:IFe,ThickSpace:PFe,ThinSpace:BFe,thinsp:FFe,thkap:qFe,thksim:HFe,THORN:_Fe,thorn:zFe,tilde:VFe,Tilde:UFe,TildeEqual:$Fe,TildeFullEqual:WFe,TildeTilde:jFe,timesbar:GFe,timesb:KFe,times:JFe,timesd:YFe,tint:XFe,toea:ZFe,topbot:QFe,topcir:eqe,top:tqe,Topf:rqe,topf:nqe,topfork:iqe,tosa:aqe,tprime:oqe,trade:sqe,TRADE:lqe,triangle:uqe,triangledown:cqe,triangleleft:fqe,trianglelefteq:dqe,triangleq:hqe,triangleright:pqe,trianglerighteq:vqe,tridot:mqe,trie:gqe,triminus:yqe,TripleDot:bqe,triplus:kqe,trisb:wqe,tritime:Cqe,trpezium:Tqe,Tscr:Sqe,tscr:xqe,TScy:Eqe,tscy:Mqe,TSHcy:Aqe,tshcy:Oqe,Tstrok:Nqe,tstrok:Dqe,twixt:Lqe,twoheadleftarrow:Rqe,twoheadrightarrow:Iqe,Uacute:Pqe,uacute:Bqe,uarr:Fqe,Uarr:qqe,uArr:Hqe,Uarrocir:_qe,Ubrcy:zqe,ubrcy:Vqe,Ubreve:Uqe,ubreve:$qe,Ucirc:Wqe,ucirc:jqe,Ucy:Gqe,ucy:Kqe,udarr:Jqe,Udblac:Yqe,udblac:Xqe,udhar:Zqe,ufisht:Qqe,Ufr:eHe,ufr:tHe,Ugrave:rHe,ugrave:nHe,uHar:iHe,uharl:aHe,uharr:oHe,uhblk:sHe,ulcorn:lHe,ulcorner:uHe,ulcrop:cHe,ultri:fHe,Umacr:dHe,umacr:hHe,uml:pHe,UnderBar:vHe,UnderBrace:mHe,UnderBracket:gHe,UnderParenthesis:yHe,Union:bHe,UnionPlus:kHe,Uogon:wHe,uogon:CHe,Uopf:THe,uopf:SHe,UpArrowBar:xHe,uparrow:EHe,UpArrow:MHe,Uparrow:AHe,UpArrowDownArrow:OHe,updownarrow:NHe,UpDownArrow:DHe,Updownarrow:LHe,UpEquilibrium:RHe,upharpoonleft:IHe,upharpoonright:PHe,uplus:BHe,UpperLeftArrow:FHe,UpperRightArrow:qHe,upsi:HHe,Upsi:_He,upsih:zHe,Upsilon:VHe,upsilon:UHe,UpTeeArrow:$He,UpTee:WHe,upuparrows:jHe,urcorn:GHe,urcorner:KHe,urcrop:JHe,Uring:YHe,uring:XHe,urtri:ZHe,Uscr:QHe,uscr:e_e,utdot:t_e,Utilde:r_e,utilde:n_e,utri:i_e,utrif:a_e,uuarr:o_e,Uuml:s_e,uuml:l_e,uwangle:u_e,vangrt:c_e,varepsilon:f_e,varkappa:d_e,varnothing:h_e,varphi:p_e,varpi:v_e,varpropto:m_e,varr:g_e,vArr:y_e,varrho:b_e,varsigma:k_e,varsubsetneq:w_e,varsubsetneqq:C_e,varsupsetneq:T_e,varsupsetneqq:S_e,vartheta:x_e,vartriangleleft:E_e,vartriangleright:M_e,vBar:A_e,Vbar:O_e,vBarv:N_e,Vcy:D_e,vcy:L_e,vdash:R_e,vDash:I_e,Vdash:P_e,VDash:B_e,Vdashl:F_e,veebar:q_e,vee:H_e,Vee:__e,veeeq:z_e,vellip:V_e,verbar:U_e,Verbar:$_e,vert:W_e,Vert:j_e,VerticalBar:G_e,VerticalLine:K_e,VerticalSeparator:J_e,VerticalTilde:Y_e,VeryThinSpace:X_e,Vfr:Z_e,vfr:Q_e,vltri:eze,vnsub:tze,vnsup:rze,Vopf:nze,vopf:ize,vprop:aze,vrtri:oze,Vscr:sze,vscr:lze,vsubnE:uze,vsubne:cze,vsupnE:fze,vsupne:dze,Vvdash:hze,vzigzag:pze,Wcirc:vze,wcirc:mze,wedbar:gze,wedge:yze,Wedge:bze,wedgeq:kze,weierp:wze,Wfr:Cze,wfr:Tze,Wopf:Sze,wopf:xze,wp:Eze,wr:Mze,wreath:Aze,Wscr:Oze,wscr:Nze,xcap:Dze,xcirc:Lze,xcup:Rze,xdtri:Ize,Xfr:Pze,xfr:Bze,xharr:Fze,xhArr:qze,Xi:Hze,xi:_ze,xlarr:zze,xlArr:Vze,xmap:Uze,xnis:$ze,xodot:Wze,Xopf:jze,xopf:Gze,xoplus:Kze,xotime:Jze,xrarr:Yze,xrArr:Xze,Xscr:Zze,xscr:Qze,xsqcup:eVe,xuplus:tVe,xutri:rVe,xvee:nVe,xwedge:iVe,Yacute:aVe,yacute:oVe,YAcy:sVe,yacy:lVe,Ycirc:uVe,ycirc:cVe,Ycy:fVe,ycy:dVe,yen:hVe,Yfr:pVe,yfr:vVe,YIcy:mVe,yicy:gVe,Yopf:yVe,yopf:bVe,Yscr:kVe,yscr:wVe,YUcy:CVe,yucy:TVe,yuml:SVe,Yuml:xVe,Zacute:EVe,zacute:MVe,Zcaron:AVe,zcaron:OVe,Zcy:NVe,zcy:DVe,Zdot:LVe,zdot:RVe,zeetrf:IVe,ZeroWidthSpace:PVe,Zeta:BVe,zeta:FVe,zfr:qVe,Zfr:HVe,ZHcy:_Ve,zhcy:zVe,zigrarr:VVe,zopf:UVe,Zopf:$Ve,Zscr:WVe,zscr:jVe,zwj:GVe,zwnj:KVe},JVe="Á",YVe="á",XVe="Â",ZVe="â",QVe="´",e2e="Æ",t2e="æ",r2e="À",n2e="à",i2e="&",a2e="&",o2e="Å",s2e="å",l2e="Ã",u2e="ã",c2e="Ä",f2e="ä",d2e="¦",h2e="Ç",p2e="ç",v2e="¸",m2e="¢",g2e="©",y2e="©",b2e="¤",k2e="°",w2e="÷",C2e="É",T2e="é",S2e="Ê",x2e="ê",E2e="È",M2e="è",A2e="Ð",O2e="ð",N2e="Ë",D2e="ë",L2e="½",R2e="¼",I2e="¾",P2e=">",B2e=">",F2e="Í",q2e="í",H2e="Î",_2e="î",z2e="¡",V2e="Ì",U2e="ì",$2e="¿",W2e="Ï",j2e="ï",G2e="«",K2e="<",J2e="<",Y2e="¯",X2e="µ",Z2e="·",Q2e=" ",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={Aacute:JVe,aacute:YVe,Acirc:XVe,acirc:ZVe,acute:QVe,AElig:e2e,aelig:t2e,Agrave:r2e,agrave:n2e,amp:i2e,AMP:a2e,Aring:o2e,aring:s2e,Atilde:l2e,atilde:u2e,Auml:c2e,auml:f2e,brvbar:d2e,Ccedil:h2e,ccedil:p2e,cedil:v2e,cent:m2e,copy:g2e,COPY:y2e,curren:b2e,deg:k2e,divide:w2e,Eacute:C2e,eacute:T2e,Ecirc:S2e,ecirc:x2e,Egrave:E2e,egrave:M2e,ETH:A2e,eth:O2e,Euml:N2e,euml:D2e,frac12:L2e,frac14:R2e,frac34:I2e,gt:P2e,GT:B2e,Iacute:F2e,iacute:q2e,Icirc:H2e,icirc:_2e,iexcl:z2e,Igrave:V2e,igrave:U2e,iquest:$2e,Iuml:W2e,iuml:j2e,laquo:G2e,lt:K2e,LT:J2e,macr:Y2e,micro:X2e,middot:Z2e,nbsp:Q2e,not:eUe,Ntilde:tUe,ntilde:rUe,Oacute:nUe,oacute:iUe,Ocirc:aUe,ocirc:oUe,Ograve:sUe,ograve:lUe,ordf:uUe,ordm:cUe,Oslash:fUe,oslash:dUe,Otilde:hUe,otilde:pUe,Ouml:vUe,ouml:mUe,para:gUe,plusmn:yUe,pound:bUe,quot:kUe,QUOT:wUe,raquo:CUe,reg:TUe,REG:SUe,sect:xUe,shy:EUe,sup1:MUe,sup2:AUe,sup3:OUe,szlig:NUe,THORN:DUe,thorn:LUe,times:RUe,Uacute:IUe,uacute:PUe,Ucirc:BUe,ucirc:FUe,Ugrave:qUe,ugrave:HUe,uml:_Ue,Uuml:zUe,uuml:VUe,Yacute:UUe,yacute:$Ue,yen:WUe,yuml:jUe},KUe="&",JUe="'",YUe=">",XUe="<",ZUe='"',Zk={amp:KUe,apos:JUe,gt:YUe,lt:XUe,quot:ZUe},Hh={},QUe={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},e$e=Uo&&Uo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Hh,"__esModule",{value:!0});var Xm=e$e(QUe),t$e=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 r$e(r){return r>=55296&&r<=57343||r>1114111?"�":(r in Xm.default&&(r=Xm.default[r]),t$e(r))}Hh.default=r$e;var Vu=Uo&&Uo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.decodeHTML=Ii.decodeHTMLStrict=Ii.decodeXML=void 0;var Pd=Vu(Xk),n$e=Vu(GUe),i$e=Vu(Zk),Zm=Vu(Hh),a$e=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;Ii.decodeXML=Qk(i$e.default);Ii.decodeHTMLStrict=Qk(Pd.default);function Qk(r){var e=ew(r);return function(t){return String(t).replace(a$e,e)}}var Qm=function(r,e){return r<e?1:-1};Ii.decodeHTML=function(){for(var r=Object.keys(n$e.default).sort(Qm),e=Object.keys(Pd.default).sort(Qm),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=ew(Pd.default);function o(s){return s.substr(-1)!==";"&&(s+=";"),a(s)}return function(s){return String(s).replace(i,o)}}();function ew(r){return function(t){if(t.charAt(1)==="#"){var n=t.charAt(2);return n==="X"||n==="x"?Zm.default(parseInt(t.substr(3),16)):Zm.default(parseInt(t.substr(2),10))}return r[t.slice(1,-1)]||t}}var Sn={},tw=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 o$e=tw(Zk),rw=iw(o$e.default),nw=aw(rw);Sn.encodeXML=lw(rw);var s$e=tw(Xk),_h=iw(s$e.default),l$e=aw(_h);Sn.encodeHTML=c$e(_h,l$e);Sn.encodeNonAsciiHTML=lw(_h);function iw(r){return Object.keys(r).sort().reduce(function(e,t){return e[r[t]]="&"+t+";",e},{})}function aw(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 ow=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,u$e=String.prototype.codePointAt!=null?function(r){return r.codePointAt(0)}:function(r){return(r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536};function Uu(r){return"&#x"+(r.length>1?u$e(r):r.charCodeAt(0)).toString(16).toUpperCase()+";"}function c$e(r,e){return function(t){return t.replace(e,function(n){return r[n]}).replace(ow,Uu)}}var sw=new RegExp(nw.source+"|"+ow.source,"g");function f$e(r){return r.replace(sw,Uu)}Sn.escape=f$e;function d$e(r){return r.replace(nw,Uu)}Sn.escapeUTF8=d$e;function lw(r){return function(e){return e.replace(sw,function(t){return r[t]||Uu(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=Ii,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=Ii;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}})})(qh);var uw="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",h$e=92,p$e=/[\\&]/,zh="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",v$e=new RegExp("\\\\"+zh+"|"+uw,"gi"),m$e='[&<>"]',eg=new RegExp(m$e,"g"),g$e=function(r){return r.charCodeAt(0)===h$e?r.charAt(1):qh.decodeHTML(r)};function xs(r){return p$e.test(r)?r.replace(v$e,g$e):r}function Rl(r){try{return Dae(r)}catch{return r}}function y$e(r){switch(r){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return r}}function Mo(r){return eg.test(r)?r.replace(eg,y$e):r}function Bd(r,e){for(var t=[],n=0;n<e;n++)t.push(r);return t.join("")}function tg(r){return r?!/[^ \t]+/.test(r):!0}var b$e=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=Vh(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 Vh(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 k$e=1,$u={};function w$e(r){return $u[r]}function Fd(r){delete $u[r]}function C$e(){$u={}}var Vs=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=k$e++,this.type=e,this.sourcepos=t,$u[this.id]=this}return r.prototype.isContainer=function(){return Vh(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 b$e(this)},r}(),Fi=function(r){_n(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}(Vs),T$e=function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.listData=null,t}return e}(Fi),S$e=function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.level=0,t.headingType="atx",t}return e}(Fi),x$e=function(r){_n(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}(Fi),E$e=function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.columns=[],t}return e}(Fi),M$e=function(r){_n(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}(Fi),A$e=function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.title="",t.dest="",t.label="",t}return e}(Fi),O$e=function(r){_n(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}(Fi),N$e=function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.htmlBlockType=-1,t}return e}(Fi),D$e=function(r){_n(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}(Vs),L$e=function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.tickCount=0,t}return e}(Vs),R$e=function(r){_n(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.info="",t}return e}(Vs);function or(r,e){switch(r){case"heading":return new S$e(r,e);case"list":case"item":return new T$e(r,e);case"link":case"image":return new D$e(r,e);case"codeBlock":return new x$e(r,e);case"htmlBlock":return new N$e(r,e);case"table":return new E$e(r,e);case"tableCell":return new M$e(r,e);case"document":case"paragraph":case"blockQuote":case"thematicBreak":case"tableRow":case"tableBody":case"tableHead":case"frontMatter":return new Fi(r,e);case"code":return new L$e(r,e);case"refDef":return new A$e(r,e);case"customBlock":return new O$e(r,e);case"customInline":return new R$e(r,e);default:return new Vs(r,e)}}function cw(r){return r.type==="codeBlock"}function I$e(r){return r.type==="htmlBlock"}function P$e(r){return r.type==="heading"}function rg(r){return r.type==="list"}function B$e(r){return r.type==="table"}function wo(r){return r.type==="refDef"}function fw(r){return r.type==="customBlock"}function F$e(r){return r.type==="customInline"}function yr(r,e){var t=or("text",e);return t.literal=r,t}var dw="[A-Za-z][A-Za-z0-9-]*",q$e="[a-zA-Z_:][a-zA-Z0-9:._-]*",H$e="[^\"'=<>`\\x00-\\x20]+",_$e="'[^']*'",z$e='"[^"]*"',V$e="(?:"+H$e+"|"+_$e+"|"+z$e+")",U$e="(?:\\s*=\\s*"+V$e+")",$$e="(?:\\s+"+q$e+U$e+"?)",hw="<"+dw+$$e+"*\\s*/?>",pw="</"+dw+"\\s*[>]",W$e="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",j$e="[<][?].*?[?][>]",G$e="<![A-Z]+\\s+[^>]*>",K$e="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",J$e="(?:"+hw+"|"+pw+"|"+W$e+"|"+j$e+"|"+G$e+"|"+K$e+")",Y$e=new RegExp("^"+J$e,"i");/*! http://mths.be/fromcodepoint v0.2.1 by @mathias */var qd;if(String.fromCodePoint)qd=function(r){try{return String.fromCodePoint(r)}catch(e){if(e instanceof RangeError)return"�";throw e}};else{var X$e=String.fromCharCode,Z$e=Math.floor;qd=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||Z$e(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+=X$e.apply(void 0,n),n.length=0)}return l}}var Wf=qd,Q$e="(?:[w-]+.)*[A-Za-z0-9-]+.[A-Za-z0-9-]+",eWe="[^<\\s]*[^<?!.,:*_?~\\s]",tWe="[\\w.+-]+@(?:[\\w-]+\\.)+[\\w-]+";function rWe(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 nWe(r){return r.replace(/&[A-Za-z0-9]+;$/,"")}function iWe(r){for(var e=new RegExp(tWe,"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 aWe(r){for(var e=new RegExp("(www|https?://)."+Q$e+eWe,"g"),t=[],n;n=e.exec(r);){var i=nWe(rWe(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 oWe(r){return Id(Id([],aWe(r)),iWe(r)).sort(function(e,t){return e.range[0]-t.range[0]})}function sWe(r,e){typeof e=="boolean"&&(e=oWe);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],k=f[1],T=function(ge,ye){return[[p,k+ge],[p,k+ye]]},x=[],E=0,P=s;E<P.length;E++){var F=P[E],z=F.range,Y=F.url,Z=F.text;z[0]>l&&x.push(yr(o.substring(l,z[0]),T(l,z[0]-1)));var oe=or("link",T.apply(void 0,z));oe.appendChild(yr(Z,T.apply(void 0,z))),oe.destination=Y,oe.extendedAutolink=!0,x.push(oe),l=z[1]+1}l<o.length&&x.push(yr(o.substring(l),T(l,o.length-1)));for(var le=0,re=x;le<re.length;le++){var he=re[le];a.insertBefore(he)}a.unlink()}};t=r.next();)n()}function bu(r){return r[r.length-1]}function ng(r){return r.slice(1,r.length-1).trim().replace(/[ \t\r\n]+/," ").toLowerCase().toUpperCase()}function Il(r,e){Object.keys(r).forEach(function(t){e(t,r[t])})}function lWe(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var n=Dr({},r);return e.forEach(function(i){delete n[i]}),n}function Co(r){return!Object.keys(r).length}function uWe(r){Object.keys(r).forEach(function(e){delete r[e]})}var Hd=10,jf=42,Pl=95,cWe=96,ig=91,fWe=93,Bl=126,ag=60,dWe=33,og=92,hWe=38,sg=40,Gf=41,pWe=58,Aa=39,Oa=34,Na=36,Kf="\\\\"+zh,lg=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]/),vWe=new RegExp('^(?:"('+Kf+'|[^"\\x00])*"|'+("'("+Kf+"|[^'\\x00])*'")+"|"+("\\(("+Kf+"|[^()\\x00])*\\))")),mWe=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,ug=new RegExp("^"+zh),gWe=new RegExp("^"+uw,"i"),yWe=/`+/,bWe=/^`+/,kWe=/\.\.\./g,wWe=/--+/g,CWe=/^<([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])?)*)>/,TWe=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,SWe=/^ *(?:\n *)?/,Jf=/^[ \t\n\x0b\x0c\x0d]/,cg=/^\s/,xWe=/ *$/,EWe=/^ */,fg=/^ *(?:\n|$)/,MWe=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,AWe=/^[^\n`\[\]\\!<&*_'"~$]+/m,OWe=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(SWe),!0},r.prototype.parseBackticks=function(e){var t=this.pos+1,n=this.match(bWe);if(n===null)return!1;for(var i=this.pos,a;(a=this.match(yWe))!==null;)if(a===n){var o=this.subject.slice(i,this.pos-n.length),s=this.sourcepos(t,this.pos),l=o.split(`
|
|
50
|
-
`);if(l.length>1){var f=bu(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=or("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(yr(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()===Hd?(this.pos+=1,n=or("linebreak",this.sourcepos(this.pos-1,this.pos)),e.appendChild(n),this.nextLine()):ug.test(t.charAt(this.pos))?(e.appendChild(yr(t.charAt(this.pos),this.sourcepos(i,this.pos))),this.pos+=1):e.appendChild(yr("\\",this.sourcepos(i,i))),!0},r.prototype.parseAutolink=function(e){var t,n,i,a=this.pos+1;return(t=this.match(CWe))?(n=t.slice(1,t.length-1),i=or("link",this.sourcepos(a,this.pos)),i.destination=Rl("mailto:"+n),i.title="",i.appendChild(yr(n,this.sourcepos(a+1,this.pos-1))),e.appendChild(i),!0):(t=this.match(TWe))?(n=t.slice(1,t.length-1),i=or("link",this.sourcepos(a,this.pos)),i.destination=Rl(n),i.title="",i.appendChild(yr(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(Y$e);if(n===null)return!1;var i=or("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===Aa||e===Oa)t++,this.pos++;else for(;this.peek()===e;)t++,this.pos++;if(t===0||t<2&&(e===Bl||e===Na))return this.pos=n,null;var i=n===0?`
|
|
51
|
-
`:this.subject.charAt(n-1),a=this.peek(),o;a===-1?o=`
|
|
52
|
-
`:o=Wf(a);var s=cg.test(o),l=lg.test(o),f=cg.test(i),p=lg.test(i),k=!s&&(!l||f||p),T=!f&&(!p||s||l),x,E;return e===Pl?(x=k&&(!T||p),E=T&&(!k||l)):e===Aa||e===Oa?(x=k&&!T,E=T):e===Na?(x=!s,E=!f):(x=k,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===Aa?o="’":e===Oa?o="“":o=this.subject.slice(a-1,this.pos);var s=yr(o,this.sourcepos(a,this.pos));return t.appendChild(s),(n.canOpen||n.canClose)&&(this.options.smart||e!==Aa&&e!==Oa)&&(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[Pl]=[e,e,e],t[jf]=[e,e,e],t[Aa]=[e],t[Oa]=[e],t[Bl]=[e],t[Na]=[e],t);for(i=this.delimiters;i!==null&&i.previous!==e;)i=i.previous;for(;i!==null;){var k=i.cc,T=k===Pl||k===jf;if(!i.canClose)i=i.next;else{for(n=i.previous,l=!1;n!==null&&n!==e&&n!==p[k][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||k===Bl||k===Na){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 P=T?x===1?"emph":"strong":"strike";k===Na&&(P="customInline");var F=or(P),z=o.sourcepos[1],Y=s.sourcepos[0];F.sourcepos=[[z[0],z[1]-x+1],[Y[0],Y[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 Z=o.next,oe=void 0;Z&&Z!==s;)oe=Z.next,Z.unlink(),F.appendChild(Z),Z=oe;if(k===Na){var le=F.firstChild,re=le.literal||"",he=re.split(/\s/)[0];F.info=he,re.length<=he.length?le.unlink():(le.sourcepos[0][1]+=he.length,le.literal=re.replace(he+" ",""))}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 ge=i.next;this.removeDelimiter(i),i=ge}}}else k===Aa?(i.node.literal="’",l&&(n.node.literal="‘"),i=i.next):k===Oa&&(i.node.literal="”",l&&(n.node.literal="“"),i=i.next);l||(p[k][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(vWe);return e===null?null:xs(e.substr(1,e.length-2))},r.prototype.parseLinkDestination=function(){var e=this.match(mWe);if(e===null){if(this.peek()===ag)return null;for(var t=this.pos,n=0,i=void 0;(i=this.peek())!==-1;)if(i===og&&ug.test(this.subject.charAt(this.pos+1)))this.pos+=1,this.peek()!==-1&&(this.pos+=1);else if(i===sg)this.pos+=1,n+=1;else if(i===Gf){if(n<1)break;this.pos+=1,n-=1}else{if(Jf.exec(Wf(i))!==null)break;this.pos+=1}return this.pos===t&&i!==Gf||n!==0?null:(e=this.subject.substr(t,this.pos-t),Rl(xs(e)))}return Rl(xs(e.substr(1,e.length-2)))},r.prototype.parseLinkLabel=function(){var e=this.match(MWe);return e===null||e.length>1001?0:e.length},r.prototype.parseOpenBracket=function(e){var t=this.pos;this.pos+=1;var n=yr("[",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()===ig){this.pos+=1;var n=yr("![",this.sourcepos(this.pos-1,this.pos));e.appendChild(n),this.addBracket(n,t+1,!0)}else{var n=yr("!",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(yr("]",this.sourcepos(a,a))),!0;if(!o.active)return e.appendChild(yr("]",this.sourcepos(a,a))),this.removeBracket(),!0;var s=o.image,l=this.pos;this.peek()===sg&&(this.pos++,this.spnl()&&(t=this.parseLinkDestination())!==null&&this.spnl()&&(Jf.test(this.subject.charAt(this.pos-1))&&(n=this.parseLinkTitle())||!0)&&this.spnl()&&this.peek()===Gf?(this.pos+=1,i=!0):this.pos=l);var f="";if(!i){var p=this.pos,k=this.parseLinkLabel();if(k>2?f=this.subject.slice(p,p+k):o.bracketAfter||(f=this.subject.slice(o.index,a)),k===0&&(this.pos=l),f){f=ng(f);var T=this.refMap[f];T&&(t=T.destination,n=T.title,i=!0)}}if(i){var x=or(s?"image":"link");x.destination=t,x.title=n||"",x.sourcepos=[o.startpos,this.sourcepos(this.pos)];for(var E=o.node.next,P=void 0;E;)P=E.next,E.unlink(),x.appendChild(E),E=P;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(yr("]",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(gWe))?(e.appendChild(yr(qh.decodeHTML(t),this.sourcepos(n,this.pos))),!0):!1},r.prototype.parseString=function(e){var t,n=this.pos+1;if(t=this.match(AWe)){if(this.options.smart){var i=t.replace(kWe,"…").replace(wWe,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),Bd("—",l)+Bd("–",s)});e.appendChild(yr(i,this.sourcepos(n,this.pos)))}else{var a=yr(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(xWe,"");var a=i-t.literal.length;t.sourcepos[1][1]-=a,e.appendChild(or(n?"linebreak":"softbreak",this.sourcepos(this.pos-a,this.pos)))}else e.appendChild(or("softbreak",this.sourcepos(this.pos,this.pos)));return this.nextLine(),this.match(EWe),!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()===pWe)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(fg)===null&&(n===""?f=!1:(n="",this.pos=l,f=this.match(fg)!==null)),!f)return this.pos=i,0;var p=ng(o);if(p==="")return this.pos=i,0;var k=this.getReferenceDefSourcepos(e);e.sourcepos[0][0]=k[1][0]+1;var T=or("refDef",k);return T.title=n,T.dest=s,T.label=p,e.insertBefore(T),t[p]?this.refDefCandidateMap[T.id]=T:t[p]=Vd(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(Jf.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 Hd:n=this.parseNewline(e);break;case og:n=this.parseBackslash(e);break;case cWe:n=this.parseBackticks(e);break;case jf:case Pl:case Bl:case Na:n=this.handleDelim(i,e);break;case Aa:case Oa:n=!!(!((t=this.options)===null||t===void 0)&&t.smart)&&this.handleDelim(i,e);break;case ig:n=this.parseOpenBracket(e);break;case dWe:n=this.parseBang(e);break;case fWe:n=this.parseCloseBracket(e);break;case ag:n=this.parseAutolink(e)||this.parseHtmlTag(e);break;case hWe:e.disabledEntityParse||(n=this.parseEntity(e));break;default:n=this.parseString(e);break}return n||(this.pos+=1,e.appendChild(yr(Wf(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],P$e(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&&sWe(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}(),NWe=/^\[([ \txX])\][ \t]+/;function DWe(r,e){if(e.firstChild&&e.firstChild.type==="paragraph"){var t=e.firstChild,n=t.stringContent.match(NWe);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 LWe={continue:function(){return 0},finalize:function(){},canContain:function(r){return r==="tableHead"||r==="tableBody"},acceptsLines:!1},RWe={continue:function(){return 0},finalize:function(){},canContain:function(r){return r==="tableRow"},acceptsLines:!1},IWe={continue:function(){return 1},finalize:function(){},canContain:function(r){return r==="tableRow"||r==="tableDelimRow"},acceptsLines:!1},PWe={continue:function(){return 1},finalize:function(){},canContain:function(r){return r==="tableDelimCell"},acceptsLines:!1},BWe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},FWe={continue:function(){return 1},finalize:function(){},canContain:function(r){return r==="tableCell"},acceptsLines:!1},qWe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},ku=4,vw=9,mw=62,HWe=60,gw=32,yw=91,bw=/[^ \t\f\v\r\n]/,_We=/^(?:`{3,}|~{3,})(?= *$)/;function dg(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 kw(r){return!bw.test(r)}function $o(r){return r===gw||r===vw}var zWe=/^\$\$$/,VWe={continue:function(r,e){var t=r.currentLine,n=t.match(zWe);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(`
|
|
53
|
-
`),i=t.slice(0,n),a=t.slice(n+1),o=i.match(/^(\s*)(.*)/);e.info=xs(o[2].trim()),e.literal=a,e.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},ww={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!0},UWe={continue:function(){return 0},finalize:function(){},canContain:function(r){return r!=="item"},acceptsLines:!1},$We={continue:function(){return 0},finalize:function(r,e){for(var t=e.firstChild;t;){if(dg(t)&&t.next){e.listData.tight=!1;break}for(var n=t.firstChild;n;){if(dg(n)&&(t.next||n.next)){e.listData.tight=!1;break}n=n.next}t=t.next}},canContain:function(r){return r==="item"},acceptsLines:!1},WWe={continue:function(r){var e=r.currentLine;if(!r.indented&&xn(e,r.nextNonspace)===mw)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},jWe={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:DWe,canContain:function(r){return r!=="item"},acceptsLines:!1},GWe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},KWe={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},JWe={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(_We);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>=ku)r.advanceOffset(ku,!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(`
|
|
54
|
-
`),a=n.slice(0,i),o=n.slice(i+1),s=a.match(/^(\s*)(.*)/);e.infoPadding=s[1].length,e.info=xs(s[2].trim()),e.literal=o}else e.literal=(t=e.stringContent)===null||t===void 0?void 0:t.replace(/(\n *)+$/,`
|
|
55
|
-
`);e.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},YWe={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},XWe={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)===yw&&(t=r.inlineParser.parseReference(e,r.refMap));)e.stringContent=e.stringContent.slice(t),n=!0;n&&kw(e.stringContent)&&e.unlink()}},canContain:function(){return!1},acceptsLines:!0},ZWe=ww,QWe=ww,To={document:UWe,list:$We,blockQuote:WWe,item:jWe,heading:GWe,thematicBreak:KWe,codeBlock:JWe,htmlBlock:YWe,paragraph:XWe,table:LWe,tableBody:RWe,tableHead:IWe,tableRow:FWe,tableCell:qWe,tableDelimRow:PWe,tableDelimCell:BWe,refDef:ZWe,customBlock:VWe,frontMatter:QWe};function _d(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&&tg(a)?t=i+1:n.push(a),e=i+1}if(e<r.length){var a=r.substring(e,r.length);tg(a)||n.push(a)}return[t,n]}function zd(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,k=void 0;if(f===s.length)f=0,p=0,k="";else{var T=s.match(/[ \t]+$/);p=T?T[0].length:0,k=s.slice(f,s.length-p)}var x=n+f,E=or(r,[[t,n],[t,n+s.length-1]]);E.stringContent=k.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 e3e(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 t3e=function(r,e){var t=e.stringContent;if(e.type==="paragraph"&&!r.indented&&!r.blank){var n=t.length-1,i=t.lastIndexOf(`
|
|
56
|
-
`,n-1)+1,a=t.slice(i,n),o=r.currentLine.slice(r.nextNonspace),s=_d(a),l=s[0],f=s[1],p=_d(o),k=p[0],T=p[1],x=/^[ \t]*:?-+:?[ \t]*$/;if(!f.length||!T.length||T.some(function(ge){return!x.test(ge)})||T.length===1&&o.indexOf("|")!==0)return 0;var E=e.lineOffsets,P=r.lineNumber-1,F=bu(E)+1,z=or("table",[[P,F],[r.lineNumber,r.offset]]);if(z.columns=T.map(function(){return{align:null}}),e.insertAfter(z),E.length===1)e.unlink();else{e.stringContent=t.slice(0,i);var Y=t.lastIndexOf(`
|
|
57
|
-
`,i-2)+1,Z=i-Y-1;r.lastLineLength=E[E.length-2]+Z,r.finalize(e,P-1)}r.advanceOffset(r.currentLine.length-r.offset,!1);var oe=or("tableHead",[[P,F],[r.lineNumber,r.offset]]);z.appendChild(oe);var le=or("tableRow",[[P,F],[P,F+a.length-1]]),re=or("tableDelimRow",[[r.lineNumber,r.nextNonspace+1],[r.lineNumber,r.offset]]);oe.appendChild(le),oe.appendChild(re),zd("tableCell",f,P,F+l).forEach(function(ge){le.appendChild(ge)});var he=zd("tableDelimCell",T,r.lineNumber,r.nextNonspace+1+k);return he.forEach(function(ge){re.appendChild(ge)}),z.columns=he.map(e3e),r.tip=z,2}return 0},r3e=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=or("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=_d(o),l=s[0],f=s[1];return zd("tableCell",f,r.lineNumber,r.nextNonspace+1+l).forEach(function(p,k){k>=a.columns.length&&(p.ignored=!0),i.appendChild(p)}),2},n3e=/^(\$\$)(\s*[a-zA-Z])+/,i3e=/^(\$\$)(\s*[a-zA-Z])+.*(\$\$)/,a3e=function(r){var e;if(!r.indented&&!i3e.test(r.currentLine)&&(e=r.currentLine.match(n3e))){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},o3e=/^`{3,}(?!.*`)|^~{3,}/,s3e=[/./,/^<(?: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("^(?:"+hw+"|"+pw+")\\s*$","i")],l3e=/^(?:=+|-+)[ \t]*$/,u3e=/^#{1,6}(?:[ \t]+|$)/,c3e=/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})[ \t]*$/,Cw=/^[*+-]/,Tw=/^(\d{1,9})([.)])/;function f3e(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(Cw))a.type="bullet",a.bulletChar=n[0][0];else if((n=t.match(Tw))&&(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===vw||i===gw)||e.type==="paragraph"&&!r.currentLine.slice(r.nextNonspace+n[0].length).match(bw))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 d3e(r,e){return r.type===e.type&&r.delimiter===e.delimiter&&r.bulletChar===e.bulletChar}function Sw(r,e){return r.options.disallowDeepHeading&&(e.type==="blockQuote"||e.type==="item")}var h3e=function(r){return!r.indented&&xn(r.currentLine,r.nextNonspace)===mw?(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},p3e=function(r,e){var t;if(!r.indented&&!Sw(r,e)&&(t=r.currentLine.slice(r.nextNonspace).match(u3e))){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},v3e=function(r){var e;if(!r.indented&&(e=r.currentLine.slice(r.nextNonspace).match(o3e))){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},m3e=function(r,e){if(!r.indented&&xn(r.currentLine,r.nextNonspace)===HWe){var t=r.currentLine.slice(r.nextNonspace),n=r.options.disallowedHtmlBlockTags,i=void 0;for(i=1;i<=7;i++){var a=t.match(s3e[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},g3e=function(r,e){var t;if(e.stringContent!==null&&!r.indented&&e.type==="paragraph"&&!Sw(r,e.parent)&&(t=r.currentLine.slice(r.nextNonspace).match(l3e))){r.closeUnmatchedBlocks();for(var n=void 0;xn(e.stringContent,0)===yw&&(n=r.inlineParser.parseReference(e,r.refMap));)e.stringContent=e.stringContent.slice(n);if(e.stringContent.length>0){var i=or("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},y3e=function(r){return!r.indented&&c3e.test(r.currentLine.slice(r.nextNonspace))?(r.closeUnmatchedBlocks(),r.addChild("thematicBreak",r.nextNonspace),r.advanceOffset(r.currentLine.length-r.offset,!1),2):0},b3e=function(r,e){var t,n=e;return(!r.indented||e.type==="list")&&(t=f3e(r,n))?(r.closeUnmatchedBlocks(),(r.tip.type!=="list"||!d3e(n.listData,t))&&(n=r.addChild("list",r.nextNonspace),n.listData=t),n=r.addChild("item",r.nextNonspace),n.listData=t,1):0},k3e=function(r){return r.indented&&r.tip.type!=="paragraph"&&!r.blank?(r.advanceOffset(ku,!0),r.closeUnmatchedBlocks(),r.addChild("codeBlock",r.offset),2):0},Yf=[h3e,p3e,v3e,m3e,g3e,y3e,b3e,k3e,t3e,r3e,a3e],xw=/^(-{3}|\+{3}|;{3})$/,w3e=function(r,e){var t=r.currentLine,n=r.lineNumber,i=r.indented;if(n===1&&!i&&e.type==="document"&&xw.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},C3e={continue:function(r,e){var t=r.currentLine,n=t.match(xw);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},T3e=[/./,/<\/(?:script|pre|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],S3e=/^[#`~*+_=<>0-9-;$]/,x3e=/\r\n|\n|\r/;function Xf(){return or("document",[[1,1],[0,0]])}var E3e={smart:!1,tagFilter:!1,extendedAutolinks:!1,disallowedHtmlBlockTags:[],referenceDefinition:!1,disallowDeepHeading:!1,customParser:null,frontMatter:!1},M3e=function(){function r(e){this.options=Dr(Dr({},E3e),e),this.doc=Xf(),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&&(To.frontMatter=C3e,Yf.unshift(w3e)),this.inlineParser=new OWe(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===`
|
|
58
|
-
`||i==="\r"||i==="",this.nextNonspace=t,this.nextNonspaceColumn=n,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=ku},r.prototype.addLine=function(){if(this.partiallyConsumedTab){this.offset+=1;var e=4-this.column%4;this.tip.stringContent+=Bd(" ",e)}this.tip.lineOffsets?this.tip.lineOffsets.push(this.offset):this.tip.lineOffsets=[this.offset],this.tip.stringContent+=this.currentLine.slice(this.offset)+`
|
|
59
|
-
`},r.prototype.addChild=function(e,t){for(;!To[this.tip.type].canContain(e);)this.finalize(this.tip,this.lineNumber-1);var n=t+1,i=or(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],To[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(),To[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"&&To[t.type].acceptsLines,o=Yf.length;!a;){if(this.findNextNonspace(),t.type!=="table"&&t.type!=="tableBody"&&t.type!=="paragraph"&&!this.indented&&!S3e.test(e.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var s=0;s<o;){var l=Yf[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"||cw(t)&&t.isFenced||f==="item"&&!t.firstChild&&t.sourcepos[0][0]===this.lineNumber),k=t;k;)k.lastLineBlank=p,k=k.parent;To[f].acceptsLines?(this.addLine(),I$e(t)&&t.htmlBlockType>=1&&t.htmlBlockType<=5&&T3e[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=Xf(),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(x3e),i=n.length;this.lines=t||n,this.options.referenceDefinition&&this.clearRefMaps(),e.charCodeAt(e.length-1)===Hd&&(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=Xf(),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){uWe(e)})},r}();function hg(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 A3e(r,e){var t=r[0],n=r[1];return hg(n,e)===1?1:hg(t,e)===-1?-1:0}function O3e(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]&&(Fd(t[o].id),t[o]=null)}t=n}r.next=e.next,e.next?e.next.prev=r:r.parent.lastChild=r}}function N3e(r){for(var e=[],t=r.firstChild;t;)e.push(t),t=t.next;return e}function pg(r,e){for(var t=0,n=e;t<n.length;t++){var i=n[t];r.insertBefore(i)}}function D3e(r,e){for(var t=e.length-1;t>=0;t-=1)r.prependChild(e[t])}function L3e(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 Ew(r,e){var t=r[0],n=r[1];return n[0]<e?1:t[0]>e?-1:0}function Fl(r,e){for(var t=r.firstChild;t;){var n=Ew(t.sourcepos,e);if(n===0)return t;if(n===-1)return t.prev||t;t=t.next}return r.lastChild}function R3e(r){for(;r.lastChild;)r=r.lastChild;return r}function I3e(r){for(;r.parent&&r.parent.type!=="document"&&r.parent.sourcepos[0][0]===r.sourcepos[0][0];)r=r.parent;return r}function P3e(r,e){for(var t=r.firstChild,n=null;t;){var i=Ew(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?I3e(R3e(n)):null}function B3e(r,e){for(var t=r,n=null;t;){var i=A3e(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 Mw(r){return w$e(r)||null}function Zf(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 F3e(r){var e=Mw(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 vg=/\r\n|\n|\r/;function q3e(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 Cw.test(t)||Tw.test(t)}function H3e(r){return!kw(r)&&r.indexOf("|")!==-1}function Vd(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 Aw=function(){function r(e,t){this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.referenceDefinition=!!(t!=null&&t.referenceDefinition),this.parser=new M3e(t),this.parser.setRefMaps(this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap),this.eventHandlerMap={change:[]},e=e||"",this.lineTexts=e.split(vg),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(vg),p=f.length,k=this.lineTexts[a-1],T=this.lineTexts[s-1];f[0]=k.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,Id([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?(pg(e,n),O3e(e,t),[e.id,t.id].forEach(function(i){return Fd(i)}),e.unlink()):t?(pg(t,n),Fd(t.id),t.unlink()):D3e(this.root,n)},r.prototype.getNodeRange=function(e,t){var n=Fl(this.root,e[0]),i=Fl(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&&(rg(e.prev)&&q3e(this.lineTexts[n-1])||B$e(e.prev)&&H3e(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&&cw(l)&&l.open,p=l&&fw(l)&&l.open,k=l&&rg(l);(f||p)&&s||k&&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=N3e(o);return{newNodes:x,extStartNode:e,extEndNode:t}},r.prototype.getRemovedNodeRange=function(e,t){return!e||e&&wo(e)||t&&wo(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(!Co(this.refMap)){var i=function(a){if(wo(a)){var o=n.refMap[a.label];o&&a.id===o.id&&(o.unlinked=!0)}};e&&Zf(i,e.parent,t),t&&Zf(i,t)}},r.prototype.replaceWithNewRefDefState=function(e){var t=this;if(!Co(this.refMap)){var n=function(i){if(wo(i)){var a=i.label,o=t.refMap[a];(!o||o.unlinked)&&(t.refMap[a]=Vd(i))}};e.forEach(function(i){Zf(n,i)})}},r.prototype.replaceWithRefDefCandidate=function(){var e=this;Co(this.refDefCandidateMap)||Il(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]=Vd(n))})},r.prototype.getRangeWithRefDef=function(e,t,n,i,a){if(this.referenceDefinition&&!Co(this.refMap)){var o=Fl(this.root,e-1),s=Fl(this.root,t+1);o&&wo(o)&&o!==n&&o!==i&&(n=o,e=n.sourcepos[0][0]),s&&wo(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,k=f.extStartNode,T=f.extEndNode,x=this.getRemovedNodeRange(k,T),E=T?T.next:this.root.firstChild;return this.referenceDefinition?(this.markDeletedRefMap(k,T),this.replaceRangeNodes(k,T,p),this.replaceWithNewRefDefState(p)):this.replaceRangeNodes(k,T,p),{nodes:p,removedNodeRange:x,nextNode:E}},r.prototype.parseRefLink=function(){var e=this,t=[];return Co(this.refMap)||Il(this.refMap,function(n,i){i.unlinked&&delete e.refMap[n],Il(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(){Co(this.refDefCandidateMap)||[this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(e){Il(e,function(t){F3e(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=lWe(a,"nextNode");L3e(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=B3e(this.root,e);return!t||t===this.root?null:t},r.prototype.findFirstNodeAtLine=function(e){return P3e(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 Mw(e)},r.prototype.removeAllNode=function(){C$e()},r}(),_3e=["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"],mg=new RegExp("<(/?(?:"+_3e.join("|")+")[^>]*>)","ig");function gg(r){return mg.test(r)?r.replace(mg,function(e,t){return"<"+t}):r}var yg={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 />
|
|
60
|
-
`}},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?gg(r.literal):r.literal;return{type:"html",content:n}},htmlBlock:function(r,e){var t=e.options,n=t.tagFilter?gg(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-"+Mo(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:Dr({href:Mo(a)},i&&{title:Mo(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:Dr({src:Mo(o),alt:t(r)},a&&{title:Mo(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"}]}},bg={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:Dr(Dr({},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!=null&&o.align?{align:o.align}:null;return t?Dr({type:"openTag",tagName:i,outerNewLine:!0},s&&{attributes:s}):{type:"closeTag",tagName:i,outerNewLine:!0}}},z3e={softbreak:`
|
|
61
|
-
`,gfm:!1,tagFilter:!1,nodeId:!1};function V3e(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 Uh=function(){function r(e){this.buffer=[],this.options=Dr(Dr({},z3e),e),this.convertors=this.createConvertors(),delete this.options.convertors}return r.prototype.createConvertors=function(){var e=Dr({},yg);if(this.options.gfm&&(e=Dr(Dr({},e),bg)),this.options.convertors){var t=this.options.convertors,n=Object.keys(t),i=Dr(Dr({},yg),bg);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,k){return p.origin=function(){return o(f,p,k)},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,k={entering:l,leaf:!Vh(s),options:o.options,getChildrenText:V3e,skipChildren:function(){p=!0}},T=fw(s)||F$e(s)?f(s,k,o.convertors):f(s,k);if(T){var x=Array.isArray(T)?T:[T];x.forEach(function(E,P){E.type==="openTag"&&t.options.nodeId&&P===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&&bu(bu(this.buffer))!==`
|
|
62
|
-
`&&this.buffer.push(`
|
|
63
|
-
`)},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(Mo(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}();/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */function U3e(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 $3e=Object.hasOwnProperty,kg=Object.setPrototypeOf,W3e=Object.isFrozen,j3e=Object.getPrototypeOf,G3e=Object.getOwnPropertyDescriptor,Xr=Object.freeze,Pi=Object.seal,K3e=Object.create,Ow=typeof Reflect<"u"&&Reflect,wu=Ow.apply,Ud=Ow.construct;wu||(wu=function(e,t,n){return e.apply(t,n)});Xr||(Xr=function(e){return e});Pi||(Pi=function(e){return e});Ud||(Ud=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(U3e(t))))});var J3e=Yn(Array.prototype.forEach),wg=Yn(Array.prototype.pop),cs=Yn(Array.prototype.push),Gl=Yn(String.prototype.toLowerCase),Cg=Yn(String.prototype.match),Gi=Yn(String.prototype.replace),Y3e=Yn(String.prototype.indexOf),X3e=Yn(String.prototype.trim),Ei=Yn(RegExp.prototype.test),Tg=Z3e(TypeError);function Yn(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 wu(r,e,n)}}function Z3e(r){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ud(r,t)}}function bt(r,e){kg&&kg(r,null);for(var t=e.length;t--;){var n=e[t];if(typeof n=="string"){var i=Gl(n);i!==n&&(W3e(e)||(e[t]=i),n=i)}r[n]=!0}return r}function Da(r){var e=K3e(null),t=void 0;for(t in r)wu($3e,r,[t])&&(e[t]=r[t]);return e}function ql(r,e){for(;r!==null;){var t=G3e(r,e);if(t){if(t.get)return Yn(t.get);if(typeof t.value=="function")return Yn(t.value)}r=j3e(r)}function n(i){return console.warn("fallback value for",i),null}return n}var Sg=Xr(["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"]),Qf=Xr(["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"]),ed=Xr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Q3e=Xr(["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"]),td=Xr(["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"]),eje=Xr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xg=Xr(["#text"]),Eg=Xr(["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"]),rd=Xr(["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"]),Mg=Xr(["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"]),Hl=Xr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),tje=Pi(/\{\{[\s\S]*|[\s\S]*\}\}/gm),rje=Pi(/<%[\s\S]*|[\s\S]*%>/gm),nje=Pi(/^data-[\-\w.\u00B7-\uFFFF]/),ije=Pi(/^aria-[\-\w]+$/),aje=Pi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),oje=Pi(/^(?:\w+script|data):/i),sje=Pi(/[\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 ni(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 lje=function(){return typeof window>"u"?null:window},uje=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 Nw(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:lje(),e=function(J){return Nw(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,k=r.Text,T=r.Comment,x=r.DOMParser,E=r.trustedTypes,P=s.prototype,F=ql(P,"cloneNode"),z=ql(P,"nextSibling"),Y=ql(P,"childNodes"),Z=ql(P,"parentNode");if(typeof a=="function"){var oe=n.createElement("template");oe.content&&oe.content.ownerDocument&&(n=oe.content.ownerDocument)}var le=uje(E,t),re=le&>?le.createHTML(""):"",he=n,ge=he.implementation,ye=he.createNodeIterator,Re=he.createDocumentFragment,Ze=he.getElementsByTagName,Be=t.importNode,mt={};try{mt=Da(n).documentMode?n.documentMode:{}}catch{}var ut={};e.isSupported=typeof Z=="function"&&ge&&typeof ge.createHTMLDocument<"u"&&mt!==9;var vt=tje,st=rje,Rt=nje,_t=ije,Xt=oje,Qe=sje,wt=aje,lt=null,St=bt({},[].concat(ni(Sg),ni(Qf),ni(ed),ni(td),ni(xg))),Et=null,vr=bt({},[].concat(ni(Eg),ni(rd),ni(Mg),ni(Hl))),ke=null,pe=null,ie=!0,se=!0,te=!1,Te=!1,Ee=!1,Pe=!1,at=!1,dt=!1,ot=!1,Vt=!0,gt=!1,lr=!0,$t=!0,ur=!1,At={},cr=null,En=bt({},["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"]),Zr=null,Zt=bt({},["audio","video","img","source","image","track"]),ze=null,$e=bt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),it="http://www.w3.org/1998/Math/MathML",ct="http://www.w3.org/2000/svg",xt="http://www.w3.org/1999/xhtml",mr=xt,Ft=!1,Ut=void 0,Pr=["application/xhtml+xml","text/html"],pn="text/html",Qt=void 0,Br=null,Mn=n.createElement("form"),vn=function(J){Br&&Br===J||((!J||(typeof J>"u"?"undefined":ks(J))!=="object")&&(J={}),J=Da(J),lt="ALLOWED_TAGS"in J?bt({},J.ALLOWED_TAGS):St,Et="ALLOWED_ATTR"in J?bt({},J.ALLOWED_ATTR):vr,ze="ADD_URI_SAFE_ATTR"in J?bt(Da($e),J.ADD_URI_SAFE_ATTR):$e,Zr="ADD_DATA_URI_TAGS"in J?bt(Da(Zt),J.ADD_DATA_URI_TAGS):Zt,cr="FORBID_CONTENTS"in J?bt({},J.FORBID_CONTENTS):En,ke="FORBID_TAGS"in J?bt({},J.FORBID_TAGS):{},pe="FORBID_ATTR"in J?bt({},J.FORBID_ATTR):{},At="USE_PROFILES"in J?J.USE_PROFILES:!1,ie=J.ALLOW_ARIA_ATTR!==!1,se=J.ALLOW_DATA_ATTR!==!1,te=J.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=J.SAFE_FOR_TEMPLATES||!1,Ee=J.WHOLE_DOCUMENT||!1,dt=J.RETURN_DOM||!1,ot=J.RETURN_DOM_FRAGMENT||!1,Vt=J.RETURN_DOM_IMPORT!==!1,gt=J.RETURN_TRUSTED_TYPE||!1,at=J.FORCE_BODY||!1,lr=J.SANITIZE_DOM!==!1,$t=J.KEEP_CONTENT!==!1,ur=J.IN_PLACE||!1,wt=J.ALLOWED_URI_REGEXP||wt,mr=J.NAMESPACE||xt,Ut=Pr.indexOf(J.PARSER_MEDIA_TYPE)===-1?Ut=pn:Ut=J.PARSER_MEDIA_TYPE,Qt=Ut==="application/xhtml+xml"?function(me){return me}:Gl,Te&&(se=!1),ot&&(dt=!0),At&&(lt=bt({},[].concat(ni(xg))),Et=[],At.html===!0&&(bt(lt,Sg),bt(Et,Eg)),At.svg===!0&&(bt(lt,Qf),bt(Et,rd),bt(Et,Hl)),At.svgFilters===!0&&(bt(lt,ed),bt(Et,rd),bt(Et,Hl)),At.mathMl===!0&&(bt(lt,td),bt(Et,Mg),bt(Et,Hl))),J.ADD_TAGS&&(lt===St&&(lt=Da(lt)),bt(lt,J.ADD_TAGS)),J.ADD_ATTR&&(Et===vr&&(Et=Da(Et)),bt(Et,J.ADD_ATTR)),J.ADD_URI_SAFE_ATTR&&bt(ze,J.ADD_URI_SAFE_ATTR),J.FORBID_CONTENTS&&(cr===En&&(cr=Da(cr)),bt(cr,J.FORBID_CONTENTS)),$t&&(lt["#text"]=!0),Ee&&bt(lt,["html","head","body"]),lt.table&&(bt(lt,["tbody"]),delete ke.tbody),Xr&&Xr(J),Br=J)},Qr=bt({},["mi","mo","mn","ms","mtext"]),Wr=bt({},["foreignobject","desc","title","annotation-xml"]),Fr=bt({},Qf);bt(Fr,ed),bt(Fr,Q3e);var er=bt({},td);bt(er,eje);var en=function(J){var me=Z(J);(!me||!me.tagName)&&(me={namespaceURI:xt,tagName:"template"});var Ce=Gl(J.tagName),He=Gl(me.tagName);if(J.namespaceURI===ct)return me.namespaceURI===xt?Ce==="svg":me.namespaceURI===it?Ce==="svg"&&(He==="annotation-xml"||Qr[He]):!!Fr[Ce];if(J.namespaceURI===it)return me.namespaceURI===xt?Ce==="math":me.namespaceURI===ct?Ce==="math"&&Wr[He]:!!er[Ce];if(J.namespaceURI===xt){if(me.namespaceURI===ct&&!Wr[He]||me.namespaceURI===it&&!Qr[He])return!1;var Ye=bt({},["title","style","font","a","script"]);return!er[Ce]&&(Ye[Ce]||!Fr[Ce])}return!1},qt=function(J){cs(e.removed,{element:J});try{J.parentNode.removeChild(J)}catch{try{J.outerHTML=re}catch{J.remove()}}},fr=function(J,me){try{cs(e.removed,{attribute:me.getAttributeNode(J),from:me})}catch{cs(e.removed,{attribute:null,from:me})}if(me.removeAttribute(J),J==="is"&&!Et[J])if(dt||ot)try{qt(me)}catch{}else try{me.setAttribute(J,"")}catch{}},$=function(J){var me=void 0,Ce=void 0;if(at)J="<remove></remove>"+J;else{var He=Cg(J,/^[\r\n\t ]+/);Ce=He&&He[0]}Ut==="application/xhtml+xml"&&(J='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+J+"</body></html>");var Ye=le?le.createHTML(J):J;if(mr===xt)try{me=new x().parseFromString(Ye,Ut)}catch{}if(!me||!me.documentElement){me=ge.createDocument(mr,"template",null);try{me.documentElement.innerHTML=Ft?"":Ye}catch{}}var I=me.body||me.documentElement;return J&&Ce&&I.insertBefore(n.createTextNode(Ce),I.childNodes[0]||null),mr===xt?Ze.call(me,Ee?"html":"body")[0]:Ee?me.documentElement:I},W=function(J){return ye.call(J.ownerDocument||J,J,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},R=function(J){return J instanceof k||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"},D=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"},B=function(J,me,Ce){ut[J]&&J3e(ut[J],function(He){He.call(e,me,Ce,Br)})},H=function(J){var me=void 0;if(B("beforeSanitizeElements",J,null),R(J)||Cg(J.nodeName,/[\u0080-\uFFFF]/))return qt(J),!0;var Ce=Qt(J.nodeName);if(B("uponSanitizeElement",J,{tagName:Ce,allowedTags:lt}),!D(J.firstElementChild)&&(!D(J.content)||!D(J.content.firstElementChild))&&Ei(/<[/\w]/g,J.innerHTML)&&Ei(/<[/\w]/g,J.textContent)||Ce==="select"&&Ei(/<template/i,J.innerHTML))return qt(J),!0;if(!lt[Ce]||ke[Ce]){if($t&&!cr[Ce]){var He=Z(J)||J.parentNode,Ye=Y(J)||J.childNodes;if(Ye&&He)for(var I=Ye.length,M=I-1;M>=0;--M)He.insertBefore(F(Ye[M],!0),z(J))}return qt(J),!0}return J instanceof s&&!en(J)||(Ce==="noscript"||Ce==="noembed")&&Ei(/<\/no(script|embed)/i,J.innerHTML)?(qt(J),!0):(Te&&J.nodeType===3&&(me=J.textContent,me=Gi(me,vt," "),me=Gi(me,st," "),J.textContent!==me&&(cs(e.removed,{element:J.cloneNode()}),J.textContent=me)),B("afterSanitizeElements",J,null),!1)},K=function(J,me,Ce){if(lr&&(me==="id"||me==="name")&&(Ce in n||Ce in Mn))return!1;if(!(se&&!pe[me]&&Ei(Rt,me))){if(!(ie&&Ei(_t,me))){if(!Et[me]||pe[me])return!1;if(!ze[me]){if(!Ei(wt,Gi(Ce,Qe,""))){if(!((me==="src"||me==="xlink:href"||me==="href")&&J!=="script"&&Y3e(Ce,"data:")===0&&Zr[J])){if(!(te&&!Ei(Xt,Gi(Ce,Qe,"")))){if(Ce)return!1}}}}}}return!0},de=function(J){var me=void 0,Ce=void 0,He=void 0,Ye=void 0;B("beforeSanitizeAttributes",J,null);var I=J.attributes;if(I){var M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Et};for(Ye=I.length;Ye--;){me=I[Ye];var g=me,w=g.name,O=g.namespaceURI;if(Ce=X3e(me.value),He=Qt(w),M.attrName=He,M.attrValue=Ce,M.keepAttr=!0,M.forceKeepAttr=void 0,B("uponSanitizeAttribute",J,M),Ce=M.attrValue,!M.forceKeepAttr&&(fr(w,J),!!M.keepAttr)){if(Ei(/\/>/i,Ce)){fr(w,J);continue}Te&&(Ce=Gi(Ce,vt," "),Ce=Gi(Ce,st," "));var _=Qt(J.nodeName);if(K(_,He,Ce))try{O?J.setAttributeNS(O,w,Ce):J.setAttribute(w,Ce),wg(e.removed)}catch{}}}B("afterSanitizeAttributes",J,null)}},xe=function ne(J){var me=void 0,Ce=W(J);for(B("beforeSanitizeShadowDOM",J,null);me=Ce.nextNode();)B("uponSanitizeShadowNode",me,null),!H(me)&&(me.content instanceof i&&ne(me.content),de(me));B("afterSanitizeShadowDOM",J,null)};return e.sanitize=function(ne,J){var me=void 0,Ce=void 0,He=void 0,Ye=void 0,I=void 0;if(Ft=!ne,Ft&&(ne="<!-->"),typeof ne!="string"&&!D(ne)){if(typeof ne.toString!="function")throw Tg("toString is not a function");if(ne=ne.toString(),typeof ne!="string")throw Tg("dirty is not a string, aborting")}if(!e.isSupported){if(ks(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof ne=="string")return r.toStaticHTML(ne);if(D(ne))return r.toStaticHTML(ne.outerHTML)}return ne}if(Pe||vn(J),e.removed=[],typeof ne=="string"&&(ur=!1),!ur)if(ne instanceof o)me=$("<!---->"),Ce=me.ownerDocument.importNode(ne,!0),Ce.nodeType===1&&Ce.nodeName==="BODY"||Ce.nodeName==="HTML"?me=Ce:me.appendChild(Ce);else{if(!dt&&!Te&&!Ee&&ne.indexOf("<")===-1)return le&>?le.createHTML(ne):ne;if(me=$(ne),!me)return dt?null:re}me&&at&&qt(me.firstChild);for(var M=W(ur?ne:me);He=M.nextNode();)He.nodeType===3&&He===Ye||H(He)||(He.content instanceof i&&xe(He.content),de(He),Ye=He);if(Ye=null,ur)return ne;if(dt){if(ot)for(I=Re.call(me.ownerDocument);me.firstChild;)I.appendChild(me.firstChild);else I=me;return Vt&&(I=Be.call(t,I,!0)),I}var g=Ee?me.outerHTML:me.innerHTML;return Te&&(g=Gi(g,vt," "),g=Gi(g,st," ")),le&>?le.createHTML(g):g},e.setConfig=function(ne){vn(ne),Pe=!0},e.clearConfig=function(){Br=null,Pe=!1},e.isValidAttribute=function(ne,J,me){Br||vn({});var Ce=Qt(ne),He=Qt(J);return K(Ce,He,me)},e.addHook=function(ne,J){typeof J=="function"&&(ut[ne]=ut[ne]||[],cs(ut[ne],J))},e.removeHook=function(ne){ut[ne]&&wg(ut[ne])},e.removeHooks=function(ne){ut[ne]&&(ut[ne]=[])},e.removeAllHooks=function(){ut={}},e}var cje=Nw(),fje=["iframe","embed"],Dw=[];function Lw(r){Ir(fje,r)&&Dw.push(r.toLowerCase())}function Qa(r,e){return cje.sanitize(r,we({ADD_TAGS:Dw,ADD_ATTR:["rel","target","hreflang","type"],FORBID_TAGS:["input","script","textarea","form","button","select","meta","style","link","title","object","base"]},e))}function Rw(r,e){return r.literal.replace(new RegExp("(<\\s*"+e+"[^>]*>)|(</"+e+"\\s*[>])","ig"),"").trim()}function $d(r){r=r.match(zo)[0];var e=r.match(new RegExp(Ak,"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 Wd(r){return di(r.attributes).reduce(function(e,t){return e[t.nodeName]=t.nodeValue,e},{})}function Ag(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=Wd(i);return{dom:i,htmlAttrs:s}}var dje={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:Wd(n),childrenHTML:n.innerHTML}}}],toDOM:function(n){var i=Ag(n,r,e,t),a=i.dom,o=i.htmlAttrs;return o.class=o.class?o.class+" html-block":"html-block",dn([r,o],di(a.childNodes))}}},htmlInline:function(r,e,t){return{attrs:{htmlAttrs:{default:{}},htmlInline:{default:!0}},parseDOM:[{tag:r,getAttrs:function(n){return{htmlAttrs:Wd(n)}}}],toDOM:function(n){var i=Ag(n,r,e,t).htmlAttrs;return[r,i,0]}}}};function hje(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";Lw(a),n[o][a]=dje[i](a,e,t)})}),n}var pje=/^\s*<\s*\//,vje={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?`
|
|
64
|
-
`:`<br>
|
|
65
|
-
`;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=Sk(r),s=Tk(a,o).outerHTML;return[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:s},{type:"closeTag",tagName:"span"}]}return t()}};function $h(r,e){var t=we({},vje);return r&&(t.link=function(n,i){var a=i.entering,o=i.origin,s=o();return a&&(s.attributes=we(we({},s.attributes),r)),s}),e&&Object.keys(e).forEach(function(n){var i=t[n],a=e[n];i&&Hn(a)?t[n]=function(o,s){var l=we({},s);return l.origin=function(){return i(o,s)},a(o,l)}:Ir(["htmlBlock","htmlInline"],n)&&!Hn(a)?t[n]=function(o,s){var l=o.literal.match(zo);if(l){var f=l[0],p=l[1],k=l[3],T=(p||k).toLowerCase(),x=a[T],E=Rw(o,T);if(x){var P=we({},o);return P.attrs=$d(f),P.childrenHTML=E,P.type=T,s.entering=!pje.test(o.literal),x(P,s)}}return s.origin()}:t[n]=a}),t}var mje=["list","item","blockQuote"],gje=["UL","OL","BLOCKQUOTE"];function yje(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 Og(r,e,t){var n=zs(e)-1,i=Pu(e)-1,a=t[n].getBoundingClientRect(),o=t[i].offsetTop-t[n].offsetTop+t[i].clientHeight;return{height:o<=0?t[n].clientHeight:o+bje(r,t,Math.min(i+1,r.childCount-1)),rect:a}}function bje(r,e,t){for(var n=r.childCount-1,i=0;t<=n&&yje(r,t);)i+=e[t].clientHeight,t+=1;return i}function kje(r,e){for(;!r.getAttribute("data-nodeid")&&r.parentElement!==e;)r=r.parentElement;return r}function Cu(r,e){for(var t=0;r&&r!==e&&(Ir(gje,r.tagName)||(t+=r.offsetTop),r.offsetParent!==e.offsetParent);)r=r.parentElement;return t}function wje(r,e){for(var t=e,n=null;t;){var i=t.firstElementChild;if(!i)break;var a=Iw(i,r,Cu(t,e));n=t,t=a}var o=t||n;return o===e?null:o}function Iw(r,e,t){return r&&e>t+r.offsetTop?Iw(r.nextElementSibling,e,t)||r:null}function Cje(r,e,t,n){var i=Math.min((r-e)/t,1);return i*n}function nd(r,e){for(var t=r.querySelector('[data-nodeid="'+e.id+'"]');!t||cne(e);)e=e.parent,t=r.querySelector('[data-nodeid="'+e.id+'"]');return Tje({mdNode:e,el:t})}function Tje(r){for(var e=r.mdNode,t=r.el;(Ir(mje,e.type)||e.type==="table")&&e.firstChild;)e=e.firstChild,t=t.firstElementChild;return{mdNode:e,el:t}}var jn={};function Sje(r,e){jn[r]=jn[r]||{},jn[r].height=e}function xje(r,e){jn[r]=jn[r]||{},jn[r].offsetTop=e}function Eje(r){return jn[r]&&jn[r].height}function Mje(r){return jn[r]&&jn[r].offsetTop}function jd(r){r&&(delete jn[Number(r.getAttribute("data-nodeid"))],di(r.children).forEach(function(e){jd(e)}))}function Aje(r,e,t){var n=Eje(t),i=Mje(t),a=n||r.clientHeight,o=i||Cu(r,e)||r.offsetTop;return n||Sje(t,a),i||xje(t,o),{nodeHeight:a,offsetTop:o}}var id=Je("md-preview-highlight");function Oje(r,e){for(var t=r.firstChild;t&&t.next&&!(Bu(t.next)>e+1);)t=t.next;return t}var Pw=function(){function r(e,t){var n=document.createElement("div");this.el=n,this.eventEmitter=e,this.isViewer=!!t.isViewer,this.el.className=Je("md-preview");var i=t.linkAttributes,a=t.customHTMLRenderer,o=t.sanitizer,s=t.highlight,l=s===void 0?!1:s;this.renderer=new Uh({gfm:!0,nodeId:!0,convertors:$h(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=Rk('<div class="'+Je("contents")+'"></div>'),this.isViewer||this.el.appendChild(this.previewContent)},r.prototype.toggleActive=function(e){Oh(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()})),Yk(this.el,"scroll",function(n){t.eventEmitter.emit("scroll","preview",wje(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&&Wn(e,id)}},r.prototype.updateCursorNode=function(e,t){e&&(e=_o(e,function(o){return!hne(o)}),e.type==="tableRow"?e=Oje(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&&Wn(i,id),a&&si(a,id),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),k=this.getElementByNodeId(f);if(p){p.insertAdjacentHTML("beforebegin",o);for(var T=p;T&&T!==k;){var x=T.nextElementSibling;Ya(T),jd(T),T=x}T!=null&&T.parentNode&&(Ya(T),jd(T))}}},r.prototype.getRenderer=function(){return this.renderer},r.prototype.destroy=function(){Jk(this.el,"scroll"),this.el=null},r.prototype.getElement=function(){return this.el},r.prototype.getHTML=function(){return Lh(this.previewContent.innerHTML)},r.prototype.setHTML=function(e){this.previewContent.innerHTML=e},r.prototype.setHeight=function(e){fi(this.el,{height:e+"px"})},r.prototype.setMinHeight=function(e){fi(this.el,{minHeight:e+"px"})},r}();function Di(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!!Di(r,function(e){var t=e.type;return t.name==="listItem"||t.name==="bulletList"||t.name==="orderedList"})}function Tu(r){return!!Di(r,function(e){var t=e.type;return t.name==="tableHeadCell"||t.name==="tableBodyCell"})}function jo(r){return Di(r,function(e){var t=e.type;return t.name==="listItem"})}function Wu(r){return{tag:r,getAttrs:function(e){var t=e.getAttribute("data-raw-html");return we({},t&&{rawHTML:t})}}}function Bw(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 Fw(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]=Ir(["rawHTML","extended"],n)?a:Number(a)),t},{})}}}function Er(){return{htmlAttrs:{default:null},classNames:{default:null}}}function pr(r){var e=r.htmlAttrs,t=r.classNames;return we(we({},e),{class:t?t.join(" "):null})}function Nje(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 Dje(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 Lje(r,e,t,n){var i=Nje(r,t),a=Dje(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 Rje(r,e,t,n,i){for(var a=e.start,o=e.end,s=e.startIndex,l=e.endIndex,f=e.parent,p=Oe.empty,k=t.length-1;k>=0;k-=1)p=Oe.from(t[k].type.create(t[k].attrs,p));r.step(new Sr(a-(n?2:0),o,a,o,new Ue(p,0,0),t.length,!0));for(var T=0,k=0;k<t.length;k+=1)if(t[k].type===i){T=k+1;break}for(var x=t.length-T,E=a+t.length-(n?2:0),k=s,P=l;k<P;k+=1){var F=k===s;!F&&Do(r.doc,E,x)&&(r.split(E,x),E+=x*2),E+=f.child(k).nodeSize}return r}function qw(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 tu(f,f,o),e.endIndex<e.parent.childCount&&(e=new tu(i,r.doc.resolve(a.end(o)),o)),l=!0}var p=Lje(s,e,t,n);return p?Rje(r,e,p,l,t):r}function Hw(r,e){for(var t=r.resolve(e);t.node().type.name!=="paragraph";)e-=2,t=r.resolve(e);return jo(t)}function Ije(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=Hw(r.doc,o)}return r}function Pje(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 k=p.before(f-1);r.setNodeMarkup(k,t)}if(s===a.offset)break;o=Hw(r.doc,s)}return r}function _w(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)?Pje(i,s,r):qw(i,s,r);return t(l),!0}return!1}}function Bje(){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)?Ije(n,s):qw(n,s,i.nodes.bulletList,{task:!0});return e(l),!0}return!1}}function Fje(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 F=P.childCount,z=P.firstChild;return!!F&&z.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,k=p?Oe.from(r.create()):null,T=new Ue(Oe.from(r.create(null,Oe.from(l.type.create(null,k)))),p?3:1,0),x=s.start,E=s.end;return n.step(new Sr(x-(p?3:1),E,x,E,T,1,!0)),t(n),!0}return!1}}function qje(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 Sr(a-1,l,a,l,new Ue(Oe.from(t.create(null,s.copy())),1,0),1,!0)),e=new tu(r.doc.resolve(n.pos),r.doc.resolve(l),o)),r.lift(e,Au(e)),r}function Hje(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),k=o.index(-1),T=p.canReplace(k+(l?0:1),k+1,s==null?void 0:s.content.append(f?Oe.empty:Oe.from(t)));if(s&&T){var x=o.pos,E=x+s.nodeSize;r.step(new Sr(x-(l?1:0),E+(f?1:0),x+1,E-1,new Ue((l?Oe.empty:Oe.from(t.copy(Oe.empty))).append(f?Oe.empty:Oe.from(t.copy(Oe.empty))),l?0:1,f?0:1),l?0:1))}return r}function _je(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 k=p.childCount,T=p.firstChild;return!!k&&T.type===r});if(s){var l=a.node(s.depth-1).type===r,f=l?qje(n,s,r):Hje(n,s);return t(f),!0}return!1}}function zje(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=Oe.empty,p=a.depth-(l?1:2);p>=a.depth-3;p-=1)f=Oe.from(a.node(p).copy(f));return f=f.append(Oe.from(r.createAndFill())),n.replace(l?a.before():a.before(-1),a.after(-3),new Ue(f,l?3:2,2)),n.setSelection(Tt.near(n.doc.resolve(a.pos+(l?3:2)))),t(n),!0}var k=o.pos===a.end()?s.contentMatchAt(0).defaultType:null,T=k&&[null,{type:k}];return n.delete(a.pos,o.pos),Do(n.doc,a.pos,2,T)?(n.split(a.pos,2,T),t(n),!0):!1}}function Vje(){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)?Fje(n.nodes.listItem)(r,e):!1}}}function Uje(){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)?_je(n.nodes.listItem)(r,e):!1}}}function Wh(){return{indent:Vje(),outdent:Uje()}}var Ng=new Map,Nr=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=Di(e,function(E){var P=E.type;return P.name==="table"});if(t){var n=t.node,i=t.depth,a=t.offset,o=Ng.get(n);if((o==null?void 0:o.tableStartPos)===a+1)return o;var s=[],l=e.start(i),f=n.child(0),p=n.child(1),k=Gd(f,l),T=Gd(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,k.concat(T));return Ng.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],k=f[1];return i=Dm(s,p),s=i[0],p=i[1],a=Dm(l,k),l=a[0],k=a[1],this.getSpannedOffsets({startRowIdx:s,startColIdx:l,endRowIdx:p,endColIdx:k})},r.prototype.getSpannedOffsets=function(e){return e},r}(),Gd=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 $je(r,e){return xh(Nr.prototype,r),Gd=e,Nr}function Wje(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),k=p.offset,T=p.nodeSize;s.push(new Sb(r.resolve(k+1),r.resolve(k+T-1)))}return s}function jje(r,e){var t=[];return r.childCount&&t.push(r),e.childCount&&t.push(e),Oe.from(t)}var jh=function(r){Ge(e,r);function e(t,n){n===void 0&&(n=t);var i=this,a=t.node(0),o=Nr.create(t),s=o.getRectOffsets(t,n),l=Wje(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=Nr.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],k=s.end(s.depth-p),T=Math.min(k-4,s.pos);return Mt.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=Nr.create(this.startCell),l=s.getRectOffsets(this.startCell,this.endCell),f=l.startRowIdx,p=l.startColIdx,k=l.endRowIdx,T=l.endColIdx,x=!1,E=f;E<=k;E+=1){for(var P=[],F=p;F<=T;F+=1){var z=s.getCellInfo(E,F).offset,Y=t.nodeAt(z-n);Y&&(x=Y.type.name==="tableHeadCell",s.extendedRowspan(E,F)||s.extendedColspan(E,F)?P.push(Y.type.create({extended:!0})):P.push(Y.copy(Y.content)))}var Z=i.copy(Oe.from(P)),oe=x?a:o;oe.content=oe.content.append(Oe.from(Z))}return new Ue(jje(a,o),1,1)},e.prototype.toJSON=function(){return JSON.stringify(this)},e}(Tt);function Gje(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 zw(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=[],k=0;k<e;k+=1){var T=n&&n[f*e+k],x=s.create(null,T?t.text(T):[]);p.push(o.create(null,x))}l.push(a.create(null,p))}return l}function Kl(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 Vw(r,e){for(;r&&r!==e;){if(r.nodeName==="TD"||r.nodeName==="TH")return r;r=r.parentNode}return null}function Uw(r){return Di(r,function(e){var t=e.type;return t.name==="tableHeadCell"||t.name==="tableBodyCell"})}function ii(r){if(r instanceof Mt){var e=r.$anchor,t=Uw(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 $w(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 Oo(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 Kje(r,e){return we(we({},r.attrs),e)}var Zi=new Bs("cellSelection"),Jje=2,Yje=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=Vw(e.target,this.view.dom);if(e.button===Jje){e.preventDefault();return}if(t){var n=this.getCellPos(e);n&&(this.startCellPos=n),this.bindEvent()}},r.prototype.handleMousemove=function(e){var t=Zi.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(),Zi.getState(this.view.state)!==null&&this.view.dispatch(this.view.state.tr.setMeta(Zi,-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=Uw(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=Zi.getState(this.view.state)===null,s=new jh(e,t);if(o||!i.eq(s)){var l=a.setSelection(s);o&&l.setMeta(Zi,t.pos),this.view.dispatch(l)}},r.prototype.destroy=function(){this.view.dom.removeEventListener("mousedown",this.handlers.mousedown)},r}(),Xje=Je("cell-selected");function Zje(r){var e=r.selection,t=r.doc;if(e instanceof jh){var n=[],i=e.ranges;return i.forEach(function(a){var o=a.$from,s=a.$to;n.push(cn.node(o.pos-1,s.pos+1,{class:Xje}))}),sr.create(t,n)}return null}function Qje(){return new hn({key:Zi,state:{init:function(){return null},apply:function(r,e){var t=r.getMeta(Zi);if(t)return t===-1?null:t;if(uu(e)||!r.docChanged)return e;var n=r.mapping.mapResult(e),i=n.deleted,a=n.pos;return i?null:a}},props:{decorations:Zje,createSelectionBetween:function(r){var e=r.state;return uu(Zi.getState(e))?null:e.selection}},view:function(r){return new Yje(r)}})}var Ww=function(){function r(){this.keys=[],this.values=[]}return r.prototype.getKeyIndex=function(e){return Ka(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}(),ad="en-US",eGe=function(){function r(){this.code=ad,this.langs=new Ww}return r.prototype.setCode=function(e){this.code=e||ad},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,bh(a,t))}})},r.prototype.get=function(e,t){t||(t=this.code);var n=this.langs.get(t);n||(n=this.langs.get(ad));var i=n[e];if(!i)throw new Error('There is no text key "'+e+'" in '+t);return i},r}(),pt=new eGe,tGe=[[{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 rGe(r,e){return tGe.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:pt.get(i),onClick:function(){r.emit("command",a,o)},disabled:e&&!!s,className:l}})}).concat()}function nGe(r){return new hn({props:{handleDOMEvents:{contextmenu:function(e,t){var n=Vw(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:rGe(r,p),tableCell:n}),!0}return!1}}}})}function iGe(){return new hn({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),k=e.target,T=getComputedStyle(k,":before"),x=e,E=x.offsetX,P=x.offsetY;if(!p||!Ah(T,E,P))return!1;e.preventDefault();var F=f.before(p.depth),z=p.node.attrs;return l.setNodeMarkup(F,null,we(we({},z),{checked:!z.checked})),r.dispatch(l),!0}return!1}}}})}var aGe=["image","link","customBlock","frontMatter"],oGe=["strong","strike","emph","code"],jw=["bulletList","orderedList","taskList"];function sGe(r,e){var t=r.type.name;return t==="listItem"?r.attrs.task?"taskList":e.type.name:t.indexOf("table")!==-1?"table":t}function lGe(r,e){e[r]={active:!0},jw.filter(function(t){return t!==r}).forEach(function(t){e[t]&&delete e[t]})}function uGe(r,e,t,n){oGe.forEach(function(i){var a=t.marks[i],o=r.marksAcross(e)||[],s=!!a.isInSet(o);s&&(n[i]={active:!0})})}function cGe(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 k=sGe(l,p);Ir(aGe,k)||(Ir(jw,k)?(lGe(k,s),s.indent.disabled=!1,s.outdent.disabled=!1):k==="paragraph"||k==="text"?uGe(n,i,t,s):s[k]={active:!0})}),s}function fGe(r){return new hn({view:function(){return{update:function(e){var t=e.state,n=t.selection,i=t.doc,a=t.schema;r.emit("changeToolbarState",{toolbarState:cGe(n,i,a)})}}}})}var dGe=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 hh(a.innerViewContainer,{state:Pa.create({doc:a.node,plugins:[Rs({"Mod-z":function(){return Ss(a.innerEditorView.state,a.innerEditorView.dispatch)},"Shift-Mod-z":function(){return yh(a.innerEditorView.state,a.innerEditorView.dispatch)},Tab:function(o,s){return s(o.tr.insertText(" ")),!0},Enter:uk,Escape:function(){return a.cancelEditing(),!0},"Ctrl-Enter":function(){return a.saveAndFinishEditing(),!0}}),mk()]}),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=Je("custom-block"),this.wrapper=document.createElement("div"),this.wrapper.className=Je("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=Je("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(jt(t.tr,e))),this.editorView.focus(),this.renderCustomBlock(),this.closeEditor()},r.prototype.cancelEditing=function(){var e=lre(this.innerEditorView.state);for(this.canceled=!0;e--;)Ss(this.innerEditorView.state,this.innerEditorView.dispatch),Ss(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(Mt.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&&Hn(this.getPos)){for(var a=this.editorView.state.tr,o=un.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}(),Dg="image-link",hGe=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&&Hn(a.getPos)&&Ek(l,Dg)){var k=getComputedStyle(l,":before");if(s.stopPropagation(),Ah(k,f,p)){var T=a.view.state.tr,x=a.getPos();T.setSelection(jt(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=Dg,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=pr(e.attrs);return t.src=i,a&&(t.alt=a),Dh(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}(),pGe="toastui-editor-ww-code-block",vGe="toastui-editor-ww-code-block-language",mGe=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"&&Hn(a.getPos)){var f=a.view.coordsAtPos(a.getPos()),p=f.top,k=f.right;a.createLanguageEditor({top:p,right:k})}},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=pGe;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=pr(this.node.attrs);return n&&t.setAttribute("data-language",n),Dh(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=vGe;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;fi(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&&Hn(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,Ya(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}(),gGe=/MsoListParagraph/,Gw=/style=(.|\n)*mso-/,Kw=/mso-list:(.*)/,yGe=/O:P/,bGe=/^(n|u|l)/,kGe="p.MsoListParagraph";function wGe(r){return Gw.test(r)}function CGe(r){for(var e=[],t=document.createTreeWalker(r,1,null,!1);t.nextNode();){var n=t.currentNode;if(qu(n)){var i=n,a=i.outerHTML,o=i.textContent,s=Gw.test(a),l=Kw.test(a);s&&!l&&o?e.push([n,!0]):(yGe.test(n.nodeName)||s&&!o||l)&&e.push([n,!1])}}return e.forEach(function(f){var p=f[0],k=f[1];k?zne(p):Ya(p)}),r.innerHTML.trim()}function TGe(r,e){var t=r.getAttribute("style");if(t){var n=t.match(Kw),i=n[1],a=i.trim().split(" "),o=a[1],s=parseInt(o.replace("level",""),10),l=bGe.test(r.textContent||"");return{id:e,level:s,prev:null,parent:null,children:[],unordered:l,contents:CGe(r)}}return null}function SGe(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 xGe(r){var e=[];return r.forEach(function(t,n){var i=e[n-1],a=TGe(t,n);a&&(i&&SGe(a,i),e.push(a))}),e}function Jw(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(Jw(i))}),t}function EGe(r){var e=xGe(r),t=e.filter(function(n){var i=n.parent;return!i});return Jw(t)}function MGe(r){for(;r&&!qu(r);)r=r.nextSibling;return r?!gGe.test(r.className):!0}function AGe(r){var e=document.createElement("div");e.innerHTML=r;var t=[],n=qne(e,kGe);n.forEach(function(a){var o=MGe(a.nextSibling);if(t.push(a),o){var s=EGe(t),l=a.nextSibling;l?_ne(s,l):Hne(e,s),t=[]}Ya(a)});var i=n.length?"<p></p>":"";return""+i+e.innerHTML}var Lg="<!--StartFragment-->",OGe="<!--EndFragment-->";function NGe(r){var e=r.indexOf(Lg),t=r.lastIndexOf(OGe);return e>-1&&t>-1&&(r=r.slice(e+Lg.length,t)),r.replace(/<br[^>]*>/g,Dk)}function DGe(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 LGe(r){return r=NGe(r),r=DGe(r),wGe(r)&&(r=AGe(r)),r}function RGe(r){var e=r.reduce(function(t,n){return t.childCount>n.childCount?t:n});return e.childCount}function Yw(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 Xw(r,e,t){var n=t.nodes,i=n.tableRow,a=n.tableHeadCell,o=Yw(r,e,a);return i.create(null,o)}function Zw(r,e,t){var n=t.nodes,i=n.tableRow,a=n.tableBodyCell,o=Yw(r,e,a);return i.create(null,o)}function IGe(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 Qw(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 dn(dn([],e),t)}function PGe(r,e,t){var n=Xw(r,e,t);return t.nodes.tableHead.create(null,n)}function Rg(r,e,t){var n=r.map(function(a){return Zw(a,e,t)});if(!r.length){var i=IGe(e,t);n.push(i)}return t.nodes.tableBody.create(null,n)}function BGe(r,e,t,n){var i=RGe(r);if(t&&n)return e.nodes.table.create(null,[Rg(r,i,e)]);var a=r[0],o=r.slice(1),s=[PGe(a,i,e)];return o.length&&s.push(Rg(o,i,e)),e.nodes.table.create(null,s)}function FGe(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=$w(new Ue(Oe.from(s),0,0));if(l){var f=Qw(l),p=l.firstChild.type.name==="tableBody",k=BGe(f,e,p,t);n.push(k)}}else n.push(s)}),new Ue(Oe.from(n),a,o)}var qGe=4,HGe=2;function Jl(r){return r*qGe}function _Ge(r,e,t){var n=[],i=Qw(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=Xw(f,a,t).content;n.push(p)}}return l.forEach(function(k){if(!k.attrs.dummyRowForPasting){var T=Zw(k,a,t).content;n.push(T)}}),n}function zGe(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(P){var F=P.attrs,z=F.colspan;z>1&&(E+=z-1)}),o=Math.max(o,E)},l=0;l<a;l+=1)s(l);var f=n+a-1,p=i+o-1,k=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:k,addedColumnCount:T}}function VGe(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 UGe(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,k=t.totalRowCount,T=0,x=0;x<k;x+=1){var E=t.getCellInfo(x,l-p),P=E.offset,F=E.nodeSize,z=r.mapping.map(P+F),Y=Kl(p,x,e);if(r.insert(z,Y),x>=a&&x<=s-f){var Z=t.getCellInfo(x,l-p),oe=r.mapping.map(Z.offset),le=z+Jl(p);i[T]={rowIdx:x,startColIdx:o,endColIdx:l,dummyOffsets:[oe,le]},T+=1}}}function $Ge(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,k=zw(a,t.totalColumnCount+o,e),T=p;r.insert(r.mapping.slice(f).map(T),k);for(var x=0;x<a;x+=1){var E=T+Jl(s)+1,P=T+Jl(l+1)+1,F=T+Jl(t.totalColumnCount+o)+HGe;i.push({rowIdx:x+t.totalRowCount,startColIdx:s,endColIdx:l,dummyOffsets:[E,P]}),T=F}}function WGe(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,k=r.mapping.slice(i),T=new Ue(e[o],0,0),x=p?p[0]:n.getCellStartOffset(s,l),E=p?p[1]:n.getCellEndOffset(s,f);r.replace(k.map(x),k.map(E),T)})}function jGe(r,e){var t=r.state,n=t.selection,i=t.schema,a=t.tr,o=ii(n),s=o.anchor,l=o.head;if(s&&l){var f=$w(e);if(!f)return!1;var p=Nr.create(s),k=p.getRectOffsets(s,l),T=_Ge(f,k,i),x=zGe(p,k,T),E=[];return KGe(p,x)&&(VGe(x,E),x.addedColumnCount&&UGe(a,i,p,x,E),x.addedRowCount&&$Ge(a,i,p,x,E),WGe(a,T,E,p),r.dispatch(a),GGe(r,E,p.getCellInfo(0,0).offset)),!0}return!1}function GGe(r,e,t){var n=r.state,i=n.tr,a=n.doc,o=Nr.create(a.resolve(t)),s=e[0],l=s.rowIdx,f=s.startColIdx,p=Vr(e),k=p.rowIdx,T=p.endColIdx,x=o.getCellInfo(l,f).offset,E=o.getCellInfo(k,T).offset;r.dispatch(i.setSelection(new jh(a.resolve(x),a.resolve(E))))}function KGe(r,e){var t=r.getSpannedOffsets(e),n=Oo(t),i=n.rowCount,a=n.columnCount,o=Oo(e),s=o.rowCount,l=o.columnCount;return i===s&&a===l}var JGe=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}(Wt),YGe=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:we({},Er()),parseDOM:[{tag:"p"}],toDOM:function(t){var n=t.attrs;return["p",pr(n),0]}}},enumerable:!1,configurable:!0}),e}(Wt),XGe=/\s{1,4}$/,ZGe=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)&&!Tu(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)&&!Tu(o)){var p=o.nodeBefore;if(p&&p.isText){var k=p.text,T=k.replace(XGe,""),x=k.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}(Wt),QGe=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 we({level:n},a&&{rawHTML:a})}}});return{attrs:we({level:{default:1},headingType:{default:"atx"},rawHTML:{default:null}},Er()),content:"inline*",group:"block",defining:!0,parseDOM:t,toDOM:function(n){var i=n.attrs;return["h"+i.level,pr(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 gh(a,t)(n,i)}}},e}(Wt),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"codeBlock"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"text*",group:"block",attrs:we({language:{default:null},rawHTML:{default:null}},Er()),code:!0,defining:!0,marks:"",parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:function(t){var n=t.getAttribute("data-raw-html"),i=t.firstElementChild;return we({language:(i==null?void 0:i.getAttribute("data-language"))||null},n&&{rawHTML:n})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"pre",["code",we({"data-language":n.language},pr(n)),0]]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return gh(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 k=f.parent.textContent.split(`
|
|
66
|
-
`),T=t==="up"?f.start():f.end(),x=t==="up"?[T,k[0].length+T]:[T-Vr(k).length,T],E=s.resolve(t==="up"?f.before():f.after()),P=t==="up"?E.nodeBefore:E.nodeAfter;if(one(f.pos,x[0],x[1])&&!P){var F=Eh(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}(Wt),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"bulletList"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:we({rawHTML:{default:null}},Er()),parseDOM:[Wu("ul")],toDOM:function(t){var n=t.attrs;return["ul",pr(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.changeList=function(){return function(t,n){return _w(t.schema.nodes.bulletList)(t,n)}},e.prototype.commands=function(){return{bulletList:this.changeList,taskList:Bje}},e.prototype.keymaps=function(){var t=this.changeList(),n=Wh(),i=n.indent,a=n.outdent;return{"Mod-u":t,"Mod-U":t,Tab:i(),"Shift-Tab":a()}},e}(Wt),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"orderedList"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"listItem+",group:"block",attrs:we({order:{default:1},rawHTML:{default:null}},Er()),parseDOM:[{tag:"ol",getAttrs:function(t){var n=t.getAttribute("start"),i=t.getAttribute("data-raw-html");return we({order:t.hasAttribute("start")?Number(n):1},i&&{rawHTML:i})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"ol",we({start:n.order===1?null:n.order},pr(n)),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return _w(t.schema.nodes.orderedList)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()(),n=Wh(),i=n.indent,a=n.outdent;return{"Mod-o":t,"Mod-O":t,Tab:i(),"Shift-Tab":a()}},e}(Wt),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"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 we({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",we({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,k=s.node(-1);if(l&&!p.childCount&&k.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 zje(n.schema.nodes.listItem)(n,i)};return{Backspace:this.liftToPrevListItem(),Enter:t}},e}(Wt),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"blockQuote"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:we({rawHTML:{default:null}},Er()),content:"block+",group:"block",parseDOM:[Wu("blockquote")],toDOM:function(t){var n=t.attrs;return["blockquote",pr(n),0]}}},enumerable:!1,configurable:!0}),e.prototype.commands=function(){return function(){return function(t,n){return Kte(t.schema.nodes.blockQuote)(t,n)}}},e.prototype.keymaps=function(){var t=this.commands()();return{"Alt-q":t,"Alt-Q":t}},e}(Wt),aKe={left:hKe,right:dKe,up:pKe,down:vKe};function oKe(r,e,t){var n=t[0],i=t[1],a=e.resolve(r.before(n-1));return i===n&&!a.nodeBefore}function sKe(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 lKe(r,e,t,n,i){var a=e[0],o=e[1],s=e[2];if(r==="left"||r==="up"){if(i&&!oKe(t,n,[a,o]))return!1;var l=t.before(s),f=n.resolve(l).nodeBefore;if(f)return!1}return!0}function uKe(r,e,t,n,i){if(r==="right"||r==="down"){if(i&&!sKe(t))return!1;var a=t.after(e),o=n.resolve(a).nodeAfter;if(o)return!1}return!0}function cKe(r,e,t,n){var i=e[0],a=e[1],o=i+3,s=a>=o,l=s?i+1:a,f=lKe(r,[a,o,l],t,n,s),p=uKe(r,l,t,n,s);return f&&p}function Ig(r,e,t){var n=t[0],i=t[1],a=e.getRowspanStartInfo(n,i),o=r==="up"&&n===0,s=r==="down"&&((a==null?void 0:a.count)>1?n+a.count-1:n)===e.totalRowCount-1;return o||s}function fKe(r,e,t){var n=r.doc.resolve(e.tableStartOffset-1);return n.nodeBefore?r.setSelection(Tt.near(n,-1)):Eh(r,n,t)}function od(r,e,t,n){n===void 0&&(n=!1);var i=r.doc.resolve(e.tableEndOffset);return n||!i.nodeAfter?Eh(r,i,t):r.setSelection(Tt.near(i,1))}function dKe(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==null?void 0: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 hKe(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 pKe(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 vKe(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==null?void 0:o.count)>1&&(a+=o.count-1);var s=e.getCellInfo(a,n).offset;return s+2}return null}function Pg(r,e,t,n){var i=aKe[r],a=i(t,n);if(a){var o=r==="right"||r==="down"?1:-1;return e.setSelection(Tt.near(e.doc.resolve(a),o))}return null}function mKe(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,k=r==="left"?l-2:l+f+3;return p===k}function gKe(r,e,t){var n=r.doc.resolve(e.before(t-3));return r.setSelection(new ft(n))}function yKe(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 bKe(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 kKe=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:we({rawHTML:{default:null}},Er()),parseDOM:[Wu("table")],toDOM:function(t){var n=t.attrs;return["table",pr(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,k=f.from,T=f.to,x=f.$from,E=k===T;if(E&&!Tu(x)){var P=l.nodes,F=P.tableHead,z=P.tableBody,Y=s==null?void 0:s.slice(0,o),Z=s==null?void 0:s.slice(o,s.length),oe=Gje(o,l,Y),le=zw(a-1,o,l,Z),re=l.nodes.table.create(null,[F.create(null,oe),z.create(null,le)]);return i(p.replaceSelectionWith(re)),!0}return!1}}},e.prototype.removeTable=function(){return function(){return function(t,n){var i=t.selection,a=t.tr,o=Nr.create(i.$anchor);if(o){var s=o.tableStartOffset,l=o.tableEndOffset,f=s-1,p=jt(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=ii(a),f=l.anchor,p=l.head;if(f&&p){for(var k=Nr.create(f),T=k.getRectOffsets(f,p),x=t==="left"?T.startColIdx:T.endColIdx+1,E=Oo(T).columnCount,P=k.totalRowCount,F=0;F<P;F+=1){var z=Kl(E,F,s);o.insert(o.mapping.map(k.posAt(F,x)),z)}return i(o),!0}return!1}}},e.prototype.removeColumn=function(){return function(){return function(t,n){var i=t.selection,a=t.tr,o=ii(i),s=o.anchor,l=o.head;if(s&&l){var f=Nr.create(s),p=f.getRectOffsets(s,l),k=f.totalColumnCount,T=f.totalRowCount,x=Oo(p).columnCount,E=x===k;if(E)return!1;for(var P=p.startColIdx,F=p.endColIdx,z=a.mapping.maps.length,Y=0;Y<T;Y+=1)for(var Z=F;Z>=P;Z-=1){var oe=f.getCellInfo(Y,Z),le=oe.offset,re=oe.nodeSize,he=a.mapping.slice(z).map(le),ge=he+re;a.delete(he,ge)}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=ii(a),f=l.anchor,p=l.head;if(f&&p){var k=Nr.create(f),T=k.totalColumnCount,x=k.getRectOffsets(f,p),E=Oo(x).rowCount,P=yKe(t,k,x),F=P.targetRowIdx,z=P.insertColIdx,Y=P.nodeSize,Z=F===0;if(!Z){for(var oe=[],le=s.mapping.map(k.posAt(F,z))+Y,re=[],he=0;he<T;he+=1)re=re.concat(Kl(1,F,o));for(var ge=0;ge<E;ge+=1)oe.push(o.nodes.tableRow.create(null,re));return i(s.insert(le,oe)),!0}}return!1}}},e.prototype.removeRow=function(){return function(){return function(t,n){var i=t.selection,a=t.tr,o=ii(i),s=o.anchor,l=o.head;if(s&&l){var f=Nr.create(s),p=f.totalRowCount,k=f.totalColumnCount,T=f.getRectOffsets(s,l),x=Oo(T).rowCount,E=T.startRowIdx,P=T.endRowIdx,F=E===0,z=x===p-1;if(z||F)return!1;for(var Y=P;Y>=E;Y-=1){var Z=bKe(f,Y,k),oe=Z.from,le=Z.to;a.delete(oe-1,le+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=ii(o),f=l.anchor,p=l.head;if(f&&p){for(var k=Nr.create(f),T=k.totalRowCount,x=k.getRectOffsets(f,p),E=x.startColIdx,P=x.endColIdx,F=0;F<T;F+=1)for(var z=E;z<=P;z+=1)if(!k.extendedRowspan(F,z)&&!k.extendedColspan(F,z)){var Y=k.getNodeAndPos(F,z),Z=Y.node,oe=Y.pos,le=Kje(Z,{align:a});s.setNodeMarkup(oe,null,le)}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=ii(a),f=l.anchor,p=l.head;if(f&&p){var k=Nr.create(f),T=k.getCellIndex(f),x=void 0;if(Ig(t,k,T)?x=od(o,k,s):x=Pg(t,o,T,k),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,k=n.context.view;if(!k.endOfTextblock(t))return!1;var T=Di(p,function(Z){var oe=Z.type;return oe.name==="tableHeadCell"||oe.name==="tableBodyCell"});if(T){var x=Di(p,function(Z){var oe=Z.type;return oe.name==="paragraph"}),E=T.depth;if(x&&cKe(t,[E,x.depth],p,l)){var P=ii(o).anchor,F=Nr.create(P),z=F.getCellIndex(P),Y=void 0;if(mKe(t,F,z)?Y=gKe(s,p,E):Ig(t,F,z)?t==="up"?Y=fKe(s,F,f):t==="down"&&(Y=od(s,F,f)):Y=Pg(t,s,z,F),Y)return a(Y),!0}}return!1}},e.prototype.deleteCells=function(){return function(t,n){var i=t.schema,a=t.selection,o=t.tr,s=ii(a),l=s.anchor,f=s.head,p=a instanceof Mt;if(l&&f&&!p){for(var k=Nr.create(l),T=k.getRectOffsets(l,f),x=T.startRowIdx,E=T.startColIdx,P=T.endRowIdx,F=T.endColIdx,z=x;z<=P;z+=1)for(var Y=E;Y<=F;Y+=1)if(!k.extendedRowspan(z,Y)&&!k.extendedColspan(z,Y)){var Z=k.getNodeAndPos(z,Y),oe=Z.node,le=Z.pos,re=Kl(1,z,i,oe.attrs);o.replaceWith(o.mapping.map(le),o.mapping.map(le+oe.nodeSize),re)}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=Di(s,function(T){var x=T.type;return x.name==="tableHeadCell"||x.name==="tableBodyCell"});if(l){var f=Di(s,function(T){var x=T.type;return x.name==="paragraph"});if(f){var p=ii(i).anchor,k=Nr.create(p);return n(od(a,k,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}(Wt),wKe=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:we({rawHTML:{default:null}},Er()),parseDOM:[Wu("thead")],toDOM:function(t){var n=t.attrs;return["thead",pr(n),0]}}},enumerable:!1,configurable:!0}),e}(Wt),CKe=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:we({rawHTML:{default:null}},Er()),parseDOM:[{tag:"tbody",getAttrs:function(t){var n=t.querySelectorAll("tr"),i=n[0].children.length,a=t.getAttribute("data-raw-html");return i?we({},a&&{rawHTML:a}):!1}}],toDOM:function(t){var n=t.attrs;return["tbody",pr(n),0]}}},enumerable:!1,configurable:!0}),e}(Wt),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"tableRow"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"(tableHeadCell | tableBodyCell)*",attrs:we({rawHTML:{default:null}},Er()),parseDOM:[{tag:"tr",getAttrs:function(t){var n=t.children.length,i=t.getAttribute("data-raw-html");return n?we({},i&&{rawHTML:i}):!1}}],toDOM:function(t){var n=t.attrs;return["tr",pr(n),0]}}},enumerable:!1,configurable:!0}),e}(Wt),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"tableHeadCell"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{content:"paragraph+",attrs:we({align:{default:null},className:{default:null},rawHTML:{default:null},colspan:{default:null},extended:{default:null}},Er()),isolating:!0,parseDOM:[Fw("th")],toDOM:function(t){var n=t.attrs,i=Bw(n);return["th",we(we({},i),pr(n)),0]}}},enumerable:!1,configurable:!0}),e}(Wt),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"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:[Fw("td")],toDOM:function(t){var n=t.attrs,i=Bw(n);return["td",i,0]}}},enumerable:!1,configurable:!0}),e}(Wt),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"image"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{inline:!0,attrs:we({imageUrl:{default:""},altText:{default:null},rawHTML:{default:null}},Er()),group:"inline",selectable:!1,parseDOM:[{tag:"img[src]",getAttrs:function(t){var n=Qa(t,{RETURN_DOM_FRAGMENT:!0}).firstChild,i=n.getAttribute("src")||"",a=n.getAttribute("data-raw-html"),o=n.getAttribute("alt");return we({imageUrl:i,altText:o},a&&{rawHTML:a})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"img",we(we({src:Ao(n.imageUrl)},n.altText&&{alt:n.altText}),pr(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(we({imageUrl:l},f&&{altText:f}));return i(o.replaceSelectionWith(p).scrollIntoView()),!0}}},e.prototype.commands=function(){return{addImage:this.addImage()}},e}(Wt),Bg=1,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"thematicBreak"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:we({rawHTML:{default:null}},Er()),group:"block",parseDOM:[{tag:"hr"}],selectable:!1,toDOM:function(t){var n=t.attrs;return["div",pr(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,k=p.thematicBreak,T=p.paragraph,x=[k.create()],E=s.node(Bg),P=f.child(f.childCount-1)===E,F=f.resolve(s.after(Bg)),z=((a=s.nodeAfter)===null||a===void 0?void 0:a.type.name)===t.name;return(P||z)&&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}(Wt),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"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 we({},a&&{rawHTML:a})}}});return{attrs:we({rawHTML:{default:null}},Er()),parseDOM:t,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"strong",pr(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}(Gt),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"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 we({},a&&{rawHTML:a})}}});return{attrs:we({rawHTML:{default:null}},Er()),parseDOM:t,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"em",pr(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}(Gt),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"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 we({},a&&{rawHTML:a})}}});return{attrs:we({rawHTML:{default:null}},Er()),parseDOM:t,toDOM:function(n){var i=n.attrs;return[i.rawHTML||"del",pr(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}(Gt),DKe=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:we({linkUrl:{default:""},title:{default:null},rawHTML:{default:null}},Er()),inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:function(n){var i=Qa(n,{RETURN_DOM_FRAGMENT:!0}).firstChild,a=i.getAttribute("href")||"",o=i.getAttribute("title")||"",s=i.getAttribute("data-raw-html");return we({linkUrl:a,title:o},s&&{rawHTML:s})}}],toDOM:function(n){var i=n.attrs;return[i.rawHTML||"a",we(we({href:Ao(i.linkUrl)},t.linkAttributes),pr(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,k=n.selection,T=k.empty,x=k.from,E=k.to;if(x&&E&&o){var P={linkUrl:o},F=f.mark("link",P);if(T&&l){var z=Rr(f,l,F);p.replaceRangeWith(x,E,z)}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}(Gt),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"code"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return{attrs:we({rawHTML:{default:null}},Er()),parseDOM:[{tag:"code",getAttrs:function(t){var n=t.getAttribute("data-raw-html");return we({},n&&{rawHTML:n})}}],toDOM:function(t){var n=t.attrs;return[n.rawHTML||"code",pr(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}(Gt),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"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!=null&&t.info?gh(n.schema.nodes.customBlock,t)(n,i):!1}}},e}(Wt),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"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"?mh(t,n):!1}}},e.prototype.keymaps=function(){return{Enter:this.commands()()}},e}(Wt),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"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"?mh(t,n):!1}}},e.prototype.keymaps=function(){return{Enter:this.commands()()}},e}(Wt);function BKe(r){return new _k([new JGe,new YGe,new ZGe,new QGe,new eKe,new tKe,new rKe,new nKe,new iKe,new kKe,new wKe,new CKe,new TKe,new SKe,new xKe,new EKe,new MKe,new AKe,new OKe,new NKe,new DKe(r),new LKe,new RKe,new IKe,new qk,new PKe])}var FKe=Je("contents"),qKe=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,k=p===void 0?!0:p,T=n.wwPlugins,x=T===void 0?[]:T,E=n.wwNodeViews,P=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=P,i.specs=i.createSpecs(),i.schema=i.createSchema(s),i.context=i.createContext(),i.keymaps=i.createKeymaps(k),i.view=i.createView(),i.commands=i.createCommands(),i.specs.setContext(we(we({},i.context),{view:i.view})),i.initEvent(),i}return e.prototype.createSpecs=function(){return BKe(this.linkAttributes)},e.prototype.createContext=function(){return{schema:this.schema,eventEmitter:this.eventEmitter}},e.prototype.createSchema=function(t){return new ub({nodes:we(we({},this.specs.nodes),t.nodes),marks:we(we({},this.specs.marks),t.marks)})},e.prototype.createPlugins=function(){return dn([Qje(),nGe(this.eventEmitter),iGe(),fGe(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 hh(this.el,{state:this.createState(),attributes:{class:FKe},nodeViews:we({customBlock:function(o,s,l){return new dGe(o,s,l,i)},image:function(o,s,l){return new hGe(o,s,l,a)},codeBlock:function(o,s,l){return new mGe(o,s,l,a)},widget:Fk},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:LGe,transformPasted:function(o){return FGe(o,t.schema,Tu(t.view.state.selection.$from))},handlePaste:function(o,s,l){return jGe(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==null?void 0:l.items;if(f){var p=di(f).some(function(T){return T.kind==="string"&&T.type==="text/rtf"});if(!p){var k=Bk(f);k&&(s.preventDefault(),Rh(t.eventEmitter,k,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,Wh())},e.prototype.getHTML=function(){return Lh(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(`
|
|
67
|
-
`),f=l.map(function(T){return hu(o,Va(T,o))}),p=new Ue(Oe.from(f),1,1),k=Oi(n)&&Oi(i)?s.replaceRange(n,i,p):s.replaceSelection(p);this.view.dispatch(k),this.focus()},e.prototype.deleteSelection=function(t,n){var i=this.view.state.tr,a=Oi(t)&&Oi(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 Oi(t)&&Oi(n)&&(s=t,l=n),a.textBetween(s,l,`
|
|
68
|
-
`)},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=jt(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=Va(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(),k=l.type.name;if(s.length||k==="paragraph"){var T=s[s.length-1],x=function(E){return E.length?Ir(E,T):!0};k=T?T.type.name:"text",l.forEach(function(E,P){var F=E.isText,z=E.nodeSize,Y=E.marks,Z=o.pos-f;F&&P<=Z&&P+z>=Z&&x(Y)&&(f=f+P,p=f+z)})}return{range:[f,p],type:k}},e}(Hk),HKe=Jn,_Ke=uu;function zKe(r){return!HKe(r)&&!_Ke(r)}var VKe=zKe,UKe=VKe;function $Ke(r){return UKe(r)&&r!==!1}var WKe=$Ke,jKe=WKe;function GKe(r){return!jKe(r)}var KKe=GKe,Fg=["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"],e0=function(){function r(){var e=this;this.events=new Ww,this.eventTypes=Fg.reduce(function(t,n){return we(we({},t),{type:n})},{}),this.hold=!1,Fg.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);Jn(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,dn([t],n));KKe(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!Jn(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}(),JKe=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 Yl(r){return r[r.length-1]===`
|
|
69
|
-
`?r.slice(0,r.length-1):r}function Kd(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 Jd(r){var e=r.type;return Ir(["text","strong","emph","strike","image","link","code"],e)}function qg(r){return(r==null?void 0:r.type)==="softbreak"}function fs(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 Ir(["ul","ol","li"],o.toLowerCase())}return!1}function YKe(r){var e=r.literal,t=/data-task/.test(e),n=/data-task-checked/.test(e);return{task:t,checked:n}}function Hg(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var n=document.createElement("div");n.innerHTML=Qa(r);var i=n.firstChild;return e.map(function(a){return i.getAttribute(a)||""})}function XKe(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 ZKe={"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=Hg(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=Hg(n,"src","alt"),a=i[0],o=i[1],s=r.schema.nodes.image;r.addNode(s,we({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==null?void 0:n.type)==="paragraph"?(qg(i)&&r.openNode(t),qg(a)?r.closeNode():a&&(r.closeNode(),r.openNode(t))):(n==null?void 0:n.type)==="tableCell"&&(i&&(Jd(i)||Kd(r,i))&&r.closeNode(),a&&(Jd(a)||Kd(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(Yl(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&&!fs(e.prev)&&r.closeNode(),r.openNode(s,{rawHTML:t})):(r.closeNode(),e.next&&!fs(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=YKe(e);e.prev&&!fs(e.prev)&&r.closeNode(),r.openNode(a,we({rawHTML:t},s)),e.next&&!fs(e.next)&&r.openNode(o)}else e.prev&&!fs(e.prev)&&r.closeNode(),r.closeNode()}}},QKe=XKe(ZKe);function _g(r){return r.type==="htmlInline"&&Od.test(r.literal)}function t0(r){di(r.childNodes).forEach(function(e){if(qu(e)){var t=e.nodeName.toLowerCase();e.setAttribute("data-raw-html",t),e.childNodes&&t0(e)}})}var zg={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,we({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,we({language:a},t)),r.addText(Yl(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,we({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=we(we(we({},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,we(we({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=we({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&&!_g(t)&&r.closeNode(),n&&!_g(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&&(Jd(E)||Kd(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,k=f.parent,T=(k.columns[e.startIdx]||{}).align,x=we({},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(Yl(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(Yl(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=Qa(t);if(s!=null&&s.spec.attrs.htmlInline)if(i){var f=$d(l);r.openMark(s.create({htmlAttrs:f}))}else r.closeMark(s);else{var p=QKe[o];p&&p(r,e,i)}},htmlBlock:function(r,e){var t=e.literal,n=document.createElement("div"),i=Bne.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=Qa(t);if(f!=null&&f.spec.attrs.htmlBlock){var k=$d(p),T=Rw(e,l);r.addNode(f,{htmlAttrs:k,childrenHTML:T})}else n.innerHTML=p,t0(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=Sk(e);i(),r.addNode(l.nodes.widget,{info:o},[l.text(Ck(o,f))])}else{var p="$$";n&&(p+=s?o+" ":o),r.addText(p)}}};function e4e(r){var e=Object.keys(r),t=we({},zg),n=new Uh({gfm:!0,nodeId:!0,convertors:r}),i=n.getConvertors();return e.forEach(function(a){var o=zg[a];o&&!Ir(["htmlBlock","htmlInline"],a)&&(t[a]=function(s,l,f){f.origin=function(){return i[a](l,f,i)};var p=r[a](l,f),k;if(p){var T=Array.isArray(p)?p[0]:p,x=T.attributes,E=T.classNames;k={htmlAttrs:x,classNames:E}}o(s,l,f,k)})}),t}function t4e(r,e){return r.isText&&e.isText&&Pt.sameSet(r.marks,e.marks)?r.withText(r.text+e.text):!1}var r4e=function(){function r(e,t){this.schema=e,this.convertors=t,this.stack=[{type:this.schema.topNodeType,attrs:null,content:[]}],this.marks=Pt.none}return r.prototype.top=function(){return Vr(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=Vr(t),i=this.schema.text(e,this.marks),a=n&&t4e(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=Pt.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=$a.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 k={entering:l,leaf:!mne(s),getChildrenText:gne,options:{gfm:!0,nodeId:!1,tagFilter:!1,softbreak:`
|
|
70
|
-
`},skipChildren:function(){p=!0}};if(o.closeUnmatchedHTMLInline(s,l),f(o,s,k),(t==null?void 0:t.node)===s){var T=o.stack.reduce(function(x,E){return x+E.content.reduce(function(P,F){return P+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 n4e(r,e,t){var n=t[0],i=t[1];r.write(n),r.convertInline(e),r.write(i)}function i4e(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==null?void 0:i.type.name)==="doc"&&(r.closeBlock(n),r.stopNewline=!1)}function a4e(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+cu("-",Math.max(t,3))+i}var Yd={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(fu(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",k=t.childCount===0;if(k&&l)r.write(`<br>
|
|
71
|
-
`);else if(k&&!l&&!o){if((n==null?void 0:n.type.name)==="listItem"){var T=r.getDelim();r.setDelim(""),r.write("<br>"),r.setDelim(T)}r.write(`
|
|
72
|
-
`)}else r.convertInline(t),p?r.write(`
|
|
73
|
-
`):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==null?void 0: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,cu(" ",4),function(){return i+" "})},orderedList:function(r,e){var t=e.node,n=t.attrs.order||1;r.convertList(t,cu(" ",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=a4e(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 o4e(r,e){var t=e.state,n=e.nodeInfo,i=e.params,a=i.rawHTML;a?Ka(r,["heading","codeBlock"])>-1?n4e(t,n.node,a):Ka(r,["image","thematicBreak"])>-1?t.write(a):i4e(t,n,a):Yd[r](t,n,i)}function Vg(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 Un(r){return r?["<"+r+">","</"+r+">"]:null}function ds(r){return r?"<"+r+">":null}function hs(r){return r?"</"+r+">":null}var ps={heading:function(r){var e=r.node,t=e.attrs,n=t.level,i=cu("#",n);return t.headingType==="setext"&&(i=n===1?"===":"---"),{delim:i,rawHTML:Un(t.rawHTML)}},codeBlock:function(r){var e=r.node,t=e,n=t.attrs,i=t.textContent;return{delim:["```"+(n.language||""),"```"],rawHTML:Un(n.rawHTML),text:i}},blockQuote:function(r){var e=r.node;return{delim:"> ",rawHTML:Un(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:Un(i)}},orderedList:function(r,e){var t=r.node,n=e.inTable,i=t.attrs.rawHTML;return n&&(i=i||"ol"),{rawHTML:Un(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:Un(e.attrs.rawHTML)}},tableHead:function(r){var e=r.node;return{rawHTML:Un(e.attrs.rawHTML)}},tableBody:function(r){var e=r.node;return{rawHTML:Un(e.attrs.rawHTML)}},tableRow:function(r){var e=r.node;return{rawHTML:Un(e.attrs.rawHTML)}},tableHeadCell:function(r){var e=r.node;return{rawHTML:Un(e.attrs.rawHTML)}},tableBodyCell:function(r){var e=r.node;return{rawHTML:Un(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="'+Ao(i)+'"':"";return{rawHTML:n?"<"+n+' src="'+Ao(a)+'"'+o+">":null,attrs:{altText:fu(i||""),imageUrl:a}}},thematicBreak:function(r){var e=r.node;return{delim:"***",rawHTML:ds(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?ds(i):hs(i)}},emph:function(r,e){var t=r.node,n=e.entering,i=t.attrs.rawHTML;return{delim:"*",rawHTML:n?ds(i):hs(i)}},strike:function(r,e){var t=r.node,n=e.entering,i=t.attrs.rawHTML;return{delim:"~~",rawHTML:n?ds(i):hs(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="'+Ao(a)+'"':"";return n?{delim:"[",rawHTML:o?"<"+o+' href="'+Ao(s)+'"'+l+">":null}:{delim:"]("+s+(a?" "+ane(fu(a)):"")+")",rawHTML:hs(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?Vg(n.child(a),-1):Vg(n.child(a-1),1),l=o?ds(t.attrs.rawHTML):hs(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}}},Ug={strong:{mixable:!0,removedEnclosingWhitespace:!0},emph:{mixable:!0,removedEnclosingWhitespace:!0},strike:{mixable:!0,removedEnclosingWhitespace:!0},code:{escape:!1},link:null,html:null};function s4e(r){var e={},t=Object.keys(Yd);return t.forEach(function(n){e[n]=function(i,a){var o=Yd[n];if(o){var s=r[n],l=s?s(a,{inTable:i.inTable}):{};o4e(n,{state:i,nodeInfo:a,params:l})}}}),e}function l4e(r){var e={},t=Object.keys(Ug);return t.forEach(function(n){e[n]=function(i,a){var o=Ug[n],s=r[n],l=s&&i&&!Jn(a),f=l?s(i,{entering:a}):{};return we(we({},f),o)}}),e}function u4e(r){var e=Object.keys(r);e.forEach(function(i){var a=ps[i],o=r[i];a?ps[i]=function(s,l){return l.origin=function(){return a(s,l)},o(s,l)}:ps[i]=o,delete r[i]});var t=s4e(ps),n=l4e(ps);return{nodeTypeConvertors:t,markTypeConvertors:n}}var c4e=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+=`
|
|
74
|
-
`),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+`
|
|
75
|
-
`}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+=`
|
|
76
|
-
`)},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(`
|
|
77
|
-
`),i=0;i<n.length;i+=1)this.write(),this.result+=t?ine(n[i]):n[i],i!==n.length-1&&(this.result+=`
|
|
78
|
-
`)},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 k=o&&o.isText&&f.some(function(Re){var Ze=t.getMarkConvertor(Re),Be=Ze&&Ze();return Be&&Be.removedEnclosingWhitespace});if(k&&o&&o.text){var T=/^(\s*)(.*?)(\s*)$/m.exec(o.text),x=T[1],E=T[2],P=T[3];p+=x,i=P,(x||P)&&(o=E?o.withText(E):null,o||(f=n))}for(var F=f.length&&Vr(f),z=F&&t.getMarkConvertor(F),Y=z&&z(),Z=Y&&Y.escape===!1,oe=f.length-(Z?1:0),le=0;le<oe;le+=1){var E=f[le];if(Y&&!Y.mixable)break;for(var re=0;re<n.length;re+=1){var he=n[re];if(Y&&!Y.mixable)break;if(E.eq(he)){le>re?f=f.slice(0,re).concat(E).concat(f.slice(re,le)).concat(f.slice(le+1,oe)):re>le&&(f=f.slice(0,le).concat(f.slice(le+1,re)).concat(E).concat(f.slice(re,oe)));break}}}for(var ge=0;ge<Math.min(n.length,oe)&&f[ge].eq(n[ge]);)ge+=1;for(;ge<n.length;){var ye=n.pop();ye&&t.text(t.markText(ye,!1,e,l),!1)}if(p&&t.text(p),o){for(;n.length<oe;){var E=f[n.length];n.push(E),t.text(t.markText(E,!0,e,l),!1)}Z&&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(Ir(["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==null?void 0:t.node)===i){var s=n.result.split(`
|
|
79
|
-
`);t.setMappedPos([s.length,Vr(s).length+1])}}),this.result},r}(),f4e=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=e4e(n),this.toMdConvertors=u4e(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 r4e(this.schema,this.toWwConvertors);return t.convertNode(e,this.getInfoForPosSync())},r.prototype.toMarkdownText=function(e){var t=new c4e(this.toMdConvertors),n=t.convertNode(e,this.getInfoForPosSync());return n=this.eventEmitter.emitReduce("beforeConvertWysiwygToMarkdown",n),n},r}();function d4e(r){var e=r.plugin,t=r.eventEmitter,n=r.usageStatistics,i=r.instance,a={Plugin:hn,PluginKey:Bs,Selection:Tt,TextSelection:Mt},o={Decoration:cn,DecorationSet:sr},s={Fragment:Oe},l={InputRule:fa,inputRules:pk,undoInputRule:Qte},f={keymap:Rs},p={eventEmitter:t,usageStatistics:n,instance:i,pmState:a,pmView:o,pmModel:s,pmRules:l,pmKeymap:f,i18n:pt};if(Yo(e)){var k=e[0],T=e[1],x=T===void 0?{}:T;return k(p,x)}return e(p)}function r0(r){var e=r.plugins,t=r.eventEmitter,n=r.usageStatistics,i=r.instance;return t.listen("mixinTableOffsetMapPrototype",$je),(e??[]).reduce(function(a,o){var s=d4e({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,k=s.markdownPlugins,T=s.wysiwygPlugins,x=s.wysiwygNodeViews,E=s.markdownCommands,P=s.wysiwygCommands,F=s.toolbarItems;return f&&(a.toHTMLRenderers=du(a.toHTMLRenderers,f)),p&&(a.toMarkdownRenderers=du(a.toMarkdownRenderers,p)),k&&(a.mdPlugins=a.mdPlugins.concat(k)),T&&(a.wwPlugins=a.wwPlugins.concat(T)),x&&(a.wwNodeViews=we(we({},a.wwNodeViews),x)),E&&(a.mdCommands=we(we({},a.mdCommands),E)),P&&(a.wwCommands=we(we({},a.wwCommands),P)),F&&(a.toolbarItems=a.toolbarItems.concat(F)),l&&(a.markdownParsers=we(we({},a.markdownParsers),l)),a},{toHTMLRenderers:{},toMarkdownRenderers:{},mdPlugins:[],wwPlugins:[],wwNodeViews:{},mdCommands:{},wwCommands:{},toolbarItems:[],markdownParsers:{}})}var h4e="data-task",p4e="data-task-disabled",v4e="checked";function m4e(r){["htmlBlock","htmlInline"].forEach(function(e){r[e]&&Object.keys(r[e]).forEach(function(t){return Lw(t)})})}var n0=function(){function r(e){var t=this;this.options=bh({linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,usageStatistics:!0,theme:"light"},e),this.eventEmitter=new e0;var n=bk(this.options.linkAttributes),i=r0({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,k=s.frontMatter,T=s.customHTMLSanitizer,x={linkAttributes:n,customHTMLRenderer:we(we({},a),l),extendedAutolinks:f,referenceDefinition:p,frontMatter:k,sanitizer:T||Qa};m4e(x.customHTMLRenderer),this.options.events&&qo(this.options.events,function(Z,oe){t.on(oe,Z)});var E=this.options,P=E.el,F=E.initialValue,z=E.theme,Y=P.innerHTML;z!=="light"&&P.classList.add(Je(z)),P.innerHTML="",this.toastMark=new Aw("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:f,referenceDefinition:p,disallowDeepHeading:!0,frontMatter:k,customParser:o}),this.preview=new Pw(this.eventEmitter,we(we({},x),{isViewer:!0})),Yk(this.preview.previewContent,"mousedown",this.toggleTask.bind(this)),F?this.setMarkdown(F):Y&&this.preview.setHTML(Y),P.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(p4e)&&t.hasAttribute(h4e)&&Ah(n,e.offsetX,e.offsetY)&&(Oh(t,v4e),this.eventEmitter.emit("change",{source:"viewer",date:e}))},r.prototype.setMarkdown=function(e){var t=this.toastMark.getLineTexts(),n=t.length,i=Vr(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(){Jk(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 Xl(r){return r instanceof ra}function i0(r){var e=["document","blockQuote","bulletList","orderedList","listItem","paragraph","heading","emph","strong","strike","link","image","table","tableHead","tableBody","tableRow","tableHeadCell","tableBodyCell"];return Ir(e,r)}function g4e(r){var e=r.attrs,t=r.type,n=t.name,i={type:n,wysiwygNode:!0,literal:!i0(n)&&Xl(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=we(we({},i),o),l=r.attrs,f=l.htmlAttrs,p=l.childrenHTML;return f?we(we({},s),{attrs:f,childrenHTML:p}):s}var y4e={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=we(we({},s),a)),Dh(s,o),e.push(o)},closeTag:function(r,e){if(e.length>1){var t=e.pop();Vr(e).appendChild(t)}},html:function(r,e){Vr(e).insertAdjacentHTML("beforeend",r.content)},text:function(r,e){var t=document.createTextNode(r.content);Vr(e).appendChild(t)}},b4e=function(){function r(e,t){var n=$h(e,t),i=we(we({},t.htmlBlock),t.htmlInline);this.customConvertorKeys=Object.keys(t).concat(Object.keys(i)),this.renderer=new Uh({gfm:!0,convertors:we(we({},n),i)}),this.convertors=this.renderer.getConvertors()}return r.prototype.generateTokens=function(e){var t=g4e(e),n={entering:!0,leaf:Xl(e)?e.isLeaf:!1,options:this.renderer.getOptions(),getChildrenText:function(){return Xl(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(i0(e.type.name)||e.attrs.htmlInline)&&(n.entering=!1,o.push({type:"text",content:Xl(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 y4e[i.type](i,n)}),n[0]},r.prototype.getToDOMNode=function(e){return Ir(this.customConvertorKeys,e)?this.toDOMNode.bind(this):null},r}(),k4e=100,w4e=15,_l=null,sd=null;function $g(r,e){var t=e.syncScrollTop,n=e.releaseEventBlock;sd&&clearTimeout(sd),t(r),sd=setTimeout(function(){n()},w4e)}function C4e(r,e,t){var n=e-r,i=Date.now(),a=function(){var o=Date.now(),s=(o-i)/k4e,l;_l&&clearTimeout(_l),s<1?(l=r+n*Math.cos((1-s)*Math.PI/2),$g(Math.ceil(l),t),_l=setTimeout(a,1)):($g(e,t),_l=null)};a()}var T4e=18,S4e=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=nd(this.previewRoot,t).el,a=Cu(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,k=this.getMdNodeAtPos(p,f);if(!(!k||une(k))){var T=i.scrollTop,x=n.dom,E=x.scrollTop,P=x.scrollHeight,F=x.clientHeight,z=x.children,Y=P-E<=F+T4e,Z=Y?i.scrollHeight:0;if(E&&!Y){if(e){var oe=this.getScrollTopByCaretPos();if(!oe)return;Z=oe}else{var le=nd(this.previewRoot,k),re=le.el,he=le.mdNode,ge=Og(p,he,z),ye=ge.height,Re=ge.rect,Ze=Cu(re,a)||re.offsetTop,Be=re.clientHeight,mt=l>Re.top?Math.min((l-Re.top)/ye,1):0;Z=Ze+Be*mt}Z=this.getResolvedScrollTop("editor",E,Z,T),this.latestEditorScrollTop=E}Z!==T&&this.run("editor",Z,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,k=o.scrollHeight,T=k-f<=p,x=s.scrollTop,E=T?s.scrollHeight:0;if(f&&e&&!T){if(e=kje(e,a),!e.getAttribute("data-nodeid"))return;var P=s.children,F=Number(e.getAttribute("data-nodeid")),z=nd(this.previewRoot,n.findNodeById(F)),Y=z.mdNode,Z=z.el,oe=zs(Y);E=P[oe-1].offsetTop;var le=Og(l.doc,Y,P).height,re=Aje(Z,a,F),he=re.nodeHeight,ge=re.offsetTop;E+=Cje(f,ge,he,le),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}};C4e(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}(),x4e={getPopupInitialValues:function(r,e){var t=e.popupName;return t==="link"?{linkText:r.getSelectedText()}:{}}};function E4e(r){r.eventEmitter.listen("query",function(e,t){return x4e[e](r,t)})}var a0=function(){function r(e){var t=this;this.initialHTML=e.el.innerHTML,e.el.innerHTML="",this.options=bh({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,k=n.widgetRules,T=n.customHTMLSanitizer;this.mode=p||"markdown",this.mdPreviewStyle=this.options.previewStyle,this.i18n=pt,this.i18n.setCode(this.options.language),this.eventEmitter=new e0,bne(k);var x=bk(this.options.linkAttributes);this.pluginInfo=r0({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this});var E=this.pluginInfo,P=E.toHTMLRenderers,F=E.toMarkdownRenderers,z=E.mdPlugins,Y=E.wwPlugins,Z=E.wwNodeViews,oe=E.mdCommands,le=E.wwCommands,re=E.markdownParsers,he={linkAttributes:x,customHTMLRenderer:du(P,i),extendedAutolinks:a,referenceDefinition:o,frontMatter:s,sanitizer:T||Qa},ge=new b4e(x,he.customHTMLRenderer),ye=hje(he.customHTMLRenderer,he.sanitizer,ge);this.toastMark=new Aw("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:a,referenceDefinition:o,disallowDeepHeading:!0,frontMatter:s,customParser:re}),this.mdEditor=new wae(this.eventEmitter,{toastMark:this.toastMark,useCommandShortcut:f,mdPlugins:z}),this.preview=new Pw(this.eventEmitter,we(we({},he),{isViewer:!1,highlight:this.options.previewHighlight})),this.wwEditor=new qKe(this.eventEmitter,{toDOMAdaptor:ge,useCommandShortcut:f,htmlSchemaMap:ye,linkAttributes:x,wwPlugins:Y,wwNodeViews:Z}),this.convertor=new f4e(this.wwEditor.getSchema(),we(we({},F),l),$h(x,he.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 JKe(this.eventEmitter,this.mdEditor.commands,this.wwEditor.commands,function(){return t.mode}),this.options.usageStatistics&&ene(),this.scrollSync=new S4e(this.mdEditor,this.preview,this.eventEmitter),this.addInitEvent(),this.addInitCommand(oe,le),E4e(this),this.options.hooks&&qo(this.options.hooks,function(Re,Ze){return t.addHook(Ze,Re)}),this.options.events&&qo(this.options.events,function(Re,Ze){return t.on(Ze,Re)}),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)}}),Wne(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 n0(e):new r(e)},r.setLanguage=function(e,t){pt.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=Vne(e);var i=$a.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=Lh(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;Bi(e)&&(e==="auto"?si(t,"auto-height"):Wn(t,"auto-height"),this.setMinHeight(this.getMinHeight())),fi(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("."+Je("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()&&Oi(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=Wl(o,e,t),f=i[0],p=i[1]):n==="wysiwyg"&&s&&l&&(a=Ra(o,e,t),f=a[0],p=a[1]),[f,p]},r}();function M4e(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]=xh(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===`
|
|
80
|
-
`||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 A4e(r){return typeof r=="boolean"||r instanceof Boolean}var O4e=A4e,N4e=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}(),Gn=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 N4e(this)},r.removalNodes=[],r}();function D4e(r){return new Gn("TEXT_NODE",{nodeValue:r},[])}function Wg(r,e){var t=r;O4e(r)||r==null?t=null:(Bi(r)||Oi(r))&&(t=D4e(String(r))),t&&e.push(t)}function L4e(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){Wg(o,i)}):Wg(a,i)}),new Gn(r,e||{},i)}var Dt=M4e.bind(L4e);function R4e(r){return r===Object(r)}var I4e=R4e;function P4e(r){var e;return r.type==="TEXT_NODE"?e=document.createTextNode(r.props.nodeValue):(e=document.createElement(r.type),s0(e,{},r.props)),e}function o0(r,e){r.node?e.removeChild(r.node):o0(r.firstChild,e)}function B4e(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]&&!Fne(r)&&r.removeAttribute(n)}),s0(r,e,t,function(n){return!wh(e[n],t[n])})}var F4e=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function s0(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"&&I4e(t[i])?q4e(r,e[i],t[i]):i!=="children"&&(t[i]===!1?r.removeAttribute(i):r.setAttribute(i,t[i]))})}function q4e(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]=Oi(i)&&!F4e.test(n)?i+"px":i})}function Gh(r){if(Gn.removalNodes.forEach(function(a){return Gg(a)}),r){for(var e=void 0,t=r.walker();e=t.walk();)if(r=e.vnode,e.entering)Gg(r);else if(Hn(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 jg(r){for(var e=r.parent;!e.node;)e=e.parent;return e.node}function Gg(r){if(!(!r||!r.parent)){if(r.node){var e=jg(r);r.effect==="A"?e.appendChild(r.node):r.effect==="U"&&B4e(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(Hn(r.type)){var i=r.component;i.beforeDestroy&&i.beforeDestroy()}else{var e=jg(r);o0(r,e)}}r.ref&&(r.component?r.ref(r.component):r.node&&r.ref(r.node))}}function H4e(r,e){var t=e.props,n=e.component;return n?(n.prevProps=n.props,n.props=e.props,n):new r(t)}function l0(r){for(var e=r;r&&!r.skip;){if(Hn(r.type)){var t=H4e(r.type,r);t.vnode=r,r.component=t,r.props.children=r.children=[t.render()],Kg(r)}else r.node||(r.node=P4e(r)),Kg(r);if(r.firstChild)r=r.firstChild;else{for(;r&&r.parent&&!r.next&&(r=r.parent,r!==e););r=r.next}}}function _4e(r,e){return r&&e&&e.type===r.type&&(!e.key||e.key===r.key)}function Kg(r){var e=r.children,t=r.old?r.old.firstChild:null,n=null;e.forEach(function(a,o){var s=_4e(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&&(Gn.removalNodes.push(t),t.effect="D"),t&&(t=t.next),o===0?r.firstChild=a:a&&(n.next=a),n=a});var i=Vr(e);if(!e.length)for(;t;)Gn.removalNodes.push(t),t.effect="D",t=t.next;for(;t&&i;)t&&i.old!==t&&(Gn.removalNodes.push(t),t.effect="D",t=t.next)}function z4e(r){r.effect="D",Gn.removalNodes=[r],Gh(),Gn.removalNodes=[]}function V4e(r){var e=r.vnode;e.effect="U",e.old=e,e.next&&(e.next.skip=!0),Gn.removalNodes=[],l0(e),Gh(e),e.next&&(e.next.skip=!1)}function U4e(r,e){var t=new Gn(r.tagName.toLowerCase(),{},[e]);return t.node=r,Gn.removalNodes=[],l0(t),Gh(t),function(){return z4e(t.firstChild)}}var $r=function(){function r(e){this.props=e,this.state={},this.refs={}}return r.prototype.setState=function(e){var t=we(we({},this.state),e);wh(this.state,t)||(this.state=t,V4e(this))},r}(),$4e=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 Dt(Jg||(Jg=Nt([`
|
|
81
|
-
<div class="`,'" style="display: ',`">
|
|
82
|
-
<div
|
|
83
|
-
class="tab-item`,`"
|
|
84
|
-
onClick=`,`
|
|
85
|
-
>
|
|
86
|
-
`,`
|
|
87
|
-
</div>
|
|
88
|
-
<div
|
|
89
|
-
class="tab-item`,`"
|
|
90
|
-
onClick=`,`
|
|
91
|
-
>
|
|
92
|
-
`,`
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
`],[`
|
|
96
|
-
<div class="`,'" style="display: ',`">
|
|
97
|
-
<div
|
|
98
|
-
class="tab-item`,`"
|
|
99
|
-
onClick=`,`
|
|
100
|
-
>
|
|
101
|
-
`,`
|
|
102
|
-
</div>
|
|
103
|
-
<div
|
|
104
|
-
class="tab-item`,`"
|
|
105
|
-
onClick=`,`
|
|
106
|
-
>
|
|
107
|
-
`,`
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
`])),Je("mode-switch"),this.state.hide?"none":"block",n==="markdown"?" active":"",function(){i.emit("needChangeMode","markdown")},pt.get("Markdown"),n==="wysiwyg"?" active":"",function(){i.emit("needChangeMode","wysiwyg")},pt.get("WYSIWYG"))},e}($r),Jg;function W4e(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 j4e=W4e,G4e=j4e;function K4e(r,e){var t,n=!0,i=function(p){r.apply(null,p),t=null},a,o,s;e=e||0,a=G4e(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 J4e=K4e,u0=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}()}(),Xd=typeof window<"u"&&typeof document<"u"&&window.document===document,Su=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")()}(),Y4e=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Su):function(r){return setTimeout(function(){return r(Date.now())},1e3/60)}}(),X4e=2;function Z4e(r,e){var t=!1,n=!1,i=0;function a(){t&&(t=!1,r()),n&&s()}function o(){Y4e(a)}function s(){var l=Date.now();if(t){if(l-i<X4e)return;n=!0}else t=!0,n=!1,setTimeout(o,e);i=l}return s}var Q4e=20,eJe=["top","right","bottom","left","width","height","size","weight"],tJe=typeof MutationObserver<"u",rJe=function(){function r(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Z4e(this.refresh.bind(this),Q4e)}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(){!Xd||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),tJe?(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(){!Xd||!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=eJe.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}(),c0=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||Su},f0=ju(0,0,0,0);function xu(r){return parseFloat(r)||0}function Yg(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+xu(a)},0)}function nJe(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]=xu(o)}return t}function iJe(r){var e=r.getBBox();return ju(0,0,e.width,e.height)}function aJe(r){var e=r.clientWidth,t=r.clientHeight;if(!e&&!t)return f0;var n=Go(r).getComputedStyle(r),i=nJe(n),a=i.left+i.right,o=i.top+i.bottom,s=xu(n.width),l=xu(n.height);if(n.boxSizing==="border-box"&&(Math.round(s+a)!==e&&(s-=Yg(n,"left","right")+a),Math.round(l+o)!==t&&(l-=Yg(n,"top","bottom")+o)),!sJe(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 ju(i.left,i.top,s,l)}var oJe=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 sJe(r){return r===Go(r).document.documentElement}function lJe(r){return Xd?oJe(r)?iJe(r):aJe(r):f0}function uJe(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 c0(o,{x:e,y:t,width:n,height:i,top:t,right:e+n,bottom:i+t,left:e}),o}function ju(r,e,t,n){return{x:r,y:e,width:t,height:n}}var cJe=function(){function r(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ju(0,0,0,0),this.target=e}return r.prototype.isActive=function(){var e=lJe(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}(),fJe=function(){function r(e,t){var n=uJe(t);c0(this,{target:e,contentRect:n})}return r}(),dJe=function(){function r(e,t,n){if(this.activeObservations_=[],this.observations_=new u0,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 cJe(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 fJe(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}(),d0=typeof WeakMap<"u"?new WeakMap:new u0,h0=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=rJe.getInstance(),n=new dJe(e,t,this);d0.set(this,n)}return r}();["observe","unobserve","disconnect"].forEach(function(r){h0.prototype[r]=function(){var e;return(e=d0.get(this))[r].apply(e,arguments)}});var hJe=function(){return typeof Su.ResizeObserver<"u"?Su.ResizeObserver:h0}(),pJe=function(r){Ge(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.execCommand=function(t){var n=li(t.target,"li");this.props.execCommand("heading",{level:Number(n.getAttribute("data-level"))})},e.prototype.render=function(){var t=this;return Dt(Zg||(Zg=Nt([`
|
|
111
|
-
<ul
|
|
112
|
-
onClick=`,`
|
|
113
|
-
aria-role="menu"
|
|
114
|
-
aria-label="`,`"
|
|
115
|
-
>
|
|
116
|
-
`,`
|
|
117
|
-
<li data-type="Paragraph" aria-role="menuitem">
|
|
118
|
-
<div>`,`</div>
|
|
119
|
-
</li>
|
|
120
|
-
</ul>
|
|
121
|
-
`],[`
|
|
122
|
-
<ul
|
|
123
|
-
onClick=`,`
|
|
124
|
-
aria-role="menu"
|
|
125
|
-
aria-label="`,`"
|
|
126
|
-
>
|
|
127
|
-
`,`
|
|
128
|
-
<li data-type="Paragraph" aria-role="menuitem">
|
|
129
|
-
<div>`,`</div>
|
|
130
|
-
</li>
|
|
131
|
-
</ul>
|
|
132
|
-
`])),function(n){return t.execCommand(n)},pt.get("Headings"),[1,2,3,4,5,6].map(function(n){return Dt(Xg||(Xg=Nt([`
|
|
133
|
-
<li data-level="`,`" data-type="Heading" aria-role="menuitem">
|
|
134
|
-
<`,">"," ",`</$>
|
|
135
|
-
</li>
|
|
136
|
-
`],[`
|
|
137
|
-
<li data-level="`,`" data-type="Heading" aria-role="menuitem">
|
|
138
|
-
<`,">"," ",`</$>
|
|
139
|
-
</li>
|
|
140
|
-
`])),n,"h"+n,pt.get("Heading"),n)}),pt.get("Paragraph"))},e}($r),Xg,Zg,p0=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 Dt(ey||(ey=Nt([`
|
|
141
|
-
<div class="`,`" aria-role="tabpanel">
|
|
142
|
-
`,`
|
|
143
|
-
</div>
|
|
144
|
-
`],[`
|
|
145
|
-
<div class="`,`" aria-role="tabpanel">
|
|
146
|
-
`,`
|
|
147
|
-
</div>
|
|
148
|
-
`])),Je("tabs"),this.props.tabs.map(function(n){var i=n.name,a=n.text,o=t.props.activeTab===i;return Dt(Qg||(Qg=Nt([`
|
|
149
|
-
<div
|
|
150
|
-
class="tab-item`,`"
|
|
151
|
-
onClick=`,`
|
|
152
|
-
aria-role="tab"
|
|
153
|
-
aria-label="`,`"
|
|
154
|
-
aria-selected="`,`"
|
|
155
|
-
tabindex="`,`"
|
|
156
|
-
>
|
|
157
|
-
`,`
|
|
158
|
-
</div>
|
|
159
|
-
`],[`
|
|
160
|
-
<div
|
|
161
|
-
class="tab-item`,`"
|
|
162
|
-
onClick=`,`
|
|
163
|
-
aria-role="tab"
|
|
164
|
-
aria-label="`,`"
|
|
165
|
-
aria-selected="`,`"
|
|
166
|
-
tabindex="`,`"
|
|
167
|
-
>
|
|
168
|
-
`,`
|
|
169
|
-
</div>
|
|
170
|
-
`])),o?" active":"",function(s){return t.toggleTab(s,i)},pt.get(a),o?"true":"false",o?"0":"-1",pt.get(a))}))},e}($r),Qg,ey,vJe="ui",mJe=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="",Wn(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!=null&&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!=null&&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,vJe)}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(Wn(t,"wrong"),!i.length){si(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 Dt(ty||(ty=Nt([`
|
|
171
|
-
<div aria-label="`,`">
|
|
172
|
-
<`," tabs="," activeTab="," onClick=",` />
|
|
173
|
-
<div style="display:`,`">
|
|
174
|
-
<label for="toastuiImageUrlInput">`,`</label>
|
|
175
|
-
<input
|
|
176
|
-
id="toastuiImageUrlInput"
|
|
177
|
-
type="text"
|
|
178
|
-
ref=`,`
|
|
179
|
-
/>
|
|
180
|
-
</div>
|
|
181
|
-
<div style="display:`,`;position: relative;">
|
|
182
|
-
<label for="toastuiImageFileInput">`,`</label>
|
|
183
|
-
<span
|
|
184
|
-
class="`,"",`"
|
|
185
|
-
onClick=`,`
|
|
186
|
-
onSelectstart=`,`
|
|
187
|
-
>
|
|
188
|
-
`,`
|
|
189
|
-
</span>
|
|
190
|
-
<button
|
|
191
|
-
type="button"
|
|
192
|
-
class="`,`"
|
|
193
|
-
onClick=`,`
|
|
194
|
-
>
|
|
195
|
-
`,`
|
|
196
|
-
</button>
|
|
197
|
-
<input
|
|
198
|
-
id="toastuiImageFileInput"
|
|
199
|
-
type="file"
|
|
200
|
-
accept="image/*"
|
|
201
|
-
onChange=`,`
|
|
202
|
-
ref=`,`
|
|
203
|
-
/>
|
|
204
|
-
</div>
|
|
205
|
-
<label for="toastuiAltTextInput">`,`</label>
|
|
206
|
-
<input
|
|
207
|
-
id="toastuiAltTextInput"
|
|
208
|
-
type="text"
|
|
209
|
-
ref=`,`
|
|
210
|
-
/>
|
|
211
|
-
<div class="`,`">
|
|
212
|
-
<button type="button" class="`,'" onClick=',`>
|
|
213
|
-
`,`
|
|
214
|
-
</button>
|
|
215
|
-
<button type="button" class="`,'" onClick=',`>
|
|
216
|
-
`,`
|
|
217
|
-
</button>
|
|
218
|
-
</div>
|
|
219
|
-
</div>
|
|
220
|
-
`],[`
|
|
221
|
-
<div aria-label="`,`">
|
|
222
|
-
<`," tabs="," activeTab="," onClick=",` />
|
|
223
|
-
<div style="display:`,`">
|
|
224
|
-
<label for="toastuiImageUrlInput">`,`</label>
|
|
225
|
-
<input
|
|
226
|
-
id="toastuiImageUrlInput"
|
|
227
|
-
type="text"
|
|
228
|
-
ref=`,`
|
|
229
|
-
/>
|
|
230
|
-
</div>
|
|
231
|
-
<div style="display:`,`;position: relative;">
|
|
232
|
-
<label for="toastuiImageFileInput">`,`</label>
|
|
233
|
-
<span
|
|
234
|
-
class="`,"",`"
|
|
235
|
-
onClick=`,`
|
|
236
|
-
onSelectstart=`,`
|
|
237
|
-
>
|
|
238
|
-
`,`
|
|
239
|
-
</span>
|
|
240
|
-
<button
|
|
241
|
-
type="button"
|
|
242
|
-
class="`,`"
|
|
243
|
-
onClick=`,`
|
|
244
|
-
>
|
|
245
|
-
`,`
|
|
246
|
-
</button>
|
|
247
|
-
<input
|
|
248
|
-
id="toastuiImageFileInput"
|
|
249
|
-
type="file"
|
|
250
|
-
accept="image/*"
|
|
251
|
-
onChange=`,`
|
|
252
|
-
ref=`,`
|
|
253
|
-
/>
|
|
254
|
-
</div>
|
|
255
|
-
<label for="toastuiAltTextInput">`,`</label>
|
|
256
|
-
<input
|
|
257
|
-
id="toastuiAltTextInput"
|
|
258
|
-
type="text"
|
|
259
|
-
ref=`,`
|
|
260
|
-
/>
|
|
261
|
-
<div class="`,`">
|
|
262
|
-
<button type="button" class="`,'" onClick=',`>
|
|
263
|
-
`,`
|
|
264
|
-
</button>
|
|
265
|
-
<button type="button" class="`,'" onClick=',`>
|
|
266
|
-
`,`
|
|
267
|
-
</button>
|
|
268
|
-
</div>
|
|
269
|
-
</div>
|
|
270
|
-
`])),pt.get("Insert image"),p0,this.tabs,i,this.toggleTab,i==="url"?"block":"none",pt.get("Image URL"),function(s){return t.refs.url=s},i==="file"?"block":"none",pt.get("Select image file"),Je("file-name"),a?" has-file":o,this.showFileSelectBox,this.preventSelectStart,a?a.name:pt.get("No file"),Je("file-select-button"),this.showFileSelectBox,pt.get("Choose a file"),this.changeFile,function(s){return t.refs.file=s},pt.get("Description"),function(s){return t.refs.altText=s},Je("button-container"),Je("close-button"),this.props.hidePopup,pt.get("Cancel"),Je("ok-button"),this.execCommand,pt.get("OK"))},e}($r),ty,gJe=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(Wn(n,"wrong"),Wn(i,"wrong"),n.value.length<1){si(n,"wrong");return}var a=Jn(t.props.initialValues.linkUrl);if(a&&i.value.length<1){si(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;Wn(a,"wrong"),Wn(o,"wrong","disabled"),o.removeAttribute("disabled"),n&&(si(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 Dt(ry||(ry=Nt([`
|
|
271
|
-
<div aria-label="`,`">
|
|
272
|
-
<label for="toastuiLinkUrlInput">`,`</label>
|
|
273
|
-
<input
|
|
274
|
-
id="toastuiLinkUrlInput"
|
|
275
|
-
type="text"
|
|
276
|
-
ref=`,`
|
|
277
|
-
/>
|
|
278
|
-
<label for="toastuiLinkTextInput">`,`</label>
|
|
279
|
-
<input
|
|
280
|
-
id="toastuiLinkTextInput"
|
|
281
|
-
type="text"
|
|
282
|
-
ref=`,`
|
|
283
|
-
/>
|
|
284
|
-
<div class="`,`">
|
|
285
|
-
<button type="button" class="`,'" onClick=',`>
|
|
286
|
-
`,`
|
|
287
|
-
</button>
|
|
288
|
-
<button type="button" class="`,'" onClick=',`>
|
|
289
|
-
`,`
|
|
290
|
-
</button>
|
|
291
|
-
</div>
|
|
292
|
-
</div>
|
|
293
|
-
`],[`
|
|
294
|
-
<div aria-label="`,`">
|
|
295
|
-
<label for="toastuiLinkUrlInput">`,`</label>
|
|
296
|
-
<input
|
|
297
|
-
id="toastuiLinkUrlInput"
|
|
298
|
-
type="text"
|
|
299
|
-
ref=`,`
|
|
300
|
-
/>
|
|
301
|
-
<label for="toastuiLinkTextInput">`,`</label>
|
|
302
|
-
<input
|
|
303
|
-
id="toastuiLinkTextInput"
|
|
304
|
-
type="text"
|
|
305
|
-
ref=`,`
|
|
306
|
-
/>
|
|
307
|
-
<div class="`,`">
|
|
308
|
-
<button type="button" class="`,'" onClick=',`>
|
|
309
|
-
`,`
|
|
310
|
-
</button>
|
|
311
|
-
<button type="button" class="`,'" onClick=',`>
|
|
312
|
-
`,`
|
|
313
|
-
</button>
|
|
314
|
-
</div>
|
|
315
|
-
</div>
|
|
316
|
-
`])),pt.get("Insert link"),pt.get("URL"),function(n){return t.refs.url=n},pt.get("Link text"),function(n){return t.refs.text=n},Je("button-container"),Je("close-button"),this.props.hidePopup,pt.get("Cancel"),Je("ok-button"),this.execCommand,pt.get("OK"))},e}($r),ry,ny=20,iy=20,ay=5,oy=14,sy=5,ly=9,yJe=1,bJe=1,uy=1,kJe=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(we({},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)*ny,height:(n+1)*iy}},e.prototype.getRangeByOffset=function(t,n){return{colIdx:Math.floor(t/ny),rowIdx:Math.floor(n/iy)}},e.prototype.getTableRange=function(){var t=this.state,n=t.colIdx,i=t.rowIdx,a=Math.max(n,sy),o=Math.max(i,ay);return n>=sy&&a<ly&&(a+=1),i>=ay&&o<oy&&(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-uy,height:i-uy,display:"block"}},e.prototype.getSelectionRangeByOffset=function(t,n){var i=this.getRangeByOffset(t,n);return i.rowIdx=Math.min(Math.max(i.rowIdx,yJe),oy),i.colIdx=Math.min(Math.max(i.colIdx,bJe),ly),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=""+Je("table-cell")+(o>0?"":" header");s.push(Dt(cy||(cy=Nt(['<div class="','"></div>'],['<div class="','"></div>'])),f))}a.push(Dt(fy||(fy=Nt(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),Je("table-row"),s))}return Dt(dy||(dy=Nt(['<div class="','">',"</div>"],['<div class="','">',"</div>"])),Je("table"),a)},e.prototype.render=function(){var t=this,n=this.getTableRange(),i=this.getSelectionAreaBound();return Dt(hy||(hy=Nt([`
|
|
317
|
-
<div aria-label="`,`">
|
|
318
|
-
<div
|
|
319
|
-
class="`,`"
|
|
320
|
-
ref=`,`
|
|
321
|
-
onMousemove=`,`
|
|
322
|
-
onClick=`,`
|
|
323
|
-
>
|
|
324
|
-
`,`
|
|
325
|
-
<div class="`,'" style=',`></div>
|
|
326
|
-
</div>
|
|
327
|
-
<p class="`,'">',`</p>
|
|
328
|
-
</div>
|
|
329
|
-
`],[`
|
|
330
|
-
<div aria-label="`,`">
|
|
331
|
-
<div
|
|
332
|
-
class="`,`"
|
|
333
|
-
ref=`,`
|
|
334
|
-
onMousemove=`,`
|
|
335
|
-
onClick=`,`
|
|
336
|
-
>
|
|
337
|
-
`,`
|
|
338
|
-
<div class="`,'" style=',`></div>
|
|
339
|
-
</div>
|
|
340
|
-
<p class="`,'">',`</p>
|
|
341
|
-
</div>
|
|
342
|
-
`])),pt.get("Insert table"),Je("table-selection"),function(a){return t.refs.tableEl=a},this.extendSelectionRange,this.execCommand,this.createTableArea(n),Je("table-selection-layer"),i,Je("table-description"),this.getDescription())},e}($r),cy,fy,dy,hy,wJe=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 Dt(py||(py=Nt(["<div ref=","></div>"],["<div ref=","></div>"])),function(n){return t.refs.el=n})},e}($r),py;function Zd(r){return Bi(r)?TJe(r):r}function CJe(){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?si(r,"active"):Wn(r,"active"),i("toggleScrollSync",{active:o})})};return r.appendChild(e),r.appendChild(t),{name:"scrollSync",el:r,onMounted:n}}function TJe(r){var e;switch(r){case"heading":e={name:"heading",className:"heading",tooltip:pt.get("Headings"),state:"heading"};break;case"bold":e={name:"bold",className:"bold",command:"bold",tooltip:pt.get("Bold"),state:"strong"};break;case"italic":e={name:"italic",className:"italic",command:"italic",tooltip:pt.get("Italic"),state:"emph"};break;case"strike":e={name:"strike",className:"strike",command:"strike",tooltip:pt.get("Strike"),state:"strike"};break;case"hr":e={name:"hr",className:"hrline",command:"hr",tooltip:pt.get("Line"),state:"thematicBreak"};break;case"quote":e={name:"quote",className:"quote",command:"blockQuote",tooltip:pt.get("Blockquote"),state:"blockQuote"};break;case"ul":e={name:"ul",className:"bullet-list",command:"bulletList",tooltip:pt.get("Unordered list"),state:"bulletList"};break;case"ol":e={name:"ol",className:"ordered-list",command:"orderedList",tooltip:pt.get("Ordered list"),state:"orderedList"};break;case"task":e={name:"task",className:"task-list",command:"taskList",tooltip:pt.get("Task"),state:"taskList"};break;case"table":e={name:"table",className:"table",tooltip:pt.get("Insert table"),state:"table"};break;case"image":e={name:"image",className:"image",tooltip:pt.get("Insert image")};break;case"link":e={name:"link",className:"link",tooltip:pt.get("Insert link")};break;case"code":e={name:"code",className:"code",command:"code",tooltip:pt.get("Code"),state:"code"};break;case"codeblock":e={name:"codeblock",className:"codeblock",command:"codeBlock",tooltip:pt.get("Insert CodeBlock"),state:"codeBlock"};break;case"indent":e={name:"indent",className:"indent",command:"indent",tooltip:pt.get("Indent"),state:"indent"};break;case"outdent":e={name:"outdent",className:"outdent",command:"outdent",tooltip:pt.get("Outdent"),state:"outdent"};break;case"scrollSync":e=CJe();break;case"more":e={name:"more",className:"more",tooltip:pt.get("More")};break}return e.name!=="scrollSync"&&(e.className+=" "+Je("toolbar-icons")),e}function Kh(r,e){var t=e.el,n=e.pos,i=e.popup,a=e.initialValues;switch(r){case"heading":return{render:function(o){return Dt(vy||(vy=Nt(["<"," ..."," />"],["<"," ..."," />"])),pJe,o)},className:Je("popup-add-heading"),fromEl:t,pos:n};case"link":return{render:function(o){return Dt(my||(my=Nt(["<"," ..."," />"],["<"," ..."," />"])),gJe,o)},className:Je("popup-add-link"),fromEl:t,pos:n,initialValues:a};case"image":return{render:function(o){return Dt(gy||(gy=Nt(["<"," ..."," />"],["<"," ..."," />"])),mJe,o)},className:Je("popup-add-image"),fromEl:t,pos:n};case"table":return{render:function(o){return Dt(yy||(yy=Nt(["<"," ..."," />"],["<"," ..."," />"])),kJe,o)},className:Je("popup-add-table"),fromEl:t,pos:n};case"customPopupBody":return i?we({render:function(o){return Dt(by||(by=Nt(["<"," ..."," body="," />"],["<"," ..."," body="," />"])),wJe,o,i.body)},fromEl:t,pos:n},i):null;default:return null}}function Eu(r){r.hidden=r.length===r.filter(function(e){return e.hidden}).length}function SJe(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(Zd(o))}));var a=n[(n.length||1)-1];return a&&Eu(a),n},[])}function xJe(r,e){r.forEach(function(t){t.forEach(function(n){return n.hidden=n.name==="scrollSync"&&e}),Eu(t)})}var vy,my,gy,yy,by,EJe=20,MJe=function(r){Ge(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handleMousedown=function(n){!li(n.target,"."+Je("popup"))&&!li(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=we({},a.pos),s=this.refs.el.offsetWidth,l=li(this.refs.el,"."+Je("toolbar")),f=l.offsetWidth;o.left+s>=f&&(o.left=f-s-EJe),wh(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,k=p===void 0?"":p,T=f.style,x=f.render,E=f.initialValues,P=E===void 0?{}:E,F=we(we({display:a?"block":"none"},T),this.state.popupPos);return Dt(ky||(ky=Nt([`
|
|
343
|
-
<div
|
|
344
|
-
class="`," ",`"
|
|
345
|
-
style=`,`
|
|
346
|
-
ref=`,`
|
|
347
|
-
aria-role="dialog"
|
|
348
|
-
>
|
|
349
|
-
<div class="`,`">
|
|
350
|
-
`,`
|
|
351
|
-
</div>
|
|
352
|
-
</div>
|
|
353
|
-
`],[`
|
|
354
|
-
<div
|
|
355
|
-
class="`," ",`"
|
|
356
|
-
style=`,`
|
|
357
|
-
ref=`,`
|
|
358
|
-
aria-role="dialog"
|
|
359
|
-
>
|
|
360
|
-
<div class="`,`">
|
|
361
|
-
`,`
|
|
362
|
-
</div>
|
|
363
|
-
</div>
|
|
364
|
-
`])),Je("popup"),k,F,function(z){return t.refs.el=z},Je("popup-body"),x&&x({eventEmitter:s,show:a,hidePopup:o,execCommand:l,initialValues:P}))},e}($r),ky,wy=6;function Jh(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+wy+"px",f=s.top+wy+"px";fi(i.props.tooltipRef.current,{display:"block",left:l,top:f}),i.props.tooltipRef.current.querySelector(".text").textContent=o}},i.hideTooltip=function(){fi(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:{},k=p.active,T=p.disabled;n.setState({active:!!k,disabled:T??n.props.disabled})})},t.prototype.getBound=function(n){var i=Ik(n,li(n,"."+Je("toolbar"))),a=i.offsetLeft,o=i.offsetTop;return{left:a,top:n.offsetHeight+o}},t.prototype.render=function(){return Dt(Cy||(Cy=Nt([`
|
|
365
|
-
<`,`
|
|
366
|
-
...`,`
|
|
367
|
-
active=`,`
|
|
368
|
-
showTooltip=`,`
|
|
369
|
-
hideTooltip=`,`
|
|
370
|
-
getBound=`,`
|
|
371
|
-
disabled=`,`
|
|
372
|
-
/>
|
|
373
|
-
`],[`
|
|
374
|
-
<`,`
|
|
375
|
-
...`,`
|
|
376
|
-
active=`,`
|
|
377
|
-
showTooltip=`,`
|
|
378
|
-
hideTooltip=`,`
|
|
379
|
-
getBound=`,`
|
|
380
|
-
disabled=`,`
|
|
381
|
-
/>
|
|
382
|
-
`])),r,this.props,this.state.active,this.showTooltip,this.hideTooltip,this.getBound,this.state.disabled||this.props.disabled)},t}($r)}var Cy,AJe=80,OJe=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,k=i.popup;if(f)a(f);else{var T=k?"customPopupBody":p,x=l.emit("query","getPopupInitialValues",{popupName:T})[0],E=Kh(T,{el:t.refs.el,pos:s(t.refs.el),popup:k,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,Nh(this.refs.el)+(i.hidden?AJe:0))},e.prototype.render=function(){var t=this,n=this.props,i=n.hideTooltip,a=n.disabled,o=n.item,s=n.active,l=we({display:o.hidden?"none":null},o.style),f=""+(o.className||"")+(s?" active":"");return Dt(Ty||(Ty=Nt([`
|
|
383
|
-
<button
|
|
384
|
-
ref=`,`
|
|
385
|
-
type="button"
|
|
386
|
-
style=`,`
|
|
387
|
-
class=`,`
|
|
388
|
-
onClick=`,`
|
|
389
|
-
onMouseover=`,`
|
|
390
|
-
onMouseout=`,`
|
|
391
|
-
disabled=`,`
|
|
392
|
-
aria-label=`,`
|
|
393
|
-
>
|
|
394
|
-
`,`
|
|
395
|
-
</button>
|
|
396
|
-
`],[`
|
|
397
|
-
<button
|
|
398
|
-
ref=`,`
|
|
399
|
-
type="button"
|
|
400
|
-
style=`,`
|
|
401
|
-
class=`,`
|
|
402
|
-
onClick=`,`
|
|
403
|
-
onMouseover=`,`
|
|
404
|
-
onMouseout=`,`
|
|
405
|
-
disabled=`,`
|
|
406
|
-
aria-label=`,`
|
|
407
|
-
>
|
|
408
|
-
`,`
|
|
409
|
-
</button>
|
|
410
|
-
`])),function(p){return t.refs.el=p},l,f,this.execCommand,this.showTooltip,i,!!a,o.text||o.tooltip||"",o.text||"")},e}($r),NJe=Jh(OJe),Ty,DJe=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=Kh("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,Nh(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 Dt(Sy||(Sy=Nt([`
|
|
411
|
-
<div
|
|
412
|
-
ref=`,`
|
|
413
|
-
style=`,`
|
|
414
|
-
class=`,`
|
|
415
|
-
onClick=`,`
|
|
416
|
-
onMouseover=`,`
|
|
417
|
-
onMouseout=`,`
|
|
418
|
-
></div>
|
|
419
|
-
`],[`
|
|
420
|
-
<div
|
|
421
|
-
ref=`,`
|
|
422
|
-
style=`,`
|
|
423
|
-
class=`,`
|
|
424
|
-
onClick=`,`
|
|
425
|
-
onMouseover=`,`
|
|
426
|
-
onMouseout=`,`
|
|
427
|
-
></div>
|
|
428
|
-
`])),function(l){return t.refs.el=l},o,Je("toolbar-item-wrapper"),s(this.showPopup),s(this.showTooltip),s(this.props.hideTooltip))},e}($r),LJe=Jh(DJe),Sy,v0=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 Dt(Ey||(Ey=Nt([`
|
|
429
|
-
<div class="`,'" style=',`>
|
|
430
|
-
`,`
|
|
431
|
-
<div class="`,'" style=',`></div>
|
|
432
|
-
</div>
|
|
433
|
-
`],[`
|
|
434
|
-
<div class="`,'" style=',`>
|
|
435
|
-
`,`
|
|
436
|
-
<div class="`,'" style=',`></div>
|
|
437
|
-
</div>
|
|
438
|
-
`])),Je("toolbar-group"),o,i.map(function(l){var f=l.el?LJe:NJe;return Dt(xy||(xy=Nt(["<"," key="," ..."," item="," />"],["<"," key="," ..."," item="," />"])),f,l.name,t.props,l)}),Je("toolbar-divider"),s)},e}($r),xy,Ey,RJe=4,IJe=function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.handleClickDocument=function(i){var a=i.target;!li(a,"."+Je("dropdown-toolbar"))&&!li(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+=RJe,we(we({},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,k=f.filter(function(E){return!E.hidden}),T=k.length?null:{display:"none"},x=i?null:{display:"none"};return Dt(Ay||(Ay=Nt([`
|
|
439
|
-
<div class="`,'" style=',`>
|
|
440
|
-
<button
|
|
441
|
-
ref=`,`
|
|
442
|
-
type="button"
|
|
443
|
-
class=`,`
|
|
444
|
-
onClick=`,`
|
|
445
|
-
onMouseover=`,`
|
|
446
|
-
onMouseout=`,`
|
|
447
|
-
disabled=`,`
|
|
448
|
-
></button>
|
|
449
|
-
<div
|
|
450
|
-
class="`,`"
|
|
451
|
-
style=`,`
|
|
452
|
-
ref=`,`
|
|
453
|
-
>
|
|
454
|
-
`,`
|
|
455
|
-
</div>
|
|
456
|
-
</div>
|
|
457
|
-
`],[`
|
|
458
|
-
<div class="`,'" style=',`>
|
|
459
|
-
<button
|
|
460
|
-
ref=`,`
|
|
461
|
-
type="button"
|
|
462
|
-
class=`,`
|
|
463
|
-
onClick=`,`
|
|
464
|
-
onMouseover=`,`
|
|
465
|
-
onMouseout=`,`
|
|
466
|
-
disabled=`,`
|
|
467
|
-
></button>
|
|
468
|
-
<div
|
|
469
|
-
class="`,`"
|
|
470
|
-
style=`,`
|
|
471
|
-
ref=`,`
|
|
472
|
-
>
|
|
473
|
-
`,`
|
|
474
|
-
</div>
|
|
475
|
-
</div>
|
|
476
|
-
`])),Je("toolbar-group"),T,function(E){return t.refs.el=E},l.className,function(){return t.setState({showDropdown:!0})},this.showTooltip,p,s,Je("dropdown-toolbar"),we(we({},x),a),function(E){return t.refs.dropdownEl=E},k.length?k.map(function(E,P){var F;return Dt(My||(My=Nt([`
|
|
477
|
-
<`,`
|
|
478
|
-
group=`,`
|
|
479
|
-
hiddenDivider=`,`
|
|
480
|
-
...`,`
|
|
481
|
-
/>
|
|
482
|
-
`],[`
|
|
483
|
-
<`,`
|
|
484
|
-
group=`,`
|
|
485
|
-
hiddenDivider=`,`
|
|
486
|
-
...`,`
|
|
487
|
-
/>
|
|
488
|
-
`])),v0,E,P===k.length-1||((F=k[P+1])===null||F===void 0?void 0:F.hidden),t.props)}):null)},e}($r),PJe=Jh(IJe),My,Ay,BJe=50,FJe=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("."+Je("toolbar-group")+" ."+i);if(o){var s=Ik(o,li(o,"."+Je("toolbar"))),l=s.offsetLeft,f=s.offsetTop,p=Kh(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=SJe(t.toolbarItems||[],n.hiddenScrollSync()),n.state={items:n.initialItems,dropdownItems:[],showPopup:!1,popupInfo:{},activeTab:"write"},n.tooltipRef={current:null},n.resizeObserver=new hJe(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=Zd(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=J4e(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="'+Je("tooltip")+`" style="display:none">
|
|
489
|
-
<div class="arrow"></div>
|
|
490
|
-
<span class="text"></span>
|
|
491
|
-
</div>`;this.tooltipRef.current=Rk(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=Vr(n);s&&o(s)}},e.prototype.classifyToolbarItems=function(){var t=this,n=0,i=this.refs.el.clientWidth,a=this.refs.el.querySelector("."+Je("toolbar-divider")),o=a?Nh(a):0,s=[],l=[],f=!1;return this.initialItems.forEach(function(p,k){var T=[],x=[];p.forEach(function(E,P){E.hidden||(n+=t.itemWidthMap[E.name],n>i-BJe?(f||(t.movePrevItemToDropdownToolbar(P,s,T,x),f=!0),x.push(E)):T.push(E))}),T.length&&(Eu(T),s.push(T)),x.length&&(Eu(x),l.push(x)),k<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){xJe(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(),Ya(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,k=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 Dt(Ny||(Ny=Nt([`
|
|
492
|
-
<div class="`,`">
|
|
493
|
-
<div
|
|
494
|
-
class="`,`"
|
|
495
|
-
style="display: `,`"
|
|
496
|
-
>
|
|
497
|
-
<`," tabs="," activeTab="," onClick=",` />
|
|
498
|
-
</div>
|
|
499
|
-
<div
|
|
500
|
-
class="`,`"
|
|
501
|
-
ref=`,`
|
|
502
|
-
style=`,`
|
|
503
|
-
>
|
|
504
|
-
`,`
|
|
505
|
-
<`,`
|
|
506
|
-
item=`,`
|
|
507
|
-
items=`,`
|
|
508
|
-
...`,`
|
|
509
|
-
/>
|
|
510
|
-
</div>
|
|
511
|
-
<`,`
|
|
512
|
-
info=`,`
|
|
513
|
-
show=`,`
|
|
514
|
-
eventEmitter=`,`
|
|
515
|
-
hidePopup=`,`
|
|
516
|
-
execCommand=`,`
|
|
517
|
-
/>
|
|
518
|
-
</div>
|
|
519
|
-
`],[`
|
|
520
|
-
<div class="`,`">
|
|
521
|
-
<div
|
|
522
|
-
class="`,`"
|
|
523
|
-
style="display: `,`"
|
|
524
|
-
>
|
|
525
|
-
<`," tabs="," activeTab="," onClick=",` />
|
|
526
|
-
</div>
|
|
527
|
-
<div
|
|
528
|
-
class="`,`"
|
|
529
|
-
ref=`,`
|
|
530
|
-
style=`,`
|
|
531
|
-
>
|
|
532
|
-
`,`
|
|
533
|
-
<`,`
|
|
534
|
-
item=`,`
|
|
535
|
-
items=`,`
|
|
536
|
-
...`,`
|
|
537
|
-
/>
|
|
538
|
-
</div>
|
|
539
|
-
<`,`
|
|
540
|
-
info=`,`
|
|
541
|
-
show=`,`
|
|
542
|
-
eventEmitter=`,`
|
|
543
|
-
hidePopup=`,`
|
|
544
|
-
execCommand=`,`
|
|
545
|
-
/>
|
|
546
|
-
</div>
|
|
547
|
-
`])),Je("toolbar"),Je("md-tab-container"),o==="wysiwyg"||i==="vertical"?"none":"block",p0,this.tabs,p,this.toggleTab,Je("defaultUI-toolbar"),function(P){return t.refs.el=P},E,k.map(function(P,F){var z;return Dt(Oy||(Oy=Nt([`
|
|
548
|
-
<`,`
|
|
549
|
-
group=`,`
|
|
550
|
-
hiddenDivider=`,`
|
|
551
|
-
setItemWidth=`,`
|
|
552
|
-
...`,`
|
|
553
|
-
/>
|
|
554
|
-
`],[`
|
|
555
|
-
<`,`
|
|
556
|
-
group=`,`
|
|
557
|
-
hiddenDivider=`,`
|
|
558
|
-
setItemWidth=`,`
|
|
559
|
-
...`,`
|
|
560
|
-
/>
|
|
561
|
-
`])),v0,P,F===k.length-1||((z=k[F+1])===null||z===void 0?void 0:z.hidden),t.setItemWidth,x)}),PJe,Zd("more"),T,x,MJe,l,f,a,this.hidePopup,this.execCommand)},e}($r),Oy,Ny,qJe=function(r){Ge(e,r);function e(t){var n=r.call(this,t)||this;return n.handleClickDocument=function(i){li(i.target,"."+Je("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,k=f.className,T=k===void 0?!1:k,x=f.disabled,E=f.onClick,P=function(){x||(E(),t.setState({pos:null}))};l.push(Dt(Dy||(Dy=Nt([`
|
|
562
|
-
<li
|
|
563
|
-
onClick=`,`
|
|
564
|
-
class="menu-item`,`"
|
|
565
|
-
aria-role="menuitem"
|
|
566
|
-
>
|
|
567
|
-
<span class="`,'">',`</span>
|
|
568
|
-
</li>
|
|
569
|
-
`],[`
|
|
570
|
-
<li
|
|
571
|
-
onClick=`,`
|
|
572
|
-
class="menu-item`,`"
|
|
573
|
-
aria-role="menuitem"
|
|
574
|
-
>
|
|
575
|
-
<span class="`,'">',`</span>
|
|
576
|
-
</li>
|
|
577
|
-
`])),P,x?" disabled":"",T,p))}),o.push(Dt(Ly||(Ly=Nt([`<ul class="menu-group">
|
|
578
|
-
`,`
|
|
579
|
-
</ul>`],[`<ul class="menu-group">
|
|
580
|
-
`,`
|
|
581
|
-
</ul>`])),l)),o},[]):[]},e.prototype.render=function(){var t=we({display:this.state.pos?"block":"none"},this.state.pos);return Dt(Ry||(Ry=Nt(['<div class="','" style=',` aria-role="menu">
|
|
582
|
-
`,`
|
|
583
|
-
</div>`],['<div class="','" style=',` aria-role="menu">
|
|
584
|
-
`,`
|
|
585
|
-
</div>`])),Je("context-menu"),t,this.getMenuGroupElements())},e}($r),Dy,Ly,Ry,HJe=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,k=l.editorType,T=f?" hidden":"",x=Je(k==="markdown"?"md-mode":"ww-mode"),E=Je("md")+"-"+p+"-style",P=Je([s!=="light",s+" "]);return Dt(Py||(Py=Nt([`
|
|
586
|
-
<div
|
|
587
|
-
class="`,"","",`"
|
|
588
|
-
ref=`,`
|
|
589
|
-
>
|
|
590
|
-
<`,`
|
|
591
|
-
ref=`,`
|
|
592
|
-
eventEmitter=`,`
|
|
593
|
-
previewStyle=`,`
|
|
594
|
-
toolbarItems=`,`
|
|
595
|
-
editorType=`,`
|
|
596
|
-
/>
|
|
597
|
-
<div
|
|
598
|
-
class="`," ",`"
|
|
599
|
-
ref=`,`
|
|
600
|
-
>
|
|
601
|
-
<div class="`,`">
|
|
602
|
-
<div
|
|
603
|
-
class="`," ",`"
|
|
604
|
-
ref=`,`
|
|
605
|
-
>
|
|
606
|
-
<div class="`,`"></div>
|
|
607
|
-
</div>
|
|
608
|
-
<div
|
|
609
|
-
class="`,`"
|
|
610
|
-
ref=`,`
|
|
611
|
-
/>
|
|
612
|
-
</div>
|
|
613
|
-
</div>
|
|
614
|
-
`,`
|
|
615
|
-
<`," eventEmitter=",` />
|
|
616
|
-
</div>
|
|
617
|
-
`],[`
|
|
618
|
-
<div
|
|
619
|
-
class="`,"","",`"
|
|
620
|
-
ref=`,`
|
|
621
|
-
>
|
|
622
|
-
<`,`
|
|
623
|
-
ref=`,`
|
|
624
|
-
eventEmitter=`,`
|
|
625
|
-
previewStyle=`,`
|
|
626
|
-
toolbarItems=`,`
|
|
627
|
-
editorType=`,`
|
|
628
|
-
/>
|
|
629
|
-
<div
|
|
630
|
-
class="`," ",`"
|
|
631
|
-
ref=`,`
|
|
632
|
-
>
|
|
633
|
-
<div class="`,`">
|
|
634
|
-
<div
|
|
635
|
-
class="`," ",`"
|
|
636
|
-
ref=`,`
|
|
637
|
-
>
|
|
638
|
-
<div class="`,`"></div>
|
|
639
|
-
</div>
|
|
640
|
-
<div
|
|
641
|
-
class="`,`"
|
|
642
|
-
ref=`,`
|
|
643
|
-
/>
|
|
644
|
-
</div>
|
|
645
|
-
</div>
|
|
646
|
-
`,`
|
|
647
|
-
<`," eventEmitter=",` />
|
|
648
|
-
</div>
|
|
649
|
-
`])),P,Je("defaultUI"),T,function(F){return t.refs.el=F},FJe,function(F){return t.toolbar=F},i,p,o,k,Je("main"),x,function(F){return t.refs.editorSection=F},Je("main-container"),Je("md-container"),E,function(F){return t.refs.mdContainer=F},Je("md-splitter"),Je("ww-container"),function(F){return t.refs.wwContainer=F},!a&&Dt(Iy||(Iy=Nt(["<"," eventEmitter="," editorType="," />"],["<"," eventEmitter="," editorType="," />"])),$4e,i,k),qJe,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}($r),Iy,Py,Kt=function(r){Ge(e,r);function e(t){var n,i=r.call(this,t)||this,a,o=U4e(i.options.el,Dt(By||(By=Nt([`
|
|
650
|
-
<`,`
|
|
651
|
-
ref=`,`
|
|
652
|
-
eventEmitter=`,`
|
|
653
|
-
slots=`,`
|
|
654
|
-
hideModeSwitch=`,`
|
|
655
|
-
toolbarItems=`,`
|
|
656
|
-
previewStyle=`,`
|
|
657
|
-
editorType=`,`
|
|
658
|
-
theme=`,`
|
|
659
|
-
/>
|
|
660
|
-
`],[`
|
|
661
|
-
<`,`
|
|
662
|
-
ref=`,`
|
|
663
|
-
eventEmitter=`,`
|
|
664
|
-
slots=`,`
|
|
665
|
-
hideModeSwitch=`,`
|
|
666
|
-
toolbarItems=`,`
|
|
667
|
-
previewStyle=`,`
|
|
668
|
-
editorType=`,`
|
|
669
|
-
theme=`,`
|
|
670
|
-
/>
|
|
671
|
-
`])),HJe,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 n0(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}(a0),By;a0.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 ld={exports:{}},ln={},Pn={},jr={},ud,Fy;function _Je(){if(Fy)return ud;Fy=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)},ud=r,ud}var qy;function Gu(){if(qy)return jr;qy=1;function r(I,M){var g=typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(!g){if(Array.isArray(I)||(g=e(I))||M){g&&(I=g);var w=0,O=function(){};return{s:O,n:function(){return w>=I.length?{done:!0}:{done:!1,value:I[w++]}},e:function(ve){throw ve},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
672
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var _=!0,j=!1,X;return{s:function(){g=g.call(I)},n:function(){var ve=g.next();return _=ve.done,ve},e:function(ve){j=!0,X=ve},f:function(){try{!_&&g.return!=null&&g.return()}finally{if(j)throw X}}}}function e(I,M){if(I){if(typeof I=="string")return t(I,M);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,M)}}function t(I,M){(M==null||M>I.length)&&(M=I.length);for(var g=0,w=new Array(M);g<M;g++)w[g]=I[g];return w}function n(){return typeof Reflect<"u"&&Reflect.get?n=Reflect.get.bind():n=function(M,g,w){var O=i(M,g);if(O){var _=Object.getOwnPropertyDescriptor(O,g);return _.get?_.get.call(arguments.length<3?M:w):_.value}},n.apply(this,arguments)}function i(I,M){for(;!Object.prototype.hasOwnProperty.call(I,M)&&(I=E(I),I!==null););return I}function a(I,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");I.prototype=Object.create(M&&M.prototype,{constructor:{value:I,writable:!0,configurable:!0}}),Object.defineProperty(I,"prototype",{writable:!1}),M&&x(I,M)}function o(I){var M=k();return function(){var w=E(I),O;if(M){var _=E(this).constructor;O=Reflect.construct(w,arguments,_)}else O=w.apply(this,arguments);return s(this,O)}}function s(I,M){if(M&&(P(M)==="object"||typeof M=="function"))return M;if(M!==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 M=typeof Map=="function"?new Map:void 0;return f=function(w){if(w===null||!T(w))return w;if(typeof w!="function")throw new TypeError("Super expression must either be null or a function");if(typeof M<"u"){if(M.has(w))return M.get(w);M.set(w,O)}function O(){return p(w,arguments,E(this).constructor)}return O.prototype=Object.create(w.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),x(O,w)},f(I)}function p(I,M,g){return k()?p=Reflect.construct.bind():p=function(O,_,j){var X=[null];X.push.apply(X,_);var ue=Function.bind.apply(O,X),ve=new ue;return j&&x(ve,j.prototype),ve},p.apply(null,arguments)}function k(){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,M){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(w,O){return w.__proto__=O,w},x(I,M)}function E(I){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g)},E(I)}function P(I){"@babel/helpers - typeof";return P=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},P(I)}function F(I,M){if(!(I instanceof M))throw new TypeError("Cannot call a class as a function")}function z(I,M){for(var g=0;g<M.length;g++){var w=M[g];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(I,Z(w.key),w)}}function Y(I,M,g){return M&&z(I.prototype,M),g&&z(I,g),Object.defineProperty(I,"prototype",{writable:!1}),I}function Z(I){var M=oe(I,"string");return P(M)==="symbol"?M:String(M)}function oe(I,M){if(P(I)!=="object"||I===null)return I;var g=I[Symbol.toPrimitive];if(g!==void 0){var w=g.call(I,M);if(P(w)!=="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(I)}var le=_Je();function re(I,M,g){for(var w=0;;w++){if(w==I.childCount||w==M.childCount)return I.childCount==M.childCount?null:g;var O=I.child(w),_=M.child(w);if(O==_){g+=O.nodeSize;continue}if(!O.sameMarkup(_))return g;if(O.isText&&O.text!=_.text){for(var j=0;O.text[j]==_.text[j];j++)g++;return g}if(O.content.size||_.content.size){var X=re(O.content,_.content,g+1);if(X!=null)return X}g+=O.nodeSize}}function he(I,M,g,w){for(var O=I.childCount,_=M.childCount;;){if(O==0||_==0)return O==_?null:{a:g,b:w};var j=I.child(--O),X=M.child(--_),ue=j.nodeSize;if(j==X){g-=ue,w-=ue;continue}if(!j.sameMarkup(X))return{a:g,b:w};if(j.isText&&j.text!=X.text){for(var ve=0,Ne=Math.min(j.text.length,X.text.length);ve<Ne&&j.text[j.text.length-ve-1]==X.text[X.text.length-ve-1];)ve++,g--,w--;return{a:g,b:w}}if(j.content.size||X.content.size){var De=he(j.content,X.content,g-1,w-1);if(De)return De}g-=ue,w-=ue}}var ge=function(){function I(M,g){if(F(this,I),this.content=M,this.size=g||0,g==null)for(var w=0;w<M.length;w++)this.size+=M[w].nodeSize}return Y(I,[{key:"nodesBetween",value:function(g,w,O){for(var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,j=arguments.length>4?arguments[4]:void 0,X=0,ue=0;ue<w;X++){var ve=this.content[X],Ne=ue+ve.nodeSize;if(Ne>g&&O(ve,_+ue,j||null,X)!==!1&&ve.content.size){var De=ue+1;ve.nodesBetween(Math.max(0,g-De),Math.min(ve.content.size,w-De),O,_+De)}ue=Ne}}},{key:"descendants",value:function(g){this.nodesBetween(0,this.size,g)}},{key:"textBetween",value:function(g,w,O,_){var j="",X=!0;return this.nodesBetween(g,w,function(ue,ve){var Ne=ue.isText?ue.text.slice(Math.max(g,ve)-ve,w-ve):ue.isLeaf?_?typeof _=="function"?_(ue):_:ue.type.spec.leafText?ue.type.spec.leafText(ue):"":"";ue.isBlock&&(ue.isLeaf&&Ne||ue.isTextblock)&&O&&(X?X=!1:j+=O),j+=Ne},0),j}},{key:"append",value:function(g){if(!g.size)return this;if(!this.size)return g;var w=this.lastChild,O=g.firstChild,_=this.content.slice(),j=0;for(w.isText&&w.sameMarkup(O)&&(_[_.length-1]=w.withText(w.text+O.text),j=1);j<g.content.length;j++)_.push(g.content[j]);return new I(_,this.size+g.size)}},{key:"cut",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.size;if(g==0&&w==this.size)return this;var O=[],_=0;if(w>g)for(var j=0,X=0;X<w;j++){var ue=this.content[j],ve=X+ue.nodeSize;ve>g&&((X<g||ve>w)&&(ue.isText?ue=ue.cut(Math.max(0,g-X),Math.min(ue.text.length,w-X)):ue=ue.cut(Math.max(0,g-X-1),Math.min(ue.content.size,w-X-1))),O.push(ue),_+=ue.nodeSize),X=ve}return new I(O,_)}},{key:"cutByIndex",value:function(g,w){return g==w?I.empty:g==0&&w==this.content.length?this:new I(this.content.slice(g,w))}},{key:"replaceChild",value:function(g,w){var O=this.content[g];if(O==w)return this;var _=this.content.slice(),j=this.size+w.nodeSize-O.nodeSize;return _[g]=w,new I(_,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 w=0;w<this.content.length;w++)if(!this.content[w].eq(g.content[w]))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 w=this.content[g];if(!w)throw new RangeError("Index "+g+" out of range for "+this);return w}},{key:"maybeChild",value:function(g){return this.content[g]||null}},{key:"forEach",value:function(g){for(var w=0,O=0;w<this.content.length;w++){var _=this.content[w];g(_,O,w),O+=_.nodeSize}}},{key:"findDiffStart",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return re(this,g,w)}},{key:"findDiffEnd",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.size,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.size;return he(this,g,w,O)}},{key:"findIndex",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1;if(g==0)return Re(0,g);if(g==this.size)return Re(this.content.length,g);if(g>this.size||g<0)throw new RangeError("Position ".concat(g," outside of fragment (").concat(this,")"));for(var O=0,_=0;;O++){var j=this.child(O),X=_+j.nodeSize;if(X>=g)return X==g||w>0?Re(O+1,X):Re(O,_);_=X}}},{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,w){if(!w)return I.empty;if(!Array.isArray(w))throw new RangeError("Invalid input for Fragment.fromJSON");return new I(w.map(g.nodeFromJSON))}},{key:"fromArray",value:function(g){if(!g.length)return I.empty;for(var w,O=0,_=0;_<g.length;_++){var j=g[_];O+=j.nodeSize,_&&j.isText&&g[_-1].sameMarkup(j)?(w||(w=g.slice(0,_)),w[w.length-1]=j.withText(w[w.length-1].text+j.text)):w&&w.push(j)}return new I(w||g,O)}},{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}();ge.empty=new ge([],0);var ye={index:0,offset:0};function Re(I,M){return ye.index=I,ye.offset=M,ye}function Ze(I,M){if(I===M)return!0;if(!(I&&P(I)=="object")||!(M&&P(M)=="object"))return!1;var g=Array.isArray(I);if(Array.isArray(M)!=g)return!1;if(g){if(I.length!=M.length)return!1;for(var w=0;w<I.length;w++)if(!Ze(I[w],M[w]))return!1}else{for(var O in I)if(!(O in M)||!Ze(I[O],M[O]))return!1;for(var _ in M)if(!(_ in I))return!1}return!0}var Be=function(){function I(M,g){F(this,I),this.type=M,this.attrs=g}return Y(I,[{key:"addToSet",value:function(g){for(var w,O=!1,_=0;_<g.length;_++){var j=g[_];if(this.eq(j))return g;if(this.type.excludes(j.type))w||(w=g.slice(0,_));else{if(j.type.excludes(this.type))return g;!O&&j.type.rank>this.type.rank&&(w||(w=g.slice(0,_)),w.push(this),O=!0),w&&w.push(j)}}return w||(w=g.slice()),O||w.push(this),w}},{key:"removeFromSet",value:function(g){for(var w=0;w<g.length;w++)if(this.eq(g[w]))return g.slice(0,w).concat(g.slice(w+1));return g}},{key:"isInSet",value:function(g){for(var w=0;w<g.length;w++)if(this.eq(g[w]))return!0;return!1}},{key:"eq",value:function(g){return this==g||this.type==g.type&&Ze(this.attrs,g.attrs)}},{key:"toJSON",value:function(){var g={type:this.type.name};for(var w in this.attrs){g.attrs=this.attrs;break}return g}}],[{key:"fromJSON",value:function(g,w){if(!w)throw new RangeError("Invalid input for Mark.fromJSON");var O=g.marks[w.type];if(!O)throw new RangeError("There is no mark type ".concat(w.type," in this schema"));var _=O.create(w.attrs);return O.checkAttrs(_.attrs),_}},{key:"sameSet",value:function(g,w){if(g==w)return!0;if(g.length!=w.length)return!1;for(var O=0;O<g.length;O++)if(!g[O].eq(w[O]))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 w=g.slice();return w.sort(function(O,_){return O.type.rank-_.type.rank}),w}}]),I}();Be.none=[];var mt=function(I){a(g,I);var M=o(g);function g(){return F(this,g),M.apply(this,arguments)}return Y(g)}(f(Error)),ut=function(){function I(M,g,w){F(this,I),this.content=M,this.openStart=g,this.openEnd=w}return Y(I,[{key:"size",get:function(){return this.content.size-this.openStart-this.openEnd}},{key:"insertAt",value:function(g,w){var O=st(this.content,g+this.openStart,w);return O&&new I(O,this.openStart,this.openEnd)}},{key:"removeBetween",value:function(g,w){return new I(vt(this.content,g+this.openStart,w+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,w){if(!w)return I.empty;var O=w.openStart||0,_=w.openEnd||0;if(typeof O!="number"||typeof _!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new I(ge.fromJSON(g,w.content),O,_)}},{key:"maxOpen",value:function(g){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,O=0,_=0,j=g.firstChild;j&&!j.isLeaf&&(w||!j.type.spec.isolating);j=j.firstChild)O++;for(var X=g.lastChild;X&&!X.isLeaf&&(w||!X.type.spec.isolating);X=X.lastChild)_++;return new I(g,O,_)}}]),I}();ut.empty=new ut(ge.empty,0,0);function vt(I,M,g){var w=I.findIndex(M),O=w.index,_=w.offset,j=I.maybeChild(O),X=I.findIndex(g),ue=X.index,ve=X.offset;if(_==M||j.isText){if(ve!=g&&!I.child(ue).isText)throw new RangeError("Removing non-flat range");return I.cut(0,M).append(I.cut(g))}if(O!=ue)throw new RangeError("Removing non-flat range");return I.replaceChild(O,j.copy(vt(j.content,M-_-1,g-_-1)))}function st(I,M,g,w){var O=I.findIndex(M),_=O.index,j=O.offset,X=I.maybeChild(_);if(j==M||X.isText)return I.cut(0,M).append(g).append(I.cut(M));var ue=st(X.content,M-j-1,g);return ue&&I.replaceChild(_,X.copy(ue))}function Rt(I,M,g){if(g.openStart>I.depth)throw new mt("Inserted content deeper than insertion position");if(I.depth-g.openStart!=M.depth-g.openEnd)throw new mt("Inconsistent open depths");return _t(I,M,g,0)}function _t(I,M,g,w){var O=I.index(w),_=I.node(w);if(O==M.index(w)&&w<I.depth-g.openStart){var j=_t(I,M,g,w+1);return _.copy(_.content.replaceChild(O,j))}else if(g.content.size)if(!g.openStart&&!g.openEnd&&I.depth==w&&M.depth==w){var X=I.parent,ue=X.content;return St(X,ue.cut(0,I.parentOffset).append(g.content).append(ue.cut(M.parentOffset)))}else{var ve=ke(g,I),Ne=ve.start,De=ve.end;return St(_,Et(I,Ne,De,M,w))}else return St(_,vr(I,M,w))}function Xt(I,M){if(!M.type.compatibleContent(I.type))throw new mt("Cannot join "+M.type.name+" onto "+I.type.name)}function Qe(I,M,g){var w=I.node(g);return Xt(w,M.node(g)),w}function wt(I,M){var g=M.length-1;g>=0&&I.isText&&I.sameMarkup(M[g])?M[g]=I.withText(M[g].text+I.text):M.push(I)}function lt(I,M,g,w){var O=(M||I).node(g),_=0,j=M?M.index(g):O.childCount;I&&(_=I.index(g),I.depth>g?_++:I.textOffset&&(wt(I.nodeAfter,w),_++));for(var X=_;X<j;X++)wt(O.child(X),w);M&&M.depth==g&&M.textOffset&&wt(M.nodeBefore,w)}function St(I,M){return I.type.checkContent(M),I.copy(M)}function Et(I,M,g,w,O){var _=I.depth>O&&Qe(I,M,O+1),j=w.depth>O&&Qe(g,w,O+1),X=[];return lt(null,I,O,X),_&&j&&M.index(O)==g.index(O)?(Xt(_,j),wt(St(_,Et(I,M,g,w,O+1)),X)):(_&&wt(St(_,vr(I,M,O+1)),X),lt(M,g,O,X),j&&wt(St(j,vr(g,w,O+1)),X)),lt(w,null,O,X),new ge(X)}function vr(I,M,g){var w=[];if(lt(null,I,g,w),I.depth>g){var O=Qe(I,M,g+1);wt(St(O,vr(I,M,g+1)),w)}return lt(M,null,g,w),new ge(w)}function ke(I,M){for(var g=M.depth-I.openStart,w=M.node(g),O=w.copy(I.content),_=g-1;_>=0;_--)O=M.node(_).copy(ge.from(O));return{start:O.resolveNoCache(I.openStart+g),end:O.resolveNoCache(O.content.size-I.openEnd-g)}}var pe=function(){function I(M,g,w){F(this,I),this.pos=M,this.path=g,this.parentOffset=w,this.depth=g.length/3-1}return Y(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,w=this.index(this.depth);if(w==g.childCount)return null;var O=this.pos-this.path[this.path.length-1],_=g.child(w);return O?g.child(w).cut(O):_}},{key:"nodeBefore",get:function(){var g=this.index(this.depth),w=this.pos-this.path[this.path.length-1];return w?this.parent.child(g).cut(0,w):g==0?null:this.parent.child(g-1)}},{key:"posAtIndex",value:function(g,w){w=this.resolveDepth(w);for(var O=this.path[w*3],_=w==0?0:this.path[w*3-1]+1,j=0;j<g;j++)_+=O.child(j).nodeSize;return _}},{key:"marks",value:function(){var g=this.parent,w=this.index();if(g.content.size==0)return Be.none;if(this.textOffset)return g.child(w).marks;var O=g.maybeChild(w-1),_=g.maybeChild(w);if(!O){var j=O;O=_,_=j}for(var X=O.marks,ue=0;ue<X.length;ue++)X[ue].type.spec.inclusive===!1&&(!_||!X[ue].isInSet(_.marks))&&(X=X[ue--].removeFromSet(X));return X}},{key:"marksAcross",value:function(g){var w=this.parent.maybeChild(this.index());if(!w||!w.isInline)return null;for(var O=w.marks,_=g.parent.maybeChild(g.index()),j=0;j<O.length;j++)O[j].type.spec.inclusive===!1&&(!_||!O[j].isInSet(_.marks))&&(O=O[j--].removeFromSet(O));return O}},{key:"sharedDepth",value:function(g){for(var w=this.depth;w>0;w--)if(this.start(w)<=g&&this.end(w)>=g)return w;return 0}},{key:"blockRange",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this,w=arguments.length>1?arguments[1]:void 0;if(g.pos<this.pos)return g.blockRange(this);for(var O=this.depth-(this.parent.inlineContent||this.pos==g.pos?1:0);O>=0;O--)if(g.pos<=this.end(O)&&(!w||w(this.node(O))))return new Te(this,g,O);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="",w=1;w<=this.depth;w++)g+=(g?"/":"")+this.node(w).type.name+"_"+this.index(w-1);return g+":"+this.parentOffset}}],[{key:"resolve",value:function(g,w){if(!(w>=0&&w<=g.content.size))throw new RangeError("Position "+w+" out of range");for(var O=[],_=0,j=w,X=g;;){var ue=X.content.findIndex(j),ve=ue.index,Ne=ue.offset,De=j-Ne;if(O.push(X,ve,_+Ne),!De||(X=X.child(ve),X.isText))break;j=De-1,_+=Ne+1}return new I(w,O,j)}},{key:"resolveCached",value:function(g,w){var O=te.get(g);if(O)for(var _=0;_<O.elts.length;_++){var j=O.elts[_];if(j.pos==w)return j}else te.set(g,O=new ie);var X=O.elts[O.i]=I.resolve(g,w);return O.i=(O.i+1)%se,X}}]),I}(),ie=Y(function I(){F(this,I),this.elts=[],this.i=0}),se=12,te=new WeakMap,Te=function(){function I(M,g,w){F(this,I),this.$from=M,this.$to=g,this.depth=w}return Y(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),Pe=function(){function I(M,g,w){var O=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Be.none;F(this,I),this.type=M,this.attrs=g,this.marks=O,this.content=w||ge.empty}return Y(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,w,O){var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;this.content.nodesBetween(g,w,O,_,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,w,O,_){return this.content.textBetween(g,w,O,_)}},{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,w,O){return this.type==g&&Ze(this.attrs,w||g.defaultAttrs||Ee)&&Be.sameSet(this.marks,O||Be.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 w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.content.size;return g==0&&w==this.content.size?this:this.copy(this.content.cut(g,w))}},{key:"slice",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.content.size,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(g==w)return ut.empty;var _=this.resolve(g),j=this.resolve(w),X=O?0:_.sharedDepth(w),ue=_.start(X),ve=_.node(X),Ne=ve.content.cut(_.pos-ue,j.pos-ue);return new ut(Ne,_.depth-X,j.depth-X)}},{key:"replace",value:function(g,w,O){return Rt(this.resolve(g),this.resolve(w),O)}},{key:"nodeAt",value:function(g){for(var w=this;;){var O=w.content.findIndex(g),_=O.index,j=O.offset;if(w=w.maybeChild(_),!w)return null;if(j==g||w.isText)return w;g-=j+1}}},{key:"childAfter",value:function(g){var w=this.content.findIndex(g),O=w.index,_=w.offset;return{node:this.content.maybeChild(O),index:O,offset:_}}},{key:"childBefore",value:function(g){if(g==0)return{node:null,index:0,offset:0};var w=this.content.findIndex(g),O=w.index,_=w.offset;if(_<g)return{node:this.content.child(O),index:O,offset:_};var j=this.content.child(O-1);return{node:j,index:O-1,offset:_-j.nodeSize}}},{key:"resolve",value:function(g){return pe.resolveCached(this,g)}},{key:"resolveNoCache",value:function(g){return pe.resolve(this,g)}},{key:"rangeHasMark",value:function(g,w,O){var _=!1;return w>g&&this.nodesBetween(g,w,function(j){return O.isInSet(j.marks)&&(_=!0),!_}),_}},{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()+")"),dt(this.marks,g)}},{key:"contentMatchAt",value:function(g){var w=this.type.contentMatch.matchFragment(this.content,0,g);if(!w)throw new Error("Called contentMatchAt on a node with invalid content");return w}},{key:"canReplace",value:function(g,w){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ge.empty,_=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,j=arguments.length>4&&arguments[4]!==void 0?arguments[4]:O.childCount,X=this.contentMatchAt(g).matchFragment(O,_,j),ue=X&&X.matchFragment(this.content,w);if(!ue||!ue.validEnd)return!1;for(var ve=_;ve<j;ve++)if(!this.type.allowsMarks(O.child(ve).marks))return!1;return!0}},{key:"canReplaceWith",value:function(g,w,O,_){if(_&&!this.type.allowsMarks(_))return!1;var j=this.contentMatchAt(g).matchType(O),X=j&&j.matchFragment(this.content,w);return X?X.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=Be.none,w=0;w<this.marks.length;w++){var O=this.marks[w];O.type.checkAttrs(O.attrs),g=O.addToSet(g)}if(!Be.sameSet(g,this.marks))throw new RangeError("Invalid collection of marks for node ".concat(this.type.name,": ").concat(this.marks.map(function(_){return _.type.name})));this.content.forEach(function(_){return _.check()})}},{key:"toJSON",value:function(){var g={type:this.type.name};for(var w 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(O){return O.toJSON()})),g}}],[{key:"fromJSON",value:function(g,w){if(!w)throw new RangeError("Invalid input for Node.fromJSON");var O=void 0;if(w.marks){if(!Array.isArray(w.marks))throw new RangeError("Invalid mark data for Node.fromJSON");O=w.marks.map(g.markFromJSON)}if(w.type=="text"){if(typeof w.text!="string")throw new RangeError("Invalid text node in JSON");return g.text(w.text,O)}var _=ge.fromJSON(g,w.content),j=g.nodeType(w.type).create(w.attrs,_,O);return j.type.checkAttrs(j.attrs),j}}]),I}();Pe.prototype.text=void 0;var at=function(I){a(g,I);var M=o(g);function g(w,O,_,j){var X;if(F(this,g),X=M.call(this,w,O,null,j),!_)throw new RangeError("Empty text nodes are not allowed");return X.text=_,X}return Y(g,[{key:"toString",value:function(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):dt(this.marks,JSON.stringify(this.text))}},{key:"textContent",get:function(){return this.text}},{key:"textBetween",value:function(O,_){return this.text.slice(O,_)}},{key:"nodeSize",get:function(){return this.text.length}},{key:"mark",value:function(O){return O==this.marks?this:new g(this.type,this.attrs,this.text,O)}},{key:"withText",value:function(O){return O==this.text?this:new g(this.type,this.attrs,O,this.marks)}},{key:"cut",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.text.length;return O==0&&_==this.text.length?this:this.withText(this.text.slice(O,_))}},{key:"eq",value:function(O){return this.sameMarkup(O)&&this.text==O.text}},{key:"toJSON",value:function(){var O=n(E(g.prototype),"toJSON",this).call(this);return O.text=this.text,O}}]),g}(Pe);function dt(I,M){for(var g=I.length-1;g>=0;g--)M=I[g].type.name+"("+M+")";return M}var ot=function(){function I(M){F(this,I),this.validEnd=M,this.next=[],this.wrapCache=[]}return Y(I,[{key:"matchType",value:function(g){for(var w=0;w<this.next.length;w++)if(this.next[w].type==g)return this.next[w].next;return null}},{key:"matchFragment",value:function(g){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.childCount,_=this,j=w;_&&j<O;j++)_=_.matchType(g.child(j).type);return _}},{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 w=this.next[g].type;if(!(w.isText||w.hasRequiredAttrs()))return w}return null}},{key:"compatible",value:function(g){for(var w=0;w<this.next.length;w++)for(var O=0;O<g.next.length;O++)if(this.next[w].type==g.next[O].type)return!0;return!1}},{key:"fillBefore",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=[this];function j(X,ue){var ve=X.matchFragment(g,O);if(ve&&(!w||ve.validEnd))return ge.from(ue.map(function(Ht){return Ht.createAndFill()}));for(var Ne=0;Ne<X.next.length;Ne++){var De=X.next[Ne],_e=De.type,nt=De.next;if(!(_e.isText||_e.hasRequiredAttrs())&&_.indexOf(nt)==-1){_.push(nt);var kt=j(nt,ue.concat(_e));if(kt)return kt}}return null}return j(this,[])}},{key:"findWrapping",value:function(g){for(var w=0;w<this.wrapCache.length;w+=2)if(this.wrapCache[w]==g)return this.wrapCache[w+1];var O=this.computeWrapping(g);return this.wrapCache.push(g,O),O}},{key:"computeWrapping",value:function(g){for(var w=Object.create(null),O=[{match:this,type:null,via:null}];O.length;){var _=O.shift(),j=_.match;if(j.matchType(g)){for(var X=[],ue=_;ue.type;ue=ue.via)X.push(ue.type);return X.reverse()}for(var ve=0;ve<j.next.length;ve++){var Ne=j.next[ve],De=Ne.type,_e=Ne.next;!De.isLeaf&&!De.hasRequiredAttrs()&&!(De.name in w)&&(!_.type||_e.validEnd)&&(O.push({match:De.contentMatch,type:De,via:_}),w[De.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 w(O){g.push(O);for(var _=0;_<O.next.length;_++)g.indexOf(O.next[_].next)==-1&&w(O.next[_].next)}return w(this),g.map(function(O,_){for(var j=_+(O.validEnd?"*":" ")+" ",X=0;X<O.next.length;X++)j+=(X?", ":"")+O.next[X].type.name+"->"+g.indexOf(O.next[X].next);return j}).join(`
|
|
673
|
-
`)}}],[{key:"parse",value:function(g,w){var O=new Vt(g,w);if(O.next==null)return I.empty;var _=gt(O);O.next&&O.err("Unexpected trailing text");var j=$e(Zr(_));return it(j,O),j}}]),I}();ot.empty=new ot(!0);var Vt=function(){function I(M,g){F(this,I),this.string=M,this.nodeTypes=g,this.inline=null,this.pos=0,this.tokens=M.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}return Y(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 gt(I){var M=[];do M.push(lr(I));while(I.eat("|"));return M.length==1?M[0]:{type:"choice",exprs:M}}function lr(I){var M=[];do M.push($t(I));while(I.next&&I.next!=")"&&I.next!="|");return M.length==1?M[0]:{type:"seq",exprs:M}}function $t(I){for(var M=En(I);;)if(I.eat("+"))M={type:"plus",expr:M};else if(I.eat("*"))M={type:"star",expr:M};else if(I.eat("?"))M={type:"opt",expr:M};else if(I.eat("{"))M=At(I,M);else break;return M}function ur(I){/\D/.test(I.next)&&I.err("Expected number, got '"+I.next+"'");var M=Number(I.next);return I.pos++,M}function At(I,M){var g=ur(I),w=g;return I.eat(",")&&(I.next!="}"?w=ur(I):w=-1),I.eat("}")||I.err("Unclosed braced range"),{type:"range",min:g,max:w,expr:M}}function cr(I,M){var g=I.nodeTypes,w=g[M];if(w)return[w];var O=[];for(var _ in g){var j=g[_];j.isInGroup(M)&&O.push(j)}return O.length==0&&I.err("No node type or group '"+M+"' found"),O}function En(I){if(I.eat("(")){var M=gt(I);return I.eat(")")||I.err("Missing closing paren"),M}else if(/\W/.test(I.next))I.err("Unexpected token '"+I.next+"'");else{var g=cr(I,I.next).map(function(w){return I.inline==null?I.inline=w.isInline:I.inline!=w.isInline&&I.err("Mixing inline and block content"),{type:"name",value:w}});return I.pos++,g.length==1?g[0]:{type:"choice",exprs:g}}}function Zr(I){var M=[[]];return O(_(I,0),g()),M;function g(){return M.push([])-1}function w(j,X,ue){var ve={term:ue,to:X};return M[j].push(ve),ve}function O(j,X){j.forEach(function(ue){return ue.to=X})}function _(j,X){if(j.type=="choice")return j.exprs.reduce(function(zn,Xn){return zn.concat(_(Xn,X))},[]);if(j.type=="seq")for(var ue=0;;ue++){var ve=_(j.exprs[ue],X);if(ue==j.exprs.length-1)return ve;O(ve,X=g())}else if(j.type=="star"){var Ne=g();return w(X,Ne),O(_(j.expr,Ne),Ne),[w(Ne)]}else if(j.type=="plus"){var De=g();return O(_(j.expr,X),De),O(_(j.expr,De),De),[w(De)]}else{if(j.type=="opt")return[w(X)].concat(_(j.expr,X));if(j.type=="range"){for(var _e=X,nt=0;nt<j.min;nt++){var kt=g();O(_(j.expr,_e),kt),_e=kt}if(j.max==-1)O(_(j.expr,_e),_e);else for(var Ht=j.min;Ht<j.max;Ht++){var tn=g();w(_e,tn),O(_(j.expr,_e),tn),_e=tn}return[w(_e)]}else{if(j.type=="name")return[w(X,void 0,j.value)];throw new Error("Unknown expr type")}}}}function Zt(I,M){return M-I}function ze(I,M){var g=[];return w(M),g.sort(Zt);function w(O){var _=I[O];if(_.length==1&&!_[0].term)return w(_[0].to);g.push(O);for(var j=0;j<_.length;j++){var X=_[j],ue=X.term,ve=X.to;!ue&&g.indexOf(ve)==-1&&w(ve)}}}function $e(I){var M=Object.create(null);return g(ze(I,0));function g(w){var O=[];w.forEach(function(ue){I[ue].forEach(function(ve){var Ne=ve.term,De=ve.to;if(Ne){for(var _e,nt=0;nt<O.length;nt++)O[nt][0]==Ne&&(_e=O[nt][1]);ze(I,De).forEach(function(kt){_e||O.push([Ne,_e=[]]),_e.indexOf(kt)==-1&&_e.push(kt)})}})});for(var _=M[w.join(",")]=new ot(w.indexOf(I.length-1)>-1),j=0;j<O.length;j++){var X=O[j][1].sort(Zt);_.next.push({type:O[j][0],next:M[X.join(",")]||g(X)})}return _}}function it(I,M){for(var g=0,w=[I];g<w.length;g++){for(var O=w[g],_=!O.validEnd,j=[],X=0;X<O.next.length;X++){var ue=O.next[X],ve=ue.type,Ne=ue.next;j.push(ve.name),_&&!(ve.isText||ve.hasRequiredAttrs())&&(_=!1),w.indexOf(Ne)==-1&&w.push(Ne)}_&&M.err("Only non-generatable nodes ("+j.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ct(I){var M=Object.create(null);for(var g in I){var w=I[g];if(!w.hasDefault)return null;M[g]=w.default}return M}function xt(I,M){var g=Object.create(null);for(var w in I){var O=M&&M[w];if(O===void 0){var _=I[w];if(_.hasDefault)O=_.default;else throw new RangeError("No value supplied for attribute "+w)}g[w]=O}return g}function mr(I,M,g,w){for(var O in M)if(!(O in I))throw new RangeError("Unsupported attribute ".concat(O," for ").concat(g," of type ").concat(O));for(var _ in I){var j=I[_];j.validate&&j.validate(M[_])}}function Ft(I,M){var g=Object.create(null);if(M)for(var w in M)g[w]=new pn(I,w,M[w]);return g}var Ut=function(){function I(M,g,w){F(this,I),this.name=M,this.schema=g,this.spec=w,this.markSet=null,this.groups=w.group?w.group.split(" "):[],this.attrs=Ft(M,w.attrs),this.defaultAttrs=ct(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(w.inline||M=="text"),this.isText=M=="text"}return Y(I,[{key:"isInline",get:function(){return!this.isBlock}},{key:"isTextblock",get:function(){return this.isBlock&&this.inlineContent}},{key:"isLeaf",get:function(){return this.contentMatch==ot.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:xt(this.attrs,g)}},{key:"create",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,w=arguments.length>1?arguments[1]:void 0,O=arguments.length>2?arguments[2]:void 0;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Pe(this,this.computeAttrs(g),ge.from(w),Be.setFrom(O))}},{key:"createChecked",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,w=arguments.length>1?arguments[1]:void 0,O=arguments.length>2?arguments[2]:void 0;return w=ge.from(w),this.checkContent(w),new Pe(this,this.computeAttrs(g),w,Be.setFrom(O))}},{key:"createAndFill",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,w=arguments.length>1?arguments[1]:void 0,O=arguments.length>2?arguments[2]:void 0;if(g=this.computeAttrs(g),w=ge.from(w),w.size){var _=this.contentMatch.fillBefore(w);if(!_)return null;w=_.append(w)}var j=this.contentMatch.matchFragment(w),X=j&&j.fillBefore(ge.empty,!0);return X?new Pe(this,g,w.append(X),Be.setFrom(O)):null}},{key:"validContent",value:function(g){var w=this.contentMatch.matchFragment(g);if(!w||!w.validEnd)return!1;for(var O=0;O<g.childCount;O++)if(!this.allowsMarks(g.child(O).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){mr(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 w=0;w<g.length;w++)if(!this.allowsMarkType(g[w].type))return!1;return!0}},{key:"allowedMarks",value:function(g){if(this.markSet==null)return g;for(var w,O=0;O<g.length;O++)this.allowsMarkType(g[O].type)?w&&w.push(g[O]):w||(w=g.slice(0,O));return w?w.length?w:Be.none:g}}],[{key:"compile",value:function(g,w){var O=Object.create(null);g.forEach(function(X,ue){return O[X]=new I(X,w,ue)});var _=w.spec.topNode||"doc";if(!O[_])throw new RangeError("Schema is missing its top node type ('"+_+"')");if(!O.text)throw new RangeError("Every schema needs a 'text' type");for(var j in O.text.attrs)throw new RangeError("The text node type should not have attributes");return O}}]),I}();function Pr(I,M,g){var w=g.split("|");return function(O){var _=O===null?"null":P(O);if(w.indexOf(_)<0)throw new RangeError("Expected value of type ".concat(w," for attribute ").concat(M," on type ").concat(I,", got ").concat(_))}}var pn=function(){function I(M,g,w){F(this,I),this.hasDefault=Object.prototype.hasOwnProperty.call(w,"default"),this.default=w.default,this.validate=typeof w.validate=="string"?Pr(M,g,w.validate):w.validate}return Y(I,[{key:"isRequired",get:function(){return!this.hasDefault}}]),I}(),Qt=function(){function I(M,g,w,O){F(this,I),this.name=M,this.rank=g,this.schema=w,this.spec=O,this.attrs=Ft(M,O.attrs),this.excluded=null;var _=ct(this.attrs);this.instance=_?new Be(this,_):null}return Y(I,[{key:"create",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return!g&&this.instance?this.instance:new Be(this,xt(this.attrs,g))}},{key:"removeFromSet",value:function(g){for(var w=0;w<g.length;w++)g[w].type==this&&(g=g.slice(0,w).concat(g.slice(w+1)),w--);return g}},{key:"isInSet",value:function(g){for(var w=0;w<g.length;w++)if(g[w].type==this)return g[w]}},{key:"checkAttrs",value:function(g){mr(this.attrs,g,"mark",this.name)}},{key:"excludes",value:function(g){return this.excluded.indexOf(g)>-1}}],[{key:"compile",value:function(g,w){var O=Object.create(null),_=0;return g.forEach(function(j,X){return O[j]=new I(j,_++,w,X)}),O}}]),I}(),Br=function(){function I(M){F(this,I),this.linebreakReplacement=null,this.cached=Object.create(null);var g=this.spec={};for(var w in M)g[w]=M[w];g.nodes=le.from(M.nodes),g.marks=le.from(M.marks||{}),this.nodes=Ut.compile(this.spec.nodes,this),this.marks=Qt.compile(this.spec.marks,this);var O=Object.create(null);for(var _ in this.nodes){if(_ in this.marks)throw new RangeError(_+" can not be both a node and a mark");var j=this.nodes[_],X=j.spec.content||"",ue=j.spec.marks;if(j.contentMatch=O[X]||(O[X]=ot.parse(X,this.nodes)),j.inlineContent=j.contentMatch.inlineContent,j.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!j.isInline||!j.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=j}j.markSet=ue=="_"?null:ue?Mn(this,ue.split(" ")):ue==""||!j.inlineContent?[]:null}for(var ve in this.marks){var Ne=this.marks[ve],De=Ne.spec.excludes;Ne.excluded=De==null?[Ne]:De==""?[]:Mn(this,De.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}return Y(I,[{key:"node",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,O=arguments.length>2?arguments[2]:void 0,_=arguments.length>3?arguments[3]:void 0;if(typeof g=="string")g=this.nodeType(g);else if(g instanceof Ut){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(w,O,_)}},{key:"text",value:function(g,w){var O=this.nodes.text;return new at(O,O.defaultAttrs,g,Be.setFrom(w))}},{key:"mark",value:function(g,w){return typeof g=="string"&&(g=this.marks[g]),g.create(w)}},{key:"nodeFromJSON",value:function(g){return Pe.fromJSON(this,g)}},{key:"markFromJSON",value:function(g){return Be.fromJSON(this,g)}},{key:"nodeType",value:function(g){var w=this.nodes[g];if(!w)throw new RangeError("Unknown node type: "+g);return w}}]),I}();function Mn(I,M){for(var g=[],w=0;w<M.length;w++){var O=M[w],_=I.marks[O],j=_;if(_)g.push(_);else for(var X in I.marks){var ue=I.marks[X];(O=="_"||ue.spec.group&&ue.spec.group.split(" ").indexOf(O)>-1)&&g.push(j=ue)}if(!j)throw new SyntaxError("Unknown mark type: '"+M[w]+"'")}return g}function vn(I){return I.tag!=null}function Qr(I){return I.style!=null}var Wr=function(){function I(M,g){var w=this;F(this,I),this.schema=M,this.rules=g,this.tags=[],this.styles=[];var O=this.matchedStyles=[];g.forEach(function(_){if(vn(_))w.tags.push(_);else if(Qr(_)){var j=/[^=]*/.exec(_.style)[0];O.indexOf(j)<0&&O.push(j),w.styles.push(_)}}),this.normalizeLists=!this.tags.some(function(_){if(!/^(ul|ol)\b/.test(_.tag)||!_.node)return!1;var j=M.nodes[_.node];return j.contentMatch.matchType(j)})}return Y(I,[{key:"parse",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=new D(this,w,!1);return O.addAll(g,Be.none,w.from,w.to),O.finish()}},{key:"parseSlice",value:function(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=new D(this,w,!0);return O.addAll(g,Be.none,w.from,w.to),ut.maxOpen(O.finish())}},{key:"matchTag",value:function(g,w,O){for(var _=O?this.tags.indexOf(O)+1:0;_<this.tags.length;_++){var j=this.tags[_];if(H(g,j.tag)&&(j.namespace===void 0||g.namespaceURI==j.namespace)&&(!j.context||w.matchesContext(j.context))){if(j.getAttrs){var X=j.getAttrs(g);if(X===!1)continue;j.attrs=X||void 0}return j}}}},{key:"matchStyle",value:function(g,w,O,_){for(var j=_?this.styles.indexOf(_)+1:0;j<this.styles.length;j++){var X=this.styles[j],ue=X.style;if(!(ue.indexOf(g)!=0||X.context&&!O.matchesContext(X.context)||ue.length>g.length&&(ue.charCodeAt(g.length)!=61||ue.slice(g.length+1)!=w))){if(X.getAttrs){var ve=X.getAttrs(w);if(ve===!1)continue;X.attrs=ve||void 0}return X}}}}],[{key:"schemaRules",value:function(g){var w=[];function O(ve){for(var Ne=ve.priority==null?50:ve.priority,De=0;De<w.length;De++){var _e=w[De],nt=_e.priority==null?50:_e.priority;if(nt<Ne)break}w.splice(De,0,ve)}var _=function(Ne){var De=g.marks[Ne].spec.parseDOM;De&&De.forEach(function(_e){O(_e=K(_e)),_e.mark||_e.ignore||_e.clearMark||(_e.mark=Ne)})};for(var j in g.marks)_(j);var X=function(Ne){var De=g.nodes[Ne].spec.parseDOM;De&&De.forEach(function(_e){O(_e=K(_e)),_e.node||_e.ignore||_e.mark||(_e.node=Ne)})};for(var ue in g.nodes)X(ue);return w}},{key:"fromSchema",value:function(g){return g.cached.domParser||(g.cached.domParser=new I(g,I.schemaRules(g)))}}]),I}(),Fr={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},er={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},en={ol:!0,ul:!0},qt=1,fr=2,$=4;function W(I,M,g){return M!=null?(M?qt:0)|(M==="full"?fr:0):I&&I.whitespace=="pre"?qt|fr:g&-5}var R=function(){function I(M,g,w,O,_,j){F(this,I),this.type=M,this.attrs=g,this.marks=w,this.solid=O,this.options=j,this.content=[],this.activeMarks=Be.none,this.match=_||(j&$?null:M.contentMatch)}return Y(I,[{key:"findWrapping",value:function(g){if(!this.match){if(!this.type)return[];var w=this.type.contentMatch.fillBefore(ge.from(g));if(w)this.match=this.type.contentMatch.matchFragment(w);else{var O=this.type.contentMatch,_;return(_=O.findWrapping(g.type))?(this.match=O,_):null}}return this.match.findWrapping(g.type)}},{key:"finish",value:function(g){if(!(this.options&qt)){var w=this.content[this.content.length-1],O;if(w&&w.isText&&(O=/[ \t\r\n\u000c]+$/.exec(w.text))){var _=w;w.text.length==O[0].length?this.content.pop():this.content[this.content.length-1]=_.withText(_.text.slice(0,_.text.length-O[0].length))}}var j=ge.from(this.content);return!g&&this.match&&(j=j.append(this.match.fillBefore(ge.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&&!Fr.hasOwnProperty(g.parentNode.nodeName.toLowerCase())}}]),I}(),D=function(){function I(M,g,w){F(this,I),this.parser=M,this.options=g,this.isOpen=w,this.open=0,this.localPreserveWS=!1;var O=g.topNode,_,j=W(null,g.preserveWhitespace,0)|(w?$:0);O?_=new R(O.type,O.attrs,Be.none,!0,g.topMatch||O.type.contentMatch,j):w?_=new R(null,null,Be.none,!0,null,j):_=new R(M.schema.topNodeType,null,Be.none,!0,null,j),this.nodes=[_],this.find=g.findPositions,this.needsBlock=!1}return Y(I,[{key:"top",get:function(){return this.nodes[this.open]}},{key:"addDOM",value:function(g,w){g.nodeType==3?this.addTextNode(g,w):g.nodeType==1&&this.addElement(g,w)}},{key:"addTextNode",value:function(g,w){var O=g.nodeValue,_=this.top,j=_.options&fr?"full":this.localPreserveWS||(_.options&qt)>0;if(j==="full"||_.inlineContext(g)||/[^ \t\r\n\u000c]/.test(O)){if(j)j!=="full"?O=O.replace(/\r?\n|\r/g," "):O=O.replace(/\r\n?/g,`
|
|
674
|
-
`);else if(O=O.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(O)&&this.open==this.nodes.length-1){var X=_.content[_.content.length-1],ue=g.previousSibling;(!X||ue&&ue.nodeName=="BR"||X.isText&&/[ \t\r\n\u000c]$/.test(X.text))&&(O=O.slice(1))}O&&this.insertNode(this.parser.schema.text(O),w,!/\S/.test(O)),this.findInText(g)}else this.findInside(g)}},{key:"addElement",value:function(g,w,O){var _=this.localPreserveWS,j=this.top;(g.tagName=="PRE"||/pre/.test(g.style&&g.style.whiteSpace))&&(this.localPreserveWS=!0);var X=g.nodeName.toLowerCase(),ue;en.hasOwnProperty(X)&&this.parser.normalizeLists&&B(g);var ve=this.options.ruleFromNode&&this.options.ruleFromNode(g)||(ue=this.parser.matchTag(g,this,O));e:if(ve?ve.ignore:er.hasOwnProperty(X))this.findInside(g),this.ignoreFallback(g,w);else if(!ve||ve.skip||ve.closeParent){ve&&ve.closeParent?this.open=Math.max(0,this.open-1):ve&&ve.skip.nodeType&&(g=ve.skip);var Ne,De=this.needsBlock;if(Fr.hasOwnProperty(X))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,w);break e}var _e=ve&&ve.skip?w:this.readStyles(g,w);_e&&this.addAll(g,_e),Ne&&this.sync(j),this.needsBlock=De}else{var nt=this.readStyles(g,w);nt&&this.addElementByRule(g,ve,nt,ve.consuming===!1?ue:void 0)}this.localPreserveWS=_}},{key:"leafFallback",value:function(g,w){g.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(g.ownerDocument.createTextNode(`
|
|
675
|
-
`),w)}},{key:"ignoreFallback",value:function(g,w){g.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),w,!0)}},{key:"readStyles",value:function(g,w){var O=this,_=g.style;if(_&&_.length)for(var j=0;j<this.parser.matchedStyles.length;j++){var X=this.parser.matchedStyles[j],ue=_.getPropertyValue(X);if(ue){for(var ve=function(nt){var kt=O.parser.matchStyle(X,ue,O,nt);if(!kt)return De=nt,0;if(kt.ignore)return{v:null};if(kt.clearMark?w=w.filter(function(Ht){return!kt.clearMark(Ht)}):w=w.concat(O.parser.schema.marks[kt.mark].create(kt.attrs)),kt.consuming===!1)nt=kt;else return De=nt,0;De=nt},Ne,De=void 0;Ne=ve(De),Ne!==0;)if(Ne)return Ne.v}}return w}},{key:"addElementByRule",value:function(g,w,O,_){var j=this,X,ue;if(w.node)if(ue=this.parser.schema.nodes[w.node],ue.isLeaf)this.insertNode(ue.create(w.attrs),O,g.nodeName=="BR")||this.leafFallback(g,O);else{var ve=this.enter(ue,w.attrs||null,O,w.preserveWhitespace);ve&&(X=!0,O=ve)}else{var Ne=this.parser.schema.marks[w.mark];O=O.concat(Ne.create(w.attrs))}var De=this.top;if(ue&&ue.isLeaf)this.findInside(g);else if(_)this.addElement(g,O,_);else if(w.getContent)this.findInside(g),w.getContent(g,this.parser.schema).forEach(function(nt){return j.insertNode(nt,O,!1)});else{var _e=g;typeof w.contentElement=="string"?_e=g.querySelector(w.contentElement):typeof w.contentElement=="function"?_e=w.contentElement(g):w.contentElement&&(_e=w.contentElement),this.findAround(g,_e,!0),this.addAll(_e,O),this.findAround(g,_e,!1)}X&&this.sync(De)&&this.open--}},{key:"addAll",value:function(g,w,O,_){for(var j=O||0,X=O?g.childNodes[O]:g.firstChild,ue=_==null?null:g.childNodes[_];X!=ue;X=X.nextSibling,++j)this.findAtPoint(g,j),this.addDOM(X,w);this.findAtPoint(g,j)}},{key:"findPlace",value:function(g,w,O){for(var _,j,X=this.open,ue=0;X>=0;X--){var ve=this.nodes[X],Ne=ve.findWrapping(g);if(Ne&&(!_||_.length>Ne.length+ue)&&(_=Ne,j=ve,!Ne.length))break;if(ve.solid){if(O)break;ue+=2}}if(!_)return null;this.sync(j);for(var De=0;De<_.length;De++)w=this.enterInner(_[De],null,w,!1);return w}},{key:"insertNode",value:function(g,w,O){if(g.isInline&&this.needsBlock&&!this.top.type){var _=this.textblockFromContext();_&&(w=this.enterInner(_,null,w))}var j=this.findPlace(g,w,O);if(j){this.closeExtra();var X=this.top;X.match&&(X.match=X.match.matchType(g.type));var ue=Be.none,ve=r(j.concat(g.marks)),Ne;try{for(ve.s();!(Ne=ve.n()).done;){var De=Ne.value;(X.type?X.type.allowsMarkType(De.type):de(De.type,g.type))&&(ue=De.addToSet(ue))}}catch(_e){ve.e(_e)}finally{ve.f()}return X.content.push(g.mark(ue)),!0}return!1}},{key:"enter",value:function(g,w,O,_){var j=this.findPlace(g.create(w),O,!1);return j&&(j=this.enterInner(g,w,O,!0,_)),j}},{key:"enterInner",value:function(g,w,O){var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,j=arguments.length>4?arguments[4]:void 0;this.closeExtra();var X=this.top;X.match=X.match&&X.match.matchType(g);var ue=W(g,j,X.options);X.options&$&&X.content.length==0&&(ue|=$);var ve=Be.none;return O=O.filter(function(Ne){return(X.type?X.type.allowsMarkType(Ne.type):de(Ne.type,g))?(ve=Ne.addToSet(ve),!1):!0}),this.nodes.push(new R(g,w,ve,_,null,ue)),this.open++,O}},{key:"closeExtra",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,w=this.nodes.length-1;if(w>this.open){for(;w>this.open;w--)this.nodes[w-1].content.push(this.nodes[w].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 w=this.open;w>=0;w--){if(this.nodes[w]==g)return this.open=w,!0;this.localPreserveWS&&(this.nodes[w].options|=qt)}return!1}},{key:"currentPos",get:function(){this.closeExtra();for(var g=0,w=this.open;w>=0;w--){for(var O=this.nodes[w].content,_=O.length-1;_>=0;_--)g+=O[_].nodeSize;w&&g++}return g}},{key:"findAtPoint",value:function(g,w){if(this.find)for(var O=0;O<this.find.length;O++)this.find[O].node==g&&this.find[O].offset==w&&(this.find[O].pos=this.currentPos)}},{key:"findInside",value:function(g){if(this.find)for(var w=0;w<this.find.length;w++)this.find[w].pos==null&&g.nodeType==1&&g.contains(this.find[w].node)&&(this.find[w].pos=this.currentPos)}},{key:"findAround",value:function(g,w,O){if(g!=w&&this.find){for(var _=0;_<this.find.length;_++)if(this.find[_].pos==null&&g.nodeType==1&&g.contains(this.find[_].node)){var j=w.compareDocumentPosition(this.find[_].node);j&(O?2:4)&&(this.find[_].pos=this.currentPos)}}}},{key:"findInText",value:function(g){if(this.find)for(var w=0;w<this.find.length;w++)this.find[w].node==g&&(this.find[w].pos=this.currentPos-(g.nodeValue.length-this.find[w].offset))}},{key:"matchesContext",value:function(g){var w=this;if(g.indexOf("|")>-1)return g.split(/\s*\|\s*/).some(this.matchesContext,this);var O=g.split("/"),_=this.options.context,j=!this.isOpen&&(!_||_.parent.type==this.nodes[0].type),X=-(_?_.depth+1:0)+(j?0:1),ue=function ve(Ne,De){for(;Ne>=0;Ne--){var _e=O[Ne];if(_e==""){if(Ne==O.length-1||Ne==0)continue;for(;De>=X;De--)if(ve(Ne-1,De))return!0;return!1}else{var nt=De>0||De==0&&j?w.nodes[De].type:_&&De>=X?_.node(De-X).type:null;if(!nt||nt.name!=_e&&!nt.isInGroup(_e))return!1;De--}}return!0};return ue(O.length-1,this.open)}},{key:"textblockFromContext",value:function(){var g=this.options.context;if(g)for(var w=g.depth;w>=0;w--){var O=g.node(w).contentMatchAt(g.indexAfter(w)).defaultType;if(O&&O.isTextblock&&O.defaultAttrs)return O}for(var _ in this.parser.schema.nodes){var j=this.parser.schema.nodes[_];if(j.isTextblock&&j.defaultAttrs)return j}}}]),I}();function B(I){for(var M=I.firstChild,g=null;M;M=M.nextSibling){var w=M.nodeType==1?M.nodeName.toLowerCase():null;w&&en.hasOwnProperty(w)&&g?(g.appendChild(M),M=g):w=="li"?g=M:w&&(g=null)}}function H(I,M){return(I.matches||I.msMatchesSelector||I.webkitMatchesSelector||I.mozMatchesSelector).call(I,M)}function K(I){var M={};for(var g in I)M[g]=I[g];return M}function de(I,M){var g=M.schema.nodes,w=function(){var X=g[_];if(!X.allowsMarkType(I))return 0;var ue=[],ve=function Ne(De){ue.push(De);for(var _e=0;_e<De.edgeCount;_e++){var nt=De.edge(_e),kt=nt.type,Ht=nt.next;if(kt==M||ue.indexOf(Ht)<0&&Ne(Ht))return!0}};if(ve(X.contentMatch))return{v:!0}},O;for(var _ in g)if(O=w(),O!==0&&O)return O.v}var xe=function(){function I(M,g){F(this,I),this.nodes=M,this.marks=g}return Y(I,[{key:"serializeFragment",value:function(g){var w=this,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=arguments.length>2?arguments[2]:void 0;_||(_=J(O).createDocumentFragment());var j=_,X=[];return g.forEach(function(ue){if(X.length||ue.marks.length){for(var ve=0,Ne=0;ve<X.length&&Ne<ue.marks.length;){var De=ue.marks[Ne];if(!w.marks[De.type.name]){Ne++;continue}if(!De.eq(X[ve][0])||De.type.spec.spanning===!1)break;ve++,Ne++}for(;ve<X.length;)j=X.pop()[1];for(;Ne<ue.marks.length;){var _e=ue.marks[Ne++],nt=w.serializeMark(_e,ue.isInline,O);nt&&(X.push([_e,j]),j.appendChild(nt.dom),j=nt.contentDOM||nt.dom)}}j.appendChild(w.serializeNodeInner(ue,O))}),_}},{key:"serializeNodeInner",value:function(g,w){var O=Ye(J(w),this.nodes[g.type.name](g),null,g.attrs),_=O.dom,j=O.contentDOM;if(j){if(g.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(g.content,w,j)}return _}},{key:"serializeNode",value:function(g){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=this.serializeNodeInner(g,w),_=g.marks.length-1;_>=0;_--){var j=this.serializeMark(g.marks[_],g.isInline,w);j&&((j.contentDOM||j.dom).appendChild(O),O=j.dom)}return O}},{key:"serializeMark",value:function(g,w){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},_=this.marks[g.type.name];return _&&Ye(J(O),_(g,w),null,g.attrs)}}],[{key:"renderSpec",value:function(g,w){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,_=arguments.length>3?arguments[3]:void 0;return Ye(g,w,O,_)}},{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 w=ne(g.nodes);return w.text||(w.text=function(O){return O.text}),w}},{key:"marksFromSchema",value:function(g){return ne(g.marks)}}]),I}();function ne(I){var M={};for(var g in I){var w=I[g].spec.toDOM;w&&(M[g]=w)}return M}function J(I){return I.document||window.document}var me=new WeakMap;function Ce(I){var M=me.get(I);return M===void 0&&me.set(I,M=He(I)),M}function He(I){var M=null;function g(w){if(w&&P(w)=="object")if(Array.isArray(w))if(typeof w[0]=="string")M||(M=[]),M.push(w);else for(var O=0;O<w.length;O++)g(w[O]);else for(var _ in w)g(w[_])}return g(I),M}function Ye(I,M,g,w){if(typeof M=="string")return{dom:I.createTextNode(M)};if(M.nodeType!=null)return{dom:M};if(M.dom&&M.dom.nodeType!=null)return M;var O=M[0],_;if(typeof O!="string")throw new RangeError("Invalid array passed to renderSpec");if(w&&(_=Ce(w))&&_.indexOf(M)>-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=O.indexOf(" ");j>0&&(g=O.slice(0,j),O=O.slice(j+1));var X,ue=g?I.createElementNS(g,O):I.createElement(O),ve=M[1],Ne=1;if(ve&&P(ve)=="object"&&ve.nodeType==null&&!Array.isArray(ve)){Ne=2;for(var De in ve)if(ve[De]!=null){var _e=De.indexOf(" ");_e>0?ue.setAttributeNS(De.slice(0,_e),De.slice(_e+1),ve[De]):ue.setAttribute(De,ve[De])}}for(var nt=Ne;nt<M.length;nt++){var kt=M[nt];if(kt===0){if(nt<M.length-1||nt>Ne)throw new RangeError("Content hole must be the only child of its parent node");return{dom:ue,contentDOM:ue}}else{var Ht=Ye(I,kt,g,w),tn=Ht.dom,zn=Ht.contentDOM;if(ue.appendChild(tn),zn){if(X)throw new RangeError("Multiple content holes");X=zn}}}return{dom:ue,contentDOM:X}}return jr.ContentMatch=ot,jr.DOMParser=Wr,jr.DOMSerializer=xe,jr.Fragment=ge,jr.Mark=Be,jr.MarkType=Qt,jr.Node=Pe,jr.NodeRange=Te,jr.NodeType=Ut,jr.ReplaceError=mt,jr.ResolvedPos=pe,jr.Schema=Br,jr.Slice=ut,jr}var cd={},Hy;function Yh(){return Hy||(Hy=1,function(r){function e($){var W=typeof Map=="function"?new Map:void 0;return e=function(D){if(D===null||!n(D))return D;if(typeof D!="function")throw new TypeError("Super expression must either be null or a function");if(typeof W<"u"){if(W.has(D))return W.get(D);W.set(D,B)}function B(){return t(D,arguments,p(this).constructor)}return B.prototype=Object.create(D.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),a(B,D)},e($)}function t($,W,R){return f()?t=Reflect.construct.bind():t=function(B,H,K){var de=[null];de.push.apply(de,H);var xe=Function.bind.apply(B,de),ne=new xe;return K&&a(ne,K.prototype),ne},t.apply(null,arguments)}function n($){try{return Function.toString.call($).indexOf("[native code]")!==-1}catch{return typeof $=="function"}}function i($,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function");$.prototype=Object.create(W&&W.prototype,{constructor:{value:$,writable:!0,configurable:!0}}),Object.defineProperty($,"prototype",{writable:!1}),W&&a($,W)}function a($,W){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,B){return D.__proto__=B,D},a($,W)}function o($){var W=f();return function(){var D=p($),B;if(W){var H=p(this).constructor;B=Reflect.construct(D,arguments,H)}else B=D.apply(this,arguments);return s(this,B)}}function s($,W){if(W&&(k(W)==="object"||typeof W=="function"))return W;if(W!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l($)}function l($){if($===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $}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($){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(R){return R.__proto__||Object.getPrototypeOf(R)},p($)}function k($){"@babel/helpers - typeof";return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},k($)}function T($,W){if(!($ instanceof W))throw new TypeError("Cannot call a class as a function")}function x($,W){for(var R=0;R<W.length;R++){var D=W[R];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty($,P(D.key),D)}}function E($,W,R){return W&&x($.prototype,W),R&&x($,R),Object.defineProperty($,"prototype",{writable:!1}),$}function P($){var W=F($,"string");return k(W)==="symbol"?W:String(W)}function F($,W){if(k($)!=="object"||$===null)return $;var R=$[Symbol.toPrimitive];if(R!==void 0){var D=R.call($,W);if(k(D)!=="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return String($)}var z=Gu(),Y=65535,Z=Math.pow(2,16);function oe($,W){return $+W*Z}function le($){return $&Y}function re($){return($-($&Y))/Z}var he=1,ge=2,ye=4,Re=8,Ze=function(){function $(W,R,D){T(this,$),this.pos=W,this.delInfo=R,this.recover=D}return E($,[{key:"deleted",get:function(){return(this.delInfo&Re)>0}},{key:"deletedBefore",get:function(){return(this.delInfo&(he|ye))>0}},{key:"deletedAfter",get:function(){return(this.delInfo&(ge|ye))>0}},{key:"deletedAcross",get:function(){return(this.delInfo&ye)>0}}]),$}(),Be=function(){function $(W){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(T(this,$),this.ranges=W,this.inverted=R,!W.length&&$.empty)return $.empty}return E($,[{key:"recover",value:function(R){var D=0,B=le(R);if(!this.inverted)for(var H=0;H<B;H++)D+=this.ranges[H*3+2]-this.ranges[H*3+1];return this.ranges[B*3]+D+re(R)}},{key:"mapResult",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this._map(R,D,!1)}},{key:"map",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this._map(R,D,!0)}},{key:"_map",value:function(R,D,B){for(var H=0,K=this.inverted?2:1,de=this.inverted?1:2,xe=0;xe<this.ranges.length;xe+=3){var ne=this.ranges[xe]-(this.inverted?H:0);if(ne>R)break;var J=this.ranges[xe+K],me=this.ranges[xe+de],Ce=ne+J;if(R<=Ce){var He=J?R==ne?-1:R==Ce?1:D:D,Ye=ne+H+(He<0?0:me);if(B)return Ye;var I=R==(D<0?ne:Ce)?null:oe(xe/3,R-ne),M=R==ne?ge:R==Ce?he:ye;return(D<0?R!=ne:R!=Ce)&&(M|=Re),new Ze(Ye,M,I)}H+=me-J}return B?R+H:new Ze(R+H,0,null)}},{key:"touches",value:function(R,D){for(var B=0,H=le(D),K=this.inverted?2:1,de=this.inverted?1:2,xe=0;xe<this.ranges.length;xe+=3){var ne=this.ranges[xe]-(this.inverted?B:0);if(ne>R)break;var J=this.ranges[xe+K],me=ne+J;if(R<=me&&xe==H*3)return!0;B+=this.ranges[xe+de]-J}return!1}},{key:"forEach",value:function(R){for(var D=this.inverted?2:1,B=this.inverted?1:2,H=0,K=0;H<this.ranges.length;H+=3){var de=this.ranges[H],xe=de-(this.inverted?K:0),ne=de+(this.inverted?0:K),J=this.ranges[H+D],me=this.ranges[H+B];R(xe,xe+J,ne,ne+me),K+=me-J}}},{key:"invert",value:function(){return new $(this.ranges,!this.inverted)}},{key:"toString",value:function(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}}],[{key:"offset",value:function(R){return R==0?$.empty:new $(R<0?[0,-R,0]:[0,0,R])}}]),$}();Be.empty=new Be([]);var mt=function(){function $(W,R){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:W?W.length:0;T(this,$),this.mirror=R,this.from=D,this.to=B,this._maps=W||[],this.ownData=!(W||R)}return E($,[{key:"maps",get:function(){return this._maps}},{key:"slice",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.maps.length;return new $(this._maps,this.mirror,R,D)}},{key:"appendMap",value:function(R,D){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(R),D!=null&&this.setMirror(this._maps.length-1,D)}},{key:"appendMapping",value:function(R){for(var D=0,B=this._maps.length;D<R._maps.length;D++){var H=R.getMirror(D);this.appendMap(R._maps[D],H!=null&&H<D?B+H:void 0)}}},{key:"getMirror",value:function(R){if(this.mirror){for(var D=0;D<this.mirror.length;D++)if(this.mirror[D]==R)return this.mirror[D+(D%2?-1:1)]}}},{key:"setMirror",value:function(R,D){this.mirror||(this.mirror=[]),this.mirror.push(R,D)}},{key:"appendMappingInverted",value:function(R){for(var D=R.maps.length-1,B=this._maps.length+R._maps.length;D>=0;D--){var H=R.getMirror(D);this.appendMap(R._maps[D].invert(),H!=null&&H>D?B-H-1:void 0)}}},{key:"invert",value:function(){var R=new $;return R.appendMappingInverted(this),R}},{key:"map",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;if(this.mirror)return this._map(R,D,!0);for(var B=this.from;B<this.to;B++)R=this._maps[B].map(R,D);return R}},{key:"mapResult",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this._map(R,D,!1)}},{key:"_map",value:function(R,D,B){for(var H=0,K=this.from;K<this.to;K++){var de=this._maps[K],xe=de.mapResult(R,D);if(xe.recover!=null){var ne=this.getMirror(K);if(ne!=null&&ne>K&&ne<this.to){K=ne,R=this._maps[ne].recover(xe.recover);continue}}H|=xe.delInfo,R=xe.pos}return B?R:new Ze(R,H,null)}}]),$}(),ut=Object.create(null),vt=function(){function $(){T(this,$)}return E($,[{key:"getMap",value:function(){return Be.empty}},{key:"merge",value:function(R){return null}}],[{key:"fromJSON",value:function(R,D){if(!D||!D.stepType)throw new RangeError("Invalid input for Step.fromJSON");var B=ut[D.stepType];if(!B)throw new RangeError("No step type ".concat(D.stepType," defined"));return B.fromJSON(R,D)}},{key:"jsonID",value:function(R,D){if(R in ut)throw new RangeError("Duplicate use of step JSON ID "+R);return ut[R]=D,D.prototype.jsonID=R,D}}]),$}(),st=function(){function $(W,R){T(this,$),this.doc=W,this.failed=R}return E($,null,[{key:"ok",value:function(R){return new $(R,null)}},{key:"fail",value:function(R){return new $(null,R)}},{key:"fromReplace",value:function(R,D,B,H){try{return $.ok(R.replace(D,B,H))}catch(K){if(K instanceof z.ReplaceError)return $.fail(K.message);throw K}}}]),$}();function Rt($,W,R){for(var D=[],B=0;B<$.childCount;B++){var H=$.child(B);H.content.size&&(H=H.copy(Rt(H.content,W,H))),H.isInline&&(H=W(H,R,B)),D.push(H)}return z.Fragment.fromArray(D)}var _t=function($){i(R,$);var W=o(R);function R(D,B,H){var K;return T(this,R),K=W.call(this),K.from=D,K.to=B,K.mark=H,K}return E(R,[{key:"apply",value:function(B){var H=this,K=B.slice(this.from,this.to),de=B.resolve(this.from),xe=de.node(de.sharedDepth(this.to)),ne=new z.Slice(Rt(K.content,function(J,me){return!J.isAtom||!me.type.allowsMarkType(H.mark.type)?J:J.mark(H.mark.addToSet(J.marks))},xe),K.openStart,K.openEnd);return st.fromReplace(B,this.from,this.to,ne)}},{key:"invert",value:function(){return new Xt(this.from,this.to,this.mark)}},{key:"map",value:function(B){var H=B.mapResult(this.from,1),K=B.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(B){return B instanceof R&&B.mark.eq(this.mark)&&this.from<=B.to&&this.to>=B.from?new R(Math.min(this.from,B.from),Math.max(this.to,B.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(B,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,B.markFromJSON(H.mark))}}]),R}(vt);vt.jsonID("addMark",_t);var Xt=function($){i(R,$);var W=o(R);function R(D,B,H){var K;return T(this,R),K=W.call(this),K.from=D,K.to=B,K.mark=H,K}return E(R,[{key:"apply",value:function(B){var H=this,K=B.slice(this.from,this.to),de=new z.Slice(Rt(K.content,function(xe){return xe.mark(H.mark.removeFromSet(xe.marks))},B),K.openStart,K.openEnd);return st.fromReplace(B,this.from,this.to,de)}},{key:"invert",value:function(){return new _t(this.from,this.to,this.mark)}},{key:"map",value:function(B){var H=B.mapResult(this.from,1),K=B.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(B){return B instanceof R&&B.mark.eq(this.mark)&&this.from<=B.to&&this.to>=B.from?new R(Math.min(this.from,B.from),Math.max(this.to,B.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(B,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,B.markFromJSON(H.mark))}}]),R}(vt);vt.jsonID("removeMark",Xt);var Qe=function($){i(R,$);var W=o(R);function R(D,B){var H;return T(this,R),H=W.call(this),H.pos=D,H.mark=B,H}return E(R,[{key:"apply",value:function(B){var H=B.nodeAt(this.pos);if(!H)return st.fail("No node at mark step's position");var K=H.type.create(H.attrs,null,this.mark.addToSet(H.marks));return st.fromReplace(B,this.pos,this.pos+1,new z.Slice(z.Fragment.from(K),0,H.isLeaf?0:1))}},{key:"invert",value:function(B){var H=B.nodeAt(this.pos);if(H){var K=this.mark.addToSet(H.marks);if(K.length==H.marks.length){for(var de=0;de<H.marks.length;de++)if(!H.marks[de].isInSet(K))return new R(this.pos,H.marks[de]);return new R(this.pos,this.mark)}}return new wt(this.pos,this.mark)}},{key:"map",value:function(B){var H=B.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(B,H){if(typeof H.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new R(H.pos,B.markFromJSON(H.mark))}}]),R}(vt);vt.jsonID("addNodeMark",Qe);var wt=function($){i(R,$);var W=o(R);function R(D,B){var H;return T(this,R),H=W.call(this),H.pos=D,H.mark=B,H}return E(R,[{key:"apply",value:function(B){var H=B.nodeAt(this.pos);if(!H)return st.fail("No node at mark step's position");var K=H.type.create(H.attrs,null,this.mark.removeFromSet(H.marks));return st.fromReplace(B,this.pos,this.pos+1,new z.Slice(z.Fragment.from(K),0,H.isLeaf?0:1))}},{key:"invert",value:function(B){var H=B.nodeAt(this.pos);return!H||!this.mark.isInSet(H.marks)?this:new Qe(this.pos,this.mark)}},{key:"map",value:function(B){var H=B.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(B,H){if(typeof H.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new R(H.pos,B.markFromJSON(H.mark))}}]),R}(vt);vt.jsonID("removeNodeMark",wt);var lt=function($){i(R,$);var W=o(R);function R(D,B,H){var K,de=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return T(this,R),K=W.call(this),K.from=D,K.to=B,K.slice=H,K.structure=de,K}return E(R,[{key:"apply",value:function(B){return this.structure&&Et(B,this.from,this.to)?st.fail("Structure replace would overwrite content"):st.fromReplace(B,this.from,this.to,this.slice)}},{key:"getMap",value:function(){return new Be([this.from,this.to-this.from,this.slice.size])}},{key:"invert",value:function(B){return new R(this.from,this.from+this.slice.size,B.slice(this.from,this.to))}},{key:"map",value:function(B){var H=B.mapResult(this.from,1),K=B.mapResult(this.to,-1);return H.deletedAcross&&K.deletedAcross?null:new R(H.pos,Math.max(H.pos,K.pos),this.slice,this.structure)}},{key:"merge",value:function(B){if(!(B instanceof R)||B.structure||this.structure)return null;if(this.from+this.slice.size==B.from&&!this.slice.openEnd&&!B.slice.openStart){var H=this.slice.size+B.slice.size==0?z.Slice.empty:new z.Slice(this.slice.content.append(B.slice.content),this.slice.openStart,B.slice.openEnd);return new R(this.from,this.to+(B.to-B.from),H,this.structure)}else if(B.to==this.from&&!this.slice.openStart&&!B.slice.openEnd){var K=this.slice.size+B.slice.size==0?z.Slice.empty:new z.Slice(B.slice.content.append(this.slice.content),B.slice.openStart,this.slice.openEnd);return new R(B.from,this.to,K,this.structure)}else return null}},{key:"toJSON",value:function(){var B={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(B.slice=this.slice.toJSON()),this.structure&&(B.structure=!0),B}}],[{key:"fromJSON",value:function(B,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,z.Slice.fromJSON(B,H.slice),!!H.structure)}}]),R}(vt);vt.jsonID("replace",lt);var St=function($){i(R,$);var W=o(R);function R(D,B,H,K,de,xe){var ne,J=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1;return T(this,R),ne=W.call(this),ne.from=D,ne.to=B,ne.gapFrom=H,ne.gapTo=K,ne.slice=de,ne.insert=xe,ne.structure=J,ne}return E(R,[{key:"apply",value:function(B){if(this.structure&&(Et(B,this.from,this.gapFrom)||Et(B,this.gapTo,this.to)))return st.fail("Structure gap-replace would overwrite content");var H=B.slice(this.gapFrom,this.gapTo);if(H.openStart||H.openEnd)return st.fail("Gap is not a flat range");var K=this.slice.insertAt(this.insert,H.content);return K?st.fromReplace(B,this.from,this.to,K):st.fail("Content does not fit in gap")}},{key:"getMap",value:function(){return new Be([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}},{key:"invert",value:function(B){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,B.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}},{key:"map",value:function(B){var H=B.mapResult(this.from,1),K=B.mapResult(this.to,-1),de=this.from==this.gapFrom?H.pos:B.map(this.gapFrom,-1),xe=this.to==this.gapTo?K.pos:B.map(this.gapTo,1);return H.deletedAcross&&K.deletedAcross||de<H.pos||xe>K.pos?null:new R(H.pos,K.pos,de,xe,this.slice,this.insert,this.structure)}},{key:"toJSON",value:function(){var B={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(B.slice=this.slice.toJSON()),this.structure&&(B.structure=!0),B}}],[{key:"fromJSON",value:function(B,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,z.Slice.fromJSON(B,H.slice),H.insert,!!H.structure)}}]),R}(vt);vt.jsonID("replaceAround",St);function Et($,W,R){for(var D=$.resolve(W),B=R-W,H=D.depth;B>0&&H>0&&D.indexAfter(H)==D.node(H).childCount;)H--,B--;if(B>0)for(var K=D.node(H).maybeChild(D.indexAfter(H));B>0;){if(!K||K.isLeaf)return!0;K=K.firstChild,B--}return!1}function vr($,W,R,D){var B=[],H=[],K,de;$.doc.nodesBetween(W,R,function(xe,ne,J){if(xe.isInline){var me=xe.marks;if(!D.isInSet(me)&&J.type.allowsMarkType(D.type)){for(var Ce=Math.max(ne,W),He=Math.min(ne+xe.nodeSize,R),Ye=D.addToSet(me),I=0;I<me.length;I++)me[I].isInSet(Ye)||(K&&K.to==Ce&&K.mark.eq(me[I])?K.to=He:B.push(K=new Xt(Ce,He,me[I])));de&&de.to==Ce?de.to=He:H.push(de=new _t(Ce,He,D))}}}),B.forEach(function(xe){return $.step(xe)}),H.forEach(function(xe){return $.step(xe)})}function ke($,W,R,D){var B=[],H=0;$.doc.nodesBetween(W,R,function(K,de){if(K.isInline){H++;var xe=null;if(D instanceof z.MarkType)for(var ne=K.marks,J;J=D.isInSet(ne);)(xe||(xe=[])).push(J),ne=J.removeFromSet(ne);else D?D.isInSet(K.marks)&&(xe=[D]):xe=K.marks;if(xe&&xe.length)for(var me=Math.min(de+K.nodeSize,R),Ce=0;Ce<xe.length;Ce++){for(var He=xe[Ce],Ye=void 0,I=0;I<B.length;I++){var M=B[I];M.step==H-1&&He.eq(B[I].style)&&(Ye=M)}Ye?(Ye.to=me,Ye.step=H):B.push({style:He,from:Math.max(de,W),to:me,step:H})}}}),B.forEach(function(K){return $.step(new Xt(K.from,K.to,K.style))})}function pe($,W,R){for(var D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:R.contentMatch,B=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,H=$.doc.nodeAt(W),K=[],de=W+1,xe=0;xe<H.childCount;xe++){var ne=H.child(xe),J=de+ne.nodeSize,me=D.matchType(ne.type);if(!me)K.push(new lt(de,J,z.Slice.empty));else{D=me;for(var Ce=0;Ce<ne.marks.length;Ce++)R.allowsMarkType(ne.marks[Ce].type)||$.step(new Xt(de,J,ne.marks[Ce]));if(B&&ne.isText&&R.whitespace!="pre")for(var He=void 0,Ye=/\r?\n|\r/g,I=void 0;He=Ye.exec(ne.text);)I||(I=new z.Slice(z.Fragment.from(R.schema.text(" ",R.allowedMarks(ne.marks))),0,0)),K.push(new lt(de+He.index,de+He.index+He[0].length,I))}de=J}if(!D.validEnd){var M=D.fillBefore(z.Fragment.empty,!0);$.replace(de,de,new z.Slice(M,0,0))}for(var g=K.length-1;g>=0;g--)$.step(K[g])}function ie($,W,R){return(W==0||$.canReplace(W,$.childCount))&&(R==$.childCount||$.canReplace(0,R))}function se($){for(var W=$.parent,R=W.content.cutByIndex($.startIndex,$.endIndex),D=$.depth;;--D){var B=$.$from.node(D),H=$.$from.index(D),K=$.$to.indexAfter(D);if(D<$.depth&&B.canReplace(H,K,R))return D;if(D==0||B.type.spec.isolating||!ie(B,H,K))break}return null}function te($,W,R){for(var D=W.$from,B=W.$to,H=W.depth,K=D.before(H+1),de=B.after(H+1),xe=K,ne=de,J=z.Fragment.empty,me=0,Ce=H,He=!1;Ce>R;Ce--)He||D.index(Ce)>0?(He=!0,J=z.Fragment.from(D.node(Ce).copy(J)),me++):xe--;for(var Ye=z.Fragment.empty,I=0,M=H,g=!1;M>R;M--)g||B.after(M+1)<B.end(M)?(g=!0,Ye=z.Fragment.from(B.node(M).copy(Ye)),I++):ne++;$.step(new St(xe,ne,K,de,new z.Slice(J.append(Ye),me,I),J.size-me,!0))}function Te($,W){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:$,B=Pe($,W),H=B&&at(D,W);return H?B.map(Ee).concat({type:W,attrs:R}).concat(H.map(Ee)):null}function Ee($){return{type:$,attrs:null}}function Pe($,W){var R=$.parent,D=$.startIndex,B=$.endIndex,H=R.contentMatchAt(D).findWrapping(W);if(!H)return null;var K=H.length?H[0]:W;return R.canReplaceWith(D,B,K)?H:null}function at($,W){var R=$.parent,D=$.startIndex,B=$.endIndex,H=R.child(D),K=W.contentMatch.findWrapping(H.type);if(!K)return null;for(var de=K.length?K[K.length-1]:W,xe=de.contentMatch,ne=D;xe&&ne<B;ne++)xe=xe.matchType(R.child(ne).type);return!xe||!xe.validEnd?null:K}function dt($,W,R){for(var D=z.Fragment.empty,B=R.length-1;B>=0;B--){if(D.size){var H=R[B].type.contentMatch.matchFragment(D);if(!H||!H.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}D=z.Fragment.from(R[B].type.create(R[B].attrs,D))}var K=W.start,de=W.end;$.step(new St(K,de,K,de,new z.Slice(D,0,0),R.length,!0))}function ot($,W,R,D,B){if(!D.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var H=$.steps.length;$.doc.nodesBetween(W,R,function(K,de){var xe=typeof B=="function"?B(K):B;if(K.isTextblock&&!K.hasMarkup(D,xe)&&lr($.doc,$.mapping.slice(H).map(de),D)){var ne=null;if(D.schema.linebreakReplacement){var J=D.whitespace=="pre",me=!!D.contentMatch.matchType(D.schema.linebreakReplacement);J&&!me?ne=!1:!J&&me&&(ne=!0)}ne===!1&>($,K,de,H),pe($,$.mapping.slice(H).map(de,1),D,void 0,ne===null);var Ce=$.mapping.slice(H),He=Ce.map(de,1),Ye=Ce.map(de+K.nodeSize,1);return $.step(new St(He,Ye,He+1,Ye-1,new z.Slice(z.Fragment.from(D.create(xe,null,K.marks)),0,0),1,!0)),ne===!0&&Vt($,K,de,H),!1}})}function Vt($,W,R,D){W.forEach(function(B,H){if(B.isText)for(var K,de=/\r?\n|\r/g;K=de.exec(B.text);){var xe=$.mapping.slice(D).map(R+1+H+K.index);$.replaceWith(xe,xe+1,W.type.schema.linebreakReplacement.create())}})}function gt($,W,R,D){W.forEach(function(B,H){if(B.type==B.type.schema.linebreakReplacement){var K=$.mapping.slice(D).map(R+1+H);$.replaceWith(K,K+1,W.type.schema.text(`
|
|
676
|
-
`))}})}function lr($,W,R){var D=$.resolve(W),B=D.index();return D.parent.canReplaceWith(B,B+1,R)}function $t($,W,R,D,B){var H=$.doc.nodeAt(W);if(!H)throw new RangeError("No node at given position");R||(R=H.type);var K=R.create(D,null,B||H.marks);if(H.isLeaf)return $.replaceWith(W,W+H.nodeSize,K);if(!R.validContent(H.content))throw new RangeError("Invalid content for node type "+R.name);$.step(new St(W,W+H.nodeSize,W+1,W+H.nodeSize-1,new z.Slice(z.Fragment.from(K),0,0),1,!0))}function ur($,W){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,D=arguments.length>3?arguments[3]:void 0,B=$.resolve(W),H=B.depth-R,K=D&&D[D.length-1]||B.parent;if(H<0||B.parent.type.spec.isolating||!B.parent.canReplace(B.index(),B.parent.childCount)||!K.type.validContent(B.parent.content.cutByIndex(B.index(),B.parent.childCount)))return!1;for(var de=B.depth-1,xe=R-2;de>H;de--,xe--){var ne=B.node(de),J=B.index(de);if(ne.type.spec.isolating)return!1;var me=ne.content.cutByIndex(J,ne.childCount),Ce=D&&D[xe+1];Ce&&(me=me.replaceChild(0,Ce.type.create(Ce.attrs)));var He=D&&D[xe]||ne;if(!ne.canReplace(J+1,ne.childCount)||!He.type.validContent(me))return!1}var Ye=B.indexAfter(H),I=D&&D[0];return B.node(H).canReplaceWith(Ye,Ye,I?I.type:B.node(H+1).type)}function At($,W){for(var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,D=arguments.length>3?arguments[3]:void 0,B=$.doc.resolve(W),H=z.Fragment.empty,K=z.Fragment.empty,de=B.depth,xe=B.depth-R,ne=R-1;de>xe;de--,ne--){H=z.Fragment.from(B.node(de).copy(H));var J=D&&D[ne];K=z.Fragment.from(J?J.type.create(J.attrs,K):B.node(de).copy(K))}$.step(new lt(W,W,new z.Slice(H.append(K),R,R),!0))}function cr($,W){var R=$.resolve(W),D=R.index();return Zr(R.nodeBefore,R.nodeAfter)&&R.parent.canReplace(D,D+1)}function En($,W){W.content.size||$.type.compatibleContent(W.type);for(var R=$.contentMatchAt($.childCount),D=$.type.schema.linebreakReplacement,B=0;B<W.childCount;B++){var H=W.child(B),K=H.type==D?$.type.schema.nodes.text:H.type;if(R=R.matchType(K),!R||!$.type.allowsMarks(H.marks))return!1}return R.validEnd}function Zr($,W){return!!($&&W&&!$.isLeaf&&En($,W))}function Zt($,W){for(var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,D=$.resolve(W),B=D.depth;;B--){var H=void 0,K=void 0,de=D.index(B);if(B==D.depth?(H=D.nodeBefore,K=D.nodeAfter):R>0?(H=D.node(B+1),de++,K=D.node(B).maybeChild(de)):(H=D.node(B).maybeChild(de-1),K=D.node(B+1)),H&&!H.isTextblock&&Zr(H,K)&&D.node(B).canReplace(de,de+1))return W;if(B==0)break;W=R<0?D.before(B):D.after(B)}}function ze($,W,R){var D=null,B=$.doc.type.schema.linebreakReplacement,H=$.doc.resolve(W-R),K=H.node().type;if(B&&K.inlineContent){var de=K.whitespace=="pre",xe=!!K.contentMatch.matchType(B);de&&!xe?D=!1:!de&&xe&&(D=!0)}var ne=$.steps.length;if(D===!1){var J=$.doc.resolve(W+R);gt($,J.node(),J.before(),ne)}K.inlineContent&&pe($,W+R-1,K,H.node().contentMatchAt(H.index()),D==null);var me=$.mapping.slice(ne),Ce=me.map(W-R);if($.step(new lt(Ce,me.map(W+R,-1),z.Slice.empty,!0)),D===!0){var He=$.doc.resolve(Ce);Vt($,He.node(),He.before(),$.steps.length)}return $}function $e($,W,R){var D=$.resolve(W);if(D.parent.canReplaceWith(D.index(),D.index(),R))return W;if(D.parentOffset==0)for(var B=D.depth-1;B>=0;B--){var H=D.index(B);if(D.node(B).canReplaceWith(H,H,R))return D.before(B+1);if(H>0)return null}if(D.parentOffset==D.parent.content.size)for(var K=D.depth-1;K>=0;K--){var de=D.indexAfter(K);if(D.node(K).canReplaceWith(de,de,R))return D.after(K+1);if(de<D.node(K).childCount)return null}return null}function it($,W,R){var D=$.resolve(W);if(!R.content.size)return W;for(var B=R.content,H=0;H<R.openStart;H++)B=B.firstChild.content;for(var K=1;K<=(R.openStart==0&&R.size?2:1);K++)for(var de=D.depth;de>=0;de--){var xe=de==D.depth?0:D.pos<=(D.start(de+1)+D.end(de+1))/2?-1:1,ne=D.index(de)+(xe>0?1:0),J=D.node(de),me=!1;if(K==1)me=J.canReplace(ne,ne,B);else{var Ce=J.contentMatchAt(ne).findWrapping(B.firstChild.type);me=Ce&&J.canReplaceWith(ne,ne,Ce[0])}if(me)return xe==0?D.pos:xe<0?D.before(de+1):D.after(de+1)}return null}function ct($,W){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:W,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:z.Slice.empty;if(W==R&&!D.size)return null;var B=$.resolve(W),H=$.resolve(R);return xt(B,H,D)?new lt(W,R,D):new mr(B,H,D).fit()}function xt($,W,R){return!R.openStart&&!R.openEnd&&$.start()==W.start()&&$.parent.canReplace($.index(),W.index(),R.content)}var mr=function(){function $(W,R,D){T(this,$),this.$from=W,this.$to=R,this.unplaced=D,this.frontier=[],this.placed=z.Fragment.empty;for(var B=0;B<=W.depth;B++){var H=W.node(B);this.frontier.push({type:H.type,match:H.contentMatchAt(W.indexAfter(B))})}for(var K=W.depth;K>0;K--)this.placed=z.Fragment.from(W.node(K).copy(this.placed))}return E($,[{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 D=this.mustMoveInline(),B=this.placed.size-this.depth-this.$from.depth,H=this.$from,K=this.close(D<0?this.$to:H.doc.resolve(D));if(!K)return null;for(var de=this.placed,xe=H.depth,ne=K.depth;xe&&ne&&de.childCount==1;)de=de.firstChild.content,xe--,ne--;var J=new z.Slice(de,xe,ne);return D>-1?new St(H.pos,D,this.$to.pos,this.$to.end(),J,B):J.size||H.pos!=this.$to.pos?new lt(H.pos,K.pos,J):null}},{key:"findFittable",value:function(){for(var R=this.unplaced.openStart,D=this.unplaced.content,B=0,H=this.unplaced.openEnd;B<R;B++){var K=D.firstChild;if(D.childCount>1&&(H=0),K.type.spec.isolating&&H<=B){R=B;break}D=K.content}for(var de=1;de<=2;de++)for(var xe=de==1?R:this.unplaced.openStart;xe>=0;xe--){var ne=void 0,J=null;xe?(J=Pr(this.unplaced.content,xe-1).firstChild,ne=J.content):ne=this.unplaced.content;for(var me=ne.firstChild,Ce=this.depth;Ce>=0;Ce--){var He=this.frontier[Ce],Ye=He.type,I=He.match,M=void 0,g=null;if(de==1&&(me?I.matchType(me.type)||(g=I.fillBefore(z.Fragment.from(me),!1)):J&&Ye.compatibleContent(J.type)))return{sliceDepth:xe,frontierDepth:Ce,parent:J,inject:g};if(de==2&&me&&(M=I.findWrapping(me.type)))return{sliceDepth:xe,frontierDepth:Ce,parent:J,wrap:M};if(J&&I.matchType(J.type))break}}}},{key:"openMore",value:function(){var R=this.unplaced,D=R.content,B=R.openStart,H=R.openEnd,K=Pr(D,B);return!K.childCount||K.firstChild.isLeaf?!1:(this.unplaced=new z.Slice(D,B+1,Math.max(H,K.size+B>=D.size-H?B+1:0)),!0)}},{key:"dropNode",value:function(){var R=this.unplaced,D=R.content,B=R.openStart,H=R.openEnd,K=Pr(D,B);if(K.childCount<=1&&B>0){var de=D.size-B<=B+K.size;this.unplaced=new z.Slice(Ft(D,B-1,1),B-1,de?B-1:H)}else this.unplaced=new z.Slice(Ft(D,B,1),B,H)}},{key:"placeNodes",value:function(R){for(var D=R.sliceDepth,B=R.frontierDepth,H=R.parent,K=R.inject,de=R.wrap;this.depth>B;)this.closeFrontierNode();if(de)for(var xe=0;xe<de.length;xe++)this.openFrontierNode(de[xe]);var ne=this.unplaced,J=H?H.content:ne.content,me=ne.openStart-D,Ce=0,He=[],Ye=this.frontier[B],I=Ye.match,M=Ye.type;if(K){for(var g=0;g<K.childCount;g++)He.push(K.child(g));I=I.matchFragment(K)}for(var w=J.size+D-(ne.content.size-ne.openEnd);Ce<J.childCount;){var O=J.child(Ce),_=I.matchType(O.type);if(!_)break;Ce++,(Ce>1||me==0||O.content.size)&&(I=_,He.push(pn(O.mark(M.allowedMarks(O.marks)),Ce==1?me:0,Ce==J.childCount?w:-1)))}var j=Ce==J.childCount;j||(w=-1),this.placed=Ut(this.placed,B,z.Fragment.from(He)),this.frontier[B].match=I,j&&w<0&&H&&H.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(var X=0,ue=J;X<w;X++){var ve=ue.lastChild;this.frontier.push({type:ve.type,match:ve.contentMatchAt(ve.childCount)}),ue=ve.content}this.unplaced=j?D==0?z.Slice.empty:new z.Slice(Ft(ne.content,D-1,1),D-1,w<0?ne.openEnd:D-1):new z.Slice(Ft(ne.content,D,Ce),ne.openStart,ne.openEnd)}},{key:"mustMoveInline",value:function(){if(!this.$to.parent.isTextblock)return-1;var R=this.frontier[this.depth],D;if(!R.type.isTextblock||!Qt(this.$to,this.$to.depth,R.type,R.match,!1)||this.$to.depth==this.depth&&(D=this.findCloseLevel(this.$to))&&D.depth==this.depth)return-1;for(var B=this.$to.depth,H=this.$to.after(B);B>1&&H==this.$to.end(--B);)++H;return H}},{key:"findCloseLevel",value:function(R){e:for(var D=Math.min(this.depth,R.depth);D>=0;D--){var B=this.frontier[D],H=B.match,K=B.type,de=D<R.depth&&R.end(D+1)==R.pos+(R.depth-(D+1)),xe=Qt(R,D,K,H,de);if(xe){for(var ne=D-1;ne>=0;ne--){var J=this.frontier[ne],me=J.match,Ce=J.type,He=Qt(R,ne,Ce,me,!0);if(!He||He.childCount)continue e}return{depth:D,fit:xe,move:de?R.doc.resolve(R.after(D+1)):R}}}}},{key:"close",value:function(R){var D=this.findCloseLevel(R);if(!D)return null;for(;this.depth>D.depth;)this.closeFrontierNode();D.fit.childCount&&(this.placed=Ut(this.placed,D.depth,D.fit)),R=D.move;for(var B=D.depth+1;B<=R.depth;B++){var H=R.node(B),K=H.type.contentMatch.fillBefore(H.content,!0,R.index(B));this.openFrontierNode(H.type,H.attrs,K)}return R}},{key:"openFrontierNode",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,B=arguments.length>2?arguments[2]:void 0,H=this.frontier[this.depth];H.match=H.match.matchType(R),this.placed=Ut(this.placed,this.depth,z.Fragment.from(R.create(D,B))),this.frontier.push({type:R,match:R.contentMatch})}},{key:"closeFrontierNode",value:function(){var R=this.frontier.pop(),D=R.match.fillBefore(z.Fragment.empty,!0);D.childCount&&(this.placed=Ut(this.placed,this.frontier.length,D))}}]),$}();function Ft($,W,R){return W==0?$.cutByIndex(R,$.childCount):$.replaceChild(0,$.firstChild.copy(Ft($.firstChild.content,W-1,R)))}function Ut($,W,R){return W==0?$.append(R):$.replaceChild($.childCount-1,$.lastChild.copy(Ut($.lastChild.content,W-1,R)))}function Pr($,W){for(var R=0;R<W;R++)$=$.firstChild.content;return $}function pn($,W,R){if(W<=0)return $;var D=$.content;return W>1&&(D=D.replaceChild(0,pn(D.firstChild,W-1,D.childCount==1?R-1:0))),W>0&&(D=$.type.contentMatch.fillBefore(D).append(D),R<=0&&(D=D.append($.type.contentMatch.matchFragment(D).fillBefore(z.Fragment.empty,!0)))),$.copy(D)}function Qt($,W,R,D,B){var H=$.node(W),K=B?$.indexAfter(W):$.index(W);if(K==H.childCount&&!R.compatibleContent(H.type))return null;var de=D.fillBefore(H.content,!0,K);return de&&!Br(R,H.content,K)?de:null}function Br($,W,R){for(var D=R;D<W.childCount;D++)if(!$.allowsMarks(W.child(D).marks))return!0;return!1}function Mn($){return $.spec.defining||$.spec.definingForContent}function vn($,W,R,D){if(!D.size)return $.deleteRange(W,R);var B=$.doc.resolve(W),H=$.doc.resolve(R);if(xt(B,H,D))return $.step(new lt(W,R,D));var K=er(B,$.doc.resolve(R));K[K.length-1]==0&&K.pop();var de=-(B.depth+1);K.unshift(de);for(var xe=B.depth,ne=B.pos-1;xe>0;xe--,ne--){var J=B.node(xe).type.spec;if(J.defining||J.definingAsContext||J.isolating)break;K.indexOf(xe)>-1?de=xe:B.before(xe)==ne&&K.splice(1,0,-xe)}for(var me=K.indexOf(de),Ce=[],He=D.openStart,Ye=D.content,I=0;;I++){var M=Ye.firstChild;if(Ce.push(M),I==D.openStart)break;Ye=M.content}for(var g=He-1;g>=0;g--){var w=Ce[g],O=Mn(w.type);if(O&&!w.sameMarkup(B.node(Math.abs(de)-1)))He=g;else if(O||!w.type.isTextblock)break}for(var _=D.openStart;_>=0;_--){var j=(_+He+1)%(D.openStart+1),X=Ce[j];if(X)for(var ue=0;ue<K.length;ue++){var ve=K[(ue+me)%K.length],Ne=!0;ve<0&&(Ne=!1,ve=-ve);var De=B.node(ve-1),_e=B.index(ve-1);if(De.canReplaceWith(_e,_e,X.type,X.marks))return $.replace(B.before(ve),Ne?H.after(ve):R,new z.Slice(Qr(D.content,0,D.openStart,j),j,D.openEnd))}}for(var nt=$.steps.length,kt=K.length-1;kt>=0&&($.replace(W,R,D),!($.steps.length>nt));kt--){var Ht=K[kt];Ht<0||(W=B.before(Ht),R=H.after(Ht))}}function Qr($,W,R,D,B){if(W<R){var H=$.firstChild;$=$.replaceChild(0,H.copy(Qr(H.content,W+1,R,D,H)))}if(W>D){var K=B.contentMatchAt(0),de=K.fillBefore($).append($);$=de.append(K.matchFragment(de).fillBefore(z.Fragment.empty,!0))}return $}function Wr($,W,R,D){if(!D.isInline&&W==R&&$.doc.resolve(W).parent.content.size){var B=$e($.doc,W,D.type);B!=null&&(W=R=B)}$.replaceRange(W,R,new z.Slice(z.Fragment.from(D),0,0))}function Fr($,W,R){for(var D=$.doc.resolve(W),B=$.doc.resolve(R),H=er(D,B),K=0;K<H.length;K++){var de=H[K],xe=K==H.length-1;if(xe&&de==0||D.node(de).type.contentMatch.validEnd)return $.delete(D.start(de),B.end(de));if(de>0&&(xe||D.node(de-1).canReplace(D.index(de-1),B.indexAfter(de-1))))return $.delete(D.before(de),B.after(de))}for(var ne=1;ne<=D.depth&&ne<=B.depth;ne++)if(W-D.start(ne)==D.depth-ne&&R>D.end(ne)&&B.end(ne)-R!=B.depth-ne&&D.start(ne-1)==B.start(ne-1)&&D.node(ne-1).canReplace(D.index(ne-1),B.index(ne-1)))return $.delete(D.before(ne),R);$.delete(W,R)}function er($,W){for(var R=[],D=Math.min($.depth,W.depth),B=D;B>=0;B--){var H=$.start(B);if(H<$.pos-($.depth-B)||W.end(B)>W.pos+(W.depth-B)||$.node(B).type.spec.isolating||W.node(B).type.spec.isolating)break;(H==W.start(B)||B==$.depth&&B==W.depth&&$.parent.inlineContent&&W.parent.inlineContent&&B&&W.start(B-1)==H-1)&&R.push(B)}return R}var en=function($){i(R,$);var W=o(R);function R(D,B,H){var K;return T(this,R),K=W.call(this),K.pos=D,K.attr=B,K.value=H,K}return E(R,[{key:"apply",value:function(B){var H=B.nodeAt(this.pos);if(!H)return st.fail("No node at attribute step's position");var K=Object.create(null);for(var de in H.attrs)K[de]=H.attrs[de];K[this.attr]=this.value;var xe=H.type.create(K,null,H.marks);return st.fromReplace(B,this.pos,this.pos+1,new z.Slice(z.Fragment.from(xe),0,H.isLeaf?0:1))}},{key:"getMap",value:function(){return Be.empty}},{key:"invert",value:function(B){return new R(this.pos,this.attr,B.nodeAt(this.pos).attrs[this.attr])}},{key:"map",value:function(B){var H=B.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(B,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}(vt);vt.jsonID("attr",en);var qt=function($){i(R,$);var W=o(R);function R(D,B){var H;return T(this,R),H=W.call(this),H.attr=D,H.value=B,H}return E(R,[{key:"apply",value:function(B){var H=Object.create(null);for(var K in B.attrs)H[K]=B.attrs[K];H[this.attr]=this.value;var de=B.type.create(H,B.content,B.marks);return st.ok(de)}},{key:"getMap",value:function(){return Be.empty}},{key:"invert",value:function(B){return new R(this.attr,B.attrs[this.attr])}},{key:"map",value:function(B){return this}},{key:"toJSON",value:function(){return{stepType:"docAttr",attr:this.attr,value:this.value}}}],[{key:"fromJSON",value:function(B,H){if(typeof H.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new R(H.attr,H.value)}}]),R}(vt);vt.jsonID("docAttr",qt),r.TransformError=function($){i(R,$);var W=o(R);function R(){return T(this,R),W.apply(this,arguments)}return E(R)}(e(Error)),r.TransformError=function $(W){var R=Error.call(this,W);return R.__proto__=$.prototype,R},r.TransformError.prototype=Object.create(Error.prototype),r.TransformError.prototype.constructor=r.TransformError,r.TransformError.prototype.name="TransformError";var fr=function(){function $(W){T(this,$),this.doc=W,this.steps=[],this.docs=[],this.mapping=new mt}return E($,[{key:"before",get:function(){return this.docs.length?this.docs[0]:this.doc}},{key:"step",value:function(R){var D=this.maybeStep(R);if(D.failed)throw new r.TransformError(D.failed);return this}},{key:"maybeStep",value:function(R){var D=R.apply(this.doc);return D.failed||this.addStep(R,D.doc),D}},{key:"docChanged",get:function(){return this.steps.length>0}},{key:"addStep",value:function(R,D){this.docs.push(this.doc),this.steps.push(R),this.mapping.appendMap(R.getMap()),this.doc=D}},{key:"replace",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:z.Slice.empty,H=ct(this.doc,R,D,B);return H&&this.step(H),this}},{key:"replaceWith",value:function(R,D,B){return this.replace(R,D,new z.Slice(z.Fragment.from(B),0,0))}},{key:"delete",value:function(R,D){return this.replace(R,D,z.Slice.empty)}},{key:"insert",value:function(R,D){return this.replaceWith(R,R,D)}},{key:"replaceRange",value:function(R,D,B){return vn(this,R,D,B),this}},{key:"replaceRangeWith",value:function(R,D,B){return Wr(this,R,D,B),this}},{key:"deleteRange",value:function(R,D){return Fr(this,R,D),this}},{key:"lift",value:function(R,D){return te(this,R,D),this}},{key:"join",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return ze(this,R,D),this}},{key:"wrap",value:function(R,D){return dt(this,R,D),this}},{key:"setBlockType",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,B=arguments.length>2?arguments[2]:void 0,H=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return ot(this,R,D,B,H),this}},{key:"setNodeMarkup",value:function(R,D){var B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,H=arguments.length>3?arguments[3]:void 0;return $t(this,R,D,B,H),this}},{key:"setNodeAttribute",value:function(R,D,B){return this.step(new en(R,D,B)),this}},{key:"setDocAttribute",value:function(R,D){return this.step(new qt(R,D)),this}},{key:"addNodeMark",value:function(R,D){return this.step(new Qe(R,D)),this}},{key:"removeNodeMark",value:function(R,D){var B=this.doc.nodeAt(R);if(!B)throw new RangeError("No node at position "+R);if(D instanceof z.Mark)D.isInSet(B.marks)&&this.step(new wt(R,D));else{for(var H=B.marks,K,de=[];K=D.isInSet(H);)de.push(new wt(R,K)),H=K.removeFromSet(H);for(var xe=de.length-1;xe>=0;xe--)this.step(de[xe])}return this}},{key:"split",value:function(R){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,B=arguments.length>2?arguments[2]:void 0;return At(this,R,D,B),this}},{key:"addMark",value:function(R,D,B){return vr(this,R,D,B),this}},{key:"removeMark",value:function(R,D,B){return ke(this,R,D,B),this}},{key:"clearIncompatible",value:function(R,D,B){return pe(this,R,D,B),this}}]),$}();r.AddMarkStep=_t,r.AddNodeMarkStep=Qe,r.AttrStep=en,r.DocAttrStep=qt,r.MapResult=Ze,r.Mapping=mt,r.RemoveMarkStep=Xt,r.RemoveNodeMarkStep=wt,r.ReplaceAroundStep=St,r.ReplaceStep=lt,r.Step=vt,r.StepMap=Be,r.StepResult=st,r.Transform=fr,r.canJoin=cr,r.canSplit=ur,r.dropPoint=it,r.findWrapping=Te,r.insertPoint=$e,r.joinPoint=Zt,r.liftTarget=se,r.replaceStep=ct}(cd)),cd}var _y;function Ku(){if(_y)return Pn;_y=1;function r(ke){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(pe){return typeof pe}:function(pe){return pe&&typeof Symbol=="function"&&pe.constructor===Symbol&&pe!==Symbol.prototype?"symbol":typeof pe},r(ke)}function e(){return typeof Reflect<"u"&&Reflect.get?e=Reflect.get:e=function(pe,ie,se){var te=t(pe,ie);if(te){var Te=Object.getOwnPropertyDescriptor(te,ie);return Te.get?Te.get.call(arguments.length<3?pe:se):Te.value}},e.apply(this,arguments)}function t(ke,pe){for(;!Object.prototype.hasOwnProperty.call(ke,pe)&&(ke=f(ke),ke!==null););return ke}function n(ke,pe){if(typeof pe!="function"&&pe!==null)throw new TypeError("Super expression must either be null or a function");ke.prototype=Object.create(pe&&pe.prototype,{constructor:{value:ke,writable:!0,configurable:!0}}),Object.defineProperty(ke,"prototype",{writable:!1}),pe&&i(ke,pe)}function i(ke,pe){return i=Object.setPrototypeOf||function(se,te){return se.__proto__=te,se},i(ke,pe)}function a(ke){var pe=l();return function(){var se=f(ke),te;if(pe){var Te=f(this).constructor;te=Reflect.construct(se,arguments,Te)}else te=se.apply(this,arguments);return o(this,te)}}function o(ke,pe){if(pe&&(r(pe)==="object"||typeof pe=="function"))return pe;if(pe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(ke)}function s(ke){if(ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ke}function l(){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 f(ke){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(ie){return ie.__proto__||Object.getPrototypeOf(ie)},f(ke)}function p(ke,pe){if(!(ke instanceof pe))throw new TypeError("Cannot call a class as a function")}function k(ke,pe){for(var ie=0;ie<pe.length;ie++){var se=pe[ie];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(ke,se.key,se)}}function T(ke,pe,ie){return pe&&k(ke.prototype,pe),ie&&k(ke,ie),Object.defineProperty(ke,"prototype",{writable:!1}),ke}Object.defineProperty(Pn,"__esModule",{value:!0});var x=Gu(),E=Yh(),P=Object.create(null),F=function(){function ke(pe,ie,se){p(this,ke),this.$anchor=pe,this.$head=ie,this.ranges=se||[new z(pe.min(ie),pe.max(ie))]}return T(ke,[{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 ie=this.ranges,se=0;se<ie.length;se++)if(ie[se].$from.pos!=ie[se].$to.pos)return!1;return!0}},{key:"content",value:function(){return this.$from.doc.slice(this.from,this.to,!0)}},{key:"replace",value:function(ie){for(var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x.Slice.empty,te=se.content.lastChild,Te=null,Ee=0;Ee<se.openEnd;Ee++)Te=te,te=te.lastChild;for(var Pe=ie.steps.length,at=this.ranges,dt=0;dt<at.length;dt++){var ot=at[dt],Vt=ot.$from,gt=ot.$to,lr=ie.mapping.slice(Pe);ie.replaceRange(lr.map(Vt.pos),lr.map(gt.pos),dt?x.Slice.empty:se),dt==0&&Ze(ie,Pe,(te?te.isInline:Te&&Te.isTextblock)?-1:1)}}},{key:"replaceWith",value:function(ie,se){for(var te=ie.steps.length,Te=this.ranges,Ee=0;Ee<Te.length;Ee++){var Pe=Te[Ee],at=Pe.$from,dt=Pe.$to,ot=ie.mapping.slice(te),Vt=ot.map(at.pos),gt=ot.map(dt.pos);Ee?ie.deleteRange(Vt,gt):(ie.replaceRangeWith(Vt,gt,se),Ze(ie,te,se.isInline?-1:1))}}},{key:"getBookmark",value:function(){return oe.between(this.$anchor,this.$head).getBookmark()}}],[{key:"findFrom",value:function(ie,se){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Te=ie.parent.inlineContent?new oe(ie):Re(ie.node(0),ie.parent,ie.pos,ie.index(),se,te);if(Te)return Te;for(var Ee=ie.depth-1;Ee>=0;Ee--){var Pe=se<0?Re(ie.node(0),ie.node(Ee),ie.before(Ee+1),ie.index(Ee),se,te):Re(ie.node(0),ie.node(Ee),ie.after(Ee+1),ie.index(Ee)+1,se,te);if(Pe)return Pe}return null}},{key:"near",value:function(ie){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return this.findFrom(ie,se)||this.findFrom(ie,-se)||new ge(ie.node(0))}},{key:"atStart",value:function(ie){return Re(ie,ie,0,0,1)||new ge(ie)}},{key:"atEnd",value:function(ie){return Re(ie,ie,ie.content.size,ie.childCount,-1)||new ge(ie)}},{key:"fromJSON",value:function(ie,se){if(!se||!se.type)throw new RangeError("Invalid input for Selection.fromJSON");var te=P[se.type];if(!te)throw new RangeError("No selection type ".concat(se.type," defined"));return te.fromJSON(ie,se)}},{key:"jsonID",value:function(ie,se){if(ie in P)throw new RangeError("Duplicate use of selection JSON ID "+ie);return P[ie]=se,se.prototype.jsonID=ie,se}}]),ke}();F.prototype.visible=!0;var z=T(function ke(pe,ie){p(this,ke),this.$from=pe,this.$to=ie}),Y=!1;function Z(ke){!Y&&!ke.parent.inlineContent&&(Y=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+ke.parent.type.name+")"))}var oe=function(ke){n(ie,ke);var pe=a(ie);function ie(se){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:se;return p(this,ie),Z(se),Z(te),pe.call(this,se,te)}return T(ie,[{key:"$cursor",get:function(){return this.$anchor.pos==this.$head.pos?this.$head:null}},{key:"map",value:function(te,Te){var Ee=te.resolve(Te.map(this.head));if(!Ee.parent.inlineContent)return F.near(Ee);var Pe=te.resolve(Te.map(this.anchor));return new ie(Pe.parent.inlineContent?Pe:Ee,Ee)}},{key:"replace",value:function(te){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x.Slice.empty;if(e(f(ie.prototype),"replace",this).call(this,te,Te),Te==x.Slice.empty){var Ee=this.$from.marksAcross(this.$to);Ee&&te.ensureMarks(Ee)}}},{key:"eq",value:function(te){return te instanceof ie&&te.anchor==this.anchor&&te.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(te,Te){if(typeof Te.anchor!="number"||typeof Te.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ie(te.resolve(Te.anchor),te.resolve(Te.head))}},{key:"create",value:function(te,Te){var Ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Te,Pe=te.resolve(Te);return new this(Pe,Ee==Te?Pe:te.resolve(Ee))}},{key:"between",value:function(te,Te,Ee){var Pe=te.pos-Te.pos;if((!Ee||Pe)&&(Ee=Pe>=0?1:-1),!Te.parent.inlineContent){var at=F.findFrom(Te,Ee,!0)||F.findFrom(Te,-Ee,!0);if(at)Te=at.$head;else return F.near(Te,Ee)}return te.parent.inlineContent||(Pe==0?te=Te:(te=(F.findFrom(te,-Ee,!0)||F.findFrom(te,Ee,!0)).$anchor,te.pos<Te.pos!=Pe<0&&(te=Te))),new ie(te,Te)}}]),ie}(F);F.jsonID("text",oe);var le=function(){function ke(pe,ie){p(this,ke),this.anchor=pe,this.head=ie}return T(ke,[{key:"map",value:function(ie){return new ke(ie.map(this.anchor),ie.map(this.head))}},{key:"resolve",value:function(ie){return oe.between(ie.resolve(this.anchor),ie.resolve(this.head))}}]),ke}(),re=function(ke){n(ie,ke);var pe=a(ie);function ie(se){var te;p(this,ie);var Te=se.nodeAfter,Ee=se.node(0).resolve(se.pos+Te.nodeSize);return te=pe.call(this,se,Ee),te.node=Te,te}return T(ie,[{key:"map",value:function(te,Te){var Ee=Te.mapResult(this.anchor),Pe=Ee.deleted,at=Ee.pos,dt=te.resolve(at);return Pe?F.near(dt):new ie(dt)}},{key:"content",value:function(){return new x.Slice(x.Fragment.from(this.node),0,0)}},{key:"eq",value:function(te){return te instanceof ie&&te.anchor==this.anchor}},{key:"toJSON",value:function(){return{type:"node",anchor:this.anchor}}},{key:"getBookmark",value:function(){return new he(this.anchor)}}],[{key:"fromJSON",value:function(te,Te){if(typeof Te.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ie(te.resolve(Te.anchor))}},{key:"create",value:function(te,Te){return new ie(te.resolve(Te))}},{key:"isSelectable",value:function(te){return!te.isText&&te.type.spec.selectable!==!1}}]),ie}(F);re.prototype.visible=!1,F.jsonID("node",re);var he=function(){function ke(pe){p(this,ke),this.anchor=pe}return T(ke,[{key:"map",value:function(ie){var se=ie.mapResult(this.anchor),te=se.deleted,Te=se.pos;return te?new le(Te,Te):new ke(Te)}},{key:"resolve",value:function(ie){var se=ie.resolve(this.anchor),te=se.nodeAfter;return te&&re.isSelectable(te)?new re(se):F.near(se)}}]),ke}(),ge=function(ke){n(ie,ke);var pe=a(ie);function ie(se){return p(this,ie),pe.call(this,se.resolve(0),se.resolve(se.content.size))}return T(ie,[{key:"replace",value:function(te){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x.Slice.empty;if(Te==x.Slice.empty){te.delete(0,te.doc.content.size);var Ee=F.atStart(te.doc);Ee.eq(te.selection)||te.setSelection(Ee)}else e(f(ie.prototype),"replace",this).call(this,te,Te)}},{key:"toJSON",value:function(){return{type:"all"}}},{key:"map",value:function(te){return new ie(te)}},{key:"eq",value:function(te){return te instanceof ie}},{key:"getBookmark",value:function(){return ye}}],[{key:"fromJSON",value:function(te){return new ie(te)}}]),ie}(F);F.jsonID("all",ge);var ye={map:function(){return this},resolve:function(pe){return new ge(pe)}};function Re(ke,pe,ie,se,te){var Te=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1;if(pe.inlineContent)return oe.create(ke,ie);for(var Ee=se-(te>0?0:1);te>0?Ee<pe.childCount:Ee>=0;Ee+=te){var Pe=pe.child(Ee);if(Pe.isAtom){if(!Te&&re.isSelectable(Pe))return re.create(ke,ie-(te<0?Pe.nodeSize:0))}else{var at=Re(ke,Pe,ie+te,te<0?Pe.childCount:0,te,Te);if(at)return at}ie+=Pe.nodeSize*te}return null}function Ze(ke,pe,ie){var se=ke.steps.length-1;if(!(se<pe)){var te=ke.steps[se];if(te instanceof E.ReplaceStep||te instanceof E.ReplaceAroundStep){var Te=ke.mapping.maps[se],Ee;Te.forEach(function(Pe,at,dt,ot){Ee==null&&(Ee=ot)}),ke.setSelection(F.near(ke.doc.resolve(Ee),ie))}}}var Be=1,mt=2,ut=4,vt=function(ke){n(ie,ke);var pe=a(ie);function ie(se){var te;return p(this,ie),te=pe.call(this,se.doc),te.curSelectionFor=0,te.updated=0,te.meta=Object.create(null),te.time=Date.now(),te.curSelection=se.selection,te.storedMarks=se.storedMarks,te}return T(ie,[{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(te){if(te.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=te,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Be)&-3,this.storedMarks=null,this}},{key:"selectionSet",get:function(){return(this.updated&Be)>0}},{key:"setStoredMarks",value:function(te){return this.storedMarks=te,this.updated|=mt,this}},{key:"ensureMarks",value:function(te){return x.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),te)||this.setStoredMarks(te),this}},{key:"addStoredMark",value:function(te){return this.ensureMarks(te.addToSet(this.storedMarks||this.selection.$head.marks()))}},{key:"removeStoredMark",value:function(te){return this.ensureMarks(te.removeFromSet(this.storedMarks||this.selection.$head.marks()))}},{key:"storedMarksSet",get:function(){return(this.updated&mt)>0}},{key:"addStep",value:function(te,Te){e(f(ie.prototype),"addStep",this).call(this,te,Te),this.updated=this.updated&-3,this.storedMarks=null}},{key:"setTime",value:function(te){return this.time=te,this}},{key:"replaceSelection",value:function(te){return this.selection.replace(this,te),this}},{key:"replaceSelectionWith",value:function(te){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Ee=this.selection;return Te&&(te=te.mark(this.storedMarks||(Ee.empty?Ee.$from.marks():Ee.$from.marksAcross(Ee.$to)||x.Mark.none))),Ee.replaceWith(this,te),this}},{key:"deleteSelection",value:function(){return this.selection.replace(this),this}},{key:"insertText",value:function(te,Te,Ee){var Pe=this.doc.type.schema;if(Te==null)return te?this.replaceSelectionWith(Pe.text(te),!0):this.deleteSelection();if(Ee==null&&(Ee=Te),Ee=Ee??Te,!te)return this.deleteRange(Te,Ee);var at=this.storedMarks;if(!at){var dt=this.doc.resolve(Te);at=Ee==Te?dt.marks():dt.marksAcross(this.doc.resolve(Ee))}return this.replaceRangeWith(Te,Ee,Pe.text(te,at)),this.selection.empty||this.setSelection(F.near(this.selection.$to)),this}},{key:"setMeta",value:function(te,Te){return this.meta[typeof te=="string"?te:te.key]=Te,this}},{key:"getMeta",value:function(te){return this.meta[typeof te=="string"?te:te.key]}},{key:"isGeneric",get:function(){for(var te in this.meta)return!1;return!0}},{key:"scrollIntoView",value:function(){return this.updated|=ut,this}},{key:"scrolledIntoView",get:function(){return(this.updated&ut)>0}}]),ie}(E.Transform);function st(ke,pe){return!pe||!ke?ke:ke.bind(pe)}var Rt=T(function ke(pe,ie,se){p(this,ke),this.name=pe,this.init=st(ie.init,se),this.apply=st(ie.apply,se)}),_t=[new Rt("doc",{init:function(pe){return pe.doc||pe.schema.topNodeType.createAndFill()},apply:function(pe){return pe.doc}}),new Rt("selection",{init:function(pe,ie){return pe.selection||F.atStart(ie.doc)},apply:function(pe){return pe.selection}}),new Rt("storedMarks",{init:function(pe){return pe.storedMarks||null},apply:function(pe,ie,se,te){return te.selection.$cursor?pe.storedMarks:null}}),new Rt("scrollToSelection",{init:function(){return 0},apply:function(pe,ie){return pe.scrolledIntoView?ie+1:ie}})],Xt=T(function ke(pe,ie){var se=this;p(this,ke),this.schema=pe,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=_t.slice(),ie&&ie.forEach(function(te){if(se.pluginsByKey[te.key])throw new RangeError("Adding different instances of a keyed plugin ("+te.key+")");se.plugins.push(te),se.pluginsByKey[te.key]=te,te.spec.state&&se.fields.push(new Rt(te.key,te.spec.state,te))})}),Qe=function(){function ke(pe){p(this,ke),this.config=pe}return T(ke,[{key:"schema",get:function(){return this.config.schema}},{key:"plugins",get:function(){return this.config.plugins}},{key:"apply",value:function(ie){return this.applyTransaction(ie).state}},{key:"filterTransaction",value:function(ie){for(var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,te=0;te<this.config.plugins.length;te++)if(te!=se){var Te=this.config.plugins[te];if(Te.spec.filterTransaction&&!Te.spec.filterTransaction.call(Te,ie,this))return!1}return!0}},{key:"applyTransaction",value:function(ie){if(!this.filterTransaction(ie))return{state:this,transactions:[]};for(var se=[ie],te=this.applyInner(ie),Te=null;;){for(var Ee=!1,Pe=0;Pe<this.config.plugins.length;Pe++){var at=this.config.plugins[Pe];if(at.spec.appendTransaction){var dt=Te?Te[Pe].n:0,ot=Te?Te[Pe].state:this,Vt=dt<se.length&&at.spec.appendTransaction.call(at,dt?se.slice(dt):se,ot,te);if(Vt&&te.filterTransaction(Vt,Pe)){if(Vt.setMeta("appendedTransaction",ie),!Te){Te=[];for(var gt=0;gt<this.config.plugins.length;gt++)Te.push(gt<Pe?{state:te,n:se.length}:{state:this,n:0})}se.push(Vt),te=te.applyInner(Vt),Ee=!0}Te&&(Te[Pe]={state:te,n:se.length})}}if(!Ee)return{state:te,transactions:se}}}},{key:"applyInner",value:function(ie){if(!ie.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");for(var se=new ke(this.config),te=this.config.fields,Te=0;Te<te.length;Te++){var Ee=te[Te];se[Ee.name]=Ee.apply(ie,this[Ee.name],this,se)}return se}},{key:"tr",get:function(){return new vt(this)}},{key:"reconfigure",value:function(ie){for(var se=new Xt(this.schema,ie.plugins),te=se.fields,Te=new ke(se),Ee=0;Ee<te.length;Ee++){var Pe=te[Ee].name;Te[Pe]=this.hasOwnProperty(Pe)?this[Pe]:te[Ee].init(ie,Te)}return Te}},{key:"toJSON",value:function(ie){var se={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(se.storedMarks=this.storedMarks.map(function(Pe){return Pe.toJSON()})),ie&&r(ie)=="object")for(var te in ie){if(te=="doc"||te=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");var Te=ie[te],Ee=Te.spec.state;Ee&&Ee.toJSON&&(se[te]=Ee.toJSON.call(Te,this[Te.key]))}return se}}],[{key:"create",value:function(ie){for(var se=new Xt(ie.doc?ie.doc.type.schema:ie.schema,ie.plugins),te=new ke(se),Te=0;Te<se.fields.length;Te++)te[se.fields[Te].name]=se.fields[Te].init(ie,te);return te}},{key:"fromJSON",value:function(ie,se,te){if(!se)throw new RangeError("Invalid input for EditorState.fromJSON");if(!ie.schema)throw new RangeError("Required config field 'schema' missing");var Te=new Xt(ie.schema,ie.plugins),Ee=new ke(Te);return Te.fields.forEach(function(Pe){if(Pe.name=="doc")Ee.doc=x.Node.fromJSON(ie.schema,se.doc);else if(Pe.name=="selection")Ee.selection=F.fromJSON(Ee.doc,se.selection);else if(Pe.name=="storedMarks")se.storedMarks&&(Ee.storedMarks=se.storedMarks.map(ie.schema.markFromJSON));else{if(te)for(var at in te){var dt=te[at],ot=dt.spec.state;if(dt.key==Pe.name&&ot&&ot.fromJSON&&Object.prototype.hasOwnProperty.call(se,at)){Ee[Pe.name]=ot.fromJSON.call(dt,ie,se[at],Ee);return}}Ee[Pe.name]=Pe.init(ie,Ee)}}),Ee}}]),ke}();function wt(ke,pe,ie){for(var se in ke){var te=ke[se];te instanceof Function?te=te.bind(pe):se=="handleDOMEvents"&&(te=wt(te,pe,{})),ie[se]=te}return ie}var lt=function(){function ke(pe){p(this,ke),this.spec=pe,this.props={},pe.props&&wt(pe.props,this,this.props),this.key=pe.key?pe.key.key:Et("plugin")}return T(ke,[{key:"getState",value:function(ie){return ie[this.key]}}]),ke}(),St=Object.create(null);function Et(ke){return ke in St?ke+"$"+ ++St[ke]:(St[ke]=0,ke+"$")}var vr=function(){function ke(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"key";p(this,ke),this.key=Et(pe)}return T(ke,[{key:"get",value:function(ie){return ie.config.pluginsByKey[this.key]}},{key:"getState",value:function(ie){return ie[this.key]}}]),ke}();return Pn.AllSelection=ge,Pn.EditorState=Qe,Pn.NodeSelection=re,Pn.Plugin=lt,Pn.PluginKey=vr,Pn.Selection=F,Pn.SelectionRange=z,Pn.TextSelection=oe,Pn.Transaction=vt,Pn}var zy;function zJe(){if(zy)return ln;zy=1;function r(Z,oe,le){return Object.defineProperty(Z,"prototype",{writable:!1}),Z}function e(Z,oe){if(!(Z instanceof oe))throw new TypeError("Cannot call a class as a function")}var t=Ku(),n=Yh(),i=r(function Z(oe,le){var re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};e(this,Z),this.match=oe,this.match=oe,this.handler=typeof le=="string"?a(le):le,this.undoable=re.undoable!==!1,this.inCode=re.inCode||!1,this.inCodeMark=re.inCodeMark!==!1});function a(Z){return function(oe,le,re,he){var ge=Z;if(le[1]){var ye=le[0].lastIndexOf(le[1]);ge+=le[0].slice(ye+le[1].length),re+=ye;var Re=re-he;Re>0&&(ge=le[0].slice(ye-Re,ye)+ge,re=he)}return oe.tr.insertText(ge,re,he)}}var o=500;function s(Z){var oe=Z.rules,le=new t.Plugin({state:{init:function(){return null},apply:function(he,ge){var ye=he.getMeta(this);return ye||(he.selectionSet||he.docChanged?null:ge)}},props:{handleTextInput:function(he,ge,ye,Re){return l(he,ge,ye,Re,oe,le)},handleDOMEvents:{compositionend:function(he){setTimeout(function(){var ge=he.state.selection.$cursor;ge&&l(he,ge.pos,ge.pos,"",oe,le)})}}},isInputRules:!0});return le}function l(Z,oe,le,re,he,ge){if(Z.composing)return!1;for(var ye=Z.state,Re=ye.doc.resolve(oe),Ze=Re.parent.textBetween(Math.max(0,Re.parentOffset-o),Re.parentOffset,null,"")+re,Be=0;Be<he.length;Be++){var mt=he[Be];if(!(!mt.inCodeMark&&Re.marks().some(function(st){return st.type.spec.code}))){if(Re.parent.type.spec.code){if(!mt.inCode)continue}else if(mt.inCode==="only")continue;var ut=mt.match.exec(Ze),vt=ut&&ut[0].length>=re.length&&mt.handler(ye,ut,oe-(ut[0].length-re.length),le);if(vt)return mt.undoable&&vt.setMeta(ge,{transform:vt,from:oe,to:le,text:re}),Z.dispatch(vt),!0}}return!1}var f=function(oe,le){for(var re=oe.plugins,he=0;he<re.length;he++){var ge=re[he],ye=void 0;if(ge.spec.isInputRules&&(ye=ge.getState(oe))){if(le){for(var Re=oe.tr,Ze=ye.transform,Be=Ze.steps.length-1;Be>=0;Be--)Re.step(Ze.steps[Be].invert(Ze.docs[Be]));if(ye.text){var mt=Re.doc.resolve(ye.from).marks();Re.replaceWith(ye.from,ye.to,oe.schema.text(ye.text,mt))}else Re.delete(ye.from,ye.to);le(Re)}return!0}}return!1},p=new i(/--$/,"—",{inCodeMark:!1}),k=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}),P=new i(/'$/,"’",{inCodeMark:!1}),F=[T,x,E,P];function z(Z,oe){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,re=arguments.length>3?arguments[3]:void 0;return new i(Z,function(he,ge,ye,Re){var Ze=le instanceof Function?le(ge):le,Be=he.tr.delete(ye,Re),mt=Be.doc.resolve(ye),ut=mt.blockRange(),vt=ut&&n.findWrapping(ut,oe,Ze);if(!vt)return null;Be.wrap(ut,vt);var st=Be.doc.resolve(ye-1).nodeBefore;return st&&st.type==oe&&n.canJoin(Be.doc,ye-1)&&(!re||re(ge,st))&&Be.join(ye-1),Be})}function Y(Z,oe){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;return new i(Z,function(re,he,ge,ye){var Re=re.doc.resolve(ge),Ze=le instanceof Function?le(he):le;return Re.node(-1).canReplaceWith(Re.index(-1),Re.indexAfter(-1),oe)?re.tr.delete(ge,ye).setBlockType(ge,ge,oe,Ze):null})}return ln.InputRule=i,ln.closeDoubleQuote=x,ln.closeSingleQuote=P,ln.ellipsis=k,ln.emDash=p,ln.inputRules=s,ln.openDoubleQuote=T,ln.openSingleQuote=E,ln.smartQuotes=F,ln.textblockTypeInputRule=Y,ln.undoInputRule=f,ln.wrappingInputRule=z,ln}var vs={},So={},Vy;function VJe(){if(Vy)return So;Vy=1,Object.defineProperty(So,"__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 So.base=r,So.keyName=o,So.shift=e,So}var Uy;function UJe(){if(Uy)return vs;Uy=1,Object.defineProperty(vs,"__esModule",{value:!0});var r=VJe(),e=Ku(),t=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function n(l){var f=l.split(/-(?!$)/),p=f[f.length-1];p=="Space"&&(p=" ");for(var k,T,x,E,P=0;P<f.length-1;P++){var F=f[P];if(/^(cmd|meta|m)$/i.test(F))E=!0;else if(/^a(lt)?$/i.test(F))k=!0;else if(/^(c|ctrl|control)$/i.test(F))T=!0;else if(/^s(hift)?$/i.test(F))x=!0;else if(/^mod$/i.test(F))t?E=!0:T=!0;else throw new Error("Unrecognized modifier name: "+F)}return k&&(p="Alt-"+p),T&&(p="Ctrl-"+p),E&&(p="Meta-"+p),x&&(p="Shift-"+p),p}function i(l){var f=Object.create(null);for(var p in l)f[n(p)]=l[p];return f}function a(l,f){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return f.altKey&&(l="Alt-"+l),f.ctrlKey&&(l="Ctrl-"+l),f.metaKey&&(l="Meta-"+l),p&&f.shiftKey&&(l="Shift-"+l),l}function o(l){return new e.Plugin({props:{handleKeyDown:s(l)}})}function s(l){var f=i(l);return function(p,k){var T=r.keyName(k),x,E=f[a(T,k)];if(E&&E(p.state,p.dispatch,p))return!0;if(T.length==1&&T!=" "){if(k.shiftKey){var P=f[a(T,k,!1)];if(P&&P(p.state,p.dispatch,p))return!0}if((k.shiftKey||k.altKey||k.metaKey||T.charCodeAt(0)>127)&&(x=r.base[k.keyCode])&&x!=T){var F=f[a(x,k)];if(F&&F(p.state,p.dispatch,p))return!0}}return!1}}return vs.keydownHandler=s,vs.keymap=o,vs}var La={},$y;function $Je(){if($y)return La;$y=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.
|
|
677
|
-
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,b,C,A,N=[],q=!0,V=!1;try{if(C=(c=c.call(u)).next,m!==0)for(;!(q=(v=C.call(c)).done)&&(N.push(v.value),N.length!==m);q=!0);}catch(Q){V=!0,b=Q}finally{try{if(!q&&c.return!=null&&(A=c.return(),Object(A)!==A))return}finally{if(V)throw b}}return N}}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,b=function(){};return{s:b,n:function(){return v>=u.length?{done:!0}:{done:!1,value:u[v++]}},e:function(V){throw V},f:b}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
678
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var C=!0,A=!1,N;return{s:function(){c=c.call(u)},n:function(){var V=c.next();return C=V.done,V},e:function(V){A=!0,N=V},f:function(){try{!C&&c.return!=null&&c.return()}finally{if(A)throw N}}}}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 b=l(m,c);if(b){var C=Object.getOwnPropertyDescriptor(b,c);return C.get?C.get.call(arguments.length<3?m:v):C.value}},s.apply(this,arguments)}function l(u,m){for(;!Object.prototype.hasOwnProperty.call(u,m)&&(u=P(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,b){return v.__proto__=b,v},p(u,m)}function k(u){var m=E();return function(){var v=P(u),b;if(m){var C=P(this).constructor;b=Reflect.construct(v,arguments,C)}else b=v.apply(this,arguments);return T(this,b)}}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 P(u){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(c){return c.__proto__||Object.getPrototypeOf(c)},P(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 z(u,m){if(!(u instanceof m))throw new TypeError("Cannot call a class as a function")}function Y(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,oe(v.key),v)}}function Z(u,m,c){return m&&Y(u.prototype,m),c&&Y(u,c),Object.defineProperty(u,"prototype",{writable:!1}),u}function oe(u){var m=le(u,"string");return F(m)==="symbol"?m:String(m)}function le(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 re=Ku(),he=Gu(),ge=Yh(),ye=function(m){for(var c=0;;c++)if(m=m.previousSibling,!m)return c},Re=function(m){var c=m.assignedSlot||m.parentNode;return c&&c.nodeType==11?c.host:c},Ze=null,Be=function(m,c,v){var b=Ze||(Ze=document.createRange());return b.setEnd(m,v??m.nodeValue.length),b.setStart(m,c||0),b},mt=function(){Ze=null},ut=function(m,c,v,b){return v&&(st(m,c,v,b,-1)||st(m,c,v,b,1))},vt=/^(img|br|input|textarea|hr)$/i;function st(u,m,c,v,b){for(;;){if(u==c&&m==v)return!0;if(m==(b<0?0:Rt(u))){var C=u.parentNode;if(!C||C.nodeType!=1||wt(u)||vt.test(u.nodeName)||u.contentEditable=="false")return!1;m=ye(u)+(b<0?0:1),u=C}else if(u.nodeType==1){if(u=u.childNodes[m+(b<0?-1:0)],u.contentEditable=="false")return!1;m=b<0?Rt(u):0}else return!1}}function Rt(u){return u.nodeType==3?u.nodeValue.length:u.childNodes.length}function _t(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=Rt(u)}else if(u.parentNode&&!wt(u))m=ye(u),u=u.parentNode;else return null}}function Xt(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&&!wt(u))m=ye(u)+1,u=u.parentNode;else return null}}function Qe(u,m,c){for(var v=m==0,b=m==Rt(u);v||b;){if(u==c)return!0;var C=ye(u);if(u=u.parentNode,!u)return!1;v=v&&C==0,b=b&&C==Rt(u)}}function wt(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 lt=function(m){return m.focusNode&&ut(m.focusNode,m.focusOffset,m.anchorNode,m.anchorOffset)};function St(u,m){var c=document.createEvent("Event");return c.initEvent("keydown",!0,!0),c.keyCode=u,c.key=c.code=m,c}function Et(u){for(var m=u.activeElement;m&&m.shadowRoot;)m=m.shadowRoot.activeElement;return m}function vr(u,m,c){if(u.caretPositionFromPoint)try{var v=u.caretPositionFromPoint(m,c);if(v)return{node:v.offsetNode,offset:Math.min(Rt(v.offsetNode),v.offset)}}catch{}if(u.caretRangeFromPoint){var b=u.caretRangeFromPoint(m,c);if(b)return{node:b.startContainer,offset:Math.min(Rt(b.startContainer),b.startOffset)}}}var ke=typeof navigator<"u"?navigator:null,pe=typeof document<"u"?document:null,ie=ke&&ke.userAgent||"",se=/Edge\/(\d+)/.exec(ie),te=/MSIE \d/.exec(ie),Te=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ie),Ee=!!(te||Te||se),Pe=te?document.documentMode:Te?+Te[1]:se?+se[1]:0,at=!Ee&&/gecko\/(\d+)/i.test(ie);at&&+(/Firefox\/(\d+)/.exec(ie)||[0,0])[1];var dt=!Ee&&/Chrome\/(\d+)/.exec(ie),ot=!!dt,Vt=dt?+dt[1]:0,gt=!Ee&&!!ke&&/Apple Computer/.test(ke.vendor),lr=gt&&(/Mobile\/\w+/.test(ie)||!!ke&&ke.maxTouchPoints>2),$t=lr||(ke?/Mac/.test(ke.platform):!1),ur=ke?/Win/.test(ke.platform):!1,At=/Android \d/.test(ie),cr=!!pe&&"webkitFontSmoothing"in pe.documentElement.style,En=cr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Zr(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 Zt(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 $e(u,m,c){for(var v=u.someProp("scrollThreshold")||0,b=u.someProp("scrollMargin")||5,C=u.dom.ownerDocument,A=c||u.dom;A;){if(A.nodeType!=1){A=Re(A);continue}var N=A,q=N==C.body,V=q?Zr(C):ze(N),Q=0,ce=0;if(m.top<V.top+Zt(v,"top")?ce=-(V.top-m.top+Zt(b,"top")):m.bottom>V.bottom-Zt(v,"bottom")&&(ce=m.bottom-m.top>V.bottom-V.top?m.top+Zt(b,"top")-V.top:m.bottom-V.bottom+Zt(b,"bottom")),m.left<V.left+Zt(v,"left")?Q=-(V.left-m.left+Zt(b,"left")):m.right>V.right-Zt(v,"right")&&(Q=m.right-V.right+Zt(b,"right")),Q||ce)if(q)C.defaultView.scrollBy(Q,ce);else{var ae=N.scrollLeft,be=N.scrollTop;ce&&(N.scrollTop+=ce),Q&&(N.scrollLeft+=Q);var Me=N.scrollLeft-ae,Fe=N.scrollTop-be;m={left:m.left-Me,top:m.top-Fe,right:m.right-Me,bottom:m.bottom-Fe}}var We=q?"fixed":getComputedStyle(A).position;if(/^(fixed|sticky)$/.test(We))break;A=We=="absolute"?A.offsetParent:Re(A)}}function it(u){for(var m=u.dom.getBoundingClientRect(),c=Math.max(0,m.top),v,b,C=(m.left+m.right)/2,A=c+1;A<Math.min(innerHeight,m.bottom);A+=5){var N=u.root.elementFromPoint(C,A);if(!(!N||N==u.dom||!u.dom.contains(N))){var q=N.getBoundingClientRect();if(q.top>=c-20){v=N,b=q.top;break}}}return{refDOM:v,refTop:b,stack:ct(u.dom)}}function ct(u){for(var m=[],c=u.ownerDocument,v=u;v&&(m.push({dom:v,top:v.scrollTop,left:v.scrollLeft}),u!=c);v=Re(v));return m}function xt(u){var m=u.refDOM,c=u.refTop,v=u.stack,b=m?m.getBoundingClientRect().top:0;mr(v,b==0?0:b-c)}function mr(u,m){for(var c=0;c<u.length;c++){var v=u[c],b=v.dom,C=v.top,A=v.left;b.scrollTop!=C+m&&(b.scrollTop=C+m),b.scrollLeft!=A&&(b.scrollLeft=A)}}var Ft=null;function Ut(u){if(u.setActive)return u.setActive();if(Ft)return u.focus(Ft);var m=ct(u);u.focus(Ft==null?{get preventScroll(){return Ft={preventScroll:!0},!0}}:void 0),Ft||(Ft=!1,mr(m,0))}function Pr(u,m){for(var c,v=2e8,b,C=0,A=m.top,N=m.top,q,V,Q=u.firstChild,ce=0;Q;Q=Q.nextSibling,ce++){var ae=void 0;if(Q.nodeType==1)ae=Q.getClientRects();else if(Q.nodeType==3)ae=Be(Q).getClientRects();else continue;for(var be=0;be<ae.length;be++){var Me=ae[be];if(Me.top<=A&&Me.bottom>=N){A=Math.max(Me.bottom,A),N=Math.min(Me.top,N);var Fe=Me.left>m.left?Me.left-m.left:Me.right<m.left?m.left-Me.right:0;if(Fe<v){c=Q,v=Fe,b=Fe&&c.nodeType==3?{left:Me.right<m.left?Me.right:Me.left,top:m.top}:m,Q.nodeType==1&&Fe&&(C=ce+(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=Q,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)&&(C=ce+1)}}return!c&&q&&(c=q,b=V,v=0),c&&c.nodeType==3?pn(c,b):!c||v&&c.nodeType==1?{node:u,offset:C}:Pr(c,b)}function pn(u,m){for(var c=u.nodeValue.length,v=document.createRange(),b=0;b<c;b++){v.setEnd(u,b+1),v.setStart(u,b);var C=er(v,1);if(C.top!=C.bottom&&Qt(m,C))return{node:u,offset:b+(m.left>=(C.left+C.right)/2?1:0)}}return{node:u,offset:0}}function Qt(u,m){return u.left>=m.left-1&&u.left<=m.right+1&&u.top>=m.top-1&&u.top<=m.bottom+1}function Br(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=Pr(m,c),b=v.node,C=v.offset,A=-1;if(b.nodeType==1&&!b.firstChild){var N=b.getBoundingClientRect();A=N.left!=N.right&&c.left>(N.left+N.right)/2?1:-1}return u.docView.posFromDOM(b,C,A)}function vn(u,m,c,v){for(var b=-1,C=m,A=!1;C!=u.dom;){var N=u.docView.nearestDesc(C,!0),q=void 0;if(!N)return null;if(N.dom.nodeType==1&&(N.node.isBlock&&N.parent||!N.contentDOM)&&((q=N.dom.getBoundingClientRect()).width||q.height)&&(N.node.isBlock&&N.parent&&(!A&&q.left>v.left||q.top>v.top?b=N.posBefore:(!A&&q.right<v.left||q.bottom<v.top)&&(b=N.posAfter),A=!0),!N.contentDOM&&b<0&&!N.node.isText)){var V=N.node.isBlock?v.top<(q.top+q.bottom)/2:v.left<(q.left+q.right)/2;return V?N.posBefore:N.posAfter}C=N.dom.parentNode}return b>-1?b:u.docView.posFromDOM(m,c,-1)}function Qr(u,m,c){var v=u.childNodes.length;if(v&&c.top<c.bottom)for(var b=Math.max(0,Math.min(v-1,Math.floor(v*(m.top-c.top)/(c.bottom-c.top))-2)),C=b;;){var A=u.childNodes[C];if(A.nodeType==1)for(var N=A.getClientRects(),q=0;q<N.length;q++){var V=N[q];if(Qt(m,V))return Qr(A,m,V)}if((C=(C+1)%v)==b)break}return u}function Wr(u,m){var c=u.dom.ownerDocument,v,b=0,C=vr(c,m.left,m.top);C&&(v=C.node,b=C.offset);var A=(u.root.elementFromPoint?u.root:c).elementFromPoint(m.left,m.top),N;if(!A||!u.dom.contains(A.nodeType!=1?A.parentNode:A)){var q=u.dom.getBoundingClientRect();if(!Qt(m,q)||(A=Qr(u.dom,m,q),!A))return null}if(gt)for(var V=A;v&&V;V=Re(V))V.draggable&&(v=void 0);if(A=Br(A,m),v){if(at&&v.nodeType==1&&(b=Math.min(b,v.childNodes.length),b<v.childNodes.length)){var Q=v.childNodes[b],ce;Q.nodeName=="IMG"&&(ce=Q.getBoundingClientRect()).right<=m.left&&ce.bottom>m.top&&b++}var ae;cr&&b&&v.nodeType==1&&(ae=v.childNodes[b-1]).nodeType==1&&ae.contentEditable=="false"&&ae.getBoundingClientRect().top>=m.top&&b--,v==u.dom&&b==v.childNodes.length-1&&v.lastChild.nodeType==1&&m.top>v.lastChild.getBoundingClientRect().bottom?N=u.state.doc.content.size:(b==0||v.nodeType!=1||v.childNodes[b-1].nodeName!="BR")&&(N=vn(u,v,b,m))}N==null&&(N=Mn(u,A,m));var be=u.docView.nearestDesc(A,!0);return{pos:N,inside:be?be.posAtStart-be.border:-1}}function Fr(u){return u.top<u.bottom||u.left<u.right}function er(u,m){var c=u.getClientRects();if(c.length){var v=c[m<0?0:c.length-1];if(Fr(v))return v}return Array.prototype.find.call(c,Fr)||u.getBoundingClientRect()}var en=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function qt(u,m,c){var v=u.docView.domFromPos(m,c<0?-1:1),b=v.node,C=v.offset,A=v.atom,N=cr||at;if(b.nodeType==3)if(N&&(en.test(b.nodeValue)||(c<0?!C:C==b.nodeValue.length))){var q=er(Be(b,C,C),c);if(at&&C&&/\s/.test(b.nodeValue[C-1])&&C<b.nodeValue.length){var V=er(Be(b,C-1,C-1),-1);if(V.top==q.top){var Q=er(Be(b,C,C+1),-1);if(Q.top!=q.top)return fr(Q,Q.left<V.left)}}return q}else{var ce=C,ae=C,be=c<0?1:-1;return c<0&&!C?(ae++,be=-1):c>=0&&C==b.nodeValue.length?(ce--,be=1):c<0?ce--:ae++,fr(er(Be(b,ce,ae),be),be<0)}var Me=u.state.doc.resolve(m-(A||0));if(!Me.parent.inlineContent){if(A==null&&C&&(c<0||C==Rt(b))){var Fe=b.childNodes[C-1];if(Fe.nodeType==1)return $(Fe.getBoundingClientRect(),!1)}if(A==null&&C<Rt(b)){var We=b.childNodes[C];if(We.nodeType==1)return $(We.getBoundingClientRect(),!0)}return $(b.getBoundingClientRect(),c>=0)}if(A==null&&C&&(c<0||C==Rt(b))){var Le=b.childNodes[C-1],Ct=Le.nodeType==3?Be(Le,Rt(Le)-(N?0:1)):Le.nodeType==1&&(Le.nodeName!="BR"||!Le.nextSibling)?Le:null;if(Ct)return fr(er(Ct,1),!1)}if(A==null&&C<Rt(b)){for(var ht=b.childNodes[C];ht.pmViewDesc&&ht.pmViewDesc.ignoreForCoords;)ht=ht.nextSibling;var tt=ht?ht.nodeType==3?Be(ht,0,N?0:1):ht.nodeType==1?ht:null:null;if(tt)return fr(er(tt,-1),!0)}return fr(er(b.nodeType==3?Be(b):b,-c),c>=0)}function fr(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 $(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 W(u,m,c){var v=u.state,b=u.root.activeElement;v!=m&&u.updateState(m),b!=u.dom&&u.focus();try{return c()}finally{v!=m&&u.updateState(v),b!=u.dom&&b&&b.focus()}}function R(u,m,c){var v=m.selection,b=c=="up"?v.$from:v.$to;return W(u,m,function(){for(var C=u.docView.domFromPos(b.pos,c=="up"?-1:1),A=C.node;;){var N=u.docView.nearestDesc(A,!0);if(!N)break;if(N.node.isBlock){A=N.contentDOM||N.dom;break}A=N.dom.parentNode}for(var q=qt(u,b.pos,1),V=A.firstChild;V;V=V.nextSibling){var Q=void 0;if(V.nodeType==1)Q=V.getClientRects();else if(V.nodeType==3)Q=Be(V,0,V.nodeValue.length).getClientRects();else continue;for(var ce=0;ce<Q.length;ce++){var ae=Q[ce];if(ae.bottom>ae.top+1&&(c=="up"?q.top-ae.top>(ae.bottom-q.top)*2:ae.bottom-q.bottom>(q.bottom-ae.top)*2))return!1}}return!0})}var D=/[\u0590-\u08ac]/;function B(u,m,c){var v=m.selection.$head;if(!v.parent.isTextblock)return!1;var b=v.parentOffset,C=!b,A=b==v.parent.content.size,N=u.domSelection();return N?!D.test(v.parent.textContent)||!N.modify?c=="left"||c=="backward"?C:A:W(u,m,function(){var q=u.domSelectionRange(),V=q.focusNode,Q=q.focusOffset,ce=q.anchorNode,ae=q.anchorOffset,be=N.caretBidiLevel;N.modify("move",c,"character");var Me=v.depth?u.docView.domAfterPos(v.before()):u.dom,Fe=u.domSelectionRange(),We=Fe.focusNode,Le=Fe.focusOffset,Ct=We&&!Me.contains(We.nodeType==1?We:We.parentNode)||V==We&&Q==Le;try{N.collapse(ce,ae),V&&(V!=ce||Q!=ae)&&N.extend&&N.extend(V,Q)}catch{}return be!=null&&(N.caretBidiLevel=be),Ct}):v.pos==v.start()||v.pos==v.end()}var H=null,K=null,de=!1;function xe(u,m,c){return H==m&&K==c?de:(H=m,K=c,de=c=="up"||c=="down"?R(u,m,c):B(u,m,c))}var ne=0,J=1,me=2,Ce=3,He=function(){function u(m,c,v,b){z(this,u),this.parent=m,this.children=c,this.dom=v,this.contentDOM=b,this.dirty=ne,v.pmViewDesc=this}return Z(u,[{key:"matchesWidget",value:function(c){return!1}},{key:"matchesMark",value:function(c){return!1}},{key:"matchesNode",value:function(c,v,b){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,b=this.posAtStart;;v++){var C=this.children[v];if(C==c)return b;b+=C.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,b){if(this.contentDOM&&this.contentDOM.contains(c.nodeType==1?c:c.parentNode))if(b<0){var C,A;if(c==this.contentDOM)C=c.childNodes[v-1];else{for(;c.parentNode!=this.contentDOM;)c=c.parentNode;C=c.previousSibling}for(;C&&!((A=C.pmViewDesc)&&A.parent==this);)C=C.previousSibling;return C?this.posBeforeChild(A)+A.size:this.posAtStart}else{var N,q;if(c==this.contentDOM)N=c.childNodes[v];else{for(;c.parentNode!=this.contentDOM;)c=c.parentNode;N=c.nextSibling}for(;N&&!((q=N.pmViewDesc)&&q.parent==this);)N=N.nextSibling;return N?this.posBeforeChild(q):this.posAtEnd}var V;if(c==this.dom&&this.contentDOM)V=v>ye(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 Q=c;;Q=Q.parentNode){if(Q==this.dom){V=!1;break}if(Q.previousSibling)break}if(V==null&&v==c.childNodes.length)for(var ce=c;;ce=ce.parentNode){if(ce==this.dom){V=!0;break}if(ce.nextSibling)break}}return V??b>0?this.posAtEnd:this.posAtStart}},{key:"nearestDesc",value:function(c){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,b=!0,C=c;C;C=C.parentNode){var A=this.getDesc(C),N=void 0;if(A&&(!v||A.node))if(b&&(N=A.nodeDOM)&&!(N.nodeType==1?N.contains(c.nodeType==1?c:c.parentNode):N==c))b=!1;else return A}}},{key:"getDesc",value:function(c){for(var v=c.pmViewDesc,b=v;b;b=b.parent)if(b==this)return v}},{key:"posFromDOM",value:function(c,v,b){for(var C=c;C;C=C.parentNode){var A=this.getDesc(C);if(A)return A.localPosFromDOM(c,v,b)}return-1}},{key:"descAt",value:function(c){for(var v=0,b=0;v<this.children.length;v++){var C=this.children[v],A=b+C.size;if(b==c&&A!=b){for(;!C.border&&C.children.length;)for(var N=0;N<C.children.length;N++){var q=C.children[N];if(q.size){C=q;break}}return C}if(c<A)return C.descAt(c-b-C.border);b=A}}},{key:"domFromPos",value:function(c,v){if(!this.contentDOM)return{node:this.dom,offset:0,atom:c+1};for(var b=0,C=0,A=0;b<this.children.length;b++){var N=this.children[b],q=A+N.size;if(q>c||N instanceof _){C=c-A;break}A=q}if(C)return this.children[b].domFromPos(C-this.children[b].border,v);for(var V;b&&!(V=this.children[b-1]).size&&V instanceof Ye&&V.side>=0;b--);if(v<=0){for(var Q,ce=!0;Q=b?this.children[b-1]:null,!(!Q||Q.dom.parentNode==this.contentDOM);b--,ce=!1);return Q&&v&&ce&&!Q.border&&!Q.domAtom?Q.domFromPos(Q.size,v):{node:this.contentDOM,offset:Q?ye(Q.dom)+1:0}}else{for(var ae,be=!0;ae=b<this.children.length?this.children[b]:null,!(!ae||ae.dom.parentNode==this.contentDOM);b++,be=!1);return ae&&be&&!ae.border&&!ae.domAtom?ae.domFromPos(0,v):{node:this.contentDOM,offset:ae?ye(ae.dom):this.contentDOM.childNodes.length}}}},{key:"parseRange",value:function(c,v){var b=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 C=-1,A=-1,N=b,q=0;;q++){var V=this.children[q],Q=N+V.size;if(C==-1&&c<=Q){var ce=N+V.border;if(c>=ce&&v<=Q-V.border&&V.node&&V.contentDOM&&this.contentDOM.contains(V.contentDOM))return V.parseRange(c,v,ce);c=N;for(var ae=q;ae>0;ae--){var be=this.children[ae-1];if(be.size&&be.dom.parentNode==this.contentDOM&&!be.emptyChildAt(1)){C=ye(be.dom)+1;break}c-=be.size}C==-1&&(C=0)}if(C>-1&&(Q>v||q==this.children.length-1)){v=Q;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=ye(Fe.dom);break}v+=Fe.size}A==-1&&(A=this.contentDOM.childNodes.length);break}N=Q}return{node:this.contentDOM,from:c,to:v,fromOffset:C,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),b=v.node,C=v.offset;if(b.nodeType!=1||C==b.childNodes.length)throw new RangeError("No node after pos "+c);return b.childNodes[C]}},{key:"setSelection",value:function(c,v,b){for(var C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,A=Math.min(c,v),N=Math.max(c,v),q=0,V=0;q<this.children.length;q++){var Q=this.children[q],ce=V+Q.size;if(A>V&&N<ce)return Q.setSelection(c-V-Q.border,v-V-Q.border,b,C);V=ce}var ae=this.domFromPos(c,c?-1:1),be=v==c?ae:this.domFromPos(v,v?-1:1),Me=b.root.getSelection(),Fe=b.domSelectionRange(),We=!1;if((at||gt)&&c==v){var Le=ae,Ct=Le.node,ht=Le.offset;if(Ct.nodeType==3){if(We=!!(ht&&Ct.nodeValue[ht-1]==`
|
|
679
|
-
`),We&&ht==Ct.nodeValue.length)for(var tt=Ct,yt;tt;tt=tt.parentNode){if(yt=tt.nextSibling){yt.nodeName=="BR"&&(ae=be={node:yt.parentNode,offset:ye(yt)+1});break}var It=tt.pmViewDesc;if(It&&It.node&&It.node.isBlock)break}}else{var zt=Ct.childNodes[ht-1];We=zt&&(zt.nodeName=="BR"||zt.contentEditable=="false")}}if(at&&Fe.focusNode&&Fe.focusNode!=be.node&&Fe.focusNode.nodeType==1){var yn=Fe.focusNode.childNodes[Fe.focusOffset];yn&&yn.contentEditable=="false"&&(C=!0)}if(!(!(C||We&>)&&ut(ae.node,ae.offset,Fe.anchorNode,Fe.anchorOffset)&&ut(be.node,be.offset,Fe.focusNode,Fe.focusOffset))){var dr=!1;if((Me.extend||c==v)&&!We){Me.collapse(ae.node,ae.offset);try{c!=v&&Me.extend(be.node,be.offset),dr=!0}catch{}}if(!dr){if(c>v){var qr=ae;ae=be,be=qr}var nr=document.createRange();nr.setEnd(be.node,be.offset),nr.setStart(ae.node,ae.offset),Me.removeAllRanges(),Me.addRange(nr)}}}},{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 b=0,C=0;C<this.children.length;C++){var A=this.children[C],N=b+A.size;if(b==N?c<=N&&v>=b:c<N&&v>b){var q=b+A.border,V=N-A.border;if(c>=q&&v<=V){this.dirty=c==b||v==N?me:J,c==q&&v==V&&(A.contentLost||A.dom.parentNode!=this.contentDOM)?A.dirty=Ce:A.markDirty(c-q,v-q);return}else A.dirty=A.dom==A.contentDOM&&A.dom.parentNode==this.contentDOM&&!A.children.length?me:Ce}b=N}this.dirty=me}},{key:"markParentsDirty",value:function(){for(var c=1,v=this.parent;v;v=v.parent,c++){var b=c==1?me:J;v.dirty<b&&(v.dirty=b)}}},{key:"domAtom",get:function(){return!1}},{key:"ignoreForCoords",get:function(){return!1}},{key:"isText",value:function(c){return!1}}]),u}(),Ye=function(u){f(c,u);var m=k(c);function c(v,b,C,A){var N;z(this,c);var q,V=b.type.toDOM;if(typeof V=="function"&&(V=V(C,function(){if(!q)return A;if(q.parent)return q.parent.posBeforeChild(q)})),!b.type.spec.raw){if(V.nodeType!=1){var Q=document.createElement("span");Q.appendChild(V),V=Q}V.contentEditable="false",V.classList.add("ProseMirror-widget")}return N=m.call(this,v,[],V,null),N.widget=b,N.widget=b,q=x(N),N}return Z(c,[{key:"matchesWidget",value:function(b){return this.dirty==ne&&b.type.eq(this.widget.type)}},{key:"parseRule",value:function(){return{ignore:!0}}},{key:"stopEvent",value:function(b){var C=this.widget.spec.stopEvent;return C?C(b):!1}},{key:"ignoreMutation",value:function(b){return b.type!="selection"||this.widget.spec.ignoreSelection}},{key:"destroy",value:function(){this.widget.type.destroy(this.dom),s(P(c.prototype),"destroy",this).call(this)}},{key:"domAtom",get:function(){return!0}},{key:"side",get:function(){return this.widget.type.side}}]),c}(He),I=function(u){f(c,u);var m=k(c);function c(v,b,C,A){var N;return z(this,c),N=m.call(this,v,[],b,null),N.textDOM=C,N.text=A,N}return Z(c,[{key:"size",get:function(){return this.text.length}},{key:"localPosFromDOM",value:function(b,C){return b!=this.textDOM?this.posAtStart+(C?this.size:0):this.posAtStart+C}},{key:"domFromPos",value:function(b){return{node:this.textDOM,offset:b}}},{key:"ignoreMutation",value:function(b){return b.type==="characterData"&&b.target.nodeValue==b.oldValue}}]),c}(He),M=function(u){f(c,u);var m=k(c);function c(v,b,C,A,N){var q;return z(this,c),q=m.call(this,v,[],C,A),q.mark=b,q.spec=N,q}return Z(c,[{key:"parseRule",value:function(){return this.dirty&Ce||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}},{key:"matchesMark",value:function(b){return this.dirty!=Ce&&this.mark.eq(b)}},{key:"markDirty",value:function(b,C){if(s(P(c.prototype),"markDirty",this).call(this,b,C),this.dirty!=ne){for(var A=this.parent;!A.node;)A=A.parent;A.dirty<this.dirty&&(A.dirty=this.dirty),this.dirty=ne}}},{key:"slice",value:function(b,C,A){var N=c.create(this.parent,this.mark,!0,A),q=this.children,V=this.size;C<V&&(q=An(q,C,V,A)),b>0&&(q=An(q,0,b,A));for(var Q=0;Q<q.length;Q++)q[Q].parent=N;return N.children=q,N}},{key:"ignoreMutation",value:function(b){return this.spec.ignoreMutation?this.spec.ignoreMutation(b):s(P(c.prototype),"ignoreMutation",this).call(this,b)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),s(P(c.prototype),"destroy",this).call(this)}}],[{key:"create",value:function(b,C,A,N){var q=N.nodeViews[C.type.name],V=q&&q(C,N,A);return(!V||!V.dom)&&(V=he.DOMSerializer.renderSpec(document,C.type.spec.toDOM(C,A),null,C.attrs)),new c(b,C,V.dom,V.contentDOM||V.dom,V)}}]),c}(He),g=function(u){f(c,u);var m=k(c);function c(v,b,C,A,N,q,V,Q,ce){var ae;return z(this,c),ae=m.call(this,v,[],N,q),ae.node=b,ae.outerDeco=C,ae.innerDeco=A,ae.nodeDOM=V,ae}return Z(c,[{key:"parseRule",value:function(){var b=this;if(this.node.type.spec.reparseInView)return null;var C={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(C.preserveWhitespace="full"),!this.contentDOM)C.getContent=function(){return b.node.content};else if(!this.contentLost)C.contentElement=this.contentDOM;else{for(var A=this.children.length-1;A>=0;A--){var N=this.children[A];if(this.dom.contains(N.dom.parentNode)){C.contentElement=N.dom.parentNode;break}}C.contentElement||(C.getContent=function(){return he.Fragment.empty})}return C}},{key:"matchesNode",value:function(b,C,A){return this.dirty==ne&&b.eq(this.node)&&kt(C,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(b,C){var A=this,N=this.node.inlineContent,q=C,V=b.composing?this.localCompositionInfo(b,C):null,Q=V&&V.pos>-1?V:null,ce=V&&V.pos<0,ae=new tn(this,Q&&Q.node,b);eo(this.node,this.innerDeco,function(be,Me,Fe){be.spec.marks?ae.syncToMarks(be.spec.marks,N,b):be.type.side>=0&&!Fe&&ae.syncToMarks(Me==A.node.childCount?he.Mark.none:A.node.child(Me).marks,N,b),ae.placeWidget(be,b,q)},function(be,Me,Fe,We){ae.syncToMarks(be.marks,N,b);var Le;ae.findNodeMatch(be,Me,Fe,We)||ce&&b.state.selection.from>q&&b.state.selection.to<q+be.nodeSize&&(Le=ae.findIndexWithChild(V.node))>-1&&ae.updateNodeAt(be,Me,Fe,Le,b)||ae.updateNextNode(be,Me,Fe,b,We,q)||ae.addNode(be,Me,Fe,b,q),q+=be.nodeSize}),ae.syncToMarks([],N,b),this.node.isTextblock&&ae.addTextblockHacks(),ae.destroyRest(),(ae.changed||this.dirty==me)&&(Q&&this.protectLocalComposition(b,Q),X(this.contentDOM,this.children,b),lr&&da(this.dom))}},{key:"localCompositionInfo",value:function(b,C){var A=b.state.selection,N=A.from,q=A.to;if(!(b.state.selection instanceof re.TextSelection)||N<C||q>C+this.node.content.size)return null;var V=b.input.compositionNode;if(!V||!this.dom.contains(V.parentNode))return null;if(this.node.inlineContent){var Q=V.nodeValue,ce=hi(this.node.content,Q,N-C,q-C);return ce<0?null:{node:V,pos:ce,text:Q}}else return{node:V,pos:-1,text:""}}},{key:"protectLocalComposition",value:function(b,C){var A=C.node,N=C.pos,q=C.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 Q=new I(this,V,A,q);b.input.compositionNodes.push(Q),this.children=An(this.children,N,N+q.length,b,Q)}}},{key:"update",value:function(b,C,A,N){return this.dirty==Ce||!b.sameMarkup(this.node)?!1:(this.updateInner(b,C,A,N),!0)}},{key:"updateInner",value:function(b,C,A,N){this.updateOuterDeco(C),this.node=b,this.innerDeco=A,this.contentDOM&&this.updateChildren(N,this.posAtStart),this.dirty=ne}},{key:"updateOuterDeco",value:function(b){if(!kt(b,this.outerDeco)){var C=this.nodeDOM.nodeType!=1,A=this.dom;this.dom=De(this.dom,this.nodeDOM,Ne(this.outerDeco,this.node,C),Ne(b,this.node,C)),this.dom!=A&&(A.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=b}}},{key:"selectNode",value:function(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}},{key:"deselectNode",value:function(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}},{key:"domAtom",get:function(){return this.node.isAtom}}],[{key:"create",value:function(b,C,A,N,q,V){var Q=q.nodeViews[C.type.name],ce,ae=Q&&Q(C,q,function(){if(!ce)return V;if(ce.parent)return ce.parent.posBeforeChild(ce)},A,N),be=ae&&ae.dom,Me=ae&&ae.contentDOM;if(C.isText){if(!be)be=document.createTextNode(C.text);else if(be.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else if(!be){var Fe=he.DOMSerializer.renderSpec(document,C.type.spec.toDOM(C),null,C.attrs);be=Fe.dom,Me=Fe.contentDOM}!Me&&!C.isText&&be.nodeName!="BR"&&(be.hasAttribute("contenteditable")||(be.contentEditable="false"),C.type.spec.draggable&&(be.draggable=!0));var We=be;return be=nt(be,A,C),ae?ce=new j(b,C,A,N,be,Me||null,We,ae,q,V+1):C.isText?new O(b,C,A,N,be,We,q):new c(b,C,A,N,be,Me||null,We)}}]),c}(He);function w(u,m,c,v,b){nt(v,m,u);var C=new g(void 0,u,m,c,v,v,v,b,0);return C.contentDOM&&C.updateChildren(b,0),C}var O=function(u){f(c,u);var m=k(c);function c(v,b,C,A,N,q,V){return z(this,c),m.call(this,v,b,C,A,N,null,q,V,0)}return Z(c,[{key:"parseRule",value:function(){for(var b=this.nodeDOM.parentNode;b&&b!=this.dom&&!b.pmIsDeco;)b=b.parentNode;return{skip:b||!0}}},{key:"update",value:function(b,C,A,N){return this.dirty==Ce||this.dirty!=ne&&!this.inParent()||!b.sameMarkup(this.node)?!1:(this.updateOuterDeco(C),(this.dirty!=ne||b.text!=this.node.text)&&b.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=b.text,N.trackWrites==this.nodeDOM&&(N.trackWrites=null)),this.node=b,this.dirty=ne,!0)}},{key:"inParent",value:function(){for(var b=this.parent.contentDOM,C=this.nodeDOM;C;C=C.parentNode)if(C==b)return!0;return!1}},{key:"domFromPos",value:function(b){return{node:this.nodeDOM,offset:b}}},{key:"localPosFromDOM",value:function(b,C,A){return b==this.nodeDOM?this.posAtStart+Math.min(C,this.node.text.length):s(P(c.prototype),"localPosFromDOM",this).call(this,b,C,A)}},{key:"ignoreMutation",value:function(b){return b.type!="characterData"&&b.type!="selection"}},{key:"slice",value:function(b,C,A){var N=this.node.cut(b,C),q=document.createTextNode(N.text);return new c(this.parent,N,this.outerDeco,this.innerDeco,q,q,A)}},{key:"markDirty",value:function(b,C){s(P(c.prototype),"markDirty",this).call(this,b,C),this.dom!=this.nodeDOM&&(b==0||C==this.nodeDOM.nodeValue.length)&&(this.dirty=Ce)}},{key:"domAtom",get:function(){return!1}},{key:"isText",value:function(b){return this.node.text==b}}]),c}(g),_=function(u){f(c,u);var m=k(c);function c(){return z(this,c),m.apply(this,arguments)}return Z(c,[{key:"parseRule",value:function(){return{ignore:!0}}},{key:"matchesHack",value:function(b){return this.dirty==ne&&this.dom.nodeName==b}},{key:"domAtom",get:function(){return!0}},{key:"ignoreForCoords",get:function(){return this.dom.nodeName=="IMG"}}]),c}(He),j=function(u){f(c,u);var m=k(c);function c(v,b,C,A,N,q,V,Q,ce,ae){var be;return z(this,c),be=m.call(this,v,b,C,A,N,q,V,ce,ae),be.spec=Q,be}return Z(c,[{key:"update",value:function(b,C,A,N){if(this.dirty==Ce)return!1;if(this.spec.update&&(this.node.type==b.type||this.spec.multiType)){var q=this.spec.update(b,C,A);return q&&this.updateInner(b,C,A,N),q}else return!this.contentDOM&&!b.isLeaf?!1:s(P(c.prototype),"update",this).call(this,b,C,A,N)}},{key:"selectNode",value:function(){this.spec.selectNode?this.spec.selectNode():s(P(c.prototype),"selectNode",this).call(this)}},{key:"deselectNode",value:function(){this.spec.deselectNode?this.spec.deselectNode():s(P(c.prototype),"deselectNode",this).call(this)}},{key:"setSelection",value:function(b,C,A,N){this.spec.setSelection?this.spec.setSelection(b,C,A.root):s(P(c.prototype),"setSelection",this).call(this,b,C,A,N)}},{key:"destroy",value:function(){this.spec.destroy&&this.spec.destroy(),s(P(c.prototype),"destroy",this).call(this)}},{key:"stopEvent",value:function(b){return this.spec.stopEvent?this.spec.stopEvent(b):!1}},{key:"ignoreMutation",value:function(b){return this.spec.ignoreMutation?this.spec.ignoreMutation(b):s(P(c.prototype),"ignoreMutation",this).call(this,b)}}]),c}(g);function X(u,m,c){for(var v=u.firstChild,b=!1,C=0;C<m.length;C++){var A=m[C],N=A.dom;if(N.parentNode==u){for(;N!=v;)v=Ht(v),b=!0;v=v.nextSibling}else b=!0,u.insertBefore(N,v);if(A instanceof M){var q=v?v.previousSibling:u.lastChild;X(A.contentDOM,A.children,c),v=q?q.nextSibling:u.firstChild}}for(;v;)v=Ht(v),b=!0;b&&c.trackWrites==u&&(c.trackWrites=null)}var ue=function(m){m&&(this.nodeName=m)};ue.prototype=Object.create(null);var ve=[new ue];function Ne(u,m,c){if(u.length==0)return ve;for(var v=c?ve[0]:new ue,b=[v],C=0;C<u.length;C++){var A=u[C].type.attrs;if(A){A.nodeName&&b.push(v=new ue(A.nodeName));for(var N in A){var q=A[N];q!=null&&(c&&b.length==1&&b.push(v=new ue(m.isInline?"span":"div")),N=="class"?v.class=(v.class?v.class+" ":"")+q:N=="style"?v.style=(v.style?v.style+";":"")+q:N!="nodeName"&&(v[N]=q))}}}return b}function De(u,m,c,v){if(c==ve&&v==ve)return m;for(var b=m,C=0;C<v.length;C++){var A=v[C],N=c[C];if(C){var q=void 0;N&&N.nodeName==A.nodeName&&b!=u&&(q=b.parentNode)&&q.nodeName.toLowerCase()==A.nodeName||(q=document.createElement(A.nodeName),q.pmIsDeco=!0,q.appendChild(b),N=ve[0]),b=q}_e(b,N||ve[0],A)}return b}function _e(u,m,c){for(var v in m)v!="class"&&v!="style"&&v!="nodeName"&&!(v in c)&&u.removeAttribute(v);for(var b in c)b!="class"&&b!="style"&&b!="nodeName"&&c[b]!=m[b]&&u.setAttribute(b,c[b]);if(m.class!=c.class){for(var C=m.class?m.class.split(" ").filter(Boolean):[],A=c.class?c.class.split(" ").filter(Boolean):[],N=0;N<C.length;N++)A.indexOf(C[N])==-1&&u.classList.remove(C[N]);for(var q=0;q<A.length;q++)C.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,Q;Q=V.exec(m.style);)u.style.removeProperty(Q[1]);c.style&&(u.style.cssText+=c.style)}}function nt(u,m,c){return De(u,u,ve,Ne(m,c,u.nodeType!=1))}function kt(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 Ht(u){var m=u.nextSibling;return u.parentNode.removeChild(u),m}var tn=function(){function u(m,c,v){z(this,u),this.lock=c,this.view=v,this.index=0,this.stack=[],this.changed=!1,this.top=m,this.preMatch=zn(m.node.content,m)}return Z(u,[{key:"destroyBetween",value:function(c,v){if(c!=v){for(var b=c;b<v;b++)this.top.children[b].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,b){for(var C=0,A=this.stack.length>>1,N=Math.min(A,c.length);C<N&&(C==A-1?this.top:this.stack[C+1<<1]).matchesMark(c[C])&&c[C].type.spec.spanning!==!1;)C++;for(;C<A;)this.destroyRest(),this.top.dirty=ne,this.index=this.stack.pop(),this.top=this.stack.pop(),A--;for(;A<c.length;){this.stack.push(this.top,this.index+1);for(var q=-1,V=this.index;V<Math.min(this.index+3,this.top.children.length);V++){var Q=this.top.children[V];if(Q.matchesMark(c[A])&&!this.isLocked(Q.dom)){q=V;break}}if(q>-1)q>this.index&&(this.changed=!0,this.destroyBetween(this.index,q)),this.top=this.top.children[this.index];else{var ce=M.create(this.top,c[A],v,b);this.top.children.splice(this.index,0,ce),this.top=ce,this.changed=!0}this.index=0,A++}}},{key:"findNodeMatch",value:function(c,v,b,C){var A=-1,N;if(C>=this.preMatch.index&&(N=this.preMatch.matches[C-this.preMatch.index]).parent==this.top&&N.matchesNode(c,v,b))A=this.top.children.indexOf(N,this.index);else for(var q=this.index,V=Math.min(this.top.children.length,q+5);q<V;q++){var Q=this.top.children[q];if(Q.matchesNode(c,v,b)&&!this.preMatch.matched.has(Q)){A=q;break}}return A<0?!1:(this.destroyBetween(this.index,A),this.index++,!0)}},{key:"updateNodeAt",value:function(c,v,b,C,A){var N=this.top.children[C];return N.dirty==Ce&&N.dom==N.contentDOM&&(N.dirty=me),N.update(c,v,b,A)?(this.destroyBetween(this.index,C),this.index++,!0):!1}},{key:"findIndexWithChild",value:function(c){for(;;){var v=c.parentNode;if(!v)return-1;if(v==this.top.contentDOM){var b=c.pmViewDesc;if(b){for(var C=this.index;C<this.top.children.length;C++)if(this.top.children[C]==b)return C}return-1}c=v}}},{key:"updateNextNode",value:function(c,v,b,C,A,N){for(var q=this.index;q<this.top.children.length;q++){var V=this.top.children[q];if(V instanceof g){var Q=this.preMatch.matched.get(V);if(Q!=null&&Q!=A)return!1;var ce=V.dom,ae=void 0,be=this.isLocked(ce)&&!(c.isText&&V.node&&V.node.isText&&V.nodeDOM.nodeValue==c.text&&V.dirty!=Ce&&kt(v,V.outerDeco));if(!be&&V.update(c,v,b,C))return this.destroyBetween(this.index,q),V.dom!=ce&&(this.changed=!0),this.index++,!0;if(!be&&(ae=this.recreateWrapper(V,c,v,b,C,N)))return this.destroyBetween(this.index,q),this.top.children[this.index]=ae,ae.contentDOM&&(ae.dirty=me,ae.updateChildren(C,N+1),ae.dirty=ne),this.changed=!0,this.index++,!0;break}}return!1}},{key:"recreateWrapper",value:function(c,v,b,C,A,N){if(c.dirty||v.isAtom||!c.children.length||!c.node.content.eq(v.content)||!kt(b,c.outerDeco)||!C.eq(c.innerDeco))return null;var q=g.create(this.top,v,b,C,A,N);if(q.contentDOM){q.children=c.children,c.children=[];var V=i(q.children),Q;try{for(V.s();!(Q=V.n()).done;){var ce=Q.value;ce.parent=q}}catch(ae){V.e(ae)}finally{V.f()}}return c.destroy(),q}},{key:"addNode",value:function(c,v,b,C,A){var N=g.create(this.top,c,v,b,C,A);N.contentDOM&&N.updateChildren(C,A+1),this.top.children.splice(this.index++,0,N),this.changed=!0}},{key:"placeWidget",value:function(c,v,b){var C=this.index<this.top.children.length?this.top.children[this.index]:null;if(C&&C.matchesWidget(c)&&(c==C.widget||!C.widget.type.toDOM.parentNode))this.index++;else{var A=new Ye(this.top,c,v,b);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 M;)v=c,c=v.children[v.children.length-1];(!c||!(c instanceof O)||/\n$/.test(c.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(c.node.text))&&((gt||ot)&&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 b=document.createElement(c);c=="IMG"&&(b.className="ProseMirror-separator",b.alt=""),c=="BR"&&(b.className="ProseMirror-trailingBreak");var C=new _(this.top,[],b,null);v!=this.top?v.children.push(C):v.children.splice(this.index++,0,C),this.changed=!0}}},{key:"isLocked",value:function(c){return this.lock&&(c==this.lock||c.nodeType==1&&c.contains(this.lock.parentNode))}}]),u}();function zn(u,m){var c=m,v=c.children.length,b=u.childCount,C=new Map,A=[];e:for(;b>0;){for(var N=void 0;;)if(v){var q=c.children[v-1];if(q instanceof M)c=q,v=q.children.length;else{N=q,v--;break}}else{if(c==m)break e;v=c.parent.children.indexOf(c),c=c.parent}var V=N.node;if(V){if(V!=u.child(b-1))break;--b,C.set(N,b),A.push(N)}}return{index:b,matched:C,matches:A.reverse()}}function Xn(u,m){return u.type.side-m.type.side}function eo(u,m,c,v){var b=m.locals(u),C=0;if(b.length==0){for(var A=0;A<u.childCount;A++){var N=u.child(A);v(N,b,m.forChild(C,N),A),C+=N.nodeSize}return}for(var q=0,V=[],Q=null,ce=0;;){for(var ae=void 0,be=void 0;q<b.length&&b[q].to==C;){var Me=b[q++];Me.widget&&(ae?(be||(be=[ae])).push(Me):ae=Me)}if(ae)if(be){be.sort(Xn);for(var Fe=0;Fe<be.length;Fe++)c(be[Fe],ce,!!Q)}else c(ae,ce,!!Q);var We=void 0,Le=void 0;if(Q)Le=-1,We=Q,Q=null;else if(ce<u.childCount)Le=ce,We=u.child(ce++);else break;for(var Ct=0;Ct<V.length;Ct++)V[Ct].to<=C&&V.splice(Ct--,1);for(;q<b.length&&b[q].from<=C&&b[q].to>C;)V.push(b[q++]);var ht=C+We.nodeSize;if(We.isText){var tt=ht;q<b.length&&b[q].from<tt&&(tt=b[q].from);for(var yt=0;yt<V.length;yt++)V[yt].to<tt&&(tt=V[yt].to);tt<ht&&(Q=We.cut(tt-C),We=We.cut(0,tt-C),ht=tt,Le=-1)}else for(;q<b.length&&b[q].to<ht;)q++;var It=We.isInline&&!We.isLeaf?V.filter(function(zt){return!zt.inline}):V.slice();v(We,It,m.forChild(C,We),Le),C=ht}}function da(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 hi(u,m,c,v){for(var b=0,C=0;b<u.childCount&&C<=v;){var A=u.child(b++),N=C;if(C+=A.nodeSize,!!A.isText){for(var q=A.text;b<u.childCount;){var V=u.child(b++);if(C+=V.nodeSize,!V.isText)break;q+=V.text}if(C>=c){if(C>=v&&q.slice(v-m.length-N,v-N)==m)return v-m.length;var Q=N<v?q.lastIndexOf(m,v-N-1):-1;if(Q>=0&&Q+m.length+N>=c)return N+Q;if(c==v&&q.length>=v+m.length-N&&q.slice(v-N,v-N+m.length)==m)return v}}}return-1}function An(u,m,c,v,b){for(var C=[],A=0,N=0;A<u.length;A++){var q=u[A],V=N,Q=N+=q.size;V>=c||Q<=m?C.push(q):(V<m&&C.push(q.slice(0,m-V,v)),b&&(C.push(b),b=void 0),Q>c&&C.push(q.slice(c-V,q.size,v)))}return C}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 b=u.docView.nearestDesc(c.focusNode),C=b&&b.size==0,A=u.docView.posFromDOM(c.focusNode,c.focusOffset,1);if(A<0)return null;var N=v.resolve(A),q,V;if(lt(c)){for(q=A;b&&!b.node;)b=b.parent;var Q=b.node;if(b&&Q.isAtom&&re.NodeSelection.isSelectable(Q)&&b.parent&&!(Q.isInline&&Qe(c.focusNode,c.focusOffset,b.dom))){var ce=b.posBefore;V=new re.NodeSelection(A==ce?N:v.resolve(ce))}}else{if(c instanceof u.dom.ownerDocument.defaultView.Selection&&c.rangeCount>1){for(var ae=A,be=A,Me=0;Me<c.rangeCount;Me++){var Fe=c.getRangeAt(Me);ae=Math.min(ae,u.docView.posFromDOM(Fe.startContainer,Fe.startOffset,1)),be=Math.max(be,u.docView.posFromDOM(Fe.endContainer,Fe.endOffset,-1))}if(ae<0)return null;var We=be==u.state.selection.anchor?[be,ae]:[ae,be],Le=r(We,2);q=Le[0],A=Le[1],N=v.resolve(A)}else q=u.docView.posFromDOM(c.anchorNode,c.anchorOffset,1);if(q<0)return null}var Ct=v.resolve(q);if(!V){var ht=m=="pointer"||u.state.selection.head<N.pos&&!C?1:-1;V=Dn(u,Ct,N,ht)}return V}function ha(u){return u.editable?u.hasFocus():ro(u)&&document.activeElement&&document.activeElement.contains(u.dom)}function rn(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=u.state.selection;if(pi(u,c),!!ha(u)){if(!m&&u.input.mouseDown&&u.input.mouseDown.allowDefault&&ot){var v=u.domSelectionRange(),b=u.domObserver.currentSelection;if(v.anchorNode&&b.anchorNode&&ut(v.anchorNode,v.anchorOffset,b.anchorNode,b.anchorOffset)){u.input.mouseDown.delayedSelectionSync=!0,u.domObserver.setCurSelection();return}}if(u.domObserver.disconnectSelection(),u.cursorWrapper)Nn(u);else{var C=c.anchor,A=c.head,N,q;pa&&!(c instanceof re.TextSelection)&&(c.$from.parent.inlineContent||(N=qi(u,c.from)),!c.empty&&!c.$from.parent.inlineContent&&(q=qi(u,c.to))),u.docView.setSelection(C,A,u,m),pa&&(N&&_i(N),q&&_i(q)),c.visible?u.dom.classList.remove("ProseMirror-hideselection"):(u.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&va(u))}u.domObserver.setCurSelection(),u.domObserver.connectSelection()}}var pa=gt||ot&&Vt<63;function qi(u,m){var c=u.docView.domFromPos(m,0),v=c.node,b=c.offset,C=b<v.childNodes.length?v.childNodes[b]:null,A=b?v.childNodes[b-1]:null;if(gt&&C&&C.contentEditable=="false")return Hi(C);if((!C||C.contentEditable=="false")&&(!A||A.contentEditable=="false")){if(C)return Hi(C);if(A)return Hi(A)}}function Hi(u){return u.contentEditable="true",gt&&u.draggable&&(u.draggable=!1,u.wasDraggable=!0),u}function _i(u){u.contentEditable="false",u.wasDraggable&&(u.draggable=!0,u.wasDraggable=null)}function va(u){var m=u.dom.ownerDocument;m.removeEventListener("selectionchange",u.input.hideSelectionGuard);var c=u.domSelectionRange(),v=c.anchorNode,b=c.anchorOffset;m.addEventListener("selectionchange",u.input.hideSelectionGuard=function(){(c.anchorNode!=v||c.anchorOffset!=b)&&(m.removeEventListener("selectionchange",u.input.hideSelectionGuard),setTimeout(function(){(!ha(u)||u.state.selection.visible)&&u.dom.classList.remove("ProseMirror-hideselection")},20))})}function Nn(u){var m=u.domSelection(),c=document.createRange();if(m){var v=u.cursorWrapper.dom,b=v.nodeName=="IMG";b?c.setStart(v.parentNode,ye(v)+1):c.setStart(v,0),c.collapse(!0),m.removeAllRanges(),m.addRange(c),!b&&!u.state.selection.visible&&Ee&&Pe<=11&&(v.disabled=!0,v.disabled=!1)}}function pi(u,m){if(m instanceof re.NodeSelection){var c=u.docView.descAt(m.from);c!=u.lastSelectedViewDesc&&(zi(u),c&&c.selectNode(),u.lastSelectedViewDesc=c)}else zi(u)}function zi(u){u.lastSelectedViewDesc&&(u.lastSelectedViewDesc.parent&&u.lastSelectedViewDesc.deselectNode(),u.lastSelectedViewDesc=void 0)}function Dn(u,m,c,v){return u.someProp("createSelectionBetween",function(b){return b(u,m,c)})||re.TextSelection.between(m,c,v)}function to(u){return u.editable&&!u.hasFocus()?!1:ro(u)}function ro(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 Zn(u){var m=u.docView.domFromPos(u.state.selection.anchor,0),c=u.domSelectionRange();return ut(m.node,m.offset,c.anchorNode,c.anchorOffset)}function Ln(u,m){var c=u.selection,v=c.$anchor,b=c.$head,C=m>0?v.max(b):v.min(b),A=C.parent.inlineContent?C.depth?u.doc.resolve(m>0?C.after():C.before()):null:C;return A&&re.Selection.findFrom(A,m)}function Rn(u,m){return u.dispatch(u.state.tr.setSelection(m).scrollIntoView()),!0}function Vi(u,m,c){var v=u.state.selection;if(v instanceof re.TextSelection)if(c.indexOf("s")>-1){var b=v.$head,C=b.textOffset?null:m<0?b.nodeBefore:b.nodeAfter;if(!C||C.isText||!C.isLeaf)return!1;var A=u.state.doc.resolve(b.pos+C.nodeSize*(m<0?-1:1));return Rn(u,new re.TextSelection(v.$anchor,A))}else if(v.empty){if(u.endOfTextblock(m>0?"forward":"backward")){var N=Ln(u.state,m);return N&&N instanceof re.NodeSelection?Rn(u,N):!1}else if(!($t&&c.indexOf("m")>-1)){var q=v.$head,V=q.textOffset?null:m<0?q.nodeBefore:q.nodeAfter,Q;if(!V||V.isText)return!1;var ce=m<0?q.pos-V.nodeSize:q.pos;return V.isAtom||(Q=u.docView.descAt(ce))&&!Q.contentDOM?re.NodeSelection.isSelectable(V)?Rn(u,new re.NodeSelection(m<0?u.state.doc.resolve(q.pos-V.nodeSize):q)):cr?Rn(u,new re.TextSelection(u.state.doc.resolve(m<0?ce:ce+V.nodeSize))):!1:!1}}else return!1;else{if(v instanceof re.NodeSelection&&v.node.isInline)return Rn(u,new re.TextSelection(m>0?v.$to:v.$from));var ae=Ln(u.state,m);return ae?Rn(u,ae):!1}}function vi(u){return u.nodeType==3?u.nodeValue.length:u.childNodes.length}function Qn(u,m){var c=u.pmViewDesc;return c&&c.size==0&&(m<0||u.nextSibling||u.nodeName!="BR")}function mn(u,m){return m<0?ma(u):Xo(u)}function ma(u){var m=u.domSelectionRange(),c=m.focusNode,v=m.focusOffset;if(c){var b,C,A=!1;for(at&&c.nodeType==1&&v<vi(c)&&Qn(c.childNodes[v],-1)&&(A=!0);;)if(v>0){if(c.nodeType!=1)break;var N=c.childNodes[v-1];if(Qn(N,-1))b=c,C=--v;else if(N.nodeType==3)c=N,v=c.nodeValue.length;else break}else{if(nn(c))break;for(var q=c.previousSibling;q&&Qn(q,-1);)b=c.parentNode,C=ye(q),q=q.previousSibling;if(q)c=q,v=vi(c);else{if(c=c.parentNode,c==u.dom)break;v=0}}A?Ui(u,c,v):b&&Ui(u,b,C)}}function Xo(u){var m=u.domSelectionRange(),c=m.focusNode,v=m.focusOffset;if(c){for(var b=vi(c),C,A;;)if(v<b){if(c.nodeType!=1)break;var N=c.childNodes[v];if(Qn(N,1))C=c,A=++v;else break}else{if(nn(c))break;for(var q=c.nextSibling;q&&Qn(q,1);)C=q.parentNode,A=ye(q)+1,q=q.nextSibling;if(q)c=q,v=0,b=vi(c);else{if(c=c.parentNode,c==u.dom)break;v=b=0}}C&&Ui(u,C,A)}}function nn(u){var m=u.pmViewDesc;return m&&m.node&&m.node.isBlock}function no(u,m){for(;u&&m==u.childNodes.length&&!wt(u);)m=ye(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 io(u,m){for(;u&&!m&&!wt(u);)m=ye(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 Ui(u,m,c){if(m.nodeType!=3){var v,b;(b=no(m,c))?(m=b,c=0):(v=io(m,c))&&(m=v,c=v.nodeValue.length)}var C=u.domSelection();if(C){if(lt(C)){var A=document.createRange();A.setEnd(m,c),A.setStart(m,c),C.removeAllRanges(),C.addRange(A)}else C.extend&&C.extend(m,c);u.domObserver.setCurSelection();var N=u.state;setTimeout(function(){u.state==N&&rn(u)},50)}}function ao(u,m){var c=u.state.doc.resolve(m);if(!(ot||ur)&&c.parent.inlineContent){var v=u.coordsAtPos(m);if(m>c.start()){var b=u.coordsAtPos(m-1),C=(b.top+b.bottom)/2;if(C>v.top&&C<v.bottom&&Math.abs(b.left-v.left)>1)return b.left<v.left?"ltr":"rtl"}if(m<c.end()){var A=u.coordsAtPos(m+1),N=(A.top+A.bottom)/2;if(N>v.top&&N<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 ei(u,m,c){var v=u.state.selection;if(v instanceof re.TextSelection&&!v.empty||c.indexOf("s")>-1||$t&&c.indexOf("m")>-1)return!1;var b=v.$from,C=v.$to;if(!b.parent.inlineContent||u.endOfTextblock(m<0?"up":"down")){var A=Ln(u.state,m);if(A&&A instanceof re.NodeSelection)return Rn(u,A)}if(!b.parent.inlineContent){var N=m<0?b:C,q=v instanceof re.AllSelection?re.Selection.near(N,m):re.Selection.findFrom(N,m);return q?Rn(u,q):!1}return!1}function an(u,m){if(!(u.state.selection instanceof re.TextSelection))return!0;var c=u.state.selection,v=c.$head,b=c.$anchor,C=c.empty;if(!v.sameParent(b))return!0;if(!C)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 N=u.state.tr;return m<0?N.delete(v.pos-A.nodeSize,v.pos):N.delete(v.pos,v.pos+A.nodeSize),u.dispatch(N),!0}return!1}function ga(u,m,c){u.domObserver.stop(),m.contentEditable=c,u.domObserver.start()}function oo(u){if(!gt||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 b=c.firstChild;ga(u,b,"true"),setTimeout(function(){return ga(u,b,"false")},20)}return!1}function so(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=so(m);if(c==8||$t&&c==72&&v=="c")return an(u,-1)||mn(u,-1);if(c==46&&!m.shiftKey||$t&&c==68&&v=="c")return an(u,1)||mn(u,1);if(c==13||c==27)return!0;if(c==37||$t&&c==66&&v=="c"){var b=c==37?ao(u,u.state.selection.from)=="ltr"?-1:1:-1;return Vi(u,b,v)||mn(u,b)}else if(c==39||$t&&c==70&&v=="c"){var C=c==39?ao(u,u.state.selection.from)=="ltr"?1:-1:1;return Vi(u,C,v)||mn(u,C)}else{if(c==38||$t&&c==80&&v=="c")return ei(u,-1,v)||mn(u,-1);if(c==40||$t&&c==78&&v=="c")return oo(u)||ei(u,1,v)||mn(u,1);if(v==($t?"m":"c")&&(c==66||c==73||c==89||c==90))return!0}return!1}function Xe(u,m){u.someProp("transformCopied",function(Le){m=Le(m,u)});for(var c=[],v=m,b=v.content,C=v.openStart,A=v.openEnd;C>1&&A>1&&b.childCount==1&&b.firstChild.childCount==1;){C--,A--;var N=b.firstChild;c.push(N.type.name,N.attrs!=N.type.defaultAttrs?N.attrs:null),b=N.content}var q=u.someProp("clipboardSerializer")||he.DOMSerializer.fromSchema(u.state.schema),V=lo(),Q=V.createElement("div");Q.appendChild(q.serializeFragment(b,{document:V}));for(var ce=Q.firstChild,ae,be=0;ce&&ce.nodeType==1&&(ae=ti[ce.nodeName.toLowerCase()]);){for(var Me=ae.length-1;Me>=0;Me--){for(var Fe=V.createElement(ae[Me]);Q.firstChild;)Fe.appendChild(Q.firstChild);Q.appendChild(Fe),be++}ce=Q.firstChild}ce&&ce.nodeType==1&&ce.setAttribute("data-pm-slice","".concat(C," ").concat(A).concat(be?" -".concat(be):""," ").concat(JSON.stringify(c)));var We=u.someProp("clipboardTextSerializer",function(Le){return Le(m,u)})||m.content.textBetween(0,m.content.size,`
|
|
680
|
-
|
|
681
|
-
`);return{dom:Q,text:We,slice:m}}function fe(u,m,c,v,b){var C=b.parent.type.spec.code,A,N;if(!c&&!m)return null;var q=m&&(v||C||!c);if(q){if(u.someProp("transformPastedText",function(It){m=It(m,C||v,u)}),C)return m?new he.Slice(he.Fragment.from(u.state.schema.text(m.replace(/\r\n?/g,`
|
|
682
|
-
`))),0,0):he.Slice.empty;var V=u.someProp("clipboardTextParser",function(It){return It(m,b,v,u)});if(V)N=V;else{var Q=b.marks(),ce=u.state.schema,ae=he.DOMSerializer.fromSchema(ce);A=document.createElement("div"),m.split(/(?:\r\n?|\n)+/).forEach(function(It){var zt=A.appendChild(document.createElement("p"));It&&zt.appendChild(ae.serializeNode(ce.text(It,Q)))})}}else u.someProp("transformPastedHTML",function(It){c=It(c,u)}),A=Yu(c),cr&&Xu(A);var be=A&&A.querySelector("[data-pm-slice]"),Me=be&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(be.getAttribute("data-pm-slice")||"");if(Me&&Me[3])for(var Fe=+Me[3];Fe>0;Fe--){for(var We=A.firstChild;We&&We.nodeType!=1;)We=We.nextSibling;if(!We)break;A=We}if(!N){var Le=u.someProp("clipboardParser")||u.someProp("domParser")||he.DOMParser.fromSchema(u.state.schema);N=Le.parseSlice(A,{preserveWhitespace:!!(q||Me),context:b,ruleFromNode:function(zt){return zt.nodeName=="BR"&&!zt.nextSibling&&zt.parentNode&&!Ie.test(zt.parentNode.nodeName)?{ignore:!0}:null}})}if(Me)N=Zu(on(N,+Me[1],+Me[2]),Me[4]);else if(N=he.Slice.maxOpen(Ke(N.content,b),!0),N.openStart||N.openEnd){for(var Ct=0,ht=0,tt=N.content.firstChild;Ct<N.openStart&&!tt.type.spec.isolating;Ct++,tt=tt.firstChild);for(var yt=N.content.lastChild;ht<N.openEnd&&!yt.type.spec.isolating;ht++,yt=yt.lastChild);N=on(N,Ct,ht)}return u.someProp("transformPasted",function(It){N=It(N,u)}),N}var Ie=/^(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 Ke(u,m){if(u.childCount<2)return u;for(var c=function(){var A=m.node(b),N=A.contentMatchAt(m.index(b)),q,V=[];if(u.forEach(function(Q){if(V){var ce=N.findWrapping(Q.type),ae;if(!ce)return V=null;if(ae=V.length&&q.length&&tr(ce,q,Q,V[V.length-1],0))V[V.length-1]=ae;else{V.length&&(V[V.length-1]=rr(V[V.length-1],q.length));var be=Ot(Q,ce);V.push(be),N=N.matchType(be.type),q=ce}}}),V)return{v:he.Fragment.from(V)}},v,b=m.depth;b>=0;b--)if(v=c(),v)return v.v;return u}function Ot(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,he.Fragment.from(u));return u}function tr(u,m,c,v,b){if(b<u.length&&b<m.length&&u[b]==m[b]){var C=tr(u,m,c,v.lastChild,b+1);if(C)return v.copy(v.content.replaceChild(v.childCount-1,C));var A=v.contentMatchAt(v.childCount);if(A.matchType(b==u.length-1?c.type:u[b+1]))return v.copy(v.content.append(he.Fragment.from(Ot(c,u,b+1))))}}function rr(u,m){if(m==0)return u;var c=u.content.replaceChild(u.childCount-1,rr(u.lastChild,m-1)),v=u.contentMatchAt(u.childCount).fillBefore(he.Fragment.empty,!0);return u.copy(c.append(v))}function Jt(u,m,c,v,b,C){var A=m<0?u.firstChild:u.lastChild,N=A.content;return u.childCount>1&&(C=0),b<v-1&&(N=Jt(N,m,c,v,b+1,C)),b>=c&&(N=m<0?A.contentMatchAt(0).fillBefore(N,C<=b).append(N):N.append(A.contentMatchAt(A.childCount).fillBefore(he.Fragment.empty,!0))),u.replaceChild(m<0?0:u.childCount-1,A.copy(N))}function on(u,m,c){return m<u.openStart&&(u=new he.Slice(Jt(u.content,-1,m,u.openStart,0,u.openEnd),m,u.openEnd)),c<u.openEnd&&(u=new he.Slice(Jt(u.content,1,c,u.openEnd,0,0),u.openStart,c)),u}var ti={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},ya=null;function lo(){return ya||(ya=document.implementation.createHTMLDocument("title"))}var uo=null;function Ju(u){var m=window.trustedTypes;return m?(uo||(uo=m.defaultPolicy||m.createPolicy("ProseMirrorClipboard",{createHTML:function(v){return v}})),uo.createHTML(u)):u}function Yu(u){var m=/^(\s*<meta [^>]*>)*/.exec(u);m&&(u=u.slice(m[0].length));var c=lo().createElement("div"),v=/<([a-z][^>\s]+)/i.exec(u),b;if((b=v&&ti[v[1].toLowerCase()])&&(u=b.map(function(A){return"<"+A+">"}).join("")+u+b.map(function(A){return"</"+A+">"}).reverse().join("")),c.innerHTML=Ju(u),b)for(var C=0;C<b.length;C++)c=c.querySelector(b[C])||c;return c}function Xu(u){for(var m=u.querySelectorAll(ot?"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 Zu(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 b=u.content,C=u.openStart,A=u.openEnd,N=v.length-2;N>=0;N-=2){var q=c.nodes[v[N]];if(!q||q.hasRequiredAttrs())break;b=he.Fragment.from(q.create(v[N+1],b)),C++,A++}return new he.Slice(b,C,A)}var Mr={},Ar={},Qu={touchstart:!0,touchmove:!0},ec=Z(function u(){z(this,u),this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},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.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null});function tc(u){var m=function(){var b=Mr[c];u.dom.addEventListener(c,u.input.eventHandlers[c]=function(C){nc(u,C)&&!es(u,C)&&(u.editable||!(C.type in Ar))&&b(u,C)},Qu[c]?{passive:!0}:void 0)};for(var c in Mr)m();gt&&u.dom.addEventListener("input",function(){return null}),Qo(u)}function ri(u,m){u.input.lastSelectionOrigin=m,u.input.lastSelectionTime=Date.now()}function rc(u){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 nc(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 ic(u,m){!es(u,m)&&Mr[m.type]&&(u.editable||!(m.type in Ar))&&Mr[m.type](u,m)}Ar.keydown=function(u,m){var c=m;if(u.input.shiftKey=c.keyCode==16||c.shiftKey,!$s(u,c)&&(u.input.lastKeyCode=c.keyCode,u.input.lastKeyCodeTime=Date.now(),!(At&&ot&&c.keyCode==13)))if(c.keyCode!=229&&u.domObserver.forceFlush(),lr&&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(b){return b(u,St(13,"Enter"))}),u.input.lastIOSEnter=0)},200)}else u.someProp("handleKeyDown",function(b){return b(u,c)})||Zo(u,c)?c.preventDefault():ri(u,"key")},Ar.keyup=function(u,m){m.keyCode==16&&(u.input.shiftKey=!1)},Ar.keypress=function(u,m){var c=m;if(!($s(u,c)||!c.charCode||c.ctrlKey&&!c.altKey||$t&&c.metaKey)){if(u.someProp("handleKeyPress",function(C){return C(u,c)})){c.preventDefault();return}var v=u.state.selection;if(!(v instanceof re.TextSelection)||!v.$from.sameParent(v.$to)){var b=String.fromCharCode(c.charCode);!/[\r\n]/.test(b)&&!u.someProp("handleTextInput",function(C){return C(u,v.$from.pos,v.$to.pos,b)})&&u.dispatch(u.state.tr.insertText(b).scrollIntoView()),c.preventDefault()}}};function co(u){return{left:u.clientX,top:u.clientY}}function ac(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,b){if(v==-1)return!1;for(var C=u.state.doc.resolve(v),A=function(Q){if(u.someProp(m,function(ce){return Q>C.depth?ce(u,c,C.nodeAfter,C.before(Q),b,!0):ce(u,c,C.node(Q),C.before(Q),b,!1)}))return{v:!0}},N,q=C.depth+1;q>0;q--)if(N=A(q),N)return N.v;return!1}function $i(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 oc(u,m){if(m==-1)return!1;var c=u.state.doc.resolve(m),v=c.nodeAfter;return v&&v.isAtom&&re.NodeSelection.isSelectable(v)?($i(u,new re.NodeSelection(c)),!0):!1}function sc(u,m){if(m==-1)return!1;var c=u.state.selection,v,b;c instanceof re.NodeSelection&&(v=c.node);for(var C=u.state.doc.resolve(m),A=C.depth+1;A>0;A--){var N=A>C.depth?C.nodeAfter:C.node(A);if(re.NodeSelection.isSelectable(N)){v&&c.$from.depth>0&&A>=c.$from.depth&&C.before(c.$from.depth+1)==c.$from.pos?b=C.before(c.$from.depth):b=C.before(A);break}}return b!=null?($i(u,re.NodeSelection.create(u.state.doc,b)),!0):!1}function lc(u,m,c,v,b){return ts(u,"handleClickOn",m,c,v)||u.someProp("handleClick",function(C){return C(u,m,v)})||(b?sc(u,c):oc(u,c))}function uc(u,m,c,v){return ts(u,"handleDoubleClickOn",m,c,v)||u.someProp("handleDoubleClick",function(b){return b(u,m,v)})}function cc(u,m,c,v){return ts(u,"handleTripleClickOn",m,c,v)||u.someProp("handleTripleClick",function(b){return b(u,m,v)})||fc(u,c,v)}function fc(u,m,c){if(c.button!=0)return!1;var v=u.state.doc;if(m==-1)return v.inlineContent?($i(u,re.TextSelection.create(v,0,v.content.size)),!0):!1;for(var b=v.resolve(m),C=b.depth+1;C>0;C--){var A=C>b.depth?b.nodeAfter:b.node(C),N=b.before(C);if(A.inlineContent)$i(u,re.TextSelection.create(v,N+1,N+1+A.content.size));else if(re.NodeSelection.isSelectable(A))$i(u,re.NodeSelection.create(v,N));else continue;return!0}}function rs(u){return ba(u)}var Us=$t?"metaKey":"ctrlKey";Mr.mousedown=function(u,m){var c=m;u.input.shiftKey=c.shiftKey;var v=rs(u),b=Date.now(),C="singleClick";b-u.input.lastClick.time<500&&ac(c,u.input.lastClick)&&!c[Us]&&(u.input.lastClick.type=="singleClick"?C="doubleClick":u.input.lastClick.type=="doubleClick"&&(C="tripleClick")),u.input.lastClick={time:b,x:c.clientX,y:c.clientY,type:C};var A=u.posAtCoords(co(c));A&&(C=="singleClick"?(u.input.mouseDown&&u.input.mouseDown.done(),u.input.mouseDown=new dc(u,A,c,!!v)):(C=="doubleClick"?uc:cc)(u,A.pos,A.inside,c)?c.preventDefault():ri(u,"pointer"))};var dc=function(){function u(m,c,v,b){var C=this;z(this,u),this.view=m,this.pos=c,this.event=v,this.flushed=b,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=m.state.doc,this.selectNode=!!v[Us],this.allowDefault=v.shiftKey;var A,N;if(c.inside>-1)A=m.state.doc.nodeAt(c.inside),N=c.inside;else{var q=m.state.doc.resolve(c.pos);A=q.parent,N=q.depth?q.before():0}var V=b?null:v.target,Q=V?m.docView.nearestDesc(V,!0):null;this.target=Q&&Q.dom.nodeType==1?Q.dom:null;var ce=m.state.selection;(v.button==0&&A.type.spec.draggable&&A.type.spec.selectable!==!1||ce instanceof re.NodeSelection&&ce.from<=N&&ce.to>N)&&(this.mightDrag={node:A,pos:N,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&at&&!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(function(){C.view.input.mouseDown==C&&C.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),m.root.addEventListener("mouseup",this.up=this.up.bind(this)),m.root.addEventListener("mousemove",this.move=this.move.bind(this)),ri(m,"pointer")}return Z(u,[{key:"done",value:function(){var c=this;this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),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(){return rn(c.view)}),this.view.input.mouseDown=null}},{key:"up",value:function(c){if(this.done(),!!this.view.dom.contains(c.target)){var v=this.pos;this.view.state.doc!=this.startDoc&&(v=this.view.posAtCoords(co(c))),this.updateAllowDefault(c),this.allowDefault||!v?ri(this.view,"pointer"):lc(this.view,v.pos,v.inside,c,this.selectNode)?c.preventDefault():c.button==0&&(this.flushed||gt&&this.mightDrag&&!this.mightDrag.node.isAtom||ot&&!this.view.state.selection.visible&&Math.min(Math.abs(v.pos-this.view.state.selection.from),Math.abs(v.pos-this.view.state.selection.to))<=2)?($i(this.view,re.Selection.near(this.view.state.doc.resolve(v.pos))),c.preventDefault()):ri(this.view,"pointer")}}},{key:"move",value:function(c){this.updateAllowDefault(c),ri(this.view,"pointer"),c.buttons==0&&this.done()}},{key:"updateAllowDefault",value:function(c){!this.allowDefault&&(Math.abs(this.event.x-c.clientX)>4||Math.abs(this.event.y-c.clientY)>4)&&(this.allowDefault=!0)}}]),u}();Mr.touchstart=function(u){u.input.lastTouch=Date.now(),rs(u),ri(u,"pointer")},Mr.touchmove=function(u){u.input.lastTouch=Date.now(),ri(u,"pointer")},Mr.contextmenu=function(u){return rs(u)};function $s(u,m){return u.composing?!0:gt&&Math.abs(m.timeStamp-u.input.compositionEndedAt)<500?(u.input.compositionEndedAt=-2e8,!0):!1}var hc=At?5e3:-1;Ar.compositionstart=Ar.compositionupdate=function(u){if(!u.composing){u.domObserver.flush();var m=u.state,c=m.selection.$to;if(m.selection instanceof re.TextSelection&&(m.storedMarks||!c.textOffset&&c.parentOffset&&c.nodeBefore.marks.some(function(q){return q.type.spec.inclusive===!1})))u.markCursor=u.state.storedMarks||c.marks(),ba(u,!0),u.markCursor=null;else if(ba(u,!m.selection.empty),at&&m.selection.empty&&c.parentOffset&&!c.textOffset&&c.nodeBefore.marks.length)for(var v=u.domSelectionRange(),b=v.focusNode,C=v.focusOffset;b&&b.nodeType==1&&C!=0;){var A=C<0?b.lastChild:b.childNodes[C-1];if(!A)break;if(A.nodeType==3){var N=u.domSelection();N&&N.collapse(A,A.nodeValue.length);break}else b=A,C=-1}u.input.composing=!0}Ws(u,hc)},Ar.compositionend=function(u,m){u.composing&&(u.input.composing=!1,u.input.compositionEndedAt=m.timeStamp,u.input.compositionPendingChanges=u.domObserver.pendingRecords().length?u.input.compositionID:0,u.input.compositionNode=null,u.input.compositionPendingChanges&&Promise.resolve().then(function(){return u.domObserver.flush()}),u.input.compositionID++,Ws(u,20))};function Ws(u,m){clearTimeout(u.input.composingTimeout),m>-1&&(u.input.composingTimeout=setTimeout(function(){return ba(u)},m))}function js(u){for(u.composing&&(u.input.composing=!1,u.input.compositionEndedAt=vc());u.input.compositionNodes.length>0;)u.input.compositionNodes.pop().markParentsDirty()}function pc(u){var m=u.domSelectionRange();if(!m.focusNode)return null;var c=_t(m.focusNode,m.focusOffset),v=Xt(m.focusNode,m.focusOffset);if(c&&v&&c!=v){var b=v.pmViewDesc,C=u.domObserver.lastChangedTextNode;if(c==C||v==C)return C;if(!b||!b.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 vc(){var u=document.createEvent("Event");return u.initEvent("event",!0,!0),u.timeStamp}function ba(u){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!(At&&u.domObserver.flushingSoon>=0)){if(u.domObserver.forceFlush(),js(u),m||u.docView&&u.docView.dirty){var c=On(u);return c&&!c.eq(u.state.selection)?u.dispatch(u.state.tr.setSelection(c)):(u.markCursor||m)&&!u.state.selection.empty?u.dispatch(u.state.tr.deleteSelection()):u.updateState(u.state),!0}return!1}}function mc(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(),b=document.createRange();b.selectNodeContents(m),u.dom.blur(),v.removeAllRanges(),v.addRange(b),setTimeout(function(){c.parentNode&&c.parentNode.removeChild(c),u.focus()},50)}}var ka=Ee&&Pe<15||lr&&En<604;Mr.copy=Ar.cut=function(u,m){var c=m,v=u.state.selection,b=c.type=="cut";if(!v.empty){var C=ka?null:c.clipboardData,A=v.content(),N=Xe(u,A),q=N.dom,V=N.text;C?(c.preventDefault(),C.clearData(),C.setData("text/html",q.innerHTML),C.setData("text/plain",V)):mc(u,q),b&&u.dispatch(u.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}};function gc(u){return u.openStart==0&&u.openEnd==0&&u.content.childCount==1?u.content.firstChild:null}function yc(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 b=u.input.shiftKey&&u.input.lastKeyCode!=45;setTimeout(function(){u.focus(),v.parentNode&&v.parentNode.removeChild(v),c?wa(u,v.value,null,b,m):wa(u,v.textContent,v.innerHTML,b,m)},50)}}function wa(u,m,c,v,b){var C=fe(u,m,c,v,u.state.selection.$from);if(u.someProp("handlePaste",function(q){return q(u,b,C||he.Slice.empty)}))return!0;if(!C)return!1;var A=gc(C),N=A?u.state.tr.replaceSelectionWith(A,v):u.state.tr.replaceSelection(C);return u.dispatch(N.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Gs(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," "):""}Ar.paste=function(u,m){var c=m;if(!(u.composing&&!At)){var v=ka?null:c.clipboardData,b=u.input.shiftKey&&u.input.lastKeyCode!=45;v&&wa(u,Gs(v),v.getData("text/html"),b,c)?c.preventDefault():yc(u,c)}};var Ks=Z(function u(m,c,v){z(this,u),this.slice=m,this.move=c,this.node=v}),bc=$t?"altKey":"ctrlKey";function Js(u,m){var c=u.someProp("dragCopies",function(v){return!v(m)});return c??!m[bc]}Mr.dragstart=function(u,m){var c=m,v=u.input.mouseDown;if(v&&v.done(),!!c.dataTransfer){var b=u.state.selection,C=b.empty?null:u.posAtCoords(co(c)),A;if(!(C&&C.pos>=b.from&&C.pos<=(b instanceof re.NodeSelection?b.to-1:b.to))){if(v&&v.mightDrag)A=re.NodeSelection.create(u.state.doc,v.mightDrag.pos);else if(c.target&&c.target.nodeType==1){var N=u.docView.nearestDesc(c.target,!0);N&&N.node.type.spec.draggable&&N!=u.docView&&(A=re.NodeSelection.create(u.state.doc,N.posBefore))}}var q=(A||u.state.selection).content(),V=Xe(u,q),Q=V.dom,ce=V.text,ae=V.slice;(!c.dataTransfer.files.length||!ot||Vt>120)&&c.dataTransfer.clearData(),c.dataTransfer.setData(ka?"Text":"text/html",Q.innerHTML),c.dataTransfer.effectAllowed="copyMove",ka||c.dataTransfer.setData("text/plain",ce),u.dragging=new Ks(ae,Js(u,c),A)}},Mr.dragend=function(u){var m=u.dragging;window.setTimeout(function(){u.dragging==m&&(u.dragging=null)},50)},Ar.dragover=Ar.dragenter=function(u,m){return m.preventDefault()},Ar.drop=function(u,m){var c=m,v=u.dragging;if(u.dragging=null,!!c.dataTransfer){var b=u.posAtCoords(co(c));if(b){var C=u.state.doc.resolve(b.pos),A=v&&v.slice;A?u.someProp("transformPasted",function(We){A=We(A,u)}):A=fe(u,Gs(c.dataTransfer),ka?null:c.dataTransfer.getData("text/html"),!1,C);var N=!!(v&&Js(u,c));if(u.someProp("handleDrop",function(We){return We(u,c,A||he.Slice.empty,N)})){c.preventDefault();return}if(A){c.preventDefault();var q=A?ge.dropPoint(u.state.doc,C.pos,A):C.pos;q==null&&(q=C.pos);var V=u.state.tr;if(N){var Q=v.node;Q?Q.replace(V):V.deleteSelection()}var ce=V.mapping.map(q),ae=A.openStart==0&&A.openEnd==0&&A.content.childCount==1,be=V.doc;if(ae?V.replaceRangeWith(ce,ce,A.content.firstChild):V.replaceRange(ce,ce,A),!V.doc.eq(be)){var Me=V.doc.resolve(ce);if(ae&&re.NodeSelection.isSelectable(A.content.firstChild)&&Me.nodeAfter&&Me.nodeAfter.sameMarkup(A.content.firstChild))V.setSelection(new re.NodeSelection(Me));else{var Fe=V.mapping.map(q);V.mapping.maps[V.mapping.maps.length-1].forEach(function(We,Le,Ct,ht){return Fe=ht}),V.setSelection(Dn(u,Me,V.doc.resolve(Fe)))}u.focus(),u.dispatch(V.setMeta("uiEvent","drop"))}}}}},Mr.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())&&rn(u)},20))},Mr.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)},Mr.beforeinput=function(u,m){var c=m;if(ot&&At&&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(C){return C(u,St(8,"Backspace"))}))){var b=u.state.selection.$cursor;b&&b.pos>0&&u.dispatch(u.state.tr.delete(b.pos-1,b.pos).scrollIntoView())}},50)}};for(var Ys in Ar)Mr[Ys]=Ar[Ys];function Ca(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 Xs=function(){function u(m,c){z(this,u),this.toDOM=m,this.spec=c||gi,this.side=this.spec.side||0}return Z(u,[{key:"map",value:function(c,v,b,C){var A=c.mapResult(v.from+C,this.side<0?-1:1),N=A.pos,q=A.deleted;return q?null:new mi(N-b,N-b,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&&Ca(this.spec,c.spec))}},{key:"destroy",value:function(c){this.spec.destroy&&this.spec.destroy(c)}}]),u}(),Ta=function(){function u(m,c){z(this,u),this.attrs=m,this.spec=c||gi}return Z(u,[{key:"map",value:function(c,v,b,C){var A=c.map(v.from+C,this.spec.inclusiveStart?-1:1)-b,N=c.map(v.to+C,this.spec.inclusiveEnd?1:-1)-b;return A>=N?null:new mi(A,N,this)}},{key:"valid",value:function(c,v){return v.from<v.to}},{key:"eq",value:function(c){return this==c||c instanceof u&&Ca(this.attrs,c.attrs)&&Ca(this.spec,c.spec)}},{key:"destroy",value:function(){}}],[{key:"is",value:function(c){return c.type instanceof u}}]),u}(),kc=function(){function u(m,c){z(this,u),this.attrs=m,this.spec=c||gi}return Z(u,[{key:"map",value:function(c,v,b,C){var A=c.mapResult(v.from+C,1);if(A.deleted)return null;var N=c.mapResult(v.to+C,-1);return N.deleted||N.pos<=A.pos?null:new mi(A.pos-b,N.pos-b,this)}},{key:"valid",value:function(c,v){var b=c.content.findIndex(v.from),C=b.index,A=b.offset,N;return A==v.from&&!(N=c.child(C)).isText&&A+N.nodeSize==v.to}},{key:"eq",value:function(c){return this==c||c instanceof u&&Ca(this.attrs,c.attrs)&&Ca(this.spec,c.spec)}},{key:"destroy",value:function(){}}]),u}(),mi=function(){function u(m,c,v){z(this,u),this.from=m,this.to=c,this.type=v}return Z(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,b){return this.type.map(c,this,v,b)}},{key:"spec",get:function(){return this.type.spec}},{key:"inline",get:function(){return this.type instanceof Ta}},{key:"widget",get:function(){return this.type instanceof Xs}}],[{key:"widget",value:function(c,v,b){return new u(c,c,new Xs(v,b))}},{key:"inline",value:function(c,v,b,C){return new u(c,v,new Ta(b,C))}},{key:"node",value:function(c,v,b,C){return new u(c,v,new kc(b,C))}}]),u}(),Wi=[],gi={},gn=function(){function u(m,c){z(this,u),this.local=m.length?m:Wi,this.children=c.length?c:Wi}return Z(u,[{key:"find",value:function(c,v,b){var C=[];return this.findInner(c??0,v??1e9,C,0,b),C}},{key:"findInner",value:function(c,v,b,C,A){for(var N=0;N<this.local.length;N++){var q=this.local[N];q.from<=v&&q.to>=c&&(!A||A(q.spec))&&b.push(q.copy(q.from+C,q.to+C))}for(var V=0;V<this.children.length;V+=3)if(this.children[V]<v&&this.children[V+1]>c){var Q=this.children[V]+1;this.children[V+2].findInner(c-Q,v-Q,b,C+Q,A)}}},{key:"map",value:function(c,v,b){return this==wr||c.maps.length==0?this:this.mapInner(c,v,0,0,b||gi)}},{key:"mapInner",value:function(c,v,b,C,A){for(var N,q=0;q<this.local.length;q++){var V=this.local[q].map(c,b,C);V&&V.type.valid(v,V)?(N||(N=[])).push(V):A.onRemove&&A.onRemove(this.local[q].spec)}return this.children.length?wc(this.children,N||[],c,v,b,C,A):N?new u(N.sort(yi),Wi):wr}},{key:"add",value:function(c,v){return v.length?this==wr?u.create(c,v):this.addInner(c,v,0):this}},{key:"addInner",value:function(c,v,b){var C=this,A,N=0;c.forEach(function(Q,ce){var ae=ce+b,be;if(be=el(v,Q,ae)){for(A||(A=C.children.slice());N<A.length&&A[N]<ce;)N+=3;A[N]==ce?A[N+2]=A[N+2].addInner(Q,be,ae+1):A.splice(N,0,ce,ce+Q.nodeSize,fo(be,Q,ae+1,gi)),N+=3}});for(var q=Qs(N?tl(v):v,-b),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(yi):this.local,A||this.children)}},{key:"remove",value:function(c){return c.length==0||this==wr?this:this.removeInner(c,0)}},{key:"removeInner",value:function(c,v){for(var b=this.children,C=this.local,A=0;A<b.length;A+=3){for(var N=void 0,q=b[A]+v,V=b[A+1]+v,Q=0,ce;Q<c.length;Q++)(ce=c[Q])&&ce.from>q&&ce.to<V&&(c[Q]=null,(N||(N=[])).push(ce));if(N){b==this.children&&(b=this.children.slice());var ae=b[A+2].removeInner(N,q+1);ae!=wr?b[A+2]=ae:(b.splice(A,3),A-=3)}}if(C.length){for(var be=0,Me;be<c.length;be++)if(Me=c[be])for(var Fe=0;Fe<C.length;Fe++)C[Fe].eq(Me,v)&&(C==this.local&&(C=this.local.slice()),C.splice(Fe--,1))}return b==this.children&&C==this.local?this:C.length||b.length?new u(C,b):wr}},{key:"forChild",value:function(c,v){if(this==wr)return this;if(v.isLeaf)return u.empty;for(var b,C,A=0;A<this.children.length;A+=3)if(this.children[A]>=c){this.children[A]==c&&(b=this.children[A+2]);break}for(var N=c+1,q=N+v.content.size,V=0;V<this.local.length;V++){var Q=this.local[V];if(Q.from<q&&Q.to>N&&Q.type instanceof Ta){var ce=Math.max(N,Q.from)-N,ae=Math.min(q,Q.to)-N;ce<ae&&(C||(C=[])).push(Q.copy(ce,ae))}}if(C){var be=new u(C.sort(yi),Wi);return b?new Zs([be,b]):be}return b||wr}},{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 b=0;b<this.children.length;b+=3)if(this.children[b]!=c.children[b]||this.children[b+1]!=c.children[b+1]||!this.children[b+2].eq(c.children[b+2]))return!1;return!0}},{key:"locals",value:function(c){return ns(this.localsInner(c))}},{key:"localsInner",value:function(c){if(this==wr)return Wi;if(c.inlineContent||!this.local.some(Ta.is))return this.local;for(var v=[],b=0;b<this.local.length;b++)this.local[b].type instanceof Ta||v.push(this.local[b]);return v}},{key:"forEachSet",value:function(c){c(this)}}],[{key:"create",value:function(c,v){return v.length?fo(v,c,0,gi):wr}}]),u}();gn.empty=new gn([],[]),gn.removeOverlap=ns;var wr=gn.empty,Zs=function(){function u(m){z(this,u),this.members=m}return Z(u,[{key:"map",value:function(c,v){var b=this.members.map(function(C){return C.map(c,v,gi)});return u.from(b)}},{key:"forChild",value:function(c,v){if(v.isLeaf)return gn.empty;for(var b=[],C=0;C<this.members.length;C++){var A=this.members[C].forChild(c,v);A!=wr&&(A instanceof u?b=b.concat(A.members):b.push(A))}return u.from(b)}},{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,b=!0,C=0;C<this.members.length;C++){var A=this.members[C].localsInner(c);if(A.length)if(!v)v=A;else{b&&(v=v.slice(),b=!1);for(var N=0;N<A.length;N++)v.push(A[N])}}return v?ns(b?v:v.sort(yi)):Wi}},{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 wr;case 1:return c[0];default:return new u(c.every(function(v){return v instanceof gn})?c:c.reduce(function(v,b){return v.concat(b instanceof gn?b:b.members)},[]))}}}]),u}();function wc(u,m,c,v,b,C,A){for(var N=u.slice(),q=function(bn){var ji=0;c.maps[V].forEach(function(sn,Yt,Vc,Uc){for(var ho=Uc-Vc-(Yt-sn),bi=0;bi<N.length;bi+=3){var hl=N[bi+1];if(!(hl<0||sn>hl+bn-ji)){var pl=N[bi]+bn-ji;Yt>=pl?N[bi+1]=sn<=pl?-2:-1:sn>=bn&&ho&&(N[bi]+=ho,N[bi+1]+=ho)}}ji+=ho}),bn=c.maps[V].map(bn,-1),Q=bn},V=0,Q=C;V<c.maps.length;V++)q(Q);for(var ce=!1,ae=0;ae<N.length;ae+=3)if(N[ae+1]<0){if(N[ae+1]==-2){ce=!0,N[ae+1]=-1;continue}var be=c.map(u[ae]+C),Me=be-b;if(Me<0||Me>=v.content.size){ce=!0;continue}var Fe=c.map(u[ae+1]+C,-1),We=Fe-b,Le=v.content.findIndex(Me),Ct=Le.index,ht=Le.offset,tt=v.maybeChild(Ct);if(tt&&ht==Me&&ht+tt.nodeSize==We){var yt=N[ae+2].mapInner(c,tt,be+1,u[ae]+C+1,A);yt!=wr?(N[ae]=Me,N[ae+1]=We,N[ae+2]=yt):(N[ae+1]=-2,ce=!0)}else ce=!0}if(ce){var It=Cc(N,u,m,c,b,C,A),zt=fo(It,v,0,A);m=zt.local;for(var yn=0;yn<N.length;yn+=3)N[yn+1]<0&&(N.splice(yn,3),yn-=3);for(var dr=0,qr=0;dr<zt.children.length;dr+=3){for(var nr=zt.children[dr];qr<N.length&&N[qr]<nr;)qr+=3;N.splice(qr,0,zt.children[dr],zt.children[dr+1],zt.children[dr+2])}}return new gn(m.sort(yi),N)}function Qs(u,m){if(!m||!u.length)return u;for(var c=[],v=0;v<u.length;v++){var b=u[v];c.push(new mi(b.from+m,b.to+m,b.type))}return c}function Cc(u,m,c,v,b,C,A){function N(V,Q){for(var ce=0;ce<V.local.length;ce++){var ae=V.local[ce].map(v,b,Q);ae?c.push(ae):A.onRemove&&A.onRemove(V.local[ce].spec)}for(var be=0;be<V.children.length;be+=3)N(V.children[be+2],V.children[be]+Q+1)}for(var q=0;q<u.length;q+=3)u[q+1]==-1&&N(u[q+2],m[q]+C+1);return c}function el(u,m,c){if(m.isLeaf)return null;for(var v=c+m.nodeSize,b=null,C=0,A;C<u.length;C++)(A=u[C])&&A.from>c&&A.to<v&&((b||(b=[])).push(A),u[C]=null);return b}function tl(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 b=[],C=!1;m.forEach(function(q,V){var Q=el(u,q,V+c);if(Q){C=!0;var ce=fo(Q,q,c+V+1,v);ce!=wr&&b.push(V,V+q.nodeSize,ce)}});for(var A=Qs(C?tl(u):u,-c).sort(yi),N=0;N<A.length;N++)A[N].type.valid(m,A[N])||(v.onRemove&&v.onRemove(A[N].spec),A.splice(N--,1));return A.length||b.length?new gn(A,b):wr}function yi(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 b=c+1;b<m.length;b++){var C=m[b];if(C.from==v.from){C.to!=v.to&&(m==u&&(m=u.slice()),m[b]=C.copy(C.from,v.to),rl(m,b+1,C.copy(v.to,C.to)));continue}else{C.from<v.to&&(m==u&&(m=u.slice()),m[c]=v.copy(v.from,C.from),rl(m,b,v.copy(C.from,v.to)));break}}}return m}function rl(u,m,c){for(;m<u.length&&yi(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!=wr&&m.push(v)}),u.cursorWrapper&&m.push(gn.create(u.state.doc,[u.cursorWrapper.deco])),Zs.from(m)}var Tc={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Sc=Ee&&Pe<=11,xc=function(){function u(){z(this,u),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Z(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}(),Ec=function(){function u(m,c){var v=this;z(this,u),this.view=m,this.handleDOMChange=c,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new xc,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(function(b){for(var C=0;C<b.length;C++)v.queue.push(b[C]);Ee&&Pe<=11&&b.some(function(A){return A.type=="childList"&&A.removedNodes.length||A.type=="characterData"&&A.oldValue.length>A.target.nodeValue.length})?v.flushSoon():v.flush()}),Sc&&(this.onCharData=function(b){v.queue.push({target:b.target,type:"characterData",oldValue:b.prevValue}),v.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}return Z(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,Tc)),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 b=0;b<v.length;b++)this.queue.push(v[b]);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(to(this.view)){if(this.suppressingSelectionUpdates)return rn(this.view);if(Ee&&Pe<=11&&!this.view.state.selection.empty){var c=this.view.domSelectionRange();if(c.focusNode&&ut(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,b,C=c.focusNode;C;C=Re(C))v.add(C);for(var A=c.anchorNode;A;A=Re(A))if(v.has(A)){b=A;break}var N=b&&this.view.docView.nearestDesc(b);if(N&&N.ignoreMutation({type:"selection",target:b.nodeType==3?b.parentNode:b}))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 b=v.value;this.queue.push(b)}}catch(C){c.e(C)}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 b=c.domSelectionRange(),C=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(b)&&to(c)&&!this.ignoreSelectionChange(b),A=-1,N=-1,q=!1,V=[];if(c.editable)for(var Q=0;Q<v.length;Q++){var ce=this.registerMutation(v[Q],V);ce&&(A=A<0?ce.from:Math.min(ce.from,A),N=N<0?ce.to:Math.max(ce.to,N),ce.typeOver&&(q=!0))}if(at&&V.length){var ae=V.filter(function(It){return It.nodeName=="BR"});if(ae.length==2){var be=r(ae,2),Me=be[0],Fe=be[1];Me.parentNode&&Me.parentNode.parentNode==Fe.parentNode?Fe.remove():Me.remove()}else{var We=this.currentSelection.focusNode,Le=i(ae),Ct;try{for(Le.s();!(Ct=Le.n()).done;){var ht=Ct.value,tt=ht.parentNode;tt&&tt.nodeName=="LI"&&(!We||Oc(c,We)!=tt)&&ht.remove()}}catch(It){Le.e(It)}finally{Le.f()}}}var yt=null;A<0&&C&&c.input.lastFocus>Date.now()-200&&Math.max(c.input.lastTouch,c.input.lastClick.time)<Date.now()-300&<(b)&&(yt=On(c))&&yt.eq(re.Selection.near(c.state.doc.resolve(0),1))?(c.input.lastFocus=0,rn(c),this.currentSelection.set(b),c.scrollToSelection()):(A>-1||C)&&(A>-1&&(c.docView.markDirty(A,N),Mc(c)),this.handleDOMChange(A,N,q,V),c.docView&&c.docView.dirty?c.updateState(c.state):this.currentSelection.eq(b)||rn(c),this.currentSelection.set(b))}}},{key:"registerMutation",value:function(c,v){if(v.indexOf(c.target)>-1)return null;var b=this.view.docView.nearestDesc(c.target);if(c.type=="attributes"&&(b==this.view.docView||c.attributeName=="contenteditable"||c.attributeName=="style"&&!c.oldValue&&!c.target.getAttribute("style"))||!b||b.ignoreMutation(c))return null;if(c.type=="childList"){for(var C=0;C<c.addedNodes.length;C++){var A=c.addedNodes[C];v.push(A),A.nodeType==3&&(this.lastChangedTextNode=A)}if(b.contentDOM&&b.contentDOM!=b.dom&&!b.contentDOM.contains(c.target))return{from:b.posBefore,to:b.posAfter};var N=c.previousSibling,q=c.nextSibling;if(Ee&&Pe<=11&&c.addedNodes.length)for(var V=0;V<c.addedNodes.length;V++){var Q=c.addedNodes[V],ce=Q.previousSibling,ae=Q.nextSibling;(!ce||Array.prototype.indexOf.call(c.addedNodes,ce)<0)&&(N=ce),(!ae||Array.prototype.indexOf.call(c.addedNodes,ae)<0)&&(q=ae)}var be=N&&N.parentNode==c.target?ye(N)+1:0,Me=b.localPosFromDOM(c.target,be,-1),Fe=q&&q.parentNode==c.target?ye(q):c.target.childNodes.length,We=b.localPosFromDOM(c.target,Fe,1);return{from:Me,to:We}}else return c.type=="attributes"?{from:b.posAtStart-b.border,to:b.posAtEnd+b.border}:(this.lastChangedTextNode=c.target,{from:b.posAtStart,to:b.posAtEnd,typeOver:c.target.nodeValue==c.oldValue})}}]),u}(),nl=new WeakMap,il=!1;function Mc(u){if(!nl.has(u)&&(nl.set(u,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(u.dom).whiteSpace)!==-1)){if(u.requiresGeckoHackNode=at,il)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."),il=!0}}function al(u,m){var c=m.startContainer,v=m.startOffset,b=m.endContainer,C=m.endOffset,A=u.domAtPos(u.state.selection.anchor);if(ut(A.node,A.offset,b,C)){var N=[b,C,c,v];c=N[0],v=N[1],b=N[2],C=N[3]}return{anchorNode:c,anchorOffset:v,focusNode:b,focusOffset:C}}function Ac(u,m){if(m.getComposedRanges){var c=m.getComposedRanges(u.root)[0];if(c)return al(u,c)}var v;function b(C){C.preventDefault(),C.stopImmediatePropagation(),v=C.getTargetRanges()[0]}return u.dom.addEventListener("beforeinput",b,!0),document.execCommand("indent"),u.dom.removeEventListener("beforeinput",b,!0),v?al(u,v):null}function Oc(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 Nc(u,m,c){var v=u.docView.parseRange(m,c),b=v.node,C=v.fromOffset,A=v.toOffset,N=v.from,q=v.to,V=u.domSelectionRange(),Q,ce=V.anchorNode;if(ce&&u.dom.contains(ce.nodeType==1?ce:ce.parentNode)&&(Q=[{node:ce,offset:V.anchorOffset}],lt(V)||Q.push({node:V.focusNode,offset:V.focusOffset})),ot&&u.input.lastKeyCode===8)for(var ae=A;ae>C;ae--){var be=b.childNodes[ae-1],Me=be.pmViewDesc;if(be.nodeName=="BR"&&!Me){A=ae;break}if(!Me||Me.size)break}var Fe=u.state.doc,We=u.someProp("domParser")||he.DOMParser.fromSchema(u.state.schema),Le=Fe.resolve(N),Ct=null,ht=We.parse(b,{topNode:Le.parent,topMatch:Le.parent.contentMatchAt(Le.index()),topOpen:!0,from:C,to:A,preserveWhitespace:Le.parent.type.whitespace=="pre"?"full":!0,findPositions:Q,ruleFromNode:Dc,context:Le});if(Q&&Q[0].pos!=null){var tt=Q[0].pos,yt=Q[1]&&Q[1].pos;yt==null&&(yt=tt),Ct={anchor:tt+N,head:yt+N}}return{doc:ht,sel:Ct,from:N,to:q}}function Dc(u){var m=u.pmViewDesc;if(m)return m.parseRule();if(u.nodeName=="BR"&&u.parentNode){if(gt&&/^(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||gt&&/^(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 Lc=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Rc(u,m,c,v,b){var C=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,N=On(u,A);if(N&&!u.state.selection.eq(N)){if(ot&&At&&u.input.lastKeyCode===13&&Date.now()-100<u.input.lastKeyCodeTime&&u.someProp("handleKeyDown",function(Yt){return Yt(u,St(13,"Enter"))}))return;var q=u.state.tr.setSelection(N);A=="pointer"?q.setMeta("pointer",!0):A=="key"&&q.scrollIntoView(),C&&q.setMeta("composition",C),u.dispatch(q)}return}var V=u.state.doc.resolve(m),Q=V.sharedDepth(c);m=V.before(Q+1),c=u.state.doc.resolve(c).after(Q+1);var ce=u.state.selection,ae=Nc(u,m,c),be=u.state.doc,Me=be.slice(ae.from,ae.to),Fe,We;u.input.lastKeyCode===8&&Date.now()-100<u.input.lastKeyCodeTime?(Fe=u.state.selection.to,We="end"):(Fe=u.state.selection.from,We="start"),u.input.lastKeyCode=null;var Le=Bc(Me.content,ae.doc.content,ae.from,Fe,We);if(Le&&u.input.domChangeCount++,(lr&&u.input.lastIOSEnter>Date.now()-225||At)&&b.some(function(Yt){return Yt.nodeType==1&&!Lc.test(Yt.nodeName)})&&(!Le||Le.endA>=Le.endB)&&u.someProp("handleKeyDown",function(Yt){return Yt(u,St(13,"Enter"))})){u.input.lastIOSEnter=0;return}if(!Le)if(v&&ce instanceof re.TextSelection&&!ce.empty&&ce.$head.sameParent(ce.$anchor)&&!u.composing&&!(ae.sel&&ae.sel.anchor!=ae.sel.head))Le={start:ce.from,endA:ce.to,endB:ce.to};else{if(ae.sel){var Ct=ol(u,u.state.doc,ae.sel);if(Ct&&!Ct.eq(u.state.selection)){var ht=u.state.tr.setSelection(Ct);C&&ht.setMeta("composition",C),u.dispatch(ht)}}return}u.state.selection.from<u.state.selection.to&&Le.start==Le.endB&&u.state.selection instanceof re.TextSelection&&(Le.start>u.state.selection.from&&Le.start<=u.state.selection.from+2&&u.state.selection.from>=ae.from?Le.start=u.state.selection.from:Le.endA<u.state.selection.to&&Le.endA>=u.state.selection.to-2&&u.state.selection.to<=ae.to&&(Le.endB+=u.state.selection.to-Le.endA,Le.endA=u.state.selection.to)),Ee&&Pe<=11&&Le.endB==Le.start+1&&Le.endA==Le.start&&Le.start>ae.from&&ae.doc.textBetween(Le.start-ae.from-1,Le.start-ae.from+1)==" "&&(Le.start--,Le.endA--,Le.endB--);var tt=ae.doc.resolveNoCache(Le.start-ae.from),yt=ae.doc.resolveNoCache(Le.endB-ae.from),It=be.resolve(Le.start),zt=tt.sameParent(yt)&&tt.parent.inlineContent&&It.end()>=Le.endA,yn;if((lr&&u.input.lastIOSEnter>Date.now()-225&&(!zt||b.some(function(Yt){return Yt.nodeName=="DIV"||Yt.nodeName=="P"}))||!zt&&tt.pos<ae.doc.content.size&&(!tt.sameParent(yt)||!tt.parent.inlineContent)&&!/\S/.test(ae.doc.textBetween(tt.pos,yt.pos,"",""))&&(yn=re.Selection.findFrom(ae.doc.resolve(tt.pos+1),1,!0))&&yn.head>tt.pos)&&u.someProp("handleKeyDown",function(Yt){return Yt(u,St(13,"Enter"))})){u.input.lastIOSEnter=0;return}if(u.state.selection.anchor>Le.start&&Pc(be,Le.start,Le.endA,tt,yt)&&u.someProp("handleKeyDown",function(Yt){return Yt(u,St(8,"Backspace"))})){At&&ot&&u.domObserver.suppressSelectionUpdates();return}ot&&Le.endB==Le.start&&(u.input.lastChromeDelete=Date.now()),At&&!zt&&tt.start()!=yt.start()&&yt.parentOffset==0&&tt.depth==yt.depth&&ae.sel&&ae.sel.anchor==ae.sel.head&&ae.sel.head==Le.endA&&(Le.endB-=2,yt=ae.doc.resolveNoCache(Le.endB-ae.from),setTimeout(function(){u.someProp("handleKeyDown",function(Yt){return Yt(u,St(13,"Enter"))})},20));var dr=Le.start,qr=Le.endA,nr,Sa,bn;if(zt){if(tt.pos==yt.pos)Ee&&Pe<=11&&tt.parentOffset==0&&(u.domObserver.suppressSelectionUpdates(),setTimeout(function(){return rn(u)},20)),nr=u.state.tr.delete(dr,qr),Sa=be.resolve(Le.start).marksAcross(be.resolve(Le.endA));else if(Le.endA==Le.endB&&(bn=Ic(tt.parent.content.cut(tt.parentOffset,yt.parentOffset),It.parent.content.cut(It.parentOffset,Le.endA-It.start()))))nr=u.state.tr,bn.type=="add"?nr.addMark(dr,qr,bn.mark):nr.removeMark(dr,qr,bn.mark);else if(tt.parent.child(tt.index()).isText&&tt.index()==yt.index()-(yt.textOffset?0:1)){var ji=tt.parent.textBetween(tt.parentOffset,yt.parentOffset);if(u.someProp("handleTextInput",function(Yt){return Yt(u,dr,qr,ji)}))return;nr=u.state.tr.insertText(ji,dr,qr)}}if(nr||(nr=u.state.tr.replace(dr,qr,ae.doc.slice(Le.start-ae.from,Le.endB-ae.from))),ae.sel){var sn=ol(u,nr.doc,ae.sel);sn&&!(ot&&u.composing&&sn.empty&&(Le.start!=Le.endB||u.input.lastChromeDelete<Date.now()-100)&&(sn.head==dr||sn.head==nr.mapping.map(qr)-1)||Ee&&sn.empty&&sn.head==dr)&&nr.setSelection(sn)}Sa&&nr.ensureMarks(Sa),C&&nr.setMeta("composition",C),u.dispatch(nr.scrollIntoView())}function ol(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 Ic(u,m){for(var c=u.firstChild.marks,v=m.firstChild.marks,b=c,C=v,A,N,q,V=0;V<v.length;V++)b=v[V].removeFromSet(b);for(var Q=0;Q<c.length;Q++)C=c[Q].removeFromSet(C);if(b.length==1&&C.length==0)N=b[0],A="add",q=function(Me){return Me.mark(N.addToSet(Me.marks))};else if(b.length==0&&C.length==1)N=C[0],A="remove",q=function(Me){return Me.mark(N.removeFromSet(Me.marks))};else return null;for(var ce=[],ae=0;ae<m.childCount;ae++)ce.push(q(m.child(ae)));if(he.Fragment.from(ce).eq(u))return{mark:N,type:A}}function Pc(u,m,c,v,b){if(c-m<=b.pos-v.pos||as(v,!0,!1)<b.pos)return!1;var C=u.resolve(m);if(!v.parent.isTextblock){var A=C.nodeAfter;return A!=null&&c==m+A.nodeSize}if(C.parentOffset<C.parent.content.size||!C.parent.isTextblock)return!1;var N=u.resolve(as(C,!0,!0));return!N.parent.isTextblock||N.pos>c||as(N,!0,!1)<c?!1:v.parent.content.cut(v.parentOffset).eq(N.parent.content)}function as(u,m,c){for(var v=u.depth,b=m?u.end():u.pos;v>0&&(m||u.indexAfter(v)==u.node(v).childCount);)v--,b++,m=!1;if(c)for(var C=u.node(v).maybeChild(u.indexAfter(v));C&&!C.isLeaf;)C=C.firstChild,b++;return b}function Bc(u,m,c,v,b){var C=u.findDiffStart(m,c);if(C==null)return null;var A=u.findDiffEnd(m,c+u.size,c+m.size),N=A.a,q=A.b;if(b=="end"){var V=Math.max(0,C-Math.min(N,q));v-=N+V-C}if(N<C&&u.size<m.size){var Q=v<=C&&v>=N?C-v:0;C-=Q,C&&C<m.size&&sl(m.textBetween(C-1,C+1))&&(C+=Q?1:-1),q=C+(q-N),N=C}else if(q<C){var ce=v<=C&&v>=q?C-v:0;C-=ce,C&&C<u.size&&sl(u.textBetween(C-1,C+1))&&(C+=ce?1:-1),N=C+(N-q),q=C}return{start:C,endA:N,endB:q}}function sl(u){if(u.length!=2)return!1;var m=u.charCodeAt(0),c=u.charCodeAt(1);return m>=56320&&m<=57343&&c>=55296&&c<=56319}var Fc=fe,qc=ba,Hc=function(){function u(m,c){var v=this;z(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 ec,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=c,this.state=c.state,this.directPlugins=c.plugins||[],this.directPlugins.forEach(dl),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=cl(this),ul(this),this.nodeViews=fl(this),this.docView=w(this.state.doc,ll(this),is(this),this.dom,this),this.domObserver=new Ec(this,function(b,C,A,N){return Rc(v,b,C,A,N)}),this.domObserver.start(),tc(this),this.updatePluginViews()}return Z(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(dl),this.directPlugins=c.plugins),this.updateStateInner(c.state,v)}},{key:"setProps",value:function(c){var v={};for(var b in this._props)v[b]=this._props[b];v.state=this.state;for(var C in c)v[C]=c[C];this.update(v)}},{key:"updateState",value:function(c){this.updateStateInner(c,this._props)}},{key:"updateStateInner",value:function(c,v){var b,C=this.state,A=!1,N=!1;c.storedMarks&&this.composing&&(js(this),N=!0),this.state=c;var q=C.plugins!=c.plugins||this._props.plugins!=v.plugins;if(q||this._props.plugins!=v.plugins||this._props.nodeViews!=v.nodeViews){var V=fl(this);zc(V,this.nodeViews)&&(this.nodeViews=V,A=!0)}(q||v.handleDOMEvents!=this._props.handleDOMEvents)&&Qo(this),this.editable=cl(this),ul(this);var Q=is(this),ce=ll(this),ae=C.plugins!=c.plugins&&!C.doc.eq(c.doc)?"reset":c.scrollToSelection>C.scrollToSelection?"to selection":"preserve",be=A||!this.docView.matchesNode(c.doc,ce,Q);(be||!c.selection.eq(C.selection))&&(N=!0);var Me=ae=="preserve"&&N&&this.dom.style.overflowAnchor==null&&it(this);if(N){this.domObserver.stop();var Fe=be&&(Ee||ot)&&!this.composing&&!C.selection.empty&&!c.selection.empty&&_c(C.selection,c.selection);if(be){var We=ot?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=pc(this)),(A||!this.docView.update(c.doc,ce,Q,this))&&(this.docView.updateOuterDeco(ce),this.docView.destroy(),this.docView=w(c.doc,ce,Q,this.dom,this)),We&&!this.trackWrites&&(Fe=!0)}Fe||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Zn(this))?rn(this,Fe):(pi(this,c.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(C),!((b=this.dragging)===null||b===void 0)&&b.node&&!C.doc.eq(c.doc)&&this.updateDraggedNode(this.dragging,C),ae=="reset"?this.dom.scrollTop=0:ae=="to selection"?this.scrollToSelection():Me&&xt(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(C){return C(c)}))if(this.state.selection instanceof re.NodeSelection){var b=this.docView.domAfterPos(this.state.selection.from);b.nodeType==1&&$e(this,b.getBoundingClientRect(),v)}else $e(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 b=this.directPlugins[v];b.spec.view&&this.pluginViews.push(b.spec.view(this))}for(var C=0;C<this.state.plugins.length;C++){var A=this.state.plugins[C];A.spec.view&&this.pluginViews.push(A.spec.view(this))}}else for(var N=0;N<this.pluginViews.length;N++){var q=this.pluginViews[N];q.update&&q.update(this,c)}}},{key:"updateDraggedNode",value:function(c,v){var b=c.node,C=-1;if(this.state.doc.nodeAt(b.from)==b.node)C=b.from;else{var A=b.from+(this.state.doc.content.size-v.doc.content.size),N=A>0&&this.state.doc.nodeAt(A);N==b.node&&(C=A)}this.dragging=new Ks(c.slice,c.move,C<0?void 0:re.NodeSelection.create(this.state.doc,C))}},{key:"someProp",value:function(c,v){var b=this._props&&this._props[c],C;if(b!=null&&(C=v?v(b):b))return C;for(var A=0;A<this.directPlugins.length;A++){var N=this.directPlugins[A].props[c];if(N!=null&&(C=v?v(N):N))return C}var q=this.state.plugins;if(q)for(var V=0;V<q.length;V++){var Q=q[V].props[c];if(Q!=null&&(C=v?v(Q):Q))return C}}},{key:"hasFocus",value:function(){if(Ee){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&&Ut(this.dom),rn(this),this.domObserver.start()}},{key:"root",get:function(){var c=this,v=this._root;if(v==null){for(var b=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}},C,A=this.dom.parentNode;A;A=A.parentNode)if(C=b(A),C)return C.v}return v||document}},{key:"updateRoot",value:function(){this._root=null}},{key:"posAtCoords",value:function(c){return Wr(this,c)}},{key:"coordsAtPos",value:function(c){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return qt(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 b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1,C=this.docView.posFromDOM(c,v,b);if(C==null)throw new RangeError("DOM position not inside the editor");return C}},{key:"endOfTextblock",value:function(c,v){return xe(this,v||this.state,c)}},{key:"pasteHTML",value:function(c,v){return wa(this,"",c,!1,v||new ClipboardEvent("paste"))}},{key:"pasteText",value:function(c,v){return wa(this,c,null,!0,v||new ClipboardEvent("paste"))}},{key:"serializeForClipboard",value:function(c){return Xe(this,c)}},{key:"destroy",value:function(){this.docView&&(rc(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,mt())}},{key:"isDestroyed",get:function(){return this.docView==null}},{key:"dispatchEvent",value:function(c){return ic(this,c)}},{key:"dispatch",value:function(c){var v=this._props.dispatchTransaction;v?v.call(this,c):this.updateState(this.state.apply(c))}},{key:"domSelectionRange",value:function(){var c=this.domSelection();return c?gt&&this.root.nodeType===11&&Et(this.dom.ownerDocument)==this.dom&&Ac(this,c)||c:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}},{key:"domSelection",value:function(){return this.root.getSelection()}}]),u}();function ll(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"),[mi.node(0,u.state.doc.content.size,m)]}function ul(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:mi.widget(u.state.selection.from,m,{raw:!0,marks:u.markCursor})}}else u.cursorWrapper=null}function cl(u){return!u.someProp("editable",function(m){return m(u.state)===!1})}function _c(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 fl(u){var m=Object.create(null);function c(v){for(var b in v)Object.prototype.hasOwnProperty.call(m,b)||(m[b]=v[b])}return u.someProp("nodeViews",c),u.someProp("markViews",c),m}function zc(u,m){var c=0,v=0;for(var b in u){if(u[b]!=m[b])return!0;c++}for(var C in m)v++;return c!=v}function dl(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 La.Decoration=mi,La.DecorationSet=gn,La.EditorView=Hc,La.__endComposition=qc,La.__parseFromClipboard=Fc,La}/*!
|
|
683
|
-
* @toast-ui/editor
|
|
684
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
685
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
686
|
-
* @license MIT
|
|
687
|
-
*/var Wy;function WJe(){return Wy||(Wy=1,function(r,e){(function(n,i){r.exports=i(zJe(),UJe(),Gu(),Ku(),$Je())})(self,function(t,n,i,a,o){return function(){var s={368:function(k){/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */(function(T,x){k.exports=x()})(this,function(){function T(ze){if(Array.isArray(ze)){for(var $e=0,it=Array(ze.length);$e<ze.length;$e++)it[$e]=ze[$e];return it}else return Array.from(ze)}var x=Object.hasOwnProperty,E=Object.setPrototypeOf,P=Object.isFrozen,F=Object.getPrototypeOf,z=Object.getOwnPropertyDescriptor,Y=Object.freeze,Z=Object.seal,oe=Object.create,le=typeof Reflect<"u"&&Reflect,re=le.apply,he=le.construct;re||(re=function($e,it,ct){return $e.apply(it,ct)}),Y||(Y=function($e){return $e}),Z||(Z=function($e){return $e}),he||(he=function($e,it){return new(Function.prototype.bind.apply($e,[null].concat(T(it))))});var ge=_t(Array.prototype.forEach),ye=_t(Array.prototype.pop),Re=_t(Array.prototype.push),Ze=_t(String.prototype.toLowerCase),Be=_t(String.prototype.match),mt=_t(String.prototype.replace),ut=_t(String.prototype.indexOf),vt=_t(String.prototype.trim),st=_t(RegExp.prototype.test),Rt=Xt(TypeError);function _t(ze){return function($e){for(var it=arguments.length,ct=Array(it>1?it-1:0),xt=1;xt<it;xt++)ct[xt-1]=arguments[xt];return re(ze,$e,ct)}}function Xt(ze){return function(){for(var $e=arguments.length,it=Array($e),ct=0;ct<$e;ct++)it[ct]=arguments[ct];return he(ze,it)}}function Qe(ze,$e){E&&E(ze,null);for(var it=$e.length;it--;){var ct=$e[it];if(typeof ct=="string"){var xt=Ze(ct);xt!==ct&&(P($e)||($e[it]=xt),ct=xt)}ze[ct]=!0}return ze}function wt(ze){var $e=oe(null),it=void 0;for(it in ze)re(x,ze,[it])&&($e[it]=ze[it]);return $e}function lt(ze,$e){for(;ze!==null;){var it=z(ze,$e);if(it){if(it.get)return _t(it.get);if(typeof it.value=="function")return _t(it.value)}ze=F(ze)}function ct(xt){return console.warn("fallback value for",xt),null}return ct}var St=Y(["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"]),Et=Y(["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"]),vr=Y(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ke=Y(["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"]),pe=Y(["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"]),ie=Y(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),se=Y(["#text"]),te=Y(["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"]),Te=Y(["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"]),Ee=Y(["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"]),Pe=Y(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),at=Z(/\{\{[\s\S]*|[\s\S]*\}\}/gm),dt=Z(/<%[\s\S]*|[\s\S]*%>/gm),ot=Z(/^data-[\-\w.\u00B7-\uFFFF]/),Vt=Z(/^aria-[\-\w]+$/),gt=Z(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lr=Z(/^(?:\w+script|data):/i),$t=Z(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ur=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 At(ze){if(Array.isArray(ze)){for(var $e=0,it=Array(ze.length);$e<ze.length;$e++)it[$e]=ze[$e];return it}else return Array.from(ze)}var cr=function(){return typeof window>"u"?null:window},En=function($e,it){if((typeof $e>"u"?"undefined":ur($e))!=="object"||typeof $e.createPolicy!="function")return null;var ct=null,xt="data-tt-policy-suffix";it.currentScript&&it.currentScript.hasAttribute(xt)&&(ct=it.currentScript.getAttribute(xt));var mr="dompurify"+(ct?"#"+ct:"");try{return $e.createPolicy(mr,{createHTML:function(Ut){return Ut}})}catch{return console.warn("TrustedTypes policy "+mr+" could not be created."),null}};function Zr(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cr(),$e=function(fe){return Zr(fe)};if($e.version="2.3.3",$e.removed=[],!ze||!ze.document||ze.document.nodeType!==9)return $e.isSupported=!1,$e;var it=ze.document,ct=ze.document,xt=ze.DocumentFragment,mr=ze.HTMLTemplateElement,Ft=ze.Node,Ut=ze.Element,Pr=ze.NodeFilter,pn=ze.NamedNodeMap,Qt=pn===void 0?ze.NamedNodeMap||ze.MozNamedAttrMap:pn,Br=ze.Text,Mn=ze.Comment,vn=ze.DOMParser,Qr=ze.trustedTypes,Wr=Ut.prototype,Fr=lt(Wr,"cloneNode"),er=lt(Wr,"nextSibling"),en=lt(Wr,"childNodes"),qt=lt(Wr,"parentNode");if(typeof mr=="function"){var fr=ct.createElement("template");fr.content&&fr.content.ownerDocument&&(ct=fr.content.ownerDocument)}var $=En(Qr,it),W=$&&Xn?$.createHTML(""):"",R=ct,D=R.implementation,B=R.createNodeIterator,H=R.createDocumentFragment,K=R.getElementsByTagName,de=it.importNode,xe={};try{xe=wt(ct).documentMode?ct.documentMode:{}}catch{}var ne={};$e.isSupported=typeof qt=="function"&&D&&typeof D.createHTMLDocument<"u"&&xe!==9;var J=at,me=dt,Ce=ot,He=Vt,Ye=lr,I=$t,M=gt,g=null,w=Qe({},[].concat(At(St),At(Et),At(vr),At(pe),At(se))),O=null,_=Qe({},[].concat(At(te),At(Te),At(Ee),At(Pe))),j=null,X=null,ue=!0,ve=!0,Ne=!1,De=!1,_e=!1,nt=!1,kt=!1,Ht=!1,tn=!1,zn=!0,Xn=!1,eo=!0,da=!0,hi=!1,An={},On=null,ha=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"]),rn=null,pa=Qe({},["audio","video","img","source","image","track"]),qi=null,Hi=Qe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_i="http://www.w3.org/1998/Math/MathML",va="http://www.w3.org/2000/svg",Nn="http://www.w3.org/1999/xhtml",pi=Nn,zi=!1,Dn=void 0,to=["application/xhtml+xml","text/html"],ro="text/html",Zn=void 0,Ln=null,Rn=ct.createElement("form"),Vi=function(fe){Ln&&Ln===fe||((!fe||(typeof fe>"u"?"undefined":ur(fe))!=="object")&&(fe={}),fe=wt(fe),g="ALLOWED_TAGS"in fe?Qe({},fe.ALLOWED_TAGS):w,O="ALLOWED_ATTR"in fe?Qe({},fe.ALLOWED_ATTR):_,qi="ADD_URI_SAFE_ATTR"in fe?Qe(wt(Hi),fe.ADD_URI_SAFE_ATTR):Hi,rn="ADD_DATA_URI_TAGS"in fe?Qe(wt(pa),fe.ADD_DATA_URI_TAGS):pa,On="FORBID_CONTENTS"in fe?Qe({},fe.FORBID_CONTENTS):ha,j="FORBID_TAGS"in fe?Qe({},fe.FORBID_TAGS):{},X="FORBID_ATTR"in fe?Qe({},fe.FORBID_ATTR):{},An="USE_PROFILES"in fe?fe.USE_PROFILES:!1,ue=fe.ALLOW_ARIA_ATTR!==!1,ve=fe.ALLOW_DATA_ATTR!==!1,Ne=fe.ALLOW_UNKNOWN_PROTOCOLS||!1,De=fe.SAFE_FOR_TEMPLATES||!1,_e=fe.WHOLE_DOCUMENT||!1,Ht=fe.RETURN_DOM||!1,tn=fe.RETURN_DOM_FRAGMENT||!1,zn=fe.RETURN_DOM_IMPORT!==!1,Xn=fe.RETURN_TRUSTED_TYPE||!1,kt=fe.FORCE_BODY||!1,eo=fe.SANITIZE_DOM!==!1,da=fe.KEEP_CONTENT!==!1,hi=fe.IN_PLACE||!1,M=fe.ALLOWED_URI_REGEXP||M,pi=fe.NAMESPACE||Nn,Dn=to.indexOf(fe.PARSER_MEDIA_TYPE)===-1?Dn=ro:Dn=fe.PARSER_MEDIA_TYPE,Zn=Dn==="application/xhtml+xml"?function(Ie){return Ie}:Ze,De&&(ve=!1),tn&&(Ht=!0),An&&(g=Qe({},[].concat(At(se))),O=[],An.html===!0&&(Qe(g,St),Qe(O,te)),An.svg===!0&&(Qe(g,Et),Qe(O,Te),Qe(O,Pe)),An.svgFilters===!0&&(Qe(g,vr),Qe(O,Te),Qe(O,Pe)),An.mathMl===!0&&(Qe(g,pe),Qe(O,Ee),Qe(O,Pe))),fe.ADD_TAGS&&(g===w&&(g=wt(g)),Qe(g,fe.ADD_TAGS)),fe.ADD_ATTR&&(O===_&&(O=wt(O)),Qe(O,fe.ADD_ATTR)),fe.ADD_URI_SAFE_ATTR&&Qe(qi,fe.ADD_URI_SAFE_ATTR),fe.FORBID_CONTENTS&&(On===ha&&(On=wt(On)),Qe(On,fe.FORBID_CONTENTS)),da&&(g["#text"]=!0),_e&&Qe(g,["html","head","body"]),g.table&&(Qe(g,["tbody"]),delete j.tbody),Y&&Y(fe),Ln=fe)},vi=Qe({},["mi","mo","mn","ms","mtext"]),Qn=Qe({},["foreignobject","desc","title","annotation-xml"]),mn=Qe({},Et);Qe(mn,vr),Qe(mn,ke);var ma=Qe({},pe);Qe(ma,ie);var Xo=function(fe){var Ie=qt(fe);(!Ie||!Ie.tagName)&&(Ie={namespaceURI:Nn,tagName:"template"});var Ke=Ze(fe.tagName),Ot=Ze(Ie.tagName);if(fe.namespaceURI===va)return Ie.namespaceURI===Nn?Ke==="svg":Ie.namespaceURI===_i?Ke==="svg"&&(Ot==="annotation-xml"||vi[Ot]):!!mn[Ke];if(fe.namespaceURI===_i)return Ie.namespaceURI===Nn?Ke==="math":Ie.namespaceURI===va?Ke==="math"&&Qn[Ot]:!!ma[Ke];if(fe.namespaceURI===Nn){if(Ie.namespaceURI===va&&!Qn[Ot]||Ie.namespaceURI===_i&&!vi[Ot])return!1;var tr=Qe({},["title","style","font","a","script"]);return!ma[Ke]&&(tr[Ke]||!mn[Ke])}return!1},nn=function(fe){Re($e.removed,{element:fe});try{fe.parentNode.removeChild(fe)}catch{try{fe.outerHTML=W}catch{fe.remove()}}},no=function(fe,Ie){try{Re($e.removed,{attribute:Ie.getAttributeNode(fe),from:Ie})}catch{Re($e.removed,{attribute:null,from:Ie})}if(Ie.removeAttribute(fe),fe==="is"&&!O[fe])if(Ht||tn)try{nn(Ie)}catch{}else try{Ie.setAttribute(fe,"")}catch{}},io=function(fe){var Ie=void 0,Ke=void 0;if(kt)fe="<remove></remove>"+fe;else{var Ot=Be(fe,/^[\r\n\t ]+/);Ke=Ot&&Ot[0]}Dn==="application/xhtml+xml"&&(fe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+fe+"</body></html>");var tr=$?$.createHTML(fe):fe;if(pi===Nn)try{Ie=new vn().parseFromString(tr,Dn)}catch{}if(!Ie||!Ie.documentElement){Ie=D.createDocument(pi,"template",null);try{Ie.documentElement.innerHTML=zi?"":tr}catch{}}var rr=Ie.body||Ie.documentElement;return fe&&Ke&&rr.insertBefore(ct.createTextNode(Ke),rr.childNodes[0]||null),pi===Nn?K.call(Ie,_e?"html":"body")[0]:_e?Ie.documentElement:rr},Ui=function(fe){return B.call(fe.ownerDocument||fe,fe,Pr.SHOW_ELEMENT|Pr.SHOW_COMMENT|Pr.SHOW_TEXT,null,!1)},ao=function(fe){return fe instanceof Br||fe instanceof Mn?!1:typeof fe.nodeName!="string"||typeof fe.textContent!="string"||typeof fe.removeChild!="function"||!(fe.attributes instanceof Qt)||typeof fe.removeAttribute!="function"||typeof fe.setAttribute!="function"||typeof fe.namespaceURI!="string"||typeof fe.insertBefore!="function"},ei=function(fe){return(typeof Ft>"u"?"undefined":ur(Ft))==="object"?fe instanceof Ft:fe&&(typeof fe>"u"?"undefined":ur(fe))==="object"&&typeof fe.nodeType=="number"&&typeof fe.nodeName=="string"},an=function(fe,Ie,Ke){ne[fe]&&ge(ne[fe],function(Ot){Ot.call($e,Ie,Ke,Ln)})},ga=function(fe){var Ie=void 0;if(an("beforeSanitizeElements",fe,null),ao(fe)||Be(fe.nodeName,/[\u0080-\uFFFF]/))return nn(fe),!0;var Ke=Zn(fe.nodeName);if(an("uponSanitizeElement",fe,{tagName:Ke,allowedTags:g}),!ei(fe.firstElementChild)&&(!ei(fe.content)||!ei(fe.content.firstElementChild))&&st(/<[/\w]/g,fe.innerHTML)&&st(/<[/\w]/g,fe.textContent)||Ke==="select"&&st(/<template/i,fe.innerHTML))return nn(fe),!0;if(!g[Ke]||j[Ke]){if(da&&!On[Ke]){var Ot=qt(fe)||fe.parentNode,tr=en(fe)||fe.childNodes;if(tr&&Ot)for(var rr=tr.length,Jt=rr-1;Jt>=0;--Jt)Ot.insertBefore(Fr(tr[Jt],!0),er(fe))}return nn(fe),!0}return fe instanceof Ut&&!Xo(fe)||(Ke==="noscript"||Ke==="noembed")&&st(/<\/no(script|embed)/i,fe.innerHTML)?(nn(fe),!0):(De&&fe.nodeType===3&&(Ie=fe.textContent,Ie=mt(Ie,J," "),Ie=mt(Ie,me," "),fe.textContent!==Ie&&(Re($e.removed,{element:fe.cloneNode()}),fe.textContent=Ie)),an("afterSanitizeElements",fe,null),!1)},oo=function(fe,Ie,Ke){if(eo&&(Ie==="id"||Ie==="name")&&(Ke in ct||Ke in Rn))return!1;if(!(ve&&!X[Ie]&&st(Ce,Ie))){if(!(ue&&st(He,Ie))){if(!O[Ie]||X[Ie])return!1;if(!qi[Ie]){if(!st(M,mt(Ke,I,""))){if(!((Ie==="src"||Ie==="xlink:href"||Ie==="href")&&fe!=="script"&&ut(Ke,"data:")===0&&rn[fe])){if(!(Ne&&!st(Ye,mt(Ke,I,"")))){if(Ke)return!1}}}}}}return!0},so=function(fe){var Ie=void 0,Ke=void 0,Ot=void 0,tr=void 0;an("beforeSanitizeAttributes",fe,null);var rr=fe.attributes;if(rr){var Jt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:O};for(tr=rr.length;tr--;){Ie=rr[tr];var on=Ie,ti=on.name,ya=on.namespaceURI;if(Ke=vt(Ie.value),Ot=Zn(ti),Jt.attrName=Ot,Jt.attrValue=Ke,Jt.keepAttr=!0,Jt.forceKeepAttr=void 0,an("uponSanitizeAttribute",fe,Jt),Ke=Jt.attrValue,!Jt.forceKeepAttr&&(no(ti,fe),!!Jt.keepAttr)){if(st(/\/>/i,Ke)){no(ti,fe);continue}De&&(Ke=mt(Ke,J," "),Ke=mt(Ke,me," "));var lo=Zn(fe.nodeName);if(oo(lo,Ot,Ke))try{ya?fe.setAttributeNS(ya,ti,Ke):fe.setAttribute(ti,Ke),ye($e.removed)}catch{}}}an("afterSanitizeAttributes",fe,null)}},Zo=function Xe(fe){var Ie=void 0,Ke=Ui(fe);for(an("beforeSanitizeShadowDOM",fe,null);Ie=Ke.nextNode();)an("uponSanitizeShadowNode",Ie,null),!ga(Ie)&&(Ie.content instanceof xt&&Xe(Ie.content),so(Ie));an("afterSanitizeShadowDOM",fe,null)};return $e.sanitize=function(Xe,fe){var Ie=void 0,Ke=void 0,Ot=void 0,tr=void 0,rr=void 0;if(zi=!Xe,zi&&(Xe="<!-->"),typeof Xe!="string"&&!ei(Xe)){if(typeof Xe.toString!="function")throw Rt("toString is not a function");if(Xe=Xe.toString(),typeof Xe!="string")throw Rt("dirty is not a string, aborting")}if(!$e.isSupported){if(ur(ze.toStaticHTML)==="object"||typeof ze.toStaticHTML=="function"){if(typeof Xe=="string")return ze.toStaticHTML(Xe);if(ei(Xe))return ze.toStaticHTML(Xe.outerHTML)}return Xe}if(nt||Vi(fe),$e.removed=[],typeof Xe=="string"&&(hi=!1),!hi)if(Xe instanceof Ft)Ie=io("<!---->"),Ke=Ie.ownerDocument.importNode(Xe,!0),Ke.nodeType===1&&Ke.nodeName==="BODY"||Ke.nodeName==="HTML"?Ie=Ke:Ie.appendChild(Ke);else{if(!Ht&&!De&&!_e&&Xe.indexOf("<")===-1)return $&&Xn?$.createHTML(Xe):Xe;if(Ie=io(Xe),!Ie)return Ht?null:W}Ie&&kt&&nn(Ie.firstChild);for(var Jt=Ui(hi?Xe:Ie);Ot=Jt.nextNode();)Ot.nodeType===3&&Ot===tr||ga(Ot)||(Ot.content instanceof xt&&Zo(Ot.content),so(Ot),tr=Ot);if(tr=null,hi)return Xe;if(Ht){if(tn)for(rr=H.call(Ie.ownerDocument);Ie.firstChild;)rr.appendChild(Ie.firstChild);else rr=Ie;return zn&&(rr=de.call(it,rr,!0)),rr}var on=_e?Ie.outerHTML:Ie.innerHTML;return De&&(on=mt(on,J," "),on=mt(on,me," ")),$&&Xn?$.createHTML(on):on},$e.setConfig=function(Xe){Vi(Xe),nt=!0},$e.clearConfig=function(){Ln=null,nt=!1},$e.isValidAttribute=function(Xe,fe,Ie){Ln||Vi({});var Ke=Zn(Xe),Ot=Zn(fe);return oo(Ke,Ot,Ie)},$e.addHook=function(Xe,fe){typeof fe=="function"&&(ne[Xe]=ne[Xe]||[],Re(ne[Xe],fe))},$e.removeHook=function(Xe){ne[Xe]&&ye(ne[Xe])},$e.removeHooks=function(Xe){ne[Xe]&&(ne[Xe]=[])},$e.removeAllHooks=function(){ne={}},$e}var Zt=Zr();return Zt})},928:function(k,T,x){var E=x(322);function P(F,z,Y){var Z,oe;if(Y=Y||0,!E(z))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(z,F,Y);for(oe=z.length,Z=Y;Y>=0&&Z<oe;Z+=1)if(z[Z]===F)return Z;return-1}k.exports=P},690:function(k,T,x){var E=x(322),P=x(893),F=x(956);function z(Y,Z,oe){E(Y)?P(Y,Z,oe):F(Y,Z,oe)}k.exports=z},893:function(k){function T(x,E,P){var F=0,z=x.length;for(P=P||null;F<z&&E.call(P,x[F],F,x)!==!1;F+=1);}k.exports=T},956:function(k){function T(x,E,P){var F;P=P||null;for(F in x)if(x.hasOwnProperty(F)&&E.call(P,x[F],F,x)===!1)break}k.exports=T},990:function(k,T,x){var E=x(893);function P(F){var z;try{z=Array.prototype.slice.call(F)}catch{z=[],E(F,function(Z){z.push(Z)})}return z}k.exports=P},755:function(k){var T="_feEventKey";function x(E,P){var F=E[T],z;return F||(F=E[T]={}),z=F[P],z||(z=F[P]=[]),z}k.exports=x},349:function(k,T,x){var E=x(758),P=x(690),F=x(755);function z(oe,le,re){if(E(le)){P(le.split(/\s+/g),function(he){Y(oe,he,re)});return}P(le,function(he,ge){Y(oe,ge,he)})}function Y(oe,le,re){var he=F(oe,le),ge;re?(P(he,function(ye,Re){return re===ye.handler?(Z(oe,le,ye.wrappedHandler),ge=Re,!1):!0}),he.splice(ge,1)):(P(he,function(ye){Z(oe,le,ye.wrappedHandler)}),he.splice(0,he.length))}function Z(oe,le,re){"removeEventListener"in oe?oe.removeEventListener(le,re):"detachEvent"in oe&&oe.detachEvent("on"+le,re)}k.exports=z},348:function(k,T,x){var E=x(758),P=x(690),F=x(755);function z(oe,le,re,he){if(E(le)){P(le.split(/\s+/g),function(ge){Y(oe,ge,re,he)});return}P(le,function(ge,ye){Y(oe,ye,ge,re)})}function Y(oe,le,re,he){function ge(ye){re.call(he||oe,ye||window.event)}"addEventListener"in oe?oe.addEventListener(le,ge):"attachEvent"in oe&&oe.attachEvent("on"+le,ge),Z(oe,le,re,ge)}function Z(oe,le,re,he){var ge=F(oe,le),ye=!1;P(ge,function(Re){return Re.handler===re?(ye=!0,!1):!0}),ye||ge.push({handler:re,wrappedHandler:he})}k.exports=z},24:function(k,T,x){var E=x(322),P=x(929);function F(z,Y){if(Y=E(Y)?Y.join(" "):Y,Y=Y.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),P(z.className.baseVal)){z.className=Y;return}z.className.baseVal=Y}k.exports=F},204:function(k,T,x){var E=x(690),P=x(928),F=x(902),z=x(24);function Y(Z){var oe=Array.prototype.slice.call(arguments,1),le=Z.classList,re=[],he;if(le){E(oe,function(ge){Z.classList.add(ge)});return}he=F(Z),he&&(oe=[].concat(he.split(/\s+/),oe)),E(oe,function(ge){P(ge,re)<0&&re.push(ge)}),z(Z,re)}k.exports=Y},522:function(k,T,x){var E=x(758),P=x(690);function F(z,Y,Z){var oe=z.style;if(E(Y)){oe[Y]=Z;return}P(Y,function(le,re){oe[re]=le})}k.exports=F},902:function(k,T,x){var E=x(929);function P(F){return!F||!F.className?"":E(F.className.baseVal)?F.className:F.className.baseVal}k.exports=P},714:function(k,T,x){var E=x(928),P=x(902);function F(z,Y){var Z;return z.classList?z.classList.contains(Y):(Z=P(z).split(/\s+/),E(Y,Z)>-1)}k.exports=F},471:function(k,T,x){var E=x(928),P=x(990),F=Element.prototype,z=F.matches||F.webkitMatchesSelector||F.mozMatchesSelector||F.msMatchesSelector||function(Z){var oe=this.document||this.ownerDocument;return E(this,P(oe.querySelectorAll(Z)))>-1};function Y(Z,oe){return z.call(Z,oe)}k.exports=Y},462:function(k,T,x){var E=x(893),P=x(928),F=x(902),z=x(24);function Y(Z){var oe=Array.prototype.slice.call(arguments,1),le=Z.classList,re,he;if(le){E(oe,function(ge){le.remove(ge)});return}re=F(Z).split(/\s+/),he=[],E(re,function(ge){P(ge,oe)<0&&he.push(ge)}),z(Z,he)}k.exports=Y},969:function(k){function T(x,E){var P=Object.prototype.hasOwnProperty,F,z,Y,Z;for(Y=1,Z=arguments.length;Y<Z;Y+=1){F=arguments[Y];for(z in F)P.call(F,z)&&(x[z]=F[z])}return x}k.exports=T},254:function(k,T,x){var E=x(956);function P(F,z){var Y=document.createElement("img"),Z="";return E(z,function(oe,le){Z+="&"+le+"="+oe}),Z=Z.substring(1),Y.src=F+"?"+Z,Y.style.display="none",document.body.appendChild(Y),document.body.removeChild(Y),Y}k.exports=P},391:function(k,T,x){var E=x(929),P=x(254),F=7*24*60*60*1e3;function z(Z){var oe=new Date().getTime();return oe-Z>F}function Y(Z,oe){var le="https://www.google-analytics.com/collect",re=location.hostname,he="event",ge="use",ye="TOAST UI "+Z+" for "+re+": Statistics",Re=window.localStorage.getItem(ye);!E(window.tui)&&window.tui.usageStatistics===!1||Re&&!z(Re)||(window.localStorage.setItem(ye,new Date().getTime()),setTimeout(function(){(document.readyState==="interactive"||document.readyState==="complete")&&P(le,{v:1,t:he,tid:oe,cid:re,dp:re,dh:Z,el:Z,ec:ge})},1e3))}k.exports=Y},322:function(k){function T(x){return x instanceof Array}k.exports=T},65:function(k,T,x){var E=x(929),P=x(934);function F(z){return!E(z)&&!P(z)}k.exports=F},404:function(k,T,x){var E=x(790);function P(F){return!E(F)}k.exports=P},294:function(k){function T(x){return x instanceof Function}k.exports=T},934:function(k){function T(x){return x===null}k.exports=T},758:function(k){function T(x){return typeof x=="string"||x instanceof String}k.exports=T},790:function(k,T,x){var E=x(65);function P(F){return E(F)&&F!==!1}k.exports=P},929:function(k){function T(x){return x===void 0}k.exports=T},479:function(k){k.exports=t},481:function(k){k.exports=n},43:function(k){k.exports=i},814:function(k){k.exports=a},311:function(k){k.exports=o}},l={};function f(k){var T=l[k];if(T!==void 0)return T.exports;var x=l[k]={exports:{}};return s[k].call(x.exports,x,x.exports,f),x.exports}(function(){f.n=function(k){var T=k&&k.__esModule?function(){return k.default}:function(){return k};return f.d(T,{a:T}),T}})(),function(){f.d=function(k,T){for(var x in T)f.o(T,x)&&!f.o(k,x)&&Object.defineProperty(k,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(k,T){return Object.prototype.hasOwnProperty.call(k,T)}}();var p={};return function(){f.d(p,{default:function(){return jZ}});var k=function(){return k=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},k.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))}/*! *****************************************************************************
|
|
688
|
-
Copyright (c) Microsoft Corporation.
|
|
689
|
-
|
|
690
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
691
|
-
purpose with or without fee is hereby granted.
|
|
692
|
-
|
|
693
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
694
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
695
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
696
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
697
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
698
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
699
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
700
|
-
***************************************************************************** */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 P=function(){return P=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},P.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 z=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof f.g<"u"?f.g:typeof self<"u"?self:{},Y={};function Z(h){var d,y,S=Y[h];if(S)return S;for(S=Y[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 oe(h,d,y){var S,L,U,G,ee,Se="";for(typeof d!="string"&&(y=d,d=oe.defaultChars),typeof y>"u"&&(y=!0),ee=Z(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+=ee[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}oe.defaultChars=";/?:@&=+$,-_.!~*'()#",oe.componentChars="-_.!~*'()";var le=oe,re={},he={},ge="Á",ye="á",Re="Ă",Ze="ă",Be="∾",mt="∿",ut="∾̳",vt="Â",st="â",Rt="´",_t="А",Xt="а",Qe="Æ",wt="æ",lt="",St="𝔄",Et="𝔞",vr="À",ke="à",pe="ℵ",ie="ℵ",se="Α",te="α",Te="Ā",Ee="ā",Pe="⨿",at="&",dt="&",ot="⩕",Vt="⩓",gt="∧",lr="⩜",$t="⩘",ur="⩚",At="∠",cr="⦤",En="∠",Zr="⦨",Zt="⦩",ze="⦪",$e="⦫",it="⦬",ct="⦭",xt="⦮",mr="⦯",Ft="∡",Ut="∟",Pr="⊾",pn="⦝",Qt="∢",Br="Å",Mn="⍼",vn="Ą",Qr="ą",Wr="𝔸",Fr="𝕒",er="⩯",en="≈",qt="⩰",fr="≊",$="≋",W="'",R="",D="≈",B="≊",H="Å",K="å",de="𝒜",xe="𝒶",ne="≔",J="*",me="≈",Ce="≍",He="Ã",Ye="ã",I="Ä",M="ä",g="∳",w="⨑",O="≌",_="϶",j="‵",X="∽",ue="⋍",ve="∖",Ne="⫧",De="⊽",_e="⌅",nt="⌆",kt="⌅",Ht="⎵",tn="⎶",zn="≌",Xn="Б",eo="б",da="„",hi="∵",An="∵",On="∵",ha="⦰",rn="϶",pa="ℬ",qi="ℬ",Hi="Β",_i="β",va="ℶ",Nn="≬",pi="𝔅",zi="𝔟",Dn="⋂",to="◯",ro="⋃",Zn="⨀",Ln="⨁",Rn="⨂",Vi="⨆",vi="★",Qn="▽",mn="△",ma="⨄",Xo="⋁",nn="⋀",no="⤍",io="⧫",Ui="▪",ao="▴",ei="▾",an="◂",ga="▸",oo="␣",so="▒",Zo="░",Xe="▓",fe="█",Ie="=⃥",Ke="≡⃥",Ot="⫭",tr="⌐",rr="𝔹",Jt="𝕓",on="⊥",ti="⊥",ya="⋈",lo="⧉",uo="┐",Ju="╕",Yu="╖",Xu="╗",Zu="┌",Mr="╒",Ar="╓",Qu="╔",ec="─",tc="═",ri="┬",rc="╤",Qo="╥",es="╦",nc="┴",ic="╧",co="╨",ac="╩",ts="⊟",$i="⊞",oc="⊠",sc="┘",lc="╛",uc="╜",cc="╝",fc="└",rs="╘",Us="╙",dc="╚",$s="│",hc="║",Ws="┼",js="╪",pc="╫",vc="╬",ba="┤",mc="╡",ka="╢",gc="╣",yc="├",wa="╞",Gs="╟",Ks="╠",bc="‵",Js="˘",Ys="˘",Ca="¦",Xs="𝒷",Ta="ℬ",kc="⁏",mi="∽",Wi="⋍",gi="⧅",gn="\\",wr="⟈",Zs="•",wc="•",Qs="≎",Cc="⪮",el="≏",tl="≎",fo="≏",yi="Ć",ns="ć",rl="⩄",is="⩉",Tc="⩋",Sc="∩",xc="⋒",Ec="⩇",nl="⩀",il="ⅅ",Mc="∩︀",al="⁁",Ac="ˇ",Oc="ℭ",Nc="⩍",Dc="Č",Lc="č",Rc="Ç",ol="ç",Ic="Ĉ",Pc="ĉ",as="∰",Bc="⩌",sl="⩐",Fc="Ċ",qc="ċ",Hc="¸",ll="¸",ul="⦲",cl="¢",_c="·",fl="·",zc="𝔠",dl="ℭ",u="Ч",m="ч",c="✓",v="✓",b="Χ",C="χ",A="ˆ",N="≗",q="↺",V="↻",Q="⊛",ce="⊚",ae="⊝",be="⊙",Me="®",Fe="Ⓢ",We="⊖",Le="⊕",Ct="⊗",ht="○",tt="⧃",yt="≗",It="⨐",zt="⫯",yn="⧂",dr="∲",qr="”",nr="’",Sa="♣",bn="♣",ji=":",sn="∷",Yt="⩴",Vc="≔",Uc="≔",ho=",",bi="@",hl="∁",pl="∘",g0="∁",y0="ℂ",b0="≅",k0="⩭",w0="≡",C0="∮",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="ffi",dx="ff",hx="ffl",px="𝔉",vx="𝔣",mx="fi",gx="◼",yx="▪",bx="fj",kx="♭",wx="fl",Cx="▱",Tx="ƒ",Sx="𝔽",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="IJ",DA="ij",LA="Ī",RA="ī",IA="ℑ",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="ʼn",rP="≉",nP="♮",iP="ℕ",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=`
|
|
701
|
-
`,BP="∄",FP="∄",qP="𝔑",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="↝",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="⇄",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$="ш",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="⊋︀",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="𝔴",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="",Xh={Aacute:ge,aacute:ye,Abreve:Re,abreve:Ze,ac:Be,acd:mt,acE:ut,Acirc:vt,acirc:st,acute:Rt,Acy:_t,acy:Xt,AElig:Qe,aelig:wt,af:lt,Afr:St,afr:Et,Agrave:vr,agrave:ke,alefsym:pe,aleph:ie,Alpha:se,alpha:te,Amacr:Te,amacr:Ee,amalg:Pe,amp:at,AMP:dt,andand:ot,And:Vt,and:gt,andd:lr,andslope:$t,andv:ur,ang:At,ange:cr,angle:En,angmsdaa:Zr,angmsdab:Zt,angmsdac:ze,angmsdad:$e,angmsdae:it,angmsdaf:ct,angmsdag:xt,angmsdah:mr,angmsd:Ft,angrt:Ut,angrtvb:Pr,angrtvbd:pn,angsph:Qt,angst:Br,angzarr:Mn,Aogon:vn,aogon:Qr,Aopf:Wr,aopf:Fr,apacir:er,ap:en,apE:qt,ape:fr,apid:$,apos:W,ApplyFunction:R,approx:D,approxeq:B,Aring:H,aring:K,Ascr:de,ascr:xe,Assign:ne,ast:J,asymp:me,asympeq:Ce,Atilde:He,atilde:Ye,Auml:I,auml:M,awconint:g,awint:w,backcong:O,backepsilon:_,backprime:j,backsim:X,backsimeq:ue,Backslash:ve,Barv:Ne,barvee:De,barwed:_e,Barwed:nt,barwedge:kt,bbrk:Ht,bbrktbrk:tn,bcong:zn,Bcy:Xn,bcy:eo,bdquo:da,becaus:hi,because:An,Because:On,bemptyv:ha,bepsi:rn,bernou:pa,Bernoullis:qi,Beta:Hi,beta:_i,beth:va,between:Nn,Bfr:pi,bfr:zi,bigcap:Dn,bigcirc:to,bigcup:ro,bigodot:Zn,bigoplus:Ln,bigotimes:Rn,bigsqcup:Vi,bigstar:vi,bigtriangledown:Qn,bigtriangleup:mn,biguplus:ma,bigvee:Xo,bigwedge:nn,bkarow:no,blacklozenge:io,blacksquare:Ui,blacktriangle:ao,blacktriangledown:ei,blacktriangleleft:an,blacktriangleright:ga,blank:oo,blk12:so,blk14:Zo,blk34:Xe,block:fe,bne:Ie,bnequiv:Ke,bNot:Ot,bnot:tr,Bopf:rr,bopf:Jt,bot:on,bottom:ti,bowtie:ya,boxbox:lo,boxdl:uo,boxdL:Ju,boxDl:Yu,boxDL:Xu,boxdr:Zu,boxdR:Mr,boxDr:Ar,boxDR:Qu,boxh:ec,boxH:tc,boxhd:ri,boxHd:rc,boxhD:Qo,boxHD:es,boxhu:nc,boxHu:ic,boxhU:co,boxHU:ac,boxminus:ts,boxplus:$i,boxtimes:oc,boxul:sc,boxuL:lc,boxUl:uc,boxUL:cc,boxur:fc,boxuR:rs,boxUr:Us,boxUR:dc,boxv:$s,boxV:hc,boxvh:Ws,boxvH:js,boxVh:pc,boxVH:vc,boxvl:ba,boxvL:mc,boxVl:ka,boxVL:gc,boxvr:yc,boxvR:wa,boxVr:Gs,boxVR:Ks,bprime:bc,breve:Js,Breve:Ys,brvbar:Ca,bscr:Xs,Bscr:Ta,bsemi:kc,bsim:mi,bsime:Wi,bsolb:gi,bsol:gn,bsolhsub:wr,bull:Zs,bullet:wc,bump:Qs,bumpE:Cc,bumpe:el,Bumpeq:tl,bumpeq:fo,Cacute:yi,cacute:ns,capand:rl,capbrcup:is,capcap:Tc,cap:Sc,Cap:xc,capcup:Ec,capdot:nl,CapitalDifferentialD:il,caps:Mc,caret:al,caron:Ac,Cayleys:Oc,ccaps:Nc,Ccaron:Dc,ccaron:Lc,Ccedil:Rc,ccedil:ol,Ccirc:Ic,ccirc:Pc,Cconint:as,ccups:Bc,ccupssm:sl,Cdot:Fc,cdot:qc,cedil:Hc,Cedilla:ll,cemptyv:ul,cent:cl,centerdot:_c,CenterDot:fl,cfr:zc,Cfr:dl,CHcy:u,chcy:m,check:c,checkmark:v,Chi:b,chi:C,circ:A,circeq:N,circlearrowleft:q,circlearrowright:V,circledast:Q,circledcirc:ce,circleddash:ae,CircleDot:be,circledR:Me,circledS:Fe,CircleMinus:We,CirclePlus:Le,CircleTimes:Ct,cir:ht,cirE:tt,cire:yt,cirfnint:It,cirmid:zt,cirscir:yn,ClockwiseContourIntegral:dr,CloseCurlyDoubleQuote:qr,CloseCurlyQuote:nr,clubs:Sa,clubsuit:bn,colon:ji,Colon:sn,Colone:Yt,colone:Vc,coloneq:Uc,comma:ho,commat:bi,comp:hl,compfn:pl,complement:g0,complexes:y0,cong:b0,congdot:k0,Congruent:w0,conint:C0,Conint:T0,ContourIntegral:S0,copf:x0,Copf:E0,coprod:M0,Coproduct:A0,copy:O0,COPY:N0,copysr:D0,CounterClockwiseContourIntegral:L0,crarr:R0,cross:I0,Cross:P0,Cscr:B0,cscr:F0,csub:q0,csube:H0,csup:_0,csupe:z0,ctdot:V0,cudarrl:U0,cudarrr:$0,cuepr:W0,cuesc:j0,cularr:G0,cularrp:K0,cupbrcap:J0,cupcap:Y0,CupCap:X0,cup:Z0,Cup:Q0,cupcup:eC,cupdot:tC,cupor:rC,cups:nC,curarr:iC,curarrm:aC,curlyeqprec:oC,curlyeqsucc:sC,curlyvee:lC,curlywedge:uC,curren:cC,curvearrowleft:fC,curvearrowright:dC,cuvee:hC,cuwed:pC,cwconint:vC,cwint:mC,cylcty:gC,dagger:yC,Dagger:bC,daleth:kC,darr:wC,Darr:CC,dArr:TC,dash:SC,Dashv:xC,dashv:EC,dbkarow:MC,dblac:AC,Dcaron:OC,dcaron:NC,Dcy:DC,dcy:LC,ddagger:RC,ddarr:IC,DD:PC,dd:BC,DDotrahd:FC,ddotseq:qC,deg:HC,Del:_C,Delta:zC,delta:VC,demptyv:UC,dfisht:$C,Dfr:WC,dfr:jC,dHar:GC,dharl:KC,dharr:JC,DiacriticalAcute:YC,DiacriticalDot:XC,DiacriticalDoubleAcute:ZC,DiacriticalGrave:QC,DiacriticalTilde:e1,diam:t1,diamond:r1,Diamond:n1,diamondsuit:i1,diams:a1,die:o1,DifferentialD:s1,digamma:l1,disin:u1,div:c1,divide:f1,divideontimes:d1,divonx:h1,DJcy:p1,djcy:v1,dlcorn:m1,dlcrop:g1,dollar:y1,Dopf:b1,dopf:k1,Dot:w1,dot:C1,DotDot:T1,doteq:S1,doteqdot:x1,DotEqual:E1,dotminus:M1,dotplus:A1,dotsquare:O1,doublebarwedge:N1,DoubleContourIntegral:D1,DoubleDot:L1,DoubleDownArrow:R1,DoubleLeftArrow:I1,DoubleLeftRightArrow:P1,DoubleLeftTee:B1,DoubleLongLeftArrow:F1,DoubleLongLeftRightArrow:q1,DoubleLongRightArrow:H1,DoubleRightArrow:_1,DoubleRightTee:z1,DoubleUpArrow:V1,DoubleUpDownArrow:U1,DoubleVerticalBar:$1,DownArrowBar:W1,downarrow:j1,DownArrow:G1,Downarrow:K1,DownArrowUpArrow:J1,DownBreve:Y1,downdownarrows:X1,downharpoonleft:Z1,downharpoonright:Q1,DownLeftRightVector:eT,DownLeftTeeVector:tT,DownLeftVectorBar:rT,DownLeftVector:nT,DownRightTeeVector:iT,DownRightVectorBar:aT,DownRightVector:oT,DownTeeArrow:sT,DownTee:lT,drbkarow:uT,drcorn:cT,drcrop:fT,Dscr:dT,dscr:hT,DScy:pT,dscy:vT,dsol:mT,Dstrok:gT,dstrok:yT,dtdot:bT,dtri:kT,dtrif:wT,duarr:CT,duhar:TT,dwangle:ST,DZcy:xT,dzcy:ET,dzigrarr:MT,Eacute:AT,eacute:OT,easter:NT,Ecaron:DT,ecaron:LT,Ecirc:RT,ecirc:IT,ecir:PT,ecolon:BT,Ecy:FT,ecy:qT,eDDot:HT,Edot:_T,edot:zT,eDot:VT,ee:UT,efDot:$T,Efr:WT,efr:jT,eg:GT,Egrave:KT,egrave:JT,egs:YT,egsdot:XT,el:ZT,Element:QT,elinters:eS,ell:tS,els:rS,elsdot:nS,Emacr:iS,emacr:aS,empty:oS,emptyset:sS,EmptySmallSquare:lS,emptyv:uS,EmptyVerySmallSquare:cS,emsp13:fS,emsp14:dS,emsp:hS,ENG:pS,eng:vS,ensp:mS,Eogon:gS,eogon:yS,Eopf:bS,eopf:kS,epar:wS,eparsl:CS,eplus:TS,epsi:SS,Epsilon:xS,epsilon:ES,epsiv:MS,eqcirc:AS,eqcolon:OS,eqsim:NS,eqslantgtr:DS,eqslantless:LS,Equal:RS,equals:IS,EqualTilde:PS,equest:BS,Equilibrium:FS,equiv:qS,equivDD:HS,eqvparsl:_S,erarr:zS,erDot:VS,escr:US,Escr:$S,esdot:WS,Esim:jS,esim:GS,Eta:KS,eta:JS,ETH:YS,eth:XS,Euml:ZS,euml:QS,euro:ex,excl:tx,exist:rx,Exists:nx,expectation:ix,exponentiale:ax,ExponentialE:ox,fallingdotseq:sx,Fcy:lx,fcy:ux,female:cx,ffilig:fx,fflig:dx,ffllig:hx,Ffr:px,ffr:vx,filig:mx,FilledSmallSquare:gx,FilledVerySmallSquare:yx,fjlig:bx,flat:kx,fllig:wx,fltns:Cx,fnof:Tx,Fopf:Sx,fopf:xx,forall:Ex,ForAll:Mx,fork:Ax,forkv:Ox,Fouriertrf:Nx,fpartint:Dx,frac12:Lx,frac13:Rx,frac14:Ix,frac15:Px,frac16:Bx,frac18:Fx,frac23:qx,frac25:Hx,frac34:_x,frac35:zx,frac38:Vx,frac45:Ux,frac56:$x,frac58:Wx,frac78:jx,frasl:Gx,frown:Kx,fscr:Jx,Fscr:Yx,gacute:Xx,Gamma:Zx,gamma:Qx,Gammad:eE,gammad:tE,gap:rE,Gbreve:nE,gbreve:iE,Gcedil:aE,Gcirc:oE,gcirc:sE,Gcy:lE,gcy:uE,Gdot:cE,gdot:fE,ge:dE,gE:hE,gEl:pE,gel:vE,geq:mE,geqq:gE,geqslant:yE,gescc:bE,ges:kE,gesdot:wE,gesdoto:CE,gesdotol:TE,gesl:SE,gesles:xE,Gfr:EE,gfr:ME,gg:AE,Gg:OE,ggg:NE,gimel:DE,GJcy:LE,gjcy:RE,gla:IE,gl:PE,glE:BE,glj:FE,gnap:qE,gnapprox:HE,gne:_E,gnE:zE,gneq:VE,gneqq:UE,gnsim:$E,Gopf:WE,gopf:jE,grave:GE,GreaterEqual:KE,GreaterEqualLess:JE,GreaterFullEqual:YE,GreaterGreater:XE,GreaterLess:ZE,GreaterSlantEqual:QE,GreaterTilde:eM,Gscr:tM,gscr:rM,gsim:nM,gsime:iM,gsiml:aM,gtcc:oM,gtcir:sM,gt:lM,GT:uM,Gt:cM,gtdot:fM,gtlPar:dM,gtquest:hM,gtrapprox:pM,gtrarr:vM,gtrdot:mM,gtreqless:gM,gtreqqless:yM,gtrless:bM,gtrsim:kM,gvertneqq:wM,gvnE:CM,Hacek:TM,hairsp:SM,half:xM,hamilt:EM,HARDcy:MM,hardcy:AM,harrcir:OM,harr:NM,hArr:DM,harrw:LM,Hat:RM,hbar:IM,Hcirc:PM,hcirc:BM,hearts:FM,heartsuit:qM,hellip:HM,hercon:_M,hfr:zM,Hfr:VM,HilbertSpace:UM,hksearow:$M,hkswarow:WM,hoarr:jM,homtht:GM,hookleftarrow:KM,hookrightarrow:JM,hopf:YM,Hopf:XM,horbar:ZM,HorizontalLine:QM,hscr:eA,Hscr:tA,hslash:rA,Hstrok:nA,hstrok:iA,HumpDownHump:aA,HumpEqual:oA,hybull:sA,hyphen:lA,Iacute:uA,iacute:cA,ic:fA,Icirc:dA,icirc:hA,Icy:pA,icy:vA,Idot:mA,IEcy:gA,iecy:yA,iexcl:bA,iff:kA,ifr:wA,Ifr:CA,Igrave:TA,igrave:SA,ii:xA,iiiint:EA,iiint:MA,iinfin:AA,iiota:OA,IJlig:NA,ijlig:DA,Imacr:LA,imacr:RA,image:IA,ImaginaryI:PA,imagline:BA,imagpart:FA,imath:qA,Im:HA,imof:_A,imped:zA,Implies:VA,incare:UA,in:"∈",infin:$A,infintie:WA,inodot:jA,intcal:GA,int:KA,Int:JA,integers:YA,Integral:XA,intercal:ZA,Intersection:QA,intlarhk:eO,intprod:tO,InvisibleComma:rO,InvisibleTimes:nO,IOcy:iO,iocy:aO,Iogon:oO,iogon:sO,Iopf:lO,iopf:uO,Iota:cO,iota:fO,iprod:dO,iquest:hO,iscr:pO,Iscr:vO,isin:mO,isindot:gO,isinE:yO,isins:bO,isinsv:kO,isinv:wO,it:CO,Itilde:TO,itilde:SO,Iukcy:xO,iukcy:EO,Iuml:MO,iuml:AO,Jcirc:OO,jcirc:NO,Jcy:DO,jcy:LO,Jfr:RO,jfr:IO,jmath:PO,Jopf:BO,jopf:FO,Jscr:qO,jscr:HO,Jsercy:_O,jsercy:zO,Jukcy:VO,jukcy:UO,Kappa:$O,kappa:WO,kappav:jO,Kcedil:GO,kcedil:KO,Kcy:JO,kcy:YO,Kfr:XO,kfr:ZO,kgreen:QO,KHcy:eN,khcy:tN,KJcy:rN,kjcy:nN,Kopf:iN,kopf:aN,Kscr:oN,kscr:sN,lAarr:lN,Lacute:uN,lacute:cN,laemptyv:fN,lagran:dN,Lambda:hN,lambda:pN,lang:vN,Lang:mN,langd:gN,langle:yN,lap:bN,Laplacetrf:kN,laquo:wN,larrb:CN,larrbfs:TN,larr:SN,Larr:xN,lArr:EN,larrfs:MN,larrhk:AN,larrlp:ON,larrpl:NN,larrsim:DN,larrtl:LN,latail:RN,lAtail:IN,lat:PN,late:BN,lates:FN,lbarr:qN,lBarr:HN,lbbrk:_N,lbrace:zN,lbrack:VN,lbrke:UN,lbrksld:$N,lbrkslu:WN,Lcaron:jN,lcaron:GN,Lcedil:KN,lcedil:JN,lceil:YN,lcub:XN,Lcy:ZN,lcy:QN,ldca:eD,ldquo:tD,ldquor:rD,ldrdhar:nD,ldrushar:iD,ldsh:aD,le:oD,lE:sD,LeftAngleBracket:lD,LeftArrowBar:uD,leftarrow:cD,LeftArrow:fD,Leftarrow:dD,LeftArrowRightArrow:hD,leftarrowtail:pD,LeftCeiling:vD,LeftDoubleBracket:mD,LeftDownTeeVector:gD,LeftDownVectorBar:yD,LeftDownVector:bD,LeftFloor:kD,leftharpoondown:wD,leftharpoonup:CD,leftleftarrows:TD,leftrightarrow:SD,LeftRightArrow:xD,Leftrightarrow:ED,leftrightarrows:MD,leftrightharpoons:AD,leftrightsquigarrow:OD,LeftRightVector:ND,LeftTeeArrow:DD,LeftTee:LD,LeftTeeVector:RD,leftthreetimes:ID,LeftTriangleBar:PD,LeftTriangle:BD,LeftTriangleEqual:FD,LeftUpDownVector:qD,LeftUpTeeVector:HD,LeftUpVectorBar:_D,LeftUpVector:zD,LeftVectorBar:VD,LeftVector:UD,lEg:$D,leg:WD,leq:jD,leqq:GD,leqslant:KD,lescc:JD,les:YD,lesdot:XD,lesdoto:ZD,lesdotor:QD,lesg:eL,lesges:tL,lessapprox:rL,lessdot:nL,lesseqgtr:iL,lesseqqgtr:aL,LessEqualGreater:oL,LessFullEqual:sL,LessGreater:lL,lessgtr:uL,LessLess:cL,lesssim:fL,LessSlantEqual:dL,LessTilde:hL,lfisht:pL,lfloor:vL,Lfr:mL,lfr:gL,lg:yL,lgE:bL,lHar:kL,lhard:wL,lharu:CL,lharul:TL,lhblk:SL,LJcy:xL,ljcy:EL,llarr:ML,ll:AL,Ll:OL,llcorner:NL,Lleftarrow:DL,llhard:LL,lltri:RL,Lmidot:IL,lmidot:PL,lmoustache:BL,lmoust:FL,lnap:qL,lnapprox:HL,lne:_L,lnE:zL,lneq:VL,lneqq:UL,lnsim:$L,loang:WL,loarr:jL,lobrk:GL,longleftarrow:KL,LongLeftArrow:JL,Longleftarrow:YL,longleftrightarrow:XL,LongLeftRightArrow:ZL,Longleftrightarrow:QL,longmapsto:eR,longrightarrow:tR,LongRightArrow:rR,Longrightarrow:nR,looparrowleft:iR,looparrowright:aR,lopar:oR,Lopf:sR,lopf:lR,loplus:uR,lotimes:cR,lowast:fR,lowbar:dR,LowerLeftArrow:hR,LowerRightArrow:pR,loz:vR,lozenge:mR,lozf:gR,lpar:yR,lparlt:bR,lrarr:kR,lrcorner:wR,lrhar:CR,lrhard:TR,lrm:SR,lrtri:xR,lsaquo:ER,lscr:MR,Lscr:AR,lsh:OR,Lsh:NR,lsim:DR,lsime:LR,lsimg:RR,lsqb:IR,lsquo:PR,lsquor:BR,Lstrok:FR,lstrok:qR,ltcc:HR,ltcir:_R,lt:zR,LT:VR,Lt:UR,ltdot:$R,lthree:WR,ltimes:jR,ltlarr:GR,ltquest:KR,ltri:JR,ltrie:YR,ltrif:XR,ltrPar:ZR,lurdshar:QR,luruhar:eI,lvertneqq:tI,lvnE:rI,macr:nI,male:iI,malt:aI,maltese:oI,Map:"⤅",map:sI,mapsto:lI,mapstodown:uI,mapstoleft:cI,mapstoup:fI,marker:dI,mcomma:hI,Mcy:pI,mcy:vI,mdash:mI,mDDot:gI,measuredangle:yI,MediumSpace:bI,Mellintrf:kI,Mfr:wI,mfr:CI,mho:TI,micro:SI,midast:xI,midcir:EI,mid:MI,middot:AI,minusb:OI,minus:NI,minusd:DI,minusdu:LI,MinusPlus:RI,mlcp:II,mldr:PI,mnplus:BI,models:FI,Mopf:qI,mopf:HI,mp:_I,mscr:zI,Mscr:VI,mstpos:UI,Mu:$I,mu:WI,multimap:jI,mumap:GI,nabla:KI,Nacute:JI,nacute:YI,nang:XI,nap:ZI,napE:QI,napid:eP,napos:tP,napprox:rP,natural:nP,naturals:iP,natur:aP,nbsp:oP,nbump:sP,nbumpe:lP,ncap:uP,Ncaron:cP,ncaron:fP,Ncedil:dP,ncedil:hP,ncong:pP,ncongdot:vP,ncup:mP,Ncy:gP,ncy:yP,ndash:bP,nearhk:kP,nearr:wP,neArr:CP,nearrow:TP,ne:SP,nedot:xP,NegativeMediumSpace:EP,NegativeThickSpace:MP,NegativeThinSpace:AP,NegativeVeryThinSpace:OP,nequiv:NP,nesear:DP,nesim:LP,NestedGreaterGreater:RP,NestedLessLess:IP,NewLine:PP,nexist:BP,nexists:FP,Nfr:qP,nfr:HP,ngE:_P,nge:zP,ngeq:VP,ngeqq:UP,ngeqslant:$P,nges:WP,nGg:jP,ngsim:GP,nGt:KP,ngt:JP,ngtr:YP,nGtv:XP,nharr:ZP,nhArr:QP,nhpar:eB,ni:tB,nis:rB,nisd:nB,niv:iB,NJcy:aB,njcy:oB,nlarr:sB,nlArr:lB,nldr:uB,nlE:cB,nle:fB,nleftarrow:dB,nLeftarrow:hB,nleftrightarrow:pB,nLeftrightarrow:vB,nleq:mB,nleqq:gB,nleqslant:yB,nles:bB,nless:kB,nLl:wB,nlsim:CB,nLt:TB,nlt:SB,nltri:xB,nltrie:EB,nLtv:MB,nmid:AB,NoBreak:OB,NonBreakingSpace:NB,nopf:DB,Nopf:LB,Not:RB,not:IB,NotCongruent:PB,NotCupCap:BB,NotDoubleVerticalBar:FB,NotElement:qB,NotEqual:HB,NotEqualTilde:_B,NotExists:zB,NotGreater:VB,NotGreaterEqual:UB,NotGreaterFullEqual:$B,NotGreaterGreater:WB,NotGreaterLess:jB,NotGreaterSlantEqual:GB,NotGreaterTilde:KB,NotHumpDownHump:JB,NotHumpEqual:YB,notin:XB,notindot:ZB,notinE:QB,notinva:eF,notinvb:tF,notinvc:rF,NotLeftTriangleBar:nF,NotLeftTriangle:iF,NotLeftTriangleEqual:aF,NotLess:oF,NotLessEqual:sF,NotLessGreater:lF,NotLessLess:uF,NotLessSlantEqual:cF,NotLessTilde:fF,NotNestedGreaterGreater:dF,NotNestedLessLess:hF,notni:pF,notniva:vF,notnivb:mF,notnivc:gF,NotPrecedes:yF,NotPrecedesEqual:bF,NotPrecedesSlantEqual:kF,NotReverseElement:wF,NotRightTriangleBar:CF,NotRightTriangle:TF,NotRightTriangleEqual:SF,NotSquareSubset:xF,NotSquareSubsetEqual:EF,NotSquareSuperset:MF,NotSquareSupersetEqual:AF,NotSubset:OF,NotSubsetEqual:NF,NotSucceeds:DF,NotSucceedsEqual:LF,NotSucceedsSlantEqual:RF,NotSucceedsTilde:IF,NotSuperset:PF,NotSupersetEqual:BF,NotTilde:FF,NotTildeEqual:qF,NotTildeFullEqual:HF,NotTildeTilde:_F,NotVerticalBar:zF,nparallel:VF,npar:UF,nparsl:$F,npart:WF,npolint:jF,npr:GF,nprcue:KF,nprec:JF,npreceq:YF,npre:XF,nrarrc:ZF,nrarr:QF,nrArr:eq,nrarrw:tq,nrightarrow:rq,nRightarrow:nq,nrtri:iq,nrtrie:aq,nsc:oq,nsccue:sq,nsce:lq,Nscr:uq,nscr:cq,nshortmid:fq,nshortparallel:dq,nsim:hq,nsime:pq,nsimeq:vq,nsmid:mq,nspar:gq,nsqsube:yq,nsqsupe:bq,nsub:kq,nsubE:wq,nsube:Cq,nsubset:Tq,nsubseteq:Sq,nsubseteqq:xq,nsucc:Eq,nsucceq:Mq,nsup:Aq,nsupE:Oq,nsupe:Nq,nsupset:Dq,nsupseteq:Lq,nsupseteqq:Rq,ntgl:Iq,Ntilde:Pq,ntilde:Bq,ntlg:Fq,ntriangleleft:qq,ntrianglelefteq:Hq,ntriangleright:_q,ntrianglerighteq:zq,Nu:Vq,nu:Uq,num:$q,numero:Wq,numsp:jq,nvap:Gq,nvdash:Kq,nvDash:Jq,nVdash:Yq,nVDash:Xq,nvge:Zq,nvgt:Qq,nvHarr:eH,nvinfin:tH,nvlArr:rH,nvle:nH,nvlt:iH,nvltrie:aH,nvrArr:oH,nvrtrie:sH,nvsim:lH,nwarhk:uH,nwarr:cH,nwArr:fH,nwarrow:dH,nwnear:hH,Oacute:pH,oacute:vH,oast:mH,Ocirc:gH,ocirc:yH,ocir:bH,Ocy:kH,ocy:wH,odash:CH,Odblac:TH,odblac:SH,odiv:xH,odot:EH,odsold:MH,OElig:AH,oelig:OH,ofcir:NH,Ofr:DH,ofr:LH,ogon:RH,Ograve:IH,ograve:PH,ogt:BH,ohbar:FH,ohm:qH,oint:HH,olarr:_H,olcir:zH,olcross:VH,oline:UH,olt:$H,Omacr:WH,omacr:jH,Omega:GH,omega:KH,Omicron:JH,omicron:YH,omid:XH,ominus:ZH,Oopf:QH,oopf:e_,opar:t_,OpenCurlyDoubleQuote:r_,OpenCurlyQuote:n_,operp:i_,oplus:a_,orarr:o_,Or:s_,or:l_,ord:u_,order:c_,orderof:f_,ordf:d_,ordm:h_,origof:p_,oror:v_,orslope:m_,orv:g_,oS:y_,Oscr:b_,oscr:k_,Oslash:w_,oslash:C_,osol:T_,Otilde:S_,otilde:x_,otimesas:E_,Otimes:M_,otimes:A_,Ouml:O_,ouml:N_,ovbar:D_,OverBar:L_,OverBrace:R_,OverBracket:I_,OverParenthesis:P_,para:B_,parallel:F_,par:q_,parsim:H_,parsl:__,part:z_,PartialD:V_,Pcy:U_,pcy:$_,percnt:W_,period:j_,permil:G_,perp:K_,pertenk:J_,Pfr:Y_,pfr:X_,Phi:Z_,phi:Q_,phiv:ez,phmmat:tz,phone:rz,Pi:nz,pi:iz,pitchfork:az,piv:oz,planck:sz,planckh:lz,plankv:uz,plusacir:cz,plusb:fz,pluscir:dz,plus:hz,plusdo:pz,plusdu:vz,pluse:mz,PlusMinus:gz,plusmn:yz,plussim:bz,plustwo:kz,pm:wz,Poincareplane:Cz,pointint:Tz,popf:Sz,Popf:xz,pound:Ez,prap:Mz,Pr:Az,pr:Oz,prcue:Nz,precapprox:Dz,prec:Lz,preccurlyeq:Rz,Precedes:Iz,PrecedesEqual:Pz,PrecedesSlantEqual:Bz,PrecedesTilde:Fz,preceq:qz,precnapprox:Hz,precneqq:_z,precnsim:zz,pre:Vz,prE:Uz,precsim:$z,prime:Wz,Prime:jz,primes:Gz,prnap:Kz,prnE:Jz,prnsim:Yz,prod:Xz,Product:Zz,profalar:Qz,profline:eV,profsurf:tV,prop:rV,Proportional:nV,Proportion:iV,propto:aV,prsim:oV,prurel:sV,Pscr:lV,pscr:uV,Psi:cV,psi:fV,puncsp:dV,Qfr:hV,qfr:pV,qint:vV,qopf:mV,Qopf:gV,qprime:yV,Qscr:bV,qscr:kV,quaternions:wV,quatint:CV,quest:TV,questeq:SV,quot:xV,QUOT:EV,rAarr:MV,race:AV,Racute:OV,racute:NV,radic:DV,raemptyv:LV,rang:RV,Rang:IV,rangd:PV,range:BV,rangle:FV,raquo:qV,rarrap:HV,rarrb:_V,rarrbfs:zV,rarrc:VV,rarr:UV,Rarr:$V,rArr:WV,rarrfs:jV,rarrhk:GV,rarrlp:KV,rarrpl:JV,rarrsim:YV,Rarrtl:XV,rarrtl:ZV,rarrw:QV,ratail:e2,rAtail:t2,ratio:r2,rationals:n2,rbarr:i2,rBarr:a2,RBarr:o2,rbbrk:s2,rbrace:l2,rbrack:u2,rbrke:c2,rbrksld:f2,rbrkslu:d2,Rcaron:h2,rcaron:p2,Rcedil:v2,rcedil:m2,rceil:g2,rcub:y2,Rcy:b2,rcy:k2,rdca:w2,rdldhar:C2,rdquo:T2,rdquor:S2,rdsh:x2,real:E2,realine:M2,realpart:A2,reals:O2,Re:N2,rect:D2,reg:L2,REG:R2,ReverseElement:I2,ReverseEquilibrium:P2,ReverseUpEquilibrium:B2,rfisht:F2,rfloor:q2,rfr:H2,Rfr:_2,rHar:z2,rhard:V2,rharu:U2,rharul:$2,Rho:W2,rho:j2,rhov:G2,RightAngleBracket:K2,RightArrowBar:J2,rightarrow:Y2,RightArrow:X2,Rightarrow:Z2,RightArrowLeftArrow:Q2,rightarrowtail:eU,RightCeiling:tU,RightDoubleBracket:rU,RightDownTeeVector:nU,RightDownVectorBar:iU,RightDownVector:aU,RightFloor:oU,rightharpoondown:sU,rightharpoonup:lU,rightleftarrows:uU,rightleftharpoons:cU,rightrightarrows:fU,rightsquigarrow:dU,RightTeeArrow:hU,RightTee:pU,RightTeeVector:vU,rightthreetimes:mU,RightTriangleBar:gU,RightTriangle:yU,RightTriangleEqual:bU,RightUpDownVector:kU,RightUpTeeVector:wU,RightUpVectorBar:CU,RightUpVector:TU,RightVectorBar:SU,RightVector:xU,ring:EU,risingdotseq:MU,rlarr:AU,rlhar:OU,rlm:NU,rmoustache:DU,rmoust:LU,rnmid:RU,roang:IU,roarr:PU,robrk:BU,ropar:FU,ropf:qU,Ropf:HU,roplus:_U,rotimes:zU,RoundImplies:VU,rpar:UU,rpargt:$U,rppolint:WU,rrarr:jU,Rrightarrow:GU,rsaquo:KU,rscr:JU,Rscr:YU,rsh:XU,Rsh:ZU,rsqb:QU,rsquo:e$,rsquor:t$,rthree:r$,rtimes:n$,rtri:i$,rtrie:a$,rtrif:o$,rtriltri:s$,RuleDelayed:l$,ruluhar:u$,rx:c$,Sacute:f$,sacute:d$,sbquo:h$,scap:p$,Scaron:v$,scaron:m$,Sc:g$,sc:y$,sccue:b$,sce:k$,scE:w$,Scedil:C$,scedil:T$,Scirc:S$,scirc:x$,scnap:E$,scnE:M$,scnsim:A$,scpolint:O$,scsim:N$,Scy:D$,scy:L$,sdotb:R$,sdot:I$,sdote:P$,searhk:B$,searr:F$,seArr:q$,searrow:H$,sect:_$,semi:z$,seswar:V$,setminus:U$,setmn:$$,sext:W$,Sfr:j$,sfr:G$,sfrown:K$,sharp:J$,SHCHcy:Y$,shchcy:X$,SHcy:Z$,shcy:Q$,ShortDownArrow:eW,ShortLeftArrow:tW,shortmid:rW,shortparallel:nW,ShortRightArrow:iW,ShortUpArrow:aW,shy:oW,Sigma:sW,sigma:lW,sigmaf:uW,sigmav:cW,sim:fW,simdot:dW,sime:hW,simeq:pW,simg:vW,simgE:mW,siml:gW,simlE:yW,simne:bW,simplus:kW,simrarr:wW,slarr:CW,SmallCircle:TW,smallsetminus:SW,smashp:xW,smeparsl:EW,smid:MW,smile:AW,smt:OW,smte:NW,smtes:DW,SOFTcy:LW,softcy:RW,solbar:IW,solb:PW,sol:BW,Sopf:FW,sopf:qW,spades:HW,spadesuit:_W,spar:zW,sqcap:VW,sqcaps:UW,sqcup:$W,sqcups:WW,Sqrt:jW,sqsub:GW,sqsube:KW,sqsubset:JW,sqsubseteq:YW,sqsup:XW,sqsupe:ZW,sqsupset:QW,sqsupseteq:e3,square:t3,Square:r3,SquareIntersection:n3,SquareSubset:i3,SquareSubsetEqual:a3,SquareSuperset:o3,SquareSupersetEqual:s3,SquareUnion:l3,squarf:u3,squ:c3,squf:f3,srarr:d3,Sscr:h3,sscr:p3,ssetmn:v3,ssmile:m3,sstarf:g3,Star:y3,star:b3,starf:k3,straightepsilon:w3,straightphi:C3,strns:T3,sub:S3,Sub:x3,subdot:E3,subE:M3,sube:A3,subedot:O3,submult:N3,subnE:D3,subne:L3,subplus:R3,subrarr:I3,subset:P3,Subset:B3,subseteq:F3,subseteqq:q3,SubsetEqual:H3,subsetneq:_3,subsetneqq:z3,subsim:V3,subsub:U3,subsup:$3,succapprox:W3,succ:j3,succcurlyeq:G3,Succeeds:K3,SucceedsEqual:J3,SucceedsSlantEqual:Y3,SucceedsTilde:X3,succeq:Z3,succnapprox:Q3,succneqq:ej,succnsim:tj,succsim:rj,SuchThat:nj,sum:ij,Sum:aj,sung:oj,sup1:sj,sup2:lj,sup3:uj,sup:cj,Sup:fj,supdot:dj,supdsub:hj,supE:pj,supe:vj,supedot:mj,Superset:gj,SupersetEqual:yj,suphsol:bj,suphsub:kj,suplarr:wj,supmult:Cj,supnE:Tj,supne:Sj,supplus:xj,supset:Ej,Supset:Mj,supseteq:Aj,supseteqq:Oj,supsetneq:Nj,supsetneqq:Dj,supsim:Lj,supsub:Rj,supsup:Ij,swarhk:Pj,swarr:Bj,swArr:Fj,swarrow:qj,swnwar:Hj,szlig:_j,Tab:zj,target:Vj,Tau:Uj,tau:$j,tbrk:Wj,Tcaron:jj,tcaron:Gj,Tcedil:Kj,tcedil:Jj,Tcy:Yj,tcy:Xj,tdot:Zj,telrec:Qj,Tfr:eG,tfr:tG,there4:rG,therefore:nG,Therefore:iG,Theta:aG,theta:oG,thetasym:sG,thetav:lG,thickapprox:uG,thicksim:cG,ThickSpace:fG,ThinSpace:dG,thinsp:hG,thkap:pG,thksim:vG,THORN:mG,thorn:gG,tilde:yG,Tilde:bG,TildeEqual:kG,TildeFullEqual:wG,TildeTilde:CG,timesbar:TG,timesb:SG,times:xG,timesd:EG,tint:MG,toea:AG,topbot:OG,topcir:NG,top:DG,Topf:LG,topf:RG,topfork:IG,tosa:PG,tprime:BG,trade:FG,TRADE:qG,triangle:HG,triangledown:_G,triangleleft:zG,trianglelefteq:VG,triangleq:UG,triangleright:$G,trianglerighteq:WG,tridot:jG,trie:GG,triminus:KG,TripleDot:JG,triplus:YG,trisb:XG,tritime:ZG,trpezium:QG,Tscr:eK,tscr:tK,TScy:rK,tscy:nK,TSHcy:iK,tshcy:aK,Tstrok:oK,tstrok:sK,twixt:lK,twoheadleftarrow:uK,twoheadrightarrow:cK,Uacute:fK,uacute:dK,uarr:hK,Uarr:pK,uArr:vK,Uarrocir:mK,Ubrcy:gK,ubrcy:yK,Ubreve:bK,ubreve:kK,Ucirc:wK,ucirc:CK,Ucy:TK,ucy:SK,udarr:xK,Udblac:EK,udblac:MK,udhar:AK,ufisht:OK,Ufr:NK,ufr:DK,Ugrave:LK,ugrave:RK,uHar:IK,uharl:PK,uharr:BK,uhblk:FK,ulcorn:qK,ulcorner:HK,ulcrop:_K,ultri:zK,Umacr:VK,umacr:UK,uml:$K,UnderBar:WK,UnderBrace:jK,UnderBracket:GK,UnderParenthesis:KK,Union:JK,UnionPlus:YK,Uogon:XK,uogon:ZK,Uopf:QK,uopf:e4,UpArrowBar:t4,uparrow:r4,UpArrow:n4,Uparrow:i4,UpArrowDownArrow:a4,updownarrow:o4,UpDownArrow:s4,Updownarrow:l4,UpEquilibrium:u4,upharpoonleft:c4,upharpoonright:f4,uplus:d4,UpperLeftArrow:h4,UpperRightArrow:p4,upsi:v4,Upsi:m4,upsih:g4,Upsilon:y4,upsilon:b4,UpTeeArrow:k4,UpTee:w4,upuparrows:C4,urcorn:T4,urcorner:S4,urcrop:x4,Uring:E4,uring:M4,urtri:A4,Uscr:O4,uscr:N4,utdot:D4,Utilde:L4,utilde:R4,utri:I4,utrif:P4,uuarr:B4,Uuml:F4,uuml:q4,uwangle:H4,vangrt:_4,varepsilon:z4,varkappa:V4,varnothing:U4,varphi:$4,varpi:W4,varpropto:j4,varr:G4,vArr:K4,varrho:J4,varsigma:Y4,varsubsetneq:X4,varsubsetneqq:Z4,varsupsetneq:Q4,varsupsetneqq:eJ,vartheta:tJ,vartriangleleft:rJ,vartriangleright:nJ,vBar:iJ,Vbar:aJ,vBarv:oJ,Vcy:sJ,vcy:lJ,vdash:uJ,vDash:cJ,Vdash:fJ,VDash:dJ,Vdashl:hJ,veebar:pJ,vee:vJ,Vee:mJ,veeeq:gJ,vellip:yJ,verbar:bJ,Verbar:kJ,vert:wJ,Vert:CJ,VerticalBar:TJ,VerticalLine:SJ,VerticalSeparator:xJ,VerticalTilde:EJ,VeryThinSpace:MJ,Vfr:AJ,vfr:OJ,vltri:NJ,vnsub:DJ,vnsup:LJ,Vopf:RJ,vopf:IJ,vprop:PJ,vrtri:BJ,Vscr:FJ,vscr:qJ,vsubnE:HJ,vsubne:_J,vsupnE:zJ,vsupne:VJ,Vvdash:UJ,vzigzag:$J,Wcirc:WJ,wcirc:jJ,wedbar:GJ,wedge:KJ,Wedge:JJ,wedgeq:YJ,weierp:XJ,Wfr:ZJ,wfr:QJ,Wopf:e8,wopf:t8,wp:r8,wr:n8,wreath:i8,Wscr:a8,wscr:o8,xcap:s8,xcirc:l8,xcup:u8,xdtri:c8,Xfr:f8,xfr:d8,xharr:h8,xhArr:p8,Xi:v8,xi:m8,xlarr:g8,xlArr:y8,xmap:b8,xnis:k8,xodot:w8,Xopf:C8,xopf:T8,xoplus:S8,xotime:x8,xrarr:E8,xrArr:M8,Xscr:A8,xscr:O8,xsqcup:N8,xuplus:D8,xutri:L8,xvee:R8,xwedge:I8,Yacute:P8,yacute:B8,YAcy:F8,yacy:q8,Ycirc:H8,ycirc:_8,Ycy:z8,ycy:V8,yen:U8,Yfr:$8,yfr:W8,YIcy:j8,yicy:G8,Yopf:K8,yopf:J8,Yscr:Y8,yscr:X8,YUcy:Z8,yucy:Q8,yuml:e5,Yuml:t5,Zacute:r5,zacute:n5,Zcaron:i5,zcaron:a5,Zcy:o5,zcy:s5,Zdot:l5,zdot:u5,zeetrf:c5,ZeroWidthSpace:f5,Zeta:d5,zeta:h5,zfr:p5,Zfr:v5,ZHcy:m5,zhcy:g5,zigrarr:y5,zopf:b5,Zopf:k5,Zscr:w5,zscr:C5,zwj:T5,zwnj: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="é",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={Aacute:x5,aacute:E5,Acirc:M5,acirc:A5,acute:O5,AElig:N5,aelig:D5,Agrave:L5,agrave:R5,amp:I5,AMP:P5,Aring:B5,aring:F5,Atilde:q5,atilde:H5,Auml:_5,auml:z5,brvbar:V5,Ccedil:U5,ccedil:$5,cedil:W5,cent:j5,copy:G5,COPY:K5,curren:J5,deg:Y5,divide:X5,Eacute:Z5,eacute:Q5,Ecirc:e9,ecirc:t9,Egrave:r9,egrave:n9,ETH:i9,eth:a9,Euml:o9,euml:s9,frac12:l9,frac14:u9,frac34:c9,gt:f9,GT:d9,Iacute:h9,iacute:p9,Icirc:v9,icirc:m9,iexcl:g9,Igrave:y9,igrave:b9,iquest:k9,Iuml:w9,iuml:C9,laquo:T9,lt:S9,LT:x9,macr:E9,micro:M9,middot:A9,nbsp:O9,not:N9,Ntilde:D9,ntilde:L9,Oacute:R9,oacute:I9,Ocirc:P9,ocirc:B9,Ograve:F9,ograve:q9,ordf:H9,ordm:_9,Oslash:z9,oslash:V9,Otilde:U9,otilde:$9,Ouml:W9,ouml:j9,para:G9,plusmn:K9,pound:J9,quot:Y9,QUOT:X9,raquo:Z9,reg:Q9,REG:e6,sect:t6,shy:r6,sup1:n6,sup2:i6,sup3:a6,szlig:o6,THORN:s6,thorn:l6,times:u6,Uacute:c6,uacute:f6,Ucirc:d6,ucirc:h6,Ugrave:p6,ugrave:v6,uml:m6,Uuml:g6,uuml:y6,Yacute:b6,yacute:k6,yen:w6,yuml:C6},S6="&",x6="'",E6=">",M6="<",A6='"',Zh={amp:S6,apos:x6,gt:E6,lt:M6,quot:A6},$c={},O6={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},N6=z&&z.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty($c,"__esModule",{value:!0});var Qh=N6(O6),D6=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 L6(h){return h>=55296&&h<=57343||h>1114111?"�":(h in Qh.default&&(h=Qh.default[h]),D6(h))}$c.default=L6;var vl=z&&z.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(he,"__esModule",{value:!0}),he.decodeHTML=he.decodeHTMLStrict=he.decodeXML=void 0;var Wc=vl(Xh),R6=vl(T6),I6=vl(Zh),ep=vl($c),P6=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;he.decodeXML=tp(I6.default),he.decodeHTMLStrict=tp(Wc.default);function tp(h){var d=np(h);return function(y){return String(y).replace(P6,d)}}var rp=function(h,d){return h<d?1:-1};he.decodeHTML=function(){for(var h=Object.keys(R6.default).sort(rp),d=Object.keys(Wc.default).sort(rp),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=np(Wc.default);function G(ee){return ee.substr(-1)!==";"&&(ee+=";"),U(ee)}return function(ee){return String(ee).replace(L,G)}}();function np(h){return function(y){if(y.charAt(1)==="#"){var S=y.charAt(2);return S==="X"||S==="x"?ep.default(parseInt(y.substr(3),16)):ep.default(parseInt(y.substr(2),10))}return h[y.slice(1,-1)]||y}}var kn={},ip=z&&z.__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 B6=ip(Zh),ap=sp(B6.default),op=lp(ap);kn.encodeXML=fp(ap);var F6=ip(Xh),jc=sp(F6.default),q6=lp(jc);kn.encodeHTML=_6(jc,q6),kn.encodeNonAsciiHTML=fp(jc);function sp(h){return Object.keys(h).sort().reduce(function(d,y){return d[h[y]]="&"+y+";",d},{})}function lp(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 ee=G;ee<d.length-1&&d[ee].charCodeAt(1)+1===d[ee+1].charCodeAt(1);)ee+=1;var Se=1+ee-G;Se<3||d.splice(G,Se,d[G]+"-"+d[ee])}return y.unshift("["+d.join("")+"]"),new RegExp(y.join("|"),"g")}var up=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,H6=String.prototype.codePointAt!=null?function(h){return h.codePointAt(0)}:function(h){return(h.charCodeAt(0)-55296)*1024+h.charCodeAt(1)-56320+65536};function ml(h){return"&#x"+(h.length>1?H6(h):h.charCodeAt(0)).toString(16).toUpperCase()+";"}function _6(h,d){return function(y){return y.replace(d,function(S){return h[S]}).replace(up,ml)}}var cp=new RegExp(op.source+"|"+up.source,"g");function z6(h){return h.replace(cp,ml)}kn.escape=z6;function V6(h){return h.replace(op,ml)}kn.escapeUTF8=V6;function fp(h){return function(d){return d.replace(cp,function(y){return h[y]||ml(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=he,y=kn;function S(Se,Ae){return(!Ae||Ae<=0?d.decodeXML:d.decodeHTML)(Se)}h.decode=S;function L(Se,Ae){return(!Ae||Ae<=0?d.decodeXML:d.decodeHTMLStrict)(Se)}h.decodeStrict=L;function U(Se,Ae){return(!Ae||Ae<=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 ee=he;Object.defineProperty(h,"decodeXML",{enumerable:!0,get:function(){return ee.decodeXML}}),Object.defineProperty(h,"decodeHTML",{enumerable:!0,get:function(){return ee.decodeHTML}}),Object.defineProperty(h,"decodeHTMLStrict",{enumerable:!0,get:function(){return ee.decodeHTMLStrict}}),Object.defineProperty(h,"decodeHTML4",{enumerable:!0,get:function(){return ee.decodeHTML}}),Object.defineProperty(h,"decodeHTML5",{enumerable:!0,get:function(){return ee.decodeHTML}}),Object.defineProperty(h,"decodeHTML4Strict",{enumerable:!0,get:function(){return ee.decodeHTMLStrict}}),Object.defineProperty(h,"decodeHTML5Strict",{enumerable:!0,get:function(){return ee.decodeHTMLStrict}}),Object.defineProperty(h,"decodeXMLStrict",{enumerable:!0,get:function(){return ee.decodeXML}})})(re);var dp="&(?:#x[a-f0-9]{1,6}|#[0-9]{1,7}|[a-z][a-z0-9]{1,31});",U6=92,$6=/[\\&]/,Gc="[!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]",W6=new RegExp("\\\\"+Gc+"|"+dp,"gi"),j6='[&<>"]',hp=new RegExp(j6,"g"),G6=function(h){return h.charCodeAt(0)===U6?h.charAt(1):re.decodeHTML(h)};function ss(h){return $6.test(h)?h.replace(W6,G6):h}function gl(h){try{return le(h)}catch{return h}}function K6(h){switch(h){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";default:return h}}function po(h){return hp.test(h)?h.replace(hp,K6):h}function Kc(h,d){for(var y=[],S=0;S<d;S++)y.push(h);return y.join("")}function pp(h){return h?!/[^ \t]+/.test(h):!0}var J6=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=Jc(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 Jc(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 Y6=1,yl={};function X6(h){return yl[h]}function Yc(h){delete yl[h]}function Z6(){yl={}}var ls=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=Y6++,this.type=d,this.sourcepos=y,yl[this.id]=this}return h.prototype.isContainer=function(){return Jc(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 J6(this)},h}(),ki=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}(ls),Q6=function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.listData=null,y}return d}(ki),eY=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}(ki),tY=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}(ki),rY=function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.columns=[],y}return d}(ki),nY=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}(ki),iY=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}(ki),aY=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}(ki),oY=function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.htmlBlockType=-1,y}return d}(ki),sY=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}(ls),lY=function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.tickCount=0,y}return d}(ls),uY=function(h){E(d,h);function d(){var y=h!==null&&h.apply(this,arguments)||this;return y.info="",y}return d}(ls);function ir(h,d){switch(h){case"heading":return new eY(h,d);case"list":case"item":return new Q6(h,d);case"link":case"image":return new sY(h,d);case"codeBlock":return new tY(h,d);case"htmlBlock":return new oY(h,d);case"table":return new rY(h,d);case"tableCell":return new nY(h,d);case"document":case"paragraph":case"blockQuote":case"thematicBreak":case"tableRow":case"tableBody":case"tableHead":case"frontMatter":return new ki(h,d);case"code":return new lY(h,d);case"refDef":return new iY(h,d);case"customBlock":return new aY(h,d);case"customInline":return new uY(h,d);default:return new ls(h,d)}}function vp(h){return h.type==="codeBlock"}function cY(h){return h.type==="htmlBlock"}function fY(h){return h.type==="heading"}function mp(h){return h.type==="list"}function dY(h){return h.type==="table"}function vo(h){return h.type==="refDef"}function gp(h){return h.type==="customBlock"}function hY(h){return h.type==="customInline"}function gr(h,d){var y=ir("text",d);return y.literal=h,y}var yp="[A-Za-z][A-Za-z0-9-]*",pY="[a-zA-Z_:][a-zA-Z0-9:._-]*",vY="[^\"'=<>`\\x00-\\x20]+",mY="'[^']*'",gY='"[^"]*"',yY="(?:"+vY+"|"+mY+"|"+gY+")",bY="(?:\\s*=\\s*"+yY+")",kY="(?:\\s+"+pY+bY+"?)",bp="<"+yp+kY+"*\\s*/?>",kp="</"+yp+"\\s*[>]",wY="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",CY="[<][?].*?[?][>]",TY="<![A-Z]+\\s+[^>]*>",SY="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",xY="(?:"+bp+"|"+kp+"|"+wY+"|"+CY+"|"+TY+"|"+SY+")",EY=new RegExp("^"+xY,"i");/*! http://mths.be/fromcodepoint v0.2.1 by @mathias */var Xc;if(String.fromCodePoint)Xc=function(h){try{return String.fromCodePoint(h)}catch(d){if(d instanceof RangeError)return"�";throw d}};else{var MY=String.fromCharCode,AY=Math.floor;Xc=function(){for(var h=[],d=0;d<arguments.length;d++)h[d]=arguments[d];var y=16384,S=[],L,U,G=-1,ee=h.length;if(!ee)return"";for(var Se="";++G<ee;){var Ae=Number(h[G]);if(!isFinite(Ae)||Ae<0||Ae>1114111||AY(Ae)!==Ae)return"�";Ae<=65535?S.push(Ae):(Ae-=65536,L=(Ae>>10)+55296,U=Ae%1024+56320,S.push(L,U)),(G+1===ee||S.length>y)&&(Se+=MY.apply(void 0,S),S.length=0)}return Se}}var Zc=Xc,OY="(?:[w-]+.)*[A-Za-z0-9-]+.[A-Za-z0-9-]+",NY="[^<\\s]*[^<?!.,:*_?~\\s]",DY="[\\w.+-]+@(?:[\\w-]+\\.)+[\\w-]+";function LY(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 RY(h){return h.replace(/&[A-Za-z0-9]+;$/,"")}function IY(h){for(var d=new RegExp(DY,"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 PY(h){for(var d=new RegExp("(www|https?://)."+OY+NY,"g"),y=[],S;S=d.exec(h);){var L=RY(LY(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 BY(h){return F(F([],PY(h)),IY(h)).sort(function(d,y){return d.range[0]-y.range[0]})}function FY(h,d){typeof d=="boolean"&&(d=BY);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,ee=d(G);if(!ee||!ee.length)return"continue";for(var Se=0,Ae=U.sourcepos[0],Ve=Ae[0],je=Ae[1],qe=function(Si,GZ){return[[Ve,je+Si],[Ve,je+GZ]]},rt=[],et=0,Lt=ee;et<Lt.length;et++){var ar=Lt[et],Cr=ar.range,wi=ar.url,In=ar.text;Cr[0]>Se&&rt.push(gr(G.substring(Se,Cr[0]),qe(Se,Cr[0]-1)));var Cn=ir("link",qe.apply(void 0,Cr));Cn.appendChild(gr(In,qe.apply(void 0,Cr))),Cn.destination=wi,Cn.extendedAutolink=!0,rt.push(Cn),Se=Cr[1]+1}Se<G.length&&rt.push(gr(G.substring(Se),qe(Se,G.length-1)));for(var Vn=0,Ci=rt;Vn<Ci.length;Vn++){var Ti=Ci[Vn];U.insertBefore(Ti)}U.unlink()}};y=h.next();)S()}function bl(h){return h[h.length-1]}function wp(h){return h.slice(1,h.length-1).trim().replace(/[ \t\r\n]+/," ").toLowerCase().toUpperCase()}function kl(h,d){Object.keys(h).forEach(function(y){d(y,h[y])})}function qY(h){for(var d=[],y=1;y<arguments.length;y++)d[y-1]=arguments[y];var S=P({},h);return d.forEach(function(L){delete S[L]}),S}function mo(h){return!Object.keys(h).length}function HY(h){Object.keys(h).forEach(function(d){delete h[d]})}var Qc=10,ef=42,wl=95,_Y=96,Cp=91,zY=93,Cl=126,Tp=60,VY=33,Sp=92,UY=38,xp=40,tf=41,$Y=58,xa=39,Ea=34,Ma=36,rf="\\\\"+Gc,Ep=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]/),WY=new RegExp('^(?:"('+rf+'|[^"\\x00])*"|'+("'("+rf+"|[^'\\x00])*'")+"|"+("\\(("+rf+"|[^()\\x00])*\\))")),jY=/^(?:<(?:[^<>\n\\\x00]|\\.)*>)/,Mp=new RegExp("^"+Gc),GY=new RegExp("^"+dp,"i"),KY=/`+/,JY=/^`+/,YY=/\.\.\./g,XY=/--+/g,ZY=/^<([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])?)*)>/,QY=/^<[A-Za-z][A-Za-z0-9.+-]{1,31}:[^<>\x00-\x20]*>/i,e7=/^ *(?:\n *)?/,nf=/^[ \t\n\x0b\x0c\x0d]/,Ap=/^\s/,t7=/ *$/,r7=/^ */,Op=/^ *(?:\n|$)/,n7=/^\[(?:[^\\\[\]]|\\.){0,1000}\]/,i7=/^[^\n`\[\]\\!<&*_'"~$]+/m,a7=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(e7),!0},h.prototype.parseBackticks=function(d){var y=this.pos+1,S=this.match(JY);if(S===null)return!1;for(var L=this.pos,U;(U=this.match(KY))!==null;)if(U===S){var G=this.subject.slice(L,this.pos-S.length),ee=this.sourcepos(y,this.pos),Se=G.split(`
|
|
702
|
-
`);if(Se.length>1){var Ae=bl(Se);this.lineIdx+=Se.length-1,this.linePosOffset=-(this.pos-Ae.length-S.length),ee[1]=this.sourcepos(this.pos),G=Se.join(" ")}var Ve=ir("code",ee);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(gr(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()===Qc?(this.pos+=1,S=ir("linebreak",this.sourcepos(this.pos-1,this.pos)),d.appendChild(S),this.nextLine()):Mp.test(y.charAt(this.pos))?(d.appendChild(gr(y.charAt(this.pos),this.sourcepos(L,this.pos))),this.pos+=1):d.appendChild(gr("\\",this.sourcepos(L,L))),!0},h.prototype.parseAutolink=function(d){var y,S,L,U=this.pos+1;return(y=this.match(ZY))?(S=y.slice(1,y.length-1),L=ir("link",this.sourcepos(U,this.pos)),L.destination=gl("mailto:"+S),L.title="",L.appendChild(gr(S,this.sourcepos(U+1,this.pos-1))),d.appendChild(L),!0):(y=this.match(QY))?(S=y.slice(1,y.length-1),L=ir("link",this.sourcepos(U,this.pos)),L.destination=gl(S),L.title="",L.appendChild(gr(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(EY);if(S===null)return!1;var L=ir("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===xa||d===Ea)y++,this.pos++;else for(;this.peek()===d;)y++,this.pos++;if(y===0||y<2&&(d===Cl||d===Ma))return this.pos=S,null;var L=S===0?`
|
|
703
|
-
`:this.subject.charAt(S-1),U=this.peek(),G;U===-1?G=`
|
|
704
|
-
`:G=Zc(U);var ee=Ap.test(G),Se=Ep.test(G),Ae=Ap.test(L),Ve=Ep.test(L),je=!ee&&(!Se||Ae||Ve),qe=!Ae&&(!Ve||ee||Se),rt,et;return d===wl?(rt=je&&(!qe||Ve),et=qe&&(!je||Se)):d===xa||d===Ea?(rt=je&&!qe,et=qe):d===Ma?(rt=!ee,et=!Ae):(rt=je,et=qe),this.pos=S,{numdelims:y,canOpen:rt,canClose:et}},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===xa?G="’":d===Ea?G="“":G=this.subject.slice(U-1,this.pos);var ee=gr(G,this.sourcepos(U,this.pos));return y.appendChild(ee),(S.canOpen||S.canClose)&&(this.options.smart||d!==xa&&d!==Ea)&&(this.delimiters={cc:d,numdelims:L,origdelims:L,node:ee,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,ee,Se,Ae=!1,Ve=(y={},y[wl]=[d,d,d],y[ef]=[d,d,d],y[xa]=[d],y[Ea]=[d],y[Cl]=[d],y[Ma]=[d],y);for(L=this.delimiters;L!==null&&L.previous!==d;)L=L.previous;for(;L!==null;){var je=L.cc,qe=je===wl||je===ef;if(!L.canClose)L=L.next;else{for(S=L.previous,Se=!1;S!==null&&S!==d&&S!==Ve[je][qe?L.origdelims%3:0];){if(Ae=qe&&(L.canOpen||S.canClose)&&L.origdelims%3!==0&&(S.origdelims+L.origdelims)%3===0,S.cc===L.cc&&S.canOpen&&!Ae){Se=!0;break}S=S.previous}if(U=L,qe||je===Cl||je===Ma){if(!Se)L=L.next;else if(S){var rt=L.numdelims>=2&&S.numdelims>=2?2:1,et=qe?0:1;G=S.node,ee=L.node;var Lt=qe?rt===1?"emph":"strong":"strike";je===Ma&&(Lt="customInline");var ar=ir(Lt),Cr=G.sourcepos[1],wi=ee.sourcepos[0];ar.sourcepos=[[Cr[0],Cr[1]-rt+1],[wi[0],wi[1]+rt-1]],G.sourcepos[1][1]-=rt,ee.sourcepos[0][1]+=rt,G.literal=G.literal.slice(rt),ee.literal=ee.literal.slice(rt),S.numdelims-=rt,L.numdelims-=rt;for(var In=G.next,Cn=void 0;In&&In!==ee;)Cn=In.next,In.unlink(),ar.appendChild(In),In=Cn;if(je===Ma){var Vn=ar.firstChild,Ci=Vn.literal||"",Ti=Ci.split(/\s/)[0];ar.info=Ti,Ci.length<=Ti.length?Vn.unlink():(Vn.sourcepos[0][1]+=Ti.length,Vn.literal=Ci.replace(Ti+" ",""))}if(G.insertAfter(ar),this.removeDelimitersBetween(S,L),S.numdelims<=et&&(S.numdelims===0&&G.unlink(),this.removeDelimiter(S)),L.numdelims<=et){L.numdelims===0&&ee.unlink();var Si=L.next;this.removeDelimiter(L),L=Si}}}else je===xa?(L.node.literal="’",Se&&(S.node.literal="‘"),L=L.next):je===Ea&&(L.node.literal="”",Se&&(S.node.literal="“"),L=L.next);Se||(Ve[je][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(WY);return d===null?null:ss(d.substr(1,d.length-2))},h.prototype.parseLinkDestination=function(){var d=this.match(jY);if(d===null){if(this.peek()===Tp)return null;for(var y=this.pos,S=0,L=void 0;(L=this.peek())!==-1;)if(L===Sp&&Mp.test(this.subject.charAt(this.pos+1)))this.pos+=1,this.peek()!==-1&&(this.pos+=1);else if(L===xp)this.pos+=1,S+=1;else if(L===tf){if(S<1)break;this.pos+=1,S-=1}else{if(nf.exec(Zc(L))!==null)break;this.pos+=1}return this.pos===y&&L!==tf||S!==0?null:(d=this.subject.substr(y,this.pos-y),gl(ss(d)))}return gl(ss(d.substr(1,d.length-2)))},h.prototype.parseLinkLabel=function(){var d=this.match(n7);return d===null||d.length>1001?0:d.length},h.prototype.parseOpenBracket=function(d){var y=this.pos;this.pos+=1;var S=gr("[",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()===Cp){this.pos+=1;var S=gr("![",this.sourcepos(this.pos-1,this.pos));d.appendChild(S),this.addBracket(S,y+1,!0)}else{var S=gr("!",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(gr("]",this.sourcepos(U,U))),!0;if(!G.active)return d.appendChild(gr("]",this.sourcepos(U,U))),this.removeBracket(),!0;var ee=G.image,Se=this.pos;this.peek()===xp&&(this.pos++,this.spnl()&&(y=this.parseLinkDestination())!==null&&this.spnl()&&(nf.test(this.subject.charAt(this.pos-1))&&(S=this.parseLinkTitle())||!0)&&this.spnl()&&this.peek()===tf?(this.pos+=1,L=!0):this.pos=Se);var Ae="";if(!L){var Ve=this.pos,je=this.parseLinkLabel();if(je>2?Ae=this.subject.slice(Ve,Ve+je):G.bracketAfter||(Ae=this.subject.slice(G.index,U)),je===0&&(this.pos=Se),Ae){Ae=wp(Ae);var qe=this.refMap[Ae];qe&&(y=qe.destination,S=qe.title,L=!0)}}if(L){var rt=ir(ee?"image":"link");rt.destination=y,rt.title=S||"",rt.sourcepos=[G.startpos,this.sourcepos(this.pos)];for(var et=G.node.next,Lt=void 0;et;)Lt=et.next,et.unlink(),rt.appendChild(et),et=Lt;if(d.appendChild(rt),this.processEmphasis(G.previousDelimiter),this.removeBracket(),G.node.unlink(),!ee)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:Ae}),!0}return this.removeBracket(),this.pos=U,d.appendChild(gr("]",this.sourcepos(U,U))),this.options.referenceDefinition&&(this.refLinkCandidateMap[d.id]={node:d,refLabel:Ae}),!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(GY))?(d.appendChild(gr(re.decodeHTML(y),this.sourcepos(S,this.pos))),!0):!1},h.prototype.parseString=function(d){var y,S=this.pos+1;if(y=this.match(i7)){if(this.options.smart){var L=y.replace(YY,"…").replace(XY,function(G){var ee=0,Se=0;return G.length%3===0?Se=G.length/3:G.length%2===0?ee=G.length/2:G.length%3===2?(ee=1,Se=(G.length-2)/3):(ee=2,Se=(G.length-4)/3),Kc("—",Se)+Kc("–",ee)});d.appendChild(gr(L,this.sourcepos(S,this.pos)))}else{var U=gr(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(t7,"");var U=L-y.literal.length;y.sourcepos[1][1]-=U,d.appendChild(ir(S?"linebreak":"softbreak",this.sourcepos(this.pos-U,this.pos)))}else d.appendChild(ir("softbreak",this.sourcepos(this.pos,this.pos)));return this.nextLine(),this.match(r7),!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()===$Y)this.pos++;else return this.pos=L,0;this.spnl();var ee=this.parseLinkDestination();if(ee===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 Ae=!0;if(this.match(Op)===null&&(S===""?Ae=!1:(S="",this.pos=Se,Ae=this.match(Op)!==null)),!Ae)return this.pos=L,0;var Ve=wp(G);if(Ve==="")return this.pos=L,0;var je=this.getReferenceDefSourcepos(d);d.sourcepos[0][0]=je[1][0]+1;var qe=ir("refDef",je);return qe.title=S,qe.dest=ee,qe.label=Ve,d.insertBefore(qe),y[Ve]?this.refDefCandidateMap[qe.id]=qe:y[Ve]=cf(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],ee=S[S.length-1];G.sourcepos&&ee.sourcepos&&(G.sourcepos[1]=ee.sourcepos[1]),G.next=ee.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 ee=y[G];if(nf.test(ee))break;if(/\:/.test(ee)&&L===0){if(S)break;var Se=ee.indexOf(":")===ee.length-1?G+1:G;U={line:Se,ch:y[Se].length},S=!0}var Ae=ee.match(/'|"/g);if(Ae&&(L+=Ae.length),L===2){U={line:G,ch:ee.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 Qc:S=this.parseNewline(d);break;case Sp:S=this.parseBackslash(d);break;case _Y:S=this.parseBackticks(d);break;case ef:case wl:case Cl:case Ma:S=this.handleDelim(L,d);break;case xa:case Ea:S=!!(!((y=this.options)===null||y===void 0)&&y.smart)&&this.handleDelim(L,d);break;case Cp:S=this.parseOpenBracket(d);break;case VY:S=this.parseBang(d);break;case zY:S=this.parseCloseBracket(d);break;case Tp:S=this.parseAutolink(d)||this.parseHtmlTag(d);break;case UY:d.disabledEntityParse||(S=this.parseEntity(d));break;default:S=this.parseString(d);break}return S||(this.pos+=1,d.appendChild(gr(Zc(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],fY(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&&FY(d.walker(),S),L&&d.firstChild)for(var U,G=d.firstChild.walker();U=G.next();){var ee=U.node,Se=U.entering;L[ee.type]&&L[ee.type](ee,{entering:Se,options:this.options})}},h}(),o7=/^\[([ \txX])\][ \t]+/;function s7(h,d){if(d.firstChild&&d.firstChild.type==="paragraph"){var y=d.firstChild,S=y.stringContent.match(o7);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 l7={continue:function(){return 0},finalize:function(){},canContain:function(h){return h==="tableHead"||h==="tableBody"},acceptsLines:!1},u7={continue:function(){return 0},finalize:function(){},canContain:function(h){return h==="tableRow"},acceptsLines:!1},c7={continue:function(){return 1},finalize:function(){},canContain:function(h){return h==="tableRow"||h==="tableDelimRow"},acceptsLines:!1},f7={continue:function(){return 1},finalize:function(){},canContain:function(h){return h==="tableDelimCell"},acceptsLines:!1},d7={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},h7={continue:function(){return 1},finalize:function(){},canContain:function(h){return h==="tableCell"},acceptsLines:!1},p7={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},Tl=4,Np=9,Dp=62,v7=60,Lp=32,Rp=91,Ip=/[^ \t\f\v\r\n]/,m7=/^(?:`{3,}|~{3,})(?= *$)/;function Pp(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 Bp(h){return!Ip.test(h)}function go(h){return h===Lp||h===Np}var g7=/^\$\$$/,y7={continue:function(h,d){var y=h.currentLine,S=y.match(g7);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(`
|
|
705
|
-
`),L=y.slice(0,S),U=y.slice(S+1),G=L.match(/^(\s*)(.*)/);d.info=ss(G[2].trim()),d.literal=U,d.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},Fp={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!0},b7={continue:function(){return 0},finalize:function(){},canContain:function(h){return h!=="item"},acceptsLines:!1},k7={continue:function(){return 0},finalize:function(h,d){for(var y=d.firstChild;y;){if(Pp(y)&&y.next){d.listData.tight=!1;break}for(var S=y.firstChild;S;){if(Pp(S)&&(y.next||S.next)){d.listData.tight=!1;break}S=S.next}y=y.next}},canContain:function(h){return h==="item"},acceptsLines:!1},w7={continue:function(h){var d=h.currentLine;if(!h.indented&&wn(d,h.nextNonspace)===Dp)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},C7={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:s7,canContain:function(h){return h!=="item"},acceptsLines:!1},T7={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},S7={continue:function(){return 1},finalize:function(){},canContain:function(){return!1},acceptsLines:!1},x7={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(m7);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>=Tl)h.advanceOffset(Tl,!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(`
|
|
706
|
-
`),U=S.slice(0,L),G=S.slice(L+1),ee=U.match(/^(\s*)(.*)/);d.infoPadding=ee[1].length,d.info=ss(ee[2].trim()),d.literal=G}else d.literal=(y=d.stringContent)===null||y===void 0?void 0:y.replace(/(\n *)+$/,`
|
|
707
|
-
`);d.stringContent=null}},canContain:function(){return!1},acceptsLines:!0},E7={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},M7={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)===Rp&&(y=h.inlineParser.parseReference(d,h.refMap));)d.stringContent=d.stringContent.slice(y),S=!0;S&&Bp(d.stringContent)&&d.unlink()}},canContain:function(){return!1},acceptsLines:!0},A7=Fp,O7=Fp,yo={document:b7,list:k7,blockQuote:w7,item:C7,heading:T7,thematicBreak:S7,codeBlock:x7,htmlBlock:E7,paragraph:M7,table:l7,tableBody:u7,tableHead:c7,tableRow:h7,tableCell:p7,tableDelimRow:f7,tableDelimCell:d7,refDef:A7,customBlock:y7,frontMatter:O7};function af(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&&pp(U)?y=L+1:S.push(U),d=L+1}if(d<h.length){var U=h.substring(d,h.length);pp(U)||S.push(U)}return[y,S]}function of(h,d,y,S){for(var L=[],U=0,G=d;U<G.length;U++){var ee=G[U],Se=ee.match(/^[ \t]+/),Ae=Se?Se[0].length:0,Ve=void 0,je=void 0;if(Ae===ee.length)Ae=0,Ve=0,je="";else{var qe=ee.match(/[ \t]+$/);Ve=qe?qe[0].length:0,je=ee.slice(Ae,ee.length-Ve)}var rt=S+Ae,et=ir(h,[[y,S],[y,S+ee.length-1]]);et.stringContent=je.replace(/\\\|/g,"|"),et.startIdx=L.length,et.endIdx=L.length,et.lineOffsets=[rt-1],et.paddingLeft=Ae,et.paddingRight=Ve,L.push(et),S+=ee.length+1}return L}function N7(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 D7=function(h,d){var y=d.stringContent;if(d.type==="paragraph"&&!h.indented&&!h.blank){var S=y.length-1,L=y.lastIndexOf(`
|
|
708
|
-
`,S-1)+1,U=y.slice(L,S),G=h.currentLine.slice(h.nextNonspace),ee=af(U),Se=ee[0],Ae=ee[1],Ve=af(G),je=Ve[0],qe=Ve[1],rt=/^[ \t]*:?-+:?[ \t]*$/;if(!Ae.length||!qe.length||qe.some(function(Si){return!rt.test(Si)})||qe.length===1&&G.indexOf("|")!==0)return 0;var et=d.lineOffsets,Lt=h.lineNumber-1,ar=bl(et)+1,Cr=ir("table",[[Lt,ar],[h.lineNumber,h.offset]]);if(Cr.columns=qe.map(function(){return{align:null}}),d.insertAfter(Cr),et.length===1)d.unlink();else{d.stringContent=y.slice(0,L);var wi=y.lastIndexOf(`
|
|
709
|
-
`,L-2)+1,In=L-wi-1;h.lastLineLength=et[et.length-2]+In,h.finalize(d,Lt-1)}h.advanceOffset(h.currentLine.length-h.offset,!1);var Cn=ir("tableHead",[[Lt,ar],[h.lineNumber,h.offset]]);Cr.appendChild(Cn);var Vn=ir("tableRow",[[Lt,ar],[Lt,ar+U.length-1]]),Ci=ir("tableDelimRow",[[h.lineNumber,h.nextNonspace+1],[h.lineNumber,h.offset]]);Cn.appendChild(Vn),Cn.appendChild(Ci),of("tableCell",Ae,Lt,ar+Se).forEach(function(Si){Vn.appendChild(Si)});var Ti=of("tableDelimCell",qe,h.lineNumber,h.nextNonspace+1+je);return Ti.forEach(function(Si){Ci.appendChild(Si)}),Cr.columns=Ti.map(N7),h.tip=Cr,2}return 0},L7=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=ir("tableRow",[[h.lineNumber,h.nextNonspace+1],[h.lineNumber,h.currentLine.length]]);S.appendChild(L);var U=S.parent,G=h.currentLine.slice(h.nextNonspace),ee=af(G),Se=ee[0],Ae=ee[1];return of("tableCell",Ae,h.lineNumber,h.nextNonspace+1+Se).forEach(function(Ve,je){je>=U.columns.length&&(Ve.ignored=!0),L.appendChild(Ve)}),2},R7=/^(\$\$)(\s*[a-zA-Z])+/,I7=/^(\$\$)(\s*[a-zA-Z])+.*(\$\$)/,P7=function(h){var d;if(!h.indented&&!I7.test(h.currentLine)&&(d=h.currentLine.match(R7))){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},B7=/^`{3,}(?!.*`)|^~{3,}/,F7=[/./,/^<(?: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("^(?:"+bp+"|"+kp+")\\s*$","i")],q7=/^(?:=+|-+)[ \t]*$/,H7=/^#{1,6}(?:[ \t]+|$)/,_7=/^(?:(?:\*[ \t]*){3,}|(?:_[ \t]*){3,}|(?:-[ \t]*){3,})[ \t]*$/,qp=/^[*+-]/,Hp=/^(\d{1,9})([.)])/;function z7(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(qp))U.type="bullet",U.bulletChar=S[0][0];else if((S=y.match(Hp))&&(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===Np||L===Lp)||d.type==="paragraph"&&!h.currentLine.slice(h.nextNonspace+S[0].length).match(Ip))return null;h.advanceNextNonspace(),h.advanceOffset(S[0].length,!0);var G=h.column,ee=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,Ae=h.column-G;return Ae>=5||Ae<1||Se?(U.padding=S[0].length+1,h.column=G,h.offset=ee,go(wn(h.currentLine,h.offset))&&h.advanceOffset(1,!0)):U.padding=S[0].length+Ae,U}function V7(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 U7=function(h){return!h.indented&&wn(h.currentLine,h.nextNonspace)===Dp?(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},$7=function(h,d){var y;if(!h.indented&&!_p(h,d)&&(y=h.currentLine.slice(h.nextNonspace).match(H7))){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},W7=function(h){var d;if(!h.indented&&(d=h.currentLine.slice(h.nextNonspace).match(B7))){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)===v7){var y=h.currentLine.slice(h.nextNonspace),S=h.options.disallowedHtmlBlockTags,L=void 0;for(L=1;L<=7;L++){var U=y.match(F7[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 ee=h.addChild("htmlBlock",h.offset);return ee.htmlBlockType=L,2}}}return 0},G7=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(q7))){h.closeUnmatchedBlocks();for(var S=void 0;wn(d.stringContent,0)===Rp&&(S=h.inlineParser.parseReference(d,h.refMap));)d.stringContent=d.stringContent.slice(S);if(d.stringContent.length>0){var L=ir("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},K7=function(h){return!h.indented&&_7.test(h.currentLine.slice(h.nextNonspace))?(h.closeUnmatchedBlocks(),h.addChild("thematicBreak",h.nextNonspace),h.advanceOffset(h.currentLine.length-h.offset,!1),2):0},J7=function(h,d){var y,S=d;return(!h.indented||d.type==="list")&&(y=z7(h,S))?(h.closeUnmatchedBlocks(),(h.tip.type!=="list"||!V7(S.listData,y))&&(S=h.addChild("list",h.nextNonspace),S.listData=y),S=h.addChild("item",h.nextNonspace),S.listData=y,1):0},Y7=function(h){return h.indented&&h.tip.type!=="paragraph"&&!h.blank?(h.advanceOffset(Tl,!0),h.closeUnmatchedBlocks(),h.addChild("codeBlock",h.offset),2):0},sf=[U7,$7,W7,j7,G7,K7,J7,Y7,D7,L7,P7],zp=/^(-{3}|\+{3}|;{3})$/,X7=function(h,d){var y=h.currentLine,S=h.lineNumber,L=h.indented;if(S===1&&!L&&d.type==="document"&&zp.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},Z7={continue:function(h,d){var y=h.currentLine,S=y.match(zp);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},Q7=[/./,/<\/(?:script|pre|style)>/i,/-->/,/\?>/,/>/,/\]\]>/],eX=/^[#`~*+_=<>0-9-;$]/,tX=/\r\n|\n|\r/;function lf(){return ir("document",[[1,1],[0,0]])}var rX={smart:!1,tagFilter:!1,extendedAutolinks:!1,disallowedHtmlBlockTags:[],referenceDefinition:!1,disallowDeepHeading:!1,customParser:null,frontMatter:!1},nX=function(){function h(d){this.options=P(P({},rX),d),this.doc=lf(),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=Z7,sf.unshift(X7)),this.inlineParser=new a7(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===`
|
|
710
|
-
`||L==="\r"||L==="",this.nextNonspace=y,this.nextNonspaceColumn=S,this.indent=this.nextNonspaceColumn-this.column,this.indented=this.indent>=Tl},h.prototype.addLine=function(){if(this.partiallyConsumedTab){this.offset+=1;var d=4-this.column%4;this.tip.stringContent+=Kc(" ",d)}this.tip.lineOffsets?this.tip.lineOffsets.push(this.offset):this.tip.lineOffsets=[this.offset],this.tip.stringContent+=this.currentLine.slice(this.offset)+`
|
|
711
|
-
`},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=ir(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,ee=U.type;S&&S[ee]&&S[ee](U,{entering:G,options:this.options}),!G&&(ee==="paragraph"||ee==="heading"||ee==="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=sf.length;!U;){if(this.findNextNonspace(),y.type!=="table"&&y.type!=="tableBody"&&y.type!=="paragraph"&&!this.indented&&!eX.test(d.slice(this.nextNonspace))){this.advanceNextNonspace();break}for(var ee=0;ee<G;){var Se=sf[ee](this,y);if(Se===1){y=this.tip;break}else if(Se===2){y=this.tip,U=!0;break}else ee++}if(ee===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 Ae=y.type,Ve=this.blank&&!(Ae==="blockQuote"||vp(y)&&y.isFenced||Ae==="item"&&!y.firstChild&&y.sourcepos[0][0]===this.lineNumber),je=y;je;)je.lastLineBlank=Ve,je=je.parent;yo[Ae].acceptsLines?(this.addLine(),cY(y)&&y.htmlBlockType>=1&&y.htmlBlockType<=5&&Q7[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=lf(),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(tX),L=S.length;this.lines=y||S,this.options.referenceDefinition&&this.clearRefMaps(),d.charCodeAt(d.length-1)===Qc&&(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=lf(),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){HY(d)})},h}();function Vp(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 iX(h,d){var y=h[0],S=h[1];return Vp(S,d)===1?1:Vp(y,d)===-1?-1:0}function aX(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]&&(Yc(y[G].id),y[G]=null)}y=S}h.next=d.next,d.next?d.next.prev=h:h.parent.lastChild=h}}function oX(h){for(var d=[],y=h.firstChild;y;)d.push(y),y=y.next;return d}function Up(h,d){for(var y=0,S=d;y<S.length;y++){var L=S[y];h.insertBefore(L)}}function sX(h,d){for(var y=d.length-1;y>=0;y-=1)h.prependChild(d[y])}function lX(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 $p(h,d){var y=h[0],S=h[1];return S[0]<d?1:y[0]>d?-1:0}function Sl(h,d){for(var y=h.firstChild;y;){var S=$p(y.sourcepos,d);if(S===0)return y;if(S===-1)return y.prev||y;y=y.next}return h.lastChild}function uX(h){for(;h.lastChild;)h=h.lastChild;return h}function cX(h){for(;h.parent&&h.parent.type!=="document"&&h.parent.sourcepos[0][0]===h.sourcepos[0][0];)h=h.parent;return h}function fX(h,d){for(var y=h.firstChild,S=null;y;){var L=$p(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?cX(uX(S)):null}function dX(h,d){for(var y=h,S=null;y;){var L=iX(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 Wp(h){return X6(h)||null}function uf(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 hX(h){var d=Wp(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 jp=/\r\n|\n|\r/;function pX(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 qp.test(y)||Hp.test(y)}function vX(h){return!Bp(h)&&h.indexOf("|")!==-1}function cf(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 mX=function(){function h(d,y){this.refMap={},this.refLinkCandidateMap={},this.refDefCandidateMap={},this.referenceDefinition=!!(y!=null&&y.referenceDefinition),this.parser=new nX(y),this.parser.setRefMaps(this.refMap,this.refLinkCandidateMap,this.refDefCandidateMap),this.eventHandlerMap={change:[]},d=d||"",this.lineTexts=d.split(jp),this.root=this.parser.parse(d,this.lineTexts)}return h.prototype.updateLineTexts=function(d,y,S){var L,U=d[0],G=d[1],ee=y[0],Se=y[1],Ae=S.split(jp),Ve=Ae.length,je=this.lineTexts[U-1],qe=this.lineTexts[ee-1];Ae[0]=je.slice(0,G-1)+Ae[0],Ae[Ve-1]=Ae[Ve-1]+qe.slice(Se-1);var rt=ee-U+1;return(L=this.lineTexts).splice.apply(L,F([U-1,rt],Ae)),Ve-rt},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?(Up(d,S),aX(d,y),[d.id,y.id].forEach(function(L){return Yc(L)}),d.unlink()):y?(Up(y,S),Yc(y.id),y.unlink()):sX(this.root,S)},h.prototype.getNodeRange=function(d,y){var S=Sl(this.root,d[0]),L=Sl(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&&(mp(d.prev)&&pX(this.lineTexts[S-1])||dY(d.prev)&&vX(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),ee=y?y.next:this.root.firstChild,Se=G.lastChild,Ae=Se&&vp(Se)&&Se.open,Ve=Se&&gp(Se)&&Se.open,je=Se&&mp(Se);(Ae||Ve)&&ee||je&&ee&&(ee.type==="list"||ee.sourcepos[0][1]>=2);){var qe=this.extendEndLine(ee.sourcepos[1][0]);this.parser.partialParseExtends(this.lineTexts.slice(L,qe)),d||(d=y),y=ee,L=qe,ee=ee.next}this.parser.partialParseFinish();var rt=oX(G);return{newNodes:rt,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&&uf(L,d.parent,y),y&&uf(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]=cf(L))}};d.forEach(function(L){uf(S,L)})}},h.prototype.replaceWithRefDefCandidate=function(){var d=this;mo(this.refDefCandidateMap)||kl(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]=cf(S))})},h.prototype.getRangeWithRefDef=function(d,y,S,L,U){if(this.referenceDefinition&&!mo(this.refMap)){var G=Sl(this.root,d-1),ee=Sl(this.root,y+1);G&&vo(G)&&G!==S&&G!==L&&(S=G,d=S.sourcepos[0][0]),ee&&vo(ee)&&ee!==S&&ee!==L&&(L=ee,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],ee=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),Ae=this.parseRange.apply(this,this.getRangeWithRefDef(ee,Se,U,G,S)),Ve=Ae.newNodes,je=Ae.extStartNode,qe=Ae.extEndNode,rt=this.getRemovedNodeRange(je,qe),et=qe?qe.next:this.root.firstChild;return this.referenceDefinition?(this.markDeletedRefMap(je,qe),this.replaceRangeNodes(je,qe,Ve),this.replaceWithNewRefDefState(Ve)):this.replaceRangeNodes(je,qe,Ve),{nodes:Ve,removedNodeRange:rt,nextNode:et}},h.prototype.parseRefLink=function(){var d=this,y=[];return mo(this.refMap)||kl(this.refMap,function(S,L){L.unlinked&&delete d.refMap[S],kl(d.refLinkCandidateMap,function(U,G){var ee=G.node,Se=G.refLabel;Se===S&&y.push(d.parse(ee.sourcepos[0],ee.sourcepos[1]))})}),y},h.prototype.removeUnlinkedCandidate=function(){mo(this.refDefCandidateMap)||[this.refLinkCandidateMap,this.refDefCandidateMap].forEach(function(d){kl(d,function(y){hX(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=qY(U,"nextNode");lX(U.nextNode,L),this.updateRootNodeState();var ee=[G];return this.referenceDefinition&&(this.removeUnlinkedCandidate(),this.replaceWithRefDefCandidate(),ee=ee.concat(this.parseRefLink())),this.trigger("change",ee),ee},h.prototype.getLineTexts=function(){return this.lineTexts},h.prototype.getRootNode=function(){return this.root},h.prototype.findNodeAtPosition=function(d){var y=dX(this.root,d);return!y||y===this.root?null:y},h.prototype.findFirstNodeAtLine=function(d){return fX(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 Wp(d)},h.prototype.removeAllNode=function(){Z6()},h}(),gX=["title","textarea","style","xmp","iframe","noembed","noframes","script","plaintext"],Gp=new RegExp("<(/?(?:"+gX.join("|")+")[^>]*>)","ig");function Kp(h){return Gp.test(h)?h.replace(Gp,function(d,y){return"<"+y}):h}var Jp={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 />
|
|
712
|
-
`}},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",ee={};return G==="ol"&&U!==null&&U!==1&&(ee.start=U.toString()),{type:y?"openTag":"closeTag",tagName:G,attributes:ee,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?Kp(h.literal):h.literal;return{type:"html",content:S}},htmlBlock:function(h,d){var y=d.options,S=y.tagFilter?Kp(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:P({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:P({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(),ee=y[G],Se=d.entering;if(ee)try{return ee(h,d)}catch(Ae){console.warn("[@toast-ui/editor] - The error occurred when "+G+" inline node was parsed in markdown renderer: "+Ae)}return Se?[{type:"openTag",tagName:"span"},{type:"text",content:"$$"+L+(U?" ":"")}]:[{type:"text",content:"$$"},{type:"closeTag",tagName:"span"}]}},Yp={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:P(P({},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],ee=G!=null&&G.align?{align:G.align}:null;return y?P({type:"openTag",tagName:L,outerNewLine:!0},ee&&{attributes:ee}):{type:"closeTag",tagName:L,outerNewLine:!0}}},yX={softbreak:`
|
|
713
|
-
`,gfm:!1,tagFilter:!1,nodeId:!1};function bX(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 kX=function(){function h(d){this.buffer=[],this.options=P(P({},yX),d),this.convertors=this.createConvertors(),delete this.options.convertors}return h.prototype.createConvertors=function(){var d=P({},Jp);if(this.options.gfm&&(d=P(P({},d),Yp)),this.options.convertors){var y=this.options.convertors,S=Object.keys(y),L=P(P({},Jp),Yp);S.forEach(function(U){var G=d[U],ee=y[U],Se=Object.keys(L).indexOf(U)===-1?U.toLowerCase():U;G?d[Se]=function(Ae,Ve,je){return Ve.origin=function(){return G(Ae,Ve,je)},ee(Ae,Ve)}:d[Se]=ee})}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 ee=L.node,Se=L.entering,Ae=G.convertors[ee.type];if(!Ae)return"continue";var Ve=!1,je={entering:Se,leaf:!Jc(ee),options:G.options,getChildrenText:bX,skipChildren:function(){Ve=!0}},qe=gp(ee)||hY(ee)?Ae(ee,je,G.convertors):Ae(ee,je);if(qe){var rt=Array.isArray(qe)?qe:[qe];rt.forEach(function(et,Lt){et.type==="openTag"&&y.options.nodeId&&Lt===0&&(et.attributes||(et.attributes={}),et.attributes["data-nodeid"]=String(ee.id)),y.renderHTMLNode(et)}),Ve&&(S.resumeAt(ee,!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 ee=U[G];y.buffer.push(" "+G+'="'+ee+'"')}),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&&bl(bl(this.buffer))!==`
|
|
714
|
-
`&&this.buffer.push(`
|
|
715
|
-
`)},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}(),wX=f(956),CX=f.n(wX),TX=f(969),Xp=f.n(TX),SX=f(348),Zp=f.n(SX),xX=f(349),Qp=f.n(xX),EX=f(204),ev=f.n(EX),MX=f(462),ff=f.n(MX),AX=f(522),tv=f.n(AX),OX=f(990),NX=f.n(OX),DX=f(322),LX=f.n(DX),RX=f(758),IX=f.n(RX),PX=f(929),xl=f.n(PX),BX=f(714),FX=f.n(BX);f(471);var rv="[A-Za-z][A-Za-z0-9-]*",qX="[a-zA-Z_:][a-zA-Z0-9:._-]*",HX="[^\"'=<>`\\x00-\\x20]+",_X="'[^']*'",zX='"[^"]*"',VX="(?:"+HX+"|"+_X+"|"+zX+")",UX="(?:\\s*=\\s*"+VX+")",nv="(?:\\s+"+qX+UX+"?)",$X="<("+rv+")("+nv+")*\\s*/?>",WX="</("+rv+")\\s*[>]",jX="(?:"+$X+"|"+WX+")",iv=new RegExp("^"+jX,"i");f(934),f(391);function df(h,d){return h.indexOf(d)!==-1}var GX=["rel","target","hreflang","type"];function KX(h){if(!h)return null;var d={};return GX.forEach(function(y){xl()(h[y])||(d[y]=h[y])}),d}function JX(h){return h[h.length-1]}function hf(h){return typeof h=="object"&&h!==null}function pf(h,d){var y=k({},h);return h&&d&&Object.keys(d).forEach(function(S){hf(y[S])?Array.isArray(d[S])?y[S]=vf(d[S]):y.hasOwnProperty(S)?y[S]=pf(y[S],d[S]):y[S]=mf(d[S]):y[S]=d[S]}),y}function vf(h){return h.map(function(d){return hf(d)?Array.isArray(d)?vf(d):mf(d):d})}function mf(h){var d=Object.keys(h);return d.length?d.reduce(function(y,S){return hf(h[S])?y[S]=Array.isArray(h[S])?vf(h[S]):mf(h[S]):y[S]=h[S],y},{}):h}function av(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]:av(h[y],d[y]):h[y]=d[y]}),h}function ov(h,d){return h>d?[d,h]:[h,d]}function YX(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 XX="toastui-editor-";function El(){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(""+XX+G)}return y.join(" ")}function sv(h){h.parentNode&&h.parentNode.removeChild(h)}function lv(h,d,y){xl()(y)&&(y=!FX()(h,d));var S=y?ev():ff();S(h,d)}function ZX(h,d){var y=document.createElement("div");IX()(h)?y.innerHTML=h:y.appendChild(h);var S=y.firstChild;return S}function QX(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 eZ=f(294),uv=f.n(eZ);function tZ(h){return h.sourcepos[0][1]}function rZ(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 nZ(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 iZ(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 aZ={},cv=/\$\$widget\d+\s/;function fv(h){var d=h.search(cv);if(d!==-1){var y=h.substring(d),S=y.replace(cv,"").replace("$$","");h=h.substring(0,d),h+=fv(S)}return h}function oZ(h,d){var y=aZ[h],S=y.rule,L=y.toDOM,U=fv(d).match(S);return U&&(d=U[0]),L(d)}function sZ(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+=iZ(L),S.resumeAt(h,!1),S.next()):L.type==="text"&&(y+=L.literal))}return y}var lZ=f(368),uZ=f.n(lZ),cZ=["iframe","embed"],dv=[];function fZ(h){df(cZ,h)&&dv.push(h.toLowerCase())}function dZ(h,d){return uZ().sanitize(h,k({ADD_TAGS:dv,ADD_ATTR:["rel","target","hreflang","type"],FORBID_TAGS:["input","script","textarea","form","button","select","meta","style","link","title","object","base"]},d))}function hZ(h,d){return h.literal.replace(new RegExp("(<\\s*"+d+"[^>]*>)|(</"+d+"\\s*[>])","ig"),"").trim()}function pZ(h){h=h.match(iv)[0];var d=h.match(new RegExp(nv,"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 vZ=/^\s*<\s*\//,mZ={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?`
|
|
716
|
-
`:`<br>
|
|
717
|
-
`;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 ee=L[0];U.push("lang-"+ee),G["data-language"]=ee}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=sZ(h),ee=oZ(U,G).outerHTML;return[{type:"openTag",tagName:"span",classNames:["tui-widget"]},{type:"html",content:ee},{type:"closeTag",tagName:"span"}]}return y()}};function gZ(h,d){var y=k({},mZ);return h&&(y.link=function(S,L){var U=L.entering,G=L.origin,ee=G();return U&&(ee.attributes=k(k({},ee.attributes),h)),ee}),d&&Object.keys(d).forEach(function(S){var L=y[S],U=d[S];L&&uv()(U)?y[S]=function(G,ee){var Se=k({},ee);return Se.origin=function(){return L(G,ee)},U(G,Se)}:df(["htmlBlock","htmlInline"],S)&&!uv()(U)?y[S]=function(G,ee){var Se=G.literal.match(iv);if(Se){var Ae=Se[0],Ve=Se[1],je=Se[3],qe=(Ve||je).toLowerCase(),rt=U[qe],et=hZ(G,qe);if(rt){var Lt=k({},G);return Lt.attrs=pZ(Ae),Lt.childrenHTML=et,Lt.type=qe,ee.entering=!vZ.test(G.literal),rt(Lt,ee)}}return ee.origin()}:y[S]=U}),y}var yZ=["UL","OL","BLOCKQUOTE"];function bZ(h,d){for(var y=0;h&&h!==d&&(df(yZ,h.tagName)||(y+=h.offsetTop),h.offsetParent!==d.offsetParent);)h=h.parentElement;return y}function kZ(h,d){for(var y=d,S=null;y;){var L=y.firstElementChild;if(!L)break;var U=hv(L,h,bZ(y,d));S=y,y=U}var G=y||S;return G===d?null:G}function hv(h,d,y){return h&&d>y+h.offsetTop?hv(h.nextElementSibling,d,y)||h:null}var wZ={};function gf(h){h&&(delete wZ[Number(h.getAttribute("data-nodeid"))],NX()(h.children).forEach(function(d){gf(d)}))}var yf=El("md-preview-highlight");function CZ(h,d){for(var y=h.firstChild;y&&y.next&&!(tZ(y.next)>d+1);)y=y.next;return y}var TZ=function(){function h(d,y){var S=document.createElement("div");this.el=S,this.eventEmitter=d,this.isViewer=!!y.isViewer,this.el.className=El("md-preview");var L=y.linkAttributes,U=y.customHTMLRenderer,G=y.sanitizer,ee=y.highlight,Se=ee===void 0?!1:ee;this.renderer=new kX({gfm:!0,nodeId:!0,convertors:gZ(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=ZX('<div class="'+El("contents")+'"></div>'),this.isViewer||this.el.appendChild(this.previewContent)},h.prototype.toggleActive=function(d){lv(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()})),Zp()(this.el,"scroll",function(S){y.eventEmitter.emit("scroll","preview",kZ(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&&ff()(d,yf)}},h.prototype.updateCursorNode=function(d,y){d&&(d=nZ(d,function(G){return!rZ(G)}),d.type==="tableRow"?d=CZ(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&&ff()(L,yf),U&&ev()(U,yf),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(et){return y.renderer.render(et)}).join("")));if(!L)U.insertAdjacentHTML("afterbegin",G);else{var ee=L.id,Se=ee[0],Ae=ee[1],Ve=this.getElementByNodeId(Se),je=this.getElementByNodeId(Ae);if(Ve){Ve.insertAdjacentHTML("beforebegin",G);for(var qe=Ve;qe&&qe!==je;){var rt=qe.nextElementSibling;sv(qe),gf(qe),qe=rt}qe!=null&&qe.parentNode&&(sv(qe),gf(qe))}}},h.prototype.getRenderer=function(){return this.renderer},h.prototype.destroy=function(){Qp()(this.el,"scroll"),this.el=null},h.prototype.getElement=function(){return this.el},h.prototype.getHTML=function(){return QX(this.previewContent.innerHTML)},h.prototype.setHTML=function(d){this.previewContent.innerHTML=d},h.prototype.setHeight=function(d){tv()(this.el,{height:d+"px"})},h.prototype.setMinHeight=function(d){tv()(this.el,{minHeight:d+"px"})},h}(),SZ=TZ,Ml=f(814),bf=f(479),pv=f(311),xZ=f(481),EZ=f(43),MZ=f(928),AZ=f.n(MZ),OZ=function(){function h(){this.keys=[],this.values=[]}return h.prototype.getKeyIndex=function(d){return AZ()(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}(),vv=OZ,kf="en-US",NZ=function(){function h(){this.code=kf,this.langs=new vv}return h.prototype.setCode=function(d){this.code=d||kf},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,Xp()(U,y))}})},h.prototype.get=function(d,y){y||(y=this.code);var S=this.langs.get(y);S||(S=this.langs.get(kf));var L=S[d];if(!L)throw new Error('There is no text key "'+d+'" in '+y);return L},h}(),DZ=new NZ;function LZ(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 mv=new Map,gv=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=LZ(d,function(et){var Lt=et.type;return Lt.name==="table"});if(y){var S=y.node,L=y.depth,U=y.offset,G=mv.get(S);if((G==null?void 0:G.tableStartPos)===U+1)return G;var ee=[],Se=d.start(L),Ae=S.child(0),Ve=S.child(1),je=wf(Ae,Se),qe=wf(Ve,Se+Ae.nodeSize);Ae.forEach(function(et){return ee.push(et)}),Ve.forEach(function(et){return ee.push(et)});var rt=new h(S,ee,Se,je.concat(qe));return mv.set(S,rt),rt}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),ee=G[0],Se=G[1],Ae=this.getCellIndex(y),Ve=Ae[0],je=Ae[1];return L=ov(ee,Ve),ee=L[0],Ve=L[1],U=ov(Se,je),Se=U[0],je=U[1],this.getSpannedOffsets({startRowIdx:ee,startColIdx:Se,endRowIdx:Ve,endColIdx:je})},h.prototype.getSpannedOffsets=function(d){return d},h}(),wf=function(h,d){var y=[];return h.forEach(function(S,L){var U={rowspanMap:{},colspanMap:{},length:0};S.forEach(function(G,ee){for(var Se=G.nodeSize,Ae=0;U[Ae];)Ae+=1;U[Ae]={offset:d+L+ee+2,nodeSize:Se},U.length+=1}),y.push(U)}),y};function RZ(h,d){return av(gv.prototype,h),wf=d,gv}function IZ(h){var d=h.plugin,y=h.eventEmitter,S=h.usageStatistics,L=h.instance,U={Plugin:Ml.Plugin,PluginKey:Ml.PluginKey,Selection:Ml.Selection,TextSelection:Ml.TextSelection},G={Decoration:pv.Decoration,DecorationSet:pv.DecorationSet},ee={Fragment:EZ.Fragment},Se={InputRule:bf.InputRule,inputRules:bf.inputRules,undoInputRule:bf.undoInputRule},Ae={keymap:xZ.keymap},Ve={eventEmitter:y,usageStatistics:S,instance:L,pmState:U,pmView:G,pmModel:ee,pmRules:Se,pmKeymap:Ae,i18n:DZ};if(LX()(d)){var je=d[0],qe=d[1],rt=qe===void 0?{}:qe;return je(Ve,rt)}return d(Ve)}function PZ(h){var d=h.plugins,y=h.eventEmitter,S=h.usageStatistics,L=h.instance;return y.listen("mixinTableOffsetMapPrototype",RZ),(d??[]).reduce(function(U,G){var ee=IZ({plugin:G,eventEmitter:y,usageStatistics:S,instance:L});if(!ee)throw new Error("The return value of the executed plugin is empty.");var Se=ee.markdownParsers,Ae=ee.toHTMLRenderers,Ve=ee.toMarkdownRenderers,je=ee.markdownPlugins,qe=ee.wysiwygPlugins,rt=ee.wysiwygNodeViews,et=ee.markdownCommands,Lt=ee.wysiwygCommands,ar=ee.toolbarItems;return Ae&&(U.toHTMLRenderers=pf(U.toHTMLRenderers,Ae)),Ve&&(U.toMarkdownRenderers=pf(U.toMarkdownRenderers,Ve)),je&&(U.mdPlugins=U.mdPlugins.concat(je)),qe&&(U.wwPlugins=U.wwPlugins.concat(qe)),rt&&(U.wwNodeViews=k(k({},U.wwNodeViews),rt)),et&&(U.mdCommands=k(k({},U.mdCommands),et)),Lt&&(U.wwCommands=k(k({},U.wwCommands),Lt)),ar&&(U.toolbarItems=U.toolbarItems.concat(ar)),Se&&(U.markdownParsers=k(k({},U.markdownParsers),Se)),U},{toHTMLRenderers:{},toMarkdownRenderers:{},mdPlugins:[],wwPlugins:[],wwNodeViews:{},mdCommands:{},wwCommands:{},toolbarItems:[],markdownParsers:{}})}var BZ=f(404),FZ=f.n(BZ),yv=["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"],qZ=function(){function h(){var d=this;this.events=new vv,this.eventTypes=yv.reduce(function(y,S){return k(k({},y),{type:S})},{}),this.hold=!1,yv.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(ee){var Se=ee.apply(void 0,y);xl()(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 ee=G.apply(void 0,T([y],S));FZ()(ee)||(y=ee)}),y},h.prototype.getTypeInfo=function(d){var y=d.split(".");return{type:y[0],namespace:y[1]}},h.prototype.hasEventType=function(d){return!xl()(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(ee,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}(),HZ=qZ,_Z="data-task",zZ="data-task-disabled",VZ="checked";function UZ(h){["htmlBlock","htmlInline"].forEach(function(d){h[d]&&Object.keys(h[d]).forEach(function(y){return fZ(y)})})}var $Z=function(){function h(d){var y=this;this.options=Xp()({linkAttributes:null,extendedAutolinks:!1,customHTMLRenderer:null,referenceDefinition:!1,customHTMLSanitizer:null,frontMatter:!1,usageStatistics:!0,theme:"light"},d),this.eventEmitter=new HZ;var S=KX(this.options.linkAttributes),L=PZ({plugins:this.options.plugins,eventEmitter:this.eventEmitter,usageStatistics:this.options.usageStatistics,instance:this})||{},U=L.toHTMLRenderers,G=L.markdownParsers,ee=this.options,Se=ee.customHTMLRenderer,Ae=ee.extendedAutolinks,Ve=ee.referenceDefinition,je=ee.frontMatter,qe=ee.customHTMLSanitizer,rt={linkAttributes:S,customHTMLRenderer:k(k({},U),Se),extendedAutolinks:Ae,referenceDefinition:Ve,frontMatter:je,sanitizer:qe||dZ};UZ(rt.customHTMLRenderer),this.options.events&&CX()(this.options.events,function(In,Cn){y.on(Cn,In)});var et=this.options,Lt=et.el,ar=et.initialValue,Cr=et.theme,wi=Lt.innerHTML;Cr!=="light"&&Lt.classList.add(El(Cr)),Lt.innerHTML="",this.toastMark=new mX("",{disallowedHtmlBlockTags:["br","img"],extendedAutolinks:Ae,referenceDefinition:Ve,disallowDeepHeading:!0,frontMatter:je,customParser:G}),this.preview=new SZ(this.eventEmitter,k(k({},rt),{isViewer:!0})),Zp()(this.preview.previewContent,"mousedown",this.toggleTask.bind(this)),ar?this.setMarkdown(ar):wi&&this.preview.setHTML(wi),Lt.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(zZ)&&y.hasAttribute(_Z)&&YX(S,d.offsetX,d.offsetY)&&(lv(y,VZ),this.eventEmitter.emit("change",{source:"viewer",date:d}))},h.prototype.setMarkdown=function(d){var y=this.toastMark.getLineTexts(),S=y.length,L=JX(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(){Qp()(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}(),WZ=$Z,jZ=WZ}(),p=p.default,p}()})}(ld)),ld.exports}var jJe=WJe();const GJe=KZ(jJe);/**
|
|
718
|
-
* TOAST UI Editor : React Wrapper
|
|
719
|
-
* @version 3.2.3 | Fri Feb 17 2023
|
|
720
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
721
|
-
* @license MIT
|
|
722
|
-
*//*! *****************************************************************************
|
|
723
|
-
Copyright (c) Microsoft Corporation.
|
|
724
|
-
|
|
725
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
726
|
-
purpose with or without fee is hereby granted.
|
|
727
|
-
|
|
728
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
729
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
730
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
731
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
732
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
733
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
734
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
735
|
-
***************************************************************************** */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 m0(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 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)},KJe=function(r){m0(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.rootEl=No.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 Kt(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 No.createElement("div",{ref:this.rootEl})},e}(No.Component);(function(r){m0(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.rootEl=No.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 GJe(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 No.createElement("div",{ref:this.rootEl})},e})(No.Component);/**
|
|
736
|
-
* @toast-ui/editor : i18n
|
|
737
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
738
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
739
|
-
* @license MIT
|
|
740
|
-
*/Kt.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":"اختر اللغة"});/**
|
|
741
|
-
* @toast-ui/editor : i18n
|
|
742
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
743
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
744
|
-
* @license MIT
|
|
745
|
-
*/Kt.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":"选择语言"});/**
|
|
746
|
-
* @toast-ui/editor : i18n
|
|
747
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
748
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
749
|
-
* @license MIT
|
|
750
|
-
*/Kt.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":"選擇語言"});/**
|
|
751
|
-
* @toast-ui/editor : i18n
|
|
752
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
753
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
754
|
-
* @license MIT
|
|
755
|
-
*/Kt.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"});/**
|
|
756
|
-
* @toast-ui/editor : i18n
|
|
757
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
758
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
759
|
-
* @license MIT
|
|
760
|
-
*/Kt.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"});/**
|
|
761
|
-
* @toast-ui/editor : i18n
|
|
762
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
763
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
764
|
-
* @license MIT
|
|
765
|
-
*/Kt.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"});/**
|
|
766
|
-
* @toast-ui/editor : i18n
|
|
767
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
768
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
769
|
-
* @license MIT
|
|
770
|
-
*/Kt.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"});/**
|
|
771
|
-
* @toast-ui/editor : i18n
|
|
772
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
773
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
774
|
-
* @license MIT
|
|
775
|
-
*/Kt.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"});/**
|
|
776
|
-
* @toast-ui/editor : i18n
|
|
777
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
778
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
779
|
-
* @license MIT
|
|
780
|
-
*/Kt.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"});/**
|
|
781
|
-
* @toast-ui/editor : i18n
|
|
782
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
783
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
784
|
-
* @license MIT
|
|
785
|
-
*/Kt.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"});/**
|
|
786
|
-
* @toast-ui/editor : i18n
|
|
787
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
788
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
789
|
-
* @license MIT
|
|
790
|
-
*/Kt.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"});/**
|
|
791
|
-
* @toast-ui/editor : i18n
|
|
792
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
793
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
794
|
-
* @license MIT
|
|
795
|
-
*/Kt.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"});/**
|
|
796
|
-
* @toast-ui/editor : i18n
|
|
797
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
798
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
799
|
-
* @license MIT
|
|
800
|
-
*/Kt.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":"言語選択"});/**
|
|
801
|
-
* @toast-ui/editor : i18n
|
|
802
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
803
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
804
|
-
* @license MIT
|
|
805
|
-
*/Kt.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":"언어 선택"});/**
|
|
806
|
-
* @toast-ui/editor : i18n
|
|
807
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
808
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
809
|
-
* @license MIT
|
|
810
|
-
*/Kt.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"});/**
|
|
811
|
-
* @toast-ui/editor : i18n
|
|
812
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
813
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
814
|
-
* @license MIT
|
|
815
|
-
*/Kt.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"});/**
|
|
816
|
-
* @toast-ui/editor : i18n
|
|
817
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
818
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
819
|
-
* @license MIT
|
|
820
|
-
*/Kt.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"});/**
|
|
821
|
-
* @toast-ui/editor : i18n
|
|
822
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
823
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
824
|
-
* @license MIT
|
|
825
|
-
*/Kt.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":"Выбрать язык"});/**
|
|
826
|
-
* @toast-ui/editor : i18n
|
|
827
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
828
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
829
|
-
* @license MIT
|
|
830
|
-
*/Kt.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"});/**
|
|
831
|
-
* @toast-ui/editor : i18n
|
|
832
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
833
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
834
|
-
* @license MIT
|
|
835
|
-
*/Kt.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"});/**
|
|
836
|
-
* @toast-ui/editor : i18n
|
|
837
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
838
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
839
|
-
* @license MIT
|
|
840
|
-
*/Kt.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"});/**
|
|
841
|
-
* @toast-ui/editor : i18n
|
|
842
|
-
* @version 3.2.2 | Fri Feb 17 2023
|
|
843
|
-
* @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
|
|
844
|
-
* @license MIT
|
|
845
|
-
*/Kt.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 JJe=["ar","zh","hr","cs","nl","en","fi","fr","gl","de","it","ja","ko","nb","pl","pt","ru","es","sv","tr","uk"],jy=document.documentElement.lang,Gy=JJe.includes(jy)?jy:"en",e8e=r=>{const e=JZ.c(19),{initialValue:t,onChange:n,options:i,disabled:a}=r,o=t===void 0?"":t,s=Cf.useRef(null),{width:l}=ZZ(),{appearance:f}=QZ(),p=f==="dark"?"dark":"light";let k;e[0]===Symbol.for("react.memo_cache_sentinel")?(k={height:"600px",initialEditType:"markdown",useCommandShortcut:!0,language:Gy},e[0]=k):k=e[0];const[T,x]=Cf.useState(k);let E;e[1]!==n?(E=()=>{var ge;const re=(ge=s.current)==null?void 0:ge.getInstance(),he=re==null?void 0:re.getMarkdown();n&&he&&n(he)},e[1]=n,e[2]=E):E=e[2];const P=E;let F;e[3]!==i||e[4]!==l?(F=()=>{const re=l<1200;x(he=>({...he,...i,previewStyle:re?"tab":(i==null?void 0:i.previewStyle)||"vertical",height:(i==null?void 0:i.height)||"600px",initialEditType:(i==null?void 0:i.initialEditType)||"markdown",useCommandShortcut:(i==null?void 0:i.useCommandShortcut)!==void 0?i.useCommandShortcut:!0})),s.current&&s.current.getInstance().changePreviewStyle(re?"tab":(i==null?void 0:i.previewStyle)||"vertical")},e[3]=i,e[4]=l,e[5]=F):F=e[5];let z;e[6]!==i||e[7]!==p||e[8]!==l?(z=[l,i,p],e[6]=i,e[7]=p,e[8]=l,e[9]=z):z=e[9],Cf.useEffect(F,z);const Y=`${a?"pointer-events-none opacity-50":""}`,Z=`editor-${p}-${Gy}`;let oe;e[10]!==T||e[11]!==P||e[12]!==o||e[13]!==Z||e[14]!==p?(oe=bv.jsx(KJe,{ref:s,initialValue:o,onChange:P,autofocus:!1,theme:p,...T},Z),e[10]=T,e[11]=P,e[12]=o,e[13]=Z,e[14]=p,e[15]=oe):oe=e[15];let le;return e[16]!==Y||e[17]!==oe?(le=bv.jsx("div",{className:Y,children:oe}),e[16]=Y,e[17]=oe,e[18]=le):le=e[18],le};export{e8e as default};
|