reactjs-tiptap-editor 1.0.9 → 1.0.11
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/lib/{ActionMenuButton-CmDopTWt.cjs → ActionMenuButton-BLlse5KO.cjs} +1 -1
- package/lib/{ActionMenuButton-C4aNFFa8.js → ActionMenuButton-DTXFBdGX.js} +2 -2
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.js +7 -7
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +3 -3
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +6 -6
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +3 -3
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +3 -3
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +6 -6
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.js +4 -4
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +3 -3
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +5 -5
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +8 -8
- package/lib/{Drawer-DG0gPU_U.js → Drawer-D0yQ0wR7.js} +6 -6
- package/lib/{Drawer-CTr2snNd.cjs → Drawer-kv6BU_6O.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +8 -7
- package/lib/{Excalidraw-DtezFdjR.cjs → Excalidraw-B82ThkJA.cjs} +1 -1
- package/lib/{Excalidraw-DpgdxOsc.js → Excalidraw-CO4IRHmG.js} +7 -7
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +2 -2
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +3 -3
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +3 -3
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +5 -5
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +5 -5
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +5 -5
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +5 -5
- package/lib/History.cjs +1 -1
- package/lib/History.js +4 -4
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +3 -3
- package/lib/{Icon-C_buGjWy.js → Icon-DRuJhcHK.js} +1 -1
- package/lib/{Icon-b6HQAURz.cjs → Icon-DXePECFW.cjs} +1 -1
- package/lib/{Iframe-CUrXCDxj.cjs → Iframe-03dn9wcM.cjs} +1 -1
- package/lib/{Iframe-De88TYvj.js → Iframe-BEO28NPs.js} +8 -8
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +2 -2
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +13 -13
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +14 -14
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.js +3 -3
- package/lib/{Indent-Bensb2nf.js → Indent-CXurBbOr.js} +5 -5
- package/lib/{Indent-D_KtZNHW.cjs → Indent-Cqjdn3Jt.cjs} +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +3 -3
- package/lib/{Katex-C0dtqznb.js → Katex-Bvj469K1.js} +7 -7
- package/lib/{Katex-NqelWRoi.cjs → Katex-DdWTV5NJ.cjs} +1 -1
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +5 -5
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/{LinkEditBlock-BSZ-vgNB.cjs → LinkEditBlock-8ePAZ-G1.cjs} +1 -1
- package/lib/{LinkEditBlock-Bv12sKvW.js → LinkEditBlock-DjXUEubR.js} +32 -32
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.js +23 -22
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +26 -26
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +5 -5
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +3 -3
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +9 -9
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +39 -266
- package/lib/SlashCommandNodeView-Bl_gwZJB.cjs +1 -0
- package/lib/SlashCommandNodeView-CcqL8ymb.js +254 -0
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +3 -3
- package/lib/{Table-D9ckv6Tb.js → Table-9Y0Cg8Ab.js} +5 -5
- package/lib/{Table-cy1mUM2X.cjs → Table-DBGjezZK.cjs} +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +3 -3
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +5 -5
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +5 -5
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +3 -3
- package/lib/{Twitter-Bvs3sW8F.cjs → Twitter-Cnvt7GBg.cjs} +1 -1
- package/lib/{Twitter-KUvyySA0.js → Twitter-DWwd0vHR.js} +46 -46
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +7 -7
- package/lib/bubble.cjs +4 -4
- package/lib/bubble.js +1659 -1567
- package/lib/{button-U6XpZt2X.cjs → button-BW5bDPz_.cjs} +1 -1
- package/lib/{button-D8SI-g7p.js → button-RnHbJfd-.js} +1 -1
- package/lib/{checkbox-xrY2c5yo.js → checkbox-CLSoR1Qj.js} +1 -1
- package/lib/{checkbox-DaIBNthL.cjs → checkbox-CTEN0q4y.cjs} +1 -1
- package/lib/{dialog-DgnnVCfv.cjs → dialog-CMC9hsCo.cjs} +1 -1
- package/lib/{dialog-DjnkASYP.js → dialog-D_HCtKvc.js} +1 -1
- package/lib/{dropdown-menu-bI14Gyw4.js → dropdown-menu-66q7Ofc5.js} +3 -2
- package/lib/dropdown-menu-DKSAS-w_.cjs +1 -0
- package/lib/extensions/SlashCommand/types.d.ts +1 -0
- package/lib/index-9A6-kVBM.js +1351 -0
- package/lib/{index-4pRt5Vqu.js → index-C3zg3DPB.js} +442 -403
- package/lib/index-C838s-or.cjs +8 -0
- package/lib/index-Cv9Z6dyV.cjs +1 -0
- package/lib/{index-EKFybgpP.js → index-DKt5wfAc.js} +1 -1
- package/lib/{index-BimeTI7q.js → index-DRHrDScg.js} +1 -1
- package/lib/{index-BQ6ZdLsu.js → index-DmPwbBqm.js} +1 -1
- package/lib/{index-CbIQPoF6.js → index-sVScpCFG.js} +20 -20
- package/lib/index.cjs +1 -1
- package/lib/index.js +5 -5
- package/lib/{input-C5zU49Q1.js → input-CvyMYMZG.js} +1 -1
- package/lib/{input-BtDj0NeF.cjs → input-D555880-.cjs} +1 -1
- package/lib/{isNumber-8HKEgTkA.js → isNumber-DF0fU3ob.js} +1 -1
- package/lib/{label-BEUVs-IA.js → label-DsOYPjAo.js} +1 -1
- package/lib/{label-C8BonzOY.cjs → label-E6jF3Xud.cjs} +1 -1
- package/lib/{popover-CPY5lMCj.js → popover-B7ec5-u2.js} +1 -1
- package/lib/{popover-DjL0De8d.cjs → popover-BSzR_R01.cjs} +1 -1
- package/lib/{separator-BlIlS7LP.js → separator-JaTTqb3J.js} +4 -4
- package/lib/{separator-BzMkiI_c.cjs → separator-PGnA-6Hr.cjs} +1 -1
- package/lib/{store-D_GvIPxo.js → store-Cf7tFiiI.js} +1 -1
- package/lib/{store-BSCjQxMK.cjs → store-oDk-lTPM.cjs} +1 -1
- package/lib/style.css +1 -1
- package/lib/{tabs-CHy82_rs.cjs → tabs-BTwiZkWd.cjs} +1 -1
- package/lib/{tabs-tQpXIzfV.js → tabs-CWr9HYaM.js} +1 -1
- package/lib/{textarea-CMDYVXYo.js → textarea-BdeLXbp8.js} +1 -1
- package/lib/{textarea-B-qfanCT.cjs → textarea-Yetl_PZi.cjs} +1 -1
- package/lib/{throttle-BIkZV3Y_.js → throttle-DsowOft0.js} +1 -1
- package/lib/updatePosition-Bbd8ETMv.js +16 -0
- package/lib/updatePosition-M2IyqkI1.cjs +1 -0
- package/lib/{useButtonProps-BqBGuqoP.cjs → useButtonProps-DfnJiJLV.cjs} +1 -1
- package/lib/{useButtonProps-DTngjZge.js → useButtonProps-cMoicZgd.js} +14 -14
- package/package.json +1 -1
- package/lib/dropdown-menu-BvVMltdB.cjs +0 -1
- package/lib/floating-ui.dom-U1vPFQ5f.js +0 -1151
- package/lib/floating-ui.dom-VCrc58uF.cjs +0 -1
- package/lib/index-DvvMf6Wu.cjs +0 -7
- package/lib/updatePosition-GLTrgcib.js +0 -215
- package/lib/updatePosition-u2mTh3mG.cjs +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),x=require("react"),qe=require("@radix-ui/react-slot"),ge=require("./index-FSRjMsxW.cjs"),pe=require("./theme.cjs"),k=require("./events.constant-DQYeJpu5.cjs"),De=require("@radix-ui/react-tooltip"),Xe=require("@radix-ui/react-toggle"),W=require("@radix-ui/react-icons"),l=require("lucide-react"),Ce=require("./index-BBNITgNi.cjs");function ee(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const ze=ee(x),I=ee(De),je=ee(Xe),te="-",Ke=e=>{const r=Ze(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{const s=c.split(te);return s[0]===""&&s.length!==1&&s.shift(),Se(s,r)||Qe(c)},getConflictingClassGroupIds:(c,s)=>{const h=t[c]||[];return s&&o[c]?[...h,...o[c]]:h}}},Se=(e,r)=>{var c;if(e.length===0)return r.classGroupId;const t=e[0],o=r.nextPart.get(t),i=o?Se(e.slice(1),o):void 0;if(i)return i;if(r.validators.length===0)return;const n=e.join(te);return(c=r.validators.find(({validator:s})=>s(n)))==null?void 0:c.classGroupId},me=/^\[(.+)\]$/,Qe=e=>{if(me.test(e)){const r=me.exec(e)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},Ze=e=>{const{theme:r,prefix:t}=e,o={nextPart:new Map,validators:[]};return Ye(Object.entries(e.classGroups),t).forEach(([n,c])=>{J(c,o,n,r)}),o},J=(e,r,t,o)=>{e.forEach(i=>{if(typeof i=="string"){const n=i===""?r:fe(r,i);n.classGroupId=t;return}if(typeof i=="function"){if(Je(i)){J(i(o),r,t,o);return}r.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([n,c])=>{J(c,fe(r,n),t,o)})})},fe=(e,r)=>{let t=e;return r.split(te).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o)}),t},Je=e=>e.isThemeGetter,Ye=(e,r)=>r?e.map(([t,o])=>{const i=o.map(n=>typeof n=="string"?r+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,s])=>[r+c,s])):n);return[t,i]}):e,et=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,o=new Map;const i=(n,c)=>{t.set(n,c),r++,r>e&&(r=0,o=t,t=new Map)};return{get(n){let c=t.get(n);if(c!==void 0)return c;if((c=o.get(n))!==void 0)return i(n,c),c},set(n,c){t.has(n)?t.set(n,c):i(n,c)}}},ke="!",tt=e=>{const{separator:r,experimentalParseClassName:t}=e,o=r.length===1,i=r[0],n=r.length,c=s=>{const h=[];let d=0,p=0,m;for(let f=0;f<s.length;f++){let C=s[f];if(d===0){if(C===i&&(o||s.slice(f,f+n)===r)){h.push(s.slice(p,f)),p=f+n;continue}if(C==="/"){m=f;continue}}C==="["?d++:C==="]"&&d--}const u=h.length===0?s:s.substring(p),b=u.startsWith(ke),z=b?u.substring(1):u,w=m&&m>p?m-p:void 0;return{modifiers:h,hasImportantModifier:b,baseClassName:z,maybePostfixModifierPosition:w}};return t?s=>t({className:s,parseClassName:c}):c},rt=e=>{if(e.length<=1)return e;const r=[];let t=[];return e.forEach(o=>{o[0]==="["?(r.push(...t.sort(),o),t=[]):t.push(o)}),r.push(...t.sort()),r},ot=e=>({cache:et(e.cacheSize),parseClassName:tt(e),...Ke(e)}),nt=/\s+/,st=(e,r)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:i}=r,n=[],c=e.trim().split(nt);let s="";for(let h=c.length-1;h>=0;h-=1){const d=c[h],{modifiers:p,hasImportantModifier:m,baseClassName:u,maybePostfixModifierPosition:b}=t(d);let z=!!b,w=o(z?u.substring(0,b):u);if(!w){if(!z){s=d+(s.length>0?" "+s:s);continue}if(w=o(u),!w){s=d+(s.length>0?" "+s:s);continue}z=!1}const f=rt(p).join(":"),C=m?f+ke:f,j=C+w;if(n.includes(j))continue;n.push(j);const H=i(w,z);for(let S=0;S<H.length;++S){const B=H[S];n.push(C+B)}s=d+(s.length>0?" "+s:s)}return s};function it(){let e=0,r,t,o="";for(;e<arguments.length;)(r=arguments[e++])&&(t=Me(r))&&(o&&(o+=" "),o+=t);return o}const Me=e=>{if(typeof e=="string")return e;let r,t="";for(let o=0;o<e.length;o++)e[o]&&(r=Me(e[o]))&&(t&&(t+=" "),t+=r);return t};function lt(e,...r){let t,o,i,n=c;function c(h){const d=r.reduce((p,m)=>m(p),e());return t=ot(d),o=t.cache.get,i=t.cache.set,n=s,s(h)}function s(h){const d=o(h);if(d)return d;const p=st(h,t);return i(h,p),p}return function(){return n(it.apply(null,arguments))}}const v=e=>{const r=t=>t[e]||[];return r.isThemeGetter=!0,r},Ee=/^\[(?:([a-z-]+):)?(.+)\]$/i,at=/^\d+\/\d+$/,ct=new Set(["px","full","screen"]),dt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ut=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ht=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,gt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,E=e=>A(e)||ct.has(e)||at.test(e),L=e=>R(e,"length",Ct),A=e=>!!e&&!Number.isNaN(Number(e)),X=e=>R(e,"number",A),P=e=>!!e&&Number.isInteger(Number(e)),mt=e=>e.endsWith("%")&&A(e.slice(0,-1)),g=e=>Ee.test(e),T=e=>dt.test(e),ft=new Set(["length","size","percentage"]),xt=e=>R(e,ft,Le),bt=e=>R(e,"position",Le),vt=new Set(["image","url"]),wt=e=>R(e,vt,jt),yt=e=>R(e,"",zt),N=()=>!0,R=(e,r,t)=>{const o=Ee.exec(e);return o?o[1]?typeof r=="string"?o[1]===r:r.has(o[1]):t(o[2]):!1},Ct=e=>ut.test(e)&&!ht.test(e),Le=()=>!1,zt=e=>gt.test(e),jt=e=>pt.test(e),St=()=>{const e=v("colors"),r=v("spacing"),t=v("blur"),o=v("brightness"),i=v("borderColor"),n=v("borderRadius"),c=v("borderSpacing"),s=v("borderWidth"),h=v("contrast"),d=v("grayscale"),p=v("hueRotate"),m=v("invert"),u=v("gap"),b=v("gradientColorStops"),z=v("gradientColorStopPositions"),w=v("inset"),f=v("margin"),C=v("opacity"),j=v("padding"),H=v("saturate"),S=v("scale"),B=v("sepia"),ie=v("skew"),le=v("space"),ae=v("translate"),$=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",g,r],y=()=>[g,r],ce=()=>["",E,L],G=()=>["auto",A,g],de=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",g],he=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[A,g];return{cacheSize:500,separator:":",theme:{colors:[N],spacing:[E,L],blur:["none","",T,g],brightness:M(),borderColor:[e],borderRadius:["none","","full",T,g],borderSpacing:y(),borderWidth:ce(),contrast:M(),grayscale:V(),hueRotate:M(),invert:V(),gap:y(),gradientColorStops:[e],gradientColorStopPositions:[mt,L],inset:q(),margin:q(),opacity:M(),padding:y(),saturate:M(),scale:M(),sepia:V(),skew:M(),space:y(),translate:y()},classGroups:{aspect:[{aspect:["auto","square","video",g]}],container:["container"],columns:[{columns:[T]}],"break-after":[{"break-after":he()}],"break-before":[{"break-before":he()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...de(),g]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",P,g]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",g]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",P,g]}],"grid-cols":[{"grid-cols":[N]}],"col-start-end":[{col:["auto",{span:["full",P,g]},g]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[N]}],"row-start-end":[{row:["auto",{span:[P,g]},g]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",g]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",g]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[j]}],px:[{px:[j]}],py:[{py:[j]}],ps:[{ps:[j]}],pe:[{pe:[j]}],pt:[{pt:[j]}],pr:[{pr:[j]}],pb:[{pb:[j]}],pl:[{pl:[j]}],m:[{m:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],ms:[{ms:[f]}],me:[{me:[f]}],mt:[{mt:[f]}],mr:[{mr:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-x":[{"space-x":[le]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[le]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",g,r]}],"min-w":[{"min-w":[g,r,"min","max","fit"]}],"max-w":[{"max-w":[g,r,"none","full","min","max","fit","prose",{screen:[T]},T]}],h:[{h:[g,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[g,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[g,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[g,r,"auto","min","max","fit"]}],"font-size":[{text:["base",T,L]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",X]}],"font-family":[{font:[N]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",g]}],"line-clamp":[{"line-clamp":["none",A,X]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",E,g]}],"list-image":[{"list-image":["none",g]}],"list-style-type":[{list:["none","disc","decimal",g]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",E,L]}],"underline-offset":[{"underline-offset":["auto",E,g]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",g]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",g]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...de(),bt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",xt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[z]}],"gradient-via-pos":[{via:[z]}],"gradient-to-pos":[{to:[z]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:O()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[E,g]}],"outline-w":[{outline:[E,L]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[E,L]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",T,yt]}],"shadow-color":[{shadow:[N]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...ue(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ue()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",T,g]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[H]}],sepia:[{sepia:[B]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[H]}],"backdrop-sepia":[{"backdrop-sepia":[B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",g]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",g]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",g]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[P,g]}],"translate-x":[{"translate-x":[ae]}],"translate-y":[{"translate-y":[ae]}],"skew-x":[{"skew-x":[ie]}],"skew-y":[{"skew-y":[ie]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",g]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",g]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",g]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[E,L,X]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},kt=lt(St);function U(...e){return kt(Ce.clsx(e))}let K;function Q(){return K===void 0&&(K=navigator.platform.includes("Mac")),K}function Te(e){return`${e}`.toLowerCase()==="mod"?Q()?"⌘":"Ctrl":`${e}`.toLowerCase()==="alt"?Q()?"⌥":"Alt":`${e}`.toLowerCase()==="shift"?Q()?"⇧":"Shift":e}function He(e){return e.map(Te).join(" ")}const Mt=x.forwardRef((e,r)=>{const{icon:t=void 0,tooltip:o=void 0,disabled:i=!1,customClass:n="",loading:c=void 0,shortcutKeys:s=void 0,tooltipOptions:h={},action:d=void 0,isActive:p=void 0,children:m,asChild:u=!1,upload:b=!1,initialDisplayedColor:z=void 0,dataState:w=!1,...f}=e,C=Pe[t],j=u?qe.Slot:re,H=S=>{if(i){S.preventDefault();return}d==null||d(S)};return a.jsxs(Ie,{children:[a.jsx(Be,{asChild:!0,children:a.jsxs(j,{className:U("richtext-w-[32px] richtext-h-[32px]",n),"data-state":w?"on":"off",disabled:i,onClick:H,ref:r,size:"sm",...f,children:[C&&a.jsx(C,{className:"richtext-size-4"}),m]})}),o&&a.jsx(oe,{...h,className:"richtext-tooltip",children:a.jsxs("div",{className:"richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center",children:[a.jsx("div",{children:o}),!!(s!=null&&s.length)&&a.jsx("span",{children:He(s)})]})})]})}),Z=typeof window>"u";function xe(e,r,t=window){const o=x.useRef(void 0);x.useEffect(()=>{o.current=r},[r]),x.useEffect(()=>{if(!(t&&t.addEventListener))return;const n=c=>{o.current&&o.current(c)};return t.addEventListener(e,n),()=>{t.removeEventListener(e,n)}},[e,t])}function _(e,r,t={}){const{initializeWithValue:o=!0}=t,i=x.useCallback(u=>t.serializer?t.serializer(u):JSON.stringify(u),[t]),n=x.useCallback(u=>{if(t.deserializer)return t.deserializer(u);if(u==="undefined")return;const b=r instanceof Function?r():r;let z;try{z=JSON.parse(u)}catch(w){return console.error("Error parsing JSON:",w),b}return z},[t,r]),c=x.useCallback(()=>{const u=r instanceof Function?r():r;if(Z)return u;try{const b=window.localStorage.getItem(e);return b?n(b):u}catch(b){return console.warn(`Error reading localStorage key “${e}”:`,b),u}},[r,e,n]),[s,h]=x.useState(()=>o?c():r instanceof Function?r():r),d=x.useCallback(u=>{Z&&console.warn(`Tried setting localStorage key “${e}” even though environment is not a client`);try{const b=u instanceof Function?u(c()):u;window.localStorage.setItem(e,i(b)),h(b),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(b){console.warn(`Error setting localStorage key “${e}”:`,b)}},[e,i,c]),p=x.useCallback(()=>{Z&&console.warn(`Tried removing localStorage key “${e}” even though environment is not a client`);const u=r instanceof Function?r():r;window.localStorage.removeItem(e),h(u),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))},[e,r]);x.useEffect(()=>{h(c())},[e]);const m=x.useCallback(u=>{u.key&&u.key!==e||h(c())},[e,c]);return xe("storage",m),xe("local-storage",m),[s,d,p]}function Et(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M19 12h-2v3h-3v2h5zM7 9h3V7H5v5h2zm14-6H3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 16H3V5h18z"})})}function Lt(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 15h15m0 4H6m9-8h6m0-4h-6M9 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2M3 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2"})})}function Tt(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",className:"richtext-w-4 richtext-h-4",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M5.5 3c1.404 0 2.107 0 2.611.38c.219.164.406.375.552.62C9 4.568 9 5.358 9 6.938v10.125c0 1.58 0 2.37-.337 2.937a2.1 2.1 0 0 1-.552.621c-.504.38-1.207.38-2.611.38s-2.107 0-2.611-.38a2.1 2.1 0 0 1-.552-.62C2 19.432 2 18.642 2 17.062V6.938c0-1.58 0-2.37.337-2.938a2.1 2.1 0 0 1 .552-.62C3.393 3 4.096 3 5.5 3M20 11.938v5.124c0 1.58 0 2.37-.337 2.938a2.1 2.1 0 0 1-.552.62c-.504.38-1.207.38-2.611.38s-2.107 0-2.611-.38a2.1 2.1 0 0 1-.552-.62C13 19.433 13 18.642 13 17.063V6.938c0-1.58 0-2.37.337-2.938M22 9l-6-6m6 0l-6 6",color:"currentColor"})})}function Ht(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",className:"richtext-w-4 richtext-h-4",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M21 18.5c0 1.404 0 2.107-.38 2.611a2.1 2.1 0 0 1-.62.552c-.567.337-1.358.337-2.937.337H6.938c-1.58 0-2.37 0-2.938-.337a2.1 2.1 0 0 1-.62-.552C3 20.607 3 19.904 3 18.5s0-2.107.38-2.611c.163-.218.374-.406.62-.552C4.567 15 5.357 15 6.938 15h10.125c1.58 0 2.37 0 2.937.337c.246.146.457.334.62.552c.38.504.38 1.207.38 2.611M12.063 4H6.937C5.358 4 4.568 4 4 4.337a2.1 2.1 0 0 0-.62.552C3 5.393 3 6.096 3 7.5s0 2.107.38 2.611c.163.218.374.406.62.552C4.567 11 5.357 11 6.938 11h10.125c1.58 0 2.37 0 2.937-.337M21 8l-6-6m6 0l-6 6",color:"currentColor"})})}function At(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M14 2H6a2 2 0 0 0-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V8zm4 18H6V4h7v5h5zm-.65-10l-2.1 9h-1.4l-1.8-6.79l-1.8 6.79h-1.4l-2.2-9h1.5l1.4 6.81l1.8-6.81h1.3l1.8 6.81l1.4-6.81z"})})}function Rt(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M21 22H3v-2h18zm0-18H3V2h18zm-11 9.7h4l-2-5.4zM11.2 6h1.7l4.7 12h-2l-.9-2.6H9.4L8.5 18h-2z"})})}function Ae(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 48 48",...e,children:a.jsx("path",{fill:"currentColor",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:4,d:"M36 19L24 31L12 19z"})})}function Vt(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M9 7v10h6v-2h-4V7z"})})}function Pt(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M9 7c-1.1 0-2 .9-2 2v8h2V9h2v7h2V9h2v8h2V9a2 2 0 0 0-2-2z"})})}function Nt(e){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:a.jsx("path",{fill:"currentColor",d:"M11 7c-1.1 0-2 .9-2 2v2a2 2 0 0 0 2 2h2v2H9v2h4c1.11 0 2-.89 2-2v-2a2 2 0 0 0-2-2h-2V9h4V7z"})})}function It(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.jsx("path",{fill:"currentColor",d:"M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6l1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6l-1.4-1.4z"})})}function Bt(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M14 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m-9 8h4m-2-2v4"})})}function Gt(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m9 8h4m-2-2v4"})})}function Ot(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 21v-4m0-4V9m0-4V3m-2 18h4M8 5v4h11l2-2l-2-2zm6 8v4H6l-2-2l2-2z"})})}function Wt(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.jsx("path",{fill:"currentColor",d:"M23.943 19.806a.2.2 0 0 0-.168-.034c-1.26-1.855-2.873-3.61-4.419-5.315l-.252-.284c-.001-.073-.067-.12-.134-.15l-.084-.084c-.05-.1-.169-.167-.286-.1c-.47.234-.907.585-1.327.919c-.554.434-1.109.87-1.63 1.354a5 5 0 0 0-.588.618c-.084.117-.017.217.084.267c-.37.368-.74.736-1.109 1.12a.2.2 0 0 0-.05.134c0 .05.033.1.067.117l.655.502v.016c.924.92 2.554 2.173 4.285 3.527c.251.201.52.402.773.602c.117.134.234.285.335.418c.05.066.169.084.236.033c.033.034.084.067.118.1a.24.24 0 0 0 .1.034a.15.15 0 0 0 .135-.066a.24.24 0 0 0 .033-.1c.017 0 .017.016.034.016a.2.2 0 0 0 .134-.05l3.058-3.327c.12-.116.014-.267 0-.267m-7.628-.134l-1.546-1.17l-.15-.1c-.035-.017-.068-.05-.102-.067l-.117-.1c.66-.66 1.33-1.308 2-1.956c-.488.484-1.463 1.906-1.261 2.373c.002 0 .018.042.067.084zm4.1 3.126l-1.277-.97a27 27 0 0 0-1.58-1.504c.69.518 1.277.97 1.361 1.053c.673.585.638.485 1.093.87l.554.4c-.074.103-.151.148-.151.151m.336.25l-.034-.016a1 1 0 0 0 .152-.117zM.588 3.476c.033.217.084.435.117.636c.201 1.103.403 2.106.772 2.858l.152.568c.05.217.134.485.219.552a67 67 0 0 0 3.578 2.942a.18.18 0 0 0 .219 0s0 .016.016.016a.15.15 0 0 0 .118.05a.2.2 0 0 0 .134-.05c1.798-1.989 3.142-3.627 4.1-4.998c.068-.066.084-.167.084-.25c.067-.067.118-.151.185-.201c.067-.067.067-.184 0-.235l-.017-.016c0-.033-.017-.084-.05-.1c-.42-.401-.722-.685-1.042-.986a94 94 0 0 1-2.352-2.273c-.017-.017-.034-.034-.067-.034c-.336-.117-1.025-.234-1.882-.385c-1.277-.216-3.008-.517-4.57-.986c0 0-.101 0-.118.017l-.05.05C.05.714.022.707 0 .718c.017.1.017.167.05.284c0 .033.068.301.068.334zm7.19 4.78l-.033.034a.036.036 0 0 1 .033-.034M6.553 2.238c.101.1.521.502.622.585c-.437-.2-1.529-.702-2.034-.869c.505.1 1.194.201 1.412.284M.79 1.403c.252.434.454 1.939.655 3.41c-.118-.469-.201-.936-.302-1.372C.992 2.673.84 1.988.638 1.386c.124 0 .152.021.152.017m-.286-.369c0-.016 0-.033-.017-.033c.085 0 .135.017.202.05c0 .006-.145-.017-.185-.017m23.17-.217c.017-.066-.336-.367-.219-.384c.253-.017.253-.401 0-.401c-.335.017-.688.1-1.008.15c-.587.117-1.192.234-1.78.367a80 80 0 0 0-3.949.937c-.403.117-.857.2-1.243.401c-.135.067-.118.2-.05.284c-.034.017-.051.017-.085.034c-.117.017-.218.034-.335.05c-.102.017-.152.1-.135.2c0 .017.017.05.017.067c-.706.936-1.496 1.923-2.353 2.976c-.84.969-1.73 1.989-2.62 3.042c-2.84 3.31-6.05 7.07-9.594 10.38a.16.16 0 0 0 0 .234c.016.016.033.033.05.033c-.05.05-.101.085-.152.134q-.05.05-.05.1a.4.4 0 0 0-.067.084c-.067.067-.067.184.017.234c.067.066.185.066.235-.017c.017-.017.017-.033.033-.033a.265.265 0 0 1 .37 0c.202.217.404.435.588.618l-.42-.35c-.067-.067-.184-.05-.234.016c-.068.066-.051.184.016.234l4.469 3.727c.034.034.067.034.118.034a.15.15 0 0 0 .117-.05l.101-.1c.017.016.05.016.067.016c.05 0 .084-.016.118-.05c6.049-6.05 10.922-10.614 16.5-14.693c.05-.033.067-.1.067-.15c.067 0 .118-.05.15-.117c1.026-3.125 1.228-5.9 1.295-7.27c0-.059.016-.038.016-.068c.017-.033.017-.05.017-.05a.98.98 0 0 0-.067-.619m-10.82 4.915c.268-.301.537-.619.806-.903c-1.73 2.273-4.603 5.767-8.67 9.929c2.773-3.059 5.562-6.218 7.864-9.026M5.14 23.466c-.016-.017-.016-.017 0-.017zm2.504-2.156c.135-.15.27-.284.42-.434c0 0 0 .016.017.016c-.224.198-.433.418-.437.418m.69-.668c.099-.1.14-.173.284-.318c.992-1.02 2.017-2.04 3.059-3.076l.016-.016c.252-.2.555-.418.824-.619a228 228 0 0 0-4.184 4.029M14.852 3.91c-.554.719-1.176 1.671-1.697 2.423c-1.646 2.374-6.94 8.174-7.057 8.274a1190 1190 0 0 1-4.839 4.597l-.1.1c-.085-.1-.085-.25.016-.334C8.652 11.966 13.19 6.133 15.021 3.576c-.05.116-.084.216-.168.334zm2.906 3.427c-.671-.386-.99-.987-.806-1.572l.05-.2a.8.8 0 0 1 .085-.167a1.9 1.9 0 0 1 .756-.703c.016 0 .033 0 .05-.016c-.017-.034-.017-.084-.017-.134c.017-.1.085-.167.202-.167c.202 0 .824.184 1.059.384c.067.05.134.117.202.184c.084.1.218.268.285.401c.034.017.067.184.118.268c.033.134.067.284.05.418c-.017.016 0 .116-.017.116a1.6 1.6 0 0 1-.218.619c-.03.03.006.012-.05.067a1.2 1.2 0 0 1-.32.334a1.49 1.49 0 0 1-1.26.234a2 2 0 0 0-.169-.066m4.37 1.403c0 .017-.017.05 0 .067c-.034 0-.05.017-.085.034a110 110 0 0 0-3.915 3.025c1.11-.986 2.218-1.989 3.378-2.975c.336-.301.571-.686.638-1.12l.168-1.003v-.033c.085-.201.404-.118.353.1c-.004-.001-.173.795-.537 1.905"})})}function Re(){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32",children:[a.jsx("path",{fill:"currentColor",d:"M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3z"}),a.jsx("path",{fill:"currentColor",d:"M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z"})]})}function Ve(){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",className:"icon",viewBox:"0 0 1024 1024",children:[a.jsx("path",{fill:"currentColor",d:"M679.253 402.364 618.77 561.015l-60.348-158.651a30.04 30.04 0 0 0-30.447-18.637 29.76 29.76 0 0 0-30.447 18.637l-60.416 158.651-60.416-158.651a30.515 30.515 0 0 0-38.843-17.272 28.945 28.945 0 0 0-17.954 37.547l88.815 233.267c4.369 11.469 15.7 19.115 28.398 19.115a30.31 30.31 0 0 0 28.468-19.115l62.395-163.908 62.396 163.84c4.437 11.605 15.701 19.183 28.4 19.183a30.31 30.31 0 0 0 28.466-19.115l88.747-233.267a28.945 28.945 0 0 0-17.886-37.547 30.447 30.447 0 0 0-38.912 17.272zm219.478 395.605-51.883-29.218c-28.672-16.18-52.224-3.072-52.224 29.082v.273H643.209a29.833 29.833 0 0 0-30.31 29.354c0 16.18 13.584 29.218 30.31 29.218h151.825c1.092 30.516 24.03 43.077 52.224 27.648l51.063-27.989c29.013-15.906 29.15-42.189.41-58.368"}),a.jsx("path",{fill:"currentColor",d:"m810.667 913.135-.478.068H201.796c-19.865 0-36.727-11.673-36.727-25.6v-618.36h154.965c51.268 0 92.911-39.39 92.911-87.858v-87.86H810.19c19.797 0 36.522 11.742 36.522 25.669V739.26h61.987V119.262c0-46.421-44.169-84.241-98.51-84.241H328.364l-225.28 194.56v658.09c0 46.285 44.236 84.105 98.713 84.105H810.19c43.759 0 80.554-24.713 93.32-58.573h-92.842zM350.89 94.89v86.562c0 16.11-13.858 29.286-30.925 29.286H216.815L350.959 94.891z"})]})}function _t(){return a.jsx("svg",{height:"1em",viewBox:"0 0 15 15",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M2.5 10.5H2v.5h.5zm2 0v.5H5v-.5zm9-7h.5v-.207l-.146-.147zm-3-3l.354-.354L10.707 0H10.5zM2 6v4.5h1V6zm.5 5h2v-1h-2zm2.5-.5v-2H4v2zM3 7h2V6H3zM2 5V1.5H1V5zm11-1.5V5h1V3.5zM2.5 1h8V0h-8zm7.646-.146l3 3l.708-.708l-3-3zM2 1.5a.5.5 0 0 1 .5-.5V0A1.5 1.5 0 0 0 1 1.5zM1 12v1.5h1V12zm1.5 3h10v-1h-10zM14 13.5V12h-1v1.5zM12.5 15a1.5 1.5 0 0 0 1.5-1.5h-1a.5.5 0 0 1-.5.5zM1 13.5A1.5 1.5 0 0 0 2.5 15v-1a.5.5 0 0 1-.5-.5zM6 7h3V6H6zm0 4h3v-1H6zm1-4.5v4h1v-4zm3.5.5H13V6h-2.5zM10 6v5h1V6zm.5 3H12V8h-1.5z",fill:"currentColor"})})}function Ut(){return a.jsx("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:a.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",children:[a.jsx("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),a.jsx("path",{d:"M5 12V5a2 2 0 0 1 2-2h7l5 5v4M2 21v-6m3 0v6m-3-3h3m15-3v6h2m-9 0v-6l2 3l2-3v6m-9.5-6h3M9 15v6"})]})})}function $t(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:a.jsx("path",{fill:"currentColor",d:"M6.5 3a.75.75 0 0 1 .697.471l3 7.5a.75.75 0 0 1-1.393.557L7.992 9.5H5.008l-.811 2.028a.75.75 0 0 1-1.393-.556l3-7.5A.75.75 0 0 1 6.5 3m0 2.77L5.608 8h1.784zm8.28-1.55a.75.75 0 1 0-1.06 1.06l.72.72h-3.69a.75.75 0 0 0 0 1.5h3.69l-.72.72a.75.75 0 0 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06zm0 7.5a.75.75 0 1 0-1.06 1.06l.72.72H3.75a.75.75 0 0 0 0 1.5h10.69l-.72.72a.75.75 0 1 0 1.06 1.06l2-2a.75.75 0 0 0 0-1.06z"})})}function Ft(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48",children:a.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"4",children:[a.jsx("circle",{cx:"10",cy:"24",r:"4"}),a.jsx("circle",{cx:"38",cy:"10",r:"4"}),a.jsx("circle",{cx:"38",cy:"24",r:"4"}),a.jsx("circle",{cx:"38",cy:"38",r:"4"}),a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M34 38H22V10h12M14 24h20"})]})})}function qt(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",children:a.jsx("path",{fill:"currentColor",d:"M13.5 3a.75.75 0 0 0-.697.471l-3 7.5a.75.75 0 0 0 1.393.557l.812-2.028h2.984l.811 2.028a.75.75 0 0 0 1.393-.556l-3-7.5A.75.75 0 0 0 13.5 3m0 2.77L14.392 8h-1.784zM5.22 4.22a.75.75 0 0 1 1.06 1.06L5.56 6h3.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 0 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06zm0 7.5a.75.75 0 0 1 1.06 1.06l-.72.72h10.69a.75.75 0 0 1 0 1.5H5.56l.72.72a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06z"})})}function Dt(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"m3 21l7.548-7.548M21 3l-7.548 7.548m0 0L8 3H3l7.548 10.452m2.904-2.904L21 21h-5l-5.452-7.548",color:"currentColor"})})}function Xt(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",children:a.jsx("path",{fill:"currentColor",d:"M14 2H6a2 2 0 0 0-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V8zm4 18H6V4h7v5h5zm-.65-10l-2.1 9h-1.4l-1.8-6.79l-1.8 6.79h-1.4l-2.2-9h1.5l1.4 6.81l1.8-6.81h1.3l1.8 6.81l1.4-6.81z"})})}const Pe={Bold:l.Bold,LoaderCircle:l.LoaderCircle,Italic:l.Italic,Underline:l.Underline,Quote:l.Quote,TextQuote:Lt,Strikethrough:l.Strikethrough,Minus:l.Minus,Eraser:l.Eraser,PaintRoller:l.PaintRoller,Redo2:l.Redo2,Undo2:l.Undo2,AlignCenter:W.TextAlignCenterIcon,AlignJustify:W.TextAlignJustifyIcon,AlignLeft:W.TextAlignLeftIcon,AlignRight:W.TextAlignRightIcon,ChevronDown:l.ChevronDown,Subscript:l.Subscript,Superscript:l.Superscript,Code:l.Code,Code2:l.CodeXml,Type:l.Type,IndentIncrease:l.IndentIncrease,IndentDecrease:l.IndentDecrease,List:l.List,ListOrdered:l.ListOrdered,ListTodo:l.ListTodo,Link:l.Link,ImageUp:l.ImageUp,Video:l.Video,Maximize:l.Maximize,Minimize:l.Minimize,Table:l.Table,Sparkles:l.Sparkles,Pencil:l.Pencil,Unlink:l.Unlink,BetweenHorizonalEnd:l.BetweenHorizonalEnd,BetweenHorizonalStart:l.BetweenHorizonalStart,BetweenVerticalStart:l.BetweenVerticalStart,BetweenVerticalEnd:l.BetweenVerticalEnd,TableCellsMerge:l.TableCellsMerge,TableCellsSplit:l.TableCellsSplit,Trash2:l.Trash2,Trash:l.Trash,Replace:l.Replace,ChevronsUpDown:l.ChevronsUpDown,LineHeight:Rt,Word:At,HeadingParagraph:l.Pilcrow,Heading1:l.Heading1,Heading2:l.Heading2,Heading3:l.Heading3,Heading4:l.Heading4,Heading5:l.Heading5,Heading6:l.Heading6,Columns2:l.Columns2,Columns3:l.Columns3,Columns4:l.Columns4,Plus:l.Plus,Grip:l.GripVertical,Copy:l.Copy,Clipboard:l.Clipboard,PanelLeft:l.PanelLeft,PanelRight:l.PanelRight,Columns:l.Columns2,Iframe:l.Frame,MenuDown:Ae,SizeS:Nt,SizeM:Pt,SizeL:Vt,AspectRatio:Et,Emoji:l.SmilePlus,DeleteColumn:Tt,DeleteRow:Ht,SearchAndReplace:l.Replace,EmojiIcon:l.SmilePlusIcon,KatexIcon:l.Sigma,ExportPdf:Re,ExportWord:Ve,ImportWord:Xt,ColumnAddLeft:Bt,ColumnAddRight:Gt,BookMarked:l.BookMarked,Excalidraw:Wt,ZoomIn:l.ZoomIn,ZoomOut:l.ZoomOut,Settings:l.Settings,Eye:l.Eye,TextDirection:Ot,LeftToRight:$t,RightToLeft:qt,Attachment:l.Paperclip,GifIcon:_t,ChevronUp:l.ChevronUp,Crop:l.CropIcon,Mermaid:Ft,Twitter:Dt,CodeView:It,FlipX:l.FlipVertical,FlipY:l.FlipHorizontal,PencilRuler:l.PencilRuler,WrapText:l.WrapText,Loader:l.Loader2,X:l.X,Html:Ut,ExternalLink:l.ExternalLink},be=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ve=Ce.clsx,Ne=(e,r)=>t=>{var o;if((r==null?void 0:r.variants)==null)return ve(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:i,defaultVariants:n}=r,c=Object.keys(i).map(d=>{const p=t==null?void 0:t[d],m=n==null?void 0:n[d];if(p===null)return null;const u=be(p)||be(m);return i[d][u]}),s=t&&Object.entries(t).reduce((d,p)=>{let[m,u]=p;return u===void 0||(d[m]=u),d},{}),h=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((d,p)=>{let{class:m,className:u,...b}=p;return Object.entries(b).every(z=>{let[w,f]=z;return Array.isArray(f)?f.includes({...n,...s}[w]):{...n,...s}[w]===f})?[...d,m,u]:d},[]);return ve(e,c,h,t==null?void 0:t.class,t==null?void 0:t.className)},Kt=Ne("richtext-inline-flex richtext-items-center richtext-justify-center richtext-rounded-md richtext-text-sm richtext-font-medium richtext-ring-offset-background richtext-transition-colors hover:richtext-bg-muted hover:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-2 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-pointer-events-none disabled:richtext-opacity-50 data-[state=on]:richtext-bg-accent data-[state=on]:richtext-text-accent-foreground",{variants:{variant:{default:"richtext-bg-transparent",outline:"richtext-border richtext-border-input richtext-bg-transparent hover:richtext-bg-accent hover:richtext-text-accent-foreground"},size:{default:"richtext-h-10 richtext-px-3",sm:"richtext-h-9 richtext-px-2",lg:"richtext-h-11 richtext-px-5"}},defaultVariants:{variant:"default",size:"default"}}),re=ze.forwardRef(({className:e,variant:r,size:t,...o},i)=>a.jsx(je.Root,{ref:i,className:U(Kt({variant:r,size:t,className:e})),...o}));re.displayName=je.Root.displayName;const Qt=I.Provider,Ie=I.Root,Be=I.Trigger,oe=ze.forwardRef(({className:e,sideOffset:r=4,...t},o)=>a.jsx(I.Content,{"data-richtext-portal":!0,ref:o,sideOffset:r,className:U("richtext-z-50 richtext-overflow-hidden richtext-rounded-md richtext-bg-primary richtext-px-3 richtext-py-1.5 richtext-text-sm richtext-text-primary-foreground richtext-shadow-md richtext-animate-in richtext-fade-in-0 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 !richtext-border-none",e),...t}));oe.displayName=I.Content.displayName;function ne(e){function r(){const n=x.useRef(e),c=x.useCallback(()=>n.current,[]),s=x.useRef(new Set),h=x.useCallback(p=>{n.current={...n.current,...p},s.current.forEach(m=>m())},[]),d=x.useCallback(p=>(s.current.add(p),()=>s.current.delete(p)),[]);return{get:c,set:h,subscribe:d}}const t=x.createContext(null);function o({children:n}){return a.jsx(t.Provider,{value:r(),children:n})}function i(n){const c=x.useContext(t);if(!c)throw new Error("Store not found");return[x.useSyncExternalStore(c.subscribe,()=>n(c.get()),()=>n(e)),c.set]}return{Provider:o,useStore:i}}ne({value:!1});ne({value:!1});const{Provider:Zt,useStore:Ge}=ne({value:!1});function Jt(){const[e]=Ge(r=>r.value);return e}const we="data-rc-order",ye="data-rc-priority",Yt="rc-util-key",Y=new Map;function er(e,r){if(!e)return!1;if(e.contains)return e.contains(r);let t=r;for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Oe({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:Yt}function se(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function tr(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function We(e){return[...(Y.get(e)||e).children].filter(r=>r.tagName==="STYLE")}function _e(e,r={}){const{csp:t,prepend:o,priority:i=0}=r,n=tr(o),c=n==="prependQueue",s=document.createElement("style");s.setAttribute(we,n),c&&i&&s.setAttribute(ye,`${i}`),t!=null&&t.nonce&&(s.nonce=t==null?void 0:t.nonce),s.innerHTML=e;const h=se(r),{firstChild:d}=h;if(o){if(c){const p=We(h).filter(m=>{if(!["prepend","prependQueue"].includes(m.getAttribute(we)))return!1;const u=Number(m.getAttribute(ye)||0);return i>=u});if(p.length>0)return h.insertBefore(s,p.at(-1).nextSibling),s}d.before(s)}else h.append(s);return s}function Ue(e,r={}){const t=se(r);return We(t).find(o=>o.getAttribute(Oe(r))===e)}function $e(e,r={}){const t=Ue(e,r);t&&t.remove()}function rr(e,r){const t=Y.get(e);if(!t||!er(document,t)){const o=_e("",r),{parentNode:i}=o;Y.set(e,i),o.remove()}}function Fe(e,r,t={}){var c,s,h;const o=se(t);rr(o,t);const i=Ue(r,t);if(i)return(c=t.csp)!=null&&c.nonce&&i.nonce!==((s=t.csp)==null?void 0:s.nonce)&&(i.nonce=(h=t.csp)==null?void 0:h.nonce),i.innerHTML!==e&&(i.innerHTML=e),i;const n=_e(e,t);return n.setAttribute(Oe(t),r),n}const or=x.memo(({editor:e,children:r})=>{const[,t]=Ge(i=>i.value);x.useEffect(()=>{t({value:e==null?void 0:e.isEditable})},[e==null?void 0:e.isEditable]);const o=()=>{t({value:e==null?void 0:e.isEditable})};return x.useEffect(()=>(e&&e.on("update",o),()=>{e&&e.off("update",o)}),[e]),a.jsx(a.Fragment,{children:r})});function nr(){const[,e]=ge.x(ge.atomLang),r=o=>{e(i=>({...i,currentLang:o.detail}))},t=o=>{const{lang:i,messages:n}=o.detail;e(c=>{if(c.message[i]){const s={...c.message[i],...n};return{currentLang:c.currentLang,message:{...c.message,[i]:s}}}else return{currentLang:c.currentLang,message:{...c.message,[i]:n}}})};return x.useEffect(()=>{const o=k.listenEvent(k.EVENTS.CHANGE_LANGUAGE,r),i=k.listenEvent(k.EVENTS.MODIFY_LANGUAGE,t);return()=>{o(),i()}},[]),a.jsx(a.Fragment,{})}function sr(){const[e,r]=_("richtext-theme","light"),[t,o]=_("richtext-color","default"),[i,n]=_("richtext-border-radius","0.65rem");x.useEffect(()=>{const d=e||"light",p=t||"default";let m=pe.THEME[d][p];if(!m){m=pe.THEME.light.default;return}return Fe(`
|
|
2
|
+
.reactjs-tiptap-editor, .reactjs-tiptap-editor *,
|
|
3
|
+
.reactjs-tiptap-editor-theme, .reactjs-tiptap-editor-theme *,
|
|
4
|
+
div[data-richtext-portal], div[data-richtext-portal] * {
|
|
5
|
+
${Object.entries(m).map(([u,b])=>typeof i=="string"&&u==="radius"?`--${u}: ${i};`:`--${u}: ${b};`).join(`
|
|
6
|
+
`)}
|
|
7
|
+
}
|
|
8
|
+
`,"richtext-theme",{priority:50}),()=>{$e("richtext-theme")}},[e,t,i]);const c=d=>{r(d.detail)},s=d=>{o(d.detail)},h=d=>{n(d.detail)};return x.useEffect(()=>{const d=k.listenEvent(k.EVENTS.CHANGE_THEME,c),p=k.listenEvent(k.EVENTS.CHANGE_COLOR,s),m=k.listenEvent(k.EVENTS.CHANGE_BORDER_RADIUS,h);return()=>{d(),p(),m()}},[]),a.jsx(a.Fragment,{})}function ir({editor:e,children:r,id:t}){return a.jsxs(Zt,{children:[a.jsx(or,{editor:e,id:t,children:r}),a.jsx(nr,{}),a.jsx(sr,{})]})}exports.ActionButton=Mt;exports.ExportPdf=Re;exports.ExportWord=Ve;exports.MenuDown=Ae;exports.ProviderUniqueId=ir;exports.Toggle=re;exports.Tooltip=Ie;exports.TooltipContent=oe;exports.TooltipProvider=Qt;exports.TooltipTrigger=Be;exports.cn=U;exports.cva=Ne;exports.getShortcutKey=Te;exports.getShortcutKeys=He;exports.icons=Pe;exports.removeCSS=$e;exports.updateCSS=Fe;exports.useEditableEditor=Jt;exports.useLocalStorage=_;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const Mt=require("@tiptap/pm/state"),Rt=require("@tiptap/pm/view"),Jt=require("./index-BBNITgNi.cjs"),_t=["top","right","bottom","left"],At=["start","end"],Ot=_t.reduce((t,e)=>t.concat(e,e+"-"+At[0],e+"-"+At[1]),[]),j=Math.min,M=Math.max,rt=Math.round,H=t=>({x:t,y:t}),Qt={left:"right",right:"left",bottom:"top",top:"bottom"},Zt={start:"end",end:"start"};function ht(t,e,o){return M(t,j(e,o))}function Y(t,e){return typeof t=="function"?t(e):t}function F(t){return t.split("-")[0]}function q(t){return t.split("-")[1]}function Nt(t){return t==="x"?"y":"x"}function wt(t){return t==="y"?"height":"width"}const te=new Set(["top","bottom"]);function V(t){return te.has(F(t))?"y":"x"}function xt(t){return Nt(V(t))}function Ft(t,e,o){o===void 0&&(o=!1);const n=q(t),i=xt(t),s=wt(i);let r=i==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=lt(r)),[r,lt(r)]}function ee(t){const e=lt(t);return[ct(t),e,ct(e)]}function ct(t){return t.replace(/start|end/g,e=>Zt[e])}const Ct=["left","right"],Pt=["right","left"],ne=["top","bottom"],oe=["bottom","top"];function ie(t,e,o){switch(t){case"top":case"bottom":return o?e?Pt:Ct:e?Ct:Pt;case"left":case"right":return e?ne:oe;default:return[]}}function se(t,e,o,n){const i=q(t);let s=ie(F(t),o==="start",n);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(ct)))),s}function lt(t){return t.replace(/left|right|bottom|top/g,e=>Qt[e])}function re(t){return{top:0,right:0,bottom:0,left:0,...t}}function yt(t){return typeof t!="number"?re(t):{top:t,right:t,bottom:t,left:t}}function Q(t){const{x:e,y:o,width:n,height:i}=t;return{width:n,height:i,top:o,left:e,right:e+n,bottom:o+i,x:e,y:o}}function Et(t,e,o){let{reference:n,floating:i}=t;const s=V(e),r=xt(e),c=wt(r),f=F(e),a=s==="y",u=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2,w=n[c]/2-i[c]/2;let g;switch(f){case"top":g={x:u,y:n.y-i.height};break;case"bottom":g={x:u,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:l};break;case"left":g={x:n.x-i.width,y:l};break;default:g={x:n.x,y:n.y}}switch(q(e)){case"start":g[r]-=w*(o&&a?-1:1);break;case"end":g[r]+=w*(o&&a?-1:1);break}return g}const ce=async(t,e,o)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:r}=o,c=s.filter(Boolean),f=await(r.isRTL==null?void 0:r.isRTL(e));let a=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:l}=Et(a,n,f),w=n,g={},p=0;for(let v=0;v<c.length;v++){const{name:d,fn:m}=c[v],{x:S,y:A,data:E,reset:O}=await m({x:u,y:l,initialPlacement:n,placement:w,strategy:i,middlewareData:g,rects:a,platform:r,elements:{reference:t,floating:e}});u=S??u,l=A??l,g={...g,[d]:{...g[d],...E}},O&&p<=50&&(p++,typeof O=="object"&&(O.placement&&(w=O.placement),O.rects&&(a=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):O.rects),{x:u,y:l}=Et(a,w,f)),v=-1)}return{x:u,y:l,placement:w,strategy:i,middlewareData:g}};async function Z(t,e){var o;e===void 0&&(e={});const{x:n,y:i,platform:s,rects:r,elements:c,strategy:f}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:l="floating",altBoundary:w=!1,padding:g=0}=Y(e,t),p=yt(g),d=c[w?l==="floating"?"reference":"floating":l],m=Q(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(d)))==null||o?d:d.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:f})),S=l==="floating"?{x:n,y:i,width:r.floating.width,height:r.floating.height}:r.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),E=await(s.isElement==null?void 0:s.isElement(A))?await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},O=Q(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:S,offsetParent:A,strategy:f}):S);return{top:(m.top-O.top+p.top)/E.y,bottom:(O.bottom-m.bottom+p.bottom)/E.y,left:(m.left-O.left+p.left)/E.x,right:(O.right-m.right+p.right)/E.x}}const le=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:n,placement:i,rects:s,platform:r,elements:c,middlewareData:f}=e,{element:a,padding:u=0}=Y(t,e)||{};if(a==null)return{};const l=yt(u),w={x:o,y:n},g=xt(i),p=wt(g),v=await r.getDimensions(a),d=g==="y",m=d?"top":"left",S=d?"bottom":"right",A=d?"clientHeight":"clientWidth",E=s.reference[p]+s.reference[g]-w[g]-s.floating[p],O=w[g]-s.reference[g],y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a));let b=y?y[A]:0;(!b||!await(r.isElement==null?void 0:r.isElement(y)))&&(b=c.floating[A]||s.floating[p]);const C=E/2-O/2,P=b/2-v[p]/2-1,h=j(l[m],P),R=j(l[S],P),D=h,k=b-v[p]-R,L=b/2-v[p]/2+C,x=ht(D,L,k),$=!f.arrow&&q(i)!=null&&L!==x&&s.reference[p]/2-(L<D?h:R)-v[p]/2<0,T=$?L<D?L-D:L-k:0;return{[g]:w[g]+T,data:{[g]:x,centerOffset:L-x-T,...$&&{alignmentOffset:T}},reset:$}}});function ae(t,e,o){return(t?[...o.filter(i=>q(i)===t),...o.filter(i=>q(i)!==t)]:o.filter(i=>F(i)===i)).filter(i=>t?q(i)===t||(e?ct(i)!==i:!1):!0)}const fe=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var o,n,i;const{rects:s,middlewareData:r,placement:c,platform:f,elements:a}=e,{crossAxis:u=!1,alignment:l,allowedPlacements:w=Ot,autoAlignment:g=!0,...p}=Y(t,e),v=l!==void 0||w===Ot?ae(l||null,g,w):w,d=await Z(e,p),m=((o=r.autoPlacement)==null?void 0:o.index)||0,S=v[m];if(S==null)return{};const A=Ft(S,s,await(f.isRTL==null?void 0:f.isRTL(a.floating)));if(c!==S)return{reset:{placement:v[0]}};const E=[d[F(S)],d[A[0]],d[A[1]]],O=[...((n=r.autoPlacement)==null?void 0:n.overflows)||[],{placement:S,overflows:E}],y=v[m+1];if(y)return{data:{index:m+1,overflows:O},reset:{placement:y}};const b=O.map(h=>{const R=q(h.placement);return[h.placement,R&&u?h.overflows.slice(0,2).reduce((D,k)=>D+k,0):h.overflows[0],h.overflows]}).sort((h,R)=>h[1]-R[1]),P=((i=b.filter(h=>h[2].slice(0,q(h[0])?2:3).every(R=>R<=0))[0])==null?void 0:i[0])||b[0][0];return P!==c?{data:{index:m+1,overflows:O},reset:{placement:P}}:{}}}},ue=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,n;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:f,elements:a}=e,{mainAxis:u=!0,crossAxis:l=!0,fallbackPlacements:w,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:v=!0,...d}=Y(t,e);if((o=s.arrow)!=null&&o.alignmentOffset)return{};const m=F(i),S=V(c),A=F(c)===c,E=await(f.isRTL==null?void 0:f.isRTL(a.floating)),O=w||(A||!v?[lt(c)]:ee(c)),y=p!=="none";!w&&y&&O.push(...se(c,v,p,E));const b=[c,...O],C=await Z(e,d),P=[];let h=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&P.push(C[m]),l){const L=Ft(i,r,E);P.push(C[L[0]],C[L[1]])}if(h=[...h,{placement:i,overflows:P}],!P.every(L=>L<=0)){var R,D;const L=(((R=s.flip)==null?void 0:R.index)||0)+1,x=b[L];if(x&&(!(l==="alignment"?S!==V(x):!1)||h.every(B=>V(B.placement)===S?B.overflows[0]>0:!0)))return{data:{index:L,overflows:h},reset:{placement:x}};let $=(D=h.filter(T=>T.overflows[0]<=0).sort((T,B)=>T.overflows[1]-B.overflows[1])[0])==null?void 0:D.placement;if(!$)switch(g){case"bestFit":{var k;const T=(k=h.filter(B=>{if(y){const _=V(B.placement);return _===S||_==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(_=>_>0).reduce((_,U)=>_+U,0)]).sort((B,_)=>B[1]-_[1])[0])==null?void 0:k[0];T&&($=T);break}case"initialPlacement":$=c;break}if(i!==$)return{reset:{placement:$}}}return{}}}};function Dt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Tt(t){return _t.some(e=>t[e]>=0)}const de=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:o}=e,{strategy:n="referenceHidden",...i}=Y(t,e);switch(n){case"referenceHidden":{const s=await Z(e,{...i,elementContext:"reference"}),r=Dt(s,o.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Tt(r)}}}case"escaped":{const s=await Z(e,{...i,altBoundary:!0}),r=Dt(s,o.floating);return{data:{escapedOffsets:r,escaped:Tt(r)}}}default:return{}}}}};function qt(t){const e=j(...t.map(s=>s.left)),o=j(...t.map(s=>s.top)),n=M(...t.map(s=>s.right)),i=M(...t.map(s=>s.bottom));return{x:e,y:o,width:n-e,height:i-o}}function me(t){const e=t.slice().sort((i,s)=>i.y-s.y),o=[];let n=null;for(let i=0;i<e.length;i++){const s=e[i];!n||s.y-n.y>n.height/2?o.push([s]):o[o.length-1].push(s),n=s}return o.map(i=>Q(qt(i)))}const ge=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:o,elements:n,rects:i,platform:s,strategy:r}=e,{padding:c=2,x:f,y:a}=Y(t,e),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(n.reference))||[]),l=me(u),w=Q(qt(u)),g=yt(c);function p(){if(l.length===2&&l[0].left>l[1].right&&f!=null&&a!=null)return l.find(d=>f>d.left-g.left&&f<d.right+g.right&&a>d.top-g.top&&a<d.bottom+g.bottom)||w;if(l.length>=2){if(V(o)==="y"){const h=l[0],R=l[l.length-1],D=F(o)==="top",k=h.top,L=R.bottom,x=D?h.left:R.left,$=D?h.right:R.right,T=$-x,B=L-k;return{top:k,bottom:L,left:x,right:$,width:T,height:B,x,y:k}}const d=F(o)==="left",m=M(...l.map(h=>h.right)),S=j(...l.map(h=>h.left)),A=l.filter(h=>d?h.left===S:h.right===m),E=A[0].top,O=A[A.length-1].bottom,y=S,b=m,C=b-y,P=O-E;return{top:E,bottom:O,left:y,right:b,width:C,height:P,x:y,y:E}}return w}const v=await s.getElementRects({reference:{getBoundingClientRect:p},floating:n.floating,strategy:r});return i.reference.x!==v.reference.x||i.reference.y!==v.reference.y||i.reference.width!==v.reference.width||i.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},he=new Set(["left","top"]);async function pe(t,e){const{placement:o,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),r=F(o),c=q(o),f=V(o)==="y",a=he.has(r)?-1:1,u=s&&f?-1:1,l=Y(e,t);let{mainAxis:w,crossAxis:g,alignmentAxis:p}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return c&&typeof p=="number"&&(g=c==="end"?p*-1:p),f?{x:g*u,y:w*a}:{x:w*a,y:g*u}}const we=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var o,n;const{x:i,y:s,placement:r,middlewareData:c}=e,f=await pe(e,t);return r===((o=c.offset)==null?void 0:o.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:i+f.x,y:s+f.y,data:{...f,placement:r}}}}},xe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:c={fn:d=>{let{x:m,y:S}=d;return{x:m,y:S}}},...f}=Y(t,e),a={x:o,y:n},u=await Z(e,f),l=V(F(i)),w=Nt(l);let g=a[w],p=a[l];if(s){const d=w==="y"?"top":"left",m=w==="y"?"bottom":"right",S=g+u[d],A=g-u[m];g=ht(S,g,A)}if(r){const d=l==="y"?"top":"left",m=l==="y"?"bottom":"right",S=p+u[d],A=p-u[m];p=ht(S,p,A)}const v=c.fn({...e,[w]:g,[l]:p});return{...v,data:{x:v.x-o,y:v.y-n,enabled:{[w]:s,[l]:r}}}}}},ye=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var o,n;const{placement:i,rects:s,platform:r,elements:c}=e,{apply:f=()=>{},...a}=Y(t,e),u=await Z(e,a),l=F(i),w=q(i),g=V(i)==="y",{width:p,height:v}=s.floating;let d,m;l==="top"||l==="bottom"?(d=l,m=w===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(m=l,d=w==="end"?"top":"bottom");const S=v-u.top-u.bottom,A=p-u.left-u.right,E=j(v-u[d],S),O=j(p-u[m],A),y=!e.middlewareData.shift;let b=E,C=O;if((o=e.middlewareData.shift)!=null&&o.enabled.x&&(C=A),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(b=S),y&&!w){const h=M(u.left,0),R=M(u.right,0),D=M(u.top,0),k=M(u.bottom,0);g?C=p-2*(h!==0||R!==0?h+R:M(u.left,u.right)):b=v-2*(D!==0||k!==0?D+k:M(u.top,u.bottom))}await f({...e,availableWidth:C,availableHeight:b});const P=await r.getDimensions(c.floating);return p!==P.width||v!==P.height?{reset:{rects:!0}}:{}}}};function at(){return typeof window<"u"}function et(t){return It(t)?(t.nodeName||"").toLowerCase():"#document"}function N(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function z(t){var e;return(e=(It(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function It(t){return at()?t instanceof Node||t instanceof N(t).Node:!1}function I(t){return at()?t instanceof Element||t instanceof N(t).Element:!1}function X(t){return at()?t instanceof HTMLElement||t instanceof N(t).HTMLElement:!1}function Lt(t){return!at()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof N(t).ShadowRoot}const ve=new Set(["inline","contents"]);function it(t){const{overflow:e,overflowX:o,overflowY:n,display:i}=W(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+o)&&!ve.has(i)}const be=new Set(["table","td","th"]);function Se(t){return be.has(et(t))}const Re=[":popover-open",":modal"];function ft(t){return Re.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ae=["transform","translate","scale","rotate","perspective"],Oe=["transform","translate","scale","rotate","perspective","filter"],Ce=["paint","layout","strict","content"];function vt(t){const e=bt(),o=I(t)?W(t):t;return Ae.some(n=>o[n]?o[n]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||Oe.some(n=>(o.willChange||"").includes(n))||Ce.some(n=>(o.contain||"").includes(n))}function Pe(t){let e=K(t);for(;X(e)&&!tt(e);){if(vt(e))return e;if(ft(e))return null;e=K(e)}return null}function bt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ee=new Set(["html","body","#document"]);function tt(t){return Ee.has(et(t))}function W(t){return N(t).getComputedStyle(t)}function ut(t){return I(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||Lt(t)&&t.host||z(t);return Lt(e)?e.host:e}function Wt(t){const e=K(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:X(e)&&it(e)?e:Wt(e)}function Vt(t,e,o){var n;e===void 0&&(e=[]);const i=Wt(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),r=N(i);return s?(pt(r),e.concat(r,r.visualViewport||[],it(i)?i:[],[])):e.concat(i,Vt(i,[]))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ht(t){const e=W(t);let o=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=X(t),s=i?t.offsetWidth:o,r=i?t.offsetHeight:n,c=rt(o)!==s||rt(n)!==r;return c&&(o=s,n=r),{width:o,height:n,$:c}}function jt(t){return I(t)?t:t.contextElement}function J(t){const e=jt(t);if(!X(e))return H(1);const o=e.getBoundingClientRect(),{width:n,height:i,$:s}=Ht(e);let r=(s?rt(o.width):o.width)/n,c=(s?rt(o.height):o.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const De=H(0);function Xt(t){const e=N(t);return!bt()||!e.visualViewport?De:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Te(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==N(t)?!1:e}function ot(t,e,o,n){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),s=jt(t);let r=H(1);e&&(n?I(n)&&(r=J(n)):r=J(t));const c=Te(s,o,n)?Xt(s):H(0);let f=(i.left+c.x)/r.x,a=(i.top+c.y)/r.y,u=i.width/r.x,l=i.height/r.y;if(s){const w=N(s),g=n&&I(n)?N(n):n;let p=w,v=pt(p);for(;v&&n&&g!==p;){const d=J(v),m=v.getBoundingClientRect(),S=W(v),A=m.left+(v.clientLeft+parseFloat(S.paddingLeft))*d.x,E=m.top+(v.clientTop+parseFloat(S.paddingTop))*d.y;f*=d.x,a*=d.y,u*=d.x,l*=d.y,f+=A,a+=E,p=N(v),v=pt(p)}}return Q({width:u,height:l,x:f,y:a})}function dt(t,e){const o=ut(t).scrollLeft;return e?e.left+o:ot(z(t)).left+o}function Yt(t,e){const o=t.getBoundingClientRect(),n=o.left+e.scrollLeft-dt(t,o),i=o.top+e.scrollTop;return{x:n,y:i}}function Le(t){let{elements:e,rect:o,offsetParent:n,strategy:i}=t;const s=i==="fixed",r=z(n),c=e?ft(e.floating):!1;if(n===r||c&&s)return o;let f={scrollLeft:0,scrollTop:0},a=H(1);const u=H(0),l=X(n);if((l||!l&&!s)&&((et(n)!=="body"||it(r))&&(f=ut(n)),X(n))){const g=ot(n);a=J(n),u.x=g.x+n.clientLeft,u.y=g.y+n.clientTop}const w=r&&!l&&!s?Yt(r,f):H(0);return{width:o.width*a.x,height:o.height*a.y,x:o.x*a.x-f.scrollLeft*a.x+u.x+w.x,y:o.y*a.y-f.scrollTop*a.y+u.y+w.y}}function $e(t){return Array.from(t.getClientRects())}function ke(t){const e=z(t),o=ut(t),n=t.ownerDocument.body,i=M(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=M(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let r=-o.scrollLeft+dt(t);const c=-o.scrollTop;return W(n).direction==="rtl"&&(r+=M(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:r,y:c}}const $t=25;function Be(t,e){const o=N(t),n=z(t),i=o.visualViewport;let s=n.clientWidth,r=n.clientHeight,c=0,f=0;if(i){s=i.width,r=i.height;const u=bt();(!u||u&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const a=dt(n);if(a<=0){const u=n.ownerDocument,l=u.body,w=getComputedStyle(l),g=u.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,p=Math.abs(n.clientWidth-l.clientWidth-g);p<=$t&&(s-=p)}else a<=$t&&(s+=a);return{width:s,height:r,x:c,y:f}}const Me=new Set(["absolute","fixed"]);function _e(t,e){const o=ot(t,!0,e==="fixed"),n=o.top+t.clientTop,i=o.left+t.clientLeft,s=X(t)?J(t):H(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,f=i*s.x,a=n*s.y;return{width:r,height:c,x:f,y:a}}function kt(t,e,o){let n;if(e==="viewport")n=Be(t,o);else if(e==="document")n=ke(z(t));else if(I(e))n=_e(e,o);else{const i=Xt(t);n={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Q(n)}function zt(t,e){const o=K(t);return o===e||!I(o)||tt(o)?!1:W(o).position==="fixed"||zt(o,e)}function Ne(t,e){const o=e.get(t);if(o)return o;let n=Vt(t,[]).filter(c=>I(c)&&et(c)!=="body"),i=null;const s=W(t).position==="fixed";let r=s?K(t):t;for(;I(r)&&!tt(r);){const c=W(r),f=vt(r);!f&&c.position==="fixed"&&(i=null),(s?!f&&!i:!f&&c.position==="static"&&!!i&&Me.has(i.position)||it(r)&&!f&&zt(t,r))?n=n.filter(u=>u!==r):i=c,r=K(r)}return e.set(t,n),n}function Fe(t){let{element:e,boundary:o,rootBoundary:n,strategy:i}=t;const r=[...o==="clippingAncestors"?ft(e)?[]:Ne(e,this._c):[].concat(o),n],c=r[0],f=r.reduce((a,u)=>{const l=kt(e,u,i);return a.top=M(l.top,a.top),a.right=j(l.right,a.right),a.bottom=j(l.bottom,a.bottom),a.left=M(l.left,a.left),a},kt(e,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function qe(t){const{width:e,height:o}=Ht(t);return{width:e,height:o}}function Ie(t,e,o){const n=X(e),i=z(e),s=o==="fixed",r=ot(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const f=H(0);function a(){f.x=dt(i)}if(n||!n&&!s)if((et(e)!=="body"||it(i))&&(c=ut(e)),n){const g=ot(e,!0,s,e);f.x=g.x+e.clientLeft,f.y=g.y+e.clientTop}else i&&a();s&&!n&&i&&a();const u=i&&!n&&!s?Yt(i,c):H(0),l=r.left+c.scrollLeft-f.x-u.x,w=r.top+c.scrollTop-f.y-u.y;return{x:l,y:w,width:r.width,height:r.height}}function gt(t){return W(t).position==="static"}function Bt(t,e){if(!X(t)||W(t).position==="fixed")return null;if(e)return e(t);let o=t.offsetParent;return z(t)===o&&(o=o.ownerDocument.body),o}function Kt(t,e){const o=N(t);if(ft(t))return o;if(!X(t)){let i=K(t);for(;i&&!tt(i);){if(I(i)&&!gt(i))return i;i=K(i)}return o}let n=Bt(t,e);for(;n&&Se(n)&>(n);)n=Bt(n,e);return n&&tt(n)&>(n)&&!vt(n)?o:n||Pe(t)||o}const We=async function(t){const e=this.getOffsetParent||Kt,o=this.getDimensions,n=await o(t.floating);return{reference:Ie(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ve(t){return W(t).direction==="rtl"}const He={convertOffsetParentRelativeRectToViewportRelativeRect:Le,getDocumentElement:z,getClippingRect:Fe,getOffsetParent:Kt,getElementRects:We,getClientRects:$e,getDimensions:qe,getScale:J,isElement:I,isRTL:Ve},je=we,Xe=fe,Ye=xe,ze=ue,Ke=ye,Ue=de,Ge=le,Je=ge,Qe=(t,e,o)=>{const n=new Map,i={platform:He,...o},s={...i.platform,_c:n};return ce(t,e,{...i,platform:s})};function Ze(t){var e;const{char:o,allowSpaces:n,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:r,$position:c}=t,f=n&&!i,a=Jt.escapeForRegEx(o),u=new RegExp(`\\s${a}$`),l=r?"^":"",w=i?"":a,g=f?new RegExp(`${l}${a}.*?(?=\\s${w}|$)`,"gm"):new RegExp(`${l}(?:^)?${a}[^\\s${w}]*`,"gm"),p=((e=c.nodeBefore)==null?void 0:e.isText)&&c.nodeBefore.text;if(!p)return null;const v=c.pos-p.length,d=Array.from(p.matchAll(g)).pop();if(!d||d.input===void 0||d.index===void 0)return null;const m=d.input.slice(Math.max(0,d.index-1),d.index),S=new RegExp(`^[${s==null?void 0:s.join("")}\0]?$`).test(m);if(s!==null&&!S)return null;const A=v+d.index;let E=A+d[0].length;return f&&u.test(p.slice(E-1,E+1))&&(d[0]+=" ",E+=1),A<c.pos&&E>=c.pos?{range:{from:A,to:E},query:d[0].slice(o.length),text:d[0]}:null}var tn=new Mt.PluginKey("suggestion");function Ut({pluginKey:t=tn,editor:e,char:o="@",allowSpaces:n=!1,allowToIncludeChar:i=!1,allowedPrefixes:s=[" "],startOfLine:r=!1,decorationTag:c="span",decorationClass:f="suggestion",decorationContent:a="",decorationEmptyClass:u="is-empty",command:l=()=>null,items:w=()=>[],render:g=()=>({}),allow:p=()=>!0,findSuggestionMatch:v=Ze}){let d;const m=g==null?void 0:g(),S=()=>{const y=e.state.selection.$anchor.pos,b=e.view.coordsAtPos(y),{top:C,right:P,bottom:h,left:R}=b;try{return new DOMRect(R,C,P-R,h-C)}catch{return null}},A=(y,b)=>b?()=>{const C=t.getState(e.state),P=C==null?void 0:C.decorationId,h=y.dom.querySelector(`[data-decoration-id="${P}"]`);return(h==null?void 0:h.getBoundingClientRect())||null}:S;function E(y,b){var C;try{const h=t.getState(y.state),R=h!=null&&h.decorationId?y.dom.querySelector(`[data-decoration-id="${h.decorationId}"]`):null,D={editor:e,range:(h==null?void 0:h.range)||{from:0,to:0},query:(h==null?void 0:h.query)||null,text:(h==null?void 0:h.text)||null,items:[],command:k=>l({editor:e,range:(h==null?void 0:h.range)||{from:0,to:0},props:k}),decorationNode:R,clientRect:A(y,R)};(C=m==null?void 0:m.onExit)==null||C.call(m,D)}catch{}const P=y.state.tr.setMeta(b,{exit:!0});y.dispatch(P)}const O=new Mt.Plugin({key:t,view(){return{update:async(y,b)=>{var C,P,h,R,D,k,L;const x=(C=this.key)==null?void 0:C.getState(b),$=(P=this.key)==null?void 0:P.getState(y.state),T=x.active&&$.active&&x.range.from!==$.range.from,B=!x.active&&$.active,_=x.active&&!$.active,U=!B&&!_&&x.query!==$.query,nt=B||T&&U,st=U||T,mt=_||T&&U;if(!nt&&!st&&!mt)return;const G=mt&&!nt?x:$,St=y.dom.querySelector(`[data-decoration-id="${G.decorationId}"]`);d={editor:e,range:G.range,query:G.query,text:G.text,items:[],command:Gt=>l({editor:e,range:G.range,props:Gt}),decorationNode:St,clientRect:A(y,St)},nt&&((h=m==null?void 0:m.onBeforeStart)==null||h.call(m,d)),st&&((R=m==null?void 0:m.onBeforeUpdate)==null||R.call(m,d)),(st||nt)&&(d.items=await w({editor:e,query:G.query})),mt&&((D=m==null?void 0:m.onExit)==null||D.call(m,d)),st&&((k=m==null?void 0:m.onUpdate)==null||k.call(m,d)),nt&&((L=m==null?void 0:m.onStart)==null||L.call(m,d))},destroy:()=>{var y;d&&((y=m==null?void 0:m.onExit)==null||y.call(m,d))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(y,b,C,P){const{isEditable:h}=e,{composing:R}=e.view,{selection:D}=y,{empty:k,from:L}=D,x={...b},$=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=R,h&&(k||e.view.composing)){(L<b.range.from||L>b.range.to)&&!R&&!b.composing&&(x.active=!1);const T=v({char:o,allowSpaces:n,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:r,$position:D.$from}),B=`id_${Math.floor(Math.random()*4294967295)}`;T&&p({editor:e,state:P,range:T.range,isActive:b.active})?(x.active=!0,x.decorationId=b.decorationId?b.decorationId:B,x.range=T.range,x.query=T.query,x.text=T.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,b){var C,P,h,R;const{active:D,range:k}=O.getState(y.state);if(!D)return!1;if(b.key==="Escape"||b.key==="Esc"){const x=O.getState(y.state),$=(C=d==null?void 0:d.decorationNode)!=null?C:null,T=$??(x!=null&&x.decorationId?y.dom.querySelector(`[data-decoration-id="${x.decorationId}"]`):null);if(((P=m==null?void 0:m.onKeyDown)==null?void 0:P.call(m,{view:y,event:b,range:x.range}))||!1)return!0;const _={editor:e,range:x.range,query:x.query,text:x.text,items:[],command:U=>l({editor:e,range:x.range,props:U}),decorationNode:T,clientRect:T?()=>T.getBoundingClientRect()||null:null};return(h=m==null?void 0:m.onExit)==null||h.call(m,_),E(y,t),!0}return((R=m==null?void 0:m.onKeyDown)==null?void 0:R.call(m,{view:y,event:b,range:k}))||!1},decorations(y){const{active:b,range:C,decorationId:P,query:h}=O.getState(y);if(!b)return null;const R=!(h!=null&&h.length),D=[f];return R&&D.push(u),Rt.DecorationSet.create(y.doc,[Rt.Decoration.inline(C.from,C.to,{nodeName:c,class:D.join(" "),"data-decoration-id":P,"data-decoration-content":a})])}}});return O}var en=Ut;exports.Suggestion=Ut;exports.arrow=Ge;exports.autoPlacement=Xe;exports.computePosition=Qe;exports.flip=ze;exports.hide=Ue;exports.index_default=en;exports.inline=Je;exports.offset=je;exports.shift=Ye;exports.size=Ke;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as L, w as k, m, r as E, E as H, p as M, i as g, a as B, b as j, g as $, c as K } from "./index-
|
|
1
|
+
import { N as L, w as k, m, r as E, E as H, p as M, i as g, a as B, b as j, g as $, c as K } from "./index-sVScpCFG.js";
|
|
2
2
|
var V = Object.defineProperty, X = (t, e) => {
|
|
3
3
|
for (var s in e)
|
|
4
4
|
V(t, s, { get: e[s], enumerable: !0 });
|
|
@@ -7329,18 +7329,18 @@ export {
|
|
|
7329
7329
|
vn as D,
|
|
7330
7330
|
j as E,
|
|
7331
7331
|
v as F,
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7332
|
+
hl as G,
|
|
7333
|
+
dl as H,
|
|
7334
|
+
zs as I,
|
|
7335
|
+
Ws as J,
|
|
7336
|
+
Va as K,
|
|
7337
|
+
tr as L,
|
|
7338
7338
|
el as M,
|
|
7339
7339
|
cl as N,
|
|
7340
|
-
|
|
7341
|
-
|
|
7340
|
+
Ha as O,
|
|
7341
|
+
ll as P,
|
|
7342
7342
|
ja as Q,
|
|
7343
|
-
|
|
7343
|
+
Ia as R,
|
|
7344
7344
|
A as S,
|
|
7345
7345
|
$ as T,
|
|
7346
7346
|
Wa as U,
|
|
@@ -7365,24 +7365,24 @@ export {
|
|
|
7365
7365
|
fl as ab,
|
|
7366
7366
|
Ga as b,
|
|
7367
7367
|
Ua as c,
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7368
|
+
Qa as d,
|
|
7369
|
+
fr as e,
|
|
7370
|
+
ul as f,
|
|
7371
7371
|
I as g,
|
|
7372
|
-
|
|
7372
|
+
nl as h,
|
|
7373
7373
|
we as i,
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7374
|
+
Fe as j,
|
|
7375
|
+
al as k,
|
|
7376
|
+
Ya as l,
|
|
7377
7377
|
Bs as m,
|
|
7378
7378
|
rl as n,
|
|
7379
|
-
|
|
7379
|
+
Ht as o,
|
|
7380
7380
|
Io as p,
|
|
7381
|
-
|
|
7381
|
+
pl as q,
|
|
7382
7382
|
zo as r,
|
|
7383
|
-
|
|
7383
|
+
tl as s,
|
|
7384
7384
|
il as t,
|
|
7385
|
-
|
|
7385
|
+
ml as u,
|
|
7386
7386
|
C as v,
|
|
7387
7387
|
sl as w,
|
|
7388
7388
|
w as x,
|
package/lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),i=require("./index-C838s-or.cjs"),a=require("./index-BBNITgNi.cjs"),s=`
|
|
2
2
|
.reactjs-tiptap-editor {
|
|
3
3
|
button,
|
|
4
4
|
input:where([type=button]),
|
package/lib/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, Fragment as n } from "react/jsx-runtime";
|
|
2
2
|
import { useId as a, useEffect as r } from "react";
|
|
3
|
-
import { u as s, r as p, P as l, e as h } from "./index-
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
3
|
+
import { u as s, r as p, P as l, e as h } from "./index-C3zg3DPB.js";
|
|
4
|
+
import { e as c } from "./index-sVScpCFG.js";
|
|
5
|
+
const d = `
|
|
6
6
|
.reactjs-tiptap-editor {
|
|
7
7
|
button,
|
|
8
8
|
input:where([type=button]),
|
|
@@ -112,11 +112,11 @@ const c = `
|
|
|
112
112
|
`;
|
|
113
113
|
function g({ editor: t, children: o }) {
|
|
114
114
|
const i = a();
|
|
115
|
-
return r(() => (s(
|
|
115
|
+
return r(() => (s(d, "react-tiptap-reset"), () => {
|
|
116
116
|
p("react-tiptap-reset");
|
|
117
117
|
}), []), r(() => {
|
|
118
118
|
t && (t.id = i);
|
|
119
|
-
}, [i, t]), t ? /* @__PURE__ */ e("div", { className: "reactjs-tiptap-editor", children: /* @__PURE__ */ e(
|
|
119
|
+
}, [i, t]), t ? /* @__PURE__ */ e("div", { className: "reactjs-tiptap-editor", children: /* @__PURE__ */ e(c.Provider, { value: { editor: t }, children: /* @__PURE__ */ e(
|
|
120
120
|
l,
|
|
121
121
|
{
|
|
122
122
|
editor: t,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "react";
|
|
3
|
-
import { c as x } from "./index-
|
|
3
|
+
import { c as x } from "./index-C3zg3DPB.js";
|
|
4
4
|
const s = o.forwardRef(
|
|
5
5
|
({ className: t, type: e, ...r }, i) => /* @__PURE__ */ c(
|
|
6
6
|
"input",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),o=require("react"),s=require("./index-
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),o=require("react"),s=require("./index-C838s-or.cjs");function u(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 x=u(o),c=x.forwardRef(({className:t,type:r,...e},i)=>n.jsx("input",{ref:i,type:r,className:s.cn("richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md !richtext-border richtext-border-input richtext-bg-transparent richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background file:richtext-border-0 file:richtext-bg-transparent file:richtext-text-sm file:richtext-font-medium placeholder:richtext-text-muted-foreground focus-visible:richtext-outline-none focus-visible:richtext-ring-1 focus-visible:richtext-ring-ring focus-visible:richtext-ring-offset-1 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 ",t),...e}));c.displayName="Input";exports.Input=c;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import * as t from "@radix-ui/react-label";
|
|
4
|
-
import { c as s, d as c } from "./index-
|
|
4
|
+
import { c as s, d as c } from "./index-C3zg3DPB.js";
|
|
5
5
|
const m = c(
|
|
6
6
|
"richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"
|
|
7
7
|
), d = i.forwardRef(({ className: e, ...r }, a) => /* @__PURE__ */ o(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),l=require("react"),u=require("@radix-ui/react-label"),c=require("./index-
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),l=require("react"),u=require("@radix-ui/react-label"),c=require("./index-C838s-or.cjs");function i(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const d=i(l),n=i(u),m=c.cva("richtext-text-sm richtext-font-medium richtext-leading-none richtext-text-foreground peer-disabled:richtext-cursor-not-allowed peer-disabled:richtext-opacity-70"),o=d.forwardRef(({className:e,...r},t)=>s.jsx(n.Root,{className:c.cn(m(),e),ref:t,...r}));o.displayName=n.Root.displayName;exports.Label=o;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
3
|
import * as t from "@radix-ui/react-popover";
|
|
4
|
-
import { c as s } from "./index-
|
|
4
|
+
import { c as s } from "./index-C3zg3DPB.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 +1 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),s=require("react"),p=require("@radix-ui/react-popover"),x=require("./index-
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),s=require("react"),p=require("@radix-ui/react-popover"),x=require("./index-C838s-or.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 h=n(s),o=n(p),l=o.Root,m=o.Trigger,c=h.forwardRef(({className:t,align:r="center",sideOffset:e=4,...i},d)=>a.jsx(o.Portal,{children:a.jsx(o.Content,{align:r,"data-richtext-portal":!0,ref:d,sideOffset:e,className:x.cn("richtext-z-50 richtext-w-72 richtext-rounded-md !richtext-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 !richtext-border-border",t),...i})}));c.displayName=o.Content.displayName;exports.Popover=l;exports.PopoverContent=c;exports.PopoverTrigger=m;
|
|
@@ -3,12 +3,12 @@ import * as P from "react";
|
|
|
3
3
|
import { useState as f, useMemo as S, useCallback as M } from "react";
|
|
4
4
|
import { Plus as R } from "lucide-react";
|
|
5
5
|
import { HexColorPicker as O } from "react-colorful";
|
|
6
|
-
import { j as B, c as _ } from "./index-
|
|
6
|
+
import { j as B, c as _ } from "./index-C3zg3DPB.js";
|
|
7
7
|
import { u as v, C as $ } from "./index-0OnGZkVF.js";
|
|
8
|
-
import { P as b, a as g, b as C } from "./popover-
|
|
9
|
-
import { I as j } from "./input-
|
|
8
|
+
import { P as b, a as g, b as C } from "./popover-B7ec5-u2.js";
|
|
9
|
+
import { I as j } from "./input-CvyMYMZG.js";
|
|
10
10
|
import * as L from "@radix-ui/react-separator";
|
|
11
|
-
import { B as D } from "./button-
|
|
11
|
+
import { B as D } from "./button-RnHbJfd-.js";
|
|
12
12
|
function I() {
|
|
13
13
|
return /* @__PURE__ */ e("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("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" }) });
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),a=require("react"),y=require("lucide-react"),P=require("react-colorful"),b=require("./index-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),a=require("react"),y=require("lucide-react"),P=require("react-colorful"),b=require("./index-C838s-or.cjs"),v=require("./index-FSRjMsxW.cjs"),h=require("./popover-BSzR_R01.cjs"),S=require("./input-D555880-.cjs"),O=require("@radix-ui/react-separator"),z=require("./button-BW5bDPz_.cjs");function g(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const x=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(o,n,x.get?x:{enumerable:!0,get:()=>r[n]})}}return o.default=r,Object.freeze(o)}const R=g(a),C=g(O);function q(){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"})})}function _(r){const{t:o}=v.useLocale(),{disabled:n=!1,value:x,onChange:i,colors:u=v.COLORS_LIST,highlight:d}=r,[s,m]=a.useState(!1),L=a.useMemo(()=>{const t=u,c=[];for(let l=0;l<t.length;l+=10)c.push(t.slice(l,l+10));return c},[u]),[p,N]=b.useLocalStorage(d?"richtext-recent-highlight":"richtext-recent-colors",[]),w=t=>{const c=[...p],l=c.indexOf(t);l!==-1&&c.splice(l,1),c.unshift(t),c.length>10&&c.pop(),N(c)};function f(t){if(t===void 0){i==null||i(t),m(!1);return}/^#([\da-f]{3}){1,2}$/i.test(t)&&(i==null||i(t),w(t),m(!1))}return e.jsxs(h.Popover,{modal:!0,onOpenChange:m,open:s,children:[e.jsx(h.PopoverTrigger,{asChild:!0,className:"!richtext-p-0",disabled:n,children:r==null?void 0:r.children}),e.jsx(h.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:()=>{f(void 0)},children:[e.jsx(q,{}),e.jsx("span",{className:"richtext-ml-1 richtext-text-sm",children:o(d?"editor.nofill":"editor.default")})]}),L.map((t,c)=>e.jsx("span",{className:"richtext-relative richtext-flex richtext-h-auto richtext-w-full richtext-p-0 last:richtext-pb-2",children:t.map((l,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:()=>f(l),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px]",style:{backgroundColor:l},children:l===x?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-${c}`)),e.jsxs("div",{children:[e.jsx("div",{className:"richtext-my-1 richtext-text-sm",children:o("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:p==null?void 0:p.map((t,c)=>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:()=>f(t),children:e.jsx("span",{className:"richtext-relative richtext-block richtext-size-[18px] richtext-rounded-[2px] richtext-border-transparent",style:{backgroundColor:t},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-${c}`))})]}),e.jsx(M,{setColor:f})]})})]})}function M({setColor:r}){const{t:o}=v.useLocale(),[n,x]=a.useState(!1),[i,u]=a.useState("#000000"),d=a.useCallback(s=>{u(s)},[]);return e.jsxs(h.Popover,{onOpenChange:x,open:n,children:[e.jsx(h.PopoverTrigger,{asChild:!0,children:e.jsxs("div",{className:"richtext-p-1.5 richtext-text-sm hover:richtext-cursor-pointer hover:richtext-bg-accent",children:[o("editor.color.more"),"..."]})}),e.jsxs(h.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:s=>{d(s)}}),e.jsx(S.Input,{className:"richtext-mt-[8px] richtext-w-full",type:"text",value:i.replace("#",""),onChange:s=>{s.preventDefault(),s.stopPropagation(),d(`#${s.target.value}`)}})]}),e.jsx(j,{className:"richtext-my-[10px]"}),e.jsx(z.Button,{className:"richtext-w-full",onClick:s=>{s.preventDefault(),s.stopPropagation(),r(i),x(!1)},children:e.jsx(y.Plus,{size:16})})]})]})}const j=R.forwardRef(({className:r,orientation:o="horizontal",decorative:n=!0,...x},i)=>e.jsx(C.Root,{ref:i,decorative:n,orientation:o,className:b.cn("richtext-shrink-0 richtext-bg-border",o==="horizontal"?"richtext-h-[1px] richtext-w-full":"richtext-h-full richtext-w-[1px]",r),...x}));j.displayName=C.Root.displayName;exports.ColorPicker=_;exports.Separator=j;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./index-
|
|
1
|
+
"use strict";require("./index-C838s-or.cjs");const e=require("./events.constant-DQYeJpu5.cjs"),a={setOpen:(t,n)=>{e.dispatchEvent(e.EVENTS.UPLOAD_IMAGE(t),n)}};exports.actionDialogImage=a;
|