vue-spear-tip 0.6.19 → 0.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +41 -41
- package/dist/{Button-pCNS2zU_.cjs → Button-DL8dzhLs.cjs} +1 -1
- package/dist/{Button-C8TgZIb0.js → Button-mNgrIBt0.js} +1 -1
- package/dist/{CodeHighlight-BtIZI4bR.cjs → CodeHighlight-CWT9ljxW.cjs} +1 -1
- package/dist/{CodeHighlight-BRxQqnpA.js → CodeHighlight-eMrWWqjO.js} +1 -1
- package/dist/{DateField-DchBLOyR.cjs → DateField-276tU7dR.cjs} +1 -1
- package/dist/{DateField-f7KPonnO.js → DateField-DJgLEfuJ.js} +2 -2
- package/dist/{Draggable-t9YiMTH7.cjs → Draggable-D9K46teR.cjs} +1 -1
- package/dist/{Draggable-5iUEhvqP.js → Draggable-xSaOZkIc.js} +1 -1
- package/dist/{Droppable-ZB7XSm7P.js → Droppable-DGc3gGXX.js} +1 -1
- package/dist/{Droppable-Bngj5bOY.cjs → Droppable-ozHn_LH7.cjs} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-CYT8CYt1.js → FieldComponent.vue_vue_type_script_lang-BCu4PrNU.js} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-Bbdo4olJ.cjs → FieldComponent.vue_vue_type_script_lang-Bht3oZYb.cjs} +1 -1
- package/dist/{FilesArea-RivTz8Kc.js → FilesArea-C9z4gTb0.js} +2 -2
- package/dist/{FilesArea-D3T2h-W1.cjs → FilesArea-DZiv8wBT.cjs} +1 -1
- package/dist/{Scrollbar-Ocdwgu7q.js → Scrollbar-CBCuild6.js} +1 -1
- package/dist/{Scrollbar-CcoknXXp.cjs → Scrollbar-DpX61NhD.cjs} +1 -1
- package/dist/{SelectField-lNu4v9cs.js → SelectField-BN765HUF.js} +154 -148
- package/dist/{SelectField-CoX17KKw.cjs → SelectField-BTQ-c5YW.cjs} +3 -3
- package/dist/{StringField-BbygO1Co.cjs → StringField-D4k0FAo8.cjs} +1 -1
- package/dist/{StringField-NZ1i2QQ3.js → StringField-DXuKHlpt.js} +2 -2
- package/dist/{SwitchField-CtRl0F19.js → SwitchField-BdKQGeSb.js} +2 -2
- package/dist/{SwitchField-_G48VVZT.cjs → SwitchField-Dj2QpW85.cjs} +1 -1
- package/dist/{Tabs-eTgdVZbO.js → Tabs-CAbUgriG.js} +1 -1
- package/dist/{Tabs-HEDRRUS3.cjs → Tabs-Dm8Aj2Y8.cjs} +1 -1
- package/dist/{TextField-cBCKI0cn.js → TextField-BTofkhCU.js} +2 -2
- package/dist/{TextField-Bd-lZTSW.cjs → TextField-DJkk40xg.cjs} +1 -1
- package/dist/{index-DNKvxD16.js → index-Cd_DL4JD.js} +3 -3
- package/dist/{index-8tGGISA9.cjs → index-DZjDh7FL.cjs} +1 -1
- package/dist/vue-spear-tip.cjs.js +1 -1
- package/dist/vue-spear-tip.es.js +1 -1
- package/docs/index.html +1 -1
- package/docs/static/{Button-DefvS2tb.js → Button-8C6MeUM7.js} +1 -1
- package/docs/static/{CodeHighlight-BVIlCbbZ.js → CodeHighlight-DFeMy3ki.js} +1 -1
- package/docs/static/{DateField-DWZSZHD8.js → DateField-Cf48x5xH.js} +1 -1
- package/docs/static/{Draggable-Bm-4m4gO.js → Draggable-CS4w2yK4.js} +1 -1
- package/docs/static/{Droppable-Cnqe7Gg7.js → Droppable-wLX0xjMl.js} +1 -1
- package/docs/static/{FieldComponent.vue_vue_type_script_lang-wRSTrf2p.js → FieldComponent.vue_vue_type_script_lang-Ig4MpRH0.js} +1 -1
- package/docs/static/{FilesArea-3G-jGZpj.js → FilesArea-Cl92W6MM.js} +1 -1
- package/docs/static/{NoSymbolIcon-CYY6lnSa.js → NoSymbolIcon-NizHqgdb.js} +1 -1
- package/docs/static/{Scrollbar-DFH9Klrw.js → Scrollbar-l6hENTT0.js} +1 -1
- package/docs/static/{SelectField-CLO6Fxfz.js → SelectField-CC7fBKuR.js} +8 -8
- package/docs/static/{StringField-BuCcwPUS.js → StringField-2LaMICQ8.js} +1 -1
- package/docs/static/{SwitchField-CyGjl8KD.js → SwitchField-DaP3PVMB.js} +1 -1
- package/docs/static/{Tabs-D1sUGHr1.js → Tabs-CBsULMP9.js} +1 -1
- package/docs/static/{TextField-BVkaf8OT.js → TextField-DUq1jGAW.js} +1 -1
- package/docs/static/index-DpXxVeQv.js +2 -0
- package/docs/static/{main-DjEys_aT.js → main-BIpS3Kki.js} +3 -3
- package/package.json +1 -1
- package/docs/static/index-DK4vwxii.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty;var m=(e,i)=>h(e,"name",{value:i,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-
|
|
1
|
+
"use strict";var h=Object.defineProperty;var m=(e,i)=>h(e,"name",{value:i,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-DZjDh7FL.cjs"),b=require("./FieldComponent.vue_vue_type_script_lang-Bht3oZYb.cjs"),o=require("vue");var u=Object.defineProperty,y=Object.getOwnPropertyDescriptor,r=m((e,i,p,s)=>{for(var n=s>1?void 0:s?y(i,p):i,g=e.length-1,a;g>=0;g--)(a=e[g])&&(n=(s?a(i,p,n):a(n))||n);return s&&n&&u(i,p,n),n},"__decorateClass"),d;let t=(d=class extends b.FieldComponentUnoCss{disabled=!1;bg="linear-gradient(330deg, #0aa86d 0%, #4eb18d 50%, #0ca86e 100%)";bgInactive="#a1a1a1";title=null;titleTheme="info";bgTogglerY="#3db37e";bgTogglerN="#FF3A19";titleTogglerY="Active";titleTogglerN="Inactive";togglerWidth="100px";togglerWidthActive="100px";togglerRevertColors=null;boxShadow="0 0 2px #1ca95e";disabledTitle="Disabled";disabledTitleTheme="grey";boxShadowHover="0 0 2px #9eeda8";labelColor="#fff";labelBoxShadow="0 0 4px #a4a4a4";type="switcher";modelValue=!1;value=!1;beforeMount(){this.value=this.inputValue||this.modelValue||!1,this.randomId=$VST.generateRandomKey(32)}emits=["update:modelValue","change"];onValueChange(){if(this.ignoreOuter)return this.ignoreOuter=!1;this.$emit("update:modelValue",this.value),this.$emit("change",this.value)}randomId="";ignoreOuter=!1;modelValueChanged(i){this.ignoreOuter=!0,this.setValue(i)}},m(d,"SwitchField"),d);r([l.Prop(Boolean)],t.prototype,"disabled",2);r([l.Prop(String)],t.prototype,"bg",2);r([l.Prop(String)],t.prototype,"bgInactive",2);r([l.Prop(String)],t.prototype,"title",2);r([l.Prop(String)],t.prototype,"titleTheme",2);r([l.Prop(String)],t.prototype,"bgTogglerY",2);r([l.Prop(String)],t.prototype,"bgTogglerN",2);r([l.Prop(String)],t.prototype,"titleTogglerY",2);r([l.Prop(String)],t.prototype,"titleTogglerN",2);r([l.Prop(String)],t.prototype,"togglerWidth",2);r([l.Prop(String)],t.prototype,"togglerWidthActive",2);r([l.Prop(Boolean)],t.prototype,"togglerRevertColors",2);r([l.Prop(String)],t.prototype,"boxShadow",2);r([l.Prop(String)],t.prototype,"disabledTitle",2);r([l.Prop(String)],t.prototype,"disabledTitleTheme",2);r([l.Prop(String)],t.prototype,"boxShadowHover",2);r([l.Prop(String)],t.prototype,"labelColor",2);r([l.Prop(String)],t.prototype,"labelBoxShadow",2);r([l.Prop(String)],t.prototype,"type",2);r([l.Prop(Boolean,null)],t.prototype,"modelValue",2);r([l.Watch("modelValue",!0)],t.prototype,"modelValueChanged",1);t=r([l.Component],t);const c=["title","data-theme"],v={class:"switch_box"},f=["id","disabled"],S=["for"],k=["id","disabled"],w=["data-tg-off","data-tg-on","for"],C={class:"flex items-center justify-center"},V=["id","disabled"],D=["for"],T=["height"];function B(e,i,p,s,n,g){return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["container-switch",{"min-w64px":e.type!="checkbox","44px!":e.size=="lg","h25px!":e.size=="md","h20px! w25px!":e.size=="sm"}]),title:e.disabled?e.disabledTitle:e.title,"data-theme":e.disabled?e.disabledTitleTheme:e.titleTheme,"data-offset":"[-15, 15]"},[e.type=="switcher"?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["switch",{"min-h25px! scale-80":e.size=="md","min-h18px! scale-50":e.size=="sm",disabled:e.disabled}])},[o.createElementVNode("div",v,[o.createElementVNode("div",{class:"cursor-pointer fs-1rem mb2px",onClick:i[0]||(i[0]=a=>e.disabled?null:e.value=!e.value)},[o.renderSlot(e.$slots,"default")]),o.withDirectives(o.createElementVNode("input",{id:"switch-"+e.randomId,type:"checkbox","onUpdate:modelValue":i[1]||(i[1]=a=>e.value=a),disabled:e.disabled},null,8,f),[[o.vModelCheckbox,e.value]]),o.createElementVNode("label",{for:"switch-"+e.randomId,class:o.normalizeClass({disabled:e.disabled})},null,10,S)])],2)):e.type=="toggler"?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(["hybrid-checkbox",{["toggler-"+e.randomId]:!0}])},[o.withDirectives(o.createElementVNode("input",{class:"tgl tgl-flip",id:"toggler-"+e.randomId,type:"checkbox","onUpdate:modelValue":i[2]||(i[2]=a=>e.value=a),disabled:e.disabled},null,8,k),[[o.vModelCheckbox,e.value]]),o.createElementVNode("label",{class:"tgl-btn","data-tg-off":e.titleTogglerN,"data-tg-on":e.titleTogglerY,for:"toggler-"+e.randomId},null,8,w)],2)):e.type=="checkbox"?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(["typical-checkbox",{disabled:e.disabled}])},[o.createElementVNode("span",C,[o.withDirectives(o.createElementVNode("input",{type:"checkbox",id:"checkbox-"+e.randomId,"onUpdate:modelValue":i[3]||(i[3]=a=>e.value=a),disabled:e.disabled},null,8,V),[[o.vModelCheckbox,e.value]]),o.createElementVNode("label",{class:o.normalizeClass(["check py3px! w20px! p0!",{"bg-white":e.value,"mt3px!":!e.value,"h10px!":e.size=="sm"}]),for:"checkbox-"+e.randomId},[(o.openBlock(),o.createElementBlock("svg",{class:o.normalizeClass(["w20px",{"svg-unchecked bg-white":!e.value}]),width:"20px",height:e.size=="sm"?"13px":e.size=="md"?"18px":null,viewBox:"0 0 18 18"},[...i[5]||(i[5]=[o.createElementVNode("path",{d:"M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z"},null,-1),o.createElementVNode("polyline",{points:"1 9 7 14 15 4"},null,-1)])],10,T))],10,D)]),e.$slots?.default&&e.$slots?.default?.()?.[0]?.children?.length?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(["cursor-pointer fs-1rem mx15px my2px whitespace-nowrap",{"fw-bold underline underline-black":e.value}]),onClick:i[4]||(i[4]=a=>e.disabled?null:e.value=!e.value)},[o.renderSlot(e.$slots,"default")],2)):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),e.type=="toggler"?(o.openBlock(),o.createBlock(o.resolveDynamicComponent("style"),{key:3},{default:o.withCtx(()=>[o.createTextVNode(".toggler-"+o.toDisplayString(e.randomId)+" .tgl-flip + .tgl-btn { perspective: "+o.toDisplayString(e.value?e.togglerWidthActive:e.togglerWidth)+" !important; width: "+o.toDisplayString(e.value?e.togglerWidthActive:e.togglerWidth)+" !important; } .toggler-"+o.toDisplayString(e.randomId)+" .tgl-flip + .tgl-btn:before { background: "+o.toDisplayString(e.togglerRevertColors?e.bgTogglerY:e.bgTogglerN)+" } .toggler-"+o.toDisplayString(e.randomId)+" .tgl-flip:checked + .tgl-btn:after { background: "+o.toDisplayString(e.togglerRevertColors?e.bgTogglerN:e.bgTogglerY)+" }",1)]),_:1})):o.createCommentVNode("",!0),e.type=="toggler"&&e.disabled?(o.openBlock(),o.createBlock(o.resolveDynamicComponent("style"),{key:4},{default:o.withCtx(()=>[o.createTextVNode(".toggler-"+o.toDisplayString(e.randomId)+" { opacity: 0.5 !important; }",1)]),_:1})):o.createCommentVNode("",!0),e.type=="checkbox"?(o.openBlock(),o.createBlock(o.resolveDynamicComponent("style"),{key:5},{default:o.withCtx(()=>[o.createTextVNode("#checkbox-"+o.toDisplayString(e.randomId)+" { display: none; visibility: hidden; } #checkbox-"+o.toDisplayString(e.randomId)+" + label { box-sizing: content-box !important; }",1)]),_:1})):o.createCommentVNode("",!0),e.type=="checkbox"&&e.size=="sm"?(o.openBlock(),o.createBlock(o.resolveDynamicComponent("style"),{key:6},{default:o.withCtx(()=>[o.createTextVNode('[for="checkbox-'+o.toDisplayString(e.randomId)+'"]:before { height: 20px !important; width: 20px !important; } #checkbox-'+o.toDisplayString(e.randomId)+" + label { height: 15px !important; width: 15px !important; }",1)]),_:1})):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent("style"),null,{default:o.withCtx(()=>[o.createTextVNode('[for="switch-'+o.toDisplayString(e.randomId)+'"]::before { background: '+o.toDisplayString(e.bg)+"; box-shadow: "+o.toDisplayString(e.boxShadow)+' !important; } [for="switch-'+o.toDisplayString(e.randomId)+'"]:not(.disabled):hover { box-shadow: '+o.toDisplayString(e.boxShadowHover)+'; } .switch_box [for="switch-'+o.toDisplayString(e.randomId)+'"]::after { background: '+o.toDisplayString(e.labelColor)+" !important; box-shadow: "+o.toDisplayString(e.labelBoxShadow)+'; } .switch_box [for="switch-'+o.toDisplayString(e.randomId)+'"] input { display: none !important; } .switch_box label[for="switch-'+o.toDisplayString(e.randomId)+'"] { background: '+o.toDisplayString(e.bgInactive)+" !important; }",1)]),_:1}))],10,c)}m(B,"render");const N=l._export_sfc(t,[["render",B]]);exports.default=N;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var T = Object.defineProperty;
|
|
2
2
|
var n = (t, o) => T(t, "name", { value: o, configurable: !0 });
|
|
3
|
-
import { a as f, C as k, _ as m } from "./index-
|
|
3
|
+
import { a as f, C as k, _ as m } from "./index-Cd_DL4JD.js";
|
|
4
4
|
import { openBlock as s, createElementBlock as r, createElementVNode as g, Fragment as l, renderList as _, normalizeClass as $, renderSlot as v, createCommentVNode as b, toDisplayString as y, withDirectives as w, vShow as D } from "vue";
|
|
5
5
|
var B = Object.getOwnPropertyDescriptor, O = /* @__PURE__ */ n((t, o, h, c) => {
|
|
6
6
|
for (var i = c > 1 ? void 0 : c ? B(o, h) : o, d = t.length - 1, u; d >= 0; d--)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var m=Object.defineProperty;var n=(t,o)=>m(t,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-
|
|
1
|
+
"use strict";var m=Object.defineProperty;var n=(t,o)=>m(t,"name",{value:o,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-DZjDh7FL.cjs"),e=require("vue");var b=Object.getOwnPropertyDescriptor,B=n((t,o,p,i)=>{for(var l=i>1?void 0:i?b(o,p):o,c=t.length-1,a;c>=0;c--)(a=t[c])&&(l=a(l)||l);return l},"__decorateClass"),s;let u=(s=class extends d.BaseComponent{currentTab="default";CommentT=Comment;mounted(){}setCurrentTab(o){this.currentTab=o}getTabTitle(o){return o.props?.title||"Без названия"}},n(s,"Tabs"),s);u=B([d.Component],u);const _={class:"tabs"},v={class:"tabs__headers"},h=["onClick"],$=["onClick"],C={key:0,class:"tabs__content"};function T(t,o,p,i,l,c){return e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.$slots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.startsWith("$title-")?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["tabs__header",{"tabs__header--active":t.currentTab===r.split("-")[1]}]),onClick:n(k=>t.setCurrentTab(r.split("-")[1]),"onClick")},[e.renderSlot(t.$slots,r,{},void 0,!0)],10,h)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.$slots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!r.startsWith("$title")&&!t.$slots?.[`$title-${r}`]?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["tabs__header",{"tabs__header--active":t.currentTab===r}]),onClick:n(k=>t.setCurrentTab(r),"onClick")},e.toDisplayString(r),11,$)):e.createCommentVNode("",!0)],64))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.$slots,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.startsWith("$")?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createElementBlock("div",C,[e.renderSlot(t.$slots,r,{},void 0,!0)],512)),[[e.vShow,t.currentTab==r]])],64))),256))])}n(T,"render");const g=d._export_sfc(u,[["render",T],["__scopeId","data-v-a12a2bf2"]]);exports.default=g;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Gm = Object.defineProperty;
|
|
2
2
|
var a = (t, e) => Gm(t, "name", { value: e, configurable: !0 });
|
|
3
3
|
import { defineComponent as jr, h as Ur, ref as ra, getCurrentInstance as Ym, watchEffect as Zm, nextTick as ch, unref as Xm, onBeforeUnmount as ia, markRaw as Qm, customRef as e1, onMounted as dh, resolveComponent as Jn, openBlock as se, createBlock as Pt, normalizeClass as Y, withCtx as B, withDirectives as ll, createElementVNode as x, createVNode as K, vShow as ul, createElementBlock as Ve, withModifiers as Gn, withKeys as nt, createCommentVNode as xe, normalizeStyle as t1, toDisplayString as Vc, resolveDynamicComponent as n1, createTextVNode as r1 } from "vue";
|
|
4
|
-
import { c as i1, d as s1, e as o1, P as $e, W as $i, C as l1, _ as u1 } from "./index-
|
|
5
|
-
import { F as a1 } from "./FieldComponent.vue_vue_type_script_lang-
|
|
4
|
+
import { c as i1, d as s1, e as o1, P as $e, W as $i, C as l1, _ as u1 } from "./index-Cd_DL4JD.js";
|
|
5
|
+
import { F as a1 } from "./FieldComponent.vue_vue_type_script_lang-BCu4PrNU.js";
|
|
6
6
|
import { g as c1 } from "./_commonjsHelpers-CO8R3Anj.js";
|
|
7
7
|
import { r as d1 } from "./NoSymbolIcon-B4SWqT3z.js";
|
|
8
8
|
function me(t) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Dm=Object.defineProperty;var a=(t,e)=>Dm(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("vue"),X=require("./index-8tGGISA9.cjs"),Nm=require("./FieldComponent.vue_vue_type_script_lang-Bbdo4olJ.cjs"),Om=require("./_commonjsHelpers-BB06FEA1.cjs"),Rm=require("./NoSymbolIcon-BoH28Kep.cjs");function fe(t){this.content=t}a(fe,"OrderedMap");fe.prototype={constructor:fe,find:a(function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},"find"),get:a(function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},"get"),update:a(function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new fe(o)},"update"),remove:a(function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new fe(n)},"remove"),addToStart:a(function(t,e){return new fe([t,e].concat(this.remove(t).content))},"addToStart"),addToEnd:a(function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new fe(n)},"addToEnd"),addBefore:a(function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new fe(i)},"addBefore"),forEach:a(function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},"forEach"),prepend:a(function(t){return t=fe.from(t),t.size?new fe(t.content.concat(this.subtract(t).content)):this},"prepend"),append:a(function(t){return t=fe.from(t),t.size?new fe(this.subtract(t).content.concat(t.content)):this},"append"),subtract:a(function(t){var e=this;t=fe.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},"subtract"),toObject:a(function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},"toObject"),get size(){return this.content.length>>1}};fe.from=function(t){if(t instanceof fe)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new fe(e)};function qf(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=qf(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}a(qf,"findDiffStart");function Kf(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),l=e.child(--o),u=s.nodeSize;if(s==l){n-=u,r-=u;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let c=0,d=Math.min(s.text.length,l.text.length);for(;c<d&&s.text[s.text.length-c-1]==l.text[l.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||l.content.size){let c=Kf(s.content,l.content,n-1,r-1);if(c)return c}n-=u,r-=u}}a(Kf,"findDiffEnd");const de=class de{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,l=0;l<n;s++){let u=this.content[s],c=l+u.nodeSize;if(c>e&&r(u,i+l,o||null,s)!==!1&&u.content.size){let d=l+1;u.nodesBetween(Math.max(0,e-d),Math.min(u.content.size,n-d),r,i+d)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(l,u)=>{let c=l.isText?l.text.slice(Math.max(e,u)-u,n-u):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new de(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let l=this.content[o],u=s+l.nodeSize;u>e&&((s<e||u>n)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),i+=l.nodeSize),s=u}return new de(r,i)}cutByIndex(e,n){return e==n?de.empty:e==0&&n==this.content.length?this:new de(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new de(i,o)}addToStart(e){return new de([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new de(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))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 n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return qf(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Kf(this,e,n,r)}findIndex(e){if(e==0)return zi(0,e);if(e==this.size)return zi(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),o=r+i.nodeSize;if(o>=e)return o==e?zi(n+1,o):zi(n,r);r=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,n){if(!n)return de.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new de(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return de.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new de(n||e,r)}static from(e){if(!e)return de.empty;if(e instanceof de)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new de([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};a(de,"Fragment");let M=de;M.empty=new M([],0);const Js={index:0,offset:0};function zi(t,e){return Js.index=t,Js.offset=e,Js}a(zi,"retIndex");function so(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!so(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!so(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}a(so,"compareDeep");var Gt;let j=(Gt=class{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&so(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Gt.none;if(e instanceof Gt)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}},a(Gt,"Mark"),Gt);j.none=[];const Va=class Va extends Error{};a(Va,"ReplaceError");let yr=Va;const Ft=class Ft{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=Gf(this.content,e+this.openStart,n);return r&&new Ft(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Ft(Jf(this.content,e+this.openStart,n+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,n){if(!n)return Ft.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ft(M.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new Ft(e,r,i)}};a(Ft,"Slice");let T=Ft;T.empty=new T(M.empty,0,0);function Jf(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(i==e||o.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(Jf(o.content,e-i-1,n-i-1)))}a(Jf,"removeRange");function Gf(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=Gf(s.content,e-o-1,n,s);return l&&t.replaceChild(i,s.copy(l))}a(Gf,"insertInto");function Im(t,e,n){if(n.openStart>t.depth)throw new yr("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new yr("Inconsistent open depths");return Yf(t,e,n,0)}a(Im,"replace$1");function Yf(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=Yf(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,l=s.content;return wn(s,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=_m(n,t);return wn(o,Xf(t,s,l,e,r))}else return wn(o,lo(t,e,r))}a(Yf,"replaceOuter");function Zf(t,e){if(!e.type.compatibleContent(t.type))throw new yr("Cannot join "+e.type.name+" onto "+t.type.name)}a(Zf,"checkJoin");function Ll(t,e,n){let r=t.node(n);return Zf(r,e.node(n)),r}a(Ll,"joinable$1");function xn(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}a(xn,"addNode");function jr(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(xn(t.nodeAfter,r),o++));for(let l=o;l<s;l++)xn(i.child(l),r);e&&e.depth==n&&e.textOffset&&xn(e.nodeBefore,r)}a(jr,"addRange");function wn(t,e){return t.type.checkContent(e),t.copy(e)}a(wn,"close");function Xf(t,e,n,r,i){let o=t.depth>i&&Ll(t,e,i+1),s=r.depth>i&&Ll(n,r,i+1),l=[];return jr(null,t,i,l),o&&s&&e.index(i)==n.index(i)?(Zf(o,s),xn(wn(o,Xf(t,e,n,r,i+1)),l)):(o&&xn(wn(o,lo(t,e,i+1)),l),jr(e,n,i,l),s&&xn(wn(s,lo(n,r,i+1)),l)),jr(r,null,i,l),new M(l)}a(Xf,"replaceThreeWay");function lo(t,e,n){let r=[];if(jr(null,t,n,r),t.depth>n){let i=Ll(t,e,n+1);xn(wn(i,lo(t,e,n+1)),r)}return jr(e,null,n,r),new M(r)}a(lo,"replaceTwoWay");function _m(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)i=e.node(o).copy(M.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}a(_m,"prepareSliceForReplace");const ti=class ti{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.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,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return j.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new kr(this,e,r);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 n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:l,offset:u}=s.content.findIndex(o),c=o-u;if(r.push(s,l,i+u),!c||(s=s.child(l),s.isText))break;o=c-1,i+=u+1}return new ti(n,r,o)}static resolveCached(e,n){let r=Sc.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else Sc.set(e,r=new Fl);let i=r.elts[r.i]=ti.resolve(e,n);return r.i=(r.i+1)%Lm,i}};a(ti,"ResolvedPos");let uo=ti;const Ha=class Ha{constructor(){this.elts=[],this.i=0}};a(Ha,"ResolveCache");let Fl=Ha;const Lm=12,Sc=new WeakMap,ja=class ja{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}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)}};a(ja,"NodeRange");let kr=ja;const Fm=Object.create(null);var Yt;let Wt=(Yt=class{constructor(e,n,r,i=j.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||M.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,n,r,i=0){this.content.nodesBetween(e,n,r,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,n,r,i){return this.content.textBetween(e,n,r,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,n,r){return this.type==e&&so(this.attrs,n||e.defaultAttrs||Fm)&&j.sameSet(this.marks,r||j.none)}copy(e=null){return e==this.content?this:new Yt(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Yt(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return T.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),l=i.start(s),c=i.node(s).content.cut(i.pos-l,o.pos-l);return new T(c,i.depth-s,o.depth-s)}replace(e,n,r){return Im(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return uo.resolveCached(this,e)}resolveNoCache(e){return uo.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.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()+")"),Qf(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=M.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let u=i;u<o;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.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=j.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!j.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n 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(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=M.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}},a(Yt,"Node"),Yt);Wt.prototype.text=void 0;const ni=class ni extends Wt{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Qf(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ni(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ni(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};a(ni,"TextNode");let zl=ni;function Qf(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}a(Qf,"wrapMarks");const gs=class gs{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Pl(e,n);if(r.next==null)return gs.empty;let i=eh(r);r.next&&r.err("Unexpected trailing text");let o=jm(Hm(i));return Um(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).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:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function o(s,l){let u=s.matchFragment(e,r);if(u&&(!n||u.validEnd))return M.from(l.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:d,next:f}=s.next[c];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=o(f,l.concat(d));if(h)return h}}return null}return a(o,"search"),o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let l=i;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:l,next:u}=o.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||u.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.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 n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return a(n,"scan"),n(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
|
1
|
+
"use strict";var Dm=Object.defineProperty;var a=(t,e)=>Dm(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("vue"),X=require("./index-DZjDh7FL.cjs"),Nm=require("./FieldComponent.vue_vue_type_script_lang-Bht3oZYb.cjs"),Om=require("./_commonjsHelpers-BB06FEA1.cjs"),Rm=require("./NoSymbolIcon-BoH28Kep.cjs");function fe(t){this.content=t}a(fe,"OrderedMap");fe.prototype={constructor:fe,find:a(function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},"find"),get:a(function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},"get"),update:a(function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new fe(o)},"update"),remove:a(function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new fe(n)},"remove"),addToStart:a(function(t,e){return new fe([t,e].concat(this.remove(t).content))},"addToStart"),addToEnd:a(function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new fe(n)},"addToEnd"),addBefore:a(function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new fe(i)},"addBefore"),forEach:a(function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},"forEach"),prepend:a(function(t){return t=fe.from(t),t.size?new fe(t.content.concat(this.subtract(t).content)):this},"prepend"),append:a(function(t){return t=fe.from(t),t.size?new fe(this.subtract(t).content.concat(t.content)):this},"append"),subtract:a(function(t){var e=this;t=fe.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},"subtract"),toObject:a(function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},"toObject"),get size(){return this.content.length>>1}};fe.from=function(t){if(t instanceof fe)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new fe(e)};function qf(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=qf(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}a(qf,"findDiffStart");function Kf(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),l=e.child(--o),u=s.nodeSize;if(s==l){n-=u,r-=u;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let c=0,d=Math.min(s.text.length,l.text.length);for(;c<d&&s.text[s.text.length-c-1]==l.text[l.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||l.content.size){let c=Kf(s.content,l.content,n-1,r-1);if(c)return c}n-=u,r-=u}}a(Kf,"findDiffEnd");const de=class de{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,l=0;l<n;s++){let u=this.content[s],c=l+u.nodeSize;if(c>e&&r(u,i+l,o||null,s)!==!1&&u.content.size){let d=l+1;u.nodesBetween(Math.max(0,e-d),Math.min(u.content.size,n-d),r,i+d)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(l,u)=>{let c=l.isText?l.text.slice(Math.max(e,u)-u,n-u):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new de(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let l=this.content[o],u=s+l.nodeSize;u>e&&((s<e||u>n)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),i+=l.nodeSize),s=u}return new de(r,i)}cutByIndex(e,n){return e==n?de.empty:e==0&&n==this.content.length?this:new de(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new de(i,o)}addToStart(e){return new de([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new de(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))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 n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return qf(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Kf(this,e,n,r)}findIndex(e){if(e==0)return zi(0,e);if(e==this.size)return zi(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),o=r+i.nodeSize;if(o>=e)return o==e?zi(n+1,o):zi(n,r);r=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,n){if(!n)return de.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new de(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return de.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new de(n||e,r)}static from(e){if(!e)return de.empty;if(e instanceof de)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new de([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};a(de,"Fragment");let M=de;M.empty=new M([],0);const Js={index:0,offset:0};function zi(t,e){return Js.index=t,Js.offset=e,Js}a(zi,"retIndex");function so(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!so(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!so(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}a(so,"compareDeep");var Gt;let j=(Gt=class{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&so(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Gt.none;if(e instanceof Gt)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}},a(Gt,"Mark"),Gt);j.none=[];const Va=class Va extends Error{};a(Va,"ReplaceError");let yr=Va;const Ft=class Ft{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=Gf(this.content,e+this.openStart,n);return r&&new Ft(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Ft(Jf(this.content,e+this.openStart,n+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,n){if(!n)return Ft.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ft(M.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new Ft(e,r,i)}};a(Ft,"Slice");let T=Ft;T.empty=new T(M.empty,0,0);function Jf(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(i==e||o.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(Jf(o.content,e-i-1,n-i-1)))}a(Jf,"removeRange");function Gf(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=Gf(s.content,e-o-1,n,s);return l&&t.replaceChild(i,s.copy(l))}a(Gf,"insertInto");function Im(t,e,n){if(n.openStart>t.depth)throw new yr("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new yr("Inconsistent open depths");return Yf(t,e,n,0)}a(Im,"replace$1");function Yf(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=Yf(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,l=s.content;return wn(s,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=_m(n,t);return wn(o,Xf(t,s,l,e,r))}else return wn(o,lo(t,e,r))}a(Yf,"replaceOuter");function Zf(t,e){if(!e.type.compatibleContent(t.type))throw new yr("Cannot join "+e.type.name+" onto "+t.type.name)}a(Zf,"checkJoin");function Ll(t,e,n){let r=t.node(n);return Zf(r,e.node(n)),r}a(Ll,"joinable$1");function xn(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}a(xn,"addNode");function jr(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(xn(t.nodeAfter,r),o++));for(let l=o;l<s;l++)xn(i.child(l),r);e&&e.depth==n&&e.textOffset&&xn(e.nodeBefore,r)}a(jr,"addRange");function wn(t,e){return t.type.checkContent(e),t.copy(e)}a(wn,"close");function Xf(t,e,n,r,i){let o=t.depth>i&&Ll(t,e,i+1),s=r.depth>i&&Ll(n,r,i+1),l=[];return jr(null,t,i,l),o&&s&&e.index(i)==n.index(i)?(Zf(o,s),xn(wn(o,Xf(t,e,n,r,i+1)),l)):(o&&xn(wn(o,lo(t,e,i+1)),l),jr(e,n,i,l),s&&xn(wn(s,lo(n,r,i+1)),l)),jr(r,null,i,l),new M(l)}a(Xf,"replaceThreeWay");function lo(t,e,n){let r=[];if(jr(null,t,n,r),t.depth>n){let i=Ll(t,e,n+1);xn(wn(i,lo(t,e,n+1)),r)}return jr(e,null,n,r),new M(r)}a(lo,"replaceTwoWay");function _m(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)i=e.node(o).copy(M.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}a(_m,"prepareSliceForReplace");const ti=class ti{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.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,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return j.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new kr(this,e,r);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 n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:l,offset:u}=s.content.findIndex(o),c=o-u;if(r.push(s,l,i+u),!c||(s=s.child(l),s.isText))break;o=c-1,i+=u+1}return new ti(n,r,o)}static resolveCached(e,n){let r=Sc.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else Sc.set(e,r=new Fl);let i=r.elts[r.i]=ti.resolve(e,n);return r.i=(r.i+1)%Lm,i}};a(ti,"ResolvedPos");let uo=ti;const Ha=class Ha{constructor(){this.elts=[],this.i=0}};a(Ha,"ResolveCache");let Fl=Ha;const Lm=12,Sc=new WeakMap,ja=class ja{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}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)}};a(ja,"NodeRange");let kr=ja;const Fm=Object.create(null);var Yt;let Wt=(Yt=class{constructor(e,n,r,i=j.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||M.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,n,r,i=0){this.content.nodesBetween(e,n,r,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,n,r,i){return this.content.textBetween(e,n,r,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,n,r){return this.type==e&&so(this.attrs,n||e.defaultAttrs||Fm)&&j.sameSet(this.marks,r||j.none)}copy(e=null){return e==this.content?this:new Yt(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Yt(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return T.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),l=i.start(s),c=i.node(s).content.cut(i.pos-l,o.pos-l);return new T(c,i.depth-s,o.depth-s)}replace(e,n,r){return Im(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return uo.resolveCached(this,e)}resolveNoCache(e){return uo.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.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()+")"),Qf(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=M.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let u=i;u<o;u++)if(!this.type.allowsMarks(r.child(u).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.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=j.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!j.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n 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(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=M.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}},a(Yt,"Node"),Yt);Wt.prototype.text=void 0;const ni=class ni extends Wt{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Qf(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ni(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ni(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};a(ni,"TextNode");let zl=ni;function Qf(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}a(Qf,"wrapMarks");const gs=class gs{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Pl(e,n);if(r.next==null)return gs.empty;let i=eh(r);r.next&&r.err("Unexpected trailing text");let o=jm(Hm(i));return Um(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).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:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function o(s,l){let u=s.matchFragment(e,r);if(u&&(!n||u.validEnd))return M.from(l.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:d,next:f}=s.next[c];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=o(f,l.concat(d));if(h)return h}}return null}return a(o,"search"),o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let l=i;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:l,next:u}=o.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||u.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.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 n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return a(n,"scan"),n(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
|
2
2
|
`)}};a(gs,"ContentMatch");let Rn=gs;Rn.empty=new Rn(!0);const Ua=class Ua{constructor(e,n){this.string=e,this.nodeTypes=n,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+"')")}};a(Ua,"TokenStream");let Pl=Ua;function eh(t){let e=[];do e.push(zm(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}a(eh,"parseExpr");function zm(t){let e=[];do e.push(Pm(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}a(zm,"parseExprSeq");function Pm(t){let e=Vm(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Bm(t,e);else break;return e}a(Pm,"parseExprSubscript");function Mc(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}a(Mc,"parseNum");function Bm(t,e){let n=Mc(t),r=n;return t.eat(",")&&(t.next!="}"?r=Mc(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}a(Bm,"parseExprRange");function $m(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}a($m,"resolveName");function Vm(t){if(t.eat("(")){let e=eh(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=$m(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}a(Vm,"parseExprAtom");function Hm(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}a(n,"node");function r(s,l,u){let c={term:u,to:l};return e[s].push(c),c}a(r,"edge");function i(s,l){s.forEach(u=>u.to=l)}a(i,"connect");function o(s,l){if(s.type=="choice")return s.exprs.reduce((u,c)=>u.concat(o(c,l)),[]);if(s.type=="seq")for(let u=0;;u++){let c=o(s.exprs[u],l);if(u==s.exprs.length-1)return c;i(c,l=n())}else if(s.type=="star"){let u=n();return r(l,u),i(o(s.expr,u),u),[r(u)]}else if(s.type=="plus"){let u=n();return i(o(s.expr,l),u),i(o(s.expr,u),u),[r(u)]}else{if(s.type=="opt")return[r(l)].concat(o(s.expr,l));if(s.type=="range"){let u=l;for(let c=0;c<s.min;c++){let d=n();i(o(s.expr,u),d),u=d}if(s.max==-1)i(o(s.expr,u),u);else for(let c=s.min;c<s.max;c++){let d=n();r(u,d),i(o(s.expr,u),d),u=d}return[r(u)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}a(o,"compile")}a(Hm,"nfa");function th(t,e){return e-t}a(th,"cmp");function Ac(t,e){let n=[];return r(e),n.sort(th);function r(i){let o=t[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:l,to:u}=o[s];!l&&n.indexOf(u)==-1&&r(u)}}a(r,"scan")}a(Ac,"nullFrom");function jm(t){let e=Object.create(null);return n(Ac(t,0));function n(r){let i=[];r.forEach(s=>{t[s].forEach(({term:l,to:u})=>{if(!l)return;let c;for(let d=0;d<i.length;d++)i[d][0]==l&&(c=i[d][1]);Ac(t,u).forEach(d=>{c||i.push([l,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let o=e[r.join(",")]=new Rn(r.indexOf(t.length-1)>-1);for(let s=0;s<i.length;s++){let l=i[s][1].sort(th);o.next.push({type:i[s][0],next:e[l.join(",")]||n(l)})}return o}}a(jm,"dfa");function Um(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let l=0;l<i.next.length;l++){let{type:u,next:c}=i.next[l];s.push(u.name),o&&!(u.isText||u.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}a(Um,"checkForDeadEnds");function nh(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}a(nh,"defaultAttrs");function rh(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let o=t[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}a(rh,"computeAttrs");function ih(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}a(ih,"checkAttrs");function oh(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Bl(t,r,e[r]);return n}a(oh,"initAttrs");var Mn;let Tc=(Mn=class{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=oh(e,r.attrs),this.defaultAttrs=nh(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Rn.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:rh(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Wt(this,this.computeAttrs(e),M.from(n),j.setFrom(r))}createChecked(e=null,n,r){return n=M.from(n),this.checkContent(n),new Wt(this,this.computeAttrs(e),n,j.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=M.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(M.empty,!0);return o?new Wt(this,e,n.append(o),j.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).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){ih(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 n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:j.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new Mn(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}},a(Mn,"NodeType"),Mn);function Wm(t,e,n){let r=n.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`)}}a(Wm,"validateType");const Wa=class Wa{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Wm(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}};a(Wa,"Attribute");let Bl=Wa;const bs=class bs{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=oh(e,i.attrs),this.excluded=null;let o=nh(this.attrs);this.instance=o?new j(this,o):null}create(e=null){return!e&&this.instance?this.instance:new j(this,rh(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new bs(o,i++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){ih(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}};a(bs,"MarkType");let ao=bs;const qa=class qa{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=fe.from(e.nodes),n.marks=fe.from(e.marks||{}),this.nodes=Tc.compile(this.spec.nodes,this),this.marks=ao.compile(this.spec.marks,this);let r=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 o=this.nodes[i],s=o.spec.content||"",l=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=Rn.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=l=="_"?null:l?Dc(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:Dc(this,s.split(" "))}this.nodeFromJSON=i=>Wt.fromJSON(this,i),this.markFromJSON=i=>j.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Tc){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(n,r,i)}text(e,n){let r=this.nodes.text;return new zl(r,r.defaultAttrs,e,j.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};a(qa,"Schema");let ai=qa;function Dc(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let l in t.marks){let u=t.marks[l];(i=="_"||u.spec.group&&u.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=u)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}a(Dc,"gatherMarks");function qm(t){return t.tag!=null}a(qm,"isTagRule");function Km(t){return t.style!=null}a(Km,"isStyleRule");const ri=class ri{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(qm(i))this.tags.push(i);else if(Km(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new co(this,n,!1);return r.addAll(e,j.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new co(this,n,!0);return r.addAll(e,j.none,n.from,n.to),T.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(Ym(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(s.getAttrs){let u=s.getAttrs(n);if(u===!1)continue;s.attrs=u||void 0}return s}}}static schemaRules(e){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let l=n[s];if((l.priority==null?50:l.priority)<o)break}n.splice(s,0,i)}a(r,"insert");for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Oc(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Oc(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new ri(e,ri.schemaRules(e)))}};a(ri,"DOMParser");let qt=ri;const sh={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},Jm={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},lh={ol:!0,ul:!0},ci=1,$l=2,Ur=4;function Nc(t,e,n){return e!=null?(e?ci:0)|(e==="full"?$l:0):t&&t.whitespace=="pre"?ci|$l:n&~Ur}a(Nc,"wsOptionsFor");const Ka=class Ka{constructor(e,n,r,i,o,s){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=j.none,this.match=o||(s&Ur?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(M.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&ci)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=M.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(M.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!sh.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}};a(Ka,"NodeContext");let qn=Ka;const Ja=class Ja{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,o,s=Nc(null,n.preserveWhitespace,0)|(r?Ur:0);i?o=new qn(i.type,i.attrs,j.none,!0,n.topMatch||i.type.contentMatch,s):r?o=new qn(null,null,j.none,!0,null,s):o=new qn(e.schema.topNodeType,null,j.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,o=i.options&$l?"full":this.localPreserveWS||(i.options&ci)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let u=0;u<l.length;u++)u&&this.insertNode(s.linebreakReplacement.create(),n,!0),l[u]&&this.insertNode(s.text(l[u]),n,!/\S/.test(l[u]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=i.content[i.content.length-1],u=e.previousSibling;(!l||u&&u.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),l;lh.hasOwnProperty(s)&&this.parser.normalizeLists&&Gm(e);let u=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(u?u.ignore:Jm.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!u||u.skip||u.closeParent){u&&u.closeParent?this.open=Math.max(0,this.open-1):u&&u.skip.nodeType&&(e=u.skip);let c,d=this.needsBlock;if(sh.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let f=u&&u.skip?n:this.readStyles(e,n);f&&this.addAll(e,f),c&&this.sync(o),this.needsBlock=d}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,u,c,u.consuming===!1?l:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let l=void 0;;){let u=this.parser.matchStyle(o,s,this,l);if(!u)break;if(u.ignore)return null;if(u.clearMark?n=n.filter(c=>!u.clearMark(c)):n=n.concat(this.parser.schema.marks[u.mark].create(u.attrs)),u.consuming===!1)l=u;else break}}return n}addElementByRule(e,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let u=this.enter(s,n.attrs||null,r,n.preserveWhitespace);u&&(o=!0,r=u)}else{let u=this.parser.schema.marks[n.mark];r=r.concat(u.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(u=>this.insertNode(u,r,!1));else{let u=e;typeof n.contentElement=="string"?u=e.querySelector(n.contentElement):typeof n.contentElement=="function"?u=n.contentElement(e):n.contentElement&&(u=n.contentElement),this.findAround(e,u,!0),this.addAll(u,r),this.findAround(e,u,!1)}o&&this.sync(l)&&this.open--}addAll(e,n,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];s!=l;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,n);this.findAtPoint(e,o)}findPlace(e,n,r){let i,o;for(let s=this.open,l=0;s>=0;s--){let u=this.nodes[s],c=u.findWrapping(e);if(c&&(!i||i.length>c.length+l)&&(i=c,o=u,!c.length))break;if(u.solid){if(r)break;l+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=j.none;for(let l of i.concat(e.marks))(o.type?o.type.allowsMarkType(l.type):Rc(l.type,e.type))&&(s=l.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,n,r,i){let o=this.findPlace(e.create(n),r,!1);return o&&(o=this.enterInner(e,n,r,!0,i)),o}enterInner(e,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=Nc(e,o,s.options);s.options&Ur&&s.content.length==0&&(l|=Ur);let u=j.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):Rc(c.type,e))?(u=c.addToSet(u),!1):!0),this.nodes.push(new qn(e,n,u,i,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].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 n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=ci)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&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)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=a((l,u)=>{for(;l>=0;l--){let c=n[l];if(c==""){if(l==n.length-1||l==0)continue;for(;u>=o;u--)if(s(l-1,u))return!0;return!1}else{let d=u>0||u==0&&i?this.nodes[u].type:r&&u>=o?r.node(u-o).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;u--}}return!0},"match");return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};a(Ja,"ParseContext");let co=Ja;function Gm(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&lh.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}a(Gm,"normalizeList");function Ym(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}a(Ym,"matches");function Oc(t){let e={};for(let n in t)e[n]=t[n];return e}a(Oc,"copy");function Rc(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=a(l=>{o.push(l);for(let u=0;u<l.edgeCount;u++){let{type:c,next:d}=l.edge(u);if(c==e||o.indexOf(d)<0&&s(d))return!0}},"scan");if(s(i.contentMatch))return!0}}a(Rc,"markMayApply");const ys=class ys{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Gs(n).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let l=0,u=0;for(;l<o.length&&u<s.marks.length;){let c=s.marks[u];if(!this.marks[c.type.name]){u++;continue}if(!c.eq(o[l][0])||c.type.spec.spanning===!1)break;l++,u++}for(;l<o.length;)i=o.pop()[1];for(;u<s.marks.length;){let c=s.marks[u++],d=this.serializeMark(c,s.isInline,n);d&&(o.push([c,i]),i.appendChild(d.dom),i=d.contentDOM||d.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=eo(Gs(n),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,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&eo(Gs(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return eo(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ys(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Ic(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Ic(e.marks)}};a(ys,"DOMSerializer");let In=ys;function Ic(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}a(Ic,"gatherToDOM");function Gs(t){return t.document||window.document}a(Gs,"doc$1");const _c=new WeakMap;function Zm(t){let e=_c.get(t);return e===void 0&&_c.set(t,e=Xm(t)),e}a(Zm,"suspiciousAttributes");function Xm(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return a(n,"scan"),n(t),e}a(Xm,"suspiciousAttributesInner");function eo(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=Zm(r))&&o.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 s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let l,u=n?t.createElementNS(n,i):t.createElement(i),c=e[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let f in c)if(c[f]!=null){let h=f.indexOf(" ");h>0?u.setAttributeNS(f.slice(0,h),f.slice(h+1),c[f]):f=="style"&&u.style?u.style.cssText=c[f]:u.setAttribute(f,c[f])}}for(let f=d;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}else{let{dom:p,contentDOM:m}=eo(t,h,n,r);if(u.appendChild(p),m){if(l)throw new RangeError("Multiple content holes");l=m}}}return{dom:u,contentDOM:l}}a(eo,"renderSpec");const uh=65535,ah=Math.pow(2,16);function Qm(t,e){return t+e*ah}a(Qm,"makeRecover");function Lc(t){return t&uh}a(Lc,"recoverIndex");function e1(t){return(t-(t&uh))/ah}a(e1,"recoverOffset");const ch=1,dh=2,to=4,fh=8,Ga=class Ga{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&fh)>0}get deletedBefore(){return(this.delInfo&(ch|to))>0}get deletedAfter(){return(this.delInfo&(dh|to))>0}get deletedAcross(){return(this.delInfo&to)>0}};a(Ga,"MapResult");let di=Ga;const zt=class zt{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&zt.empty)return zt.empty}recover(e){let n=0,r=Lc(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+e1(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let u=this.ranges[l]-(this.inverted?i:0);if(u>e)break;let c=this.ranges[l+o],d=this.ranges[l+s],f=u+c;if(e<=f){let h=c?e==u?-1:e==f?1:n:n,p=u+i+(h<0?0:d);if(r)return p;let m=e==(n<0?u:f)?null:Qm(l/3,e-u),g=e==u?dh:e==f?ch:to;return(n<0?e!=u:e!=f)&&(g|=fh),new di(p,g,m)}i+=d-c}return r?e+i:new di(e+i,0,null)}touches(e,n){let r=0,i=Lc(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let u=this.ranges[l]-(this.inverted?r:0);if(u>e)break;let c=this.ranges[l+o],d=u+c;if(e<=d&&l==i*3)return!0;r+=this.ranges[l+s]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],l=s-(this.inverted?o:0),u=s+(this.inverted?0:o),c=this.ranges[i+n],d=this.ranges[i+r];e(l,l+c,u,u+d),o+=d-c}}invert(){return new zt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?zt.empty:new zt(e<0?[0,-e,0]:[0,0,e])}};a(zt,"StepMap");let St=zt;St.empty=new St([]);const ii=class ii{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new ii(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new ii;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],l=s.mapResult(e,n);if(l.recover!=null){let u=this.getMirror(o);if(u!=null&&u>o&&u<this.to){o=u,e=this._maps[u].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new di(e,i,null)}};a(ii,"Mapping");let fo=ii;const Ys=Object.create(null),Ya=class Ya{getMap(){return St.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ys[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Ys)throw new RangeError("Duplicate use of step JSON ID "+e);return Ys[e]=n,n.prototype.jsonID=e,n}};a(Ya,"Step");let ce=Ya;const un=class un{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new un(e,null)}static fail(e){return new un(null,e)}static fromReplace(e,n,r,i){try{return un.ok(e.replace(n,r,i))}catch(o){if(o instanceof yr)return un.fail(o.message);throw o}}};a(un,"StepResult");let me=un;function Hu(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(Hu(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return M.fromArray(r)}a(Hu,"mapFragment");const an=class an extends ce{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new T(Hu(n.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return me.fromReplace(e,this.from,this.to,o)}invert(){return new Zt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new an(n.pos,r.pos,this.mark)}merge(e){return e instanceof an&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new an(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new an(n.from,n.to,e.markFromJSON(n.mark))}};a(an,"AddMarkStep");let fi=an;ce.jsonID("addMark",fi);const cn=class cn extends ce{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new T(Hu(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return me.fromReplace(e,this.from,this.to,r)}invert(){return new fi(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new cn(n.pos,r.pos,this.mark)}merge(e){return e instanceof cn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new cn(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new cn(n.from,n.to,e.markFromJSON(n.mark))}};a(cn,"RemoveMarkStep");let Zt=cn;ce.jsonID("removeMark",Zt);const dn=class dn extends ce{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return me.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return me.fromReplace(e,this.pos,this.pos+1,new T(M.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new dn(this.pos,n.marks[i]);return new dn(this.pos,this.mark)}}return new xr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new dn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new dn(n.pos,e.markFromJSON(n.mark))}};a(dn,"AddNodeMarkStep");let hi=dn;ce.jsonID("addNodeMark",hi);const oi=class oi extends ce{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return me.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return me.fromReplace(e,this.pos,this.pos+1,new T(M.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new hi(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new oi(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new oi(n.pos,e.markFromJSON(n.mark))}};a(oi,"RemoveNodeMarkStep");let xr=oi;ce.jsonID("removeNodeMark",xr);const Qe=class Qe extends ce{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Vl(e,this.from,this.to)?me.fail("Structure replace would overwrite content"):me.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new St([this.from,this.to-this.from,this.slice.size])}invert(e){return new Qe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&Qe.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new Qe(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Qe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?T.empty:new T(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Qe(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?T.empty:new T(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Qe(e.from,this.to,n,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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Qe(n.from,n.to,T.fromJSON(e,n.slice),!!n.structure)}};a(Qe,"ReplaceStep");let De=Qe;De.MAP_BIAS=1;ce.jsonID("replace",De);const Kn=class Kn extends ce{constructor(e,n,r,i,o,s,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=l}apply(e){if(this.structure&&(Vl(e,this.from,this.gapFrom)||Vl(e,this.gapTo,this.to)))return me.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return me.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?me.fromReplace(e,this.from,this.to,r):me.fail("Content does not fit in gap")}getMap(){return new St([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Kn(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new Kn(n.pos,r.pos,i,o,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,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Kn(n.from,n.to,n.gapFrom,n.gapTo,T.fromJSON(e,n.slice),n.insert,!!n.structure)}};a(Kn,"ReplaceAroundStep");let ye=Kn;ce.jsonID("replaceAround",ye);function Vl(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}a(Vl,"contentBetween");function t1(t,e,n,r){let i=[],o=[],s,l;t.doc.nodesBetween(e,n,(u,c,d)=>{if(!u.isInline)return;let f=u.marks;if(!r.isInSet(f)&&d.type.allowsMarkType(r.type)){let h=Math.max(c,e),p=Math.min(c+u.nodeSize,n),m=r.addToSet(f);for(let g=0;g<f.length;g++)f[g].isInSet(m)||(s&&s.to==h&&s.mark.eq(f[g])?s.to=p:i.push(s=new Zt(h,p,f[g])));l&&l.to==h?l.to=p:o.push(l=new fi(h,p,r))}}),i.forEach(u=>t.step(u)),o.forEach(u=>t.step(u))}a(t1,"addMark");function n1(t,e,n,r){let i=[],o=0;t.doc.nodesBetween(e,n,(s,l)=>{if(!s.isInline)return;o++;let u=null;if(r instanceof ao){let c=s.marks,d;for(;d=r.isInSet(c);)(u||(u=[])).push(d),c=d.removeFromSet(c)}else r?r.isInSet(s.marks)&&(u=[r]):u=s.marks;if(u&&u.length){let c=Math.min(l+s.nodeSize,n);for(let d=0;d<u.length;d++){let f=u[d],h;for(let p=0;p<i.length;p++){let m=i[p];m.step==o-1&&f.eq(i[p].style)&&(h=m)}h?(h.to=c,h.step=o):i.push({style:f,from:Math.max(l,e),to:c,step:o})}}}),i.forEach(s=>t.step(new Zt(s.from,s.to,s.style)))}a(n1,"removeMark");function ju(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],l=e+1;for(let u=0;u<o.childCount;u++){let c=o.child(u),d=l+c.nodeSize,f=r.matchType(c.type);if(!f)s.push(new De(l,d,T.empty));else{r=f;for(let h=0;h<c.marks.length;h++)n.allowsMarkType(c.marks[h].type)||t.step(new Zt(l,d,c.marks[h]));if(i&&c.isText&&n.whitespace!="pre"){let h,p=/\r?\n|\r/g,m;for(;h=p.exec(c.text);)m||(m=new T(M.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),s.push(new De(l+h.index,l+h.index+h[0].length,m))}}l=d}if(!r.validEnd){let u=r.fillBefore(M.empty,!0);t.replace(l,l,new T(u,0,0))}for(let u=s.length-1;u>=0;u--)t.step(s[u])}a(ju,"clearIncompatible");function r1(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}a(r1,"canCut");function Ir(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,o=0;;--r){let s=t.$from.node(r),l=t.$from.index(r)+i,u=t.$to.indexAfter(r)-o;if(r<t.depth&&s.canReplace(l,u,n))return r;if(r==0||s.type.spec.isolating||!r1(s,l,u))break;l&&(i=1),u<s.childCount&&(o=1)}return null}a(Ir,"liftTarget");function i1(t,e,n){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),l=i.after(o+1),u=s,c=l,d=M.empty,f=0;for(let m=o,g=!1;m>n;m--)g||r.index(m)>0?(g=!0,d=M.from(r.node(m).copy(d)),f++):u--;let h=M.empty,p=0;for(let m=o,g=!1;m>n;m--)g||i.after(m+1)<i.end(m)?(g=!0,h=M.from(i.node(m).copy(h)),p++):c++;t.step(new ye(u,c,s,l,new T(d.append(h),f,p),d.size-f,!0))}a(i1,"lift$2");function Uu(t,e,n=null,r=t){let i=o1(t,e),o=i&&s1(r,e);return o?i.map(Fc).concat({type:e,attrs:n}).concat(o.map(Fc)):null}a(Uu,"findWrapping");function Fc(t){return{type:t,attrs:null}}a(Fc,"withAttrs");function o1(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return n.canReplaceWith(r,i,s)?o:null}a(o1,"findWrappingOutside");function s1(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let u=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;u&&c<i;c++)u=u.matchType(n.child(c).type);return!u||!u.validEnd?null:s}a(s1,"findWrappingInside");function l1(t,e,n){let r=M.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=M.from(n[s].type.create(n[s].attrs,r))}let i=e.start,o=e.end;t.step(new ye(i,o,i,o,new T(r,0,0),n.length,!0))}a(l1,"wrap");function u1(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(s,l)=>{let u=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,u)&&a1(t.doc,t.mapping.slice(o).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?c=!1:!p&&m&&(c=!0)}c===!1&&ph(t,s,l,o),ju(t,t.mapping.slice(o).map(l,1),r,void 0,c===null);let d=t.mapping.slice(o),f=d.map(l,1),h=d.map(l+s.nodeSize,1);return t.step(new ye(f,h,f+1,h-1,new T(M.from(r.create(u,null,s.marks)),0,0),1,!0)),c===!0&&hh(t,s,l,o),!1}})}a(u1,"setBlockType$1");function hh(t,e,n,r){e.forEach((i,o)=>{if(i.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(i.text);){let u=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(u,u+1,e.type.schema.linebreakReplacement.create())}}})}a(hh,"replaceNewlines");function ph(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+o);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
@@ -5696,7 +5696,7 @@ __decorate([
|
|
|
5696
5696
|
__metadata("design:paramtypes", [Boolean]),
|
|
5697
5697
|
__metadata("design:returntype", void 0)
|
|
5698
5698
|
], ButtonInherited$1.prototype, "onDisabledChanged", null);
|
|
5699
|
-
const VSTButton = defineAsyncComponent(() => import("./Button-
|
|
5699
|
+
const VSTButton = defineAsyncComponent(() => import("./Button-mNgrIBt0.js")), ki = class ki extends BaseComponent$1 {
|
|
5700
5700
|
emits = [
|
|
5701
5701
|
"click",
|
|
5702
5702
|
"touchstart",
|
|
@@ -5969,7 +5969,7 @@ __decorate([
|
|
|
5969
5969
|
__metadata("design:paramtypes", [Boolean]),
|
|
5970
5970
|
__metadata("design:returntype", void 0)
|
|
5971
5971
|
], ButtonInherited.prototype, "onDisabledChanged", null);
|
|
5972
|
-
const index$8 = defineAsyncComponent(() => import("./Tabs-
|
|
5972
|
+
const index$8 = defineAsyncComponent(() => import("./Tabs-CAbUgriG.js")), VSTScrollbar = defineAsyncComponent(() => import("./Scrollbar-CBCuild6.js")), index$7 = defineAsyncComponent(() => import("./Draggable-xSaOZkIc.js")), index$6 = defineAsyncComponent(() => import("./Droppable-DGc3gGXX.js")), index$5 = defineAsyncComponent(() => import("./SelectField-BN765HUF.js")), VSTStringField = defineAsyncComponent(() => import("./StringField-DXuKHlpt.js")), index$4 = defineAsyncComponent(() => import("./SwitchField-BdKQGeSb.js")), index$3 = defineAsyncComponent(() => import("./TextField-BTofkhCU.js")), index$2 = defineAsyncComponent(() => import("./FilesArea-C9z4gTb0.js")), index$1 = defineAsyncComponent(() => import("./DateField-DJgLEfuJ.js"));
|
|
5973
5973
|
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor, __decorateClass$1 = /* @__PURE__ */ Jn((bn, Rn, Gn, Kn) => {
|
|
5974
5974
|
for (var eo = Kn > 1 ? void 0 : Kn ? __getOwnPropDesc$1(Rn, Gn) : Rn, co = bn.length - 1, po; co >= 0; co--)
|
|
5975
5975
|
(po = bn[co]) && (eo = po(eo) || eo);
|
|
@@ -6237,7 +6237,7 @@ __decorateClass([
|
|
|
6237
6237
|
__decorateClass([
|
|
6238
6238
|
Watch({ deep: !0 })
|
|
6239
6239
|
], FieldComponent.prototype, "watchModelValue", 1);
|
|
6240
|
-
const index = defineAsyncComponent(() => import("./CodeHighlight-
|
|
6240
|
+
const index = defineAsyncComponent(() => import("./CodeHighlight-eMrWWqjO.js"));
|
|
6241
6241
|
export {
|
|
6242
6242
|
ButtonInherited$1 as B,
|
|
6243
6243
|
Component as C,
|