cognova 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{BjFs8Ujb.js → -2AbaFNH.js} +1 -1
- package/.output/public/_nuxt/{B5OWqWCh.js → 0dqQoCHY.js} +1 -1
- package/.output/public/_nuxt/{DZ_azKLI.js → 2QHXgMyi.js} +1 -1
- package/.output/public/_nuxt/{DaiWSWdm.js → 36ZHqDPo.js} +1 -1
- package/.output/public/_nuxt/4XnyUc7C.js +1 -0
- package/.output/public/_nuxt/{DgKeJf5C.js → 6QDVg5TO.js} +1 -1
- package/.output/public/_nuxt/{RRoc4m9d.js → B-AlyT2D.js} +1 -1
- package/.output/public/_nuxt/{1Hz98MKF.js → B0xuHXvN.js} +1 -1
- package/.output/public/_nuxt/{BW-E-Sar.js → B2Xfh7am.js} +1 -1
- package/.output/public/_nuxt/{Bb1B0ntt.js → B5SnZL2l.js} +1 -1
- package/.output/public/_nuxt/{CEfkp9Rl.js → B6-U3KqJ.js} +2 -2
- package/.output/public/_nuxt/{Cebw7Q7c.js → B6G3NLfW.js} +1 -1
- package/.output/public/_nuxt/B8TQvzYX.js +1 -0
- package/.output/public/_nuxt/{D3V98LVR.js → B9zgEO8N.js} +1 -1
- package/.output/public/_nuxt/{CNwGp6eP.js → BBDxhFYY.js} +1 -1
- package/.output/public/_nuxt/{Dkzqkzki.js → BCCYopTB.js} +1 -1
- package/.output/public/_nuxt/{CfWDee_q.js → BE1CVWts.js} +1 -1
- package/.output/public/_nuxt/{BTk5mgdf.js → BF3tVKtX.js} +1 -1
- package/.output/public/_nuxt/{HCCuOAgZ.js → BHn8tRjg.js} +1 -1
- package/.output/public/_nuxt/BIo-9u_O.js +1 -0
- package/.output/public/_nuxt/{CG0fS-BQ.js → BJUff9Ku.js} +1 -1
- package/.output/public/_nuxt/{CrjKigv8.js → BLm0UviR.js} +1 -1
- package/.output/public/_nuxt/BLwctszt.js +1 -0
- package/.output/public/_nuxt/BMs0mHEp.js +1 -0
- package/.output/public/_nuxt/{DV0JMebZ.js → BSA-U0so.js} +1 -1
- package/.output/public/_nuxt/{D-wVwRIx.js → BUC36BHp.js} +1 -1
- package/.output/public/_nuxt/{CzqLfT8k.js → BVEFmI4I.js} +1 -1
- package/.output/public/_nuxt/{B43p0So7.js → BXtZVbmx.js} +1 -1
- package/.output/public/_nuxt/{BJ_GgKV0.js → BYtVdUIW.js} +1 -1
- package/.output/public/_nuxt/{CJ85o8FK.js → BZBNJD7U.js} +1 -1
- package/.output/public/_nuxt/{Dpp5cOwJ.js → BahXyh-A.js} +1 -1
- package/.output/public/_nuxt/{BmTCDcNm.js → BdxP21ep.js} +1 -1
- package/.output/public/_nuxt/{Bc0NIKN7.js → BefOhWHD.js} +1 -1
- package/.output/public/_nuxt/{DuOsLoVR.js → BhYoxmLV.js} +1 -1
- package/.output/public/_nuxt/{BMLwzSDu.js → Bhhg7oSf.js} +1 -1
- package/.output/public/_nuxt/{deSeNTOh.js → BjnQ1pI1.js} +1 -1
- package/.output/public/_nuxt/{qW7F87d8.js → BkO884Ds.js} +3 -3
- package/.output/public/_nuxt/{BNlugvM3.js → Bkc1Hpcf.js} +1 -1
- package/.output/public/_nuxt/{DgPiIWA2.js → BlsIfvSf.js} +1 -1
- package/.output/public/_nuxt/{Dysa6np_.js → BmaHzvZM.js} +1 -1
- package/.output/public/_nuxt/{CBrXB4hk.js → BmdlymIW.js} +1 -1
- package/.output/public/_nuxt/{CK5Ef4YR.js → BnJ-6YDw.js} +1 -1
- package/.output/public/_nuxt/{C5nfaH9w.js → BqTdsCnW.js} +1 -1
- package/.output/public/_nuxt/{CjRmY2OQ.js → BrOKokPO.js} +1 -1
- package/.output/public/_nuxt/{B7-0ADn3.js → Buf1PAiO.js} +1 -1
- package/.output/public/_nuxt/{CqiOV9n1.js → BvstjGHC.js} +1 -1
- package/.output/public/_nuxt/{DsKy-gee.js → BwC62XRN.js} +1 -1
- package/.output/public/_nuxt/{WWNeb45u.js → Bwn-CRYH.js} +1 -1
- package/.output/public/_nuxt/{BsXPllgv.js → BwyXWqBY.js} +1 -1
- package/.output/public/_nuxt/{C6Kc4XvS.js → BxShcW0K.js} +1 -1
- package/.output/public/_nuxt/{NBE83ZQn.js → C-HCArYP.js} +1 -1
- package/.output/public/_nuxt/{sdvIKLwS.js → C-Ygk9x5.js} +1 -1
- package/.output/public/_nuxt/{Dx2Tgm6S.js → C075hYlX.js} +1 -1
- package/.output/public/_nuxt/{C14DGwaT.js → C13FKhqK.js} +1 -1
- package/.output/public/_nuxt/{BLszW9T3.js → C1tCdK-M.js} +1 -1
- package/.output/public/_nuxt/{BdCB2PoJ.js → C21BjagS.js} +1 -1
- package/.output/public/_nuxt/{B_28CKij.js → C24so3m7.js} +2 -2
- package/.output/public/_nuxt/{Drr-RSSP.js → C3tximD1.js} +1 -1
- package/.output/public/_nuxt/{XzRnkkwG.js → C6FFW_cO.js} +1 -1
- package/.output/public/_nuxt/{Cedv1M65.js → C6sX7TYf.js} +1 -1
- package/.output/public/_nuxt/{CnW8zyuA.js → C7qhmmZh.js} +1 -1
- package/.output/public/_nuxt/{CSQ-nblB.js → CAfyXyeo.js} +1 -1
- package/.output/public/_nuxt/{DxR8g9So.js → CClsKJ9A.js} +1 -1
- package/.output/public/_nuxt/{Ci-MVdCd.js → CDkyQ1eQ.js} +1 -1
- package/.output/public/_nuxt/CE9_ECxx.js +1 -0
- package/.output/public/_nuxt/{JJIcQEna.js → CEDw8osP.js} +1 -1
- package/.output/public/_nuxt/{CwJR22-0.js → CEz288t8.js} +1 -1
- package/.output/public/_nuxt/{BvuV9uCn.js → CF33v_m5.js} +1 -1
- package/.output/public/_nuxt/{DytaiikM.js → CH_jROT9.js} +1 -1
- package/.output/public/_nuxt/{NlScC3GW.js → CO3hceDE.js} +1 -1
- package/.output/public/_nuxt/{ByfSJZV6.js → CQ3tAemj.js} +1 -1
- package/.output/public/_nuxt/{DMsHLHmB.js → CSHcfejh.js} +1 -1
- package/.output/public/_nuxt/{DAs574wU.js → CSjOaBKu.js} +1 -1
- package/.output/public/_nuxt/{DNpsjOxN.js → CVYcsqmL.js} +1 -1
- package/.output/public/_nuxt/{DfpSaqgV.js → CXTrUfQ5.js} +1 -1
- package/.output/public/_nuxt/{0LyRrTRM.js → CY7f553E.js} +1 -1
- package/.output/public/_nuxt/{A5lrd5_j.js → CYQP4zpi.js} +1 -1
- package/.output/public/_nuxt/CbvNJVrk.js +1 -0
- package/.output/public/_nuxt/CewcVxDS.js +1 -0
- package/.output/public/_nuxt/{1IuG3yiQ.js → CfY_bsV0.js} +1 -1
- package/.output/public/_nuxt/{4bC1z31I.js → ClGn48iq.js} +1 -1
- package/.output/public/_nuxt/{CwaMSU1O.js → CqFcWBkW.js} +1 -1
- package/.output/public/_nuxt/Cr0NfhPB.js +1 -0
- package/.output/public/_nuxt/{CXuKrnTA.js → CrmE-JGu.js} +1 -1
- package/.output/public/_nuxt/{CW8xtqwN.js → Cve4psva.js} +1 -1
- package/.output/public/_nuxt/{BsPj3ifk.js → CzAZpALW.js} +1 -1
- package/.output/public/_nuxt/{S4a_N6rD.js → D-5A6cMB.js} +1 -1
- package/.output/public/_nuxt/{HC3657Xq.js → D-Ge96eV.js} +1 -1
- package/.output/public/_nuxt/{fTEmwfo4.js → D04CyXmf.js} +1 -1
- package/.output/public/_nuxt/{B9Kd_0HK.js → D2kQkOaG.js} +1 -1
- package/.output/public/_nuxt/{jeu3Xx8e.js → D4Cizi4y.js} +1 -1
- package/.output/public/_nuxt/{B-5roYpk.js → D4X6ONPF.js} +1 -1
- package/.output/public/_nuxt/{_16_b82K.js → D4_89MZm.js} +1 -1
- package/.output/public/_nuxt/{Db5XIfWS.js → D79lbuWG.js} +1 -1
- package/.output/public/_nuxt/{DAFasgHH.js → D7pKT3IW.js} +1 -1
- package/.output/public/_nuxt/{DZdh7_lh.js → D887s9k9.js} +1 -1
- package/.output/public/_nuxt/{DImdNj-F.js → D9aYkNhQ.js} +1 -1
- package/.output/public/_nuxt/{BoPAYize.js → DJt7Rogf.js} +1 -1
- package/.output/public/_nuxt/{BZFXnEwe.js → DKKY8zWm.js} +1 -1
- package/.output/public/_nuxt/{BJi2ZHtT.js → DLUvsixu.js} +1 -1
- package/.output/public/_nuxt/{zBoPDS4z.js → DMb_1D81.js} +1 -1
- package/.output/public/_nuxt/{CzTTKfet.js → DX_9SfFb.js} +1 -1
- package/.output/public/_nuxt/{CpC3C9gj.js → DZEuR9ms.js} +1 -1
- package/.output/public/_nuxt/{DCco_rlV.js → D_O7SlHm.js} +1 -1
- package/.output/public/_nuxt/{DvgLoqaC.js → D_obX2Hj.js} +1 -1
- package/.output/public/_nuxt/{CeDxLTxX.js → DaBSQDif.js} +1 -1
- package/.output/public/_nuxt/{DB3y_21M.js → Dbfwn2zk.js} +1 -1
- package/.output/public/_nuxt/{-2wkydbj.js → DcbbfwCe.js} +1 -1
- package/.output/public/_nuxt/{MdebRWqA.js → DmDPSvxi.js} +1 -1
- package/.output/public/_nuxt/{CVr40yKH.js → DmOS3vFH.js} +1 -1
- package/.output/public/_nuxt/DmcMCO8x.js +1 -0
- package/.output/public/_nuxt/DmlZSBjF.js +1 -0
- package/.output/public/_nuxt/{CB8_A8N4.js → DqzomZoo.js} +1 -1
- package/.output/public/_nuxt/{0J8pJb0Z.js → Drxf7nJz.js} +1 -1
- package/.output/public/_nuxt/{CjYUi9c8.js → Dt5mOzXj.js} +1 -1
- package/.output/public/_nuxt/{Brqrl-cH.js → DtJnWtpL.js} +1 -1
- package/.output/public/_nuxt/{CwCEQ4Dw.js → DtyyytRx.js} +1 -1
- package/.output/public/_nuxt/{CphXSvBo.js → DwIYtFfA.js} +1 -1
- package/.output/public/_nuxt/{CLZS246x.js → GGcn5KPW.js} +1 -1
- package/.output/public/_nuxt/{pkbwpgSD.js → GYf-vnR6.js} +1 -1
- package/.output/public/_nuxt/{Bn8loaeQ.js → ImPsUDiH.js} +1 -1
- package/.output/public/_nuxt/{hqpqUuXS.js → JReYPlwF.js} +1 -1
- package/.output/public/_nuxt/{CgQKyBSS.js → KEeoKtq_.js} +1 -1
- package/.output/public/_nuxt/{Bf34lExB.js → LQNRVThr.js} +1 -1
- package/.output/public/_nuxt/{BhOIdu3Z.js → MWUW1sIF.js} +1 -1
- package/.output/public/_nuxt/{w3t8WD8v.js → Pn7VD6uQ.js} +1 -1
- package/.output/public/_nuxt/{BaJEGr8G.js → SfaNtyKS.js} +1 -1
- package/.output/public/_nuxt/{vM-wdhkZ.js → U3f6dy8i.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/410e449d-9fe8-43a0-ae07-80797693b9b8.json +1 -0
- package/.output/public/_nuxt/{BrICHPil.js → cPPThz84.js} +1 -1
- package/.output/public/_nuxt/{CxJr4mB0.js → dB7G4iIC.js} +1 -1
- package/.output/public/_nuxt/{EgYyfo1g.js → eE8TtXgC.js} +3 -3
- package/.output/public/_nuxt/iBaivqi8.js +1 -0
- package/.output/public/_nuxt/{BLL1JLwq.js → ijmD2cEW.js} +1 -1
- package/.output/public/_nuxt/{DpYns7cT.js → it8syoZI.js} +1 -1
- package/.output/public/_nuxt/mT7Mt2d7.js +1 -0
- package/.output/public/_nuxt/{Bb9LNSu_.js → mfAEx0Kz.js} +1 -1
- package/.output/public/_nuxt/{MzEmU9ER.js → nHSiDk8N.js} +1 -1
- package/.output/public/_nuxt/{CvMqUdkl.js → njnzCNrH.js} +3 -3
- package/.output/public/_nuxt/{atVSHCxP.js → pHCJ6lhw.js} +1 -1
- package/.output/public/_nuxt/{Cow1TrPj.js → vES4kgx7.js} +1 -1
- package/.output/public/_nuxt/{Zjvb5YJR.js → yJ9vRvHj.js} +1 -1
- package/.output/public/_nuxt/{B8Kve-DH.js → zO9MgHj2.js} +1 -1
- package/.output/public/_nuxt/{BaVaTug8.js → zXvvpsZj.js} +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/server.mjs +1 -1
- package/.output/server/chunks/build/{settings-DuT6LGJZ.mjs → settings-ByUXa46k.mjs} +1507 -218
- package/.output/server/chunks/build/settings-ByUXa46k.mjs.map +1 -0
- package/.output/server/chunks/build/styles.mjs +2 -2
- package/.output/server/chunks/nitro/nitro.mjs +872 -872
- package/.output/server/package.json +1 -1
- package/app/pages/settings.vue +441 -5
- package/package.json +1 -1
- package/server/api/skills/import.post.ts +1 -1
- package/server/bridge/adapters/telegram.ts +1 -1
- package/.output/public/_nuxt/B-YQztaH.js +0 -1
- package/.output/public/_nuxt/B1gFtqXK.js +0 -1
- package/.output/public/_nuxt/BTfZ7nek.js +0 -1
- package/.output/public/_nuxt/BbPnqQJ0.js +0 -1
- package/.output/public/_nuxt/BhSWIRpp.js +0 -1
- package/.output/public/_nuxt/By6kmkhJ.js +0 -1
- package/.output/public/_nuxt/C4XVJnNJ.js +0 -1
- package/.output/public/_nuxt/CkvyAKbu.js +0 -1
- package/.output/public/_nuxt/D2f7BlK2.js +0 -1
- package/.output/public/_nuxt/D2lmhTjQ.js +0 -1
- package/.output/public/_nuxt/D64-rCSQ.js +0 -1
- package/.output/public/_nuxt/DGP2JJt8.js +0 -1
- package/.output/public/_nuxt/builds/meta/9863fe43-d78c-4b29-a1e8-e6de61119507.json +0 -1
- package/.output/public/_nuxt/f7zDjk6q.js +0 -1
- package/.output/server/chunks/build/settings-DuT6LGJZ.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{X as Tt,c as M,i as Ot,a as Pt,D as Q,e as H,b as J,g as F,k as E,j as Nt,u as Ct,v as ai,s as D,h as ri,w as hi,n as li,q as At,r as jt,t as Et}from"./CBrXB4hk.js";import{a as Dt,aA as Rt,c as $t,e as Bt,G as Lt,q as Ht,k as Ft,a2 as It,f as I,R as Xt}from"./CvMqUdkl.js";var K=Math.PI,tt=2*K,N=1e-6,_i=tt-N;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function lt(){return new it}it.prototype=lt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,e,n){this._+="Q"+ +t+","+ +i+","+(this._x1=+e)+","+(this._y1=+n)},bezierCurveTo:function(t,i,e,n,s,o){this._+="C"+ +t+","+ +i+","+ +e+","+ +n+","+(this._x1=+s)+","+(this._y1=+o)},arcTo:function(t,i,e,n,s){t=+t,i=+i,e=+e,n=+n,s=+s;var o=this._x1,r=this._y1,a=e-t,h=n-i,u=o-t,_=r-i,l=u*u+_*_;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(l>N)if(!(Math.abs(_*a-h*u)>N)||!s)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var c=e-o,d=n-r,x=a*a+h*h,m=c*c+d*d,f=Math.sqrt(x),y=Math.sqrt(l),v=s*Math.tan((K-Math.acos((x+l-m)/(2*f*y)))/2),p=v/y,b=v/f;Math.abs(p-1)>N&&(this._+="L"+(t+p*u)+","+(i+p*_)),this._+="A"+s+","+s+",0,0,"+ +(_*c>u*d)+","+(this._x1=t+b*a)+","+(this._y1=i+b*h)}},arc:function(t,i,e,n,s,o){t=+t,i=+i,e=+e,o=!!o;var r=e*Math.cos(n),a=e*Math.sin(n),h=t+r,u=i+a,_=1^o,l=o?n-s:s-n;if(e<0)throw new Error("negative radius: "+e);this._x1===null?this._+="M"+h+","+u:(Math.abs(this._x1-h)>N||Math.abs(this._y1-u)>N)&&(this._+="L"+h+","+u),e&&(l<0&&(l=l%tt+tt),l>_i?this._+="A"+e+","+e+",0,1,"+_+","+(t-r)+","+(i-a)+"A"+e+","+e+",0,1,"+_+","+(this._x1=h)+","+(this._y1=u):l>N&&(this._+="A"+e+","+e+",0,"+ +(l>=K)+","+_+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=i+e*Math.sin(s))))},rect:function(t,i,e,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +e+"v"+ +n+"h"+-e+"Z"},toString:function(){return this._}};function k(t){return function(){return t}}var Ji=Math.abs,Ki=Math.atan2,te=Math.cos,ie=Math.max,ee=Math.min,ne=Math.sin,se=Math.sqrt,vt=1e-12,_t=Math.PI,dt=_t/2,oe=2*_t;function ae(t){return t>1?0:t<-1?_t:Math.acos(t)}function re(t){return t>=1?dt:t<=-1?-dt:Math.asin(t)}function Gt(t){this._context=t}Gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function ct(t){return new Gt(t)}function Yt(t){return t[0]}function zt(t){return t[1]}function Vt(){var t=Yt,i=zt,e=k(!0),n=null,s=ct,o=null;function r(a){var h,u=a.length,_,l=!1,c;for(n==null&&(o=s(c=lt())),h=0;h<=u;++h)!(h<u&&e(_=a[h],h,a))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(_,h,a),+i(_,h,a));if(c)return o=null,c+""||null}return r.x=function(a){return arguments.length?(t=typeof a=="function"?a:k(+a),r):t},r.y=function(a){return arguments.length?(i=typeof a=="function"?a:k(+a),r):i},r.defined=function(a){return arguments.length?(e=typeof a=="function"?a:k(!!a),r):e},r.curve=function(a){return arguments.length?(s=a,n!=null&&(o=s(n)),r):s},r.context=function(a){return arguments.length?(a==null?n=o=null:o=s(n=a),r):n},r}function ci(){var t=Yt,i=null,e=k(0),n=zt,s=k(!0),o=null,r=ct,a=null;function h(_){var l,c,d,x=_.length,m,f=!1,y,v=new Array(x),p=new Array(x);for(o==null&&(a=r(y=lt())),l=0;l<=x;++l){if(!(l<x&&s(m=_[l],l,_))===f)if(f=!f)c=l,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=l-1;d>=c;--d)a.point(v[d],p[d]);a.lineEnd(),a.areaEnd()}f&&(v[l]=+t(m,l,_),p[l]=+e(m,l,_),a.point(i?+i(m,l,_):v[l],n?+n(m,l,_):p[l]))}if(y)return a=null,y+""||null}function u(){return Vt().defined(s).curve(r).context(o)}return h.x=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),i=null,h):t},h.x0=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),h):t},h.x1=function(_){return arguments.length?(i=_==null?null:typeof _=="function"?_:k(+_),h):i},h.y=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),n=null,h):e},h.y0=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),h):e},h.y1=function(_){return arguments.length?(n=_==null?null:typeof _=="function"?_:k(+_),h):n},h.lineX0=h.lineY0=function(){return u().x(t).y(e)},h.lineY1=function(){return u().x(t).y(n)},h.lineX1=function(){return u().x(i).y(e)},h.defined=function(_){return arguments.length?(s=typeof _=="function"?_:k(!!_),h):s},h.curve=function(_){return arguments.length?(r=_,o!=null&&(a=r(o)),h):r},h.context=function(_){return arguments.length?(_==null?o=a=null:a=r(o=_),h):o},h}function w(){}function X(t,i,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+e)/6)}function V(t){this._context=t}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:X(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function ui(t){return new V(t)}function qt(t){this._context=t}qt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function fi(t){return new qt(t)}function Zt(t){this._context=t}Zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 3:this._point=4;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function pi(t){return new Zt(t)}function Wt(t,i){this._basis=new V(t),this._beta=i}Wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,e=t.length-1;if(e>0)for(var n=t[0],s=i[0],o=t[e]-n,r=i[e]-s,a=-1,h;++a<=e;)h=a/e,this._basis.point(this._beta*t[a]+(1-this._beta)*(n+h*o),this._beta*i[a]+(1-this._beta)*(s+h*r));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const yi=(function t(i){function e(n){return i===1?new V(n):new Wt(n,i)}return e.beta=function(n){return t(+n)},e})(.85);function G(t,i,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ut(t,i){this._context=t,this._k=(1-i)/6}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:G(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const vi=(function t(i){function e(n){return new ut(n,i)}return e.tension=function(n){return t(+n)},e})(0);function ft(t,i){this._context=t,this._k=(1-i)/6}ft.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const di=(function t(i){function e(n){return new ft(n,i)}return e.tension=function(n){return t(+n)},e})(0);function pt(t,i){this._context=t,this._k=(1-i)/6}pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const xi=(function t(i){function e(n){return new pt(n,i)}return e.tension=function(n){return t(+n)},e})(0);function yt(t,i,e){var n=t._x1,s=t._y1,o=t._x2,r=t._y2;if(t._l01_a>vt){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,s=(s*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>vt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,_=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-i*t._l12_2a)/_,r=(r*u+t._y1*t._l23_2a-e*t._l12_2a)/_}t._context.bezierCurveTo(n,s,o,r,t._x2,t._y2)}function Qt(t,i){this._context=t,this._alpha=i}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const gi=(function t(i){function e(n){return i?new Qt(n,i):new ut(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Ut(t,i){this._context=t,this._alpha=i}Ut.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const bi=(function t(i){function e(n){return i?new Ut(n,i):new ft(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Jt(t,i){this._context=t,this._alpha=i}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const mi=(function t(i){function e(n){return i?new Jt(n,i):new pt(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Kt(t){this._context=t}Kt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function ki(t){return new Kt(t)}function xt(t){return t<0?-1:1}function gt(t,i,e){var n=t._x1-t._x0,s=i-t._x1,o=(t._y1-t._y0)/(n||s<0&&-0),r=(e-t._y1)/(s||n<0&&-0),a=(o*s+r*n)/(n+s);return(xt(o)+xt(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(a))||0}function bt(t,i){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-i)/2:i}function U(t,i,e){var n=t._x0,s=t._y0,o=t._x1,r=t._y1,a=(o-n)/3;t._context.bezierCurveTo(n+a,s+a*i,o-a,r-a*e,o,r)}function Y(t){this._context=t}Y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:U(this,this._t0,bt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var e=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,U(this,bt(this,e=gt(this,t,i)),e);break;default:U(this,this._t0,e=gt(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=e}}};function ti(t){this._context=new ii(t)}(ti.prototype=Object.create(Y.prototype)).point=function(t,i){Y.prototype.point.call(this,i,t)};function ii(t){this._context=t}ii.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,e,n,s,o){this._context.bezierCurveTo(i,t,n,e,o,s)}};function Si(t){return new Y(t)}function wi(t){return new ti(t)}function ei(t){this._context=t}ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),e===2)this._context.lineTo(t[1],i[1]);else for(var n=mt(t),s=mt(i),o=0,r=1;r<e;++o,++r)this._context.bezierCurveTo(n[0][o],s[0][o],n[1][o],s[1][o],t[r],i[r]);(this._line||this._line!==0&&e===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function mt(t){var i,e=t.length-1,n,s=new Array(e),o=new Array(e),r=new Array(e);for(s[0]=0,o[0]=2,r[0]=t[0]+2*t[1],i=1;i<e-1;++i)s[i]=1,o[i]=4,r[i]=4*t[i]+2*t[i+1];for(s[e-1]=2,o[e-1]=7,r[e-1]=8*t[e-1]+t[e],i=1;i<e;++i)n=s[i]/o[i-1],o[i]-=n,r[i]-=n*r[i-1];for(s[e-1]=r[e-1]/o[e-1],i=e-2;i>=0;--i)s[i]=(r[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i<e-1;++i)o[i]=2*t[i+1]-s[i+1];return[s,o]}function Mi(t){return new ei(t)}function q(t,i){this._context=t,this._t=i}q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,i)}break}}this._x=t,this._y=i}};function Ti(t){return new q(t,.5)}function Oi(t){return new q(t,0)}function Pi(t){return new q(t,1)}function kt(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),e.push.apply(e,n)}return e}function Ni(t){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?kt(Object(e),!0).forEach(function(n){Ci(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kt(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function R(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(i){return typeof i}:R=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},R(t)}function Ci(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function z(){return z=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},z.apply(this,arguments)}function Ai(t,i){if(t){if(typeof t=="string")return St(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return St(t,i)}}function St(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}function ni(t,i){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Ai(t))||i){e&&(t=e);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1
|
+
import{X as Tt,c as M,i as Ot,a as Pt,D as Q,e as H,b as J,g as F,k as E,j as Nt,u as Ct,v as ai,s as D,h as ri,w as hi,n as li,q as At,r as jt,t as Et}from"./BmdlymIW.js";import{a as Dt,aA as Rt,c as $t,e as Bt,G as Lt,q as Ht,k as Ft,a2 as It,f as I,R as Xt}from"./njnzCNrH.js";var K=Math.PI,tt=2*K,N=1e-6,_i=tt-N;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function lt(){return new it}it.prototype=lt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,e,n){this._+="Q"+ +t+","+ +i+","+(this._x1=+e)+","+(this._y1=+n)},bezierCurveTo:function(t,i,e,n,s,o){this._+="C"+ +t+","+ +i+","+ +e+","+ +n+","+(this._x1=+s)+","+(this._y1=+o)},arcTo:function(t,i,e,n,s){t=+t,i=+i,e=+e,n=+n,s=+s;var o=this._x1,r=this._y1,a=e-t,h=n-i,u=o-t,_=r-i,l=u*u+_*_;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(l>N)if(!(Math.abs(_*a-h*u)>N)||!s)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var c=e-o,d=n-r,x=a*a+h*h,m=c*c+d*d,f=Math.sqrt(x),y=Math.sqrt(l),v=s*Math.tan((K-Math.acos((x+l-m)/(2*f*y)))/2),p=v/y,b=v/f;Math.abs(p-1)>N&&(this._+="L"+(t+p*u)+","+(i+p*_)),this._+="A"+s+","+s+",0,0,"+ +(_*c>u*d)+","+(this._x1=t+b*a)+","+(this._y1=i+b*h)}},arc:function(t,i,e,n,s,o){t=+t,i=+i,e=+e,o=!!o;var r=e*Math.cos(n),a=e*Math.sin(n),h=t+r,u=i+a,_=1^o,l=o?n-s:s-n;if(e<0)throw new Error("negative radius: "+e);this._x1===null?this._+="M"+h+","+u:(Math.abs(this._x1-h)>N||Math.abs(this._y1-u)>N)&&(this._+="L"+h+","+u),e&&(l<0&&(l=l%tt+tt),l>_i?this._+="A"+e+","+e+",0,1,"+_+","+(t-r)+","+(i-a)+"A"+e+","+e+",0,1,"+_+","+(this._x1=h)+","+(this._y1=u):l>N&&(this._+="A"+e+","+e+",0,"+ +(l>=K)+","+_+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=i+e*Math.sin(s))))},rect:function(t,i,e,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +e+"v"+ +n+"h"+-e+"Z"},toString:function(){return this._}};function k(t){return function(){return t}}var Ji=Math.abs,Ki=Math.atan2,te=Math.cos,ie=Math.max,ee=Math.min,ne=Math.sin,se=Math.sqrt,vt=1e-12,_t=Math.PI,dt=_t/2,oe=2*_t;function ae(t){return t>1?0:t<-1?_t:Math.acos(t)}function re(t){return t>=1?dt:t<=-1?-dt:Math.asin(t)}function Gt(t){this._context=t}Gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i);break}}};function ct(t){return new Gt(t)}function Yt(t){return t[0]}function zt(t){return t[1]}function Vt(){var t=Yt,i=zt,e=k(!0),n=null,s=ct,o=null;function r(a){var h,u=a.length,_,l=!1,c;for(n==null&&(o=s(c=lt())),h=0;h<=u;++h)!(h<u&&e(_=a[h],h,a))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(_,h,a),+i(_,h,a));if(c)return o=null,c+""||null}return r.x=function(a){return arguments.length?(t=typeof a=="function"?a:k(+a),r):t},r.y=function(a){return arguments.length?(i=typeof a=="function"?a:k(+a),r):i},r.defined=function(a){return arguments.length?(e=typeof a=="function"?a:k(!!a),r):e},r.curve=function(a){return arguments.length?(s=a,n!=null&&(o=s(n)),r):s},r.context=function(a){return arguments.length?(a==null?n=o=null:o=s(n=a),r):n},r}function ci(){var t=Yt,i=null,e=k(0),n=zt,s=k(!0),o=null,r=ct,a=null;function h(_){var l,c,d,x=_.length,m,f=!1,y,v=new Array(x),p=new Array(x);for(o==null&&(a=r(y=lt())),l=0;l<=x;++l){if(!(l<x&&s(m=_[l],l,_))===f)if(f=!f)c=l,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=l-1;d>=c;--d)a.point(v[d],p[d]);a.lineEnd(),a.areaEnd()}f&&(v[l]=+t(m,l,_),p[l]=+e(m,l,_),a.point(i?+i(m,l,_):v[l],n?+n(m,l,_):p[l]))}if(y)return a=null,y+""||null}function u(){return Vt().defined(s).curve(r).context(o)}return h.x=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),i=null,h):t},h.x0=function(_){return arguments.length?(t=typeof _=="function"?_:k(+_),h):t},h.x1=function(_){return arguments.length?(i=_==null?null:typeof _=="function"?_:k(+_),h):i},h.y=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),n=null,h):e},h.y0=function(_){return arguments.length?(e=typeof _=="function"?_:k(+_),h):e},h.y1=function(_){return arguments.length?(n=_==null?null:typeof _=="function"?_:k(+_),h):n},h.lineX0=h.lineY0=function(){return u().x(t).y(e)},h.lineY1=function(){return u().x(t).y(n)},h.lineX1=function(){return u().x(i).y(e)},h.defined=function(_){return arguments.length?(s=typeof _=="function"?_:k(!!_),h):s},h.curve=function(_){return arguments.length?(r=_,o!=null&&(a=r(o)),h):r},h.context=function(_){return arguments.length?(_==null?o=a=null:a=r(o=_),h):o},h}function w(){}function X(t,i,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+e)/6)}function V(t){this._context=t}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:X(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function ui(t){return new V(t)}function qt(t){this._context=t}qt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function fi(t){return new qt(t)}function Zt(t){this._context=t}Zt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 3:this._point=4;default:X(this,t,i);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};function pi(t){return new Zt(t)}function Wt(t,i){this._basis=new V(t),this._beta=i}Wt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,e=t.length-1;if(e>0)for(var n=t[0],s=i[0],o=t[e]-n,r=i[e]-s,a=-1,h;++a<=e;)h=a/e,this._basis.point(this._beta*t[a]+(1-this._beta)*(n+h*o),this._beta*i[a]+(1-this._beta)*(s+h*r));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const yi=(function t(i){function e(n){return i===1?new V(n):new Wt(n,i)}return e.beta=function(n){return t(+n)},e})(.85);function G(t,i,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ut(t,i){this._context=t,this._k=(1-i)/6}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:G(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const vi=(function t(i){function e(n){return new ut(n,i)}return e.tension=function(n){return t(+n)},e})(0);function ft(t,i){this._context=t,this._k=(1-i)/6}ft.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const di=(function t(i){function e(n){return new ft(n,i)}return e.tension=function(n){return t(+n)},e})(0);function pt(t,i){this._context=t,this._k=(1-i)/6}pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:G(this,t,i);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const xi=(function t(i){function e(n){return new pt(n,i)}return e.tension=function(n){return t(+n)},e})(0);function yt(t,i,e){var n=t._x1,s=t._y1,o=t._x2,r=t._y2;if(t._l01_a>vt){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,h=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/h,s=(s*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/h}if(t._l23_a>vt){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,_=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-i*t._l12_2a)/_,r=(r*u+t._y1*t._l23_2a-e*t._l12_2a)/_}t._context.bezierCurveTo(n,s,o,r,t._x2,t._y2)}function Qt(t,i){this._context=t,this._alpha=i}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const gi=(function t(i){function e(n){return i?new Qt(n,i):new ut(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Ut(t,i){this._context=t,this._alpha=i}Ut.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const bi=(function t(i){function e(n){return i?new Ut(n,i):new ft(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Jt(t,i){this._context=t,this._alpha=i}Jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var e=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yt(this,t,i);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const mi=(function t(i){function e(n){return i?new Jt(n,i):new pt(n,0)}return e.alpha=function(n){return t(+n)},e})(.5);function Kt(t){this._context=t}Kt.prototype={areaStart:w,areaEnd:w,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}};function ki(t){return new Kt(t)}function xt(t){return t<0?-1:1}function gt(t,i,e){var n=t._x1-t._x0,s=i-t._x1,o=(t._y1-t._y0)/(n||s<0&&-0),r=(e-t._y1)/(s||n<0&&-0),a=(o*s+r*n)/(n+s);return(xt(o)+xt(r))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs(a))||0}function bt(t,i){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-i)/2:i}function U(t,i,e){var n=t._x0,s=t._y0,o=t._x1,r=t._y1,a=(o-n)/3;t._context.bezierCurveTo(n+a,s+a*i,o-a,r-a*e,o,r)}function Y(t){this._context=t}Y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:U(this,this._t0,bt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var e=NaN;if(t=+t,i=+i,!(t===this._x1&&i===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,U(this,bt(this,e=gt(this,t,i)),e);break;default:U(this,this._t0,e=gt(this,t,i));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=e}}};function ti(t){this._context=new ii(t)}(ti.prototype=Object.create(Y.prototype)).point=function(t,i){Y.prototype.point.call(this,i,t)};function ii(t){this._context=t}ii.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,e,n,s,o){this._context.bezierCurveTo(i,t,n,e,o,s)}};function Si(t){return new Y(t)}function wi(t){return new ti(t)}function ei(t){this._context=t}ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),e===2)this._context.lineTo(t[1],i[1]);else for(var n=mt(t),s=mt(i),o=0,r=1;r<e;++o,++r)this._context.bezierCurveTo(n[0][o],s[0][o],n[1][o],s[1][o],t[r],i[r]);(this._line||this._line!==0&&e===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}};function mt(t){var i,e=t.length-1,n,s=new Array(e),o=new Array(e),r=new Array(e);for(s[0]=0,o[0]=2,r[0]=t[0]+2*t[1],i=1;i<e-1;++i)s[i]=1,o[i]=4,r[i]=4*t[i]+2*t[i+1];for(s[e-1]=2,o[e-1]=7,r[e-1]=8*t[e-1]+t[e],i=1;i<e;++i)n=s[i]/o[i-1],o[i]-=n,r[i]-=n*r[i-1];for(s[e-1]=r[e-1]/o[e-1],i=e-2;i>=0;--i)s[i]=(r[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i<e-1;++i)o[i]=2*t[i+1]-s[i+1];return[s,o]}function Mi(t){return new ei(t)}function q(t,i){this._context=t,this._t=i}q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,i)}break}}this._x=t,this._y=i}};function Ti(t){return new q(t,.5)}function Oi(t){return new q(t,0)}function Pi(t){return new q(t,1)}function kt(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),e.push.apply(e,n)}return e}function Ni(t){for(var i=1;i<arguments.length;i++){var e=arguments[i]!=null?arguments[i]:{};i%2?kt(Object(e),!0).forEach(function(n){Ci(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kt(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}return t}function R(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(i){return typeof i}:R=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},R(t)}function Ci(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function z(){return z=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},z.apply(this,arguments)}function Ai(t,i){if(t){if(typeof t=="string")return St(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return St(t,i)}}function St(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}function ni(t,i){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Ai(t))||i){e&&(t=e);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(h){throw h},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,r=!1,a;return{s:function(){e=e.call(t)},n:function(){var h=e.next();return o=h.done,h},e:function(h){r=!0,a=h},f:function(){try{!o&&e.return!=null&&e.return()}finally{if(r)throw a}}}}function ji(t,i){var e=[],n=[];function s(o,r){if(o.length===1)e.push(o[0]),n.push(o[0]);else{for(var a=Array(o.length-1),h=0;h<a.length;h++)h===0&&e.push(o[0]),h===a.length-1&&n.push(o[h+1]),a[h]=[(1-r)*o[h][0]+r*o[h+1][0],(1-r)*o[h][1]+r*o[h+1][1]];s(a,r)}}return t.length&&s(t,i),{left:e,right:n.reverse()}}function Ei(t){var i={};return t.length===4&&(i.x2=t[2][0],i.y2=t[2][1]),t.length>=3&&(i.x1=t[1][0],i.y1=t[1][1]),i.x=t[t.length-1][0],i.y=t[t.length-1][1],t.length===4?i.type="C":t.length===3?i.type="Q":i.type="L",i}function Di(t,i){i=i||2;for(var e=[],n=t,s=1/i,o=0;o<i-1;o++){var r=s/(1-s*o),a=ji(n,r);e.push(a.left),n=a.right}return e.push(n),e}function Ri(t,i,e){var n=[[t.x,t.y]];return i.x1!=null&&n.push([i.x1,i.y1]),i.x2!=null&&n.push([i.x2,i.y2]),n.push([i.x,i.y]),Di(n,e).map(Ei)}var $i=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,A={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(A).forEach(function(t){A[t.toLowerCase()]=A[t]});function et(t,i){for(var e=Array(t),n=0;n<t;n++)e[n]=i;return e}function Bi(t){return"".concat(t.type).concat(A[t.type].map(function(i){return t[i]}).join(","))}function Li(t,i){var e={x1:"x",y1:"y",x2:"x",y2:"y"},n=["xAxisRotation","largeArcFlag","sweepFlag"];if(t.type!==i.type&&i.type.toUpperCase()!=="M"){var s={};Object.keys(i).forEach(function(o){var r=i[o],a=t[o];a===void 0&&(n.includes(o)?a=r:(a===void 0&&e[o]&&(a=t[e[o]]),a===void 0&&(a=0))),s[o]=a}),s.type=i.type,t=s}return t}function Hi(t,i,e){var n=[];if(i.type==="L"||i.type==="Q"||i.type==="C")n=n.concat(Ri(t,i,e));else{var s=z({},t);s.type==="M"&&(s.type="L"),n=n.concat(et(e-1).map(function(){return s})),n.push(i)}return n}function wt(t,i,e){var n=t.length-1,s=i.length-1,o=n/s,r=et(s).reduce(function(h,u,_){var l=Math.floor(o*_);if(e&&l<t.length-1&&e(t[l],t[l+1])){var c=o*_%1<.5;h[l]&&(c?l>0?l-=1:l<t.length-1&&(l+=1):l<t.length-1?l+=1:l>0&&(l-=1))}return h[l]=(h[l]||0)+1,h},[]),a=r.reduce(function(h,u,_){if(_===t.length-1){var l=et(u,z({},t[t.length-1]));return l[0].type==="M"&&l.forEach(function(c){c.type="L"}),h.concat(l)}return h.concat(Hi(t[_],t[_+1],u))},[]);return a.unshift(t[0]),a}function Mt(t){for(var i=(t||"").match($i)||[],e=[],n,s,o=0;o<i.length;++o)if(n=A[i[o]],n){s={type:i[o]};for(var r=0;r<n.length;++r)s[n[r]]=+i[o+r+1];o+=n.length,e.push(s)}return e}function Fi(t,i,e){var n=t==null?[]:t.slice(),s=i==null?[]:i.slice(),o=R(e)==="object"?e:{excludeSegment:e,snapEndsToInput:!0},r=o.excludeSegment,a=o.snapEndsToInput;if(!n.length&&!s.length)return function(){return[]};var h=(n.length===0||n[n.length-1].type==="Z")&&(s.length===0||s[s.length-1].type==="Z");n.length>0&&n[n.length-1].type==="Z"&&n.pop(),s.length>0&&s[s.length-1].type==="Z"&&s.pop(),n.length?s.length||s.push(n[0]):n.push(s[0]);var u=Math.abs(s.length-n.length);u!==0&&(s.length>n.length?n=wt(n,s,r):s.length<n.length&&(s=wt(s,n,r))),n=n.map(function(l,c){return Li(l,s[c])});var _=n.map(function(l){return Ni({},l)});return h&&(_.push({type:"Z"}),n.push({type:"Z"})),function(c){if(c===1&&a)return i??[];if(c===0)return n;for(var d=0;d<_.length;++d){var x=n[d],m=s[d],f=_[d],y=ni(A[f.type]),v;try{for(y.s();!(v=y.n()).done;){var p=v.value;f[p]=(1-c)*x[p]+c*m[p],(p==="largeArcFlag"||p==="sweepFlag")&&(f[p]=Math.round(f[p]))}}catch(b){y.e(b)}finally{y.f()}}return _}}function si(t,i,e){var n=Mt(t),s=Mt(i),o=R(e)==="object"?e:{excludeSegment:e,snapEndsToInput:!0},r=o.excludeSegment,a=o.snapEndsToInput;if(!n.length&&!s.length)return function(){return""};var h=Fi(n,s,{excludeSegment:r,snapEndsToInput:a});return function(_){if(_===1&&a)return i??"";var l=h(_),c="",d=ni(l),x;try{for(d.s();!(x=d.n()).done;){var m=x.value;c+=Bi(m)}}catch(f){d.e(f)}finally{d.f()}return c}}var g;(function(t){t.Basis="basis",t.BasisClosed="basisClosed",t.BasisOpen="basisOpen",t.Bundle="bundle",t.Cardinal="cardinal",t.CardinalClosed="cardinalClosed",t.CardinalOpen="cardinalOpen",t.CatmullRom="catmullRom",t.CatmullRomClosed="catmullRomClosed",t.CatmullRomOpen="catmullRomOpen",t.Linear="linear",t.LinearClosed="linearClosed",t.MonotoneX="monotoneX",t.MonotoneY="monotoneY",t.Natural="natural",t.Step="step",t.StepAfter="stepAfter",t.StepBefore="stepBefore"})(g||(g={}));const nt={[g.Basis]:ui,[g.BasisClosed]:fi,[g.BasisOpen]:pi,[g.Bundle]:yi,[g.Cardinal]:vi,[g.CardinalClosed]:di,[g.CardinalOpen]:xi,[g.CatmullRom]:gi,[g.CatmullRomClosed]:bi,[g.CatmullRomOpen]:mi,[g.Linear]:ct,[g.LinearClosed]:ki,[g.MonotoneX]:Si,[g.MonotoneY]:wi,[g.Natural]:Mi,[g.Step]:Ti,[g.StepAfter]:Pi,[g.StepBefore]:Oi},Ii=Object.assign(Object.assign({},Tt),{curveType:g.MonotoneX,lineWidth:2,lineDashArray:void 0,fallbackValue:void 0,highlightOnHover:!1,cursor:null,interpolateMissingData:!1}),Xi=Ot`
|
|
3
3
|
:root {
|
|
4
4
|
--vis-line-cursor: default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as o,c,Q as r,R as n,U as u,
|
|
1
|
+
import{N as o,c,Q as r,R as n,U as u,am as s}from"./njnzCNrH.js";import{_ as p}from"./BjnQ1pI1.js";const i={base:"align-text-top"},v={__name:"ProseKbd",props:{value:{type:String,required:!0},class:{type:null,required:!1}},setup(e){const a=e,t=o(),l=c(()=>s({extend:s(i),...t.ui?.prose?.kbd||{}}));return(m,f)=>(n(),r(p,{value:e.value,class:u(l.value({class:a.class}))},null,8,["value","class"]))}};export{v as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Hi,e as Fi,q as Vi,b5 as hs,F as ji,k as Pa,N as La,aA as Jd,c as he,O as za,P as $a,aT as We,al as xr,b7 as Kn,Q as st,R as ve,S as jt,T as ur,C as ze,a3 as ii,U as kn,G as dr,ai as hr,aj as Jo,ab as Gd,a9 as Ba,a4 as _a,V as nt,W as Jn,bR as Qd,b9 as Xd,s as Yd,y as Zd,c7 as eh,b4 as th,h as nh,c8 as rh,f as sh,K as ih}from"./CvMqUdkl.js";import{S as oh}from"./w3t8WD8v.js";import{f as Ha,s as Fa,o as Va,d as ja,e as qa,g as Ua,h as Wa,i as Ka,j as Ja}from"./DImdNj-F.js";import{_ as lh}from"./zBoPDS4z.js";import{_ as Go}from"./CW8xtqwN.js";import{k as ah,b as ch}from"./Vcq4gwWv.js";function ie(n){this.content=n}ie.prototype={constructor:ie,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new ie(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ie(t)},addToStart:function(n,e){return new ie([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ie(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new ie(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ie.from(n),n.size?new ie(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ie.from(n),n.size?new ie(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ie.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ie.from=function(n){if(n instanceof ie)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ie(e)};function Ga(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Ga(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Qa(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Qa(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class w{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new w(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new w(r,s)}cutByIndex(e,t){return e==t?w.empty:e==0&&t==this.content.length?this:new w(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new w(s,i)}addToStart(e){return new w([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new w(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Ga(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Qa(this,e,t,r)}findIndex(e){if(e==0)return Gn(0,e);if(e==this.size)return Gn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Gn(t+1,i):Gn(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return w.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new w(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return w.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new w(t||e,r)}static from(e){if(!e)return w.empty;if(e instanceof w)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new w([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}w.empty=new w([],0);const Is={index:0,offset:0};function Gn(n,e){return Is.index=n,Is.offset=e,Is}function wr(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!wr(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!wr(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _=class oi{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&wr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return oi.none;if(e instanceof oi)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};_.none=[];class vr extends Error{}class M{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ya(this.content,e+this.openStart,t);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,t){return new M(Xa(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return M.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(w.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new M(e,r,s)}}M.empty=new M(w.empty,0,0);function Xa(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Xa(i.content,e-s-1,t-s-1)))}function Ya(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Ya(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function uh(n,e,t){if(t.openStart>n.depth)throw new vr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new vr("Inconsistent open depths");return Za(n,e,t,0)}function Za(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Za(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Mt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=dh(t,n);return Mt(i,tc(n,o,l,e,r))}else return Mt(i,Sr(n,e,r))}function ec(n,e){if(!e.type.compatibleContent(n.type))throw new vr("Cannot join "+e.type.name+" onto "+n.type.name)}function li(n,e,t){let r=n.node(t);return ec(r,e.node(t)),r}function Tt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function bn(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(Tt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)Tt(s.child(l),r);e&&e.depth==t&&e.textOffset&&Tt(e.nodeBefore,r)}function Mt(n,e){return n.type.checkContent(e),n.copy(e)}function tc(n,e,t,r,s){let i=n.depth>s&&li(n,e,s+1),o=r.depth>s&&li(t,r,s+1),l=[];return bn(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(ec(i,o),Tt(Mt(i,tc(n,e,t,r,s+1)),l)):(i&&Tt(Mt(i,Sr(n,e,s+1)),l),bn(e,t,s,l),o&&Tt(Mt(o,Sr(t,r,s+1)),l)),bn(r,null,s,l),new w(l)}function Sr(n,e,t){let r=[];if(bn(null,n,t,r),n.depth>t){let s=li(n,e,t+1);Tt(Mt(s,Sr(n,e,t+1)),r)}return bn(e,null,t,r),new w(r)}function dh(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(w.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class Nn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Cr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new Nn(t,r,i)}static resolveCached(e,t){let r=Qo.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Qo.set(e,r=new hh);let s=r.elts[r.i]=Nn.resolve(e,t);return r.i=(r.i+1)%fh,s}}class hh{constructor(){this.elts=[],this.i=0}}const fh=12,Qo=new WeakMap;class Cr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const ph=Object.create(null);class Me{constructor(e,t,r,s=_.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||w.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&wr(this.attrs,t||e.defaultAttrs||ph)&&_.sameSet(this.marks,r||_.none)}copy(e=null){return e==this.content?this:new Me(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Me(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return M.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new M(c,s.depth-o,i.depth-o)}replace(e,t,r){return uh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return Nn.resolveCached(this,e)}resolveNoCache(e){return Nn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),nc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=w.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=w.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Me.prototype.text=void 0;class Tr extends Me{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):nc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Tr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Tr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function nc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Nt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new mh(e,t);if(r.next==null)return Nt.empty;let s=rc(r);r.next&&r.err("Unexpected trailing text");let i=vh(wh(s));return Sh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return w.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let h=i(d,l.concat(u));if(h)return h}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
1
|
+
import{a as Hi,e as Fi,q as Vi,b5 as hs,F as ji,k as Pa,N as La,aA as Jd,c as he,O as za,P as $a,aT as We,am as xr,b7 as Kn,Q as st,R as ve,S as jt,T as ur,C as ze,a3 as ii,U as kn,G as dr,ai as hr,aj as Jo,ab as Gd,a9 as Ba,a4 as _a,V as nt,W as Jn,bR as Qd,b9 as Xd,s as Yd,y as Zd,c7 as eh,b4 as th,h as nh,c8 as rh,f as sh,K as ih}from"./njnzCNrH.js";import{S as oh}from"./Pn7VD6uQ.js";import{f as Ha,s as Fa,o as Va,d as ja,e as qa,g as Ua,h as Wa,i as Ka,j as Ja}from"./D9aYkNhQ.js";import{_ as lh}from"./DMb_1D81.js";import{_ as Go}from"./Cve4psva.js";import{k as ah,b as ch}from"./Vcq4gwWv.js";function ie(n){this.content=n}ie.prototype={constructor:ie,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new ie(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ie(t)},addToStart:function(n,e){return new ie([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ie(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new ie(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ie.from(n),n.size?new ie(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ie.from(n),n.size?new ie(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ie.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ie.from=function(n){if(n instanceof ie)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ie(e)};function Ga(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=Ga(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Qa(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Qa(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class w{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new w(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new w(r,s)}cutByIndex(e,t){return e==t?w.empty:e==0&&t==this.content.length?this:new w(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new w(s,i)}addToStart(e){return new w([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new w(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Ga(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Qa(this,e,t,r)}findIndex(e){if(e==0)return Gn(0,e);if(e==this.size)return Gn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?Gn(t+1,i):Gn(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return w.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new w(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return w.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new w(t||e,r)}static from(e){if(!e)return w.empty;if(e instanceof w)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new w([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}w.empty=new w([],0);const Is={index:0,offset:0};function Gn(n,e){return Is.index=n,Is.offset=e,Is}function wr(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!wr(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!wr(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _=class oi{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&wr(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return oi.none;if(e instanceof oi)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};_.none=[];class vr extends Error{}class M{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Ya(this.content,e+this.openStart,t);return r&&new M(r,this.openStart,this.openEnd)}removeBetween(e,t){return new M(Xa(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return M.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new M(w.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new M(e,r,s)}}M.empty=new M(w.empty,0,0);function Xa(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(Xa(i.content,e-s-1,t-s-1)))}function Ya(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Ya(o.content,e-i-1,t,o);return l&&n.replaceChild(s,o.copy(l))}function uh(n,e,t){if(t.openStart>n.depth)throw new vr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new vr("Inconsistent open depths");return Za(n,e,t,0)}function Za(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Za(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Mt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=dh(t,n);return Mt(i,tc(n,o,l,e,r))}else return Mt(i,Sr(n,e,r))}function ec(n,e){if(!e.type.compatibleContent(n.type))throw new vr("Cannot join "+e.type.name+" onto "+n.type.name)}function li(n,e,t){let r=n.node(t);return ec(r,e.node(t)),r}function Tt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function bn(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(Tt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)Tt(s.child(l),r);e&&e.depth==t&&e.textOffset&&Tt(e.nodeBefore,r)}function Mt(n,e){return n.type.checkContent(e),n.copy(e)}function tc(n,e,t,r,s){let i=n.depth>s&&li(n,e,s+1),o=r.depth>s&&li(t,r,s+1),l=[];return bn(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(ec(i,o),Tt(Mt(i,tc(n,e,t,r,s+1)),l)):(i&&Tt(Mt(i,Sr(n,e,s+1)),l),bn(e,t,s,l),o&&Tt(Mt(o,Sr(t,r,s+1)),l)),bn(r,null,s,l),new w(l)}function Sr(n,e,t){let r=[];if(bn(null,n,t,r),n.depth>t){let s=li(n,e,t+1);Tt(Mt(s,Sr(n,e,t+1)),r)}return bn(e,null,t,r),new w(r)}function dh(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(w.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class Nn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Cr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new Nn(t,r,i)}static resolveCached(e,t){let r=Qo.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else Qo.set(e,r=new hh);let s=r.elts[r.i]=Nn.resolve(e,t);return r.i=(r.i+1)%fh,s}}class hh{constructor(){this.elts=[],this.i=0}}const fh=12,Qo=new WeakMap;class Cr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const ph=Object.create(null);class Me{constructor(e,t,r,s=_.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||w.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&wr(this.attrs,t||e.defaultAttrs||ph)&&_.sameSet(this.marks,r||_.none)}copy(e=null){return e==this.content?this:new Me(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Me(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return M.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new M(c,s.depth-o,i.depth-o)}replace(e,t,r){return uh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return Nn.resolveCached(this,e)}resolveNoCache(e){return Nn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),nc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=w.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!_.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=w.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}}Me.prototype.text=void 0;class Tr extends Me{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):nc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Tr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Tr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function nc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Nt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new mh(e,t);if(r.next==null)return Nt.empty;let s=rc(r);r.next&&r.err("Unexpected trailing text");let i=vh(wh(s));return Sh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return w.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let h=i(d,l.concat(u));if(h)return h}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
2
2
|
`)}}Nt.empty=new Nt(!0);class mh{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function rc(n){let e=[];do e.push(gh(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function gh(n){let e=[];do e.push(yh(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function yh(n){let e=xh(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=kh(n,e);else break;return e}function Xo(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function kh(n,e){let t=Xo(n),r=t;return n.eat(",")&&(n.next!="}"?r=Xo(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function bh(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function xh(n){if(n.eat("(")){let e=rc(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=bh(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function wh(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();s(i(o.expr,a),u),a=u}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),s(i(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function sc(n,e){return e-n}function Yo(n,e){let t=[];return r(e),t.sort(sc);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function vh(n){let e=Object.create(null);return t(Yo(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);Yo(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new Nt(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(sc);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function Sh(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ic(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function oc(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function lc(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let i=n[s];i.validate&&i.validate(e[s])}}function ac(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new Th(n,r,e[r]);return t}let Zo=class cc{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ac(e,r.attrs),this.defaultAttrs=ic(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Nt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:oc(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Me(this,this.computeAttrs(e),w.from(t),_.setFrom(r))}createChecked(e=null,t,r){return t=w.from(t),this.checkContent(t),new Me(this,this.computeAttrs(e),t,_.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=w.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(w.empty,!0);return i?new Me(this,e,t.append(i),_.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){lc(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:_.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new cc(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Ch(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class Th{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Ch(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class fs{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=ac(e,s.attrs),this.excluded=null;let i=ic(this.attrs);this.instance=i?new _(this,i):null}create(e=null){return!e&&this.instance?this.instance:new _(this,oc(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new fs(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){lc(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class uc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=ie.from(e.nodes),t.marks=ie.from(e.marks||{}),this.nodes=Zo.compile(this.spec.nodes,this),this.marks=fs.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=Nt.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?el(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:el(this,o.split(" "))}this.nodeFromJSON=s=>Me.fromJSON(this,s),this.markFromJSON=s=>_.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Zo){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,s)}text(e,t){let r=this.nodes.text;return new Tr(r,r.defaultAttrs,e,_.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function el(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Mh(n){return n.tag!=null}function Eh(n){return n.style!=null}class Ye{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(Mh(s))this.tags.push(s);else if(Eh(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new nl(this,t,!1);return r.addAll(e,_.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new nl(this,t,!0);return r.addAll(e,_.none,t.from,t.to),M.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(Nh(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=rl(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=rl(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ye(e,Ye.schemaRules(e)))}}const dc={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Ah={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},hc={ol:!0,ul:!0},Rn=1,ai=2,xn=4;function tl(n,e,t){return e!=null?(e?Rn:0)|(e==="full"?ai:0):n&&n.whitespace=="pre"?Rn|ai:t&~xn}class Qn{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=_.none,this.match=i||(o&xn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(w.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Rn)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=w.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(w.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!dc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class nl{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=tl(null,t.preserveWhitespace,0)|(r?xn:0);s?i=new Qn(s.type,s.attrs,_.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new Qn(null,null,_.none,!0,null,o):i=new Qn(e.schema.topNodeType,null,_.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,i=s.options&ai?"full":this.localPreserveWS||(s.options&Rn)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),t,!0),l[a]&&this.insertNode(o.text(l[a]),t,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;hc.hasOwnProperty(o)&&this.parser.normalizeLists&&Oh(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Ah.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(dc.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)t=this.enterInner(s[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=_.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):sl(l.type,e.type))&&(o=l.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=tl(e,i,o.options);o.options&xn&&o.content.length==0&&(l|=xn);let a=_.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):sl(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Qn(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Rn)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Oh(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&hc.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Nh(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function rl(n){let e={};for(let t in n)e[t]=n[t];return e}function sl(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class zt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Ds(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=fr(Ds(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&fr(Ds(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return fr(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new zt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=il(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return il(e.marks)}}function il(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Ds(n){return n.document||window.document}const ol=new WeakMap;function Rh(n){let e=ol.get(n);return e===void 0&&ol.set(n,e=Ih(n)),e}function Ih(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function fr(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Rh(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let h=d.indexOf(" ");h>0?a.setAttributeNS(d.slice(0,h),d.slice(h+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:f,contentDOM:p}=fr(n,h,t,r);if(a.appendChild(f),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const fc=65535,pc=Math.pow(2,16);function Dh(n,e){return n+e*pc}function ll(n){return n&fc}function Ph(n){return(n-(n&fc))/pc}const mc=1,gc=2,pr=4,yc=8;class ci{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&yc)>0}get deletedBefore(){return(this.delInfo&(mc|pr))>0}get deletedAfter(){return(this.delInfo&(gc|pr))>0}get deletedAcross(){return(this.delInfo&pr)>0}}class be{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&be.empty)return be.empty}recover(e){let t=0,r=ll(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+Ph(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+o],d=a+c;if(e<=d){let h=c?e==a?-1:e==d?1:t:t,f=a+s+(h<0?0:u);if(r)return f;let p=e==(t<0?a:d)?null:Dh(l/3,e-a),g=e==a?gc:e==d?mc:pr;return(t<0?e!=a:e!=d)&&(g|=yc),new ci(f,g,p)}s+=u-c}return r?e+s:new ci(e+s,0,null)}touches(e,t){let r=0,s=ll(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new be(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?be.empty:new be(e<0?[0,-e,0]:[0,0,e])}}be.empty=new be([]);class In{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new In(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new In;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new ci(e,s,null)}}const Ps=Object.create(null);class ue{getMap(){return be.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ps[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Ps)throw new RangeError("Duplicate use of step JSON ID "+e);return Ps[e]=t,t.prototype.jsonID=e,t}}class Q{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Q(e,null)}static fail(e){return new Q(null,e)}static fromReplace(e,t,r,s){try{return Q.ok(e.replace(t,r,s))}catch(i){if(i instanceof vr)return Q.fail(i.message);throw i}}}function qi(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(qi(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return w.fromArray(r)}class dt extends ue{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new M(qi(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return Q.fromReplace(e,this.from,this.to,i)}invert(){return new Re(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new dt(t.pos,r.pos,this.mark)}merge(e){return e instanceof dt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new dt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new dt(t.from,t.to,e.markFromJSON(t.mark))}}ue.jsonID("addMark",dt);class Re extends ue{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new M(qi(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return Q.fromReplace(e,this.from,this.to,r)}invert(){return new dt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Re(t.pos,r.pos,this.mark)}merge(e){return e instanceof Re&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Re(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Re(t.from,t.to,e.markFromJSON(t.mark))}}ue.jsonID("removeMark",Re);class ht extends ue{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Q.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Q.fromReplace(e,this.pos,this.pos+1,new M(w.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new ht(this.pos,t.marks[s]);return new ht(this.pos,this.mark)}}return new Rt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ht(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ht(t.pos,e.markFromJSON(t.mark))}}ue.jsonID("addNodeMark",ht);class Rt extends ue{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Q.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Q.fromReplace(e,this.pos,this.pos+1,new M(w.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new ht(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Rt(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Rt(t.pos,e.markFromJSON(t.mark))}}ue.jsonID("removeNodeMark",Rt);class te extends ue{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&ui(e,this.from,this.to)?Q.fail("Structure replace would overwrite content"):Q.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new be([this.from,this.to-this.from,this.slice.size])}invert(e){return new te(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new te(t.pos,Math.max(t.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof te)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?M.empty:new M(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new te(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?M.empty:new M(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new te(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new te(t.from,t.to,M.fromJSON(e,t.slice),!!t.structure)}}ue.jsonID("replace",te);class re extends ue{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&(ui(e,this.from,this.gapFrom)||ui(e,this.gapTo,this.to)))return Q.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Q.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?Q.fromReplace(e,this.from,this.to,r):Q.fail("Content does not fit in gap")}getMap(){return new be([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new re(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new re(t.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new re(t.from,t.to,t.gapFrom,t.gapTo,M.fromJSON(e,t.slice),t.insert,!!t.structure)}}ue.jsonID("replaceAround",re);function ui(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function Lh(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,e),f=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(o&&o.to==h&&o.mark.eq(d[g])?o.to=f:s.push(o=new Re(h,f,d[g])));l&&l.to==h?l.to=f:i.push(l=new dt(h,f,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function zh(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof fs){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],h;for(let f=0;f<s.length;f++){let p=s[f];p.step==i-1&&d.eq(s[f].style)&&(h=p)}h?(h.to=c,h.step=i):s.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new Re(o.from,o.to,o.style)))}function Ui(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new te(l,u,M.empty));else{r=d;for(let h=0;h<c.marks.length;h++)t.allowsMarkType(c.marks[h].type)||n.step(new Re(l,u,c.marks[h]));if(s&&c.isText&&t.whitespace!="pre"){let h,f=/\r?\n|\r/g,p;for(;h=f.exec(c.text);)p||(p=new M(w.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new te(l+h.index,l+h.index+h[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(w.empty,!0);n.replace(l,l,new M(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function $h(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function sn(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,i=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-i;if(r<n.depth&&o.canReplace(l,a,t))return r;if(r==0||o.type.spec.isolating||!$h(o,l,a))break;l&&(s=1),a<o.childCount&&(i=1)}return null}function Bh(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,u=w.empty,d=0;for(let p=i,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=w.from(r.node(p).copy(u)),d++):a--;let h=w.empty,f=0;for(let p=i,g=!1;p>t;p--)g||s.after(p+1)<s.end(p)?(g=!0,h=w.from(s.node(p).copy(h)),f++):c++;n.step(new re(a,c,o,l,new M(u.append(h),d,f),u.size-d,!0))}function Wi(n,e,t=null,r=n){let s=_h(n,e),i=s&&Hh(r,e);return i?s.map(al).concat({type:e,attrs:t}).concat(i.map(al)):null}function al(n){return{type:n,attrs:null}}function _h(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function Hh(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function Fh(n,e,t){let r=w.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=w.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new re(s,i,s,i,new M(r,0,0),t.length,!0))}function Vh(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&jh(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let f=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);f&&!p?c=!1:!f&&p&&(c=!0)}c===!1&&bc(n,o,l,i),Ui(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let u=n.mapping.slice(i),d=u.map(l,1),h=u.map(l+o.nodeSize,1);return n.step(new re(d,h,d+1,h-1,new M(w.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&kc(n,o,l,i),!1}})}function kc(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function bc(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c,aR as M,aP as C,a_ as b,aQ as S,e as h,Q as m,R as _,S as p,a4 as y,C as a,a3 as g,c as v,q as
|
|
1
|
+
import{a as c,aR as M,aP as C,a_ as b,aQ as S,e as h,Q as m,R as _,S as p,a4 as y,C as a,a3 as g,c as v,q as k,T as q,aV as B,a9 as V,bf as $,f as w,bB as z,V as L,k as F,bm as P,ak as A}from"./njnzCNrH.js";import{R as D}from"./Bwn-CRYH.js";import{R as H}from"./CClsKJ9A.js";import{u as N}from"./ImPsUDiH.js";import{u as O}from"./BIo-9u_O.js";const[T,K]=M("TabsRoot");var E=c({__name:"TabsRoot",props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:"horizontal"},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:"automatic"},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(u,{emit:o}){const s=u,e=o,{orientation:r,unmountOnHide:n,dir:l}=C(s),t=N(l);b();const i=S(s,"modelValue",e,{defaultValue:s.defaultValue,passive:s.modelValue===void 0}),d=h();return K({modelValue:i,changeModelValue:f=>{i.value=f},orientation:r,dir:t,unmountOnHide:n,activationMode:s.activationMode,baseId:O(void 0,"reka-tabs"),tabsList:d}),(f,J)=>(_(),m(a(g),{dir:a(t),"data-orientation":a(r),"as-child":f.asChild,as:f.as},{default:p(()=>[y(f.$slots,"default",{modelValue:a(i)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),ee=E;function R(u,o){return`${u}-trigger-${o}`}function I(u,o){return`${u}-content-${o}`}var Q=c({__name:"TabsContent",props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(u){const o=u,{forwardRef:s}=b(),e=T(),r=v(()=>R(e.baseId,o.value)),n=v(()=>I(e.baseId,o.value)),l=v(()=>o.value===e.modelValue.value),t=h(l.value);return k(()=>{requestAnimationFrame(()=>{t.value=!1})}),(i,d)=>(_(),m(a($),{present:i.forceMount||l.value,"force-mount":""},{default:p(({present:f})=>[q(a(g),{id:n.value,ref:a(s),"as-child":i.asChild,as:i.as,role:"tabpanel","data-state":l.value?"active":"inactive","data-orientation":a(e).orientation.value,"aria-labelledby":r.value,hidden:!f,tabindex:"0",style:B({animationDuration:t.value?"0s":void 0})},{default:p(()=>[!a(e).unmountOnHide.value||f?y(i.$slots,"default",{key:0}):V("v-if",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),ae=Q,j=c({__name:"TabsIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(u){const o=u,s=T();b();const e=h(),r=h({size:null,position:null});w(()=>[s.modelValue.value,s?.dir.value],async()=>{await F(),n()},{immediate:!0}),z([s.tabsList,e],n);function n(){e.value=s.tabsList.value?.querySelector('[role="tab"][data-state="active"]'),e.value&&(s.orientation.value==="horizontal"?r.value={size:e.value.offsetWidth,position:e.value.offsetLeft}:r.value={size:e.value.offsetHeight,position:e.value.offsetTop})}return(l,t)=>typeof r.value.size=="number"?(_(),m(a(g),L({key:0},o,{style:{"--reka-tabs-indicator-size":`${r.value.size}px`,"--reka-tabs-indicator-position":`${r.value.position}px`}}),{default:p(()=>[y(l.$slots,"default")]),_:3},16,["style"])):V("v-if",!0)}}),te=j,G=c({__name:"TabsList",props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(u){const o=u,{loop:s}=C(o),{forwardRef:e,currentElement:r}=b(),n=T();return n.tabsList=r,(l,t)=>(_(),m(a(D),{"as-child":"",orientation:a(n).orientation.value,dir:a(n).dir.value,loop:a(s)},{default:p(()=>[q(a(g),{ref:a(e),role:"tablist","as-child":l.asChild,as:l.as,"aria-orientation":a(n).orientation.value},{default:p(()=>[y(l.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}}),oe=G,W=c({__name:"TabsTrigger",props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(u){const o=u,{forwardRef:s}=b(),e=T(),r=v(()=>R(e.baseId,o.value)),n=v(()=>I(e.baseId,o.value)),l=v(()=>o.value===e.modelValue.value);return(t,i)=>(_(),m(a(H),{"as-child":"",focusable:!t.disabled,active:l.value},{default:p(()=>[q(a(g),{id:r.value,ref:a(s),role:"tab",type:t.as==="button"?"button":void 0,as:t.as,"as-child":t.asChild,"aria-selected":l.value?"true":"false","aria-controls":n.value,"data-state":l.value?"active":"inactive",disabled:t.disabled,"data-disabled":t.disabled?"":void 0,"data-orientation":a(e).orientation.value,onMousedown:i[0]||(i[0]=A(d=>{!t.disabled&&d.ctrlKey===!1?a(e).changeModelValue(t.value):d.preventDefault()},["left"])),onKeydown:i[1]||(i[1]=P(d=>a(e).changeModelValue(t.value),["enter","space"])),onFocus:i[2]||(i[2]=()=>{const d=a(e).activationMode!=="manual";!l.value&&!t.disabled&&d&&a(e).changeModelValue(t.value)})},{default:p(()=>[y(t.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),se=W;export{te as T,oe as a,ee as b,se as c,ae as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ac as i,c as d,G as t,R as n,a4 as a,C as p}from"./
|
|
1
|
+
import{ac as i,c as d,G as t,R as n,a4 as a,C as p}from"./njnzCNrH.js";const u=["id"],f=["href"],k={__name:"ProseH6",props:{id:{type:String,required:!1}},setup(r){const e=r,{headings:o}=i().public.mdc,c=d(()=>e.id&&(typeof o?.anchorLinks=="boolean"&&o?.anchorLinks===!0||typeof o?.anchorLinks=="object"&&o?.anchorLinks?.h6));return(s,h)=>(n(),t("h6",{id:e.id},[e.id&&p(c)?(n(),t("a",{key:0,href:`#${e.id}`},[a(s.$slots,"default")],8,f)):a(s.$slots,"default",{key:1})],8,u))}};export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as Y,c as R,q as gt,a5 as wt,a as ae,aR as Ke,a4 as ce,a_ as ge,bN as Ze,Q as Je,R as ne,S as we,C as _,a3 as _e,G as de,V as Ee,s as yt,f as Ae,l as vt,aB as xt,bO as ee,bP as bt,bQ as At,y as Ct,T as et,aV as tt}from"./CvMqUdkl.js";function Ot(e){const t=Y(),n=R(()=>t.value?.width??0),o=R(()=>t.value?.height??0);return gt(()=>{const i=wt(e);if(i){t.value={width:i.offsetWidth,height:i.offsetHeight};const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let c,f;if("borderBoxSize"in l){const u=l.borderBoxSize,a=Array.isArray(u)?u[0]:u;c=a.inlineSize,f=a.blockSize}else c=i.offsetWidth,f=i.offsetHeight;t.value={width:c,height:f}});return r.observe(i,{box:"border-box"}),()=>r.unobserve(i)}else t.value=void 0}),{width:n,height:o}}const[nt,Pt]=Ke("PopperRoot");var St=ae({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=Y();return Pt({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>ce(n.$slots,"default")}}),Yn=St,Rt=ae({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n,currentElement:o}=ge(),i=nt();return Ze(()=>{i.onAnchorChange(t.reference??o.value)}),(r,s)=>(ne(),Je(_(_e),{ref:_(n),as:r.as,"as-child":r.asChild},{default:we(()=>[ce(r.$slots,"default")]),_:3},8,["as","as-child"]))}}),jn=Rt;const _t={key:0,d:"M0 0L6 6L12 0"},Et={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var Lt=ae({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return ge(),(n,o)=>(ne(),Je(_(_e),Ee(t,{width:n.width,height:n.height,viewBox:n.asChild?void 0:"0 0 12 6",preserveAspectRatio:n.asChild?void 0:"none"}),{default:we(()=>[ce(n.$slots,"default",{},()=>[n.rounded?(ne(),de("path",Et)):(ne(),de("path",_t))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),Dt=Lt;function Bt(e){return e!==null}function Tt(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[f,u]=Oe(n),a={start:"0%",center:"50%",end:"100%"}[u],h=(i.arrow?.x??0)+l/2,d=(i.arrow?.y??0)+c/2;let p="",m="";return f==="bottom"?(p=s?a:`${h}px`,m=`${-c}px`):f==="top"?(p=s?a:`${h}px`,m=`${o.floating.height+c}px`):f==="right"?(p=`${-c}px`,m=s?a:`${d}px`):f==="left"&&(p=`${o.floating.width+c}px`,m=s?a:`${d}px`),{data:{x:p,y:m}}}}}function Oe(e){const[t,n="center"]=e.split("-");return[t,n]}const ot=["top","right","bottom","left"],qe=["start","end"],We=ot.reduce((e,t)=>e.concat(t,t+"-"+qe[0],t+"-"+qe[1]),[]),V=Math.min,$=Math.max,pe=Math.round,ue=Math.floor,j=e=>({x:e,y:e}),$t={left:"right",right:"left",bottom:"top",top:"bottom"},kt={start:"end",end:"start"};function Pe(e,t,n){return $(e,V(t,n))}function z(e,t){return typeof e=="function"?e(t):e}function W(e){return e.split("-")[0]}function N(e){return e.split("-")[1]}function Le(e){return e==="x"?"y":"x"}function De(e){return e==="y"?"height":"width"}const Ft=new Set(["top","bottom"]);function H(e){return Ft.has(W(e))?"y":"x"}function Be(e){return Le(H(e))}function it(e,t,n){n===void 0&&(n=!1);const o=N(e),i=Be(e),r=De(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=me(s)),[s,me(s)]}function Mt(e){const t=me(e);return[he(e),t,he(t)]}function he(e){return e.replace(/start|end/g,t=>kt[t])}const He=["left","right"],Ne=["right","left"],qt=["top","bottom"],Wt=["bottom","top"];function Ht(e,t,n){switch(e){case"top":case"bottom":return n?t?Ne:He:t?He:Ne;case"left":case"right":return t?qt:Wt;default:return[]}}function Nt(e,t,n,o){const i=N(e);let r=Ht(W(e),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(he)))),r}function me(e){return e.replace(/left|right|bottom|top/g,t=>$t[t])}function Vt(e){return{top:0,right:0,bottom:0,left:0,...e}}function Te(e){return typeof e!="number"?Vt(e):{top:e,right:e,bottom:e,left:e}}function ie(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Ve(e,t,n){let{reference:o,floating:i}=e;const r=H(t),s=Be(t),l=De(s),c=W(t),f=r==="y",u=o.x+o.width/2-i.width/2,a=o.y+o.height/2-i.height/2,h=o[l]/2-i[l]/2;let d;switch(c){case"top":d={x:u,y:o.y-i.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:a};break;case"left":d={x:o.x-i.width,y:a};break;default:d={x:o.x,y:o.y}}switch(N(t)){case"start":d[s]-=h*(n&&f?-1:1);break;case"end":d[s]+=h*(n&&f?-1:1);break}return d}const zt=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:a}=Ve(f,o,c),h=o,d={},p=0;for(let m=0;m<l.length;m++){const{name:g,fn:w}=l[m],{x:y,y:v,data:A,reset:x}=await w({x:u,y:a,initialPlacement:o,placement:h,strategy:i,middlewareData:d,rects:f,platform:s,elements:{reference:e,floating:t}});u=y??u,a=v??a,d={...d,[g]:{...d[g],...A}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(f=x.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:a}=Ve(f,h,c)),m=-1)}return{x:u,y:a,placement:h,strategy:i,middlewareData:d}};async function re(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:s,elements:l,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:a="floating",altBoundary:h=!1,padding:d=0}=z(t,e),p=Te(d),g=l[h?a==="floating"?"reference":"floating":a],w=ie(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:f,rootBoundary:u,strategy:c})),y=a==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,v=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),A=await(r.isElement==null?void 0:r.isElement(v))?await(r.getScale==null?void 0:r.getScale(v))||{x:1,y:1}:{x:1,y:1},x=ie(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:c}):y);return{top:(w.top-x.top+p.top)/A.y,bottom:(x.bottom-w.bottom+p.bottom)/A.y,left:(w.left-x.left+p.left)/A.x,right:(x.right-w.right+p.right)/A.x}}const It=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:s,elements:l,middlewareData:c}=t,{element:f,padding:u=0}=z(e,t)||{};if(f==null)return{};const a=Te(u),h={x:n,y:o},d=Be(i),p=De(d),m=await s.getDimensions(f),g=d==="y",w=g?"top":"left",y=g?"bottom":"right",v=g?"clientHeight":"clientWidth",A=r.reference[p]+r.reference[d]-h[d]-r.floating[p],x=h[d]-r.reference[d],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let b=O?O[v]:0;(!b||!await(s.isElement==null?void 0:s.isElement(O)))&&(b=l.floating[v]||r.floating[p]);const S=A/2-x/2,E=b/2-m[p]/2-1,C=V(a[w],E),L=V(a[y],E),P=C,B=b-m[p]-L,D=b/2-m[p]/2+S,M=Pe(P,D,B),F=!c.arrow&&N(i)!=null&&D!==M&&r.reference[p]/2-(D<P?C:L)-m[p]/2<0,k=F?D<P?D-P:D-B:0;return{[d]:h[d]+k,data:{[d]:M,centerOffset:D-M-k,...F&&{alignmentOffset:k}},reset:F}}});function Xt(e,t,n){return(e?[...n.filter(i=>N(i)===e),...n.filter(i=>N(i)!==e)]:n.filter(i=>W(i)===i)).filter(i=>e?N(i)===e||(t?he(i)!==i:!1):!0)}const Yt=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,i;const{rects:r,middlewareData:s,placement:l,platform:c,elements:f}=t,{crossAxis:u=!1,alignment:a,allowedPlacements:h=We,autoAlignment:d=!0,...p}=z(e,t),m=a!==void 0||h===We?Xt(a||null,d,h):h,g=await re(t,p),w=((n=s.autoPlacement)==null?void 0:n.index)||0,y=m[w];if(y==null)return{};const v=it(y,r,await(c.isRTL==null?void 0:c.isRTL(f.floating)));if(l!==y)return{reset:{placement:m[0]}};const A=[g[W(y)],g[v[0]],g[v[1]]],x=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:y,overflows:A}],O=m[w+1];if(O)return{data:{index:w+1,overflows:x},reset:{placement:O}};const b=x.map(C=>{const L=N(C.placement);return[C.placement,L&&u?C.overflows.slice(0,2).reduce((P,B)=>P+B,0):C.overflows[0],C.overflows]}).sort((C,L)=>C[1]-L[1]),E=((i=b.filter(C=>C[2].slice(0,N(C[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||b[0][0];return E!==l?{data:{index:w+1,overflows:x},reset:{placement:E}}:{}}}},jt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:c,elements:f}=t,{mainAxis:u=!0,crossAxis:a=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=z(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const w=W(i),y=H(l),v=W(l)===l,A=await(c.isRTL==null?void 0:c.isRTL(f.floating)),x=h||(v||!m?[me(l)]:Mt(l)),O=p!=="none";!h&&O&&x.push(...Nt(l,m,p,A));const b=[l,...x],S=await re(t,g),E=[];let C=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&E.push(S[w]),a){const D=it(i,s,A);E.push(S[D[0]],S[D[1]])}if(C=[...C,{placement:i,overflows:E}],!E.every(D=>D<=0)){var L,P;const D=(((L=r.flip)==null?void 0:L.index)||0)+1,M=b[D];if(M&&(!(a==="alignment"?y!==H(M):!1)||C.every(T=>H(T.placement)===y?T.overflows[0]>0:!0)))return{data:{index:D,overflows:C},reset:{placement:M}};let F=(P=C.filter(k=>k.overflows[0]<=0).sort((k,T)=>k.overflows[1]-T.overflows[1])[0])==null?void 0:P.placement;if(!F)switch(d){case"bestFit":{var B;const k=(B=C.filter(T=>{if(O){const G=H(T.placement);return G===y||G==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(G=>G>0).reduce((G,mt)=>G+mt,0)]).sort((T,G)=>T[1]-G[1])[0])==null?void 0:B[0];k&&(F=k);break}case"initialPlacement":F=l;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function ze(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ie(e){return ot.some(t=>e[t]>=0)}const Ut=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=z(e,t);switch(o){case"referenceHidden":{const r=await re(t,{...i,elementContext:"reference"}),s=ze(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ie(s)}}}case"escaped":{const r=await re(t,{...i,altBoundary:!0}),s=ze(r,n.floating);return{data:{escapedOffsets:s,escaped:Ie(s)}}}default:return{}}}}};function rt(e){const t=V(...e.map(r=>r.left)),n=V(...e.map(r=>r.top)),o=$(...e.map(r=>r.right)),i=$(...e.map(r=>r.bottom));return{x:t,y:n,width:o-t,height:i-n}}function Qt(e){const t=e.slice().sort((i,r)=>i.y-r.y),n=[];let o=null;for(let i=0;i<t.length;i++){const r=t[i];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map(i=>ie(rt(i)))}const Gt=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:i,platform:r,strategy:s}=t,{padding:l=2,x:c,y:f}=z(e,t),u=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(o.reference))||[]),a=Qt(u),h=ie(rt(u)),d=Te(l);function p(){if(a.length===2&&a[0].left>a[1].right&&c!=null&&f!=null)return a.find(g=>c>g.left-d.left&&c<g.right+d.right&&f>g.top-d.top&&f<g.bottom+d.bottom)||h;if(a.length>=2){if(H(n)==="y"){const C=a[0],L=a[a.length-1],P=W(n)==="top",B=C.top,D=L.bottom,M=P?C.left:L.left,F=P?C.right:L.right,k=F-M,T=D-B;return{top:B,bottom:D,left:M,right:F,width:k,height:T,x:M,y:B}}const g=W(n)==="left",w=$(...a.map(C=>C.right)),y=V(...a.map(C=>C.left)),v=a.filter(C=>g?C.left===y:C.right===w),A=v[0].top,x=v[v.length-1].bottom,O=y,b=w,S=b-O,E=x-A;return{top:A,bottom:x,left:O,right:b,width:S,height:E,x:O,y:A}}return h}const m=await r.getElementRects({reference:{getBoundingClientRect:p},floating:o.floating,strategy:s});return i.reference.x!==m.reference.x||i.reference.y!==m.reference.y||i.reference.width!==m.reference.width||i.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},st=new Set(["left","top"]);async function Kt(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),l=N(n),c=H(n)==="y",f=st.has(s)?-1:1,u=r&&c?-1:1,a=z(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof a=="number"?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:a.mainAxis||0,crossAxis:a.crossAxis||0,alignmentAxis:a.alignmentAxis};return l&&typeof p=="number"&&(d=l==="end"?p*-1:p),c?{x:d*u,y:h*f}:{x:h*f,y:d*u}}const Zt=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:s,middlewareData:l}=t,c=await Kt(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}},Jt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:g=>{let{x:w,y}=g;return{x:w,y}}},...c}=z(e,t),f={x:n,y:o},u=await re(t,c),a=H(W(i)),h=Le(a);let d=f[h],p=f[a];if(r){const g=h==="y"?"top":"left",w=h==="y"?"bottom":"right",y=d+u[g],v=d-u[w];d=Pe(y,d,v)}if(s){const g=a==="y"?"top":"left",w=a==="y"?"bottom":"right",y=p+u[g],v=p-u[w];p=Pe(y,p,v)}const m=l.fn({...t,[h]:d,[a]:p});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:r,[a]:s}}}}}},en=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:f=!0}=z(e,t),u={x:n,y:o},a=H(i),h=Le(a);let d=u[h],p=u[a];const m=z(l,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const v=h==="y"?"height":"width",A=r.reference[h]-r.floating[v]+g.mainAxis,x=r.reference[h]+r.reference[v]-g.mainAxis;d<A?d=A:d>x&&(d=x)}if(f){var w,y;const v=h==="y"?"width":"height",A=st.has(W(i)),x=r.reference[a]-r.floating[v]+(A&&((w=s.offset)==null?void 0:w[a])||0)+(A?0:g.crossAxis),O=r.reference[a]+r.reference[v]+(A?0:((y=s.offset)==null?void 0:y[a])||0)-(A?g.crossAxis:0);p<x?p=x:p>O&&(p=O)}return{[h]:d,[a]:p}}}},tn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:r,platform:s,elements:l}=t,{apply:c=()=>{},...f}=z(e,t),u=await re(t,f),a=W(i),h=N(i),d=H(i)==="y",{width:p,height:m}=r.floating;let g,w;a==="top"||a==="bottom"?(g=a,w=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(w=a,g=h==="end"?"top":"bottom");const y=m-u.top-u.bottom,v=p-u.left-u.right,A=V(m-u[g],y),x=V(p-u[w],v),O=!t.middlewareData.shift;let b=A,S=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=v),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(b=y),O&&!h){const C=$(u.left,0),L=$(u.right,0),P=$(u.top,0),B=$(u.bottom,0);d?S=p-2*(C!==0||L!==0?C+L:$(u.left,u.right)):b=m-2*(P!==0||B!==0?P+B:$(u.top,u.bottom))}await c({...t,availableWidth:S,availableHeight:b});const E=await s.getDimensions(l.floating);return p!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function ye(){return typeof window<"u"}function J(e){return $e(e)?(e.nodeName||"").toLowerCase():"#document"}function q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Q(e){var t;return(t=($e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $e(e){return ye()?e instanceof Node||e instanceof q(e).Node:!1}function I(e){return ye()?e instanceof Element||e instanceof q(e).Element:!1}function U(e){return ye()?e instanceof HTMLElement||e instanceof q(e).HTMLElement:!1}function Xe(e){return!ye()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}const nn=new Set(["inline","contents"]);function fe(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!nn.has(i)}const on=new Set(["table","td","th"]);function rn(e){return on.has(J(e))}const sn=[":popover-open",":modal"];function ve(e){return sn.some(t=>{try{return e.matches(t)}catch{return!1}})}const ln=["transform","translate","scale","rotate","perspective"],an=["transform","translate","scale","rotate","perspective","filter"],cn=["paint","layout","strict","content"];function ke(e){const t=Fe(),n=I(e)?X(e):e;return ln.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||an.some(o=>(n.willChange||"").includes(o))||cn.some(o=>(n.contain||"").includes(o))}function fn(e){let t=K(e);for(;U(t)&&!se(t);){if(ke(t))return t;if(ve(t))return null;t=K(t)}return null}function Fe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const un=new Set(["html","body","#document"]);function se(e){return un.has(J(e))}function X(e){return q(e).getComputedStyle(e)}function xe(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function K(e){if(J(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xe(e)&&e.host||Q(e);return Xe(t)?t.host:t}function lt(e){const t=K(e);return se(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&fe(t)?t:lt(t)}function le(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=lt(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),s=q(i);if(r){const l=Se(s);return t.concat(s,s.visualViewport||[],fe(i)?i:[],l&&n?le(l):[])}return t.concat(i,le(i,[],n))}function Se(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function at(e){const t=X(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=U(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:o,l=pe(n)!==r||pe(o)!==s;return l&&(n=r,o=s),{width:n,height:o,$:l}}function Me(e){return I(e)?e:e.contextElement}function oe(e){const t=Me(e);if(!U(t))return j(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=at(t);let s=(r?pe(n.width):n.width)/o,l=(r?pe(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const dn=j(0);function ct(e){const t=q(e);return!Fe()||!t.visualViewport?dn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==q(e)?!1:t}function Z(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=Me(e);let s=j(1);t&&(o?I(o)&&(s=oe(o)):s=oe(e));const l=pn(r,n,o)?ct(r):j(0);let c=(i.left+l.x)/s.x,f=(i.top+l.y)/s.y,u=i.width/s.x,a=i.height/s.y;if(r){const h=q(r),d=o&&I(o)?q(o):o;let p=h,m=Se(p);for(;m&&o&&d!==p;){const g=oe(m),w=m.getBoundingClientRect(),y=X(m),v=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,A=w.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;c*=g.x,f*=g.y,u*=g.x,a*=g.y,c+=v,f+=A,p=q(m),m=Se(p)}}return ie({width:u,height:a,x:c,y:f})}function be(e,t){const n=xe(e).scrollLeft;return t?t.left+n:Z(Q(e)).left+n}function ft(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-be(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function hn(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",s=Q(o),l=t?ve(t.floating):!1;if(o===s||l&&r)return n;let c={scrollLeft:0,scrollTop:0},f=j(1);const u=j(0),a=U(o);if((a||!a&&!r)&&((J(o)!=="body"||fe(s))&&(c=xe(o)),U(o))){const d=Z(o);f=oe(o),u.x=d.x+o.clientLeft,u.y=d.y+o.clientTop}const h=s&&!a&&!r?ft(s,c):j(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+u.x+h.x,y:n.y*f.y-c.scrollTop*f.y+u.y+h.y}}function mn(e){return Array.from(e.getClientRects())}function gn(e){const t=Q(e),n=xe(e),o=e.ownerDocument.body,i=$(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=$(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+be(e);const l=-n.scrollTop;return X(o).direction==="rtl"&&(s+=$(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:l}}const Ye=25;function wn(e,t){const n=q(e),o=Q(e),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,l=0,c=0;if(i){r=i.width,s=i.height;const u=Fe();(!u||u&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const f=be(o);if(f<=0){const u=o.ownerDocument,a=u.body,h=getComputedStyle(a),d=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(o.clientWidth-a.clientWidth-d);p<=Ye&&(r-=p)}else f<=Ye&&(r+=f);return{width:r,height:s,x:l,y:c}}const yn=new Set(["absolute","fixed"]);function vn(e,t){const n=Z(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=U(e)?oe(e):j(1),s=e.clientWidth*r.x,l=e.clientHeight*r.y,c=i*r.x,f=o*r.y;return{width:s,height:l,x:c,y:f}}function je(e,t,n){let o;if(t==="viewport")o=wn(e,n);else if(t==="document")o=gn(Q(e));else if(I(t))o=vn(t,n);else{const i=ct(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ie(o)}function ut(e,t){const n=K(e);return n===t||!I(n)||se(n)?!1:X(n).position==="fixed"||ut(n,t)}function xn(e,t){const n=t.get(e);if(n)return n;let o=le(e,[],!1).filter(l=>I(l)&&J(l)!=="body"),i=null;const r=X(e).position==="fixed";let s=r?K(e):e;for(;I(s)&&!se(s);){const l=X(s),c=ke(s);!c&&l.position==="fixed"&&(i=null),(r?!c&&!i:!c&&l.position==="static"&&!!i&&yn.has(i.position)||fe(s)&&!c&&ut(e,s))?o=o.filter(u=>u!==s):i=l,s=K(s)}return t.set(e,o),o}function bn(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s=[...n==="clippingAncestors"?ve(t)?[]:xn(t,this._c):[].concat(n),o],l=s[0],c=s.reduce((f,u)=>{const a=je(t,u,i);return f.top=$(a.top,f.top),f.right=V(a.right,f.right),f.bottom=V(a.bottom,f.bottom),f.left=$(a.left,f.left),f},je(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function An(e){const{width:t,height:n}=at(e);return{width:t,height:n}}function Cn(e,t,n){const o=U(t),i=Q(t),r=n==="fixed",s=Z(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const c=j(0);function f(){c.x=be(i)}if(o||!o&&!r)if((J(t)!=="body"||fe(i))&&(l=xe(t)),o){const d=Z(t,!0,r,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else i&&f();r&&!o&&i&&f();const u=i&&!o&&!r?ft(i,l):j(0),a=s.left+l.scrollLeft-c.x-u.x,h=s.top+l.scrollTop-c.y-u.y;return{x:a,y:h,width:s.width,height:s.height}}function Ce(e){return X(e).position==="static"}function Ue(e,t){if(!U(e)||X(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Q(e)===n&&(n=n.ownerDocument.body),n}function dt(e,t){const n=q(e);if(ve(e))return n;if(!U(e)){let i=K(e);for(;i&&!se(i);){if(I(i)&&!Ce(i))return i;i=K(i)}return n}let o=Ue(e,t);for(;o&&rn(o)&&Ce(o);)o=Ue(o,t);return o&&se(o)&&Ce(o)&&!ke(o)?n:o||fn(e)||n}const On=async function(e){const t=this.getOffsetParent||dt,n=this.getDimensions,o=await n(e.floating);return{reference:Cn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Pn(e){return X(e).direction==="rtl"}const Sn={convertOffsetParentRelativeRectToViewportRelativeRect:hn,getDocumentElement:Q,getClippingRect:bn,getOffsetParent:dt,getElementRects:On,getClientRects:mn,getDimensions:An,getScale:oe,isElement:I,isRTL:Pn};function pt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Rn(e,t){let n=null,o;const i=Q(e);function r(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),r();const f=e.getBoundingClientRect(),{left:u,top:a,width:h,height:d}=f;if(l||t(),!h||!d)return;const p=ue(a),m=ue(i.clientWidth-(u+h)),g=ue(i.clientHeight-(a+d)),w=ue(u),v={rootMargin:-p+"px "+-m+"px "+-g+"px "+-w+"px",threshold:$(0,V(1,c))||1};let A=!0;function x(O){const b=O[0].intersectionRatio;if(b!==c){if(!A)return s();b?s(!1,b):o=setTimeout(()=>{s(!1,1e-7)},1e3)}b===1&&!pt(f,e.getBoundingClientRect())&&s(),A=!1}try{n=new IntersectionObserver(x,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,v)}n.observe(e)}return s(!0),r}function _n(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,f=Me(e),u=i||r?[...f?le(f):[],...le(t)]:[];u.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const a=f&&l?Rn(f,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(w=>{let[y]=w;y&&y.target===f&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(t)})),n()}),f&&!c&&d.observe(f),d.observe(t));let p,m=c?Z(e):null;c&&g();function g(){const w=Z(e);m&&!pt(m,w)&&n(),m=w,p=requestAnimationFrame(g)}return n(),()=>{var w;u.forEach(y=>{i&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),a?.(),(w=d)==null||w.disconnect(),d=null,c&&cancelAnimationFrame(p)}}const En=Zt,Un=Yt,Ln=Jt,Qe=jt,Dn=tn,Bn=Ut,Tn=It,Qn=Gt,$n=en,kn=(e,t,n)=>{const o=new Map,i={platform:Sn,...n},r={...i.platform,_c:o};return zt(e,t,{...i,platform:r})};function Fn(e){return e!=null&&typeof e=="object"&&"$el"in e}function Re(e){if(Fn(e)){const t=e.$el;return $e(t)&&J(t)==="#comment"?null:t}return e}function te(e){return typeof e=="function"?e():_(e)}function Mn(e){return{name:"arrow",options:e,fn(t){const n=Re(te(e.element));return n==null?{}:Tn({element:n,padding:e.padding}).fn(t)}}}function ht(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ge(e,t){const n=ht(e);return Math.round(t*n)/n}function qn(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=R(()=>{var b;return(b=te(n.open))!=null?b:!0}),r=R(()=>te(n.middleware)),s=R(()=>{var b;return(b=te(n.placement))!=null?b:"bottom"}),l=R(()=>{var b;return(b=te(n.strategy))!=null?b:"absolute"}),c=R(()=>{var b;return(b=te(n.transform))!=null?b:!0}),f=R(()=>Re(e.value)),u=R(()=>Re(t.value)),a=Y(0),h=Y(0),d=Y(l.value),p=Y(s.value),m=yt({}),g=Y(!1),w=R(()=>{const b={position:d.value,left:"0",top:"0"};if(!u.value)return b;const S=Ge(u.value,a.value),E=Ge(u.value,h.value);return c.value?{...b,transform:"translate("+S+"px, "+E+"px)",...ht(u.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:S+"px",top:E+"px"}});let y;function v(){if(f.value==null||u.value==null)return;const b=i.value;kn(f.value,u.value,{middleware:r.value,placement:s.value,strategy:l.value}).then(S=>{a.value=S.x,h.value=S.y,d.value=S.strategy,p.value=S.placement,m.value=S.middlewareData,g.value=b!==!1})}function A(){typeof y=="function"&&(y(),y=void 0)}function x(){if(A(),o===void 0){v();return}if(f.value!=null&&u.value!=null){y=o(f.value,u.value,v);return}}function O(){i.value||(g.value=!1)}return Ae([r,s,l,i],v,{flush:"sync"}),Ae([f,u],x,{flush:"sync"}),Ae(i,O,{flush:"sync"}),vt()&&xt(A),{x:ee(a),y:ee(h),strategy:ee(d),placement:ee(p),middlewareData:ee(m),isPositioned:ee(g),floatingStyles:w,update:v}}const Wn={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[Hn,Nn]=Ke("PopperContent");var Vn=ae({inheritAttrs:!1,__name:"PopperContent",props:bt({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Wn}),emits:["placed"],setup(e,{emit:t}){const n=e,o=t,i=nt(),{forwardRef:r,currentElement:s}=ge(),l=Y(),c=Y(),{width:f,height:u}=Ot(c),a=R(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),h=R(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),d=R(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),p=R(()=>({padding:h.value,boundary:d.value.filter(Bt),altBoundary:d.value.length>0})),m=R(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),g=At(()=>[En({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&Qe({...p.value,...m.value}),n.avoidCollisions&&Ln({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?$n():void 0,...p.value}),!n.prioritizePosition&&n.avoidCollisions&&Qe({...p.value,...m.value}),Dn({...p.value,apply:({elements:P,rects:B,availableWidth:D,availableHeight:M})=>{const{width:F,height:k}=B.reference,T=P.floating.style;T.setProperty("--reka-popper-available-width",`${D}px`),T.setProperty("--reka-popper-available-height",`${M}px`),T.setProperty("--reka-popper-anchor-width",`${F}px`),T.setProperty("--reka-popper-anchor-height",`${k}px`)}}),c.value&&Mn({element:c.value,padding:n.arrowPadding}),Tt({arrowWidth:f.value,arrowHeight:u.value}),n.hideWhenDetached&&Bn({strategy:"referenceHidden",...p.value})]),w=R(()=>n.reference??i.anchor.value),{floatingStyles:y,placement:v,isPositioned:A,middlewareData:x}=qn(w,l,{strategy:n.positionStrategy,placement:a,whileElementsMounted:(...P)=>_n(...P,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:g}),O=R(()=>Oe(v.value)[0]),b=R(()=>Oe(v.value)[1]);Ze(()=>{A.value&&o("placed")});const S=R(()=>x.value.arrow?.centerOffset!==0),E=Y("");Ct(()=>{s.value&&(E.value=window.getComputedStyle(s.value).zIndex)});const C=R(()=>x.value.arrow?.x??0),L=R(()=>x.value.arrow?.y??0);return Nn({placedSide:O,onArrowChange:P=>c.value=P,arrowX:C,arrowY:L,shouldHideArrow:S}),(P,B)=>(ne(),de("div",{ref_key:"floatingRef",ref:l,"data-reka-popper-content-wrapper":"",style:tt({..._(y),transform:_(A)?_(y).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:E.value,"--reka-popper-transform-origin":[_(x).transformOrigin?.x,_(x).transformOrigin?.y].join(" "),..._(x).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[et(_(_e),Ee({ref:_(r)},P.$attrs,{"as-child":n.asChild,as:P.as,"data-side":O.value,"data-align":b.value,style:{animation:_(A)?void 0:"none"}}),{default:we(()=>[ce(P.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),Gn=Vn;const zn={top:"bottom",right:"left",bottom:"top",left:"right"};var In=ae({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const{forwardRef:t}=ge(),n=Hn(),o=R(()=>zn[n.placedSide.value]);return(i,r)=>(ne(),de("span",{ref:s=>{_(n).onArrowChange(s)},style:tt({position:"absolute",left:_(n).arrowX?.value?`${_(n).arrowX?.value}px`:void 0,top:_(n).arrowY?.value?`${_(n).arrowY?.value}px`:void 0,[o.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[_(n).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[_(n).placedSide.value],visibility:_(n).shouldHideArrow.value?"hidden":void 0})},[et(Dt,Ee(i.$attrs,{ref:_(t),style:{display:"block"},as:i.as,"as-child":i.asChild,rounded:i.rounded,width:i.width,height:i.height}),{default:we(()=>[ce(i.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}}),Kn=In;export{Kn as P,Yn as a,Gn as b,jn as c,Tn as d,Dn as e,Qe as f,Un as g,Bn as h,Qn as i,kn as j,Wn as k,En as o,Ln as s};
|
|
1
|
+
import{e as Y,c as R,q as gt,a5 as wt,a as ae,aR as Ke,a4 as ce,a_ as ge,bN as Ze,Q as Je,R as ne,S as we,C as _,a3 as _e,G as de,V as Ee,s as yt,f as Ae,l as vt,aB as xt,bO as ee,bP as bt,bQ as At,y as Ct,T as et,aV as tt}from"./njnzCNrH.js";function Ot(e){const t=Y(),n=R(()=>t.value?.width??0),o=R(()=>t.value?.height??0);return gt(()=>{const i=wt(e);if(i){t.value={width:i.offsetWidth,height:i.offsetHeight};const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let c,f;if("borderBoxSize"in l){const u=l.borderBoxSize,a=Array.isArray(u)?u[0]:u;c=a.inlineSize,f=a.blockSize}else c=i.offsetWidth,f=i.offsetHeight;t.value={width:c,height:f}});return r.observe(i,{box:"border-box"}),()=>r.unobserve(i)}else t.value=void 0}),{width:n,height:o}}const[nt,Pt]=Ke("PopperRoot");var St=ae({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=Y();return Pt({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>ce(n.$slots,"default")}}),Yn=St,Rt=ae({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n,currentElement:o}=ge(),i=nt();return Ze(()=>{i.onAnchorChange(t.reference??o.value)}),(r,s)=>(ne(),Je(_(_e),{ref:_(n),as:r.as,"as-child":r.asChild},{default:we(()=>[ce(r.$slots,"default")]),_:3},8,["as","as-child"]))}}),jn=Rt;const _t={key:0,d:"M0 0L6 6L12 0"},Et={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var Lt=ae({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return ge(),(n,o)=>(ne(),Je(_(_e),Ee(t,{width:n.width,height:n.height,viewBox:n.asChild?void 0:"0 0 12 6",preserveAspectRatio:n.asChild?void 0:"none"}),{default:we(()=>[ce(n.$slots,"default",{},()=>[n.rounded?(ne(),de("path",Et)):(ne(),de("path",_t))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),Dt=Lt;function Bt(e){return e!==null}function Tt(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[f,u]=Oe(n),a={start:"0%",center:"50%",end:"100%"}[u],h=(i.arrow?.x??0)+l/2,d=(i.arrow?.y??0)+c/2;let p="",m="";return f==="bottom"?(p=s?a:`${h}px`,m=`${-c}px`):f==="top"?(p=s?a:`${h}px`,m=`${o.floating.height+c}px`):f==="right"?(p=`${-c}px`,m=s?a:`${d}px`):f==="left"&&(p=`${o.floating.width+c}px`,m=s?a:`${d}px`),{data:{x:p,y:m}}}}}function Oe(e){const[t,n="center"]=e.split("-");return[t,n]}const ot=["top","right","bottom","left"],qe=["start","end"],We=ot.reduce((e,t)=>e.concat(t,t+"-"+qe[0],t+"-"+qe[1]),[]),V=Math.min,$=Math.max,pe=Math.round,ue=Math.floor,j=e=>({x:e,y:e}),$t={left:"right",right:"left",bottom:"top",top:"bottom"},kt={start:"end",end:"start"};function Pe(e,t,n){return $(e,V(t,n))}function z(e,t){return typeof e=="function"?e(t):e}function W(e){return e.split("-")[0]}function N(e){return e.split("-")[1]}function Le(e){return e==="x"?"y":"x"}function De(e){return e==="y"?"height":"width"}const Ft=new Set(["top","bottom"]);function H(e){return Ft.has(W(e))?"y":"x"}function Be(e){return Le(H(e))}function it(e,t,n){n===void 0&&(n=!1);const o=N(e),i=Be(e),r=De(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=me(s)),[s,me(s)]}function Mt(e){const t=me(e);return[he(e),t,he(t)]}function he(e){return e.replace(/start|end/g,t=>kt[t])}const He=["left","right"],Ne=["right","left"],qt=["top","bottom"],Wt=["bottom","top"];function Ht(e,t,n){switch(e){case"top":case"bottom":return n?t?Ne:He:t?He:Ne;case"left":case"right":return t?qt:Wt;default:return[]}}function Nt(e,t,n,o){const i=N(e);let r=Ht(W(e),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(he)))),r}function me(e){return e.replace(/left|right|bottom|top/g,t=>$t[t])}function Vt(e){return{top:0,right:0,bottom:0,left:0,...e}}function Te(e){return typeof e!="number"?Vt(e):{top:e,right:e,bottom:e,left:e}}function ie(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Ve(e,t,n){let{reference:o,floating:i}=e;const r=H(t),s=Be(t),l=De(s),c=W(t),f=r==="y",u=o.x+o.width/2-i.width/2,a=o.y+o.height/2-i.height/2,h=o[l]/2-i[l]/2;let d;switch(c){case"top":d={x:u,y:o.y-i.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:a};break;case"left":d={x:o.x-i.width,y:a};break;default:d={x:o.x,y:o.y}}switch(N(t)){case"start":d[s]-=h*(n&&f?-1:1);break;case"end":d[s]+=h*(n&&f?-1:1);break}return d}const zt=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:a}=Ve(f,o,c),h=o,d={},p=0;for(let m=0;m<l.length;m++){const{name:g,fn:w}=l[m],{x:y,y:v,data:A,reset:x}=await w({x:u,y:a,initialPlacement:o,placement:h,strategy:i,middlewareData:d,rects:f,platform:s,elements:{reference:e,floating:t}});u=y??u,a=v??a,d={...d,[g]:{...d[g],...A}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(f=x.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:a}=Ve(f,h,c)),m=-1)}return{x:u,y:a,placement:h,strategy:i,middlewareData:d}};async function re(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:r,rects:s,elements:l,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:a="floating",altBoundary:h=!1,padding:d=0}=z(t,e),p=Te(d),g=l[h?a==="floating"?"reference":"floating":a],w=ie(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:f,rootBoundary:u,strategy:c})),y=a==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,v=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),A=await(r.isElement==null?void 0:r.isElement(v))?await(r.getScale==null?void 0:r.getScale(v))||{x:1,y:1}:{x:1,y:1},x=ie(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:c}):y);return{top:(w.top-x.top+p.top)/A.y,bottom:(x.bottom-w.bottom+p.bottom)/A.y,left:(w.left-x.left+p.left)/A.x,right:(x.right-w.right+p.right)/A.x}}const It=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:s,elements:l,middlewareData:c}=t,{element:f,padding:u=0}=z(e,t)||{};if(f==null)return{};const a=Te(u),h={x:n,y:o},d=Be(i),p=De(d),m=await s.getDimensions(f),g=d==="y",w=g?"top":"left",y=g?"bottom":"right",v=g?"clientHeight":"clientWidth",A=r.reference[p]+r.reference[d]-h[d]-r.floating[p],x=h[d]-r.reference[d],O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let b=O?O[v]:0;(!b||!await(s.isElement==null?void 0:s.isElement(O)))&&(b=l.floating[v]||r.floating[p]);const S=A/2-x/2,E=b/2-m[p]/2-1,C=V(a[w],E),L=V(a[y],E),P=C,B=b-m[p]-L,D=b/2-m[p]/2+S,M=Pe(P,D,B),F=!c.arrow&&N(i)!=null&&D!==M&&r.reference[p]/2-(D<P?C:L)-m[p]/2<0,k=F?D<P?D-P:D-B:0;return{[d]:h[d]+k,data:{[d]:M,centerOffset:D-M-k,...F&&{alignmentOffset:k}},reset:F}}});function Xt(e,t,n){return(e?[...n.filter(i=>N(i)===e),...n.filter(i=>N(i)!==e)]:n.filter(i=>W(i)===i)).filter(i=>e?N(i)===e||(t?he(i)!==i:!1):!0)}const Yt=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,o,i;const{rects:r,middlewareData:s,placement:l,platform:c,elements:f}=t,{crossAxis:u=!1,alignment:a,allowedPlacements:h=We,autoAlignment:d=!0,...p}=z(e,t),m=a!==void 0||h===We?Xt(a||null,d,h):h,g=await re(t,p),w=((n=s.autoPlacement)==null?void 0:n.index)||0,y=m[w];if(y==null)return{};const v=it(y,r,await(c.isRTL==null?void 0:c.isRTL(f.floating)));if(l!==y)return{reset:{placement:m[0]}};const A=[g[W(y)],g[v[0]],g[v[1]]],x=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:y,overflows:A}],O=m[w+1];if(O)return{data:{index:w+1,overflows:x},reset:{placement:O}};const b=x.map(C=>{const L=N(C.placement);return[C.placement,L&&u?C.overflows.slice(0,2).reduce((P,B)=>P+B,0):C.overflows[0],C.overflows]}).sort((C,L)=>C[1]-L[1]),E=((i=b.filter(C=>C[2].slice(0,N(C[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||b[0][0];return E!==l?{data:{index:w+1,overflows:x},reset:{placement:E}}:{}}}},jt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:c,elements:f}=t,{mainAxis:u=!0,crossAxis:a=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...g}=z(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const w=W(i),y=H(l),v=W(l)===l,A=await(c.isRTL==null?void 0:c.isRTL(f.floating)),x=h||(v||!m?[me(l)]:Mt(l)),O=p!=="none";!h&&O&&x.push(...Nt(l,m,p,A));const b=[l,...x],S=await re(t,g),E=[];let C=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&E.push(S[w]),a){const D=it(i,s,A);E.push(S[D[0]],S[D[1]])}if(C=[...C,{placement:i,overflows:E}],!E.every(D=>D<=0)){var L,P;const D=(((L=r.flip)==null?void 0:L.index)||0)+1,M=b[D];if(M&&(!(a==="alignment"?y!==H(M):!1)||C.every(T=>H(T.placement)===y?T.overflows[0]>0:!0)))return{data:{index:D,overflows:C},reset:{placement:M}};let F=(P=C.filter(k=>k.overflows[0]<=0).sort((k,T)=>k.overflows[1]-T.overflows[1])[0])==null?void 0:P.placement;if(!F)switch(d){case"bestFit":{var B;const k=(B=C.filter(T=>{if(O){const G=H(T.placement);return G===y||G==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(G=>G>0).reduce((G,mt)=>G+mt,0)]).sort((T,G)=>T[1]-G[1])[0])==null?void 0:B[0];k&&(F=k);break}case"initialPlacement":F=l;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function ze(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ie(e){return ot.some(t=>e[t]>=0)}const Ut=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=z(e,t);switch(o){case"referenceHidden":{const r=await re(t,{...i,elementContext:"reference"}),s=ze(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ie(s)}}}case"escaped":{const r=await re(t,{...i,altBoundary:!0}),s=ze(r,n.floating);return{data:{escapedOffsets:s,escaped:Ie(s)}}}default:return{}}}}};function rt(e){const t=V(...e.map(r=>r.left)),n=V(...e.map(r=>r.top)),o=$(...e.map(r=>r.right)),i=$(...e.map(r=>r.bottom));return{x:t,y:n,width:o-t,height:i-n}}function Qt(e){const t=e.slice().sort((i,r)=>i.y-r.y),n=[];let o=null;for(let i=0;i<t.length;i++){const r=t[i];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map(i=>ie(rt(i)))}const Gt=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:i,platform:r,strategy:s}=t,{padding:l=2,x:c,y:f}=z(e,t),u=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(o.reference))||[]),a=Qt(u),h=ie(rt(u)),d=Te(l);function p(){if(a.length===2&&a[0].left>a[1].right&&c!=null&&f!=null)return a.find(g=>c>g.left-d.left&&c<g.right+d.right&&f>g.top-d.top&&f<g.bottom+d.bottom)||h;if(a.length>=2){if(H(n)==="y"){const C=a[0],L=a[a.length-1],P=W(n)==="top",B=C.top,D=L.bottom,M=P?C.left:L.left,F=P?C.right:L.right,k=F-M,T=D-B;return{top:B,bottom:D,left:M,right:F,width:k,height:T,x:M,y:B}}const g=W(n)==="left",w=$(...a.map(C=>C.right)),y=V(...a.map(C=>C.left)),v=a.filter(C=>g?C.left===y:C.right===w),A=v[0].top,x=v[v.length-1].bottom,O=y,b=w,S=b-O,E=x-A;return{top:A,bottom:x,left:O,right:b,width:S,height:E,x:O,y:A}}return h}const m=await r.getElementRects({reference:{getBoundingClientRect:p},floating:o.floating,strategy:s});return i.reference.x!==m.reference.x||i.reference.y!==m.reference.y||i.reference.width!==m.reference.width||i.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}},st=new Set(["left","top"]);async function Kt(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),l=N(n),c=H(n)==="y",f=st.has(s)?-1:1,u=r&&c?-1:1,a=z(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof a=="number"?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:a.mainAxis||0,crossAxis:a.crossAxis||0,alignmentAxis:a.alignmentAxis};return l&&typeof p=="number"&&(d=l==="end"?p*-1:p),c?{x:d*u,y:h*f}:{x:h*f,y:d*u}}const Zt=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:s,middlewareData:l}=t,c=await Kt(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}},Jt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:g=>{let{x:w,y}=g;return{x:w,y}}},...c}=z(e,t),f={x:n,y:o},u=await re(t,c),a=H(W(i)),h=Le(a);let d=f[h],p=f[a];if(r){const g=h==="y"?"top":"left",w=h==="y"?"bottom":"right",y=d+u[g],v=d-u[w];d=Pe(y,d,v)}if(s){const g=a==="y"?"top":"left",w=a==="y"?"bottom":"right",y=p+u[g],v=p-u[w];p=Pe(y,p,v)}const m=l.fn({...t,[h]:d,[a]:p});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[h]:r,[a]:s}}}}}},en=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:f=!0}=z(e,t),u={x:n,y:o},a=H(i),h=Le(a);let d=u[h],p=u[a];const m=z(l,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const v=h==="y"?"height":"width",A=r.reference[h]-r.floating[v]+g.mainAxis,x=r.reference[h]+r.reference[v]-g.mainAxis;d<A?d=A:d>x&&(d=x)}if(f){var w,y;const v=h==="y"?"width":"height",A=st.has(W(i)),x=r.reference[a]-r.floating[v]+(A&&((w=s.offset)==null?void 0:w[a])||0)+(A?0:g.crossAxis),O=r.reference[a]+r.reference[v]+(A?0:((y=s.offset)==null?void 0:y[a])||0)-(A?g.crossAxis:0);p<x?p=x:p>O&&(p=O)}return{[h]:d,[a]:p}}}},tn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:r,platform:s,elements:l}=t,{apply:c=()=>{},...f}=z(e,t),u=await re(t,f),a=W(i),h=N(i),d=H(i)==="y",{width:p,height:m}=r.floating;let g,w;a==="top"||a==="bottom"?(g=a,w=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(w=a,g=h==="end"?"top":"bottom");const y=m-u.top-u.bottom,v=p-u.left-u.right,A=V(m-u[g],y),x=V(p-u[w],v),O=!t.middlewareData.shift;let b=A,S=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=v),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(b=y),O&&!h){const C=$(u.left,0),L=$(u.right,0),P=$(u.top,0),B=$(u.bottom,0);d?S=p-2*(C!==0||L!==0?C+L:$(u.left,u.right)):b=m-2*(P!==0||B!==0?P+B:$(u.top,u.bottom))}await c({...t,availableWidth:S,availableHeight:b});const E=await s.getDimensions(l.floating);return p!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function ye(){return typeof window<"u"}function J(e){return $e(e)?(e.nodeName||"").toLowerCase():"#document"}function q(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Q(e){var t;return(t=($e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $e(e){return ye()?e instanceof Node||e instanceof q(e).Node:!1}function I(e){return ye()?e instanceof Element||e instanceof q(e).Element:!1}function U(e){return ye()?e instanceof HTMLElement||e instanceof q(e).HTMLElement:!1}function Xe(e){return!ye()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof q(e).ShadowRoot}const nn=new Set(["inline","contents"]);function fe(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!nn.has(i)}const on=new Set(["table","td","th"]);function rn(e){return on.has(J(e))}const sn=[":popover-open",":modal"];function ve(e){return sn.some(t=>{try{return e.matches(t)}catch{return!1}})}const ln=["transform","translate","scale","rotate","perspective"],an=["transform","translate","scale","rotate","perspective","filter"],cn=["paint","layout","strict","content"];function ke(e){const t=Fe(),n=I(e)?X(e):e;return ln.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||an.some(o=>(n.willChange||"").includes(o))||cn.some(o=>(n.contain||"").includes(o))}function fn(e){let t=K(e);for(;U(t)&&!se(t);){if(ke(t))return t;if(ve(t))return null;t=K(t)}return null}function Fe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const un=new Set(["html","body","#document"]);function se(e){return un.has(J(e))}function X(e){return q(e).getComputedStyle(e)}function xe(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function K(e){if(J(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xe(e)&&e.host||Q(e);return Xe(t)?t.host:t}function lt(e){const t=K(e);return se(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&fe(t)?t:lt(t)}function le(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=lt(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),s=q(i);if(r){const l=Se(s);return t.concat(s,s.visualViewport||[],fe(i)?i:[],l&&n?le(l):[])}return t.concat(i,le(i,[],n))}function Se(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function at(e){const t=X(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=U(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:o,l=pe(n)!==r||pe(o)!==s;return l&&(n=r,o=s),{width:n,height:o,$:l}}function Me(e){return I(e)?e:e.contextElement}function oe(e){const t=Me(e);if(!U(t))return j(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=at(t);let s=(r?pe(n.width):n.width)/o,l=(r?pe(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const dn=j(0);function ct(e){const t=q(e);return!Fe()||!t.visualViewport?dn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==q(e)?!1:t}function Z(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=Me(e);let s=j(1);t&&(o?I(o)&&(s=oe(o)):s=oe(e));const l=pn(r,n,o)?ct(r):j(0);let c=(i.left+l.x)/s.x,f=(i.top+l.y)/s.y,u=i.width/s.x,a=i.height/s.y;if(r){const h=q(r),d=o&&I(o)?q(o):o;let p=h,m=Se(p);for(;m&&o&&d!==p;){const g=oe(m),w=m.getBoundingClientRect(),y=X(m),v=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*g.x,A=w.top+(m.clientTop+parseFloat(y.paddingTop))*g.y;c*=g.x,f*=g.y,u*=g.x,a*=g.y,c+=v,f+=A,p=q(m),m=Se(p)}}return ie({width:u,height:a,x:c,y:f})}function be(e,t){const n=xe(e).scrollLeft;return t?t.left+n:Z(Q(e)).left+n}function ft(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-be(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function hn(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",s=Q(o),l=t?ve(t.floating):!1;if(o===s||l&&r)return n;let c={scrollLeft:0,scrollTop:0},f=j(1);const u=j(0),a=U(o);if((a||!a&&!r)&&((J(o)!=="body"||fe(s))&&(c=xe(o)),U(o))){const d=Z(o);f=oe(o),u.x=d.x+o.clientLeft,u.y=d.y+o.clientTop}const h=s&&!a&&!r?ft(s,c):j(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+u.x+h.x,y:n.y*f.y-c.scrollTop*f.y+u.y+h.y}}function mn(e){return Array.from(e.getClientRects())}function gn(e){const t=Q(e),n=xe(e),o=e.ownerDocument.body,i=$(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=$(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+be(e);const l=-n.scrollTop;return X(o).direction==="rtl"&&(s+=$(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:l}}const Ye=25;function wn(e,t){const n=q(e),o=Q(e),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,l=0,c=0;if(i){r=i.width,s=i.height;const u=Fe();(!u||u&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const f=be(o);if(f<=0){const u=o.ownerDocument,a=u.body,h=getComputedStyle(a),d=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(o.clientWidth-a.clientWidth-d);p<=Ye&&(r-=p)}else f<=Ye&&(r+=f);return{width:r,height:s,x:l,y:c}}const yn=new Set(["absolute","fixed"]);function vn(e,t){const n=Z(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=U(e)?oe(e):j(1),s=e.clientWidth*r.x,l=e.clientHeight*r.y,c=i*r.x,f=o*r.y;return{width:s,height:l,x:c,y:f}}function je(e,t,n){let o;if(t==="viewport")o=wn(e,n);else if(t==="document")o=gn(Q(e));else if(I(t))o=vn(t,n);else{const i=ct(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ie(o)}function ut(e,t){const n=K(e);return n===t||!I(n)||se(n)?!1:X(n).position==="fixed"||ut(n,t)}function xn(e,t){const n=t.get(e);if(n)return n;let o=le(e,[],!1).filter(l=>I(l)&&J(l)!=="body"),i=null;const r=X(e).position==="fixed";let s=r?K(e):e;for(;I(s)&&!se(s);){const l=X(s),c=ke(s);!c&&l.position==="fixed"&&(i=null),(r?!c&&!i:!c&&l.position==="static"&&!!i&&yn.has(i.position)||fe(s)&&!c&&ut(e,s))?o=o.filter(u=>u!==s):i=l,s=K(s)}return t.set(e,o),o}function bn(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const s=[...n==="clippingAncestors"?ve(t)?[]:xn(t,this._c):[].concat(n),o],l=s[0],c=s.reduce((f,u)=>{const a=je(t,u,i);return f.top=$(a.top,f.top),f.right=V(a.right,f.right),f.bottom=V(a.bottom,f.bottom),f.left=$(a.left,f.left),f},je(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function An(e){const{width:t,height:n}=at(e);return{width:t,height:n}}function Cn(e,t,n){const o=U(t),i=Q(t),r=n==="fixed",s=Z(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const c=j(0);function f(){c.x=be(i)}if(o||!o&&!r)if((J(t)!=="body"||fe(i))&&(l=xe(t)),o){const d=Z(t,!0,r,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else i&&f();r&&!o&&i&&f();const u=i&&!o&&!r?ft(i,l):j(0),a=s.left+l.scrollLeft-c.x-u.x,h=s.top+l.scrollTop-c.y-u.y;return{x:a,y:h,width:s.width,height:s.height}}function Ce(e){return X(e).position==="static"}function Ue(e,t){if(!U(e)||X(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Q(e)===n&&(n=n.ownerDocument.body),n}function dt(e,t){const n=q(e);if(ve(e))return n;if(!U(e)){let i=K(e);for(;i&&!se(i);){if(I(i)&&!Ce(i))return i;i=K(i)}return n}let o=Ue(e,t);for(;o&&rn(o)&&Ce(o);)o=Ue(o,t);return o&&se(o)&&Ce(o)&&!ke(o)?n:o||fn(e)||n}const On=async function(e){const t=this.getOffsetParent||dt,n=this.getDimensions,o=await n(e.floating);return{reference:Cn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Pn(e){return X(e).direction==="rtl"}const Sn={convertOffsetParentRelativeRectToViewportRelativeRect:hn,getDocumentElement:Q,getClippingRect:bn,getOffsetParent:dt,getElementRects:On,getClientRects:mn,getDimensions:An,getScale:oe,isElement:I,isRTL:Pn};function pt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Rn(e,t){let n=null,o;const i=Q(e);function r(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),r();const f=e.getBoundingClientRect(),{left:u,top:a,width:h,height:d}=f;if(l||t(),!h||!d)return;const p=ue(a),m=ue(i.clientWidth-(u+h)),g=ue(i.clientHeight-(a+d)),w=ue(u),v={rootMargin:-p+"px "+-m+"px "+-g+"px "+-w+"px",threshold:$(0,V(1,c))||1};let A=!0;function x(O){const b=O[0].intersectionRatio;if(b!==c){if(!A)return s();b?s(!1,b):o=setTimeout(()=>{s(!1,1e-7)},1e3)}b===1&&!pt(f,e.getBoundingClientRect())&&s(),A=!1}try{n=new IntersectionObserver(x,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,v)}n.observe(e)}return s(!0),r}function _n(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,f=Me(e),u=i||r?[...f?le(f):[],...le(t)]:[];u.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});const a=f&&l?Rn(f,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(w=>{let[y]=w;y&&y.target===f&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(t)})),n()}),f&&!c&&d.observe(f),d.observe(t));let p,m=c?Z(e):null;c&&g();function g(){const w=Z(e);m&&!pt(m,w)&&n(),m=w,p=requestAnimationFrame(g)}return n(),()=>{var w;u.forEach(y=>{i&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),a?.(),(w=d)==null||w.disconnect(),d=null,c&&cancelAnimationFrame(p)}}const En=Zt,Un=Yt,Ln=Jt,Qe=jt,Dn=tn,Bn=Ut,Tn=It,Qn=Gt,$n=en,kn=(e,t,n)=>{const o=new Map,i={platform:Sn,...n},r={...i.platform,_c:o};return zt(e,t,{...i,platform:r})};function Fn(e){return e!=null&&typeof e=="object"&&"$el"in e}function Re(e){if(Fn(e)){const t=e.$el;return $e(t)&&J(t)==="#comment"?null:t}return e}function te(e){return typeof e=="function"?e():_(e)}function Mn(e){return{name:"arrow",options:e,fn(t){const n=Re(te(e.element));return n==null?{}:Tn({element:n,padding:e.padding}).fn(t)}}}function ht(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ge(e,t){const n=ht(e);return Math.round(t*n)/n}function qn(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=R(()=>{var b;return(b=te(n.open))!=null?b:!0}),r=R(()=>te(n.middleware)),s=R(()=>{var b;return(b=te(n.placement))!=null?b:"bottom"}),l=R(()=>{var b;return(b=te(n.strategy))!=null?b:"absolute"}),c=R(()=>{var b;return(b=te(n.transform))!=null?b:!0}),f=R(()=>Re(e.value)),u=R(()=>Re(t.value)),a=Y(0),h=Y(0),d=Y(l.value),p=Y(s.value),m=yt({}),g=Y(!1),w=R(()=>{const b={position:d.value,left:"0",top:"0"};if(!u.value)return b;const S=Ge(u.value,a.value),E=Ge(u.value,h.value);return c.value?{...b,transform:"translate("+S+"px, "+E+"px)",...ht(u.value)>=1.5&&{willChange:"transform"}}:{position:d.value,left:S+"px",top:E+"px"}});let y;function v(){if(f.value==null||u.value==null)return;const b=i.value;kn(f.value,u.value,{middleware:r.value,placement:s.value,strategy:l.value}).then(S=>{a.value=S.x,h.value=S.y,d.value=S.strategy,p.value=S.placement,m.value=S.middlewareData,g.value=b!==!1})}function A(){typeof y=="function"&&(y(),y=void 0)}function x(){if(A(),o===void 0){v();return}if(f.value!=null&&u.value!=null){y=o(f.value,u.value,v);return}}function O(){i.value||(g.value=!1)}return Ae([r,s,l,i],v,{flush:"sync"}),Ae([f,u],x,{flush:"sync"}),Ae(i,O,{flush:"sync"}),vt()&&xt(A),{x:ee(a),y:ee(h),strategy:ee(d),placement:ee(p),middlewareData:ee(m),isPositioned:ee(g),floatingStyles:w,update:v}}const Wn={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[Hn,Nn]=Ke("PopperContent");var Vn=ae({inheritAttrs:!1,__name:"PopperContent",props:bt({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Wn}),emits:["placed"],setup(e,{emit:t}){const n=e,o=t,i=nt(),{forwardRef:r,currentElement:s}=ge(),l=Y(),c=Y(),{width:f,height:u}=Ot(c),a=R(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),h=R(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),d=R(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),p=R(()=>({padding:h.value,boundary:d.value.filter(Bt),altBoundary:d.value.length>0})),m=R(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),g=At(()=>[En({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&Qe({...p.value,...m.value}),n.avoidCollisions&&Ln({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?$n():void 0,...p.value}),!n.prioritizePosition&&n.avoidCollisions&&Qe({...p.value,...m.value}),Dn({...p.value,apply:({elements:P,rects:B,availableWidth:D,availableHeight:M})=>{const{width:F,height:k}=B.reference,T=P.floating.style;T.setProperty("--reka-popper-available-width",`${D}px`),T.setProperty("--reka-popper-available-height",`${M}px`),T.setProperty("--reka-popper-anchor-width",`${F}px`),T.setProperty("--reka-popper-anchor-height",`${k}px`)}}),c.value&&Mn({element:c.value,padding:n.arrowPadding}),Tt({arrowWidth:f.value,arrowHeight:u.value}),n.hideWhenDetached&&Bn({strategy:"referenceHidden",...p.value})]),w=R(()=>n.reference??i.anchor.value),{floatingStyles:y,placement:v,isPositioned:A,middlewareData:x}=qn(w,l,{strategy:n.positionStrategy,placement:a,whileElementsMounted:(...P)=>_n(...P,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:g}),O=R(()=>Oe(v.value)[0]),b=R(()=>Oe(v.value)[1]);Ze(()=>{A.value&&o("placed")});const S=R(()=>x.value.arrow?.centerOffset!==0),E=Y("");Ct(()=>{s.value&&(E.value=window.getComputedStyle(s.value).zIndex)});const C=R(()=>x.value.arrow?.x??0),L=R(()=>x.value.arrow?.y??0);return Nn({placedSide:O,onArrowChange:P=>c.value=P,arrowX:C,arrowY:L,shouldHideArrow:S}),(P,B)=>(ne(),de("div",{ref_key:"floatingRef",ref:l,"data-reka-popper-content-wrapper":"",style:tt({..._(y),transform:_(A)?_(y).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:E.value,"--reka-popper-transform-origin":[_(x).transformOrigin?.x,_(x).transformOrigin?.y].join(" "),..._(x).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[et(_(_e),Ee({ref:_(r)},P.$attrs,{"as-child":n.asChild,as:P.as,"data-side":O.value,"data-align":b.value,style:{animation:_(A)?void 0:"none"}}),{default:we(()=>[ce(P.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),Gn=Vn;const zn={top:"bottom",right:"left",bottom:"top",left:"right"};var In=ae({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const{forwardRef:t}=ge(),n=Hn(),o=R(()=>zn[n.placedSide.value]);return(i,r)=>(ne(),de("span",{ref:s=>{_(n).onArrowChange(s)},style:tt({position:"absolute",left:_(n).arrowX?.value?`${_(n).arrowX?.value}px`:void 0,top:_(n).arrowY?.value?`${_(n).arrowY?.value}px`:void 0,[o.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[_(n).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[_(n).placedSide.value],visibility:_(n).shouldHideArrow.value?"hidden":void 0})},[et(Dt,Ee(i.$attrs,{ref:_(t),style:{display:"block"},as:i.as,"as-child":i.asChild,rounded:i.rounded,width:i.width,height:i.height}),{default:we(()=>[ce(i.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}}),Kn=In;export{Kn as P,Yn as a,Gn as b,jn as c,Tn as d,Dn as e,Qe as f,Un as g,Bn as h,Qn as i,kn as j,Wn as k,En as o,Ln as s};
|