ablok-components 0.1.40 → 0.1.41
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.
|
@@ -267,9 +267,9 @@ const Z2 = /* @__PURE__ */ W1($1, [["render", X1]]), Y1 = ["type", "disabled"],
|
|
|
267
267
|
ae(n.$slots, "default", {}, () => [
|
|
268
268
|
t.icon ? (AA(), bw(i, {
|
|
269
269
|
key: 0,
|
|
270
|
-
|
|
270
|
+
symbol: t.icon,
|
|
271
271
|
class: "base-button__caption"
|
|
272
|
-
}, null, 8, ["
|
|
272
|
+
}, null, 8, ["symbol"])) : Bt("", !0),
|
|
273
273
|
z(e) ? (AA(), rA("span", {
|
|
274
274
|
key: 1,
|
|
275
275
|
class: IA(["base-button__caption", { "icon-padding": t.icon }])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(MA,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("vue"),require("@popperjs/core")):typeof define=="function"&&define.amd?define(["exports","vue","@popperjs/core"],h):(MA=typeof globalThis<"u"?globalThis:MA||self,h(MA.AblokComponents={},MA.Vue,MA.core))})(this,function(MA,h,Pd){"use strict";const By={class:"icon",preserveAspectRatio:"xMaxYMin"},my=["xlink:href"],wy=h.defineComponent({__name:"svg-icon",props:{basePath:{type:String,default:"/symbol-defs.svg"},prefix:{type:String,default:"icon-"},symbol:{type:String,default:""},size:{type:String,default:"default"}},setup(t){return(A,e)=>(h.openBlock(),h.createElementBlock("i",{class:h.normalizeClass(["svg-icon",{[`svg-icon--${t.size}`]:t.size}])},[(h.openBlock(),h.createElementBlock("svg",By,[h.createElementVNode("use",{"xlink:href":`${t.basePath}#${t.prefix}${t.symbol}`,"xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0",y:"0"},null,8,my)]))],2))}}),dP="",Cy={class:"loading-spinner d-block"},yy={class:"loading-spinner__animation"},Qy={class:"d-block",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},Ey=["fill"],Fy=[h.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],Uy=h.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(A,e)=>(h.openBlock(),h.createElementBlock("span",Cy,[h.createElementVNode("span",yy,[(h.openBlock(),h.createElementBlock("svg",Qy,[h.createElementVNode("path",{fill:t.color,d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},Fy,8,Ey)]))]),h.renderSlot(A.$slots,"default")]))}}),pP="",by=h.defineComponent({__name:"base-headline",props:{tag:null,size:null,variant:null,text:null,className:null},setup(t){const A=t,e=h.computed(()=>A.tag||"p");return(n,r)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(e)),{class:h.normalizeClass(["headline",`${t.size} headline--${t.size}${t.className||""}`])},{default:h.withCtx(()=>[h.renderSlot(n.$slots,"default",{},()=>[h.createTextVNode(h.toDisplayString(t.text),1)])]),_:3},8,["class"]))}}),vy=h.defineComponent({__name:"base-paragraph",props:{size:null,variant:null,text:null,className:null},setup(t){return(A,e)=>(h.openBlock(),h.createElementBlock("p",{class:h.normalizeClass(["base-paragraph",`${t.size} ${t.className||""}`])},[h.renderSlot(A.$slots,"default",{},()=>[h.createTextVNode(h.toDisplayString(t.text),1)])],2))}});function we(){return(new Date().valueOf()+Math.random()).toString(36).replace(".","")}const Iy={class:"accordion-item"},Sy=["id"],Ty=["data-bs-target","aria-controls"],xy={class:"flex-grow-1"},Hy=["id","aria-labelledby","data-bs-parent"],Ly={class:"accordion-body"},_y=["innerHTML"],Oy=h.defineComponent({__name:"accordion-item",props:{id:{type:String,default:()=>we()},modelValue:{type:Boolean,default:!1},title:{type:String,default:"Accordion Title"},body:{type:String,default:"<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Nisi aut, nobis inventore repudiandae quo laboriosam. Dicta placeat ullam harum optio expedita. Harum fugiat suscipit sapiente quos, molestias neque eaque omnis?</p>"},parent:{type:String,default:""}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t;function n(){A("update:modelValue",!e.modelValue)}return(r,i)=>(h.openBlock(),h.createElementBlock("div",Iy,[h.createElementVNode("div",{class:"accordion-header",id:`heading${t.id}`},[h.createElementVNode("button",{class:h.normalizeClass(["accordion-button",!t.modelValue&&"collapsed"]),type:"button","data-bs-toggle":"collapse","data-bs-target":`#target${t.id}`,"aria-expanded":"true","aria-controls":`target${t.id}`,onClick:n},[h.renderSlot(r.$slots,"toggle",{},()=>[h.createElementVNode("span",xy,h.toDisplayString(t.title),1)])],10,Ty)],8,Sy),h.createElementVNode("div",{class:h.normalizeClass(["accordion-collapse collapse",t.modelValue&&"show"]),id:`target${t.id}`,"aria-labelledby":`heading${t.id}`,"data-bs-parent":t.parent},[h.createElementVNode("div",Ly,[h.renderSlot(r.$slots,"body",{},()=>[h.createElementVNode("article",{innerHTML:t.body},null,8,_y)])])],10,Hy)]))}}),gP="",My=(t,A)=>{const e=t.__vccOpts||t;for(const[n,r]of A)e[n]=r;return e},Dy={},ky={class:"accordion"};function Ny(t,A){return h.openBlock(),h.createElementBlock("div",ky,[h.renderSlot(t.$slots,"default")])}const Ry=My(Dy,[["render",Ny]]),Ky=["type","disabled"],Vy=h.defineComponent({__name:"base-button",props:{type:{type:null},caption:{type:String},variant:{type:String},color:{type:String,default:"primary"},size:{type:String},icon:{type:String},disabled:{type:Boolean,default:!1},pending:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},circle:{type:Boolean,default:!1}},setup(t){const A=t,e=h.computed(()=>A.caption&&!A.circle);return(n,r)=>{const i=h.resolveComponent("svg-icon");return h.openBlock(),h.createElementBlock("button",{type:t.type,disabled:t.disabled,class:h.normalizeClass(["btn",{disabled:t.disabled,pending:t.pending,rounded:t.rounded,"rounded-circle":t.circle,[`btn-${t.color}`]:!t.outlined,[`btn-outline-${t.color}`]:t.outlined,"x-large":t.size==="x-large",large:t.size==="large",small:t.size==="small","x-small":t.size==="x-small"}])},[h.renderSlot(n.$slots,"default",{},()=>[t.icon?(h.openBlock(),h.createBlock(i,{key:0,id:t.icon,class:"base-button__caption"},null,8,["id"])):h.createCommentVNode("",!0),h.unref(e)?(h.openBlock(),h.createElementBlock("span",{key:1,class:h.normalizeClass(["base-button__caption",{"icon-padding":t.icon}])},h.toDisplayString(t.caption),3)):h.createCommentVNode("",!0)])],10,Ky)}}}),BP="",Py={class:"input-group base-input__input-group"},Gy=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","true-value","false-value","aria-label"],Wy=["for","innerHTML"],$y=h.defineComponent({__name:"base-input",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>we()},id:{type:String,default:()=>we()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t,n=h.computed({get(){return e.modelValue},set(r){A("update:modelValue",r)}});return(r,i)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["input",`input--${t.type}`])},[h.createElementVNode("div",Py,[h.renderSlot(r.$slots,"input-prepend",{slotScope:"props"}),h.withDirectives(h.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=s=>h.isRef(n)?n.value=s:null),type:t.type==="color"?"text":t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength,"true-value":t.trueValue,"false-value":t.falseValue,class:h.normalizeClass(["form-control",{"form-check-input":t.type==="checkbox"}]),"aria-label":t.label},null,10,Gy),[[h.vModelDynamic,h.unref(n)]]),h.renderSlot(r.$slots,"input-append",{slotScope:"props"})]),h.renderSlot(r.$slots,"label",{},()=>[t.label?(h.openBlock(),h.createElementBlock("label",{key:0,for:t.id,class:h.normalizeClass(["input__label",{"form-check-label":t.type==="checkbox"}]),innerHTML:`${t.label}${t.required?" *":""}`},null,10,Wy)):h.createCommentVNode("",!0)])],2))}}),mP="",Jy={class:"input input--textarea"},Xy=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","aria-label"],Yy=["for","innerHTML"],zy=h.defineComponent({__name:"input-textarea",props:{modelValue:{type:String,default:""},type:{type:String,default:"text"},name:{type:String,default:()=>we()},id:{type:String,default:()=>we()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},checked:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t,n=h.computed({get(){return e.modelValue},set(r){A("update:modelValue",r)}});return(r,i)=>(h.openBlock(),h.createElementBlock("div",Jy,[h.renderSlot(r.$slots,"input-prepend"),h.withDirectives(h.createElementVNode("textarea",{"onUpdate:modelValue":i[0]||(i[0]=s=>h.isRef(n)?n.value=s:null),type:t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength,class:h.normalizeClass(["form-control",{}]),"aria-label":t.label},null,8,Xy),[[h.vModelText,h.unref(n)]]),h.renderSlot(r.$slots,"input-append"),h.renderSlot(r.$slots,"label",{},()=>[h.createElementVNode("label",{for:t.id,class:h.normalizeClass(["input__label",{"form-check-label":t.type==="checkbox"}]),innerHTML:`${t.label}${t.required?" *":""}`},null,10,Yy)])]))}}),qy=["value","id","name","required","disabled","true-value","false-value"],Zy=["for","innerHTML"],jy=h.createElementVNode("span",{class:"input__error"},"error",-1),AQ=h.defineComponent({__name:"input-checkbox",props:{id:{type:String},name:{type:String},label:{type:String},error:{type:String},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},modelValue:{type:[Boolean,Array]},value:{type:[String,Object]},checked:{type:Boolean},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1}},emits:["update:modelValue","update:checked"],setup(t,{emit:A}){const e=t,n=h.computed({get(){return e.modelValue||e.checked},set(r){A("update:checked",r),A("update:modelValue",r)}});return(r,i)=>(h.openBlock(),h.createElementBlock("div",{class:"form-check input input--checkbox",onClick:i[1]||(i[1]=h.withModifiers(s=>r.void,["stop"]))},[h.withDirectives(h.createElementVNode("input",{ref:"input","onUpdate:modelValue":i[0]||(i[0]=s=>h.isRef(n)?n.value=s:null),value:t.value,id:t.id,name:t.name,type:"checkbox",required:t.required,disabled:t.disabled,class:"form-check-input","true-value":t.trueValue,"false-value":t.falseValue},null,8,qy),[[h.vModelCheckbox,h.unref(n)]]),h.createElementVNode("label",{class:"input__label form-check-label",for:t.id,innerHTML:t.label},null,8,Zy),jy]))}}),wP=`:root,*:before,*:after{--border-color: #ced4da;--border-radius: .25rem}.input--checkbox{flex-flow:row;gap:.5rem}.input--checkbox input{order:0}
|
|
1
|
+
(function(MA,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("vue"),require("@popperjs/core")):typeof define=="function"&&define.amd?define(["exports","vue","@popperjs/core"],h):(MA=typeof globalThis<"u"?globalThis:MA||self,h(MA.AblokComponents={},MA.Vue,MA.core))})(this,function(MA,h,Pd){"use strict";const By={class:"icon",preserveAspectRatio:"xMaxYMin"},my=["xlink:href"],wy=h.defineComponent({__name:"svg-icon",props:{basePath:{type:String,default:"/symbol-defs.svg"},prefix:{type:String,default:"icon-"},symbol:{type:String,default:""},size:{type:String,default:"default"}},setup(t){return(A,e)=>(h.openBlock(),h.createElementBlock("i",{class:h.normalizeClass(["svg-icon",{[`svg-icon--${t.size}`]:t.size}])},[(h.openBlock(),h.createElementBlock("svg",By,[h.createElementVNode("use",{"xlink:href":`${t.basePath}#${t.prefix}${t.symbol}`,"xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0",y:"0"},null,8,my)]))],2))}}),dP="",Cy={class:"loading-spinner d-block"},yy={class:"loading-spinner__animation"},Qy={class:"d-block",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},Ey=["fill"],Fy=[h.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],Uy=h.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(A,e)=>(h.openBlock(),h.createElementBlock("span",Cy,[h.createElementVNode("span",yy,[(h.openBlock(),h.createElementBlock("svg",Qy,[h.createElementVNode("path",{fill:t.color,d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},Fy,8,Ey)]))]),h.renderSlot(A.$slots,"default")]))}}),pP="",by=h.defineComponent({__name:"base-headline",props:{tag:null,size:null,variant:null,text:null,className:null},setup(t){const A=t,e=h.computed(()=>A.tag||"p");return(n,r)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(e)),{class:h.normalizeClass(["headline",`${t.size} headline--${t.size}${t.className||""}`])},{default:h.withCtx(()=>[h.renderSlot(n.$slots,"default",{},()=>[h.createTextVNode(h.toDisplayString(t.text),1)])]),_:3},8,["class"]))}}),vy=h.defineComponent({__name:"base-paragraph",props:{size:null,variant:null,text:null,className:null},setup(t){return(A,e)=>(h.openBlock(),h.createElementBlock("p",{class:h.normalizeClass(["base-paragraph",`${t.size} ${t.className||""}`])},[h.renderSlot(A.$slots,"default",{},()=>[h.createTextVNode(h.toDisplayString(t.text),1)])],2))}});function we(){return(new Date().valueOf()+Math.random()).toString(36).replace(".","")}const Iy={class:"accordion-item"},Sy=["id"],Ty=["data-bs-target","aria-controls"],xy={class:"flex-grow-1"},Hy=["id","aria-labelledby","data-bs-parent"],Ly={class:"accordion-body"},_y=["innerHTML"],Oy=h.defineComponent({__name:"accordion-item",props:{id:{type:String,default:()=>we()},modelValue:{type:Boolean,default:!1},title:{type:String,default:"Accordion Title"},body:{type:String,default:"<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Nisi aut, nobis inventore repudiandae quo laboriosam. Dicta placeat ullam harum optio expedita. Harum fugiat suscipit sapiente quos, molestias neque eaque omnis?</p>"},parent:{type:String,default:""}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t;function n(){A("update:modelValue",!e.modelValue)}return(r,i)=>(h.openBlock(),h.createElementBlock("div",Iy,[h.createElementVNode("div",{class:"accordion-header",id:`heading${t.id}`},[h.createElementVNode("button",{class:h.normalizeClass(["accordion-button",!t.modelValue&&"collapsed"]),type:"button","data-bs-toggle":"collapse","data-bs-target":`#target${t.id}`,"aria-expanded":"true","aria-controls":`target${t.id}`,onClick:n},[h.renderSlot(r.$slots,"toggle",{},()=>[h.createElementVNode("span",xy,h.toDisplayString(t.title),1)])],10,Ty)],8,Sy),h.createElementVNode("div",{class:h.normalizeClass(["accordion-collapse collapse",t.modelValue&&"show"]),id:`target${t.id}`,"aria-labelledby":`heading${t.id}`,"data-bs-parent":t.parent},[h.createElementVNode("div",Ly,[h.renderSlot(r.$slots,"body",{},()=>[h.createElementVNode("article",{innerHTML:t.body},null,8,_y)])])],10,Hy)]))}}),gP="",My=(t,A)=>{const e=t.__vccOpts||t;for(const[n,r]of A)e[n]=r;return e},Dy={},ky={class:"accordion"};function Ny(t,A){return h.openBlock(),h.createElementBlock("div",ky,[h.renderSlot(t.$slots,"default")])}const Ry=My(Dy,[["render",Ny]]),Ky=["type","disabled"],Vy=h.defineComponent({__name:"base-button",props:{type:{type:null},caption:{type:String},variant:{type:String},color:{type:String,default:"primary"},size:{type:String},icon:{type:String},disabled:{type:Boolean,default:!1},pending:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},circle:{type:Boolean,default:!1}},setup(t){const A=t,e=h.computed(()=>A.caption&&!A.circle);return(n,r)=>{const i=h.resolveComponent("svg-icon");return h.openBlock(),h.createElementBlock("button",{type:t.type,disabled:t.disabled,class:h.normalizeClass(["btn",{disabled:t.disabled,pending:t.pending,rounded:t.rounded,"rounded-circle":t.circle,[`btn-${t.color}`]:!t.outlined,[`btn-outline-${t.color}`]:t.outlined,"x-large":t.size==="x-large",large:t.size==="large",small:t.size==="small","x-small":t.size==="x-small"}])},[h.renderSlot(n.$slots,"default",{},()=>[t.icon?(h.openBlock(),h.createBlock(i,{key:0,symbol:t.icon,class:"base-button__caption"},null,8,["symbol"])):h.createCommentVNode("",!0),h.unref(e)?(h.openBlock(),h.createElementBlock("span",{key:1,class:h.normalizeClass(["base-button__caption",{"icon-padding":t.icon}])},h.toDisplayString(t.caption),3)):h.createCommentVNode("",!0)])],10,Ky)}}}),BP="",Py={class:"input-group base-input__input-group"},Gy=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","true-value","false-value","aria-label"],Wy=["for","innerHTML"],$y=h.defineComponent({__name:"base-input",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>we()},id:{type:String,default:()=>we()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t,n=h.computed({get(){return e.modelValue},set(r){A("update:modelValue",r)}});return(r,i)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["input",`input--${t.type}`])},[h.createElementVNode("div",Py,[h.renderSlot(r.$slots,"input-prepend",{slotScope:"props"}),h.withDirectives(h.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=s=>h.isRef(n)?n.value=s:null),type:t.type==="color"?"text":t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength,"true-value":t.trueValue,"false-value":t.falseValue,class:h.normalizeClass(["form-control",{"form-check-input":t.type==="checkbox"}]),"aria-label":t.label},null,10,Gy),[[h.vModelDynamic,h.unref(n)]]),h.renderSlot(r.$slots,"input-append",{slotScope:"props"})]),h.renderSlot(r.$slots,"label",{},()=>[t.label?(h.openBlock(),h.createElementBlock("label",{key:0,for:t.id,class:h.normalizeClass(["input__label",{"form-check-label":t.type==="checkbox"}]),innerHTML:`${t.label}${t.required?" *":""}`},null,10,Wy)):h.createCommentVNode("",!0)])],2))}}),mP="",Jy={class:"input input--textarea"},Xy=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","aria-label"],Yy=["for","innerHTML"],zy=h.defineComponent({__name:"input-textarea",props:{modelValue:{type:String,default:""},type:{type:String,default:"text"},name:{type:String,default:()=>we()},id:{type:String,default:()=>we()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},checked:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t,n=h.computed({get(){return e.modelValue},set(r){A("update:modelValue",r)}});return(r,i)=>(h.openBlock(),h.createElementBlock("div",Jy,[h.renderSlot(r.$slots,"input-prepend"),h.withDirectives(h.createElementVNode("textarea",{"onUpdate:modelValue":i[0]||(i[0]=s=>h.isRef(n)?n.value=s:null),type:t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength,class:h.normalizeClass(["form-control",{}]),"aria-label":t.label},null,8,Xy),[[h.vModelText,h.unref(n)]]),h.renderSlot(r.$slots,"input-append"),h.renderSlot(r.$slots,"label",{},()=>[h.createElementVNode("label",{for:t.id,class:h.normalizeClass(["input__label",{"form-check-label":t.type==="checkbox"}]),innerHTML:`${t.label}${t.required?" *":""}`},null,10,Yy)])]))}}),qy=["value","id","name","required","disabled","true-value","false-value"],Zy=["for","innerHTML"],jy=h.createElementVNode("span",{class:"input__error"},"error",-1),AQ=h.defineComponent({__name:"input-checkbox",props:{id:{type:String},name:{type:String},label:{type:String},error:{type:String},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},modelValue:{type:[Boolean,Array]},value:{type:[String,Object]},checked:{type:Boolean},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1}},emits:["update:modelValue","update:checked"],setup(t,{emit:A}){const e=t,n=h.computed({get(){return e.modelValue||e.checked},set(r){A("update:checked",r),A("update:modelValue",r)}});return(r,i)=>(h.openBlock(),h.createElementBlock("div",{class:"form-check input input--checkbox",onClick:i[1]||(i[1]=h.withModifiers(s=>r.void,["stop"]))},[h.withDirectives(h.createElementVNode("input",{ref:"input","onUpdate:modelValue":i[0]||(i[0]=s=>h.isRef(n)?n.value=s:null),value:t.value,id:t.id,name:t.name,type:"checkbox",required:t.required,disabled:t.disabled,class:"form-check-input","true-value":t.trueValue,"false-value":t.falseValue},null,8,qy),[[h.vModelCheckbox,h.unref(n)]]),h.createElementVNode("label",{class:"input__label form-check-label",for:t.id,innerHTML:t.label},null,8,Zy),jy]))}}),wP=`:root,*:before,*:after{--border-color: #ced4da;--border-radius: .25rem}.input--checkbox{flex-flow:row;gap:.5rem}.input--checkbox input{order:0}
|
|
2
2
|
`,eQ={class:"check-group"},tQ=["id","name","value","disabled","read-only","required"],nQ=["for","innerHTML"],rQ=h.defineComponent({__name:"check-group",props:{modelValue:{type:null,default:()=>[]},options:{type:Array,required:!0},name:{type:String,default:()=>we()},id:{type:String,default:()=>we()},label:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t;h.ref([]);const n=h.computed({get(){return e.modelValue},set(i){A("update:modelValue",i)}}),r=h.computed(()=>e.options.map(i=>(i=typeof i=="string"?{text:i,value:i}:i,{...i,active:e.modelValue&&e.modelValue.includes(i.value)})));return(i,s)=>(h.openBlock(),h.createElementBlock("div",eQ,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(h.unref(r),(a,c)=>(h.openBlock(),h.createElementBlock("div",{key:c,class:"form-check"},[h.withDirectives(h.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":s[0]||(s[0]=u=>h.isRef(n)?n.value=u:null),id:`${t.id}-${c}`,name:t.name,class:"form-check-input",value:a.value||a,disabled:t.disabled,"read-only":t.readOnly,required:t.required},null,8,tQ),[[h.vModelCheckbox,h.unref(n)]]),h.createElementVNode("label",{class:"form-check-label",for:`${t.id}-${c}`,innerHTML:a.text},null,8,nQ)]))),128))]))}}),CP="",iQ={class:"input radio-group"},sQ=["id","name","value","checked","disabled","read-only","required","onChange"],oQ=["for","innerHTML"],aQ=["for"],lQ=h.defineComponent({__name:"radio-group",props:{modelValue:{default:!1},options:{type:Array,default:[]},name:{type:String,default:()=>we()},id:{type:String,default:()=>we()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(t,{emit:A}){const e=t;h.ref(e.options.map(r=>r.value===e.modelValue));function n(r){console.log("asdfa",r),A("update:modelValue",r)}return h.onBeforeMount(()=>{}),(r,i)=>(h.openBlock(),h.createElementBlock("div",iQ,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.options,(s,a)=>(h.openBlock(),h.createElementBlock("div",{key:a,class:"form-check"},[h.createElementVNode("input",{type:"radio",id:`${t.id}-${a}`,name:t.name,class:"form-check-input",value:s.value||s,checked:s.value?s.value===t.modelValue:s===t.modelValue,disabled:t.disabled,"read-only":t.readOnly,required:t.required,onChange:c=>n(s)},null,40,sQ),h.createElementVNode("label",{class:"form-check-label",for:`${t.id}-${a}`,innerHTML:t.label},null,8,oQ)]))),128)),h.renderSlot(r.$slots,"label",{},()=>[t.label?(h.openBlock(),h.createElementBlock("label",{key:0,for:t.id},h.toDisplayString(t.label),9,aQ)):h.createCommentVNode("",!0)])]))}}),yP="",cQ=["id","name","multiple","accept","disabled"],uQ={class:"input__input-group input-group"},fQ=["value","id","name","disabled"],dQ=["for","disabled"],hQ=h.createElementVNode("span",{class:"btn btn-outline-dark"},"Select File",-1),pQ=["for"],gQ=["innerHTML"],BQ=h.defineComponent({__name:"input-file",props:{modelValue:{type:Array,default:[]},name:{type:String,default:()=>we()},id:{type:String,default:()=>we()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},multiple:{type:Boolean,default:!1},accept:{type:String}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t;function n(a){const c=a.target&&a.target.files;c&&(i.splice(0,i.length),Array.from(c).forEach(u=>{i.push(u)}))}const r=h.ref(),i=h.reactive([]),s=h.computed(()=>i&&i.map(a=>a.name));return h.computed(()=>i.map(a=>URL.createObjectURL(a))),h.watch(()=>e.modelValue,(a,c)=>{a.length===0&&(r.value.value=null)},{deep:!0}),h.watch(()=>i,(a,c)=>{A("update:modelValue",a)},{deep:!0}),(a,c)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["input input-file","input-file--primary"])},[h.createElementVNode("input",{ref_key:"input",ref:r,type:"file",id:t.id,name:t.name,class:"d-none",onChange:n,multiple:t.multiple,accept:t.accept,disabled:t.disabled},null,40,cQ),h.createElementVNode("div",uQ,[h.renderSlot(a.$slots,"input-prepend"),h.createElementVNode("input",{type:"text",value:h.unref(s),id:t.id,name:t.name,class:"form-control",disabled:t.disabled},null,8,fQ),h.renderSlot(a.$slots,"input-append",{},()=>[h.createElementVNode("label",{for:t.id,disabled:t.disabled},[h.renderSlot(a.$slots,"button",{},()=>[hQ])],8,dQ)])]),h.createElementVNode("label",{for:t.id},[h.renderSlot(a.$slots,"label",{},()=>[h.createElementVNode("span",{class:"input__label",innerHTML:`${t.label}${t.required?" *":""}`},null,8,gQ)])],8,pQ)]))}});function He(t){this.content=t}He.prototype={constructor:He,find:function(t){for(var A=0;A<this.content.length;A+=2)if(this.content[A]===t)return A;return-1},get:function(t){var A=this.find(t);return A==-1?void 0:this.content[A+1]},update:function(t,A,e){var n=e&&e!=t?this.remove(e):this,r=n.find(t),i=n.content.slice();return r==-1?i.push(e||t,A):(i[r+1]=A,e&&(i[r]=e)),new He(i)},remove:function(t){var A=this.find(t);if(A==-1)return this;var e=this.content.slice();return e.splice(A,2),new He(e)},addToStart:function(t,A){return new He([t,A].concat(this.remove(t).content))},addToEnd:function(t,A){var e=this.remove(t).content.slice();return e.push(t,A),new He(e)},addBefore:function(t,A,e){var n=this.remove(A),r=n.content.slice(),i=n.find(t);return r.splice(i==-1?r.length:i,0,A,e),new He(r)},forEach:function(t){for(var A=0;A<this.content.length;A+=2)t(this.content[A],this.content[A+1])},prepend:function(t){return t=He.from(t),t.size?new He(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=He.from(t),t.size?new He(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var A=this;t=He.from(t);for(var e=0;e<t.content.length;e+=2)A=A.remove(t.content[e]);return A},toObject:function(){var t={};return this.forEach(function(A,e){t[A]=e}),t},get size(){return this.content.length>>1}},He.from=function(t){if(t instanceof He)return t;var A=[];if(t)for(var e in t)A.push(e,t[e]);return new He(A)};function Gd(t,A,e){for(let n=0;;n++){if(n==t.childCount||n==A.childCount)return t.childCount==A.childCount?null:e;let r=t.child(n),i=A.child(n);if(r==i){e+=r.nodeSize;continue}if(!r.sameMarkup(i))return e;if(r.isText&&r.text!=i.text){for(let s=0;r.text[s]==i.text[s];s++)e++;return e}if(r.content.size||i.content.size){let s=Gd(r.content,i.content,e+1);if(s!=null)return s}e+=r.nodeSize}}function Wd(t,A,e,n){for(let r=t.childCount,i=A.childCount;;){if(r==0||i==0)return r==i?null:{a:e,b:n};let s=t.child(--r),a=A.child(--i),c=s.nodeSize;if(s==a){e-=c,n-=c;continue}if(!s.sameMarkup(a))return{a:e,b:n};if(s.isText&&s.text!=a.text){let u=0,d=Math.min(s.text.length,a.text.length);for(;u<d&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,e--,n--;return{a:e,b:n}}if(s.content.size||a.content.size){let u=Wd(s.content,a.content,e-1,n-1);if(u)return u}e-=c,n-=c}}class X{constructor(A,e){if(this.content=A,this.size=e||0,e==null)for(let n=0;n<A.length;n++)this.size+=A[n].nodeSize}nodesBetween(A,e,n,r=0,i){for(let s=0,a=0;a<e;s++){let c=this.content[s],u=a+c.nodeSize;if(u>A&&n(c,r+a,i||null,s)!==!1&&c.content.size){let d=a+1;c.nodesBetween(Math.max(0,A-d),Math.min(c.content.size,e-d),n,r+d)}a=u}}descendants(A){this.nodesBetween(0,this.size,A)}textBetween(A,e,n,r){let i="",s=!0;return this.nodesBetween(A,e,(a,c)=>{a.isText?(i+=a.text.slice(Math.max(A,c)-c,e-c),s=!n):a.isLeaf?(r?i+=typeof r=="function"?r(a):r:a.type.spec.leafText&&(i+=a.type.spec.leafText(a)),s=!n):!s&&a.isBlock&&(i+=n,s=!0)},0),i}append(A){if(!A.size)return this;if(!this.size)return A;let e=this.lastChild,n=A.firstChild,r=this.content.slice(),i=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),i=1);i<A.content.length;i++)r.push(A.content[i]);return new X(r,this.size+A.size)}cut(A,e=this.size){if(A==0&&e==this.size)return this;let n=[],r=0;if(e>A)for(let i=0,s=0;s<e;i++){let a=this.content[i],c=s+a.nodeSize;c>A&&((s<A||c>e)&&(a.isText?a=a.cut(Math.max(0,A-s),Math.min(a.text.length,e-s)):a=a.cut(Math.max(0,A-s-1),Math.min(a.content.size,e-s-1))),n.push(a),r+=a.nodeSize),s=c}return new X(n,r)}cutByIndex(A,e){return A==e?X.empty:A==0&&e==this.content.length?this:new X(this.content.slice(A,e))}replaceChild(A,e){let n=this.content[A];if(n==e)return this;let r=this.content.slice(),i=this.size+e.nodeSize-n.nodeSize;return r[A]=e,new X(r,i)}addToStart(A){return new X([A].concat(this.content),this.size+A.nodeSize)}addToEnd(A){return new X(this.content.concat(A),this.size+A.nodeSize)}eq(A){if(this.content.length!=A.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(A.content[e]))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(A){let e=this.content[A];if(!e)throw new RangeError("Index "+A+" out of range for "+this);return e}maybeChild(A){return this.content[A]||null}forEach(A){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];A(r,n,e),n+=r.nodeSize}}findDiffStart(A,e=0){return Gd(this,A,e)}findDiffEnd(A,e=this.size,n=A.size){return Wd(this,A,e,n)}findIndex(A,e=-1){if(A==0)return Uo(0,A);if(A==this.size)return Uo(this.content.length,A);if(A>this.size||A<0)throw new RangeError(`Position ${A} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=A)return s==A||e>0?Uo(n+1,s):Uo(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(A=>A.toJSON()):null}static fromJSON(A,e){if(!e)return X.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new X(e.map(A.nodeFromJSON))}static fromArray(A){if(!A.length)return X.empty;let e,n=0;for(let r=0;r<A.length;r++){let i=A[r];n+=i.nodeSize,r&&i.isText&&A[r-1].sameMarkup(i)?(e||(e=A.slice(0,r)),e[e.length-1]=i.withText(e[e.length-1].text+i.text)):e&&e.push(i)}return new X(e||A,n)}static from(A){if(!A)return X.empty;if(A instanceof X)return A;if(Array.isArray(A))return this.fromArray(A);if(A.attrs)return new X([A],A.nodeSize);throw new RangeError("Can not convert "+A+" to a Fragment"+(A.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}X.empty=new X([],0);const Zl={index:0,offset:0};function Uo(t,A){return Zl.index=t,Zl.offset=A,Zl}function bo(t,A){if(t===A)return!0;if(!(t&&typeof t=="object")||!(A&&typeof A=="object"))return!1;let e=Array.isArray(t);if(Array.isArray(A)!=e)return!1;if(e){if(t.length!=A.length)return!1;for(let n=0;n<t.length;n++)if(!bo(t[n],A[n]))return!1}else{for(let n in t)if(!(n in A)||!bo(t[n],A[n]))return!1;for(let n in A)if(!(n in t))return!1}return!0}let PA=class Rd{constructor(A,e){this.type=A,this.attrs=e}addToSet(A){let e,n=!1;for(let r=0;r<A.length;r++){let i=A[r];if(this.eq(i))return A;if(this.type.excludes(i.type))e||(e=A.slice(0,r));else{if(i.type.excludes(this.type))return A;!n&&i.type.rank>this.type.rank&&(e||(e=A.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=A.slice()),n||e.push(this),e}removeFromSet(A){for(let e=0;e<A.length;e++)if(this.eq(A[e]))return A.slice(0,e).concat(A.slice(e+1));return A}isInSet(A){for(let e=0;e<A.length;e++)if(this.eq(A[e]))return!0;return!1}eq(A){return this==A||this.type==A.type&&bo(this.attrs,A.attrs)}toJSON(){let A={type:this.type.name};for(let e in this.attrs){A.attrs=this.attrs;break}return A}static fromJSON(A,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");let n=A.marks[e.type];if(!n)throw new RangeError(`There is no mark type ${e.type} in this schema`);return n.create(e.attrs)}static sameSet(A,e){if(A==e)return!0;if(A.length!=e.length)return!1;for(let n=0;n<A.length;n++)if(!A[n].eq(e[n]))return!1;return!0}static setFrom(A){if(!A||Array.isArray(A)&&A.length==0)return Rd.none;if(A instanceof Rd)return[A];let e=A.slice();return e.sort((n,r)=>n.type.rank-r.type.rank),e}};PA.none=[];class vo extends Error{}class j{constructor(A,e,n){this.content=A,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(A,e){let n=Jd(this.content,A+this.openStart,e);return n&&new j(n,this.openStart,this.openEnd)}removeBetween(A,e){return new j($d(this.content,A+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(A){return this.content.eq(A.content)&&this.openStart==A.openStart&&this.openEnd==A.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let A={content:this.content.toJSON()};return this.openStart>0&&(A.openStart=this.openStart),this.openEnd>0&&(A.openEnd=this.openEnd),A}static fromJSON(A,e){if(!e)return j.empty;let n=e.openStart||0,r=e.openEnd||0;if(typeof n!="number"||typeof r!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new j(X.fromJSON(A,e.content),n,r)}static maxOpen(A,e=!0){let n=0,r=0;for(let i=A.firstChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=A.lastChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.lastChild)r++;return new j(A,n,r)}}j.empty=new j(X.empty,0,0);function $d(t,A,e){let{index:n,offset:r}=t.findIndex(A),i=t.maybeChild(n),{index:s,offset:a}=t.findIndex(e);if(r==A||i.isText){if(a!=e&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,A).append(t.cut(e))}if(n!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(n,i.copy($d(i.content,A-r-1,e-r-1)))}function Jd(t,A,e,n){let{index:r,offset:i}=t.findIndex(A),s=t.maybeChild(r);if(i==A||s.isText)return n&&!n.canReplace(r,r,e)?null:t.cut(0,A).append(e).append(t.cut(A));let a=Jd(s.content,A-i-1,e);return a&&t.replaceChild(r,s.copy(a))}function mQ(t,A,e){if(e.openStart>t.depth)throw new vo("Inserted content deeper than insertion position");if(t.depth-e.openStart!=A.depth-e.openEnd)throw new vo("Inconsistent open depths");return Xd(t,A,e,0)}function Xd(t,A,e,n){let r=t.index(n),i=t.node(n);if(r==A.index(n)&&n<t.depth-e.openStart){let s=Xd(t,A,e,n+1);return i.copy(i.content.replaceChild(r,s))}else if(e.content.size)if(!e.openStart&&!e.openEnd&&t.depth==n&&A.depth==n){let s=t.parent,a=s.content;return Dr(s,a.cut(0,t.parentOffset).append(e.content).append(a.cut(A.parentOffset)))}else{let{start:s,end:a}=wQ(e,t);return Dr(i,zd(t,s,a,A,n))}else return Dr(i,Io(t,A,n))}function Yd(t,A){if(!A.type.compatibleContent(t.type))throw new vo("Cannot join "+A.type.name+" onto "+t.type.name)}function jl(t,A,e){let n=t.node(e);return Yd(n,A.node(e)),n}function Mr(t,A){let e=A.length-1;e>=0&&t.isText&&t.sameMarkup(A[e])?A[e]=t.withText(A[e].text+t.text):A.push(t)}function ds(t,A,e,n){let r=(A||t).node(e),i=0,s=A?A.index(e):r.childCount;t&&(i=t.index(e),t.depth>e?i++:t.textOffset&&(Mr(t.nodeAfter,n),i++));for(let a=i;a<s;a++)Mr(r.child(a),n);A&&A.depth==e&&A.textOffset&&Mr(A.nodeBefore,n)}function Dr(t,A){return t.type.checkContent(A),t.copy(A)}function zd(t,A,e,n,r){let i=t.depth>r&&jl(t,A,r+1),s=n.depth>r&&jl(e,n,r+1),a=[];return ds(null,t,r,a),i&&s&&A.index(r)==e.index(r)?(Yd(i,s),Mr(Dr(i,zd(t,A,e,n,r+1)),a)):(i&&Mr(Dr(i,Io(t,A,r+1)),a),ds(A,e,r,a),s&&Mr(Dr(s,Io(e,n,r+1)),a)),ds(n,null,r,a),new X(a)}function Io(t,A,e){let n=[];if(ds(null,t,e,n),t.depth>e){let r=jl(t,A,e+1);Mr(Dr(r,Io(t,A,e+1)),n)}return ds(A,null,e,n),new X(n)}function wQ(t,A){let e=A.depth-t.openStart,r=A.node(e).copy(t.content);for(let i=e-1;i>=0;i--)r=A.node(i).copy(X.from(r));return{start:r.resolveNoCache(t.openStart+e),end:r.resolveNoCache(r.content.size-t.openEnd-e)}}class hs{constructor(A,e,n){this.pos=A,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(A){return A==null?this.depth:A<0?this.depth+A:A}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(A){return this.path[this.resolveDepth(A)*3]}index(A){return this.path[this.resolveDepth(A)*3+1]}indexAfter(A){return A=this.resolveDepth(A),this.index(A)+(A==this.depth&&!this.textOffset?0:1)}start(A){return A=this.resolveDepth(A),A==0?0:this.path[A*3-1]+1}end(A){return A=this.resolveDepth(A),this.start(A)+this.node(A).content.size}before(A){if(A=this.resolveDepth(A),!A)throw new RangeError("There is no position before the top-level node");return A==this.depth+1?this.pos:this.path[A*3-1]}after(A){if(A=this.resolveDepth(A),!A)throw new RangeError("There is no position after the top-level node");return A==this.depth+1?this.pos:this.path[A*3-1]+this.path[A*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let A=this.parent,e=this.index(this.depth);if(e==A.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=A.child(e);return n?A.child(e).cut(n):r}get nodeBefore(){let A=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(A).cut(0,e):A==0?null:this.parent.child(A-1)}posAtIndex(A,e){e=this.resolveDepth(e);let n=this.path[e*3],r=e==0?0:this.path[e*3-1]+1;for(let i=0;i<A;i++)r+=n.child(i).nodeSize;return r}marks(){let A=this.parent,e=this.index();if(A.content.size==0)return PA.none;if(this.textOffset)return A.child(e).marks;let n=A.maybeChild(e-1),r=A.maybeChild(e);if(!n){let a=n;n=r,r=a}let i=n.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!r||!i[s].isInSet(r.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(A){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=A.parent.maybeChild(A.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(A){for(let e=this.depth;e>0;e--)if(this.start(e)<=A&&this.end(e)>=A)return e;return 0}blockRange(A=this,e){if(A.pos<this.pos)return A.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==A.pos?1:0);n>=0;n--)if(A.pos<=this.end(n)&&(!e||e(this.node(n))))return new So(this,A,n);return null}sameParent(A){return this.pos-this.parentOffset==A.pos-A.parentOffset}max(A){return A.pos>this.pos?A:this}min(A){return A.pos<this.pos?A:this}toString(){let A="";for(let e=1;e<=this.depth;e++)A+=(A?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return A+":"+this.parentOffset}static resolve(A,e){if(!(e>=0&&e<=A.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,i=e;for(let s=A;;){let{index:a,offset:c}=s.content.findIndex(i),u=i-c;if(n.push(s,a,r+c),!u||(s=s.child(a),s.isText))break;i=u-1,r+=c+1}return new hs(e,n,i)}static resolveCached(A,e){for(let r=0;r<Ac.length;r++){let i=Ac[r];if(i.pos==e&&i.doc==A)return i}let n=Ac[ec]=hs.resolve(A,e);return ec=(ec+1)%CQ,n}}let Ac=[],ec=0,CQ=12;class So{constructor(A,e,n){this.$from=A,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const yQ=Object.create(null);let kr=class Kd{constructor(A,e,n,r=PA.none){this.type=A,this.attrs=e,this.marks=r,this.content=n||X.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(A){return this.content.child(A)}maybeChild(A){return this.content.maybeChild(A)}forEach(A){this.content.forEach(A)}nodesBetween(A,e,n,r=0){this.content.nodesBetween(A,e,n,r,this)}descendants(A){this.nodesBetween(0,this.content.size,A)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(A,e,n,r){return this.content.textBetween(A,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(A){return this==A||this.sameMarkup(A)&&this.content.eq(A.content)}sameMarkup(A){return this.hasMarkup(A.type,A.attrs,A.marks)}hasMarkup(A,e,n){return this.type==A&&bo(this.attrs,e||A.defaultAttrs||yQ)&&PA.sameSet(this.marks,n||PA.none)}copy(A=null){return A==this.content?this:new Kd(this.type,this.attrs,A,this.marks)}mark(A){return A==this.marks?this:new Kd(this.type,this.attrs,this.content,A)}cut(A,e=this.content.size){return A==0&&e==this.content.size?this:this.copy(this.content.cut(A,e))}slice(A,e=this.content.size,n=!1){if(A==e)return j.empty;let r=this.resolve(A),i=this.resolve(e),s=n?0:r.sharedDepth(e),a=r.start(s),u=r.node(s).content.cut(r.pos-a,i.pos-a);return new j(u,r.depth-s,i.depth-s)}replace(A,e,n){return mQ(this.resolve(A),this.resolve(e),n)}nodeAt(A){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(A);if(e=e.maybeChild(n),!e)return null;if(r==A||e.isText)return e;A-=r+1}}childAfter(A){let{index:e,offset:n}=this.content.findIndex(A);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(A){if(A==0)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(A);if(n<A)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}resolve(A){return hs.resolveCached(this,A)}resolveNoCache(A){return hs.resolve(this,A)}rangeHasMark(A,e,n){let r=!1;return e>A&&this.nodesBetween(A,e,i=>(n.isInSet(i.marks)&&(r=!0),!r)),r}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 A=this.type.name;return this.content.size&&(A+="("+this.content.toStringInner()+")"),qd(this.marks,A)}contentMatchAt(A){let e=this.type.contentMatch.matchFragment(this.content,0,A);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(A,e,n=X.empty,r=0,i=n.childCount){let s=this.contentMatchAt(A).matchFragment(n,r,i),a=s&&s.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(let c=r;c<i;c++)if(!this.type.allowsMarks(n.child(c).marks))return!1;return!0}canReplaceWith(A,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(A).matchType(n),s=i&&i.matchFragment(this.content,e);return s?s.validEnd:!1}canAppend(A){return A.content.size?this.canReplace(this.childCount,this.childCount,A.content):this.type.compatibleContent(A.type)}check(){this.type.checkContent(this.content);let A=PA.none;for(let e=0;e<this.marks.length;e++)A=this.marks[e].addToSet(A);if(!PA.sameSet(A,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let A={type:this.type.name};for(let e in this.attrs){A.attrs=this.attrs;break}return this.content.size&&(A.content=this.content.toJSON()),this.marks.length&&(A.marks=this.marks.map(e=>e.toJSON())),A}static fromJSON(A,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(A.markFromJSON)}if(e.type=="text"){if(typeof e.text!="string")throw new RangeError("Invalid text node in JSON");return A.text(e.text,n)}let r=X.fromJSON(A,e.content);return A.nodeType(e.type).create(e.attrs,r,n)}};kr.prototype.text=void 0;class To extends kr{constructor(A,e,n,r){if(super(A,e,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):qd(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(A,e){return this.text.slice(A,e)}get nodeSize(){return this.text.length}mark(A){return A==this.marks?this:new To(this.type,this.attrs,this.text,A)}withText(A){return A==this.text?this:new To(this.type,this.attrs,A,this.marks)}cut(A=0,e=this.text.length){return A==0&&e==this.text.length?this:this.withText(this.text.slice(A,e))}eq(A){return this.sameMarkup(A)&&this.text==A.text}toJSON(){let A=super.toJSON();return A.text=this.text,A}}function qd(t,A){for(let e=t.length-1;e>=0;e--)A=t[e].type.name+"("+A+")";return A}class Nr{constructor(A){this.validEnd=A,this.next=[],this.wrapCache=[]}static parse(A,e){let n=new QQ(A,e);if(n.next==null)return Nr.empty;let r=Zd(n);n.next&&n.err("Unexpected trailing text");let i=SQ(IQ(r));return TQ(i,n),i}matchType(A){for(let e=0;e<this.next.length;e++)if(this.next[e].type==A)return this.next[e].next;return null}matchFragment(A,e=0,n=A.childCount){let r=this;for(let i=e;r&&i<n;i++)r=r.matchType(A.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let A=0;A<this.next.length;A++){let{type:e}=this.next[A];if(!(e.isText||e.hasRequiredAttrs()))return e}return null}compatible(A){for(let e=0;e<this.next.length;e++)for(let n=0;n<A.next.length;n++)if(this.next[e].type==A.next[n].type)return!0;return!1}fillBefore(A,e=!1,n=0){let r=[this];function i(s,a){let c=s.matchFragment(A,n);if(c&&(!e||c.validEnd))return X.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:d,next:p}=s.next[u];if(!(d.isText||d.hasRequiredAttrs())&&r.indexOf(p)==-1){r.push(p);let B=i(p,a.concat(d));if(B)return B}}return null}return i(this,[])}findWrapping(A){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==A)return this.wrapCache[n+1];let e=this.computeWrapping(A);return this.wrapCache.push(A,e),e}computeWrapping(A){let e=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(A)){let s=[];for(let a=r;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:a,next:c}=i.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in e)&&(!r.type||c.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),e[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(A){if(A>=this.next.length)throw new RangeError(`There's no ${A}th edge in this content match`);return this.next[A]}toString(){let A=[];function e(n){A.push(n);for(let r=0;r<n.next.length;r++)A.indexOf(n.next[r].next)==-1&&e(n.next[r].next)}return e(this),A.map((n,r)=>{let i=r+(n.validEnd?"*":" ")+" ";for(let s=0;s<n.next.length;s++)i+=(s?", ":"")+n.next[s].type.name+"->"+A.indexOf(n.next[s].next);return i}).join(`
|
|
3
3
|
`)}}Nr.empty=new Nr(!0);class QQ{constructor(A,e){this.string=A,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=A.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(A){return this.next==A&&(this.pos++||!0)}err(A){throw new SyntaxError(A+" (in content expression '"+this.string+"')")}}function Zd(t){let A=[];do A.push(EQ(t));while(t.eat("|"));return A.length==1?A[0]:{type:"choice",exprs:A}}function EQ(t){let A=[];do A.push(FQ(t));while(t.next&&t.next!=")"&&t.next!="|");return A.length==1?A[0]:{type:"seq",exprs:A}}function FQ(t){let A=vQ(t);for(;;)if(t.eat("+"))A={type:"plus",expr:A};else if(t.eat("*"))A={type:"star",expr:A};else if(t.eat("?"))A={type:"opt",expr:A};else if(t.eat("{"))A=UQ(t,A);else break;return A}function jd(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let A=Number(t.next);return t.pos++,A}function UQ(t,A){let e=jd(t),n=e;return t.eat(",")&&(t.next!="}"?n=jd(t):n=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:e,max:n,expr:A}}function bQ(t,A){let e=t.nodeTypes,n=e[A];if(n)return[n];let r=[];for(let i in e){let s=e[i];s.groups.indexOf(A)>-1&&r.push(s)}return r.length==0&&t.err("No node type or group '"+A+"' found"),r}function vQ(t){if(t.eat("(")){let A=Zd(t);return t.eat(")")||t.err("Missing closing paren"),A}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let A=bQ(t,t.next).map(e=>(t.inline==null?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,A.length==1?A[0]:{type:"choice",exprs:A}}}function IQ(t){let A=[[]];return r(i(t,0),e()),A;function e(){return A.push([])-1}function n(s,a,c){let u={term:c,to:a};return A[s].push(u),u}function r(s,a){s.forEach(c=>c.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((c,u)=>c.concat(i(u,a)),[]);if(s.type=="seq")for(let c=0;;c++){let u=i(s.exprs[c],a);if(c==s.exprs.length-1)return u;r(u,a=e())}else if(s.type=="star"){let c=e();return n(a,c),r(i(s.expr,c),c),[n(c)]}else if(s.type=="plus"){let c=e();return r(i(s.expr,a),c),r(i(s.expr,c),c),[n(c)]}else{if(s.type=="opt")return[n(a)].concat(i(s.expr,a));if(s.type=="range"){let c=a;for(let u=0;u<s.min;u++){let d=e();r(i(s.expr,c),d),c=d}if(s.max==-1)r(i(s.expr,c),c);else for(let u=s.min;u<s.max;u++){let d=e();n(c,d),r(i(s.expr,c),d),c=d}return[n(c)]}else{if(s.type=="name")return[n(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function Ah(t,A){return A-t}function eh(t,A){let e=[];return n(A),e.sort(Ah);function n(r){let i=t[r];if(i.length==1&&!i[0].term)return n(i[0].to);e.push(r);for(let s=0;s<i.length;s++){let{term:a,to:c}=i[s];!a&&e.indexOf(c)==-1&&n(c)}}}function SQ(t){let A=Object.create(null);return e(eh(t,0));function e(n){let r=[];n.forEach(s=>{t[s].forEach(({term:a,to:c})=>{if(!a)return;let u;for(let d=0;d<r.length;d++)r[d][0]==a&&(u=r[d][1]);eh(t,c).forEach(d=>{u||r.push([a,u=[]]),u.indexOf(d)==-1&&u.push(d)})})});let i=A[n.join(",")]=new Nr(n.indexOf(t.length-1)>-1);for(let s=0;s<r.length;s++){let a=r[s][1].sort(Ah);i.next.push({type:r[s][0],next:A[a.join(",")]||e(a)})}return i}}function TQ(t,A){for(let e=0,n=[t];e<n.length;e++){let r=n[e],i=!r.validEnd,s=[];for(let a=0;a<r.next.length;a++){let{type:c,next:u}=r.next[a];s.push(c.name),i&&!(c.isText||c.hasRequiredAttrs())&&(i=!1),n.indexOf(u)==-1&&n.push(u)}i&&A.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function th(t){let A=Object.create(null);for(let e in t){let n=t[e];if(!n.hasDefault)return null;A[e]=n.default}return A}function nh(t,A){let e=Object.create(null);for(let n in t){let r=A&&A[n];if(r===void 0){let i=t[n];if(i.hasDefault)r=i.default;else throw new RangeError("No value supplied for attribute "+n)}e[n]=r}return e}function rh(t){let A=Object.create(null);if(t)for(let e in t)A[e]=new xQ(t[e]);return A}let ih=class gy{constructor(A,e,n){this.name=A,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=rh(n.attrs),this.defaultAttrs=th(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||A=="text"),this.isText=A=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Nr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let A in this.attrs)if(this.attrs[A].isRequired)return!0;return!1}compatibleContent(A){return this==A||this.contentMatch.compatible(A.contentMatch)}computeAttrs(A){return!A&&this.defaultAttrs?this.defaultAttrs:nh(this.attrs,A)}create(A=null,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new kr(this,this.computeAttrs(A),X.from(e),PA.setFrom(n))}createChecked(A=null,e,n){return e=X.from(e),this.checkContent(e),new kr(this,this.computeAttrs(A),e,PA.setFrom(n))}createAndFill(A=null,e,n){if(A=this.computeAttrs(A),e=X.from(e),e.size){let s=this.contentMatch.fillBefore(e);if(!s)return null;e=s.append(e)}let r=this.contentMatch.matchFragment(e),i=r&&r.fillBefore(X.empty,!0);return i?new kr(this,A,e.append(i),PA.setFrom(n)):null}validContent(A){let e=this.contentMatch.matchFragment(A);if(!e||!e.validEnd)return!1;for(let n=0;n<A.childCount;n++)if(!this.allowsMarks(A.child(n).marks))return!1;return!0}checkContent(A){if(!this.validContent(A))throw new RangeError(`Invalid content for node ${this.name}: ${A.toString().slice(0,50)}`)}allowsMarkType(A){return this.markSet==null||this.markSet.indexOf(A)>-1}allowsMarks(A){if(this.markSet==null)return!0;for(let e=0;e<A.length;e++)if(!this.allowsMarkType(A[e].type))return!1;return!0}allowedMarks(A){if(this.markSet==null)return A;let e;for(let n=0;n<A.length;n++)this.allowsMarkType(A[n].type)?e&&e.push(A[n]):e||(e=A.slice(0,n));return e?e.length?e:PA.none:A}static compile(A,e){let n=Object.create(null);A.forEach((i,s)=>n[i]=new gy(i,e,s));let r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let i in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};class xQ{constructor(A){this.hasDefault=Object.prototype.hasOwnProperty.call(A,"default"),this.default=A.default}get isRequired(){return!this.hasDefault}}class xo{constructor(A,e,n,r){this.name=A,this.rank=e,this.schema=n,this.spec=r,this.attrs=rh(r.attrs),this.excluded=null;let i=th(this.attrs);this.instance=i?new PA(this,i):null}create(A=null){return!A&&this.instance?this.instance:new PA(this,nh(this.attrs,A))}static compile(A,e){let n=Object.create(null),r=0;return A.forEach((i,s)=>n[i]=new xo(i,r++,e,s)),n}removeFromSet(A){for(var e=0;e<A.length;e++)A[e].type==this&&(A=A.slice(0,e).concat(A.slice(e+1)),e--);return A}isInSet(A){for(let e=0;e<A.length;e++)if(A[e].type==this)return A[e]}excludes(A){return this.excluded.indexOf(A)>-1}}class HQ{constructor(A){this.cached=Object.create(null);let e=this.spec={};for(let r in A)e[r]=A[r];e.nodes=He.from(A.nodes),e.marks=He.from(A.marks||{}),this.nodes=ih.compile(this.spec.nodes,this),this.marks=xo.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let i=this.nodes[r],s=i.spec.content||"",a=i.spec.marks;i.contentMatch=n[s]||(n[s]=Nr.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=a=="_"?null:a?sh(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let r in this.marks){let i=this.marks[r],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:sh(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(A,e=null,n,r){if(typeof A=="string")A=this.nodeType(A);else if(A instanceof ih){if(A.schema!=this)throw new RangeError("Node type from different schema used ("+A.name+")")}else throw new RangeError("Invalid node type: "+A);return A.createChecked(e,n,r)}text(A,e){let n=this.nodes.text;return new To(n,n.defaultAttrs,A,PA.setFrom(e))}mark(A,e){return typeof A=="string"&&(A=this.marks[A]),A.create(e)}nodeFromJSON(A){return kr.fromJSON(this,A)}markFromJSON(A){return PA.fromJSON(this,A)}nodeType(A){let e=this.nodes[A];if(!e)throw new RangeError("Unknown node type: "+A);return e}}function sh(t,A){let e=[];for(let n=0;n<A.length;n++){let r=A[n],i=t.marks[r],s=i;if(i)e.push(i);else for(let a in t.marks){let c=t.marks[a];(r=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(r)>-1)&&e.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+A[n]+"'")}return e}class di{constructor(A,e){this.schema=A,this.rules=e,this.tags=[],this.styles=[],e.forEach(n=>{n.tag?this.tags.push(n):n.style&&this.styles.push(n)}),this.normalizeLists=!this.tags.some(n=>{if(!/^(ul|ol)\b/.test(n.tag)||!n.node)return!1;let r=A.nodes[n.node];return r.contentMatch.matchType(r)})}parse(A,e={}){let n=new ch(this,e,!1);return n.addAll(A,e.from,e.to),n.finish()}parseSlice(A,e={}){let n=new ch(this,e,!0);return n.addAll(A,e.from,e.to),j.maxOpen(n.finish())}matchTag(A,e,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let i=this.tags[r];if(OQ(A,i.tag)&&(i.namespace===void 0||A.namespaceURI==i.namespace)&&(!i.context||e.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(A);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(A,e,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let s=this.styles[i],a=s.style;if(!(a.indexOf(A)!=0||s.context&&!n.matchesContext(s.context)||a.length>A.length&&(a.charCodeAt(A.length)!=61||a.slice(A.length+1)!=e))){if(s.getAttrs){let c=s.getAttrs(e);if(c===!1)continue;s.attrs=c||void 0}return s}}}static schemaRules(A){let e=[];function n(r){let i=r.priority==null?50:r.priority,s=0;for(;s<e.length;s++){let a=e[s];if((a.priority==null?50:a.priority)<i)break}e.splice(s,0,r)}for(let r in A.marks){let i=A.marks[r].spec.parseDOM;i&&i.forEach(s=>{n(s=uh(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in A.nodes){let i=A.nodes[r].spec.parseDOM;i&&i.forEach(s=>{n(s=uh(s)),s.node||s.ignore||s.mark||(s.node=r)})}return e}static fromSchema(A){return A.cached.domParser||(A.cached.domParser=new di(A,di.schemaRules(A)))}}const oh={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},LQ={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ah={ol:!0,ul:!0},Ho=1,Lo=2,ps=4;function lh(t,A,e){return A!=null?(A?Ho:0)|(A==="full"?Lo:0):t&&t.whitespace=="pre"?Ho|Lo:e&~ps}class _o{constructor(A,e,n,r,i,s,a){this.type=A,this.attrs=e,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=PA.none,this.stashMarks=[],this.match=s||(a&ps?null:A.contentMatch)}findWrapping(A){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(X.from(A));if(e)this.match=this.type.contentMatch.matchFragment(e);else{let n=this.type.contentMatch,r;return(r=n.findWrapping(A.type))?(this.match=n,r):null}}return this.match.findWrapping(A.type)}finish(A){if(!(this.options&Ho)){let n=this.content[this.content.length-1],r;if(n&&n.isText&&(r=/[ \t\r\n\u000c]+$/.exec(n.text))){let i=n;n.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-r[0].length))}}let e=X.from(this.content);return!A&&this.match&&(e=e.append(this.match.fillBefore(X.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(A){for(let e=this.stashMarks.length-1;e>=0;e--)if(A.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(A){for(let e=0,n=this.pendingMarks;e<n.length;e++){let r=n[e];(this.type?this.type.allowsMarkType(r.type):DQ(r.type,A))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(A){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:A.parentNode&&!oh.hasOwnProperty(A.parentNode.nodeName.toLowerCase())}}class ch{constructor(A,e,n){this.parser=A,this.options=e,this.isOpen=n,this.open=0;let r=e.topNode,i,s=lh(null,e.preserveWhitespace,0)|(n?ps:0);r?i=new _o(r.type,r.attrs,PA.none,PA.none,!0,e.topMatch||r.type.contentMatch,s):n?i=new _o(null,null,PA.none,PA.none,!0,null,s):i=new _o(A.schema.topNodeType,null,PA.none,PA.none,!0,null,s),this.nodes=[i],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(A){if(A.nodeType==3)this.addTextNode(A);else if(A.nodeType==1){let e=A.getAttribute("style");if(!e)this.addElement(A);else{let n=this.readStyles(MQ(e));if(!n)return;let[r,i]=n,s=this.top;for(let a=0;a<i.length;a++)this.removePendingMark(i[a],s);for(let a=0;a<r.length;a++)this.addPendingMark(r[a]);this.addElement(A);for(let a=0;a<r.length;a++)this.removePendingMark(r[a],s);for(let a=0;a<i.length;a++)this.addPendingMark(i[a])}}}addTextNode(A){let e=A.nodeValue,n=this.top;if(n.options&Lo||n.inlineContext(A)||/[^ \t\r\n\u000c]/.test(e)){if(n.options&Ho)n.options&Lo?e=e.replace(/\r\n?/g,`
|
|
4
4
|
`):e=e.replace(/\r?\n|\r/g," ");else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],i=A.previousSibling;(!r||i&&i.nodeName=="BR"||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(A)}else this.findInside(A)}addElement(A,e){let n=A.nodeName.toLowerCase(),r;ah.hasOwnProperty(n)&&this.parser.normalizeLists&&_Q(A);let i=this.options.ruleFromNode&&this.options.ruleFromNode(A)||(r=this.parser.matchTag(A,this,e));if(i?i.ignore:LQ.hasOwnProperty(n))this.findInside(A),this.ignoreFallback(A);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(A=i.skip);let s,a=this.top,c=this.needsBlock;if(oh.hasOwnProperty(n))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),s=!0,a.type||(this.needsBlock=!0);else if(!A.firstChild){this.leafFallback(A);return}this.addAll(A),s&&this.sync(a),this.needsBlock=c}else this.addElementByRule(A,i,i.consuming===!1?r:void 0)}leafFallback(A){A.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(A.ownerDocument.createTextNode(`
|