ablok-components 0.1.161 → 0.1.162

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.
@@ -408,9 +408,9 @@ const $S = { class: "input-group input__input-group" }, WS = ["type", "id", "nam
408
408
  console.log("focussedHandler", a), i.value = typeof a.detail == "string" || typeof a.detail == "number" ? `${a.detail}` : "";
409
409
  };
410
410
  r.value.addEventListener("focusin", (a) => {
411
- console.log("focusin:", r.value), window.addEventListener("x-update-input", s);
411
+ console.log("focusin", r.value), window.addEventListener("update-focussed-input", s);
412
412
  }), r.value.addEventListener("focusout", (a) => {
413
- console.log("focusout", r.value), window.removeEventListener("x-update-input", s);
413
+ console.log("focusout", r.value), window.removeEventListener("update-focussed-input", s);
414
414
  });
415
415
  }), (s, a) => (q(), Z("div", {
416
416
  class: CA(["input", `input--${t.type}`])
@@ -1,4 +1,4 @@
1
- (function(Ee,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):(Ee=typeof globalThis<"u"?globalThis:Ee||self,h(Ee.AblokComponents={},Ee.Vue,Ee.core))})(this,function(Ee,h,uh){"use strict";const dE={class:"icon",preserveAspectRatio:"xMaxYMin"},hE=["xlink:href"],pE=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(e,A)=>(h.openBlock(),h.createElementBlock("i",{class:h.normalizeClass(["svg-icon",{[`svg-icon--${t.size}`]:t.size}])},[(h.openBlock(),h.createElementBlock("svg",dE,[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,hE)]))],2))}}),t3="",gE={class:"loading-spinner d-block"},mE=h.createElementVNode("span",{class:"loading-spinner__animation"},[h.createElementVNode("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 100 100"},[h.createElementVNode("path",{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"},[h.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})])])],-1),BE=h.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(e,A)=>(h.openBlock(),h.createElementBlock("span",gE,[mE,h.renderSlot(e.$slots,"default")]))}}),n3="",wE=["src","alt"],CE=h.defineComponent({__name:"base-image",props:{src:{type:String,default:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>',required:!0},alt:{type:String,default:""},spinner:{type:Boolean,default:!1},zoom:{type:Boolean,default:!1}},setup(t){const e=h.ref(!1);return(A,n)=>{const r=h.resolveComponent("loading-spinner");return t.src?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(["base-image",{"base-image--zoom":t.zoom}])},[t.spinner&&!e.value?(h.openBlock(),h.createBlock(r,{key:0})):h.createCommentVNode("",!0),h.createElementVNode("img",{class:h.normalizeClass(["",{"opacity-0":!e.value,"opacity-1":e.value}]),src:t.src,alt:t.alt,onLoad:n[0]||(n[0]=()=>e.value=!0)},null,42,wE)],2)):h.createCommentVNode("",!0)}}}),r3="",yE=["innerHTML"],EE=h.defineComponent({__name:"base-headline",props:{tag:{},size:{},variant:{},text:{},className:{}},setup(t){const e=t,A=h.computed(()=>e.tag||"p");return(n,r)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(A.value),{class:h.normalizeClass(["headline",`${n.size} headline--${n.size}${n.className||""}`])},{default:h.withCtx(()=>[h.renderSlot(n.$slots,"default",{},()=>[h.createElementVNode("span",{class:"headline__text",innerHTML:n.text},null,8,yE)])]),_:3},8,["class"]))}}),QE=["innerHTML"],FE=h.defineComponent({__name:"base-paragraph",props:{size:{},variant:{},text:{},className:{}},setup(t){return(e,A)=>(h.openBlock(),h.createElementBlock("p",{class:h.normalizeClass(["base-paragraph",`${e.size||""} ${e.className||""}`]),innerHTML:e.text},null,10,QE))}});function lA(){return(new Date().valueOf()+Math.random()).toString(36).replace(".","")}const bE={class:"accordion-item"},UE=["id"],vE=["data-bs-target","aria-controls"],IE={class:"flex-grow-1"},SE=["id","aria-labelledby","data-bs-parent"],TE={class:"accordion-body"},_E=["innerHTML"],xE=h.defineComponent({__name:"accordion-item",props:{id:{type:String,default:()=>lA()},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:e}){const A=t,n=e;function r(){n("update:modelValue",!A.modelValue)}return(i,s)=>(h.openBlock(),h.createElementBlock("div",bE,[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:r},[h.renderSlot(i.$slots,"toggle",{},()=>[h.createElementVNode("span",IE,h.toDisplayString(t.title),1)])],10,vE)],8,UE),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",TE,[h.renderSlot(i.$slots,"body",{},()=>[h.createElementVNode("article",{innerHTML:t.body},null,8,_E)])])],10,SE)]))}}),i3="",OE=(t,e)=>{const A=t.__vccOpts||t;for(const[n,r]of e)A[n]=r;return A},LE={},HE={class:"accordion"};function kE(t,e){return h.openBlock(),h.createElementBlock("div",HE,[h.renderSlot(t.$slots,"default")])}const NE=OE(LE,[["render",kE]]),DE=["type","disabled"],ME=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},success:{type:Boolean,default:!1},error:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},circle:{type:Boolean,default:!1}},setup(t){const e=t,A=h.computed(()=>e.caption&&!e.circle);return(n,r)=>{const i=h.resolveComponent("loading-spinner"),s=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"}])},[t.pending?h.renderSlot(n.$slots,"pending-icon",{key:0},()=>[h.createVNode(i)]):h.createCommentVNode("",!0),h.renderSlot(n.$slots,"default",{},()=>[t.icon?(h.openBlock(),h.createBlock(s,{key:0,symbol:t.icon,class:"base-button__caption"},null,8,["symbol"])):h.createCommentVNode("",!0),A.value?(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,DE)}}}),s3="",RE={class:"input-group input__input-group"},KE=["type","id","name","placeholder","pattern","disabled","readonly","required","maxlength","true-value","false-value","aria-label","role","autocomplete"],VE=["for","innerHTML"],PE=h.defineComponent({__name:"base-input",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>lA()},id:{type:String,default:()=>lA()},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},role:{type:String,default:"presentation"},autocomplete:{type:String,default:"off"}},emits:["update:modelValue"],setup(t,{emit:e}){const A=t,n=e,r=h.ref(),i=h.computed({get(){return A.modelValue},set(s){n("update:modelValue",s)}});return h.onMounted(()=>{let s=a=>{console.log("focussedHandler",a),i.value=typeof a.detail=="string"||typeof a.detail=="number"?`${a.detail}`:""};r.value.addEventListener("focusin",a=>{console.log("focusin:",r.value),window.addEventListener("x-update-input",s)}),r.value.addEventListener("focusout",a=>{console.log("focusout",r.value),window.removeEventListener("x-update-input",s)})}),(s,a)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["input",`input--${t.type}`])},[h.createElementVNode("div",RE,[h.renderSlot(s.$slots,"input-prepend",{slotScope:"props"}),h.withDirectives(h.createElementVNode("input",{ref_key:"input",ref:r,"onUpdate:modelValue":a[0]||(a[0]=c=>i.value=c),type:t.type==="color"?"text":t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,readonly: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,role:t.role,autocomplete:t.autocomplete},null,10,KE),[[h.vModelDynamic,i.value]]),h.renderSlot(s.$slots,"input-append",{slotScope:"props"})]),h.renderSlot(s.$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,VE)):h.createCommentVNode("",!0)])],2))}}),o3="",GE={class:"input input--textarea"},$E=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","aria-label"],WE=["for","innerHTML"],JE=h.defineComponent({__name:"input-textarea",props:{modelValue:{type:String,default:""},type:{type:String,default:"text"},name:{type:String,default:()=>lA()},id:{type:String,default:()=>lA()},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:e}){const A=t,n=e,r=h.computed({get(){return A.modelValue},set(i){n("update:modelValue",i)}});return(i,s)=>(h.openBlock(),h.createElementBlock("div",GE,[h.renderSlot(i.$slots,"input-prepend"),h.withDirectives(h.createElementVNode("textarea",{"onUpdate:modelValue":s[0]||(s[0]=a=>r.value=a),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,$E),[[h.vModelText,r.value]]),h.renderSlot(i.$slots,"input-append"),h.renderSlot(i.$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,WE)])]))}}),XE=["value","id","name","required","disabled","true-value","false-value"],YE=["for","innerHTML"],zE=h.createElementVNode("span",{class:"input__error"},"error",-1),qE=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:e}){const A=t,n=e,r=h.computed({get(){return A.modelValue||A.checked},set(i){n("update:checked",i),n("update:modelValue",i)}});return(i,s)=>(h.openBlock(),h.createElementBlock("div",{class:"form-check input input--checkbox",onClick:s[1]||(s[1]=h.withModifiers(a=>i.void,["stop"]))},[h.withDirectives(h.createElementVNode("input",{ref:"input","onUpdate:modelValue":s[0]||(s[0]=a=>r.value=a),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,XE),[[h.vModelCheckbox,r.value]]),h.createElementVNode("label",{class:"input__label form-check-label",for:t.id,innerHTML:t.label},null,8,YE),zE]))}}),a3=`:root,*:before,*:after{--border-color: #ced4da;--border-radius: .25rem}.input--checkbox{flex-flow:row;gap:.5rem}.input--checkbox input{order:0}
1
+ (function(Ee,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):(Ee=typeof globalThis<"u"?globalThis:Ee||self,h(Ee.AblokComponents={},Ee.Vue,Ee.core))})(this,function(Ee,h,uh){"use strict";const dE={class:"icon",preserveAspectRatio:"xMaxYMin"},hE=["xlink:href"],pE=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(e,A)=>(h.openBlock(),h.createElementBlock("i",{class:h.normalizeClass(["svg-icon",{[`svg-icon--${t.size}`]:t.size}])},[(h.openBlock(),h.createElementBlock("svg",dE,[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,hE)]))],2))}}),t3="",gE={class:"loading-spinner d-block"},mE=h.createElementVNode("span",{class:"loading-spinner__animation"},[h.createElementVNode("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 100 100"},[h.createElementVNode("path",{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"},[h.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})])])],-1),BE=h.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(e,A)=>(h.openBlock(),h.createElementBlock("span",gE,[mE,h.renderSlot(e.$slots,"default")]))}}),n3="",wE=["src","alt"],CE=h.defineComponent({__name:"base-image",props:{src:{type:String,default:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>',required:!0},alt:{type:String,default:""},spinner:{type:Boolean,default:!1},zoom:{type:Boolean,default:!1}},setup(t){const e=h.ref(!1);return(A,n)=>{const r=h.resolveComponent("loading-spinner");return t.src?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(["base-image",{"base-image--zoom":t.zoom}])},[t.spinner&&!e.value?(h.openBlock(),h.createBlock(r,{key:0})):h.createCommentVNode("",!0),h.createElementVNode("img",{class:h.normalizeClass(["",{"opacity-0":!e.value,"opacity-1":e.value}]),src:t.src,alt:t.alt,onLoad:n[0]||(n[0]=()=>e.value=!0)},null,42,wE)],2)):h.createCommentVNode("",!0)}}}),r3="",yE=["innerHTML"],EE=h.defineComponent({__name:"base-headline",props:{tag:{},size:{},variant:{},text:{},className:{}},setup(t){const e=t,A=h.computed(()=>e.tag||"p");return(n,r)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(A.value),{class:h.normalizeClass(["headline",`${n.size} headline--${n.size}${n.className||""}`])},{default:h.withCtx(()=>[h.renderSlot(n.$slots,"default",{},()=>[h.createElementVNode("span",{class:"headline__text",innerHTML:n.text},null,8,yE)])]),_:3},8,["class"]))}}),QE=["innerHTML"],FE=h.defineComponent({__name:"base-paragraph",props:{size:{},variant:{},text:{},className:{}},setup(t){return(e,A)=>(h.openBlock(),h.createElementBlock("p",{class:h.normalizeClass(["base-paragraph",`${e.size||""} ${e.className||""}`]),innerHTML:e.text},null,10,QE))}});function lA(){return(new Date().valueOf()+Math.random()).toString(36).replace(".","")}const bE={class:"accordion-item"},UE=["id"],vE=["data-bs-target","aria-controls"],IE={class:"flex-grow-1"},SE=["id","aria-labelledby","data-bs-parent"],TE={class:"accordion-body"},_E=["innerHTML"],xE=h.defineComponent({__name:"accordion-item",props:{id:{type:String,default:()=>lA()},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:e}){const A=t,n=e;function r(){n("update:modelValue",!A.modelValue)}return(i,s)=>(h.openBlock(),h.createElementBlock("div",bE,[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:r},[h.renderSlot(i.$slots,"toggle",{},()=>[h.createElementVNode("span",IE,h.toDisplayString(t.title),1)])],10,vE)],8,UE),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",TE,[h.renderSlot(i.$slots,"body",{},()=>[h.createElementVNode("article",{innerHTML:t.body},null,8,_E)])])],10,SE)]))}}),i3="",OE=(t,e)=>{const A=t.__vccOpts||t;for(const[n,r]of e)A[n]=r;return A},LE={},HE={class:"accordion"};function kE(t,e){return h.openBlock(),h.createElementBlock("div",HE,[h.renderSlot(t.$slots,"default")])}const NE=OE(LE,[["render",kE]]),DE=["type","disabled"],ME=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},success:{type:Boolean,default:!1},error:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},circle:{type:Boolean,default:!1}},setup(t){const e=t,A=h.computed(()=>e.caption&&!e.circle);return(n,r)=>{const i=h.resolveComponent("loading-spinner"),s=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"}])},[t.pending?h.renderSlot(n.$slots,"pending-icon",{key:0},()=>[h.createVNode(i)]):h.createCommentVNode("",!0),h.renderSlot(n.$slots,"default",{},()=>[t.icon?(h.openBlock(),h.createBlock(s,{key:0,symbol:t.icon,class:"base-button__caption"},null,8,["symbol"])):h.createCommentVNode("",!0),A.value?(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,DE)}}}),s3="",RE={class:"input-group input__input-group"},KE=["type","id","name","placeholder","pattern","disabled","readonly","required","maxlength","true-value","false-value","aria-label","role","autocomplete"],VE=["for","innerHTML"],PE=h.defineComponent({__name:"base-input",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>lA()},id:{type:String,default:()=>lA()},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},role:{type:String,default:"presentation"},autocomplete:{type:String,default:"off"}},emits:["update:modelValue"],setup(t,{emit:e}){const A=t,n=e,r=h.ref(),i=h.computed({get(){return A.modelValue},set(s){n("update:modelValue",s)}});return h.onMounted(()=>{let s=a=>{console.log("focussedHandler",a),i.value=typeof a.detail=="string"||typeof a.detail=="number"?`${a.detail}`:""};r.value.addEventListener("focusin",a=>{console.log("focusin",r.value),window.addEventListener("update-focussed-input",s)}),r.value.addEventListener("focusout",a=>{console.log("focusout",r.value),window.removeEventListener("update-focussed-input",s)})}),(s,a)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["input",`input--${t.type}`])},[h.createElementVNode("div",RE,[h.renderSlot(s.$slots,"input-prepend",{slotScope:"props"}),h.withDirectives(h.createElementVNode("input",{ref_key:"input",ref:r,"onUpdate:modelValue":a[0]||(a[0]=c=>i.value=c),type:t.type==="color"?"text":t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,readonly: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,role:t.role,autocomplete:t.autocomplete},null,10,KE),[[h.vModelDynamic,i.value]]),h.renderSlot(s.$slots,"input-append",{slotScope:"props"})]),h.renderSlot(s.$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,VE)):h.createCommentVNode("",!0)])],2))}}),o3="",GE={class:"input input--textarea"},$E=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","aria-label"],WE=["for","innerHTML"],JE=h.defineComponent({__name:"input-textarea",props:{modelValue:{type:String,default:""},type:{type:String,default:"text"},name:{type:String,default:()=>lA()},id:{type:String,default:()=>lA()},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:e}){const A=t,n=e,r=h.computed({get(){return A.modelValue},set(i){n("update:modelValue",i)}});return(i,s)=>(h.openBlock(),h.createElementBlock("div",GE,[h.renderSlot(i.$slots,"input-prepend"),h.withDirectives(h.createElementVNode("textarea",{"onUpdate:modelValue":s[0]||(s[0]=a=>r.value=a),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,$E),[[h.vModelText,r.value]]),h.renderSlot(i.$slots,"input-append"),h.renderSlot(i.$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,WE)])]))}}),XE=["value","id","name","required","disabled","true-value","false-value"],YE=["for","innerHTML"],zE=h.createElementVNode("span",{class:"input__error"},"error",-1),qE=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:e}){const A=t,n=e,r=h.computed({get(){return A.modelValue||A.checked},set(i){n("update:checked",i),n("update:modelValue",i)}});return(i,s)=>(h.openBlock(),h.createElementBlock("div",{class:"form-check input input--checkbox",onClick:s[1]||(s[1]=h.withModifiers(a=>i.void,["stop"]))},[h.withDirectives(h.createElementVNode("input",{ref:"input","onUpdate:modelValue":s[0]||(s[0]=a=>r.value=a),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,XE),[[h.vModelCheckbox,r.value]]),h.createElementVNode("label",{class:"input__label form-check-label",for:t.id,innerHTML:t.label},null,8,YE),zE]))}}),a3=`:root,*:before,*:after{--border-color: #ced4da;--border-radius: .25rem}.input--checkbox{flex-flow:row;gap:.5rem}.input--checkbox input{order:0}
2
2
  `,ZE={class:"input-group input__input-group"},jE=["id","name","placeholder","pattern","disabled","read-only","required","aria-label"],eQ=["for","innerHTML"],AQ=h.defineComponent({__name:"input-datetime",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>lA()},id:{type:String,default:()=>lA()},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}},emits:["update:modelValue"],setup(t,{emit:e}){const A=t,n=e,r=h.computed({get(){const i=A.modelValue&&new Date(`${A.modelValue}Z`),s=i&&new Date(i.getTime()+new Date().getTimezoneOffset()*-60*1e3).toISOString();return s&&s.replace("Z","")},set(i){const s=i&&new Date(i);i=s&&s.toISOString(),n("update:modelValue",i&&i.replace("Z",""))}});return(i,s)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["input",`input--${t.type}`])},[h.createElementVNode("div",ZE,[h.renderSlot(i.$slots,"input-prepend",{slotScope:"props"}),h.withDirectives(h.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=a=>r.value=a),type:"datetime-local",id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,class:"form-control","aria-label":t.label},null,8,jE),[[h.vModelText,r.value]]),h.renderSlot(i.$slots,"input-append",{slotScope:"props"})]),h.renderSlot(i.$slots,"label",{},()=>[t.label?(h.openBlock(),h.createElementBlock("label",{key:0,for:t.id,class:"input__label",innerHTML:`${t.label}${t.required?" *":""}`},null,8,eQ)):h.createCommentVNode("",!0)])],2))}}),tQ={class:"input-group input__input-group"},nQ=h.defineComponent({__name:"input-password",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>lA()},id:{type:String,default:()=>lA()},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},role:{type:String,default:"presentation"},autocomplete:{type:String,default:"off"},password:{type:String,default:""},confirm:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const A=t,n=e,r=h.computed({get(){return A.modelValue},set(i){(A.password===i||!A.password)&&n("update:modelValue",i)}});return(i,s)=>{const a=h.resolveComponent("svg-icon"),c=h.resolveComponent("base-input");return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["input","input-password"])},[h.createElementVNode("div",tQ,[h.createVNode(c,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=u=>r.value=u),type:"password",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readOnly,required:t.required,label:t.label},{"input-prepend":h.withCtx(u=>[h.renderSlot(i.$slots,"input-prepend",{slotScope:"props"})]),"input-append":h.withCtx(u=>[h.renderSlot(i.$slots,"input-append",{slotScope:"props"},()=>[t.confirm&&t.modelValue===t.password?(h.openBlock(),h.createBlock(a,{key:0,symbol:"check",class:"ms-2"})):h.createCommentVNode("",!0)])]),_:3},8,["modelValue","placeholder","disabled","readonly","required","label"])])])}}}),rQ={class:"check-group"},iQ=["id","name","value","disabled","read-only","required"],sQ=["for","innerHTML"],oQ=h.defineComponent({__name:"check-group",props:{modelValue:{type:null,default:()=>[]},options:{type:Array,required:!0},name:{type:String,default:()=>lA()},id:{type:String,default:()=>lA()},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:e}){const A=t,n=e;h.ref([]);const r=h.computed({get(){return A.modelValue},set(s){n("update:modelValue",s)}}),i=h.computed(()=>A.options&&A.options.map(s=>(s=typeof s=="string"?{text:s,value:s}:s,{...s,active:A.modelValue&&A.modelValue.includes(s.value)})));return(s,a)=>(h.openBlock(),h.createElementBlock("div",rQ,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(i.value,(c,u)=>(h.openBlock(),h.createElementBlock("div",{key:u,class:"form-check"},[h.withDirectives(h.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":a[0]||(a[0]=f=>r.value=f),id:`${t.id}-${u}`,name:t.name,class:"form-check-input",value:c.value||c,disabled:t.disabled,"read-only":t.readOnly,required:t.required},null,8,iQ),[[h.vModelCheckbox,r.value]]),h.createElementVNode("label",{class:"form-check-label",for:`${t.id}-${u}`,innerHTML:c.text},null,8,sQ)]))),128))]))}}),l3="",aQ={class:"input radio-group"},lQ=["id","name","value","checked","disabled","read-only","required","onChange"],cQ=["for","innerHTML"],uQ=["for"],fh=h.defineComponent({__name:"radio-group",props:{modelValue:{default:!1},options:{type:Array,default:[]},name:{type:String,default:()=>lA()},id:{type:String,default:()=>lA()},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:e}){const A=t,n=e;h.ref(A.options.map(i=>i.value===A.modelValue));function r(i){console.log("asdfa",i),n("update:modelValue",i)}return h.onBeforeMount(()=>{}),(i,s)=>(h.openBlock(),h.createElementBlock("div",aQ,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.options,(a,c)=>(h.openBlock(),h.createElementBlock("div",{key:c,class:"form-check"},[h.createElementVNode("input",{type:"radio",id:`${t.id}-${c}`,name:t.name,class:"form-check-input",value:a.value||a,checked:a.value?a.value===t.modelValue:a===t.modelValue,disabled:t.disabled,"read-only":t.readOnly,required:t.required,onChange:u=>r(a)},null,40,lQ),h.renderSlot(i.$slots,"option-label",{option:a,index:c},()=>[h.createElementVNode("label",{class:"form-check-label",for:`${t.id}-${c}`,innerHTML:t.label},null,8,cQ)])]))),128)),h.renderSlot(i.$slots,"label",{},()=>[t.label?(h.openBlock(),h.createElementBlock("label",{key:0,for:t.id},h.toDisplayString(t.label),9,uQ)):h.createCommentVNode("",!0)])]))}}),c3="",fQ=["id","name","multiple","accept","disabled"],dQ={class:"input__input-group input-group"},hQ=["value","id","name","disabled"],pQ=["for","disabled"],gQ=h.createElementVNode("span",{class:"btn btn-outline-dark"},"Select File",-1),mQ=["for"],BQ=["innerHTML"],wQ=h.defineComponent({__name:"input-file",props:{modelValue:{type:Array,default:[]},name:{type:String,default:()=>lA()},id:{type:String,default:()=>lA()},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:e}){const A=t,n=e;function r(c){const u=c.target&&c.target.files;u&&(s.splice(0,s.length),Array.from(u).forEach(f=>{s.push(f)}))}const i=h.ref(),s=h.reactive([]),a=h.computed(()=>s&&s.map(c=>c.name));return h.computed(()=>s.map(c=>URL.createObjectURL(c))),h.watch(()=>A.modelValue,(c,u)=>{c.length===0&&(i.value.value=null)},{deep:!0}),h.watch(()=>s,(c,u)=>{n("update:modelValue",c)},{deep:!0}),(c,u)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["input input-file","input-file--primary"])},[h.createElementVNode("input",{ref_key:"input",ref:i,type:"file",id:t.id,name:t.name,class:"d-none",onChange:r,multiple:t.multiple,accept:t.accept,disabled:t.disabled},null,40,fQ),h.createElementVNode("div",dQ,[h.renderSlot(c.$slots,"input-prepend"),h.createElementVNode("input",{type:"text",value:a.value,id:t.id,name:t.name,class:"form-control",disabled:t.disabled},null,8,hQ),h.renderSlot(c.$slots,"input-append",{},()=>[h.createElementVNode("label",{for:t.id,disabled:t.disabled},[h.renderSlot(c.$slots,"button",{},()=>[gQ])],8,pQ)])]),h.createElementVNode("label",{for:t.id},[h.renderSlot(c.$slots,"label",{},()=>[h.createElementVNode("span",{class:"input__label",innerHTML:`${t.label}${t.required?" *":""}`},null,8,BQ)])],8,mQ)]))}});function MA(t){this.content=t}MA.prototype={constructor:MA,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,A){var n=A&&A!=t?this.remove(A):this,r=n.find(t),i=n.content.slice();return r==-1?i.push(A||t,e):(i[r+1]=e,A&&(i[r]=A)),new MA(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var A=this.content.slice();return A.splice(e,2),new MA(A)},addToStart:function(t,e){return new MA([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var A=this.remove(t).content.slice();return A.push(t,e),new MA(A)},addBefore:function(t,e,A){var n=this.remove(e),r=n.content.slice(),i=n.find(t);return r.splice(i==-1?r.length:i,0,e,A),new MA(r)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=MA.from(t),t.size?new MA(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=MA.from(t),t.size?new MA(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=MA.from(t);for(var A=0;A<t.content.length;A+=2)e=e.remove(t.content[A]);return e},toObject:function(){var t={};return this.forEach(function(e,A){t[e]=A}),t},get size(){return this.content.length>>1}},MA.from=function(t){if(t instanceof MA)return t;var e=[];if(t)for(var A in t)e.push(A,t[A]);return new MA(e)};function dh(t,e,A){for(let n=0;;n++){if(n==t.childCount||n==e.childCount)return t.childCount==e.childCount?null:A;let r=t.child(n),i=e.child(n);if(r==i){A+=r.nodeSize;continue}if(!r.sameMarkup(i))return A;if(r.isText&&r.text!=i.text){for(let s=0;r.text[s]==i.text[s];s++)A++;return A}if(r.content.size||i.content.size){let s=dh(r.content,i.content,A+1);if(s!=null)return s}A+=r.nodeSize}}function hh(t,e,A,n){for(let r=t.childCount,i=e.childCount;;){if(r==0||i==0)return r==i?null:{a:A,b:n};let s=t.child(--r),a=e.child(--i),c=s.nodeSize;if(s==a){A-=c,n-=c;continue}if(!s.sameMarkup(a))return{a:A,b:n};if(s.isText&&s.text!=a.text){let u=0,f=Math.min(s.text.length,a.text.length);for(;u<f&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,A--,n--;return{a:A,b:n}}if(s.content.size||a.content.size){let u=hh(s.content,a.content,A-1,n-1);if(u)return u}A-=c,n-=c}}class Y{constructor(e,A){if(this.content=e,this.size=A||0,A==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,A,n,r=0,i){for(let s=0,a=0;a<A;s++){let c=this.content[s],u=a+c.nodeSize;if(u>e&&n(c,r+a,i||null,s)!==!1&&c.content.size){let f=a+1;c.nodesBetween(Math.max(0,e-f),Math.min(c.content.size,A-f),n,r+f)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,A,n,r){let i="",s=!0;return this.nodesBetween(e,A,(a,c)=>{let u=a.isText?a.text.slice(Math.max(e,c)-c,A-c):a.isLeaf?r?typeof r=="function"?r(a):r:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&n&&(s?s=!1:i+=n),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let A=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(A.isText&&A.sameMarkup(n)&&(r[r.length-1]=A.withText(A.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new Y(r,this.size+e.size)}cut(e,A=this.size){if(e==0&&A==this.size)return this;let n=[],r=0;if(A>e)for(let i=0,s=0;s<A;i++){let a=this.content[i],c=s+a.nodeSize;c>e&&((s<e||c>A)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,A-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,A-s-1))),n.push(a),r+=a.nodeSize),s=c}return new Y(n,r)}cutByIndex(e,A){return e==A?Y.empty:e==0&&A==this.content.length?this:new Y(this.content.slice(e,A))}replaceChild(e,A){let n=this.content[e];if(n==A)return this;let r=this.content.slice(),i=this.size+A.nodeSize-n.nodeSize;return r[e]=A,new Y(r,i)}addToStart(e){return new Y([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Y(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let A=0;A<this.content.length;A++)if(!this.content[A].eq(e.content[A]))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 A=this.content[e];if(!A)throw new RangeError("Index "+e+" out of range for "+this);return A}maybeChild(e){return this.content[e]||null}forEach(e){for(let A=0,n=0;A<this.content.length;A++){let r=this.content[A];e(r,n,A),n+=r.nodeSize}}findDiffStart(e,A=0){return dh(this,e,A)}findDiffEnd(e,A=this.size,n=e.size){return hh(this,e,A,n)}findIndex(e,A=-1){if(e==0)return ko(0,e);if(e==this.size)return ko(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),s=r+i.nodeSize;if(s>=e)return s==e||A>0?ko(n+1,s):ko(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,A){if(!A)return Y.empty;if(!Array.isArray(A))throw new RangeError("Invalid input for Fragment.fromJSON");return new Y(A.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Y.empty;let A,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(A||(A=e.slice(0,r)),A[A.length-1]=i.withText(A[A.length-1].text+i.text)):A&&A.push(i)}return new Y(A||e,n)}static from(e){if(!e)return Y.empty;if(e instanceof Y)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Y([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Y.empty=new Y([],0);const gc={index:0,offset:0};function ko(t,e){return gc.index=t,gc.offset=e,gc}function No(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let A=Array.isArray(t);if(Array.isArray(e)!=A)return!1;if(A){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!No(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!No(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}let Ze=class ah{constructor(e,A){this.type=e,this.attrs=A}addToSet(e){let A,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))A||(A=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(A||(A=e.slice(0,r)),A.push(this),n=!0),A&&A.push(i)}}return A||(A=e.slice()),n||A.push(this),A}removeFromSet(e){for(let A=0;A<e.length;A++)if(this.eq(e[A]))return e.slice(0,A).concat(e.slice(A+1));return e}isInSet(e){for(let A=0;A<e.length;A++)if(this.eq(e[A]))return!0;return!1}eq(e){return this==e||this.type==e.type&&No(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let A in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,A){if(!A)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[A.type];if(!n)throw new RangeError(`There is no mark type ${A.type} in this schema`);return n.create(A.attrs)}static sameSet(e,A){if(e==A)return!0;if(e.length!=A.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(A[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return ah.none;if(e instanceof ah)return[e];let A=e.slice();return A.sort((n,r)=>n.type.rank-r.type.rank),A}};Ze.none=[];class Do extends Error{}class j{constructor(e,A,n){this.content=e,this.openStart=A,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,A){let n=gh(this.content,e+this.openStart,A);return n&&new j(n,this.openStart,this.openEnd)}removeBetween(e,A){return new j(ph(this.content,e+this.openStart,A+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,A){if(!A)return j.empty;let n=A.openStart||0,r=A.openEnd||0;if(typeof n!="number"||typeof r!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new j(Y.fromJSON(e,A.content),n,r)}static maxOpen(e,A=!0){let n=0,r=0;for(let i=e.firstChild;i&&!i.isLeaf&&(A||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=e.lastChild;i&&!i.isLeaf&&(A||!i.type.spec.isolating);i=i.lastChild)r++;return new j(e,n,r)}}j.empty=new j(Y.empty,0,0);function ph(t,e,A){let{index:n,offset:r}=t.findIndex(e),i=t.maybeChild(n),{index:s,offset:a}=t.findIndex(A);if(r==e||i.isText){if(a!=A&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(A))}if(n!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(n,i.copy(ph(i.content,e-r-1,A-r-1)))}function gh(t,e,A,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r);if(i==e||s.isText)return n&&!n.canReplace(r,r,A)?null:t.cut(0,e).append(A).append(t.cut(e));let a=gh(s.content,e-i-1,A);return a&&t.replaceChild(r,s.copy(a))}function CQ(t,e,A){if(A.openStart>t.depth)throw new Do("Inserted content deeper than insertion position");if(t.depth-A.openStart!=e.depth-A.openEnd)throw new Do("Inconsistent open depths");return mh(t,e,A,0)}function mh(t,e,A,n){let r=t.index(n),i=t.node(n);if(r==e.index(n)&&n<t.depth-A.openStart){let s=mh(t,e,A,n+1);return i.copy(i.content.replaceChild(r,s))}else if(A.content.size)if(!A.openStart&&!A.openEnd&&t.depth==n&&e.depth==n){let s=t.parent,a=s.content;return Gr(s,a.cut(0,t.parentOffset).append(A.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=yQ(A,t);return Gr(i,wh(t,s,a,e,n))}else return Gr(i,Mo(t,e,n))}function Bh(t,e){if(!e.type.compatibleContent(t.type))throw new Do("Cannot join "+e.type.name+" onto "+t.type.name)}function mc(t,e,A){let n=t.node(A);return Bh(n,e.node(A)),n}function Pr(t,e){let A=e.length-1;A>=0&&t.isText&&t.sameMarkup(e[A])?e[A]=t.withText(e[A].text+t.text):e.push(t)}function Qs(t,e,A,n){let r=(e||t).node(A),i=0,s=e?e.index(A):r.childCount;t&&(i=t.index(A),t.depth>A?i++:t.textOffset&&(Pr(t.nodeAfter,n),i++));for(let a=i;a<s;a++)Pr(r.child(a),n);e&&e.depth==A&&e.textOffset&&Pr(e.nodeBefore,n)}function Gr(t,e){return t.type.checkContent(e),t.copy(e)}function wh(t,e,A,n,r){let i=t.depth>r&&mc(t,e,r+1),s=n.depth>r&&mc(A,n,r+1),a=[];return Qs(null,t,r,a),i&&s&&e.index(r)==A.index(r)?(Bh(i,s),Pr(Gr(i,wh(t,e,A,n,r+1)),a)):(i&&Pr(Gr(i,Mo(t,e,r+1)),a),Qs(e,A,r,a),s&&Pr(Gr(s,Mo(A,n,r+1)),a)),Qs(n,null,r,a),new Y(a)}function Mo(t,e,A){let n=[];if(Qs(null,t,A,n),t.depth>A){let r=mc(t,e,A+1);Pr(Gr(r,Mo(t,e,A+1)),n)}return Qs(e,null,A,n),new Y(n)}function yQ(t,e){let A=e.depth-t.openStart,r=e.node(A).copy(t.content);for(let i=A-1;i>=0;i--)r=e.node(i).copy(Y.from(r));return{start:r.resolveNoCache(t.openStart+A),end:r.resolveNoCache(r.content.size-t.openEnd-A)}}class Fs{constructor(e,A,n){this.pos=e,this.path=A,this.parentOffset=n,this.depth=A.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,A=this.index(this.depth);if(A==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(A);return n?e.child(A).cut(n):r}get nodeBefore(){let e=this.index(this.depth),A=this.pos-this.path[this.path.length-1];return A?this.parent.child(e).cut(0,A):e==0?null:this.parent.child(e-1)}posAtIndex(e,A){A=this.resolveDepth(A);let n=this.path[A*3],r=A==0?0:this.path[A*3-1]+1;for(let i=0;i<e;i++)r+=n.child(i).nodeSize;return r}marks(){let e=this.parent,A=this.index();if(e.content.size==0)return Ze.none;if(this.textOffset)return e.child(A).marks;let n=e.maybeChild(A-1),r=e.maybeChild(A);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(e){let A=this.parent.maybeChild(this.index());if(!A||!A.isInline)return null;let n=A.marks,r=e.parent.maybeChild(e.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(e){for(let A=this.depth;A>0;A--)if(this.start(A)<=e&&this.end(A)>=e)return A;return 0}blockRange(e=this,A){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!A||A(this.node(n))))return new Ro(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let A=1;A<=this.depth;A++)e+=(e?"/":"")+this.node(A).type.name+"_"+this.index(A-1);return e+":"+this.parentOffset}static resolve(e,A){if(!(A>=0&&A<=e.content.size))throw new RangeError("Position "+A+" out of range");let n=[],r=0,i=A;for(let s=e;;){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 Fs(A,n,i)}static resolveCached(e,A){for(let r=0;r<Bc.length;r++){let i=Bc[r];if(i.pos==A&&i.doc==e)return i}let n=Bc[wc]=Fs.resolve(e,A);return wc=(wc+1)%EQ,n}}let Bc=[],wc=0,EQ=12;class Ro{constructor(e,A,n){this.$from=e,this.$to=A,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 QQ=Object.create(null);let $r=class lh{constructor(e,A,n,r=Ze.none){this.type=e,this.attrs=A,this.marks=r,this.content=n||Y.empty}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,A,n,r=0){this.content.nodesBetween(e,A,n,r,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,A,n,r){return this.content.textBetween(e,A,n,r)}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,A,n){return this.type==e&&No(this.attrs,A||e.defaultAttrs||QQ)&&Ze.sameSet(this.marks,n||Ze.none)}copy(e=null){return e==this.content?this:new lh(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new lh(this.type,this.attrs,this.content,e)}cut(e,A=this.content.size){return e==0&&A==this.content.size?this:this.copy(this.content.cut(e,A))}slice(e,A=this.content.size,n=!1){if(e==A)return j.empty;let r=this.resolve(e),i=this.resolve(A),s=n?0:r.sharedDepth(A),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(e,A,n){return CQ(this.resolve(e),this.resolve(A),n)}nodeAt(e){for(let A=this;;){let{index:n,offset:r}=A.content.findIndex(e);if(A=A.maybeChild(n),!A)return null;if(r==e||A.isText)return A;e-=r+1}}childAfter(e){let{index:A,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(A),index:A,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:A,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(A),index:A,offset:n};let r=this.content.child(A-1);return{node:r,index:A-1,offset:n-r.nodeSize}}resolve(e){return Fs.resolveCached(this,e)}resolveNoCache(e){return Fs.resolve(this,e)}rangeHasMark(e,A,n){let r=!1;return A>e&&this.nodesBetween(e,A,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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Ch(this.marks,e)}contentMatchAt(e){let A=this.type.contentMatch.matchFragment(this.content,0,e);if(!A)throw new Error("Called contentMatchAt on a node with invalid content");return A}canReplace(e,A,n=Y.empty,r=0,i=n.childCount){let s=this.contentMatchAt(e).matchFragment(n,r,i),a=s&&s.matchFragment(this.content,A);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(e,A,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),s=i&&i.matchFragment(this.content,A);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);let e=Ze.none;for(let A=0;A<this.marks.length;A++)e=this.marks[A].addToSet(e);if(!Ze.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(A=>A.type.name)}`);this.content.forEach(A=>A.check())}toJSON(){let e={type:this.type.name};for(let A 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(A=>A.toJSON())),e}static fromJSON(e,A){if(!A)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(A.marks){if(!Array.isArray(A.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=A.marks.map(e.markFromJSON)}if(A.type=="text"){if(typeof A.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(A.text,n)}let r=Y.fromJSON(e,A.content);return e.nodeType(A.type).create(A.attrs,r,n)}};$r.prototype.text=void 0;class Ko extends $r{constructor(e,A,n,r){if(super(e,A,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):Ch(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,A){return this.text.slice(e,A)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Ko(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Ko(this.type,this.attrs,e,this.marks)}cut(e=0,A=this.text.length){return e==0&&A==this.text.length?this:this.withText(this.text.slice(e,A))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Ch(t,e){for(let A=t.length-1;A>=0;A--)e=t[A].type.name+"("+e+")";return e}class Wr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,A){let n=new FQ(e,A);if(n.next==null)return Wr.empty;let r=yh(n);n.next&&n.err("Unexpected trailing text");let i=_Q(TQ(r));return xQ(i,n),i}matchType(e){for(let A=0;A<this.next.length;A++)if(this.next[A].type==e)return this.next[A].next;return null}matchFragment(e,A=0,n=e.childCount){let r=this;for(let i=A;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}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:A}=this.next[e];if(!(A.isText||A.hasRequiredAttrs()))return A}return null}compatible(e){for(let A=0;A<this.next.length;A++)for(let n=0;n<e.next.length;n++)if(this.next[A].type==e.next[n].type)return!0;return!1}fillBefore(e,A=!1,n=0){let r=[this];function i(s,a){let c=s.matchFragment(e,n);if(c&&(!A||c.validEnd))return Y.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:f,next:p}=s.next[u];if(!(f.isText||f.hasRequiredAttrs())&&r.indexOf(p)==-1){r.push(p);let g=i(p,a.concat(f));if(g)return g}}return null}return i(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let A=this.computeWrapping(e);return this.wrapCache.push(e,A),A}computeWrapping(e){let A=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){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 A)&&(!r.type||c.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),A[a.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 A(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&A(n.next[r].next)}return A(this),e.map((n,r)=>{let i=r+(n.validEnd?"*":" ")+" ";for(let s=0;s<n.next.length;s++)i+=(s?", ":"")+n.next[s].type.name+"->"+e.indexOf(n.next[s].next);return i}).join(`
3
3
  `)}}Wr.empty=new Wr(!0);class FQ{constructor(e,A){this.string=e,this.nodeTypes=A,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function yh(t){let e=[];do e.push(bQ(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function bQ(t){let e=[];do e.push(UQ(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function UQ(t){let e=SQ(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=vQ(t,e);else break;return e}function Eh(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function vQ(t,e){let A=Eh(t),n=A;return t.eat(",")&&(t.next!="}"?n=Eh(t):n=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:A,max:n,expr:e}}function IQ(t,e){let A=t.nodeTypes,n=A[e];if(n)return[n];let r=[];for(let i in A){let s=A[i];s.groups.indexOf(e)>-1&&r.push(s)}return r.length==0&&t.err("No node type or group '"+e+"' found"),r}function SQ(t){if(t.eat("(")){let e=yh(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=IQ(t,t.next).map(A=>(t.inline==null?t.inline=A.isInline:t.inline!=A.isInline&&t.err("Mixing inline and block content"),{type:"name",value:A}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function TQ(t){let e=[[]];return r(i(t,0),A()),e;function A(){return e.push([])-1}function n(s,a,c){let u={term:c,to:a};return e[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=A())}else if(s.type=="star"){let c=A();return n(a,c),r(i(s.expr,c),c),[n(c)]}else if(s.type=="plus"){let c=A();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 f=A();r(i(s.expr,c),f),c=f}if(s.max==-1)r(i(s.expr,c),c);else for(let u=s.min;u<s.max;u++){let f=A();n(c,f),r(i(s.expr,c),f),c=f}return[n(c)]}else{if(s.type=="name")return[n(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function Qh(t,e){return e-t}function Fh(t,e){let A=[];return n(e),A.sort(Qh);function n(r){let i=t[r];if(i.length==1&&!i[0].term)return n(i[0].to);A.push(r);for(let s=0;s<i.length;s++){let{term:a,to:c}=i[s];!a&&A.indexOf(c)==-1&&n(c)}}}function _Q(t){let e=Object.create(null);return A(Fh(t,0));function A(n){let r=[];n.forEach(s=>{t[s].forEach(({term:a,to:c})=>{if(!a)return;let u;for(let f=0;f<r.length;f++)r[f][0]==a&&(u=r[f][1]);Fh(t,c).forEach(f=>{u||r.push([a,u=[]]),u.indexOf(f)==-1&&u.push(f)})})});let i=e[n.join(",")]=new Wr(n.indexOf(t.length-1)>-1);for(let s=0;s<r.length;s++){let a=r[s][1].sort(Qh);i.next.push({type:r[s][0],next:e[a.join(",")]||A(a)})}return i}}function xQ(t,e){for(let A=0,n=[t];A<n.length;A++){let r=n[A],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&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function bh(t){let e=Object.create(null);for(let A in t){let n=t[A];if(!n.hasDefault)return null;e[A]=n.default}return e}function Uh(t,e){let A=Object.create(null);for(let n in t){let r=e&&e[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)}A[n]=r}return A}function vh(t){let e=Object.create(null);if(t)for(let A in t)e[A]=new OQ(t[A]);return e}let Ih=class fE{constructor(e,A,n){this.name=e,this.schema=A,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=vh(n.attrs),this.defaultAttrs=bh(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Wr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}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:Uh(this.attrs,e)}create(e=null,A,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new $r(this,this.computeAttrs(e),Y.from(A),Ze.setFrom(n))}createChecked(e=null,A,n){return A=Y.from(A),this.checkContent(A),new $r(this,this.computeAttrs(e),A,Ze.setFrom(n))}createAndFill(e=null,A,n){if(e=this.computeAttrs(e),A=Y.from(A),A.size){let s=this.contentMatch.fillBefore(A);if(!s)return null;A=s.append(A)}let r=this.contentMatch.matchFragment(A),i=r&&r.fillBefore(Y.empty,!0);return i?new $r(this,e,A.append(i),Ze.setFrom(n)):null}validContent(e){let A=this.contentMatch.matchFragment(e);if(!A||!A.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let A=0;A<e.length;A++)if(!this.allowsMarkType(e[A].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let A;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?A&&A.push(e[n]):A||(A=e.slice(0,n));return A?A.length?A:Ze.none:e}static compile(e,A){let n=Object.create(null);e.forEach((i,s)=>n[i]=new fE(i,A,s));let r=A.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 OQ{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Vo{constructor(e,A,n,r){this.name=e,this.rank=A,this.schema=n,this.spec=r,this.attrs=vh(r.attrs),this.excluded=null;let i=bh(this.attrs);this.instance=i?new Ze(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Ze(this,Uh(this.attrs,e))}static compile(e,A){let n=Object.create(null),r=0;return e.forEach((i,s)=>n[i]=new Vo(i,r++,A,s)),n}removeFromSet(e){for(var A=0;A<e.length;A++)e[A].type==this&&(e=e.slice(0,A).concat(e.slice(A+1)),A--);return e}isInSet(e){for(let A=0;A<e.length;A++)if(e[A].type==this)return e[A]}excludes(e){return this.excluded.indexOf(e)>-1}}class LQ{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let A=this.spec={};for(let r in e)A[r]=e[r];A.nodes=MA.from(e.nodes),A.marks=MA.from(e.marks||{}),this.nodes=Ih.compile(this.spec.nodes,this),this.marks=Vo.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;if(i.contentMatch=n[s]||(n[s]=Wr.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}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(e,A=null,n,r){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Ih){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(A,n,r)}text(e,A){let n=this.nodes.text;return new Ko(n,n.defaultAttrs,e,Ze.setFrom(A))}mark(e,A){return typeof e=="string"&&(e=this.marks[e]),e.create(A)}nodeFromJSON(e){return $r.fromJSON(this,e)}markFromJSON(e){return Ze.fromJSON(this,e)}nodeType(e){let A=this.nodes[e];if(!A)throw new RangeError("Unknown node type: "+e);return A}}function Sh(t,e){let A=[];for(let n=0;n<e.length;n++){let r=e[n],i=t.marks[r],s=i;if(i)A.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)&&A.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return A}function HQ(t){return t.tag!=null}function kQ(t){return t.style!=null}class Fi{constructor(e,A){this.schema=e,this.rules=A,this.tags=[],this.styles=[],A.forEach(n=>{HQ(n)?this.tags.push(n):kQ(n)&&this.styles.push(n)}),this.normalizeLists=!this.tags.some(n=>{if(!/^(ul|ol)\b/.test(n.tag)||!n.node)return!1;let r=e.nodes[n.node];return r.contentMatch.matchType(r)})}parse(e,A={}){let n=new Oh(this,A,!1);return n.addAll(e,A.from,A.to),n.finish()}parseSlice(e,A={}){let n=new Oh(this,A,!0);return n.addAll(e,A.from,A.to),j.maxOpen(n.finish())}matchTag(e,A,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let i=this.tags[r];if(MQ(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||A.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,A,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(e)!=0||s.context&&!n.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=A))){if(s.getAttrs){let c=s.getAttrs(A);if(c===!1)continue;s.attrs=c||void 0}return s}}}static schemaRules(e){let A=[];function n(r){let i=r.priority==null?50:r.priority,s=0;for(;s<A.length;s++){let a=A[s];if((a.priority==null?50:a.priority)<i)break}A.splice(s,0,r)}for(let r in e.marks){let i=e.marks[r].spec.parseDOM;i&&i.forEach(s=>{n(s=Lh(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in e.nodes){let i=e.nodes[r].spec.parseDOM;i&&i.forEach(s=>{n(s=Lh(s)),s.node||s.ignore||s.mark||(s.node=r)})}return A}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Fi(e,Fi.schemaRules(e)))}}const Th={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},NQ={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},_h={ol:!0,ul:!0},Po=1,Go=2,bs=4;function xh(t,e,A){return e!=null?(e?Po:0)|(e==="full"?Go:0):t&&t.whitespace=="pre"?Po|Go:A&~bs}class $o{constructor(e,A,n,r,i,s,a){this.type=e,this.attrs=A,this.marks=n,this.pendingMarks=r,this.solid=i,this.options=a,this.content=[],this.activeMarks=Ze.none,this.stashMarks=[],this.match=s||(a&bs?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let A=this.type.contentMatch.fillBefore(Y.from(e));if(A)this.match=this.type.contentMatch.matchFragment(A);else{let n=this.type.contentMatch,r;return(r=n.findWrapping(e.type))?(this.match=n,r):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Po)){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 A=Y.from(this.content);return!e&&this.match&&(A=A.append(this.match.fillBefore(Y.empty,!0))),this.type?this.type.create(this.attrs,A,this.marks):A}popFromStashMark(e){for(let A=this.stashMarks.length-1;A>=0;A--)if(e.eq(this.stashMarks[A]))return this.stashMarks.splice(A,1)[0]}applyPending(e){for(let A=0,n=this.pendingMarks;A<n.length;A++){let r=n[A];(this.type?this.type.allowsMarkType(r.type):RQ(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Th.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Oh{constructor(e,A,n){this.parser=e,this.options=A,this.isOpen=n,this.open=0;let r=A.topNode,i,s=xh(null,A.preserveWhitespace,0)|(n?bs:0);r?i=new $o(r.type,r.attrs,Ze.none,Ze.none,!0,A.topMatch||r.type.contentMatch,s):n?i=new $o(null,null,Ze.none,Ze.none,!0,null,s):i=new $o(e.schema.topNodeType,null,Ze.none,Ze.none,!0,null,s),this.nodes=[i],this.find=A.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){e.nodeType==3?this.addTextNode(e):e.nodeType==1&&this.addElement(e)}withStyleRules(e,A){let n=e.style;if(!n||!n.length)return A();let r=this.readStyles(e.style);if(!r)return;let[i,s]=r,a=this.top;for(let c=0;c<s.length;c++)this.removePendingMark(s[c],a);for(let c=0;c<i.length;c++)this.addPendingMark(i[c]);A();for(let c=0;c<i.length;c++)this.removePendingMark(i[c],a);for(let c=0;c<s.length;c++)this.addPendingMark(s[c])}addTextNode(e){let A=e.nodeValue,n=this.top;if(n.options&Go||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(A)){if(n.options&Po)n.options&Go?A=A.replace(/\r\n?/g,`
4
4
  `):A=A.replace(/\r?\n|\r/g," ");else if(A=A.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(A)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],i=e.previousSibling;(!r||i&&i.nodeName=="BR"||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(A=A.slice(1))}A&&this.insertNode(this.parser.schema.text(A)),this.findInText(e)}else this.findInside(e)}addElement(e,A){let n=e.nodeName.toLowerCase(),r;_h.hasOwnProperty(n)&&this.parser.normalizeLists&&DQ(e);let i=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(r=this.parser.matchTag(e,this,A));if(i?i.ignore:NQ.hasOwnProperty(n))this.findInside(e),this.ignoreFallback(e);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(e=i.skip);let s,a=this.top,c=this.needsBlock;if(Th.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(!e.firstChild){this.leafFallback(e);return}i&&i.skip?this.addAll(e):this.withStyleRules(e,()=>this.addAll(e)),s&&this.sync(a),this.needsBlock=c}else this.withStyleRules(e,()=>{this.addElementByRule(e,i,i.consuming===!1?r:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.1.161",
4
+ "version": "0.1.162",
5
5
  "scripts": {
6
6
  "dev": "vite --host",
7
7
  "build": "vue-tsc --noEmit && vite build",