@okam/directus-flexible-content 1.0.1 → 1.0.2

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.
Files changed (3) hide show
  1. package/index.js +1 -1
  2. package/index.mjs +0 -3
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ne=require("react/jsx-runtime"),ho=require("@tanstack/react-query"),Ki=require("radash"),ys=require("graphql-request"),ar=require("@okam/stack-ui"),Vi=require("react");throw new Error("This module cannot be imported from a Client Component module. It should only be used from a Server Component.");function bs(n,e){return e}const qi=process.env.NEXT_PUBLIC_GRAPHQL_URL,Ji=process.env.NEXT_GRAPHQL_URL_ADMIN,Ui=process.env.NEXT_PUBLIC_API_TOKEN??"",_i=process.env.NEXT_PUBLIC_API_TOKEN,Gi=new ys.GraphQLClient(qi,{credentials:"include",mode:"cors",fetch,headers:{Authorization:`Bearer ${Ui}`}});new ys.GraphQLClient(Ji,{credentials:"include",mode:"cors",fetch,headers:{Authorization:`Bearer ${_i}`}});new ho.QueryClient({queryCache:new ho.QueryCache({onError:n=>{console.error(n)}}),defaultOptions:{queries:{staleTime:5*1e3}}});function ks(n,e,t=Gi){return t.request(n,{...e})}process.env.NEXT_PUBLIC_GRAPHQL_URL;process.env.NEXT_PUBLIC_API_TOKEN;function cr(n){return!!n}function Qi(n){return!Ki.isEmpty(n)&&Object.keys(n).length===1&&Object.keys(n)[0]==="id"&&!!n.id}async function Xi(n){const{document:e,blockKey:t,variables:r}=n;if(!e||!cr(r))return null;const o=await ks(e,r);return!o||typeof o!="object"||!t?null:o[t]}async function Yi(n){const{document:e,item:t,blockKey:r,variables:o}=n;if(t){if(!Qi(t))return t;const l={id:t.id,...o};return cr(l)?Xi({...n,variables:l}):null}if(!e||!cr(o))return null;const s=await ks(e,o);return!s||typeof s!="object"||!r?null:s[r]}function Zi(n,...e){return e.reduce((r,o)=>o?{components:{...r.components,...o.components}}:r,n)}const Ss={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"BlockSettings"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"block_settings"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tokens"}},{kind:"Field",name:{kind:"Name",value:"variant"}}]}}]},el=n=>{var g,y,M;const{item:e,collection:t,config:r,variables:o,defaultVariant:s,...i}=n;if(!t||!r)return null;const l=(g=r==null?void 0:r.components)==null?void 0:g[t];if(!l)return null;const{settings:a}=e??{},c=(e==null?void 0:e.id)??(o==null?void 0:o.id);if(!c)return null;const{variant:u}=bs(Ss,a)??{},d=((y=l.getVariant)==null?void 0:y.call(l,n))??u??s,{default:f,document:h}=l,m=((M=l.variants)==null?void 0:M[d??""])??f;return m?ne.jsx(m,{document:h,config:r,collection:t,item:e,...c?{variables:{...o,id:c}}:{variables:o},...i},c):null},tl=async n=>{const{variables:e,themeName:t="wysiwyg",tokens:r,item:o,document:s}=n,i=await Yi({item:o,blockKey:"block_wysiwyg_by_id",document:s,variables:e});if(!i)return null;const{content:l,title:a,level:c,settings:u}=i,{tokens:d}=bs(Ss,u)??{};return!l&&!(a&&c)?null:ne.jsxs(ne.Fragment,{children:[a&&c&&ne.jsx(ar.Box,{as:"span",themeName:t,tokens:{...r,...d},children:Vi.createElement(c,{},a)}),l&&ne.jsx(ar.WysiwygBlock,{themeName:t,tokens:{...r,...d},content:l})]})},nl={block_wysiwyg:{default:n=>ne.jsx(tl,{...n})}},rl={components:{...nl}},po=n=>{const{children:e,config:t,...r}=n,o=Zi(rl,t),s=l=>e?e({...r,...l,config:o}):ne.jsx(el,{...r,...l,config:o});if("blocks"in n){const{blocks:l}=n;return l.map(s)}const{block:i}=n;return s(i)};function Cs(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let o=n.child(r),s=e.child(r);if(o==s){t+=o.nodeSize;continue}if(!o.sameMarkup(s))return t;if(o.isText&&o.text!=s.text){for(let i=0;o.text[i]==s.text[i];i++)t++;return t}if(o.content.size||s.content.size){let i=Cs(o.content,s.content,t+1);if(i!=null)return i}t+=o.nodeSize}}function ws(n,e,t,r){for(let o=n.childCount,s=e.childCount;;){if(o==0||s==0)return o==s?null:{a:t,b:r};let i=n.child(--o),l=e.child(--s),a=i.nodeSize;if(i==l){t-=a,r-=a;continue}if(!i.sameMarkup(l))return{a:t,b:r};if(i.isText&&i.text!=l.text){let c=0,u=Math.min(i.text.length,l.text.length);for(;c<u&&i.text[i.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(i.content.size||l.content.size){let c=ws(i.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class b{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,o=0,s){for(let i=0,l=0;l<t;i++){let a=this.content[i],c=l+a.nodeSize;if(c>e&&r(a,o+l,s||null,i)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,o+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,o){let s="",i=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(i?i=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,o=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(o[o.length-1]=t.withText(t.text+r.text),s=1);s<e.content.length;s++)o.push(e.content[s]);return new b(o,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],o=0;if(t>e)for(let s=0,i=0;i<t;s++){let l=this.content[s],a=i+l.nodeSize;a>e&&((i<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-i),Math.min(l.text.length,t-i)):l=l.cut(Math.max(0,e-i-1),Math.min(l.content.size,t-i-1))),r.push(l),o+=l.nodeSize),i=a}return new b(r,o)}cutByIndex(e,t){return e==t?b.empty:e==0&&t==this.content.length?this:new b(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let o=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return o[e]=t,new b(o,s)}addToStart(e){return new b([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new b(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let o=this.content[t];e(o,r,t),r+=o.nodeSize}}findDiffStart(e,t=0){return Cs(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return ws(this,e,t,r)}findIndex(e,t=-1){if(e==0)return At(0,e);if(e==this.size)return At(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let s=this.child(r),i=o+s.nodeSize;if(i>=e)return i==e||t>0?At(r+1,i):At(r,o);o=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return b.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new b(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return b.empty;let t,r=0;for(let o=0;o<e.length;o++){let s=e[o];r+=s.nodeSize,o&&s.isText&&e[o-1].sameMarkup(s)?(t||(t=e.slice(0,o)),t[t.length-1]=s.withText(t[t.length-1].text+s.text)):t&&t.push(s)}return new b(t||e,r)}static from(e){if(!e)return b.empty;if(e instanceof b)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new b([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}b.empty=new b([],0);const jn={index:0,offset:0};function At(n,e){return jn.index=n,jn.offset=e,jn}function ur(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!ur(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!ur(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _=class dr{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let o=0;o<e.length;o++){let s=e[o];if(this.eq(s))return e;if(this.type.excludes(s.type))t||(t=e.slice(0,o));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(t||(t=e.slice(0,o)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ur(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);return r.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return dr.none;if(e instanceof dr)return[e];let t=e.slice();return t.sort((r,o)=>r.type.rank-o.type.rank),t}};_.none=[];class ol extends Error{}class S{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ts(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(xs(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return S.empty;let r=t.openStart||0,o=t.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(b.fromJSON(e,t.content),r,o)}static maxOpen(e,t=!0){let r=0,o=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)o++;return new S(e,r,o)}}S.empty=new S(b.empty,0,0);function xs(n,e,t){let{index:r,offset:o}=n.findIndex(e),s=n.maybeChild(r),{index:i,offset:l}=n.findIndex(t);if(o==e||s.isText){if(l!=t&&!n.child(i).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=i)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(xs(s.content,e-o-1,t-o-1)))}function Ts(n,e,t,r){let{index:o,offset:s}=n.findIndex(e),i=n.maybeChild(o);if(s==e||i.isText)return n.cut(0,e).append(t).append(n.cut(e));let l=Ts(i.content,e-s-1,t);return l&&n.replaceChild(o,i.copy(l))}class fr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}function sl(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function il(n,e){let t=Object.create(null);for(let r in n){let o=e&&e[r];if(o===void 0){let s=n[r];if(s.hasDefault)o=s.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=o}return t}function ll(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new al(n[t]);return e}class al{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Dr{constructor(e,t,r,o){this.name=e,this.rank=t,this.schema=r,this.spec=o,this.attrs=ll(o.attrs),this.excluded=null;let s=sl(this.attrs);this.instance=s?new _(this,s):null}create(e=null){return!e&&this.instance?this.instance:new _(this,il(this.attrs,e))}static compile(e,t){let r=Object.create(null),o=0;return e.forEach((s,i)=>r[s]=new Dr(s,o++,t,i)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}function cl(n){return n.tag!=null}function ul(n){return n.style!=null}class pt{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(o=>{if(cl(o))this.tags.push(o);else if(ul(o)){let s=/[^=]*/.exec(o.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let s=e.nodes[o.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let r=new go(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new go(this,t,!0);return r.addAll(e,t.from,t.to),S.maxOpen(r.finish())}matchTag(e,t,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let s=this.tags[o];if(hl(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||t.matchesContext(s.context))){if(s.getAttrs){let i=s.getAttrs(e);if(i===!1)continue;s.attrs=i||void 0}return s}}}matchStyle(e,t,r,o){for(let s=o?this.styles.indexOf(o)+1:0;s<this.styles.length;s++){let i=this.styles[s],l=i.style;if(!(l.indexOf(e)!=0||i.context&&!r.matchesContext(i.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(i.getAttrs){let a=i.getAttrs(t);if(a===!1)continue;i.attrs=a||void 0}return i}}}static schemaRules(e){let t=[];function r(o){let s=o.priority==null?50:o.priority,i=0;for(;i<t.length;i++){let l=t[i];if((l.priority==null?50:l.priority)<s)break}t.splice(i,0,o)}for(let o in e.marks){let s=e.marks[o].spec.parseDOM;s&&s.forEach(i=>{r(i=yo(i)),i.mark||i.ignore||i.clearMark||(i.mark=o)})}for(let o in e.nodes){let s=e.nodes[o].spec.parseDOM;s&&s.forEach(i=>{r(i=yo(i)),i.node||i.ignore||i.mark||(i.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new pt(e,pt.schemaRules(e)))}}const As={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},dl={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ms={ol:!0,ul:!0},Wt=1,Kt=2,at=4;function mo(n,e,t){return e!=null?(e?Wt:0)|(e==="full"?Kt:0):n&&n.whitespace=="pre"?Wt|Kt:t&~at}class Mt{constructor(e,t,r,o,s,i,l){this.type=e,this.attrs=t,this.marks=r,this.pendingMarks=o,this.solid=s,this.options=l,this.content=[],this.activeMarks=_.none,this.stashMarks=[],this.match=i||(l&at?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(b.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Wt)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-o[0].length))}}let t=b.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(b.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,r=this.pendingMarks;t<r.length;t++){let o=r[t];(this.type?this.type.allowsMarkType(o.type):pl(o.type,e))&&!o.isInSet(this.activeMarks)&&(this.activeMarks=o.addToSet(this.activeMarks),this.pendingMarks=o.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!As.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class go{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let o=t.topNode,s,i=mo(null,t.preserveWhitespace,0)|(r?at:0);o?s=new Mt(o.type,o.attrs,_.none,_.none,!0,t.topMatch||o.type.contentMatch,i):r?s=new Mt(null,null,_.none,_.none,!0,null,i):s=new Mt(e.schema.topNodeType,null,_.none,_.none,!0,null,i),this.nodes=[s],this.find=t.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,t){let r=e.style;if(!r||!r.length)return t();let o=this.readStyles(e.style);if(!o)return;let[s,i]=o,l=this.top;for(let a=0;a<i.length;a++)this.removePendingMark(i[a],l);for(let a=0;a<s.length;a++)this.addPendingMark(s[a]);t();for(let a=0;a<s.length;a++)this.removePendingMark(s[a],l);for(let a=0;a<i.length;a++)this.addPendingMark(i[a])}addTextNode(e){let t=e.nodeValue,r=this.top;if(r.options&Kt||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&Wt)r.options&Kt?t=t.replace(/\r\n?/g,`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ne=require("react/jsx-runtime"),ho=require("@tanstack/react-query"),Ki=require("radash"),ys=require("graphql-request"),ar=require("@okam/stack-ui"),Vi=require("react");function bs(n,e){return e}const qi=process.env.NEXT_PUBLIC_GRAPHQL_URL,Ji=process.env.NEXT_GRAPHQL_URL_ADMIN,Ui=process.env.NEXT_PUBLIC_API_TOKEN??"",_i=process.env.NEXT_PUBLIC_API_TOKEN,Gi=new ys.GraphQLClient(qi,{credentials:"include",mode:"cors",fetch,headers:{Authorization:`Bearer ${Ui}`}});new ys.GraphQLClient(Ji,{credentials:"include",mode:"cors",fetch,headers:{Authorization:`Bearer ${_i}`}});new ho.QueryClient({queryCache:new ho.QueryCache({onError:n=>{console.error(n)}}),defaultOptions:{queries:{staleTime:5*1e3}}});function ks(n,e,t=Gi){return t.request(n,{...e})}process.env.NEXT_PUBLIC_GRAPHQL_URL;process.env.NEXT_PUBLIC_API_TOKEN;function cr(n){return!!n}function Qi(n){return!Ki.isEmpty(n)&&Object.keys(n).length===1&&Object.keys(n)[0]==="id"&&!!n.id}async function Xi(n){const{document:e,blockKey:t,variables:r}=n;if(!e||!cr(r))return null;const o=await ks(e,r);return!o||typeof o!="object"||!t?null:o[t]}async function Yi(n){const{document:e,item:t,blockKey:r,variables:o}=n;if(t){if(!Qi(t))return t;const l={id:t.id,...o};return cr(l)?Xi({...n,variables:l}):null}if(!e||!cr(o))return null;const s=await ks(e,o);return!s||typeof s!="object"||!r?null:s[r]}function Zi(n,...e){return e.reduce((r,o)=>o?{components:{...r.components,...o.components}}:r,n)}const Ss={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"BlockSettings"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"block_settings"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"tokens"}},{kind:"Field",name:{kind:"Name",value:"variant"}}]}}]},el=n=>{var g,y,M;const{item:e,collection:t,config:r,variables:o,defaultVariant:s,...i}=n;if(!t||!r)return null;const l=(g=r==null?void 0:r.components)==null?void 0:g[t];if(!l)return null;const{settings:a}=e??{},c=(e==null?void 0:e.id)??(o==null?void 0:o.id);if(!c)return null;const{variant:u}=bs(Ss,a)??{},d=((y=l.getVariant)==null?void 0:y.call(l,n))??u??s,{default:f,document:h}=l,m=((M=l.variants)==null?void 0:M[d??""])??f;return m?ne.jsx(m,{document:h,config:r,collection:t,item:e,...c?{variables:{...o,id:c}}:{variables:o},...i},c):null},tl=async n=>{const{variables:e,themeName:t="wysiwyg",tokens:r,item:o,document:s}=n,i=await Yi({item:o,blockKey:"block_wysiwyg_by_id",document:s,variables:e});if(!i)return null;const{content:l,title:a,level:c,settings:u}=i,{tokens:d}=bs(Ss,u)??{};return!l&&!(a&&c)?null:ne.jsxs(ne.Fragment,{children:[a&&c&&ne.jsx(ar.Box,{as:"span",themeName:t,tokens:{...r,...d},children:Vi.createElement(c,{},a)}),l&&ne.jsx(ar.WysiwygBlock,{themeName:t,tokens:{...r,...d},content:l})]})},nl={block_wysiwyg:{default:n=>ne.jsx(tl,{...n})}},rl={components:{...nl}},po=n=>{const{children:e,config:t,...r}=n,o=Zi(rl,t),s=l=>e?e({...r,...l,config:o}):ne.jsx(el,{...r,...l,config:o});if("blocks"in n){const{blocks:l}=n;return l.map(s)}const{block:i}=n;return s(i)};function Cs(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let o=n.child(r),s=e.child(r);if(o==s){t+=o.nodeSize;continue}if(!o.sameMarkup(s))return t;if(o.isText&&o.text!=s.text){for(let i=0;o.text[i]==s.text[i];i++)t++;return t}if(o.content.size||s.content.size){let i=Cs(o.content,s.content,t+1);if(i!=null)return i}t+=o.nodeSize}}function ws(n,e,t,r){for(let o=n.childCount,s=e.childCount;;){if(o==0||s==0)return o==s?null:{a:t,b:r};let i=n.child(--o),l=e.child(--s),a=i.nodeSize;if(i==l){t-=a,r-=a;continue}if(!i.sameMarkup(l))return{a:t,b:r};if(i.isText&&i.text!=l.text){let c=0,u=Math.min(i.text.length,l.text.length);for(;c<u&&i.text[i.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(i.content.size||l.content.size){let c=ws(i.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class b{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,o=0,s){for(let i=0,l=0;l<t;i++){let a=this.content[i],c=l+a.nodeSize;if(c>e&&r(a,o+l,s||null,i)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,o+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,o){let s="",i=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(i?i=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,o=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(o[o.length-1]=t.withText(t.text+r.text),s=1);s<e.content.length;s++)o.push(e.content[s]);return new b(o,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],o=0;if(t>e)for(let s=0,i=0;i<t;s++){let l=this.content[s],a=i+l.nodeSize;a>e&&((i<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-i),Math.min(l.text.length,t-i)):l=l.cut(Math.max(0,e-i-1),Math.min(l.content.size,t-i-1))),r.push(l),o+=l.nodeSize),i=a}return new b(r,o)}cutByIndex(e,t){return e==t?b.empty:e==0&&t==this.content.length?this:new b(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let o=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return o[e]=t,new b(o,s)}addToStart(e){return new b([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new b(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let o=this.content[t];e(o,r,t),r+=o.nodeSize}}findDiffStart(e,t=0){return Cs(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return ws(this,e,t,r)}findIndex(e,t=-1){if(e==0)return At(0,e);if(e==this.size)return At(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let s=this.child(r),i=o+s.nodeSize;if(i>=e)return i==e||t>0?At(r+1,i):At(r,o);o=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return b.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new b(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return b.empty;let t,r=0;for(let o=0;o<e.length;o++){let s=e[o];r+=s.nodeSize,o&&s.isText&&e[o-1].sameMarkup(s)?(t||(t=e.slice(0,o)),t[t.length-1]=s.withText(t[t.length-1].text+s.text)):t&&t.push(s)}return new b(t||e,r)}static from(e){if(!e)return b.empty;if(e instanceof b)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new b([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}b.empty=new b([],0);const jn={index:0,offset:0};function At(n,e){return jn.index=n,jn.offset=e,jn}function ur(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!ur(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!ur(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _=class dr{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let o=0;o<e.length;o++){let s=e[o];if(this.eq(s))return e;if(this.type.excludes(s.type))t||(t=e.slice(0,o));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(t||(t=e.slice(0,o)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ur(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);return r.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return dr.none;if(e instanceof dr)return[e];let t=e.slice();return t.sort((r,o)=>r.type.rank-o.type.rank),t}};_.none=[];class ol extends Error{}class S{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ts(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(xs(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return S.empty;let r=t.openStart||0,o=t.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(b.fromJSON(e,t.content),r,o)}static maxOpen(e,t=!0){let r=0,o=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)o++;return new S(e,r,o)}}S.empty=new S(b.empty,0,0);function xs(n,e,t){let{index:r,offset:o}=n.findIndex(e),s=n.maybeChild(r),{index:i,offset:l}=n.findIndex(t);if(o==e||s.isText){if(l!=t&&!n.child(i).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=i)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(xs(s.content,e-o-1,t-o-1)))}function Ts(n,e,t,r){let{index:o,offset:s}=n.findIndex(e),i=n.maybeChild(o);if(s==e||i.isText)return n.cut(0,e).append(t).append(n.cut(e));let l=Ts(i.content,e-s-1,t);return l&&n.replaceChild(o,i.copy(l))}class fr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}function sl(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function il(n,e){let t=Object.create(null);for(let r in n){let o=e&&e[r];if(o===void 0){let s=n[r];if(s.hasDefault)o=s.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=o}return t}function ll(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new al(n[t]);return e}class al{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Dr{constructor(e,t,r,o){this.name=e,this.rank=t,this.schema=r,this.spec=o,this.attrs=ll(o.attrs),this.excluded=null;let s=sl(this.attrs);this.instance=s?new _(this,s):null}create(e=null){return!e&&this.instance?this.instance:new _(this,il(this.attrs,e))}static compile(e,t){let r=Object.create(null),o=0;return e.forEach((s,i)=>r[s]=new Dr(s,o++,t,i)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}function cl(n){return n.tag!=null}function ul(n){return n.style!=null}class pt{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(o=>{if(cl(o))this.tags.push(o);else if(ul(o)){let s=/[^=]*/.exec(o.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let s=e.nodes[o.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let r=new go(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new go(this,t,!0);return r.addAll(e,t.from,t.to),S.maxOpen(r.finish())}matchTag(e,t,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let s=this.tags[o];if(hl(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||t.matchesContext(s.context))){if(s.getAttrs){let i=s.getAttrs(e);if(i===!1)continue;s.attrs=i||void 0}return s}}}matchStyle(e,t,r,o){for(let s=o?this.styles.indexOf(o)+1:0;s<this.styles.length;s++){let i=this.styles[s],l=i.style;if(!(l.indexOf(e)!=0||i.context&&!r.matchesContext(i.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(i.getAttrs){let a=i.getAttrs(t);if(a===!1)continue;i.attrs=a||void 0}return i}}}static schemaRules(e){let t=[];function r(o){let s=o.priority==null?50:o.priority,i=0;for(;i<t.length;i++){let l=t[i];if((l.priority==null?50:l.priority)<s)break}t.splice(i,0,o)}for(let o in e.marks){let s=e.marks[o].spec.parseDOM;s&&s.forEach(i=>{r(i=yo(i)),i.mark||i.ignore||i.clearMark||(i.mark=o)})}for(let o in e.nodes){let s=e.nodes[o].spec.parseDOM;s&&s.forEach(i=>{r(i=yo(i)),i.node||i.ignore||i.mark||(i.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new pt(e,pt.schemaRules(e)))}}const As={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},dl={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ms={ol:!0,ul:!0},Wt=1,Kt=2,at=4;function mo(n,e,t){return e!=null?(e?Wt:0)|(e==="full"?Kt:0):n&&n.whitespace=="pre"?Wt|Kt:t&~at}class Mt{constructor(e,t,r,o,s,i,l){this.type=e,this.attrs=t,this.marks=r,this.pendingMarks=o,this.solid=s,this.options=l,this.content=[],this.activeMarks=_.none,this.stashMarks=[],this.match=i||(l&at?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(b.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Wt)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-o[0].length))}}let t=b.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(b.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,r=this.pendingMarks;t<r.length;t++){let o=r[t];(this.type?this.type.allowsMarkType(o.type):pl(o.type,e))&&!o.isInSet(this.activeMarks)&&(this.activeMarks=o.addToSet(this.activeMarks),this.pendingMarks=o.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!As.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class go{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let o=t.topNode,s,i=mo(null,t.preserveWhitespace,0)|(r?at:0);o?s=new Mt(o.type,o.attrs,_.none,_.none,!0,t.topMatch||o.type.contentMatch,i):r?s=new Mt(null,null,_.none,_.none,!0,null,i):s=new Mt(e.schema.topNodeType,null,_.none,_.none,!0,null,i),this.nodes=[s],this.find=t.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,t){let r=e.style;if(!r||!r.length)return t();let o=this.readStyles(e.style);if(!o)return;let[s,i]=o,l=this.top;for(let a=0;a<i.length;a++)this.removePendingMark(i[a],l);for(let a=0;a<s.length;a++)this.addPendingMark(s[a]);t();for(let a=0;a<s.length;a++)this.removePendingMark(s[a],l);for(let a=0;a<i.length;a++)this.addPendingMark(i[a])}addTextNode(e){let t=e.nodeValue,r=this.top;if(r.options&Kt||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&Wt)r.options&Kt?t=t.replace(/\r\n?/g,`
2
2
  `):t=t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let o=r.content[r.content.length-1],s=e.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let r=e.nodeName.toLowerCase(),o;Ms.hasOwnProperty(r)&&this.parser.normalizeLists&&fl(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,t));if(s?s.ignore:dl.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let i,l=this.top,a=this.needsBlock;if(As.hasOwnProperty(r))l.content.length&&l.content[0].isInline&&this.open&&(this.open--,l=this.top),i=!0,l.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}s&&s.skip?this.addAll(e):this.withStyleRules(e,()=>this.addAll(e)),i&&this.sync(l),this.needsBlock=a}else this.withStyleRules(e,()=>{this.addElementByRule(e,s,s.consuming===!1?o:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
3
3
  `))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=_.none,r=_.none;if(e.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let s=this.parser.matchedStyles[o],i=e.getPropertyValue(s);if(i)for(let l=void 0;;){let a=this.parser.matchStyle(s,i,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(c=>{a.clearMark(c)&&(r=c.addToSet(r))}):t=this.parser.schema.marks[a.mark].create(a.attrs).addToSet(t),a.consuming===!1)l=a;else break}}return[t,r]}addElementByRule(e,t,r){let o,s,i;t.node?(s=this.parser.schema.nodes[t.node],s.isLeaf?this.insertNode(s.create(t.attrs))||this.leafFallback(e):o=this.enter(s,t.attrs||null,t.preserveWhitespace)):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a)}o&&this.sync(l)&&this.open--,i&&this.removePendingMark(i,l)}addAll(e,t,r){let o=t||0;for(let s=t?e.childNodes[t]:e.firstChild,i=r==null?null:e.childNodes[r];s!=i;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s);this.findAtPoint(e,o)}findPlace(e){let t,r;for(let o=this.open;o>=0;o--){let s=this.nodes[o],i=s.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,r=s,!i.length)||s.solid)break}if(!t)return!1;this.sync(r);for(let o=0;o<t.length;o++)this.enterInner(t[o],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let r=t.activeMarks;for(let o=0;o<e.marks.length;o++)(!t.type||t.type.allowsMarkType(e.marks[o].type))&&(r=e.marks[o].addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r){let o=this.findPlace(e.create(t));return o&&this.enterInner(e,t,!0,r),o}enterInner(e,t=null,r=!1,o){this.closeExtra();let s=this.top;s.applyPending(e),s.match=s.match&&s.match.matchType(e);let i=mo(e,o,s.options);s.options&at&&s.content.length==0&&(i|=at),this.nodes.push(new Mt(e,t,s.activeMarks,s.pendingMarks,r,null,i)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&t.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(o?0:1),i=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=s;a--)if(i(l-1,a))return!0;return!1}else{let u=a>0||a==0&&o?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;a--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let t=ml(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(e)>-1)o.pendingMarks=e.removeFromSet(o.pendingMarks);else{o.activeMarks=e.removeFromSet(o.activeMarks);let i=o.popFromStashMark(e);i&&o.type&&o.type.allowsMarkType(i.type)&&(o.activeMarks=i.addToSet(o.activeMarks))}if(o==t)break}}}function fl(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Ms.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function hl(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function yo(n){let e={};for(let t in n)e[t]=n[t];return e}function pl(n,e){let t=e.schema.nodes;for(let r in t){let o=t[r];if(!o.allowsMarkType(n))continue;let s=[],i=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||s.indexOf(u)<0&&i(u))return!0}};if(i(o.contentMatch))return!0}}function ml(n,e){for(let t=0;t<e.length;t++)if(n.eq(e[t]))return e[t]}class ve{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Wn(t).createDocumentFragment());let o=r,s=[];return e.forEach(i=>{if(s.length||i.marks.length){let l=0,a=0;for(;l<s.length&&a<i.marks.length;){let c=i.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(s[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)o=s.pop()[1];for(;a<i.marks.length;){let c=i.marks[a++],u=this.serializeMark(c,i.isInline,t);u&&(s.push([c,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(i,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:o}=ve.renderSpec(Wn(t),this.nodes[e.type.name](e));if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,o)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let o=e.marks.length-1;o>=0;o--){let s=this.serializeMark(e.marks[o],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let o=this.marks[e.type.name];return o&&ve.renderSpec(Wn(r),o(e,t))}static renderSpec(e,t,r=null){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let o=t[0],s=o.indexOf(" ");s>0&&(r=o.slice(0,s),o=o.slice(s+1));let i,l=r?e.createElementNS(r,o):e.createElement(o),a=t[1],c=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){c=2;for(let u in a)if(a[u]!=null){let d=u.indexOf(" ");d>0?l.setAttributeNS(u.slice(0,d),u.slice(d+1),a[u]):l.setAttribute(u,a[u])}}for(let u=c;u<t.length;u++){let d=t[u];if(d===0){if(u<t.length-1||u>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:h}=ve.renderSpec(e,d,r);if(l.appendChild(f),h){if(i)throw new RangeError("Multiple content holes");i=h}}}return{dom:l,contentDOM:i}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ve(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=bo(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return bo(e.marks)}}function bo(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Wn(n){return n.document||window.document}const Es=65535,Ns=Math.pow(2,16);function gl(n,e){return n+e*Ns}function ko(n){return n&Es}function yl(n){return(n-(n&Es))/Ns}const Rs=1,Os=2,Dt=4,Is=8;class hr{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Is)>0}get deletedBefore(){return(this.delInfo&(Rs|Dt))>0}get deletedAfter(){return(this.delInfo&(Os|Dt))>0}get deletedAcross(){return(this.delInfo&Dt)>0}}class G{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&G.empty)return G.empty}recover(e){let t=0,r=ko(e);if(!this.inverted)for(let o=0;o<r;o++)t+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+t+yl(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let o=0,s=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?o:0);if(a>e)break;let c=this.ranges[l+s],u=this.ranges[l+i],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+o+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:gl(l/3,e-a),m=e==a?Os:e==d?Rs:Dt;return(t<0?e!=a:e!=d)&&(m|=Is),new hr(h,m,p)}o+=u-c}return r?e+o:new hr(e+o,0,null)}touches(e,t){let r=0,o=ko(t),s=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+s],u=a+c;if(e<=u&&l==o*3)return!0;r+=this.ranges[l+i]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,s=0;o<this.ranges.length;o+=3){let i=this.ranges[o],l=i-(this.inverted?s:0),a=i+(this.inverted?0:s),c=this.ranges[o+t],u=this.ranges[o+r];e(l,l+c,a,a+u),s+=u-c}}invert(){return new G(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?G.empty:new G(e<0?[0,-e,0]:[0,0,e])}}G.empty=new G([]);class ct{constructor(e=[],t,r=0,o=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=o}slice(e=0,t=this.maps.length){return new ct(this.maps,this.mirror,e,t)}copy(){return new ct(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let o=e.getMirror(t);this.appendMap(e.maps[t],o!=null&&o<t?r+o:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let o=e.getMirror(t);this.appendMap(e.maps[t].invert(),o!=null&&o>t?r-o-1:void 0)}}invert(){let e=new ct;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let o=0;for(let s=this.from;s<this.to;s++){let i=this.maps[s],l=i.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,e=this.maps[a].recover(l.recover);continue}}o|=l.delInfo,e=l.pos}return r?e:new hr(e,o,null)}}const Kn=Object.create(null);class V{getMap(){return G.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Kn[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Kn)throw new RangeError("Duplicate use of step JSON ID "+e);return Kn[e]=t,t.prototype.jsonID=e,t}}class B{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new B(e,null)}static fail(e){return new B(null,e)}static fromReplace(e,t,r,o){try{return B.ok(e.replace(t,r,o))}catch(s){if(s instanceof ol)return B.fail(s.message);throw s}}}function Br(n,e,t){let r=[];for(let o=0;o<n.childCount;o++){let s=n.child(o);s.content.size&&(s=s.copy(Br(s.content,e,s))),s.isInline&&(s=e(s,t,o)),r.push(s)}return b.fromArray(r)}class Te extends V{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),s=new S(Br(t.content,(i,l)=>!i.isAtom||!l.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),o),t.openStart,t.openEnd);return B.fromReplace(e,this.from,this.to,s)}invert(){return new he(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Te(t.pos,r.pos,this.mark)}merge(e){return e instanceof Te&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Te(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Te(t.from,t.to,e.markFromJSON(t.mark))}}V.jsonID("addMark",Te);class he extends V{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new S(Br(t.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),t.openStart,t.openEnd);return B.fromReplace(e,this.from,this.to,r)}invert(){return new Te(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new he(t.pos,r.pos,this.mark)}merge(e){return e instanceof he&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new he(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new he(t.from,t.to,e.markFromJSON(t.mark))}}V.jsonID("removeMark",he);class Ae extends V{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return B.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return B.fromReplace(e,this.pos,this.pos+1,new S(b.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let o=0;o<t.marks.length;o++)if(!t.marks[o].isInSet(r))return new Ae(this.pos,t.marks[o]);return new Ae(this.pos,this.mark)}}return new Ye(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ae(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ae(t.pos,e.markFromJSON(t.mark))}}V.jsonID("addNodeMark",Ae);class Ye extends V{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return B.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return B.fromReplace(e,this.pos,this.pos+1,new S(b.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Ae(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ye(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ye(t.pos,e.markFromJSON(t.mark))}}V.jsonID("removeNodeMark",Ye);class $ extends V{constructor(e,t,r,o=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=o}apply(e){return this.structure&&pr(e,this.from,this.to)?B.fail("Structure replace would overwrite content"):B.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new G([this.from,this.to-this.from,this.slice.size])}invert(e){return new $(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new $(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof $)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?S.empty:new S(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new $(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?S.empty:new S(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new $(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new $(t.from,t.to,S.fromJSON(e,t.slice),!!t.structure)}}V.jsonID("replace",$);class F extends V{constructor(e,t,r,o,s,i,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=o,this.slice=s,this.insert=i,this.structure=l}apply(e){if(this.structure&&(pr(e,this.from,this.gapFrom)||pr(e,this.gapTo,this.to)))return B.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return B.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?B.fromReplace(e,this.from,this.to,r):B.fail("Content does not fit in gap")}getMap(){return new G([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new F(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||s>r.pos?null:new F(t.pos,r.pos,o,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new F(t.from,t.to,t.gapFrom,t.gapTo,S.fromJSON(e,t.slice),t.insert,!!t.structure)}}V.jsonID("replaceAround",F);function pr(n,e,t){let r=n.resolve(e),o=t-e,s=r.depth;for(;o>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,o--;if(o>0){let i=r.node(s).maybeChild(r.indexAfter(s));for(;o>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,o--}}return!1}function bl(n,e,t,r){let o=[],s=[],i,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(i&&i.to==f&&i.mark.eq(d[m])?i.to=h:o.push(i=new he(f,h,d[m])));l&&l.to==f?l.to=h:s.push(l=new Te(f,h,r))}}),o.forEach(a=>n.step(a)),s.forEach(a=>n.step(a))}function kl(n,e,t,r){let o=[],s=0;n.doc.nodesBetween(e,t,(i,l)=>{if(!i.isInline)return;s++;let a=null;if(r instanceof Dr){let c=i.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(i.marks)&&(a=[r]):a=i.marks;if(a&&a.length){let c=Math.min(l+i.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<o.length;h++){let p=o[h];p.step==s-1&&d.eq(o[h].style)&&(f=p)}f?(f.to=c,f.step=s):o.push({style:d,from:Math.max(l,e),to:c,step:s})}}}),o.forEach(i=>n.step(new he(i.from,i.to,i.style)))}function Ls(n,e,t,r=t.contentMatch,o=!0){let s=n.doc.nodeAt(e),i=[],l=e+1;for(let a=0;a<s.childCount;a++){let c=s.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)i.push(new $(l,u,S.empty));else{r=d;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new he(l,u,c.marks[f]));if(o&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new S(b.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),i.push(new $(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(b.empty,!0);n.replace(l,l,new S(a,0,0))}for(let a=i.length-1;a>=0;a--)n.step(i[a])}function Sl(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function rt(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let o=n.$from.node(r),s=n.$from.index(r),i=n.$to.indexAfter(r);if(r<n.depth&&o.canReplace(s,i,t))return r;if(r==0||o.type.spec.isolating||!Sl(o,s,i))break}return null}function Cl(n,e,t){let{$from:r,$to:o,depth:s}=e,i=r.before(s+1),l=o.after(s+1),a=i,c=l,u=b.empty,d=0;for(let p=s,m=!1;p>t;p--)m||r.index(p)>0?(m=!0,u=b.from(r.node(p).copy(u)),d++):a--;let f=b.empty,h=0;for(let p=s,m=!1;p>t;p--)m||o.after(p+1)<o.end(p)?(m=!0,f=b.from(o.node(p).copy(f)),h++):c++;n.step(new F(a,c,i,l,new S(u.append(f),d,h),u.size-d,!0))}function Hr(n,e,t=null,r=n){let o=wl(n,e),s=o&&xl(r,e);return s?o.map(So).concat({type:e,attrs:t}).concat(s.map(So)):null}function So(n){return{type:n,attrs:null}}function wl(n,e){let{parent:t,startIndex:r,endIndex:o}=n,s=t.contentMatchAt(r).findWrapping(e);if(!s)return null;let i=s.length?s[0]:e;return t.canReplaceWith(r,o,i)?s:null}function xl(n,e){let{parent:t,startIndex:r,endIndex:o}=n,s=t.child(r),i=e.contentMatch.findWrapping(s.type);if(!i)return null;let a=(i.length?i[i.length-1]:e).contentMatch;for(let c=r;a&&c<o;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:i}function Tl(n,e,t){let r=b.empty;for(let i=t.length-1;i>=0;i--){if(r.size){let l=t[i].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=b.from(t[i].type.create(t[i].attrs,r))}let o=e.start,s=e.end;n.step(new F(o,s,o,s,new S(r,0,0),t.length,!0))}function Al(n,e,t,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(i,l)=>{if(i.isTextblock&&!i.hasMarkup(r,o)&&Nl(n.doc,n.mapping.slice(s).map(l),r)){let a=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!h?a=!1:!f&&h&&(a=!0)}a===!1&&El(n,i,l,s),Ls(n,n.mapping.slice(s).map(l,1),r,void 0,a===null);let c=n.mapping.slice(s),u=c.map(l,1),d=c.map(l+i.nodeSize,1);return n.step(new F(u,d,u+1,d-1,new S(b.from(r.create(o,null,i.marks)),0,0),1,!0)),a===!0&&Ml(n,i,l,s),!1}})}function Ml(n,e,t,r){e.forEach((o,s)=>{if(o.isText){let i,l=/\r?\n|\r/g;for(;i=l.exec(o.text);){let a=n.mapping.slice(r).map(t+1+s+i.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function El(n,e,t,r){e.forEach((o,s)=>{if(o.type==o.type.schema.linebreakReplacement){let i=n.mapping.slice(r).map(t+1+s);n.replaceWith(i,i+1,e.type.schema.text(`
4
4
  `))}})}function Nl(n,e,t){let r=n.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,t)}function Rl(n,e,t,r,o){let s=n.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let i=t.create(r,null,o||s.marks);if(s.isLeaf)return n.replaceWith(e,e+s.nodeSize,i);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new F(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new S(b.from(i),0,0),1,!0))}function Ge(n,e,t=1,r){let o=n.resolve(e),s=o.depth-t,i=r&&r[r.length-1]||o.parent;if(s<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!i.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=t-2;c>s;c--,u--){let d=o.node(c),f=o.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),p=r&&r[u+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(h))return!1}let l=o.indexAfter(s),a=r&&r[0];return o.node(s).canReplaceWith(l,l,a?a.type:o.node(s+1).type)}function Ol(n,e,t=1,r){let o=n.doc.resolve(e),s=b.empty,i=b.empty;for(let l=o.depth,a=o.depth-t,c=t-1;l>a;l--,c--){s=b.from(o.node(l).copy(s));let u=r&&r[c];i=b.from(u?u.type.create(u.attrs,i):o.node(l).copy(i))}n.step(new $(e,e,new S(s.append(i),t,t),!0))}function Re(n,e){let t=n.resolve(e),r=t.index();return vs(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function vs(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function Nn(n,e,t=-1){let r=n.resolve(e);for(let o=r.depth;;o--){let s,i,l=r.index(o);if(o==r.depth?(s=r.nodeBefore,i=r.nodeAfter):t>0?(s=r.node(o+1),l++,i=r.node(o).maybeChild(l)):(s=r.node(o).maybeChild(l-1),i=r.node(o+1)),s&&!s.isTextblock&&vs(s,i)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=t<0?r.before(o):r.after(o)}}function Il(n,e,t){let r=new $(e-t,e+t,S.empty,!0);n.step(r)}function Ll(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let s=r.index(o);if(r.node(o).canReplaceWith(s,s,t))return r.before(o+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let s=r.indexAfter(o);if(r.node(o).canReplaceWith(s,s,t))return r.after(o+1);if(s<r.node(o).childCount)return null}return null}function vl(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let o=t.content;for(let s=0;s<t.openStart;s++)o=o.firstChild.content;for(let s=1;s<=(t.openStart==0&&t.size?2:1);s++)for(let i=r.depth;i>=0;i--){let l=i==r.depth?0:r.pos<=(r.start(i+1)+r.end(i+1))/2?-1:1,a=r.index(i)+(l>0?1:0),c=r.node(i),u=!1;if(s==1)u=c.canReplace(a,a,o);else{let d=c.contentMatchAt(a).findWrapping(o.firstChild.type);u=d&&c.canReplaceWith(a,a,d[0])}if(u)return l==0?r.pos:l<0?r.before(i+1):r.after(i+1)}return null}function Rn(n,e,t=e,r=S.empty){if(e==t&&!r.size)return null;let o=n.resolve(e),s=n.resolve(t);return Ps(o,s,r)?new $(e,t,r):new Pl(o,s,r).fit()}function Ps(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class Pl{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=b.empty;for(let o=0;o<=e.depth;o++){let s=e.node(o);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=b.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let s=this.placed,i=r.depth,l=o.depth;for(;i&&l&&s.childCount==1;)s=s.firstChild.content,i--,l--;let a=new S(s,i,l);return e>-1?new F(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new $(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let s=t.firstChild;if(t.childCount>1&&(o=0),s.type.spec.isolating&&o<=r){e=r;break}t=s.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let o,s=null;r?(s=Vn(this.unplaced.content,r-1).firstChild,o=s.content):o=this.unplaced.content;let i=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],u,d=null;if(t==1&&(i?c.matchType(i.type)||(d=c.fillBefore(b.from(i),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:l,parent:s,inject:d};if(t==2&&i&&(u=c.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:l,parent:s,wrap:u};if(s&&c.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=Vn(e,t);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new S(e,t+1,Math.max(r,o.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=Vn(e,t);if(o.childCount<=1&&t>0){let s=e.size-t<=t+o.size;this.unplaced=new S(it(e,t-1,1),t-1,s?t-1:r)}else this.unplaced=new S(it(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:o,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let m=0;m<s.length;m++)this.openFrontierNode(s[m]);let i=this.unplaced,l=r?r.content:i.content,a=i.openStart-e,c=0,u=[],{match:d,type:f}=this.frontier[t];if(o){for(let m=0;m<o.childCount;m++)u.push(o.child(m));d=d.matchFragment(o)}let h=l.size+e-(i.content.size-i.openEnd);for(;c<l.childCount;){let m=l.child(c),g=d.matchType(m.type);if(!g)break;c++,(c>1||a==0||m.content.size)&&(d=g,u.push(zs(m.mark(f.allowedMarks(m.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=lt(this.placed,t,b.from(u)),this.frontier[t].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=l;m<h;m++){let y=g.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),g=y.content}this.unplaced=p?e==0?S.empty:new S(it(i.content,e-1,1),e-1,h<0?i.openEnd:e-1):new S(it(i.content,e,c),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!qn(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:o}=this.frontier[t],s=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=qn(e,t,o,r,s);if(i){for(let l=t-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],u=qn(e,l,c,a,!0);if(!u||u.childCount)continue e}return{depth:t,fit:i,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=lt(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let o=e.node(r),s=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,s)}return e}openFrontierNode(e,t=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=lt(this.placed,this.depth,b.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(b.empty,!0);t.childCount&&(this.placed=lt(this.placed,this.frontier.length,t))}}function it(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(it(n.firstChild.content,e-1,t)))}function lt(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(lt(n.lastChild.content,e-1,t)))}function Vn(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function zs(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,zs(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(b.empty,!0)))),n.copy(r)}function qn(n,e,t,r,o){let s=n.node(e),i=o?n.indexAfter(e):n.index(e);if(i==s.childCount&&!t.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,i);return l&&!zl(t,s.content,i)?l:null}function zl(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function Dl(n){return n.spec.defining||n.spec.definingForContent}function Bl(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let o=n.doc.resolve(e),s=n.doc.resolve(t);if(Ps(o,s,r))return n.step(new $(e,t,r));let i=Bs(o,n.doc.resolve(t));i[i.length-1]==0&&i.pop();let l=-(o.depth+1);i.unshift(l);for(let f=o.depth,h=o.pos-1;f>0;f--,h--){let p=o.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;i.indexOf(f)>-1?l=f:o.before(f)==h&&i.splice(1,0,-f)}let a=i.indexOf(l),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(c.push(p),h==r.openStart)break;f=p.content}for(let f=u-1;f>=0;f--){let h=c[f],p=Dl(h.type);if(p&&!h.sameMarkup(o.node(Math.abs(l)-1)))u=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+u+1)%(r.openStart+1),p=c[h];if(p)for(let m=0;m<i.length;m++){let g=i[(m+a)%i.length],y=!0;g<0&&(y=!1,g=-g);let M=o.node(g-1),A=o.index(g-1);if(M.canReplaceWith(A,A,p.type,p.marks))return n.replace(o.before(g),y?s.after(g):t,new S(Ds(r.content,0,r.openStart,h),h,r.openEnd))}}let d=n.steps.length;for(let f=i.length-1;f>=0&&(n.replace(e,t,r),!(n.steps.length>d));f--){let h=i[f];h<0||(e=o.before(h),t=s.after(h))}}function Ds(n,e,t,r,o){if(e<t){let s=n.firstChild;n=n.replaceChild(0,s.copy(Ds(s.content,e+1,t,r,s)))}if(e>r){let s=o.contentMatchAt(0),i=s.fillBefore(n).append(n);n=i.append(s.matchFragment(i).fillBefore(b.empty,!0))}return n}function Hl(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let o=Ll(n.doc,e,r.type);o!=null&&(e=t=o)}n.replaceRange(e,t,new S(b.from(r),0,0))}function $l(n,e,t){let r=n.doc.resolve(e),o=n.doc.resolve(t),s=Bs(r,o);for(let i=0;i<s.length;i++){let l=s[i],a=i==s.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return n.delete(r.start(l),o.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return n.delete(r.before(l),o.after(l))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(e-r.start(i)==r.depth-i&&t>r.end(i)&&o.end(i)-t!=o.depth-i)return n.delete(r.before(i),t);n.delete(e,t)}function Bs(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let o=r;o>=0;o--){let s=n.start(o);if(s<n.pos-(n.depth-o)||e.end(o)>e.pos+(e.depth-o)||n.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(s==e.start(o)||o==n.depth&&o==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==s-1)&&t.push(o)}return t}class Qe extends V{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return B.fail("No node at attribute step's position");let r=Object.create(null);for(let s in t.attrs)r[s]=t.attrs[s];r[this.attr]=this.value;let o=t.type.create(r,null,t.marks);return B.fromReplace(e,this.pos,this.pos+1,new S(b.from(o),0,t.isLeaf?0:1))}getMap(){return G.empty}invert(e){return new Qe(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Qe(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Qe(t.pos,t.attr,t.value)}}V.jsonID("attr",Qe);class mt extends V{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let o in e.attrs)t[o]=e.attrs[o];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return B.ok(r)}getMap(){return G.empty}invert(e){return new mt(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new mt(t.attr,t.value)}}V.jsonID("docAttr",mt);let Ze=class extends Error{};Ze=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};Ze.prototype=Object.create(Error.prototype);Ze.prototype.constructor=Ze;Ze.prototype.name="TransformError";class Hs{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new ct}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Ze(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=S.empty){let o=Rn(this.doc,e,t,r);return o&&this.step(o),this}replaceWith(e,t,r){return this.replace(e,t,new S(b.from(r),0,0))}delete(e,t){return this.replace(e,t,S.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return Bl(this,e,t,r),this}replaceRangeWith(e,t,r){return Hl(this,e,t,r),this}deleteRange(e,t){return $l(this,e,t),this}lift(e,t){return Cl(this,e,t),this}join(e,t=1){return Il(this,e,t),this}wrap(e,t){return Tl(this,e,t),this}setBlockType(e,t=e,r,o=null){return Al(this,e,t,r,o),this}setNodeMarkup(e,t,r=null,o){return Rl(this,e,t,r,o),this}setNodeAttribute(e,t,r){return this.step(new Qe(e,t,r)),this}setDocAttribute(e,t){return this.step(new mt(e,t)),this}addNodeMark(e,t){return this.step(new Ae(e,t)),this}removeNodeMark(e,t){if(!(t instanceof _)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new Ye(e,t)),this}split(e,t=1,r){return Ol(this,e,t,r),this}addMark(e,t,r){return bl(this,e,t,r),this}removeMark(e,t,r){return kl(this,e,t,r),this}clearIncompatible(e,t,r){return Ls(this,e,t,r),this}}const Jn=Object.create(null);class x{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new $s(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=S.empty){let r=t.content.lastChild,o=null;for(let l=0;l<t.openEnd;l++)o=r,r=r.lastChild;let s=e.steps.length,i=this.ranges;for(let l=0;l<i.length;l++){let{$from:a,$to:c}=i[l],u=e.mapping.slice(s);e.replaceRange(u.map(a.pos),u.map(c.pos),l?S.empty:t),l==0&&xo(e,s,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:i,$to:l}=o[s],a=e.mapping.slice(r),c=a.map(i.pos),u=a.map(l.pos);s?e.deleteRange(c,u):(e.replaceRangeWith(c,u,t),xo(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let o=e.parent.inlineContent?new w(e):Je(e.node(0),e.parent,e.pos,e.index(),t,r);if(o)return o;for(let s=e.depth-1;s>=0;s--){let i=t<0?Je(e.node(0),e.node(s),e.before(s+1),e.index(s),t,r):Je(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,r);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new oe(e.node(0))}static atStart(e){return Je(e,e,0,0,1)||new oe(e)}static atEnd(e){return Je(e,e,e.content.size,e.childCount,-1)||new oe(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Jn[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Jn)throw new RangeError("Duplicate use of selection JSON ID "+e);return Jn[e]=t,t.prototype.jsonID=e,t}getBookmark(){return w.between(this.$anchor,this.$head).getBookmark()}}x.prototype.visible=!0;class $s{constructor(e,t){this.$from=e,this.$to=t}}let Co=!1;function wo(n){!Co&&!n.parent.inlineContent&&(Co=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class w extends x{constructor(e,t=e){wo(e),wo(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return x.near(r);let o=e.resolve(t.map(this.anchor));return new w(o.parent.inlineContent?o:r,r)}replace(e,t=S.empty){if(super.replace(e,t),t==S.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof w&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new On(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new w(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let o=e.resolve(t);return new this(o,r==t?o:e.resolve(r))}static between(e,t,r){let o=e.pos-t.pos;if((!r||o)&&(r=o>=0?1:-1),!t.parent.inlineContent){let s=x.findFrom(t,r,!0)||x.findFrom(t,-r,!0);if(s)t=s.$head;else return x.near(t,r)}return e.parent.inlineContent||(o==0?e=t:(e=(x.findFrom(e,-r,!0)||x.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=o<0&&(e=t))),new w(e,t)}}x.jsonID("text",w);class On{constructor(e,t){this.anchor=e,this.head=t}map(e){return new On(e.map(this.anchor),e.map(this.head))}resolve(e){return w.between(e.resolve(this.anchor),e.resolve(this.head))}}class C extends x{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:o}=t.mapResult(this.anchor),s=e.resolve(o);return r?x.near(s):new C(s)}content(){return new S(b.from(this.node),0,0)}eq(e){return e instanceof C&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new $r(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new C(e.resolve(t.anchor))}static create(e,t){return new C(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}C.prototype.visible=!1;x.jsonID("node",C);class $r{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new On(r,r):new $r(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&C.isSelectable(r)?new C(t):x.near(t)}}class oe extends x{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=S.empty){if(t==S.empty){e.delete(0,e.doc.content.size);let r=x.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new oe(e)}map(e){return new oe(e)}eq(e){return e instanceof oe}getBookmark(){return Fl}}x.jsonID("all",oe);const Fl={map(){return this},resolve(n){return new oe(n)}};function Je(n,e,t,r,o,s=!1){if(e.inlineContent)return w.create(n,t);for(let i=r-(o>0?0:1);o>0?i<e.childCount:i>=0;i+=o){let l=e.child(i);if(l.isAtom){if(!s&&C.isSelectable(l))return C.create(n,t-(o<0?l.nodeSize:0))}else{let a=Je(n,l,t+o,o<0?l.childCount:0,o,s);if(a)return a}t+=l.nodeSize*o}return null}function xo(n,e,t){let r=n.steps.length-1;if(r<e)return;let o=n.steps[r];if(!(o instanceof $||o instanceof F))return;let s=n.mapping.maps[r],i;s.forEach((l,a,c,u)=>{i==null&&(i=u)}),n.setSelection(x.near(n.doc.resolve(i),t))}function To(n,e){return!e||!n?n:n.bind(e)}class Et{constructor(e,t,r){this.name=e,this.init=To(t.init,r),this.apply=To(t.apply,r)}}new Et("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Et("selection",{init(n,e){return n.selection||x.atStart(e.doc)},apply(n){return n.selection}}),new Et("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Et("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}});function Fs(n,e,t){for(let r in n){let o=n[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=Fs(o,e,{})),t[r]=o}return t}class ie{constructor(e){this.spec=e,this.props={},e.props&&Fs(e.props,this,this.props),this.key=e.key?e.key.key:js("plugin")}getState(e){return e[this.key]}}const Un=Object.create(null);function js(n){return n in Un?n+"$"+ ++Un[n]:(Un[n]=0,n+"$")}class te{constructor(e="key"){this.key=js(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Fe=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},Ws=function(n,e,t,r){return t&&(Ao(n,e,t,r,-1)||Ao(n,e,t,r,1))},jl=/^(img|br|input|textarea|hr)$/i;function Ao(n,e,t,r,o){for(;;){if(n==t&&e==r)return!0;if(e==(o<0?0:Vt(n))){let s=n.parentNode;if(!s||s.nodeType!=1||Fr(n)||jl.test(n.nodeName)||n.contentEditable=="false")return!1;e=Fe(n)+(o<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(o<0?-1:0)],n.contentEditable=="false")return!1;e=o<0?Vt(n):0}else return!1}}function Vt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Wl(n,e,t){for(let r=e==0,o=e==Vt(n);r||o;){if(n==t)return!0;let s=Fe(n);if(n=n.parentNode,!n)return!1;r=r&&s==0,o=o&&s==Vt(n)}}function Fr(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const Ks=function(n){return n.focusNode&&Ws(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Vs(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}const pe=typeof navigator<"u"?navigator:null,Mo=typeof document<"u"?document:null,Oe=pe&&pe.userAgent||"",mr=/Edge\/(\d+)/.exec(Oe),qs=/MSIE \d/.exec(Oe),gr=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Oe),wt=!!(qs||gr||mr),Js=qs?document.documentMode:gr?+gr[1]:mr?+mr[1]:0,In=!wt&&/gecko\/(\d+)/i.test(Oe);In&&+(/Firefox\/(\d+)/.exec(Oe)||[0,0])[1];const yr=!wt&&/Chrome\/(\d+)/.exec(Oe),je=!!yr,Kl=yr?+yr[1]:0,We=!wt&&!!pe&&/Apple Computer/.test(pe.vendor),jr=We&&(/Mobile\/\w+/.test(Oe)||!!pe&&pe.maxTouchPoints>2),Z=jr||(pe?/Mac/.test(pe.platform):!1),Vl=pe?/Win/.test(pe.platform):!1,xt=/Android \d/.test(Oe),Wr=!!Mo&&"webkitFontSmoothing"in Mo.documentElement.style,ql=Wr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Jl(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let o=n.docView.nearestDesc(t.focusNode),s=o&&o.size==0,i=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(i<0)return null;let l=r.resolve(i),a,c;if(Ks(t)){for(a=l;o&&!o.node;)o=o.parent;let u=o.node;if(o&&u.isAtom&&C.isSelectable(u)&&o.parent&&!(u.isInline&&Wl(t.focusNode,t.focusOffset,o.dom))){let d=o.posBefore;c=new C(i==d?l:r.resolve(d))}}else{let u=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(u<0)return null;a=r.resolve(u)}if(!c){let u=e=="pointer"||n.state.selection.head<l.pos&&!s?1:-1;c=_s(n,a,l,u)}return c}function Us(n){return n.editable?n.hasFocus():Ql(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function Kr(n,e=!1){let t=n.state.selection;if(Gl(n,t),!!Us(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&je){let r=n.domSelectionRange(),o=n.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&Ws(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)_l(n);else{let{anchor:r,head:o}=t,s,i;Eo&&!(t instanceof w)&&(t.$from.parent.inlineContent||(s=No(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(i=No(n,t.to))),n.docView.setSelection(r,o,n.root,e),Eo&&(s&&Ro(s),i&&Ro(i)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Ul(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const Eo=We||je&&Kl<63;function No(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),o=r<t.childNodes.length?t.childNodes[r]:null,s=r?t.childNodes[r-1]:null;if(We&&o&&o.contentEditable=="false")return _n(o);if((!o||o.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(o)return _n(o);if(s)return _n(s)}}function _n(n){return n.contentEditable="true",We&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function Ro(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function Ul(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,o=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=o)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!Us(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function _l(n){let e=n.domSelection(),t=document.createRange(),r=n.cursorWrapper.dom,o=r.nodeName=="IMG";o?t.setEnd(r.parentNode,Fe(r)+1):t.setEnd(r,0),t.collapse(!1),e.removeAllRanges(),e.addRange(t),!o&&!n.state.selection.visible&&wt&&Js<=11&&(r.disabled=!0,r.disabled=!1)}function Gl(n,e){if(e instanceof C){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(Oo(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else Oo(n)}function Oo(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function _s(n,e,t,r){return n.someProp("createSelectionBetween",o=>o(n,e,t))||w.between(e,t,r)}function Ql(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function br(n,e){let{$anchor:t,$head:r}=n.selection,o=e>0?t.max(r):t.min(r),s=o.parent.inlineContent?o.depth?n.doc.resolve(e>0?o.after():o.before()):null:o;return s&&x.findFrom(s,e)}function Se(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Io(n,e,t){let r=n.state.selection;if(r instanceof w)if(t.indexOf("s")>-1){let{$head:o}=r,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let i=n.state.doc.resolve(o.pos+s.nodeSize*(e<0?-1:1));return Se(n,new w(r.$anchor,i))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let o=br(n.state,e);return o&&o instanceof C?Se(n,o):!1}else if(!(Z&&t.indexOf("m")>-1)){let o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,i;if(!s||s.isText)return!1;let l=e<0?o.pos-s.nodeSize:o.pos;return s.isAtom||(i=n.docView.descAt(l))&&!i.contentDOM?C.isSelectable(s)?Se(n,new C(e<0?n.state.doc.resolve(o.pos-s.nodeSize):o)):Wr?Se(n,new w(n.state.doc.resolve(e<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof C&&r.node.isInline)return Se(n,new w(e>0?r.$to:r.$from));{let o=br(n.state,e);return o?Se(n,o):!1}}}function qt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function ut(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function Ve(n,e){return e<0?Xl(n):Yl(n)}function Xl(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o,s,i=!1;for(In&&t.nodeType==1&&r<qt(t)&&ut(t.childNodes[r],-1)&&(i=!0);;)if(r>0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(ut(l,-1))o=t,s=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(Gs(t))break;{let l=t.previousSibling;for(;l&&ut(l,-1);)o=t.parentNode,s=Fe(l),l=l.previousSibling;if(l)t=l,r=qt(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}i?kr(n,t,r):o&&kr(n,o,s)}function Yl(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o=qt(t),s,i;for(;;)if(r<o){if(t.nodeType!=1)break;let l=t.childNodes[r];if(ut(l,1))s=t,i=++r;else break}else{if(Gs(t))break;{let l=t.nextSibling;for(;l&&ut(l,1);)s=l.parentNode,i=Fe(l)+1,l=l.nextSibling;if(l)t=l,r=0,o=qt(t);else{if(t=t.parentNode,t==n.dom)break;r=o=0}}}s&&kr(n,s,i)}function Gs(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function Zl(n,e){for(;n&&e==n.childNodes.length&&!Fr(n);)e=Fe(n)+1,n=n.parentNode;for(;n&&e<n.childNodes.length;){let t=n.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=0}}function ea(n,e){for(;n&&!e&&!Fr(n);)e=Fe(n),n=n.parentNode;for(;n&&e;){let t=n.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=n.childNodes.length}}function kr(n,e,t){if(e.nodeType!=3){let s,i;(i=Zl(e,t))?(e=i,t=0):(s=ea(e,t))&&(e=s,t=s.nodeValue.length)}let r=n.domSelection();if(Ks(r)){let s=document.createRange();s.setEnd(e,t),s.setStart(e,t),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:o}=n;setTimeout(()=>{n.state==o&&Kr(n)},50)}function Lo(n,e){let t=n.state.doc.resolve(e);if(!(je||Vl)&&t.parent.inlineContent){let o=n.coordsAtPos(e);if(e>t.start()){let s=n.coordsAtPos(e-1),i=(s.top+s.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(s.left-o.left)>1)return s.left<o.left?"ltr":"rtl"}if(e<t.end()){let s=n.coordsAtPos(e+1),i=(s.top+s.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(s.left-o.left)>1)return s.left>o.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function vo(n,e,t){let r=n.state.selection;if(r instanceof w&&!r.empty||t.indexOf("s")>-1||Z&&t.indexOf("m")>-1)return!1;let{$from:o,$to:s}=r;if(!o.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let i=br(n.state,e);if(i&&i instanceof C)return Se(n,i)}if(!o.parent.inlineContent){let i=e<0?o:s,l=r instanceof oe?x.near(i,e):x.findFrom(i,e);return l?Se(n,l):!1}return!1}function Po(n,e){if(!(n.state.selection instanceof w))return!0;let{$head:t,$anchor:r,empty:o}=n.state.selection;if(!t.sameParent(r))return!0;if(!o)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(s&&!s.isText){let i=n.state.tr;return e<0?i.delete(t.pos-s.nodeSize,t.pos):i.delete(t.pos,t.pos+s.nodeSize),n.dispatch(i),!0}return!1}function zo(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function ta(n){if(!We||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;zo(n,r,"true"),setTimeout(()=>zo(n,r,"false"),20)}return!1}function na(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function ra(n,e){let t=e.keyCode,r=na(e);if(t==8||Z&&t==72&&r=="c")return Po(n,-1)||Ve(n,-1);if(t==46&&!e.shiftKey||Z&&t==68&&r=="c")return Po(n,1)||Ve(n,1);if(t==13||t==27)return!0;if(t==37||Z&&t==66&&r=="c"){let o=t==37?Lo(n,n.state.selection.from)=="ltr"?-1:1:-1;return Io(n,o,r)||Ve(n,o)}else if(t==39||Z&&t==70&&r=="c"){let o=t==39?Lo(n,n.state.selection.from)=="ltr"?1:-1:1;return Io(n,o,r)||Ve(n,o)}else{if(t==38||Z&&t==80&&r=="c")return vo(n,-1,r)||Ve(n,-1);if(t==40||Z&&t==78&&r=="c")return ta(n)||vo(n,1,r)||Ve(n,1);if(r==(Z?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Qs(n,e){n.someProp("transformCopied",h=>{e=h(e,n)});let t=[],{content:r,openStart:o,openEnd:s}=e;for(;o>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,s--;let h=r.firstChild;t.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let i=n.someProp("clipboardSerializer")||ve.fromSchema(n.state.schema),l=ni(),a=l.createElement("div");a.appendChild(i.serializeFragment(r,{document:l}));let c=a.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=ti[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let p=l.createElement(u[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),d++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${s}${d?` -${d}`:""} ${JSON.stringify(t)}`);let f=n.someProp("clipboardTextSerializer",h=>h(e,n))||e.content.textBetween(0,e.content.size,`
package/index.mjs CHANGED
@@ -4,9 +4,6 @@ import { isEmpty as Ji } from "radash";
4
4
  import { GraphQLClient as ms } from "graphql-request";
5
5
  import { Box as gs, WysiwygBlock as qi } from "@okam/stack-ui";
6
6
  import Ui from "react";
7
- throw new Error(
8
- "This module cannot be imported from a Client Component module. It should only be used from a Server Component."
9
- );
10
7
  function ys(n, e) {
11
8
  return e;
12
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@okam/directus-flexible-content",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {