@retailrocketgroup/retailrocket-edit.repurchase-vue-email-template-render 3.0.368489 → 3.0.368695

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/assets/main.js +1 -1
  2. package/package.json +1 -1
package/assets/main.js CHANGED
@@ -177,7 +177,7 @@ img.ProseMirror-separator {
177
177
  opacity: 0
178
178
  }`;function yse(e,t,o){const n=document.querySelector(`style[data-tiptap-style${o?`-${o}`:""}]`);if(n!==null)return n;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute(`data-tiptap-style${o?`-${o}`:""}`,""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}let Fse=class extends Rie{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:o})=>{throw o},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:o,slice:n,moved:i})=>this.options.onDrop(o,n,i)),this.on("paste",({event:o,slice:n})=>this.options.onPaste(o,n)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=yse(gse,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,o=!0){this.setOptions({editable:t}),o&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,o){const n=gN(o)?o(t,[...this.state.plugins]):[...this.state.plugins,t],i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}unregisterPlugin(t){if(this.isDestroyed)return;const o=this.state.plugins;let n=o;if([].concat(t).forEach(r=>{const s=typeof r=="string"?`${r}$`:r.key;n=o.filter(a=>!a.key.startsWith(s))}),o.length===n.length)return;const i=this.state.reconfigure({plugins:n});return this.view.updateState(i),i}createExtensionManager(){var t,o;const i=[...this.options.enableCoreExtensions?[mse,Uie.configure({blockSeparator:(o=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||o===void 0?void 0:o.blockSeparator}),dse,fse,pse,Cse,cse,hse].filter(r=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[r.name]!==!1:!0):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r==null?void 0:r.type));this.extensionManager=new jd(i,this)}createCommandManager(){this.commandManager=new M0({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let o;try{o=Yb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),o=Yb(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=vN(o,this.options.autofocus);this.view=new zne(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)===null||t===void 0?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Ud.create({doc:o,selection:n||void 0})});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews(),this.prependClass();const r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const o=this.capturedTransaction;return this.capturedTransaction=null,o}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const o=this.state.apply(t),n=!this.state.selection.eq(o.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:o}),this.view.updateState(o),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const i=t.getMeta("focus"),r=t.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:t}),r&&this.emit("blur",{editor:this,event:r.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return VN(this.state,t)}isActive(t,o){const n=typeof t=="string"?t:null,i=typeof t=="string"?o:t;return Ure(this.state,n,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return zT(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:o=`
179
179
 
