@streamline-pulse/formkrafter-wc 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cjs/fk-brick-actions_18.cjs.entry.js +258 -22476
- package/dist/cjs/formkrafter-wc.cjs.js +2 -2
- package/dist/cjs/index-Bhy1RJMV.js +3042 -0
- package/dist/cjs/{index-D_7eGIJ0.js → index-CImTe9BG.js} +40 -4
- package/dist/cjs/index-CdaT3-qx.js +5444 -0
- package/dist/cjs/{index-By4GGW_q.js → index-CkPPRg03.js} +237 -35
- package/dist/cjs/index-DHgK3reD.js +12233 -0
- package/dist/cjs/index-Ds0sDbXV.js +4019 -0
- package/dist/cjs/index-c9BL7y3N.js +1922 -0
- package/dist/cjs/index.cjs.js +3 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/fk-brick-render/fk-brick-render.js +31 -3
- package/dist/collection/components/fk-code-editor/fk-code-editor.js +17 -8
- package/dist/collection/components/fk-file-input/fk-file-input.css +26 -5
- package/dist/collection/components/fk-file-input/fk-file-input.js +96 -14
- package/dist/collection/components/fk-form-builder/fk-form-builder.css +30 -0
- package/dist/collection/components/fk-form-render/fk-form-render.js +1 -1
- package/dist/collection/components/fk-property-panel/fk-property-panel.js +5 -1
- package/dist/collection/components/fk-select-input/fk-select-input.css +9 -0
- package/dist/collection/components/fk-select-input/fk-select-input.js +118 -20
- package/dist/collection/components/fk-stepper/fk-stepper.css +14 -0
- package/dist/collection/components/fk-stepper/fk-stepper.js +4 -1
- package/dist/collection/components/fk-tabs/fk-tabs.js +15 -2
- package/dist/collection/i18n/i18n.js +20 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/registry/default-bricks.js +174 -34
- package/dist/components/fk-brick-actions.js +1 -1
- package/dist/components/fk-brick-list.js +1 -1
- package/dist/components/fk-brick-mold-item.js +1 -1
- package/dist/components/fk-brick-not-found.js +1 -1
- package/dist/components/fk-brick-render.js +1 -1
- package/dist/components/fk-code-editor.js +1 -1
- package/dist/components/fk-data-grid.js +1 -1
- package/dist/components/fk-drop-area.js +1 -1
- package/dist/components/fk-empty-form.js +1 -1
- package/dist/components/fk-file-input.js +1 -1
- package/dist/components/fk-form-builder.js +1 -1
- package/dist/components/fk-form-render.js +1 -1
- package/dist/components/fk-property-panel.js +1 -1
- package/dist/components/fk-rules-editor.js +1 -1
- package/dist/components/fk-select-input.js +1 -1
- package/dist/components/fk-signature-input.js +1 -1
- package/dist/components/fk-stepper.js +1 -1
- package/dist/components/fk-tabs.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-B4vAN-UA.js → p--vL6GR31.js} +1 -1
- package/dist/components/p-4COASNrZ.js +1 -0
- package/dist/components/p-BB4Llg42.js +1 -0
- package/dist/components/p-BGkZP87K.js +1 -0
- package/dist/components/p-BOmBVgfJ.js +1 -0
- package/dist/components/p-BWdm2a6q.js +1 -0
- package/dist/components/{p-D318uFl-.js → p-B_-x-GlA.js} +1 -1
- package/dist/components/p-Br1s4Ujx.js +1 -0
- package/dist/components/p-C-wnqV3i.js +1 -0
- package/dist/components/{p-ZEW2q-4b.js → p-CIfjRTky.js} +1 -1
- package/dist/components/{p-dX7Lo8Fe.js → p-CKMHMpID.js} +1 -1
- package/dist/components/p-CUF31e-P.js +1 -0
- package/dist/components/p-CWQX0sXS.js +1 -0
- package/dist/components/p-D6n74M9d.js +1 -0
- package/dist/components/{p-DJDrDvoC.js → p-DFe3zZCI.js} +1 -1
- package/dist/components/p-DMCkrZqi.js +1 -0
- package/dist/components/p-DOInQkG6.js +1 -0
- package/dist/components/{p-BNREw7TY.js → p-DYchD23x.js} +1 -1
- package/dist/components/p-DtcM1yw5.js +1 -0
- package/dist/components/{p-BB3BQPr8.js → p-NDbmiiYk.js} +1 -1
- package/dist/components/p-PAr7WoWG.js +1 -0
- package/dist/components/{p-Ctt--jpe.js → p-YyGnQmX-.js} +1 -1
- package/dist/components/{p-DtzMNM4i.js → p-fDJP6whN.js} +1 -1
- package/dist/components/p-swxZqinH.js +1 -0
- package/dist/components/{p-BXFug2Ql.js → p-v7LxwCAc.js} +1 -1
- package/dist/components/p-wuC5rVU7.js +1 -0
- package/dist/esm/fk-brick-actions_18.entry.js +254 -22472
- package/dist/esm/formkrafter-wc.js +3 -3
- package/dist/esm/index-BAcz7b5u.js +5416 -0
- package/dist/esm/index-BkRMoLXK.js +3029 -0
- package/dist/esm/index-CGMDfZ5m.js +1808 -0
- package/dist/esm/{index-BTmZ8XET.js → index-D7Cta1UB.js} +236 -36
- package/dist/esm/index-DtcM1yw5.js +3991 -0
- package/dist/esm/index-DuVf3NlP.js +12222 -0
- package/dist/esm/{index-BQqrzKxo.js → index-qLZlXROB.js} +40 -4
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/formkrafter-wc/formkrafter-wc.css +1 -1
- package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
- package/dist/formkrafter-wc/index.esm.js +1 -1
- package/dist/formkrafter-wc/p-4COASNrZ.js +1 -0
- package/dist/formkrafter-wc/p-6d29555b.entry.js +1 -0
- package/dist/formkrafter-wc/p-C-wnqV3i.js +1 -0
- package/dist/formkrafter-wc/p-DMCkrZqi.js +1 -0
- package/dist/formkrafter-wc/p-DOInQkG6.js +1 -0
- package/dist/formkrafter-wc/{p-BXIsVlA6.js → p-Ddu6BquK.js} +4 -4
- package/dist/formkrafter-wc/p-DtcM1yw5.js +1 -0
- package/dist/formkrafter-wc/p-qLZlXROB.js +2 -0
- package/dist/types/components/fk-brick-render/fk-brick-render.d.ts +1 -0
- package/dist/types/components/fk-code-editor/fk-code-editor.d.ts +2 -1
- package/dist/types/components/fk-file-input/fk-file-input.d.ts +9 -2
- package/dist/types/components/fk-select-input/fk-select-input.d.ts +9 -0
- package/dist/types/components.d.ts +27 -4
- package/dist/types/home/runner/work/formkrafter/formkrafter/packages/wc/.stencil/stencil.config.d.ts +2 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/registry/default-bricks.d.ts +73 -54
- package/package.json +11 -2
- package/dist/components/p-BCQ-hj6j.js +0 -1
- package/dist/components/p-BIEpAM4V.js +0 -1
- package/dist/components/p-BLKRn62s.js +0 -1
- package/dist/components/p-BOvjVIvo.js +0 -1
- package/dist/components/p-BQP1WryV.js +0 -1
- package/dist/components/p-DKGyje7v.js +0 -1
- package/dist/components/p-DKoJovNt.js +0 -1
- package/dist/components/p-DWgjI3TW.js +0 -1
- package/dist/components/p-QC41Uj05.js +0 -1
- package/dist/components/p-TvmRksgg.js +0 -1
- package/dist/formkrafter-wc/p-BQqrzKxo.js +0 -2
- package/dist/formkrafter-wc/p-f6bc0be0.entry.js +0 -1
- package/dist/types/Users/datagnikan/Desktop/WorkSpace/streamline-pulse/formkrafter-js/formkrafter/packages/wc/.stencil/stencil.config.d.ts +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let t=[],e=[];function i(i){if(i<768)return!1;for(let s=0,r=t.length;;){let n=s+r>>1;if(i<t[n])r=n;else{if(!(i>=e[n]))return!0;s=n+1}if(s==r)return!1}}function s(t){return t>=127462&&t<=127487}function r(t,e,i=!0,s=!0){return(i?n:h)(t,e,s)}function n(t,e,r){if(e==t.length)return e;e&&o(t.charCodeAt(e))&&f(t.charCodeAt(e-1))&&e--;let n=l(t,e);for(e+=u(n);e<t.length;){let h=l(t,e);if(8205==n||8205==h||r&&i(h))e+=u(h),n=h;else{if(!s(h))break;{let i=0,r=e-2;for(;r>=0&&s(l(t,r));)i++,r-=2;if(i%2==0)break;e+=2}}}return e}function h(t,e,i){for(;e>1;){let s=n(t,e-2,i);if(s<e)return s;e--}return 0}function l(t,e){let i=t.charCodeAt(e);if(!f(i)||e+1==t.length)return i;let s=t.charCodeAt(e+1);return o(s)?s-56320+(i-55296<<10)+65536:i}function o(t){return t>=56320&&t<57344}function f(t){return t>=55296&&t<56320}function u(t){return t<65536?1:2}(()=>{let i="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let s=0,r=0;s<i.length;s++)(s%2?e:t).push(r+=i[s])})();class a{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){[t,e]=S(this,t,e);let s=[];return this.decompose(0,t,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(e,this.length,s,1),w.from(s,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=S(this,t,e);let i=[];return this.decompose(t,e,i,0),w.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),s=new p(this),r=new p(t);for(let t=e,n=e;;){if(s.next(t),r.next(t),t=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(n+=s.value.length,s.done||n>=i)return!0}}iter(t=1){return new p(this,t)}iterRange(t,e=this.length){return new m(this,t,e)}iterLines(t,e){let i;if(null==t)i=this.iter();else{null==e&&(e=this.lines+1);let s=this.line(t).from;i=this.iterRange(s,Math.max(s,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new b(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new c(t):w.from(c.split(t,[])):a.empty}}class c extends a{constructor(t,e=function(t){let e=-1;for(let i of t)e+=i.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,s){for(let r=0;;r++){let n=this.text[r],h=s+n.length;if((e?i:h)>=t)return new v(s,h,i,n);s=h+1,i++}}decompose(t,e,i,s){let r=t<=0&&e>=this.length?this:new c(d(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&s){let t=i.pop(),e=g(r.text,t.text.slice(),0,r.length);if(e.length<=32)i.push(new c(e,t.length+r.length));else{let t=e.length>>1;i.push(new c(e.slice(0,t)),new c(e.slice(t)))}}else i.push(r)}replace(t,e,i){if(!(i instanceof c))return super.replace(t,e,i);[t,e]=S(this,t,e);let s=g(this.text,g(i.text,d(this.text,0,t)),e),r=this.length+i.length-(e-t);return s.length<=32?new c(s,r):w.from(c.split(s,[]),r)}sliceString(t,e=this.length,i="\n"){[t,e]=S(this,t,e);let s="";for(let r=0,n=0;r<=e&&n<this.text.length;n++){let h=this.text[n],l=r+h.length;r>t&&n&&(s+=i),t<l&&e>r&&(s+=h.slice(Math.max(0,t-r),e-r)),r=l+1}return s}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],s=-1;for(let r of t)i.push(r),s+=r.length+1,32==i.length&&(e.push(new c(i,s)),i=[],s=-1);return s>-1&&e.push(new c(i,s)),e}}class w extends a{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,i,s){for(let r=0;;r++){let n=this.children[r],h=s+n.length,l=i+n.lines-1;if((e?l:h)>=t)return n.lineInner(t,e,i,s);s=h+1,i=l+1}}decompose(t,e,i,s){for(let r=0,n=0;n<=e&&r<this.children.length;r++){let h=this.children[r],l=n+h.length;if(t<=l&&e>=n){let r=s&((n<=t?1:0)|(l>=e?2:0));n>=t&&l<=e&&!r?i.push(h):h.decompose(t-n,e-n,i,r)}n=l+1}}replace(t,e,i){if([t,e]=S(this,t,e),i.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let n=this.children[s],h=r+n.length;if(t>=r&&e<=h){let l=n.replace(t-r,e-r,i),o=this.lines-n.lines+l.lines;if(l.lines<o>>4&&l.lines>o>>6){let r=this.children.slice();return r[s]=l,new w(r,this.length-(e-t)+i.length)}return super.replace(r,h,l)}r=h+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){[t,e]=S(this,t,e);let s="";for(let r=0,n=0;r<this.children.length&&n<=e;r++){let h=this.children[r],l=n+h.length;n>t&&r&&(s+=i),t<l&&e>n&&(s+=h.sliceString(t-n,e-n,i)),n=l+1}return s}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof w))return 0;let i=0,[s,r,n,h]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;s+=e,r+=e){if(s==n||r==h)return i;let l=this.children[s],o=t.children[r];if(l!=o)return i+l.scanIdentical(o,e);i+=l.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let i=0;for(let e of t)i+=e.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new c(i,e)}let s=Math.max(32,i>>5),r=s<<1,n=s>>1,h=[],l=0,o=-1,f=[];function u(t){let e;if(t.lines>r&&t instanceof w)for(let e of t.children)u(e);else t.lines>n&&(l>n||!l)?(a(),h.push(t)):t instanceof c&&l&&(e=f[f.length-1])instanceof c&&t.lines+e.lines<=32?(l+=t.lines,o+=t.length+1,f[f.length-1]=new c(e.text.concat(t.text),e.length+1+t.length)):(l+t.lines>s&&a(),l+=t.lines,o+=t.length+1,f.push(t))}function a(){0!=l&&(h.push(1==f.length?f[0]:w.from(f,o)),o=-1,l=f.length=0)}for(let e of t)u(e);return a(),1==h.length?h[0]:new w(h,e)}}function g(t,e,i=0,s=1e9){for(let r=0,n=0,h=!0;n<t.length&&r<=s;n++){let l=t[n],o=r+l.length;o>=i&&(o>s&&(l=l.slice(0,s-r)),r<i&&(l=l.slice(i-r)),h?(e[e.length-1]+=l,h=!1):e.push(l)),r=o+1}return e}function d(t,e,i){return g(t,[""],e,i)}a.empty=new c([""],0);class p{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof c?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],n=r>>1;if(n==(e>0?s instanceof c?s.text.length:s.children.length:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(s instanceof c){let r=s.text[n+(e<0?-1:0)];if(this.offsets[i]+=e,r.length>Math.max(0,t))return this.value=0==t?r:e>0?r.slice(t):r.slice(0,r.length-t),this;t-=r.length}else{let r=s.children[n+(e<0?-1:0)];t>r.length?(t-=r.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(r),this.offsets.push(e>0?1:(r instanceof c?r.text.length:r.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class m{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new p(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:s}=this.cursor.next(t);return this.pos+=(s.length+t)*e,this.value=s.length<=i?s:e<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class b{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:s}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(a.prototype[Symbol.iterator]=function(){return this.iter()},p.prototype[Symbol.iterator]=m.prototype[Symbol.iterator]=b.prototype[Symbol.iterator]=function(){return this});class v{constructor(t,e,i,s){this.from=t,this.to=e,this.number=i,this.text=s}get length(){return this.to-this.from}}function S(t,e,i){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,i))]}function M(t,e,i=!0,s=!0){return r(t,e,i,s)}function k(t,e){let i=t.charCodeAt(e);if(!((s=i)>=55296&&s<56320&&e+1!=t.length))return i;var s;let r=t.charCodeAt(e+1);return function(t){return t>=56320&&t<57344}(r)?r-56320+(i-55296<<10)+65536:i}function y(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function x(t){return t<65536?1:2}const E=/\r\n?|\n/;var O=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(O||(O={}));class R{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e+1];t+=i<0?this.sections[e]:i}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,i=0,s=0;e<this.sections.length;){let r=this.sections[e++],n=this.sections[e++];n<0?(t(i,s,r),s+=r):s+=n,i+=r}}iterChangedRanges(t,e=!1){j(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let i=this.sections[e++],s=this.sections[e++];s<0?t.push(i,s):t.push(s,i)}return new R(t)}composeDesc(t){return this.empty?t:t.empty?this:$(this,t)}mapDesc(t,e=!1){return t.empty?this:J(this,t,e)}mapPos(t,e=-1,i=O.Simple){let s=0,r=0;for(let n=0;n<this.sections.length;){let h=this.sections[n++],l=this.sections[n++],o=s+h;if(l<0){if(o>t)return r+(t-s);r+=h}else{if(i!=O.Simple&&o>=t&&(i==O.TrackDel&&s<t&&o>t||i==O.TrackBefore&&s<t||i==O.TrackAfter&&o>t))return null;if(o>t||o==t&&e<0&&!h)return t==s||e<0?r:r+l;r+=l}s=o}if(t>s)throw new RangeError(`Position ${t} is out of range for changeset of length ${s}`);return r}touchesRange(t,e=t){for(let i=0,s=0;i<this.sections.length&&s<=e;){let r=s+this.sections[i++];if(this.sections[i++]>=0&&s<=e&&r>=t)return!(s<t&&r>e)||"cover";s=r}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let i=this.sections[e++],s=this.sections[e++];t+=(t?" ":"")+i+(s>=0?":"+s:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new R(t)}static create(t){return new R(t)}}class I extends R{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return j(this,((e,i,s,r,n)=>t=t.replace(s,s+(i-e),n)),!1),t}mapDesc(t,e=!1){return J(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let s=0,r=0;s<e.length;s+=2){let n=e[s],h=e[s+1];if(h>=0){e[s]=h,e[s+1]=n;let l=s>>1;for(;i.length<l;)i.push(a.empty);i.push(n?t.slice(r,r+n):a.empty)}r+=n}return new I(e,i)}compose(t){return this.empty?t:t.empty?this:$(this,t,!0)}map(t,e=!1){return t.empty?this:J(this,t,e,!0)}iterChanges(t,e=!1){j(this,t,e)}get desc(){return R.create(this.sections)}filter(t){let e=[],i=[],s=[],r=new C(this);t:for(let n=0,h=0;;){let l=n==t.length?1e9:t[n++];for(;h<l||h==l&&0==r.len;){if(r.done)break t;let t=Math.min(r.len,l-h);A(s,t,-1);let n=-1==r.ins?-1:0==r.off?r.ins:0;A(e,t,n),n>0&&N(i,e,r.text),r.forward(t),h+=t}let o=t[n++];for(;h<o;){if(r.done)break t;let t=Math.min(r.len,o-h);A(e,t,-1),A(s,t,-1==r.ins?-1:0==r.off?r.ins:0),r.forward(t),h+=t}}return{changes:new I(e,i),filtered:R.create(s)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e],s=this.sections[e+1];t.push(s<0?i:0==s?[i]:[i].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,i){let s=[],r=[],n=0,h=null;function l(t=!1){if(!t&&!s.length)return;n<e&&A(s,e-n,-1);let i=new I(s,r);h=h?h.compose(i.map(h)):i,s=[],r=[],n=0}return function t(o){if(Array.isArray(o))for(let e of o)t(e);else if(o instanceof I){if(o.length!=e)throw new RangeError(`Mismatched change set length (got ${o.length}, expected ${e})`);l(),h=h?h.compose(o.map(h)):o}else{let{from:t,to:h=t,insert:f}=o;if(t>h||t<0||h>e)throw new RangeError(`Invalid change range ${t} to ${h} (in doc of length ${e})`);let u=f?"string"==typeof f?a.of(f.split(i||E)):f:a.empty,c=u.length;if(t==h&&0==c)return;t<n&&l(),t>n&&A(s,t-n,-1),A(s,h-t,c),N(r,s,u),n=h}}(t),l(!h),h}static empty(t){return new I(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let s=0;s<t.length;s++){let r=t[s];if("number"==typeof r)e.push(r,-1);else{if(!Array.isArray(r)||"number"!=typeof r[0]||r.some(((t,e)=>e&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==r.length)e.push(r[0],0);else{for(;i.length<s;)i.push(a.empty);i[s]=a.of(r.slice(1)),e.push(r[0],i[s].length)}}}return new I(e,i)}static createSet(t,e){return new I(t,e)}}function A(t,e,i,s=!1){if(0==e&&i<=0)return;let r=t.length-2;r>=0&&i<=0&&i==t[r+1]?t[r]+=e:r>=0&&0==e&&0==t[r]?t[r+1]+=i:s?(t[r]+=e,t[r+1]+=i):t.push(e,i)}function N(t,e,i){if(0==i.length)return;let s=e.length-2>>1;if(s<t.length)t[t.length-1]=t[t.length-1].append(i);else{for(;t.length<s;)t.push(a.empty);t.push(i)}}function j(t,e,i){let s=t.inserted;for(let r=0,n=0,h=0;h<t.sections.length;){let l=t.sections[h++],o=t.sections[h++];if(o<0)r+=l,n+=l;else{let f=r,u=n,c=a.empty;for(;f+=l,u+=o,o&&s&&(c=c.append(s[h-2>>1])),!(i||h==t.sections.length||t.sections[h+1]<0);)l=t.sections[h++],o=t.sections[h++];e(r,f,n,u,c),r=f,n=u}}}function J(t,e,i,s=!1){let r=[],n=s?[]:null,h=new C(t),l=new C(e);for(let t=-1;;){if(h.done&&l.len||l.done&&h.len)throw new Error("Mismatched change set lengths");if(-1==h.ins&&-1==l.ins){let t=Math.min(h.len,l.len);A(r,t,-1),h.forward(t),l.forward(t)}else if(l.ins>=0&&(h.ins<0||t==h.i||0==h.off&&(l.len<h.len||l.len==h.len&&!i))){let e=l.len;for(A(r,l.ins,-1);e;){let i=Math.min(h.len,e);h.ins>=0&&t<h.i&&h.len<=i&&(A(r,0,h.ins),n&&N(n,r,h.text),t=h.i),h.forward(i),e-=i}l.next()}else{if(!(h.ins>=0)){if(h.done&&l.done)return n?I.createSet(r,n):R.create(r);throw new Error("Mismatched change set lengths")}{let e=0,i=h.len;for(;i;)if(-1==l.ins){let t=Math.min(i,l.len);e+=t,i-=t,l.forward(t)}else{if(!(0==l.ins&&l.len<i))break;i-=l.len,l.next()}A(r,e,t<h.i?h.ins:0),n&&t<h.i&&N(n,r,h.text),t=h.i,h.forward(h.len-i)}}}}function $(t,e,i=!1){let s=[],r=i?[]:null,n=new C(t),h=new C(e);for(let t=!1;;){if(n.done&&h.done)return r?I.createSet(s,r):R.create(s);if(0==n.ins)A(s,n.len,0,t),n.next();else if(0!=h.len||h.done){if(n.done||h.done)throw new Error("Mismatched change set lengths");{let e=Math.min(n.len2,h.len),i=s.length;if(-1==n.ins){let i=-1==h.ins?-1:h.off?0:h.ins;A(s,e,i,t),r&&i&&N(r,s,h.text)}else-1==h.ins?(A(s,n.off?0:n.len,e,t),r&&N(r,s,n.textBit(e))):(A(s,n.off?0:n.len,h.off?0:h.ins,t),r&&!h.off&&N(r,s,h.text));t=(n.ins>e||h.ins>=0&&h.len>e)&&(t||s.length>i),n.forward2(e),h.forward(e)}}else A(s,0,h.ins,t),r&&N(r,s,h.text),h.next()}}class C{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?a.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?a.empty:e[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class q{constructor(t,e,i,s){this.from=t,this.to=e,this.flags=i,this.goalColumn=s}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get undirectional(){return(64&this.flags)>0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}map(t,e=-1){let i,s;return this.empty?i=s=t.mapPos(this.from,e):(i=t.mapPos(this.from,1),s=t.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new q(i,s,this.flags,this.goalColumn)}extend(t,e=t,i=0){if(t<=this.anchor&&e>=this.anchor)return D.range(t,e,void 0,void 0,i);let s=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return D.range(this.anchor,s,void 0,void 0,i)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||this.goalColumn!=t.goalColumn||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return D.range(t.anchor,t.head)}static create(t,e,i,s){return new q(t,e,i,s)}}class D{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:D.create(this.ranges.map((i=>i.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(t.ranges[i],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new D([this.main],0)}addRange(t,e=!0){return D.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let i=this.ranges.slice();return i[e]=t,D.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((t=>t.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new D(t.ranges.map((t=>q.fromJSON(t))),t.main)}static single(t,e=t){return new D([D.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;s<t.length;s++){let r=t[s];if(r.empty?r.from<=i:r.from<i)return D.normalized(t.slice(),e);i=r.to}return new D(t,e)}static cursor(t,e=0,i,s){return q.create(t,t,(0==e?0:e<0?8:16)|(null==i?7:Math.min(6,i)),s)}static range(t,e,i,s,r){let n=null==s?7:Math.min(6,s);return r||t==e||(r=e<t?1:-1),r&&(n|=r<0?8:16),e<t?q.create(e,t,32|n,i):q.create(t,e,n,i)}static undirectionalRange(t,e){return q.create(t,e,64,void 0)}static normalized(t,e=0){let i=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(i);for(let i=1;i<t.length;i++){let s=t[i],r=t[i-1];if(s.empty?s.from<=r.to:s.from<r.to){let n=r.from,h=Math.max(s.to,r.to);i<=e&&e--,t.splice(--i,2,s.anchor>s.head?D.range(h,n):D.range(n,h))}}return new D(t,e)}}function z(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let T=0;class B{constructor(t,e,i,s,r){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=s,this.id=T++,this.default=t([]),this.extensions="function"==typeof r?r(this):r}get reader(){return this}static define(t={}){return new B(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:F),!!t.static,t.enables)}of(t){return new L([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new L(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new L(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(i=>e(i.field(t))))}}function F(t,e){return t==e||t.length==e.length&&t.every(((t,i)=>t===e[i]))}class L{constructor(t,e,i,s){this.dependencies=t,this.facet=e,this.type=i,this.value=s,this.id=T++}dynamicSlot(t){var e;let i=this.value,s=this.facet.compareInput,r=this.id,n=t[r]>>1,h=2==this.type,l=!1,o=!1,f=[];for(let i of this.dependencies)"doc"==i?l=!0:"selection"==i?o=!0:1&(null!==(e=t[i.id])&&void 0!==e?e:1)||f.push(t[i.id]);return{create:t=>(t.values[n]=i(t),1),update(t,e){if(l&&e.docChanged||o&&(e.docChanged||e.selection)||U(t,f)){let e=i(t);if(h?!P(e,t.values[n],s):!s(e,t.values[n]))return t.values[n]=e,1}return 0},reconfigure:(t,e)=>{let l,o=e.config.address[r];if(null!=o){let r=tt(e,o);if(this.dependencies.every((i=>i instanceof B?e.facet(i)===t.facet(i):!(i instanceof W)||e.field(i,!1)==t.field(i,!1)))||(h?P(l=i(t),r,s):s(l=i(t),r)))return t.values[n]=r,0}else l=i(t);return t.values[n]=l,1}}}get extension(){return this}}function P(t,e,i){if(t.length!=e.length)return!1;for(let s=0;s<t.length;s++)if(!i(t[s],e[s]))return!1;return!0}function U(t,e){let i=!1;for(let s of e)1&Z(t,s)&&(i=!0);return i}function V(t,e,i){let s=i.map((e=>t[e.id])),r=i.map((t=>t.type)),n=s.filter((t=>!(1&t))),h=t[e.id]>>1;function l(t){let i=[];for(let e=0;e<s.length;e++){let n=tt(t,s[e]);if(2==r[e])for(let t of n)i.push(t);else i.push(n)}return e.combine(i)}return{create(t){for(let e of s)Z(t,e);return t.values[h]=l(t),1},update(t,i){if(!U(t,n))return 0;let s=l(t);return e.compare(s,t.values[h])?0:(t.values[h]=s,1)},reconfigure(t,r){let n=U(t,s),o=r.config.facets[e.id],f=r.facet(e);if(o&&!n&&F(i,o))return t.values[h]=f,0;let u=l(t);return e.compare(u,f)?(t.values[h]=f,0):(t.values[h]=u,1)}}}const G=B.define({static:!0});class W{constructor(t,e,i,s,r){this.id=t,this.createF=e,this.updateF=i,this.compareF=s,this.spec=r,this.provides=void 0}static define(t){let e=new W(T++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(G).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,i)=>{let s=t.values[e],r=this.updateF(s,i);return this.compareF(s,r)?0:(t.values[e]=r,1)},reconfigure:(t,i)=>{let s,r=t.facet(G),n=i.facet(G);return(s=r.find((t=>t.field==this)))&&s!=n.find((t=>t.field==this))?(t.values[e]=s.create(t),1):null!=i.config.address[this.id]?(t.values[e]=i.field(this),0):(t.values[e]=this.create(t),1)}}}init(t){return[this,G.of({field:this,create:t})]}get extension(){return this}}function _(t){return e=>new K(e,t)}const H={highest:_(0),high:_(1),default:_(2),low:_(3),lowest:_(4)};class K{constructor(t,e){this.inner=t,this.prec=e}get extension(){return this}}class Q{of(t){return new X(this,t)}reconfigure(t){return Q.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class X{constructor(t,e){this.compartment=t,this.inner=e}get extension(){return this}}class Y{constructor(t,e,i,s,r,n){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=n,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,i){let s=[],r=Object.create(null),n=new Map;for(let i of function(t,e,i){let s=[[],[],[],[],[]],r=new Map;return function t(n,h){let l=r.get(n);if(null!=l){if(l<=h)return;let t=s[l].indexOf(n);t>-1&&s[l].splice(t,1),n instanceof X&&i.delete(n.compartment)}if(r.set(n,h),Array.isArray(n))for(let e of n)t(e,h);else if(n instanceof X){if(i.has(n.compartment))throw new RangeError("Duplicate use of compartment in extensions");let s=e.get(n.compartment)||n.inner;i.set(n.compartment,s),t(s,h)}else if(n instanceof K)t(n.inner,n.prec);else if(n instanceof W)s[h].push(n),n.provides&&t(n.provides,h);else if(n instanceof L)s[h].push(n),n.facet.extensions&&t(n.facet.extensions,2);else{let e=n.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${n}).`);if(e==n)throw new Error(`Unrecognized extension value in extension set (${n}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(e,h)}}(t,2),s.reduce(((t,e)=>t.concat(e)))}(t,e,n))i instanceof W?s.push(i):(r[i.facet.id]||(r[i.facet.id]=[])).push(i);let h=Object.create(null),l=[],o=[];for(let t of s)h[t.id]=o.length<<1,o.push((e=>t.slot(e)));let f=null==i?void 0:i.config.facets;for(let t in r){let e=r[t],s=e[0].facet,n=f&&f[t]||[];if(e.every((t=>0==t.type)))if(h[s.id]=l.length<<1|1,F(n,e))l.push(i.facet(s));else{let t=s.combine(e.map((t=>t.value)));l.push(i&&s.compare(t,i.facet(s))?i.facet(s):t)}else{for(let t of e)0==t.type?(h[t.id]=l.length<<1|1,l.push(t.value)):(h[t.id]=o.length<<1,o.push((e=>t.dynamicSlot(e))));h[s.id]=o.length<<1,o.push((t=>V(t,s,e)))}}let u=o.map((t=>t(h)));return new Y(t,n,u,h,l,r)}}function Z(t,e){if(1&e)return 2;let i=e>>1,s=t.status[i];if(4==s)throw new Error("Cyclic dependency between fields and/or facets");if(2&s)return s;t.status[i]=4;let r=t.computeSlot(t,t.config.dynamicSlots[i]);return t.status[i]=2|r}function tt(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const et=B.define(),it=B.define({combine:t=>t.some((t=>t)),static:!0}),st=B.define({combine:t=>t.length?t[0]:void 0,static:!0}),rt=B.define(),nt=B.define(),ht=B.define(),lt=B.define({combine:t=>!!t.length&&t[0]});class ot{constructor(t,e){this.type=t,this.value=e}static define(){return new ft}}class ft{of(t){return new ot(this,t)}}class ut{constructor(t){this.map=t}of(t){return new at(this,t)}}class at{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new at(this.type,e)}is(t){return this.type==t}static define(t={}){return new ut(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let s of t){let t=s.map(e);t&&i.push(t)}return i}}at.reconfigure=at.define(),at.appendConfig=at.define();class ct{constructor(t,e,i,s,r,n){this.startState=t,this.changes=e,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=n,this._doc=null,this._state=null,i&&z(i,e.newLength),r.some((t=>t.type==ct.time))||(this.annotations=r.concat(ct.time.of(Date.now())))}static create(t,e,i,s,r,n){return new ct(t,e,i,s,r,n)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(ct.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function wt(t,e){let i=[];for(let s=0,r=0;;){let n,h;if(s<t.length&&(r==e.length||e[r]>=t[s]))n=t[s++],h=t[s++];else{if(!(r<e.length))return i;n=e[r++],h=e[r++]}!i.length||i[i.length-1]<n?i.push(n,h):i[i.length-1]<h&&(i[i.length-1]=h)}}function gt(t,e,i){var s;let r,n,h;return i?(r=e.changes,n=I.empty(e.changes.length),h=t.changes.compose(e.changes)):(r=e.changes.map(t.changes),n=t.changes.mapDesc(e.changes,!0),h=t.changes.compose(r)),{changes:h,selection:e.selection?e.selection.map(n):null===(s=t.selection)||void 0===s?void 0:s.map(r),effects:at.mapEffects(t.effects,r).concat(at.mapEffects(e.effects,n)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function dt(t,e,i){let s=e.selection,r=bt(e.annotations);return e.userEvent&&(r=r.concat(ct.userEvent.of(e.userEvent))),{changes:e.changes instanceof I?e.changes:I.of(e.changes||[],i,t.facet(st)),selection:s&&(s instanceof D?s:D.single(s.anchor,s.head)),effects:bt(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function pt(t,e,i){let s=dt(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(i=!1);for(let r=1;r<e.length;r++){!1===e[r].filter&&(i=!1);let n=!!e[r].sequential;s=gt(s,dt(t,e[r],n?s.changes.newLength:t.doc.length),n)}let r=ct.create(t,s.changes,s.selection,s.effects,s.annotations,s.scrollIntoView);return function(t){let e=t.startState,i=e.facet(ht),s=t;for(let r=i.length-1;r>=0;r--){let n=i[r](t);n&&Object.keys(n).length&&(s=gt(s,dt(e,n,t.changes.newLength),!0))}return s==t?t:ct.create(e,t.changes,t.selection,s.effects,s.annotations,s.scrollIntoView)}(i?function(t){let e=t.startState,i=!0;for(let s of e.facet(rt)){let e=s(t);if(!1===e){i=!1;break}Array.isArray(e)&&(i=!0===i?e:wt(i,e))}if(!0!==i){let s,r;if(!1===i)r=t.changes.invertedDesc,s=I.empty(e.doc.length);else{let e=t.changes.filter(i);s=e.changes,r=e.filtered.mapDesc(e.changes).invertedDesc}t=ct.create(e,s,t.selection&&t.selection.map(r),at.mapEffects(t.effects,r),t.annotations,t.scrollIntoView)}let s=e.facet(nt);for(let i=s.length-1;i>=0;i--){let r=s[i](t);t=r instanceof ct?r:Array.isArray(r)&&1==r.length&&r[0]instanceof ct?r[0]:pt(e,bt(r),!1)}return t}(r):r)}ct.time=ot.define(),ct.userEvent=ot.define(),ct.addToHistory=ot.define(),ct.remote=ot.define();const mt=[];function bt(t){return null==t?mt:Array.isArray(t)?t:[t]}var vt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(vt||(vt={}));const St=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Mt;try{Mt=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}class kt{constructor(t,e,i,s,r,n){this.config=t,this.doc=e,this.selection=i,this.values=s,this.status=t.statusTemplate.slice(),this.computeSlot=r,n&&(n._state=this);for(let t=0;t<this.config.dynamicSlots.length;t++)Z(this,t<<1);this.computeSlot=null}field(t,e=!0){let i=this.config.address[t.id];if(null!=i)return Z(this,i),tt(this,i);if(e)throw new RangeError("Field is not present in this state")}update(...t){return pt(this,t,!0)}applyTransaction(t){let e,i=this.config,{base:s,compartments:r}=i;for(let e of t.effects)e.is(Q.reconfigure)?(i&&(r=new Map,i.compartments.forEach(((t,e)=>r.set(e,t))),i=null),r.set(e.value.compartment,e.value.extension)):e.is(at.reconfigure)?(i=null,s=e.value):e.is(at.appendConfig)&&(i=null,s=bt(s).concat(e.value));i?e=t.startState.values.slice():(i=Y.resolve(s,r,this),e=new kt(i,this.doc,this.selection,i.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values);let n=t.startState.facet(it)?t.newSelection:t.newSelection.asSingle();new kt(i,t.newDoc,n,e,((e,i)=>i.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:D.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),s=this.changes(i.changes),r=[i.range],n=bt(i.effects);for(let i=1;i<e.ranges.length;i++){let h=t(e.ranges[i]),l=this.changes(h.changes),o=l.map(s);for(let t=0;t<i;t++)r[t]=r[t].map(o);let f=s.mapDesc(l,!0);r.push(h.range.map(f)),s=s.compose(o),n=at.mapEffects(n,o).concat(at.mapEffects(bt(h.effects),f))}return{changes:s,selection:D.create(r,e.mainIndex),effects:n}}changes(t=[]){return t instanceof I?t:I.of(t,this.doc.length,this.facet(kt.lineSeparator))}toText(t){return a.of(t.split(this.facet(kt.lineSeparator)||E))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(Z(this,e),tt(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let i in t){let s=t[i];s instanceof W&&null!=this.config.address[s.id]&&(e[i]=s.spec.toJSON(this.field(t[i]),this))}return e}static fromJSON(t,e={},i){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(i)for(let e in i)if(Object.prototype.hasOwnProperty.call(t,e)){let r=i[e],n=t[e];s.push(r.init((t=>r.spec.fromJSON(n,t))))}return kt.create({doc:t.doc,selection:D.fromJSON(t.selection),extensions:e.extensions?s.concat([e.extensions]):s})}static create(t={}){let e=Y.resolve(t.extensions||[],new Map),i=t.doc instanceof a?t.doc:a.of((t.doc||"").split(e.staticFacet(kt.lineSeparator)||E)),s=t.selection?t.selection instanceof D?t.selection:D.single(t.selection.anchor,t.selection.head):D.single(0);return z(s,i.length),e.staticFacet(it)||(s=s.asSingle()),new kt(e,i,s,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(kt.tabSize)}get lineBreak(){return this.facet(kt.lineSeparator)||"\n"}get readOnly(){return this.facet(lt)}phrase(t,...e){for(let e of this.facet(kt.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,i)=>{if("$"==i)return"$";let s=+(i||1);return!s||s>e.length?t:e[s-1]}))),t}languageDataAt(t,e,i=-1){let s=[];for(let r of this.facet(et))for(let n of r(this,e,i))Object.prototype.hasOwnProperty.call(n,t)&&s.push(n[t]);return s}charCategorizer(t){let e=this.languageDataAt("wordChars",t);return i=e.length?e[0]:"",t=>{if(!/\S/.test(t))return vt.Space;if(function(t){if(Mt)return Mt.test(t);for(let e=0;e<t.length;e++){let i=t[e];if(/\w/.test(i)||i>""&&(i.toUpperCase()!=i.toLowerCase()||St.test(i)))return!0}return!1}(t))return vt.Word;for(let e=0;e<i.length;e++)if(t.indexOf(i[e])>-1)return vt.Word;return vt.Other};var i}wordAt(t){let{text:e,from:i,length:s}=this.doc.lineAt(t),r=this.charCategorizer(t),n=t-i,h=t-i;for(;n>0;){let t=M(e,n,!1);if(r(e.slice(t,n))!=vt.Word)break;n=t}for(;h<s;){let t=M(e,h);if(r(e.slice(h,t))!=vt.Word)break;h=t}return n==h?null:D.range(n+i,h+i)}}function yt(t,e,i={}){let s={};for(let e of t)for(let t of Object.keys(e)){let r=e[t],n=s[t];if(void 0===n)s[t]=r;else if(n===r||void 0===r);else{if(!Object.hasOwnProperty.call(i,t))throw new Error("Config merge conflict for field "+t);s[t]=i[t](n,r)}}for(let t in e)void 0===s[t]&&(s[t]=e[t]);return s}kt.allowMultipleSelections=it,kt.tabSize=B.define({combine:t=>t.length?t[0]:4}),kt.lineSeparator=st,kt.readOnly=lt,kt.phrases=B.define({compare(t,e){let i=Object.keys(t),s=Object.keys(e);return i.length==s.length&&i.every((i=>t[i]==e[i]))}}),kt.languageData=et,kt.changeFilter=rt,kt.transactionFilter=nt,kt.transactionExtender=ht,Q.reconfigure=at.define();class xt{eq(t){return this==t}range(t,e=t){return Ot.create(t,e,this)}}function Et(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}xt.prototype.startSide=xt.prototype.endSide=0,xt.prototype.point=!1,xt.prototype.mapMode=O.TrackDel;class Ot{constructor(t,e,i){this.from=t,this.to=e,this.value=i}static create(t,e,i){return new Ot(t,e,i)}}function Rt(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class It{constructor(t,e,i,s){this.from=t,this.to=e,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(t,e,i,s=0){let r=i?this.to:this.from;for(let n=s,h=r.length;;){if(n==h)return n;let s=n+h>>1,l=r[s]-t||(i?this.value[s].endSide:this.value[s].startSide)-e;if(s==n)return l>=0?n:h;l>=0?h=s:n=s+1}}between(t,e,i,s){for(let r=this.findIndex(e,-1e9,!0),n=this.findIndex(i,1e9,!1,r);r<n;r++)if(!1===s(this.from[r]+t,this.to[r]+t,this.value[r]))return!1}map(t,e){let i=[],s=[],r=[],n=-1,h=-1;for(let l=0;l<this.value.length;l++){let o,f,u=this.value[l],a=this.from[l]+t,c=this.to[l]+t;if(a==c){let t=e.mapPos(a,u.startSide,u.mapMode);if(null==t)continue;if(o=f=t,u.startSide!=u.endSide&&(f=e.mapPos(a,u.endSide),f<o))continue}else if(o=e.mapPos(a,u.startSide),f=e.mapPos(c,u.endSide),o>f||o==f&&u.startSide>0&&u.endSide<=0)continue;(f-o||u.endSide-u.startSide)<0||(n<0&&(n=o),u.point&&(h=Math.max(h,f-o)),i.push(u),s.push(o-n),r.push(f-n))}return{mapped:i.length?new It(s,r,i,h):null,pos:n}}}class At{constructor(t,e,i,s){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=s}static create(t,e,i,s){return new At(t,e,i,s)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=t,n=t.filter;if(0==e.length&&!n)return this;if(i&&(e=e.slice().sort(Rt)),this.isEmpty)return e.length?At.of(e):this;let h=new Jt(this,null,-1).goto(0),l=0,o=[],f=new Nt;for(;h.value||l<e.length;)if(l<e.length&&(h.from-e[l].from||h.startSide-e[l].value.startSide)>=0){let t=e[l++];f.addInner(t.from,t.to,t.value)||o.push(t)}else 1==h.rangeIndex&&h.chunkIndex<this.chunk.length&&(l==e.length||this.chunkEnd(h.chunkIndex)<e[l].from)&&(!n||s>this.chunkEnd(h.chunkIndex)||r<this.chunkPos[h.chunkIndex])&&f.addChunk(this.chunkPos[h.chunkIndex],this.chunk[h.chunkIndex])?h.nextChunk():((!n||s>h.to||r<h.from||n(h.from,h.to,h.value))&&(f.addInner(h.from,h.to,h.value)||o.push(Ot.create(h.from,h.to,h.value))),h.next());return f.finishInner(this.nextLayer.isEmpty&&!o.length?At.empty:this.nextLayer.update({add:o,filter:n,filterFrom:s,filterTo:r}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],i=[],s=-1;for(let r=0;r<this.chunk.length;r++){let n=this.chunkPos[r],h=this.chunk[r],l=t.touchesRange(n,n+h.length);if(!1===l)s=Math.max(s,h.maxPoint),e.push(h),i.push(t.mapPos(n));else if(!0===l){let{mapped:r,pos:l}=h.map(n,t);r&&(s=Math.max(s,r.maxPoint),e.push(r),i.push(l))}}let r=this.nextLayer.map(t);return 0==e.length?r:new At(i,e,r||At.empty,s)}between(t,e,i){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],n=this.chunk[s];if(e>=r&&t<=r+n.length&&!1===n.between(r,t-r,e-r,i))return}this.nextLayer.between(t,e,i)}}iter(t=0){return $t.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return $t.from(t).goto(e)}static compare(t,e,i,s,r=-1){let n=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=r)),h=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=r)),l=jt(n,h,i),o=new qt(n,l,r),f=new qt(h,l,r);i.iterGaps(((t,e,i)=>Dt(o,t,f,e,i,s))),i.empty&&0==i.length&&Dt(o,0,f,0,0,s)}static eq(t,e,i=0,s){null==s&&(s=999999999);let r=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),n=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(r.length!=n.length)return!1;if(!r.length)return!0;let h=jt(r,n),l=new qt(r,h,0).goto(i),o=new qt(n,h,0).goto(i);for(;;){if(l.to!=o.to||!zt(l.active,o.active)||l.point&&(!o.point||!Et(l.point,o.point)))return!1;if(l.to>s)return!0;l.next(),o.next()}}static spans(t,e,i,s,r=-1){let n=new qt(t,null,r).goto(e),h=e,l=n.openStart;for(;;){let t=Math.min(n.to,i);if(n.point){let i=n.activeForPoint(n.to),r=n.pointFrom<e?i.length+1:n.point.startSide<0?i.length:Math.min(i.length,l);s.point(h,t,n.point,i,r,n.pointRank),l=Math.min(n.openEnd(t),i.length)}else t>h&&(s.span(h,t,n.active,l),l=n.openEnd(t));if(n.to>i)return l+(n.point&&n.to>i?1:0);h=n.to,n.next()}}static of(t,e=!1){let i=new Nt;for(let s of t instanceof Ot?[t]:e?function(t){if(t.length>1)for(let e=t[0],i=1;i<t.length;i++){let s=t[i];if(Rt(e,s)>0)return t.slice().sort(Rt);e=s}return t}(t):t)i.add(s.from,s.to,s.value);return i.finish()}static join(t){if(!t.length)return At.empty;let e=t[t.length-1];for(let i=t.length-2;i>=0;i--)for(let s=t[i];s!=At.empty;s=s.nextLayer)e=new At(s.chunkPos,s.chunk,e,Math.max(s.maxPoint,e.maxPoint));return e}}At.empty=new At([],[],null,-1),At.empty.nextLayer=At.empty;class Nt{finishChunk(t){this.chunks.push(new It(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,i){this.addInner(t,e,i)||(this.nextLayer||(this.nextLayer=new Nt)).add(t,e,i)}addInner(t,e,i){let s=t-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(s<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),0))}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+t,this.lastTo=e.to[i]+t,!0}finish(){return this.finishInner(At.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=At.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function jt(t,e,i){let s=new Map;for(let e of t)for(let t=0;t<e.chunk.length;t++)e.chunk[t].maxPoint<=0&&s.set(e.chunk[t],e.chunkPos[t]);let r=new Set;for(let t of e)for(let e=0;e<t.chunk.length;e++){let n=s.get(t.chunk[e]);null==n||(i?i.mapPos(n):n)!=t.chunkPos[e]||(null==i?void 0:i.touchesRange(n,n+t.chunk[e].length))||r.add(t.chunk[e])}return r}class Jt{constructor(t,e,i,s=0){this.layer=t,this.skip=e,this.minPoint=i,this.rank=s}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,i){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!i||this.rangeIndex<s)&&this.setRangeIndex(s)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex];if(this.from=t+e.from[this.rangeIndex],this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class $t{constructor(t){this.heap=t}static from(t,e=null,i=-1){let s=[];for(let r=0;r<t.length;r++)for(let n=t[r];!n.isEmpty;n=n.nextLayer)n.maxPoint>=i&&s.push(new Jt(n,e,i,r));return 1==s.length?s[0]:new $t(s)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)Ct(this.heap,t);return this.next(),this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)Ct(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Ct(this.heap,0)}}}function Ct(t,e){for(let i=t[e];;){let s=1+(e<<1);if(s>=t.length)break;let r=t[s];if(s+1<t.length&&r.compare(t[s+1])>=0&&(r=t[s+1],s++),i.compare(r)<0)break;t[s]=i,t[e]=r,e=s}}class qt{constructor(t,e,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=$t.from(t,e,i)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){Tt(this.active,t),Tt(this.activeTo,t),Tt(this.activeRank,t),this.minActive=Ft(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:s,rank:r}=this.cursor;for(;e<this.activeRank.length&&(r-this.activeRank[e]||s-this.activeTo[e])>0;)e++;Bt(this.active,e,i),Bt(this.activeTo,e,s),Bt(this.activeRank,e,r),t&&Bt(t,e,this.cursor.from),this.minActive=Ft(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>t){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&Tt(i,s)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(i),this.cursor.next()}}}if(i){this.openStart=0;for(let e=i.length-1;e>=0&&i[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function Dt(t,e,i,s,r,n){t.goto(e),i.goto(s);let h=s+r,l=s,o=s-e,f=!!n.boundChange;for(let e=!1;;){let s=t.to+o-i.to,r=s||t.endSide-i.endSide,u=r<0?t.to+o:i.to,a=Math.min(u,h);if(t.point||i.point?(t.point&&i.point&&Et(t.point,i.point)&&zt(t.activeForPoint(t.to),i.activeForPoint(i.to))||n.comparePoint(l,a,t.point,i.point),e=!1):(e&&n.boundChange(l),a>l&&!zt(t.active,i.active)&&n.compareRange(l,a,t.active,i.active),f&&a<h&&(s||t.openEnd(u)!=i.openEnd(u))&&(e=!0)),u>h)break;l=u,r<=0&&t.next(),r>=0&&i.next()}}function zt(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(t[i]!=e[i]&&!Et(t[i],e[i]))return!1;return!0}function Tt(t,e){for(let i=e,s=t.length-1;i<s;i++)t[i]=t[i+1];t.pop()}function Bt(t,e,i){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=i}function Ft(t,e){let i=-1,s=1e9;for(let r=0;r<e.length;r++)(e[r]-s||t[r].endSide-t[i].endSide)<0&&(i=r,s=e[r]);return i}function Lt(t,e,i=t.length){let s=0;for(let r=0;r<i&&r<t.length;)9==t.charCodeAt(r)?(s+=e-s%e,r++):(s++,r=M(t,r));return s}function Pt(t,e,i,s){for(let s=0,r=0;;){if(r>=e)return s;if(s==t.length)break;r+=9==t.charCodeAt(s)?i-r%i:1,s=M(t,s)}return!0===s?-1:t.length}export{ot as Annotation,ft as AnnotationType,R as ChangeDesc,I as ChangeSet,vt as CharCategory,Q as Compartment,D as EditorSelection,kt as EditorState,B as Facet,v as Line,O as MapMode,H as Prec,Ot as Range,At as RangeSet,Nt as RangeSetBuilder,xt as RangeValue,q as SelectionRange,at as StateEffect,ut as StateEffectType,W as StateField,a as Text,ct as Transaction,k as codePointAt,x as codePointSize,yt as combineConfig,Lt as countColumn,M as findClusterBreak,Pt as findColumn,y as fromCodePoint}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function t(t,n,e){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,n);if(o&&(!e||o.get))return o;t=Object.getPrototypeOf(t)}}var n=(n,e)=>{var o;Object.entries(null!=(o=e.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=n[o],s=t(Object.getPrototypeOf(n),o,!0)||Object.getOwnPropertyDescriptor(n,o);s&&Object.defineProperty(n,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),e.l.has(o)?n[o]=e.l.get(o):void 0!==l&&(n[o]=l)}}))},e=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},l=(t,n)=>n in t,s=(t,n)=>(0,console.error)(t,n),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="http://www.w3.org/1999/xlink",f="undefined"!=typeof window?window:{},a={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},d=t=>Promise.resolve(t),p=(()=>{try{return!!f.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),v=!!p&&(()=>!!f.document&&Object.getOwnPropertyDescriptor(f.document.adoptedStyleSheets,"length").writable)(),h=!1,m=[],y=[],b=(t,n)=>e=>{t.push(e),h||(h=!0,n&&4&a.u?g(w):a.raf(w))},$=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){s(t)}t.length=0},w=()=>{$(m),$(y),(h=m.length>0)&&a.raf(w)},g=t=>d().then(t),j=b(y,!0),O=t=>{const n=E(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&S(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!k(t,C(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&E(t,"childNodes").length&&O(t)}};function S(t,n,e){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!n||o["s-hn"]===n)&&(void 0===e||C(o)===e)&&(s.push(o),void 0!==e))return s;s=[...s,...S(o.childNodes,n,e)]}return s}var k=(t,n,e=!0)=>{const o=[];(e&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)C(l)!==n||!e&&l["s-sr"]||o.push(l);return o},N=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,C=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function E(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}function M(t){var n,e,o;return null!=(o=null==(e=null==(n=t.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?o:void 0}var T,L,R,x=new WeakMap,A=t=>"sc-"+t.v,P=t=>"object"==(t=typeof t)||"function"===t,D=(t,n,...e)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],u=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?u(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!P(o))&&(o+=""),i&&r?c[c.length-1].h+=o:c.push(i?F(null,o):o),r=i)};if(u(e),n){n.key&&(l=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}const f=F(t,null);return f.m=n,c.length>0&&(f.$=c),f.j=l,f.O=s,f},F=(t,n)=>({u:0,S:t,h:null!=n?n:null,k:null,$:null,m:null,j:null,O:null}),H={},_=t=>{if(!t)return;const n=Object.keys(t);if(0===n.length)return;let e=!1;for(const o of n){if(e)break;for(const n of t[o])if("string"==typeof n){e=!0;break}}if(!e)return t;const o={};for(const e of n)o[e]=t[e].map((t=>"string"==typeof t?{[t]:0}:t));return o},U=(t,n)=>null==t||P(t)?t:4&n?"false"!==t&&(""===t||!!t):1&n?t+"":t,W=t=>{var n;return null==(n=e(t))?void 0:n.$hostElement$},z=(t,n)=>{const e=W(t);return{emit:t=>B(e,n,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},B=(t,n,e)=>{const o=a.ce(n,e);return t.dispatchEvent(o),o},V=(t,n,o,s,i,r)=>{if(o===s)return;let c=l(t,n),d=n.toLowerCase();if("class"===n){const n=t.classList,e=Y(o);let l=Y(s);n.remove(...e.filter((t=>t&&!l.includes(t)))),n.add(...l.filter((t=>t&&!e.includes(t))))}else if("style"===n){for(const n in o)s&&null!=s[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in s)o&&s[n]===o[n]||(n.includes("-")?t.style.setProperty(n,s[n]):t.style[n]=s[n])}else if("key"===n);else if("ref"===n)s&&vt(s,t);else if(c||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const o=n.slice(5);let l;{const n=e(t);if(n&&n.o&&n.o.t){const t=n.o.t[o];t&&t[1]&&(l=t[1])}}return l||(l=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===s?"":s))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=s}catch(t){}return}{const e=P(s);if((c||e&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[n]!==s&&(t[n]=s);else{const e=null==s?"":s;"list"===n?c=!1:null!=o&&t[n]===e||("function"==typeof t.__lookupSetter__(n)?t[n]=e:t.setAttribute(n,e))}}catch(t){}let l=!1;d!==(d=d.replace(/^xlink\:?/,""))&&(n=d,l=!0),null==s||!1===s?!1===s&&""!==t.getAttribute(n)||(l?t.removeAttributeNS(u,n):t.removeAttribute(n)):(!c||4&r||i)&&!e&&1===t.nodeType&&(s=!0===s?"":s,l?t.setAttributeNS(u,n,s):t.setAttribute(n,s))}}else if(n="-"===n[2]?n.slice(3):l(f,d)?d.slice(2):d[2]+n.slice(3),o||s){const e=n.endsWith(G);n=n.replace(I,""),o&&a.rel(t,n,o,e),s&&a.ael(t,n,s,e)}},q=/\s/,Y=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(q):[]),G="Capture",I=RegExp(G+"$"),Z=(t,n,e)=>{const o=11===n.k.nodeType&&n.k.host?n.k.host:n.k,l=t&&t.m||{},s=n.m||{};for(const t of J(Object.keys(l)))t in s||V(o,t,l[t],void 0,e,n.u);for(const t of J(Object.keys(s)))V(o,t,l[t],s[t],e,n.u)};function J(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var K=!1,Q=!1,X=!1,tt=!1,nt=[],et=[],ot=(t,n,e)=>{var o;const l=n.$[e];let s,i,r,c=0;if(K||(X=!0,"slot"===l.S&&(l.u|=l.$?2:1)),null!=l.h)s=l.k=f.document.createTextNode(l.h);else if(1&l.u)s=l.k=f.document.createTextNode(""),Z(null,l,tt);else{if(tt||(tt="svg"===l.S),!f.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.k=f.document.createElementNS(tt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!K&&2&l.u?"slot-fb":l.S),tt&&"foreignObject"===l.S&&(tt=!1),Z(null,l,tt),null!=T&&void 0!==T&&s["s-si"]!==T&&s.classList.add(s["s-si"]=T),l.$){const n="template"===l.S?s.content:s;for(c=0;c<l.$.length;++c)i=ot(t,l,c),i&&n.appendChild(i)}"svg"===l.S?tt=!1:"foreignObject"===s.tagName&&(tt=!0)}return s["s-hn"]=R,3&l.u&&(s["s-sr"]=!0,s["s-cr"]=L,s["s-sn"]=l.O||"",s["s-rf"]=null==(o=l.m)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===C(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(s),r=t&&t.$&&t.$[e],r&&r.S===l.S&&t.k&<(t.k),mt(L,s,n.k,null==t?void 0:t.k)),s},lt=t=>{a.u|=1;const n=t.closest(R.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of e?o.reverse():o)null!=t["s-sh"]&&(ht(n,t,null!=e?e:null),t["s-sh"]=void 0,X=!0)}a.u&=-2},st=(t,n)=>{a.u|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===R&&e.push(n)}for(let t=e.length-1;t>=0;t--){const o=e[t];o["s-hn"]!==R&&o["s-ol"]&&(ht(ut(o).parentNode,o,ut(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,X=!0),n&&st(o,n)}a.u&=-2},it=(t,n,e,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for("template"===e.S&&(r=r.content);l<=s;++l)o[l]&&(i=ot(null,e,l),i&&(o[l].k=i,ht(r,i,ut(n))))},rt=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.k;pt(n),t&&(Q=!0,t["s-ol"]?t["s-ol"].remove():st(t,!0),t.remove())}}},ct=(t,n,e=!1)=>t.S===n.S&&("slot"===t.S?t.O===n.O:e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),ut=t=>t&&t["s-ol"]||t,ft=(t,n,e=!1)=>{const o=n.k=t.k,l=t.$,s=n.$,i=n.S,r=n.h;let c;null==r?(tt="svg"===i||"foreignObject"!==i&&tt,"slot"!==i||K||t.O!==n.O&&(n.k["s-sn"]=n.O||"",lt(n.k.parentElement)),Z(t,n,tt),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=n.length-1,d=n[0],p=n[a],v=o.length-1,h=o[0],m=o[v];const y="template"===e.S?t.content:t;for(;r<=a&&c<=v;)if(null==d)d=n[++r];else if(null==p)p=n[--a];else if(null==h)h=o[++c];else if(null==m)m=o[--v];else if(ct(d,h,l))ft(d,h,l),d=n[++r],h=o[++c];else if(ct(p,m,l))ft(p,m,l),p=n[--a],m=o[--v];else if(ct(d,m,l))"slot"!==d.S&&"slot"!==m.S||st(d.k.parentNode,!1),ft(d,m,l),ht(y,d.k,p.k.nextSibling),d=n[++r],m=o[--v];else if(ct(p,h,l))"slot"!==d.S&&"slot"!==m.S||st(p.k.parentNode,!1),ft(p,h,l),ht(y,p.k,d.k),p=n[--a],h=o[++c];else{for(u=-1,f=r;f<=a;++f)if(n[f]&&null!==n[f].j&&n[f].j===h.j){u=f;break}u>=0?(i=n[u],i.S!==h.S?s=ot(n&&n[c],e,u):(ft(i,h,l),n[u]=void 0,s=i.k),h=o[++c]):(s=ot(n&&n[c],e,c),h=o[++c]),s&&ht(ut(d.k).parentNode,s,ut(d.k))}r>a?it(t,null==o[v+1]?null:o[v+1].k,e,o,c,v):c>v&&rt(n,r,a)})(o,l,n,s,e):null!==s?(null!==t.h&&(o.textContent=""),it(o,null,n,s,0,s.length-1)):!e&&null!==l&&rt(l,0,l.length-1),tt&&"svg"===i&&(tt=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:t.h!==r&&(o.data=r)},at=[],dt=t=>{let n,e,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const l=t["s-sn"];for(o=e.length-1;o>=0;o--)if(n=e[o],!(n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||n["s-sh"]&&n["s-sh"]===t["s-hn"]))if(N(n,l)){let e=at.find((t=>t.N===n));Q=!0,n["s-sn"]=n["s-sn"]||l,e?(e.N["s-sh"]=t["s-hn"],e.C=t):(n["s-sh"]=t["s-hn"],at.push({C:t,N:n})),n["s-sr"]&&at.map((t=>{N(t.N,n["s-sn"])&&(e=at.find((t=>t.N===n)),e&&!t.C&&(t.C=e.C))}))}else at.some((t=>t.N===n))||at.push({N:n})}1===t.nodeType&&dt(t)}},pt=t=>{t.m&&t.m.ref&&nt.push((()=>t.m.ref(null))),t.$&&t.$.map(pt)},vt=(t,n)=>{et.push((()=>t(n)))},ht=(t,n,e,o)=>{if("string"==typeof n["s-sn"]&&n["s-sr"]&&n["s-cr"])mt(n["s-cr"],n,t,n.parentElement);else if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:l}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=C(t)||"";return{slotNode:S(E(n,"childNodes"),n.tagName,o)[0],slotName:o}}(n);return l&&!o&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(l),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)};function mt(t,n,e,o){var l,s;let i;if(t&&"string"==typeof n["s-sn"]&&n["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(i=n["s-si"]||t.parentNode["s-sc"])){const t=n["s-sn"],r=n["s-hn"];if(null==(l=e.classList)||l.add(i+"-s"),o&&(null==(s=o.classList)?void 0:s.contains(i+"-s"))){let n=(o.__childNodes||o.childNodes)[0],e=!1;for(;n;){if(n["s-sn"]!==t&&n["s-hn"]===r&&n["s-sr"]){e=!0;break}n=n.nextSibling}e||o.classList.remove(i+"-s")}}}var yt=(t,n)=>{if(n&&!t.M&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.M=()=>{n["s-p"].splice(e-1,1),o()})))}},bt=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);yt(t,t.T);const e=()=>$t(t,n);if(!n)return j(e);queueMicrotask((()=>{e()}))},$t=(t,n)=>{const e=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return n?(t.L&&(t.L=!1,Nt(o,"connectedCallback",void 0,e)),t.u|=256,t.R&&(t.R.map((([t,n])=>Nt(o,t,n,e))),t.R=void 0),t.A.length&&t.A.forEach((t=>t(e))),l=Nt(o,"componentWillLoad",void 0,e)):l=Nt(o,"componentWillUpdate",void 0,e),l=wt(l,(()=>Nt(o,"componentWillRender",void 0,e))),wt(l,(()=>jt(t,o,n)))},wt=(t,n)=>gt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),gt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,jt=async(t,n,e)=>{var o;const l=t.$hostElement$,s=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.u,l=((t,n)=>{var e,o,l;const s=A(n),i=r.get(s);if(!f.document)return s;if(t=11===t.nodeType?t:f.document,i)if("string"==typeof i){let l,r=x.get(t=t.head||t);if(r||x.set(t,r=new Set),!r.has(s)){l=f.document.createElement("style"),l.textContent=i;const u=null!=(e=a.P)?e:M(f.document);if(null!=u&&l.setAttribute("nonce",u),!(1&n.u))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(p){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),v?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(l)}else t.append(l);1&n.u&&t.insertBefore(l,null),4&n.u&&(l.textContent+=c),r&&r.add(s)}}else{let n=x.get(t);if(n||x.set(t,n=new Set),!n.has(s)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===e.CSSStyleSheet)o=i;else{o=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}v?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(s)}}return s})(e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);Ot(t,n,l,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>St(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.u|=4,n.length=0)}},Ot=(t,n,e,o)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{var o,l,s,i,r;const c=t.$hostElement$,u=t.o,d=t.D||F(null,null),p=(t=>t&&t.S===H)(n)?n:D(null,null,n);if(R=c.tagName,e&&p.m)for(const t of Object.keys(p.m))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(p.m[t]=c[t]);if(p.S=null,p.u|=4,t.D=p,p.k=d.k=c,T=c["s-sc"],K=!1,L=c["s-cr"],Q=!1,ft(d,p,e),a.u|=1,X){dt(p.k);for(const t of at){const n=t.N;if(!n["s-ol"]&&f.document){const t=f.document.createTextNode("");t["s-nr"]=n,ht(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of at){const n=t.N,r=t.C;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(o=n.hidden)&&o),r){const t=r.parentNode;let o=r.nextSibling;if(o&&1===o.nodeType){let e=null==(l=n["s-ol"])?void 0:l.previousSibling;for(;e;){let l=null!=(s=e["s-nr"])?s:null;if(l&&l["s-sn"]===n["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===n||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}e=e.previousSibling}}if((!o&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==o)&&n!==o){if(ht(t,n,o,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=f.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,ht(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(i=n["s-ih"])&&i)}n&&"function"==typeof r["s-rf"]&&r["s-rf"](r)}else 1===n.nodeType&&(n.hidden=!0)}}if(Q&&O(p.k),a.u&=-2,at.length=0,!K&&!(1&u.u)&&c["s-cr"]){const t=p.k.__childNodes||p.k.childNodes;for(const n of t)if(n["s-hn"]!==R&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(r=n.hidden)&&r),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=f.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],ht(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}L=void 0,nt.forEach((t=>t())),nt.length=0,et.forEach((t=>t())),et.length=0})(t,n,o)}catch(n){s(n,t.$hostElement$)}return null},St=t=>{const n=t.$hostElement$,e=t.i,o=t.T;Nt(e,"componentDidRender",void 0,n),64&t.u?Nt(e,"componentDidUpdate",void 0,n):(t.u|=64,Ct(n),Nt(e,"componentDidLoad",void 0,n),t.F(n),o||kt()),t.H(n),t.M&&(t.M(),t.M=void 0),512&t.u&&g((()=>bt(t,!1))),t.u&=-517},kt=()=>{g((()=>B(f,"appload",{detail:{namespace:"formkrafter-wc"}})))},Nt=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){s(t,o)}},Ct=t=>t.classList.add("hydrated"),Et=(t,n,o,l)=>{const i=e(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,c=i.l.get(n),u=i.u,f=i.i;if(o=U(o,l.t[n][0]),!(8&u&&void 0!==c||o===c||Number.isNaN(c)&&Number.isNaN(o))){if(i.l.set(n,o),l._){const t=l._[n];t&&t.map((t=>{try{const[[e,l]]=Object.entries(t);(128&u||1&l)&&(f?f[e](o,c,n):i.A.push((()=>{i.i[e](o,c,n)})))}catch(t){s(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(o,c,n)&&!(16&u))return;16&u||bt(i,!1)}}},Mt=(n,o,l)=>{var s,i;const r=n.prototype;{n.watchers&&!o._&&(o._=_(n.watchers)),n.deserializers&&!o.U&&(o.U=n.deserializers),n.serializers&&!o.W&&(o.W=n.serializers);const c=Object.entries(null!=(s=o.t)?s:{});if(c.map((([n,[s]])=>{if(31&s||2&l&&32&s){const{get:i,set:c}=t(r,n)||{};i&&(o.t[n][0]|=2048),c&&(o.t[n][0]|=4096),(1&l||!i)&&Object.defineProperty(r,n,{get(){{if(!(2048&o.t[n][0]))return((t,n)=>e(this).l.get(n))(0,n);const t=e(this),l=t?t.i:r;if(!l)return;return l[n]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,n,{set(t){const i=e(this);if(i){if(c)return void 0===(32&s?this[n]:i.$hostElement$[n])&&i.l.get(n)&&(t=i.l.get(n)),c.call(this,U(t,s)),void Et(this,n,t=32&s?this[n]:i.$hostElement$[n],o);{if(!(1&l&&4096&o.t[n][0]))return Et(this,n,t,o),void(1&l&&!i.i&&i.A.push((()=>{4096&o.t[n][0]&&i.i[n]!==i.l.get(n)&&(i.i[n]=t)})));const e=()=>{const e=i.i[n];!i.l.get(n)&&e&&i.l.set(n,e),i.i[n]=U(t,s),Et(this,n,i.i[n],o)};i.i?e():i.A.push((()=>{e()}))}}}})}else 1&l&&64&s&&Object.defineProperty(r,n,{value(...t){var o;const l=e(this);return null==(o=null==l?void 0:l.B)?void 0:o.then((()=>{var e;return null==(e=l.i)?void 0:e[n](...t)}))}})})),1&l){const t=new Map;r.attributeChangedCallback=function(n,l,s){a.jmp((()=>{var i;const u=t.get(n),f=e(this);if(this.hasOwnProperty(u)&&(s=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==f?void 0:f.u;if(f&&t&&!(8&t)&&s!==l){const e=f.i,r=null==(i=o._)?void 0:i[n];null==r||r.forEach((o=>{const[[i,r]]=Object.entries(o);null!=e[i]&&(128&t||1&r)&&e[i].call(e,s,l,n)}))}return}const a=c.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===s&&void 0===this[u];d&&(s=null!==s&&"false"!==s);const v=Object.getOwnPropertyDescriptor(r,u);p||s==this[u]||v.get&&!v.set||(this[u]=s)}))},n.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=o._)?i:{}),...c.filter((([t,n])=>31&n[0])).map((([n,e])=>{const o=e[1]||n;return t.set(o,n),o}))]))}}return n},Tt=(t,n)=>{Nt(t,"connectedCallback",void 0,n)},Lt=(t,n)=>{Nt(t,"disconnectedCallback",void 0,n||t)},Rt=(t,n={})=>{var o;if(!f.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],u=n.exclude||[],d=f.customElements,v=f.document.head,h=v.querySelector("meta[charset]"),m=f.document.createElement("style"),y=[];let b,$=!0;Object.assign(a,n),a.p=new URL(n.resourcesUrl||"./",f.document.baseURI).href;let w=!1;if(t.map((t=>{t[1].map((n=>{var o,c;const v={u:n[0],v:n[1],t:n[2],V:n[3]};4&v.u&&(w=!0),v.t=n[2],v.V=n[3],v._=_(n[4]),v.W=null!=(o=n[5])?o:{},v.U=null!=(c=n[6])?c:{};const h=v.v,m=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){super(t),((t,n)=>{const e={u:0,$hostElement$:t,o:n,l:new Map,q:new Map};e.B=new Promise((t=>e.H=t)),e.Y=new Promise((t=>e.F=t)),t["s-p"]=[],t["s-rc"]=[],e.A=[];const o=e;t.__stencil__getHostRef=()=>o})(t=this,v)}connectedCallback(){const t=e(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,xt(this,t,v.V)),b&&(clearTimeout(b),b=null),$?y.push(this):a.jmp((()=>(t=>{if(!(1&a.u)){const n=e(t);if(!n)return;const o=n.o,l=()=>{};if(1&n.u)xt(t,n,o.V),(null==n?void 0:n.i)?Tt(n.i,t):(null==n?void 0:n.Y)&&n.Y.then((()=>Tt(n.i,t)));else{n.u|=1,12&o.u&&(t=>{if(!f.document)return;const n=t["s-cr"]=f.document.createComment("");n["s-cn"]=!0,ht(t,n,t.firstChild)})(t);{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){yt(n,n.T=e);break}}o.t&&Object.entries(o.t).map((([n,[e]])=>{if(31&e&&Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;try{if(!(32&n.u)){if(n.u|=32,e.G){const l=((t,n)=>{const e=t.v.replace(/-/g,"_"),o=t.G;if(!o)return;const l=i.get(o);return l?l[e]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[e])),(t=>{s(t,n.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(e,n);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${e.v}#${n.I}" was not found`);o.isProxied||(e._=_(o.watchers),e.W=o.serializers,e.U=o.deserializers,Mt(o,e,2),o.isProxied=!0);const r=()=>{};n.u|=8;try{new o(n)}catch(n){s(n,t)}n.u&=-9,n.u|=128,r(),4&e.u?n.L=!0:Tt(n.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const n=A(e);if(!r.has(n)){const o=()=>{};((t,n,e)=>{let o=r.get(t);p&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,r.set(t,o)})(n,t,!!(1&e.u)),o()}}}const l=n.T,c=()=>bt(n,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()}catch(e){s(e,t),n.M&&(n.M(),n.M=void 0),n.F&&n.F(t)}})(t,n,o)}l()}})(this))))}disconnectedCallback(){a.jmp((()=>(async t=>{if(!(1&a.u)){const n=e(t);(null==n?void 0:n.Z)&&(n.Z.map((t=>t())),n.Z=void 0),(null==n?void 0:n.i)?Lt(n.i,t):(null==n?void 0:n.Y)&&n.Y.then((()=>Lt(n.i,t)))}x.has(t)&&x.delete(t),t.shadowRoot&&x.has(t.shadowRoot)&&x.delete(t.shadowRoot)})(this))),a.raf((()=>{var t;const n=e(this);if(!n)return;const o=y.findIndex((t=>t===this));o>-1&&y.splice(o,1),(null==(t=null==n?void 0:n.D)?void 0:t.k)instanceof Node&&!n.D.k.isConnected&&delete n.D.k}))}componentOnReady(){var t;return null==(t=e(this))?void 0:t.Y}};v.G=t[0],u.includes(h)||d.get(h)||(l.push(h),d.define(h,Mt(m,v,1)))}))})),l.length>0&&(w&&(m.textContent+=c),m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(o=a.P)?o:M(f.document);null!=t&&m.setAttribute("nonce",t),v.insertBefore(m,h?h.nextSibling:v.firstChild)}$=!1,y.length?y.map((t=>t.connectedCallback())):a.jmp((()=>b=setTimeout(kt,30)))},xt=(t,n,e)=>{e&&f.document&&e.map((([e,o,l])=>{const s=Pt(f.document,t,e),i=At(n,l),r=Dt(e);a.ael(s,o,i,r),(n.Z=n.Z||[]).push((()=>a.rel(s,o,i,r)))}))},At=(t,n)=>e=>{var o;try{256&t.u?null==(o=t.i)||o[n](e):(t.R=t.R||[]).push([n,e])}catch(n){s(n,t.$hostElement$)}},Pt=(t,n,e)=>4&e?t:n,Dt=t=>({passive:!!(1&t),capture:!!(2&t)}),Ft=t=>a.P=t;export{H,Rt as b,z as c,W as g,D as h,d as p,o as r,Ft as s}
|
|
@@ -3,6 +3,7 @@ import type { BrickSpec, Utils } from '@streamline-pulse/formkrafter-core';
|
|
|
3
3
|
import type { BrickConfigsChangeDetail, BrickPathDetail, BrickRulesChangeDetail, BrickStylesChangeDetail, BrickValidationsChangeDetail } from '../../utils/events';
|
|
4
4
|
export declare class FkBrickRender {
|
|
5
5
|
brickSpec: BrickSpec;
|
|
6
|
+
rootSpec?: BrickSpec;
|
|
6
7
|
data?: Record<string, unknown>;
|
|
7
8
|
dataMap?: Record<string, unknown>;
|
|
8
9
|
path: string;
|
|
@@ -5,7 +5,8 @@ export declare class FkCodeEditor {
|
|
|
5
5
|
placeholder: string;
|
|
6
6
|
codeChange: EventEmitter<string>;
|
|
7
7
|
private view?;
|
|
8
|
-
|
|
8
|
+
private disconnected;
|
|
9
|
+
componentDidLoad(): Promise<void>;
|
|
9
10
|
syncValue(next: string): void;
|
|
10
11
|
private emitIfChanged;
|
|
11
12
|
disconnectedCallback(): void;
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import type { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import type { UploadedFile } from '@streamline-pulse/formkrafter-core';
|
|
3
3
|
export declare class FkFileInput {
|
|
4
|
-
value?: UploadedFile;
|
|
4
|
+
value?: UploadedFile | UploadedFile[];
|
|
5
5
|
disabled: boolean;
|
|
6
6
|
accept?: string;
|
|
7
|
-
|
|
7
|
+
uploadUrl?: string;
|
|
8
|
+
multiple: boolean;
|
|
9
|
+
fileValueChange: EventEmitter<UploadedFile | UploadedFile[] | undefined>;
|
|
8
10
|
uploading: boolean;
|
|
11
|
+
removingUrl?: string;
|
|
9
12
|
uploadError?: string;
|
|
10
13
|
private inputEl?;
|
|
14
|
+
private get files();
|
|
15
|
+
private emitFiles;
|
|
11
16
|
private formatSize;
|
|
12
17
|
private handleFile;
|
|
18
|
+
private handleRemove;
|
|
19
|
+
private renderFile;
|
|
13
20
|
render(): any;
|
|
14
21
|
}
|
|
@@ -5,10 +5,14 @@ export declare class FkSelectInput {
|
|
|
5
5
|
value?: string | string[];
|
|
6
6
|
disabled: boolean;
|
|
7
7
|
multiple: boolean;
|
|
8
|
+
invalid: boolean;
|
|
8
9
|
dataMap?: Record<string, unknown>;
|
|
9
10
|
selectValueChange: EventEmitter<string | string[] | undefined>;
|
|
10
11
|
open: boolean;
|
|
11
12
|
query: string;
|
|
13
|
+
activeIndex: number;
|
|
14
|
+
private instanceId;
|
|
15
|
+
private triggerEl?;
|
|
12
16
|
private lastRemoteSignature?;
|
|
13
17
|
private searchTimer?;
|
|
14
18
|
remoteOptions: unknown[];
|
|
@@ -23,7 +27,12 @@ export declare class FkSelectInput {
|
|
|
23
27
|
private bindOutsideClick;
|
|
24
28
|
private unbindOutsideClick;
|
|
25
29
|
private toggleOpen;
|
|
30
|
+
private openDropdown;
|
|
26
31
|
private close;
|
|
32
|
+
private moveActive;
|
|
33
|
+
private scrollActiveIntoView;
|
|
34
|
+
private onTriggerKeyDown;
|
|
35
|
+
private onSearchKeyDown;
|
|
27
36
|
private source;
|
|
28
37
|
private resolveRemote;
|
|
29
38
|
private onSearchInput;
|
|
@@ -41,6 +41,7 @@ export namespace Components {
|
|
|
41
41
|
* @default '0'
|
|
42
42
|
*/
|
|
43
43
|
"path": string;
|
|
44
|
+
"rootSpec"?: BrickSpec;
|
|
44
45
|
"selectedUid"?: string;
|
|
45
46
|
"utils": Utils;
|
|
46
47
|
}
|
|
@@ -76,7 +77,12 @@ export namespace Components {
|
|
|
76
77
|
* @default false
|
|
77
78
|
*/
|
|
78
79
|
"disabled": boolean;
|
|
79
|
-
|
|
80
|
+
/**
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
"multiple": boolean;
|
|
84
|
+
"uploadUrl"?: string;
|
|
85
|
+
"value"?: UploadedFile | UploadedFile[];
|
|
80
86
|
}
|
|
81
87
|
interface FkFormBuilder {
|
|
82
88
|
"data"?: Record<string, unknown>;
|
|
@@ -123,6 +129,10 @@ export namespace Components {
|
|
|
123
129
|
* @default false
|
|
124
130
|
*/
|
|
125
131
|
"disabled": boolean;
|
|
132
|
+
/**
|
|
133
|
+
* @default false
|
|
134
|
+
*/
|
|
135
|
+
"invalid": boolean;
|
|
126
136
|
/**
|
|
127
137
|
* @default false
|
|
128
138
|
*/
|
|
@@ -339,7 +349,7 @@ declare global {
|
|
|
339
349
|
new (): HTMLFkEmptyFormElement;
|
|
340
350
|
};
|
|
341
351
|
interface HTMLFkFileInputElementEventMap {
|
|
342
|
-
"fileValueChange": UploadedFile | undefined;
|
|
352
|
+
"fileValueChange": UploadedFile | UploadedFile[] | undefined;
|
|
343
353
|
}
|
|
344
354
|
interface HTMLFkFileInputElement extends Components.FkFileInput, HTMLStencilElement {
|
|
345
355
|
addEventListener<K extends keyof HTMLFkFileInputElementEventMap>(type: K, listener: (this: HTMLFkFileInputElement, ev: FkFileInputCustomEvent<HTMLFkFileInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -561,6 +571,7 @@ declare namespace LocalJSX {
|
|
|
561
571
|
* @default '0'
|
|
562
572
|
*/
|
|
563
573
|
"path"?: string;
|
|
574
|
+
"rootSpec"?: BrickSpec;
|
|
564
575
|
"selectedUid"?: string;
|
|
565
576
|
"utils": Utils;
|
|
566
577
|
}
|
|
@@ -598,8 +609,13 @@ declare namespace LocalJSX {
|
|
|
598
609
|
* @default false
|
|
599
610
|
*/
|
|
600
611
|
"disabled"?: boolean;
|
|
601
|
-
|
|
602
|
-
|
|
612
|
+
/**
|
|
613
|
+
* @default false
|
|
614
|
+
*/
|
|
615
|
+
"multiple"?: boolean;
|
|
616
|
+
"onFileValueChange"?: (event: FkFileInputCustomEvent<UploadedFile | UploadedFile[] | undefined>) => void;
|
|
617
|
+
"uploadUrl"?: string;
|
|
618
|
+
"value"?: UploadedFile | UploadedFile[];
|
|
603
619
|
}
|
|
604
620
|
interface FkFormBuilder {
|
|
605
621
|
"data"?: Record<string, unknown>;
|
|
@@ -652,6 +668,10 @@ declare namespace LocalJSX {
|
|
|
652
668
|
* @default false
|
|
653
669
|
*/
|
|
654
670
|
"disabled"?: boolean;
|
|
671
|
+
/**
|
|
672
|
+
* @default false
|
|
673
|
+
*/
|
|
674
|
+
"invalid"?: boolean;
|
|
655
675
|
/**
|
|
656
676
|
* @default false
|
|
657
677
|
*/
|
|
@@ -721,6 +741,8 @@ declare namespace LocalJSX {
|
|
|
721
741
|
interface FkFileInputAttributes {
|
|
722
742
|
"disabled": boolean;
|
|
723
743
|
"accept": string;
|
|
744
|
+
"uploadUrl": string;
|
|
745
|
+
"multiple": boolean;
|
|
724
746
|
}
|
|
725
747
|
interface FkFormRenderAttributes {
|
|
726
748
|
"editable": boolean;
|
|
@@ -734,6 +756,7 @@ declare namespace LocalJSX {
|
|
|
734
756
|
"value": string | string[];
|
|
735
757
|
"disabled": boolean;
|
|
736
758
|
"multiple": boolean;
|
|
759
|
+
"invalid": boolean;
|
|
737
760
|
}
|
|
738
761
|
interface FkSignatureInputAttributes {
|
|
739
762
|
"value": string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { registerBrick, registerBricks, getBrick, getBrickMolds, getBrickMoldsGr
|
|
|
5
5
|
export type { AnyBrick } from './registry/registry';
|
|
6
6
|
export { createBrick } from './registry/create-brick';
|
|
7
7
|
export type { WcBrickConfigs, WcBrickProps, BrickRenderFn } from './registry/create-brick';
|
|
8
|
-
export { registerDefaultBricks, textInputBrick, emailBrick, passwordBrick, urlBrick, phoneBrick, textareaBrick, numberBrick, dateBrick, timeBrick, datetimeBrick, selectBrick, multiSelectBrick, radioBrick, selectBoxesBrick, checkboxBrick, tagsBrick, signatureBrick, addressBrick, fileBrick, dataGridBrick, hiddenBrick, contentBrick, groupBrick, rowBrick, columnBrick, stepperBrick, tabsBrick, } from './registry/default-bricks';
|
|
8
|
+
export { registerDefaultBricks, textInputBrick, emailBrick, passwordBrick, urlBrick, phoneBrick, textareaBrick, numberBrick, dateBrick, timeBrick, datetimeBrick, selectBrick, multiSelectBrick, radioBrick, selectBoxesBrick, checkboxBrick, tagsBrick, signatureBrick, addressBrick, fileBrick, dataGridBrick, hiddenBrick, contentBrick, recapBrick, groupBrick, rowBrick, columnBrick, stepperBrick, tabsBrick, } from './registry/default-bricks';
|
|
9
9
|
export type { BrickDropDetail, BrickConfigsChangeDetail, BrickStylesChangeDetail, BrickValidationsChangeDetail, BrickRulesChangeDetail, BrickPathDetail, SpecChangeDetail, DataChangeDetail, } from './utils/events';
|
|
10
10
|
export { setFkTranslations, fkT, fkTOr, frFkTranslations } from './i18n/i18n';
|
|
11
11
|
export type { FkTranslations } from './i18n/i18n';
|