rssany 0.3.3 → 0.3.5

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 (51) hide show
  1. package/app/webui/build/200.html +6 -6
  2. package/app/webui/build/_app/immutable/assets/14.Dej-duOb.css +1 -0
  3. package/app/webui/build/_app/immutable/assets/18.DKwaKios.css +1 -0
  4. package/app/webui/build/_app/immutable/chunks/{BZY5aksi.js → BVeSE1NJ.js} +1 -1
  5. package/app/webui/build/_app/immutable/chunks/CdnuzsHd.js +1 -0
  6. package/app/webui/build/_app/immutable/chunks/{SvdgnirT.js → Ce-r0j9k.js} +1 -1
  7. package/app/webui/build/_app/immutable/chunks/{B8StT3Do.js → CflZmztn.js} +1 -1
  8. package/app/webui/build/_app/immutable/chunks/{pd_p3yYy.js → D6JgZyc_.js} +1 -1
  9. package/app/webui/build/_app/immutable/chunks/DCl8F8Io.js +2 -0
  10. package/app/webui/build/_app/immutable/chunks/{B0czyjwj.js → DP-sZIv3.js} +1 -1
  11. package/app/webui/build/_app/immutable/chunks/DQE6YZMg.js +1 -0
  12. package/app/webui/build/_app/immutable/chunks/H8yPhK_g.js +36 -0
  13. package/app/webui/build/_app/immutable/chunks/{GeNMTUn1.js → NqUZvg9q.js} +1 -1
  14. package/app/webui/build/_app/immutable/chunks/{Dg_D3pjF.js → sgw2KQ1B.js} +1 -1
  15. package/app/webui/build/_app/immutable/entry/app.BG3erHoA.js +2 -0
  16. package/app/webui/build/_app/immutable/entry/start.BhD5QUgT.js +1 -0
  17. package/app/webui/build/_app/immutable/nodes/0.H78afcWu.js +16 -0
  18. package/app/webui/build/_app/immutable/nodes/{1.DsKocFSb.js → 1.DtZrhmtl.js} +1 -1
  19. package/app/webui/build/_app/immutable/nodes/10.CwtFnSO9.js +1 -0
  20. package/app/webui/build/_app/immutable/nodes/11.DdcAhkmZ.js +3 -0
  21. package/app/webui/build/_app/immutable/nodes/{12.BLyQ6rUu.js → 12.BLGRqrcl.js} +1 -1
  22. package/app/webui/build/_app/immutable/nodes/13.B7g5xlgP.js +1 -0
  23. package/app/webui/build/_app/immutable/nodes/14.Cz521LxG.js +1 -0
  24. package/app/webui/build/_app/immutable/nodes/15.BS5L9nKz.js +1 -0
  25. package/app/webui/build/_app/immutable/nodes/{16.BKDfR-KV.js → 16.DedKEzpT.js} +2 -2
  26. package/app/webui/build/_app/immutable/nodes/{17.DofB8HQB.js → 17.DmUpw-Q0.js} +1 -1
  27. package/app/webui/build/_app/immutable/nodes/18.DP4-TI9w.js +166 -0
  28. package/app/webui/build/_app/immutable/nodes/{3.B9ucbp_W.js → 3.Bc2dV2pk.js} +1 -1
  29. package/app/webui/build/_app/immutable/nodes/5.Db9o3qWa.js +2 -0
  30. package/app/webui/build/_app/immutable/nodes/{6.Bs32Ieii.js → 6.W2s8fUuH.js} +2 -2
  31. package/app/webui/build/_app/immutable/nodes/7.C4cs3Mya.js +1 -0
  32. package/app/webui/build/_app/immutable/nodes/{8.pG10rCF0.js → 8.BY_h7x8A.js} +1 -1
  33. package/app/webui/build/_app/immutable/nodes/9.7_sJV3Bn.js +1 -0
  34. package/app/webui/build/_app/version.json +1 -1
  35. package/package.json +1 -1
  36. package/app/webui/build/_app/immutable/assets/14.BCCBoMGj.css +0 -1
  37. package/app/webui/build/_app/immutable/chunks/BKm6QCwp.js +0 -1
  38. package/app/webui/build/_app/immutable/chunks/BT6b4LcZ.js +0 -36
  39. package/app/webui/build/_app/immutable/chunks/WW6La7Nt.js +0 -2
  40. package/app/webui/build/_app/immutable/entry/app.BKLBG-4w.js +0 -2
  41. package/app/webui/build/_app/immutable/entry/start.D-X6pVtx.js +0 -1
  42. package/app/webui/build/_app/immutable/nodes/0.CJDC_3s9.js +0 -11
  43. package/app/webui/build/_app/immutable/nodes/10.BeejAn8z.js +0 -1
  44. package/app/webui/build/_app/immutable/nodes/11.D--uwkk0.js +0 -3
  45. package/app/webui/build/_app/immutable/nodes/13.Cl0WQK13.js +0 -1
  46. package/app/webui/build/_app/immutable/nodes/14.T9l5Rh19.js +0 -1
  47. package/app/webui/build/_app/immutable/nodes/15.DHfwIlBx.js +0 -1
  48. package/app/webui/build/_app/immutable/nodes/5.9zgwFV6I.js +0 -2
  49. package/app/webui/build/_app/immutable/nodes/7.Cigxrk0v.js +0 -1
  50. package/app/webui/build/_app/immutable/nodes/9.Bzqb3xHY.js +0 -1
  51. /package/app/webui/build/_app/immutable/nodes/{18.BtYZF6FM.js → 19.BtYZF6FM.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as Ye,f as Kt,t as wi}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{at as fh,au as uh,aC as al,aD as wu,az as vi,k as B,d as vu,F as Dt,a5 as xe,$ as $u,av as Xe,ax as Le,aw as gn,y as Pu,u as Tu}from"../chunks/BsQ08Wq_.js";import{s as Cu,a as Zu}from"../chunks/BI_ale1m.js";import{s as $i,e as Au}from"../chunks/BK0ygNWX.js";import{i as yn}from"../chunks/rNwPv4DZ.js";import{k as Mu}from"../chunks/IhDlsCxD.js";import{h as Ru}from"../chunks/DO5OXNYS.js";import{i as Xu}from"../chunks/Nd0ktDhd.js";import{P as Lu,a as hl}from"../chunks/WW6La7Nt.js";import{p as Du}from"../chunks/GeNMTUn1.js";import{s as cl}from"../chunks/4TuV_psf.js";import{o as Wu}from"../chunks/DptdhtA1.js";import{b as Eu}from"../chunks/CAKuIoAf.js";import{p as fl}from"../chunks/D8G961Hm.js";import{B as _u}from"../chunks/Dg_D3pjF.js";let kr=[],dh=[];(()=>{let n="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(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?dh:kr).push(t=t+n[e])})();function zu(n){if(n<768)return!1;for(let e=0,t=kr.length;;){let i=e+t>>1;if(n<kr[i])t=i;else if(n>=dh[i])e=i+1;else return!0;if(e==t)return!1}}function ul(n){return n>=127462&&n<=127487}const dl=8205;function Yu(n,e,t=!0,i=!0){return(t?Oh:Bu)(n,e,i)}function Oh(n,e,t){if(e==n.length)return e;e&&ph(n.charCodeAt(e))&&mh(n.charCodeAt(e-1))&&e--;let i=qs(n,e);for(e+=Ol(i);e<n.length;){let s=qs(n,e);if(i==dl||s==dl||t&&zu(s))e+=Ol(s),i=s;else if(ul(s)){let r=0,o=e-2;for(;o>=0&&ul(qs(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Bu(n,e,t){for(;e>0;){let i=Oh(n,e-2,t);if(i<e)return i;e--}return 0}function qs(n,e){let t=n.charCodeAt(e);if(!mh(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return ph(i)?(t-55296<<10)+(i-56320)+65536:t}function ph(n){return n>=56320&&n<57344}function mh(n){return n>=55296&&n<56320}function Ol(n){return n<65536?1:2}class Y{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=di(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),rt.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=di(this,e,t);let i=[];return this.decompose(e,t,i,0),rt.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Wi(this),r=new Wi(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Wi(this,e)}iterRange(e,t=this.length){return new gh(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new yh(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Y.empty:e.length<=32?new ee(e):rt.from(ee.split(e,[]))}}class ee extends Y{constructor(e,t=qu(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Vu(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new ee(pl(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Bn(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new ee(l,o.length+r.length));else{let a=l.length>>1;i.push(new ee(l.slice(0,a)),new ee(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof ee))return super.replace(e,t,i);[e,t]=di(this,e,t);let s=Bn(this.text,Bn(i.text,pl(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new ee(s,r):rt.from(ee.split(s,[]),r)}sliceString(e,t=this.length,i=`
1
+ import{a as Ye,f as Kt,t as wi}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{at as fh,au as uh,aC as al,aD as wu,az as vi,k as B,d as vu,F as Dt,a5 as xe,$ as $u,av as Xe,ax as Le,aw as gn,y as Pu,u as Tu}from"../chunks/BsQ08Wq_.js";import{s as Cu,a as Zu}from"../chunks/BI_ale1m.js";import{s as $i,e as Au}from"../chunks/BK0ygNWX.js";import{i as yn}from"../chunks/rNwPv4DZ.js";import{k as Mu}from"../chunks/IhDlsCxD.js";import{h as Ru}from"../chunks/DO5OXNYS.js";import{i as Xu}from"../chunks/Nd0ktDhd.js";import{P as Lu}from"../chunks/DQE6YZMg.js";import{a as hl}from"../chunks/DCl8F8Io.js";import{p as Du}from"../chunks/NqUZvg9q.js";import{s as cl}from"../chunks/4TuV_psf.js";import{o as Wu}from"../chunks/DptdhtA1.js";import{b as Eu}from"../chunks/CAKuIoAf.js";import{p as fl}from"../chunks/D8G961Hm.js";import{B as _u}from"../chunks/sgw2KQ1B.js";let kr=[],dh=[];(()=>{let n="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(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?dh:kr).push(t=t+n[e])})();function zu(n){if(n<768)return!1;for(let e=0,t=kr.length;;){let i=e+t>>1;if(n<kr[i])t=i;else if(n>=dh[i])e=i+1;else return!0;if(e==t)return!1}}function ul(n){return n>=127462&&n<=127487}const dl=8205;function Yu(n,e,t=!0,i=!0){return(t?Oh:Bu)(n,e,i)}function Oh(n,e,t){if(e==n.length)return e;e&&ph(n.charCodeAt(e))&&mh(n.charCodeAt(e-1))&&e--;let i=qs(n,e);for(e+=Ol(i);e<n.length;){let s=qs(n,e);if(i==dl||s==dl||t&&zu(s))e+=Ol(s),i=s;else if(ul(s)){let r=0,o=e-2;for(;o>=0&&ul(qs(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Bu(n,e,t){for(;e>0;){let i=Oh(n,e-2,t);if(i<e)return i;e--}return 0}function qs(n,e){let t=n.charCodeAt(e);if(!mh(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return ph(i)?(t-55296<<10)+(i-56320)+65536:t}function ph(n){return n>=56320&&n<57344}function mh(n){return n>=55296&&n<56320}function Ol(n){return n<65536?1:2}class Y{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=di(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),rt.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=di(this,e,t);let i=[];return this.decompose(e,t,i,0),rt.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Wi(this),r=new Wi(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Wi(this,e)}iterRange(e,t=this.length){return new gh(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new yh(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Y.empty:e.length<=32?new ee(e):rt.from(ee.split(e,[]))}}class ee extends Y{constructor(e,t=qu(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Vu(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new ee(pl(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Bn(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new ee(l,o.length+r.length));else{let a=l.length>>1;i.push(new ee(l.slice(0,a)),new ee(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof ee))return super.replace(e,t,i);[e,t]=di(this,e,t);let s=Bn(this.text,Bn(i.text,pl(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new ee(s,r):rt.from(ee.split(s,[]),r)}sliceString(e,t=this.length,i=`
2
2
  `){[e,t]=di(this,e,t);let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let l=this.text[o],a=r+l.length;r>e&&o&&(s+=i),e<a&&t>r&&(s+=l.slice(Math.max(0,e-r),t-r)),r=a+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new ee(i,s)),i=[],s=-1);return s>-1&&t.push(new ee(i,s)),t}}class rt extends Y{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=a+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let l=this.children[r],a=o+l.length;if(e<=a&&t>=o){let h=s&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=di(this,e,t),i.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(e>=r&&t<=l){let a=o.replace(e-r,t-r,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let c=this.children.slice();return c[s]=a,new rt(c,this.length-(t-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
3
3
  `){[e,t]=di(this,e,t);let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let l=this.children[r],a=o+l.length;o>e&&r&&(s+=i),e<a&&t>o&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof rt))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let O of e)O.flatten(d);return new ee(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(d){let O;if(d.lines>r&&d instanceof rt)for(let p of d.children)f(p);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof ee&&a&&(O=c[c.length-1])instanceof ee&&d.lines+O.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new ee(O.text.concat(d.text),O.length+1+d.length)):(a+d.lines>s&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:rt.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new rt(l,t)}}Y.empty=new ee([""],0);function qu(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Bn(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],a=s+l.length;a>=t&&(a>i&&(l=l.slice(0,i-s)),s<t&&(l=l.slice(t-s)),o?(e[e.length-1]+=l,o=!1):e.push(l)),s=a+1}return e}function pl(n,e,t){return Bn(n,[""],e,t)}class Wi{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof ee?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof ee?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
4
4
  `,this;e--}else if(s instanceof ee){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof ee?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class gh{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Wi(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class yh{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(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}}typeof Symbol<"u"&&(Y.prototype[Symbol.iterator]=function(){return this.iter()},Wi.prototype[Symbol.iterator]=gh.prototype[Symbol.iterator]=yh.prototype[Symbol.iterator]=function(){return this});class Vu{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}function di(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function he(n,e,t=!0,i=!0){return Yu(n,e,t,i)}function Iu(n){return n>=56320&&n<57344}function ju(n){return n>=55296&&n<56320}function ve(n,e){let t=n.charCodeAt(e);if(!ju(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Iu(i)?(t-55296<<10)+(i-56320)+65536:t}function bo(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function ot(n){return n<65536?1:2}const wr=/\r\n?|\n/;var de=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(de||(de={}));class ut{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){vr(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s,i)}return new ut(e)}composeDesc(e){return this.empty?e:e.empty?this:xh(this,e)}mapDesc(e,t=!1){return e.empty?this:$r(this,e,t)}mapPos(e,t=-1,i=de.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=s+l;if(a<0){if(h>e)return r+(e-s);r+=l}else{if(i!=de.Simple&&h>=e&&(i==de.TrackDel&&s<e&&h>e||i==de.TrackBefore&&s<e||i==de.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i<this.sections.length&&s<=t;){let r=this.sections[i++],o=this.sections[i++],l=s+r;if(o>=0&&s<=t&&l>=e)return s<e&&l>t?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+i+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ut(e)}static create(e){return new ut(e)}}class oe extends ut{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return vr(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return $r(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s<t.length;s+=2){let o=t[s],l=t[s+1];if(l>=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length<a;)i.push(Y.empty);i.push(o?e.slice(r,r+o):Y.empty)}r+=o}return new oe(t,i)}compose(e){return this.empty?e:e.empty?this:xh(this,e,!0)}map(e,t=!1){return e.empty?this:$r(this,e,t,!0)}iterChanges(e,t=!1){vr(this,e,t)}get desc(){return ut.create(this.sections)}filter(e){let t=[],i=[],s=[],r=new Vi(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&r.len==0;){if(r.done)break e;let c=Math.min(r.len,a-l);me(s,c,-1);let f=r.ins==-1?-1:r.off==0?r.ins:0;me(t,c,f),f>0&&vt(i,t,r.text),r.forward(c),l+=c}let h=e[o++];for(;l<h;){if(r.done)break e;let c=Math.min(r.len,h-l);me(t,c,-1),me(s,c,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(c),l+=c}}return{changes:new oe(t,i),filtered:ut.create(s)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],s=this.sections[t+1];s<0?e.push(i):s==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let s=[],r=[],o=0,l=null;function a(c=!1){if(!c&&!s.length)return;o<t&&me(s,t-o,-1);let f=new oe(s,r);l=l?l.compose(f.map(l)):f,s=[],r=[],o=0}function h(c){if(Array.isArray(c))for(let f of c)h(f);else if(c instanceof oe){if(c.length!=t)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${t})`);a(),l=l?l.compose(c.map(l)):c}else{let{from:f,to:u=f,insert:d}=c;if(f>u||f<0||u>t)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${t})`);let O=d?typeof d=="string"?Y.of(d.split(i||wr)):d:Y.empty,p=O.length;if(f==u&&p==0)return;f<o&&a(),f>o&&me(s,f-o,-1),me(s,u-f,p),vt(r,s,O),o=u}}return h(e),a(!l),l}static empty(e){return new oe(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let s=0;s<e.length;s++){let r=e[s];if(typeof r=="number")t.push(r,-1);else{if(!Array.isArray(r)||typeof r[0]!="number"||r.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)t.push(r[0],0);else{for(;i.length<s;)i.push(Y.empty);i[s]=Y.of(r.slice(1)),t.push(r[0],i[s].length)}}}return new oe(t,i)}static createSet(e,t){return new oe(e,t)}}function me(n,e,t,i=!1){if(e==0&&t<=0)return;let s=n.length-2;s>=0&&t<=0&&t==n[s+1]?n[s]+=e:s>=0&&e==0&&n[s]==0?n[s+1]+=t:i?(n[s]+=e,n[s+1]+=t):n.push(e,t)}function vt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<i;)n.push(Y.empty);n.push(t)}}function vr(n,e,t){let i=n.inserted;for(let s=0,r=0,o=0;o<n.sections.length;){let l=n.sections[o++],a=n.sections[o++];if(a<0)s+=l,r+=l;else{let h=s,c=r,f=Y.empty;for(;h+=l,c+=a,a&&i&&(f=f.append(i[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(s,h,r,c,f),s=h,r=c}}}function $r(n,e,t,i=!1){let s=[],r=i?[]:null,o=new Vi(n),l=new Vi(e);for(let a=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);me(s,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let h=l.len;for(me(s,l.ins,-1);h;){let c=Math.min(o.len,h);o.ins>=0&&a<o.i&&o.len<=c&&(me(s,0,o.ins),r&&vt(r,s,o.text),a=o.i),o.forward(c),h-=c}l.next()}else if(o.ins>=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.len<c)c-=l.len,l.next();else break;me(s,h,a<o.i?o.ins:0),r&&a<o.i&&vt(r,s,o.text),a=o.i,o.forward(o.len-c)}else{if(o.done&&l.done)return r?oe.createSet(s,r):ut.create(s);throw new Error("Mismatched change set lengths")}}}function xh(n,e,t=!1){let i=[],s=t?[]:null,r=new Vi(n),o=new Vi(e);for(let l=!1;;){if(r.done&&o.done)return s?oe.createSet(i,s):ut.create(i);if(r.ins==0)me(i,r.len,0,l),r.next();else if(o.len==0&&!o.done)me(i,0,o.ins,l),s&&vt(s,i,o.text),o.next();else{if(r.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(r.len2,o.len),h=i.length;if(r.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;me(i,a,c,l),s&&c&&vt(s,i,o.text)}else o.ins==-1?(me(i,r.off?0:r.len,a,l),s&&vt(s,i,r.textBit(a))):(me(i,r.off?0:r.len,o.off?0:o.ins,l),s&&!o.off&&vt(s,i,o.text));l=(r.ins>a||o.ins>=0&&o.len>a)&&(l||i.length>h),r.forward2(a),o.forward(a)}}}}class Vi{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Y.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?Y.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Yt{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,s;return this.empty?i=s=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),s=e.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new Yt(i,s,this.flags)}extend(e,t=e,i=0){if(e<=this.anchor&&t>=this.anchor)return x.range(e,t,void 0,void 0,i);let s=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return x.range(this.anchor,s,void 0,void 0,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return x.range(e.anchor,e.head)}static create(e,t,i){return new Yt(e,t,i)}}class x{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:x.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new x([this.main],0)}addRange(e,t=!0){return x.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,x.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new x(e.ranges.map(t=>Yt.fromJSON(t)),e.main)}static single(e,t=e){return new x([x.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;s<e.length;s++){let r=e[s];if(r.empty?r.from<=i:r.from<i)return x.normalized(e.slice(),t);i=r.to}return new x(e,t)}static cursor(e,t=0,i,s){return Yt.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i))|(s??16777215)<<6)}static range(e,t,i,s,r){let o=(i??16777215)<<6|(s==null?7:Math.min(6,s));return!r&&e!=t&&(r=t<e?1:-1),t<e?Yt.create(t,e,48|o):Yt.create(e,t,(r?r<0?8:16:0)|o)}static normalized(e,t=0){let i=e[t];e.sort((s,r)=>s.from-r.from),t=e.indexOf(i);for(let s=1;s<e.length;s++){let r=e[s],o=e[s-1];if(r.empty?r.from<=o.to:r.from<o.to){let l=o.from,a=Math.max(r.to,o.to);s<=t&&t--,e.splice(--s,2,r.anchor>r.head?x.range(a,l):x.range(l,a))}}return new x(e,t)}}function bh(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let So=0;class P{constructor(e,t,i,s,r){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=s,this.id=So++,this.default=e([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(e={}){return new P(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Qo),!!e.static,e.enables)}of(e){return new qn([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new qn(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new qn(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Qo(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class qn{constructor(e,t,i,s){this.dependencies=e,this.facet=t,this.type=i,this.value=s,this.id=So++}dynamicSlot(e){var t;let i=this.value,s=this.facet.compareInput,r=this.id,o=e[r]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||Pr(f,c)){let d=i(f);if(l?!ml(d,f.values[o],s):!s(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,u)=>{let d,O=u.config.address[r];if(O!=null){let p=Jn(u,O);if(this.dependencies.every(g=>g instanceof P?u.facet(g)===f.facet(g):g instanceof pe?u.field(g,!1)==f.field(g,!1):!0)||(l?ml(d=i(f),p,s):s(d=i(f),p)))return f.values[o]=p,0}else d=i(f);return f.values[o]=d,1}}}}function ml(n,e,t){if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(!t(n[i],e[i]))return!1;return!0}function Pr(n,e){let t=!1;for(let i of e)Ei(n,i)&1&&(t=!0);return t}function Nu(n,e,t){let i=t.map(a=>n[a.id]),s=t.map(a=>a.type),r=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;c<i.length;c++){let f=Jn(a,i[c]);if(s[c]==2)for(let u of f)h.push(u);else h.push(f)}return e.combine(h)}return{create(a){for(let h of i)Ei(a,h);return a.values[o]=l(a),1},update(a,h){if(!Pr(a,r))return 0;let c=l(a);return e.compare(c,a.values[o])?0:(a.values[o]=c,1)},reconfigure(a,h){let c=Pr(a,i),f=h.config.facets[e.id],u=h.facet(e);if(f&&!c&&Qo(t,f))return a.values[o]=u,0;let d=l(a);return e.compare(d,u)?(a.values[o]=u,0):(a.values[o]=d,1)}}}const xn=P.define({static:!0});class pe{constructor(e,t,i,s,r){this.id=e,this.createF=t,this.updateF=i,this.compareF=s,this.spec=r,this.provides=void 0}static define(e){let t=new pe(So++,e.create,e.update,e.compare||((i,s)=>i===s),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(xn).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,s)=>{let r=i.values[t],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[t]=o,1)},reconfigure:(i,s)=>{let r=i.facet(xn),o=s.facet(xn),l;return(l=r.find(a=>a.field==this))&&l!=o.find(a=>a.field==this)?(i.values[t]=l.create(i),1):s.config.address[this.id]!=null?(i.values[t]=s.field(this),0):(i.values[t]=this.create(i),1)}}}init(e){return[this,xn.of({field:this,create:e})]}get extension(){return this}}const _t={lowest:4,low:3,default:2,high:1,highest:0};function Pi(n){return e=>new Sh(e,n)}const Xt={highest:Pi(_t.highest),high:Pi(_t.high),default:Pi(_t.default),low:Pi(_t.low),lowest:Pi(_t.lowest)};class Sh{constructor(e,t){this.inner=e,this.prec=t}}class Ps{of(e){return new Tr(this,e)}reconfigure(e){return Ps.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Tr{constructor(e,t){this.compartment=e,this.inner=t}}class Kn{constructor(e,t,i,s,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let s=[],r=Object.create(null),o=new Map;for(let u of Gu(e,t,o))u instanceof pe?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of s)l[u.id]=h.length<<1,h.push(d=>u.slot(d));let c=i==null?void 0:i.config.facets;for(let u in r){let d=r[u],O=d[0].facet,p=c&&c[u]||[];if(d.every(g=>g.type==0))if(l[O.id]=a.length<<1|1,Qo(p,d))a.push(i.facet(O));else{let g=O.combine(d.map(y=>y.value));a.push(i&&O.compare(g,i.facet(O))?i.facet(O):g)}else{for(let g of d)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=h.length<<1,h.push(y=>g.dynamicSlot(y)));l[O.id]=h.length<<1,h.push(g=>Nu(g,O,d))}}let f=h.map(u=>u(l));return new Kn(e,o,f,l,a,r)}}function Gu(n,e,t){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let a=s.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof Tr&&t.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let h of o)r(h,l);else if(o instanceof Tr){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),r(h,l)}else if(o instanceof Sh)r(o.inner,o.prec);else if(o instanceof pe)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof qn)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,_t.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,l)}}return r(n,_t.default),i.reduce((o,l)=>o.concat(l))}function Ei(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let s=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|s}function Jn(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Qh=P.define(),Cr=P.define({combine:n=>n.some(e=>e),static:!0}),kh=P.define({combine:n=>n.length?n[0]:void 0,static:!0}),wh=P.define(),vh=P.define(),$h=P.define(),Ph=P.define({combine:n=>n.length?n[0]:!1});class St{constructor(e,t){this.type=e,this.value=t}static define(){return new Uu}}class Uu{of(e){return new St(this,e)}}class Fu{constructor(e){this.map=e}of(e){return new R(this,e)}}class R{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new R(this.type,t)}is(e){return this.type==e}static define(e={}){return new Fu(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let s of e){let r=s.map(t);r&&i.push(r)}return i}}R.reconfigure=R.define();R.appendConfig=R.define();class ne{constructor(e,t,i,s,r,o){this.startState=e,this.changes=t,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&bh(i,t.newLength),r.some(l=>l.type==ne.time)||(this.annotations=r.concat(ne.time.of(Date.now())))}static create(e,t,i,s,r,o){return new ne(e,t,i,s,r,o)}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(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(ne.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}ne.time=St.define();ne.userEvent=St.define();ne.addToHistory=St.define();ne.remote=St.define();function Hu(n,e){let t=[];for(let i=0,s=0;;){let r,o;if(i<n.length&&(s==e.length||e[s]>=n[i]))r=n[i++],o=n[i++];else if(s<e.length)r=e[s++],o=e[s++];else return t;!t.length||t[t.length-1]<r?t.push(r,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function Th(n,e,t){var i;let s,r,o;return t?(s=e.changes,r=oe.empty(e.changes.length),o=n.changes.compose(e.changes)):(s=e.changes.map(n.changes),r=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(s)),{changes:o,selection:e.selection?e.selection.map(r):(i=n.selection)===null||i===void 0?void 0:i.map(s),effects:R.mapEffects(n.effects,s).concat(R.mapEffects(e.effects,r)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function Zr(n,e,t){let i=e.selection,s=oi(e.annotations);return e.userEvent&&(s=s.concat(ne.userEvent.of(e.userEvent))),{changes:e.changes instanceof oe?e.changes:oe.of(e.changes||[],t,n.facet(kh)),selection:i&&(i instanceof x?i:x.single(i.anchor,i.head)),effects:oi(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function Ch(n,e,t){let i=Zr(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let r=1;r<e.length;r++){e[r].filter===!1&&(t=!1);let o=!!e[r].sequential;i=Th(i,Zr(n,e[r],o?i.changes.newLength:n.doc.length),o)}let s=ne.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return Ju(t?Ku(s):s)}function Ku(n){let e=n.startState,t=!0;for(let s of e.facet(wh)){let r=s(n);if(r===!1){t=!1;break}Array.isArray(r)&&(t=t===!0?r:Hu(t,r))}if(t!==!0){let s,r;if(t===!1)r=n.changes.invertedDesc,s=oe.empty(e.doc.length);else{let o=n.changes.filter(t);s=o.changes,r=o.filtered.mapDesc(o.changes).invertedDesc}n=ne.create(e,s,n.selection&&n.selection.map(r),R.mapEffects(n.effects,r),n.annotations,n.scrollIntoView)}let i=e.facet(vh);for(let s=i.length-1;s>=0;s--){let r=i[s](n);r instanceof ne?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof ne?n=r[0]:n=Ch(e,oi(r),!1)}return n}function Ju(n){let e=n.startState,t=e.facet($h),i=n;for(let s=t.length-1;s>=0;s--){let r=t[s](n);r&&Object.keys(r).length&&(i=Th(i,Zr(e,r,n.changes.newLength),!0))}return i==n?n:ne.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const ed=[];function oi(n){return n==null?ed:Array.isArray(n)?n:[n]}var H=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(H||(H={}));const td=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Ar;try{Ar=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function id(n){if(Ar)return Ar.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||td.test(t)))return!0}return!1}function nd(n){return e=>{if(!/\S/.test(e))return H.Space;if(id(e))return H.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return H.Word;return H.Other}}class q{constructor(e,t,i,s,r,o){this.config=e,this.doc=t,this.selection=i,this.values=s,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Ei(this,l<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return Ei(this,i),Jn(this,i)}update(...e){return Ch(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:s}=t;for(let l of e.effects)l.is(Ps.reconfigure)?(t&&(s=new Map,t.compartments.forEach((a,h)=>s.set(h,a)),t=null),s.set(l.value.compartment,l.value.extension)):l.is(R.reconfigure)?(t=null,i=l.value):l.is(R.appendConfig)&&(t=null,i=oi(i).concat(l.value));let r;t?r=e.startState.values.slice():(t=Kn.resolve(i,s,this),r=new q(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(Cr)?e.newSelection:e.newSelection.asSingle();new q(t,e.newDoc,o,r,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:x.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),s=this.changes(i.changes),r=[i.range],o=oi(i.effects);for(let l=1;l<t.ranges.length;l++){let a=e(t.ranges[l]),h=this.changes(a.changes),c=h.map(s);for(let u=0;u<l;u++)r[u]=r[u].map(c);let f=s.mapDesc(h,!0);r.push(a.range.map(f)),s=s.compose(c),o=R.mapEffects(o,c).concat(R.mapEffects(oi(a.effects),f))}return{changes:s,selection:x.create(r,t.mainIndex),effects:o}}changes(e=[]){return e instanceof oe?e:oe.of(e,this.doc.length,this.facet(q.lineSeparator))}toText(e){return Y.of(e.split(this.facet(q.lineSeparator)||wr))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Ei(this,t),Jn(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let s=e[i];s instanceof pe&&this.config.address[s.id]!=null&&(t[i]=s.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(i){for(let r in i)if(Object.prototype.hasOwnProperty.call(e,r)){let o=i[r],l=e[r];s.push(o.init(a=>o.spec.fromJSON(l,a)))}}return q.create({doc:e.doc,selection:x.fromJSON(e.selection),extensions:t.extensions?s.concat([t.extensions]):s})}static create(e={}){let t=Kn.resolve(e.extensions||[],new Map),i=e.doc instanceof Y?e.doc:Y.of((e.doc||"").split(t.staticFacet(q.lineSeparator)||wr)),s=e.selection?e.selection instanceof x?e.selection:x.single(e.selection.anchor,e.selection.head):x.single(0);return bh(s,i.length),t.staticFacet(Cr)||(s=s.asSingle()),new q(t,i,s,t.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(q.tabSize)}get lineBreak(){return this.facet(q.lineSeparator)||`
