@retailrocketgroup/retailrocket-create.welcome-sequence-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.
- package/assets/main.js +1 -1
- package/package.json +1 -1
package/assets/main.js
CHANGED
|
@@ -167,7 +167,7 @@ img.ProseMirror-separator {
|
|
|
167
167
|
opacity: 0
|
|
168
168
|
}`;function PY(e,t,o){const i=document.querySelector(`style[data-tiptap-style${o?`-${o}`:""}]`);if(i!==null)return i;const n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.setAttribute(`data-tiptap-style${o?`-${o}`:""}`,""),n.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(n),n}let vY=class extends $K{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:i,moved:n})=>this.options.onDrop(o,i,n)),this.on("paste",({event:o,slice:i})=>this.options.onPaste(o,i)),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=PY(_Y,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 i=tN(o)?o(t,[...this.state.plugins]):[...this.state.plugins,t],n=this.state.reconfigure({plugins:i});return this.view.updateState(n),n}unregisterPlugin(t){if(this.isDestroyed)return;const o=this.state.plugins;let i=o;if([].concat(t).forEach(r=>{const s=typeof r=="string"?`${r}$`:r.key;i=o.filter(a=>!a.key.startsWith(s))}),o.length===i.length)return;const n=this.state.reconfigure({plugins:i});return this.view.updateState(n),n}createExtensionManager(){var t,o;const n=[...this.options.enableCoreExtensions?[xY,iq.configure({blockSeparator:(o=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||o===void 0?void 0:o.blockSeparator}),RY,bY,LY,NY,DY,EY].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 fl(n,this)}createCommandManager(){this.commandManager=new Eh({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let o;try{o=l0(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=l0(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const i=sN(o,this.options.autofocus);this.view=new rK(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:cl.create({doc:o,selection:i||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),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),i=!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}),i&&this.emit("selectionUpdate",{editor:this,transaction:t});const n=t.getMeta("focus"),r=t.getMeta("blur");n&&this.emit("focus",{editor:this,event:n.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 dN(this.state,t)}isActive(t,o){const i=typeof t=="string"?t:null,n=typeof t=="string"?o:t;return iY(this.state,i,n)}getJSON(){return this.state.doc.toJSON()}getHTML(){return OF(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:o=`
|
|
169
169
|
|
|
170
|
-
`,textSerializers:i={}}=t||{};return Xq(this.state.doc,{blockSeparator:o,textSerializers:{...iN(this.schema),...i}})}get isEmpty(){return UF(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 i;return((i=this.$doc)===null||i===void 0?void 0:i.querySelector(t,o))||null}$nodes(t,o){var i;return((i=this.$doc)===null||i===void 0?void 0:i.querySelectorAll(t,o))||null}$pos(t){const o=this.state.doc.resolve(t);return new Qs(o,this)}get $doc(){return this.$pos(0)}};function AY(e){return new eN({find:e.find,handler:({state:t,range:o,match:i})=>{const n=ae(e.getAttributes,void 0,i)||{},{tr:r}=t,s=o.from;let a=o.to;const u=e.type.create(n);if(i[1]){const m=i[0].lastIndexOf(i[1]);let c=s+m;c>a?c=a:a=c+i[1].length;const f=i[0][i[0].length-1];r.insertText(f,s+i[0].length-1),r.replaceWith(c,a,u)}else if(i[0]){const m=e.type.isInline?s:s-1;r.insert(m,e.type.create(n)).delete(r.mapping.map(s),r.mapping.map(a))}r.scrollIntoView()}})}function ff(e){return new eN({find:e.find,handler:({state:t,range:o,match:i,chain:n})=>{const r=ae(e.getAttributes,void 0,i)||{},s=t.tr.delete(o.from,o.to),u=s.doc.resolve(o.from).blockRange(),m=u&&xF(u,e.type,r);if(!m)return null;if(s.wrap(u,m),e.keepMarks&&e.editor){const{selection:f,storedMarks:p}=t,{splittableMarks:C}=e.editor.extensionManager,F=p||f.$to.parentOffset&&f.$from.marks();if(F){const T=F.filter(R=>C.includes(R.type.name));s.ensureMarks(T)}}if(e.keepAttributes){const f=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";n().updateAttributes(f,r).run()}const c=s.doc.resolve(o.from-1).nodeBefore;c&&c.type===e.type&&_s(s.doc,o.from-1)&&(!e.joinPredicate||e.joinPredicate(i,c))&&s.join(o.from-1)}})}let Pr=class d0{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=ae(xt(this,"addOptions",{name:this.name}))),this.storage=ae(xt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new d0(t)}configure(t={}){const o=this.extend({...this.config,addOptions:()=>_h(this.options,t)});return o.name=this.name,o.parent=this.parent,o}extend(t={}){const o=new d0(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=ae(xt(o,"addOptions",{name:o.name})),o.storage=ae(xt(o,"addStorage",{name:o.name,options:o.options})),o}};function IY(e){return new ZK({find:e.find,handler:({state:t,range:o,match:i,pasteEvent:n})=>{const r=ae(e.getAttributes,void 0,i,n);if(r===!1||r===null)return null;const{tr:s}=t,a=i[i.length-1],u=i[0];let m=o.to;if(a){const c=u.search(/\S/),f=o.from+u.indexOf(a),p=f+a.length;if(mN(o.from,o.to,t.doc).filter(F=>F.mark.type.excluded.find(R=>R===e.type&&R!==F.mark.type)).filter(F=>F.to>f).length)return null;p<o.to&&s.delete(p,o.to),f>o.from&&s.delete(o.from+c,f),m=o.from+c+a.length,s.addMark(o.from+c,m,e.type.create(r||{})),s.removeStoredMark(e.type)}}})}function RD(e){return H2((t,o)=>({get(){return t(),e},set(i){e=i,requestAnimationFrame(()=>{requestAnimationFrame(()=>{o()})})}}))}class wY extends vY{constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=RD(this.view.state),this.reactiveExtensionStorage=RD(this.extensionStorage),this.on("beforeTransaction",({nextState:o})=>{this.reactiveState.value=o,this.reactiveExtensionStorage.value=this.extensionStorage}),Lx(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 i=super.registerPlugin(t,o);return this.reactiveState&&(this.reactiveState.value=i),i}unregisterPlugin(t){const o=super.unregisterPlugin(t);return this.reactiveState&&o&&(this.reactiveState.value=o),o}}const kY=bt({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const t=xe(),o=Dr();return Pd(()=>{const i=e.editor;i&&i.options.element&&t.value&&Zf(()=>{if(!t.value||!i.options.element.firstChild)return;const n=H(t.value);t.value.append(...i.options.element.childNodes),i.contentComponent=o.ctx._,o&&(i.appContext={...o.appContext,provides:o.provides}),i.setOptions({element:n}),i.createNodeViews()})}),_0(()=>{const i=e.editor;i&&(i.contentComponent=null,i.appContext=null)}),{rootEl:t}},render(){return Gl("div",{ref:e=>{this.rootEl=e}})}}),WY=(e={})=>{const t=Br();return _d(()=>{t.value=new wY(e)}),_0(()=>{var o,i,n;const r=(o=t.value)===null||o===void 0?void 0:o.options.element,s=r==null?void 0:r.cloneNode(!0);(i=r==null?void 0:r.parentNode)===null||i===void 0||i.replaceChild(s,r),(n=t.value)===null||n===void 0||n.destroy()}),t},DD=e=>({type:"doc",content:e.Content.map(OY)}),OY=e=>"ParagraphNode"in e?hN(e):"BulletListNode"in e?MY(e):"OrderedListNode"in e?HY(e):"DataFieldNode"in e?fN(e):Ti(e),cN=e=>({type:"listItem",content:e.Content.map(t=>"ParagraphNode"in t?hN(t):"ImageNode"in t?pN(t):Ti(t))}),fN=e=>({type:"dataField",marks:jF({textStyle:e.DataFieldNode.TextStyle,commonLinkMark:e.DataFieldNode.CommonLinkMark}),attrs:{stringExpression:e.DataFieldNode.StringExpression}}),MY=e=>({type:"bulletList",content:e.BulletListNode.Content.map(cN),attrs:{themeName:e.BulletListNode.ListStyle}}),HY=e=>({type:"orderedList",content:e.OrderedListNode.Content.map(cN),attrs:{themeName:e.OrderedListNode.ListStyle}}),hN=e=>({type:"paragraph",attrs:{themeName:e.ParagraphNode.ThemeName},content:e.ParagraphNode.Content.map($Y)}),$Y=e=>"TextNode"in e?zY(e):"HardBreakNode"in e?JY():"ImageNode"in e?pN(e):"DataFieldNode"in e?fN(e):Ti(e),jF=e=>{const t=[];return e.textStyle&&t.push(qY(e.textStyle)),e.commonLinkMark&&t.push(YY(e.commonLinkMark)),t.filter(o=>o!==void 0)},zY=e=>({type:"text",text:e.TextNode.Text,marks:jF({textStyle:e.TextNode.TextStyle,commonLinkMark:e.TextNode.CommonLinkMark})}),UY=e=>{switch(e){case"Normal":return"normal";case"Bold":return"bold";default:return"normal"}},jY=e=>{switch(e){case"Normal":return"normal";case"Italic":return"italic";default:return"normal"}},GY=e=>{switch(e){case"None":return"none";case"Uppercase":return"uppercase";default:return"none"}},KY=e=>{switch(e){case"None":return"none";case"Underline":return"underline";case"LineThrough":return"line-through";default:return"none"}},qY=e=>({type:"textStyle",attrs:{themeName:e.ThemeName,color:e.Style.Color,fontWeight:e.Style.FontWeight?UY(e.Style.FontWeight):void 0,fontStyle:e.Style.FontStyle?jY(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?GY(e.Style.TextTransform):void 0,textDecoration:e.Style.TextDecoration?KY(e.Style.TextDecoration):void 0}}),YY=e=>Eo(e).Match({LinkMark:t=>ZY({LinkMark:t}),UnsubscribeLinkMark:()=>XY()}),JY=()=>({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:jF({commonLinkMark:e.ImageNode.CommonLinkMark})}),ZY=e=>({type:"link",attrs:{href:e.LinkMark.Href}}),XY=()=>({type:"unsubscribeLink"}),QY=e=>{if(!e.children.length)return;const t=e.querySelectorAll("span");t&&t.forEach(o=>{var i,n;const r=o.getAttribute("style"),s=(n=(i=o.parentElement)===null||i===void 0?void 0:i.closest("span"))===null||n===void 0?void 0:n.getAttribute("style");o.setAttribute("style",`${s};${r}`)})},GF=Wi.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&QY(e),{}):!1}]},renderHTML({HTMLAttributes:e}){return["span",ki(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:e})=>{const{selection:t}=e;return e.doc.nodesBetween(t.from,t.to,(o,i)=>{if(o.isTextblock)return!0;o.marks.filter(n=>n.type===this.type).some(n=>Object.values(n.attrs).some(r=>!!r))||e.removeMark(i,i+o.nodeSize,this.type)}),!0}}}}),tJ=Go.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Wo({key:new Bi("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:o,isFocused:i}=this.editor,{anchor:n}=t,r=[];if(!o||!i)return uo.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((u,m)=>{if(u.isText)return;if(!(n>=m&&n<=m+u.nodeSize-1))return!1;s+=1});let a=0;return e.descendants((u,m)=>{if(u.isText||!(n>=m&&n<=m+u.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(Qi.node(m,m+u.nodeSize,{class:this.options.className}))}),uo.create(e,r)}}})]}}),eJ=Pr.create({name:"text",group:"inline"}),oJ=Pr.create({name:"doc",topNode:!0,content:"block+"}),CN=Wi.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:i,$from:n}=t.selection;return t.doc.textBetween(o,i," ").length?e().setMark("textStyle",{textTransform:"none"}).run():e().setTextSelection({from:n.pos-n.nodeBefore.nodeSize,to:n.pos+n.nodeAfter.nodeSize}).setMark("textStyle",{textTransform:"none"}).focus().run()}}}}),iJ=Wi.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()}}}),nJ=Wi.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()}}}),rJ=e=>Go.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:i})=>{const{$from:n}=i.selection,r=n.parent,s=n.index();return r.child(s).type.name==="image"?!1:o().setMark("textStyle",{themeName:t}).run()},applySiblingNodeThemeSettings:()=>({chain:t,state:o})=>{var F,T;const{from:i,to:n,$from:r}=o.selection,s=r.parent,a=r.index(),u=((F=r.node(r.depth))==null?void 0:F.type.name)==="dataField"||((T=s.maybeChild(a))==null?void 0:T.type.name)==="dataField",m=s.child(a).type.name==="image",c=R=>{const V="NormalText",N=R.index>0?s.child(R.index-1):void 0,A=R.index+1<s.childCount?s.child(R.index+1):void 0,E=N??A;if(E){const I=E.marks.find($=>$.type.name==="textStyle");if(I)return I.attrs.themeName}return V};if(u){const R=c({index:a});return t().unsetMark("textStyle",{extendEmptyMarkRange:!0}).setThemeSettings(R).run()}if(m)return!1;const f=c({index:a}),p=r.nodeBefore?r.pos-r.nodeBefore.nodeSize:i,C=r.nodeAfter?r.pos+r.nodeAfter.nodeSize:n;return t().setTextSelection({from:p,to:C}).setThemeSettings(f).run()}}},addProseMirrorPlugins(){return[new Wo({key:new Bi("syncBlockTheme"),appendTransaction:(t,o,i)=>{const n=i.tr;let r=!1;return i.doc.descendants((s,a)=>{var u,m;if(s.type.name==="bulletList"||s.type.name==="orderedList"){const c=s.firstChild,f=c==null?void 0:c.firstChild,p=f==null?void 0:f.firstChild;if(p){const C=(u=p.marks.find(F=>F.type.name==="textStyle"))==null?void 0:u.attrs.themeName;C&&s.attrs.themeName!==C&&(n.setNodeMarkup(a,void 0,{...s.attrs,themeName:C}),r=!0)}}if(s.type.name==="paragraph"){const c=s.firstChild;if(c){const f=(m=c.marks.find(p=>p.type.name==="textStyle"))==null?void 0:m.attrs.themeName;f&&s.attrs.themeName!==f&&(n.setNodeMarkup(a,void 0,{...s.attrs,themeName:f}),r=!0)}}}),r?n:null}})]}}),sJ=Wi.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:i,$from:n}=t.selection;return t.doc.textBetween(o,i," ").length?e().setMark("textStyle",{fontWeight:"normal"}).run():e().setTextSelection({from:n.pos-n.nodeBefore.nodeSize,to:n.pos+n.nodeAfter.nodeSize}).setMark("textStyle",{fontWeight:"normal"}).focus().run()},resetFontWeight:()=>({chain:e})=>e().setMark("textStyle",{fontWeight:null}).removeEmptyTextStyle().run()}}}),aJ=Wi.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:i,$from:n}=t.selection;return t.doc.textBetween(o,i," ").length?e().setMark("textStyle",{fontStyle:"normal"}).run():e().setTextSelection({from:n.pos-n.nodeBefore.nodeSize,to:n.pos+n.nodeAfter.nodeSize}).setMark("textStyle",{fontStyle:"normal"}).focus().run()},resetFontStyle:()=>({chain:e})=>e().setMark("textStyle",{fontStyle:null}).removeEmptyTextStyle().run()}}}),KF=Wi.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",ki(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnsubscribeLink:()=>({chain:e})=>e().setMark("unsubscribeLink").focus().run(),unsetUnsubscribeLink:()=>({chain:e,state:t})=>{const{from:o,to:i}=t.selection,n=t.doc.textBetween(o,i," "),r=t.doc.nodeAt(o);return(r==null?void 0:r.type.name)==="image"?e().unsetMark("unsubscribeLink").focus().run():n.length?e().setTextSelection({from:o,to:o+n.length}).unsetMark("unsubscribeLink").focus().run():e().unsetMark("unsubscribeLink",{extendEmptyMarkRange:!0}).focus().run()}}}}),lJ="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",uJ="ελ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",jl=(e,t)=>{for(const o in t)e[o]=t[o];return e},m0="numeric",c0="ascii",f0="alpha",td="asciinumeric",Mu="alphanumeric",h0="domain",gN="emoji",dJ="scheme",mJ="slashscheme",ZC="whitespace";function cJ(e,t){return e in t||(t[e]=[]),t[e]}function ra(e,t,o){t[m0]&&(t[td]=!0,t[Mu]=!0),t[c0]&&(t[td]=!0,t[f0]=!0),t[td]&&(t[Mu]=!0),t[f0]&&(t[Mu]=!0),t[Mu]&&(t[h0]=!0),t[gN]&&(t[h0]=!0);for(const i in t){const n=cJ(i,o);n.indexOf(e)<0&&n.push(e)}}function fJ(e,t){const o={};for(const i in t)t[i].indexOf(e)>=0&&(o[i]=!0);return o}function gi(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}gi.groups={};gi.prototype={accepts(){return!!this.t},go(e){const t=this,o=t.j[e];if(o)return o;for(let i=0;i<t.jr.length;i++){const n=t.jr[i][0],r=t.jr[i][1];if(r&&n.test(e))return r}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,o,i){for(let n=0;n<e.length;n++)this.tt(e[n],t,o,i)},tr(e,t,o,i){i=i||gi.groups;let n;return t&&t.j?n=t:(n=new gi(t),o&&i&&ra(t,o,i)),this.jr.push([e,n]),n},ts(e,t,o,i){let n=this;const r=e.length;if(!r)return n;for(let s=0;s<r-1;s++)n=n.tt(e[s]);return n.tt(e[r-1],t,o,i)},tt(e,t,o,i){i=i||gi.groups;const n=this;if(t&&t.j)return n.j[e]=t,t;const r=t;let s,a=n.go(e);if(a?(s=new gi,jl(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new gi,r){if(i)if(s.t&&typeof s.t=="string"){const u=jl(fJ(s.t,i),o);ra(r,u,i)}else o&&ra(r,o,i);s.t=r}return n.j[e]=s,s}};const te=(e,t,o,i,n)=>e.ta(t,o,i,n),Ze=(e,t,o,i,n)=>e.tr(t,o,i,n),xD=(e,t,o,i,n)=>e.ts(t,o,i,n),at=(e,t,o,i,n)=>e.tt(t,o,i,n),cr="WORD",p0="UWORD",FN="ASCIINUMERICAL",yN="ALPHANUMERICAL",bd="LOCALHOST",C0="TLD",g0="UTLD",Nc="SCHEME",ll="SLASH_SCHEME",qF="NUM",F0="WS",YF="NL",ed="OPENBRACE",od="CLOSEBRACE",hf="OPENBRACKET",pf="CLOSEBRACKET",Cf="OPENPAREN",gf="CLOSEPAREN",Ff="OPENANGLEBRACKET",yf="CLOSEANGLEBRACKET",Tf="FULLWIDTHLEFTPAREN",Bf="FULLWIDTHRIGHTPAREN",Sf="LEFTCORNERBRACKET",Vf="RIGHTCORNERBRACKET",Rf="LEFTWHITECORNERBRACKET",Df="RIGHTWHITECORNERBRACKET",xf="FULLWIDTHLESSTHAN",bf="FULLWIDTHGREATERTHAN",Lf="AMPERSAND",JF="APOSTROPHE",Ef="ASTERISK",Qr="AT",Nf="BACKSLASH",_f="BACKTICK",Pf="CARET",is="COLON",ZF="COMMA",vf="DOLLAR",_n="DOT",Af="EQUALS",XF="EXCLAMATION",Yi="HYPHEN",id="PERCENT",If="PIPE",wf="PLUS",kf="POUND",nd="QUERY",QF="QUOTE",TN="FULLWIDTHMIDDLEDOT",ty="SEMI",Pn="SLASH",rd="TILDE",Wf="UNDERSCORE",BN="EMOJI",Of="SYM";var SN=Object.freeze({__proto__:null,WORD:cr,UWORD:p0,ASCIINUMERICAL:FN,ALPHANUMERICAL:yN,LOCALHOST:bd,TLD:C0,UTLD:g0,SCHEME:Nc,SLASH_SCHEME:ll,NUM:qF,WS:F0,NL:YF,OPENBRACE:ed,CLOSEBRACE:od,OPENBRACKET:hf,CLOSEBRACKET:pf,OPENPAREN:Cf,CLOSEPAREN:gf,OPENANGLEBRACKET:Ff,CLOSEANGLEBRACKET:yf,FULLWIDTHLEFTPAREN:Tf,FULLWIDTHRIGHTPAREN:Bf,LEFTCORNERBRACKET:Sf,RIGHTCORNERBRACKET:Vf,LEFTWHITECORNERBRACKET:Rf,RIGHTWHITECORNERBRACKET:Df,FULLWIDTHLESSTHAN:xf,FULLWIDTHGREATERTHAN:bf,AMPERSAND:Lf,APOSTROPHE:JF,ASTERISK:Ef,AT:Qr,BACKSLASH:Nf,BACKTICK:_f,CARET:Pf,COLON:is,COMMA:ZF,DOLLAR:vf,DOT:_n,EQUALS:Af,EXCLAMATION:XF,HYPHEN:Yi,PERCENT:id,PIPE:If,PLUS:wf,POUND:kf,QUERY:nd,QUOTE:QF,FULLWIDTHMIDDLEDOT:TN,SEMI:ty,SLASH:Pn,TILDE:rd,UNDERSCORE:Wf,EMOJI:BN,SYM:Of});const dr=/[a-z]/,Iu=/\p{L}/u,XC=/\p{Emoji}/u,mr=/\d/,QC=/\s/,bD="\r",tg=`
|
|
170
|
+
`,textSerializers:i={}}=t||{};return Xq(this.state.doc,{blockSeparator:o,textSerializers:{...iN(this.schema),...i}})}get isEmpty(){return UF(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 i;return((i=this.$doc)===null||i===void 0?void 0:i.querySelector(t,o))||null}$nodes(t,o){var i;return((i=this.$doc)===null||i===void 0?void 0:i.querySelectorAll(t,o))||null}$pos(t){const o=this.state.doc.resolve(t);return new Qs(o,this)}get $doc(){return this.$pos(0)}};function AY(e){return new eN({find:e.find,handler:({state:t,range:o,match:i})=>{const n=ae(e.getAttributes,void 0,i)||{},{tr:r}=t,s=o.from;let a=o.to;const u=e.type.create(n);if(i[1]){const m=i[0].lastIndexOf(i[1]);let c=s+m;c>a?c=a:a=c+i[1].length;const f=i[0][i[0].length-1];r.insertText(f,s+i[0].length-1),r.replaceWith(c,a,u)}else if(i[0]){const m=e.type.isInline?s:s-1;r.insert(m,e.type.create(n)).delete(r.mapping.map(s),r.mapping.map(a))}r.scrollIntoView()}})}function ff(e){return new eN({find:e.find,handler:({state:t,range:o,match:i,chain:n})=>{const r=ae(e.getAttributes,void 0,i)||{},s=t.tr.delete(o.from,o.to),u=s.doc.resolve(o.from).blockRange(),m=u&&xF(u,e.type,r);if(!m)return null;if(s.wrap(u,m),e.keepMarks&&e.editor){const{selection:f,storedMarks:p}=t,{splittableMarks:C}=e.editor.extensionManager,F=p||f.$to.parentOffset&&f.$from.marks();if(F){const T=F.filter(R=>C.includes(R.type.name));s.ensureMarks(T)}}if(e.keepAttributes){const f=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";n().updateAttributes(f,r).run()}const c=s.doc.resolve(o.from-1).nodeBefore;c&&c.type===e.type&&_s(s.doc,o.from-1)&&(!e.joinPredicate||e.joinPredicate(i,c))&&s.join(o.from-1)}})}let Pr=class d0{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=ae(xt(this,"addOptions",{name:this.name}))),this.storage=ae(xt(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new d0(t)}configure(t={}){const o=this.extend({...this.config,addOptions:()=>_h(this.options,t)});return o.name=this.name,o.parent=this.parent,o}extend(t={}){const o=new d0(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=ae(xt(o,"addOptions",{name:o.name})),o.storage=ae(xt(o,"addStorage",{name:o.name,options:o.options})),o}};function IY(e){return new ZK({find:e.find,handler:({state:t,range:o,match:i,pasteEvent:n})=>{const r=ae(e.getAttributes,void 0,i,n);if(r===!1||r===null)return null;const{tr:s}=t,a=i[i.length-1],u=i[0];let m=o.to;if(a){const c=u.search(/\S/),f=o.from+u.indexOf(a),p=f+a.length;if(mN(o.from,o.to,t.doc).filter(F=>F.mark.type.excluded.find(R=>R===e.type&&R!==F.mark.type)).filter(F=>F.to>f).length)return null;p<o.to&&s.delete(p,o.to),f>o.from&&s.delete(o.from+c,f),m=o.from+c+a.length,s.addMark(o.from+c,m,e.type.create(r||{})),s.removeStoredMark(e.type)}}})}function RD(e){return H2((t,o)=>({get(){return t(),e},set(i){e=i,requestAnimationFrame(()=>{requestAnimationFrame(()=>{o()})})}}))}class wY extends vY{constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=RD(this.view.state),this.reactiveExtensionStorage=RD(this.extensionStorage),this.on("beforeTransaction",({nextState:o})=>{this.reactiveState.value=o,this.reactiveExtensionStorage.value=this.extensionStorage}),Lx(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 i=super.registerPlugin(t,o);return this.reactiveState&&(this.reactiveState.value=i),i}unregisterPlugin(t){const o=super.unregisterPlugin(t);return this.reactiveState&&o&&(this.reactiveState.value=o),o}}const kY=bt({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const t=xe(),o=Dr();return Pd(()=>{const i=e.editor;i&&i.options.element&&t.value&&Zf(()=>{if(!t.value||!i.options.element.firstChild)return;const n=H(t.value);t.value.append(...i.options.element.childNodes),i.contentComponent=o.ctx._,o&&(i.appContext={...o.appContext,provides:o.provides}),i.setOptions({element:n}),i.createNodeViews()})}),_0(()=>{const i=e.editor;i&&(i.contentComponent=null,i.appContext=null)}),{rootEl:t}},render(){return Gl("div",{ref:e=>{this.rootEl=e}})}}),WY=(e={})=>{const t=Br();return _d(()=>{t.value=new wY(e)}),_0(()=>{var o,i,n;const r=(o=t.value)===null||o===void 0?void 0:o.options.element,s=r==null?void 0:r.cloneNode(!0);(i=r==null?void 0:r.parentNode)===null||i===void 0||i.replaceChild(s,r),(n=t.value)===null||n===void 0||n.destroy()}),t},DD=e=>({type:"doc",content:e.Content.map(OY)}),OY=e=>"ParagraphNode"in e?hN(e):"BulletListNode"in e?MY(e):"OrderedListNode"in e?HY(e):"DataFieldNode"in e?fN(e):Ti(e),cN=e=>({type:"listItem",content:e.Content.map(t=>"ParagraphNode"in t?hN(t):"ImageNode"in t?pN(t):Ti(t))}),fN=e=>({type:"dataField",marks:jF({textStyle:e.DataFieldNode.TextStyle,commonLinkMark:e.DataFieldNode.CommonLinkMark}),attrs:{stringExpression:e.DataFieldNode.StringExpression}}),MY=e=>({type:"bulletList",content:e.BulletListNode.Content.map(cN),attrs:{themeName:e.BulletListNode.ListStyle}}),HY=e=>({type:"orderedList",content:e.OrderedListNode.Content.map(cN),attrs:{themeName:e.OrderedListNode.ListStyle}}),hN=e=>({type:"paragraph",attrs:{themeName:e.ParagraphNode.ThemeName},content:e.ParagraphNode.Content.map($Y)}),$Y=e=>"TextNode"in e?zY(e):"HardBreakNode"in e?JY():"ImageNode"in e?pN(e):"DataFieldNode"in e?fN(e):Ti(e),jF=e=>{const t=[];return e.textStyle&&t.push(qY(e.textStyle)),e.commonLinkMark&&t.push(YY(e.commonLinkMark)),t.filter(o=>o!==void 0)},zY=e=>({type:"text",text:e.TextNode.Text,marks:jF({textStyle:e.TextNode.TextStyle,commonLinkMark:e.TextNode.CommonLinkMark})}),UY=e=>{switch(e){case"Normal":return"normal";case"Bold":return"bold";default:return"normal"}},jY=e=>{switch(e){case"Normal":return"normal";case"Italic":return"italic";default:return"normal"}},GY=e=>{switch(e){case"None":return"none";case"Uppercase":return"uppercase";default:return"none"}},KY=e=>{switch(e){case"None":return"none";case"Underline":return"underline";case"LineThrough":return"line-through";default:return"none"}},qY=e=>({type:"textStyle",attrs:{themeName:e.ThemeName,color:e.Style.Color,fontWeight:e.Style.FontWeight?UY(e.Style.FontWeight):void 0,fontStyle:e.Style.FontStyle?jY(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?GY(e.Style.TextTransform):void 0,textDecoration:e.Style.TextDecoration?KY(e.Style.TextDecoration):void 0}}),YY=e=>Eo(e).Match({LinkMark:t=>ZY({LinkMark:t}),UnsubscribeLinkMark:()=>XY()}),JY=()=>({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:jF({commonLinkMark:e.ImageNode.CommonLinkMark})}),ZY=e=>({type:"link",attrs:{href:e.LinkMark.Href}}),XY=()=>({type:"unsubscribeLink"}),QY=e=>{if(!e.children.length)return;const t=e.querySelectorAll("span");t&&t.forEach(o=>{var i,n;const r=o.getAttribute("style"),s=(n=(i=o.parentElement)===null||i===void 0?void 0:i.closest("span"))===null||n===void 0?void 0:n.getAttribute("style");o.setAttribute("style",`${s};${r}`)})},GF=Wi.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:e=>e.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&QY(e),{}):!1}]},renderHTML({HTMLAttributes:e}){return["span",ki(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:e})=>{const{selection:t}=e;return e.doc.nodesBetween(t.from,t.to,(o,i)=>{if(o.isTextblock)return!0;o.marks.filter(n=>n.type===this.type).some(n=>Object.values(n.attrs).some(r=>!!r))||e.removeMark(i,i+o.nodeSize,this.type)}),!0}}}}),tJ=Go.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Wo({key:new Bi("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:o,isFocused:i}=this.editor,{anchor:n}=t,r=[];if(!o||!i)return uo.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((u,m)=>{if(u.isText)return;if(!(n>=m&&n<=m+u.nodeSize-1))return!1;s+=1});let a=0;return e.descendants((u,m)=>{if(u.isText||!(n>=m&&n<=m+u.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(Qi.node(m,m+u.nodeSize,{class:this.options.className}))}),uo.create(e,r)}}})]}}),eJ=Pr.create({name:"text",group:"inline"}),oJ=Pr.create({name:"doc",topNode:!0,content:"block+"}),CN=Wi.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:i,$from:n}=t.selection;return t.doc.textBetween(o,i," ").length?e().setMark("textStyle",{textTransform:"none"}).run():e().setTextSelection({from:n.pos-n.nodeBefore.nodeSize,to:n.pos+n.nodeAfter.nodeSize}).setMark("textStyle",{textTransform:"none"}).focus().run()}}}}),iJ=Wi.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()}}}),nJ=Wi.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()}}}),rJ=e=>Go.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:i})=>{const{$from:n}=i.selection,r=n.parent,s=n.index();return r.child(s).type.name==="image"?!1:o().setMark("textStyle",{themeName:t}).run()},applySiblingNodeThemeSettings:()=>({chain:t,state:o})=>{var F,T;const{from:i,to:n,$from:r}=o.selection,s=r.parent,a=r.index(),u=((F=r.node(r.depth))==null?void 0:F.type.name)==="dataField"||((T=s.maybeChild(a))==null?void 0:T.type.name)==="dataField",m=s.child(a).type.name==="image",c=R=>{const V="NormalText",N=R.index>0?s.child(R.index-1):void 0,A=R.index+1<s.childCount?s.child(R.index+1):void 0,E=N??A;if(E){const I=E.marks.find($=>$.type.name==="textStyle");if(I)return I.attrs.themeName}return V};if(u){const R=c({index:a});return t().unsetMark("textStyle",{extendEmptyMarkRange:!0}).setThemeSettings(R).run()}if(m)return!1;const f=c({index:a}),p=r.nodeBefore?r.pos-r.nodeBefore.nodeSize:i,C=r.nodeAfter?r.pos+r.nodeAfter.nodeSize:n;return t().setTextSelection({from:p,to:C}).setThemeSettings(f).run()}}},addProseMirrorPlugins(){return[new Wo({key:new Bi("syncBlockTheme"),appendTransaction:(t,o,i)=>{const n=i.tr;let r=!1;return i.doc.descendants((s,a)=>{var u,m;if(s.type.name==="bulletList"||s.type.name==="orderedList"){const c=s.firstChild,f=c==null?void 0:c.firstChild,p=f==null?void 0:f.firstChild;if(p){const C=(u=p.marks.find(F=>F.type.name==="textStyle"))==null?void 0:u.attrs.themeName;C&&s.attrs.themeName!==C&&(n.setNodeMarkup(a,void 0,{...s.attrs,themeName:C}),r=!0)}}if(s.type.name==="paragraph"){const c=s.firstChild;if(c){const f=(m=c.marks.find(p=>p.type.name==="textStyle"))==null?void 0:m.attrs.themeName;f&&s.attrs.themeName!==f&&(n.setNodeMarkup(a,void 0,{...s.attrs,themeName:f}),r=!0)}}}),r?n:null}})]}}),sJ=Wi.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:i,$from:n}=t.selection;return t.doc.textBetween(o,i," ").length?e().setMark("textStyle",{fontWeight:"normal"}).run():e().setTextSelection({from:n.pos-n.nodeBefore.nodeSize,to:n.pos+n.nodeAfter.nodeSize}).setMark("textStyle",{fontWeight:"normal"}).focus().run()},resetFontWeight:()=>({chain:e})=>e().setMark("textStyle",{fontWeight:null}).removeEmptyTextStyle().run()}}}),aJ=Wi.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:i,$from:n}=t.selection;return t.doc.textBetween(o,i," ").length?e().setMark("textStyle",{fontStyle:"normal"}).run():e().setTextSelection({from:n.pos-n.nodeBefore.nodeSize,to:n.pos+n.nodeAfter.nodeSize}).setMark("textStyle",{fontStyle:"normal"}).focus().run()},resetFontStyle:()=>({chain:e})=>e().setMark("textStyle",{fontStyle:null}).removeEmptyTextStyle().run()}}}),KF=Wi.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",ki(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnsubscribeLink:()=>({chain:e})=>e().setMark("unsubscribeLink").focus().run(),unsetUnsubscribeLink:()=>({chain:e,state:t})=>{const{from:o,to:i}=t.selection,n=t.doc.textBetween(o,i," "),r=t.doc.nodeAt(o);return(r==null?void 0:r.type.name)==="image"?e().unsetMark("unsubscribeLink").focus().run():n.length?e().setTextSelection({from:o,to:o+n.length}).unsetMark("unsubscribeLink").focus().run():e().unsetMark("unsubscribeLink",{extendEmptyMarkRange:!0}).focus().run()}}}}),lJ="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",uJ="ελ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",jl=(e,t)=>{for(const o in t)e[o]=t[o];return e},m0="numeric",c0="ascii",f0="alpha",td="asciinumeric",Mu="alphanumeric",h0="domain",gN="emoji",dJ="scheme",mJ="slashscheme",ZC="whitespace";function cJ(e,t){return e in t||(t[e]=[]),t[e]}function ra(e,t,o){t[m0]&&(t[td]=!0,t[Mu]=!0),t[c0]&&(t[td]=!0,t[f0]=!0),t[td]&&(t[Mu]=!0),t[f0]&&(t[Mu]=!0),t[Mu]&&(t[h0]=!0),t[gN]&&(t[h0]=!0);for(const i in t){const n=cJ(i,o);n.indexOf(e)<0&&n.push(e)}}function fJ(e,t){const o={};for(const i in t)t[i].indexOf(e)>=0&&(o[i]=!0);return o}function gi(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}gi.groups={};gi.prototype={accepts(){return!!this.t},go(e){const t=this,o=t.j[e];if(o)return o;for(let i=0;i<t.jr.length;i++){const n=t.jr[i][0],r=t.jr[i][1];if(r&&n.test(e))return r}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,o,i){for(let n=0;n<e.length;n++)this.tt(e[n],t,o,i)},tr(e,t,o,i){i=i||gi.groups;let n;return t&&t.j?n=t:(n=new gi(t),o&&i&&ra(t,o,i)),this.jr.push([e,n]),n},ts(e,t,o,i){let n=this;const r=e.length;if(!r)return n;for(let s=0;s<r-1;s++)n=n.tt(e[s]);return n.tt(e[r-1],t,o,i)},tt(e,t,o,i){i=i||gi.groups;const n=this;if(t&&t.j)return n.j[e]=t,t;const r=t;let s,a=n.go(e);if(a?(s=new gi,jl(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new gi,r){if(i)if(s.t&&typeof s.t=="string"){const u=jl(fJ(s.t,i),o);ra(r,u,i)}else o&&ra(r,o,i);s.t=r}return n.j[e]=s,s}};const te=(e,t,o,i,n)=>e.ta(t,o,i,n),Ze=(e,t,o,i,n)=>e.tr(t,o,i,n),xD=(e,t,o,i,n)=>e.ts(t,o,i,n),at=(e,t,o,i,n)=>e.tt(t,o,i,n),cr="WORD",p0="UWORD",FN="ASCIINUMERICAL",yN="ALPHANUMERICAL",bd="LOCALHOST",C0="TLD",g0="UTLD",Nc="SCHEME",ll="SLASH_SCHEME",qF="NUM",F0="WS",YF="NL",ed="OPENBRACE",od="CLOSEBRACE",hf="OPENBRACKET",pf="CLOSEBRACKET",Cf="OPENPAREN",gf="CLOSEPAREN",Ff="OPENANGLEBRACKET",yf="CLOSEANGLEBRACKET",Tf="FULLWIDTHLEFTPAREN",Bf="FULLWIDTHRIGHTPAREN",Sf="LEFTCORNERBRACKET",Vf="RIGHTCORNERBRACKET",Rf="LEFTWHITECORNERBRACKET",Df="RIGHTWHITECORNERBRACKET",xf="FULLWIDTHLESSTHAN",bf="FULLWIDTHGREATERTHAN",Lf="AMPERSAND",JF="APOSTROPHE",Ef="ASTERISK",Qr="AT",Nf="BACKSLASH",_f="BACKTICK",Pf="CARET",is="COLON",ZF="COMMA",vf="DOLLAR",_n="DOT",Af="EQUALS",XF="EXCLAMATION",Yi="HYPHEN",id="PERCENT",If="PIPE",wf="PLUS",kf="POUND",nd="QUERY",QF="QUOTE",TN="FULLWIDTHMIDDLEDOT",ty="SEMI",Pn="SLASH",rd="TILDE",Wf="UNDERSCORE",BN="EMOJI",Of="SYM";var SN=Object.freeze({__proto__:null,WORD:cr,UWORD:p0,ASCIINUMERICAL:FN,ALPHANUMERICAL:yN,LOCALHOST:bd,TLD:C0,UTLD:g0,SCHEME:Nc,SLASH_SCHEME:ll,NUM:qF,WS:F0,NL:YF,OPENBRACE:ed,CLOSEBRACE:od,OPENBRACKET:hf,CLOSEBRACKET:pf,OPENPAREN:Cf,CLOSEPAREN:gf,OPENANGLEBRACKET:Ff,CLOSEANGLEBRACKET:yf,FULLWIDTHLEFTPAREN:Tf,FULLWIDTHRIGHTPAREN:Bf,LEFTCORNERBRACKET:Sf,RIGHTCORNERBRACKET:Vf,LEFTWHITECORNERBRACKET:Rf,RIGHTWHITECORNERBRACKET:Df,FULLWIDTHLESSTHAN:xf,FULLWIDTHGREATERTHAN:bf,AMPERSAND:Lf,APOSTROPHE:JF,ASTERISK:Ef,AT:Qr,BACKSLASH:Nf,BACKTICK:_f,CARET:Pf,COLON:is,COMMA:ZF,DOLLAR:vf,DOT:_n,EQUALS:Af,EXCLAMATION:XF,HYPHEN:Yi,PERCENT:id,PIPE:If,PLUS:wf,POUND:kf,QUERY:nd,QUOTE:QF,FULLWIDTHMIDDLEDOT:TN,SEMI:ty,SLASH:Pn,TILDE:rd,UNDERSCORE:Wf,EMOJI:BN,SYM:Of});const dr=/[a-z]/,Iu=/\p{L}/u,XC=/\p{Emoji}/u,mr=/\d/,QC=/\s/,bD="\r",tg=`
|
|
171
171
|
`,hJ="️",pJ="",eg="";let hc=null,pc=null;function CJ(e=[]){const t={};gi.groups=t;const o=new gi;hc==null&&(hc=LD(lJ)),pc==null&&(pc=LD(uJ)),at(o,"'",JF),at(o,"{",ed),at(o,"}",od),at(o,"[",hf),at(o,"]",pf),at(o,"(",Cf),at(o,")",gf),at(o,"<",Ff),at(o,">",yf),at(o,"(",Tf),at(o,")",Bf),at(o,"「",Sf),at(o,"」",Vf),at(o,"『",Rf),at(o,"』",Df),at(o,"<",xf),at(o,">",bf),at(o,"&",Lf),at(o,"*",Ef),at(o,"@",Qr),at(o,"`",_f),at(o,"^",Pf),at(o,":",is),at(o,",",ZF),at(o,"$",vf),at(o,".",_n),at(o,"=",Af),at(o,"!",XF),at(o,"-",Yi),at(o,"%",id),at(o,"|",If),at(o,"+",wf),at(o,"#",kf),at(o,"?",nd),at(o,'"',QF),at(o,"/",Pn),at(o,";",ty),at(o,"~",rd),at(o,"_",Wf),at(o,"\\",Nf),at(o,"・",TN);const i=Ze(o,mr,qF,{[m0]:!0});Ze(i,mr,i);const n=Ze(i,dr,FN,{[td]:!0}),r=Ze(i,Iu,yN,{[Mu]:!0}),s=Ze(o,dr,cr,{[c0]:!0});Ze(s,mr,n),Ze(s,dr,s),Ze(n,mr,n),Ze(n,dr,n);const a=Ze(o,Iu,p0,{[f0]:!0});Ze(a,dr),Ze(a,mr,r),Ze(a,Iu,a),Ze(r,mr,r),Ze(r,dr),Ze(r,Iu,r);const u=at(o,tg,YF,{[ZC]:!0}),m=at(o,bD,F0,{[ZC]:!0}),c=Ze(o,QC,F0,{[ZC]:!0});at(o,eg,c),at(m,tg,u),at(m,eg,c),Ze(m,QC,c),at(c,bD),at(c,tg),Ze(c,QC,c),at(c,eg,c);const f=Ze(o,XC,BN,{[gN]:!0});at(f,"#"),Ze(f,XC,f),at(f,hJ,f);const p=at(f,pJ);at(p,"#"),Ze(p,XC,f);const C=[[dr,s],[mr,n]],F=[[dr,null],[Iu,a],[mr,r]];for(let T=0;T<hc.length;T++)Kr(o,hc[T],C0,cr,C);for(let T=0;T<pc.length;T++)Kr(o,pc[T],g0,p0,F);ra(C0,{tld:!0,ascii:!0},t),ra(g0,{utld:!0,alpha:!0},t),Kr(o,"file",Nc,cr,C),Kr(o,"mailto",Nc,cr,C),Kr(o,"http",ll,cr,C),Kr(o,"https",ll,cr,C),Kr(o,"ftp",ll,cr,C),Kr(o,"ftps",ll,cr,C),ra(Nc,{scheme:!0,ascii:!0},t),ra(ll,{slashscheme:!0,ascii:!0},t),e=e.sort((T,R)=>T[0]>R[0]?1:-1);for(let T=0;T<e.length;T++){const R=e[T][0],N=e[T][1]?{[dJ]:!0}:{[mJ]:!0};R.indexOf("-")>=0?N[h0]=!0:dr.test(R)?mr.test(R)?N[td]=!0:N[c0]=!0:N[m0]=!0,xD(o,R,R,N)}return xD(o,"localhost",bd,{ascii:!0}),o.jd=new gi(Of),{start:o,tokens:jl({groups:t},SN)}}function VN(e,t){const o=gJ(t.replace(/[A-Z]/g,a=>a.toLowerCase())),i=o.length,n=[];let r=0,s=0;for(;s<i;){let a=e,u=null,m=0,c=null,f=-1,p=-1;for(;s<i&&(u=a.go(o[s]));)a=u,a.accepts()?(f=0,p=0,c=a):f>=0&&(f+=o[s].length,p++),m+=o[s].length,r+=o[s].length,s++;r-=f,s-=p,m-=f,n.push({t:c.t,v:t.slice(r-m,r),s:r-m,e:r})}return n}function gJ(e){const t=[],o=e.length;let i=0;for(;i<o;){let n=e.charCodeAt(i),r,s=n<55296||n>56319||i+1===o||(r=e.charCodeAt(i+1))<56320||r>57343?e[i]:e.slice(i,i+2);t.push(s),i+=s.length}return t}function Kr(e,t,o,i,n){let r;const s=t.length;for(let a=0;a<s-1;a++){const u=t[a];e.j[u]?r=e.j[u]:(r=new gi(i),r.jr=n.slice(),e.j[u]=r),e=r}return r=new gi(o),r.jr=n.slice(),e.j[t[s-1]]=r,r}function LD(e){const t=[],o=[];let i=0,n="0123456789";for(;i<e.length;){let r=0;for(;n.indexOf(e[i+r])>=0;)r++;if(r>0){t.push(o.join(""));for(let s=parseInt(e.substring(i,i+r),10);s>0;s--)o.pop();i+=r}else o.push(e[i]),i++}return t}const Ld={defaultProtocol:"http",events:null,format:ED,formatHref:ED,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ey(e,t=null){let o=jl({},Ld);e&&(o=jl(o,e instanceof ey?e.o:e));const i=o.ignoreTags,n=[];for(let r=0;r<i.length;r++)n.push(i[r].toUpperCase());this.o=o,t&&(this.defaultRender=t),this.ignoreTags=n}ey.prototype={o:Ld,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,o){const i=t!=null;let n=this.o[e];return n&&(typeof n=="object"?(n=o.t in n?n[o.t]:Ld[e],typeof n=="function"&&i&&(n=n(t,o))):typeof n=="function"&&i&&(n=n(t,o.t,o)),n)},getObj(e,t,o){let i=this.o[e];return typeof i=="function"&&t!=null&&(i=i(t,o.t,o)),i},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function ED(e){return e}function RN(e,t){this.t="token",this.v=e,this.tk=t}RN.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),o=e.get("truncate",t,this),i=e.get("format",t,this);return o&&i.length>o?i.substring(0,o)+"…":i},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=Ld.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")),i=e.get("formatHref",o,this),n=e.get("tagName",o,t),r=this.toFormattedString(e),s={},a=e.get("className",o,t),u=e.get("target",o,t),m=e.get("rel",o,t),c=e.getObj("attributes",o,t),f=e.getObj("events",o,t);return s.href=i,a&&(s.class=a),u&&(s.target=u),m&&(s.rel=m),c&&jl(s,c),{tagName:n,attributes:s,content:r,eventListeners:f}}};function vh(e,t){class o extends RN{constructor(n,r){super(n,r),this.t=e}}for(const i in t)o.prototype[i]=t[i];return o.t=e,o}const ND=vh("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),_D=vh("text"),FJ=vh("nl"),Cc=vh("url",{isLink:!0,toHref(e=Ld.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==bd&&e[1].t===is}}),qi=e=>new gi(e);function yJ({groups:e}){const t=e.domain.concat([Lf,Ef,Qr,Nf,_f,Pf,vf,Af,Yi,qF,id,If,wf,kf,Pn,Of,rd,Wf]),o=[is,ZF,_n,XF,id,nd,QF,ty,Ff,yf,ed,od,pf,hf,Cf,gf,Tf,Bf,Sf,Vf,Rf,Df,xf,bf],i=[Lf,JF,Ef,Nf,_f,Pf,vf,Af,Yi,ed,od,id,If,wf,kf,nd,Pn,Of,rd,Wf],n=qi(),r=at(n,rd);te(r,i,r),te(r,e.domain,r);const s=qi(),a=qi(),u=qi();te(n,e.domain,s),te(n,e.scheme,a),te(n,e.slashscheme,u),te(s,i,r),te(s,e.domain,s);const m=at(s,Qr);at(r,Qr,m),at(a,Qr,m),at(u,Qr,m);const c=at(r,_n);te(c,i,r),te(c,e.domain,r);const f=qi();te(m,e.domain,f),te(f,e.domain,f);const p=at(f,_n);te(p,e.domain,f);const C=qi(ND);te(p,e.tld,C),te(p,e.utld,C),at(m,bd,C);const F=at(f,Yi);at(F,Yi,F),te(F,e.domain,f),te(C,e.domain,f),at(C,_n,p),at(C,Yi,F);const T=at(C,is);te(T,e.numeric,ND);const R=at(s,Yi),V=at(s,_n);at(R,Yi,R),te(R,e.domain,s),te(V,i,r),te(V,e.domain,s);const N=qi(Cc);te(V,e.tld,N),te(V,e.utld,N),te(N,e.domain,s),te(N,i,r),at(N,_n,V),at(N,Yi,R),at(N,Qr,m);const A=at(N,is),E=qi(Cc);te(A,e.numeric,E);const I=qi(Cc),$=qi();te(I,t,I),te(I,o,$),te($,t,I),te($,o,$),at(N,Pn,I),at(E,Pn,I);const k=at(a,is),Z=at(u,is),J=at(Z,Pn),yt=at(J,Pn);te(a,e.domain,s),at(a,_n,V),at(a,Yi,R),te(u,e.domain,s),at(u,_n,V),at(u,Yi,R),te(k,e.domain,I),at(k,Pn,I),at(k,nd,I),te(yt,e.domain,I),te(yt,t,I),at(yt,Pn,I);const Vt=[[ed,od],[hf,pf],[Cf,gf],[Ff,yf],[Tf,Bf],[Sf,Vf],[Rf,Df],[xf,bf]];for(let zt=0;zt<Vt.length;zt++){const[Jt,Te]=Vt[zt],Ae=at(I,Jt);at($,Jt,Ae),at(Ae,Te,I);const vt=qi(Cc);te(Ae,t,vt);const Et=qi();te(Ae,o),te(vt,t,vt),te(vt,o,Et),te(Et,t,vt),te(Et,o,Et),at(vt,Te,I),at(Et,Te,I)}return at(n,bd,N),at(n,YF,FJ),{start:n,tokens:SN}}function TJ(e,t,o){let i=o.length,n=0,r=[],s=[];for(;n<i;){let a=e,u=null,m=null,c=0,f=null,p=-1;for(;n<i&&!(u=a.go(o[n].t));)s.push(o[n++]);for(;n<i&&(m=u||a.go(o[n].t));)u=null,a=m,a.accepts()?(p=0,f=a):p>=0&&p++,n++,c++;if(p<0)n-=c,n<i&&(s.push(o[n]),n++);else{s.length>0&&(r.push(og(_D,t,s)),s=[]),n-=p,c-=p;const C=f.t,F=o.slice(n-c,n);r.push(og(C,t,F))}}return s.length>0&&r.push(og(_D,t,s)),r}function og(e,t,o){const i=o[0].s,n=o[o.length-1].e,r=t.slice(i,n);return new e(r,o)}const BJ=typeof console<"u"&&console&&console.warn||(()=>{}),SJ="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",ke={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function VJ(){return gi.groups={},ke.scanner=null,ke.parser=null,ke.tokenQueue=[],ke.pluginQueue=[],ke.customSchemes=[],ke.initialized=!1,ke}function PD(e,t=!1){if(ke.initialized&&BJ(`linkifyjs: already initialized - will not register custom scheme "${e}" ${SJ}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format.
|
|
172
172
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
173
173
|
2. Cannot start or end with "-"
|
package/package.json
CHANGED