@maily-to/render 0.0.17 → 0.0.19

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.d.mts CHANGED
@@ -1,7 +1,29 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { HtmlProps } from '@react-email/components';
2
3
  import { JSONContent } from '@tiptap/core';
3
4
  export { JSONContent } from '@tiptap/core';
4
5
 
6
+ type MetaDescriptor = {
7
+ charSet: 'utf-8';
8
+ } | {
9
+ title: string;
10
+ } | {
11
+ name: string;
12
+ content: string;
13
+ } | {
14
+ property: string;
15
+ content: string;
16
+ } | {
17
+ httpEquiv: string;
18
+ content: string;
19
+ } | {
20
+ tagName: 'meta' | 'link';
21
+ [attribute: string]: string;
22
+ } | {
23
+ [name: string]: string;
24
+ };
25
+ type MetaDescriptors = MetaDescriptor[];
26
+
5
27
  interface MarkType {
6
28
  [key: string]: any;
7
29
  type: string;
@@ -105,6 +127,12 @@ declare const DEFAULT_COLUMN_PADDING_RIGHT = 0;
105
127
  declare const DEFAULT_COLUMN_PADDING_BOTTOM = 0;
106
128
  declare const DEFAULT_COLUMN_PADDING_LEFT = 0;
107
129
  declare const LINK_PROTOCOL_REGEX: RegExp;
130
+ declare const DEFAULT_META_TAGS: MetaDescriptors;
131
+ declare const DEFAULT_HTML_PROPS: HtmlProps;
132
+ declare const DEFAULT_BUTTON_PADDING_TOP = 10;
133
+ declare const DEFAULT_BUTTON_PADDING_RIGHT = 32;
134
+ declare const DEFAULT_BUTTON_PADDING_BOTTOM = 10;
135
+ declare const DEFAULT_BUTTON_PADDING_LEFT = 32;
108
136
  interface RenderOptions {
109
137
  /**
110
138
  * The options object allows you to customize the output of the rendered
@@ -137,6 +165,8 @@ declare class Maily {
137
165
  private openTrackingPixel;
138
166
  private payloadValues;
139
167
  private marksOrder;
168
+ private meta;
169
+ private htmlProps;
140
170
  constructor(content?: JSONContent);
141
171
  setPreviewText(preview?: string): void;
142
172
  setTheme(theme: Partial<ThemeOptions>): void;
@@ -182,6 +212,18 @@ declare class Maily {
182
212
  * Default: `false`
183
213
  */
184
214
  setShouldReplaceVariableValues(shouldReplace: boolean): void;
215
+ /**
216
+ * `setMetaTags` will add the meta tags.
217
+ *
218
+ * @param meta - The meta tags
219
+ */
220
+ setMetaTags(meta: MetaDescriptors): void;
221
+ /**
222
+ * `setHtmlProps` will set the HTML props.
223
+ *
224
+ * @param props - The HTML props
225
+ */
226
+ setHtmlProps(props: HtmlProps): void;
185
227
  getAllLinks(): Set<string>;
186
228
  private isValidUrl;
187
229
  render(options?: RenderOptions): Promise<string>;
@@ -223,10 +265,19 @@ declare class Maily {
223
265
  private columns;
224
266
  private adjustColumnsContent;
225
267
  private column;
268
+ private repeat;
269
+ /**
270
+ * @deprecated
271
+ * This for node is an alias for the repeat node
272
+ * we will remove this in the future
273
+ * @param node
274
+ * @param options
275
+ * @returns JSX.Element
276
+ */
226
277
  private for;
227
278
  private shouldShow;
228
279
  }
229
280
 
230
281
  declare function render(content: JSONContent, config?: MailyConfig & RenderOptions): Promise<string>;
231
282
 
232
- export { type AllowedSpacers, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMNS_WIDTH, DEFAULT_COLUMN_BACKGROUND_COLOR, DEFAULT_COLUMN_BORDER_COLOR, DEFAULT_COLUMN_BORDER_RADIUS, DEFAULT_COLUMN_BORDER_WIDTH, DEFAULT_COLUMN_PADDING_BOTTOM, DEFAULT_COLUMN_PADDING_LEFT, DEFAULT_COLUMN_PADDING_RIGHT, DEFAULT_COLUMN_PADDING_TOP, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, LINK_PROTOCOL_REGEX, type LinkValues, Maily, type MailyConfig, type MarkType, type PayloadValue, type PayloadValues, type RenderOptions, type ThemeOptions, type VariableFormatter, type VariableValues, render };
283
+ export { type AllowedSpacers, DEFAULT_BUTTON_PADDING_BOTTOM, DEFAULT_BUTTON_PADDING_LEFT, DEFAULT_BUTTON_PADDING_RIGHT, DEFAULT_BUTTON_PADDING_TOP, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMNS_WIDTH, DEFAULT_COLUMN_BACKGROUND_COLOR, DEFAULT_COLUMN_BORDER_COLOR, DEFAULT_COLUMN_BORDER_RADIUS, DEFAULT_COLUMN_BORDER_WIDTH, DEFAULT_COLUMN_PADDING_BOTTOM, DEFAULT_COLUMN_PADDING_LEFT, DEFAULT_COLUMN_PADDING_RIGHT, DEFAULT_COLUMN_PADDING_TOP, DEFAULT_HTML_PROPS, DEFAULT_META_TAGS, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, LINK_PROTOCOL_REGEX, type LinkValues, Maily, type MailyConfig, type MarkType, type PayloadValue, type PayloadValues, type RenderOptions, type ThemeOptions, type VariableFormatter, type VariableValues, render };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,29 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { HtmlProps } from '@react-email/components';
2
3
  import { JSONContent } from '@tiptap/core';
3
4
  export { JSONContent } from '@tiptap/core';
4
5
 
6
+ type MetaDescriptor = {
7
+ charSet: 'utf-8';
8
+ } | {
9
+ title: string;
10
+ } | {
11
+ name: string;
12
+ content: string;
13
+ } | {
14
+ property: string;
15
+ content: string;
16
+ } | {
17
+ httpEquiv: string;
18
+ content: string;
19
+ } | {
20
+ tagName: 'meta' | 'link';
21
+ [attribute: string]: string;
22
+ } | {
23
+ [name: string]: string;
24
+ };
25
+ type MetaDescriptors = MetaDescriptor[];
26
+
5
27
  interface MarkType {
6
28
  [key: string]: any;
7
29
  type: string;
@@ -105,6 +127,12 @@ declare const DEFAULT_COLUMN_PADDING_RIGHT = 0;
105
127
  declare const DEFAULT_COLUMN_PADDING_BOTTOM = 0;
106
128
  declare const DEFAULT_COLUMN_PADDING_LEFT = 0;
107
129
  declare const LINK_PROTOCOL_REGEX: RegExp;
130
+ declare const DEFAULT_META_TAGS: MetaDescriptors;
131
+ declare const DEFAULT_HTML_PROPS: HtmlProps;
132
+ declare const DEFAULT_BUTTON_PADDING_TOP = 10;
133
+ declare const DEFAULT_BUTTON_PADDING_RIGHT = 32;
134
+ declare const DEFAULT_BUTTON_PADDING_BOTTOM = 10;
135
+ declare const DEFAULT_BUTTON_PADDING_LEFT = 32;
108
136
  interface RenderOptions {
109
137
  /**
110
138
  * The options object allows you to customize the output of the rendered
@@ -137,6 +165,8 @@ declare class Maily {
137
165
  private openTrackingPixel;
138
166
  private payloadValues;
139
167
  private marksOrder;
168
+ private meta;
169
+ private htmlProps;
140
170
  constructor(content?: JSONContent);
141
171
  setPreviewText(preview?: string): void;
142
172
  setTheme(theme: Partial<ThemeOptions>): void;
@@ -182,6 +212,18 @@ declare class Maily {
182
212
  * Default: `false`
183
213
  */
184
214
  setShouldReplaceVariableValues(shouldReplace: boolean): void;
215
+ /**
216
+ * `setMetaTags` will add the meta tags.
217
+ *
218
+ * @param meta - The meta tags
219
+ */
220
+ setMetaTags(meta: MetaDescriptors): void;
221
+ /**
222
+ * `setHtmlProps` will set the HTML props.
223
+ *
224
+ * @param props - The HTML props
225
+ */
226
+ setHtmlProps(props: HtmlProps): void;
185
227
  getAllLinks(): Set<string>;
186
228
  private isValidUrl;
187
229
  render(options?: RenderOptions): Promise<string>;
@@ -223,10 +265,19 @@ declare class Maily {
223
265
  private columns;
224
266
  private adjustColumnsContent;
225
267
  private column;
268
+ private repeat;
269
+ /**
270
+ * @deprecated
271
+ * This for node is an alias for the repeat node
272
+ * we will remove this in the future
273
+ * @param node
274
+ * @param options
275
+ * @returns JSX.Element
276
+ */
226
277
  private for;
227
278
  private shouldShow;
228
279
  }
229
280
 
230
281
  declare function render(content: JSONContent, config?: MailyConfig & RenderOptions): Promise<string>;
231
282
 
232
- export { type AllowedSpacers, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMNS_WIDTH, DEFAULT_COLUMN_BACKGROUND_COLOR, DEFAULT_COLUMN_BORDER_COLOR, DEFAULT_COLUMN_BORDER_RADIUS, DEFAULT_COLUMN_BORDER_WIDTH, DEFAULT_COLUMN_PADDING_BOTTOM, DEFAULT_COLUMN_PADDING_LEFT, DEFAULT_COLUMN_PADDING_RIGHT, DEFAULT_COLUMN_PADDING_TOP, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, LINK_PROTOCOL_REGEX, type LinkValues, Maily, type MailyConfig, type MarkType, type PayloadValue, type PayloadValues, type RenderOptions, type ThemeOptions, type VariableFormatter, type VariableValues, render };
283
+ export { type AllowedSpacers, DEFAULT_BUTTON_PADDING_BOTTOM, DEFAULT_BUTTON_PADDING_LEFT, DEFAULT_BUTTON_PADDING_RIGHT, DEFAULT_BUTTON_PADDING_TOP, DEFAULT_COLUMNS_GAP, DEFAULT_COLUMNS_WIDTH, DEFAULT_COLUMN_BACKGROUND_COLOR, DEFAULT_COLUMN_BORDER_COLOR, DEFAULT_COLUMN_BORDER_RADIUS, DEFAULT_COLUMN_BORDER_WIDTH, DEFAULT_COLUMN_PADDING_BOTTOM, DEFAULT_COLUMN_PADDING_LEFT, DEFAULT_COLUMN_PADDING_RIGHT, DEFAULT_COLUMN_PADDING_TOP, DEFAULT_HTML_PROPS, DEFAULT_META_TAGS, DEFAULT_SECTION_ALIGN, DEFAULT_SECTION_BACKGROUND_COLOR, DEFAULT_SECTION_BORDER_COLOR, DEFAULT_SECTION_BORDER_WIDTH, DEFAULT_SECTION_MARGIN_BOTTOM, DEFAULT_SECTION_MARGIN_LEFT, DEFAULT_SECTION_MARGIN_RIGHT, DEFAULT_SECTION_MARGIN_TOP, DEFAULT_SECTION_PADDING_BOTTOM, DEFAULT_SECTION_PADDING_LEFT, DEFAULT_SECTION_PADDING_RIGHT, DEFAULT_SECTION_PADDING_TOP, LINK_PROTOCOL_REGEX, type LinkValues, Maily, type MailyConfig, type MarkType, type PayloadValue, type PayloadValues, type RenderOptions, type ThemeOptions, type VariableFormatter, type VariableValues, render };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var V=Object.defineProperty,it=Object.defineProperties,st=Object.getOwnPropertyDescriptor,at=Object.getOwnPropertyDescriptors,lt=Object.getOwnPropertyNames,R=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var F=(u,t,e)=>t in u?V(u,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[t]=e,x=(u,t)=>{for(var e in t||(t={}))B.call(t,e)&&F(u,e,t[e]);if(R)for(var e of R(t))I.call(t,e)&&F(u,e,t[e]);return u},y=(u,t)=>it(u,at(t));var U=(u,t)=>{var e={};for(var n in u)B.call(u,n)&&t.indexOf(n)<0&&(e[n]=u[n]);if(u!=null&&R)for(var n of R(u))t.indexOf(n)<0&&I.call(u,n)&&(e[n]=u[n]);return e};var ct=(u,t)=>{for(var e in t)V(u,e,{get:t[e],enumerable:!0})},ut=(u,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of lt(t))!B.call(u,o)&&o!==e&&V(u,o,{get:()=>t[o],enumerable:!(n=st(t,o))||n.enumerable});return u};var pt=u=>ut(V({},"__esModule",{value:!0}),u);var L=(u,t,e)=>new Promise((n,o)=>{var i=c=>{try{a(e.next(c))}catch(d){o(d)}},s=c=>{try{a(e.throw(c))}catch(d){o(d)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(i,s);a((e=e.apply(u,t)).next())});var Lt={};ct(Lt,{DEFAULT_COLUMNS_GAP:()=>ot,DEFAULT_COLUMNS_WIDTH:()=>St,DEFAULT_COLUMN_BACKGROUND_COLOR:()=>bt,DEFAULT_COLUMN_BORDER_COLOR:()=>Ct,DEFAULT_COLUMN_BORDER_RADIUS:()=>Ot,DEFAULT_COLUMN_BORDER_WIDTH:()=>wt,DEFAULT_COLUMN_PADDING_BOTTOM:()=>Et,DEFAULT_COLUMN_PADDING_LEFT:()=>Tt,DEFAULT_COLUMN_PADDING_RIGHT:()=>Nt,DEFAULT_COLUMN_PADDING_TOP:()=>vt,DEFAULT_SECTION_ALIGN:()=>H,DEFAULT_SECTION_BACKGROUND_COLOR:()=>j,DEFAULT_SECTION_BORDER_COLOR:()=>q,DEFAULT_SECTION_BORDER_WIDTH:()=>G,DEFAULT_SECTION_MARGIN_BOTTOM:()=>Y,DEFAULT_SECTION_MARGIN_LEFT:()=>Q,DEFAULT_SECTION_MARGIN_RIGHT:()=>K,DEFAULT_SECTION_MARGIN_TOP:()=>$,DEFAULT_SECTION_PADDING_BOTTOM:()=>et,DEFAULT_SECTION_PADDING_LEFT:()=>nt,DEFAULT_SECTION_PADDING_RIGHT:()=>tt,DEFAULT_SECTION_PADDING_TOP:()=>Z,LINK_PROTOCOL_REGEX:()=>rt,Maily:()=>A,render:()=>_t});module.exports=pt(Lt);var P=require("react"),l=require("@react-email/components"),z=require("@react-email/render");var dt=u=>Object.prototype.toString.call(u);var ht=u=>dt(u)==="[object Object]";function mt(u){return Object.keys(u)}function J(u,...t){if(!t.length)return u;let e=t.shift();return e===void 0?u:(k(u)&&k(e)&&mt(e).forEach(n=>{n==="__proto__"||n==="constructor"||n==="prototype"||(k(e[n])?(u[n]||(u[n]={}),k(u[n])?J(u[n],e[n]):u[n]=e[n]):u[n]=e[n])}),J(u,...t))}function k(u){return ht(u)&&!Array.isArray(u)}var Dt=Symbol("p-void");function D(){return Math.random().toString(36).substr(2,6)}var r=require("react/jsx-runtime");var ft={sm:"8px",md:"16px",lg:"32px",xl:"64px"},M={WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"};var gt={h1:{fontSize:"36px",lineHeight:"40px",fontWeight:800},h2:{fontSize:"30px",lineHeight:"36px",fontWeight:700},h3:{fontSize:"24px",lineHeight:"38px",fontWeight:600}};var W={sm:"40px",md:"48px",lg:"64px"},xt={pretty:!1,plainText:!1},X={colors:{heading:"#111827",paragraph:"#374151",horizontal:"#EAEAEA",footer:"#64748B",blockquoteBorder:"#D1D5DB",codeBackground:"#EFEFEF",codeText:"#111827",linkCardTitle:"#111827",linkCardDescription:"#6B7280",linkCardBadgeText:"#111827",linkCardBadgeBackground:"#FEF08A",linkCardSubTitle:"#6B7280"},fontSize:{paragraph:"15px",footer:{size:"14px",lineHeight:"24px"}}},yt='SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',j="#ffffff",H="left",G=1,q="#000000",$=0,K=0,Y=0,Q=0,Z=5,tt=5,et=5,nt=5,St="100%",ot=8,bt="transparent",Ot=0,wt=0,Ct="transparent",vt=0,Nt=0,Et=0,Tt=0,rt=/https?:\/\//,A=class{constructor(t={type:"doc",content:[]}){this.config={theme:X};this.variableFormatter=({variable:t,fallback:e})=>e?`{{${t},fallback=${e}}}`:`{{${t}}}`;this.shouldReplaceVariableValues=!1;this.variableValues=new Map;this.linkValues=new Map;this.payloadValues=new Map;this.marksOrder=["underline","bold","italic","textStyle","link"];this.content=t}setPreviewText(t){this.config.preview=t}setTheme(t){this.config.theme=J(this.config.theme||X,t)}setVariableFormatter(t){this.variableFormatter=t}setVariableValue(t,e){this.shouldReplaceVariableValues||(this.shouldReplaceVariableValues=!0),this.variableValues.set(t,e)}setVariableValues(t){this.shouldReplaceVariableValues||(this.shouldReplaceVariableValues=!0),Object.entries(t).forEach(([e,n])=>{this.setVariableValue(e,n)})}setLinkValue(t,e){this.linkValues.set(t,e)}setLinkValues(t){Object.entries(t).forEach(([e,n])=>{this.setLinkValue(e,n)})}setPayloadValue(t,e){this.shouldReplaceVariableValues||(this.shouldReplaceVariableValues=!0),this.payloadValues.set(t,e)}setPayloadValues(t){Object.entries(t).forEach(([e,n])=>{this.setPayloadValue(e,n)})}setOpenTrackingPixel(t){this.openTrackingPixel=t}setShouldReplaceVariableValues(t){this.shouldReplaceVariableValues=t}getAllLinks(){let t=this.content.content||[],e=new Set,n=i=>i&&this.isValidUrl(i)&&!i.startsWith("#")&&!i.startsWith("mailto:")&&!i.startsWith("tel:")&&typeof i=="string",o=i=>{var s;if(i.type==="button"){let a=(s=i.attrs)==null?void 0:s.url;n(a)&&a&&e.add(a)}else i.content&&i.content.forEach(a=>{a.marks&&a.marks.forEach(c=>{var p;let d=(p=c.attrs)==null?void 0:p.href;c.type==="link"&&n(d)&&e.add(d)}),a.content&&o(a)})};return t.forEach(i=>{o(i)}),e}isValidUrl(t){try{let e=new URL(t);return!0}catch(e){return!1}}render(){return L(this,arguments,function*(t=xt){let e=this.markup();return(0,z.renderAsync)(e,t)})}markup(){let t=this.content.content||[],e=t.map((i,s)=>{let a={prev:t[s-1],next:t[s+1],parent:i},c=this.renderNode(i,a);return c?(0,r.jsx)(P.Fragment,{children:c},D()):null}),{preview:n}=this.config;return(0,r.jsxs)(l.Html,{children:[(0,r.jsxs)(l.Head,{children:[(0,r.jsx)(l.Font,{fallbackFontFamily:"sans-serif",fontFamily:"Inter",fontStyle:"normal",fontWeight:400,webFont:{url:"https://rsms.me/inter/font-files/Inter-Regular.woff2?v=3.19",format:"woff2"}}),(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"blockquote,h1,h2,h3,img,li,ol,p,ul{margin-top:0;margin-bottom:0}@media only screen and (max-width:425px){.tab-row-full{width:100%!important}.tab-col-full{display:block!important;width:100%!important}.tab-pad{padding:0!important}}"}}),(0,r.jsx)("meta",{content:"width=device-width",name:"viewport"}),(0,r.jsx)("meta",{content:"IE=edge",httpEquiv:"X-UA-Compatible"}),(0,r.jsx)("meta",{name:"x-apple-disable-message-reformatting"}),(0,r.jsx)("meta",{content:"telephone=no,address=no,email=no,date=no,url=no",name:"format-detection"}),(0,r.jsx)("meta",{content:"light",name:"color-scheme"}),(0,r.jsx)("meta",{content:"light",name:"supported-color-schemes"})]}),(0,r.jsxs)(l.Body,{style:{margin:0},children:[n?(0,r.jsx)(l.Preview,{id:"__react-email-preview",children:n}):null,(0,r.jsx)(l.Container,{style:{maxWidth:"600px",minWidth:"300px",width:"100%",marginLeft:"auto",marginRight:"auto",padding:"0.5rem"},children:e}),this.openTrackingPixel?(0,r.jsx)(l.Img,{alt:"",src:this.openTrackingPixel,style:{display:"none",width:"1px",height:"1px"}}):null]})]})}getMarginOverrideConditions(t,e){let{parent:n,prev:o,next:i}=e||{},s=(i==null?void 0:i.type)==="spacer",a=(o==null?void 0:o.type)==="spacer",c=(n==null?void 0:n.type)==="listItem",d=(n==null?void 0:n.type)==="section"&&!i,p=(n==null?void 0:n.type)==="section"&&!o,m=(n==null?void 0:n.type)==="column"&&!i,h=(n==null?void 0:n.type)==="column"&&!o,f=(n==null?void 0:n.type)==="for"&&!o,g=(n==null?void 0:n.type)==="for"&&!i,S=(n==null?void 0:n.type)==="show"&&!o,b=(n==null?void 0:n.type)==="show"&&!i;return{isNextSpacer:s,isPrevSpacer:a,isLastSectionElement:d,isFirstSectionElement:p,isParentListItem:c,isLastColumnElement:m,isFirstColumnElement:h,isFirstForElement:f,isLastForElement:g,isFirstShowElement:S,isLastShowElement:b,shouldRemoveTopMargin:a||p||h||f||S,shouldRemoveBottomMargin:s||d||m||g||b}}getMappedContent(t,e){let n=t.content||[];return n.map((o,i)=>{let s=this.renderNode(o,y(x({},e),{next:n[i+1],prev:n[i-1]}));return s?(0,r.jsx)(P.Fragment,{children:s},D()):null}).filter(o=>o!==null)}renderNode(t,e={}){var o;let n=t.type||"";if(n in this)return(o=this[n])==null?void 0:o.call(this,t,e);throw new Error(`Node type "${n}" is not supported.`)}renderMark(t,e){let n=(t==null?void 0:t.text)||(0,r.jsx)(r.Fragment,{children:"\xA0"}),o=(t==null?void 0:t.marks)||[];return o.sort((i,s)=>this.marksOrder.indexOf(i.type)-this.marksOrder.indexOf(s.type)),o.reduce((i,s)=>{var c;let a=s.type;if(a in this)return(c=this[a])==null?void 0:c.call(this,s,i);throw new Error(`Mark type "${a}" is not supported.`)},(0,r.jsx)(r.Fragment,{children:n}))}paragraph(t,e){var a,c,d,p;let{attrs:n}=t,o=(n==null?void 0:n.textAlign)||"left",{isParentListItem:i,shouldRemoveBottomMargin:s}=this.getMarginOverrideConditions(t,e);return(0,r.jsx)(l.Text,{style:x({textAlign:o,marginBottom:i||s?"0px":"20px",marginTop:"0px",fontSize:(c=(a=this.config.theme)==null?void 0:a.fontSize)==null?void 0:c.paragraph,color:(p=(d=this.config.theme)==null?void 0:d.colors)==null?void 0:p.paragraph},M),children:t.content?this.getMappedContent(t,y(x({},e),{parent:t})):(0,r.jsx)(r.Fragment,{children:"\xA0"})})}text(t,e){let n=t.text||"&nbsp";return t.marks?this.renderMark(t,e):(0,r.jsx)(r.Fragment,{children:n})}bold(t,e){return(0,r.jsx)("strong",{children:e})}italic(t,e){return(0,r.jsx)("em",{children:e})}underline(t,e){return(0,r.jsx)("u",{children:e})}strike(t,e){return(0,r.jsx)("s",{style:{textDecoration:"line-through"},children:e})}textStyle(t,e){var i,s;let{attrs:n}=t,{color:o=(s=(i=this.config.theme)==null?void 0:i.colors)==null?void 0:s.paragraph}=n||{};return(0,r.jsx)("span",{style:{color:o},children:e})}link(t,e,n){var d,p,m;let{attrs:o}=t,i=(o==null?void 0:o.href)||"#",s=(o==null?void 0:o.target)||"_blank",a=(o==null?void 0:o.rel)||"noopener noreferrer nofollow";if((d=o==null?void 0:o.isUrlVariable)!=null?d:!1){let h=this.removeLinkProtocol(i);i=this.variableUrlValue(h,n)}else i=this.linkValues.get(i)||i;return(0,r.jsx)(l.Link,{href:i,rel:a,style:{fontWeight:500,textDecoration:"none",color:(m=(p=this.config.theme)==null?void 0:p.colors)==null?void 0:m.heading},target:s,children:e})}removeLinkProtocol(t){return t.replace(rt,"")}variableUrlValue(t,e){var i,s;let{payloadValue:n}=e||{},o=this.removeLinkProtocol(t);return(s=(i=typeof n=="object"?n[o]:n)!=null?i:this.variableValues.get(o))!=null?s:t}heading(t,e){var p,m;let{attrs:n}=t,o=`h${Number(n==null?void 0:n.level)||1}`,i=(n==null?void 0:n.textAlign)||"left",{shouldRemoveBottomMargin:s}=this.getMarginOverrideConditions(t,e),{fontSize:a,lineHeight:c,fontWeight:d}=gt[o];return(0,r.jsx)(l.Heading,{as:o,style:{textAlign:i,color:(m=(p=this.config.theme)==null?void 0:p.colors)==null?void 0:m.heading,marginBottom:s?"0":"12px",marginTop:0,fontSize:a,lineHeight:c,fontWeight:d},children:this.getMappedContent(t,y(x({},e),{parent:t}))})}variable(t,e){var c,d,p;let{payloadValue:n}=e||{},{id:o,fallback:i}=t.attrs||{};if(!this.shouldShow(t,e)||!o)return(0,r.jsx)(r.Fragment,{});let a=this.variableFormatter({variable:o,fallback:i});return this.shouldReplaceVariableValues&&(a=(p=(d=(c=typeof n=="object"?n[o]:n)!=null?c:this.variableValues.get(o))!=null?d:i)!=null?p:a),t!=null&&t.marks?this.renderMark({text:a,marks:t.marks},e):(0,r.jsx)(r.Fragment,{children:a})}horizontalRule(t,e){return(0,r.jsx)(l.Hr,{style:{marginTop:"32px",marginBottom:"32px"}})}orderedList(t,e){let{shouldRemoveBottomMargin:n}=this.getMarginOverrideConditions(t,e);return(0,r.jsx)(l.Container,{children:(0,r.jsx)("ol",{style:{marginTop:"0px",marginBottom:n?"0":"20px",paddingLeft:"26px",listStyleType:"decimal"},children:this.getMappedContent(t,y(x({},e),{parent:t}))})})}bulletList(t,e){let{parent:n,next:o}=e||{},{shouldRemoveBottomMargin:i}=this.getMarginOverrideConditions(t,{parent:n,next:o});return(0,r.jsx)(l.Container,{style:{maxWidth:"100%"},children:(0,r.jsx)("ul",{style:{marginTop:"0px",marginBottom:i?"0":"20px",paddingLeft:"26px",listStyleType:"disc"},children:this.getMappedContent(t,y(x({},e),{parent:t}))})})}listItem(t,e){return(0,r.jsx)("li",{style:x({marginBottom:"8px",paddingLeft:"6px"},M),children:this.getMappedContent(t,y(x({},e),{parent:t}))})}button(t,e){let{attrs:n}=t,{text:o,isTextVariable:i,url:s,isUrlVariable:a,variant:c,buttonColor:d,textColor:p,borderRadius:m,alignment:h="left"}=n||{};if(!this.shouldShow(t,e))return(0,r.jsx)(r.Fragment,{});let g="0px";m==="round"?g="9999px":m==="smooth"&&(g="6px");let{shouldRemoveBottomMargin:S}=this.getMarginOverrideConditions(t,e),b=a?this.variableUrlValue(s,e):this.linkValues.get(s)||s,O=i?this.variableUrlValue(o,e):o;return(0,r.jsx)(l.Container,{style:{textAlign:h,maxWidth:"100%",marginBottom:S?"0px":"20px"},children:(0,r.jsx)(l.Button,{href:b,style:{color:String(p),backgroundColor:c==="filled"?String(d):"transparent",borderColor:String(d),padding:c==="filled"?"12px 34px":"10px 34px",borderWidth:"2px",borderStyle:"solid",textDecoration:"none",fontSize:"14px",fontWeight:500,borderRadius:g},children:O})})}spacer(t,e){let{attrs:n}=t,{height:o="auto"}=n||{};return this.shouldShow(t,e)?(0,r.jsx)(l.Container,{style:{height:ft[o]||o}}):(0,r.jsx)(r.Fragment,{})}hardBreak(t,e){return(0,r.jsx)("br",{})}logo(t,e){let{attrs:n}=t,{src:o,isSrcVariable:i,alt:s,title:a,size:c,alignment:d="left"}=n||{};if(!this.shouldShow(t,e))return(0,r.jsx)(r.Fragment,{});o=i?this.variableUrlValue(o,e):o;let{shouldRemoveBottomMargin:m}=this.getMarginOverrideConditions(t,e);return(0,r.jsx)(l.Row,{style:{marginTop:"0px",marginBottom:m?"0px":"32px"},children:(0,r.jsx)(l.Column,{align:d,children:(0,r.jsx)(l.Img,{alt:s||a||"Logo",src:o,style:{width:W[c]||c,height:W[c]||c},title:a||s||"Logo"})})})}image(t,e){let{attrs:n}=t,{src:o,isSrcVariable:i,alt:s,title:a,width:c="auto",alignment:d="center",externalLink:p="",isExternalLinkVariable:m}=n||{};if(!this.shouldShow(t,e))return(0,r.jsx)(r.Fragment,{});let{shouldRemoveBottomMargin:f}=this.getMarginOverrideConditions(t,e);o=i?this.variableUrlValue(o,e):o,p=m?this.variableUrlValue(p,e):p;let g=c==="auto"?"auto":Number(c),S=g==="auto"?"auto":`${g}px`,b=(0,r.jsx)(l.Img,{alt:s||a||"Image",src:o,style:{width:S,maxWidth:"100%",outline:"none",border:"none",textDecoration:"none",display:"block"},title:a||s||"Image"});return(0,r.jsx)(l.Row,{style:{marginTop:"0px",marginBottom:f?"0px":"32px"},children:(0,r.jsx)(l.Column,{align:d,children:p?(0,r.jsx)("a",{href:p,rel:"noopener noreferrer",style:{display:"block",maxWidth:"100%",textDecoration:"none"},target:"_blank",children:b}):b})})}footer(t,e){var s,a,c,d,p,m,h,f;let{attrs:n}=t,{textAlign:o="left"}=n||{},{shouldRemoveBottomMargin:i}=this.getMarginOverrideConditions(t,e);return(0,r.jsx)(l.Text,{style:x({fontSize:(c=(a=(s=this.config.theme)==null?void 0:s.fontSize)==null?void 0:a.footer)==null?void 0:c.size,lineHeight:(m=(p=(d=this.config.theme)==null?void 0:d.fontSize)==null?void 0:p.footer)==null?void 0:m.lineHeight,color:(f=(h=this.config.theme)==null?void 0:h.colors)==null?void 0:f.footer,marginTop:"0px",marginBottom:i?"0px":"20px",textAlign:o},M),children:this.getMappedContent(t,y(x({},e),{parent:t}))})}blockquote(t,e){var i,s;let{isPrevSpacer:n,shouldRemoveBottomMargin:o}=this.getMarginOverrideConditions(t,e);return(0,r.jsx)("blockquote",{style:{borderLeftWidth:"4px",borderLeftStyle:"solid",borderLeftColor:(s=(i=this.config.theme)==null?void 0:i.colors)==null?void 0:s.blockquoteBorder,paddingLeft:"16px",marginLeft:"0px",marginRight:"0px",marginTop:n?"0px":"20px",marginBottom:o?"0px":"20px"},children:this.getMappedContent(t,y(x({},e),{parent:t}))})}code(t,e){var n,o,i,s;return(0,r.jsx)("code",{style:{backgroundColor:(o=(n=this.config.theme)==null?void 0:n.colors)==null?void 0:o.codeBackground,color:(s=(i=this.config.theme)==null?void 0:i.colors)==null?void 0:s.codeText,padding:"2px 4px",borderRadius:"6px",fontFamily:yt,fontWeight:400,letterSpacing:0},children:e})}linkCard(t,e){var f,g,S,b,O,w,C,N,E,T,v,_;let{attrs:n}=t,{shouldRemoveBottomMargin:o}=this.getMarginOverrideConditions(t,e),{title:i,description:s,link:a,linkTitle:c,image:d,badgeText:p,subTitle:m}=n||{},h=this.linkValues.get(a)||this.variableValues.get(a)||a||"#";return(0,r.jsxs)("a",{href:h,rel:"noopener noreferrer",style:{border:"1px solid #eaeaea",borderRadius:"10px",textDecoration:"none",color:"inherit",display:"block",marginBottom:o?"0px":"20px"},target:"_blank",children:[d?(0,r.jsx)(l.Row,{style:{marginBottom:"6px"},children:(0,r.jsx)(l.Column,{style:{width:"100%",height:"100%"},children:(0,r.jsx)(l.Img,{alt:i||"Link Card",src:d,style:{borderRadius:"10px 10px 0 0",width:"100%",height:"100%",objectFit:"cover"},title:i||"Link Card"})})}):null,(0,r.jsx)(l.Row,{style:{padding:"15px",marginTop:0,marginBottom:0},children:(0,r.jsxs)(l.Column,{style:{verticalAlign:"top"},children:[(0,r.jsxs)(l.Row,{align:void 0,style:{marginBottom:"8px",marginTop:"0px"},width:"auto",children:[(0,r.jsx)(l.Column,{children:(0,r.jsx)(l.Text,{style:x({fontSize:"18px",fontWeight:600,color:(g=(f=this.config.theme)==null?void 0:f.colors)==null?void 0:g.linkCardTitle,margin:"0px"},M),children:i})}),p||m?(0,r.jsxs)(l.Column,{style:{paddingLeft:"6px",verticalAlign:"middle"},children:[p?(0,r.jsx)("span",{style:{fontWeight:600,color:(b=(S=this.config.theme)==null?void 0:S.colors)==null?void 0:b.linkCardBadgeText,padding:"4px 8px",borderRadius:"8px",backgroundColor:(w=(O=this.config.theme)==null?void 0:O.colors)==null?void 0:w.linkCardBadgeBackground,fontSize:"12px",lineHeight:"12px"},children:p}):null," ",m&&!p?(0,r.jsx)("span",{style:{fontWeight:"normal",color:(N=(C=this.config.theme)==null?void 0:C.colors)==null?void 0:N.linkCardSubTitle,fontSize:"12px",lineHeight:"12px"},children:m}):null]}):null]}),(0,r.jsxs)(l.Text,{style:x({fontSize:"16px",color:(T=(E=this.config.theme)==null?void 0:E.colors)==null?void 0:T.linkCardDescription,marginTop:"0px",marginBottom:"0px"},M),children:[s," ",c?(0,r.jsx)("a",{href:h,rel:"noopener noreferrer",style:{color:(_=(v=this.config.theme)==null?void 0:v.colors)==null?void 0:_.linkCardTitle,fontSize:"14px",fontWeight:600,textDecoration:"underline"},children:c}):null]})]})})]})}section(t,e){let{attrs:n}=t,{borderRadius:o=0,backgroundColor:i=j,align:s=H,borderWidth:a=G,borderColor:c=q,marginTop:d=$,marginRight:p=K,marginBottom:m=Y,marginLeft:h=Q,paddingTop:f=Z,paddingRight:g=tt,paddingBottom:S=et,paddingLeft:b=nt}=n||{};return this.shouldShow(t,e)?(0,r.jsx)(l.Row,{style:{marginTop:d,marginRight:p,marginBottom:m,marginLeft:h},children:(0,r.jsx)(l.Column,{align:s,style:{borderColor:c,borderWidth:a,borderStyle:"solid",backgroundColor:i,borderRadius:o,paddingTop:f,paddingRight:g,paddingBottom:S,paddingLeft:b},children:this.getMappedContent(t,y(x({},e),{parent:t}))})}):(0,r.jsx)(r.Fragment,{})}columns(t,e){let{attrs:n}=t;if(!this.shouldShow(t,e))return(0,r.jsx)(r.Fragment,{});let[i,s]=this.adjustColumnsContent(t);return(0,r.jsx)(l.Row,{width:`${s}%`,style:{margin:0,padding:0,width:`${s}%`},className:"tab-row-full",children:this.getMappedContent(i,y(x({},e),{parent:i}))})}adjustColumnsContent(t){var m;let{content:e=[]}=t,n=100,o=e.filter(h=>{var f;return h.type==="column"&&!!Number(((f=h.attrs)==null?void 0:f.width)||0)}),i=e.filter(h=>{var f,g;return h.type==="column"&&(((f=h.attrs)==null?void 0:f.width)==="auto"||!((g=h.attrs)!=null&&g.width))}),s=o.reduce((h,f)=>{var g;return h+Number((g=f.attrs)==null?void 0:g.width)},0),a=n-s,c=Math.round(a/i.length),d=e.filter(h=>h.type==="column").length,p=((m=t.attrs)==null?void 0:m.gap)||ot;return[y(x({},t),{content:e.map((h,f)=>{var N,E,T;let g=h.type==="column"&&(((N=h.attrs)==null?void 0:N.width)==="auto"||!((E=h.attrs)!=null&&E.width)),S=f===0,b=f>0&&f<d-1,O=f===e.length-1,w=0,C=0;if(d<3)w=S?0:p/2,C=O?0:p/2;else{let v=p/2*1.5,_=v/2;w=S?0:b?_:v,C=O?0:b?_:v}return w=Math.round(w*100)/100,C=Math.round(C*100)/100,y(x({},h),{attrs:y(x({},h.attrs),{width:g?c:(T=h.attrs)==null?void 0:T.width,isFirstColumn:S,isLastColumn:O,index:f,paddingLeft:w,paddingRight:C})})})}),i.length===0?Math.min(n,s):n]}column(t,e){let{attrs:n}=t,{width:o,verticalAlign:i="top",paddingLeft:s=0,paddingRight:a=0}=n||{};return(0,r.jsx)(l.Column,{width:`${Number(o)}%`,style:{width:`${Number(o)}%`,margin:0,verticalAlign:i},className:"tab-col-full",children:(0,r.jsx)(l.Section,{style:{margin:0,paddingLeft:s,paddingRight:a},className:"tab-pad",children:this.getMappedContent(t,y(x({},e),{parent:t}))})})}for(t,e){var c,d;let{attrs:n}=t,{each:o=""}=n||{};if(!this.shouldShow(t,e))return(0,r.jsx)(r.Fragment,{});let{payloadValue:s}=e||{};s=typeof s=="object"?s:{};let a=(d=(c=this.payloadValues.get(o))!=null?c:s[o])!=null?d:[];if(!Array.isArray(a))throw new Error(`Payload value for each "${o}" is not an array`);return(0,r.jsx)(r.Fragment,{children:a.map(p=>(0,r.jsx)(P.Fragment,{children:this.getMappedContent(t,y(x({},e),{parent:t,payloadValue:p}))},D()))})}shouldShow(t,e){var i,s,a;let n=(s=(i=t==null?void 0:t.attrs)==null?void 0:i.showIfKey)!=null?s:"";if(!n)return!0;let{payloadValue:o}=e||{};return o=typeof o=="object"?o:{},!!((a=this.payloadValues.get(n))!=null?a:o[n])}};function _t(u,t){return L(this,null,function*(){let s=t||{},{theme:e,preview:n}=s,o=U(s,["theme","preview"]),i=new A(u);return i.setPreviewText(n),i.setTheme(e||{}),i.setPayloadValue("items",[{name:"John Doe"},{name:"Novu"}]),i.setPayloadValue("shouldShow",!0),i.render(o)})}0&&(module.exports={DEFAULT_COLUMNS_GAP,DEFAULT_COLUMNS_WIDTH,DEFAULT_COLUMN_BACKGROUND_COLOR,DEFAULT_COLUMN_BORDER_COLOR,DEFAULT_COLUMN_BORDER_RADIUS,DEFAULT_COLUMN_BORDER_WIDTH,DEFAULT_COLUMN_PADDING_BOTTOM,DEFAULT_COLUMN_PADDING_LEFT,DEFAULT_COLUMN_PADDING_RIGHT,DEFAULT_COLUMN_PADDING_TOP,DEFAULT_SECTION_ALIGN,DEFAULT_SECTION_BACKGROUND_COLOR,DEFAULT_SECTION_BORDER_COLOR,DEFAULT_SECTION_BORDER_WIDTH,DEFAULT_SECTION_MARGIN_BOTTOM,DEFAULT_SECTION_MARGIN_LEFT,DEFAULT_SECTION_MARGIN_RIGHT,DEFAULT_SECTION_MARGIN_TOP,DEFAULT_SECTION_PADDING_BOTTOM,DEFAULT_SECTION_PADDING_LEFT,DEFAULT_SECTION_PADDING_RIGHT,DEFAULT_SECTION_PADDING_TOP,LINK_PROTOCOL_REGEX,Maily,render});
1
+ "use strict";var k=Object.defineProperty,mt=Object.defineProperties,ft=Object.getOwnPropertyDescriptor,gt=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertyNames,R=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var U=(a,t,e)=>t in a?k(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,g=(a,t)=>{for(var e in t||(t={}))I.call(t,e)&&U(a,e,t[e]);if(R)for(var e of R(t))W.call(t,e)&&U(a,e,t[e]);return a},y=(a,t)=>mt(a,gt(t));var V=(a,t)=>{var e={};for(var n in a)I.call(a,n)&&t.indexOf(n)<0&&(e[n]=a[n]);if(a!=null&&R)for(var n of R(a))t.indexOf(n)<0&&W.call(a,n)&&(e[n]=a[n]);return e};var yt=(a,t)=>{for(var e in t)k(a,e,{get:t[e],enumerable:!0})},St=(a,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of xt(t))!I.call(a,r)&&r!==e&&k(a,r,{get:()=>t[r],enumerable:!(n=ft(t,r))||n.enumerable});return a};var Ot=a=>St(k({},"__esModule",{value:!0}),a);var M=(a,t,e)=>new Promise((n,r)=>{var o=p=>{try{l(e.next(p))}catch(u){r(u)}},s=p=>{try{l(e.throw(p))}catch(u){r(u)}},l=p=>p.done?n(p.value):Promise.resolve(p.value).then(o,s);l((e=e.apply(a,t)).next())});var Ft={};yt(Ft,{DEFAULT_BUTTON_PADDING_BOTTOM:()=>ht,DEFAULT_BUTTON_PADDING_LEFT:()=>dt,DEFAULT_BUTTON_PADDING_RIGHT:()=>ut,DEFAULT_BUTTON_PADDING_TOP:()=>pt,DEFAULT_COLUMNS_GAP:()=>st,DEFAULT_COLUMNS_WIDTH:()=>Mt,DEFAULT_COLUMN_BACKGROUND_COLOR:()=>Lt,DEFAULT_COLUMN_BORDER_COLOR:()=>Rt,DEFAULT_COLUMN_BORDER_RADIUS:()=>At,DEFAULT_COLUMN_BORDER_WIDTH:()=>Dt,DEFAULT_COLUMN_PADDING_BOTTOM:()=>Pt,DEFAULT_COLUMN_PADDING_LEFT:()=>Jt,DEFAULT_COLUMN_PADDING_RIGHT:()=>Vt,DEFAULT_COLUMN_PADDING_TOP:()=>kt,DEFAULT_HTML_PROPS:()=>ct,DEFAULT_META_TAGS:()=>lt,DEFAULT_SECTION_ALIGN:()=>q,DEFAULT_SECTION_BACKGROUND_COLOR:()=>$,DEFAULT_SECTION_BORDER_COLOR:()=>Y,DEFAULT_SECTION_BORDER_WIDTH:()=>K,DEFAULT_SECTION_MARGIN_BOTTOM:()=>tt,DEFAULT_SECTION_MARGIN_LEFT:()=>et,DEFAULT_SECTION_MARGIN_RIGHT:()=>Z,DEFAULT_SECTION_MARGIN_TOP:()=>Q,DEFAULT_SECTION_PADDING_BOTTOM:()=>ot,DEFAULT_SECTION_PADDING_LEFT:()=>it,DEFAULT_SECTION_PADDING_RIGHT:()=>rt,DEFAULT_SECTION_PADDING_TOP:()=>nt,LINK_PROTOCOL_REGEX:()=>at,Maily:()=>D,render:()=>Bt});module.exports=Ot(Ft);var F=require("react"),c=require("@react-email/components"),G=require("@react-email/render");var bt=a=>Object.prototype.toString.call(a);var wt=a=>bt(a)==="[object Object]";function Ct(a){return Object.keys(a)}function J(a,...t){if(!t.length)return a;let e=t.shift();return e===void 0?a:(P(a)&&P(e)&&Ct(e).forEach(n=>{n==="__proto__"||n==="constructor"||n==="prototype"||(P(e[n])?(a[n]||(a[n]={}),P(a[n])?J(a[n],e[n]):a[n]=e[n]):a[n]=e[n])}),J(a,...t))}function P(a){return wt(a)&&!Array.isArray(a)}var jt=Symbol("p-void");function B(){return Math.random().toString(36).substr(2,6)}var L=require("react/jsx-runtime");function z(a){return a.filter((t,e,n)=>{let r=X(t);return e===n.findIndex(o=>X(o)===r)}).map(Tt).filter(Boolean)}function Tt(a){if("tagName"in a){let t=a,{tagName:e}=t,n=V(t,["tagName"]);return(0,L.jsx)(e,g({},n),JSON.stringify(n))}return"title"in a?(0,L.jsx)("title",{children:a.title}):"charSet"in a?(0,L.jsx)("meta",{charSet:a.charSet}):(0,L.jsx)("meta",g({},a),JSON.stringify(a))}function X(a){let t=Object.keys(a).sort().reduce((e,n)=>{let r=n;return e[r]=a[r],e},{});return JSON.stringify(t)}var i=require("react/jsx-runtime");var Nt={sm:"8px",md:"16px",lg:"32px",xl:"64px"},A={WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"};var vt={h1:{fontSize:"36px",lineHeight:"40px",fontWeight:800},h2:{fontSize:"30px",lineHeight:"36px",fontWeight:700},h3:{fontSize:"24px",lineHeight:"38px",fontWeight:600}};var H={sm:"40px",md:"48px",lg:"64px"},Et={pretty:!1,plainText:!1},j={colors:{heading:"#111827",paragraph:"#374151",horizontal:"#EAEAEA",footer:"#64748B",blockquoteBorder:"#D1D5DB",codeBackground:"#EFEFEF",codeText:"#111827",linkCardTitle:"#111827",linkCardDescription:"#6B7280",linkCardBadgeText:"#111827",linkCardBadgeBackground:"#FEF08A",linkCardSubTitle:"#6B7280"},fontSize:{paragraph:"15px",footer:{size:"14px",lineHeight:"24px"}}},_t='SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',$="#ffffff",q="left",K=1,Y="#000000",Q=0,Z=0,tt=0,et=0,nt=5,rt=5,ot=5,it=5,Mt="100%",st=8,Lt="transparent",At=0,Dt=0,Rt="transparent",kt=0,Vt=0,Pt=0,Jt=0,at=/https?:\/\//,lt=[{name:"viewport",content:"width=device-width"},{httpEquiv:"X-UA-Compatible",content:"IE=edge"},{name:"x-apple-disable-message-reformatting"},{name:"format-detection",content:"telephone=no,address=no,email=no,date=no,url=no"},{name:"color-scheme",content:"light"},{name:"supported-color-schemes",content:"light"}],ct={lang:"en",dir:"ltr"},pt=10,ut=32,ht=10,dt=32,D=class{constructor(t={type:"doc",content:[]}){this.config={theme:j};this.variableFormatter=({variable:t,fallback:e})=>e?`{{${t},fallback=${e}}}`:`{{${t}}}`;this.shouldReplaceVariableValues=!1;this.variableValues=new Map;this.linkValues=new Map;this.payloadValues=new Map;this.marksOrder=["underline","bold","italic","textStyle","link"];this.meta=lt;this.htmlProps=ct;this.content=t}setPreviewText(t){this.config.preview=t}setTheme(t){this.config.theme=J(this.config.theme||j,t)}setVariableFormatter(t){this.variableFormatter=t}setVariableValue(t,e){this.shouldReplaceVariableValues||(this.shouldReplaceVariableValues=!0),this.variableValues.set(t,e)}setVariableValues(t){this.shouldReplaceVariableValues||(this.shouldReplaceVariableValues=!0),Object.entries(t).forEach(([e,n])=>{this.setVariableValue(e,n)})}setLinkValue(t,e){this.linkValues.set(t,e)}setLinkValues(t){Object.entries(t).forEach(([e,n])=>{this.setLinkValue(e,n)})}setPayloadValue(t,e){this.shouldReplaceVariableValues||(this.shouldReplaceVariableValues=!0),this.payloadValues.set(t,e)}setPayloadValues(t){Object.entries(t).forEach(([e,n])=>{this.setPayloadValue(e,n)})}setOpenTrackingPixel(t){this.openTrackingPixel=t}setShouldReplaceVariableValues(t){this.shouldReplaceVariableValues=t}setMetaTags(t){this.meta.push(...t)}setHtmlProps(t){this.htmlProps=g(g({},this.htmlProps),t)}getAllLinks(){let t=this.content.content||[],e=new Set,n=o=>o&&this.isValidUrl(o)&&!o.startsWith("#")&&!o.startsWith("mailto:")&&!o.startsWith("tel:")&&typeof o=="string",r=o=>{var s;if(o.type==="button"){let l=(s=o.attrs)==null?void 0:s.url;n(l)&&l&&e.add(l)}else o.content&&o.content.forEach(l=>{l.marks&&l.marks.forEach(p=>{var h;let u=(h=p.attrs)==null?void 0:h.href;p.type==="link"&&n(u)&&e.add(u)}),l.content&&r(l)})};return t.forEach(o=>{r(o)}),e}isValidUrl(t){try{let e=new URL(t);return!0}catch(e){return!1}}render(){return M(this,arguments,function*(t=Et){let e=this.markup();return(0,G.renderAsync)(e,t)})}markup(){let t=this.content.content||[],e=t.map((l,p)=>{let u={prev:t[p-1],next:t[p+1],parent:l},h=this.renderNode(l,u);return h?(0,i.jsx)(F.Fragment,{children:h},B()):null}),{preview:n}=this.config,r=z(this.meta),o=this.htmlProps;return(0,i.jsxs)(c.Html,y(g({},o),{children:[(0,i.jsxs)(c.Head,{children:[(0,i.jsx)(c.Font,{fallbackFontFamily:"sans-serif",fontFamily:"Inter",fontStyle:"normal",fontWeight:400,webFont:{url:"https://rsms.me/inter/font-files/Inter-Regular.woff2?v=3.19",format:"woff2"}}),(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"blockquote,h1,h2,h3,img,li,ol,p,ul{margin-top:0;margin-bottom:0}@media only screen and (max-width:425px){.tab-row-full{width:100%!important}.tab-col-full{display:block!important;width:100%!important}.tab-pad{padding:0!important}}"}}),r]}),(0,i.jsxs)(c.Body,{style:{margin:0},children:[n?(0,i.jsx)(c.Preview,{id:"__react-email-preview",children:n}):null,(0,i.jsx)(c.Container,{style:{maxWidth:"600px",minWidth:"300px",width:"100%",marginLeft:"auto",marginRight:"auto",padding:"0.5rem"},children:e}),this.openTrackingPixel?(0,i.jsx)(c.Img,{alt:"",src:this.openTrackingPixel,style:{display:"none",width:"1px",height:"1px"}}):null]})]}))}getMarginOverrideConditions(t,e){let{parent:n,prev:r,next:o}=e||{},s=(o==null?void 0:o.type)==="spacer",l=(r==null?void 0:r.type)==="spacer",p=(n==null?void 0:n.type)==="listItem",u=(n==null?void 0:n.type)==="section"&&!o,h=(n==null?void 0:n.type)==="section"&&!r,m=(n==null?void 0:n.type)==="column"&&!o,d=(n==null?void 0:n.type)==="column"&&!r,f=(n==null?void 0:n.type)==="repeat"&&!r,x=(n==null?void 0:n.type)==="repeat"&&!o,S=(n==null?void 0:n.type)==="show"&&!r,O=(n==null?void 0:n.type)==="show"&&!o;return{isNextSpacer:s,isPrevSpacer:l,isLastSectionElement:u,isFirstSectionElement:h,isParentListItem:p,isLastColumnElement:m,isFirstColumnElement:d,isFirstRepeatElement:f,isLastRepeatElement:x,isFirstShowElement:S,isLastShowElement:O,shouldRemoveTopMargin:l||h||d||f||S,shouldRemoveBottomMargin:s||u||m||x||O}}getMappedContent(t,e){let n=t.content||[];return n.map((r,o)=>{let s=this.renderNode(r,y(g({},e),{next:n[o+1],prev:n[o-1]}));return s?(0,i.jsx)(F.Fragment,{children:s},B()):null}).filter(r=>r!==null)}renderNode(t,e={}){var r;let n=t.type||"";if(n in this)return(r=this[n])==null?void 0:r.call(this,t,e);throw new Error(`Node type "${n}" is not supported.`)}renderMark(t,e){let n=(t==null?void 0:t.text)||(0,i.jsx)(i.Fragment,{children:"\xA0"}),r=(t==null?void 0:t.marks)||[];return r.sort((o,s)=>this.marksOrder.indexOf(o.type)-this.marksOrder.indexOf(s.type)),r.reduce((o,s)=>{var p;let l=s.type;if(l in this)return(p=this[l])==null?void 0:p.call(this,s,o);throw new Error(`Mark type "${l}" is not supported.`)},(0,i.jsx)(i.Fragment,{children:n}))}paragraph(t,e){var p,u,h,m;let{attrs:n}=t,r=(n==null?void 0:n.textAlign)||"left",{isParentListItem:o,shouldRemoveBottomMargin:s}=this.getMarginOverrideConditions(t,e);return this.shouldShow(t,e)?(0,i.jsx)(c.Text,{style:g(y(g({},r!=="left"?{textAlign:r}:{}),{marginBottom:o||s?"0px":"20px",marginTop:"0px",fontSize:(u=(p=this.config.theme)==null?void 0:p.fontSize)==null?void 0:u.paragraph,color:(m=(h=this.config.theme)==null?void 0:h.colors)==null?void 0:m.paragraph}),A),children:t.content?this.getMappedContent(t,y(g({},e),{parent:t})):(0,i.jsx)(i.Fragment,{children:"\xA0"})}):(0,i.jsx)(i.Fragment,{})}text(t,e){let n=t.text||"&nbsp";return t.marks?this.renderMark(t,e):(0,i.jsx)(i.Fragment,{children:n})}bold(t,e){return(0,i.jsx)("strong",{children:e})}italic(t,e){return(0,i.jsx)("em",{children:e})}underline(t,e){return(0,i.jsx)("u",{children:e})}strike(t,e){return(0,i.jsx)("s",{style:{textDecoration:"line-through"},children:e})}textStyle(t,e){var o,s;let{attrs:n}=t,{color:r=(s=(o=this.config.theme)==null?void 0:o.colors)==null?void 0:s.paragraph}=n||{};return(0,i.jsx)("span",{style:{color:r},children:e})}link(t,e,n){var u,h,m;let{attrs:r}=t,o=(r==null?void 0:r.href)||"#",s=(r==null?void 0:r.target)||"_blank",l=(r==null?void 0:r.rel)||"noopener noreferrer nofollow";if((u=r==null?void 0:r.isUrlVariable)!=null?u:!1){let d=this.removeLinkProtocol(o);o=this.variableUrlValue(d,n)}else o=this.linkValues.get(o)||o;return(0,i.jsx)(c.Link,{href:o,rel:l,style:{fontWeight:500,textDecoration:"none",color:(m=(h=this.config.theme)==null?void 0:h.colors)==null?void 0:m.heading},target:s,children:e})}removeLinkProtocol(t){return t.replace(at,"")}variableUrlValue(t,e){var o,s;let{payloadValue:n}=e||{},r=this.removeLinkProtocol(t);return(s=(o=typeof n=="object"?n[r]:n)!=null?o:this.variableValues.get(r))!=null?s:t}heading(t,e){var m,d;let{attrs:n}=t,r=`h${Number(n==null?void 0:n.level)||1}`,o=(n==null?void 0:n.textAlign)||"left",{shouldRemoveBottomMargin:s}=this.getMarginOverrideConditions(t,e),{fontSize:l,lineHeight:p,fontWeight:u}=vt[r];return this.shouldShow(t,e)?(0,i.jsx)(c.Heading,{as:r,style:{textAlign:o,color:(d=(m=this.config.theme)==null?void 0:m.colors)==null?void 0:d.heading,marginBottom:s?"0":"12px",marginTop:0,fontSize:l,lineHeight:p,fontWeight:u},children:this.getMappedContent(t,y(g({},e),{parent:t}))}):(0,i.jsx)(i.Fragment,{})}variable(t,e){var p,u,h;let{payloadValue:n}=e||{},{id:r,fallback:o}=t.attrs||{};if(!this.shouldShow(t,e)||!r)return(0,i.jsx)(i.Fragment,{});let l=this.variableFormatter({variable:r,fallback:o});return this.shouldReplaceVariableValues&&(l=(h=(u=(p=typeof n=="object"?n[r]:n)!=null?p:this.variableValues.get(r))!=null?u:o)!=null?h:l),t!=null&&t.marks?this.renderMark({text:l,marks:t.marks},e):(0,i.jsx)(i.Fragment,{children:l})}horizontalRule(t,e){return(0,i.jsx)(c.Hr,{style:{marginTop:"32px",marginBottom:"32px"}})}orderedList(t,e){let{shouldRemoveBottomMargin:n}=this.getMarginOverrideConditions(t,e);return(0,i.jsx)(c.Container,{children:(0,i.jsx)("ol",{style:{marginTop:"0px",marginBottom:n?"0":"20px",paddingLeft:"26px",listStyleType:"decimal"},children:this.getMappedContent(t,y(g({},e),{parent:t}))})})}bulletList(t,e){let{parent:n,next:r}=e||{},{shouldRemoveBottomMargin:o}=this.getMarginOverrideConditions(t,{parent:n,next:r});return(0,i.jsx)(c.Container,{style:{maxWidth:"100%"},children:(0,i.jsx)("ul",{style:{marginTop:"0px",marginBottom:o?"0":"20px",paddingLeft:"26px",listStyleType:"disc"},children:this.getMappedContent(t,y(g({},e),{parent:t}))})})}listItem(t,e){return(0,i.jsx)("li",{style:g({marginBottom:"8px",paddingLeft:"6px"},A),children:this.getMappedContent(t,y(g({},e),{parent:t}))})}button(t,e){let{attrs:n}=t,{text:r,isTextVariable:o,url:s,isUrlVariable:l,variant:p,buttonColor:u,textColor:h,borderRadius:m,alignment:d="left",paddingTop:f=pt,paddingRight:x=ut,paddingBottom:S=ht,paddingLeft:O=dt}=n||{};if(!this.shouldShow(t,e))return(0,i.jsx)(i.Fragment,{});let b="0px";m==="round"?b="9999px":m==="smooth"&&(b="6px");let{shouldRemoveBottomMargin:w}=this.getMarginOverrideConditions(t,e),T=l?this.variableUrlValue(s,e):this.linkValues.get(s)||s,N=o?this.variableUrlValue(r,e):r;return f+=2,S+=2,(0,i.jsx)(c.Container,{style:{textAlign:d,maxWidth:"100%",marginBottom:w?"0px":"20px"},children:(0,i.jsx)(c.Button,{href:T,style:{color:String(h),backgroundColor:p==="filled"?String(u):"transparent",borderColor:String(u),borderWidth:"2px",borderStyle:"solid",textDecoration:"none",fontSize:"14px",fontWeight:500,borderRadius:b,padding:`${f}px ${x}px ${S}px ${O}px`},children:N})})}spacer(t,e){let{attrs:n}=t,{height:r="auto"}=n||{};return this.shouldShow(t,e)?(0,i.jsx)(c.Container,{style:{height:Nt[r]||r}}):(0,i.jsx)(i.Fragment,{})}hardBreak(t,e){return(0,i.jsx)("br",{})}logo(t,e){let{attrs:n}=t,{src:r,isSrcVariable:o,alt:s,title:l,size:p,alignment:u="left"}=n||{};if(!this.shouldShow(t,e))return(0,i.jsx)(i.Fragment,{});r=o?this.variableUrlValue(r,e):r;let{shouldRemoveBottomMargin:m}=this.getMarginOverrideConditions(t,e);return(0,i.jsx)(c.Row,{style:{marginTop:"0px",marginBottom:m?"0px":"32px"},children:(0,i.jsx)(c.Column,{align:u,children:(0,i.jsx)(c.Img,{alt:s||l||"Logo",src:r,style:{width:H[p]||p,height:H[p]||p},title:l||s||"Logo"})})})}image(t,e){let{attrs:n}=t,{src:r,isSrcVariable:o,alt:s,title:l,width:p="auto",alignment:u="center",externalLink:h="",isExternalLinkVariable:m}=n||{};if(!this.shouldShow(t,e))return(0,i.jsx)(i.Fragment,{});let{shouldRemoveBottomMargin:f}=this.getMarginOverrideConditions(t,e);r=o?this.variableUrlValue(r,e):r,h=m?this.variableUrlValue(h,e):h;let x=p==="auto"?"auto":Number(p),S=x==="auto"?"auto":`${x}px`,O=(0,i.jsx)(c.Img,{alt:s||l||"Image",src:r,style:{width:S,maxWidth:"100%",outline:"none",border:"none",textDecoration:"none",display:"block"},title:l||s||"Image"});return(0,i.jsx)(c.Row,{style:{marginTop:"0px",marginBottom:f?"0px":"32px"},children:(0,i.jsx)(c.Column,{align:u,children:h?(0,i.jsx)("a",{href:h,rel:"noopener noreferrer",style:{display:"block",maxWidth:"100%",textDecoration:"none"},target:"_blank",children:O}):O})})}footer(t,e){var s,l,p,u,h,m,d,f;let{attrs:n}=t,{textAlign:r="left"}=n||{},{shouldRemoveBottomMargin:o}=this.getMarginOverrideConditions(t,e);return(0,i.jsx)(c.Text,{style:g({fontSize:(p=(l=(s=this.config.theme)==null?void 0:s.fontSize)==null?void 0:l.footer)==null?void 0:p.size,lineHeight:(m=(h=(u=this.config.theme)==null?void 0:u.fontSize)==null?void 0:h.footer)==null?void 0:m.lineHeight,color:(f=(d=this.config.theme)==null?void 0:d.colors)==null?void 0:f.footer,marginTop:"0px",marginBottom:o?"0px":"20px",textAlign:r},A),children:this.getMappedContent(t,y(g({},e),{parent:t}))})}blockquote(t,e){var o,s;let{isPrevSpacer:n,shouldRemoveBottomMargin:r}=this.getMarginOverrideConditions(t,e);return(0,i.jsx)("blockquote",{style:{borderLeftWidth:"4px",borderLeftStyle:"solid",borderLeftColor:(s=(o=this.config.theme)==null?void 0:o.colors)==null?void 0:s.blockquoteBorder,paddingLeft:"16px",marginLeft:"0px",marginRight:"0px",marginTop:n?"0px":"20px",marginBottom:r?"0px":"20px"},children:this.getMappedContent(t,y(g({},e),{parent:t}))})}code(t,e){var n,r,o,s;return(0,i.jsx)("code",{style:{backgroundColor:(r=(n=this.config.theme)==null?void 0:n.colors)==null?void 0:r.codeBackground,color:(s=(o=this.config.theme)==null?void 0:o.colors)==null?void 0:s.codeText,padding:"2px 4px",borderRadius:"6px",fontFamily:_t,fontWeight:400,letterSpacing:0},children:e})}linkCard(t,e){var f,x,S,O,C,b,w,T,N,E,v,_;let{attrs:n}=t,{shouldRemoveBottomMargin:r}=this.getMarginOverrideConditions(t,e),{title:o,description:s,link:l,linkTitle:p,image:u,badgeText:h,subTitle:m}=n||{},d=this.linkValues.get(l)||this.variableValues.get(l)||l||"#";return(0,i.jsxs)("a",{href:d,rel:"noopener noreferrer",style:{border:"1px solid #eaeaea",borderRadius:"10px",textDecoration:"none",color:"inherit",display:"block",marginBottom:r?"0px":"20px"},target:"_blank",children:[u?(0,i.jsx)(c.Row,{style:{marginBottom:"6px"},children:(0,i.jsx)(c.Column,{style:{width:"100%",height:"100%"},children:(0,i.jsx)(c.Img,{alt:o||"Link Card",src:u,style:{borderRadius:"10px 10px 0 0",width:"100%",height:"100%",objectFit:"cover"},title:o||"Link Card"})})}):null,(0,i.jsx)(c.Row,{style:{padding:"15px",marginTop:0,marginBottom:0},children:(0,i.jsxs)(c.Column,{style:{verticalAlign:"top"},children:[(0,i.jsxs)(c.Row,{align:void 0,style:{marginBottom:"8px",marginTop:"0px"},width:"auto",children:[(0,i.jsx)(c.Column,{children:(0,i.jsx)(c.Text,{style:g({fontSize:"18px",fontWeight:600,color:(x=(f=this.config.theme)==null?void 0:f.colors)==null?void 0:x.linkCardTitle,margin:"0px"},A),children:o})}),h||m?(0,i.jsxs)(c.Column,{style:{paddingLeft:"6px",verticalAlign:"middle"},children:[h?(0,i.jsx)("span",{style:{fontWeight:600,color:(O=(S=this.config.theme)==null?void 0:S.colors)==null?void 0:O.linkCardBadgeText,padding:"4px 8px",borderRadius:"8px",backgroundColor:(b=(C=this.config.theme)==null?void 0:C.colors)==null?void 0:b.linkCardBadgeBackground,fontSize:"12px",lineHeight:"12px"},children:h}):null," ",m&&!h?(0,i.jsx)("span",{style:{fontWeight:"normal",color:(T=(w=this.config.theme)==null?void 0:w.colors)==null?void 0:T.linkCardSubTitle,fontSize:"12px",lineHeight:"12px"},children:m}):null]}):null]}),(0,i.jsxs)(c.Text,{style:g({fontSize:"16px",color:(E=(N=this.config.theme)==null?void 0:N.colors)==null?void 0:E.linkCardDescription,marginTop:"0px",marginBottom:"0px"},A),children:[s," ",p?(0,i.jsx)("a",{href:d,rel:"noopener noreferrer",style:{color:(_=(v=this.config.theme)==null?void 0:v.colors)==null?void 0:_.linkCardTitle,fontSize:"14px",fontWeight:600,textDecoration:"underline"},children:p}):null]})]})})]})}section(t,e){let{attrs:n}=t,{borderRadius:r=0,backgroundColor:o=$,align:s=q,borderWidth:l=K,borderColor:p=Y,marginTop:u=Q,marginRight:h=Z,marginBottom:m=tt,marginLeft:d=et,paddingTop:f=nt,paddingRight:x=rt,paddingBottom:S=ot,paddingLeft:O=it}=n||{};return this.shouldShow(t,e)?(0,i.jsx)(c.Row,{style:{marginTop:u,marginRight:h,marginBottom:m,marginLeft:d},children:(0,i.jsx)(c.Column,{align:s,style:{borderColor:p,borderWidth:l,borderStyle:"solid",backgroundColor:o,borderRadius:r,paddingTop:f,paddingRight:x,paddingBottom:S,paddingLeft:O},children:this.getMappedContent(t,y(g({},e),{parent:t}))})}):(0,i.jsx)(i.Fragment,{})}columns(t,e){let{attrs:n}=t;if(!this.shouldShow(t,e))return(0,i.jsx)(i.Fragment,{});let[o,s]=this.adjustColumnsContent(t);return(0,i.jsx)(c.Row,{width:`${s}%`,style:{margin:0,padding:0,width:`${s}%`},className:"tab-row-full",children:this.getMappedContent(o,y(g({},e),{parent:o}))})}adjustColumnsContent(t){var m;let{content:e=[]}=t,n=100,r=e.filter(d=>{var f;return d.type==="column"&&!!Number(((f=d.attrs)==null?void 0:f.width)||0)}),o=e.filter(d=>{var f,x;return d.type==="column"&&(((f=d.attrs)==null?void 0:f.width)==="auto"||!((x=d.attrs)!=null&&x.width))}),s=r.reduce((d,f)=>{var x;return d+Number((x=f.attrs)==null?void 0:x.width)},0),l=n-s,p=Math.round(l/o.length),u=e.filter(d=>d.type==="column").length,h=((m=t.attrs)==null?void 0:m.gap)||st;return[y(g({},t),{content:e.map((d,f)=>{var T,N,E;let x=d.type==="column"&&(((T=d.attrs)==null?void 0:T.width)==="auto"||!((N=d.attrs)!=null&&N.width)),S=f===0,O=f>0&&f<u-1,C=f===e.length-1,b=0,w=0;if(u<3)b=S?0:h/2,w=C?0:h/2;else{let v=h/2*1.5,_=v/2;b=S?0:O?_:v,w=C?0:O?_:v}return b=Math.round(b*100)/100,w=Math.round(w*100)/100,y(g({},d),{attrs:y(g({},d.attrs),{width:x?p:(E=d.attrs)==null?void 0:E.width,isFirstColumn:S,isLastColumn:C,index:f,paddingLeft:b,paddingRight:w})})})}),o.length===0?Math.min(n,s):n]}column(t,e){let{attrs:n}=t,{width:r,verticalAlign:o="top",paddingLeft:s=0,paddingRight:l=0}=n||{};return(0,i.jsx)(c.Column,{width:`${Number(r)}%`,style:{width:`${Number(r)}%`,margin:0,verticalAlign:o},className:"tab-col-full",children:(0,i.jsx)(c.Section,{style:{margin:0,paddingLeft:s,paddingRight:l},className:"tab-pad",children:this.getMappedContent(t,y(g({},e),{parent:t}))})})}repeat(t,e){var p,u;let{attrs:n}=t,{each:r=""}=n||{};if(!this.shouldShow(t,e))return(0,i.jsx)(i.Fragment,{});let{payloadValue:s}=e||{};s=typeof s=="object"?s:{};let l=(u=(p=this.payloadValues.get(r))!=null?p:s[r])!=null?u:[];if(!Array.isArray(l))throw new Error(`Payload value for each "${r}" is not an array`);return(0,i.jsx)(i.Fragment,{children:l.map(h=>(0,i.jsx)(F.Fragment,{children:this.getMappedContent(t,y(g({},e),{parent:t,payloadValue:h}))},B()))})}for(t,e){return this.repeat(t,e)}shouldShow(t,e){var o,s,l;let n=(s=(o=t==null?void 0:t.attrs)==null?void 0:o.showIfKey)!=null?s:"";if(!n)return!0;let{payloadValue:r}=e||{};return r=typeof r=="object"?r:{},!!((l=this.payloadValues.get(n))!=null?l:r[n])}};function Bt(a,t){return M(this,null,function*(){let s=t||{},{theme:e,preview:n}=s,r=V(s,["theme","preview"]),o=new D(a);return o.setPreviewText(n),o.setTheme(e||{}),o.render(r)})}0&&(module.exports={DEFAULT_BUTTON_PADDING_BOTTOM,DEFAULT_BUTTON_PADDING_LEFT,DEFAULT_BUTTON_PADDING_RIGHT,DEFAULT_BUTTON_PADDING_TOP,DEFAULT_COLUMNS_GAP,DEFAULT_COLUMNS_WIDTH,DEFAULT_COLUMN_BACKGROUND_COLOR,DEFAULT_COLUMN_BORDER_COLOR,DEFAULT_COLUMN_BORDER_RADIUS,DEFAULT_COLUMN_BORDER_WIDTH,DEFAULT_COLUMN_PADDING_BOTTOM,DEFAULT_COLUMN_PADDING_LEFT,DEFAULT_COLUMN_PADDING_RIGHT,DEFAULT_COLUMN_PADDING_TOP,DEFAULT_HTML_PROPS,DEFAULT_META_TAGS,DEFAULT_SECTION_ALIGN,DEFAULT_SECTION_BACKGROUND_COLOR,DEFAULT_SECTION_BORDER_COLOR,DEFAULT_SECTION_BORDER_WIDTH,DEFAULT_SECTION_MARGIN_BOTTOM,DEFAULT_SECTION_MARGIN_LEFT,DEFAULT_SECTION_MARGIN_RIGHT,DEFAULT_SECTION_MARGIN_TOP,DEFAULT_SECTION_PADDING_BOTTOM,DEFAULT_SECTION_PADDING_LEFT,DEFAULT_SECTION_PADDING_RIGHT,DEFAULT_SECTION_PADDING_TOP,LINK_PROTOCOL_REGEX,Maily,render});
2
2
  //# sourceMappingURL=index.js.map