@@ -21,4 +21,4 @@ import{a as Ye,f as Kt,t as wi}from"../chunks/DIeahUKq.js";import"../chunks/CEWi
21
21
  constructor(\${params}) {
22
22
  \${}
23
23
  }
24
- }`,{label:"class",detail:"definition",type:"keyword"}),we('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),we('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],By=pu.concat([we("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),we("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),we("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),nh=new tm,mu=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Mi(n){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,n),!0}}const qy=["FunctionDeclaration"],Vy={FunctionDeclaration:Mi("function"),ClassDeclaration:Mi("class"),ClassExpression:()=>!0,EnumDeclaration:Mi("constant"),TypeAliasDeclaration:Mi("type"),NamespaceDeclaration:Mi("namespace"),VariableDefinition(n,e){n.matchContext(qy)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function gu(n,e){let t=nh.get(e);if(t)return t;let i=[],s=!0;function r(o,l){let a=n.sliceString(o.from,o.to);i.push({label:a,type:l})}return e.cursor(K.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let l=Vy[o.name];if(l&&l(o,r)||mu.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of gu(n,o.node))i.push(l);return!1}}),nh.set(e,i),i}const sh=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,yu=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Iy(n){let e=le(n.state).resolveInner(n.pos,-1);if(yu.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&sh.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let i=[];for(let s=e;s;s=s.parent)mu.has(s.name)&&(i=i.concat(gu(n.state.doc,s)));return{options:i,from:t?e.from:n.pos,validFor:sh}}const Nt=fs.define({name:"javascript",parser:Yy.configure({props:[Gc.add({IfStatement:hr({except:/^\s*({|else\b)/}),TryStatement:hr({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Qm,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:i?1:2)*n.unit},Block:Sm({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":hr({except:/^\s*{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),Hc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":$m,BlockComment(n){return{from:n.from+2,to:n.to-2}},JSXElement(n){let e=n.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=n.lastChild;return{from:e.to,to:t.type.isError?n.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(n){var e;let t=(e=n.firstChild)===null||e===void 0?void 0:e.nextSibling,i=n.lastChild;return!t||t.type.isError?null:{from:t.to,to:i.type.isError?n.to:i.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),xu={test:n=>/^JSX/.test(n.name),facet:jc({commentTokens:{block:{open:"{/*",close:"*/}"}}})},jy=Nt.configure({dialect:"ts"},"typescript"),Ny=Nt.configure({dialect:"jsx",props:[qo.add(n=>n.isTop?[xu]:void 0)]}),Gy=Nt.configure({dialect:"jsx ts",props:[qo.add(n=>n.isTop?[xu]:void 0)]},"typescript");let bu=n=>({label:n,type:"keyword"});const Su="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(bu),Uy=Su.concat(["declare","implements","private","protected","public"].map(bu));function Fy(n={}){let e=n.jsx?n.typescript?Gy:Ny:n.typescript?jy:Nt,t=n.typescript?By.concat(Uy):pu.concat(Su);return new dm(e,[Nt.data.of({autocomplete:j0(yu,Kf(t))}),Nt.data.of({autocomplete:Iy}),n.jsx?Jy:[]])}function Hy(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function rh(n,e,t=n.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return n.sliceString(i.from,Math.min(i.to,t));return""}const Ky=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Jy=$.inputHandler.of((n,e,t,i,s)=>{if((Ky?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||i!=">"&&i!="/"||!Nt.isActiveAt(n.state,e,-1))return!1;let r=s(),{state:o}=r,l=o.changeByRange(a=>{var h;let{head:c}=a,f=le(o).resolveInner(c-1,-1),u;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(c-1,c)!=i||f.name=="JSXAttributeValue"&&f.to>c)){if(i==">"&&f.name=="JSXFragmentTag")return{range:a,changes:{from:c,insert:"</>"}};if(i=="/"&&f.name=="JSXStartCloseTag"){let d=f.parent,O=d.parent;if(O&&d.from==c-2&&((u=rh(o.doc,O.firstChild,c))||((h=O.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let p=`${u}>`;return{range:x.cursor(c+p.length,-1),changes:{from:c,insert:p}}}}else if(i==">"){let d=Hy(f);if(d&&d.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(c,c+2))&&(u=rh(o.doc,d,c)))return{range:a,changes:{from:c,insert:`</${u}>`}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([r,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),ex="#e5c07b",oh="#e06c75",tx="#56b6c2",ix="#ffffff",Hn="#abb2bf",xo="#7d8799",nx="#61afef",sx="#98c379",lh="#d19a66",rx="#c678dd",ox="#21252b",ah="#2c313a",hh="#282c34",Qr="#353a42",lx="#3E4451",ch="#528bff",ax=$.theme({"&":{color:Hn,backgroundColor:hh},".cm-content":{caretColor:ch},".cm-cursor, .cm-dropCursor":{borderLeftColor:ch},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:lx},".cm-panels":{backgroundColor:ox,color:Hn},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:hh,color:xo,border:"none"},".cm-activeLineGutter":{backgroundColor:ah},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Qr},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Qr,borderBottomColor:Qr},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:ah,color:Hn}}},{dark:!0}),hx=fn.define([{tag:m.keyword,color:rx},{tag:[m.name,m.deleted,m.character,m.propertyName,m.macroName],color:oh},{tag:[m.function(m.variableName),m.labelName],color:nx},{tag:[m.color,m.constant(m.name),m.standard(m.name)],color:lh},{tag:[m.definition(m.name),m.separator],color:Hn},{tag:[m.typeName,m.className,m.number,m.changed,m.annotation,m.modifier,m.self,m.namespace],color:ex},{tag:[m.operator,m.operatorKeyword,m.url,m.escape,m.regexp,m.link,m.special(m.string)],color:tx},{tag:[m.meta,m.comment],color:xo},{tag:m.strong,fontWeight:"bold"},{tag:m.emphasis,fontStyle:"italic"},{tag:m.strikethrough,textDecoration:"line-through"},{tag:m.link,color:xo,textDecoration:"underline"},{tag:m.heading,fontWeight:"bold",color:oh},{tag:[m.atom,m.bool,m.special(m.variableName)],color:lh},{tag:[m.processingInstruction,m.string,m.inserted],color:sx},{tag:m.invalid,color:ix}]),cx=[ax,lf(hx)];var fx=Kt('<div class="cm-root svelte-15dfyqh"></div>');function ux(n,e){fh(e,!0);let t=fl(e,"content",15,""),i=fl(e,"typescript",3,!1),s;Wu(()=>{if(!s)return;const o=q.create({doc:t(),extensions:[ty,Fy({typescript:i()}),cx,$.theme({"&":{height:"100%",minHeight:"0",fontSize:"0.8125rem",lineHeight:"1.5"},".cm-scroller":{fontFamily:"ui-monospace, 'Cascadia Code', 'Consolas', monospace"}}),$.lineWrapping,$.updateListener.of(a=>{var h;a.docChanged&&(t(a.state.doc.toString()),(h=e.onedit)==null||h.call(e))})]}),l=new $({state:o,parent:s});return()=>l.destroy()});var r=fx();Eu(r,o=>s=o,()=>s),Ye(n,r),uh()}var dx=Kt('<button type="button" class="admin-toolbar-btn admin-toolbar-btn--primary"> </button>'),Ox=Kt('<div class="state svelte-1141x2j">缺少插件 id</div>'),px=Kt('<div class="state svelte-1141x2j">加载中…</div>'),mx=Kt('<div class="state err svelte-1141x2j"> </div>'),gx=Kt('<div class="plugin-editor-area svelte-1141x2j"><div class="editor-wrap svelte-1141x2j"><!></div></div>'),yx=Kt('<div class="feed-wrap svelte-1141x2j"><div class="feed-col svelte-1141x2j"><div class="feed-toolbar-block plugin-detail-toolbar svelte-1141x2j"><div class="admin-feed-header"><div class="admin-feed-header__left"><h2> </h2> <p class="admin-feed-header__desc plugin-path svelte-1141x2j"><!></p></div> <div class="admin-feed-header__actions"><!> <!></div></div></div> <div class="feed-body-scroll svelte-1141x2j"><!></div></div></div>');function Wx(n,e){fh(e,!1);const t=()=>Zu(Du,"$page",i),[i,s]=Cu(),r=Dt();let o=Dt(""),l=Dt(""),a=Dt(!0),h=Dt(!1),c=Dt(""),f=Dt(!1);async function u(){if(B(r)){xe(a,!0),xe(c,"");try{const Z=await hl("/api/plugins/"+encodeURIComponent(B(r)));if(!Z.ok){const re=await Z.text();let Ge=`HTTP ${Z.status}`;try{const mn=JSON.parse(re);mn.error&&(Ge=mn.error)}catch{re.trim()&&(Ge=re)}throw new Error(Ge)}const L=await Z.json();xe(o,L.filePath??""),xe(l,L.content??""),xe(f,!1)}catch(Z){xe(c,Z instanceof Error?Z.message:String(Z)),xe(o,""),xe(l,"")}finally{xe(a,!1)}}}function d(){xe(f,!0)}async function O(){if(!(!B(r)||B(h))){xe(h,!0);try{const Z=await hl("/api/plugins/"+encodeURIComponent(B(r)),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:B(l)})});if(!Z.ok){const L=await Z.text();let re=`HTTP ${Z.status}`;try{const Ge=JSON.parse(L);Ge.error&&(re=Ge.error)}catch{L.trim()&&(re=L)}throw new Error(re)}xe(f,!1),cl("已保存并重新加载插件","success")}catch(Z){cl(Z instanceof Error?Z.message:String(Z),"error")}finally{xe(h,!1)}}}al(()=>t(),()=>{xe(r,t().params.id?decodeURIComponent(t().params.id):"")}),al(()=>B(r),()=>{B(r)&&u()}),wu(),Xu();var p=yx();Ru("1141x2j",Z=>{vu(()=>{$u.title=`${B(r)?`${B(r)} · 插件`:"插件"} — ${Lu}`})});var g=Xe(p),y=Xe(g),b=Xe(y),S=Xe(b),C=Xe(S),Q=Xe(C,!0);Le(C);var k=gn(C,2),w=Xe(k);{var X=Z=>{var L=wi("缺少插件 id");Ye(Z,L)},E=Z=>{var L=wi("加载中…");Ye(Z,L)},I=Z=>{var L=wi();vi(()=>$i(L,B(c))),Ye(Z,L)},D=Z=>{var L=wi();vi(()=>$i(L,B(o))),Ye(Z,L)},M=Z=>{var L=wi("—");Ye(Z,L)};yn(w,Z=>{B(r)?B(a)?Z(E,1):B(c)?Z(I,2):B(o)?Z(D,3):Z(M,-1):Z(X)})}Le(k),Le(S);var V=gn(S,2),z=Xe(V);{var j=Z=>{_u(Z,{})};yn(z,Z=>{B(r)&&Z(j)})}var ce=gn(z,2);{var ye=Z=>{var L=dx(),re=Xe(L,!0);Le(L),vi(()=>{L.disabled=B(h)||!B(f),$i(re,B(h)?"保存中…":"保存")}),Au("click",L,O),Ye(Z,L)};yn(ce,Z=>{B(r)&&!B(a)&&!B(c)&&Z(ye)})}Le(V),Le(b),Le(y);var Re=gn(y,2),se=Xe(Re);{var Qe=Z=>{var L=Ox();Ye(Z,L)},Ne=Z=>{var L=px();Ye(Z,L)},ke=Z=>{var L=mx(),re=Xe(L,!0);Le(L),vi(()=>$i(re,B(c))),Ye(Z,L)},ze=Z=>{var L=gx(),re=Xe(L),Ge=Xe(re);Mu(Ge,()=>B(r),mn=>{{let Qu=Pu(()=>(B(o),Tu(()=>B(o).endsWith(".ts"))));ux(mn,{get typescript(){return B(Qu)},onedit:d,get content(){return B(l)},set content(ku){xe(l,ku)},$$legacy:!0})}}),Le(re),Le(L),Ye(Z,L)};yn(se,Z=>{B(r)?B(a)?Z(Ne,1):B(c)?Z(ke,2):Z(ze,-1):Z(Qe)})}Le(Re),Le(g),Le(p),vi(()=>$i(Q,B(r)||"插件")),Ye(n,p),uh(),s()}export{Wx as component};
24
+ }`,{label:"class",detail:"definition",type:"keyword"}),we('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),we('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],By=pu.concat([we("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),we("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),we("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),nh=new tm,mu=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Mi(n){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,n),!0}}const qy=["FunctionDeclaration"],Vy={FunctionDeclaration:Mi("function"),ClassDeclaration:Mi("class"),ClassExpression:()=>!0,EnumDeclaration:Mi("constant"),TypeAliasDeclaration:Mi("type"),NamespaceDeclaration:Mi("namespace"),VariableDefinition(n,e){n.matchContext(qy)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function gu(n,e){let t=nh.get(e);if(t)return t;let i=[],s=!0;function r(o,l){let a=n.sliceString(o.from,o.to);i.push({label:a,type:l})}return e.cursor(K.IncludeAnonymous).iterate(o=>{if(s)s=!1;else if(o.name){let l=Vy[o.name];if(l&&l(o,r)||mu.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of gu(n,o.node))i.push(l);return!1}}),nh.set(e,i),i}const sh=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,yu=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Iy(n){let e=le(n.state).resolveInner(n.pos,-1);if(yu.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&sh.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let i=[];for(let s=e;s;s=s.parent)mu.has(s.name)&&(i=i.concat(gu(n.state.doc,s)));return{options:i,from:t?e.from:n.pos,validFor:sh}}const Nt=fs.define({name:"javascript",parser:Yy.configure({props:[Gc.add({IfStatement:hr({except:/^\s*({|else\b)/}),TryStatement:hr({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Qm,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:i?1:2)*n.unit},Block:Sm({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":hr({except:/^\s*{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),Hc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":$m,BlockComment(n){return{from:n.from+2,to:n.to-2}},JSXElement(n){let e=n.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=n.lastChild;return{from:e.to,to:t.type.isError?n.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(n){var e;let t=(e=n.firstChild)===null||e===void 0?void 0:e.nextSibling,i=n.lastChild;return!t||t.type.isError?null:{from:t.to,to:i.type.isError?n.to:i.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),xu={test:n=>/^JSX/.test(n.name),facet:jc({commentTokens:{block:{open:"{/*",close:"*/}"}}})},jy=Nt.configure({dialect:"ts"},"typescript"),Ny=Nt.configure({dialect:"jsx",props:[qo.add(n=>n.isTop?[xu]:void 0)]}),Gy=Nt.configure({dialect:"jsx ts",props:[qo.add(n=>n.isTop?[xu]:void 0)]},"typescript");let bu=n=>({label:n,type:"keyword"});const Su="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(bu),Uy=Su.concat(["declare","implements","private","protected","public"].map(bu));function Fy(n={}){let e=n.jsx?n.typescript?Gy:Ny:n.typescript?jy:Nt,t=n.typescript?By.concat(Uy):pu.concat(Su);return new dm(e,[Nt.data.of({autocomplete:j0(yu,Kf(t))}),Nt.data.of({autocomplete:Iy}),n.jsx?Jy:[]])}function Hy(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function rh(n,e,t=n.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return n.sliceString(i.from,Math.min(i.to,t));return""}const Ky=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Jy=$.inputHandler.of((n,e,t,i,s)=>{if((Ky?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||i!=">"&&i!="/"||!Nt.isActiveAt(n.state,e,-1))return!1;let r=s(),{state:o}=r,l=o.changeByRange(a=>{var h;let{head:c}=a,f=le(o).resolveInner(c-1,-1),u;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(c-1,c)!=i||f.name=="JSXAttributeValue"&&f.to>c)){if(i==">"&&f.name=="JSXFragmentTag")return{range:a,changes:{from:c,insert:"</>"}};if(i=="/"&&f.name=="JSXStartCloseTag"){let d=f.parent,O=d.parent;if(O&&d.from==c-2&&((u=rh(o.doc,O.firstChild,c))||((h=O.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let p=`${u}>`;return{range:x.cursor(c+p.length,-1),changes:{from:c,insert:p}}}}else if(i==">"){let d=Hy(f);if(d&&d.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(c,c+2))&&(u=rh(o.doc,d,c)))return{range:a,changes:{from:c,insert:`</${u}>`}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([r,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),ex="#e5c07b",oh="#e06c75",tx="#56b6c2",ix="#ffffff",Hn="#abb2bf",xo="#7d8799",nx="#61afef",sx="#98c379",lh="#d19a66",rx="#c678dd",ox="#21252b",ah="#2c313a",hh="#282c34",Qr="#353a42",lx="#3E4451",ch="#528bff",ax=$.theme({"&":{color:Hn,backgroundColor:hh},".cm-content":{caretColor:ch},".cm-cursor, .cm-dropCursor":{borderLeftColor:ch},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:lx},".cm-panels":{backgroundColor:ox,color:Hn},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:hh,color:xo,border:"none"},".cm-activeLineGutter":{backgroundColor:ah},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Qr},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Qr,borderBottomColor:Qr},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:ah,color:Hn}}},{dark:!0}),hx=fn.define([{tag:m.keyword,color:rx},{tag:[m.name,m.deleted,m.character,m.propertyName,m.macroName],color:oh},{tag:[m.function(m.variableName),m.labelName],color:nx},{tag:[m.color,m.constant(m.name),m.standard(m.name)],color:lh},{tag:[m.definition(m.name),m.separator],color:Hn},{tag:[m.typeName,m.className,m.number,m.changed,m.annotation,m.modifier,m.self,m.namespace],color:ex},{tag:[m.operator,m.operatorKeyword,m.url,m.escape,m.regexp,m.link,m.special(m.string)],color:tx},{tag:[m.meta,m.comment],color:xo},{tag:m.strong,fontWeight:"bold"},{tag:m.emphasis,fontStyle:"italic"},{tag:m.strikethrough,textDecoration:"line-through"},{tag:m.link,color:xo,textDecoration:"underline"},{tag:m.heading,fontWeight:"bold",color:oh},{tag:[m.atom,m.bool,m.special(m.variableName)],color:lh},{tag:[m.processingInstruction,m.string,m.inserted],color:sx},{tag:m.invalid,color:ix}]),cx=[ax,lf(hx)];var fx=Kt('<div class="cm-root svelte-15dfyqh"></div>');function ux(n,e){fh(e,!0);let t=fl(e,"content",15,""),i=fl(e,"typescript",3,!1),s;Wu(()=>{if(!s)return;const o=q.create({doc:t(),extensions:[ty,Fy({typescript:i()}),cx,$.theme({"&":{height:"100%",minHeight:"0",fontSize:"0.8125rem",lineHeight:"1.5"},".cm-scroller":{fontFamily:"ui-monospace, 'Cascadia Code', 'Consolas', monospace"}}),$.lineWrapping,$.updateListener.of(a=>{var h;a.docChanged&&(t(a.state.doc.toString()),(h=e.onedit)==null||h.call(e))})]}),l=new $({state:o,parent:s});return()=>l.destroy()});var r=fx();Eu(r,o=>s=o,()=>s),Ye(n,r),uh()}var dx=Kt('<button type="button" class="admin-toolbar-btn admin-toolbar-btn--primary"> </button>'),Ox=Kt('<div class="state svelte-1141x2j">缺少插件 id</div>'),px=Kt('<div class="state svelte-1141x2j">加载中…</div>'),mx=Kt('<div class="state err svelte-1141x2j"> </div>'),gx=Kt('<div class="plugin-editor-area svelte-1141x2j"><div class="editor-wrap svelte-1141x2j"><!></div></div>'),yx=Kt('<div class="feed-wrap svelte-1141x2j"><div class="feed-col svelte-1141x2j"><div class="feed-toolbar-block plugin-detail-toolbar svelte-1141x2j"><div class="admin-feed-header"><div class="admin-feed-header__left"><h2> </h2> <p class="admin-feed-header__desc plugin-path svelte-1141x2j"><!></p></div> <div class="admin-feed-header__actions"><!> <!></div></div></div> <div class="feed-body-scroll svelte-1141x2j"><!></div></div></div>');function Ex(n,e){fh(e,!1);const t=()=>Zu(Du,"$page",i),[i,s]=Cu(),r=Dt();let o=Dt(""),l=Dt(""),a=Dt(!0),h=Dt(!1),c=Dt(""),f=Dt(!1);async function u(){if(B(r)){xe(a,!0),xe(c,"");try{const Z=await hl("/api/plugins/"+encodeURIComponent(B(r)));if(!Z.ok){const re=await Z.text();let Ge=`HTTP ${Z.status}`;try{const mn=JSON.parse(re);mn.error&&(Ge=mn.error)}catch{re.trim()&&(Ge=re)}throw new Error(Ge)}const L=await Z.json();xe(o,L.filePath??""),xe(l,L.content??""),xe(f,!1)}catch(Z){xe(c,Z instanceof Error?Z.message:String(Z)),xe(o,""),xe(l,"")}finally{xe(a,!1)}}}function d(){xe(f,!0)}async function O(){if(!(!B(r)||B(h))){xe(h,!0);try{const Z=await hl("/api/plugins/"+encodeURIComponent(B(r)),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:B(l)})});if(!Z.ok){const L=await Z.text();let re=`HTTP ${Z.status}`;try{const Ge=JSON.parse(L);Ge.error&&(re=Ge.error)}catch{L.trim()&&(re=L)}throw new Error(re)}xe(f,!1),cl("已保存并重新加载插件","success")}catch(Z){cl(Z instanceof Error?Z.message:String(Z),"error")}finally{xe(h,!1)}}}al(()=>t(),()=>{xe(r,t().params.id?decodeURIComponent(t().params.id):"")}),al(()=>B(r),()=>{B(r)&&u()}),wu(),Xu();var p=yx();Ru("1141x2j",Z=>{vu(()=>{$u.title=`${B(r)?`${B(r)} · 插件`:"插件"} — ${Lu}`})});var g=Xe(p),y=Xe(g),b=Xe(y),S=Xe(b),C=Xe(S),Q=Xe(C,!0);Le(C);var k=gn(C,2),w=Xe(k);{var X=Z=>{var L=wi("缺少插件 id");Ye(Z,L)},E=Z=>{var L=wi("加载中…");Ye(Z,L)},I=Z=>{var L=wi();vi(()=>$i(L,B(c))),Ye(Z,L)},D=Z=>{var L=wi();vi(()=>$i(L,B(o))),Ye(Z,L)},M=Z=>{var L=wi("—");Ye(Z,L)};yn(w,Z=>{B(r)?B(a)?Z(E,1):B(c)?Z(I,2):B(o)?Z(D,3):Z(M,-1):Z(X)})}Le(k),Le(S);var V=gn(S,2),z=Xe(V);{var j=Z=>{_u(Z,{})};yn(z,Z=>{B(r)&&Z(j)})}var ce=gn(z,2);{var ye=Z=>{var L=dx(),re=Xe(L,!0);Le(L),vi(()=>{L.disabled=B(h)||!B(f),$i(re,B(h)?"保存中…":"保存")}),Au("click",L,O),Ye(Z,L)};yn(ce,Z=>{B(r)&&!B(a)&&!B(c)&&Z(ye)})}Le(V),Le(b),Le(y);var Re=gn(y,2),se=Xe(Re);{var Qe=Z=>{var L=Ox();Ye(Z,L)},Ne=Z=>{var L=px();Ye(Z,L)},ke=Z=>{var L=mx(),re=Xe(L,!0);Le(L),vi(()=>$i(re,B(c))),Ye(Z,L)},ze=Z=>{var L=gx(),re=Xe(L),Ge=Xe(re);Mu(Ge,()=>B(r),mn=>{{let Qu=Pu(()=>(B(o),Tu(()=>B(o).endsWith(".ts"))));ux(mn,{get typescript(){return B(Qu)},onedit:d,get content(){return B(l)},set content(ku){xe(l,ku)},$$legacy:!0})}}),Le(re),Le(L),Ye(Z,L)};yn(se,Z=>{B(r)?B(a)?Z(Ne,1):B(c)?Z(ke,2):Z(ze,-1):Z(Qe)})}Le(Re),Le(g),Le(p),vi(()=>$i(Q,B(r)||"插件")),Ye(n,p),uh(),s()}export{Ex as component};
@@ -1 +1 @@
1
- import{a,f as p}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as m}from"../chunks/DptdhtA1.js";import{at as e,au as s,X as i,$ as f}from"../chunks/BsQ08Wq_.js";import{h as n}from"../chunks/DO5OXNYS.js";import{i as c}from"../chunks/Nd0ktDhd.js";import{g as d}from"../chunks/BKm6QCwp.js";var h=p('<p class="redirect-msg svelte-1b0rhdm">正在打开添加插件…</p>');function A(o,r){e(r,!1),m(()=>{d("/plugins?openAdd=1",{replaceState:!0})}),c();var t=h();n("1b0rhdm",l=>{i(()=>{f.title="插件"})}),a(o,t),s()}export{A as component};
1
+ import{a,f as p}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as m}from"../chunks/DptdhtA1.js";import{at as e,au as s,X as i,$ as f}from"../chunks/BsQ08Wq_.js";import{h as n}from"../chunks/DO5OXNYS.js";import{i as c}from"../chunks/Nd0ktDhd.js";import{g as d}from"../chunks/CdnuzsHd.js";var h=p('<p class="redirect-msg svelte-1b0rhdm">正在打开添加插件…</p>');function A(o,r){e(r,!1),m(()=>{d("/plugins?openAdd=1",{replaceState:!0})}),c();var t=h();n("1b0rhdm",l=>{i(()=>{f.title="插件"})}),a(o,t),s()}export{A as component};
@@ -0,0 +1,166 @@
1
+ import{a as u,f as g}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as S}from"../chunks/DptdhtA1.js";import{at as v,aC as A,aD as R,az as y,au as h,d as x,a5 as _,$,av as t,aw as k,ax as s,k as b,F as w}from"../chunks/BsQ08Wq_.js";import{s as U}from"../chunks/BK0ygNWX.js";import{h as j}from"../chunks/DO5OXNYS.js";import{i as I}from"../chunks/Nd0ktDhd.js";import{P as O}from"../chunks/DQE6YZMg.js";var M=g('<div class="feed-wrap svelte-j8n4iu"><div class="feed-col svelte-j8n4iu"><div class="skill-toolbar-block svelte-j8n4iu"><div class="admin-feed-header skill-header svelte-j8n4iu"><div class="admin-feed-header__left"><h2>Skill</h2> <p class="admin-feed-header__desc">给 Agent 使用的 RssAny 能力增强说明</p></div></div></div> <div class="skill-body-scroll svelte-j8n4iu"><div class="body svelte-j8n4iu"><section class="skill-section svelte-j8n4iu"><pre class="skill-text svelte-j8n4iu"> </pre></section></div></div></div></div>');function q(c,f){v(f,!1);const r=w();let e="http://127.0.0.1:18473";const m=()=>String.raw`# RssAny Agent 能力增强说明
2
+
3
+ 用途:当 Agent 需要获得持续信息输入、追踪订阅更新、补充任务上下文、整理外部链接或建立监控型工作流时,使用本说明。RssAny 负责把网页列表、RSS/Atom、邮件等信源转成统一条目库,并输出 JSON / RSS。Agent 的重点不是维护 RssAny,而是把这些条目转化为更可靠的观察、判断和行动。
4
+
5
+ 能力目标
6
+ 1. 持续感知:从订阅源读取最新条目,减少只依赖一次性搜索或过期记忆。
7
+ 2. 上下文补给:在回答、写作、研究、复盘前,先读取相关 feed 作为近期背景。
8
+ 3. 主题监控:围绕关键词、来源、标签或固定信源,持续观察是否出现新变化。
9
+ 4. 证据保留:输出结论时保留标题、链接、来源、发布时间,方便用户追溯。
10
+ 5. 协作交接:把 feed 条目整理成摘要、候选链接、待办、判断依据或下游 Agent 的上下文。
11
+ 6. 信源扩展:当目标网站没有可用 feed 时,写信源插件,把网页列表转成 Agent 可消费的条目。
12
+
13
+ 用 npm 包安装 RssAny
14
+ 1. 需要 Node.js 20 到 23。
15
+ 2. 全局安装:
16
+ npm install -g rssany
17
+ 3. 启动服务:
18
+ rssany start
19
+ 4. 默认访问地址:
20
+ http://127.0.0.1:18473/
21
+ 5. 停止服务:
22
+ rssany stop
23
+ 6. 更新到最新 npm 包:
24
+ rssany update
25
+ 7. 指定端口:
26
+ PORT=18473 rssany start
27
+ 8. 指定用户数据目录:
28
+ RSSANY_USER_DIR=/path/to/rssany-data rssany start
29
+ 9. 如果全局安装遇到 EACCES,优先把 npm 全局 prefix 改到用户目录,而不是直接使用 sudo:
30
+ npm config set prefix "$HOME/.local"
31
+ export PATH="$HOME/.local/bin:$PATH"
32
+ npm install -g rssany
33
+
34
+ RssAny 如何使用
35
+ 1. 打开 Web UI:${e}/
36
+ 2. 添加订阅源:在首页添加 RSS、网页列表、插件支持的站点 URL 或邮箱类信源。
37
+ 3. 查看条目:Web UI 会展示抓取入库后的统一条目。
38
+ 4. 强制拉取某个信源:
39
+ rssany crawl <sourceRef>
40
+ 5. 读取 JSON feed:
41
+ ${e}/api/feed?limit=50
42
+ 6. 读取 RSS:
43
+ ${e}/rss?limit=50
44
+ 7. 管理插件:${e}/plugins
45
+ 8. 后台设置:${e}/admin
46
+ 9. 重置本地数据:
47
+ rssany reset
48
+ 这个命令会重置本地数据,只有用户明确要求清空时才使用。
49
+ 10. RssAny 的核心用途是把分散来源变成统一条目库;Agent 应把它当作信息入口、监控入口和可追溯上下文入口。
50
+
51
+ 可用信息源
52
+ - 最新 JSON 条目:${e}/api/feed?limit=50
53
+ - 指定信源条目:${e}/api/feed?ref=<sourceRef>&limit=50
54
+ - RSS XML 输出:${e}/rss?limit=50
55
+ - 指定信源 RSS:${e}/rss?ref=<sourceRef>&limit=50
56
+ - 关键词筛选:${e}/rss?q=<关键词>&limit=50
57
+ - 标签筛选:${e}/rss?tags=<tag1>,<tag2>&limit=50
58
+
59
+ 读取原则
60
+ 1. 优先读取 JSON feed,因为它更适合 Agent 解析、过滤和重组。
61
+ 2. 只需要标准订阅格式时读取 RSS XML。
62
+ 3. 处理具体任务时,先取 20 到 50 条,避免一次塞入过多低价值上下文。
63
+ 4. 需要聚焦某个来源时使用 ref;需要聚焦主题时使用 q 或 tags。
64
+ 5. 条目链接是事实入口,摘要只是线索;关键判断应回到原文链接核对。
65
+ 6. RSS XML 通常按请求生成,不要假设本机有静态 RSS 文件。
66
+
67
+ 标准使用流程
68
+ 1. 明确任务主题:先把用户问题转成关键词、来源范围或标签范围。
69
+ 2. 读取近期条目:从 JSON feed 拉取最新内容,保留 title、link、summary、pubDate、sourceRef。
70
+ 3. 过滤噪声:去掉重复、过旧、无关或只有标题党价值的条目。
71
+ 4. 建立上下文:按主题、时间、来源或可信度分组。
72
+ 5. 选择深读对象:只打开最相关的原文链接,避免把所有链接都当成等权证据。
73
+ 6. 形成输出:给用户答案、摘要、行动建议、风险提醒或下一步观察清单。
74
+
75
+ 增强研究能力
76
+ 1. 在开始研究前读取相关 feed,确认近期是否已有重要更新。
77
+ 2. 对每个结论至少保留一个可追溯链接。
78
+ 3. 区分事实、推断和建议;feed 条目只能证明“某来源发布了什么”,不能自动证明内容完全正确。
79
+ 4. 对时间敏感主题,优先按发布时间排序,并指出信息的新旧程度。
80
+ 5. 如果多个来源给出相互冲突的信息,列出冲突点,而不是强行合并。
81
+
82
+ 增强监控能力
83
+ 1. 为用户关心的主题建立关键词或标签清单。
84
+ 2. 定期读取对应 feed,比较这次与上次的新增条目。
85
+ 3. 对新增条目做三层筛选:是否新、是否相关、是否需要行动。
86
+ 4. 输出监控结果时优先给“发生了什么”“为什么重要”“建议做什么”。
87
+ 5. 没有重要更新时直接说明,不要为了凑内容扩大解释。
88
+
89
+ 增强写作与汇报能力
90
+ 1. 先把条目按主题聚类,再写摘要,避免流水账。
91
+ 2. 每组最多保留 3 到 5 个代表链接。
92
+ 3. 摘要中写清楚来源和时间,不把 feed 内容伪装成 Agent 自己的常识。
93
+ 4. 适合输出的形态包括:今日简报、竞品动态、技术趋势、风险清单、候选选题、行动项。
94
+ 5. 如果用户要可交接内容,把结论、证据链接、未确认点分开写。
95
+
96
+ 增强协作能力
97
+ 1. 给另一个 Agent 交接时,提供任务目标、筛选条件、关键条目、已排除噪声和待核验链接。
98
+ 2. 不要把整段 feed 原样塞给下游;先压缩成结构化上下文。
99
+ 3. 保留 sourceRef,方便下游 Agent 继续追踪同一来源。
100
+ 4. 对需要持续跟进的事项,给出下一次应检查的关键词、来源或标签。
101
+
102
+ 新增信息覆盖
103
+ 1. 如果用户觉得 Agent 缺少某类信息,先判断缺的是来源、关键词、标签还是更新频率。
104
+ 2. 可以建议用户在 RssAny 中增加对应订阅源,或调整现有订阅的标签和名称。
105
+ 3. 新来源加入后,Agent 应读取 feed 验证是否真的出现了可用条目。
106
+ 4. 判断新增来源价值时看四点:更新频率、内容相关性、链接稳定性、摘要质量。
107
+ 5. 不要把无关来源加入长期上下文;信息越多不等于能力越强。
108
+
109
+ 扩展信源能力:写插件
110
+ 1. 当目标信息只存在于网页列表、站点索引或非标准页面里,写插件就是增强 Agent 感知范围的一部分。
111
+ 2. 插件的目标不是“写完整爬虫”,而是稳定产出可去重、可追溯、可订阅的条目。
112
+ 3. 优先覆盖高价值来源:用户反复关注、更新稳定、条目链接清晰、内容能支撑决策的站点。
113
+ 4. 插件应使用 ESM 命名导出,核心字段是 id、listUrlPattern、fetchItems。
114
+ 5. fetchItems 返回数组;每条至少提供 guid、title、link 或 url、pubDate、summary 或 content。
115
+ 6. guid 要稳定,优先使用详情页 URL;不要用每次都会变化的随机值。
116
+ 7. 优先使用 RssAny 提供的上下文能力获取和解析页面,例如 ctx.fetchHtml、ctx.deps.parseHtml、ctx.extractItem。
117
+ 8. 不要修改内置插件;新增或覆盖能力应放在用户插件目录,由同 id 覆盖实现替换。
118
+
119
+ 最小插件形态
120
+ export const id = "example-site";
121
+ export const name = "Example Site";
122
+ export const listUrlPattern = "https://example.com/news";
123
+ export const refreshInterval = "1day";
124
+
125
+ export async function fetchItems(sourceId, ctx) {
126
+ const { html, finalUrl } = await ctx.fetchHtml(sourceId, {
127
+ waitMs: 2000,
128
+ purify: true,
129
+ });
130
+ const root = ctx.deps.parseHtml(html);
131
+ const links = root.querySelectorAll("a.article");
132
+ return links.map((a) => {
133
+ const href = a.getAttribute("href") || "";
134
+ const url = new URL(href, finalUrl).href;
135
+ return {
136
+ guid: url,
137
+ title: a.text.trim(),
138
+ link: url,
139
+ url,
140
+ pubDate: new Date(),
141
+ summary: "",
142
+ };
143
+ });
144
+ }
145
+
146
+ 插件能力验收
147
+ 1. 能否匹配目标 sourceRef。
148
+ 2. 能否返回非空条目数组。
149
+ 3. 每条是否有稳定 guid 和可打开链接。
150
+ 4. 再次读取同一来源时是否能去重,而不是重复制造新条目。
151
+ 5. 在 JSON feed 或 RSS 输出里能否看到该来源的新条目。
152
+ 6. 如果条目质量不足,优先修正选择器、标题、链接、发布时间和摘要,而不是扩大抓取范围。
153
+
154
+ 质量检查
155
+ 1. 是否读取了最新 feed,而不是只靠记忆回答。
156
+ 2. 是否保留了关键条目的链接和发布时间。
157
+ 3. 是否把相关条目和无关条目分开处理。
158
+ 4. 是否说明了哪些内容已经核对、哪些只是待确认线索。
159
+ 5. 是否把输出转成用户可行动的形式,而不是只复述标题。
160
+
161
+ 边界
162
+ 1. RssAny 是订阅与条目管线,不是替代 Agent 思考的研究产品。
163
+ 2. feed 负责提供输入,Agent 负责判断、筛选、整合和表达。
164
+ 3. 不要把没有来源链接的内容当成确定事实。
165
+ 4. 不要为了“看起来更完整”引入与任务无关的条目。
166
+ 5. 不要删除、重置或破坏 RssAny 的用户数据;能力增强应体现在更好的读取、过滤、追踪和交接上。`;S(()=>{window.location.origin&&(e=window.location.origin)}),A(()=>{},()=>{_(r,m())}),R(),I();var a=M();j("j8n4iu",N=>{x(()=>{$.title=`Skill - ${O}`})});var i=t(a),n=k(t(i),2),l=t(n),o=t(l),d=t(o),p=t(d,!0);s(d),s(o),s(l),s(n),s(i),s(a),y(()=>U(p,b(r))),u(c,a),h()}export{q as component};
@@ -1 +1 @@
1
- import{a as t,f as r}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{d as m,$ as s}from"../chunks/BsQ08Wq_.js";import{h as p}from"../chunks/DO5OXNYS.js";import{S as n}from"../chunks/BT6b4LcZ.js";import{P as f}from"../chunks/WW6La7Nt.js";var i=r('<meta name="description" content="Subscribed sources: labels, counts, pull and manage feeds."/>');function S(e){p("1uha8ag",o=>{var a=i();m(()=>{s.title=`Sources — ${f}`}),t(o,a)}),n(e,{})}export{S as component};
1
+ import{a as t,f as r}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{d as m,$ as s}from"../chunks/BsQ08Wq_.js";import{h as p}from"../chunks/DO5OXNYS.js";import{S as n}from"../chunks/H8yPhK_g.js";import{P as f}from"../chunks/DQE6YZMg.js";var i=r('<meta name="description" content="Subscribed sources: labels, counts, pull and manage feeds."/>');function S(e){p("1uha8ag",o=>{var a=i();m(()=>{s.title=`Sources — ${f}`}),t(o,a)}),n(e,{})}export{S as component};
@@ -0,0 +1,2 @@
1
+ import{a as u,f as p}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as V,a as W}from"../chunks/DptdhtA1.js";import{at as Z,au as ee,d as te,$ as ae,av as s,aw as v,k as r,ax as t,ay as se,az as $,a5 as Y,F as re,y as L,aA as z,aB as le}from"../chunks/BsQ08Wq_.js";import{s as g}from"../chunks/BK0ygNWX.js";import{i as ie}from"../chunks/rNwPv4DZ.js";import{e as y,i as D}from"../chunks/B553hBXT.js";import{h as ne}from"../chunks/DO5OXNYS.js";import{s as oe,a as de,b as ce}from"../chunks/DCl8F8Io.js";import{i as ve}from"../chunks/Nd0ktDhd.js";import{P as fe}from"../chunks/DQE6YZMg.js";var ue=p("<span></span>"),pe=p('<div class="scheduler-row svelte-1jef3w8"><div class="scheduler-left svelte-1jef3w8"><span class="scheduler-name svelte-1jef3w8"> </span> <span class="scheduler-meta svelte-1jef3w8"> </span></div> <div class="scheduler-slots svelte-1jef3w8"></div></div>'),me=p('<section class="scheduler-section svelte-1jef3w8"><h3 class="section-title svelte-1jef3w8">调度任务</h3> <div class="scheduler-card svelte-1jef3w8"></div></section>'),he=p('<a class="card svelte-1jef3w8"><div class="card-main svelte-1jef3w8"><span class="card-label svelte-1jef3w8"> </span> <span class="card-desc svelte-1jef3w8"> </span></div> <span class="card-arrow svelte-1jef3w8">›</span></a>'),_e=p('<section class="links-section svelte-1jef3w8"><h3 class="section-title svelte-1jef3w8"> </h3> <div class="links svelte-1jef3w8"></div></section>'),we=p('<div class="feed-wrap svelte-1jef3w8"><div class="feed-col svelte-1jef3w8"><div class="settings-toolbar-block svelte-1jef3w8"><div class="admin-feed-header settings-header svelte-1jef3w8"><div class="admin-feed-header__left"><h2>设置</h2> <p class="admin-feed-header__desc">管理入口与调试工具</p></div></div></div> <div class="settings-body-scroll svelte-1jef3w8"><div class="body svelte-1jef3w8"><!> <!></div></div></div></div>');function ke(U,q){Z(q,!1);function B(l){if(l===void 0)return"";if(l===0)return"· 正在执行";if(l===-1)return"· 无定时任务";const e=new Date(l),o=Date.now(),i=l-o;if(i<=0)return"· 即将执行";if(i<6e4)return`· 约 ${Math.round(i/1e3)} 秒后`;if(i<36e5)return`· 约 ${Math.round(i/6e4)} 分钟后`;const c=e.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}),n=new Date(o),m=e.getDate()===n.getDate()&&e.getMonth()===n.getMonth()&&e.getFullYear()===n.getFullYear(),a=new Date(n);a.setDate(a.getDate()+1);const d=e.getDate()===a.getDate()&&e.getMonth()===a.getMonth()&&e.getFullYear()===a.getFullYear();return m?`· 下次 ${c}`:d?`· 下次 明天 ${c}`:`· 下次 ${e.toLocaleDateString("zh-CN",{month:"numeric",day:"numeric"})} ${c}`}const E=[{title:"管理",links:[{href:"/admin/tags",label:"标签",desc:"系统标签库,新入库条目由 LLM 自动匹配打标签"},{href:"/admin/pipeline",label:"Pipeline",desc:"入库前处理(打标签、翻译),支持顺序与开关"}]},{title:"集成",links:[{href:"/admin/llm",label:"LLM",desc:"OpenAI 兼容 API(解析、Pipeline、标签与翻译);可替代 .env 中的 OPENAI_*"},{href:"/admin/proxy",label:"代理",desc:"维护代理列表,并选择全局默认代理;信源可从列表中单独选择"},{href:"/admin/deliver",label:"投递",desc:"配置下游 URL 与可选 Bearer 令牌;非空 URL 时在写库与 Pipeline 后额外 POST 条目"}]},{title:"调试",links:[{href:"/admin/parse",label:"Parse",desc:"从列表页解析条目,返回 JSON"}]}];let j=re({}),M=null;async function O(){try{const e=await(await de("/api/scheduler/stats")).text();Y(j,e.trim()?JSON.parse(e):{})}catch{Y(j,{})}}V(()=>{O(),M=setInterval(O,2e3)}),W(()=>{M&&clearInterval(M)});const J=5;ve();var x=we();ne("1jef3w8",l=>{te(()=>{ae.title=`设置 - ${fe}`})});var P=s(x),k=v(s(P),2),N=s(k),A=s(N);{var R=l=>{var e=me(),o=v(s(e),2);y(o,5,()=>Object.entries(r(j)),D,(i,c)=>{var n=z(()=>le(r(c),2));let m=()=>r(n)[0],a=()=>r(n)[1];const d=L(()=>a().running),b=L(()=>a().completedCount??0),h=L(()=>Math.min(a().concurrency,J));var _=pe(),f=s(_),w=s(f),H=s(w,!0);t(w);var C=v(w,2),K=s(C);t(C),t(f);var F=v(f,2);y(F,5,()=>Array(r(h)),D,(S,ge,Q)=>{var I=ue();let T;$(()=>T=ce(I,1,"slot svelte-1jef3w8",null,T,{filled:Q<r(d)})),u(S,I)}),t(F),t(_),$(S=>{g(H,m()),g(K,`执行中 ${r(d)??""}/${a().concurrency??""} · 排队 ${a().queued??""} · 定时 ${a().scheduledCount??""} · 已完成 ${r(b)??""}
2
+ ${S??""}`)},[()=>B(a().nextRunTime)]),u(i,_)}),t(o),t(e),u(l,e)},X=z(()=>Object.keys(r(j)).length>0);ie(A,l=>{r(X)&&l(R)})}var G=v(A,2);y(G,1,()=>E,D,(l,e)=>{var o=_e(),i=s(o),c=s(i,!0);t(i);var n=v(i,2);y(n,5,()=>r(e).links,D,(m,a)=>{var d=he(),b=s(d),h=s(b),_=s(h,!0);t(h);var f=v(h,2),w=s(f,!0);t(f),t(b),se(2),t(d),$(()=>{oe(d,"href",r(a).href),g(_,r(a).label),g(w,r(a).desc)}),u(m,d)}),t(n),t(o),$(()=>g(c,r(e).title)),u(l,o)}),t(N),t(k),t(P),t(x),u(U,x),ee()}export{ke as component};
@@ -1,2 +1,2 @@
1
- import{a as p,f as d}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as Y}from"../chunks/DptdhtA1.js";import{at as Z,az as ee,au as te,d as se,k as s,F as h,av as o,aw as c,$ as ae,ax as r,ay as P,a5 as a,f as J}from"../chunks/BsQ08Wq_.js";import{e as N,s as x}from"../chunks/BK0ygNWX.js";import{i as R}from"../chunks/rNwPv4DZ.js";import{h as oe}from"../chunks/DO5OXNYS.js";import{P as re,c as S,r as z}from"../chunks/WW6La7Nt.js";import{b as A}from"../chunks/BnqaikL8.js";import{i as ie}from"../chunks/Nd0ktDhd.js";import{B as ne}from"../chunks/Dg_D3pjF.js";import{s as f}from"../chunks/4TuV_psf.js";var ce=d('<p class="hint svelte-bhaf7m">加载中…</p>'),le=d('<input type="url" class="url-input svelte-bhaf7m" placeholder="https://agidaily.cc/api/gateway"/> <p class="hint svelte-bhaf7m">保存后生效;测试仅向 <code>…/test</code> 发一条合并的连通性请求(示例 items + 当前 sources),不写本地库。</p>',1),fe=d('<p class="hint svelte-bhaf7m">加载中…</p>'),me=d('<input type="password" class="url-input svelte-bhaf7m" placeholder="与下游 token.txt 内容一致,留空则不发送 Authorization" autocomplete="off"/> <p class="hint svelte-bhaf7m">非空时出站请求携带 Bearer。清空并保存可从配置中移除 token 字段。</p>',1),ve=d(`<div class="feed-wrap svelte-bhaf7m"><div class="feed-col svelte-bhaf7m"><div class="body svelte-bhaf7m"><!> <p class="intro svelte-bhaf7m">填写<strong>Gateway 基址</strong>(到 <code class="svelte-bhaf7m">/api/gateway</code> 为止,不要带 <code class="svelte-bhaf7m">/items</code>)。非空时:入库与 Pipeline
2
- 完成后会 <code class="svelte-bhaf7m"> </code>(体为 <code class="svelte-bhaf7m">sourceRef</code> + <code class="svelte-bhaf7m">items</code>);<code class="svelte-bhaf7m">sources.json</code> 变更后会 <code class="svelte-bhaf7m">POST …/sources</code>(正文与本地信源文件一致)。下游按固定路径接收即可。</p> <section class="form-section svelte-bhaf7m"><h3 class="section-title svelte-bhaf7m">Gateway 基址</h3> <!></section> <section class="form-section svelte-bhaf7m"><h3 class="section-title svelte-bhaf7m">Gateway 令牌(可选)</h3> <!></section> <section class="form-section svelte-bhaf7m"><div class="btn-row svelte-bhaf7m"><button type="button" class="btn btn-primary svelte-bhaf7m"> </button> <button type="button" class="btn btn-secondary svelte-bhaf7m"> </button></div></section></div></div></div>`);function xe(F,M){Z(M,!1);let i=h(""),n=h(""),l=h(!0),b=h(!1),u=h(!1);async function U(){a(l,!0);try{const e=await S("/api/deliver");a(i,(e==null?void 0:e.gateway)??""),a(n,(e==null?void 0:e.token)??"")}catch{a(i,""),a(n,"")}finally{a(l,!1)}}async function $(){a(b,!0);try{const e=await S("/api/deliver",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({gateway:s(i).trim(),token:s(n).trim()})});if(!(e!=null&&e.ok))throw new Error((e==null?void 0:e.message)??"保存失败");a(i,(e==null?void 0:e.gateway)??s(i)),a(n,(e==null?void 0:e.token)??s(n)),f("已保存","success")}catch(e){f("保存失败: "+(e instanceof Error?e.message:String(e)),"error")}finally{a(b,!1)}}async function D(){const e=s(i).trim();if(!e){f("请先填写 Gateway 基址","error");return}a(u,!0);try{const t=await S("/api/deliver/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({gateway:e,token:s(n).trim()})});t!=null&&t.ok?f("Gateway 测试投递成功(POST …/test)","success"):f("测试失败: "+((t==null?void 0:t.message)??"未知错误"),"error")}catch(t){f("测试失败: "+(t instanceof Error?t.message:String(t)),"error")}finally{a(u,!1)}}Y(U),ie();var _=ve();oe("bhaf7m",e=>{se(()=>{ae.title=`投递 - ${re}`})});var O=o(_),G=o(O),E=o(G);ne(E,{});var g=c(E,2),j=c(o(g),7),q=o(j);r(j),P(9),r(g);var w=c(g,2),H=c(o(w),2);{var I=e=>{var t=ce();p(e,t)},K=e=>{var t=le(),v=J(t);z(v),P(2),A(v,()=>s(i),T=>a(i,T)),p(e,t)};R(H,e=>{s(l)?e(I):e(K,-1)})}r(w);var k=c(w,2),L=c(o(k),2);{var Q=e=>{var t=fe();p(e,t)},V=e=>{var t=me(),v=J(t);z(v),P(2),A(v,()=>s(n),T=>a(n,T)),p(e,t)};R(L,e=>{s(l)?e(Q):e(V,-1)})}r(k);var B=c(k,2),C=o(B),m=o(C),W=o(m,!0);r(m);var y=c(m,2),X=o(y,!0);r(y),r(C),r(B),r(G),r(O),r(_),ee(e=>{x(q,`POST ${(s(i)||"…")??""}/items`),m.disabled=s(b)||s(l),x(W,s(b)?"保存中…":"保存"),y.disabled=e,x(X,s(u)?"测试中…":"测试 Gateway")},[()=>s(u)||s(l)||!s(i).trim()]),N("click",m,$),N("click",y,D),p(F,_),te()}export{xe as component};
1
+ import{a as p,f as d}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as Y}from"../chunks/DptdhtA1.js";import{at as Z,az as ee,au as te,d as se,k as s,F as h,av as o,aw as c,$ as ae,ax as r,ay as P,a5 as a,f as J}from"../chunks/BsQ08Wq_.js";import{e as N,s as x}from"../chunks/BK0ygNWX.js";import{i as R}from"../chunks/rNwPv4DZ.js";import{h as oe}from"../chunks/DO5OXNYS.js";import{c as S,r as z}from"../chunks/DCl8F8Io.js";import{b as A}from"../chunks/BnqaikL8.js";import{i as re}from"../chunks/Nd0ktDhd.js";import{P as ie}from"../chunks/DQE6YZMg.js";import{B as ne}from"../chunks/sgw2KQ1B.js";import{s as m}from"../chunks/4TuV_psf.js";var ce=d('<p class="hint svelte-bhaf7m">加载中…</p>'),le=d('<input type="url" class="url-input svelte-bhaf7m" placeholder="https://agidaily.cc/api/gateway"/> <p class="hint svelte-bhaf7m">保存后生效;测试仅向 <code>…/test</code> 发一条合并的连通性请求(示例 items + 当前 sources),不写本地库。</p>',1),me=d('<p class="hint svelte-bhaf7m">加载中…</p>'),fe=d('<input type="password" class="url-input svelte-bhaf7m" placeholder="与下游 token.txt 内容一致,留空则不发送 Authorization" autocomplete="off"/> <p class="hint svelte-bhaf7m">非空时出站请求携带 Bearer。清空并保存可从配置中移除 token 字段。</p>',1),ve=d(`<div class="feed-wrap svelte-bhaf7m"><div class="feed-col svelte-bhaf7m"><div class="body svelte-bhaf7m"><!> <p class="intro svelte-bhaf7m">填写<strong>Gateway 基址</strong>(到 <code class="svelte-bhaf7m">/api/gateway</code> 为止,不要带 <code class="svelte-bhaf7m">/items</code>)。非空时:入库与 Pipeline
2
+ 完成后会 <code class="svelte-bhaf7m"> </code>(体为 <code class="svelte-bhaf7m">sourceRef</code> + <code class="svelte-bhaf7m">items</code>);<code class="svelte-bhaf7m">sources.json</code> 变更后会 <code class="svelte-bhaf7m">POST …/sources</code>(正文与本地信源文件一致)。下游按固定路径接收即可。</p> <section class="form-section svelte-bhaf7m"><h3 class="section-title svelte-bhaf7m">Gateway 基址</h3> <!></section> <section class="form-section svelte-bhaf7m"><h3 class="section-title svelte-bhaf7m">Gateway 令牌(可选)</h3> <!></section> <section class="form-section svelte-bhaf7m"><div class="btn-row svelte-bhaf7m"><button type="button" class="btn btn-primary svelte-bhaf7m"> </button> <button type="button" class="btn btn-secondary svelte-bhaf7m"> </button></div></section></div></div></div>`);function Se(F,M){Z(M,!1);let i=h(""),n=h(""),l=h(!0),b=h(!1),u=h(!1);async function U(){a(l,!0);try{const e=await S("/api/deliver");a(i,(e==null?void 0:e.gateway)??""),a(n,(e==null?void 0:e.token)??"")}catch{a(i,""),a(n,"")}finally{a(l,!1)}}async function $(){a(b,!0);try{const e=await S("/api/deliver",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({gateway:s(i).trim(),token:s(n).trim()})});if(!(e!=null&&e.ok))throw new Error((e==null?void 0:e.message)??"保存失败");a(i,(e==null?void 0:e.gateway)??s(i)),a(n,(e==null?void 0:e.token)??s(n)),m("已保存","success")}catch(e){m("保存失败: "+(e instanceof Error?e.message:String(e)),"error")}finally{a(b,!1)}}async function D(){const e=s(i).trim();if(!e){m("请先填写 Gateway 基址","error");return}a(u,!0);try{const t=await S("/api/deliver/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({gateway:e,token:s(n).trim()})});t!=null&&t.ok?m("Gateway 测试投递成功(POST …/test)","success"):m("测试失败: "+((t==null?void 0:t.message)??"未知错误"),"error")}catch(t){m("测试失败: "+(t instanceof Error?t.message:String(t)),"error")}finally{a(u,!1)}}Y(U),re();var _=ve();oe("bhaf7m",e=>{se(()=>{ae.title=`投递 - ${ie}`})});var O=o(_),G=o(O),E=o(G);ne(E,{});var g=c(E,2),j=c(o(g),7),q=o(j);r(j),P(9),r(g);var w=c(g,2),H=c(o(w),2);{var I=e=>{var t=ce();p(e,t)},K=e=>{var t=le(),v=J(t);z(v),P(2),A(v,()=>s(i),T=>a(i,T)),p(e,t)};R(H,e=>{s(l)?e(I):e(K,-1)})}r(w);var k=c(w,2),L=c(o(k),2);{var Q=e=>{var t=me();p(e,t)},V=e=>{var t=fe(),v=J(t);z(v),P(2),A(v,()=>s(n),T=>a(n,T)),p(e,t)};R(L,e=>{s(l)?e(Q):e(V,-1)})}r(k);var B=c(k,2),C=o(B),f=o(C),W=o(f,!0);r(f);var y=c(f,2),X=o(y,!0);r(y),r(C),r(B),r(G),r(O),r(_),ee(e=>{x(q,`POST ${(s(i)||"…")??""}/items`),f.disabled=s(b)||s(l),x(W,s(b)?"保存中…":"保存"),y.disabled=e,x(X,s(u)?"测试中…":"测试 Gateway")},[()=>s(u)||s(l)||!s(i).trim()]),N("click",f,$),N("click",y,D),p(F,_),te()}export{Se as component};
@@ -0,0 +1 @@
1
+ import{a as v,f as p,t as ve}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as ce}from"../chunks/DptdhtA1.js";import{at as pe,az as R,au as me,d as fe,av as i,aw as n,$ as de,k as o,ax as l,a5 as s,F as c,f as ue,ay as j}from"../chunks/BsQ08Wq_.js";import{e as $,s as z}from"../chunks/BK0ygNWX.js";import{i as b}from"../chunks/rNwPv4DZ.js";import{h as ge}from"../chunks/DO5OXNYS.js";import{c as U,r as E,s as O}from"../chunks/DCl8F8Io.js";import{b as C}from"../chunks/BnqaikL8.js";import{i as _e}from"../chunks/Nd0ktDhd.js";import{P as ye}from"../chunks/DQE6YZMg.js";import{B as he}from"../chunks/sgw2KQ1B.js";import{s as w}from"../chunks/4TuV_psf.js";var be=p('<p class="hint svelte-1a0dvmg">加载中…</p>'),we=p('<input type="url" class="text-input svelte-1a0dvmg" placeholder="https://api.openai.com/v1" autocomplete="off"/>'),xe=p('<input type="text" class="text-input svelte-1a0dvmg" placeholder="gpt-4o-mini" autocomplete="off"/>'),Ke=p('<p class="hint svelte-1a0dvmg">加载中…</p>'),Pe=p("当前<strong>可用</strong>(文件或环境变量)。",1),ke=p("未检测到 Key,请填写或设置 <code>OPENAI_API_KEY</code>。",1),Ae=p('<input type="password" class="text-input svelte-1a0dvmg" autocomplete="new-password"/> <p class="hint svelte-1a0dvmg"><!> <!></p>',1),Ie=p('<div class="feed-wrap svelte-1a0dvmg"><div class="feed-col svelte-1a0dvmg"><div class="body svelte-1a0dvmg"><!> <p class="intro svelte-1a0dvmg">与 OpenAI 兼容的 Chat Completions API,用于列表解析、正文提取、Pipeline 打标签与翻译等。</p> <section class="form-section svelte-1a0dvmg"><h3 class="section-title svelte-1a0dvmg">API Base URL</h3> <!></section> <section class="form-section svelte-1a0dvmg"><h3 class="section-title svelte-1a0dvmg">模型</h3> <!></section> <section class="form-section svelte-1a0dvmg"><h3 class="section-title svelte-1a0dvmg">API Key</h3> <!></section> <section class="form-section svelte-1a0dvmg"><div class="btn-row svelte-1a0dvmg"><button type="button" class="btn btn-primary svelte-1a0dvmg"> </button> <button type="button" class="btn btn-secondary svelte-1a0dvmg"> </button></div></section></div></div></div>');function je(D,Y){pe(Y,!1);let m=c(""),f=c(""),u=c(""),g=c(!1),_=c(!1),d=c(!0),x=c(!1),K=c(!1);async function q(){s(d,!0);try{const e=await U("/api/llm");s(m,(e==null?void 0:e.baseUrl)??""),s(f,(e==null?void 0:e.model)??""),s(g,!!(e!=null&&e.hasApiKey)),s(_,!!(e!=null&&e.apiKeyInFile)),s(u,"")}catch{s(m,""),s(f,""),s(g,!1),s(_,!1)}finally{s(d,!1)}}async function G(){s(x,!0);try{const e={baseUrl:o(m).trim(),model:o(f).trim()},a=o(u).trim();a&&(e.apiKey=a);const t=await U("/api/llm",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!(t!=null&&t.ok))throw new Error((t==null?void 0:t.message)??"保存失败");s(m,(t==null?void 0:t.baseUrl)??o(m)),s(f,(t==null?void 0:t.model)??o(f)),s(g,!!(t!=null&&t.hasApiKey)),s(_,!!(t!=null&&t.apiKeyInFile)),s(u,""),w("已保存","success")}catch(e){w("保存失败: "+(e instanceof Error?e.message:String(e)),"error")}finally{s(x,!1)}}async function H(){s(K,!0);try{const e=await U("/api/llm/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(e!=null&&e.ok){const a=typeof e.reply=="string"?e.reply.trim():"";w(a?`连接成功:${a.slice(0,120)}${a.length>120?"…":""}`:"连接成功","success")}else w("测试失败: "+((e==null?void 0:e.message)??"未知错误"),"error")}catch(e){w("测试失败: "+(e instanceof Error?e.message:String(e)),"error")}finally{s(K,!1)}}ce(q),_e();var k=Ie();ge("1a0dvmg",e=>{fe(()=>{de.title=`LLM - ${ye}`})});var F=i(k),S=i(F),N=i(S);he(N,{});var A=n(N,4),Q=n(i(A),2);{var V=e=>{var a=be();v(e,a)},W=e=>{var a=we();E(a),C(a,()=>o(m),t=>s(m,t)),v(e,a)};b(Q,e=>{o(d)?e(V):e(W,-1)})}l(A);var I=n(A,2),X=n(i(I),2);{var Z=e=>{var a=xe();E(a),O(a,"spellcheck",!1),C(a,()=>o(f),t=>s(f,t)),v(e,a)};b(X,e=>{o(d)||e(Z)})}l(I);var T=n(I,2),ee=n(i(T),2);{var te=e=>{var a=Ke();v(e,a)},se=e=>{var a=Ae(),t=ue(a);E(t),O(t,"spellcheck",!1);var L=n(t,2),M=i(L);{var re=r=>{var h=Pe();j(2),v(r,h)},ie=r=>{var h=ke();j(2),v(r,h)};b(M,r=>{o(g)?r(re):r(ie,-1)})}var le=n(M,2);{var ne=r=>{var h=ve("已写入配置文件。");v(r,h)};b(le,r=>{o(_)&&r(ne)})}l(L),R(()=>O(t,"placeholder",o(_)?"已保存在配置中,留空表示不修改":"sk-...")),C(t,()=>o(u),r=>s(u,r)),v(e,a)};b(ee,e=>{o(d)?e(te):e(se,-1)})}l(T);var B=n(T,2),J=i(B),y=i(J),ae=i(y,!0);l(y);var P=n(y,2),oe=i(P,!0);l(P),l(J),l(B),l(S),l(F),l(k),R(()=>{y.disabled=o(x)||o(d),z(ae,o(x)?"保存中…":"保存"),P.disabled=o(K)||o(d)||!o(g),z(oe,o(K)?"测试中…":"测试连接")}),$("click",y,G),$("click",P,H),v(D,k),me()}export{je as component};
@@ -1 +1 @@
1
- import{a as e,f as m}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as i}from"../chunks/DptdhtA1.js";import{at as f,au as n}from"../chunks/BsQ08Wq_.js";import{s as l,a as u}from"../chunks/BI_ale1m.js";import{i as c}from"../chunks/Nd0ktDhd.js";import{g}from"../chunks/BKm6QCwp.js";import{p as $}from"../chunks/GeNMTUn1.js";var v=m('<p class="muted svelte-1w6l7vk">正在跳转…</p>');function b(o,t){f(t,!1);const a=()=>u($,"$page",r),[r,s]=l();i(()=>{g("/logs"+a().url.search,{replaceState:!0})}),c();var p=v();e(o,p),n(),s()}export{b as component};
1
+ import{a as e,f as m}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as i}from"../chunks/DptdhtA1.js";import{at as f,au as n}from"../chunks/BsQ08Wq_.js";import{s as l,a as u}from"../chunks/BI_ale1m.js";import{i as c}from"../chunks/Nd0ktDhd.js";import{g}from"../chunks/CdnuzsHd.js";import{p as $}from"../chunks/NqUZvg9q.js";var v=m('<p class="muted svelte-1w6l7vk">正在跳转…</p>');function b(o,t){f(t,!1);const a=()=>u($,"$page",r),[r,s]=l();i(()=>{g("/logs"+a().url.search,{replaceState:!0})}),c();var p=v();e(o,p),n(),s()}export{b as component};
@@ -0,0 +1 @@
1
+ import{a as d,f as _,c as de,t as pe}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as ue}from"../chunks/DptdhtA1.js";import{at as fe,aC as q,aD as me,az as g,k as e,au as _e,d as xe,av as s,a5 as a,F as n,$ as he,ay as K,ax as l,aw as v,f as A,u as C}from"../chunks/BsQ08Wq_.js";import{e as ye,s as b}from"../chunks/BK0ygNWX.js";import{i as D}from"../chunks/rNwPv4DZ.js";import{e as $e}from"../chunks/B553hBXT.js";import{h as ge}from"../chunks/DO5OXNYS.js";import{r as be,c as Pe}from"../chunks/DCl8F8Io.js";import{b as we}from"../chunks/BnqaikL8.js";import{p as Se}from"../chunks/Bfc47y5P.js";import{i as Oe}from"../chunks/Nd0ktDhd.js";import{P as Ce}from"../chunks/DQE6YZMg.js";import{B as Te}from"../chunks/sgw2KQ1B.js";import{S as ke,a as Ie,C as Ne,b as Je,c as Le,d as Re}from"../chunks/CflZmztn.js";import{P as Ue}from"../chunks/D6JgZyc_.js";var qe=_("<span> </span> <!>",1),Ae=_("<!> <!>",1),De=_('<p class="field-hint svelte-1x680s0">暂无代理列表,可在后台「代理」中添加。</p>'),ze=_('<div class="result-error svelte-1x680s0" role="alert"> </div>'),Be=_('<div class="result-wrap svelte-1x680s0"><p class="result-label svelte-1x680s0">解析结果(与下方接口一致)</p> <pre class="result-json svelte-1x680s0"> </pre></div>'),Ee=_('<div class="feed-wrap svelte-1x680s0"><div class="feed-col svelte-1x680s0"><div class="feed-header svelte-1x680s0"><!> <h2 class="svelte-1x680s0">Parse</h2> <p class="page-desc svelte-1x680s0">从列表页解析条目结构,返回 JSON,用于调试插件 Parser 规则</p></div> <div class="body svelte-1x680s0"><form><div class="url-row svelte-1x680s0"><input type="url" placeholder="输入列表页地址…" required="" autocomplete="url" class="svelte-1x680s0"/></div> <div class="proxy-row svelte-1x680s0"><!> <!></div> <div class="action-row svelte-1x680s0"><button type="submit" class="svelte-1x680s0"> </button></div></form> <!> <!></div></div></div>');function lt(Q,X){fe(X,!1);const T=n(),x=n(),z=n();let f=n(""),o=n(""),c=n([]),P=n(!1),h=n(""),y=n("");function Y(t){a(o,t)}async function Z(){try{const t=await Pe("/api/proxy");a(c,Array.isArray(t.proxyList)?t.proxyList.filter(r=>typeof r=="string"&&r.trim().length>0):[])}catch{a(c,[])}}async function ee(){if(e(f).trim()){a(P,!0),a(h,""),a(y,"");try{const t=e(f).startsWith("http")?e(f):"https://"+e(f),r=new URLSearchParams,i=e(o).trim();i&&r.set("proxy",i);const p=r.toString(),$=await fetch("/admin/parse/"+encodeURIComponent(t)+(p?"?"+p:""),{credentials:"include"}),u=await $.text();if(!$.ok){a(h,u||`HTTP ${$.status}`);return}try{a(y,JSON.stringify(JSON.parse(u),null,2))}catch{a(y,u)}}catch(t){a(h,t instanceof Error?t.message:String(t))}finally{a(P,!1)}}}ue(Z),q(()=>(e(o),e(c)),()=>{a(T,e(o).trim()&&!e(c).includes(e(o).trim()))}),q(()=>(e(T),e(o),e(c)),()=>{a(x,[{value:"",label:"使用默认代理"},...e(T)?[{value:e(o),label:`${e(o)}(当前配置,未在代理列表中)`}]:[],...e(c).map(t=>({value:t,label:t}))])}),q(()=>(e(x),e(o)),()=>{var t;a(z,((t=e(x).find(r=>r.value===e(o)))==null?void 0:t.label)??"使用默认代理")}),me(),Oe();var k=Ee();ge("1x680s0",t=>{xe(()=>{he.title=`Parse - ${Ce}`})});var B=s(k),I=s(B),te=s(I);Te(te,{}),K(4),l(I);var E=v(I,2),w=s(E),N=s(w),F=s(N);be(F),l(N);var J=v(N,2),M=s(J);ke(M,{type:"single",get value(){return e(o)},onValueChange:Y,get items(){return e(x)},children:(t,r)=>{var i=Ae(),p=A(i);Ie(p,{class:"proxy-select-trigger","aria-label":"代理",children:(u,ne)=>{var S=qe(),O=A(S),R=s(O,!0);l(O);var V=v(O,2);Ne(V,{size:14,"aria-hidden":"true"}),g(()=>b(R,e(z))),d(u,S)},$$slots:{default:!0}});var $=v(p,2);Ue($,{children:(u,ne)=>{Je(u,{class:"proxy-select-content",sideOffset:4,children:(S,O)=>{Le(S,{class:"proxy-select-viewport",children:(R,V)=>{var W=de(),ve=A(W);$e(ve,1,()=>e(x),U=>U.value,(U,m)=>{Re(U,{class:"proxy-select-item",get value(){return e(m),C(()=>e(m).value)},get label(){return e(m),C(()=>e(m).label)},children:(ce,Fe)=>{K();var G=pe();g(()=>b(G,(e(m),C(()=>e(m).label)))),d(ce,G)},$$slots:{default:!0}})}),d(R,W)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}}),d(t,i)},$$slots:{default:!0}});var re=v(M,2);{var ae=t=>{var r=De();d(t,r)};D(re,t=>{e(c),C(()=>e(c).length===0)&&t(ae)})}l(J);var j=v(J,2),L=s(j),se=s(L,!0);l(L),l(j),l(w);var H=v(w,2);{var le=t=>{var r=ze(),i=s(r,!0);l(r),g(()=>b(i,e(h))),d(t,r)};D(H,t=>{e(h)&&t(le)})}var oe=v(H,2);{var ie=t=>{var r=Be(),i=v(s(r),2),p=s(i,!0);l(i),l(r),g(()=>b(p,e(y))),d(t,r)};D(oe,t=>{e(y)&&t(ie)})}l(E),l(B),l(k),g(()=>{L.disabled=e(P),b(se,e(P)?"解析中…":"解析")}),we(F,()=>e(f),t=>a(f,t)),ye("submit",w,Se(ee)),d(Q,k),_e()}export{lt as component};
@@ -1 +1 @@
1
- {"version":"1780905173365"}
1
+ {"version":"1782211192530"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rssany",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Universal RSS/Atom/JSON Feed pipeline — fetches, extracts, parses and converts any web content into consumable feeds with plugin support",
5
5
  "author": "Joo",
6
6
  "type": "module",
@@ -1 +0,0 @@
1
- .feed-wrap.svelte-1lsf4ps{--feed-sticky-gap-after: 0;margin-top:calc(-1 * var(--main-padding-top));width:100%;max-width:100%;display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.feed-col.svelte-1lsf4ps{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0;background:transparent}.feed-toolbar-block.svelte-1lsf4ps{flex-shrink:0;padding-top:var(--main-padding-top);padding-bottom:var(--feed-sticky-gap-after)}.feed-toolbar-block.svelte-1lsf4ps .admin-feed-header{min-height:4.1rem}.log-filter-input.svelte-1lsf4ps{width:min(16rem,34vw)}.log-level-trigger.svelte-1lsf4ps{width:7.25rem;min-width:7.25rem;height:2.25rem;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.45rem .65rem;font-size:.8125rem;font-family:inherit;color:var(--color-foreground);background:var(--color-card-elevated);border:1px solid var(--color-input);border-radius:6px;flex-shrink:0;cursor:pointer;font-variant-numeric:tabular-nums;transition:border-color .15s,background .15s,box-shadow .15s}.log-level-trigger.svelte-1lsf4ps:hover{border-color:var(--color-border)}.log-level-trigger.svelte-1lsf4ps:focus-visible{outline:none;border-color:var(--color-primary);box-shadow:0 0 0 3px var(--color-primary-light)}.log-level-label.svelte-1lsf4ps{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.log-level-trigger.svelte-1lsf4ps svg{flex-shrink:0;color:var(--color-muted-foreground)}.log-level-content{z-index:120;min-width:7rem;padding:.25rem;background:var(--color-card-elevated);border:1px solid var(--color-border);border-radius:var(--radius-md);box-shadow:var(--shadow-panel)}.log-level-viewport{display:flex;flex-direction:column;gap:.05rem}.log-level-item{display:flex;align-items:center;min-height:1.85rem;padding:.35rem .55rem;font-size:.8125rem;line-height:1.25;color:var(--color-foreground);border-radius:var(--radius-sm);outline:none;cursor:pointer;font-variant-numeric:tabular-nums}.log-level-item[data-highlighted]{background:var(--color-muted)}.log-level-item[data-selected]{color:var(--color-primary);background:var(--color-primary-light)}.log-body-scroll.svelte-1lsf4ps,.log-has-data.svelte-1lsf4ps{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.log-table-scroll.svelte-1lsf4ps{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}.log-table-scroll.svelte-1lsf4ps::-webkit-scrollbar{width:4px}.log-table-scroll.svelte-1lsf4ps::-webkit-scrollbar-thumb{background:var(--color-scrollbar-thumb);border-radius:2px}.btn.svelte-1lsf4ps{display:inline-flex;align-items:center;padding:.4rem .9rem;border:none;border-radius:var(--radius-sm);cursor:pointer;font-size:.875rem;font-family:inherit;transition:background .15s}.btn-primary.svelte-1lsf4ps{background:var(--color-primary);color:var(--color-primary-foreground)}.btn-primary.svelte-1lsf4ps:hover:not(:disabled){background:var(--color-primary-hover)}.btn-secondary.svelte-1lsf4ps{background:var(--color-muted);color:var(--color-foreground);border:1px solid var(--color-border)}.btn-secondary.svelte-1lsf4ps:hover:not(:disabled){background:var(--color-accent)}.btn.svelte-1lsf4ps:disabled{opacity:.4;cursor:not-allowed}.btn-sm.svelte-1lsf4ps{padding:.25rem .5rem;font-size:.75rem}.table-wrap.svelte-1lsf4ps{width:100%}table.svelte-1lsf4ps{width:100%;table-layout:fixed;border-collapse:collapse}thead.svelte-1lsf4ps th:where(.svelte-1lsf4ps){position:sticky;top:0;z-index:3;background:var(--color-card-elevated);font-size:.72rem;font-weight:600;color:var(--color-muted-foreground);text-transform:uppercase;letter-spacing:.04em;padding:.5rem .75rem;text-align:left;border-bottom:1px solid var(--color-border);box-shadow:0 1px 0 var(--color-border)}tbody.svelte-1lsf4ps tr:where(.svelte-1lsf4ps){border-bottom:1px solid var(--color-border-muted)}tbody.svelte-1lsf4ps tr:where(.svelte-1lsf4ps):hover{background:var(--color-muted)}tbody.svelte-1lsf4ps td:where(.svelte-1lsf4ps){padding:.5rem .75rem;font-size:.8125rem;vertical-align:middle}.th-time.svelte-1lsf4ps{width:130px}.th-level.svelte-1lsf4ps{width:68px}.th-cat.svelte-1lsf4ps{width:7rem;max-width:28vw}.th-msg.svelte-1lsf4ps{min-width:0}.log-row.svelte-1lsf4ps{cursor:pointer}.log-row.svelte-1lsf4ps:focus{outline:1px dotted var(--color-muted-foreground);outline-offset:-1px}.td-time.svelte-1lsf4ps{color:var(--color-muted-foreground);white-space:nowrap}.td-level.svelte-1lsf4ps{white-space:nowrap}.badge.svelte-1lsf4ps{display:inline-block;padding:.12rem .4rem;border-radius:4px;font-size:.7rem;font-weight:500}.badge.level-error.svelte-1lsf4ps{background:color-mix(in srgb,var(--color-destructive) 18%,transparent);color:var(--color-destructive);border:1px solid color-mix(in srgb,var(--color-destructive) 45%,transparent)}.badge.level-warn.svelte-1lsf4ps{background:#eab30824;color:#fbbf24;border:1px solid rgba(234,179,8,.35)}.badge.level-info.svelte-1lsf4ps{background:var(--color-primary-light);color:var(--color-primary-hover);border:1px solid color-mix(in srgb,var(--color-primary) 40%,transparent)}.badge.level-debug.svelte-1lsf4ps{background:var(--color-muted);color:var(--color-muted-foreground-strong);border:1px solid var(--color-border)}.td-cat.svelte-1lsf4ps{color:var(--color-muted-foreground-strong)}.td-msg.svelte-1lsf4ps{word-break:break-word;max-width:320px}.payload-row.svelte-1lsf4ps td:where(.svelte-1lsf4ps){padding:.25rem .75rem .65rem;background:transparent;border-bottom:1px solid var(--color-border-muted);vertical-align:top}.payload-content.svelte-1lsf4ps{margin:0;padding:0;font-family:Menlo,Monaco,Consolas,monospace;font-size:.72rem;line-height:1.5;background:transparent;border:none;border-radius:0;overflow-x:auto;max-height:200px;overflow-y:auto;white-space:pre-wrap;word-break:break-all;color:var(--color-muted-foreground-strong)}.log-toolbar.svelte-1lsf4ps{display:flex;align-items:center;justify-content:space-between;padding:.65rem 0 .85rem;flex-shrink:0}.pagination-info.svelte-1lsf4ps{font-size:.8125rem;color:var(--color-muted-foreground)}.pagination-btns.svelte-1lsf4ps{display:flex;gap:.5rem}.state.svelte-1lsf4ps{flex:1;display:flex;align-items:center;justify-content:center;text-align:center;padding:3rem 1.5rem;color:var(--color-muted-foreground-soft);font-size:.875rem}.state.err.svelte-1lsf4ps{flex:1;align-self:stretch;color:var(--color-destructive);background:color-mix(in srgb,var(--color-destructive) 12%,transparent);border-radius:var(--radius-md);padding:1rem;margin:.75rem 0}@media(max-width:720px){.feed-wrap.svelte-1lsf4ps{max-width:100%}.payload-row.svelte-1lsf4ps td:where(.svelte-1lsf4ps){padding-left:.5rem}.payload-row.svelte-1lsf4ps td[colspan="4"]:where(.svelte-1lsf4ps){padding-left:.5rem}}
@@ -1 +0,0 @@
1
- var Zt=t=>{throw TypeError(t)};var Ne=(t,e,n)=>e.has(t)||Zt("Cannot "+n);var v=(t,e,n)=>(Ne(t,e,"read from private field"),n?n.call(t):e.get(t)),A=(t,e,n)=>e.has(t)?Zt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{b8 as P,k as T,a5 as I,t as gt,bu as De}from"./BsQ08Wq_.js";import{w as Dt}from"./FDS7fbwH.js";import{b as qe,H as qt,S as Vt,R as Bt}from"./BUApaBEI.js";import{o as te}from"./DptdhtA1.js";new URL("sveltekit-internal://");function Ve(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function Be(t){return t.split("%25").map(decodeURI).join("%25")}function Ke(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function At({href:t}){return t.split("#")[0]}function Fe(t,e,n,r=!1){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return(c,...p)=>(n(c),i[o](c,...p));e();const l=Reflect.get(i,o);return typeof l=="function"?l.bind(i):l}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return e(),t[i]},enumerable:!0,configurable:!0});return a}function Ge(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}const He=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&z.delete(Kt(t)),He(t,e));const z=new Map;function Me(t,e){const n=Kt(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&z.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=qe(a)),Promise.resolve(new Response(a,s))}return window.fetch(t,e)}function We(t,e,n){if(z.size>0){const r=Kt(t,n),a=z.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);z.delete(r)}}return window.fetch(e,n)}function Kt(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${Ge(...a)}"]`}return r}const Ye=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function ze(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${Xe(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return Pt(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return Pt(String.fromCharCode(...l.slice(2).split("-").map(f=>parseInt(f,16))));const p=Ye.exec(l),[,h,_,g,d]=p;return e.push({name:g,matcher:d,optional:!!h,rest:!!_,chained:_?c===1&&i[0]==="":!1}),_?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return Pt(l)}).join("")}).join("")}/?$`),params:e}}function Je(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function Xe(t){return t.slice(1).split("/").filter(Je)}function Qe(t,e,n){const r={},a=t.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<e.length;o+=1){const l=e[o];let c=a[o-i];if(l.chained&&l.rest&&i&&(c=a.slice(o-i,o+1).filter(p=>p).join("/"),i=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const p=e[o+1],h=a[o+1];p&&!p.rest&&p.optional&&h&&l.chained&&(i=0),!p&&!h&&Object.keys(r).length===s.length&&(i=0);continue}if(l.optional&&l.chained){i++;continue}return}if(!i)return r}function Pt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ze({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([o,[l,c,p]])=>{const{pattern:h,params:_}=ze(o),g={id:o,exec:d=>{const f=h.exec(d);if(f)return Qe(f,_,r)},errors:[1,...p||[]].map(d=>t[d]),layouts:[0,...c||[]].map(i),leaf:s(l)};return g.errors.length=g.layouts.length=Math.max(g.errors.length,g.layouts.length),g});function s(o){const l=o<0;return l&&(o=~o),[l,t[o]]}function i(o){return o===void 0?o:[a.has(o),t[o]]}}function ge(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function ee(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}var fe;const U=((fe=globalThis.__sveltekit_d5v56a)==null?void 0:fe.base)??"";var ue;const tn=((ue=globalThis.__sveltekit_d5v56a)==null?void 0:ue.assets)??U??"",en="1780905173365",me="sveltekit:snapshot",_e="sveltekit:scroll",we="sveltekit:states",nn="sveltekit:pageurl",F="sveltekit:history",X="sveltekit:navigation",D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Et=location.origin;function Ft(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function V(){return{x:pageXOffset,y:pageYOffset}}function K(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const ne={...D,"":D.hover};function ve(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function ye(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=ve(t)}}function Ot(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,s=!r||!!a||St(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===Et&&t.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function mt(t){let e=null,n=null,r=null,a=null,s=null,i=null,o=t;for(;o&&o!==document.documentElement;)r===null&&(r=K(o,"preload-code")),a===null&&(a=K(o,"preload-data")),e===null&&(e=K(o,"keepfocus")),n===null&&(n=K(o,"noscroll")),s===null&&(s=K(o,"reload")),i===null&&(i=K(o,"replacestate")),o=ve(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:ne[r??"off"],preload_data:ne[a??"off"],keepfocus:l(e),noscroll:l(n),reload:l(s),replace_state:l(i)}}function ae(t){const e=Dt(t);let n=!0;function r(){n=!0,e.update(i=>i)}function a(i){n=!1,e.set(i)}function s(i){let o;return e.subscribe(l=>{(o===void 0||n&&l!==o)&&i(o=l)})}return{notify:r,set:a,subscribe:s}}const be={v:()=>{}};function an(){const{set:t,subscribe:e}=Dt(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${tn}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==en;return i&&(t(!0),be.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:e,check:r}}function St(t,e,n){return t.origin!==Et||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function Cn(t){}const ke=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...ke];const rn=new Set([...ke]);[...rn];function on(t){return t.filter(e=>e!=null)}function Gt(t){return t instanceof qt||t instanceof Vt?t.status:500}function sn(t){return t instanceof Vt?t.text:"Internal Error"}let S,Q,Tt;const ln=te.toString().includes("$$")||/function \w+\(\) \{\}/.test(te.toString()),re="a:";var at,rt,ot,it,st,lt,ct,ft,de,ut,he,dt,pe;ln?(S={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(re)},Q={current:null},Tt={current:!1}):(S=new(de=class{constructor(){A(this,at,P({}));A(this,rt,P(null));A(this,ot,P(null));A(this,it,P({}));A(this,st,P({id:null}));A(this,lt,P({}));A(this,ct,P(-1));A(this,ft,P(new URL(re)))}get data(){return T(v(this,at))}set data(e){I(v(this,at),e)}get form(){return T(v(this,rt))}set form(e){I(v(this,rt),e)}get error(){return T(v(this,ot))}set error(e){I(v(this,ot),e)}get params(){return T(v(this,it))}set params(e){I(v(this,it),e)}get route(){return T(v(this,st))}set route(e){I(v(this,st),e)}get state(){return T(v(this,lt))}set state(e){I(v(this,lt),e)}get status(){return T(v(this,ct))}set status(e){I(v(this,ct),e)}get url(){return T(v(this,ft))}set url(e){I(v(this,ft),e)}},at=new WeakMap,rt=new WeakMap,ot=new WeakMap,it=new WeakMap,st=new WeakMap,lt=new WeakMap,ct=new WeakMap,ft=new WeakMap,de),Q=new(he=class{constructor(){A(this,ut,P(null))}get current(){return T(v(this,ut))}set current(e){I(v(this,ut),e)}},ut=new WeakMap,he),Tt=new(pe=class{constructor(){A(this,dt,P(!1))}get current(){return T(v(this,dt))}set current(e){I(v(this,dt),e)}},dt=new WeakMap,pe),be.v=()=>Tt.current=!0);function cn(t){Object.assign(S,t)}const oe={spanContext(){return fn},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},fn={traceId:"",spanId:"",traceFlags:0},un=new Set(["icon","shortcut icon","apple-touch-icon"]);let W=null;const j=ge(_e)??{},Z=ge(me)??{},$={url:ae({}),page:ae({}),navigating:Dt(null),updated:an()};function Ht(t){j[t]=V()}function dn(t,e){let n=t+1;for(;j[n];)delete j[n],n+=1;for(n=e+1;Z[n];)delete Z[n],n+=1}function tt(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function Re(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(U||"/");t&&await t.update()}}function ie(){}let Mt,Ct,_t,O,$t,k;const wt=[],vt=[];let b=null;function jt(){var t;(t=b==null?void 0:b.fork)==null||t.then(e=>e==null?void 0:e.discard()),b=null}const pt=new Map,Ee=new Set,hn=new Set,J=new Set;let w={branch:[],error:null,url:null},Se=!1,yt=!1,se=!0,et=!1,Y=!1,xe=!1,Wt=!1,Le,R,L,q;const bt=new Set,le=new Map;async function Dn(t,e,n){var s,i,o,l,c;(s=globalThis.__sveltekit_d5v56a)!=null&&s.data&&globalThis.__sveltekit_d5v56a.data,document.URL!==location.href&&(location.href=location.href),k=t,await((o=(i=t.hooks).init)==null?void 0:o.call(i)),Mt=Ze(t),O=document.documentElement,$t=e,Ct=t.nodes[0],_t=t.nodes[1],Ct(),_t(),R=(l=history.state)==null?void 0:l[F],L=(c=history.state)==null?void 0:c[X],R||(R=L=Date.now(),history.replaceState({...history.state,[F]:R,[X]:L},""));const r=j[R];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await Sn($t,n)):(await G({type:"enter",url:Ft(k.hash?Un(new URL(location.href)):location.href),replace_state:!0}),a()),En()}function pn(){wt.length=0,Wt=!1}function Ue(t){vt.some(e=>e==null?void 0:e.snapshot)&&(Z[t]=vt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Ae(t){var e;(e=Z[t])==null||e.forEach((n,r)=>{var a,s;(s=(a=vt[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function ce(){Ht(R),ee(_e,j),Ue(L),ee(me,Z)}async function Pe(t,e,n,r){let a;e.invalidateAll&&jt(),await G({type:"goto",url:Ft(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{e.invalidateAll&&(Wt=!0,a=[...le.keys()]),e.invalidate&&e.invalidate.forEach(Rn)}}),e.invalidateAll&&gt().then(gt).then(()=>{le.forEach(({resource:s},i)=>{var o;a!=null&&a.includes(i)&&((o=s.refresh)==null||o.call(s))})})}async function gn(t){if(t.id!==(b==null?void 0:b.id)){jt();const e={};bt.add(e),b={id:t.id,token:e,promise:Oe({...t,preload:e}).then(n=>(bt.delete(e),n.type==="loaded"&&n.state.error&&jt(),n)),fork:null}}return b.promise}async function It(t){var n;const e=(n=await xt(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].filter(Boolean).map(r=>r[1]()))}async function Te(t,e,n){var s;const r={params:w.params,route:{id:((s=w.route)==null?void 0:s.id)??null},url:new URL(location.href)};w={...t.state,nav:r};const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(S,t.props.page),Le=new k.root({target:e,props:{...t.props,stores:$,components:vt},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),Ae(L),n){const i={from:null,to:{...r,scroll:j[R]??V()},willUnload:!1,type:"enter",complete:Promise.resolve()};J.forEach(o=>o(i))}yt=!0}async function kt({url:t,params:e,branch:n,errors:r,status:a,error:s,route:i,form:o}){let l="never";if(U&&(t.pathname===U||t.pathname===U+"/"))l="always";else for(const d of n)(d==null?void 0:d.slash)!==void 0&&(l=d.slash);t.pathname=Ve(t.pathname,l),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:s,route:i},props:{constructors:on(n).map(d=>d.node.component),page:Qt(S)}};o!==void 0&&(c.props.form=o);let p={},h=!S,_=0;for(let d=0;d<Math.max(n.length,w.branch.length);d+=1){const f=n[d],u=w.branch[d];(f==null?void 0:f.data)!==(u==null?void 0:u.data)&&(h=!0),f&&(p={...p,...f.data},h&&(c.props[`data_${_}`]=p),_+=1)}return(!w.url||t.href!==w.url.href||w.error!==s||o!==void 0&&o!==S.form||h)&&(c.props.page={error:s,params:e,route:{id:(i==null?void 0:i.id)??null},state:{},status:a,url:new URL(t),form:o??null,data:h?p:S.data}),c}async function Yt({loader:t,parent:e,url:n,params:r,route:a,server_data_node:s}){var p,h,_;let i=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await t();if((p=c.universal)!=null&&p.load){let g=function(...f){for(const u of f){const{href:m}=new URL(u,n);l.dependencies.add(m)}};const d={tracing:{enabled:!1,root:oe,current:oe},route:new Proxy(a,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(r,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:(s==null?void 0:s.data)??null,url:Fe(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},k.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f==null?void 0:f.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:m,promise:y}=Ie(f,u,n);return o&&g(m.href),y},setHeaders:()=>{},depends:g,parent(){return o&&(l.parent=!0),e()},untrack(f){o=!1;try{return f()}finally{o=!0}}};i=await c.universal.load.call(null,d)??null}return{node:c,loader:t,server:s,universal:(h=c.universal)!=null&&h.load?{type:"data",data:i,uses:l}:null,data:i??(s==null?void 0:s.data)??null,slash:((_=c.universal)==null?void 0:_.trailingSlash)??(s==null?void 0:s.slash)}}function Ie(t,e,n){let r=t instanceof Request?t.url:t;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=yt?We(r,a.href,e):Me(r,e);return{resolved:a,promise:s}}function mn(t,e,n,r,a,s){if(Wt)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==w.params[i])return!0;for(const i of a.dependencies)if(wt.some(o=>o(new URL(i))))return!0;return!1}function zt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function _n(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),s=e.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function wn({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:Qt(S),constructors:[]}}}async function Oe({id:t,invalidating:e,url:n,params:r,route:a,preload:s}){if((b==null?void 0:b.id)===t)return bt.delete(b.token),b.promise;const{errors:i,layouts:o,leaf:l}=a,c=[...o,l];i.forEach(u=>u==null?void 0:u().catch(()=>{})),c.forEach(u=>u==null?void 0:u[1]().catch(()=>{}));const p=w.url?t!==Rt(w.url):!1,h=w.route?a.id!==w.route.id:!1,_=_n(w.url,n);let g=!1;const d=c.map(async(u,m)=>{var C;if(!u)return;const y=w.branch[m];return u[1]===(y==null?void 0:y.loader)&&!mn(g,h,p,_,(C=y.universal)==null?void 0:C.uses,r)?y:(g=!0,Yt({loader:u[1],url:n,params:r,route:a,parent:async()=>{var ht;const N={};for(let B=0;B<m;B+=1)Object.assign(N,(ht=await d[B])==null?void 0:ht.data);return N},server_data_node:zt(u[0]?{type:"skip"}:null,u[0]?y==null?void 0:y.server:void 0)}))});for(const u of d)u.catch(()=>{});const f=[];for(let u=0;u<c.length;u+=1)if(c[u])try{f.push(await d[u])}catch(m){if(m instanceof Bt)return{type:"redirect",location:m.location};if(bt.has(s))return wn({error:await nt(m,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let y=Gt(m),x;if(m instanceof qt)x=m.body;else{if(await $.updated.check())return await Re(),await tt(n);x=await nt(m,{params:r,url:n,route:{id:a.id}})}const C=await vn(u,f,i);return C?kt({url:n,params:r,branch:f.slice(0,C.idx).concat(C.node),errors:i,status:y,error:x,route:a}):await $e(n,{id:a.id},x,y)}else f.push(void 0);return kt({url:n,params:r,branch:f,errors:i,status:200,error:null,route:a,form:e?void 0:null})}async function vn(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Jt({status:t,error:e,url:n,route:r}){const a={};let s=null;try{const i=await Yt({loader:Ct,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:zt(s)}),o={node:await _t(),loader:_t,universal:null,server:null,data:null};return kt({url:n,params:a,branch:[i,o],status:t,error:e,errors:[],route:null})}catch(i){if(i instanceof Bt)return Pe(new URL(i.location,location.href),{},0);throw i}}async function yn(t){const e=t.href;if(pt.has(e))return pt.get(e);let n;try{const r=(async()=>{let a=await k.hooks.reroute({url:new URL(t),fetch:async(s,i)=>Ie(s,i,t).promise})??t;if(typeof a=="string"){const s=new URL(t);k.hash?s.hash=a:s.pathname=a,a=s}return a})();pt.set(e,r),n=await r}catch{pt.delete(e);return}return n}async function xt(t,e){if(t&&!St(t,U,k.hash)){const n=await yn(t);if(!n)return;const r=bn(n);for(const a of Mt){const s=a.exec(r);if(s)return{id:Rt(t),invalidating:e,route:a,params:Ke(s),url:t}}}}function bn(t){return Be(k.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(U.length))||"/"}function Rt(t){return(k.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Ce({url:t,type:e,intent:n,delta:r,event:a,scroll:s}){let i=!1;const o=Xt(w,n,t,e,s??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{i=!0,o.reject(new Error("navigation cancelled"))}};return et||Ee.forEach(c=>c(l)),i?null:o}async function G({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:l={},accept:c=ie,block:p=ie,event:h}){var B;const _=q;q=l;const g=await xt(e,!1),d=t==="enter"?Xt(w,g,e,t):Ce({url:e,type:t,delta:n==null?void 0:n.delta,intent:g,scroll:n==null?void 0:n.scroll,event:h});if(!d){p(),q===l&&(q=_);return}const f=R,u=L;c(),et=!0,yt&&d.navigation.type!=="enter"&&$.navigating.set(Q.current=d.navigation);let m=g&&await Oe(g);if(!m){if(St(e,U,k.hash))return await tt(e,s);m=await $e(e,{id:null},await nt(new Vt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,s)}if(e=(g==null?void 0:g.url)||e,q!==l)return d.reject(new Error("navigation aborted")),!1;if(m.type==="redirect"){if(o<20){await G({type:t,url:new URL(m.location,e),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i,redirect_count:o+1,nav_token:l}),d.fulfil(void 0);return}m=await Jt({status:500,error:await nt(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else m.props.page.status>=400&&await $.updated.check()&&(await Re(),await tt(e,s));if(pn(),Ht(f),Ue(u),m.props.page.url.pathname!==e.pathname&&(e.pathname=m.props.page.url.pathname),i=n?n.state:i,!n){const E=s?0:1,H={[F]:R+=E,[X]:L+=E,[we]:i};(s?history.replaceState:history.pushState).call(history,H,"",e),s||dn(R,L)}const y=g&&(b==null?void 0:b.id)===g.id?b.fork:null;b=null,m.props.page.state=i;let x;if(yt){const E=(await Promise.all(Array.from(hn,M=>M(d.navigation)))).filter(M=>typeof M=="function");if(E.length>0){let M=function(){E.forEach(Ut=>{J.delete(Ut)})};E.push(M),E.forEach(Ut=>{J.add(Ut)})}const H=d.navigation.to;w={...m.state,nav:{params:H.params,route:H.route,url:H.url}},m.props.page&&(m.props.page.url=e);const Lt=y&&await y;Lt?x=Lt.commit():(W=null,Le.$set(m.props),W&&Object.assign(m.props.page,W),cn(m.props.page),x=(B=De)==null?void 0:B()),xe=!0}else await Te(m,$t,!1);const{activeElement:C}=document;await x,await gt(),await gt();let N=null;if(se){const E=n?n.scroll:a?V():null;E?scrollTo(E.x,E.y):(N=e.hash&&document.getElementById(je(e)))?N.scrollIntoView():scrollTo(0,0)}const ht=document.activeElement!==C&&document.activeElement!==document.body;!r&&!ht&&Ln(e,!N),se=!0,m.props.page&&(W&&Object.assign(m.props.page,W),Object.assign(S,m.props.page)),et=!1,t==="popstate"&&Ae(L),d.fulfil(void 0),d.navigation.to&&(d.navigation.to.scroll=V()),J.forEach(E=>E(d.navigation)),$.navigating.set(Q.current=null)}async function $e(t,e,n,r,a){return t.origin===Et&&t.pathname===location.pathname&&!Se?await Jt({status:r,error:n,url:t,route:e}):await tt(t,a)}function kn(){let t,e={element:void 0,href:void 0},n;O.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(t),t=setTimeout(()=>{s(l,D.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],D.tap)}O.addEventListener("mousedown",r),O.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(It(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function s(o,l){const c=ye(o,O),p=c===e.element&&(c==null?void 0:c.href)===e.href&&l>=n;if(!c||p)return;const{url:h,external:_,download:g}=Ot(c,U,k.hash);if(_||g)return;const d=mt(c),f=h&&Rt(w.url)===Rt(h);if(!(d.reload||f))if(l<=d.preload_data){e={element:c,href:c.href},n=D.tap;const u=await xt(h,!1);if(!u)return;gn(u)}else l<=d.preload_code&&(e={element:c,href:c.href},n=l,It(h))}function i(){a.disconnect();for(const o of O.querySelectorAll("a")){const{url:l,external:c,download:p}=Ot(o,U,k.hash);if(c||p)continue;const h=mt(o);h.reload||(h.preload_code===D.viewport&&a.observe(o),h.preload_code===D.eager&&It(l))}}J.add(i),i()}function nt(t,e){if(t instanceof qt)return t.body;const n=Gt(t),r=sn(t);return k.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function qn(t,e={}){return t=new URL(Ft(t)),t.origin!==Et?Promise.reject(new Error("goto: invalid URL")):Pe(t,e,0)}function Rn(t){if(typeof t=="function")wt.push(t);else{const{href:e}=new URL(t,location.href);wt.push(n=>n.href===e)}}function En(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(ce(),!et){const a=Xt(w,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};Ee.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ce()}),(e=navigator.connection)!=null&&e.saveData||kn(),O.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=ye(n.composedPath()[0],O);if(!r)return;const{url:a,external:s,target:i,download:o}=Ot(r,U,k.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const l=mt(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[p,h]=(k.hash?a.hash.replace(/^#/,""):a.href).split("#"),_=p===At(location);if(s||l.reload&&(!_||!h)){Ce({url:a,type:"link",event:n})?et=!0:n.preventDefault();return}if(h!==void 0&&_){const[,g]=w.url.href.split("#");if(g===h){if(n.preventDefault(),h===""||h==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const d=r.ownerDocument.getElementById(decodeURIComponent(h));d&&(d.scrollIntoView(),d.focus())}return}if(Y=!0,Ht(R),t(a),!l.replace_state)return;Y=!1}n.preventDefault(),await new Promise(g=>{requestAnimationFrame(()=>{setTimeout(g,0)}),setTimeout(g,100)}),await G({type:"link",url:a,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??a.href===location.href,event:n})}),O.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(St(o,U,!1))return;const l=n.target,c=mt(l);if(c.reload)return;n.preventDefault(),n.stopPropagation();const p=new FormData(l,a);o.search=new URLSearchParams(p).toString(),G({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:n})}),addEventListener("popstate",async n=>{var r;if(!Nt){if((r=n.state)!=null&&r[F]){const a=n.state[F];if(q={},a===R)return;const s=j[a],i=n.state[we]??{},o=new URL(n.state[nn]??location.href),l=n.state[X],c=w.url?At(location)===At(w.url):!1;if(l===L&&(xe||c)){i!==S.state&&(S.state=i),t(o),j[R]=V(),s&&scrollTo(s.x,s.y),R=a;return}const h=a-R;await G({type:"popstate",url:o,popped:{state:i,scroll:s,delta:h},accept:()=>{R=a,L=l},block:()=>{history.go(-h)},nav_token:q,event:n})}else if(!Y){const a=new URL(location.href);t(a),k.hash&&location.reload()}}}),addEventListener("hashchange",()=>{Y&&(Y=!1,history.replaceState({...history.state,[F]:++R,[X]:L},"",location.href))});for(const n of document.querySelectorAll("link"))un.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(Q.current=null)});function t(n){w.url=S.url=n,$.page.set(Qt(S)),$.page.notify()}}async function Sn(t,{status:e=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:l}){Se=!0;const c=new URL(location.href);let p;({params:a={},route:s={id:null}}=await xt(c,!1)||{}),p=Mt.find(({id:g})=>g===s.id);let h,_=!0;try{const g=r.map(async(f,u)=>{const m=o[u];return m!=null&&m.uses&&(m.uses=xn(m.uses)),Yt({loader:k.nodes[f],url:c,params:a,route:s,parent:async()=>{const y={};for(let x=0;x<u;x+=1)Object.assign(y,(await g[x]).data);return y},server_data_node:zt(m)})}),d=await Promise.all(g);if(p){const f=p.layouts;for(let u=0;u<f.length;u++)f[u]||d.splice(u,0,void 0)}h=await kt({url:c,params:a,branch:d,status:e,error:n,errors:p==null?void 0:p.errors,form:l,route:p??null})}catch(g){if(g instanceof Bt){await tt(new URL(g.location,location.href));return}h=await Jt({status:Gt(g),error:await nt(g,{url:c,params:a,route:s}),url:c,route:s}),t.textContent="",_=!1}h.props.page&&(h.props.page.state={}),await Te(h,t,_)}function xn(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let Nt=!1;function Ln(t,e=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=je(t);if(r&&document.getElementById(r)){const{x:s,y:i}=V();setTimeout(()=>{const o=history.state;Nt=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",t),e&&scrollTo(s,i),Nt=!1})}else{const s=document.body,i=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),i!==null?s.setAttribute("tabindex",i):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let i=0;i<a.rangeCount;i+=1)s.push(a.getRangeAt(i));setTimeout(()=>{if(a.rangeCount===s.length){for(let i=0;i<a.rangeCount;i+=1){const o=s[i],l=a.getRangeAt(i);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Xt(t,e,n,r,a=null){var c,p;let s,i;const o=new Promise((h,_)=>{s=h,i=_});return o.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url,scroll:V()},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((p=e==null?void 0:e.route)==null?void 0:p.id)??null},url:n,scroll:a},willUnload:!e,type:r,complete:o},fulfil:s,reject:i}}function Qt(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function Un(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function je(t){let e;if(k.hash){const[,,n]=t.hash.split("#",3);e=n??""}else e=t.hash.slice(1);return decodeURIComponent(e)}export{Dn as a,qn as g,Cn as l,S as p,$ as s};