180
- `,textSerializers:n={}}=t||{};return Mre(this.state.doc,{blockSeparator:o,textSerializers:{...bN(this.schema),...n}})}get isEmpty(){return JT(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,o){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(t,o))||null}$nodes(t,o){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(t,o))||null}$pos(t){const o=this.state.doc.resolve(t);return new du(o,this)}get $doc(){return this.$pos(0)}};function bse(e){return new yN({find:e.find,handler:({state:t,range:o,match:n})=>{const i=Jt(e.getAttributes,void 0,n)||{},{tr:r}=t,s=o.from;let a=o.to;const l=e.type.create(i);if(n[1]){const u=n[0].lastIndexOf(n[1]);let c=s+u;c>a?c=a:a=c+n[1].length;const m=n[0][n[0].length-1];r.insertText(m,s+n[0].length-1),r.replaceWith(c,a,l)}else if(n[0]){const u=e.type.isInline?s:s-1;r.insert(u,e.type.create(i)).delete(r.mapping.map(s),r.mapping.map(a))}r.scrollIntoView()}})}function ag(e){return new yN({find:e.find,handler:({state:t,range:o,match:n,chain:i})=>{const r=Jt(e.getAttributes,void 0,n)||{},s=t.tr.delete(o.from,o.to),l=s.doc.resolve(o.from).blockRange(),u=l&&PT(l,e.type,r);if(!u)return null;if(s.wrap(l,u),e.keepMarks&&e.editor){const{selection:m,storedMarks:h}=t,{splittableMarks:C}=e.editor.extensionManager,y=h||m.$to.parentOffset&&m.$from.marks();if(y){const F=y.filter(b=>C.includes(b.type.name));s.ensureMarks(F)}}if(e.keepAttributes){const m=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(m,r).run()}const c=s.doc.resolve(o.from-1).nodeBefore;c&&c.type===e.type&&kl(s.doc,o.from-1)&&(!e.joinPredicate||e.joinPredicate(n,c))&&s.join(o.from-1)}})}let Da=class Jb{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Jt(tt(this,"addOptions",{name:this.name}))),this.storage=Jt(tt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Jb(t)}configure(t={}){const o=this.extend({...this.config,addOptions:()=>O0(this.options,t)});return o.name=this.name,o.parent=this.parent,o}extend(t={}){const o=new Jb(t);return o.parent=this,this.child=o,o.name=t.name?t.name:o.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${o.name}".`),o.options=Jt(tt(o,"addOptions",{name:o.name})),o.storage=Jt(tt(o,"addStorage",{name:o.name,options:o.options})),o}};function Sse(e){return new kie({find:e.find,handler:({state:t,range:o,match:n,pasteEvent:i})=>{const r=Jt(e.getAttributes,void 0,n,i);if(r===!1||r===null)return null;const{tr:s}=t,a=n[n.length-1],l=n[0];let u=o.to;if(a){const c=l.search(/\S/),m=o.from+l.indexOf(a),h=m+a.length;if(RN(o.from,o.to,t.doc).filter(y=>y.mark.type.excluded.find(b=>b===e.type&&b!==y.mark.type)).filter(y=>y.to>m).length)return null;h<o.to&&s.delete(h,o.to),m>o.from&&s.delete(o.from+c,m),u=o.from+c+a.length,s.addMark(o.from+c,u,e.type.create(r||{})),s.removeStoredMark(e.type)}}})}function C_(e){return _S((t,o)=>({get(){return t(),e},set(n){e=n,requestAnimationFrame(()=>{requestAnimationFrame(()=>{o()})})}}))}class Tse extends Fse{constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=C_(this.view.state),this.reactiveExtensionStorage=C_(this.extensionStorage),this.on("beforeTransaction",({nextState:o})=>{this.reactiveState.value=o,this.reactiveExtensionStorage.value=this.extensionStorage}),RS(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,o){const n=super.registerPlugin(t,o);return this.reactiveState&&(this.reactiveState.value=n),n}unregisterPlugin(t){const o=super.unregisterPlugin(t);return this.reactiveState&&o&&(this.reactiveState.value=o),o}}const vse=ce({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const t=nt(),o=rn();return _l(()=>{const n=e.editor;n&&n.options.element&&t.value&&er(()=>{if(!t.value||!n.options.element.firstChild)return;const i=v(t.value);t.value.append(...n.options.element.childNodes),n.contentComponent=o.ctx._,o&&(n.appContext={...o.appContext,provides:o.provides}),n.setOptions({element:i}),n.createNodeViews()})}),wr(()=>{const n=e.editor;n&&(n.contentComponent=null,n.appContext=null)}),{rootEl:t}},render(){return is("div",{ref:e=>{this.rootEl=e}})}}),Bse=(e={})=>{const t=Jo();return ai(()=>{t.value=new Tse(e)}),wr(()=>{var o,n,i;const r=(o=t.value)===null||o===void 0?void 0:o.options.element,s=r==null?void 0:r.cloneNode(!0);(n=r==null?void 0:r.parentNode)===null||n===void 0||n.replaceChild(s,r),(i=t.value)===null||i===void 0||i.destroy()}),t},g_=e=>({type:"doc",content:e.Content.map(Lse)}),Lse=e=>"ParagraphNode"in e?EN(e):"BulletListNode"in e?xse(e):"OrderedListNode"in e?Vse(e):"DataFieldNode"in e?_N(e):$n(e),DN=e=>({type:"listItem",content:e.Content.map(t=>"ParagraphNode"in t?EN(t):"ImageNode"in t?PN(t):$n(t))}),_N=e=>({type:"dataField",marks:XT({textStyle:e.DataFieldNode.TextStyle,commonLinkMark:e.DataFieldNode.CommonLinkMark}),attrs:{stringExpression:e.DataFieldNode.StringExpression}}),xse=e=>({type:"bulletList",content:e.BulletListNode.Content.map(DN),attrs:{themeName:e.BulletListNode.ListStyle}}),Vse=e=>({type:"orderedList",content:e.OrderedListNode.Content.map(DN),attrs:{themeName:e.OrderedListNode.ListStyle}}),EN=e=>({type:"paragraph",attrs:{themeName:e.ParagraphNode.ThemeName},content:e.ParagraphNode.Content.map(Rse)}),Rse=e=>"TextNode"in e?Dse(e):"HardBreakNode"in e?Ase():"ImageNode"in e?PN(e):"DataFieldNode"in e?_N(e):$n(e),XT=e=>{const t=[];return e.textStyle&&t.push(Ise(e.textStyle)),e.commonLinkMark&&t.push(Nse(e.commonLinkMark)),t.filter(o=>o!==void 0)},Dse=e=>({type:"text",text:e.TextNode.Text,marks:XT({textStyle:e.TextNode.TextStyle,commonLinkMark:e.TextNode.CommonLinkMark})}),_se=e=>{switch(e){case"Normal":return"normal";case"Bold":return"bold";default:return"normal"}},Ese=e=>{switch(e){case"Normal":return"normal";case"Italic":return"italic";default:return"normal"}},Pse=e=>{switch(e){case"None":return"none";case"Uppercase":return"uppercase";default:return"none"}},wse=e=>{switch(e){case"None":return"none";case"Underline":return"underline";case"LineThrough":return"line-through";default:return"none"}},Ise=e=>({type:"textStyle",attrs:{themeName:e.ThemeName,color:e.Style.Color,fontWeight:e.Style.FontWeight?_se(e.Style.FontWeight):void 0,fontStyle:e.Style.FontStyle?Ese(e.Style.FontStyle):void 0,fontSize:e.Style.FontSize?e.Style.FontSize+"px":void 0,lineHeight:e.Style.LineHeight?e.Style.LineHeight+"px":void 0,fontFamily:e.Style.FontFamily,textTransform:e.Style.TextTransform?Pse(e.Style.TextTransform):void 0,textDecoration:e.Style.TextDecoration?wse(e.Style.TextDecoration):void 0}}),Nse=e=>Io(e).Match({LinkMark:t=>kse({LinkMark:t}),UnsubscribeLinkMark:()=>Mse()}),Ase=()=>({type:"hardBreak"}),PN=e=>({type:"image",attrs:{src:e.ImageNode.Src,alt:e.ImageNode.Alt,isRetina:e.ImageNode.IsRetina,width:e.ImageNode.Width,height:e.ImageNode.Height},marks:XT({commonLinkMark:e.ImageNode.CommonLinkMark})}),kse=e=>({type:"link",attrs:{href:e.LinkMark.Href}}),Mse=()=>({type:"unsubscribeLink"}),Wse=e=>{if(!e.children.length)return;const t=e.querySelectorAll("span");t&&t.forEach(o=>{var n,i;const r=o.getAttribute("style"),s=(i=(n=o.parentElement)===null||n===void 0?void 0:n.closest("span"))===null||i===void 0?void 0:i.getAttribute("style");o.setAttribute("style",`${s};${r}`)})},qT=Qi.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Wse(e),{}):!1}]},renderHTML({HTMLAttributes:e}){return["span",qi(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:e})=>{const{selection:t}=e;return e.doc.nodesBetween(t.from,t.to,(o,n)=>{if(o.isTextblock)return!0;o.marks.filter(i=>i.type===this.type).some(i=>Object.values(i.attrs).some(r=>!!r))||e.removeMark(n,n+o.nodeSize,this.type)}),!0}}}}),Ose=On.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Rn({key:new Li("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:o,isFocused:n}=this.editor,{anchor:i}=t,r=[];if(!o||!n)return Ko.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(l.isText)return;if(!(i>=u&&i<=u+l.nodeSize-1))return!1;s+=1});let a=0;return e.descendants((l,u)=>{if(l.isText||!(i>=u&&i<=u+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&s-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";r.push(Tr.node(u,u+l.nodeSize,{class:this.options.className}))}),Ko.create(e,r)}}})]}}),$se=Da.create({name:"text",group:"inline"}),Hse=Da.create({name:"doc",topNode:!0,content:"block+"}),wN=Qi.create({name:"textTransform",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textTransform:{default:"none",parseHTML:e=>e.style.textTransform,renderHTML:e=>e.textTransform?{style:`text-transform: ${e.textTransform}`}:{}}}}]},addCommands(){return{setTextTransform:e=>({chain:t})=>t().setMark("textStyle",{textTransform:e}).run(),unsetTextTransform:()=>({chain:e,state:t})=>{const{from:o,to:n,$from:i}=t.selection;return t.doc.textBetween(o,n," ").length?e().setMark("textStyle",{textTransform:"none"}).run():e().setTextSelection({from:i.pos-i.nodeBefore.nodeSize,to:i.pos+i.nodeAfter.nodeSize}).setMark("textStyle",{textTransform:"none"}).focus().run()}}}}),Use=Qi.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:e=>e.style.fontSize.replace(/['"]+/g,""),renderHTML:e=>e.fontSize?{style:`font-size: ${e.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:e=>({chain:t})=>t().setMark("textStyle",{fontSize:e+"px"}).run(),resetFontSize:()=>({chain:e})=>e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),jse=Qi.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:e=>e.style.lineHeight.replace(/['"]+/g,""),renderHTML:e=>e.lineHeight?{style:`line-height: ${e.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:e=>({chain:t})=>t().setMark("textStyle",{lineHeight:e+"px"}).run(),resetLineHeight:()=>({chain:e})=>e().setMark("textStyle",{lineHeight:null}).run()}}}),zse=e=>On.create({name:"themeFontStyles",priority:1e3,addOptions(){return{types:["textStyle","bulletList","orderedList","paragraph"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{themeName:{default:null,parseHTML:t=>t.getAttribute("data-theme"),renderHTML:t=>t.themeName?{"data-theme":t.themeName,class:t.themeName}:{"data-theme":e,class:t.themeName}}}}]},addCommands(){return{setThemeSettings:t=>({chain:o,state:n})=>{const{$from:i}=n.selection,r=i.parent,s=i.index();return r.child(s).type.name==="image"?!1:o().setMark("textStyle",{themeName:t}).run()},applySiblingNodeThemeSettings:()=>({chain:t,state:o})=>{var y,F;const{from:n,to:i,$from:r}=o.selection,s=r.parent,a=r.index(),l=((y=r.node(r.depth))==null?void 0:y.type.name)==="dataField"||((F=s.maybeChild(a))==null?void 0:F.type.name)==="dataField",u=s.child(a).type.name==="image",c=b=>{const T="NormalText",V=b.index>0?s.child(b.index-1):void 0,x=b.index+1<s.childCount?s.child(b.index+1):void 0,L=V??x;if(L){const w=L.marks.find(N=>N.type.name==="textStyle");if(w)return w.attrs.themeName}return T};if(l){const b=c({index:a});return t().unsetMark("textStyle",{extendEmptyMarkRange:!0}).setThemeSettings(b).run()}if(u)return!1;const m=c({index:a}),h=r.nodeBefore?r.pos-r.nodeBefore.nodeSize:n,C=r.nodeAfter?r.pos+r.nodeAfter.nodeSize:i;return t().setTextSelection({from:h,to:C}).setThemeSettings(m).run()}}},addProseMirrorPlugins(){return[new Rn({key:new Li("syncBlockTheme"),appendTransaction:(t,o,n)=>{const i=n.tr;let r=!1;return n.doc.descendants((s,a)=>{var l,u;if(s.type.name==="bulletList"||s.type.name==="orderedList"){const c=s.firstChild,m=c==null?void 0:c.firstChild,h=m==null?void 0:m.firstChild;if(h){const C=(l=h.marks.find(y=>y.type.name==="textStyle"))==null?void 0:l.attrs.themeName;C&&s.attrs.themeName!==C&&(i.setNodeMarkup(a,void 0,{...s.attrs,themeName:C}),r=!0)}}if(s.type.name==="paragraph"){const c=s.firstChild;if(c){const m=(u=c.marks.find(h=>h.type.name==="textStyle"))==null?void 0:u.attrs.themeName;m&&s.attrs.themeName!==m&&(i.setNodeMarkup(a,void 0,{...s.attrs,themeName:m}),r=!0)}}}),r?i:null}})]}}),Gse=Qi.create({name:"fontWeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontWeight:{default:null,parseHTML:e=>e.style.fontWeight,renderHTML:e=>e.fontWeight?{style:`font-weight: ${e.fontWeight}`}:{}}}}]},addCommands(){return{setFontWeight:e=>({chain:t})=>t().setMark("textStyle",{fontWeight:e}).run(),unsetFontWeight:()=>({chain:e,state:t})=>{const{from:o,to:n,$from:i}=t.selection;return t.doc.textBetween(o,n," ").length?e().setMark("textStyle",{fontWeight:"normal"}).run():e().setTextSelection({from:i.pos-i.nodeBefore.nodeSize,to:i.pos+i.nodeAfter.nodeSize}).setMark("textStyle",{fontWeight:"normal"}).focus().run()},resetFontWeight:()=>({chain:e})=>e().setMark("textStyle",{fontWeight:null}).removeEmptyTextStyle().run()}}}),Kse=Qi.create({name:"fontStyle",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontStyle:{default:null,parseHTML:e=>e.style.fontStyle,renderHTML:e=>e.fontStyle?{style:`font-style: ${e.fontStyle}`}:{}}}}]},addCommands(){return{setFontStyle:e=>({chain:t})=>t().setMark("textStyle",{fontStyle:e}).run(),unsetFontStyle:()=>({chain:e,state:t})=>{const{from:o,to:n,$from:i}=t.selection;return t.doc.textBetween(o,n," ").length?e().setMark("textStyle",{fontStyle:"normal"}).run():e().setTextSelection({from:i.pos-i.nodeBefore.nodeSize,to:i.pos+i.nodeAfter.nodeSize}).setMark("textStyle",{fontStyle:"normal"}).focus().run()},resetFontStyle:()=>({chain:e})=>e().setMark("textStyle",{fontStyle:null}).removeEmptyTextStyle().run()}}}),QT=Qi.create({name:"unsubscribeLink",priority:1e3,addOptions(){return{HTMLAttributes:{"data-type":"unsubscribe-link",class:"rich-text__unsubscribe-link"}}},parseHTML(){return[{tag:'span[data-type="unsubscribe-link"]'}]},renderHTML({HTMLAttributes:e}){return["span",qi(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnsubscribeLink:()=>({chain:e})=>e().setMark("unsubscribeLink").focus().run(),unsetUnsubscribeLink:()=>({chain:e,state:t})=>{const{from:o,to:n}=t.selection,i=t.doc.textBetween(o,n," "),r=t.doc.nodeAt(o);return(r==null?void 0:r.type.name)==="image"?e().unsetMark("unsubscribeLink").focus().run():i.length?e().setTextSelection({from:o,to:o+i.length}).unsetMark("unsubscribeLink").focus().run():e().unsetMark("unsubscribeLink",{extendEmptyMarkRange:!0}).focus().run()}}}}),Yse="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Zse="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",_c=(e,t)=>{for(const o in t)e[o]=t[o];return e},Xb="numeric",qb="ascii",Qb="alpha",uf="asciinumeric",Om="alphanumeric",eS="domain",IN="emoji",Jse="scheme",Xse="slashscheme",L1="whitespace";function qse(e,t){return e in t||(t[e]=[]),t[e]}function Cu(e,t,o){t[Xb]&&(t[uf]=!0,t[Om]=!0),t[qb]&&(t[uf]=!0,t[Qb]=!0),t[uf]&&(t[Om]=!0),t[Qb]&&(t[Om]=!0),t[Om]&&(t[eS]=!0),t[IN]&&(t[eS]=!0);for(const n in t){const i=qse(n,o);i.indexOf(e)<0&&i.push(e)}}function Qse(e,t){const o={};for(const n in t)t[n].indexOf(e)>=0&&(o[n]=!0);return o}function yi(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}yi.groups={};yi.prototype={accepts(){return!!this.t},go(e){const t=this,o=t.j[e];if(o)return o;for(let n=0;n<t.jr.length;n++){const i=t.jr[n][0],r=t.jr[n][1];if(r&&i.test(e))return r}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,o,n){for(let i=0;i<e.length;i++)this.tt(e[i],t,o,n)},tr(e,t,o,n){n=n||yi.groups;let i;return t&&t.j?i=t:(i=new yi(t),o&&n&&Cu(t,o,n)),this.jr.push([e,i]),i},ts(e,t,o,n){let i=this;const r=e.length;if(!r)return i;for(let s=0;s<r-1;s++)i=i.tt(e[s]);return i.tt(e[r-1],t,o,n)},tt(e,t,o,n){n=n||yi.groups;const i=this;if(t&&t.j)return i.j[e]=t,t;const r=t;let s,a=i.go(e);if(a?(s=new yi,_c(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new yi,r){if(n)if(s.t&&typeof s.t=="string"){const l=_c(Qse(s.t,n),o);Cu(r,l,n)}else o&&Cu(r,o,n);s.t=r}return i.j[e]=s,s}};const Ot=(e,t,o,n,i)=>e.ta(t,o,n,i),Mo=(e,t,o,n,i)=>e.tr(t,o,n,i),y_=(e,t,o,n,i)=>e.ts(t,o,n,i),Ie=(e,t,o,n,i)=>e.tt(t,o,n,i),sa="WORD",tS="UWORD",NN="ASCIINUMERICAL",AN="ALPHANUMERICAL",$f="LOCALHOST",oS="TLD",nS="UTLD",yC="SCHEME",kd="SLASH_SCHEME",ev="NUM",iS="WS",tv="NL",df="OPENBRACE",cf="CLOSEBRACE",lg="OPENBRACKET",ug="CLOSEBRACKET",dg="OPENPAREN",cg="CLOSEPAREN",mg="OPENANGLEBRACKET",fg="CLOSEANGLEBRACKET",pg="FULLWIDTHLEFTPAREN",hg="FULLWIDTHRIGHTPAREN",Cg="LEFTCORNERBRACKET",gg="RIGHTCORNERBRACKET",yg="LEFTWHITECORNERBRACKET",Fg="RIGHTWHITECORNERBRACKET",bg="FULLWIDTHLESSTHAN",Sg="FULLWIDTHGREATERTHAN",Tg="AMPERSAND",ov="APOSTROPHE",vg="ASTERISK",el="AT",Bg="BACKSLASH",Lg="BACKTICK",xg="CARET",rl="COLON",nv="COMMA",Vg="DOLLAR",Fs="DOT",Rg="EQUALS",iv="EXCLAMATION",Cr="HYPHEN",mf="PERCENT",Dg="PIPE",_g="PLUS",Eg="POUND",ff="QUERY",rv="QUOTE",kN="FULLWIDTHMIDDLEDOT",sv="SEMI",bs="SLASH",pf="TILDE",Pg="UNDERSCORE",MN="EMOJI",wg="SYM";var WN=Object.freeze({__proto__:null,WORD:sa,UWORD:tS,ASCIINUMERICAL:NN,ALPHANUMERICAL:AN,LOCALHOST:$f,TLD:oS,UTLD:nS,SCHEME:yC,SLASH_SCHEME:kd,NUM:ev,WS:iS,NL:tv,OPENBRACE:df,CLOSEBRACE:cf,OPENBRACKET:lg,CLOSEBRACKET:ug,OPENPAREN:dg,CLOSEPAREN:cg,OPENANGLEBRACKET:mg,CLOSEANGLEBRACKET:fg,FULLWIDTHLEFTPAREN:pg,FULLWIDTHRIGHTPAREN:hg,LEFTCORNERBRACKET:Cg,RIGHTCORNERBRACKET:gg,LEFTWHITECORNERBRACKET:yg,RIGHTWHITECORNERBRACKET:Fg,FULLWIDTHLESSTHAN:bg,FULLWIDTHGREATERTHAN:Sg,AMPERSAND:Tg,APOSTROPHE:ov,ASTERISK:vg,AT:el,BACKSLASH:Bg,BACKTICK:Lg,CARET:xg,COLON:rl,COMMA:nv,DOLLAR:Vg,DOT:Fs,EQUALS:Rg,EXCLAMATION:iv,HYPHEN:Cr,PERCENT:mf,PIPE:Dg,PLUS:_g,POUND:Eg,QUERY:ff,QUOTE:rv,FULLWIDTHMIDDLEDOT:kN,SEMI:sv,SLASH:bs,TILDE:pf,UNDERSCORE:Pg,EMOJI:MN,SYM:wg});const ia=/[a-z]/,_m=/\p{L}/u,x1=/\p{Emoji}/u,ra=/\d/,V1=/\s/,F_="\r",R1=`
180
+ `,textSerializers:n={}}=t||{};return Mre(this.state.doc,{blockSeparator:o,textSerializers:{...bN(this.schema),...n}})}get isEmpty(){return JT(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,o){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(t,o))||null}$nodes(t,o){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(t,o))||null}$pos(t){const o=this.state.doc.resolve(t);return new du(o,this)}get $doc(){return this.$pos(0)}};function bse(e){return new yN({find:e.find,handler:({state:t,range:o,match:n})=>{const i=Jt(e.getAttributes,void 0,n)||{},{tr:r}=t,s=o.from;let a=o.to;const l=e.type.create(i);if(n[1]){const u=n[0].lastIndexOf(n[1]);let c=s+u;c>a?c=a:a=c+n[1].length;const m=n[0][n[0].length-1];r.insertText(m,s+n[0].length-1),r.replaceWith(c,a,l)}else if(n[0]){const u=e.type.isInline?s:s-1;r.insert(u,e.type.create(i)).delete(r.mapping.map(s),r.mapping.map(a))}r.scrollIntoView()}})}function ag(e){return new yN({find:e.find,handler:({state:t,range:o,match:n,chain:i})=>{const r=Jt(e.getAttributes,void 0,n)||{},s=t.tr.delete(o.from,o.to),l=s.doc.resolve(o.from).blockRange(),u=l&&PT(l,e.type,r);if(!u)return null;if(s.wrap(l,u),e.keepMarks&&e.editor){const{selection:m,storedMarks:h}=t,{splittableMarks:C}=e.editor.extensionManager,y=h||m.$to.parentOffset&&m.$from.marks();if(y){const F=y.filter(b=>C.includes(b.type.name));s.ensureMarks(F)}}if(e.keepAttributes){const m=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(m,r).run()}const c=s.doc.resolve(o.from-1).nodeBefore;c&&c.type===e.type&&kl(s.doc,o.from-1)&&(!e.joinPredicate||e.joinPredicate(n,c))&&s.join(o.from-1)}})}let Da=class Jb{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Jt(tt(this,"addOptions",{name:this.name}))),this.storage=Jt(tt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Jb(t)}configure(t={}){const o=this.extend({...this.config,addOptions:()=>O0(this.options,t)});return o.name=this.name,o.parent=this.parent,o}extend(t={}){const o=new Jb(t);return o.parent=this,this.child=o,o.name=t.name?t.name:o.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${o.name}".`),o.options=Jt(tt(o,"addOptions",{name:o.name})),o.storage=Jt(tt(o,"addStorage",{name:o.name,options:o.options})),o}};function Sse(e){return new kie({find:e.find,handler:({state:t,range:o,match:n,pasteEvent:i})=>{const r=Jt(e.getAttributes,void 0,n,i);if(r===!1||r===null)return null;const{tr:s}=t,a=n[n.length-1],l=n[0];let u=o.to;if(a){const c=l.search(/\S/),m=o.from+l.indexOf(a),h=m+a.length;if(RN(o.from,o.to,t.doc).filter(y=>y.mark.type.excluded.find(b=>b===e.type&&b!==y.mark.type)).filter(y=>y.to>m).length)return null;h<o.to&&s.delete(h,o.to),m>o.from&&s.delete(o.from+c,m),u=o.from+c+a.length,s.addMark(o.from+c,u,e.type.create(r||{})),s.removeStoredMark(e.type)}}})}function C_(e){return _S((t,o)=>({get(){return t(),e},set(n){e=n,requestAnimationFrame(()=>{requestAnimationFrame(()=>{o()})})}}))}class Tse extends Fse{constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=C_(this.view.state),this.reactiveExtensionStorage=C_(this.extensionStorage),this.on("beforeTransaction",({nextState:o})=>{this.reactiveState.value=o,this.reactiveExtensionStorage.value=this.extensionStorage}),RS(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,o){const n=super.registerPlugin(t,o);return this.reactiveState&&(this.reactiveState.value=n),n}unregisterPlugin(t){const o=super.unregisterPlugin(t);return this.reactiveState&&o&&(this.reactiveState.value=o),o}}const vse=ce({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const t=nt(),o=rn();return _l(()=>{const n=e.editor;n&&n.options.element&&t.value&&er(()=>{if(!t.value||!n.options.element.firstChild)return;const i=v(t.value);t.value.append(...n.options.element.childNodes),n.contentComponent=o.ctx._,o&&(n.appContext={...o.appContext,provides:o.provides}),n.setOptions({element:i}),n.createNodeViews()})}),wr(()=>{const n=e.editor;n&&(n.contentComponent=null,n.appContext=null)}),{rootEl:t}},render(){return is("div",{ref:e=>{this.rootEl=e}})}}),Bse=(e={})=>{const t=Jo();return ai(()=>{t.value=new Tse(e)}),wr(()=>{var o,n,i;const r=(o=t.value)===null||o===void 0?void 0:o.options.element,s=r==null?void 0:r.cloneNode(!0);(n=r==null?void 0:r.parentNode)===null||n===void 0||n.replaceChild(s,r),(i=t.value)===null||i===void 0||i.destroy()}),t},g_=e=>({type:"doc",content:e.Content.map(Lse)}),Lse=e=>"ParagraphNode"in e?EN(e):"BulletListNode"in e?xse(e):"OrderedListNode"in e?Vse(e):"DataFieldNode"in e?_N(e):$n(e),DN=e=>({type:"listItem",content:e.Content.map(t=>"ParagraphNode"in t?EN(t):"ImageNode"in t?PN(t):$n(t))}),_N=e=>({type:"dataField",marks:XT({textStyle:e.DataFieldNode.TextStyle,commonLinkMark:e.DataFieldNode.CommonLinkMark}),attrs:{stringExpression:e.DataFieldNode.StringExpression}}),xse=e=>({type:"bulletList",content:e.BulletListNode.Content.map(DN),attrs:{themeName:e.BulletListNode.ListStyle}}),Vse=e=>({type:"orderedList",content:e.OrderedListNode.Content.map(DN),attrs:{themeName:e.OrderedListNode.ListStyle}}),EN=e=>({type:"paragraph",attrs:{themeName:e.ParagraphNode.ThemeName},content:e.ParagraphNode.Content.map(Rse)}),Rse=e=>"TextNode"in e?Dse(e):"HardBreakNode"in e?Ase():"ImageNode"in e?PN(e):"DataFieldNode"in e?_N(e):$n(e),XT=e=>{const t=[];return e.textStyle&&t.push(Ise(e.textStyle)),e.commonLinkMark&&t.push(Nse(e.commonLinkMark)),t.filter(o=>o!==void 0)},Dse=e=>({type:"text",text:e.TextNode.Text,marks:XT({textStyle:e.TextNode.TextStyle,commonLinkMark:e.TextNode.CommonLinkMark})}),_se=e=>{switch(e){case"Normal":return"normal";case"Bold":return"bold";default:return"normal"}},Ese=e=>{switch(e){case"Normal":return"normal";case"Italic":return"italic";default:return"normal"}},Pse=e=>{switch(e){case"None":return"none";case"Uppercase":return"uppercase";default:return"none"}},wse=e=>{switch(e){case"None":return"none";case"Underline":return"underline";case"LineThrough":return"line-through";default:return"none"}},Ise=e=>({type:"textStyle",attrs:{themeName:e.ThemeName,color:e.Style.Color,fontWeight:e.Style.FontWeight?_se(e.Style.FontWeight):void 0,fontStyle:e.Style.FontStyle?Ese(e.Style.FontStyle):void 0,fontSize:e.Style.FontSize?e.Style.FontSize+"px":void 0,lineHeight:e.Style.LineHeight?e.Style.LineHeight+"px":void 0,fontFamily:e.Style.FontFamily,textTransform:e.Style.TextTransform?Pse(e.Style.TextTransform):void 0,textDecoration:e.Style.TextDecoration?wse(e.Style.TextDecoration):void 0}}),Nse=e=>Io(e).Match({LinkMark:t=>kse({LinkMark:t}),UnsubscribeLinkMark:()=>Mse()}),Ase=()=>({type:"hardBreak"}),PN=e=>({type:"image",attrs:{src:e.ImageNode.Src,alt:e.ImageNode.Alt,isRetina:e.ImageNode.IsRetina,width:e.ImageNode.Width,height:e.ImageNode.Height},marks:XT({commonLinkMark:e.ImageNode.CommonLinkMark})}),kse=e=>({type:"link",attrs:{href:e.LinkMark.Href}}),Mse=()=>({type:"unsubscribeLink"}),Wse=e=>{if(!e.children.length)return;const t=e.querySelectorAll("span");t&&t.forEach(o=>{var n,i;const r=o.getAttribute("style"),s=(i=(n=o.parentElement)===null||n===void 0?void 0:n.closest("span"))===null||i===void 0?void 0:i.getAttribute("style");o.setAttribute("style",`${s};${r}`)})},qT=Qi.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Wse(e),{}):!1}]},renderHTML({HTMLAttributes:e}){return["span",qi(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:e})=>{const{selection:t}=e;return e.doc.nodesBetween(t.from,t.to,(o,n)=>{if(o.isTextblock)return!0;o.marks.filter(i=>i.type===this.type).some(i=>Object.values(i.attrs).some(r=>!!r))||e.removeMark(n,n+o.nodeSize,this.type)}),!0}}}}),Ose=On.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Rn({key:new Li("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:o,isFocused:n}=this.editor,{anchor:i}=t,r=[];if(!o||!n)return Ko.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(l.isText)return;if(!(i>=u&&i<=u+l.nodeSize-1))return!1;s+=1});let a=0;return e.descendants((l,u)=>{if(l.isText||!(i>=u&&i<=u+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&s-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";r.push(Tr.node(u,u+l.nodeSize,{class:this.options.className}))}),Ko.create(e,r)}}})]}}),$se=Da.create({name:"text",group:"inline"}),Hse=Da.create({name:"doc",topNode:!0,content:"block+"}),wN=Qi.create({name:"textTransform",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textTransform:{default:"none",parseHTML:e=>e.style.textTransform,renderHTML:e=>e.textTransform?{style:`text-transform: ${e.textTransform}`}:{}}}}]},addCommands(){return{setTextTransform:e=>({chain:t})=>t().setMark("textStyle",{textTransform:e}).run(),unsetTextTransform:()=>({chain:e,state:t})=>{const{from:o,to:n,$from:i}=t.selection;return t.doc.textBetween(o,n," ").length?e().setMark("textStyle",{textTransform:"none"}).run():e().setTextSelection({from:i.pos-i.nodeBefore.nodeSize,to:i.pos+i.nodeAfter.nodeSize}).setMark("textStyle",{textTransform:"none"}).focus().run()}}}}),Use=Qi.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:e=>e.style.fontSize.replace(/['"]+/g,""),renderHTML:e=>e.fontSize?{style:`font-size: ${e.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:e=>({chain:t})=>t().setMark("textStyle",{fontSize:e+"px"}).run(),resetFontSize:()=>({chain:e})=>e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),jse=Qi.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:e=>e.style.lineHeight.replace(/['"]+/g,""),renderHTML:e=>e.lineHeight?{style:`line-height: ${e.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:e=>({chain:t})=>t().setMark("textStyle",{lineHeight:e+"px"}).run(),resetLineHeight:()=>({chain:e})=>e().setMark("textStyle",{lineHeight:null}).run()}}}),zse=e=>On.create({name:"themeFontStyles",priority:1e3,addOptions(){return{types:["textStyle","bulletList","orderedList","paragraph"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{themeName:{default:e,parseHTML:t=>t.getAttribute("data-theme"),renderHTML:t=>t.themeName?{"data-theme":t.themeName,class:t.themeName}:{"data-theme":e,class:t.themeName}}}}]},addCommands(){return{setThemeSettings:t=>({chain:o,state:n})=>{const{$from:i}=n.selection,r=i.parent,s=i.index();return r.child(s).type.name==="image"?!1:o().setMark("textStyle",{themeName:t}).run()},applySiblingNodeThemeSettings:()=>({chain:t,state:o})=>{var y,F;const{from:n,to:i,$from:r}=o.selection,s=r.parent,a=r.index(),l=((y=r.node(r.depth))==null?void 0:y.type.name)==="dataField"||((F=s.maybeChild(a))==null?void 0:F.type.name)==="dataField",u=s.child(a).type.name==="image",c=b=>{const T="NormalText",V=b.index>0?s.child(b.index-1):void 0,x=b.index+1<s.childCount?s.child(b.index+1):void 0,L=V??x;if(L){const w=L.marks.find(N=>N.type.name==="textStyle");if(w)return w.attrs.themeName}return T};if(l){const b=c({index:a});return t().unsetMark("textStyle",{extendEmptyMarkRange:!0}).setThemeSettings(b).run()}if(u)return!1;const m=c({index:a}),h=r.nodeBefore?r.pos-r.nodeBefore.nodeSize:n,C=r.nodeAfter?r.pos+r.nodeAfter.nodeSize:i;return t().setTextSelection({from:h,to:C}).setThemeSettings(m).run()}}},addProseMirrorPlugins(){return[new Rn({key:new Li("syncBlockTheme"),appendTransaction:(t,o,n)=>{const i=n.tr;let r=!1;return n.doc.descendants((s,a)=>{var l,u;if(s.type.name==="bulletList"||s.type.name==="orderedList"){const c=s.firstChild,m=c==null?void 0:c.firstChild,h=m==null?void 0:m.firstChild;if(h){const C=(l=h.marks.find(y=>y.type.name==="textStyle"))==null?void 0:l.attrs.themeName;C&&s.attrs.themeName!==C&&(i.setNodeMarkup(a,void 0,{...s.attrs,themeName:C}),r=!0)}}if(s.type.name==="paragraph"){const c=s.firstChild;if(c){const m=(u=c.marks.find(h=>h.type.name==="textStyle"))==null?void 0:u.attrs.themeName;m&&s.attrs.themeName!==m&&(i.setNodeMarkup(a,void 0,{...s.attrs,themeName:m}),r=!0)}}}),r?i:null}})]}}),Gse=Qi.create({name:"fontWeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontWeight:{default:null,parseHTML:e=>e.style.fontWeight,renderHTML:e=>e.fontWeight?{style:`font-weight: ${e.fontWeight}`}:{}}}}]},addCommands(){return{setFontWeight:e=>({chain:t})=>t().setMark("textStyle",{fontWeight:e}).run(),unsetFontWeight:()=>({chain:e,state:t})=>{const{from:o,to:n,$from:i}=t.selection;return t.doc.textBetween(o,n," ").length?e().setMark("textStyle",{fontWeight:"normal"}).run():e().setTextSelection({from:i.pos-i.nodeBefore.nodeSize,to:i.pos+i.nodeAfter.nodeSize}).setMark("textStyle",{fontWeight:"normal"}).focus().run()},resetFontWeight:()=>({chain:e})=>e().setMark("textStyle",{fontWeight:null}).removeEmptyTextStyle().run()}}}),Kse=Qi.create({name:"fontStyle",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontStyle:{default:null,parseHTML:e=>e.style.fontStyle,renderHTML:e=>e.fontStyle?{style:`font-style: ${e.fontStyle}`}:{}}}}]},addCommands(){return{setFontStyle:e=>({chain:t})=>t().setMark("textStyle",{fontStyle:e}).run(),unsetFontStyle:()=>({chain:e,state:t})=>{const{from:o,to:n,$from:i}=t.selection;return t.doc.textBetween(o,n," ").length?e().setMark("textStyle",{fontStyle:"normal"}).run():e().setTextSelection({from:i.pos-i.nodeBefore.nodeSize,to:i.pos+i.nodeAfter.nodeSize}).setMark("textStyle",{fontStyle:"normal"}).focus().run()},resetFontStyle:()=>({chain:e})=>e().setMark("textStyle",{fontStyle:null}).removeEmptyTextStyle().run()}}}),QT=Qi.create({name:"unsubscribeLink",priority:1e3,addOptions(){return{HTMLAttributes:{"data-type":"unsubscribe-link",class:"rich-text__unsubscribe-link"}}},parseHTML(){return[{tag:'span[data-type="unsubscribe-link"]'}]},renderHTML({HTMLAttributes:e}){return["span",qi(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnsubscribeLink:()=>({chain:e})=>e().setMark("unsubscribeLink").focus().run(),unsetUnsubscribeLink:()=>({chain:e,state:t})=>{const{from:o,to:n}=t.selection,i=t.doc.textBetween(o,n," "),r=t.doc.nodeAt(o);return(r==null?void 0:r.type.name)==="image"?e().unsetMark("unsubscribeLink").focus().run():i.length?e().setTextSelection({from:o,to:o+i.length}).unsetMark("unsubscribeLink").focus().run():e().unsetMark("unsubscribeLink",{extendEmptyMarkRange:!0}).focus().run()}}}}),Yse="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Zse="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",_c=(e,t)=>{for(const o in t)e[o]=t[o];return e},Xb="numeric",qb="ascii",Qb="alpha",uf="asciinumeric",Om="alphanumeric",eS="domain",IN="emoji",Jse="scheme",Xse="slashscheme",L1="whitespace";function qse(e,t){return e in t||(t[e]=[]),t[e]}function Cu(e,t,o){t[Xb]&&(t[uf]=!0,t[Om]=!0),t[qb]&&(t[uf]=!0,t[Qb]=!0),t[uf]&&(t[Om]=!0),t[Qb]&&(t[Om]=!0),t[Om]&&(t[eS]=!0),t[IN]&&(t[eS]=!0);for(const n in t){const i=qse(n,o);i.indexOf(e)<0&&i.push(e)}}function Qse(e,t){const o={};for(const n in t)t[n].indexOf(e)>=0&&(o[n]=!0);return o}function yi(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}yi.groups={};yi.prototype={accepts(){return!!this.t},go(e){const t=this,o=t.j[e];if(o)return o;for(let n=0;n<t.jr.length;n++){const i=t.jr[n][0],r=t.jr[n][1];if(r&&i.test(e))return r}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,o,n){for(let i=0;i<e.length;i++)this.tt(e[i],t,o,n)},tr(e,t,o,n){n=n||yi.groups;let i;return t&&t.j?i=t:(i=new yi(t),o&&n&&Cu(t,o,n)),this.jr.push([e,i]),i},ts(e,t,o,n){let i=this;const r=e.length;if(!r)return i;for(let s=0;s<r-1;s++)i=i.tt(e[s]);return i.tt(e[r-1],t,o,n)},tt(e,t,o,n){n=n||yi.groups;const i=this;if(t&&t.j)return i.j[e]=t,t;const r=t;let s,a=i.go(e);if(a?(s=new yi,_c(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new yi,r){if(n)if(s.t&&typeof s.t=="string"){const l=_c(Qse(s.t,n),o);Cu(r,l,n)}else o&&Cu(r,o,n);s.t=r}return i.j[e]=s,s}};const Ot=(e,t,o,n,i)=>e.ta(t,o,n,i),Mo=(e,t,o,n,i)=>e.tr(t,o,n,i),y_=(e,t,o,n,i)=>e.ts(t,o,n,i),Ie=(e,t,o,n,i)=>e.tt(t,o,n,i),sa="WORD",tS="UWORD",NN="ASCIINUMERICAL",AN="ALPHANUMERICAL",$f="LOCALHOST",oS="TLD",nS="UTLD",yC="SCHEME",kd="SLASH_SCHEME",ev="NUM",iS="WS",tv="NL",df="OPENBRACE",cf="CLOSEBRACE",lg="OPENBRACKET",ug="CLOSEBRACKET",dg="OPENPAREN",cg="CLOSEPAREN",mg="OPENANGLEBRACKET",fg="CLOSEANGLEBRACKET",pg="FULLWIDTHLEFTPAREN",hg="FULLWIDTHRIGHTPAREN",Cg="LEFTCORNERBRACKET",gg="RIGHTCORNERBRACKET",yg="LEFTWHITECORNERBRACKET",Fg="RIGHTWHITECORNERBRACKET",bg="FULLWIDTHLESSTHAN",Sg="FULLWIDTHGREATERTHAN",Tg="AMPERSAND",ov="APOSTROPHE",vg="ASTERISK",el="AT",Bg="BACKSLASH",Lg="BACKTICK",xg="CARET",rl="COLON",nv="COMMA",Vg="DOLLAR",Fs="DOT",Rg="EQUALS",iv="EXCLAMATION",Cr="HYPHEN",mf="PERCENT",Dg="PIPE",_g="PLUS",Eg="POUND",ff="QUERY",rv="QUOTE",kN="FULLWIDTHMIDDLEDOT",sv="SEMI",bs="SLASH",pf="TILDE",Pg="UNDERSCORE",MN="EMOJI",wg="SYM";var WN=Object.freeze({__proto__:null,WORD:sa,UWORD:tS,ASCIINUMERICAL:NN,ALPHANUMERICAL:AN,LOCALHOST:$f,TLD:oS,UTLD:nS,SCHEME:yC,SLASH_SCHEME:kd,NUM:ev,WS:iS,NL:tv,OPENBRACE:df,CLOSEBRACE:cf,OPENBRACKET:lg,CLOSEBRACKET:ug,OPENPAREN:dg,CLOSEPAREN:cg,OPENANGLEBRACKET:mg,CLOSEANGLEBRACKET:fg,FULLWIDTHLEFTPAREN:pg,FULLWIDTHRIGHTPAREN:hg,LEFTCORNERBRACKET:Cg,RIGHTCORNERBRACKET:gg,LEFTWHITECORNERBRACKET:yg,RIGHTWHITECORNERBRACKET:Fg,FULLWIDTHLESSTHAN:bg,FULLWIDTHGREATERTHAN:Sg,AMPERSAND:Tg,APOSTROPHE:ov,ASTERISK:vg,AT:el,BACKSLASH:Bg,BACKTICK:Lg,CARET:xg,COLON:rl,COMMA:nv,DOLLAR:Vg,DOT:Fs,EQUALS:Rg,EXCLAMATION:iv,HYPHEN:Cr,PERCENT:mf,PIPE:Dg,PLUS:_g,POUND:Eg,QUERY:ff,QUOTE:rv,FULLWIDTHMIDDLEDOT:kN,SEMI:sv,SLASH:bs,TILDE:pf,UNDERSCORE:Pg,EMOJI:MN,SYM:wg});const ia=/[a-z]/,_m=/\p{L}/u,x1=/\p{Emoji}/u,ra=/\d/,V1=/\s/,F_="\r",R1=`
181
181
  `,eae="️",tae="‍",D1="";let Yh=null,Zh=null;function oae(e=[]){const t={};yi.groups=t;const o=new yi;Yh==null&&(Yh=b_(Yse)),Zh==null&&(Zh=b_(Zse)),Ie(o,"'",ov),Ie(o,"{",df),Ie(o,"}",cf),Ie(o,"[",lg),Ie(o,"]",ug),Ie(o,"(",dg),Ie(o,")",cg),Ie(o,"<",mg),Ie(o,">",fg),Ie(o,"(",pg),Ie(o,")",hg),Ie(o,"「",Cg),Ie(o,"」",gg),Ie(o,"『",yg),Ie(o,"』",Fg),Ie(o,"<",bg),Ie(o,">",Sg),Ie(o,"&",Tg),Ie(o,"*",vg),Ie(o,"@",el),Ie(o,"`",Lg),Ie(o,"^",xg),Ie(o,":",rl),Ie(o,",",nv),Ie(o,"$",Vg),Ie(o,".",Fs),Ie(o,"=",Rg),Ie(o,"!",iv),Ie(o,"-",Cr),Ie(o,"%",mf),Ie(o,"|",Dg),Ie(o,"+",_g),Ie(o,"#",Eg),Ie(o,"?",ff),Ie(o,'"',rv),Ie(o,"/",bs),Ie(o,";",sv),Ie(o,"~",pf),Ie(o,"_",Pg),Ie(o,"\\",Bg),Ie(o,"・",kN);const n=Mo(o,ra,ev,{[Xb]:!0});Mo(n,ra,n);const i=Mo(n,ia,NN,{[uf]:!0}),r=Mo(n,_m,AN,{[Om]:!0}),s=Mo(o,ia,sa,{[qb]:!0});Mo(s,ra,i),Mo(s,ia,s),Mo(i,ra,i),Mo(i,ia,i);const a=Mo(o,_m,tS,{[Qb]:!0});Mo(a,ia),Mo(a,ra,r),Mo(a,_m,a),Mo(r,ra,r),Mo(r,ia),Mo(r,_m,r);const l=Ie(o,R1,tv,{[L1]:!0}),u=Ie(o,F_,iS,{[L1]:!0}),c=Mo(o,V1,iS,{[L1]:!0});Ie(o,D1,c),Ie(u,R1,l),Ie(u,D1,c),Mo(u,V1,c),Ie(c,F_),Ie(c,R1),Mo(c,V1,c),Ie(c,D1,c);const m=Mo(o,x1,MN,{[IN]:!0});Ie(m,"#"),Mo(m,x1,m),Ie(m,eae,m);const h=Ie(m,tae);Ie(h,"#"),Mo(h,x1,m);const C=[[ia,s],[ra,i]],y=[[ia,null],[_m,a],[ra,r]];for(let F=0;F<Yh.length;F++)ja(o,Yh[F],oS,sa,C);for(let F=0;F<Zh.length;F++)ja(o,Zh[F],nS,tS,y);Cu(oS,{tld:!0,ascii:!0},t),Cu(nS,{utld:!0,alpha:!0},t),ja(o,"file",yC,sa,C),ja(o,"mailto",yC,sa,C),ja(o,"http",kd,sa,C),ja(o,"https",kd,sa,C),ja(o,"ftp",kd,sa,C),ja(o,"ftps",kd,sa,C),Cu(yC,{scheme:!0,ascii:!0},t),Cu(kd,{slashscheme:!0,ascii:!0},t),e=e.sort((F,b)=>F[0]>b[0]?1:-1);for(let F=0;F<e.length;F++){const b=e[F][0],V=e[F][1]?{[Jse]:!0}:{[Xse]:!0};b.indexOf("-")>=0?V[eS]=!0:ia.test(b)?ra.test(b)?V[uf]=!0:V[qb]=!0:V[Xb]=!0,y_(o,b,b,V)}return y_(o,"localhost",$f,{ascii:!0}),o.jd=new yi(wg),{start:o,tokens:_c({groups:t},WN)}}function ON(e,t){const o=nae(t.replace(/[A-Z]/g,a=>a.toLowerCase())),n=o.length,i=[];let r=0,s=0;for(;s<n;){let a=e,l=null,u=0,c=null,m=-1,h=-1;for(;s<n&&(l=a.go(o[s]));)a=l,a.accepts()?(m=0,h=0,c=a):m>=0&&(m+=o[s].length,h++),u+=o[s].length,r+=o[s].length,s++;r-=m,s-=h,u-=m,i.push({t:c.t,v:t.slice(r-u,r),s:r-u,e:r})}return i}function nae(e){const t=[],o=e.length;let n=0;for(;n<o;){let i=e.charCodeAt(n),r,s=i<55296||i>56319||n+1===o||(r=e.charCodeAt(n+1))<56320||r>57343?e[n]:e.slice(n,n+2);t.push(s),n+=s.length}return t}function ja(e,t,o,n,i){let r;const s=t.length;for(let a=0;a<s-1;a++){const l=t[a];e.j[l]?r=e.j[l]:(r=new yi(n),r.jr=i.slice(),e.j[l]=r),e=r}return r=new yi(o),r.jr=i.slice(),e.j[t[s-1]]=r,r}function b_(e){const t=[],o=[];let n=0,i="0123456789";for(;n<e.length;){let r=0;for(;i.indexOf(e[n+r])>=0;)r++;if(r>0){t.push(o.join(""));for(let s=parseInt(e.substring(n,n+r),10);s>0;s--)o.pop();n+=r}else o.push(e[n]),n++}return t}const Hf={defaultProtocol:"http",events:null,format:S_,formatHref:S_,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function av(e,t=null){let o=_c({},Hf);e&&(o=_c(o,e instanceof av?e.o:e));const n=o.ignoreTags,i=[];for(let r=0;r<n.length;r++)i.push(n[r].toUpperCase());this.o=o,t&&(this.defaultRender=t),this.ignoreTags=i}av.prototype={o:Hf,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,o){const n=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=o.t in i?i[o.t]:Hf[e],typeof i=="function"&&n&&(i=i(t,o))):typeof i=="function"&&n&&(i=i(t,o.t,o)),i)},getObj(e,t,o){let n=this.o[e];return typeof n=="function"&&t!=null&&(n=n(t,o.t,o)),n},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function S_(e){return e}function $N(e,t){this.t="token",this.v=e,this.tk=t}$N.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),o=e.get("truncate",t,this),n=e.get("format",t,this);return o&&n.length>o?n.substring(0,o)+"…":n},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Hf.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,o=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",o,this),i=e.get("tagName",o,t),r=this.toFormattedString(e),s={},a=e.get("className",o,t),l=e.get("target",o,t),u=e.get("rel",o,t),c=e.getObj("attributes",o,t),m=e.getObj("events",o,t);return s.href=n,a&&(s.class=a),l&&(s.target=l),u&&(s.rel=u),c&&_c(s,c),{tagName:i,attributes:s,content:r,eventListeners:m}}};function H0(e,t){class o extends $N{constructor(i,r){super(i,r),this.t=e}}for(const n in t)o.prototype[n]=t[n];return o.t=e,o}const T_=H0("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),v_=H0("text"),iae=H0("nl"),Jh=H0("url",{isLink:!0,toHref(e=Hf.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==$f&&e[1].t===rl}}),fr=e=>new yi(e);function rae({groups:e}){const t=e.domain.concat([Tg,vg,el,Bg,Lg,xg,Vg,Rg,Cr,ev,mf,Dg,_g,Eg,bs,wg,pf,Pg]),o=[rl,nv,Fs,iv,mf,ff,rv,sv,mg,fg,df,cf,ug,lg,dg,cg,pg,hg,Cg,gg,yg,Fg,bg,Sg],n=[Tg,ov,vg,Bg,Lg,xg,Vg,Rg,Cr,df,cf,mf,Dg,_g,Eg,ff,bs,wg,pf,Pg],i=fr(),r=Ie(i,pf);Ot(r,n,r),Ot(r,e.domain,r);const s=fr(),a=fr(),l=fr();Ot(i,e.domain,s),Ot(i,e.scheme,a),Ot(i,e.slashscheme,l),Ot(s,n,r),Ot(s,e.domain,s);const u=Ie(s,el);Ie(r,el,u),Ie(a,el,u),Ie(l,el,u);const c=Ie(r,Fs);Ot(c,n,r),Ot(c,e.domain,r);const m=fr();Ot(u,e.domain,m),Ot(m,e.domain,m);const h=Ie(m,Fs);Ot(h,e.domain,m);const C=fr(T_);Ot(h,e.tld,C),Ot(h,e.utld,C),Ie(u,$f,C);const y=Ie(m,Cr);Ie(y,Cr,y),Ot(y,e.domain,m),Ot(C,e.domain,m),Ie(C,Fs,h),Ie(C,Cr,y);const F=Ie(C,rl);Ot(F,e.numeric,T_);const b=Ie(s,Cr),T=Ie(s,Fs);Ie(b,Cr,b),Ot(b,e.domain,s),Ot(T,n,r),Ot(T,e.domain,s);const V=fr(Jh);Ot(T,e.tld,V),Ot(T,e.utld,V),Ot(V,e.domain,s),Ot(V,n,r),Ie(V,Fs,T),Ie(V,Cr,b),Ie(V,el,u);const x=Ie(V,rl),L=fr(Jh);Ot(x,e.numeric,L);const w=fr(Jh),N=fr();Ot(w,t,w),Ot(w,o,N),Ot(N,t,w),Ot(N,o,N),Ie(V,bs,w),Ie(L,bs,w);const k=Ie(a,rl),z=Ie(l,rl),W=Ie(z,bs),j=Ie(W,bs);Ot(a,e.domain,s),Ie(a,Fs,T),Ie(a,Cr,b),Ot(l,e.domain,s),Ie(l,Fs,T),Ie(l,Cr,b),Ot(k,e.domain,w),Ie(k,bs,w),Ie(k,ff,w),Ot(j,e.domain,w),Ot(j,t,w),Ie(j,bs,w);const J=[[df,cf],[lg,ug],[dg,cg],[mg,fg],[pg,hg],[Cg,gg],[yg,Fg],[bg,Sg]];for(let K=0;K<J.length;K++){const[G,H]=J[K],Y=Ie(w,G);Ie(N,G,Y),Ie(Y,H,w);const ne=fr(Jh);Ot(Y,t,ne);const Ce=fr();Ot(Y,o),Ot(ne,t,ne),Ot(ne,o,Ce),Ot(Ce,t,ne),Ot(Ce,o,Ce),Ie(ne,H,w),Ie(Ce,H,w)}return Ie(i,$f,V),Ie(i,tv,iae),{start:i,tokens:WN}}function sae(e,t,o){let n=o.length,i=0,r=[],s=[];for(;i<n;){let a=e,l=null,u=null,c=0,m=null,h=-1;for(;i<n&&!(l=a.go(o[i].t));)s.push(o[i++]);for(;i<n&&(u=l||a.go(o[i].t));)l=null,a=u,a.accepts()?(h=0,m=a):h>=0&&h++,i++,c++;if(h<0)i-=c,i<n&&(s.push(o[i]),i++);else{s.length>0&&(r.push(_1(v_,t,s)),s=[]),i-=h,c-=h;const C=m.t,y=o.slice(i-c,i);r.push(_1(C,t,y))}}return s.length>0&&r.push(_1(v_,t,s)),r}function _1(e,t,o){const n=o[0].s,i=o[o.length-1].e,r=t.slice(n,i);return new e(r,o)}const aae=typeof console<"u"&&console&&console.warn||(()=>{}),lae="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Bo={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function uae(){return yi.groups={},Bo.scanner=null,Bo.parser=null,Bo.tokenQueue=[],Bo.pluginQueue=[],Bo.customSchemes=[],Bo.initialized=!1,Bo}function B_(e,t=!1){if(Bo.initialized&&aae(`linkifyjs: already initialized - will not register custom scheme "${e}" ${lae}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
182
182
  1. Must only contain digits, lowercase ASCII letters or "-"
183
183
  2. Cannot start or end with "-"
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@retailrocketgroup/retailrocket-edit.repurchase-vue-email-template-render",
3
- "version": "3.0.368489",
3
+ "version": "3.0.368695",
4
4
  "private": false
5
5
  }