@maily-to/core 0.0.5 → 0.0.6

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- "use strict";var Nt=Object.create;var W=Object.defineProperty,Mt=Object.defineProperties,Rt=Object.getOwnPropertyDescriptor,Pt=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertyNames,K=Object.getOwnPropertySymbols,zt=Object.getPrototypeOf,ae=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable;var ke=(t,e,o)=>e in t?W(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,d=(t,e)=>{for(var o in e||(e={}))ae.call(e,o)&&ke(t,o,e[o]);if(K)for(var o of K(e))Ae.call(e,o)&&ke(t,o,e[o]);return t},v=(t,e)=>Mt(t,Pt(e));var O=(t,e)=>{var o={};for(var n in t)ae.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&K)for(var n of K(t))e.indexOf(n)<0&&Ae.call(t,n)&&(o[n]=t[n]);return o};var St=(t,e)=>{for(var o in e)W(t,o,{get:e[o],enumerable:!0})},Ce=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Bt(e))!ae.call(t,i)&&i!==o&&W(t,i,{get:()=>e[i],enumerable:!(n=Rt(e,i))||n.enumerable});return t};var b=(t,e,o)=>(o=t!=null?Nt(zt(t)):{},Ce(e||!t||!t.__esModule?W(o,"default",{value:t,enumerable:!0}):o,t)),It=t=>Ce(W({},"__esModule",{value:!0}),t);var Yt={};St(Yt,{Editor:()=>Jt});module.exports=It(Yt);function I(t,{insertAt:e}={}){if(!t||typeof document=="undefined")return;let o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}I(`.mly-editor .mly-prose p:where([class~=text-sm]){font-size:16px}.mly-editor .mly-prose h1,.mly-editor .mly-prose h2,.mly-editor .mly-prose h3{margin-top:0;margin-bottom:12px}.mly-editor .mly-prose h1{font-size:36px}.mly-editor .mly-prose h2{font-size:30px}.mly-editor .mly-prose h3{font-size:24px}.mly-editor .mly-prose p{font-size:15px;margin-bottom:20px}.mly-editor .mly-prose h1+p,.mly-editor .mly-prose h2+p,.mly-editor .mly-prose h3+p,.mly-editor .mly-prose hr+p{margin-top:0}.mly-editor .mly-prose ol,.mly-editor .mly-prose ul{margin-top:0;margin-bottom:20px}.mly-editor .mly-prose li:not(:last-child){margin-bottom:8px}.mly-editor .mly-prose li>p{margin:0}.mly-editor .mly-prose img{margin-top:0;margin-bottom:32px}.mly-editor .mly-prose hr{margin-block:32px}.mly-editor .mly-prose .footer{display:block;font-size:13px;margin-bottom:20px;color:#64748b}.mly-editor .mly-prose .spacer+*{margin-top:0}.mly-editor .mly-prose p+.spacer{margin-top:-20px}.mly-editor .mly-prose blockquote+.spacer{margin-top:-16px}.mly-editor .mly-prose h1+.spacer,.mly-editor .mly-prose h2+.spacer,.mly-editor .mly-prose h3+.spacer{margin-top:-12px}.mly-editor .mly-prose ol+.spacer,.mly-editor .mly-prose ul+.spacer{margin-top:-20px}.mly-editor .mly-prose img+.spacer{margin-top:-32px}.mly-editor .mly-prose .node-button+.spacer,.mly-editor .mly-prose footer+.spacer{margin-top:-20px}.mly-editor .mly-prose .node-button{margin-top:0;margin-bottom:20px}.mly-editor .mly-prose .node-image{line-height:0;margin-top:0;margin-bottom:32px;outline:none}.mly-editor .mly-prose .node-image+.spacer{margin-top:-32px}.mly-editor .mly-prose code:before,.mly-editor .mly-prose code:after{content:none}.ProseMirror{position:relative;word-wrap:break-word;white-space:pre-wrap;white-space:break-spaces;font-variant-ligatures:none;font-feature-settings:"liga" 0}.ProseMirror:focus{outline:none}.ProseMirror .is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;color:#adb5bd;pointer-events:none;height:0}.ProseMirror .is-empty:before{content:attr(data-placeholder);float:left;color:#adb5bd;pointer-events:none;height:0}.ProseMirror-selectednode{outline:3px solid #555}.mly-no-scrollbar::-webkit-scrollbar{display:none}.mly-no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}
2
+ "use strict";var Mt=Object.create;var W=Object.defineProperty,Rt=Object.defineProperties,Pt=Object.getOwnPropertyDescriptor,Bt=Object.getOwnPropertyDescriptors,zt=Object.getOwnPropertyNames,K=Object.getOwnPropertySymbols,St=Object.getPrototypeOf,ie=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable;var ke=(t,e,o)=>e in t?W(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,d=(t,e)=>{for(var o in e||(e={}))ie.call(e,o)&&ke(t,o,e[o]);if(K)for(var o of K(e))Ae.call(e,o)&&ke(t,o,e[o]);return t},k=(t,e)=>Rt(t,Bt(e));var O=(t,e)=>{var o={};for(var n in t)ie.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&K)for(var n of K(t))e.indexOf(n)<0&&Ae.call(t,n)&&(o[n]=t[n]);return o};var It=(t,e)=>{for(var o in e)W(t,o,{get:e[o],enumerable:!0})},Ce=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of zt(e))!ie.call(t,a)&&a!==o&&W(t,a,{get:()=>e[a],enumerable:!(n=Pt(e,a))||n.enumerable});return t};var b=(t,e,o)=>(o=t!=null?Mt(St(t)):{},Ce(e||!t||!t.__esModule?W(o,"default",{value:t,enumerable:!0}):o,t)),Et=t=>Ce(W({},"__esModule",{value:!0}),t);var Qt={};It(Qt,{Editor:()=>Yt});module.exports=Et(Qt);function I(t,{insertAt:e}={}){if(!t||typeof document=="undefined")return;let o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}I(`.mly-editor .mly-prose p:where([class~=text-sm]){font-size:16px}.mly-editor .mly-prose h1,.mly-editor .mly-prose h2,.mly-editor .mly-prose h3{margin-top:0;margin-bottom:12px}.mly-editor .mly-prose h1{font-size:36px}.mly-editor .mly-prose h2{font-size:30px}.mly-editor .mly-prose h3{font-size:24px}.mly-editor .mly-prose p{font-size:15px;margin-bottom:20px}.mly-editor .mly-prose h1+p,.mly-editor .mly-prose h2+p,.mly-editor .mly-prose h3+p,.mly-editor .mly-prose hr+p{margin-top:0}.mly-editor .mly-prose ol,.mly-editor .mly-prose ul{margin-top:0;margin-bottom:20px}.mly-editor .mly-prose li:not(:last-child){margin-bottom:8px}.mly-editor .mly-prose li>p{margin:0}.mly-editor .mly-prose img{margin-top:0;margin-bottom:32px}.mly-editor .mly-prose hr{margin-block:32px}.mly-editor .mly-prose .footer{display:block;font-size:13px;margin-bottom:20px;color:#64748b}.mly-editor .mly-prose .spacer+*{margin-top:0}.mly-editor .mly-prose p+.spacer{margin-top:-20px}.mly-editor .mly-prose blockquote+.spacer{margin-top:-16px}.mly-editor .mly-prose h1+.spacer,.mly-editor .mly-prose h2+.spacer,.mly-editor .mly-prose h3+.spacer{margin-top:-12px}.mly-editor .mly-prose ol+.spacer,.mly-editor .mly-prose ul+.spacer{margin-top:-20px}.mly-editor .mly-prose img+.spacer{margin-top:-32px}.mly-editor .mly-prose .node-button+.spacer,.mly-editor .mly-prose footer+.spacer{margin-top:-20px}.mly-editor .mly-prose .node-button{margin-top:0;margin-bottom:20px}.mly-editor .mly-prose .node-image{line-height:0;margin-top:0;margin-bottom:32px;outline:none}.mly-editor .mly-prose .node-image+.spacer{margin-top:-32px}.mly-editor .mly-prose code:before,.mly-editor .mly-prose code:after{content:none}.ProseMirror{position:relative;word-wrap:break-word;white-space:pre-wrap;white-space:break-spaces;font-variant-ligatures:none;font-feature-settings:"liga" 0}.ProseMirror:focus{outline:none}.ProseMirror .is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;color:#adb5bd;pointer-events:none;height:0}.ProseMirror .is-empty:before{content:attr(data-placeholder);float:left;color:#adb5bd;pointer-events:none;height:0}.ProseMirror-selectednode{outline:3px solid #555}.mly-no-scrollbar::-webkit-scrollbar{display:none}.mly-no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}
3
3
  `);I(`:where(.mly-editor),:where(.mly-editor) :before,:where(.mly-editor) :after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:where(.mly-editor) :before,:where(.mly-editor) :after{--tw-content: ""}:where(.mly-editor) html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}:where(.mly-editor) body{margin:0;line-height:inherit}:where(.mly-editor) hr{height:0;color:inherit;border-top-width:1px}:where(.mly-editor) abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where(.mly-editor) h1,:where(.mly-editor) h2,:where(.mly-editor) h3,:where(.mly-editor) h4,:where(.mly-editor) h5,:where(.mly-editor) h6{font-size:inherit;font-weight:inherit}:where(.mly-editor) a{color:inherit;text-decoration:inherit}:where(.mly-editor) b,:where(.mly-editor) strong{font-weight:bolder}:where(.mly-editor) code,:where(.mly-editor) kbd,:where(.mly-editor) samp,:where(.mly-editor) pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}:where(.mly-editor) small{font-size:80%}:where(.mly-editor) sub,:where(.mly-editor) sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.mly-editor) sub{bottom:-.25em}:where(.mly-editor) sup{top:-.5em}:where(.mly-editor) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.mly-editor) button,:where(.mly-editor) input,:where(.mly-editor) optgroup,:where(.mly-editor) select,:where(.mly-editor) textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}:where(.mly-editor) button,:where(.mly-editor) select{text-transform:none}:where(.mly-editor) button,:where(.mly-editor) [type=button],:where(.mly-editor) [type=reset],:where(.mly-editor) [type=submit]{-webkit-appearance:button;background-image:none}:where(.mly-editor) :-moz-focusring{outline:auto}:where(.mly-editor) :-moz-ui-invalid{box-shadow:none}:where(.mly-editor) progress{vertical-align:baseline}:where(.mly-editor) ::-webkit-inner-spin-button,:where(.mly-editor) ::-webkit-outer-spin-button{height:auto}:where(.mly-editor) [type=search]{-webkit-appearance:textfield;outline-offset:-2px}:where(.mly-editor) ::-webkit-search-decoration{-webkit-appearance:none}:where(.mly-editor) ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(.mly-editor) summary{display:list-item}:where(.mly-editor) blockquote,:where(.mly-editor) dl,:where(.mly-editor) dd,:where(.mly-editor) h1,:where(.mly-editor) h2,:where(.mly-editor) h3,:where(.mly-editor) h4,:where(.mly-editor) h5,:where(.mly-editor) h6,:where(.mly-editor) hr,:where(.mly-editor) figure,:where(.mly-editor) p,:where(.mly-editor) pre{margin:0}:where(.mly-editor) fieldset{margin:0;padding:0}:where(.mly-editor) legend{padding:0}:where(.mly-editor) ol,:where(.mly-editor) ul,:where(.mly-editor) menu{list-style:none;margin:0;padding:0}:where(.mly-editor) dialog{padding:0}:where(.mly-editor) textarea{resize:vertical}:where(.mly-editor) input::-moz-placeholder,:where(.mly-editor) textarea::-moz-placeholder{opacity:1;color:#9ca3af}:where(.mly-editor) input::placeholder,:where(.mly-editor) textarea::placeholder{opacity:1;color:#9ca3af}:where(.mly-editor) button,:where(.mly-editor) [role=button]{cursor:pointer}:where(.mly-editor) :disabled{cursor:default}:where(.mly-editor) img,:where(.mly-editor) svg,:where(.mly-editor) video,:where(.mly-editor) canvas,:where(.mly-editor) audio,:where(.mly-editor) iframe,:where(.mly-editor) embed,:where(.mly-editor) object{display:block;vertical-align:middle}:where(.mly-editor) img,:where(.mly-editor) video{max-width:100%;height:auto}:where(.mly-editor) [hidden]{display:none}
4
- `);I('*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.mly-prose{color:var(--tw-prose-body);max-width:65ch}.mly-prose :where(p):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.mly-prose :where([class~=lead]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.mly-prose :where(a):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.mly-prose :where(strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.mly-prose :where(a strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(blockquote strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(thead th strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(ol):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.mly-prose :where(ol[type=A]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-alpha}.mly-prose :where(ol[type=a]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-alpha}.mly-prose :where(ol[type=A s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-alpha}.mly-prose :where(ol[type=a s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-alpha}.mly-prose :where(ol[type=I]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-roman}.mly-prose :where(ol[type=i]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-roman}.mly-prose :where(ol[type=I s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-roman}.mly-prose :where(ol[type=i s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-roman}.mly-prose :where(ol[type="1"]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:decimal}.mly-prose :where(ul):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.mly-prose :where(ol>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.mly-prose :where(ul>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *))::marker{color:var(--tw-prose-bullets)}.mly-prose :where(dt):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.mly-prose :where(hr):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.mly-prose :where(blockquote):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"\\201c""\\201d""\\2018""\\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.mly-prose :where(blockquote p:first-of-type):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):before{content:open-quote}.mly-prose :where(blockquote p:last-of-type):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):after{content:close-quote}.mly-prose :where(h1):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.mly-prose :where(h1 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:900;color:inherit}.mly-prose :where(h2):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.mly-prose :where(h2 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:800;color:inherit}.mly-prose :where(h3):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.mly-prose :where(h3 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:700;color:inherit}.mly-prose :where(h4):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.mly-prose :where(h4 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:700;color:inherit}.mly-prose :where(img):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:2em;margin-bottom:2em}.mly-prose :where(picture):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.mly-prose :where(kbd):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.mly-prose :where(code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.mly-prose :where(code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):before{content:"`"}.mly-prose :where(code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):after{content:"`"}.mly-prose :where(a code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(h1 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(h2 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit;font-size:.875em}.mly-prose :where(h3 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit;font-size:.9em}.mly-prose :where(h4 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(blockquote code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(thead th code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(pre):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.mly-prose :where(pre code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.mly-prose :where(pre code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):before{content:none}.mly-prose :where(pre code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):after{content:none}.mly-prose :where(table):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.mly-prose :where(thead):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.mly-prose :where(thead th):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.mly-prose :where(tbody tr):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.mly-prose :where(tbody tr:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-bottom-width:0}.mly-prose :where(tbody td):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){vertical-align:baseline}.mly-prose :where(tfoot):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.mly-prose :where(tfoot td):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){vertical-align:top}.mly-prose :where(figure>*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0;margin-bottom:0}.mly-prose :where(figcaption):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.mly-prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.mly-prose :where(picture>img):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0;margin-bottom:0}.mly-prose :where(video):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:2em;margin-bottom:2em}.mly-prose :where(li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.5em;margin-bottom:.5em}.mly-prose :where(ol>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:.375em}.mly-prose :where(ul>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:.375em}.mly-prose :where(.mly-prose>ul>li p):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.75em;margin-bottom:.75em}.mly-prose :where(.mly-prose>ul>li>*:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em}.mly-prose :where(.mly-prose>ul>li>*:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-bottom:1.25em}.mly-prose :where(.mly-prose>ol>li>*:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em}.mly-prose :where(.mly-prose>ol>li>*:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-bottom:1.25em}.mly-prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.75em;margin-bottom:.75em}.mly-prose :where(dl):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.mly-prose :where(dd):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.5em;padding-left:1.625em}.mly-prose :where(hr+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(h2+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(h3+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(h4+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(thead th:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:0}.mly-prose :where(thead th:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-right:0}.mly-prose :where(tbody td,tfoot td):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding:.5714286em}.mly-prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:0}.mly-prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-right:0}.mly-prose :where(figure):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:2em;margin-bottom:2em}.mly-prose :where(.mly-prose>:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(.mly-prose>:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-bottom:0}.mly-z-50{z-index:50}.mly-mb-4{margin-bottom:1rem}.mly-ml-1{margin-left:.25rem}.mly-mt-2{margin-top:.5rem}.mly-mt-4{margin-top:1rem}.mly-block{display:block}.mly-inline-block{display:inline-block}.mly-flex{display:flex}.mly-inline-flex{display:inline-flex}.mly-h-10{height:2.5rem}.mly-h-11{height:2.75rem}.mly-h-3{height:.75rem}.mly-h-3\\.5{height:.875rem}.mly-h-4{height:1rem}.mly-h-6{height:1.5rem}.mly-h-9{height:2.25rem}.mly-h-\\[2px\\]{height:2px}.mly-h-auto{height:auto}.mly-max-h-\\[330px\\]{max-height:330px}.mly-w-10{width:2.5rem}.mly-w-3{width:.75rem}.mly-w-3\\.5{width:.875rem}.mly-w-4{width:1rem}.mly-w-6{width:1.5rem}.mly-w-72{width:18rem}.mly-w-full{width:100%}.mly-min-w-\\[128px\\]{min-width:128px}.mly-shrink-0{flex-shrink:0}.mly-grow{flex-grow:1}.mly-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.mly-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mly-flex-col{flex-direction:column}.mly-items-center{align-items:center}.mly-justify-center{justify-content:center}.mly-gap-1{gap:.25rem}.mly-gap-3{gap:.75rem}.mly-gap-\\[1px\\]{gap:1px}.mly-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.mly-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.mly-space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.mly-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.mly-overflow-y-auto{overflow-y:auto}.mly-scroll-smooth{scroll-behavior:smooth}.\\!mly-rounded-full{border-radius:9999px!important}.\\!mly-rounded-md{border-radius:.375rem!important}.\\!mly-rounded-none{border-radius:0!important}.mly-rounded{border-radius:.25rem}.mly-rounded-md{border-radius:.375rem}.mly-border{border-width:1px}.mly-border-l-4{border-left-width:4px}.mly-border-t{border-top-width:1px}.mly-border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.mly-border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.mly-border-rose-200{--tw-border-opacity: 1;border-color:rgb(254 205 211 / var(--tw-border-opacity))}.mly-border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.mly-bg-\\[\\#efefef\\]{--tw-bg-opacity: 1;background-color:rgb(239 239 239 / var(--tw-bg-opacity))}.mly-bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.mly-bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.mly-bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.mly-bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.mly-bg-rose-50{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity))}.mly-bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.mly-bg-transparent{background-color:transparent}.mly-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.\\!mly-p-0{padding:0!important}.mly-p-1{padding:.25rem}.mly-p-4{padding:1rem}.mly-px-1{padding-left:.25rem;padding-right:.25rem}.mly-px-1\\.5{padding-left:.375rem;padding-right:.375rem}.mly-px-2{padding-left:.5rem;padding-right:.5rem}.mly-px-2\\.5{padding-left:.625rem;padding-right:.625rem}.mly-px-3{padding-left:.75rem;padding-right:.75rem}.mly-px-4{padding-left:1rem;padding-right:1rem}.mly-px-8{padding-left:2rem;padding-right:2rem}.mly-px-\\[32px\\]{padding-left:32px;padding-right:32px}.mly-py-0{padding-top:0;padding-bottom:0}.mly-py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.mly-py-1{padding-top:.25rem;padding-bottom:.25rem}.mly-py-2{padding-top:.5rem;padding-bottom:.5rem}.mly-py-3{padding-top:.75rem;padding-bottom:.75rem}.mly-py-\\[20px\\]{padding-top:20px;padding-bottom:20px}.mly-pl-4{padding-left:1rem}.mly-text-left{text-align:left}.mly-text-center{text-align:center}.mly-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.mly-text-\\[13px\\]{font-size:13px}.mly-text-sm{font-size:.875rem;line-height:1.25rem}.mly-text-xs{font-size:.75rem;line-height:1rem}.mly-font-medium{font-weight:500}.mly-font-normal{font-weight:400}.mly-font-semibold{font-weight:600}.mly-capitalize{text-transform:capitalize}.mly-leading-none{line-height:1}.mly-tracking-normal{letter-spacing:0em}.mly-text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.mly-text-gray-50{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.mly-text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.mly-text-rose-800{--tw-text-opacity: 1;color:rgb(159 18 57 / var(--tw-text-opacity))}.mly-text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.mly-text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.mly-text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.mly-text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.mly-no-underline{text-decoration-line:none}.mly-underline-offset-4{text-underline-offset:4px}.mly-antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.\\!mly-shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.mly-shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.mly-outline-none{outline:2px solid transparent;outline-offset:2px}.mly-ring-offset-white{--tw-ring-offset-color: #fff}.mly-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.mly-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.mly-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.mly-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.file\\:mly-border-0::file-selector-button{border-width:0px}.file\\:mly-bg-transparent::file-selector-button{background-color:transparent}.file\\:mly-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:mly-font-medium::file-selector-button{font-weight:500}.placeholder\\:mly-text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.placeholder\\:mly-text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\\:mly-bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\\:mly-bg-gray-100\\/80:hover{background-color:#f3f4f6cc}.hover\\:mly-bg-gray-900\\/90:hover{background-color:#111827e6}.hover\\:mly-bg-red-500\\/90:hover{background-color:#ef4444e6}.hover\\:mly-text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\\:mly-underline:hover{text-decoration-line:underline}.focus-visible\\:mly-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:mly-ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:mly-ring-gray-400:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus-visible\\:mly-ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\\:mly-pointer-events-none:disabled{pointer-events:none}.disabled\\:mly-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:mly-opacity-50:disabled{opacity:.5}.data-\\[state\\=true\\]\\:mly-bg-gray-100[data-state=true]{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.data-\\[state\\=true\\]\\:mly-text-gray-900[data-state=true]{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.data-\\[state\\=open\\]\\:mly-animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:mly-animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:mly-fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:mly-fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:mly-zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:mly-zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:mly-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:mly-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:mly-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:mly-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}\n');var re=require("@tiptap/react");var j=require("@tiptap/react"),x=require("lucide-react");var Le=require("@tiptap/core"),Te=b(require("@tiptap/extension-image"));var Ne=["sm","md","lg"],_=["left","center","right"],Me="left",se="sm";function Et(t){let e={sm:"40px",md:"48px",lg:"64px"};return[`height:${e[t]||e[se]}`,`width:${e[t]||e[se]}`]}function Ht(t){let e={left:["margin-right:auto","margin-left:0"],center:["margin-right:auto","margin-left:auto"],right:["margin-right:0","margin-left:auto"]};return e[t]||e[Me]}var Re=Te.default.extend({name:"logo",priority:1e3,addAttributes(){var t;return v(d({},(t=this.parent)==null?void 0:t.call(this)),{"maily-component":{default:"logo",renderHTML:e=>({"data-maily-component":e["maily-component"]}),parseHTML:e=>e.getAttribute("data-maily-component")},size:{default:se,parseHTML:e=>e.getAttribute("data-size"),renderHTML:e=>({"data-size":e.size})},alignment:{default:Me,parseHTML:e=>e.getAttribute("data-alignment"),renderHTML:e=>({"data-alignment":e.alignment})}})},addCommands(){return{setLogoImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t}),setLogoAttributes:t=>({commands:e})=>e.updateAttributes("logo",t)}},renderHTML({HTMLAttributes:t,node:e}){let{size:o,alignment:n}=e.attrs,i=["position:relative","margin-top:0",...Et(o),...Ht(n)];return t.style=i.join(";"),["img",(0,Le.mergeAttributes)(this.options.HTMLAttributes,t)]},parseHTML(){return[{tag:`img[data-maily-component="${this.name}"]`}]}});var ze=b(require("react")),Se=require("@radix-ui/react-slot");var Pe=require("clsx"),Be=require("tailwind-merge");function w(...t){return(0,Be.twMerge)((0,Pe.clsx)(t))}var Ie=require("react/jsx-runtime"),M=ze.forwardRef((a,s)=>{var r=a,{className:t,variant:e="default",size:o="default",asChild:n=!1}=r,i=O(r,["className","variant","size","asChild"]);let l=n?Se.Slot:"button",p="mly-inline-flex mly-items-center mly-justify-center mly-rounded-md mly-text-sm mly-font-medium mly-ring-offset-white mly-transition-colors focus-visible:mly-outline-none focus-visible:mly-ring-2 focus-visible:mly-ring-gray-400 focus-visible:mly-ring-offset-2 disabled:mly-pointer-events-none disabled:mly-opacity-50",u={default:"mly-bg-gray-900 mly-text-gray-50 hover:mly-bg-gray-900/90",destructive:"mly-bg-red-500 mly-text-gray-50 hover:mly-bg-red-500/90",outline:"mly-border mly-border-gray-200 mly-bg-white hover:mly-bg-gray-100 hover:mly-text-gray-900",secondary:"mly-bg-gray-100 mly-text-gray-900 hover:mly-bg-gray-100/80",ghost:"hover:mly-bg-gray-100 bg-transparent hover:mly-text-gray-900 data-[state=true]:mly-bg-gray-100 data-[state=true]:mly-text-gray-900",link:"mly-text-gray-900 mly-underline-offset-4 hover:mly-underline"},g={default:"mly-h-10 mly-px-4 mly-py-2",sm:"mly-h-9 mly-rounded-md mly-px-3",lg:"mly-h-11 mly-rounded-md mly-px-8",icon:"mly-h-10 mly-w-10"},h=w("mly-editor",p,u[e],g[o],t);return(0,Ie.jsx)(l,d({className:h,ref:s},i))});M.displayName="BaseButton";var G=require("react/jsx-runtime");function S(t){return(0,G.jsx)(M,{variant:"ghost",size:"sm",onClick:t.command,"data-state":t.isActive(),className:w("mly-px-2.5"),type:"button",children:t.icon?(0,G.jsx)(t.icon,{className:w("mly-h-3.5 mly-w-3.5")}):(0,G.jsx)("span",{className:"mly-text-sm mly-font-medium mly-text-slate-600",children:t.name})})}var me=require("react/jsx-runtime");function Ee(t){let{editor:e}=t,o=[x.AlignLeftIcon,x.AlignCenterIcon,x.AlignRightIcon],n=_.map((a,r)=>({name:a,isActive:()=>e==null?void 0:e.isActive({textAlign:a}),command:()=>{var l,p,u,g;(l=t==null?void 0:t.editor)!=null&&l.isActive({textAlign:a})?(u=(p=t==null?void 0:t.editor)==null?void 0:p.chain())==null||u.focus().unsetTextAlign().run():(g=t==null?void 0:t.editor)==null||g.chain().focus().setTextAlign(a).run()},icon:o[r]})),i=[{name:"bold",isActive:()=>e==null?void 0:e.isActive("bold"),command:()=>e==null?void 0:e.chain().focus().toggleBold().run(),icon:x.BoldIcon},{name:"italic",isActive:()=>e==null?void 0:e.isActive("italic"),command:()=>e==null?void 0:e.chain().focus().toggleItalic().run(),icon:x.ItalicIcon},{name:"underline",isActive:()=>e==null?void 0:e.isActive("underline"),command:()=>e==null?void 0:e.chain().focus().toggleUnderline().run(),icon:x.UnderlineIcon},{name:"strike",isActive:()=>e==null?void 0:e.isActive("strike"),command:()=>e==null?void 0:e.chain().focus().toggleStrike().run(),icon:x.StrikethroughIcon},...n,{name:"code",isActive:()=>e==null?void 0:e.isActive("code"),command:()=>e==null?void 0:e.chain().focus().toggleCode().run(),icon:x.CodeIcon},{name:"link",command:()=>{let a=e==null?void 0:e.getAttributes("link").href,r=window.prompt("URL",a);if(r!==null){if(r===""){e==null||e.chain().focus().extendMarkRange("link").unsetLink().run();return}e==null||e.chain().focus().extendMarkRange("link").setLink({href:r}).run()}},isActive:()=>e==null?void 0:e.isActive("link"),icon:x.LinkIcon}],s=v(d({},t),{shouldShow:({editor:a,state:r,from:l,to:p})=>{let{doc:u,selection:g}=r,{empty:h}=g,A=!u.textBetween(l,p).length&&(0,j.isTextSelection)(r.selection);return!(h||A||!a.isEditable||a.isActive("image")||a.isActive("logo")||a.isActive("spacer")||a.isActive("variable")||a.isActive({mailyComponent:"button"}))},tippyOptions:{moveTransition:"mly-transform 0.15s mly-ease-out"}});return(0,me.jsx)(j.BubbleMenu,v(d({},s),{className:"mly-flex mly-gap-1 mly-rounded-md mly-border mly-border-slate-200 mly-bg-white mly-p-1 mly-shadow-md",children:i.map((a,r)=>(0,me.jsx)(S,d({},a),r))}))}var de=require("react"),f=require("lucide-react");var X=require("react/jsx-runtime"),He=t=>{let{editor:e,config:o}=t,n=(0,de.useMemo)(()=>[{name:"bold",command:()=>e.chain().focus().toggleBold().run(),isActive:()=>e.isActive("bold"),group:"mark",icon:f.BoldIcon},{name:"italic",command:()=>e.chain().focus().toggleItalic().run(),isActive:()=>e.isActive("italic"),group:"mark",icon:f.ItalicIcon},{name:"underline",command:()=>e.chain().focus().toggleUnderline().run(),isActive:()=>e.isActive("underline"),group:"mark",icon:f.UnderlineIcon},{name:"strike",command:()=>e.chain().focus().toggleStrike().run(),isActive:()=>e.isActive("strike"),group:"mark",icon:f.StrikethroughIcon},{name:"delete-line",command:()=>e.chain().focus().selectParentNode().deleteSelection().run(),isActive:()=>!1,group:"mark",icon:f.EraserIcon},{name:"divider",command:()=>e.chain().focus().setHorizontalRule().run(),isActive:()=>e.isActive("horizontalRule"),group:"custom",icon:f.SeparatorHorizontal},{name:"link",command:()=>{let s=e.getAttributes("link").href,a=window.prompt("URL",s);if(a!==null){if(a===""){e.chain().focus().extendMarkRange("link").unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:a}).run()}},isActive:()=>e.isActive("link"),group:"custom",icon:f.LinkIcon},{name:"left",command:()=>e.chain().focus().setTextAlign("left").run(),isActive:()=>e.isActive({textAlign:"left"}),group:"alignment",icon:f.AlignLeft},{name:"center",command:()=>e.chain().focus().setTextAlign("center").run(),isActive:()=>e.isActive({textAlign:"center"}),group:"alignment",icon:f.AlignCenter},{name:"right",command:()=>e.chain().focus().setTextAlign("right").run(),isActive:()=>e.isActive({textAlign:"right"}),group:"alignment",icon:f.AlignRight}],[e]),i=(0,de.useMemo)(()=>n.reduce((s,a)=>(s.includes(a.group)||s.push(a.group),s),[]),[n]);return e?(0,X.jsx)("div",{className:`mly-flex mly-items-center mly-gap-3 ${o==null?void 0:o.toolbarClassName}`,children:i.map((s,a)=>(0,X.jsx)("div",{className:"mly-flex mly-items-center mly-gap-1 mly-rounded-md mly-border mly-bg-white mly-p-1",children:n.filter(r=>r.group===s).map((r,l)=>(0,X.jsx)(S,d({},r),l))},a))}):null};var Ve=require("@tiptap/react"),T=require("lucide-react");var ce=require("react/jsx-runtime");function Oe(t){let{editor:e}=t,o=[T.AlignLeftIcon,T.AlignCenterIcon,T.AlignRightIcon],n=_.map((r,l)=>({name:r,isActive:()=>(e==null?void 0:e.isActive("logo",{alignment:r}))||(e==null?void 0:e.isActive("image",{alignment:r})),shouldShow:()=>(e==null?void 0:e.isActive("logo"))||(e==null?void 0:e.isActive("image")),command:()=>{var u,g;(e==null?void 0:e.isActive("logo"))?(u=t==null?void 0:t.editor)==null||u.chain().focus().setLogoAttributes({alignment:r}).run():(g=t==null?void 0:t.editor)==null||g.chain().focus().updateAttributes("image",{alignment:r}).run()},icon:o[l]})),i=Ne.map(r=>({name:r,isActive:()=>{var l;return(l=t==null?void 0:t.editor)==null?void 0:l.isActive("logo",{size:r})},shouldShow:()=>e==null?void 0:e.isActive("logo"),command:()=>{var l;(l=t==null?void 0:t.editor)==null||l.chain().focus().setLogoAttributes({size:r}).run()}})),s=[...n,{name:"url",isActive:()=>!1,shouldShow:()=>e==null?void 0:e.isActive("logo"),command:()=>{var A,C,N;let{editor:r}=t,l=(A=r==null?void 0:r.getAttributes("logo"))==null?void 0:A.src,p=window.prompt("Update logo URL",l);if(!p)return;let u=(C=r==null?void 0:r.getAttributes("logo"))==null?void 0:C.size,g=(N=r==null?void 0:r.getAttributes("logo"))==null?void 0:N.alignment,h=r==null?void 0:r.state.selection;r==null||r.commands.setLogoImage({src:p,size:u,alignment:g}),r==null||r.commands.setNodeSelection((h==null?void 0:h.from)||0)},icon:T.Link},{name:"image-url",isActive:()=>!1,shouldShow:()=>e==null?void 0:e.isActive("image"),command:()=>{var g;let{editor:r}=t,l=(g=r==null?void 0:r.getAttributes("image"))==null?void 0:g.src,p=window.prompt("Update Image URL",l);if(!p)return;let u=r==null?void 0:r.state.selection;r==null||r.commands.setImage({src:p}),r==null||r.commands.setNodeSelection((u==null?void 0:u.from)||0)},icon:T.Unlink},...i],a=v(d({},t),{shouldShow:({editor:r})=>r.isActive("logo")||r.isActive("image"),tippyOptions:{moveTransition:"mly-transform 0.15s mly-ease-out"}});return(0,ce.jsx)(Ve.BubbleMenu,v(d({},a),{className:"mly-flex mly-gap-1 mly-rounded-md mly-border mly-border-slate-200 mly-bg-white mly-p-1 mly-shadow-md",children:s.filter(r=>{var l;return(l=r.shouldShow)==null?void 0:l.call(r)}).map((r,l)=>(0,ce.jsx)(S,d({},r),l))}))}var De=require("@tiptap/react");var J=require("@tiptap/core"),pe=["sm","md","lg","xl"],Vt="sm";function Ot(t){let e={sm:"8px",md:"16px",lg:"32px",xl:"64px"};return`width: 100%; height: ${e[t]||e[Vt]}`}var Ue=J.Node.create({name:"spacer",priority:1e3,group:"block",draggable:!0,addAttributes(){return{height:{default:null,parseHTML:t=>t.getAttribute("data-height"),renderHTML:t=>({"data-height":t.height})}}},addCommands(){return{setSpacer:t=>({commands:e})=>e.insertContent({type:this.name,attrs:{height:t.height}}),setSpacerSize:t=>({commands:e})=>{if(!pe.includes(t))throw new Error("Invalid spacer height");return e.updateAttributes("spacer",{height:t})},unsetSpacer:()=>({commands:t})=>t.deleteNode("spacer")}},renderHTML({HTMLAttributes:t,node:e}){let{height:o}=e.attrs;return t.style=Ot(o),["div",(0,J.mergeAttributes)({"data-maily-component":this.name},this.options.HTMLAttributes,t,{class:"spacer relative z-50",contenteditable:!1})]},parseHTML(){return[{tag:`div[data-maily-component="${this.name}"]`}]}});var ye=require("react/jsx-runtime");function Fe(t){let{editor:e}=t,o=pe.map(i=>({name:i,isActive:()=>e==null?void 0:e.isActive("spacer",{height:i}),command:()=>{e==null||e.chain().focus().setSpacer({height:i}).run()}})),n=v(d({},t),{shouldShow:({editor:i})=>i.isActive("spacer"),tippyOptions:{moveTransition:"mly-transform 0.15s mly-ease-out"}});return(0,ye.jsx)(De.BubbleMenu,v(d({},n),{className:"mly-flex mly-gap-1 mly-rounded-md mly-border mly-border-slate-200 mly-bg-white mly-p-1 mly-shadow-md",children:o.map((i,s)=>(0,ye.jsx)(S,d({},i),s))}))}var ht=b(require("@tiptap/starter-kit")),wt=require("@tiptap/extension-color"),ft=b(require("@tiptap/extension-link")),bt=b(require("@tiptap/extension-list-item")),xt=b(require("@tiptap/extension-paragraph")),vt=b(require("@tiptap/extension-placeholder")),kt=b(require("@tiptap/extension-text-align")),fe=b(require("@tiptap/extension-text-style")),At=b(require("@tiptap/extension-heading")),Ct=b(require("@tiptap/extension-underline"));var qe=require("@tiptap/core"),We=require("@tiptap/extension-horizontal-rule"),$e=We.HorizontalRule.extend({addInputRules(){return[new qe.InputRule({find:/^(?:---|—-|___\s|\*\*\*\s)$/,handler:({state:t,range:e})=>{let o={},{tr:n}=t,i=e.from,s=e.to;n.insert(i-1,this.type.create(o)).delete(n.mapping.map(i),n.mapping.map(s))}})]}});var Y=require("@tiptap/core"),Qe=require("@tiptap/react");var je=require("@tiptap/react"),F=require("lucide-react"),he=require("react-color");var Ke=b(require("react"));var _e=require("react/jsx-runtime"),E=Ke.forwardRef((i,n)=>{var s=i,{className:t,type:e}=s,o=O(s,["className","type"]);return(0,_e.jsx)("input",d({type:e,className:w("mly-flex mly-h-10 mly-w-full mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-px-3 mly-py-2 mly-text-sm mly-ring-offset-white file:mly-border-0 file:mly-bg-transparent file:mly-text-sm file:mly-font-medium placeholder:mly-text-gray-500 focus-visible:mly-outline-none focus-visible:mly-ring-2 focus-visible:mly-ring-gray-400 focus-visible:mly-ring-offset-2 disabled:mly-cursor-not-allowed disabled:mly-opacity-50","mly-editor",t),ref:n},o))});E.displayName="Input";var Ge=b(require("react")),R=b(require("@radix-ui/react-popover"));var ge=require("react/jsx-runtime"),U=R.Root,D=R.Trigger,H=Ge.forwardRef((s,i)=>{var a=s,{className:t,align:e="center",sideOffset:o=4}=a,n=O(a,["className","align","sideOffset"]);return(0,ge.jsx)(R.Portal,{children:(0,ge.jsx)(R.Content,d({ref:i,align:e,sideOffset:o,className:w("mly-z-50 mly-w-72 mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-p-4 mly-shadow-md mly-outline-none data-[state=open]:mly-animate-in data-[state=closed]:mly-animate-out data-[state=closed]:mly-fade-out-0 data-[state=open]:mly-fade-in-0 data-[state=closed]:mly-zoom-out-95 data-[state=open]:mly-zoom-in-95 data-[side=bottom]:mly-slide-in-from-top-2 data-[side=left]:mly-slide-in-from-right-2 data-[side=right]:mly-slide-in-from-left-2 data-[side=top]:mly-slide-in-from-bottom-2 text-gray-950","mly-editor",t)},n))})});H.displayName=R.Content.displayName;var m=require("react/jsx-runtime"),Ut={left:F.AlignLeftIcon,center:F.AlignCenterIcon,right:F.AlignRightIcon},ue={style(t){return Je.map(e=>({name:e,isActive:t.node.attrs.variant===e,onClick:()=>{t.updateAttributes({variant:e})}}))},cornerRadius(t){return Ye.map(e=>({name:e,isActive:t.node.attrs.borderRadius===e,onClick:()=>{t.updateAttributes({borderRadius:e})}}))},alignment(t){return Object.entries(Ut).map(([e,o])=>({name:e,icon:o,isActive:t.node.attrs.alignment===e,onClick:()=>t.updateAttributes({alignment:e})}))}};function Xe(t){let{url:e,text:o,alignment:n,variant:i,borderRadius:s,buttonColor:a,textColor:r}=t.node.attrs;return(0,m.jsx)(je.NodeViewWrapper,{className:`react-component ${t.selected&&"ProseMirror-selectednode"}`,draggable:"true","data-drag-handle":"",style:{textAlign:n},children:(0,m.jsxs)(U,{open:t.selected,children:[(0,m.jsx)(D,{asChild:!0,children:(0,m.jsx)("div",{children:(0,m.jsx)("a",{className:w("mly-inline-flex mly-items-center mly-justify-center mly-rounded-md mly-text-sm mly-font-medium mly-ring-offset-white mly-transition-colors disabled:mly-pointer-events-none disabled:mly-opacity-50","mly-h-10 mly-px-4 mly-py-2","mly-px-[32px] mly-py-[20px] mly-font-semibold mly-no-underline",{"!mly-rounded-full":s==="round","!mly-rounded-md":s==="smooth","!mly-rounded-none":s==="sharp"}),href:e,target:"_blank",rel:"noopener noreferrer",tabIndex:-1,style:{backgroundColor:i==="filled"?a:"transparent",color:r,borderWidth:2,borderStyle:"solid",borderColor:a},children:o})})}),(0,m.jsxs)(H,{align:"end",className:"space-y-2",sideOffset:10,onOpenAutoFocus:l=>l.preventDefault(),onCloseAutoFocus:l=>l.preventDefault(),children:[(0,m.jsx)(E,{placeholder:"Add text here",value:o,onChange:l=>{t.updateAttributes({text:l.target.value})}}),(0,m.jsx)(E,{placeholder:"Add link here",value:e,onChange:l=>{t.updateAttributes({url:l.target.value})}}),(0,m.jsxs)("div",{className:"mly-w-full mly-space-y-2",children:[(0,m.jsx)("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Style"}),(0,m.jsx)("div",{className:"mly-flex mly-gap-1",children:ue.style(t).map((l,p)=>(0,m.jsx)(M,{"data-state":l.isActive?"true":"false",variant:"ghost",className:"mly-grow mly-font-normal mly-capitalize",size:"sm",onClick:l.onClick,type:"button",children:l.name},p))})]}),(0,m.jsxs)("div",{className:"mly-w-full mly-space-y-2",children:[(0,m.jsx)("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Corner Radius"}),(0,m.jsx)("div",{className:"mly-flex mly-gap-1",children:ue.cornerRadius(t).map((l,p)=>(0,m.jsx)(M,{"data-state":l.isActive?"true":"false",variant:"ghost",className:"mly-grow mly-font-normal mly-capitalize",size:"sm",onClick:l.onClick,type:"button",children:l.name},p))})]}),(0,m.jsxs)("div",{className:"flex gap-2",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Alignment"}),(0,m.jsx)("div",{className:"mly-mt-2 mly-flex mly-gap-1",children:ue.alignment(t).map((l,p)=>(0,m.jsx)(M,{"data-state":l.isActive?"true":"false",variant:"ghost",className:"mly-grow",size:"sm",onClick:l.onClick,type:"button",children:(0,m.jsx)(l.icon,{size:16})},p))})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Color"}),(0,m.jsxs)("div",{className:"mly-mt-2 mly-flex mly-gap-1",children:[(0,m.jsx)(Dt,{variant:i,color:a,onChange:l=>{t.updateAttributes({buttonColor:l})}}),(0,m.jsx)(Ft,{color:r,onChange:l=>{t.updateAttributes({textColor:l})}})]})]})]})]})]})})}function Dt(t){let{color:e,onChange:o,variant:n}=t;return(0,m.jsxs)(U,{children:[(0,m.jsx)(D,{asChild:!0,children:(0,m.jsx)(M,{variant:"ghost",className:"",size:"sm",type:"button",children:(0,m.jsx)("div",{className:"mly-h-4 mly-w-4 mly-rounded",style:{backgroundColor:n==="filled"?e:"transparent",borderStyle:"solid",borderWidth:n==="outline"?2:0,borderColor:e}})})}),(0,m.jsx)(H,{className:"mly-w-full !mly-p-0",children:(0,m.jsx)(he.ChromePicker,{className:"!mly-shadow-md",color:e,onChange:i=>{o(i.hex)}})})]})}function Ft(t){let{color:e,onChange:o}=t;return(0,m.jsxs)(U,{children:[(0,m.jsx)(D,{asChild:!0,children:(0,m.jsx)(M,{variant:"ghost",size:"sm",type:"button",children:(0,m.jsxs)("div",{className:"mly-flex mly-flex-col mly-items-center mly-justify-center mly-gap-[1px]",children:[(0,m.jsx)("span",{className:"mly-font-bolder mly-font-mono mly-text-xs mly-text-slate-700",children:"A"}),(0,m.jsx)("div",{className:"mly-h-[2px] mly-w-3",style:{backgroundColor:e}})]})})}),(0,m.jsx)(H,{className:"mly-w-full !mly-p-0",children:(0,m.jsx)(he.ChromePicker,{className:"!mly-shadow-md",color:e,onChange:n=>{o(n.hex)}})})]})}var Je=["filled","outline"],Ye=["sharp","smooth","round"],Ze=Y.Node.create({name:"button",group:"block",atom:!0,draggable:!0,addAttributes(){return{mailyComponent:{default:"button"},text:{default:"Button"},url:{default:""},alignment:{default:"left"},variant:{default:"filled"},borderRadius:{default:"smooth"},buttonColor:{default:"rgb(0, 0, 0)"},textColor:{default:"rgb(255, 255, 255)"}}},parseHTML(){return[{tag:`a[data-maily-component="${this.name}"]`}]},renderHTML({HTMLAttributes:t}){return["a",(0,Y.mergeAttributes)({"data-maily-component":this.name},t)]},addCommands(){return{setButton:()=>({commands:t})=>t.insertContent({type:this.name,attrs:{mailyComponent:this.name}})}},addNodeView(){return(0,Qe.ReactNodeViewRenderer)(Xe)}});var Q=require("@tiptap/core"),we=Q.Node.create({name:"footer",group:"block",content:"inline*",addAttributes(){return{"maily-component":{default:"footer",renderHTML:t=>({"data-maily-component":t["maily-component"]}),parseHTML:t=>t==null?void 0:t.getAttribute("data-maily-component")}}},addCommands(){return{setFooter:()=>({commands:t})=>t.setNode(this.name)}},parseHTML(){return[{tag:'small[data-maily-component="footer"]'}]},renderHTML({HTMLAttributes:t}){return["small",(0,Q.mergeAttributes)(this.options.HTMLAttributes,t,{class:"footer mly-block mly-text-[13px] mly-text-slate-500"}),0]}});var P=require("react"),Z=require("@tiptap/react"),et=b(require("tippy.js"));var k=require("react/jsx-runtime"),tt=(0,P.forwardRef)((t,e)=>{var s,a;let[o,n]=(0,P.useState)(0),i=r=>{let l=t.items[r];l&&t.command({id:l})};return(0,P.useEffect)(()=>n(0),[t.items]),(0,P.useImperativeHandle)(e,()=>({onKeyDown:({event:r})=>r.key==="ArrowUp"?(n((o+t.items.length-1)%t.items.length),!0):r.key==="ArrowDown"?(n((o+1)%t.items.length),!0):r.key==="Enter"?(i(o),!0):!1})),(0,k.jsx)("div",{className:"mly-z-50 mly-h-auto mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-p-1 mly-shadow-md mly-transition-all mly-min-w-[128px]",children:(s=t==null?void 0:t.items)!=null&&s.length?(a=t==null?void 0:t.items)==null?void 0:a.map((r,l)=>(0,k.jsx)("button",{onClick:()=>i(l),className:w("mly-flex mly-w-full mly-space-x-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100",l===o?"mly-bg-gray-200":"mly-bg-white"),children:r},l)):(0,k.jsx)("button",{className:"mly-flex mly-w-full mly-space-x-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100 mly-bg-white",children:"No result"})})});tt.displayName="VariableList";function ot(t=[]){return{items:({query:e})=>t.concat(e.length>0?[e]:[]).filter(o=>o.toLowerCase().startsWith(e.toLowerCase())).slice(0,5),render:()=>{let e,o=null;return{onStart:n=>{e=new Z.ReactRenderer(tt,{props:n,editor:n.editor}),n.clientRect&&(o=(0,et.default)("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(n){var i;e.updateProps(n),n.clientRect&&((i=o==null?void 0:o[0])==null||i.setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(n){var i;return n.event.key==="Escape"?(o==null||o[0].hide(),!0):(i=e.ref)==null?void 0:i.onKeyDown(n)},onExit(){!o||!(o!=null&&o[0])||!e||(o==null||o[0].destroy(),e.destroy())}}}}}function rt(t){let{node:e,selected:o,updateAttributes:n}=t,{id:i,fallback:s}=e.attrs,[a,r]=(0,P.useState)(!1);return(0,k.jsx)(Z.NodeViewWrapper,{className:w("react-component",o&&"ProseMirror-selectednode","mly-leading-none mly-inline-block"),draggable:"false",children:(0,k.jsxs)(U,{open:a,onOpenChange:r,children:[(0,k.jsx)(D,{asChild:!0,children:(0,k.jsx)("div",{tabIndex:-1,className:"mly-py-1 mly-px-2 mly-bg-rose-50 mly-border mly-border-rose-200 mly-text-rose-800 mly-rounded-md mly-leading-none",children:i})}),(0,k.jsxs)(H,{align:"start",className:"mly-space-y-2",onOpenAutoFocus:l=>l.preventDefault(),onCloseAutoFocus:l=>l.preventDefault(),children:[(0,k.jsxs)("label",{className:"mly-block mly-w-full mly-leading-none mly-space-y-1.5",children:[(0,k.jsx)("span",{className:"mly-leading-none mly-text-xs mly-font-normal",children:"Variable Name"}),(0,k.jsx)(E,{placeholder:"Add Variable Name",value:i,onChange:l=>{n({id:l.target.value})}})]}),(0,k.jsxs)("label",{className:"mly-block mly-w-full mly-leading-none mly-space-y-1.5",children:[(0,k.jsx)("span",{className:"mly-leading-none mly-text-xs mly-font-normal",children:"Fallback Value"}),(0,k.jsx)(E,{placeholder:"Fallback Value",value:s||"",onChange:l=>{n({fallback:l.target.value})}})]})]})]})})}var L=require("react"),nt=require("@tiptap/core"),lt=require("@tiptap/react"),it=b(require("@tiptap/suggestion")),y=require("lucide-react"),at=b(require("tippy.js"));var c=require("react/jsx-runtime"),qt=nt.Extension.create({name:"slash-command",addOptions(){return{suggestion:{char:"/",command:({editor:t,range:e,props:o})=>{o.command({editor:t,range:e})}}}},addProseMirrorPlugins(){return[(0,it.default)(d({editor:this.editor},this.options.suggestion))]}}),Wt=({query:t})=>[{title:"Text",description:"Just start typing with plain text.",searchTerms:["p","paragraph"],icon:(0,c.jsx)(y.Text,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleNode("paragraph","paragraph").run()}},{title:"Heading 1",description:"Big section heading.",searchTerms:["title","big","large"],icon:(0,c.jsx)(y.Heading1,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setNode("heading",{level:1}).run()}},{title:"Heading 2",description:"Medium section heading.",searchTerms:["subtitle","medium"],icon:(0,c.jsx)(y.Heading2,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setNode("heading",{level:2}).run()}},{title:"Heading 3",description:"Small section heading.",searchTerms:["subtitle","small"],icon:(0,c.jsx)(y.Heading3,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setNode("heading",{level:3}).run()}},{title:"Bullet List",description:"Create a simple bullet list.",searchTerms:["unordered","point"],icon:(0,c.jsx)(y.List,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleBulletList().run()}},{title:"Numbered List",description:"Create a list with numbering.",searchTerms:["ordered"],icon:(0,c.jsx)(y.ListOrdered,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleOrderedList().run()}},{title:"Image",description:"Full width image",searchTerms:["image"],icon:(0,c.jsx)(y.ImageIcon,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{let n=prompt("Image URL: ")||"";n&&(e.chain().focus().deleteRange(o).run(),e.chain().focus().setImage({src:n}).run())}},{title:"Logo",description:"Add your brand logo",searchTerms:["image","logo"],icon:(0,c.jsx)(y.ImageIcon,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{let n=prompt("Logo URL: ")||"";n&&(e.chain().focus().deleteRange(o).run(),e.chain().focus().setLogoImage({src:n}).run())}},{title:"Spacer",description:"Add a spacer to the page. Useful for adding space between sections.",searchTerms:["space","gap","divider"],icon:(0,c.jsx)(y.MoveVertical,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setSpacer({height:"sm"}).run()}},{title:"Button",description:"Add a call to action button to the page.",searchTerms:["link","button","cta"],icon:(0,c.jsx)(y.MousePointer,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setButton().run()}},{title:"Hard Break",description:"Add a break between lines.",searchTerms:["break","line"],icon:(0,c.jsx)(y.DivideIcon,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setHardBreak().run()}},{title:"Blockquote",description:"Add blockquote.",searchTerms:["quote","blockquote"],icon:(0,c.jsx)(y.TextQuote,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleBlockquote().run()}},{title:"Footer",description:"Add a footer text to the page.",searchTerms:["footer","text"],icon:(0,c.jsx)(y.FootprintsIcon,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setFooter().run()}},{title:"Clear Line",description:"Clear the current line.",searchTerms:["clear","line"],icon:(0,c.jsx)(y.EraserIcon,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().selectParentNode().deleteSelection().run()}}].filter(e=>{if(typeof t=="string"&&t.length>0){let o=t.toLowerCase();return e.title.toLowerCase().includes(o)||e.description.toLowerCase().includes(o)||e.searchTerms&&e.searchTerms.some(n=>n.includes(o))}return!0}),$t=(t,e)=>{let o=t.offsetHeight,n=e?e.offsetHeight:0,i=e.offsetTop,s=i+n;i<t.scrollTop?t.scrollTop-=t.scrollTop-i+5:s>o+t.scrollTop&&(t.scrollTop+=s-o-t.scrollTop+5)},Kt=({items:t,command:e,editor:o})=>{let[n,i]=(0,L.useState)(0),s=(0,L.useCallback)(r=>{let l=t[r];l&&e(l)},[e,o,t]);(0,L.useEffect)(()=>{let r=["ArrowUp","ArrowDown","Enter"],l=p=>{if(r.includes(p.key))return p.preventDefault(),p.key==="ArrowUp"?(i((n+t.length-1)%t.length),!0):p.key==="ArrowDown"?(i((n+1)%t.length),!0):p.key==="Enter"?(s(n),!0):!1};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[t,n,i,s]),(0,L.useEffect)(()=>{i(0)},[t]);let a=(0,L.useRef)(null);return(0,L.useLayoutEffect)(()=>{let r=a==null?void 0:a.current,l=r==null?void 0:r.children[n];l&&r&&$t(r,l)},[n]),t.length>0?(0,c.jsxs)("div",{className:"mly-z-50 mly-w-72 mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-shadow-md mly-transition-all",children:[(0,c.jsx)("div",{id:"slash-command",ref:a,className:"mly-no-scrollbar mly-h-auto mly-max-h-[330px] mly-overflow-y-auto mly-scroll-smooth mly-px-1 mly-py-2",children:t.map((r,l)=>(0,c.jsxs)("button",{className:w("mly-flex mly-w-full mly-items-center mly-space-x-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100 hover:mly-text-gray-900",l===n?"mly-bg-gray-100 mly-text-gray-900":"mly-bg-transparent"),onClick:()=>s(l),type:"button",children:[(0,c.jsx)("div",{className:"mly-flex mly-h-6 mly-w-6 mly-shrink-0 mly-items-center mly-justify-center",children:r.icon}),(0,c.jsxs)("div",{children:[(0,c.jsx)("p",{className:"mly-font-medium",children:r.title}),(0,c.jsx)("p",{className:"mly-text-xs mly-text-gray-400",children:r.description})]})]},l))}),(0,c.jsx)("div",{className:"mly-border-t mly-border-gray-200 mly-px-1 mly-py-3 mly-pl-4",children:(0,c.jsxs)("div",{className:"mly-flex mly-items-center",children:[(0,c.jsxs)("p",{className:"mly-text-center mly-text-xs mly-text-gray-400",children:[(0,c.jsx)("kbd",{className:"mly-rounded mly-border mly-p-1 mly-px-2 mly-font-medium",children:"\u2191"}),(0,c.jsx)("kbd",{className:"mly-ml-1 mly-rounded mly-border mly-p-1 mly-px-2 mly-font-medium",children:"\u2193"})," ","to navigate"]}),(0,c.jsx)("span",{"aria-hidden":"true",className:"mly-select-none mly-px-1",children:"\xB7"}),(0,c.jsxs)("p",{className:"mly-text-center mly-text-xs mly-text-gray-400",children:[(0,c.jsx)("kbd",{className:"mly-rounded mly-border mly-p-1 mly-px-1.5 mly-font-medium",children:"Enter"})," ","to select"]})]})})]}):null},_t={items:Wt,render:()=>{let t=null,e=null;return{onStart:o=>{t=new lt.ReactRenderer(Kt,{props:o,editor:o.editor}),e=(0,at.default)("body",{getReferenceClientRect:o.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual"})},onUpdate:o=>{t==null||t.updateProps(o),e&&e[0].setProps({getReferenceClientRect:o.clientRect})},onKeyDown:o=>{var n;return o.event.key==="Escape"?(e==null||e[0].hide(),!0):(n=t==null?void 0:t.ref)==null?void 0:n.onKeyDown(o)},onExit:()=>{!e||!(e!=null&&e[0])||!t||(e==null||e[0].destroy(),t==null||t.destroy())}}}},st=qt.configure({suggestion:_t});var ee=require("@tiptap/core"),mt=require("@tiptap/pm/state"),dt=require("@tiptap/react"),ct=b(require("@tiptap/suggestion"));var Gt=new mt.PluginKey("variable"),pt=ee.Node.create({name:"variable",group:"inline",inline:!0,selectable:!0,atom:!0,addOptions(){return{HTMLAttributes:{},renderLabel({options:t,node:e}){var o;return`${(o=e.attrs.label)!=null?o:e.attrs.id}`},suggestion:{char:"@",pluginKey:Gt,command:({editor:t,range:e,props:o})=>{var s,a;let n=t.view.state.selection.$to.nodeAfter;((s=n==null?void 0:n.text)==null?void 0:s.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:this.name,attrs:o},{type:"text",text:" "}]).run(),(a=window.getSelection())==null||a.collapseToEnd()},allow:({state:t,range:e})=>{let o=t.doc.resolve(e.from),n=t.schema.nodes[this.name];return!!o.parent.type.contentMatch.matchType(n)}}}},addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}},fallback:{default:null,parseHTML:t=>t.getAttribute("data-fallback"),renderHTML:t=>t.fallback?{"data-fallback":t.fallback}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){return["span",(0,ee.mergeAttributes)({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t})]},renderText({node:t}){return this.options.renderLabel({options:this.options,node:t})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let o=!1,{selection:n}=e,{empty:i,anchor:s}=n;return i?(e.doc.nodesBetween(s-1,s,(a,r)=>{if(a.type.name===this.name)return o=!0,t.insertText(this.options.suggestion.char||"",r,r+a.nodeSize),!1}),o):!1})}},addProseMirrorPlugins(){return[(0,ct.default)(d({editor:this.editor},this.options.suggestion))]},addNodeView(){return(0,dt.ReactNodeViewRenderer)(rt)}});var te=require("@tiptap/react"),oe=require("react"),gt=b(require("@tiptap/extension-image"));var q=require("react"),yt=t=>{let e=(0,q.useRef)(null);return(0,q.useLayoutEffect)(()=>{e.current=t},[t]),(0,q.useCallback)((...o)=>{if(e.current===null)throw new Error("Handler is not assigned");return e.current(...o)},[])};var B=require("react/jsx-runtime"),jt=60;function Xt(t){let{node:e,updateAttributes:o,selected:n}=t,i=(0,oe.useRef)(null),[s,a]=(0,oe.useState)(),r=yt(h=>{let A=document.querySelector(".ProseMirror-selectednode");if(!i.current||!A||!n)return;let C=A.offsetWidth;h.preventDefault();let N=h.currentTarget.dataset.direction||"--",ne=h.clientX,$=i.current.width,be=i.current.height,V=$,le=be,Tt=N[1]==="w"?-1:1,ie=()=>{window.removeEventListener("mousemove",xe),window.removeEventListener("mouseup",ie),o({width:V,height:le}),a(void 0)},xe=ve=>{if(V=Math.max($+Tt*(ve.clientX-ne),jt),V>C&&(V=C),le=V/$*be,a({width:V,height:le}),!ve.buttons)return ie()};window.addEventListener("mousemove",xe),window.addEventListener("mouseup",ie)});function l(h){return(0,B.jsx)("div",{role:"button",tabIndex:0,onMouseDown:r,"data-direction":h,className:"mly-bg-rose-500",style:v(d(d({position:"absolute",height:"10px",width:"10px"},{n:{top:0},s:{bottom:0}}[h[0]]),{w:{left:0},e:{right:0}}[h[1]]),{cursor:`${h}-resize`})})}let{alignment:p="center",width:u,height:g}=e.attrs||{};return(0,B.jsxs)(te.NodeViewWrapper,{as:"div",draggable:!0,"data-drag-handle":!0,style:d(v(d({width:u,height:g},s),{overflow:"hidden",position:"relative",lineHeight:"0px",display:"block"}),{center:{marginLeft:"auto",marginRight:"auto"},left:{marginRight:"auto"},right:{marginLeft:"auto"}}[p]||{}),children:[(0,B.jsx)("img",v(d({},e.attrs),{ref:i,style:v(d({},s),{cursor:"default",marginBottom:0})})),n&&(0,B.jsxs)(B.Fragment,{children:[[{left:0,top:0,height:"100%",width:"1px"},{right:0,top:0,height:"100%",width:"1px"},{top:0,left:0,width:"100%",height:"1px"},{bottom:0,left:0,width:"100%",height:"1px"}].map((h,A)=>(0,B.jsx)("div",{className:"mly-bg-rose-500",style:d({position:"absolute"},h)},A)),l("nw"),l("ne"),l("sw"),l("se")]})]})}var ut=gt.default.extend({addAttributes(){var t;return v(d({},(t=this.parent)==null?void 0:t.call(this)),{width:{renderHTML:({width:e})=>({width:e})},height:{renderHTML:({height:e})=>({height:e})},alignment:{default:"center",renderHTML:({alignment:e})=>({"data-alignment":e}),parseHTML:e=>e.getAttribute("data-alignment")||"center"}})},addNodeView(){return(0,te.ReactNodeViewRenderer)(Xt)}});function Lt(t){let{variables:e}=t;return[ht.default.configure({heading:{levels:[1,2,3]},dropcursor:{color:"#555",width:3},code:{HTMLAttributes:{class:"mly-px-1 mly-py-0.5 mly-bg-[#efefef] mly-text-sm mly-rounded-md mly-tracking-normal mly-font-normal"}},horizontalRule:!1,blockquote:{HTMLAttributes:{class:"mly-not-prose mly-border-l-4 mly-border-gray-300 mly-pl-4 mly-mt-4 mly-mb-4"}}}),Ct.default,Re,wt.Color.configure({types:[fe.default.name,bt.default.name]}),fe.default.configure(),kt.default.configure({types:[xt.default.name,At.default.name,we.name]}),$e,vt.default.configure({placeholder:({node:o})=>o.type.name==="heading"?`Heading ${o.attrs.level}`:"Write something or / to see commands",includeChildren:!0}),Ue,we,pt.configure({suggestion:ot(e)}),st,ft.default.configure({HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow"},openOnClick:!1}),Ze,ut]}var z=require("react/jsx-runtime");function Jt(t){let{config:{wrapClassName:e="",contentClassName:o="",bodyClassName:n="",hasMenuBar:i=!0,spellCheck:s=!1,autofocus:a="end"}={},onCreate:r,onUpdate:l,extensions:p,contentHtml:u,contentJson:g,variables:h}=t,A=null;g?A=(g==null?void 0:g.type)==="doc"?g:{type:"doc",content:g}:u?A=u:A={type:"doc",content:[{type:"paragraph",content:[]}]};let C=(0,re.useEditor)({editorProps:{attributes:{class:w("mly-prose mly-w-full",o),spellCheck:s?"true":"false"},handleDOMEvents:{keydown:(N,ne)=>{if(["ArrowUp","ArrowDown","Enter"].includes(ne.key)&&document.querySelector("#slash-command"))return!0}}},onCreate:({editor:N})=>{r==null||r(N)},onUpdate:({editor:N})=>{l==null||l(N)},extensions:[...Lt({variables:h}),...p||[]],content:A,autofocus:a});return C?(0,z.jsxs)("div",{className:w("mly-editor mly-antialiased",e),children:[i&&(0,z.jsx)(He,{config:t.config,editor:C}),(0,z.jsxs)("div",{className:w("mly-mt-4 mly-rounded mly-border mly-bg-white mly-p-4",n),children:[(0,z.jsx)(Ee,{editor:C}),(0,z.jsx)(Oe,{editor:C}),(0,z.jsx)(Fe,{editor:C}),(0,z.jsx)(re.EditorContent,{editor:C})]})]}):null}0&&(module.exports={Editor});
4
+ `);I('*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.mly-prose{color:var(--tw-prose-body);max-width:65ch}.mly-prose :where(p):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.mly-prose :where([class~=lead]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.mly-prose :where(a):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.mly-prose :where(strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.mly-prose :where(a strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(blockquote strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(thead th strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(ol):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.mly-prose :where(ol[type=A]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-alpha}.mly-prose :where(ol[type=a]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-alpha}.mly-prose :where(ol[type=A s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-alpha}.mly-prose :where(ol[type=a s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-alpha}.mly-prose :where(ol[type=I]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-roman}.mly-prose :where(ol[type=i]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-roman}.mly-prose :where(ol[type=I s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-roman}.mly-prose :where(ol[type=i s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-roman}.mly-prose :where(ol[type="1"]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:decimal}.mly-prose :where(ul):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.mly-prose :where(ol>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.mly-prose :where(ul>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *))::marker{color:var(--tw-prose-bullets)}.mly-prose :where(dt):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.mly-prose :where(hr):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.mly-prose :where(blockquote):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"\\201c""\\201d""\\2018""\\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.mly-prose :where(blockquote p:first-of-type):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):before{content:open-quote}.mly-prose :where(blockquote p:last-of-type):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):after{content:close-quote}.mly-prose :where(h1):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.mly-prose :where(h1 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:900;color:inherit}.mly-prose :where(h2):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.mly-prose :where(h2 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:800;color:inherit}.mly-prose :where(h3):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.mly-prose :where(h3 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:700;color:inherit}.mly-prose :where(h4):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.mly-prose :where(h4 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:700;color:inherit}.mly-prose :where(img):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:2em;margin-bottom:2em}.mly-prose :where(picture):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.mly-prose :where(kbd):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.mly-prose :where(code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.mly-prose :where(code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):before{content:"`"}.mly-prose :where(code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):after{content:"`"}.mly-prose :where(a code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(h1 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(h2 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit;font-size:.875em}.mly-prose :where(h3 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit;font-size:.9em}.mly-prose :where(h4 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(blockquote code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(thead th code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(pre):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.mly-prose :where(pre code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.mly-prose :where(pre code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):before{content:none}.mly-prose :where(pre code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):after{content:none}.mly-prose :where(table):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.mly-prose :where(thead):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.mly-prose :where(thead th):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.mly-prose :where(tbody tr):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.mly-prose :where(tbody tr:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-bottom-width:0}.mly-prose :where(tbody td):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){vertical-align:baseline}.mly-prose :where(tfoot):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.mly-prose :where(tfoot td):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){vertical-align:top}.mly-prose :where(figure>*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0;margin-bottom:0}.mly-prose :where(figcaption):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.mly-prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.mly-prose :where(picture>img):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0;margin-bottom:0}.mly-prose :where(video):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:2em;margin-bottom:2em}.mly-prose :where(li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.5em;margin-bottom:.5em}.mly-prose :where(ol>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:.375em}.mly-prose :where(ul>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:.375em}.mly-prose :where(.mly-prose>ul>li p):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.75em;margin-bottom:.75em}.mly-prose :where(.mly-prose>ul>li>*:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em}.mly-prose :where(.mly-prose>ul>li>*:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-bottom:1.25em}.mly-prose :where(.mly-prose>ol>li>*:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em}.mly-prose :where(.mly-prose>ol>li>*:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-bottom:1.25em}.mly-prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.75em;margin-bottom:.75em}.mly-prose :where(dl):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.mly-prose :where(dd):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.5em;padding-left:1.625em}.mly-prose :where(hr+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(h2+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(h3+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(h4+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(thead th:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:0}.mly-prose :where(thead th:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-right:0}.mly-prose :where(tbody td,tfoot td):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding:.5714286em}.mly-prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:0}.mly-prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-right:0}.mly-prose :where(figure):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:2em;margin-bottom:2em}.mly-prose :where(.mly-prose>:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(.mly-prose>:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-bottom:0}.mly-z-50{z-index:50}.mly-mb-4{margin-bottom:1rem}.mly-ml-1{margin-left:.25rem}.mly-mt-2{margin-top:.5rem}.mly-mt-4{margin-top:1rem}.mly-block{display:block}.mly-inline-block{display:inline-block}.mly-flex{display:flex}.mly-inline-flex{display:inline-flex}.mly-h-10{height:2.5rem}.mly-h-11{height:2.75rem}.mly-h-3{height:.75rem}.mly-h-3\\.5{height:.875rem}.mly-h-4{height:1rem}.mly-h-6{height:1.5rem}.mly-h-9{height:2.25rem}.mly-h-\\[2px\\]{height:2px}.mly-h-auto{height:auto}.mly-max-h-\\[330px\\]{max-height:330px}.mly-w-10{width:2.5rem}.mly-w-3{width:.75rem}.mly-w-3\\.5{width:.875rem}.mly-w-4{width:1rem}.mly-w-6{width:1.5rem}.mly-w-72{width:18rem}.mly-w-full{width:100%}.mly-min-w-\\[128px\\]{min-width:128px}.mly-shrink-0{flex-shrink:0}.mly-grow{flex-grow:1}.mly-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.mly-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mly-flex-col{flex-direction:column}.mly-items-center{align-items:center}.mly-justify-center{justify-content:center}.mly-gap-1{gap:.25rem}.mly-gap-3{gap:.75rem}.mly-gap-\\[1px\\]{gap:1px}.mly-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.mly-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.mly-space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.mly-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.mly-overflow-y-auto{overflow-y:auto}.mly-scroll-smooth{scroll-behavior:smooth}.\\!mly-rounded-full{border-radius:9999px!important}.\\!mly-rounded-md{border-radius:.375rem!important}.\\!mly-rounded-none{border-radius:0!important}.mly-rounded{border-radius:.25rem}.mly-rounded-md{border-radius:.375rem}.mly-border{border-width:1px}.mly-border-l-4{border-left-width:4px}.mly-border-t{border-top-width:1px}.mly-border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.mly-border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.mly-border-rose-200{--tw-border-opacity: 1;border-color:rgb(254 205 211 / var(--tw-border-opacity))}.mly-border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.mly-bg-\\[\\#efefef\\]{--tw-bg-opacity: 1;background-color:rgb(239 239 239 / var(--tw-bg-opacity))}.mly-bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.mly-bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.mly-bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.mly-bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.mly-bg-rose-50{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity))}.mly-bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.mly-bg-transparent{background-color:transparent}.mly-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.mly-stroke-\\[2\\.5\\]{stroke-width:2.5}.\\!mly-p-0{padding:0!important}.mly-p-1{padding:.25rem}.mly-p-4{padding:1rem}.mly-px-1{padding-left:.25rem;padding-right:.25rem}.mly-px-1\\.5{padding-left:.375rem;padding-right:.375rem}.mly-px-2{padding-left:.5rem;padding-right:.5rem}.mly-px-2\\.5{padding-left:.625rem;padding-right:.625rem}.mly-px-3{padding-left:.75rem;padding-right:.75rem}.mly-px-4{padding-left:1rem;padding-right:1rem}.mly-px-8{padding-left:2rem;padding-right:2rem}.mly-px-\\[32px\\]{padding-left:32px;padding-right:32px}.mly-py-0{padding-top:0;padding-bottom:0}.mly-py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.mly-py-1{padding-top:.25rem;padding-bottom:.25rem}.mly-py-2{padding-top:.5rem;padding-bottom:.5rem}.mly-py-3{padding-top:.75rem;padding-bottom:.75rem}.mly-py-\\[20px\\]{padding-top:20px;padding-bottom:20px}.mly-pl-4{padding-left:1rem}.mly-text-left{text-align:left}.mly-text-center{text-align:center}.mly-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.mly-text-\\[13px\\]{font-size:13px}.mly-text-sm{font-size:.875rem;line-height:1.25rem}.mly-text-xs{font-size:.75rem;line-height:1rem}.mly-font-medium{font-weight:500}.mly-font-normal{font-weight:400}.mly-font-semibold{font-weight:600}.mly-capitalize{text-transform:capitalize}.mly-leading-none{line-height:1}.mly-tracking-normal{letter-spacing:0em}.mly-text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.mly-text-gray-50{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.mly-text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.mly-text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.mly-text-rose-800{--tw-text-opacity: 1;color:rgb(159 18 57 / var(--tw-text-opacity))}.mly-text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.mly-text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.mly-text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.mly-text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.mly-no-underline{text-decoration-line:none}.mly-underline-offset-4{text-underline-offset:4px}.mly-antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.\\!mly-shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.mly-shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.mly-outline-none{outline:2px solid transparent;outline-offset:2px}.mly-ring-offset-white{--tw-ring-offset-color: #fff}.mly-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.mly-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.mly-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.mly-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.file\\:mly-border-0::file-selector-button{border-width:0px}.file\\:mly-bg-transparent::file-selector-button{background-color:transparent}.file\\:mly-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:mly-font-medium::file-selector-button{font-weight:500}.placeholder\\:mly-text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.placeholder\\:mly-text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\\:mly-bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\\:mly-bg-gray-100\\/80:hover{background-color:#f3f4f6cc}.hover\\:mly-bg-gray-900\\/90:hover{background-color:#111827e6}.hover\\:mly-bg-red-500\\/90:hover{background-color:#ef4444e6}.hover\\:mly-text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\\:mly-underline:hover{text-decoration-line:underline}.focus-visible\\:mly-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:mly-ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:mly-ring-gray-400:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus-visible\\:mly-ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\\:mly-pointer-events-none:disabled{pointer-events:none}.disabled\\:mly-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:mly-opacity-50:disabled{opacity:.5}.data-\\[state\\=true\\]\\:mly-bg-gray-100[data-state=true]{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.data-\\[state\\=true\\]\\:mly-text-gray-900[data-state=true]{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.data-\\[state\\=open\\]\\:mly-animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:mly-animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:mly-fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:mly-fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:mly-zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:mly-zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:mly-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:mly-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:mly-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:mly-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}\n');var re=require("@tiptap/react");var j=require("@tiptap/react"),x=require("lucide-react");var Le=require("@tiptap/core"),Te=b(require("@tiptap/extension-image"));var Ne=["sm","md","lg"],_=["left","center","right"],Me="left",se="sm";function Ht(t){let e={sm:"40px",md:"48px",lg:"64px"};return[`height:${e[t]||e[se]}`,`width:${e[t]||e[se]}`]}function Vt(t){let e={left:["margin-right:auto","margin-left:0"],center:["margin-right:auto","margin-left:auto"],right:["margin-right:0","margin-left:auto"]};return e[t]||e[Me]}var Re=Te.default.extend({name:"logo",priority:1e3,addAttributes(){var t;return k(d({},(t=this.parent)==null?void 0:t.call(this)),{"maily-component":{default:"logo",renderHTML:e=>({"data-maily-component":e["maily-component"]}),parseHTML:e=>e.getAttribute("data-maily-component")},size:{default:se,parseHTML:e=>e.getAttribute("data-size"),renderHTML:e=>({"data-size":e.size})},alignment:{default:Me,parseHTML:e=>e.getAttribute("data-alignment"),renderHTML:e=>({"data-alignment":e.alignment})}})},addCommands(){return{setLogoImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t}),setLogoAttributes:t=>({commands:e})=>e.updateAttributes("logo",t)}},renderHTML({HTMLAttributes:t,node:e}){let{size:o,alignment:n}=e.attrs,a=["position:relative","margin-top:0",...Ht(o),...Vt(n)];return t.style=a.join(";"),["img",(0,Le.mergeAttributes)(this.options.HTMLAttributes,t)]},parseHTML(){return[{tag:`img[data-maily-component="${this.name}"]`}]}});var ze=b(require("react")),Se=require("@radix-ui/react-slot");var Pe=require("clsx"),Be=require("tailwind-merge");function w(...t){return(0,Be.twMerge)((0,Pe.clsx)(t))}var Ie=require("react/jsx-runtime"),M=ze.forwardRef((i,s)=>{var r=i,{className:t,variant:e="default",size:o="default",asChild:n=!1}=r,a=O(r,["className","variant","size","asChild"]);let l=n?Se.Slot:"button",p="mly-inline-flex mly-items-center mly-justify-center mly-rounded-md mly-text-sm mly-font-medium mly-ring-offset-white mly-transition-colors focus-visible:mly-outline-none focus-visible:mly-ring-2 focus-visible:mly-ring-gray-400 focus-visible:mly-ring-offset-2 disabled:mly-pointer-events-none disabled:mly-opacity-50",u={default:"mly-bg-gray-900 mly-text-gray-50 hover:mly-bg-gray-900/90",destructive:"mly-bg-red-500 mly-text-gray-50 hover:mly-bg-red-500/90",outline:"mly-border mly-border-gray-200 mly-bg-white hover:mly-bg-gray-100 hover:mly-text-gray-900",secondary:"mly-bg-gray-100 mly-text-gray-900 hover:mly-bg-gray-100/80",ghost:"hover:mly-bg-gray-100 bg-transparent hover:mly-text-gray-900 data-[state=true]:mly-bg-gray-100 data-[state=true]:mly-text-gray-900",link:"mly-text-gray-900 mly-underline-offset-4 hover:mly-underline"},g={default:"mly-h-10 mly-px-4 mly-py-2",sm:"mly-h-9 mly-rounded-md mly-px-3",lg:"mly-h-11 mly-rounded-md mly-px-8",icon:"mly-h-10 mly-w-10"},h=w("mly-editor",p,u[e],g[o],t);return(0,Ie.jsx)(l,d({className:h,ref:s},a))});M.displayName="BaseButton";var G=require("react/jsx-runtime");function S(t){return(0,G.jsx)(M,{variant:"ghost",size:"sm",onClick:t.command,"data-state":t.isActive(),className:w("mly-px-2.5"),type:"button",children:t.icon?(0,G.jsx)(t.icon,{className:w("mly-h-3.5 mly-w-3.5")}):(0,G.jsx)("span",{className:"mly-text-sm mly-font-medium mly-text-slate-600",children:t.name})})}var me=require("react/jsx-runtime");function Ee(t){let{editor:e}=t,o=[x.AlignLeftIcon,x.AlignCenterIcon,x.AlignRightIcon],n=_.map((i,r)=>({name:i,isActive:()=>e==null?void 0:e.isActive({textAlign:i}),command:()=>{var l,p,u,g;(l=t==null?void 0:t.editor)!=null&&l.isActive({textAlign:i})?(u=(p=t==null?void 0:t.editor)==null?void 0:p.chain())==null||u.focus().unsetTextAlign().run():(g=t==null?void 0:t.editor)==null||g.chain().focus().setTextAlign(i).run()},icon:o[r]})),a=[{name:"bold",isActive:()=>e==null?void 0:e.isActive("bold"),command:()=>e==null?void 0:e.chain().focus().toggleBold().run(),icon:x.BoldIcon},{name:"italic",isActive:()=>e==null?void 0:e.isActive("italic"),command:()=>e==null?void 0:e.chain().focus().toggleItalic().run(),icon:x.ItalicIcon},{name:"underline",isActive:()=>e==null?void 0:e.isActive("underline"),command:()=>e==null?void 0:e.chain().focus().toggleUnderline().run(),icon:x.UnderlineIcon},{name:"strike",isActive:()=>e==null?void 0:e.isActive("strike"),command:()=>e==null?void 0:e.chain().focus().toggleStrike().run(),icon:x.StrikethroughIcon},...n,{name:"code",isActive:()=>e==null?void 0:e.isActive("code"),command:()=>e==null?void 0:e.chain().focus().toggleCode().run(),icon:x.CodeIcon},{name:"link",command:()=>{let i=e==null?void 0:e.getAttributes("link").href,r=window.prompt("URL",i);if(r!==null){if(r===""){e==null||e.chain().focus().extendMarkRange("link").unsetLink().run();return}e==null||e.chain().focus().extendMarkRange("link").setLink({href:r}).run()}},isActive:()=>e==null?void 0:e.isActive("link"),icon:x.LinkIcon}],s=k(d({},t),{shouldShow:({editor:i,state:r,from:l,to:p})=>{let{doc:u,selection:g}=r,{empty:h}=g,A=!u.textBetween(l,p).length&&(0,j.isTextSelection)(r.selection);return!(h||A||!i.isEditable||i.isActive("image")||i.isActive("logo")||i.isActive("spacer")||i.isActive("variable")||i.isActive({mailyComponent:"button"}))},tippyOptions:{maxWidth:"100%",moveTransition:"mly-transform 0.15s mly-ease-out"}});return(0,me.jsx)(j.BubbleMenu,k(d({},s),{className:"mly-flex mly-gap-1 mly-rounded-md mly-border mly-border-slate-200 mly-bg-white mly-p-1 mly-shadow-md",children:a.map((i,r)=>(0,me.jsx)(S,d({},i),r))}))}var de=require("react"),f=require("lucide-react");var X=require("react/jsx-runtime"),He=t=>{let{editor:e,config:o}=t,n=(0,de.useMemo)(()=>[{name:"bold",command:()=>e.chain().focus().toggleBold().run(),isActive:()=>e.isActive("bold"),group:"mark",icon:f.BoldIcon},{name:"italic",command:()=>e.chain().focus().toggleItalic().run(),isActive:()=>e.isActive("italic"),group:"mark",icon:f.ItalicIcon},{name:"underline",command:()=>e.chain().focus().toggleUnderline().run(),isActive:()=>e.isActive("underline"),group:"mark",icon:f.UnderlineIcon},{name:"strike",command:()=>e.chain().focus().toggleStrike().run(),isActive:()=>e.isActive("strike"),group:"mark",icon:f.StrikethroughIcon},{name:"delete-line",command:()=>e.chain().focus().selectParentNode().deleteSelection().run(),isActive:()=>!1,group:"mark",icon:f.EraserIcon},{name:"divider",command:()=>e.chain().focus().setHorizontalRule().run(),isActive:()=>e.isActive("horizontalRule"),group:"custom",icon:f.SeparatorHorizontal},{name:"link",command:()=>{let s=e.getAttributes("link").href,i=window.prompt("URL",s);if(i!==null){if(i===""){e.chain().focus().extendMarkRange("link").unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:i}).run()}},isActive:()=>e.isActive("link"),group:"custom",icon:f.LinkIcon},{name:"left",command:()=>e.chain().focus().setTextAlign("left").run(),isActive:()=>e.isActive({textAlign:"left"}),group:"alignment",icon:f.AlignLeft},{name:"center",command:()=>e.chain().focus().setTextAlign("center").run(),isActive:()=>e.isActive({textAlign:"center"}),group:"alignment",icon:f.AlignCenter},{name:"right",command:()=>e.chain().focus().setTextAlign("right").run(),isActive:()=>e.isActive({textAlign:"right"}),group:"alignment",icon:f.AlignRight}],[e]),a=(0,de.useMemo)(()=>n.reduce((s,i)=>(s.includes(i.group)||s.push(i.group),s),[]),[n]);return e?(0,X.jsx)("div",{className:`mly-flex mly-items-center mly-gap-3 ${o==null?void 0:o.toolbarClassName}`,children:a.map((s,i)=>(0,X.jsx)("div",{className:"mly-flex mly-items-center mly-gap-1 mly-rounded-md mly-border mly-bg-white mly-p-1",children:n.filter(r=>r.group===s).map((r,l)=>(0,X.jsx)(S,d({},r),l))},i))}):null};var Ve=require("@tiptap/react"),T=require("lucide-react");var ce=require("react/jsx-runtime");function Oe(t){let{editor:e}=t,o=[T.AlignLeftIcon,T.AlignCenterIcon,T.AlignRightIcon],n=_.map((r,l)=>({name:r,isActive:()=>(e==null?void 0:e.isActive("logo",{alignment:r}))||(e==null?void 0:e.isActive("image",{alignment:r})),shouldShow:()=>(e==null?void 0:e.isActive("logo"))||(e==null?void 0:e.isActive("image")),command:()=>{var u,g;(e==null?void 0:e.isActive("logo"))?(u=t==null?void 0:t.editor)==null||u.chain().focus().setLogoAttributes({alignment:r}).run():(g=t==null?void 0:t.editor)==null||g.chain().focus().updateAttributes("image",{alignment:r}).run()},icon:o[l]})),a=Ne.map(r=>({name:r,isActive:()=>{var l;return(l=t==null?void 0:t.editor)==null?void 0:l.isActive("logo",{size:r})},shouldShow:()=>e==null?void 0:e.isActive("logo"),command:()=>{var l;(l=t==null?void 0:t.editor)==null||l.chain().focus().setLogoAttributes({size:r}).run()}})),s=[...n,{name:"url",isActive:()=>!1,shouldShow:()=>e==null?void 0:e.isActive("logo"),command:()=>{var A,C,N;let{editor:r}=t,l=(A=r==null?void 0:r.getAttributes("logo"))==null?void 0:A.src,p=window.prompt("Update logo URL",l);if(!p)return;let u=(C=r==null?void 0:r.getAttributes("logo"))==null?void 0:C.size,g=(N=r==null?void 0:r.getAttributes("logo"))==null?void 0:N.alignment,h=r==null?void 0:r.state.selection;r==null||r.commands.setLogoImage({src:p,size:u,alignment:g}),r==null||r.commands.setNodeSelection((h==null?void 0:h.from)||0)},icon:T.Link},{name:"image-url",isActive:()=>!1,shouldShow:()=>e==null?void 0:e.isActive("image"),command:()=>{var g;let{editor:r}=t,l=(g=r==null?void 0:r.getAttributes("image"))==null?void 0:g.src,p=window.prompt("Update Image URL",l);if(!p)return;let u=r==null?void 0:r.state.selection;r==null||r.commands.setImage({src:p}),r==null||r.commands.setNodeSelection((u==null?void 0:u.from)||0)},icon:T.Unlink},...a],i=k(d({},t),{shouldShow:({editor:r})=>r.isActive("logo")||r.isActive("image"),tippyOptions:{maxWidth:"100%",moveTransition:"mly-transform 0.15s mly-ease-out"}});return(0,ce.jsx)(Ve.BubbleMenu,k(d({},i),{className:"mly-flex mly-gap-1 mly-rounded-md mly-border mly-border-slate-200 mly-bg-white mly-p-1 mly-shadow-md",children:s.filter(r=>{var l;return(l=r.shouldShow)==null?void 0:l.call(r)}).map((r,l)=>(0,ce.jsx)(S,d({},r),l))}))}var De=require("@tiptap/react");var J=require("@tiptap/core"),pe=["sm","md","lg","xl"],Ot="sm";function Ut(t){let e={sm:"8px",md:"16px",lg:"32px",xl:"64px"};return`width: 100%; height: ${e[t]||e[Ot]}`}var Ue=J.Node.create({name:"spacer",priority:1e3,group:"block",draggable:!0,addAttributes(){return{height:{default:null,parseHTML:t=>t.getAttribute("data-height"),renderHTML:t=>({"data-height":t.height})}}},addCommands(){return{setSpacer:t=>({commands:e})=>e.insertContent({type:this.name,attrs:{height:t.height}}),setSpacerSize:t=>({commands:e})=>{if(!pe.includes(t))throw new Error("Invalid spacer height");return e.updateAttributes("spacer",{height:t})},unsetSpacer:()=>({commands:t})=>t.deleteNode("spacer")}},renderHTML({HTMLAttributes:t,node:e}){let{height:o}=e.attrs;return t.style=Ut(o),["div",(0,J.mergeAttributes)({"data-maily-component":this.name},this.options.HTMLAttributes,t,{class:"spacer relative z-50",contenteditable:!1})]},parseHTML(){return[{tag:`div[data-maily-component="${this.name}"]`}]}});var ye=require("react/jsx-runtime");function Fe(t){let{editor:e}=t,o=pe.map(a=>({name:a,isActive:()=>e==null?void 0:e.isActive("spacer",{height:a}),command:()=>{e==null||e.chain().focus().setSpacer({height:a}).run()}})),n=k(d({},t),{shouldShow:({editor:a})=>a.isActive("spacer"),tippyOptions:{maxWidth:"100%",moveTransition:"mly-transform 0.15s mly-ease-out"}});return(0,ye.jsx)(De.BubbleMenu,k(d({},n),{className:"mly-flex mly-gap-1 mly-rounded-md mly-border mly-border-slate-200 mly-bg-white mly-p-1 mly-shadow-md",children:o.map((a,s)=>(0,ye.jsx)(S,d({},a),s))}))}var wt=b(require("@tiptap/starter-kit")),ft=require("@tiptap/extension-color"),bt=b(require("@tiptap/extension-link")),xt=b(require("@tiptap/extension-list-item")),vt=b(require("@tiptap/extension-paragraph")),kt=b(require("@tiptap/extension-placeholder")),At=b(require("@tiptap/extension-text-align")),fe=b(require("@tiptap/extension-text-style")),Ct=b(require("@tiptap/extension-heading")),Lt=b(require("@tiptap/extension-underline"));var qe=require("@tiptap/core"),We=require("@tiptap/extension-horizontal-rule"),$e=We.HorizontalRule.extend({addInputRules(){return[new qe.InputRule({find:/^(?:---|—-|___\s|\*\*\*\s)$/,handler:({state:t,range:e})=>{let o={},{tr:n}=t,a=e.from,s=e.to;n.insert(a-1,this.type.create(o)).delete(n.mapping.map(a),n.mapping.map(s))}})]}});var Y=require("@tiptap/core"),Qe=require("@tiptap/react");var je=require("@tiptap/react"),F=require("lucide-react"),he=require("react-color");var Ke=b(require("react"));var _e=require("react/jsx-runtime"),E=Ke.forwardRef((a,n)=>{var s=a,{className:t,type:e}=s,o=O(s,["className","type"]);return(0,_e.jsx)("input",d({type:e,className:w("mly-flex mly-h-10 mly-w-full mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-px-3 mly-py-2 mly-text-sm mly-ring-offset-white file:mly-border-0 file:mly-bg-transparent file:mly-text-sm file:mly-font-medium placeholder:mly-text-gray-500 focus-visible:mly-outline-none focus-visible:mly-ring-2 focus-visible:mly-ring-gray-400 focus-visible:mly-ring-offset-2 disabled:mly-cursor-not-allowed disabled:mly-opacity-50","mly-editor",t),ref:n},o))});E.displayName="Input";var Ge=b(require("react")),R=b(require("@radix-ui/react-popover"));var ge=require("react/jsx-runtime"),U=R.Root,D=R.Trigger,H=Ge.forwardRef((s,a)=>{var i=s,{className:t,align:e="center",sideOffset:o=4}=i,n=O(i,["className","align","sideOffset"]);return(0,ge.jsx)(R.Portal,{children:(0,ge.jsx)(R.Content,d({ref:a,align:e,sideOffset:o,className:w("mly-z-50 mly-w-72 mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-p-4 mly-shadow-md mly-outline-none data-[state=open]:mly-animate-in data-[state=closed]:mly-animate-out data-[state=closed]:mly-fade-out-0 data-[state=open]:mly-fade-in-0 data-[state=closed]:mly-zoom-out-95 data-[state=open]:mly-zoom-in-95 data-[side=bottom]:mly-slide-in-from-top-2 data-[side=left]:mly-slide-in-from-right-2 data-[side=right]:mly-slide-in-from-left-2 data-[side=top]:mly-slide-in-from-bottom-2 text-gray-950","mly-editor",t)},n))})});H.displayName=R.Content.displayName;var m=require("react/jsx-runtime"),Dt={left:F.AlignLeftIcon,center:F.AlignCenterIcon,right:F.AlignRightIcon},ue={style(t){return Je.map(e=>({name:e,isActive:t.node.attrs.variant===e,onClick:()=>{t.updateAttributes({variant:e})}}))},cornerRadius(t){return Ye.map(e=>({name:e,isActive:t.node.attrs.borderRadius===e,onClick:()=>{t.updateAttributes({borderRadius:e})}}))},alignment(t){return Object.entries(Dt).map(([e,o])=>({name:e,icon:o,isActive:t.node.attrs.alignment===e,onClick:()=>t.updateAttributes({alignment:e})}))}};function Xe(t){let{url:e,text:o,alignment:n,variant:a,borderRadius:s,buttonColor:i,textColor:r}=t.node.attrs;return(0,m.jsx)(je.NodeViewWrapper,{className:`react-component ${t.selected&&"ProseMirror-selectednode"}`,draggable:"true","data-drag-handle":"",style:{textAlign:n},children:(0,m.jsxs)(U,{open:t.selected,children:[(0,m.jsx)(D,{asChild:!0,children:(0,m.jsx)("div",{children:(0,m.jsx)("a",{className:w("mly-inline-flex mly-items-center mly-justify-center mly-rounded-md mly-text-sm mly-font-medium mly-ring-offset-white mly-transition-colors disabled:mly-pointer-events-none disabled:mly-opacity-50","mly-h-10 mly-px-4 mly-py-2","mly-px-[32px] mly-py-[20px] mly-font-semibold mly-no-underline",{"!mly-rounded-full":s==="round","!mly-rounded-md":s==="smooth","!mly-rounded-none":s==="sharp"}),href:e,target:"_blank",rel:"noopener noreferrer",tabIndex:-1,style:{backgroundColor:a==="filled"?i:"transparent",color:r,borderWidth:2,borderStyle:"solid",borderColor:i},children:o})})}),(0,m.jsxs)(H,{align:"end",className:"space-y-2",sideOffset:10,onOpenAutoFocus:l=>l.preventDefault(),onCloseAutoFocus:l=>l.preventDefault(),children:[(0,m.jsx)(E,{placeholder:"Add text here",value:o,onChange:l=>{t.updateAttributes({text:l.target.value})}}),(0,m.jsx)(E,{placeholder:"Add link here",value:e,onChange:l=>{t.updateAttributes({url:l.target.value})}}),(0,m.jsxs)("div",{className:"mly-w-full mly-space-y-2",children:[(0,m.jsx)("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Style"}),(0,m.jsx)("div",{className:"mly-flex mly-gap-1",children:ue.style(t).map((l,p)=>(0,m.jsx)(M,{"data-state":l.isActive?"true":"false",variant:"ghost",className:"mly-grow mly-font-normal mly-capitalize",size:"sm",onClick:l.onClick,type:"button",children:l.name},p))})]}),(0,m.jsxs)("div",{className:"mly-w-full mly-space-y-2",children:[(0,m.jsx)("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Corner Radius"}),(0,m.jsx)("div",{className:"mly-flex mly-gap-1",children:ue.cornerRadius(t).map((l,p)=>(0,m.jsx)(M,{"data-state":l.isActive?"true":"false",variant:"ghost",className:"mly-grow mly-font-normal mly-capitalize",size:"sm",onClick:l.onClick,type:"button",children:l.name},p))})]}),(0,m.jsxs)("div",{className:"flex gap-2",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Alignment"}),(0,m.jsx)("div",{className:"mly-mt-2 mly-flex mly-gap-1",children:ue.alignment(t).map((l,p)=>(0,m.jsx)(M,{"data-state":l.isActive?"true":"false",variant:"ghost",className:"mly-grow",size:"sm",onClick:l.onClick,type:"button",children:(0,m.jsx)(l.icon,{size:16})},p))})]}),(0,m.jsxs)("div",{children:[(0,m.jsx)("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Color"}),(0,m.jsxs)("div",{className:"mly-mt-2 mly-flex mly-gap-1",children:[(0,m.jsx)(Ft,{variant:a,color:i,onChange:l=>{t.updateAttributes({buttonColor:l})}}),(0,m.jsx)(qt,{color:r,onChange:l=>{t.updateAttributes({textColor:l})}})]})]})]})]})]})})}function Ft(t){let{color:e,onChange:o,variant:n}=t;return(0,m.jsxs)(U,{children:[(0,m.jsx)(D,{asChild:!0,children:(0,m.jsx)(M,{variant:"ghost",className:"",size:"sm",type:"button",children:(0,m.jsx)("div",{className:"mly-h-4 mly-w-4 mly-rounded",style:{backgroundColor:n==="filled"?e:"transparent",borderStyle:"solid",borderWidth:n==="outline"?2:0,borderColor:e}})})}),(0,m.jsx)(H,{className:"mly-w-full !mly-p-0",children:(0,m.jsx)(he.ChromePicker,{className:"!mly-shadow-md",color:e,onChange:a=>{o(a.hex)}})})]})}function qt(t){let{color:e,onChange:o}=t;return(0,m.jsxs)(U,{children:[(0,m.jsx)(D,{asChild:!0,children:(0,m.jsx)(M,{variant:"ghost",size:"sm",type:"button",children:(0,m.jsxs)("div",{className:"mly-flex mly-flex-col mly-items-center mly-justify-center mly-gap-[1px]",children:[(0,m.jsx)("span",{className:"mly-font-bolder mly-font-mono mly-text-xs mly-text-slate-700",children:"A"}),(0,m.jsx)("div",{className:"mly-h-[2px] mly-w-3",style:{backgroundColor:e}})]})})}),(0,m.jsx)(H,{className:"mly-w-full !mly-p-0",children:(0,m.jsx)(he.ChromePicker,{className:"!mly-shadow-md",color:e,onChange:n=>{o(n.hex)}})})]})}var Je=["filled","outline"],Ye=["sharp","smooth","round"],Ze=Y.Node.create({name:"button",group:"block",atom:!0,draggable:!0,addAttributes(){return{mailyComponent:{default:"button"},text:{default:"Button"},url:{default:""},alignment:{default:"left"},variant:{default:"filled"},borderRadius:{default:"smooth"},buttonColor:{default:"rgb(0, 0, 0)"},textColor:{default:"rgb(255, 255, 255)"}}},parseHTML(){return[{tag:`a[data-maily-component="${this.name}"]`}]},renderHTML({HTMLAttributes:t}){return["a",(0,Y.mergeAttributes)({"data-maily-component":this.name},t)]},addCommands(){return{setButton:()=>({commands:t})=>t.insertContent({type:this.name,attrs:{mailyComponent:this.name}})}},addNodeView(){return(0,Qe.ReactNodeViewRenderer)(Xe)}});var Q=require("@tiptap/core"),we=Q.Node.create({name:"footer",group:"block",content:"inline*",addAttributes(){return{"maily-component":{default:"footer",renderHTML:t=>({"data-maily-component":t["maily-component"]}),parseHTML:t=>t==null?void 0:t.getAttribute("data-maily-component")}}},addCommands(){return{setFooter:()=>({commands:t})=>t.setNode(this.name)}},parseHTML(){return[{tag:'small[data-maily-component="footer"]'}]},renderHTML({HTMLAttributes:t}){return["small",(0,Q.mergeAttributes)(this.options.HTMLAttributes,t,{class:"footer mly-block mly-text-[13px] mly-text-slate-500"}),0]}});var P=require("react"),Z=require("@tiptap/react"),et=b(require("tippy.js")),tt=require("lucide-react");var v=require("react/jsx-runtime"),ot=(0,P.forwardRef)((t,e)=>{var s,i;let[o,n]=(0,P.useState)(0),a=r=>{let l=t.items[r];l&&t.command({id:l})};return(0,P.useEffect)(()=>n(0),[t.items]),(0,P.useImperativeHandle)(e,()=>({onKeyDown:({event:r})=>r.key==="ArrowUp"?(n((o+t.items.length-1)%t.items.length),!0):r.key==="ArrowDown"?(n((o+1)%t.items.length),!0):r.key==="Enter"?(a(o),!0):!1})),(0,v.jsx)("div",{className:"mly-z-50 mly-h-auto mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-p-1 mly-shadow-md mly-transition-all mly-min-w-[128px]",children:(s=t==null?void 0:t.items)!=null&&s.length?(i=t==null?void 0:t.items)==null?void 0:i.map((r,l)=>(0,v.jsx)("button",{onClick:()=>a(l),className:w("mly-flex mly-w-full mly-space-x-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100",l===o?"mly-bg-gray-200":"mly-bg-white"),children:r},l)):(0,v.jsx)("button",{className:"mly-flex mly-w-full mly-space-x-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100 mly-bg-white",children:"No result"})})});ot.displayName="VariableList";function rt(t=[]){return{items:({query:e})=>t.concat(e.length>0?[e]:[]).filter(o=>o.toLowerCase().startsWith(e.toLowerCase())).slice(0,5),render:()=>{let e,o=null;return{onStart:n=>{e=new Z.ReactRenderer(ot,{props:n,editor:n.editor}),n.clientRect&&(o=(0,et.default)("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(n){var a;e.updateProps(n),n.clientRect&&((a=o==null?void 0:o[0])==null||a.setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(n){var a;return n.event.key==="Escape"?(o==null||o[0].hide(),!0):(a=e.ref)==null?void 0:a.onKeyDown(n)},onExit(){!o||!(o!=null&&o[0])||!e||(o==null||o[0].destroy(),e.destroy())}}}}}function nt(t){let{node:e,selected:o,updateAttributes:n}=t,{id:a,fallback:s}=e.attrs,[i,r]=(0,P.useState)(!1);return(0,v.jsx)(Z.NodeViewWrapper,{className:w("react-component",o&&"ProseMirror-selectednode","mly-leading-none mly-inline-block"),draggable:"false",children:(0,v.jsxs)(U,{open:i,onOpenChange:r,children:[(0,v.jsx)(D,{children:(0,v.jsxs)("span",{tabIndex:-1,className:"mly-py-1 mly-px-2 mly-bg-rose-50 mly-border mly-border-rose-200 mly-text-rose-800 mly-rounded-md mly-leading-none mly-inline-flex mly-items-center mly-gap-1",children:[a,!s&&(0,v.jsx)(tt.AlertTriangle,{className:"mly-w-3 mly-shrink-0 mly-h-3 mly-stroke-[2.5]"})]})}),(0,v.jsxs)(H,{align:"start",className:"mly-space-y-2",onOpenAutoFocus:l=>l.preventDefault(),onCloseAutoFocus:l=>l.preventDefault(),children:[(0,v.jsxs)("label",{className:"mly-block mly-w-full mly-leading-none mly-space-y-1.5",children:[(0,v.jsx)("span",{className:"mly-leading-none mly-text-xs mly-font-normal",children:"Variable Name"}),(0,v.jsx)(E,{placeholder:"Add Variable Name",value:a,onChange:l=>{n({id:l.target.value})}})]}),(0,v.jsxs)("label",{className:"mly-block mly-w-full mly-leading-none mly-space-y-1.5",children:[(0,v.jsx)("span",{className:"mly-leading-none mly-text-xs mly-font-normal",children:"Fallback Value"}),(0,v.jsx)(E,{placeholder:"Fallback Value",value:s||"",onChange:l=>{n({fallback:l.target.value})}}),(0,v.jsx)("p",{className:"mly-text-xs mly-text-gray-500",children:"If the variable doesn't exist, this fallback value will be used."})]})]})]})})}var L=require("react"),lt=require("@tiptap/core"),at=require("@tiptap/react"),it=b(require("@tiptap/suggestion")),y=require("lucide-react"),st=b(require("tippy.js"));var c=require("react/jsx-runtime"),Wt=lt.Extension.create({name:"slash-command",addOptions(){return{suggestion:{char:"/",command:({editor:t,range:e,props:o})=>{o.command({editor:t,range:e})}}}},addProseMirrorPlugins(){return[(0,it.default)(d({editor:this.editor},this.options.suggestion))]}}),$t=({query:t})=>[{title:"Text",description:"Just start typing with plain text.",searchTerms:["p","paragraph"],icon:(0,c.jsx)(y.Text,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleNode("paragraph","paragraph").run()}},{title:"Heading 1",description:"Big section heading.",searchTerms:["title","big","large"],icon:(0,c.jsx)(y.Heading1,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setNode("heading",{level:1}).run()}},{title:"Heading 2",description:"Medium section heading.",searchTerms:["subtitle","medium"],icon:(0,c.jsx)(y.Heading2,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setNode("heading",{level:2}).run()}},{title:"Heading 3",description:"Small section heading.",searchTerms:["subtitle","small"],icon:(0,c.jsx)(y.Heading3,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setNode("heading",{level:3}).run()}},{title:"Bullet List",description:"Create a simple bullet list.",searchTerms:["unordered","point"],icon:(0,c.jsx)(y.List,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleBulletList().run()}},{title:"Numbered List",description:"Create a list with numbering.",searchTerms:["ordered"],icon:(0,c.jsx)(y.ListOrdered,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleOrderedList().run()}},{title:"Image",description:"Full width image",searchTerms:["image"],icon:(0,c.jsx)(y.ImageIcon,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{let n=prompt("Image URL: ")||"";n&&(e.chain().focus().deleteRange(o).run(),e.chain().focus().setImage({src:n}).run())}},{title:"Logo",description:"Add your brand logo",searchTerms:["image","logo"],icon:(0,c.jsx)(y.ImageIcon,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{let n=prompt("Logo URL: ")||"";n&&(e.chain().focus().deleteRange(o).run(),e.chain().focus().setLogoImage({src:n}).run())}},{title:"Spacer",description:"Add a spacer to the page. Useful for adding space between sections.",searchTerms:["space","gap","divider"],icon:(0,c.jsx)(y.MoveVertical,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setSpacer({height:"sm"}).run()}},{title:"Button",description:"Add a call to action button to the page.",searchTerms:["link","button","cta"],icon:(0,c.jsx)(y.MousePointer,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setButton().run()}},{title:"Hard Break",description:"Add a break between lines.",searchTerms:["break","line"],icon:(0,c.jsx)(y.DivideIcon,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setHardBreak().run()}},{title:"Blockquote",description:"Add blockquote.",searchTerms:["quote","blockquote"],icon:(0,c.jsx)(y.TextQuote,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleBlockquote().run()}},{title:"Footer",description:"Add a footer text to the page.",searchTerms:["footer","text"],icon:(0,c.jsx)(y.FootprintsIcon,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setFooter().run()}},{title:"Clear Line",description:"Clear the current line.",searchTerms:["clear","line"],icon:(0,c.jsx)(y.EraserIcon,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().selectParentNode().deleteSelection().run()}}].filter(e=>{if(typeof t=="string"&&t.length>0){let o=t.toLowerCase();return e.title.toLowerCase().includes(o)||e.description.toLowerCase().includes(o)||e.searchTerms&&e.searchTerms.some(n=>n.includes(o))}return!0}),Kt=(t,e)=>{let o=t.offsetHeight,n=e?e.offsetHeight:0,a=e.offsetTop,s=a+n;a<t.scrollTop?t.scrollTop-=t.scrollTop-a+5:s>o+t.scrollTop&&(t.scrollTop+=s-o-t.scrollTop+5)},_t=({items:t,command:e,editor:o})=>{let[n,a]=(0,L.useState)(0),s=(0,L.useCallback)(r=>{let l=t[r];l&&e(l)},[e,o,t]);(0,L.useEffect)(()=>{let r=["ArrowUp","ArrowDown","Enter"],l=p=>{if(r.includes(p.key))return p.preventDefault(),p.key==="ArrowUp"?(a((n+t.length-1)%t.length),!0):p.key==="ArrowDown"?(a((n+1)%t.length),!0):p.key==="Enter"?(s(n),!0):!1};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[t,n,a,s]),(0,L.useEffect)(()=>{a(0)},[t]);let i=(0,L.useRef)(null);return(0,L.useLayoutEffect)(()=>{let r=i==null?void 0:i.current,l=r==null?void 0:r.children[n];l&&r&&Kt(r,l)},[n]),t.length>0?(0,c.jsxs)("div",{className:"mly-z-50 mly-w-72 mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-shadow-md mly-transition-all",children:[(0,c.jsx)("div",{id:"slash-command",ref:i,className:"mly-no-scrollbar mly-h-auto mly-max-h-[330px] mly-overflow-y-auto mly-scroll-smooth mly-px-1 mly-py-2",children:t.map((r,l)=>(0,c.jsxs)("button",{className:w("mly-flex mly-w-full mly-items-center mly-space-x-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100 hover:mly-text-gray-900",l===n?"mly-bg-gray-100 mly-text-gray-900":"mly-bg-transparent"),onClick:()=>s(l),type:"button",children:[(0,c.jsx)("div",{className:"mly-flex mly-h-6 mly-w-6 mly-shrink-0 mly-items-center mly-justify-center",children:r.icon}),(0,c.jsxs)("div",{children:[(0,c.jsx)("p",{className:"mly-font-medium",children:r.title}),(0,c.jsx)("p",{className:"mly-text-xs mly-text-gray-400",children:r.description})]})]},l))}),(0,c.jsx)("div",{className:"mly-border-t mly-border-gray-200 mly-px-1 mly-py-3 mly-pl-4",children:(0,c.jsxs)("div",{className:"mly-flex mly-items-center",children:[(0,c.jsxs)("p",{className:"mly-text-center mly-text-xs mly-text-gray-400",children:[(0,c.jsx)("kbd",{className:"mly-rounded mly-border mly-p-1 mly-px-2 mly-font-medium",children:"\u2191"}),(0,c.jsx)("kbd",{className:"mly-ml-1 mly-rounded mly-border mly-p-1 mly-px-2 mly-font-medium",children:"\u2193"})," ","to navigate"]}),(0,c.jsx)("span",{"aria-hidden":"true",className:"mly-select-none mly-px-1",children:"\xB7"}),(0,c.jsxs)("p",{className:"mly-text-center mly-text-xs mly-text-gray-400",children:[(0,c.jsx)("kbd",{className:"mly-rounded mly-border mly-p-1 mly-px-1.5 mly-font-medium",children:"Enter"})," ","to select"]})]})})]}):null},Gt={items:$t,render:()=>{let t=null,e=null;return{onStart:o=>{t=new at.ReactRenderer(_t,{props:o,editor:o.editor}),e=(0,st.default)("body",{getReferenceClientRect:o.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual"})},onUpdate:o=>{t==null||t.updateProps(o),e&&e[0].setProps({getReferenceClientRect:o.clientRect})},onKeyDown:o=>{var n;return o.event.key==="Escape"?(e==null||e[0].hide(),!0):(n=t==null?void 0:t.ref)==null?void 0:n.onKeyDown(o)},onExit:()=>{!e||!(e!=null&&e[0])||!t||(e==null||e[0].destroy(),t==null||t.destroy())}}}},mt=Wt.configure({suggestion:Gt});var ee=require("@tiptap/core"),dt=require("@tiptap/pm/state"),ct=require("@tiptap/react"),pt=b(require("@tiptap/suggestion"));var jt=new dt.PluginKey("variable"),yt=ee.Node.create({name:"variable",group:"inline",inline:!0,selectable:!0,atom:!0,addOptions(){return{HTMLAttributes:{},renderLabel({options:t,node:e}){var o;return`${(o=e.attrs.label)!=null?o:e.attrs.id}`},suggestion:{char:"@",pluginKey:jt,command:({editor:t,range:e,props:o})=>{var s,i;let n=t.view.state.selection.$to.nodeAfter;((s=n==null?void 0:n.text)==null?void 0:s.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:this.name,attrs:o},{type:"text",text:" "}]).run(),(i=window.getSelection())==null||i.collapseToEnd()},allow:({state:t,range:e})=>{let o=t.doc.resolve(e.from),n=t.schema.nodes[this.name];return!!o.parent.type.contentMatch.matchType(n)}}}},addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}},fallback:{default:null,parseHTML:t=>t.getAttribute("data-fallback"),renderHTML:t=>t.fallback?{"data-fallback":t.fallback}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){return["span",(0,ee.mergeAttributes)({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t})]},renderText({node:t}){return this.options.renderLabel({options:this.options,node:t})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let o=!1,{selection:n}=e,{empty:a,anchor:s}=n;return a?(e.doc.nodesBetween(s-1,s,(i,r)=>{if(i.type.name===this.name)return o=!0,t.insertText(this.options.suggestion.char||"",r,r+i.nodeSize),!1}),o):!1})}},addProseMirrorPlugins(){return[(0,pt.default)(d({editor:this.editor},this.options.suggestion))]},addNodeView(){return(0,ct.ReactNodeViewRenderer)(nt)}});var te=require("@tiptap/react"),oe=require("react"),ut=b(require("@tiptap/extension-image"));var q=require("react"),gt=t=>{let e=(0,q.useRef)(null);return(0,q.useLayoutEffect)(()=>{e.current=t},[t]),(0,q.useCallback)((...o)=>{if(e.current===null)throw new Error("Handler is not assigned");return e.current(...o)},[])};var B=require("react/jsx-runtime"),Xt=60;function Jt(t){let{node:e,updateAttributes:o,selected:n}=t,a=(0,oe.useRef)(null),[s,i]=(0,oe.useState)(),r=gt(h=>{let A=document.querySelector(".ProseMirror-selectednode");if(!a.current||!A||!n)return;let C=A.offsetWidth;h.preventDefault();let N=h.currentTarget.dataset.direction||"--",ne=h.clientX,$=a.current.width,be=a.current.height,V=$,le=be,Nt=N[1]==="w"?-1:1,ae=()=>{window.removeEventListener("mousemove",xe),window.removeEventListener("mouseup",ae),o({width:V,height:le}),i(void 0)},xe=ve=>{if(V=Math.max($+Nt*(ve.clientX-ne),Xt),V>C&&(V=C),le=V/$*be,i({width:V,height:le}),!ve.buttons)return ae()};window.addEventListener("mousemove",xe),window.addEventListener("mouseup",ae)});function l(h){return(0,B.jsx)("div",{role:"button",tabIndex:0,onMouseDown:r,"data-direction":h,className:"mly-bg-rose-500",style:k(d(d({position:"absolute",height:"10px",width:"10px"},{n:{top:0},s:{bottom:0}}[h[0]]),{w:{left:0},e:{right:0}}[h[1]]),{cursor:`${h}-resize`})})}let{alignment:p="center",width:u,height:g}=e.attrs||{};return(0,B.jsxs)(te.NodeViewWrapper,{as:"div",draggable:!0,"data-drag-handle":!0,style:d(k(d({width:u,height:g},s),{overflow:"hidden",position:"relative",lineHeight:"0px",display:"block"}),{center:{marginLeft:"auto",marginRight:"auto"},left:{marginRight:"auto"},right:{marginLeft:"auto"}}[p]||{}),children:[(0,B.jsx)("img",k(d({},e.attrs),{ref:a,style:k(d({},s),{cursor:"default",marginBottom:0})})),n&&(0,B.jsxs)(B.Fragment,{children:[[{left:0,top:0,height:"100%",width:"1px"},{right:0,top:0,height:"100%",width:"1px"},{top:0,left:0,width:"100%",height:"1px"},{bottom:0,left:0,width:"100%",height:"1px"}].map((h,A)=>(0,B.jsx)("div",{className:"mly-bg-rose-500",style:d({position:"absolute"},h)},A)),l("nw"),l("ne"),l("sw"),l("se")]})]})}var ht=ut.default.extend({addAttributes(){var t;return k(d({},(t=this.parent)==null?void 0:t.call(this)),{width:{renderHTML:({width:e})=>({width:e})},height:{renderHTML:({height:e})=>({height:e})},alignment:{default:"center",renderHTML:({alignment:e})=>({"data-alignment":e}),parseHTML:e=>e.getAttribute("data-alignment")||"center"}})},addNodeView(){return(0,te.ReactNodeViewRenderer)(Jt)}});function Tt(t){let{variables:e}=t;return[wt.default.configure({heading:{levels:[1,2,3]},dropcursor:{color:"#555",width:3},code:{HTMLAttributes:{class:"mly-px-1 mly-py-0.5 mly-bg-[#efefef] mly-text-sm mly-rounded-md mly-tracking-normal mly-font-normal"}},horizontalRule:!1,blockquote:{HTMLAttributes:{class:"mly-not-prose mly-border-l-4 mly-border-gray-300 mly-pl-4 mly-mt-4 mly-mb-4"}}}),Lt.default,Re,ft.Color.configure({types:[fe.default.name,xt.default.name]}),fe.default.configure(),At.default.configure({types:[vt.default.name,Ct.default.name,we.name]}),$e,kt.default.configure({placeholder:({node:o})=>o.type.name==="heading"?`Heading ${o.attrs.level}`:"Write something or / to see commands",includeChildren:!0}),Ue,we,yt.configure({suggestion:rt(e)}),mt,bt.default.configure({HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow"},openOnClick:!1}),Ze,ht]}var z=require("react/jsx-runtime");function Yt(t){let{config:{wrapClassName:e="",contentClassName:o="",bodyClassName:n="",hasMenuBar:a=!0,spellCheck:s=!1,autofocus:i="end"}={},onCreate:r,onUpdate:l,extensions:p,contentHtml:u,contentJson:g,variables:h}=t,A=null;g?A=(g==null?void 0:g.type)==="doc"?g:{type:"doc",content:g}:u?A=u:A={type:"doc",content:[{type:"paragraph",content:[]}]};let C=(0,re.useEditor)({editorProps:{attributes:{class:w("mly-prose mly-w-full",o),spellCheck:s?"true":"false"},handleDOMEvents:{keydown:(N,ne)=>{if(["ArrowUp","ArrowDown","Enter"].includes(ne.key)&&document.querySelector("#slash-command"))return!0}}},onCreate:({editor:N})=>{r==null||r(N)},onUpdate:({editor:N})=>{l==null||l(N)},extensions:[...Tt({variables:h}),...p||[]],content:A,autofocus:i});return C?(0,z.jsxs)("div",{className:w("mly-editor mly-antialiased",e),children:[a&&(0,z.jsx)(He,{config:t.config,editor:C}),(0,z.jsxs)("div",{className:w("mly-mt-4 mly-rounded mly-border mly-bg-white mly-p-4",n),children:[(0,z.jsx)(Ee,{editor:C}),(0,z.jsx)(Oe,{editor:C}),(0,z.jsx)(Fe,{editor:C}),(0,z.jsx)(re.EditorContent,{editor:C})]})]}):null}0&&(module.exports={Editor});
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var Oe=Object.defineProperty,Ue=Object.defineProperties;var De=Object.getOwnPropertyDescriptors;var H=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable;var Q=(t,e,o)=>e in t?Oe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,m=(t,e)=>{for(var o in e||(e={}))Z.call(e,o)&&Q(t,o,e[o]);if(H)for(var o of H(e))ee.call(e,o)&&Q(t,o,e[o]);return t},w=(t,e)=>Ue(t,De(e));var P=(t,e)=>{var o={};for(var n in t)Z.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&H)for(var n of H(t))e.indexOf(n)<0&&ee.call(t,n)&&(o[n]=t[n]);return o};function T(t,{insertAt:e}={}){if(!t||typeof document=="undefined")return;let o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}T(`.mly-editor .mly-prose p:where([class~=text-sm]){font-size:16px}.mly-editor .mly-prose h1,.mly-editor .mly-prose h2,.mly-editor .mly-prose h3{margin-top:0;margin-bottom:12px}.mly-editor .mly-prose h1{font-size:36px}.mly-editor .mly-prose h2{font-size:30px}.mly-editor .mly-prose h3{font-size:24px}.mly-editor .mly-prose p{font-size:15px;margin-bottom:20px}.mly-editor .mly-prose h1+p,.mly-editor .mly-prose h2+p,.mly-editor .mly-prose h3+p,.mly-editor .mly-prose hr+p{margin-top:0}.mly-editor .mly-prose ol,.mly-editor .mly-prose ul{margin-top:0;margin-bottom:20px}.mly-editor .mly-prose li:not(:last-child){margin-bottom:8px}.mly-editor .mly-prose li>p{margin:0}.mly-editor .mly-prose img{margin-top:0;margin-bottom:32px}.mly-editor .mly-prose hr{margin-block:32px}.mly-editor .mly-prose .footer{display:block;font-size:13px;margin-bottom:20px;color:#64748b}.mly-editor .mly-prose .spacer+*{margin-top:0}.mly-editor .mly-prose p+.spacer{margin-top:-20px}.mly-editor .mly-prose blockquote+.spacer{margin-top:-16px}.mly-editor .mly-prose h1+.spacer,.mly-editor .mly-prose h2+.spacer,.mly-editor .mly-prose h3+.spacer{margin-top:-12px}.mly-editor .mly-prose ol+.spacer,.mly-editor .mly-prose ul+.spacer{margin-top:-20px}.mly-editor .mly-prose img+.spacer{margin-top:-32px}.mly-editor .mly-prose .node-button+.spacer,.mly-editor .mly-prose footer+.spacer{margin-top:-20px}.mly-editor .mly-prose .node-button{margin-top:0;margin-bottom:20px}.mly-editor .mly-prose .node-image{line-height:0;margin-top:0;margin-bottom:32px;outline:none}.mly-editor .mly-prose .node-image+.spacer{margin-top:-32px}.mly-editor .mly-prose code:before,.mly-editor .mly-prose code:after{content:none}.ProseMirror{position:relative;word-wrap:break-word;white-space:pre-wrap;white-space:break-spaces;font-variant-ligatures:none;font-feature-settings:"liga" 0}.ProseMirror:focus{outline:none}.ProseMirror .is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;color:#adb5bd;pointer-events:none;height:0}.ProseMirror .is-empty:before{content:attr(data-placeholder);float:left;color:#adb5bd;pointer-events:none;height:0}.ProseMirror-selectednode{outline:3px solid #555}.mly-no-scrollbar::-webkit-scrollbar{display:none}.mly-no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}
2
+ var Oe=Object.defineProperty,Ue=Object.defineProperties;var De=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable;var Q=(t,e,o)=>e in t?Oe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,m=(t,e)=>{for(var o in e||(e={}))Z.call(e,o)&&Q(t,o,e[o]);if(V)for(var o of V(e))ee.call(e,o)&&Q(t,o,e[o]);return t},w=(t,e)=>Ue(t,De(e));var P=(t,e)=>{var o={};for(var n in t)Z.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&V)for(var n of V(t))e.indexOf(n)<0&&ee.call(t,n)&&(o[n]=t[n]);return o};function T(t,{insertAt:e}={}){if(!t||typeof document=="undefined")return;let o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}T(`.mly-editor .mly-prose p:where([class~=text-sm]){font-size:16px}.mly-editor .mly-prose h1,.mly-editor .mly-prose h2,.mly-editor .mly-prose h3{margin-top:0;margin-bottom:12px}.mly-editor .mly-prose h1{font-size:36px}.mly-editor .mly-prose h2{font-size:30px}.mly-editor .mly-prose h3{font-size:24px}.mly-editor .mly-prose p{font-size:15px;margin-bottom:20px}.mly-editor .mly-prose h1+p,.mly-editor .mly-prose h2+p,.mly-editor .mly-prose h3+p,.mly-editor .mly-prose hr+p{margin-top:0}.mly-editor .mly-prose ol,.mly-editor .mly-prose ul{margin-top:0;margin-bottom:20px}.mly-editor .mly-prose li:not(:last-child){margin-bottom:8px}.mly-editor .mly-prose li>p{margin:0}.mly-editor .mly-prose img{margin-top:0;margin-bottom:32px}.mly-editor .mly-prose hr{margin-block:32px}.mly-editor .mly-prose .footer{display:block;font-size:13px;margin-bottom:20px;color:#64748b}.mly-editor .mly-prose .spacer+*{margin-top:0}.mly-editor .mly-prose p+.spacer{margin-top:-20px}.mly-editor .mly-prose blockquote+.spacer{margin-top:-16px}.mly-editor .mly-prose h1+.spacer,.mly-editor .mly-prose h2+.spacer,.mly-editor .mly-prose h3+.spacer{margin-top:-12px}.mly-editor .mly-prose ol+.spacer,.mly-editor .mly-prose ul+.spacer{margin-top:-20px}.mly-editor .mly-prose img+.spacer{margin-top:-32px}.mly-editor .mly-prose .node-button+.spacer,.mly-editor .mly-prose footer+.spacer{margin-top:-20px}.mly-editor .mly-prose .node-button{margin-top:0;margin-bottom:20px}.mly-editor .mly-prose .node-image{line-height:0;margin-top:0;margin-bottom:32px;outline:none}.mly-editor .mly-prose .node-image+.spacer{margin-top:-32px}.mly-editor .mly-prose code:before,.mly-editor .mly-prose code:after{content:none}.ProseMirror{position:relative;word-wrap:break-word;white-space:pre-wrap;white-space:break-spaces;font-variant-ligatures:none;font-feature-settings:"liga" 0}.ProseMirror:focus{outline:none}.ProseMirror .is-editor-empty:first-child:before{content:attr(data-placeholder);float:left;color:#adb5bd;pointer-events:none;height:0}.ProseMirror .is-empty:before{content:attr(data-placeholder);float:left;color:#adb5bd;pointer-events:none;height:0}.ProseMirror-selectednode{outline:3px solid #555}.mly-no-scrollbar::-webkit-scrollbar{display:none}.mly-no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}
3
3
  `);T(`:where(.mly-editor),:where(.mly-editor) :before,:where(.mly-editor) :after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:where(.mly-editor) :before,:where(.mly-editor) :after{--tw-content: ""}:where(.mly-editor) html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}:where(.mly-editor) body{margin:0;line-height:inherit}:where(.mly-editor) hr{height:0;color:inherit;border-top-width:1px}:where(.mly-editor) abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}:where(.mly-editor) h1,:where(.mly-editor) h2,:where(.mly-editor) h3,:where(.mly-editor) h4,:where(.mly-editor) h5,:where(.mly-editor) h6{font-size:inherit;font-weight:inherit}:where(.mly-editor) a{color:inherit;text-decoration:inherit}:where(.mly-editor) b,:where(.mly-editor) strong{font-weight:bolder}:where(.mly-editor) code,:where(.mly-editor) kbd,:where(.mly-editor) samp,:where(.mly-editor) pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}:where(.mly-editor) small{font-size:80%}:where(.mly-editor) sub,:where(.mly-editor) sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.mly-editor) sub{bottom:-.25em}:where(.mly-editor) sup{top:-.5em}:where(.mly-editor) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.mly-editor) button,:where(.mly-editor) input,:where(.mly-editor) optgroup,:where(.mly-editor) select,:where(.mly-editor) textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}:where(.mly-editor) button,:where(.mly-editor) select{text-transform:none}:where(.mly-editor) button,:where(.mly-editor) [type=button],:where(.mly-editor) [type=reset],:where(.mly-editor) [type=submit]{-webkit-appearance:button;background-image:none}:where(.mly-editor) :-moz-focusring{outline:auto}:where(.mly-editor) :-moz-ui-invalid{box-shadow:none}:where(.mly-editor) progress{vertical-align:baseline}:where(.mly-editor) ::-webkit-inner-spin-button,:where(.mly-editor) ::-webkit-outer-spin-button{height:auto}:where(.mly-editor) [type=search]{-webkit-appearance:textfield;outline-offset:-2px}:where(.mly-editor) ::-webkit-search-decoration{-webkit-appearance:none}:where(.mly-editor) ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(.mly-editor) summary{display:list-item}:where(.mly-editor) blockquote,:where(.mly-editor) dl,:where(.mly-editor) dd,:where(.mly-editor) h1,:where(.mly-editor) h2,:where(.mly-editor) h3,:where(.mly-editor) h4,:where(.mly-editor) h5,:where(.mly-editor) h6,:where(.mly-editor) hr,:where(.mly-editor) figure,:where(.mly-editor) p,:where(.mly-editor) pre{margin:0}:where(.mly-editor) fieldset{margin:0;padding:0}:where(.mly-editor) legend{padding:0}:where(.mly-editor) ol,:where(.mly-editor) ul,:where(.mly-editor) menu{list-style:none;margin:0;padding:0}:where(.mly-editor) dialog{padding:0}:where(.mly-editor) textarea{resize:vertical}:where(.mly-editor) input::-moz-placeholder,:where(.mly-editor) textarea::-moz-placeholder{opacity:1;color:#9ca3af}:where(.mly-editor) input::placeholder,:where(.mly-editor) textarea::placeholder{opacity:1;color:#9ca3af}:where(.mly-editor) button,:where(.mly-editor) [role=button]{cursor:pointer}:where(.mly-editor) :disabled{cursor:default}:where(.mly-editor) img,:where(.mly-editor) svg,:where(.mly-editor) video,:where(.mly-editor) canvas,:where(.mly-editor) audio,:where(.mly-editor) iframe,:where(.mly-editor) embed,:where(.mly-editor) object{display:block;vertical-align:middle}:where(.mly-editor) img,:where(.mly-editor) video{max-width:100%;height:auto}:where(.mly-editor) [hidden]{display:none}
4
- `);T('*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.mly-prose{color:var(--tw-prose-body);max-width:65ch}.mly-prose :where(p):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.mly-prose :where([class~=lead]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.mly-prose :where(a):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.mly-prose :where(strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.mly-prose :where(a strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(blockquote strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(thead th strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(ol):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.mly-prose :where(ol[type=A]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-alpha}.mly-prose :where(ol[type=a]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-alpha}.mly-prose :where(ol[type=A s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-alpha}.mly-prose :where(ol[type=a s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-alpha}.mly-prose :where(ol[type=I]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-roman}.mly-prose :where(ol[type=i]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-roman}.mly-prose :where(ol[type=I s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-roman}.mly-prose :where(ol[type=i s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-roman}.mly-prose :where(ol[type="1"]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:decimal}.mly-prose :where(ul):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.mly-prose :where(ol>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.mly-prose :where(ul>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *))::marker{color:var(--tw-prose-bullets)}.mly-prose :where(dt):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.mly-prose :where(hr):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.mly-prose :where(blockquote):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"\\201c""\\201d""\\2018""\\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.mly-prose :where(blockquote p:first-of-type):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):before{content:open-quote}.mly-prose :where(blockquote p:last-of-type):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):after{content:close-quote}.mly-prose :where(h1):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.mly-prose :where(h1 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:900;color:inherit}.mly-prose :where(h2):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.mly-prose :where(h2 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:800;color:inherit}.mly-prose :where(h3):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.mly-prose :where(h3 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:700;color:inherit}.mly-prose :where(h4):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.mly-prose :where(h4 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:700;color:inherit}.mly-prose :where(img):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:2em;margin-bottom:2em}.mly-prose :where(picture):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.mly-prose :where(kbd):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.mly-prose :where(code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.mly-prose :where(code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):before{content:"`"}.mly-prose :where(code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):after{content:"`"}.mly-prose :where(a code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(h1 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(h2 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit;font-size:.875em}.mly-prose :where(h3 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit;font-size:.9em}.mly-prose :where(h4 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(blockquote code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(thead th code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(pre):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.mly-prose :where(pre code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.mly-prose :where(pre code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):before{content:none}.mly-prose :where(pre code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):after{content:none}.mly-prose :where(table):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.mly-prose :where(thead):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.mly-prose :where(thead th):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.mly-prose :where(tbody tr):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.mly-prose :where(tbody tr:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-bottom-width:0}.mly-prose :where(tbody td):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){vertical-align:baseline}.mly-prose :where(tfoot):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.mly-prose :where(tfoot td):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){vertical-align:top}.mly-prose :where(figure>*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0;margin-bottom:0}.mly-prose :where(figcaption):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.mly-prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.mly-prose :where(picture>img):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0;margin-bottom:0}.mly-prose :where(video):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:2em;margin-bottom:2em}.mly-prose :where(li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.5em;margin-bottom:.5em}.mly-prose :where(ol>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:.375em}.mly-prose :where(ul>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:.375em}.mly-prose :where(.mly-prose>ul>li p):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.75em;margin-bottom:.75em}.mly-prose :where(.mly-prose>ul>li>*:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em}.mly-prose :where(.mly-prose>ul>li>*:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-bottom:1.25em}.mly-prose :where(.mly-prose>ol>li>*:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em}.mly-prose :where(.mly-prose>ol>li>*:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-bottom:1.25em}.mly-prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.75em;margin-bottom:.75em}.mly-prose :where(dl):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.mly-prose :where(dd):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.5em;padding-left:1.625em}.mly-prose :where(hr+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(h2+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(h3+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(h4+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(thead th:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:0}.mly-prose :where(thead th:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-right:0}.mly-prose :where(tbody td,tfoot td):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding:.5714286em}.mly-prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:0}.mly-prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-right:0}.mly-prose :where(figure):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:2em;margin-bottom:2em}.mly-prose :where(.mly-prose>:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(.mly-prose>:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-bottom:0}.mly-z-50{z-index:50}.mly-mb-4{margin-bottom:1rem}.mly-ml-1{margin-left:.25rem}.mly-mt-2{margin-top:.5rem}.mly-mt-4{margin-top:1rem}.mly-block{display:block}.mly-inline-block{display:inline-block}.mly-flex{display:flex}.mly-inline-flex{display:inline-flex}.mly-h-10{height:2.5rem}.mly-h-11{height:2.75rem}.mly-h-3{height:.75rem}.mly-h-3\\.5{height:.875rem}.mly-h-4{height:1rem}.mly-h-6{height:1.5rem}.mly-h-9{height:2.25rem}.mly-h-\\[2px\\]{height:2px}.mly-h-auto{height:auto}.mly-max-h-\\[330px\\]{max-height:330px}.mly-w-10{width:2.5rem}.mly-w-3{width:.75rem}.mly-w-3\\.5{width:.875rem}.mly-w-4{width:1rem}.mly-w-6{width:1.5rem}.mly-w-72{width:18rem}.mly-w-full{width:100%}.mly-min-w-\\[128px\\]{min-width:128px}.mly-shrink-0{flex-shrink:0}.mly-grow{flex-grow:1}.mly-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.mly-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mly-flex-col{flex-direction:column}.mly-items-center{align-items:center}.mly-justify-center{justify-content:center}.mly-gap-1{gap:.25rem}.mly-gap-3{gap:.75rem}.mly-gap-\\[1px\\]{gap:1px}.mly-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.mly-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.mly-space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.mly-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.mly-overflow-y-auto{overflow-y:auto}.mly-scroll-smooth{scroll-behavior:smooth}.\\!mly-rounded-full{border-radius:9999px!important}.\\!mly-rounded-md{border-radius:.375rem!important}.\\!mly-rounded-none{border-radius:0!important}.mly-rounded{border-radius:.25rem}.mly-rounded-md{border-radius:.375rem}.mly-border{border-width:1px}.mly-border-l-4{border-left-width:4px}.mly-border-t{border-top-width:1px}.mly-border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.mly-border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.mly-border-rose-200{--tw-border-opacity: 1;border-color:rgb(254 205 211 / var(--tw-border-opacity))}.mly-border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.mly-bg-\\[\\#efefef\\]{--tw-bg-opacity: 1;background-color:rgb(239 239 239 / var(--tw-bg-opacity))}.mly-bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.mly-bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.mly-bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.mly-bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.mly-bg-rose-50{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity))}.mly-bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.mly-bg-transparent{background-color:transparent}.mly-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.\\!mly-p-0{padding:0!important}.mly-p-1{padding:.25rem}.mly-p-4{padding:1rem}.mly-px-1{padding-left:.25rem;padding-right:.25rem}.mly-px-1\\.5{padding-left:.375rem;padding-right:.375rem}.mly-px-2{padding-left:.5rem;padding-right:.5rem}.mly-px-2\\.5{padding-left:.625rem;padding-right:.625rem}.mly-px-3{padding-left:.75rem;padding-right:.75rem}.mly-px-4{padding-left:1rem;padding-right:1rem}.mly-px-8{padding-left:2rem;padding-right:2rem}.mly-px-\\[32px\\]{padding-left:32px;padding-right:32px}.mly-py-0{padding-top:0;padding-bottom:0}.mly-py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.mly-py-1{padding-top:.25rem;padding-bottom:.25rem}.mly-py-2{padding-top:.5rem;padding-bottom:.5rem}.mly-py-3{padding-top:.75rem;padding-bottom:.75rem}.mly-py-\\[20px\\]{padding-top:20px;padding-bottom:20px}.mly-pl-4{padding-left:1rem}.mly-text-left{text-align:left}.mly-text-center{text-align:center}.mly-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.mly-text-\\[13px\\]{font-size:13px}.mly-text-sm{font-size:.875rem;line-height:1.25rem}.mly-text-xs{font-size:.75rem;line-height:1rem}.mly-font-medium{font-weight:500}.mly-font-normal{font-weight:400}.mly-font-semibold{font-weight:600}.mly-capitalize{text-transform:capitalize}.mly-leading-none{line-height:1}.mly-tracking-normal{letter-spacing:0em}.mly-text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.mly-text-gray-50{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.mly-text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.mly-text-rose-800{--tw-text-opacity: 1;color:rgb(159 18 57 / var(--tw-text-opacity))}.mly-text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.mly-text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.mly-text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.mly-text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.mly-no-underline{text-decoration-line:none}.mly-underline-offset-4{text-underline-offset:4px}.mly-antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.\\!mly-shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.mly-shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.mly-outline-none{outline:2px solid transparent;outline-offset:2px}.mly-ring-offset-white{--tw-ring-offset-color: #fff}.mly-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.mly-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.mly-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.mly-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.file\\:mly-border-0::file-selector-button{border-width:0px}.file\\:mly-bg-transparent::file-selector-button{background-color:transparent}.file\\:mly-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:mly-font-medium::file-selector-button{font-weight:500}.placeholder\\:mly-text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.placeholder\\:mly-text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\\:mly-bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\\:mly-bg-gray-100\\/80:hover{background-color:#f3f4f6cc}.hover\\:mly-bg-gray-900\\/90:hover{background-color:#111827e6}.hover\\:mly-bg-red-500\\/90:hover{background-color:#ef4444e6}.hover\\:mly-text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\\:mly-underline:hover{text-decoration-line:underline}.focus-visible\\:mly-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:mly-ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:mly-ring-gray-400:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus-visible\\:mly-ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\\:mly-pointer-events-none:disabled{pointer-events:none}.disabled\\:mly-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:mly-opacity-50:disabled{opacity:.5}.data-\\[state\\=true\\]\\:mly-bg-gray-100[data-state=true]{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.data-\\[state\\=true\\]\\:mly-text-gray-900[data-state=true]{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.data-\\[state\\=open\\]\\:mly-animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:mly-animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:mly-fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:mly-fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:mly-zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:mly-zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:mly-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:mly-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:mly-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:mly-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}\n');import{EditorContent as _o,useEditor as Go}from"@tiptap/react";import{BubbleMenu as Xe,isTextSelection as Je}from"@tiptap/react";import{AlignCenterIcon as Ye,AlignLeftIcon as Qe,AlignRightIcon as Ze,BoldIcon as et,CodeIcon as tt,ItalicIcon as ot,LinkIcon as rt,StrikethroughIcon as nt,UnderlineIcon as lt}from"lucide-react";import{mergeAttributes as Fe}from"@tiptap/core";import qe from"@tiptap/extension-image";var te=["sm","md","lg"],V=["left","center","right"],oe="left",q="sm";function We(t){let e={sm:"40px",md:"48px",lg:"64px"};return[`height:${e[t]||e[q]}`,`width:${e[t]||e[q]}`]}function $e(t){let e={left:["margin-right:auto","margin-left:0"],center:["margin-right:auto","margin-left:auto"],right:["margin-right:0","margin-left:auto"]};return e[t]||e[oe]}var re=qe.extend({name:"logo",priority:1e3,addAttributes(){var t;return w(m({},(t=this.parent)==null?void 0:t.call(this)),{"maily-component":{default:"logo",renderHTML:e=>({"data-maily-component":e["maily-component"]}),parseHTML:e=>e.getAttribute("data-maily-component")},size:{default:q,parseHTML:e=>e.getAttribute("data-size"),renderHTML:e=>({"data-size":e.size})},alignment:{default:oe,parseHTML:e=>e.getAttribute("data-alignment"),renderHTML:e=>({"data-alignment":e.alignment})}})},addCommands(){return{setLogoImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t}),setLogoAttributes:t=>({commands:e})=>e.updateAttributes("logo",t)}},renderHTML({HTMLAttributes:t,node:e}){let{size:o,alignment:n}=e.attrs,i=["position:relative","margin-top:0",...We(o),...$e(n)];return t.style=i.join(";"),["img",Fe(this.options.HTMLAttributes,t)]},parseHTML(){return[{tag:`img[data-maily-component="${this.name}"]`}]}});import*as ne from"react";import{Slot as Ge}from"@radix-ui/react-slot";import{clsx as Ke}from"clsx";import{twMerge as _e}from"tailwind-merge";function h(...t){return _e(Ke(t))}import{jsx as je}from"react/jsx-runtime";var A=ne.forwardRef((a,s)=>{var r=a,{className:t,variant:e="default",size:o="default",asChild:n=!1}=r,i=P(r,["className","variant","size","asChild"]);let l=n?Ge:"button",c="mly-inline-flex mly-items-center mly-justify-center mly-rounded-md mly-text-sm mly-font-medium mly-ring-offset-white mly-transition-colors focus-visible:mly-outline-none focus-visible:mly-ring-2 focus-visible:mly-ring-gray-400 focus-visible:mly-ring-offset-2 disabled:mly-pointer-events-none disabled:mly-opacity-50",g={default:"mly-bg-gray-900 mly-text-gray-50 hover:mly-bg-gray-900/90",destructive:"mly-bg-red-500 mly-text-gray-50 hover:mly-bg-red-500/90",outline:"mly-border mly-border-gray-200 mly-bg-white hover:mly-bg-gray-100 hover:mly-text-gray-900",secondary:"mly-bg-gray-100 mly-text-gray-900 hover:mly-bg-gray-100/80",ghost:"hover:mly-bg-gray-100 bg-transparent hover:mly-text-gray-900 data-[state=true]:mly-bg-gray-100 data-[state=true]:mly-text-gray-900",link:"mly-text-gray-900 mly-underline-offset-4 hover:mly-underline"},p={default:"mly-h-10 mly-px-4 mly-py-2",sm:"mly-h-9 mly-rounded-md mly-px-3",lg:"mly-h-11 mly-rounded-md mly-px-8",icon:"mly-h-10 mly-w-10"},u=h("mly-editor",c,g[e],p[o],t);return je(l,m({className:u,ref:s},i))});A.displayName="BaseButton";import{jsx as W}from"react/jsx-runtime";function L(t){return W(A,{variant:"ghost",size:"sm",onClick:t.command,"data-state":t.isActive(),className:h("mly-px-2.5"),type:"button",children:t.icon?W(t.icon,{className:h("mly-h-3.5 mly-w-3.5")}):W("span",{className:"mly-text-sm mly-font-medium mly-text-slate-600",children:t.name})})}import{jsx as le}from"react/jsx-runtime";function ie(t){let{editor:e}=t,o=[Qe,Ye,Ze],n=V.map((a,r)=>({name:a,isActive:()=>e==null?void 0:e.isActive({textAlign:a}),command:()=>{var l,c,g,p;(l=t==null?void 0:t.editor)!=null&&l.isActive({textAlign:a})?(g=(c=t==null?void 0:t.editor)==null?void 0:c.chain())==null||g.focus().unsetTextAlign().run():(p=t==null?void 0:t.editor)==null||p.chain().focus().setTextAlign(a).run()},icon:o[r]})),i=[{name:"bold",isActive:()=>e==null?void 0:e.isActive("bold"),command:()=>e==null?void 0:e.chain().focus().toggleBold().run(),icon:et},{name:"italic",isActive:()=>e==null?void 0:e.isActive("italic"),command:()=>e==null?void 0:e.chain().focus().toggleItalic().run(),icon:ot},{name:"underline",isActive:()=>e==null?void 0:e.isActive("underline"),command:()=>e==null?void 0:e.chain().focus().toggleUnderline().run(),icon:lt},{name:"strike",isActive:()=>e==null?void 0:e.isActive("strike"),command:()=>e==null?void 0:e.chain().focus().toggleStrike().run(),icon:nt},...n,{name:"code",isActive:()=>e==null?void 0:e.isActive("code"),command:()=>e==null?void 0:e.chain().focus().toggleCode().run(),icon:tt},{name:"link",command:()=>{let a=e==null?void 0:e.getAttributes("link").href,r=window.prompt("URL",a);if(r!==null){if(r===""){e==null||e.chain().focus().extendMarkRange("link").unsetLink().run();return}e==null||e.chain().focus().extendMarkRange("link").setLink({href:r}).run()}},isActive:()=>e==null?void 0:e.isActive("link"),icon:rt}],s=w(m({},t),{shouldShow:({editor:a,state:r,from:l,to:c})=>{let{doc:g,selection:p}=r,{empty:u}=p,f=!g.textBetween(l,c).length&&Je(r.selection);return!(u||f||!a.isEditable||a.isActive("image")||a.isActive("logo")||a.isActive("spacer")||a.isActive("variable")||a.isActive({mailyComponent:"button"}))},tippyOptions:{moveTransition:"mly-transform 0.15s mly-ease-out"}});return le(Xe,w(m({},s),{className:"mly-flex mly-gap-1 mly-rounded-md mly-border mly-border-slate-200 mly-bg-white mly-p-1 mly-shadow-md",children:i.map((a,r)=>le(L,m({},a),r))}))}import{useMemo as ae}from"react";import{AlignCenter as it,AlignLeft as at,AlignRight as st,BoldIcon as mt,EraserIcon as dt,ItalicIcon as ct,LinkIcon as pt,SeparatorHorizontal as yt,StrikethroughIcon as gt,UnderlineIcon as ut}from"lucide-react";import{jsx as $}from"react/jsx-runtime";var se=t=>{let{editor:e,config:o}=t,n=ae(()=>[{name:"bold",command:()=>e.chain().focus().toggleBold().run(),isActive:()=>e.isActive("bold"),group:"mark",icon:mt},{name:"italic",command:()=>e.chain().focus().toggleItalic().run(),isActive:()=>e.isActive("italic"),group:"mark",icon:ct},{name:"underline",command:()=>e.chain().focus().toggleUnderline().run(),isActive:()=>e.isActive("underline"),group:"mark",icon:ut},{name:"strike",command:()=>e.chain().focus().toggleStrike().run(),isActive:()=>e.isActive("strike"),group:"mark",icon:gt},{name:"delete-line",command:()=>e.chain().focus().selectParentNode().deleteSelection().run(),isActive:()=>!1,group:"mark",icon:dt},{name:"divider",command:()=>e.chain().focus().setHorizontalRule().run(),isActive:()=>e.isActive("horizontalRule"),group:"custom",icon:yt},{name:"link",command:()=>{let s=e.getAttributes("link").href,a=window.prompt("URL",s);if(a!==null){if(a===""){e.chain().focus().extendMarkRange("link").unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:a}).run()}},isActive:()=>e.isActive("link"),group:"custom",icon:pt},{name:"left",command:()=>e.chain().focus().setTextAlign("left").run(),isActive:()=>e.isActive({textAlign:"left"}),group:"alignment",icon:at},{name:"center",command:()=>e.chain().focus().setTextAlign("center").run(),isActive:()=>e.isActive({textAlign:"center"}),group:"alignment",icon:it},{name:"right",command:()=>e.chain().focus().setTextAlign("right").run(),isActive:()=>e.isActive({textAlign:"right"}),group:"alignment",icon:st}],[e]),i=ae(()=>n.reduce((s,a)=>(s.includes(a.group)||s.push(a.group),s),[]),[n]);return e?$("div",{className:`mly-flex mly-items-center mly-gap-3 ${o==null?void 0:o.toolbarClassName}`,children:i.map((s,a)=>$("div",{className:"mly-flex mly-items-center mly-gap-1 mly-rounded-md mly-border mly-bg-white mly-p-1",children:n.filter(r=>r.group===s).map((r,l)=>$(L,m({},r),l))},a))}):null};import{BubbleMenu as ht}from"@tiptap/react";import{AlignCenterIcon as wt,AlignLeftIcon as ft,AlignRightIcon as bt,Link as xt,Unlink as vt}from"lucide-react";import{jsx as me}from"react/jsx-runtime";function de(t){let{editor:e}=t,o=[ft,wt,bt],n=V.map((r,l)=>({name:r,isActive:()=>(e==null?void 0:e.isActive("logo",{alignment:r}))||(e==null?void 0:e.isActive("image",{alignment:r})),shouldShow:()=>(e==null?void 0:e.isActive("logo"))||(e==null?void 0:e.isActive("image")),command:()=>{var g,p;(e==null?void 0:e.isActive("logo"))?(g=t==null?void 0:t.editor)==null||g.chain().focus().setLogoAttributes({alignment:r}).run():(p=t==null?void 0:t.editor)==null||p.chain().focus().updateAttributes("image",{alignment:r}).run()},icon:o[l]})),i=te.map(r=>({name:r,isActive:()=>{var l;return(l=t==null?void 0:t.editor)==null?void 0:l.isActive("logo",{size:r})},shouldShow:()=>e==null?void 0:e.isActive("logo"),command:()=>{var l;(l=t==null?void 0:t.editor)==null||l.chain().focus().setLogoAttributes({size:r}).run()}})),s=[...n,{name:"url",isActive:()=>!1,shouldShow:()=>e==null?void 0:e.isActive("logo"),command:()=>{var f,b,k;let{editor:r}=t,l=(f=r==null?void 0:r.getAttributes("logo"))==null?void 0:f.src,c=window.prompt("Update logo URL",l);if(!c)return;let g=(b=r==null?void 0:r.getAttributes("logo"))==null?void 0:b.size,p=(k=r==null?void 0:r.getAttributes("logo"))==null?void 0:k.alignment,u=r==null?void 0:r.state.selection;r==null||r.commands.setLogoImage({src:c,size:g,alignment:p}),r==null||r.commands.setNodeSelection((u==null?void 0:u.from)||0)},icon:xt},{name:"image-url",isActive:()=>!1,shouldShow:()=>e==null?void 0:e.isActive("image"),command:()=>{var p;let{editor:r}=t,l=(p=r==null?void 0:r.getAttributes("image"))==null?void 0:p.src,c=window.prompt("Update Image URL",l);if(!c)return;let g=r==null?void 0:r.state.selection;r==null||r.commands.setImage({src:c}),r==null||r.commands.setNodeSelection((g==null?void 0:g.from)||0)},icon:vt},...i],a=w(m({},t),{shouldShow:({editor:r})=>r.isActive("logo")||r.isActive("image"),tippyOptions:{moveTransition:"mly-transform 0.15s mly-ease-out"}});return me(ht,w(m({},a),{className:"mly-flex mly-gap-1 mly-rounded-md mly-border mly-border-slate-200 mly-bg-white mly-p-1 mly-shadow-md",children:s.filter(r=>{var l;return(l=r.shouldShow)==null?void 0:l.call(r)}).map((r,l)=>me(L,m({},r),l))}))}import{BubbleMenu as Tt}from"@tiptap/react";import{mergeAttributes as kt,Node as At}from"@tiptap/core";var K=["sm","md","lg","xl"],Ct="sm";function Lt(t){let e={sm:"8px",md:"16px",lg:"32px",xl:"64px"};return`width: 100%; height: ${e[t]||e[Ct]}`}var ce=At.create({name:"spacer",priority:1e3,group:"block",draggable:!0,addAttributes(){return{height:{default:null,parseHTML:t=>t.getAttribute("data-height"),renderHTML:t=>({"data-height":t.height})}}},addCommands(){return{setSpacer:t=>({commands:e})=>e.insertContent({type:this.name,attrs:{height:t.height}}),setSpacerSize:t=>({commands:e})=>{if(!K.includes(t))throw new Error("Invalid spacer height");return e.updateAttributes("spacer",{height:t})},unsetSpacer:()=>({commands:t})=>t.deleteNode("spacer")}},renderHTML({HTMLAttributes:t,node:e}){let{height:o}=e.attrs;return t.style=Lt(o),["div",kt({"data-maily-component":this.name},this.options.HTMLAttributes,t,{class:"spacer relative z-50",contenteditable:!1})]},parseHTML(){return[{tag:`div[data-maily-component="${this.name}"]`}]}});import{jsx as pe}from"react/jsx-runtime";function ye(t){let{editor:e}=t,o=K.map(i=>({name:i,isActive:()=>e==null?void 0:e.isActive("spacer",{height:i}),command:()=>{e==null||e.chain().focus().setSpacer({height:i}).run()}})),n=w(m({},t),{shouldShow:({editor:i})=>i.isActive("spacer"),tippyOptions:{moveTransition:"mly-transform 0.15s mly-ease-out"}});return pe(Tt,w(m({},n),{className:"mly-flex mly-gap-1 mly-rounded-md mly-border mly-border-slate-200 mly-bg-white mly-p-1 mly-shadow-md",children:o.map((i,s)=>pe(L,m({},i),s))}))}import Vo from"@tiptap/starter-kit";import{Color as Oo}from"@tiptap/extension-color";import Uo from"@tiptap/extension-link";import Do from"@tiptap/extension-list-item";import Fo from"@tiptap/extension-paragraph";import qo from"@tiptap/extension-placeholder";import Wo from"@tiptap/extension-text-align";import Ie from"@tiptap/extension-text-style";import $o from"@tiptap/extension-heading";import Ko from"@tiptap/extension-underline";import{InputRule as Nt}from"@tiptap/core";import{HorizontalRule as Mt}from"@tiptap/extension-horizontal-rule";var ge=Mt.extend({addInputRules(){return[new Nt({find:/^(?:---|—-|___\s|\*\*\*\s)$/,handler:({state:t,range:e})=>{let o={},{tr:n}=t,i=e.from,s=e.to;n.insert(i-1,this.type.create(o)).delete(n.mapping.map(i),n.mapping.map(s))}})]}});import{mergeAttributes as Vt,Node as Ot}from"@tiptap/core";import{ReactNodeViewRenderer as Ut}from"@tiptap/react";import{NodeViewWrapper as Pt}from"@tiptap/react";import{AlignCenterIcon as Bt,AlignLeftIcon as zt,AlignRightIcon as St}from"lucide-react";import{ChromePicker as fe}from"react-color";import*as ue from"react";import{jsx as Rt}from"react/jsx-runtime";var N=ue.forwardRef((i,n)=>{var s=i,{className:t,type:e}=s,o=P(s,["className","type"]);return Rt("input",m({type:e,className:h("mly-flex mly-h-10 mly-w-full mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-px-3 mly-py-2 mly-text-sm mly-ring-offset-white file:mly-border-0 file:mly-bg-transparent file:mly-text-sm file:mly-font-medium placeholder:mly-text-gray-500 focus-visible:mly-outline-none focus-visible:mly-ring-2 focus-visible:mly-ring-gray-400 focus-visible:mly-ring-offset-2 disabled:mly-cursor-not-allowed disabled:mly-opacity-50","mly-editor",t),ref:n},o))});N.displayName="Input";import*as we from"react";import*as C from"@radix-ui/react-popover";import{jsx as he}from"react/jsx-runtime";var B=C.Root,z=C.Trigger,M=we.forwardRef((s,i)=>{var a=s,{className:t,align:e="center",sideOffset:o=4}=a,n=P(a,["className","align","sideOffset"]);return he(C.Portal,{children:he(C.Content,m({ref:i,align:e,sideOffset:o,className:h("mly-z-50 mly-w-72 mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-p-4 mly-shadow-md mly-outline-none data-[state=open]:mly-animate-in data-[state=closed]:mly-animate-out data-[state=closed]:mly-fade-out-0 data-[state=open]:mly-fade-in-0 data-[state=closed]:mly-zoom-out-95 data-[state=open]:mly-zoom-in-95 data-[side=bottom]:mly-slide-in-from-top-2 data-[side=left]:mly-slide-in-from-right-2 data-[side=right]:mly-slide-in-from-left-2 data-[side=top]:mly-slide-in-from-bottom-2 text-gray-950","mly-editor",t)},n))})});M.displayName=C.Content.displayName;import{jsx as d,jsxs as x}from"react/jsx-runtime";var It={left:zt,center:Bt,right:St},_={style(t){return xe.map(e=>({name:e,isActive:t.node.attrs.variant===e,onClick:()=>{t.updateAttributes({variant:e})}}))},cornerRadius(t){return ve.map(e=>({name:e,isActive:t.node.attrs.borderRadius===e,onClick:()=>{t.updateAttributes({borderRadius:e})}}))},alignment(t){return Object.entries(It).map(([e,o])=>({name:e,icon:o,isActive:t.node.attrs.alignment===e,onClick:()=>t.updateAttributes({alignment:e})}))}};function be(t){let{url:e,text:o,alignment:n,variant:i,borderRadius:s,buttonColor:a,textColor:r}=t.node.attrs;return d(Pt,{className:`react-component ${t.selected&&"ProseMirror-selectednode"}`,draggable:"true","data-drag-handle":"",style:{textAlign:n},children:x(B,{open:t.selected,children:[d(z,{asChild:!0,children:d("div",{children:d("a",{className:h("mly-inline-flex mly-items-center mly-justify-center mly-rounded-md mly-text-sm mly-font-medium mly-ring-offset-white mly-transition-colors disabled:mly-pointer-events-none disabled:mly-opacity-50","mly-h-10 mly-px-4 mly-py-2","mly-px-[32px] mly-py-[20px] mly-font-semibold mly-no-underline",{"!mly-rounded-full":s==="round","!mly-rounded-md":s==="smooth","!mly-rounded-none":s==="sharp"}),href:e,target:"_blank",rel:"noopener noreferrer",tabIndex:-1,style:{backgroundColor:i==="filled"?a:"transparent",color:r,borderWidth:2,borderStyle:"solid",borderColor:a},children:o})})}),x(M,{align:"end",className:"space-y-2",sideOffset:10,onOpenAutoFocus:l=>l.preventDefault(),onCloseAutoFocus:l=>l.preventDefault(),children:[d(N,{placeholder:"Add text here",value:o,onChange:l=>{t.updateAttributes({text:l.target.value})}}),d(N,{placeholder:"Add link here",value:e,onChange:l=>{t.updateAttributes({url:l.target.value})}}),x("div",{className:"mly-w-full mly-space-y-2",children:[d("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Style"}),d("div",{className:"mly-flex mly-gap-1",children:_.style(t).map((l,c)=>d(A,{"data-state":l.isActive?"true":"false",variant:"ghost",className:"mly-grow mly-font-normal mly-capitalize",size:"sm",onClick:l.onClick,type:"button",children:l.name},c))})]}),x("div",{className:"mly-w-full mly-space-y-2",children:[d("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Corner Radius"}),d("div",{className:"mly-flex mly-gap-1",children:_.cornerRadius(t).map((l,c)=>d(A,{"data-state":l.isActive?"true":"false",variant:"ghost",className:"mly-grow mly-font-normal mly-capitalize",size:"sm",onClick:l.onClick,type:"button",children:l.name},c))})]}),x("div",{className:"flex gap-2",children:[x("div",{children:[d("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Alignment"}),d("div",{className:"mly-mt-2 mly-flex mly-gap-1",children:_.alignment(t).map((l,c)=>d(A,{"data-state":l.isActive?"true":"false",variant:"ghost",className:"mly-grow",size:"sm",onClick:l.onClick,type:"button",children:d(l.icon,{size:16})},c))})]}),x("div",{children:[d("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Color"}),x("div",{className:"mly-mt-2 mly-flex mly-gap-1",children:[d(Et,{variant:i,color:a,onChange:l=>{t.updateAttributes({buttonColor:l})}}),d(Ht,{color:r,onChange:l=>{t.updateAttributes({textColor:l})}})]})]})]})]})]})})}function Et(t){let{color:e,onChange:o,variant:n}=t;return x(B,{children:[d(z,{asChild:!0,children:d(A,{variant:"ghost",className:"",size:"sm",type:"button",children:d("div",{className:"mly-h-4 mly-w-4 mly-rounded",style:{backgroundColor:n==="filled"?e:"transparent",borderStyle:"solid",borderWidth:n==="outline"?2:0,borderColor:e}})})}),d(M,{className:"mly-w-full !mly-p-0",children:d(fe,{className:"!mly-shadow-md",color:e,onChange:i=>{o(i.hex)}})})]})}function Ht(t){let{color:e,onChange:o}=t;return x(B,{children:[d(z,{asChild:!0,children:d(A,{variant:"ghost",size:"sm",type:"button",children:x("div",{className:"mly-flex mly-flex-col mly-items-center mly-justify-center mly-gap-[1px]",children:[d("span",{className:"mly-font-bolder mly-font-mono mly-text-xs mly-text-slate-700",children:"A"}),d("div",{className:"mly-h-[2px] mly-w-3",style:{backgroundColor:e}})]})})}),d(M,{className:"mly-w-full !mly-p-0",children:d(fe,{className:"!mly-shadow-md",color:e,onChange:n=>{o(n.hex)}})})]})}var xe=["filled","outline"],ve=["sharp","smooth","round"],ke=Ot.create({name:"button",group:"block",atom:!0,draggable:!0,addAttributes(){return{mailyComponent:{default:"button"},text:{default:"Button"},url:{default:""},alignment:{default:"left"},variant:{default:"filled"},borderRadius:{default:"smooth"},buttonColor:{default:"rgb(0, 0, 0)"},textColor:{default:"rgb(255, 255, 255)"}}},parseHTML(){return[{tag:`a[data-maily-component="${this.name}"]`}]},renderHTML({HTMLAttributes:t}){return["a",Vt({"data-maily-component":this.name},t)]},addCommands(){return{setButton:()=>({commands:t})=>t.insertContent({type:this.name,attrs:{mailyComponent:this.name}})}},addNodeView(){return Ut(be)}});import{mergeAttributes as Dt,Node as Ft}from"@tiptap/core";var G=Ft.create({name:"footer",group:"block",content:"inline*",addAttributes(){return{"maily-component":{default:"footer",renderHTML:t=>({"data-maily-component":t["maily-component"]}),parseHTML:t=>t==null?void 0:t.getAttribute("data-maily-component")}}},addCommands(){return{setFooter:()=>({commands:t})=>t.setNode(this.name)}},parseHTML(){return[{tag:'small[data-maily-component="footer"]'}]},renderHTML({HTMLAttributes:t}){return["small",Dt(this.options.HTMLAttributes,t,{class:"footer mly-block mly-text-[13px] mly-text-slate-500"}),0]}});import{forwardRef as qt,useEffect as Wt,useImperativeHandle as $t,useState as Ae}from"react";import{NodeViewWrapper as Kt,ReactRenderer as _t}from"@tiptap/react";import Gt from"tippy.js";import{jsx as v,jsxs as O}from"react/jsx-runtime";var Ce=qt((t,e)=>{var s,a;let[o,n]=Ae(0),i=r=>{let l=t.items[r];l&&t.command({id:l})};return Wt(()=>n(0),[t.items]),$t(e,()=>({onKeyDown:({event:r})=>r.key==="ArrowUp"?(n((o+t.items.length-1)%t.items.length),!0):r.key==="ArrowDown"?(n((o+1)%t.items.length),!0):r.key==="Enter"?(i(o),!0):!1})),v("div",{className:"mly-z-50 mly-h-auto mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-p-1 mly-shadow-md mly-transition-all mly-min-w-[128px]",children:(s=t==null?void 0:t.items)!=null&&s.length?(a=t==null?void 0:t.items)==null?void 0:a.map((r,l)=>v("button",{onClick:()=>i(l),className:h("mly-flex mly-w-full mly-space-x-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100",l===o?"mly-bg-gray-200":"mly-bg-white"),children:r},l)):v("button",{className:"mly-flex mly-w-full mly-space-x-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100 mly-bg-white",children:"No result"})})});Ce.displayName="VariableList";function Le(t=[]){return{items:({query:e})=>t.concat(e.length>0?[e]:[]).filter(o=>o.toLowerCase().startsWith(e.toLowerCase())).slice(0,5),render:()=>{let e,o=null;return{onStart:n=>{e=new _t(Ce,{props:n,editor:n.editor}),n.clientRect&&(o=Gt("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(n){var i;e.updateProps(n),n.clientRect&&((i=o==null?void 0:o[0])==null||i.setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(n){var i;return n.event.key==="Escape"?(o==null||o[0].hide(),!0):(i=e.ref)==null?void 0:i.onKeyDown(n)},onExit(){!o||!(o!=null&&o[0])||!e||(o==null||o[0].destroy(),e.destroy())}}}}}function Te(t){let{node:e,selected:o,updateAttributes:n}=t,{id:i,fallback:s}=e.attrs,[a,r]=Ae(!1);return v(Kt,{className:h("react-component",o&&"ProseMirror-selectednode","mly-leading-none mly-inline-block"),draggable:"false",children:O(B,{open:a,onOpenChange:r,children:[v(z,{asChild:!0,children:v("div",{tabIndex:-1,className:"mly-py-1 mly-px-2 mly-bg-rose-50 mly-border mly-border-rose-200 mly-text-rose-800 mly-rounded-md mly-leading-none",children:i})}),O(M,{align:"start",className:"mly-space-y-2",onOpenAutoFocus:l=>l.preventDefault(),onCloseAutoFocus:l=>l.preventDefault(),children:[O("label",{className:"mly-block mly-w-full mly-leading-none mly-space-y-1.5",children:[v("span",{className:"mly-leading-none mly-text-xs mly-font-normal",children:"Variable Name"}),v(N,{placeholder:"Add Variable Name",value:i,onChange:l=>{n({id:l.target.value})}})]}),O("label",{className:"mly-block mly-w-full mly-leading-none mly-space-y-1.5",children:[v("span",{className:"mly-leading-none mly-text-xs mly-font-normal",children:"Fallback Value"}),v(N,{placeholder:"Fallback Value",value:s||"",onChange:l=>{n({fallback:l.target.value})}})]})]})]})})}import{useCallback as jt,useEffect as Ne,useLayoutEffect as Xt,useRef as Jt,useState as Yt}from"react";import{Extension as Qt}from"@tiptap/core";import{ReactRenderer as Zt}from"@tiptap/react";import eo from"@tiptap/suggestion";import{DivideIcon as to,EraserIcon as oo,FootprintsIcon as ro,Heading1 as no,Heading2 as lo,Heading3 as io,ImageIcon as Me,List as ao,ListOrdered as so,MousePointer as mo,MoveVertical as co,Text as po,TextQuote as yo}from"lucide-react";import go from"tippy.js";import{jsx as y,jsxs as S}from"react/jsx-runtime";var uo=Qt.create({name:"slash-command",addOptions(){return{suggestion:{char:"/",command:({editor:t,range:e,props:o})=>{o.command({editor:t,range:e})}}}},addProseMirrorPlugins(){return[eo(m({editor:this.editor},this.options.suggestion))]}}),ho=({query:t})=>[{title:"Text",description:"Just start typing with plain text.",searchTerms:["p","paragraph"],icon:y(po,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleNode("paragraph","paragraph").run()}},{title:"Heading 1",description:"Big section heading.",searchTerms:["title","big","large"],icon:y(no,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setNode("heading",{level:1}).run()}},{title:"Heading 2",description:"Medium section heading.",searchTerms:["subtitle","medium"],icon:y(lo,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setNode("heading",{level:2}).run()}},{title:"Heading 3",description:"Small section heading.",searchTerms:["subtitle","small"],icon:y(io,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setNode("heading",{level:3}).run()}},{title:"Bullet List",description:"Create a simple bullet list.",searchTerms:["unordered","point"],icon:y(ao,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleBulletList().run()}},{title:"Numbered List",description:"Create a list with numbering.",searchTerms:["ordered"],icon:y(so,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleOrderedList().run()}},{title:"Image",description:"Full width image",searchTerms:["image"],icon:y(Me,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{let n=prompt("Image URL: ")||"";n&&(e.chain().focus().deleteRange(o).run(),e.chain().focus().setImage({src:n}).run())}},{title:"Logo",description:"Add your brand logo",searchTerms:["image","logo"],icon:y(Me,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{let n=prompt("Logo URL: ")||"";n&&(e.chain().focus().deleteRange(o).run(),e.chain().focus().setLogoImage({src:n}).run())}},{title:"Spacer",description:"Add a spacer to the page. Useful for adding space between sections.",searchTerms:["space","gap","divider"],icon:y(co,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setSpacer({height:"sm"}).run()}},{title:"Button",description:"Add a call to action button to the page.",searchTerms:["link","button","cta"],icon:y(mo,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setButton().run()}},{title:"Hard Break",description:"Add a break between lines.",searchTerms:["break","line"],icon:y(to,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setHardBreak().run()}},{title:"Blockquote",description:"Add blockquote.",searchTerms:["quote","blockquote"],icon:y(yo,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleBlockquote().run()}},{title:"Footer",description:"Add a footer text to the page.",searchTerms:["footer","text"],icon:y(ro,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setFooter().run()}},{title:"Clear Line",description:"Clear the current line.",searchTerms:["clear","line"],icon:y(oo,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().selectParentNode().deleteSelection().run()}}].filter(e=>{if(typeof t=="string"&&t.length>0){let o=t.toLowerCase();return e.title.toLowerCase().includes(o)||e.description.toLowerCase().includes(o)||e.searchTerms&&e.searchTerms.some(n=>n.includes(o))}return!0}),wo=(t,e)=>{let o=t.offsetHeight,n=e?e.offsetHeight:0,i=e.offsetTop,s=i+n;i<t.scrollTop?t.scrollTop-=t.scrollTop-i+5:s>o+t.scrollTop&&(t.scrollTop+=s-o-t.scrollTop+5)},fo=({items:t,command:e,editor:o})=>{let[n,i]=Yt(0),s=jt(r=>{let l=t[r];l&&e(l)},[e,o,t]);Ne(()=>{let r=["ArrowUp","ArrowDown","Enter"],l=c=>{if(r.includes(c.key))return c.preventDefault(),c.key==="ArrowUp"?(i((n+t.length-1)%t.length),!0):c.key==="ArrowDown"?(i((n+1)%t.length),!0):c.key==="Enter"?(s(n),!0):!1};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[t,n,i,s]),Ne(()=>{i(0)},[t]);let a=Jt(null);return Xt(()=>{let r=a==null?void 0:a.current,l=r==null?void 0:r.children[n];l&&r&&wo(r,l)},[n]),t.length>0?S("div",{className:"mly-z-50 mly-w-72 mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-shadow-md mly-transition-all",children:[y("div",{id:"slash-command",ref:a,className:"mly-no-scrollbar mly-h-auto mly-max-h-[330px] mly-overflow-y-auto mly-scroll-smooth mly-px-1 mly-py-2",children:t.map((r,l)=>S("button",{className:h("mly-flex mly-w-full mly-items-center mly-space-x-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100 hover:mly-text-gray-900",l===n?"mly-bg-gray-100 mly-text-gray-900":"mly-bg-transparent"),onClick:()=>s(l),type:"button",children:[y("div",{className:"mly-flex mly-h-6 mly-w-6 mly-shrink-0 mly-items-center mly-justify-center",children:r.icon}),S("div",{children:[y("p",{className:"mly-font-medium",children:r.title}),y("p",{className:"mly-text-xs mly-text-gray-400",children:r.description})]})]},l))}),y("div",{className:"mly-border-t mly-border-gray-200 mly-px-1 mly-py-3 mly-pl-4",children:S("div",{className:"mly-flex mly-items-center",children:[S("p",{className:"mly-text-center mly-text-xs mly-text-gray-400",children:[y("kbd",{className:"mly-rounded mly-border mly-p-1 mly-px-2 mly-font-medium",children:"\u2191"}),y("kbd",{className:"mly-ml-1 mly-rounded mly-border mly-p-1 mly-px-2 mly-font-medium",children:"\u2193"})," ","to navigate"]}),y("span",{"aria-hidden":"true",className:"mly-select-none mly-px-1",children:"\xB7"}),S("p",{className:"mly-text-center mly-text-xs mly-text-gray-400",children:[y("kbd",{className:"mly-rounded mly-border mly-p-1 mly-px-1.5 mly-font-medium",children:"Enter"})," ","to select"]})]})})]}):null},bo={items:ho,render:()=>{let t=null,e=null;return{onStart:o=>{t=new Zt(fo,{props:o,editor:o.editor}),e=go("body",{getReferenceClientRect:o.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual"})},onUpdate:o=>{t==null||t.updateProps(o),e&&e[0].setProps({getReferenceClientRect:o.clientRect})},onKeyDown:o=>{var n;return o.event.key==="Escape"?(e==null||e[0].hide(),!0):(n=t==null?void 0:t.ref)==null?void 0:n.onKeyDown(o)},onExit:()=>{!e||!(e!=null&&e[0])||!t||(e==null||e[0].destroy(),t==null||t.destroy())}}}},Re=uo.configure({suggestion:bo});import{mergeAttributes as xo,Node as vo}from"@tiptap/core";import{PluginKey as ko}from"@tiptap/pm/state";import{ReactNodeViewRenderer as Ao}from"@tiptap/react";import Co from"@tiptap/suggestion";var Lo=new ko("variable"),Pe=vo.create({name:"variable",group:"inline",inline:!0,selectable:!0,atom:!0,addOptions(){return{HTMLAttributes:{},renderLabel({options:t,node:e}){var o;return`${(o=e.attrs.label)!=null?o:e.attrs.id}`},suggestion:{char:"@",pluginKey:Lo,command:({editor:t,range:e,props:o})=>{var s,a;let n=t.view.state.selection.$to.nodeAfter;((s=n==null?void 0:n.text)==null?void 0:s.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:this.name,attrs:o},{type:"text",text:" "}]).run(),(a=window.getSelection())==null||a.collapseToEnd()},allow:({state:t,range:e})=>{let o=t.doc.resolve(e.from),n=t.schema.nodes[this.name];return!!o.parent.type.contentMatch.matchType(n)}}}},addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}},fallback:{default:null,parseHTML:t=>t.getAttribute("data-fallback"),renderHTML:t=>t.fallback?{"data-fallback":t.fallback}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){return["span",xo({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t})]},renderText({node:t}){return this.options.renderLabel({options:this.options,node:t})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let o=!1,{selection:n}=e,{empty:i,anchor:s}=n;return i?(e.doc.nodesBetween(s-1,s,(a,r)=>{if(a.type.name===this.name)return o=!0,t.insertText(this.options.suggestion.char||"",r,r+a.nodeSize),!1}),o):!1})}},addProseMirrorPlugins(){return[Co(m({editor:this.editor},this.options.suggestion))]},addNodeView(){return Ao(Te)}});import{NodeViewWrapper as Ro,ReactNodeViewRenderer as Po}from"@tiptap/react";import{useRef as Bo,useState as zo}from"react";import So from"@tiptap/extension-image";import{useCallback as To,useLayoutEffect as No,useRef as Mo}from"react";var Be=t=>{let e=Mo(null);return No(()=>{e.current=t},[t]),To((...o)=>{if(e.current===null)throw new Error("Handler is not assigned");return e.current(...o)},[])};import{Fragment as Ho,jsx as j,jsxs as ze}from"react/jsx-runtime";var Io=60;function Eo(t){let{node:e,updateAttributes:o,selected:n}=t,i=Bo(null),[s,a]=zo(),r=Be(u=>{let f=document.querySelector(".ProseMirror-selectednode");if(!i.current||!f||!n)return;let b=f.offsetWidth;u.preventDefault();let k=u.currentTarget.dataset.direction||"--",U=u.clientX,E=i.current.width,X=i.current.height,R=E,D=X,Ve=k[1]==="w"?-1:1,F=()=>{window.removeEventListener("mousemove",J),window.removeEventListener("mouseup",F),o({width:R,height:D}),a(void 0)},J=Y=>{if(R=Math.max(E+Ve*(Y.clientX-U),Io),R>b&&(R=b),D=R/E*X,a({width:R,height:D}),!Y.buttons)return F()};window.addEventListener("mousemove",J),window.addEventListener("mouseup",F)});function l(u){return j("div",{role:"button",tabIndex:0,onMouseDown:r,"data-direction":u,className:"mly-bg-rose-500",style:w(m(m({position:"absolute",height:"10px",width:"10px"},{n:{top:0},s:{bottom:0}}[u[0]]),{w:{left:0},e:{right:0}}[u[1]]),{cursor:`${u}-resize`})})}let{alignment:c="center",width:g,height:p}=e.attrs||{};return ze(Ro,{as:"div",draggable:!0,"data-drag-handle":!0,style:m(w(m({width:g,height:p},s),{overflow:"hidden",position:"relative",lineHeight:"0px",display:"block"}),{center:{marginLeft:"auto",marginRight:"auto"},left:{marginRight:"auto"},right:{marginLeft:"auto"}}[c]||{}),children:[j("img",w(m({},e.attrs),{ref:i,style:w(m({},s),{cursor:"default",marginBottom:0})})),n&&ze(Ho,{children:[[{left:0,top:0,height:"100%",width:"1px"},{right:0,top:0,height:"100%",width:"1px"},{top:0,left:0,width:"100%",height:"1px"},{bottom:0,left:0,width:"100%",height:"1px"}].map((u,f)=>j("div",{className:"mly-bg-rose-500",style:m({position:"absolute"},u)},f)),l("nw"),l("ne"),l("sw"),l("se")]})]})}var Se=So.extend({addAttributes(){var t;return w(m({},(t=this.parent)==null?void 0:t.call(this)),{width:{renderHTML:({width:e})=>({width:e})},height:{renderHTML:({height:e})=>({height:e})},alignment:{default:"center",renderHTML:({alignment:e})=>({"data-alignment":e}),parseHTML:e=>e.getAttribute("data-alignment")||"center"}})},addNodeView(){return Po(Eo)}});function Ee(t){let{variables:e}=t;return[Vo.configure({heading:{levels:[1,2,3]},dropcursor:{color:"#555",width:3},code:{HTMLAttributes:{class:"mly-px-1 mly-py-0.5 mly-bg-[#efefef] mly-text-sm mly-rounded-md mly-tracking-normal mly-font-normal"}},horizontalRule:!1,blockquote:{HTMLAttributes:{class:"mly-not-prose mly-border-l-4 mly-border-gray-300 mly-pl-4 mly-mt-4 mly-mb-4"}}}),Ko,re,Oo.configure({types:[Ie.name,Do.name]}),Ie.configure(),Wo.configure({types:[Fo.name,$o.name,G.name]}),ge,qo.configure({placeholder:({node:o})=>o.type.name==="heading"?`Heading ${o.attrs.level}`:"Write something or / to see commands",includeChildren:!0}),ce,G,Pe.configure({suggestion:Le(e)}),Re,Uo.configure({HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow"},openOnClick:!1}),ke,Se]}import{jsx as I,jsxs as He}from"react/jsx-runtime";function Ol(t){let{config:{wrapClassName:e="",contentClassName:o="",bodyClassName:n="",hasMenuBar:i=!0,spellCheck:s=!1,autofocus:a="end"}={},onCreate:r,onUpdate:l,extensions:c,contentHtml:g,contentJson:p,variables:u}=t,f=null;p?f=(p==null?void 0:p.type)==="doc"?p:{type:"doc",content:p}:g?f=g:f={type:"doc",content:[{type:"paragraph",content:[]}]};let b=Go({editorProps:{attributes:{class:h("mly-prose mly-w-full",o),spellCheck:s?"true":"false"},handleDOMEvents:{keydown:(k,U)=>{if(["ArrowUp","ArrowDown","Enter"].includes(U.key)&&document.querySelector("#slash-command"))return!0}}},onCreate:({editor:k})=>{r==null||r(k)},onUpdate:({editor:k})=>{l==null||l(k)},extensions:[...Ee({variables:u}),...c||[]],content:f,autofocus:a});return b?He("div",{className:h("mly-editor mly-antialiased",e),children:[i&&I(se,{config:t.config,editor:b}),He("div",{className:h("mly-mt-4 mly-rounded mly-border mly-bg-white mly-p-4",n),children:[I(ie,{editor:b}),I(de,{editor:b}),I(ye,{editor:b}),I(_o,{editor:b})]})]}):null}export{Ol as Editor};
4
+ `);T('*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.mly-prose{color:var(--tw-prose-body);max-width:65ch}.mly-prose :where(p):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.mly-prose :where([class~=lead]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.mly-prose :where(a):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.mly-prose :where(strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.mly-prose :where(a strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(blockquote strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(thead th strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(ol):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.mly-prose :where(ol[type=A]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-alpha}.mly-prose :where(ol[type=a]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-alpha}.mly-prose :where(ol[type=A s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-alpha}.mly-prose :where(ol[type=a s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-alpha}.mly-prose :where(ol[type=I]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-roman}.mly-prose :where(ol[type=i]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-roman}.mly-prose :where(ol[type=I s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:upper-roman}.mly-prose :where(ol[type=i s]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:lower-roman}.mly-prose :where(ol[type="1"]):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:decimal}.mly-prose :where(ul):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-left:1.625em}.mly-prose :where(ol>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.mly-prose :where(ul>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *))::marker{color:var(--tw-prose-bullets)}.mly-prose :where(dt):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.mly-prose :where(hr):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.mly-prose :where(blockquote):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-left-width:.25rem;border-left-color:var(--tw-prose-quote-borders);quotes:"\\201c""\\201d""\\2018""\\2019";margin-top:1.6em;margin-bottom:1.6em;padding-left:1em}.mly-prose :where(blockquote p:first-of-type):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):before{content:open-quote}.mly-prose :where(blockquote p:last-of-type):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):after{content:close-quote}.mly-prose :where(h1):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.mly-prose :where(h1 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:900;color:inherit}.mly-prose :where(h2):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.mly-prose :where(h2 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:800;color:inherit}.mly-prose :where(h3):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.mly-prose :where(h3 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:700;color:inherit}.mly-prose :where(h4):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.mly-prose :where(h4 strong):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:700;color:inherit}.mly-prose :where(img):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:2em;margin-bottom:2em}.mly-prose :where(picture):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.mly-prose :where(kbd):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding:.1875em .375em}.mly-prose :where(code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.mly-prose :where(code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):before{content:"`"}.mly-prose :where(code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):after{content:"`"}.mly-prose :where(a code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(h1 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(h2 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit;font-size:.875em}.mly-prose :where(h3 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit;font-size:.9em}.mly-prose :where(h4 code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(blockquote code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(thead th code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:inherit}.mly-prose :where(pre):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding:.8571429em 1.1428571em}.mly-prose :where(pre code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.mly-prose :where(pre code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):before{content:none}.mly-prose :where(pre code):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)):after{content:none}.mly-prose :where(table):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){width:100%;table-layout:auto;text-align:left;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.mly-prose :where(thead):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.mly-prose :where(thead th):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-right:.5714286em;padding-bottom:.5714286em;padding-left:.5714286em}.mly-prose :where(tbody tr):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.mly-prose :where(tbody tr:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-bottom-width:0}.mly-prose :where(tbody td):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){vertical-align:baseline}.mly-prose :where(tfoot):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.mly-prose :where(tfoot td):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){vertical-align:top}.mly-prose :where(figure>*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0;margin-bottom:0}.mly-prose :where(figcaption):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.mly-prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.mly-prose :where(picture>img):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0;margin-bottom:0}.mly-prose :where(video):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:2em;margin-bottom:2em}.mly-prose :where(li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.5em;margin-bottom:.5em}.mly-prose :where(ol>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:.375em}.mly-prose :where(ul>li):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:.375em}.mly-prose :where(.mly-prose>ul>li p):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.75em;margin-bottom:.75em}.mly-prose :where(.mly-prose>ul>li>*:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em}.mly-prose :where(.mly-prose>ul>li>*:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-bottom:1.25em}.mly-prose :where(.mly-prose>ol>li>*:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em}.mly-prose :where(.mly-prose>ol>li>*:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-bottom:1.25em}.mly-prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.75em;margin-bottom:.75em}.mly-prose :where(dl):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.mly-prose :where(dd):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:.5em;padding-left:1.625em}.mly-prose :where(hr+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(h2+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(h3+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(h4+*):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(thead th:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:0}.mly-prose :where(thead th:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-right:0}.mly-prose :where(tbody td,tfoot td):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding:.5714286em}.mly-prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-left:0}.mly-prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){padding-right:0}.mly-prose :where(figure):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:2em;margin-bottom:2em}.mly-prose :where(.mly-prose>:first-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-top:0}.mly-prose :where(.mly-prose>:last-child):not(:where([class~=mly-not-prose],[class~=mly-not-prose] *)){margin-bottom:0}.mly-z-50{z-index:50}.mly-mb-4{margin-bottom:1rem}.mly-ml-1{margin-left:.25rem}.mly-mt-2{margin-top:.5rem}.mly-mt-4{margin-top:1rem}.mly-block{display:block}.mly-inline-block{display:inline-block}.mly-flex{display:flex}.mly-inline-flex{display:inline-flex}.mly-h-10{height:2.5rem}.mly-h-11{height:2.75rem}.mly-h-3{height:.75rem}.mly-h-3\\.5{height:.875rem}.mly-h-4{height:1rem}.mly-h-6{height:1.5rem}.mly-h-9{height:2.25rem}.mly-h-\\[2px\\]{height:2px}.mly-h-auto{height:auto}.mly-max-h-\\[330px\\]{max-height:330px}.mly-w-10{width:2.5rem}.mly-w-3{width:.75rem}.mly-w-3\\.5{width:.875rem}.mly-w-4{width:1rem}.mly-w-6{width:1.5rem}.mly-w-72{width:18rem}.mly-w-full{width:100%}.mly-min-w-\\[128px\\]{min-width:128px}.mly-shrink-0{flex-shrink:0}.mly-grow{flex-grow:1}.mly-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.mly-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mly-flex-col{flex-direction:column}.mly-items-center{align-items:center}.mly-justify-center{justify-content:center}.mly-gap-1{gap:.25rem}.mly-gap-3{gap:.75rem}.mly-gap-\\[1px\\]{gap:1px}.mly-space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.mly-space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.mly-space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.mly-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.mly-overflow-y-auto{overflow-y:auto}.mly-scroll-smooth{scroll-behavior:smooth}.\\!mly-rounded-full{border-radius:9999px!important}.\\!mly-rounded-md{border-radius:.375rem!important}.\\!mly-rounded-none{border-radius:0!important}.mly-rounded{border-radius:.25rem}.mly-rounded-md{border-radius:.375rem}.mly-border{border-width:1px}.mly-border-l-4{border-left-width:4px}.mly-border-t{border-top-width:1px}.mly-border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.mly-border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.mly-border-rose-200{--tw-border-opacity: 1;border-color:rgb(254 205 211 / var(--tw-border-opacity))}.mly-border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.mly-bg-\\[\\#efefef\\]{--tw-bg-opacity: 1;background-color:rgb(239 239 239 / var(--tw-bg-opacity))}.mly-bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.mly-bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.mly-bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.mly-bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.mly-bg-rose-50{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity))}.mly-bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.mly-bg-transparent{background-color:transparent}.mly-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.mly-stroke-\\[2\\.5\\]{stroke-width:2.5}.\\!mly-p-0{padding:0!important}.mly-p-1{padding:.25rem}.mly-p-4{padding:1rem}.mly-px-1{padding-left:.25rem;padding-right:.25rem}.mly-px-1\\.5{padding-left:.375rem;padding-right:.375rem}.mly-px-2{padding-left:.5rem;padding-right:.5rem}.mly-px-2\\.5{padding-left:.625rem;padding-right:.625rem}.mly-px-3{padding-left:.75rem;padding-right:.75rem}.mly-px-4{padding-left:1rem;padding-right:1rem}.mly-px-8{padding-left:2rem;padding-right:2rem}.mly-px-\\[32px\\]{padding-left:32px;padding-right:32px}.mly-py-0{padding-top:0;padding-bottom:0}.mly-py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.mly-py-1{padding-top:.25rem;padding-bottom:.25rem}.mly-py-2{padding-top:.5rem;padding-bottom:.5rem}.mly-py-3{padding-top:.75rem;padding-bottom:.75rem}.mly-py-\\[20px\\]{padding-top:20px;padding-bottom:20px}.mly-pl-4{padding-left:1rem}.mly-text-left{text-align:left}.mly-text-center{text-align:center}.mly-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.mly-text-\\[13px\\]{font-size:13px}.mly-text-sm{font-size:.875rem;line-height:1.25rem}.mly-text-xs{font-size:.75rem;line-height:1rem}.mly-font-medium{font-weight:500}.mly-font-normal{font-weight:400}.mly-font-semibold{font-weight:600}.mly-capitalize{text-transform:capitalize}.mly-leading-none{line-height:1}.mly-tracking-normal{letter-spacing:0em}.mly-text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.mly-text-gray-50{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity))}.mly-text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.mly-text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.mly-text-rose-800{--tw-text-opacity: 1;color:rgb(159 18 57 / var(--tw-text-opacity))}.mly-text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.mly-text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.mly-text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.mly-text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity))}.mly-no-underline{text-decoration-line:none}.mly-underline-offset-4{text-underline-offset:4px}.mly-antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.\\!mly-shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.mly-shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.mly-outline-none{outline:2px solid transparent;outline-offset:2px}.mly-ring-offset-white{--tw-ring-offset-color: #fff}.mly-transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.mly-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.mly-ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.mly-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.file\\:mly-border-0::file-selector-button{border-width:0px}.file\\:mly-bg-transparent::file-selector-button{background-color:transparent}.file\\:mly-text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:mly-font-medium::file-selector-button{font-weight:500}.placeholder\\:mly-text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.placeholder\\:mly-text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.hover\\:mly-bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\\:mly-bg-gray-100\\/80:hover{background-color:#f3f4f6cc}.hover\\:mly-bg-gray-900\\/90:hover{background-color:#111827e6}.hover\\:mly-bg-red-500\\/90:hover{background-color:#ef4444e6}.hover\\:mly-text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.hover\\:mly-underline:hover{text-decoration-line:underline}.focus-visible\\:mly-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:mly-ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:mly-ring-gray-400:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity))}.focus-visible\\:mly-ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\\:mly-pointer-events-none:disabled{pointer-events:none}.disabled\\:mly-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:mly-opacity-50:disabled{opacity:.5}.data-\\[state\\=true\\]\\:mly-bg-gray-100[data-state=true]{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.data-\\[state\\=true\\]\\:mly-text-gray-900[data-state=true]{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.data-\\[state\\=open\\]\\:mly-animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:mly-animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:mly-fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:mly-fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:mly-zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:mly-zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:mly-slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:mly-slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:mly-slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:mly-slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}\n');import{EditorContent as Go,useEditor as jo}from"@tiptap/react";import{BubbleMenu as Xe,isTextSelection as Je}from"@tiptap/react";import{AlignCenterIcon as Ye,AlignLeftIcon as Qe,AlignRightIcon as Ze,BoldIcon as et,CodeIcon as tt,ItalicIcon as ot,LinkIcon as rt,StrikethroughIcon as nt,UnderlineIcon as lt}from"lucide-react";import{mergeAttributes as Fe}from"@tiptap/core";import qe from"@tiptap/extension-image";var te=["sm","md","lg"],O=["left","center","right"],oe="left",q="sm";function We(t){let e={sm:"40px",md:"48px",lg:"64px"};return[`height:${e[t]||e[q]}`,`width:${e[t]||e[q]}`]}function $e(t){let e={left:["margin-right:auto","margin-left:0"],center:["margin-right:auto","margin-left:auto"],right:["margin-right:0","margin-left:auto"]};return e[t]||e[oe]}var re=qe.extend({name:"logo",priority:1e3,addAttributes(){var t;return w(m({},(t=this.parent)==null?void 0:t.call(this)),{"maily-component":{default:"logo",renderHTML:e=>({"data-maily-component":e["maily-component"]}),parseHTML:e=>e.getAttribute("data-maily-component")},size:{default:q,parseHTML:e=>e.getAttribute("data-size"),renderHTML:e=>({"data-size":e.size})},alignment:{default:oe,parseHTML:e=>e.getAttribute("data-alignment"),renderHTML:e=>({"data-alignment":e.alignment})}})},addCommands(){return{setLogoImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t}),setLogoAttributes:t=>({commands:e})=>e.updateAttributes("logo",t)}},renderHTML({HTMLAttributes:t,node:e}){let{size:o,alignment:n}=e.attrs,a=["position:relative","margin-top:0",...We(o),...$e(n)];return t.style=a.join(";"),["img",Fe(this.options.HTMLAttributes,t)]},parseHTML(){return[{tag:`img[data-maily-component="${this.name}"]`}]}});import*as ne from"react";import{Slot as Ge}from"@radix-ui/react-slot";import{clsx as Ke}from"clsx";import{twMerge as _e}from"tailwind-merge";function h(...t){return _e(Ke(t))}import{jsx as je}from"react/jsx-runtime";var A=ne.forwardRef((i,s)=>{var r=i,{className:t,variant:e="default",size:o="default",asChild:n=!1}=r,a=P(r,["className","variant","size","asChild"]);let l=n?Ge:"button",c="mly-inline-flex mly-items-center mly-justify-center mly-rounded-md mly-text-sm mly-font-medium mly-ring-offset-white mly-transition-colors focus-visible:mly-outline-none focus-visible:mly-ring-2 focus-visible:mly-ring-gray-400 focus-visible:mly-ring-offset-2 disabled:mly-pointer-events-none disabled:mly-opacity-50",g={default:"mly-bg-gray-900 mly-text-gray-50 hover:mly-bg-gray-900/90",destructive:"mly-bg-red-500 mly-text-gray-50 hover:mly-bg-red-500/90",outline:"mly-border mly-border-gray-200 mly-bg-white hover:mly-bg-gray-100 hover:mly-text-gray-900",secondary:"mly-bg-gray-100 mly-text-gray-900 hover:mly-bg-gray-100/80",ghost:"hover:mly-bg-gray-100 bg-transparent hover:mly-text-gray-900 data-[state=true]:mly-bg-gray-100 data-[state=true]:mly-text-gray-900",link:"mly-text-gray-900 mly-underline-offset-4 hover:mly-underline"},p={default:"mly-h-10 mly-px-4 mly-py-2",sm:"mly-h-9 mly-rounded-md mly-px-3",lg:"mly-h-11 mly-rounded-md mly-px-8",icon:"mly-h-10 mly-w-10"},u=h("mly-editor",c,g[e],p[o],t);return je(l,m({className:u,ref:s},a))});A.displayName="BaseButton";import{jsx as W}from"react/jsx-runtime";function L(t){return W(A,{variant:"ghost",size:"sm",onClick:t.command,"data-state":t.isActive(),className:h("mly-px-2.5"),type:"button",children:t.icon?W(t.icon,{className:h("mly-h-3.5 mly-w-3.5")}):W("span",{className:"mly-text-sm mly-font-medium mly-text-slate-600",children:t.name})})}import{jsx as le}from"react/jsx-runtime";function ae(t){let{editor:e}=t,o=[Qe,Ye,Ze],n=O.map((i,r)=>({name:i,isActive:()=>e==null?void 0:e.isActive({textAlign:i}),command:()=>{var l,c,g,p;(l=t==null?void 0:t.editor)!=null&&l.isActive({textAlign:i})?(g=(c=t==null?void 0:t.editor)==null?void 0:c.chain())==null||g.focus().unsetTextAlign().run():(p=t==null?void 0:t.editor)==null||p.chain().focus().setTextAlign(i).run()},icon:o[r]})),a=[{name:"bold",isActive:()=>e==null?void 0:e.isActive("bold"),command:()=>e==null?void 0:e.chain().focus().toggleBold().run(),icon:et},{name:"italic",isActive:()=>e==null?void 0:e.isActive("italic"),command:()=>e==null?void 0:e.chain().focus().toggleItalic().run(),icon:ot},{name:"underline",isActive:()=>e==null?void 0:e.isActive("underline"),command:()=>e==null?void 0:e.chain().focus().toggleUnderline().run(),icon:lt},{name:"strike",isActive:()=>e==null?void 0:e.isActive("strike"),command:()=>e==null?void 0:e.chain().focus().toggleStrike().run(),icon:nt},...n,{name:"code",isActive:()=>e==null?void 0:e.isActive("code"),command:()=>e==null?void 0:e.chain().focus().toggleCode().run(),icon:tt},{name:"link",command:()=>{let i=e==null?void 0:e.getAttributes("link").href,r=window.prompt("URL",i);if(r!==null){if(r===""){e==null||e.chain().focus().extendMarkRange("link").unsetLink().run();return}e==null||e.chain().focus().extendMarkRange("link").setLink({href:r}).run()}},isActive:()=>e==null?void 0:e.isActive("link"),icon:rt}],s=w(m({},t),{shouldShow:({editor:i,state:r,from:l,to:c})=>{let{doc:g,selection:p}=r,{empty:u}=p,f=!g.textBetween(l,c).length&&Je(r.selection);return!(u||f||!i.isEditable||i.isActive("image")||i.isActive("logo")||i.isActive("spacer")||i.isActive("variable")||i.isActive({mailyComponent:"button"}))},tippyOptions:{maxWidth:"100%",moveTransition:"mly-transform 0.15s mly-ease-out"}});return le(Xe,w(m({},s),{className:"mly-flex mly-gap-1 mly-rounded-md mly-border mly-border-slate-200 mly-bg-white mly-p-1 mly-shadow-md",children:a.map((i,r)=>le(L,m({},i),r))}))}import{useMemo as ie}from"react";import{AlignCenter as at,AlignLeft as it,AlignRight as st,BoldIcon as mt,EraserIcon as dt,ItalicIcon as ct,LinkIcon as pt,SeparatorHorizontal as yt,StrikethroughIcon as gt,UnderlineIcon as ut}from"lucide-react";import{jsx as $}from"react/jsx-runtime";var se=t=>{let{editor:e,config:o}=t,n=ie(()=>[{name:"bold",command:()=>e.chain().focus().toggleBold().run(),isActive:()=>e.isActive("bold"),group:"mark",icon:mt},{name:"italic",command:()=>e.chain().focus().toggleItalic().run(),isActive:()=>e.isActive("italic"),group:"mark",icon:ct},{name:"underline",command:()=>e.chain().focus().toggleUnderline().run(),isActive:()=>e.isActive("underline"),group:"mark",icon:ut},{name:"strike",command:()=>e.chain().focus().toggleStrike().run(),isActive:()=>e.isActive("strike"),group:"mark",icon:gt},{name:"delete-line",command:()=>e.chain().focus().selectParentNode().deleteSelection().run(),isActive:()=>!1,group:"mark",icon:dt},{name:"divider",command:()=>e.chain().focus().setHorizontalRule().run(),isActive:()=>e.isActive("horizontalRule"),group:"custom",icon:yt},{name:"link",command:()=>{let s=e.getAttributes("link").href,i=window.prompt("URL",s);if(i!==null){if(i===""){e.chain().focus().extendMarkRange("link").unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:i}).run()}},isActive:()=>e.isActive("link"),group:"custom",icon:pt},{name:"left",command:()=>e.chain().focus().setTextAlign("left").run(),isActive:()=>e.isActive({textAlign:"left"}),group:"alignment",icon:it},{name:"center",command:()=>e.chain().focus().setTextAlign("center").run(),isActive:()=>e.isActive({textAlign:"center"}),group:"alignment",icon:at},{name:"right",command:()=>e.chain().focus().setTextAlign("right").run(),isActive:()=>e.isActive({textAlign:"right"}),group:"alignment",icon:st}],[e]),a=ie(()=>n.reduce((s,i)=>(s.includes(i.group)||s.push(i.group),s),[]),[n]);return e?$("div",{className:`mly-flex mly-items-center mly-gap-3 ${o==null?void 0:o.toolbarClassName}`,children:a.map((s,i)=>$("div",{className:"mly-flex mly-items-center mly-gap-1 mly-rounded-md mly-border mly-bg-white mly-p-1",children:n.filter(r=>r.group===s).map((r,l)=>$(L,m({},r),l))},i))}):null};import{BubbleMenu as ht}from"@tiptap/react";import{AlignCenterIcon as wt,AlignLeftIcon as ft,AlignRightIcon as bt,Link as xt,Unlink as vt}from"lucide-react";import{jsx as me}from"react/jsx-runtime";function de(t){let{editor:e}=t,o=[ft,wt,bt],n=O.map((r,l)=>({name:r,isActive:()=>(e==null?void 0:e.isActive("logo",{alignment:r}))||(e==null?void 0:e.isActive("image",{alignment:r})),shouldShow:()=>(e==null?void 0:e.isActive("logo"))||(e==null?void 0:e.isActive("image")),command:()=>{var g,p;(e==null?void 0:e.isActive("logo"))?(g=t==null?void 0:t.editor)==null||g.chain().focus().setLogoAttributes({alignment:r}).run():(p=t==null?void 0:t.editor)==null||p.chain().focus().updateAttributes("image",{alignment:r}).run()},icon:o[l]})),a=te.map(r=>({name:r,isActive:()=>{var l;return(l=t==null?void 0:t.editor)==null?void 0:l.isActive("logo",{size:r})},shouldShow:()=>e==null?void 0:e.isActive("logo"),command:()=>{var l;(l=t==null?void 0:t.editor)==null||l.chain().focus().setLogoAttributes({size:r}).run()}})),s=[...n,{name:"url",isActive:()=>!1,shouldShow:()=>e==null?void 0:e.isActive("logo"),command:()=>{var f,b,k;let{editor:r}=t,l=(f=r==null?void 0:r.getAttributes("logo"))==null?void 0:f.src,c=window.prompt("Update logo URL",l);if(!c)return;let g=(b=r==null?void 0:r.getAttributes("logo"))==null?void 0:b.size,p=(k=r==null?void 0:r.getAttributes("logo"))==null?void 0:k.alignment,u=r==null?void 0:r.state.selection;r==null||r.commands.setLogoImage({src:c,size:g,alignment:p}),r==null||r.commands.setNodeSelection((u==null?void 0:u.from)||0)},icon:xt},{name:"image-url",isActive:()=>!1,shouldShow:()=>e==null?void 0:e.isActive("image"),command:()=>{var p;let{editor:r}=t,l=(p=r==null?void 0:r.getAttributes("image"))==null?void 0:p.src,c=window.prompt("Update Image URL",l);if(!c)return;let g=r==null?void 0:r.state.selection;r==null||r.commands.setImage({src:c}),r==null||r.commands.setNodeSelection((g==null?void 0:g.from)||0)},icon:vt},...a],i=w(m({},t),{shouldShow:({editor:r})=>r.isActive("logo")||r.isActive("image"),tippyOptions:{maxWidth:"100%",moveTransition:"mly-transform 0.15s mly-ease-out"}});return me(ht,w(m({},i),{className:"mly-flex mly-gap-1 mly-rounded-md mly-border mly-border-slate-200 mly-bg-white mly-p-1 mly-shadow-md",children:s.filter(r=>{var l;return(l=r.shouldShow)==null?void 0:l.call(r)}).map((r,l)=>me(L,m({},r),l))}))}import{BubbleMenu as Tt}from"@tiptap/react";import{mergeAttributes as kt,Node as At}from"@tiptap/core";var K=["sm","md","lg","xl"],Ct="sm";function Lt(t){let e={sm:"8px",md:"16px",lg:"32px",xl:"64px"};return`width: 100%; height: ${e[t]||e[Ct]}`}var ce=At.create({name:"spacer",priority:1e3,group:"block",draggable:!0,addAttributes(){return{height:{default:null,parseHTML:t=>t.getAttribute("data-height"),renderHTML:t=>({"data-height":t.height})}}},addCommands(){return{setSpacer:t=>({commands:e})=>e.insertContent({type:this.name,attrs:{height:t.height}}),setSpacerSize:t=>({commands:e})=>{if(!K.includes(t))throw new Error("Invalid spacer height");return e.updateAttributes("spacer",{height:t})},unsetSpacer:()=>({commands:t})=>t.deleteNode("spacer")}},renderHTML({HTMLAttributes:t,node:e}){let{height:o}=e.attrs;return t.style=Lt(o),["div",kt({"data-maily-component":this.name},this.options.HTMLAttributes,t,{class:"spacer relative z-50",contenteditable:!1})]},parseHTML(){return[{tag:`div[data-maily-component="${this.name}"]`}]}});import{jsx as pe}from"react/jsx-runtime";function ye(t){let{editor:e}=t,o=K.map(a=>({name:a,isActive:()=>e==null?void 0:e.isActive("spacer",{height:a}),command:()=>{e==null||e.chain().focus().setSpacer({height:a}).run()}})),n=w(m({},t),{shouldShow:({editor:a})=>a.isActive("spacer"),tippyOptions:{maxWidth:"100%",moveTransition:"mly-transform 0.15s mly-ease-out"}});return pe(Tt,w(m({},n),{className:"mly-flex mly-gap-1 mly-rounded-md mly-border mly-border-slate-200 mly-bg-white mly-p-1 mly-shadow-md",children:o.map((a,s)=>pe(L,m({},a),s))}))}import Oo from"@tiptap/starter-kit";import{Color as Uo}from"@tiptap/extension-color";import Do from"@tiptap/extension-link";import Fo from"@tiptap/extension-list-item";import qo from"@tiptap/extension-paragraph";import Wo from"@tiptap/extension-placeholder";import $o from"@tiptap/extension-text-align";import Ie from"@tiptap/extension-text-style";import Ko from"@tiptap/extension-heading";import _o from"@tiptap/extension-underline";import{InputRule as Nt}from"@tiptap/core";import{HorizontalRule as Mt}from"@tiptap/extension-horizontal-rule";var ge=Mt.extend({addInputRules(){return[new Nt({find:/^(?:---|—-|___\s|\*\*\*\s)$/,handler:({state:t,range:e})=>{let o={},{tr:n}=t,a=e.from,s=e.to;n.insert(a-1,this.type.create(o)).delete(n.mapping.map(a),n.mapping.map(s))}})]}});import{mergeAttributes as Vt,Node as Ot}from"@tiptap/core";import{ReactNodeViewRenderer as Ut}from"@tiptap/react";import{NodeViewWrapper as Pt}from"@tiptap/react";import{AlignCenterIcon as Bt,AlignLeftIcon as zt,AlignRightIcon as St}from"lucide-react";import{ChromePicker as fe}from"react-color";import*as ue from"react";import{jsx as Rt}from"react/jsx-runtime";var N=ue.forwardRef((a,n)=>{var s=a,{className:t,type:e}=s,o=P(s,["className","type"]);return Rt("input",m({type:e,className:h("mly-flex mly-h-10 mly-w-full mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-px-3 mly-py-2 mly-text-sm mly-ring-offset-white file:mly-border-0 file:mly-bg-transparent file:mly-text-sm file:mly-font-medium placeholder:mly-text-gray-500 focus-visible:mly-outline-none focus-visible:mly-ring-2 focus-visible:mly-ring-gray-400 focus-visible:mly-ring-offset-2 disabled:mly-cursor-not-allowed disabled:mly-opacity-50","mly-editor",t),ref:n},o))});N.displayName="Input";import*as we from"react";import*as C from"@radix-ui/react-popover";import{jsx as he}from"react/jsx-runtime";var B=C.Root,z=C.Trigger,M=we.forwardRef((s,a)=>{var i=s,{className:t,align:e="center",sideOffset:o=4}=i,n=P(i,["className","align","sideOffset"]);return he(C.Portal,{children:he(C.Content,m({ref:a,align:e,sideOffset:o,className:h("mly-z-50 mly-w-72 mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-p-4 mly-shadow-md mly-outline-none data-[state=open]:mly-animate-in data-[state=closed]:mly-animate-out data-[state=closed]:mly-fade-out-0 data-[state=open]:mly-fade-in-0 data-[state=closed]:mly-zoom-out-95 data-[state=open]:mly-zoom-in-95 data-[side=bottom]:mly-slide-in-from-top-2 data-[side=left]:mly-slide-in-from-right-2 data-[side=right]:mly-slide-in-from-left-2 data-[side=top]:mly-slide-in-from-bottom-2 text-gray-950","mly-editor",t)},n))})});M.displayName=C.Content.displayName;import{jsx as d,jsxs as x}from"react/jsx-runtime";var It={left:zt,center:Bt,right:St},_={style(t){return xe.map(e=>({name:e,isActive:t.node.attrs.variant===e,onClick:()=>{t.updateAttributes({variant:e})}}))},cornerRadius(t){return ve.map(e=>({name:e,isActive:t.node.attrs.borderRadius===e,onClick:()=>{t.updateAttributes({borderRadius:e})}}))},alignment(t){return Object.entries(It).map(([e,o])=>({name:e,icon:o,isActive:t.node.attrs.alignment===e,onClick:()=>t.updateAttributes({alignment:e})}))}};function be(t){let{url:e,text:o,alignment:n,variant:a,borderRadius:s,buttonColor:i,textColor:r}=t.node.attrs;return d(Pt,{className:`react-component ${t.selected&&"ProseMirror-selectednode"}`,draggable:"true","data-drag-handle":"",style:{textAlign:n},children:x(B,{open:t.selected,children:[d(z,{asChild:!0,children:d("div",{children:d("a",{className:h("mly-inline-flex mly-items-center mly-justify-center mly-rounded-md mly-text-sm mly-font-medium mly-ring-offset-white mly-transition-colors disabled:mly-pointer-events-none disabled:mly-opacity-50","mly-h-10 mly-px-4 mly-py-2","mly-px-[32px] mly-py-[20px] mly-font-semibold mly-no-underline",{"!mly-rounded-full":s==="round","!mly-rounded-md":s==="smooth","!mly-rounded-none":s==="sharp"}),href:e,target:"_blank",rel:"noopener noreferrer",tabIndex:-1,style:{backgroundColor:a==="filled"?i:"transparent",color:r,borderWidth:2,borderStyle:"solid",borderColor:i},children:o})})}),x(M,{align:"end",className:"space-y-2",sideOffset:10,onOpenAutoFocus:l=>l.preventDefault(),onCloseAutoFocus:l=>l.preventDefault(),children:[d(N,{placeholder:"Add text here",value:o,onChange:l=>{t.updateAttributes({text:l.target.value})}}),d(N,{placeholder:"Add link here",value:e,onChange:l=>{t.updateAttributes({url:l.target.value})}}),x("div",{className:"mly-w-full mly-space-y-2",children:[d("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Style"}),d("div",{className:"mly-flex mly-gap-1",children:_.style(t).map((l,c)=>d(A,{"data-state":l.isActive?"true":"false",variant:"ghost",className:"mly-grow mly-font-normal mly-capitalize",size:"sm",onClick:l.onClick,type:"button",children:l.name},c))})]}),x("div",{className:"mly-w-full mly-space-y-2",children:[d("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Corner Radius"}),d("div",{className:"mly-flex mly-gap-1",children:_.cornerRadius(t).map((l,c)=>d(A,{"data-state":l.isActive?"true":"false",variant:"ghost",className:"mly-grow mly-font-normal mly-capitalize",size:"sm",onClick:l.onClick,type:"button",children:l.name},c))})]}),x("div",{className:"flex gap-2",children:[x("div",{children:[d("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Alignment"}),d("div",{className:"mly-mt-2 mly-flex mly-gap-1",children:_.alignment(t).map((l,c)=>d(A,{"data-state":l.isActive?"true":"false",variant:"ghost",className:"mly-grow",size:"sm",onClick:l.onClick,type:"button",children:d(l.icon,{size:16})},c))})]}),x("div",{children:[d("p",{className:"mly-text-xs mly-font-normal mly-text-slate-400",children:"Color"}),x("div",{className:"mly-mt-2 mly-flex mly-gap-1",children:[d(Et,{variant:a,color:i,onChange:l=>{t.updateAttributes({buttonColor:l})}}),d(Ht,{color:r,onChange:l=>{t.updateAttributes({textColor:l})}})]})]})]})]})]})})}function Et(t){let{color:e,onChange:o,variant:n}=t;return x(B,{children:[d(z,{asChild:!0,children:d(A,{variant:"ghost",className:"",size:"sm",type:"button",children:d("div",{className:"mly-h-4 mly-w-4 mly-rounded",style:{backgroundColor:n==="filled"?e:"transparent",borderStyle:"solid",borderWidth:n==="outline"?2:0,borderColor:e}})})}),d(M,{className:"mly-w-full !mly-p-0",children:d(fe,{className:"!mly-shadow-md",color:e,onChange:a=>{o(a.hex)}})})]})}function Ht(t){let{color:e,onChange:o}=t;return x(B,{children:[d(z,{asChild:!0,children:d(A,{variant:"ghost",size:"sm",type:"button",children:x("div",{className:"mly-flex mly-flex-col mly-items-center mly-justify-center mly-gap-[1px]",children:[d("span",{className:"mly-font-bolder mly-font-mono mly-text-xs mly-text-slate-700",children:"A"}),d("div",{className:"mly-h-[2px] mly-w-3",style:{backgroundColor:e}})]})})}),d(M,{className:"mly-w-full !mly-p-0",children:d(fe,{className:"!mly-shadow-md",color:e,onChange:n=>{o(n.hex)}})})]})}var xe=["filled","outline"],ve=["sharp","smooth","round"],ke=Ot.create({name:"button",group:"block",atom:!0,draggable:!0,addAttributes(){return{mailyComponent:{default:"button"},text:{default:"Button"},url:{default:""},alignment:{default:"left"},variant:{default:"filled"},borderRadius:{default:"smooth"},buttonColor:{default:"rgb(0, 0, 0)"},textColor:{default:"rgb(255, 255, 255)"}}},parseHTML(){return[{tag:`a[data-maily-component="${this.name}"]`}]},renderHTML({HTMLAttributes:t}){return["a",Vt({"data-maily-component":this.name},t)]},addCommands(){return{setButton:()=>({commands:t})=>t.insertContent({type:this.name,attrs:{mailyComponent:this.name}})}},addNodeView(){return Ut(be)}});import{mergeAttributes as Dt,Node as Ft}from"@tiptap/core";var G=Ft.create({name:"footer",group:"block",content:"inline*",addAttributes(){return{"maily-component":{default:"footer",renderHTML:t=>({"data-maily-component":t["maily-component"]}),parseHTML:t=>t==null?void 0:t.getAttribute("data-maily-component")}}},addCommands(){return{setFooter:()=>({commands:t})=>t.setNode(this.name)}},parseHTML(){return[{tag:'small[data-maily-component="footer"]'}]},renderHTML({HTMLAttributes:t}){return["small",Dt(this.options.HTMLAttributes,t,{class:"footer mly-block mly-text-[13px] mly-text-slate-500"}),0]}});import{forwardRef as qt,useEffect as Wt,useImperativeHandle as $t,useState as Ae}from"react";import{NodeViewWrapper as Kt,ReactRenderer as _t}from"@tiptap/react";import Gt from"tippy.js";import{AlertTriangle as jt}from"lucide-react";import{jsx as v,jsxs as I}from"react/jsx-runtime";var Ce=qt((t,e)=>{var s,i;let[o,n]=Ae(0),a=r=>{let l=t.items[r];l&&t.command({id:l})};return Wt(()=>n(0),[t.items]),$t(e,()=>({onKeyDown:({event:r})=>r.key==="ArrowUp"?(n((o+t.items.length-1)%t.items.length),!0):r.key==="ArrowDown"?(n((o+1)%t.items.length),!0):r.key==="Enter"?(a(o),!0):!1})),v("div",{className:"mly-z-50 mly-h-auto mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-p-1 mly-shadow-md mly-transition-all mly-min-w-[128px]",children:(s=t==null?void 0:t.items)!=null&&s.length?(i=t==null?void 0:t.items)==null?void 0:i.map((r,l)=>v("button",{onClick:()=>a(l),className:h("mly-flex mly-w-full mly-space-x-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100",l===o?"mly-bg-gray-200":"mly-bg-white"),children:r},l)):v("button",{className:"mly-flex mly-w-full mly-space-x-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100 mly-bg-white",children:"No result"})})});Ce.displayName="VariableList";function Le(t=[]){return{items:({query:e})=>t.concat(e.length>0?[e]:[]).filter(o=>o.toLowerCase().startsWith(e.toLowerCase())).slice(0,5),render:()=>{let e,o=null;return{onStart:n=>{e=new _t(Ce,{props:n,editor:n.editor}),n.clientRect&&(o=Gt("body",{getReferenceClientRect:n.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(n){var a;e.updateProps(n),n.clientRect&&((a=o==null?void 0:o[0])==null||a.setProps({getReferenceClientRect:n.clientRect}))},onKeyDown(n){var a;return n.event.key==="Escape"?(o==null||o[0].hide(),!0):(a=e.ref)==null?void 0:a.onKeyDown(n)},onExit(){!o||!(o!=null&&o[0])||!e||(o==null||o[0].destroy(),e.destroy())}}}}}function Te(t){let{node:e,selected:o,updateAttributes:n}=t,{id:a,fallback:s}=e.attrs,[i,r]=Ae(!1);return v(Kt,{className:h("react-component",o&&"ProseMirror-selectednode","mly-leading-none mly-inline-block"),draggable:"false",children:I(B,{open:i,onOpenChange:r,children:[v(z,{children:I("span",{tabIndex:-1,className:"mly-py-1 mly-px-2 mly-bg-rose-50 mly-border mly-border-rose-200 mly-text-rose-800 mly-rounded-md mly-leading-none mly-inline-flex mly-items-center mly-gap-1",children:[a,!s&&v(jt,{className:"mly-w-3 mly-shrink-0 mly-h-3 mly-stroke-[2.5]"})]})}),I(M,{align:"start",className:"mly-space-y-2",onOpenAutoFocus:l=>l.preventDefault(),onCloseAutoFocus:l=>l.preventDefault(),children:[I("label",{className:"mly-block mly-w-full mly-leading-none mly-space-y-1.5",children:[v("span",{className:"mly-leading-none mly-text-xs mly-font-normal",children:"Variable Name"}),v(N,{placeholder:"Add Variable Name",value:a,onChange:l=>{n({id:l.target.value})}})]}),I("label",{className:"mly-block mly-w-full mly-leading-none mly-space-y-1.5",children:[v("span",{className:"mly-leading-none mly-text-xs mly-font-normal",children:"Fallback Value"}),v(N,{placeholder:"Fallback Value",value:s||"",onChange:l=>{n({fallback:l.target.value})}}),v("p",{className:"mly-text-xs mly-text-gray-500",children:"If the variable doesn't exist, this fallback value will be used."})]})]})]})})}import{useCallback as Xt,useEffect as Ne,useLayoutEffect as Jt,useRef as Yt,useState as Qt}from"react";import{Extension as Zt}from"@tiptap/core";import{ReactRenderer as eo}from"@tiptap/react";import to from"@tiptap/suggestion";import{DivideIcon as oo,EraserIcon as ro,FootprintsIcon as no,Heading1 as lo,Heading2 as ao,Heading3 as io,ImageIcon as Me,List as so,ListOrdered as mo,MousePointer as co,MoveVertical as po,Text as yo,TextQuote as go}from"lucide-react";import uo from"tippy.js";import{jsx as y,jsxs as S}from"react/jsx-runtime";var ho=Zt.create({name:"slash-command",addOptions(){return{suggestion:{char:"/",command:({editor:t,range:e,props:o})=>{o.command({editor:t,range:e})}}}},addProseMirrorPlugins(){return[to(m({editor:this.editor},this.options.suggestion))]}}),wo=({query:t})=>[{title:"Text",description:"Just start typing with plain text.",searchTerms:["p","paragraph"],icon:y(yo,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleNode("paragraph","paragraph").run()}},{title:"Heading 1",description:"Big section heading.",searchTerms:["title","big","large"],icon:y(lo,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setNode("heading",{level:1}).run()}},{title:"Heading 2",description:"Medium section heading.",searchTerms:["subtitle","medium"],icon:y(ao,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setNode("heading",{level:2}).run()}},{title:"Heading 3",description:"Small section heading.",searchTerms:["subtitle","small"],icon:y(io,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setNode("heading",{level:3}).run()}},{title:"Bullet List",description:"Create a simple bullet list.",searchTerms:["unordered","point"],icon:y(so,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleBulletList().run()}},{title:"Numbered List",description:"Create a list with numbering.",searchTerms:["ordered"],icon:y(mo,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleOrderedList().run()}},{title:"Image",description:"Full width image",searchTerms:["image"],icon:y(Me,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{let n=prompt("Image URL: ")||"";n&&(e.chain().focus().deleteRange(o).run(),e.chain().focus().setImage({src:n}).run())}},{title:"Logo",description:"Add your brand logo",searchTerms:["image","logo"],icon:y(Me,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{let n=prompt("Logo URL: ")||"";n&&(e.chain().focus().deleteRange(o).run(),e.chain().focus().setLogoImage({src:n}).run())}},{title:"Spacer",description:"Add a spacer to the page. Useful for adding space between sections.",searchTerms:["space","gap","divider"],icon:y(po,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setSpacer({height:"sm"}).run()}},{title:"Button",description:"Add a call to action button to the page.",searchTerms:["link","button","cta"],icon:y(co,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setButton().run()}},{title:"Hard Break",description:"Add a break between lines.",searchTerms:["break","line"],icon:y(oo,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setHardBreak().run()}},{title:"Blockquote",description:"Add blockquote.",searchTerms:["quote","blockquote"],icon:y(go,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).toggleBlockquote().run()}},{title:"Footer",description:"Add a footer text to the page.",searchTerms:["footer","text"],icon:y(no,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().deleteRange(o).setFooter().run()}},{title:"Clear Line",description:"Clear the current line.",searchTerms:["clear","line"],icon:y(ro,{className:"mly-h-4 mly-w-4"}),command:({editor:e,range:o})=>{e.chain().focus().selectParentNode().deleteSelection().run()}}].filter(e=>{if(typeof t=="string"&&t.length>0){let o=t.toLowerCase();return e.title.toLowerCase().includes(o)||e.description.toLowerCase().includes(o)||e.searchTerms&&e.searchTerms.some(n=>n.includes(o))}return!0}),fo=(t,e)=>{let o=t.offsetHeight,n=e?e.offsetHeight:0,a=e.offsetTop,s=a+n;a<t.scrollTop?t.scrollTop-=t.scrollTop-a+5:s>o+t.scrollTop&&(t.scrollTop+=s-o-t.scrollTop+5)},bo=({items:t,command:e,editor:o})=>{let[n,a]=Qt(0),s=Xt(r=>{let l=t[r];l&&e(l)},[e,o,t]);Ne(()=>{let r=["ArrowUp","ArrowDown","Enter"],l=c=>{if(r.includes(c.key))return c.preventDefault(),c.key==="ArrowUp"?(a((n+t.length-1)%t.length),!0):c.key==="ArrowDown"?(a((n+1)%t.length),!0):c.key==="Enter"?(s(n),!0):!1};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[t,n,a,s]),Ne(()=>{a(0)},[t]);let i=Yt(null);return Jt(()=>{let r=i==null?void 0:i.current,l=r==null?void 0:r.children[n];l&&r&&fo(r,l)},[n]),t.length>0?S("div",{className:"mly-z-50 mly-w-72 mly-rounded-md mly-border mly-border-gray-200 mly-bg-white mly-shadow-md mly-transition-all",children:[y("div",{id:"slash-command",ref:i,className:"mly-no-scrollbar mly-h-auto mly-max-h-[330px] mly-overflow-y-auto mly-scroll-smooth mly-px-1 mly-py-2",children:t.map((r,l)=>S("button",{className:h("mly-flex mly-w-full mly-items-center mly-space-x-2 mly-rounded-md mly-px-2 mly-py-1 mly-text-left mly-text-sm mly-text-gray-900 hover:mly-bg-gray-100 hover:mly-text-gray-900",l===n?"mly-bg-gray-100 mly-text-gray-900":"mly-bg-transparent"),onClick:()=>s(l),type:"button",children:[y("div",{className:"mly-flex mly-h-6 mly-w-6 mly-shrink-0 mly-items-center mly-justify-center",children:r.icon}),S("div",{children:[y("p",{className:"mly-font-medium",children:r.title}),y("p",{className:"mly-text-xs mly-text-gray-400",children:r.description})]})]},l))}),y("div",{className:"mly-border-t mly-border-gray-200 mly-px-1 mly-py-3 mly-pl-4",children:S("div",{className:"mly-flex mly-items-center",children:[S("p",{className:"mly-text-center mly-text-xs mly-text-gray-400",children:[y("kbd",{className:"mly-rounded mly-border mly-p-1 mly-px-2 mly-font-medium",children:"\u2191"}),y("kbd",{className:"mly-ml-1 mly-rounded mly-border mly-p-1 mly-px-2 mly-font-medium",children:"\u2193"})," ","to navigate"]}),y("span",{"aria-hidden":"true",className:"mly-select-none mly-px-1",children:"\xB7"}),S("p",{className:"mly-text-center mly-text-xs mly-text-gray-400",children:[y("kbd",{className:"mly-rounded mly-border mly-p-1 mly-px-1.5 mly-font-medium",children:"Enter"})," ","to select"]})]})})]}):null},xo={items:wo,render:()=>{let t=null,e=null;return{onStart:o=>{t=new eo(bo,{props:o,editor:o.editor}),e=uo("body",{getReferenceClientRect:o.clientRect,appendTo:()=>document.body,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual"})},onUpdate:o=>{t==null||t.updateProps(o),e&&e[0].setProps({getReferenceClientRect:o.clientRect})},onKeyDown:o=>{var n;return o.event.key==="Escape"?(e==null||e[0].hide(),!0):(n=t==null?void 0:t.ref)==null?void 0:n.onKeyDown(o)},onExit:()=>{!e||!(e!=null&&e[0])||!t||(e==null||e[0].destroy(),t==null||t.destroy())}}}},Re=ho.configure({suggestion:xo});import{mergeAttributes as vo,Node as ko}from"@tiptap/core";import{PluginKey as Ao}from"@tiptap/pm/state";import{ReactNodeViewRenderer as Co}from"@tiptap/react";import Lo from"@tiptap/suggestion";var To=new Ao("variable"),Pe=ko.create({name:"variable",group:"inline",inline:!0,selectable:!0,atom:!0,addOptions(){return{HTMLAttributes:{},renderLabel({options:t,node:e}){var o;return`${(o=e.attrs.label)!=null?o:e.attrs.id}`},suggestion:{char:"@",pluginKey:To,command:({editor:t,range:e,props:o})=>{var s,i;let n=t.view.state.selection.$to.nodeAfter;((s=n==null?void 0:n.text)==null?void 0:s.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:this.name,attrs:o},{type:"text",text:" "}]).run(),(i=window.getSelection())==null||i.collapseToEnd()},allow:({state:t,range:e})=>{let o=t.doc.resolve(e.from),n=t.schema.nodes[this.name];return!!o.parent.type.contentMatch.matchType(n)}}}},addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}},fallback:{default:null,parseHTML:t=>t.getAttribute("data-fallback"),renderHTML:t=>t.fallback?{"data-fallback":t.fallback}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){return["span",vo({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t})]},renderText({node:t}){return this.options.renderLabel({options:this.options,node:t})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let o=!1,{selection:n}=e,{empty:a,anchor:s}=n;return a?(e.doc.nodesBetween(s-1,s,(i,r)=>{if(i.type.name===this.name)return o=!0,t.insertText(this.options.suggestion.char||"",r,r+i.nodeSize),!1}),o):!1})}},addProseMirrorPlugins(){return[Lo(m({editor:this.editor},this.options.suggestion))]},addNodeView(){return Co(Te)}});import{NodeViewWrapper as Po,ReactNodeViewRenderer as Bo}from"@tiptap/react";import{useRef as zo,useState as So}from"react";import Io from"@tiptap/extension-image";import{useCallback as No,useLayoutEffect as Mo,useRef as Ro}from"react";var Be=t=>{let e=Ro(null);return Mo(()=>{e.current=t},[t]),No((...o)=>{if(e.current===null)throw new Error("Handler is not assigned");return e.current(...o)},[])};import{Fragment as Vo,jsx as j,jsxs as ze}from"react/jsx-runtime";var Eo=60;function Ho(t){let{node:e,updateAttributes:o,selected:n}=t,a=zo(null),[s,i]=So(),r=Be(u=>{let f=document.querySelector(".ProseMirror-selectednode");if(!a.current||!f||!n)return;let b=f.offsetWidth;u.preventDefault();let k=u.currentTarget.dataset.direction||"--",U=u.clientX,H=a.current.width,X=a.current.height,R=H,D=X,Ve=k[1]==="w"?-1:1,F=()=>{window.removeEventListener("mousemove",J),window.removeEventListener("mouseup",F),o({width:R,height:D}),i(void 0)},J=Y=>{if(R=Math.max(H+Ve*(Y.clientX-U),Eo),R>b&&(R=b),D=R/H*X,i({width:R,height:D}),!Y.buttons)return F()};window.addEventListener("mousemove",J),window.addEventListener("mouseup",F)});function l(u){return j("div",{role:"button",tabIndex:0,onMouseDown:r,"data-direction":u,className:"mly-bg-rose-500",style:w(m(m({position:"absolute",height:"10px",width:"10px"},{n:{top:0},s:{bottom:0}}[u[0]]),{w:{left:0},e:{right:0}}[u[1]]),{cursor:`${u}-resize`})})}let{alignment:c="center",width:g,height:p}=e.attrs||{};return ze(Po,{as:"div",draggable:!0,"data-drag-handle":!0,style:m(w(m({width:g,height:p},s),{overflow:"hidden",position:"relative",lineHeight:"0px",display:"block"}),{center:{marginLeft:"auto",marginRight:"auto"},left:{marginRight:"auto"},right:{marginLeft:"auto"}}[c]||{}),children:[j("img",w(m({},e.attrs),{ref:a,style:w(m({},s),{cursor:"default",marginBottom:0})})),n&&ze(Vo,{children:[[{left:0,top:0,height:"100%",width:"1px"},{right:0,top:0,height:"100%",width:"1px"},{top:0,left:0,width:"100%",height:"1px"},{bottom:0,left:0,width:"100%",height:"1px"}].map((u,f)=>j("div",{className:"mly-bg-rose-500",style:m({position:"absolute"},u)},f)),l("nw"),l("ne"),l("sw"),l("se")]})]})}var Se=Io.extend({addAttributes(){var t;return w(m({},(t=this.parent)==null?void 0:t.call(this)),{width:{renderHTML:({width:e})=>({width:e})},height:{renderHTML:({height:e})=>({height:e})},alignment:{default:"center",renderHTML:({alignment:e})=>({"data-alignment":e}),parseHTML:e=>e.getAttribute("data-alignment")||"center"}})},addNodeView(){return Bo(Ho)}});function Ee(t){let{variables:e}=t;return[Oo.configure({heading:{levels:[1,2,3]},dropcursor:{color:"#555",width:3},code:{HTMLAttributes:{class:"mly-px-1 mly-py-0.5 mly-bg-[#efefef] mly-text-sm mly-rounded-md mly-tracking-normal mly-font-normal"}},horizontalRule:!1,blockquote:{HTMLAttributes:{class:"mly-not-prose mly-border-l-4 mly-border-gray-300 mly-pl-4 mly-mt-4 mly-mb-4"}}}),_o,re,Uo.configure({types:[Ie.name,Fo.name]}),Ie.configure(),$o.configure({types:[qo.name,Ko.name,G.name]}),ge,Wo.configure({placeholder:({node:o})=>o.type.name==="heading"?`Heading ${o.attrs.level}`:"Write something or / to see commands",includeChildren:!0}),ce,G,Pe.configure({suggestion:Le(e)}),Re,Do.configure({HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow"},openOnClick:!1}),ke,Se]}import{jsx as E,jsxs as He}from"react/jsx-runtime";function Fl(t){let{config:{wrapClassName:e="",contentClassName:o="",bodyClassName:n="",hasMenuBar:a=!0,spellCheck:s=!1,autofocus:i="end"}={},onCreate:r,onUpdate:l,extensions:c,contentHtml:g,contentJson:p,variables:u}=t,f=null;p?f=(p==null?void 0:p.type)==="doc"?p:{type:"doc",content:p}:g?f=g:f={type:"doc",content:[{type:"paragraph",content:[]}]};let b=jo({editorProps:{attributes:{class:h("mly-prose mly-w-full",o),spellCheck:s?"true":"false"},handleDOMEvents:{keydown:(k,U)=>{if(["ArrowUp","ArrowDown","Enter"].includes(U.key)&&document.querySelector("#slash-command"))return!0}}},onCreate:({editor:k})=>{r==null||r(k)},onUpdate:({editor:k})=>{l==null||l(k)},extensions:[...Ee({variables:u}),...c||[]],content:f,autofocus:i});return b?He("div",{className:h("mly-editor mly-antialiased",e),children:[a&&E(se,{config:t.config,editor:b}),He("div",{className:h("mly-mt-4 mly-rounded mly-border mly-bg-white mly-p-4",n),children:[E(ae,{editor:b}),E(de,{editor:b}),E(ye,{editor:b}),E(Go,{editor:b})]})]}):null}export{Fl as Editor};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maily-to/core",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Powerful editor for creating beautiful, pre-designed, mobile-ready emails.",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",