reactjs-tiptap-editor 1.0.19 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/lib/{ActionMenuButton-D3b_bcin.cjs → ActionMenuButton-BVaZBdL3.cjs} +1 -1
  2. package/lib/{ActionMenuButton-B1Nfn5Hm.js → ActionMenuButton-Cpla3oSm.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.js +23 -23
  5. package/lib/Blockquote.cjs +1 -1
  6. package/lib/Blockquote.js +2 -2
  7. package/lib/Bold.cjs +1 -1
  8. package/lib/Bold.js +2 -2
  9. package/lib/BulletList.cjs +1 -1
  10. package/lib/BulletList.js +2 -2
  11. package/lib/Callout-JL3mm4GU.cjs +1 -0
  12. package/lib/Callout-mb31jDcR.js +340 -0
  13. package/lib/Callout.cjs +1 -1
  14. package/lib/Callout.js +8 -222
  15. package/lib/Clear.cjs +1 -1
  16. package/lib/Clear.js +2 -2
  17. package/lib/Code.cjs +1 -1
  18. package/lib/Code.js +2 -2
  19. package/lib/CodeBlock.cjs +20 -44
  20. package/lib/CodeBlock.js +1385 -4011
  21. package/lib/CodeView.cjs +1 -1
  22. package/lib/CodeView.js +2 -2
  23. package/lib/Color.cjs +1 -1
  24. package/lib/Color.js +3 -3
  25. package/lib/Column.cjs +1 -1
  26. package/lib/Column.js +2 -2
  27. package/lib/{Drawer-kEO7KzzC.cjs → Drawer-94nAoli4.cjs} +1 -1
  28. package/lib/{Drawer-B1-7Y4HB.js → Drawer-d9e69c7G.js} +20 -20
  29. package/lib/Drawer.cjs +1 -1
  30. package/lib/Drawer.js +4 -4
  31. package/lib/Emoji.cjs +1 -1
  32. package/lib/Emoji.js +12 -12
  33. package/lib/Excalidraw.cjs +1 -1
  34. package/lib/Excalidraw.js +7 -7
  35. package/lib/ExportPdf.cjs +1 -1
  36. package/lib/ExportPdf.js +2 -2
  37. package/lib/ExportWord.cjs +1 -1
  38. package/lib/ExportWord.js +2 -2
  39. package/lib/FontFamily.cjs +1 -1
  40. package/lib/FontFamily.js +4 -4
  41. package/lib/FontSize.cjs +1 -1
  42. package/lib/FontSize.js +4 -4
  43. package/lib/Heading.cjs +1 -1
  44. package/lib/Heading.js +9 -9
  45. package/lib/Highlight.cjs +1 -1
  46. package/lib/Highlight.js +3 -3
  47. package/lib/History.cjs +1 -1
  48. package/lib/History.js +3 -3
  49. package/lib/HorizontalRule.cjs +1 -1
  50. package/lib/HorizontalRule.js +2 -2
  51. package/lib/{Iframe-XlAb03_r.js → Iframe-CkUClxtI.js} +7 -7
  52. package/lib/{Iframe-Bk5OIlvy.cjs → Iframe-qCivhCR5.cjs} +1 -1
  53. package/lib/Iframe.cjs +1 -1
  54. package/lib/Iframe.js +3 -3
  55. package/lib/Image.cjs +1 -1
  56. package/lib/Image.js +6 -6
  57. package/lib/ImageGif.cjs +1 -1
  58. package/lib/ImageGif.js +36 -36
  59. package/lib/ImportWord.cjs +1 -1
  60. package/lib/ImportWord.js +13 -13
  61. package/lib/{Indent-ruPuj5xn.js → Indent-BTzj50Sf.js} +2 -2
  62. package/lib/{Indent-XaZNTsOk.cjs → Indent-DtgugDpq.cjs} +1 -1
  63. package/lib/Indent.cjs +1 -1
  64. package/lib/Indent.js +2 -2
  65. package/lib/Italic.cjs +1 -1
  66. package/lib/Italic.js +2 -2
  67. package/lib/{Katex-DKspCn-p.js → Katex-BuFwL_MA.js} +401 -422
  68. package/lib/Katex-RcbH2O5p.cjs +4 -0
  69. package/lib/Katex.cjs +1 -1
  70. package/lib/Katex.js +3 -3
  71. package/lib/LineHeight.cjs +1 -1
  72. package/lib/LineHeight.js +3 -3
  73. package/lib/Link.cjs +1 -1
  74. package/lib/Link.js +2 -2
  75. package/lib/{LinkEditBlock-DhesHreq.cjs → LinkEditBlock-CSKh_5n7.cjs} +1 -1
  76. package/lib/{LinkEditBlock-BWm2Ypt2.js → LinkEditBlock-DYOmu7jQ.js} +26 -26
  77. package/lib/MarkdownPaste.cjs +1 -1
  78. package/lib/MarkdownPaste.js +1 -1
  79. package/lib/Mention.cjs +1 -1
  80. package/lib/Mention.js +4 -4
  81. package/lib/Mermaid.cjs +2 -2
  82. package/lib/Mermaid.js +44 -43
  83. package/lib/MoreMark.cjs +1 -1
  84. package/lib/MoreMark.js +5 -5
  85. package/lib/OrderedList.cjs +1 -1
  86. package/lib/OrderedList.js +2 -2
  87. package/lib/SearchAndReplace.cjs +1 -1
  88. package/lib/SearchAndReplace.js +8 -8
  89. package/lib/SlashCommand.cjs +1 -1
  90. package/lib/SlashCommand.js +6 -6
  91. package/lib/{SlashCommandNodeView-Hf2DX4km.js → SlashCommandNodeView-CT_-28t6.js} +6 -6
  92. package/lib/{SlashCommandNodeView-CojfS61Q.cjs → SlashCommandNodeView-CYdYVjeb.cjs} +1 -1
  93. package/lib/Strike.cjs +1 -1
  94. package/lib/Strike.js +2 -2
  95. package/lib/{Table-BTkFUATL.js → Table-CEHV8gmO.js} +35 -35
  96. package/lib/{Table-C1_xLqV0.cjs → Table-DOl6C6To.cjs} +1 -1
  97. package/lib/Table.cjs +1 -1
  98. package/lib/Table.js +1 -1
  99. package/lib/TaskList.cjs +1 -1
  100. package/lib/TaskList.js +2 -2
  101. package/lib/TextAlign.cjs +1 -1
  102. package/lib/TextAlign.js +3 -3
  103. package/lib/TextDirection.cjs +1 -1
  104. package/lib/TextDirection.js +3 -3
  105. package/lib/TextUnderline.cjs +1 -1
  106. package/lib/TextUnderline.js +2 -2
  107. package/lib/{Twitter-Cj-0yyQQ.cjs → Twitter-DDuJwWdF.cjs} +1 -1
  108. package/lib/{Twitter-D5mUTILj.js → Twitter-DxqKzo3U.js} +9 -9
  109. package/lib/Twitter.cjs +1 -1
  110. package/lib/Twitter.js +3 -3
  111. package/lib/Video.cjs +1 -1
  112. package/lib/Video.js +4 -4
  113. package/lib/_commonjsHelpers-B4e78b8K.js +28 -0
  114. package/lib/_commonjsHelpers-BTDuMlIz.cjs +1 -0
  115. package/lib/bubble.cjs +6 -6
  116. package/lib/bubble.js +1841 -1701
  117. package/lib/{clsx-OumA9x-8.js → clsx-Bg-2aTKh.js} +11 -11
  118. package/lib/{clsx-BSBE1eoY.cjs → clsx-DSAWW32g.cjs} +1 -1
  119. package/lib/components/Bubble/RichTextBubbleCodeBlock.d.ts +1 -0
  120. package/lib/components/Bubble/index.d.ts +1 -0
  121. package/lib/{dropdown-menu-Bragdu5m.js → dropdown-menu-BYbds8yQ.js} +1 -1
  122. package/lib/{dropdown-menu-CUeq1boX.cjs → dropdown-menu-CoZZaqv5.cjs} +1 -1
  123. package/lib/extensions/CodeBlock/CodeBlock.d.ts +3 -18
  124. package/lib/{index-CDFAs4RT.js → index-B1SzsIsE.js} +1020 -1149
  125. package/lib/{index-CnePcUeF.cjs → index-C3dgmjIF.cjs} +1 -1
  126. package/lib/{index-DwSnESy-.cjs → index-C4WLt4NA.cjs} +4 -4
  127. package/lib/{index-BKlbc8Qo.js → index-CbkpBnTX.js} +1 -1
  128. package/lib/{index-CZ1_8JQQ.js → index-CjLxMm5d.js} +1 -1
  129. package/lib/{index-BVRHx_ha.js → index-D0EmqTpe.js} +74 -64
  130. package/lib/{index-cPEuL4Zr.js → index-DXtVL0al.js} +1 -1
  131. package/lib/index-DirFiHQ6.cjs +1 -0
  132. package/lib/{index-CMLwKzI0.cjs → index-DlxZt4_j.cjs} +1 -1
  133. package/lib/{index-B-7eHzaO.js → index-P5_MyY0i.js} +1 -1
  134. package/lib/{index-D7wfvzJg.cjs → index-TcJ2UKnv.cjs} +1 -1
  135. package/lib/{index-COCTP78Y.cjs → index-fbGGohBT.cjs} +1 -1
  136. package/lib/index.cjs +1 -1
  137. package/lib/index.js +12 -12
  138. package/lib/{popover-DCJpsZx0.cjs → popover-BaAurWOZ.cjs} +1 -1
  139. package/lib/{popover-C2BbhsXH.js → popover-CK54Ip2N.js} +1 -1
  140. package/lib/{renderNodeView-CmnUEfby.js → renderNodeView-CbxCTni3.js} +2 -2
  141. package/lib/{renderNodeView-DQjWzXDA.cjs → renderNodeView-DFVrJy0l.cjs} +1 -1
  142. package/lib/{separator-BuG1zwKa.cjs → separator-ByK1SKWn.cjs} +1 -1
  143. package/lib/{separator-lkMWuUvf.js → separator-XZA3-egy.js} +14 -14
  144. package/lib/style.css +1 -1
  145. package/lib/textarea--IMIy9VF.js +20 -0
  146. package/lib/textarea-mwHtiXJV.cjs +1 -0
  147. package/lib/{updatePosition-DYuAiqx-.js → updatePosition-BGD41Hbg.js} +2 -2
  148. package/lib/{updatePosition-D6AScA-1.cjs → updatePosition-CQE1ct18.cjs} +1 -1
  149. package/package.json +4 -2
  150. package/lib/Katex-BFIYLrwm.cjs +0 -4
  151. package/lib/delete-node-CosiBes5.cjs +0 -1
  152. package/lib/delete-node-eQHsyyhR.js +0 -24
  153. package/lib/extensions/CodeBlock/components/NodeViewCodeBlock/NodeViewCodeBlock.d.ts +0 -1
  154. package/lib/index-BLrMslr7.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";const Nt=require("@tiptap/pm/state"),At=require("@tiptap/pm/view"),Zt=require("./index-DwSnESy-.cjs"),qt=["top","right","bottom","left"],Ct=["start","end"],Pt=qt.reduce((t,e)=>t.concat(e,e+"-"+Ct[0],e+"-"+Ct[1]),[]),X=Math.min,M=Math.max,ct=Math.round,V=t=>({x:t,y:t}),te={left:"right",right:"left",bottom:"top",top:"bottom"};function wt(t,e,i){return M(t,X(e,i))}function j(t,e){return typeof t=="function"?t(e):t}function q(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function Ft(t){return t==="x"?"y":"x"}function yt(t){return t==="y"?"height":"width"}function H(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function vt(t){return Ft(H(t))}function Wt(t,e,i){i===void 0&&(i=!1);const n=F(t),o=vt(t),r=yt(o);let s=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=at(s)),[s,at(s)]}function ee(t){const e=at(t);return[lt(t),e,lt(e)]}function lt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Et=["left","right"],Dt=["right","left"],ne=["top","bottom"],oe=["bottom","top"];function ie(t,e,i){switch(t){case"top":case"bottom":return i?e?Dt:Et:e?Et:Dt;case"left":case"right":return e?ne:oe;default:return[]}}function re(t,e,i,n){const o=F(t);let r=ie(q(t),i==="start",n);return o&&(r=r.map(s=>s+"-"+o),e&&(r=r.concat(r.map(lt)))),r}function at(t){const e=q(t);return te[e]+t.slice(e.length)}function se(t){return{top:0,right:0,bottom:0,left:0,...t}}function bt(t){return typeof t!="number"?se(t):{top:t,right:t,bottom:t,left:t}}function Z(t){const{x:e,y:i,width:n,height:o}=t;return{width:n,height:o,top:i,left:e,right:e+n,bottom:i+o,x:e,y:i}}function Tt(t,e,i){let{reference:n,floating:o}=t;const r=H(e),s=vt(e),c=yt(s),a=q(e),g=r==="y",f=n.x+n.width/2-o.width/2,l=n.y+n.height/2-o.height/2,m=n[c]/2-o[c]/2;let u;switch(a){case"top":u={x:f,y:n.y-o.height};break;case"bottom":u={x:f,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:l};break;case"left":u={x:n.x-o.width,y:l};break;default:u={x:n.x,y:n.y}}switch(F(e)){case"start":u[s]-=m*(i&&g?-1:1);break;case"end":u[s]+=m*(i&&g?-1:1);break}return u}async function ce(t,e){var i;e===void 0&&(e={});const{x:n,y:o,platform:r,rects:s,elements:c,strategy:a}=t,{boundary:g="clippingAncestors",rootBoundary:f="viewport",elementContext:l="floating",altBoundary:m=!1,padding:u=0}=j(e,t),h=bt(u),p=c[m?l==="floating"?"reference":"floating":l],b=Z(await r.getClippingRect({element:(i=await(r.isElement==null?void 0:r.isElement(p)))==null||i?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:g,rootBoundary:f,strategy:a})),d=l==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),O=await(r.isElement==null?void 0:r.isElement(S))?await(r.getScale==null?void 0:r.getScale(S))||{x:1,y:1}:{x:1,y:1},_=Z(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:d,offsetParent:S,strategy:a}):d);return{top:(b.top-_.top+h.top)/O.y,bottom:(_.bottom-b.bottom+h.bottom)/O.y,left:(b.left-_.left+h.left)/O.x,right:(_.right-b.right+h.right)/O.x}}const le=50,ae=async(t,e,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:s}=i,c=s.detectOverflow?s:{...s,detectOverflow:ce},a=await(s.isRTL==null?void 0:s.isRTL(e));let g=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:l}=Tt(g,n,a),m=n,u=0;const h={};for(let v=0;v<r.length;v++){const p=r[v];if(!p)continue;const{name:b,fn:d}=p,{x:S,y:O,data:_,reset:D}=await d({x:f,y:l,initialPlacement:n,placement:m,strategy:o,middlewareData:h,rects:g,platform:c,elements:{reference:t,floating:e}});f=S??f,l=O??l,h[b]={...h[b],..._},D&&u<le&&(u++,typeof D=="object"&&(D.placement&&(m=D.placement),D.rects&&(g=D.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):D.rects),{x:f,y:l}=Tt(g,m,a)),v=-1)}return{x:f,y:l,placement:m,strategy:o,middlewareData:h}},fe=t=>({name:"arrow",options:t,async fn(e){const{x:i,y:n,placement:o,rects:r,platform:s,elements:c,middlewareData:a}=e,{element:g,padding:f=0}=j(t,e)||{};if(g==null)return{};const l=bt(f),m={x:i,y:n},u=vt(o),h=yt(u),v=await s.getDimensions(g),p=u==="y",b=p?"top":"left",d=p?"bottom":"right",S=p?"clientHeight":"clientWidth",O=r.reference[h]+r.reference[u]-m[u]-r.floating[h],_=m[u]-r.reference[u],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(g));let y=D?D[S]:0;(!y||!await(s.isElement==null?void 0:s.isElement(D)))&&(y=c.floating[S]||r.floating[h]);const A=O/2-_/2,C=y/2-v[h]/2-1,w=X(l[b],C),R=X(l[d],C),P=w,T=y-v[h]-R,L=y/2-v[h]/2+A,B=wt(P,L,T),x=!a.arrow&&F(o)!=null&&L!==B&&r.reference[h]/2-(L<P?w:R)-v[h]/2<0,$=x?L<P?L-P:L-T:0;return{[u]:m[u]+$,data:{[u]:B,centerOffset:L-B-$,...x&&{alignmentOffset:$}},reset:x}}});function ue(t,e,i){return(t?[...i.filter(o=>F(o)===t),...i.filter(o=>F(o)!==t)]:i.filter(o=>q(o)===o)).filter(o=>t?F(o)===t||(e?lt(o)!==o:!1):!0)}const de=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var i,n,o;const{rects:r,middlewareData:s,placement:c,platform:a,elements:g}=e,{crossAxis:f=!1,alignment:l,allowedPlacements:m=Pt,autoAlignment:u=!0,...h}=j(t,e),v=l!==void 0||m===Pt?ue(l||null,u,m):m,p=await a.detectOverflow(e,h),b=((i=s.autoPlacement)==null?void 0:i.index)||0,d=v[b];if(d==null)return{};const S=Wt(d,r,await(a.isRTL==null?void 0:a.isRTL(g.floating)));if(c!==d)return{reset:{placement:v[0]}};const O=[p[q(d)],p[S[0]],p[S[1]]],_=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:d,overflows:O}],D=v[b+1];if(D)return{data:{index:b+1,overflows:_},reset:{placement:D}};const y=_.map(w=>{const R=F(w.placement);return[w.placement,R&&f?w.overflows.slice(0,2).reduce((P,T)=>P+T,0):w.overflows[0],w.overflows]}).sort((w,R)=>w[1]-R[1]),C=((o=y.filter(w=>w[2].slice(0,F(w[0])?2:3).every(R=>R<=0))[0])==null?void 0:o[0])||y[0][0];return C!==c?{data:{index:b+1,overflows:_},reset:{placement:C}}:{}}}},ge=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var i,n;const{placement:o,middlewareData:r,rects:s,initialPlacement:c,platform:a,elements:g}=e,{mainAxis:f=!0,crossAxis:l=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...p}=j(t,e);if((i=r.arrow)!=null&&i.alignmentOffset)return{};const b=q(o),d=H(c),S=q(c)===c,O=await(a.isRTL==null?void 0:a.isRTL(g.floating)),_=m||(S||!v?[at(c)]:ee(c)),D=h!=="none";!m&&D&&_.push(...re(c,v,h,O));const y=[c,..._],A=await a.detectOverflow(e,p),C=[];let w=((n=r.flip)==null?void 0:n.overflows)||[];if(f&&C.push(A[b]),l){const L=Wt(o,s,O);C.push(A[L[0]],A[L[1]])}if(w=[...w,{placement:o,overflows:C}],!C.every(L=>L<=0)){var R,P;const L=(((R=r.flip)==null?void 0:R.index)||0)+1,B=y[L];if(B&&(!(l==="alignment"?d!==H(B):!1)||w.every(E=>H(E.placement)===d?E.overflows[0]>0:!0)))return{data:{index:L,overflows:w},reset:{placement:B}};let x=(P=w.filter($=>$.overflows[0]<=0).sort(($,E)=>$.overflows[1]-E.overflows[1])[0])==null?void 0:P.placement;if(!x)switch(u){case"bestFit":{var T;const $=(T=w.filter(E=>{if(D){const k=H(E.placement);return k===d||k==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(k=>k>0).reduce((k,G)=>k+G,0)]).sort((E,k)=>E[1]-k[1])[0])==null?void 0:T[0];$&&(x=$);break}case"initialPlacement":x=c;break}if(o!==x)return{reset:{placement:x}}}return{}}}};function Lt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function $t(t){return qt.some(e=>t[e]>=0)}const me=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:i,platform:n}=e,{strategy:o="referenceHidden",...r}=j(t,e);switch(o){case"referenceHidden":{const s=await n.detectOverflow(e,{...r,elementContext:"reference"}),c=Lt(s,i.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:$t(c)}}}case"escaped":{const s=await n.detectOverflow(e,{...r,altBoundary:!0}),c=Lt(s,i.floating);return{data:{escapedOffsets:c,escaped:$t(c)}}}default:return{}}}}};function It(t){const e=X(...t.map(r=>r.left)),i=X(...t.map(r=>r.top)),n=M(...t.map(r=>r.right)),o=M(...t.map(r=>r.bottom));return{x:e,y:i,width:n-e,height:o-i}}function he(t){const e=t.slice().sort((o,r)=>o.y-r.y),i=[];let n=null;for(let o=0;o<e.length;o++){const r=e[o];!n||r.y-n.y>n.height/2?i.push([r]):i[i.length-1].push(r),n=r}return i.map(o=>Z(It(o)))}const pe=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:i,elements:n,rects:o,platform:r,strategy:s}=e,{padding:c=2,x:a,y:g}=j(t,e),f=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(n.reference))||[]),l=he(f),m=Z(It(f)),u=bt(c);function h(){if(l.length===2&&l[0].left>l[1].right&&a!=null&&g!=null)return l.find(p=>a>p.left-u.left&&a<p.right+u.right&&g>p.top-u.top&&g<p.bottom+u.bottom)||m;if(l.length>=2){if(H(i)==="y"){const w=l[0],R=l[l.length-1],P=q(i)==="top",T=w.top,L=R.bottom,B=P?w.left:R.left,x=P?w.right:R.right,$=x-B,E=L-T;return{top:T,bottom:L,left:B,right:x,width:$,height:E,x:B,y:T}}const p=q(i)==="left",b=M(...l.map(w=>w.right)),d=X(...l.map(w=>w.left)),S=l.filter(w=>p?w.left===d:w.right===b),O=S[0].top,_=S[S.length-1].bottom,D=d,y=b,A=y-D,C=_-O;return{top:O,bottom:_,left:D,right:y,width:A,height:C,x:D,y:O}}return m}const v=await r.getElementRects({reference:{getBoundingClientRect:h},floating:n.floating,strategy:s});return o.reference.x!==v.reference.x||o.reference.y!==v.reference.y||o.reference.width!==v.reference.width||o.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},we=new Set(["left","top"]);async function xe(t,e){const{placement:i,platform:n,elements:o}=t,r=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=q(i),c=F(i),a=H(i)==="y",g=we.has(s)?-1:1,f=r&&a?-1:1,l=j(e,t);let{mainAxis:m,crossAxis:u,alignmentAxis:h}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return c&&typeof h=="number"&&(u=c==="end"?h*-1:h),a?{x:u*f,y:m*g}:{x:m*g,y:u*f}}const ye=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var i,n;const{x:o,y:r,placement:s,middlewareData:c}=e,a=await xe(e,t);return s===((i=c.offset)==null?void 0:i.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:o+a.x,y:r+a.y,data:{...a,placement:s}}}}},ve=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:o,platform:r}=e,{mainAxis:s=!0,crossAxis:c=!1,limiter:a={fn:b=>{let{x:d,y:S}=b;return{x:d,y:S}}},...g}=j(t,e),f={x:i,y:n},l=await r.detectOverflow(e,g),m=H(q(o)),u=Ft(m);let h=f[u],v=f[m];if(s){const b=u==="y"?"top":"left",d=u==="y"?"bottom":"right",S=h+l[b],O=h-l[d];h=wt(S,h,O)}if(c){const b=m==="y"?"top":"left",d=m==="y"?"bottom":"right",S=v+l[b],O=v-l[d];v=wt(S,v,O)}const p=a.fn({...e,[u]:h,[m]:v});return{...p,data:{x:p.x-i,y:p.y-n,enabled:{[u]:s,[m]:c}}}}}},be=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var i,n;const{placement:o,rects:r,platform:s,elements:c}=e,{apply:a=()=>{},...g}=j(t,e),f=await s.detectOverflow(e,g),l=q(o),m=F(o),u=H(o)==="y",{width:h,height:v}=r.floating;let p,b;l==="top"||l==="bottom"?(p=l,b=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(b=l,p=m==="end"?"top":"bottom");const d=v-f.top-f.bottom,S=h-f.left-f.right,O=X(v-f[p],d),_=X(h-f[b],S),D=!e.middlewareData.shift;let y=O,A=_;if((i=e.middlewareData.shift)!=null&&i.enabled.x&&(A=S),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(y=d),D&&!m){const w=M(f.left,0),R=M(f.right,0),P=M(f.top,0),T=M(f.bottom,0);u?A=h-2*(w!==0||R!==0?w+R:M(f.left,f.right)):y=v-2*(P!==0||T!==0?P+T:M(f.top,f.bottom))}await a({...e,availableWidth:A,availableHeight:y});const C=await s.getDimensions(c.floating);return h!==C.width||v!==C.height?{reset:{rects:!0}}:{}}}};function ft(){return typeof window<"u"}function et(t){return Ht(t)?(t.nodeName||"").toLowerCase():"#document"}function N(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(Ht(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ht(t){return ft()?t instanceof Node||t instanceof N(t).Node:!1}function W(t){return ft()?t instanceof Element||t instanceof N(t).Element:!1}function z(t){return ft()?t instanceof HTMLElement||t instanceof N(t).HTMLElement:!1}function _t(t){return!ft()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof N(t).ShadowRoot}function rt(t){const{overflow:e,overflowX:i,overflowY:n,display:o}=I(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&o!=="inline"&&o!=="contents"}function Re(t){return/^(table|td|th)$/.test(et(t))}function ut(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Se=/transform|translate|scale|rotate|perspective|filter/,Oe=/paint|layout|strict|content/,U=t=>!!t&&t!=="none";let ht;function Rt(t){const e=W(t)?I(t):t;return U(e.transform)||U(e.translate)||U(e.scale)||U(e.rotate)||U(e.perspective)||!St()&&(U(e.backdropFilter)||U(e.filter))||Se.test(e.willChange||"")||Oe.test(e.contain||"")}function Ae(t){let e=K(t);for(;z(e)&&!tt(e);){if(Rt(e))return e;if(ut(e))return null;e=K(e)}return null}function St(){return ht==null&&(ht=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ht}function tt(t){return/^(html|body|#document)$/.test(et(t))}function I(t){return N(t).getComputedStyle(t)}function dt(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_t(t)&&t.host||Y(t);return _t(e)?e.host:e}function Vt(t){const e=K(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:z(e)&&rt(e)?e:Vt(e)}function Xt(t,e,i){var n;e===void 0&&(e=[]);const o=Vt(t),r=o===((n=t.ownerDocument)==null?void 0:n.body),s=N(o);return r?(xt(s),e.concat(s,s.visualViewport||[],rt(o)?o:[],[])):e.concat(o,Xt(o,[]))}function xt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function jt(t){const e=I(t);let i=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=z(t),r=o?t.offsetWidth:i,s=o?t.offsetHeight:n,c=ct(i)!==r||ct(n)!==s;return c&&(i=r,n=s),{width:i,height:n,$:c}}function Yt(t){return W(t)?t:t.contextElement}function Q(t){const e=Yt(t);if(!z(e))return V(1);const i=e.getBoundingClientRect(),{width:n,height:o,$:r}=jt(e);let s=(r?ct(i.width):i.width)/n,c=(r?ct(i.height):i.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const Ce=V(0);function zt(t){const e=N(t);return!St()||!e.visualViewport?Ce:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Pe(t,e,i){return e===void 0&&(e=!1),!i||e&&i!==N(t)?!1:e}function it(t,e,i,n){e===void 0&&(e=!1),i===void 0&&(i=!1);const o=t.getBoundingClientRect(),r=Yt(t);let s=V(1);e&&(n?W(n)&&(s=Q(n)):s=Q(t));const c=Pe(r,i,n)?zt(r):V(0);let a=(o.left+c.x)/s.x,g=(o.top+c.y)/s.y,f=o.width/s.x,l=o.height/s.y;if(r){const m=N(r),u=n&&W(n)?N(n):n;let h=m,v=xt(h);for(;v&&n&&u!==h;){const p=Q(v),b=v.getBoundingClientRect(),d=I(v),S=b.left+(v.clientLeft+parseFloat(d.paddingLeft))*p.x,O=b.top+(v.clientTop+parseFloat(d.paddingTop))*p.y;a*=p.x,g*=p.y,f*=p.x,l*=p.y,a+=S,g+=O,h=N(v),v=xt(h)}}return Z({width:f,height:l,x:a,y:g})}function gt(t,e){const i=dt(t).scrollLeft;return e?e.left+i:it(Y(t)).left+i}function Kt(t,e){const i=t.getBoundingClientRect(),n=i.left+e.scrollLeft-gt(t,i),o=i.top+e.scrollTop;return{x:n,y:o}}function Ee(t){let{elements:e,rect:i,offsetParent:n,strategy:o}=t;const r=o==="fixed",s=Y(n),c=e?ut(e.floating):!1;if(n===s||c&&r)return i;let a={scrollLeft:0,scrollTop:0},g=V(1);const f=V(0),l=z(n);if((l||!l&&!r)&&((et(n)!=="body"||rt(s))&&(a=dt(n)),l)){const u=it(n);g=Q(n),f.x=u.x+n.clientLeft,f.y=u.y+n.clientTop}const m=s&&!l&&!r?Kt(s,a):V(0);return{width:i.width*g.x,height:i.height*g.y,x:i.x*g.x-a.scrollLeft*g.x+f.x+m.x,y:i.y*g.y-a.scrollTop*g.y+f.y+m.y}}function De(t){return Array.from(t.getClientRects())}function Te(t){const e=Y(t),i=dt(t),n=t.ownerDocument.body,o=M(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=M(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-i.scrollLeft+gt(t);const c=-i.scrollTop;return I(n).direction==="rtl"&&(s+=M(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:c}}const Bt=25;function Le(t,e){const i=N(t),n=Y(t),o=i.visualViewport;let r=n.clientWidth,s=n.clientHeight,c=0,a=0;if(o){r=o.width,s=o.height;const f=St();(!f||f&&e==="fixed")&&(c=o.offsetLeft,a=o.offsetTop)}const g=gt(n);if(g<=0){const f=n.ownerDocument,l=f.body,m=getComputedStyle(l),u=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(n.clientWidth-l.clientWidth-u);h<=Bt&&(r-=h)}else g<=Bt&&(r+=g);return{width:r,height:s,x:c,y:a}}function $e(t,e){const i=it(t,!0,e==="fixed"),n=i.top+t.clientTop,o=i.left+t.clientLeft,r=z(t)?Q(t):V(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,a=o*r.x,g=n*r.y;return{width:s,height:c,x:a,y:g}}function Mt(t,e,i){let n;if(e==="viewport")n=Le(t,i);else if(e==="document")n=Te(Y(t));else if(W(e))n=$e(e,i);else{const o=zt(t);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Z(n)}function Ut(t,e){const i=K(t);return i===e||!W(i)||tt(i)?!1:I(i).position==="fixed"||Ut(i,e)}function _e(t,e){const i=e.get(t);if(i)return i;let n=Xt(t,[]).filter(c=>W(c)&&et(c)!=="body"),o=null;const r=I(t).position==="fixed";let s=r?K(t):t;for(;W(s)&&!tt(s);){const c=I(s),a=Rt(s);!a&&c.position==="fixed"&&(o=null),(r?!a&&!o:!a&&c.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||rt(s)&&!a&&Ut(t,s))?n=n.filter(f=>f!==s):o=c,s=K(s)}return e.set(t,n),n}function Be(t){let{element:e,boundary:i,rootBoundary:n,strategy:o}=t;const s=[...i==="clippingAncestors"?ut(e)?[]:_e(e,this._c):[].concat(i),n],c=Mt(e,s[0],o);let a=c.top,g=c.right,f=c.bottom,l=c.left;for(let m=1;m<s.length;m++){const u=Mt(e,s[m],o);a=M(u.top,a),g=X(u.right,g),f=X(u.bottom,f),l=M(u.left,l)}return{width:g-l,height:f-a,x:l,y:a}}function Me(t){const{width:e,height:i}=jt(t);return{width:e,height:i}}function ke(t,e,i){const n=z(e),o=Y(e),r=i==="fixed",s=it(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const a=V(0);function g(){a.x=gt(o)}if(n||!n&&!r)if((et(e)!=="body"||rt(o))&&(c=dt(e)),n){const u=it(e,!0,r,e);a.x=u.x+e.clientLeft,a.y=u.y+e.clientTop}else o&&g();r&&!n&&o&&g();const f=o&&!n&&!r?Kt(o,c):V(0),l=s.left+c.scrollLeft-a.x-f.x,m=s.top+c.scrollTop-a.y-f.y;return{x:l,y:m,width:s.width,height:s.height}}function pt(t){return I(t).position==="static"}function kt(t,e){if(!z(t)||I(t).position==="fixed")return null;if(e)return e(t);let i=t.offsetParent;return Y(t)===i&&(i=i.ownerDocument.body),i}function Gt(t,e){const i=N(t);if(ut(t))return i;if(!z(t)){let o=K(t);for(;o&&!tt(o);){if(W(o)&&!pt(o))return o;o=K(o)}return i}let n=kt(t,e);for(;n&&Re(n)&&pt(n);)n=kt(n,e);return n&&tt(n)&&pt(n)&&!Rt(n)?i:n||Ae(t)||i}const Ne=async function(t){const e=this.getOffsetParent||Gt,i=this.getDimensions,n=await i(t.floating);return{reference:ke(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function qe(t){return I(t).direction==="rtl"}const Fe={convertOffsetParentRelativeRectToViewportRelativeRect:Ee,getDocumentElement:Y,getClippingRect:Be,getOffsetParent:Gt,getElementRects:Ne,getClientRects:De,getDimensions:Me,getScale:Q,isElement:W,isRTL:qe},We=ye,Ie=de,He=ve,Ve=ge,Xe=be,je=me,Ye=fe,ze=pe,Ke=(t,e,i)=>{const n=new Map,o={platform:Fe,...i},r={...o.platform,_c:n};return ae(t,e,{...o,platform:r})};function Ue(t){var e;const{char:i,allowSpaces:n,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,$position:c}=t,a=n&&!o,g=Zt.escapeForRegEx(i),f=new RegExp(`\\s${g}$`),l=s?"^":"",m=o?"":g,u=a?new RegExp(`${l}${g}.*?(?=\\s${m}|$)`,"gm"):new RegExp(`${l}(?:^)?${g}[^\\s${m}]*`,"gm"),h=((e=c.nodeBefore)==null?void 0:e.isText)&&c.nodeBefore.text;if(!h)return null;const v=c.pos-h.length,p=Array.from(h.matchAll(u)).pop();if(!p||p.input===void 0||p.index===void 0)return null;const b=p.input.slice(Math.max(0,p.index-1),p.index),d=new RegExp(`^[${r==null?void 0:r.join("")}\0]?$`).test(b);if(r!==null&&!d)return null;const S=v+p.index;let O=S+p[0].length;return a&&f.test(h.slice(O-1,O+1))&&(p[0]+=" ",O+=1),S<c.pos&&O>=c.pos?{range:{from:S,to:O},query:p[0].slice(i.length),text:p[0]}:null}var Ge=new Nt.PluginKey("suggestion");function Jt({pluginKey:t=Ge,editor:e,char:i="@",allowSpaces:n=!1,allowToIncludeChar:o=!1,allowedPrefixes:r=[" "],startOfLine:s=!1,decorationTag:c="span",decorationClass:a="suggestion",decorationContent:g="",decorationEmptyClass:f="is-empty",command:l=()=>null,items:m=()=>[],render:u=()=>({}),allow:h=()=>!0,findSuggestionMatch:v=Ue,shouldShow:p}){let b;const d=u==null?void 0:u(),S=()=>{const y=e.state.selection.$anchor.pos,A=e.view.coordsAtPos(y),{top:C,right:w,bottom:R,left:P}=A;try{return new DOMRect(P,C,w-P,R-C)}catch{return null}},O=(y,A)=>A?()=>{const C=t.getState(e.state),w=C==null?void 0:C.decorationId,R=y.dom.querySelector(`[data-decoration-id="${w}"]`);return(R==null?void 0:R.getBoundingClientRect())||null}:S;function _(y,A){var C;try{const R=t.getState(y.state),P=R!=null&&R.decorationId?y.dom.querySelector(`[data-decoration-id="${R.decorationId}"]`):null,T={editor:e,range:(R==null?void 0:R.range)||{from:0,to:0},query:(R==null?void 0:R.query)||null,text:(R==null?void 0:R.text)||null,items:[],command:L=>l({editor:e,range:(R==null?void 0:R.range)||{from:0,to:0},props:L}),decorationNode:P,clientRect:O(y,P)};(C=d==null?void 0:d.onExit)==null||C.call(d,T)}catch{}const w=y.state.tr.setMeta(A,{exit:!0});y.dispatch(w)}const D=new Nt.Plugin({key:t,view(){return{update:async(y,A)=>{var C,w,R,P,T,L,B;const x=(C=this.key)==null?void 0:C.getState(A),$=(w=this.key)==null?void 0:w.getState(y.state),E=x.active&&$.active&&x.range.from!==$.range.from,k=!x.active&&$.active,G=x.active&&!$.active,nt=!k&&!G&&x.query!==$.query,ot=k||E&&nt,st=nt||E,mt=G||E&&nt;if(!ot&&!st&&!mt)return;const J=mt&&!ot?x:$,Ot=y.dom.querySelector(`[data-decoration-id="${J.decorationId}"]`);b={editor:e,range:J.range,query:J.query,text:J.text,items:[],command:Qt=>l({editor:e,range:J.range,props:Qt}),decorationNode:Ot,clientRect:O(y,Ot)},ot&&((R=d==null?void 0:d.onBeforeStart)==null||R.call(d,b)),st&&((P=d==null?void 0:d.onBeforeUpdate)==null||P.call(d,b)),(st||ot)&&(b.items=await m({editor:e,query:J.query})),mt&&((T=d==null?void 0:d.onExit)==null||T.call(d,b)),st&&((L=d==null?void 0:d.onUpdate)==null||L.call(d,b)),ot&&((B=d==null?void 0:d.onStart)==null||B.call(d,b))},destroy:()=>{var y;b&&((y=d==null?void 0:d.onExit)==null||y.call(d,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(y,A,C,w){const{isEditable:R}=e,{composing:P}=e.view,{selection:T}=y,{empty:L,from:B}=T,x={...A},$=y.getMeta(t);if($&&$.exit)return x.active=!1,x.decorationId=null,x.range={from:0,to:0},x.query=null,x.text=null,x;if(x.composing=P,R&&(L||e.view.composing)){(B<A.range.from||B>A.range.to)&&!P&&!A.composing&&(x.active=!1);const E=v({char:i,allowSpaces:n,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,$position:T.$from}),k=`id_${Math.floor(Math.random()*4294967295)}`;E&&h({editor:e,state:w,range:E.range,isActive:A.active})&&(!p||p({editor:e,range:E.range,query:E.query,text:E.text,transaction:y}))?(x.active=!0,x.decorationId=A.decorationId?A.decorationId:k,x.range=E.range,x.query=E.query,x.text=E.text):x.active=!1}else x.active=!1;return x.active||(x.decorationId=null,x.range={from:0,to:0},x.query=null,x.text=null),x}},props:{handleKeyDown(y,A){var C,w,R,P;const{active:T,range:L}=D.getState(y.state);if(!T)return!1;if(A.key==="Escape"||A.key==="Esc"){const x=D.getState(y.state),$=(C=b==null?void 0:b.decorationNode)!=null?C:null,E=$??(x!=null&&x.decorationId?y.dom.querySelector(`[data-decoration-id="${x.decorationId}"]`):null);if(((w=d==null?void 0:d.onKeyDown)==null?void 0:w.call(d,{view:y,event:A,range:x.range}))||!1)return!0;const G={editor:e,range:x.range,query:x.query,text:x.text,items:[],command:nt=>l({editor:e,range:x.range,props:nt}),decorationNode:E,clientRect:E?()=>E.getBoundingClientRect()||null:null};return(R=d==null?void 0:d.onExit)==null||R.call(d,G),_(y,t),!0}return((P=d==null?void 0:d.onKeyDown)==null?void 0:P.call(d,{view:y,event:A,range:L}))||!1},decorations(y){const{active:A,range:C,decorationId:w,query:R}=D.getState(y);if(!A)return null;const P=!(R!=null&&R.length),T=[a];return P&&T.push(f),At.DecorationSet.create(y.doc,[At.Decoration.inline(C.from,C.to,{nodeName:c,class:T.join(" "),"data-decoration-id":w,"data-decoration-content":g})])}}});return D}var Je=Jt;exports.Suggestion=Jt;exports.arrow=Ye;exports.autoPlacement=Ie;exports.computePosition=Ke;exports.flip=Ve;exports.hide=je;exports.index_default=Je;exports.inline=ze;exports.offset=We;exports.shift=He;exports.size=Xe;
1
+ "use strict";const Nt=require("@tiptap/pm/state"),At=require("@tiptap/pm/view"),Zt=require("./index-C4WLt4NA.cjs"),qt=["top","right","bottom","left"],Ct=["start","end"],Pt=qt.reduce((t,e)=>t.concat(e,e+"-"+Ct[0],e+"-"+Ct[1]),[]),X=Math.min,M=Math.max,ct=Math.round,V=t=>({x:t,y:t}),te={left:"right",right:"left",bottom:"top",top:"bottom"};function wt(t,e,i){return M(t,X(e,i))}function j(t,e){return typeof t=="function"?t(e):t}function q(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function Ft(t){return t==="x"?"y":"x"}function yt(t){return t==="y"?"height":"width"}function H(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function vt(t){return Ft(H(t))}function Wt(t,e,i){i===void 0&&(i=!1);const n=F(t),o=vt(t),r=yt(o);let s=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=at(s)),[s,at(s)]}function ee(t){const e=at(t);return[lt(t),e,lt(e)]}function lt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Et=["left","right"],Dt=["right","left"],ne=["top","bottom"],oe=["bottom","top"];function ie(t,e,i){switch(t){case"top":case"bottom":return i?e?Dt:Et:e?Et:Dt;case"left":case"right":return e?ne:oe;default:return[]}}function re(t,e,i,n){const o=F(t);let r=ie(q(t),i==="start",n);return o&&(r=r.map(s=>s+"-"+o),e&&(r=r.concat(r.map(lt)))),r}function at(t){const e=q(t);return te[e]+t.slice(e.length)}function se(t){return{top:0,right:0,bottom:0,left:0,...t}}function bt(t){return typeof t!="number"?se(t):{top:t,right:t,bottom:t,left:t}}function Z(t){const{x:e,y:i,width:n,height:o}=t;return{width:n,height:o,top:i,left:e,right:e+n,bottom:i+o,x:e,y:i}}function Tt(t,e,i){let{reference:n,floating:o}=t;const r=H(e),s=vt(e),c=yt(s),a=q(e),g=r==="y",f=n.x+n.width/2-o.width/2,l=n.y+n.height/2-o.height/2,m=n[c]/2-o[c]/2;let u;switch(a){case"top":u={x:f,y:n.y-o.height};break;case"bottom":u={x:f,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:l};break;case"left":u={x:n.x-o.width,y:l};break;default:u={x:n.x,y:n.y}}switch(F(e)){case"start":u[s]-=m*(i&&g?-1:1);break;case"end":u[s]+=m*(i&&g?-1:1);break}return u}async function ce(t,e){var i;e===void 0&&(e={});const{x:n,y:o,platform:r,rects:s,elements:c,strategy:a}=t,{boundary:g="clippingAncestors",rootBoundary:f="viewport",elementContext:l="floating",altBoundary:m=!1,padding:u=0}=j(e,t),h=bt(u),p=c[m?l==="floating"?"reference":"floating":l],b=Z(await r.getClippingRect({element:(i=await(r.isElement==null?void 0:r.isElement(p)))==null||i?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:g,rootBoundary:f,strategy:a})),d=l==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),O=await(r.isElement==null?void 0:r.isElement(S))?await(r.getScale==null?void 0:r.getScale(S))||{x:1,y:1}:{x:1,y:1},_=Z(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:d,offsetParent:S,strategy:a}):d);return{top:(b.top-_.top+h.top)/O.y,bottom:(_.bottom-b.bottom+h.bottom)/O.y,left:(b.left-_.left+h.left)/O.x,right:(_.right-b.right+h.right)/O.x}}const le=50,ae=async(t,e,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:s}=i,c=s.detectOverflow?s:{...s,detectOverflow:ce},a=await(s.isRTL==null?void 0:s.isRTL(e));let g=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:l}=Tt(g,n,a),m=n,u=0;const h={};for(let v=0;v<r.length;v++){const p=r[v];if(!p)continue;const{name:b,fn:d}=p,{x:S,y:O,data:_,reset:D}=await d({x:f,y:l,initialPlacement:n,placement:m,strategy:o,middlewareData:h,rects:g,platform:c,elements:{reference:t,floating:e}});f=S??f,l=O??l,h[b]={...h[b],..._},D&&u<le&&(u++,typeof D=="object"&&(D.placement&&(m=D.placement),D.rects&&(g=D.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:o}):D.rects),{x:f,y:l}=Tt(g,m,a)),v=-1)}return{x:f,y:l,placement:m,strategy:o,middlewareData:h}},fe=t=>({name:"arrow",options:t,async fn(e){const{x:i,y:n,placement:o,rects:r,platform:s,elements:c,middlewareData:a}=e,{element:g,padding:f=0}=j(t,e)||{};if(g==null)return{};const l=bt(f),m={x:i,y:n},u=vt(o),h=yt(u),v=await s.getDimensions(g),p=u==="y",b=p?"top":"left",d=p?"bottom":"right",S=p?"clientHeight":"clientWidth",O=r.reference[h]+r.reference[u]-m[u]-r.floating[h],_=m[u]-r.reference[u],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(g));let y=D?D[S]:0;(!y||!await(s.isElement==null?void 0:s.isElement(D)))&&(y=c.floating[S]||r.floating[h]);const A=O/2-_/2,C=y/2-v[h]/2-1,w=X(l[b],C),R=X(l[d],C),P=w,T=y-v[h]-R,L=y/2-v[h]/2+A,B=wt(P,L,T),x=!a.arrow&&F(o)!=null&&L!==B&&r.reference[h]/2-(L<P?w:R)-v[h]/2<0,$=x?L<P?L-P:L-T:0;return{[u]:m[u]+$,data:{[u]:B,centerOffset:L-B-$,...x&&{alignmentOffset:$}},reset:x}}});function ue(t,e,i){return(t?[...i.filter(o=>F(o)===t),...i.filter(o=>F(o)!==t)]:i.filter(o=>q(o)===o)).filter(o=>t?F(o)===t||(e?lt(o)!==o:!1):!0)}const de=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var i,n,o;const{rects:r,middlewareData:s,placement:c,platform:a,elements:g}=e,{crossAxis:f=!1,alignment:l,allowedPlacements:m=Pt,autoAlignment:u=!0,...h}=j(t,e),v=l!==void 0||m===Pt?ue(l||null,u,m):m,p=await a.detectOverflow(e,h),b=((i=s.autoPlacement)==null?void 0:i.index)||0,d=v[b];if(d==null)return{};const S=Wt(d,r,await(a.isRTL==null?void 0:a.isRTL(g.floating)));if(c!==d)return{reset:{placement:v[0]}};const O=[p[q(d)],p[S[0]],p[S[1]]],_=[...((n=s.autoPlacement)==null?void 0:n.overflows)||[],{placement:d,overflows:O}],D=v[b+1];if(D)return{data:{index:b+1,overflows:_},reset:{placement:D}};const y=_.map(w=>{const R=F(w.placement);return[w.placement,R&&f?w.overflows.slice(0,2).reduce((P,T)=>P+T,0):w.overflows[0],w.overflows]}).sort((w,R)=>w[1]-R[1]),C=((o=y.filter(w=>w[2].slice(0,F(w[0])?2:3).every(R=>R<=0))[0])==null?void 0:o[0])||y[0][0];return C!==c?{data:{index:b+1,overflows:_},reset:{placement:C}}:{}}}},ge=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var i,n;const{placement:o,middlewareData:r,rects:s,initialPlacement:c,platform:a,elements:g}=e,{mainAxis:f=!0,crossAxis:l=!0,fallbackPlacements:m,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...p}=j(t,e);if((i=r.arrow)!=null&&i.alignmentOffset)return{};const b=q(o),d=H(c),S=q(c)===c,O=await(a.isRTL==null?void 0:a.isRTL(g.floating)),_=m||(S||!v?[at(c)]:ee(c)),D=h!=="none";!m&&D&&_.push(...re(c,v,h,O));const y=[c,..._],A=await a.detectOverflow(e,p),C=[];let w=((n=r.flip)==null?void 0:n.overflows)||[];if(f&&C.push(A[b]),l){const L=Wt(o,s,O);C.push(A[L[0]],A[L[1]])}if(w=[...w,{placement:o,overflows:C}],!C.every(L=>L<=0)){var R,P;const L=(((R=r.flip)==null?void 0:R.index)||0)+1,B=y[L];if(B&&(!(l==="alignment"?d!==H(B):!1)||w.every(E=>H(E.placement)===d?E.overflows[0]>0:!0)))return{data:{index:L,overflows:w},reset:{placement:B}};let x=(P=w.filter($=>$.overflows[0]<=0).sort(($,E)=>$.overflows[1]-E.overflows[1])[0])==null?void 0:P.placement;if(!x)switch(u){case"bestFit":{var T;const $=(T=w.filter(E=>{if(D){const k=H(E.placement);return k===d||k==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(k=>k>0).reduce((k,G)=>k+G,0)]).sort((E,k)=>E[1]-k[1])[0])==null?void 0:T[0];$&&(x=$);break}case"initialPlacement":x=c;break}if(o!==x)return{reset:{placement:x}}}return{}}}};function Lt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function $t(t){return qt.some(e=>t[e]>=0)}const me=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:i,platform:n}=e,{strategy:o="referenceHidden",...r}=j(t,e);switch(o){case"referenceHidden":{const s=await n.detectOverflow(e,{...r,elementContext:"reference"}),c=Lt(s,i.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:$t(c)}}}case"escaped":{const s=await n.detectOverflow(e,{...r,altBoundary:!0}),c=Lt(s,i.floating);return{data:{escapedOffsets:c,escaped:$t(c)}}}default:return{}}}}};function It(t){const e=X(...t.map(r=>r.left)),i=X(...t.map(r=>r.top)),n=M(...t.map(r=>r.right)),o=M(...t.map(r=>r.bottom));return{x:e,y:i,width:n-e,height:o-i}}function he(t){const e=t.slice().sort((o,r)=>o.y-r.y),i=[];let n=null;for(let o=0;o<e.length;o++){const r=e[o];!n||r.y-n.y>n.height/2?i.push([r]):i[i.length-1].push(r),n=r}return i.map(o=>Z(It(o)))}const pe=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:i,elements:n,rects:o,platform:r,strategy:s}=e,{padding:c=2,x:a,y:g}=j(t,e),f=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(n.reference))||[]),l=he(f),m=Z(It(f)),u=bt(c);function h(){if(l.length===2&&l[0].left>l[1].right&&a!=null&&g!=null)return l.find(p=>a>p.left-u.left&&a<p.right+u.right&&g>p.top-u.top&&g<p.bottom+u.bottom)||m;if(l.length>=2){if(H(i)==="y"){const w=l[0],R=l[l.length-1],P=q(i)==="top",T=w.top,L=R.bottom,B=P?w.left:R.left,x=P?w.right:R.right,$=x-B,E=L-T;return{top:T,bottom:L,left:B,right:x,width:$,height:E,x:B,y:T}}const p=q(i)==="left",b=M(...l.map(w=>w.right)),d=X(...l.map(w=>w.left)),S=l.filter(w=>p?w.left===d:w.right===b),O=S[0].top,_=S[S.length-1].bottom,D=d,y=b,A=y-D,C=_-O;return{top:O,bottom:_,left:D,right:y,width:A,height:C,x:D,y:O}}return m}const v=await r.getElementRects({reference:{getBoundingClientRect:h},floating:n.floating,strategy:s});return o.reference.x!==v.reference.x||o.reference.y!==v.reference.y||o.reference.width!==v.reference.width||o.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},we=new Set(["left","top"]);async function xe(t,e){const{placement:i,platform:n,elements:o}=t,r=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=q(i),c=F(i),a=H(i)==="y",g=we.has(s)?-1:1,f=r&&a?-1:1,l=j(e,t);let{mainAxis:m,crossAxis:u,alignmentAxis:h}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return c&&typeof h=="number"&&(u=c==="end"?h*-1:h),a?{x:u*f,y:m*g}:{x:m*g,y:u*f}}const ye=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var i,n;const{x:o,y:r,placement:s,middlewareData:c}=e,a=await xe(e,t);return s===((i=c.offset)==null?void 0:i.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:o+a.x,y:r+a.y,data:{...a,placement:s}}}}},ve=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:o,platform:r}=e,{mainAxis:s=!0,crossAxis:c=!1,limiter:a={fn:b=>{let{x:d,y:S}=b;return{x:d,y:S}}},...g}=j(t,e),f={x:i,y:n},l=await r.detectOverflow(e,g),m=H(q(o)),u=Ft(m);let h=f[u],v=f[m];if(s){const b=u==="y"?"top":"left",d=u==="y"?"bottom":"right",S=h+l[b],O=h-l[d];h=wt(S,h,O)}if(c){const b=m==="y"?"top":"left",d=m==="y"?"bottom":"right",S=v+l[b],O=v-l[d];v=wt(S,v,O)}const p=a.fn({...e,[u]:h,[m]:v});return{...p,data:{x:p.x-i,y:p.y-n,enabled:{[u]:s,[m]:c}}}}}},be=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var i,n;const{placement:o,rects:r,platform:s,elements:c}=e,{apply:a=()=>{},...g}=j(t,e),f=await s.detectOverflow(e,g),l=q(o),m=F(o),u=H(o)==="y",{width:h,height:v}=r.floating;let p,b;l==="top"||l==="bottom"?(p=l,b=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(b=l,p=m==="end"?"top":"bottom");const d=v-f.top-f.bottom,S=h-f.left-f.right,O=X(v-f[p],d),_=X(h-f[b],S),D=!e.middlewareData.shift;let y=O,A=_;if((i=e.middlewareData.shift)!=null&&i.enabled.x&&(A=S),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(y=d),D&&!m){const w=M(f.left,0),R=M(f.right,0),P=M(f.top,0),T=M(f.bottom,0);u?A=h-2*(w!==0||R!==0?w+R:M(f.left,f.right)):y=v-2*(P!==0||T!==0?P+T:M(f.top,f.bottom))}await a({...e,availableWidth:A,availableHeight:y});const C=await s.getDimensions(c.floating);return h!==C.width||v!==C.height?{reset:{rects:!0}}:{}}}};function ft(){return typeof window<"u"}function et(t){return Ht(t)?(t.nodeName||"").toLowerCase():"#document"}function N(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(Ht(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ht(t){return ft()?t instanceof Node||t instanceof N(t).Node:!1}function W(t){return ft()?t instanceof Element||t instanceof N(t).Element:!1}function z(t){return ft()?t instanceof HTMLElement||t instanceof N(t).HTMLElement:!1}function _t(t){return!ft()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof N(t).ShadowRoot}function rt(t){const{overflow:e,overflowX:i,overflowY:n,display:o}=I(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&o!=="inline"&&o!=="contents"}function Re(t){return/^(table|td|th)$/.test(et(t))}function ut(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Se=/transform|translate|scale|rotate|perspective|filter/,Oe=/paint|layout|strict|content/,U=t=>!!t&&t!=="none";let ht;function Rt(t){const e=W(t)?I(t):t;return U(e.transform)||U(e.translate)||U(e.scale)||U(e.rotate)||U(e.perspective)||!St()&&(U(e.backdropFilter)||U(e.filter))||Se.test(e.willChange||"")||Oe.test(e.contain||"")}function Ae(t){let e=K(t);for(;z(e)&&!tt(e);){if(Rt(e))return e;if(ut(e))return null;e=K(e)}return null}function St(){return ht==null&&(ht=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ht}function tt(t){return/^(html|body|#document)$/.test(et(t))}function I(t){return N(t).getComputedStyle(t)}function dt(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_t(t)&&t.host||Y(t);return _t(e)?e.host:e}function Vt(t){const e=K(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:z(e)&&rt(e)?e:Vt(e)}function Xt(t,e,i){var n;e===void 0&&(e=[]);const o=Vt(t),r=o===((n=t.ownerDocument)==null?void 0:n.body),s=N(o);return r?(xt(s),e.concat(s,s.visualViewport||[],rt(o)?o:[],[])):e.concat(o,Xt(o,[]))}function xt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function jt(t){const e=I(t);let i=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=z(t),r=o?t.offsetWidth:i,s=o?t.offsetHeight:n,c=ct(i)!==r||ct(n)!==s;return c&&(i=r,n=s),{width:i,height:n,$:c}}function Yt(t){return W(t)?t:t.contextElement}function Q(t){const e=Yt(t);if(!z(e))return V(1);const i=e.getBoundingClientRect(),{width:n,height:o,$:r}=jt(e);let s=(r?ct(i.width):i.width)/n,c=(r?ct(i.height):i.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const Ce=V(0);function zt(t){const e=N(t);return!St()||!e.visualViewport?Ce:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Pe(t,e,i){return e===void 0&&(e=!1),!i||e&&i!==N(t)?!1:e}function it(t,e,i,n){e===void 0&&(e=!1),i===void 0&&(i=!1);const o=t.getBoundingClientRect(),r=Yt(t);let s=V(1);e&&(n?W(n)&&(s=Q(n)):s=Q(t));const c=Pe(r,i,n)?zt(r):V(0);let a=(o.left+c.x)/s.x,g=(o.top+c.y)/s.y,f=o.width/s.x,l=o.height/s.y;if(r){const m=N(r),u=n&&W(n)?N(n):n;let h=m,v=xt(h);for(;v&&n&&u!==h;){const p=Q(v),b=v.getBoundingClientRect(),d=I(v),S=b.left+(v.clientLeft+parseFloat(d.paddingLeft))*p.x,O=b.top+(v.clientTop+parseFloat(d.paddingTop))*p.y;a*=p.x,g*=p.y,f*=p.x,l*=p.y,a+=S,g+=O,h=N(v),v=xt(h)}}return Z({width:f,height:l,x:a,y:g})}function gt(t,e){const i=dt(t).scrollLeft;return e?e.left+i:it(Y(t)).left+i}function Kt(t,e){const i=t.getBoundingClientRect(),n=i.left+e.scrollLeft-gt(t,i),o=i.top+e.scrollTop;return{x:n,y:o}}function Ee(t){let{elements:e,rect:i,offsetParent:n,strategy:o}=t;const r=o==="fixed",s=Y(n),c=e?ut(e.floating):!1;if(n===s||c&&r)return i;let a={scrollLeft:0,scrollTop:0},g=V(1);const f=V(0),l=z(n);if((l||!l&&!r)&&((et(n)!=="body"||rt(s))&&(a=dt(n)),l)){const u=it(n);g=Q(n),f.x=u.x+n.clientLeft,f.y=u.y+n.clientTop}const m=s&&!l&&!r?Kt(s,a):V(0);return{width:i.width*g.x,height:i.height*g.y,x:i.x*g.x-a.scrollLeft*g.x+f.x+m.x,y:i.y*g.y-a.scrollTop*g.y+f.y+m.y}}function De(t){return Array.from(t.getClientRects())}function Te(t){const e=Y(t),i=dt(t),n=t.ownerDocument.body,o=M(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=M(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-i.scrollLeft+gt(t);const c=-i.scrollTop;return I(n).direction==="rtl"&&(s+=M(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:c}}const Bt=25;function Le(t,e){const i=N(t),n=Y(t),o=i.visualViewport;let r=n.clientWidth,s=n.clientHeight,c=0,a=0;if(o){r=o.width,s=o.height;const f=St();(!f||f&&e==="fixed")&&(c=o.offsetLeft,a=o.offsetTop)}const g=gt(n);if(g<=0){const f=n.ownerDocument,l=f.body,m=getComputedStyle(l),u=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(n.clientWidth-l.clientWidth-u);h<=Bt&&(r-=h)}else g<=Bt&&(r+=g);return{width:r,height:s,x:c,y:a}}function $e(t,e){const i=it(t,!0,e==="fixed"),n=i.top+t.clientTop,o=i.left+t.clientLeft,r=z(t)?Q(t):V(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,a=o*r.x,g=n*r.y;return{width:s,height:c,x:a,y:g}}function Mt(t,e,i){let n;if(e==="viewport")n=Le(t,i);else if(e==="document")n=Te(Y(t));else if(W(e))n=$e(e,i);else{const o=zt(t);n={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Z(n)}function Ut(t,e){const i=K(t);return i===e||!W(i)||tt(i)?!1:I(i).position==="fixed"||Ut(i,e)}function _e(t,e){const i=e.get(t);if(i)return i;let n=Xt(t,[]).filter(c=>W(c)&&et(c)!=="body"),o=null;const r=I(t).position==="fixed";let s=r?K(t):t;for(;W(s)&&!tt(s);){const c=I(s),a=Rt(s);!a&&c.position==="fixed"&&(o=null),(r?!a&&!o:!a&&c.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||rt(s)&&!a&&Ut(t,s))?n=n.filter(f=>f!==s):o=c,s=K(s)}return e.set(t,n),n}function Be(t){let{element:e,boundary:i,rootBoundary:n,strategy:o}=t;const s=[...i==="clippingAncestors"?ut(e)?[]:_e(e,this._c):[].concat(i),n],c=Mt(e,s[0],o);let a=c.top,g=c.right,f=c.bottom,l=c.left;for(let m=1;m<s.length;m++){const u=Mt(e,s[m],o);a=M(u.top,a),g=X(u.right,g),f=X(u.bottom,f),l=M(u.left,l)}return{width:g-l,height:f-a,x:l,y:a}}function Me(t){const{width:e,height:i}=jt(t);return{width:e,height:i}}function ke(t,e,i){const n=z(e),o=Y(e),r=i==="fixed",s=it(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const a=V(0);function g(){a.x=gt(o)}if(n||!n&&!r)if((et(e)!=="body"||rt(o))&&(c=dt(e)),n){const u=it(e,!0,r,e);a.x=u.x+e.clientLeft,a.y=u.y+e.clientTop}else o&&g();r&&!n&&o&&g();const f=o&&!n&&!r?Kt(o,c):V(0),l=s.left+c.scrollLeft-a.x-f.x,m=s.top+c.scrollTop-a.y-f.y;return{x:l,y:m,width:s.width,height:s.height}}function pt(t){return I(t).position==="static"}function kt(t,e){if(!z(t)||I(t).position==="fixed")return null;if(e)return e(t);let i=t.offsetParent;return Y(t)===i&&(i=i.ownerDocument.body),i}function Gt(t,e){const i=N(t);if(ut(t))return i;if(!z(t)){let o=K(t);for(;o&&!tt(o);){if(W(o)&&!pt(o))return o;o=K(o)}return i}let n=kt(t,e);for(;n&&Re(n)&&pt(n);)n=kt(n,e);return n&&tt(n)&&pt(n)&&!Rt(n)?i:n||Ae(t)||i}const Ne=async function(t){const e=this.getOffsetParent||Gt,i=this.getDimensions,n=await i(t.floating);return{reference:ke(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function qe(t){return I(t).direction==="rtl"}const Fe={convertOffsetParentRelativeRectToViewportRelativeRect:Ee,getDocumentElement:Y,getClippingRect:Be,getOffsetParent:Gt,getElementRects:Ne,getClientRects:De,getDimensions:Me,getScale:Q,isElement:W,isRTL:qe},We=ye,Ie=de,He=ve,Ve=ge,Xe=be,je=me,Ye=fe,ze=pe,Ke=(t,e,i)=>{const n=new Map,o={platform:Fe,...i},r={...o.platform,_c:n};return ae(t,e,{...o,platform:r})};function Ue(t){var e;const{char:i,allowSpaces:n,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,$position:c}=t,a=n&&!o,g=Zt.escapeForRegEx(i),f=new RegExp(`\\s${g}$`),l=s?"^":"",m=o?"":g,u=a?new RegExp(`${l}${g}.*?(?=\\s${m}|$)`,"gm"):new RegExp(`${l}(?:^)?${g}[^\\s${m}]*`,"gm"),h=((e=c.nodeBefore)==null?void 0:e.isText)&&c.nodeBefore.text;if(!h)return null;const v=c.pos-h.length,p=Array.from(h.matchAll(u)).pop();if(!p||p.input===void 0||p.index===void 0)return null;const b=p.input.slice(Math.max(0,p.index-1),p.index),d=new RegExp(`^[${r==null?void 0:r.join("")}\0]?$`).test(b);if(r!==null&&!d)return null;const S=v+p.index;let O=S+p[0].length;return a&&f.test(h.slice(O-1,O+1))&&(p[0]+=" ",O+=1),S<c.pos&&O>=c.pos?{range:{from:S,to:O},query:p[0].slice(i.length),text:p[0]}:null}var Ge=new Nt.PluginKey("suggestion");function Jt({pluginKey:t=Ge,editor:e,char:i="@",allowSpaces:n=!1,allowToIncludeChar:o=!1,allowedPrefixes:r=[" "],startOfLine:s=!1,decorationTag:c="span",decorationClass:a="suggestion",decorationContent:g="",decorationEmptyClass:f="is-empty",command:l=()=>null,items:m=()=>[],render:u=()=>({}),allow:h=()=>!0,findSuggestionMatch:v=Ue,shouldShow:p}){let b;const d=u==null?void 0:u(),S=()=>{const y=e.state.selection.$anchor.pos,A=e.view.coordsAtPos(y),{top:C,right:w,bottom:R,left:P}=A;try{return new DOMRect(P,C,w-P,R-C)}catch{return null}},O=(y,A)=>A?()=>{const C=t.getState(e.state),w=C==null?void 0:C.decorationId,R=y.dom.querySelector(`[data-decoration-id="${w}"]`);return(R==null?void 0:R.getBoundingClientRect())||null}:S;function _(y,A){var C;try{const R=t.getState(y.state),P=R!=null&&R.decorationId?y.dom.querySelector(`[data-decoration-id="${R.decorationId}"]`):null,T={editor:e,range:(R==null?void 0:R.range)||{from:0,to:0},query:(R==null?void 0:R.query)||null,text:(R==null?void 0:R.text)||null,items:[],command:L=>l({editor:e,range:(R==null?void 0:R.range)||{from:0,to:0},props:L}),decorationNode:P,clientRect:O(y,P)};(C=d==null?void 0:d.onExit)==null||C.call(d,T)}catch{}const w=y.state.tr.setMeta(A,{exit:!0});y.dispatch(w)}const D=new Nt.Plugin({key:t,view(){return{update:async(y,A)=>{var C,w,R,P,T,L,B;const x=(C=this.key)==null?void 0:C.getState(A),$=(w=this.key)==null?void 0:w.getState(y.state),E=x.active&&$.active&&x.range.from!==$.range.from,k=!x.active&&$.active,G=x.active&&!$.active,nt=!k&&!G&&x.query!==$.query,ot=k||E&&nt,st=nt||E,mt=G||E&&nt;if(!ot&&!st&&!mt)return;const J=mt&&!ot?x:$,Ot=y.dom.querySelector(`[data-decoration-id="${J.decorationId}"]`);b={editor:e,range:J.range,query:J.query,text:J.text,items:[],command:Qt=>l({editor:e,range:J.range,props:Qt}),decorationNode:Ot,clientRect:O(y,Ot)},ot&&((R=d==null?void 0:d.onBeforeStart)==null||R.call(d,b)),st&&((P=d==null?void 0:d.onBeforeUpdate)==null||P.call(d,b)),(st||ot)&&(b.items=await m({editor:e,query:J.query})),mt&&((T=d==null?void 0:d.onExit)==null||T.call(d,b)),st&&((L=d==null?void 0:d.onUpdate)==null||L.call(d,b)),ot&&((B=d==null?void 0:d.onStart)==null||B.call(d,b))},destroy:()=>{var y;b&&((y=d==null?void 0:d.onExit)==null||y.call(d,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(y,A,C,w){const{isEditable:R}=e,{composing:P}=e.view,{selection:T}=y,{empty:L,from:B}=T,x={...A},$=y.getMeta(t);if($&&$.exit)return x.active=!1,x.decorationId=null,x.range={from:0,to:0},x.query=null,x.text=null,x;if(x.composing=P,R&&(L||e.view.composing)){(B<A.range.from||B>A.range.to)&&!P&&!A.composing&&(x.active=!1);const E=v({char:i,allowSpaces:n,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,$position:T.$from}),k=`id_${Math.floor(Math.random()*4294967295)}`;E&&h({editor:e,state:w,range:E.range,isActive:A.active})&&(!p||p({editor:e,range:E.range,query:E.query,text:E.text,transaction:y}))?(x.active=!0,x.decorationId=A.decorationId?A.decorationId:k,x.range=E.range,x.query=E.query,x.text=E.text):x.active=!1}else x.active=!1;return x.active||(x.decorationId=null,x.range={from:0,to:0},x.query=null,x.text=null),x}},props:{handleKeyDown(y,A){var C,w,R,P;const{active:T,range:L}=D.getState(y.state);if(!T)return!1;if(A.key==="Escape"||A.key==="Esc"){const x=D.getState(y.state),$=(C=b==null?void 0:b.decorationNode)!=null?C:null,E=$??(x!=null&&x.decorationId?y.dom.querySelector(`[data-decoration-id="${x.decorationId}"]`):null);if(((w=d==null?void 0:d.onKeyDown)==null?void 0:w.call(d,{view:y,event:A,range:x.range}))||!1)return!0;const G={editor:e,range:x.range,query:x.query,text:x.text,items:[],command:nt=>l({editor:e,range:x.range,props:nt}),decorationNode:E,clientRect:E?()=>E.getBoundingClientRect()||null:null};return(R=d==null?void 0:d.onExit)==null||R.call(d,G),_(y,t),!0}return((P=d==null?void 0:d.onKeyDown)==null?void 0:P.call(d,{view:y,event:A,range:L}))||!1},decorations(y){const{active:A,range:C,decorationId:w,query:R}=D.getState(y);if(!A)return null;const P=!(R!=null&&R.length),T=[a];return P&&T.push(f),At.DecorationSet.create(y.doc,[At.Decoration.inline(C.from,C.to,{nodeName:c,class:T.join(" "),"data-decoration-id":w,"data-decoration-content":g})])}}});return D}var Je=Jt;exports.Suggestion=Jt;exports.arrow=Ye;exports.autoPlacement=Ie;exports.computePosition=Ke;exports.flip=Ve;exports.hide=je;exports.index_default=Je;exports.inline=ze;exports.offset=We;exports.shift=He;exports.size=Xe;
@@ -1,4 +1,4 @@
1
- "use strict";const u=require("./index-DwSnESy-.cjs");var D=Object.defineProperty,B=(t,e)=>{for(var s in e)D(t,s,{get:e[s],enumerable:!0})},j="listItem",T="textStyle",A=/^\s*([-+*])\s$/,C=u.Node3.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",u.mergeAttributes(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
1
+ "use strict";const u=require("./index-C4WLt4NA.cjs");var D=Object.defineProperty,B=(t,e)=>{for(var s in e)D(t,s,{get:e[s],enumerable:!0})},j="listItem",T="textStyle",A=/^\s*([-+*])\s$/,C=u.Node3.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",u.mergeAttributes(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
2
2
  `):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(j,this.editor.getAttributes(T)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=u.wrappingInputRule({find:A,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=u.wrappingInputRule({find:A,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(T),editor:this.editor})),[t]}}),K=u.Node3.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",u.mergeAttributes(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var s;if(t.type!=="list_item")return[];const n=(s=e.parseBlockChildren)!=null?s:e.parseChildren;let r=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(d=>d.type==="paragraph"))r=n(t.tokens);else{const d=t.tokens[0];if(d&&d.type==="text"&&d.tokens&&d.tokens.length>0){if(r=[{type:"paragraph",content:e.parseInline(d.tokens)}],t.tokens.length>1){const p=t.tokens.slice(1),h=n(p);r.push(...h)}}else r=n(t.tokens)}return r.length===0&&(r=[{type:"paragraph",content:[]}]),{type:"listItem",content:r}},renderMarkdown:(t,e,s)=>u.renderNestedMarkdownContent(t,e,n=>{var r,i;return n.parentType==="bulletList"?"- ":n.parentType==="orderedList"?`${(((i=(r=n.meta)==null?void 0:r.parentAttrs)==null?void 0:i.start)||1)+n.index}. `:"- "},s),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),V={};B(V,{findListItemPos:()=>b,getNextListDepth:()=>I,handleBackspace:()=>y,handleDelete:()=>v,hasListBefore:()=>N,hasListItemAfter:()=>X,hasListItemBefore:()=>E,listItemHasSubList:()=>H,nextListIsDeeper:()=>$,nextListIsHigher:()=>O});var b=(t,e)=>{const{$from:s}=e.selection,n=u.getNodeType(t,e.schema);let r=null,i=s.depth,d=s.pos,a=null;for(;i>0&&a===null;)r=s.node(i),r.type===n?a=i:(i-=1,d-=1);return a===null?null:{$pos:e.doc.resolve(d),depth:a}},I=(t,e)=>{const s=b(t,e);if(!s)return!1;const[,n]=u.getNodeAtPosition(e,t,s.$pos.pos+4);return n},N=(t,e,s)=>{const{$anchor:n}=t.selection,r=Math.max(0,n.pos-2),i=t.doc.resolve(r).node();return!(!i||!s.includes(i.type.name))},E=(t,e)=>{var s;const{$anchor:n}=e.selection,r=e.doc.resolve(n.pos-2);return!(r.index()===0||((s=r.nodeBefore)==null?void 0:s.type.name)!==t)},H=(t,e,s)=>{if(!s)return!1;const n=u.getNodeType(t,e.schema);let r=!1;return s.descendants(i=>{i.type===n&&(r=!0)}),r},y=(t,e,s)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!u.isNodeActive(t.state,e)&&N(t.state,e,s)){const{$anchor:a}=t.state.selection,p=t.state.doc.resolve(a.before()-1),h=[];p.node().descendants((l,c)=>{l.type.name===e&&h.push({node:l,pos:c})});const m=h.at(-1);if(!m)return!1;const o=t.state.doc.resolve(p.start()+m.pos+1);return t.chain().cut({from:a.start()-1,to:a.end()+1},o.end()).joinForward().run()}if(!u.isNodeActive(t.state,e)||!u.isAtStartOfNode(t.state))return!1;const n=b(e,t.state);if(!n)return!1;const i=t.state.doc.resolve(n.$pos.pos-2).node(n.depth),d=H(e,t.state,i);return E(e,t.state)&&!d?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},$=(t,e)=>{const s=I(t,e),n=b(t,e);return!n||!s?!1:s>n.depth},O=(t,e)=>{const s=I(t,e),n=b(t,e);return!n||!s?!1:s<n.depth},v=(t,e)=>{if(!u.isNodeActive(t.state,e)||!u.isAtEndOfNode(t.state,e))return!1;const{selection:s}=t.state,{$from:n,$to:r}=s;return!s.empty&&n.sameParent(r)?!1:$(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():O(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},X=(t,e)=>{var s;const{$anchor:n}=e.selection,r=e.doc.resolve(n.pos-n.parentOffset-2);return!(r.index()===r.parent.childCount-1||((s=r.nodeAfter)==null?void 0:s.type.name)!==t)},z=u.Extension.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:s})=>{t.state.schema.nodes[s]!==void 0&&v(t,s)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:s})=>{t.state.schema.nodes[s]!==void 0&&v(t,s)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:s,wrapperNames:n})=>{t.state.schema.nodes[s]!==void 0&&y(t,s,n)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:s,wrapperNames:n})=>{t.state.schema.nodes[s]!==void 0&&y(t,s,n)&&(e=!0)}),e}}}}),M=/^(\s*)(\d+)\.\s+(.*)$/,F=/^\s/;function q(t){const e=[];let s=0,n=0;for(;s<t.length;){const r=t[s],i=r.match(M);if(!i)break;const[,d,a,p]=i,h=d.length;let m=p,o=s+1;const l=[r];for(;o<t.length;){const c=t[o];if(c.match(M))break;if(c.trim()==="")l.push(c),m+=`
3
3
  `,o+=1;else if(c.match(F))l.push(c),m+=`
4
4
  ${c.slice(h+2)}`,o+=1;else break}e.push({indent:h,number:parseInt(a,10),content:m.trim(),raw:l.join(`
package/lib/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),C=require("./clsx-BSBE1eoY.cjs"),l=require("react"),d=require("./index-BLrMslr7.cjs"),f=require("./theme.cjs"),M=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),C=require("./clsx-DSAWW32g.cjs"),l=require("react"),d=require("./index-DirFiHQ6.cjs"),f=require("./theme.cjs"),M=`
2
2
  .reactjs-tiptap-editor {
3
3
  button,
4
4
  input:where([type=button]),
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { jsx as s, Fragment as f, jsxs as j } from "react/jsx-runtime";
2
- import { E as N } from "./clsx-OumA9x-8.js";
1
+ import { jsx as s, Fragment as f, jsxs as T } from "react/jsx-runtime";
2
+ import { E as j } from "./clsx-Bg-2aTKh.js";
3
3
  import { useEffect as l, useId as M } from "react";
4
- import { U as P, V as A, W as $, X as O } from "./index-CDFAs4RT.js";
4
+ import { N as P, R as A, O, S as $ } from "./index-B1SzsIsE.js";
5
5
  import { useTheme as D, THEME as m } from "./theme.js";
6
6
  const H = `
7
7
  .reactjs-tiptap-editor {
@@ -160,8 +160,8 @@ function y(e, n = {}) {
160
160
  const p = x(u).filter((b) => {
161
161
  if (!["prepend", "prependQueue"].includes(b.getAttribute(g)))
162
162
  return !1;
163
- const T = Number(b.getAttribute(E) || 0);
164
- return r >= T;
163
+ const N = Number(b.getAttribute(E) || 0);
164
+ return r >= N;
165
165
  });
166
166
  if (p.length > 0)
167
167
  return u.insertBefore(i, p.at(-1).nextSibling), i;
@@ -196,7 +196,7 @@ function C(e, n, t = {}) {
196
196
  const a = y(e, t);
197
197
  return a.setAttribute(v(t), n), a;
198
198
  }
199
- function V() {
199
+ function Y() {
200
200
  const { theme: e, color: n, borderRadius: t } = D();
201
201
  return l(() => {
202
202
  const o = e || "light", r = n || "default";
@@ -223,19 +223,19 @@ function V() {
223
223
  };
224
224
  }, [e, n, t]), /* @__PURE__ */ s(f, {});
225
225
  }
226
- function W({ editor: e, children: n }) {
226
+ function k({ editor: e, children: n }) {
227
227
  const t = M();
228
228
  return l(() => (C(H, "react-tiptap-reset"), () => {
229
229
  w("react-tiptap-reset");
230
230
  }), []), l(() => {
231
231
  e && (e.id = t);
232
- }, [t, e]), e ? /* @__PURE__ */ s("div", { className: "reactjs-tiptap-editor", children: /* @__PURE__ */ s(A, { children: /* @__PURE__ */ j(N.Provider, { value: { editor: e }, children: [
233
- /* @__PURE__ */ s($, { delayDuration: 0, disableHoverableContent: !0, children: n }),
232
+ }, [t, e]), e ? /* @__PURE__ */ s("div", { className: "reactjs-tiptap-editor", children: /* @__PURE__ */ s(A, { children: /* @__PURE__ */ T(j.Provider, { value: { editor: e }, children: [
233
+ /* @__PURE__ */ s(O, { delayDuration: 0, disableHoverableContent: !0, children: n }),
234
234
  /* @__PURE__ */ s(L, { editor: e }),
235
- /* @__PURE__ */ s(O, {}),
236
- /* @__PURE__ */ s(V, {})
235
+ /* @__PURE__ */ s($, {}),
236
+ /* @__PURE__ */ s(Y, {})
237
237
  ] }) }) }) : /* @__PURE__ */ s(f, {});
238
238
  }
239
239
  export {
240
- W as RichTextProvider
240
+ k as RichTextProvider
241
241
  };
@@ -1 +1 @@
1
- "use strict";const a=require("react/jsx-runtime"),d=require("@radix-ui/react-popover"),p=require("react"),h=require("./index-BLrMslr7.cjs");function n(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const o=n(d),l=n(p),x=o.Root,m=o.Trigger,c=l.forwardRef(({className:t,align:r="center",sideOffset:e=4,...i},s)=>a.jsx(o.Portal,{children:a.jsx(o.Content,{align:r,"data-richtext-portal":!0,ref:s,sideOffset:e,className:h.cn("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border !richtext-border-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...i})}));c.displayName=o.Content.displayName;exports.Popover=x;exports.PopoverContent=c;exports.PopoverTrigger=m;
1
+ "use strict";const a=require("react/jsx-runtime"),d=require("@radix-ui/react-popover"),p=require("react"),h=require("./index-DirFiHQ6.cjs");function n(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const o=n(d),l=n(p),x=o.Root,m=o.Trigger,c=l.forwardRef(({className:t,align:r="center",sideOffset:e=4,...i},s)=>a.jsx(o.Portal,{children:a.jsx(o.Content,{align:r,"data-richtext-portal":!0,ref:s,sideOffset:e,className:h.cn("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-border !richtext-border-border richtext-bg-popover richtext-p-4 richtext-text-popover-foreground richtext-shadow-md richtext-outline-none data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",t),...i})}));c.displayName=o.Content.displayName;exports.Popover=x;exports.PopoverContent=c;exports.PopoverTrigger=m;
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import * as t from "@radix-ui/react-popover";
3
3
  import * as c from "react";
4
- import { c as s } from "./index-CDFAs4RT.js";
4
+ import { c as s } from "./index-B1SzsIsE.js";
5
5
  const x = t.Root, p = t.Trigger, n = c.forwardRef(({ className: o, align: r = "center", sideOffset: i = 4, ...a }, d) => /* @__PURE__ */ e(t.Portal, { children: /* @__PURE__ */ e(
6
6
  t.Content,
7
7
  {
@@ -1,5 +1,5 @@
1
- import { R as i } from "./clsx-OumA9x-8.js";
2
- import { u as r } from "./updatePosition-DYuAiqx-.js";
1
+ import { R as i } from "./clsx-Bg-2aTKh.js";
2
+ import { u as r } from "./updatePosition-BGD41Hbg.js";
3
3
  function l(o) {
4
4
  return () => {
5
5
  let e;
@@ -1 +1 @@
1
- "use strict";const i=require("./clsx-BSBE1eoY.cjs"),r=require("./updatePosition-D6AScA-1.cjs");function d(o){return()=>{let e;return{onStart:t=>{t.clientRect&&(e=new i.ReactRenderer(o,{props:t,editor:t.editor}),e.element.style.position="absolute",document.body.appendChild(e.element),r.updatePosition(t.editor,e.element))},onUpdate(t){e.updateProps(t),t.clientRect&&r.updatePosition(t.editor,e.element)},onKeyDown(t){var n;return t.event.key==="Escape"?(e.destroy(),e.element.remove(),!0):(n=e.ref)==null?void 0:n.onKeyDown(t)},onExit(){e.destroy(),e.element.remove()}}}}exports.renderNodeViewClosure=d;
1
+ "use strict";const i=require("./clsx-DSAWW32g.cjs"),r=require("./updatePosition-CQE1ct18.cjs");function d(o){return()=>{let e;return{onStart:t=>{t.clientRect&&(e=new i.ReactRenderer(o,{props:t,editor:t.editor}),e.element.style.position="absolute",document.body.appendChild(e.element),r.updatePosition(t.editor,e.element))},onUpdate(t){e.updateProps(t),t.clientRect&&r.updatePosition(t.editor,e.element)},onKeyDown(t){var n;return t.event.key==="Escape"?(e.destroy(),e.element.remove(),!0):(n=e.ref)==null?void 0:n.onKeyDown(t)},onExit(){e.destroy(),e.element.remove()}}}}exports.renderNodeViewClosure=d;
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),E=require("lucide-react"),n=require("react"),P=require("react-colorful"),j=require("./index-BLrMslr7.cjs");require("./theme.cjs");const v=require("./popover-DCJpsZx0.cjs"),O=require("@radix-ui/react-separator"),C=require("./index-BqL4vAWE.cjs");function N(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const c in t)if(c!=="default"){const h=Object.getOwnPropertyDescriptor(t,c);Object.defineProperty(r,c,h.get?h:{enumerable:!0,get:()=>t[c]})}}return r.default=t,Object.freeze(r)}const y=N(n),z=N(O);function R(){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z"})})}const w=typeof window>"u";function L(t,r,c=window){const h=n.useRef(void 0);n.useEffect(()=>{h.current=r},[r]),n.useEffect(()=>{if(!(c&&c.addEventListener))return;const f=x=>{h.current&&h.current(x)};return c.addEventListener(t,f),()=>{c.removeEventListener(t,f)}},[t,c])}function _(t,r,c={}){const{initializeWithValue:h=!0}=c,i=n.useCallback(o=>c.serializer?c.serializer(o):JSON.stringify(o),[c]),f=n.useCallback(o=>{if(c.deserializer)return c.deserializer(o);if(o==="undefined")return;const l=r instanceof Function?r():r;let s;try{s=JSON.parse(o)}catch(a){return console.error("Error parsing JSON:",a),l}return s},[c,r]),x=n.useCallback(()=>{const o=r instanceof Function?r():r;if(w)return o;try{const l=window.localStorage.getItem(t);return l?f(l):o}catch(l){return console.warn(`Error reading localStorage key “${t}”:`,l),o}},[r,t,f]),[d,p]=n.useState(()=>h?x():r instanceof Function?r():r),b=n.useCallback(o=>{w&&console.warn(`Tried setting localStorage key “${t}” even though environment is not a client`);try{const l=o instanceof Function?o(x()):o;window.localStorage.setItem(t,i(l)),p(l),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))}catch(l){console.warn(`Error setting localStorage key “${t}”:`,l)}},[t,i,x]),g=n.useCallback(()=>{w&&console.warn(`Tried removing localStorage key “${t}” even though environment is not a client`);const o=r instanceof Function?r():r;window.localStorage.removeItem(t),p(o),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))},[t,r]);n.useEffect(()=>{p(x())},[t]);const m=n.useCallback(o=>{o.key&&o.key!==t||p(x())},[t,x]);return L("storage",m),L("local-storage",m),[d,b,g]}function q(t){const{t:r}=C.useLocale(),{disabled:c=!1,value:h,onChange:i,colors:f=C.COLORS_LIST,highlight:x}=t,[d,p]=n.useState(!1),b=n.useMemo(()=>{const s=f,a=[];for(let u=0;u<s.length;u+=10)a.push(s.slice(u,u+10));return a},[f]),[g,m]=_(x?"richtext-recent-highlight":"richtext-recent-colors",[]),o=s=>{const a=[...g],u=a.indexOf(s);u!==-1&&a.splice(u,1),a.unshift(s),a.length>10&&a.pop(),m(a)};function l(s){if(s===void 0){i==null||i(s),p(!1);return}/^#([\da-f]{3}){1,2}$/i.test(s)&&(i==null||i(s),o(s),p(!1))}return e.jsxs(v.Popover,{modal:!0,onOpenChange:p,open:d,children:[e.jsx(v.PopoverTrigger,{asChild:!0,className:"!richtext-p-0",disabled:c,children:t==null?void 0:t.children}),e.jsx(v.PopoverContent,{align:"start",className:"richtext-size-full !richtext-p-2",hideWhenDetached:!0,side:"bottom",children:e.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[e.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>{l(void 0)},children:[e.jsx(R,{}),e.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:r(x?"editor.nofill":"editor.default")})]}),b.map((s,a)=>e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:s.map((u,k)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-solid !richtext-border-transparent richtext-p-0.5 hover:!richtext-border-border",onClick:()=>l(u),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px]",style:{backgroundColor:u},children:u===h?e.jsx("svg",{className:"richtext-absolute -richtext-top-px richtext-left-px richtext-block richtext-size-3",viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${k}`))},`color-row-${a}`)),e.jsxs("div",{children:[e.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:r("editor.recent")}),e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-flex-wrap richtext-p-0 last:richtext-pb-2",children:g==null?void 0:g.map((s,a)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-transparent richtext-p-0.5 hover:richtext-border-border hover:richtext-shadow-sm",onClick:()=>l(s),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:s},children:e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${a}`))})]}),e.jsx(M,{setColor:l})]})})]})}function M({setColor:t}){const{t:r}=C.useLocale(),[c,h]=n.useState(!1),[i,f]=n.useState("#000000"),x=n.useCallback(d=>{f(d)},[]);return e.jsxs(v.Popover,{onOpenChange:h,open:c,children:[e.jsx(v.PopoverTrigger,{asChild:!0,children:e.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",children:[r("editor.color.more"),"..."]})}),e.jsxs(v.PopoverContent,{children:[e.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[e.jsx(P.HexColorPicker,{color:i,onChange:d=>{x(d)}}),e.jsx(j.Input,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:i.replace("#",""),onChange:d=>{d.preventDefault(),d.stopPropagation(),x(`#${d.target.value}`)}})]}),e.jsx(S,{className:"richtext-my-[10px]"}),e.jsx(j.Button,{className:"richtext-w-full",onClick:d=>{d.preventDefault(),d.stopPropagation(),t(i),h(!1)},children:e.jsx(E.Plus,{size:16})})]})]})}const S=y.forwardRef(({className:t,orientation:r="horizontal",decorative:c=!0,...h},i)=>e.jsx(z.Root,{ref:i,decorative:c,orientation:r,className:j.cn("richtext-shrink-0 richtext-bg-border",r==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",t),...h}));S.displayName=z.Root.displayName;exports.ColorPicker=q;exports.Separator=S;
1
+ "use strict";const e=require("react/jsx-runtime"),E=require("lucide-react"),n=require("react"),P=require("react-colorful"),j=require("./index-DirFiHQ6.cjs");require("./theme.cjs");const C=require("./index-BqL4vAWE.cjs"),v=require("./popover-BaAurWOZ.cjs"),O=require("@radix-ui/react-separator");function N(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const c in t)if(c!=="default"){const h=Object.getOwnPropertyDescriptor(t,c);Object.defineProperty(r,c,h.get?h:{enumerable:!0,get:()=>t[c]})}}return r.default=t,Object.freeze(r)}const y=N(n),z=N(O);function R(){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5L5.27 5.27L4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6c1.52 0 2.9-.57 3.96-1.5l2.63 2.63l1.27-1.27z"})})}const w=typeof window>"u";function L(t,r,c=window){const h=n.useRef(void 0);n.useEffect(()=>{h.current=r},[r]),n.useEffect(()=>{if(!(c&&c.addEventListener))return;const f=x=>{h.current&&h.current(x)};return c.addEventListener(t,f),()=>{c.removeEventListener(t,f)}},[t,c])}function _(t,r,c={}){const{initializeWithValue:h=!0}=c,i=n.useCallback(o=>c.serializer?c.serializer(o):JSON.stringify(o),[c]),f=n.useCallback(o=>{if(c.deserializer)return c.deserializer(o);if(o==="undefined")return;const l=r instanceof Function?r():r;let s;try{s=JSON.parse(o)}catch(a){return console.error("Error parsing JSON:",a),l}return s},[c,r]),x=n.useCallback(()=>{const o=r instanceof Function?r():r;if(w)return o;try{const l=window.localStorage.getItem(t);return l?f(l):o}catch(l){return console.warn(`Error reading localStorage key “${t}”:`,l),o}},[r,t,f]),[d,p]=n.useState(()=>h?x():r instanceof Function?r():r),b=n.useCallback(o=>{w&&console.warn(`Tried setting localStorage key “${t}” even though environment is not a client`);try{const l=o instanceof Function?o(x()):o;window.localStorage.setItem(t,i(l)),p(l),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))}catch(l){console.warn(`Error setting localStorage key “${t}”:`,l)}},[t,i,x]),g=n.useCallback(()=>{w&&console.warn(`Tried removing localStorage key “${t}” even though environment is not a client`);const o=r instanceof Function?r():r;window.localStorage.removeItem(t),p(o),window.dispatchEvent(new StorageEvent("local-storage",{key:t}))},[t,r]);n.useEffect(()=>{p(x())},[t]);const m=n.useCallback(o=>{o.key&&o.key!==t||p(x())},[t,x]);return L("storage",m),L("local-storage",m),[d,b,g]}function q(t){const{t:r}=C.useLocale(),{disabled:c=!1,value:h,onChange:i,colors:f=C.COLORS_LIST,highlight:x}=t,[d,p]=n.useState(!1),b=n.useMemo(()=>{const s=f,a=[];for(let u=0;u<s.length;u+=10)a.push(s.slice(u,u+10));return a},[f]),[g,m]=_(x?"richtext-recent-highlight":"richtext-recent-colors",[]),o=s=>{const a=[...g],u=a.indexOf(s);u!==-1&&a.splice(u,1),a.unshift(s),a.length>10&&a.pop(),m(a)};function l(s){if(s===void 0){i==null||i(s),p(!1);return}/^#([\da-f]{3}){1,2}$/i.test(s)&&(i==null||i(s),o(s),p(!1))}return e.jsxs(v.Popover,{modal:!0,onOpenChange:p,open:d,children:[e.jsx(v.PopoverTrigger,{asChild:!0,className:"!richtext-p-0",disabled:c,children:t==null?void 0:t.children}),e.jsx(v.PopoverContent,{align:"start",className:"richtext-size-full !richtext-p-2",hideWhenDetached:!0,side:"bottom",children:e.jsxs("div",{className:"richtext-flex richtext-flex-col",children:[e.jsxs("div",{className:"rd-1 richtext-flex richtext-cursor-pointer richtext-items-center richtext-gap-[4px] richtext-p-1 hover:richtext-bg-accent",onClick:()=>{l(void 0)},children:[e.jsx(R,{}),e.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:r(x?"editor.nofill":"editor.default")})]}),b.map((s,a)=>e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:s.map((u,k)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-solid !richtext-border-transparent richtext-p-0.5 hover:!richtext-border-border",onClick:()=>l(u),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px]",style:{backgroundColor:u},children:u===h?e.jsx("svg",{className:"richtext-absolute -richtext-top-px richtext-left-px richtext-block richtext-size-3",viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}):e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-${k}`))},`color-row-${a}`)),e.jsxs("div",{children:[e.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:r("editor.recent")}),e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-flex-wrap richtext-p-0 last:richtext-pb-2",children:g==null?void 0:g.map((s,a)=>e.jsx("span",{className:"richtext-inline-block richtext-size-6 richtext-flex-[0_0_auto] richtext-cursor-pointer richtext-rounded-sm !richtext-border richtext-border-transparent richtext-p-0.5 hover:richtext-border-border hover:richtext-shadow-sm",onClick:()=>l(s),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:s},children:e.jsx("svg",{viewBox:"0 0 18 18",style:{fill:"rgb(255, 255, 255)",display:"none"},children:e.jsx("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})})},`sub-color-recent-${a}`))})]}),e.jsx(M,{setColor:l})]})})]})}function M({setColor:t}){const{t:r}=C.useLocale(),[c,h]=n.useState(!1),[i,f]=n.useState("#000000"),x=n.useCallback(d=>{f(d)},[]);return e.jsxs(v.Popover,{onOpenChange:h,open:c,children:[e.jsx(v.PopoverTrigger,{asChild:!0,children:e.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",children:[r("editor.color.more"),"..."]})}),e.jsxs(v.PopoverContent,{children:[e.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-justify-center",children:[e.jsx(P.HexColorPicker,{color:i,onChange:d=>{x(d)}}),e.jsx(j.Input,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:i.replace("#",""),onChange:d=>{d.preventDefault(),d.stopPropagation(),x(`#${d.target.value}`)}})]}),e.jsx(S,{className:"richtext-my-[10px]"}),e.jsx(j.Button,{className:"richtext-w-full",onClick:d=>{d.preventDefault(),d.stopPropagation(),t(i),h(!1)},children:e.jsx(E.Plus,{size:16})})]})]})}const S=y.forwardRef(({className:t,orientation:r="horizontal",decorative:c=!0,...h},i)=>e.jsx(z.Root,{ref:i,decorative:c,orientation:r,className:j.cn("richtext-shrink-0 richtext-bg-border",r==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",t),...h}));S.displayName=z.Root.displayName;exports.ColorPicker=q;exports.Separator=S;
@@ -3,11 +3,11 @@ import { Plus as k } from "lucide-react";
3
3
  import * as $ from "react";
4
4
  import { useCallback as m, useState as w, useEffect as L, useRef as M, useMemo as B } from "react";
5
5
  import { HexColorPicker as F } from "react-colorful";
6
- import { j as I, B as _, c as T } from "./index-CDFAs4RT.js";
6
+ import { j as I, B as _, c as T } from "./index-B1SzsIsE.js";
7
7
  import "./theme.js";
8
- import { P as N, a as z, b as E } from "./popover-C2BbhsXH.js";
9
- import * as y from "@radix-ui/react-separator";
10
- import { u as R, C as j } from "./index-BlXGgvT-.js";
8
+ import { u as N, C as j } from "./index-BlXGgvT-.js";
9
+ import { P as z, a as E, b as y } from "./popover-CK54Ip2N.js";
10
+ import * as R from "@radix-ui/react-separator";
11
11
  function D() {
12
12
  return /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ t(
13
13
  "path",
@@ -102,7 +102,7 @@ function J(e, r, c = {}) {
102
102
  return S("storage", v), S("local-storage", v), [h, b, g];
103
103
  }
104
104
  function X(e) {
105
- const { t: r } = R(), { disabled: c = !1, value: d, onChange: n, colors: u = j, highlight: a } = e, [h, f] = w(!1), b = B(() => {
105
+ const { t: r } = N(), { disabled: c = !1, value: d, onChange: n, colors: u = j, highlight: a } = e, [h, f] = w(!1), b = B(() => {
106
106
  const i = u, l = [];
107
107
  for (let x = 0; x < i.length; x += 10)
108
108
  l.push(i.slice(x, x + 10));
@@ -121,10 +121,10 @@ function X(e) {
121
121
  }
122
122
  /^#([\da-f]{3}){1,2}$/i.test(i) && (n == null || n(i), o(i), f(!1));
123
123
  }
124
- return /* @__PURE__ */ p(N, { modal: !0, onOpenChange: f, open: h, children: [
125
- /* @__PURE__ */ t(z, { asChild: !0, className: "!richtext-p-0", disabled: c, children: e == null ? void 0 : e.children }),
124
+ return /* @__PURE__ */ p(z, { modal: !0, onOpenChange: f, open: h, children: [
125
+ /* @__PURE__ */ t(E, { asChild: !0, className: "!richtext-p-0", disabled: c, children: e == null ? void 0 : e.children }),
126
126
  /* @__PURE__ */ t(
127
- E,
127
+ y,
128
128
  {
129
129
  align: "start",
130
130
  className: "richtext-size-full !richtext-p-2",
@@ -227,15 +227,15 @@ function X(e) {
227
227
  ] });
228
228
  }
229
229
  function Z({ setColor: e }) {
230
- const { t: r } = R(), [c, d] = w(!1), [n, u] = w("#000000"), a = m((h) => {
230
+ const { t: r } = N(), [c, d] = w(!1), [n, u] = w("#000000"), a = m((h) => {
231
231
  u(h);
232
232
  }, []);
233
- return /* @__PURE__ */ p(N, { onOpenChange: d, open: c, children: [
234
- /* @__PURE__ */ t(z, { asChild: !0, children: /* @__PURE__ */ p("div", { className: "richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent", children: [
233
+ return /* @__PURE__ */ p(z, { onOpenChange: d, open: c, children: [
234
+ /* @__PURE__ */ t(E, { asChild: !0, children: /* @__PURE__ */ p("div", { className: "richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent", children: [
235
235
  r("editor.color.more"),
236
236
  "..."
237
237
  ] }) }),
238
- /* @__PURE__ */ p(E, { children: [
238
+ /* @__PURE__ */ p(y, { children: [
239
239
  /* @__PURE__ */ p("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-justify-center", children: [
240
240
  /* @__PURE__ */ t(
241
241
  F,
@@ -273,7 +273,7 @@ function Z({ setColor: e }) {
273
273
  ] });
274
274
  }
275
275
  const O = $.forwardRef(({ className: e, orientation: r = "horizontal", decorative: c = !0, ...d }, n) => /* @__PURE__ */ t(
276
- y.Root,
276
+ R.Root,
277
277
  {
278
278
  ref: n,
279
279
  decorative: c,
@@ -286,7 +286,7 @@ const O = $.forwardRef(({ className: e, orientation: r = "horizontal", decorativ
286
286
  ...d
287
287
  }
288
288
  ));
289
- O.displayName = y.Root.displayName;
289
+ O.displayName = R.Root.displayName;
290
290
  export {
291
291
  X as C,
292
292
  O as S