@retailrocketgroup/retailrocket-create.abandoned-view-price-drop-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 HQ(t,e,o){const i=document.querySelector(`style[data-tiptap-style${o?`-${o}`:""}]`);if(i!==null)return i;const n=document.createElement("style");return e&&n.setAttribute("nonce",e),n.setAttribute(`data-tiptap-style${o?`-${o}`:""}`,""),n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n),n}let $Q=class extends ZZ{constructor(e={}){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(e),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=HQ(MQ,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,o=!0){this.setOptions({editable:e}),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(e,o){const i=P_(o)?o(e,[...this.state.plugins]):[...this.state.plugins,e],n=this.state.reconfigure({plugins:i});return this.view.updateState(n),n}unregisterPlugin(e){if(this.isDestroyed)return;const o=this.state.plugins;let i=o;if([].concat(e).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 e,o;const n=[...this.options.enableCoreExtensions?[IQ,mX.configure({blockSeparator:(o=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||o===void 0?void 0:o.blockSeparator}),PQ,wQ,kQ,OQ,AQ,WQ].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 Kl(n,this)}createCommandManager(){this.commandManager=new Lp({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let o;try{o=TF(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=TF(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const i=O_(o,this.options.autofocus);this.view=new hZ(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Gl.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(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const o=this.capturedTransaction;return this.capturedTransaction=null,o}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}const o=this.state.apply(e),i=!this.state.selection.eq(o.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:o}),this.view.updateState(o),this.emit("transaction",{editor:this,transaction:e}),i&&this.emit("selectionUpdate",{editor:this,transaction:e});const n=e.getMeta("focus"),r=e.getMeta("blur");n&&this.emit("focus",{editor:this,event:n.event,transaction:e}),r&&this.emit("blur",{editor:this,event:r.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return z_(this.state,e)}isActive(e,o){const i=typeof e=="string"?e:null,n=typeof e=="string"?o:e;return mQ(this.state,i,n)}getJSON(){return this.state.doc.toJSON()}getHTML(){return dT(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:o=`
|
|
169
169
|
|
|
170
|
-
`,textSerializers:i={}}=e||{};return aQ(this.state.doc,{blockSeparator:o,textSerializers:{...w_(this.schema),...i}})}get isEmpty(){return pT(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 e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,o){var i;return((i=this.$doc)===null||i===void 0?void 0:i.querySelector(e,o))||null}$nodes(e,o){var i;return((i=this.$doc)===null||i===void 0?void 0:i.querySelectorAll(e,o))||null}$pos(e){const o=this.state.doc.resolve(e);return new Ra(o,this)}get $doc(){return this.$pos(0)}};function zQ(t){return new A_({find:t.find,handler:({state:e,range:o,match:i})=>{const n=Ft(t.getAttributes,void 0,i)||{},{tr:r}=e,s=o.from;let a=o.to;const u=t.type.create(n);if(i[1]){const c=i[0].lastIndexOf(i[1]);let m=s+c;m>a?m=a:a=m+i[1].length;const f=i[0][i[0].length-1];r.insertText(f,s+i[0].length-1),r.replaceWith(m,a,u)}else if(i[0]){const c=t.type.isInline?s:s-1;r.insert(c,t.type.create(n)).delete(r.mapping.map(s),r.mapping.map(a))}r.scrollIntoView()}})}function uh(t){return new A_({find:t.find,handler:({state:e,range:o,match:i,chain:n})=>{const r=Ft(t.getAttributes,void 0,i)||{},s=e.tr.delete(o.from,o.to),u=s.doc.resolve(o.from).blockRange(),c=u&&Zy(u,t.type,r);if(!c)return null;if(s.wrap(u,c),t.keepMarks&&t.editor){const{selection:f,storedMarks:p}=e,{splittableMarks:C}=t.editor.extensionManager,F=p||f.$to.parentOffset&&f.$from.marks();if(F){const y=F.filter(S=>C.includes(S.type.name));s.ensureMarks(y)}}if(t.keepAttributes){const f=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";n().updateAttributes(f,r).run()}const m=s.doc.resolve(o.from-1).nodeBefore;m&&m.type===t.type&&ta(s.doc,o.from-1)&&(!t.joinPredicate||t.joinPredicate(i,m))&&s.join(o.from-1)}})}let Qr=class SF{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.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=Ft(_e(this,"addOptions",{name:this.name}))),this.storage=Ft(_e(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new SF(e)}configure(e={}){const o=this.extend({...this.config,addOptions:()=>vp(this.options,e)});return o.name=this.name,o.parent=this.parent,o}extend(e={}){const o=new SF(e);return o.parent=this,this.child=o,o.name=e.name?e.name:o.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${o.name}".`),o.options=Ft(_e(o,"addOptions",{name:o.name})),o.storage=Ft(_e(o,"addStorage",{name:o.name,options:o.options})),o}};function UQ(t){return new sX({find:t.find,handler:({state:e,range:o,match:i,pasteEvent:n})=>{const r=Ft(t.getAttributes,void 0,i,n);if(r===!1||r===null)return null;const{tr:s}=e,a=i[i.length-1],u=i[0];let c=o.to;if(a){const m=u.search(/\S/),f=o.from+u.indexOf(a),p=f+a.length;if(U_(o.from,o.to,e.doc).filter(F=>F.mark.type.excluded.find(S=>S===t.type&&S!==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+m,f),c=o.from+m+a.length,s.addMark(o.from+m,c,t.type.create(r||{})),s.removeStoredMark(t.type)}}})}function fb(t){return SM((e,o)=>({get(){return e(),t},set(i){t=i,requestAnimationFrame(()=>{requestAnimationFrame(()=>{o()})})}}))}class jQ extends $Q{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=fb(this.view.state),this.reactiveExtensionStorage=fb(this.extensionStorage),this.on("beforeTransaction",({nextState:o})=>{this.reactiveState.value=o,this.reactiveExtensionStorage.value=this.extensionStorage}),g1(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,o){const i=super.registerPlugin(e,o);return this.reactiveState&&(this.reactiveState.value=i),i}unregisterPlugin(e){const o=super.unregisterPlugin(e);return this.reactiveState&&o&&(this.reactiveState.value=o),o}}const GQ=Pe({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=at(),o=wn();return Lu(()=>{const i=t.editor;i&&i.options.element&&e.value&&Qa(()=>{if(!e.value||!i.options.element.firstChild)return;const n=H(e.value);e.value.append(...i.options.element.childNodes),i.contentComponent=o.ctx._,o&&(i.appContext={...o.appContext,provides:o.provides}),i.setOptions({element:n}),i.createNodeViews()})}),Yr(()=>{const i=t.editor;i&&(i.contentComponent=null,i.appContext=null)}),{rootEl:e}},render(){return mr("div",{ref:t=>{this.rootEl=t}})}}),KQ=(t={})=>{const e=Lo();return qr(()=>{e.value=new jQ(t)}),Yr(()=>{var o,i,n;const r=(o=e.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=e.value)===null||n===void 0||n.destroy()}),e},hb=t=>({type:"doc",content:t.Content.map(qQ)}),qQ=t=>"ParagraphNode"in t?K_(t):"BulletListNode"in t?YQ(t):"OrderedListNode"in t?JQ(t):"DataFieldNode"in t?G_(t):Ei(t),j_=t=>({type:"listItem",content:t.Content.map(e=>"ParagraphNode"in e?K_(e):"ImageNode"in e?q_(e):Ei(e))}),G_=t=>({type:"dataField",marks:CT({textStyle:t.DataFieldNode.TextStyle,commonLinkMark:t.DataFieldNode.CommonLinkMark}),attrs:{stringExpression:t.DataFieldNode.StringExpression}}),YQ=t=>({type:"bulletList",content:t.BulletListNode.Content.map(j_),attrs:{themeName:t.BulletListNode.ListStyle}}),JQ=t=>({type:"orderedList",content:t.OrderedListNode.Content.map(j_),attrs:{themeName:t.OrderedListNode.ListStyle}}),K_=t=>({type:"paragraph",attrs:{themeName:t.ParagraphNode.ThemeName},content:t.ParagraphNode.Content.map(ZQ)}),ZQ=t=>"TextNode"in t?XQ(t):"HardBreakNode"in t?ree():"ImageNode"in t?q_(t):"DataFieldNode"in t?G_(t):Ei(t),CT=t=>{const e=[];return t.textStyle&&e.push(iee(t.textStyle)),t.commonLinkMark&&e.push(nee(t.commonLinkMark)),e.filter(o=>o!==void 0)},XQ=t=>({type:"text",text:t.TextNode.Text,marks:CT({textStyle:t.TextNode.TextStyle,commonLinkMark:t.TextNode.CommonLinkMark})}),QQ=t=>{switch(t){case"Normal":return"normal";case"Bold":return"bold";default:return"normal"}},eee=t=>{switch(t){case"Normal":return"normal";case"Italic":return"italic";default:return"normal"}},tee=t=>{switch(t){case"None":return"none";case"Uppercase":return"uppercase";default:return"none"}},oee=t=>{switch(t){case"None":return"none";case"Underline":return"underline";case"LineThrough":return"line-through";default:return"none"}},iee=t=>({type:"textStyle",attrs:{themeName:t.ThemeName,color:t.Style.Color,fontWeight:t.Style.FontWeight?QQ(t.Style.FontWeight):void 0,fontStyle:t.Style.FontStyle?eee(t.Style.FontStyle):void 0,fontSize:t.Style.FontSize?t.Style.FontSize+"px":void 0,lineHeight:t.Style.LineHeight?t.Style.LineHeight+"px":void 0,fontFamily:t.Style.FontFamily,textTransform:t.Style.TextTransform?tee(t.Style.TextTransform):void 0,textDecoration:t.Style.TextDecoration?oee(t.Style.TextDecoration):void 0}}),nee=t=>Ao(t).Match({LinkMark:e=>see({LinkMark:e}),UnsubscribeLinkMark:()=>aee()}),ree=()=>({type:"hardBreak"}),q_=t=>({type:"image",attrs:{src:t.ImageNode.Src,alt:t.ImageNode.Alt,isRetina:t.ImageNode.IsRetina,width:t.ImageNode.Width,height:t.ImageNode.Height},marks:CT({commonLinkMark:t.ImageNode.CommonLinkMark})}),see=t=>({type:"link",attrs:{href:t.LinkMark.Href}}),aee=()=>({type:"unsubscribeLink"}),lee=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.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}`)})},gT=Xi.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&lee(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Zi(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.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))||t.removeMark(i,i+o.nodeSize,this.type)}),!0}}}}),uee=Xo.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Uo({key:new vi("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:o,isFocused:i}=this.editor,{anchor:n}=e,r=[];if(!o||!i)return ho.create(t,[]);let s=0;this.options.mode==="deepest"&&t.descendants((u,c)=>{if(u.isText)return;if(!(n>=c&&n<=c+u.nodeSize-1))return!1;s+=1});let a=0;return t.descendants((u,c)=>{if(u.isText||!(n>=c&&n<=c+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(Cn.node(c,c+u.nodeSize,{class:this.options.className}))}),ho.create(t,r)}}})]}}),dee=Qr.create({name:"text",group:"inline"}),cee=Qr.create({name:"doc",topNode:!0,content:"block+"}),Y_=Xi.create({name:"textTransform",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textTransform:{default:"none",parseHTML:t=>t.style.textTransform,renderHTML:t=>t.textTransform?{style:`text-transform: ${t.textTransform}`}:{}}}}]},addCommands(){return{setTextTransform:t=>({chain:e})=>e().setMark("textStyle",{textTransform:t}).run(),unsetTextTransform:()=>({chain:t,state:e})=>{const{from:o,to:i,$from:n}=e.selection;return e.doc.textBetween(o,i," ").length?t().setMark("textStyle",{textTransform:"none"}).run():t().setTextSelection({from:n.pos-n.nodeBefore.nodeSize,to:n.pos+n.nodeAfter.nodeSize}).setMark("textStyle",{textTransform:"none"}).focus().run()}}}}),mee=Xi.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize.replace(/['"]+/g,""),renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t+"px"}).run(),resetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),fee=Xi.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight.replace(/['"]+/g,""),renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t+"px"}).run(),resetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).run()}}}),hee=t=>Xo.create({name:"themeFontStyles",priority:1e3,addOptions(){return{types:["textStyle","bulletList","orderedList","paragraph"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{themeName:{default:null,parseHTML:e=>e.getAttribute("data-theme"),renderHTML:e=>e.themeName?{"data-theme":e.themeName,class:e.themeName}:{"data-theme":t,class:e.themeName}}}}]},addCommands(){return{setThemeSettings:e=>({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:e}).run()},applySiblingNodeThemeSettings:()=>({chain:e,state:o})=>{var F,y;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"||((y=s.maybeChild(a))==null?void 0:y.type.name)==="dataField",c=s.child(a).type.name==="image",m=S=>{const T="NormalText",L=S.index>0?s.child(S.index-1):void 0,v=S.index+1<s.childCount?s.child(S.index+1):void 0,b=L??v;if(b){const P=b.marks.find(w=>w.type.name==="textStyle");if(P)return P.attrs.themeName}return T};if(u){const S=m({index:a});return e().unsetMark("textStyle",{extendEmptyMarkRange:!0}).setThemeSettings(S).run()}if(c)return!1;const f=m({index:a}),p=r.nodeBefore?r.pos-r.nodeBefore.nodeSize:i,C=r.nodeAfter?r.pos+r.nodeAfter.nodeSize:n;return e().setTextSelection({from:p,to:C}).setThemeSettings(f).run()}}},addProseMirrorPlugins(){return[new Uo({key:new vi("syncBlockTheme"),appendTransaction:(e,o,i)=>{const n=i.tr;let r=!1;return i.doc.descendants((s,a)=>{var u,c;if(s.type.name==="bulletList"||s.type.name==="orderedList"){const m=s.firstChild,f=m==null?void 0:m.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 m=s.firstChild;if(m){const f=(c=m.marks.find(p=>p.type.name==="textStyle"))==null?void 0:c.attrs.themeName;f&&s.attrs.themeName!==f&&(n.setNodeMarkup(a,void 0,{...s.attrs,themeName:f}),r=!0)}}}),r?n:null}})]}}),pee=Xi.create({name:"fontWeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontWeight:{default:null,parseHTML:t=>t.style.fontWeight,renderHTML:t=>t.fontWeight?{style:`font-weight: ${t.fontWeight}`}:{}}}}]},addCommands(){return{setFontWeight:t=>({chain:e})=>e().setMark("textStyle",{fontWeight:t}).run(),unsetFontWeight:()=>({chain:t,state:e})=>{const{from:o,to:i,$from:n}=e.selection;return e.doc.textBetween(o,i," ").length?t().setMark("textStyle",{fontWeight:"normal"}).run():t().setTextSelection({from:n.pos-n.nodeBefore.nodeSize,to:n.pos+n.nodeAfter.nodeSize}).setMark("textStyle",{fontWeight:"normal"}).focus().run()},resetFontWeight:()=>({chain:t})=>t().setMark("textStyle",{fontWeight:null}).removeEmptyTextStyle().run()}}}),Cee=Xi.create({name:"fontStyle",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontStyle:{default:null,parseHTML:t=>t.style.fontStyle,renderHTML:t=>t.fontStyle?{style:`font-style: ${t.fontStyle}`}:{}}}}]},addCommands(){return{setFontStyle:t=>({chain:e})=>e().setMark("textStyle",{fontStyle:t}).run(),unsetFontStyle:()=>({chain:t,state:e})=>{const{from:o,to:i,$from:n}=e.selection;return e.doc.textBetween(o,i," ").length?t().setMark("textStyle",{fontStyle:"normal"}).run():t().setTextSelection({from:n.pos-n.nodeBefore.nodeSize,to:n.pos+n.nodeAfter.nodeSize}).setMark("textStyle",{fontStyle:"normal"}).focus().run()},resetFontStyle:()=>({chain:t})=>t().setMark("textStyle",{fontStyle:null}).removeEmptyTextStyle().run()}}}),FT=Xi.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:t}){return["span",Zi(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnsubscribeLink:()=>({chain:t})=>t().setMark("unsubscribeLink").focus().run(),unsetUnsubscribeLink:()=>({chain:t,state:e})=>{const{from:o,to:i}=e.selection,n=e.doc.textBetween(o,i," "),r=e.doc.nodeAt(o);return(r==null?void 0:r.type.name)==="image"?t().unsetMark("unsubscribeLink").focus().run():n.length?t().setTextSelection({from:o,to:o+n.length}).unsetMark("unsubscribeLink").focus().run():t().unsetMark("unsubscribeLink",{extendEmptyMarkRange:!0}).focus().run()}}}}),gee="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Fee="ελ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",bu=(t,e)=>{for(const o in e)t[o]=e[o];return t},VF="numeric",RF="ascii",DF="alpha",Wd="asciinumeric",Vd="alphanumeric",xF="domain",J_="emoji",yee="scheme",Tee="slashscheme",Xg="whitespace";function Bee(t,e){return t in e||(e[t]=[]),e[t]}function _a(t,e,o){e[VF]&&(e[Wd]=!0,e[Vd]=!0),e[RF]&&(e[Wd]=!0,e[DF]=!0),e[Wd]&&(e[Vd]=!0),e[DF]&&(e[Vd]=!0),e[Vd]&&(e[xF]=!0),e[J_]&&(e[xF]=!0);for(const i in e){const n=Bee(i,o);n.indexOf(t)<0&&n.push(t)}}function See(t,e){const o={};for(const i in e)e[i].indexOf(t)>=0&&(o[i]=!0);return o}function Ri(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Ri.groups={};Ri.prototype={accepts(){return!!this.t},go(t){const e=this,o=e.j[t];if(o)return o;for(let i=0;i<e.jr.length;i++){const n=e.jr[i][0],r=e.jr[i][1];if(r&&n.test(t))return r}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,o,i){for(let n=0;n<t.length;n++)this.tt(t[n],e,o,i)},tr(t,e,o,i){i=i||Ri.groups;let n;return e&&e.j?n=e:(n=new Ri(e),o&&i&&_a(e,o,i)),this.jr.push([t,n]),n},ts(t,e,o,i){let n=this;const r=t.length;if(!r)return n;for(let s=0;s<r-1;s++)n=n.tt(t[s]);return n.tt(t[r-1],e,o,i)},tt(t,e,o,i){i=i||Ri.groups;const n=this;if(e&&e.j)return n.j[t]=e,e;const r=e;let s,a=n.go(t);if(a?(s=new Ri,bu(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new Ri,r){if(i)if(s.t&&typeof s.t=="string"){const u=bu(See(s.t,i),o);_a(r,u,i)}else o&&_a(r,o,i);s.t=r}return n.j[t]=s,s}};const st=(t,e,o,i,n)=>t.ta(e,o,i,n),ro=(t,e,o,i,n)=>t.tr(e,o,i,n),pb=(t,e,o,i,n)=>t.ts(e,o,i,n),me=(t,e,o,i,n)=>t.tt(e,o,i,n),Nr="WORD",bF="UWORD",Z_="ASCIINUMERICAL",X_="ALPHANUMERICAL",fc="LOCALHOST",LF="TLD",EF="UTLD",Sf="SCHEME",Hl="SLASH_SCHEME",yT="NUM",vF="WS",TT="NL",Od="OPENBRACE",Md="CLOSEBRACE",dh="OPENBRACKET",ch="CLOSEBRACKET",mh="OPENPAREN",fh="CLOSEPAREN",hh="OPENANGLEBRACKET",ph="CLOSEANGLEBRACKET",Ch="FULLWIDTHLEFTPAREN",gh="FULLWIDTHRIGHTPAREN",Fh="LEFTCORNERBRACKET",yh="RIGHTCORNERBRACKET",Th="LEFTWHITECORNERBRACKET",Bh="RIGHTWHITECORNERBRACKET",Sh="FULLWIDTHLESSTHAN",Vh="FULLWIDTHGREATERTHAN",Rh="AMPERSAND",BT="APOSTROPHE",Dh="ASTERISK",Rs="AT",xh="BACKSLASH",bh="BACKTICK",Lh="CARET",bs="COLON",ST="COMMA",Eh="DOLLAR",Zn="DOT",vh="EQUALS",VT="EXCLAMATION",mn="HYPHEN",Hd="PERCENT",Nh="PIPE",_h="PLUS",Ph="POUND",$d="QUERY",RT="QUOTE",Q_="FULLWIDTHMIDDLEDOT",DT="SEMI",Xn="SLASH",zd="TILDE",Ah="UNDERSCORE",eP="EMOJI",Ih="SYM";var tP=Object.freeze({__proto__:null,WORD:Nr,UWORD:bF,ASCIINUMERICAL:Z_,ALPHANUMERICAL:X_,LOCALHOST:fc,TLD:LF,UTLD:EF,SCHEME:Sf,SLASH_SCHEME:Hl,NUM:yT,WS:vF,NL:TT,OPENBRACE:Od,CLOSEBRACE:Md,OPENBRACKET:dh,CLOSEBRACKET:ch,OPENPAREN:mh,CLOSEPAREN:fh,OPENANGLEBRACKET:hh,CLOSEANGLEBRACKET:ph,FULLWIDTHLEFTPAREN:Ch,FULLWIDTHRIGHTPAREN:gh,LEFTCORNERBRACKET:Fh,RIGHTCORNERBRACKET:yh,LEFTWHITECORNERBRACKET:Th,RIGHTWHITECORNERBRACKET:Bh,FULLWIDTHLESSTHAN:Sh,FULLWIDTHGREATERTHAN:Vh,AMPERSAND:Rh,APOSTROPHE:BT,ASTERISK:Dh,AT:Rs,BACKSLASH:xh,BACKTICK:bh,CARET:Lh,COLON:bs,COMMA:ST,DOLLAR:Eh,DOT:Zn,EQUALS:vh,EXCLAMATION:VT,HYPHEN:mn,PERCENT:Hd,PIPE:Nh,PLUS:_h,POUND:Ph,QUERY:$d,QUOTE:RT,FULLWIDTHMIDDLEDOT:Q_,SEMI:DT,SLASH:Xn,TILDE:zd,UNDERSCORE:Ah,EMOJI:eP,SYM:Ih});const Er=/[a-z]/,gd=/\p{L}/u,Qg=/\p{Emoji}/u,vr=/\d/,e0=/\s/,Cb="\r",t0=`
|
|
170
|
+
`,textSerializers:i={}}=e||{};return aQ(this.state.doc,{blockSeparator:o,textSerializers:{...w_(this.schema),...i}})}get isEmpty(){return pT(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 e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,o){var i;return((i=this.$doc)===null||i===void 0?void 0:i.querySelector(e,o))||null}$nodes(e,o){var i;return((i=this.$doc)===null||i===void 0?void 0:i.querySelectorAll(e,o))||null}$pos(e){const o=this.state.doc.resolve(e);return new Ra(o,this)}get $doc(){return this.$pos(0)}};function zQ(t){return new A_({find:t.find,handler:({state:e,range:o,match:i})=>{const n=Ft(t.getAttributes,void 0,i)||{},{tr:r}=e,s=o.from;let a=o.to;const u=t.type.create(n);if(i[1]){const c=i[0].lastIndexOf(i[1]);let m=s+c;m>a?m=a:a=m+i[1].length;const f=i[0][i[0].length-1];r.insertText(f,s+i[0].length-1),r.replaceWith(m,a,u)}else if(i[0]){const c=t.type.isInline?s:s-1;r.insert(c,t.type.create(n)).delete(r.mapping.map(s),r.mapping.map(a))}r.scrollIntoView()}})}function uh(t){return new A_({find:t.find,handler:({state:e,range:o,match:i,chain:n})=>{const r=Ft(t.getAttributes,void 0,i)||{},s=e.tr.delete(o.from,o.to),u=s.doc.resolve(o.from).blockRange(),c=u&&Zy(u,t.type,r);if(!c)return null;if(s.wrap(u,c),t.keepMarks&&t.editor){const{selection:f,storedMarks:p}=e,{splittableMarks:C}=t.editor.extensionManager,F=p||f.$to.parentOffset&&f.$from.marks();if(F){const y=F.filter(S=>C.includes(S.type.name));s.ensureMarks(y)}}if(t.keepAttributes){const f=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";n().updateAttributes(f,r).run()}const m=s.doc.resolve(o.from-1).nodeBefore;m&&m.type===t.type&&ta(s.doc,o.from-1)&&(!t.joinPredicate||t.joinPredicate(i,m))&&s.join(o.from-1)}})}let Qr=class SF{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.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=Ft(_e(this,"addOptions",{name:this.name}))),this.storage=Ft(_e(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new SF(e)}configure(e={}){const o=this.extend({...this.config,addOptions:()=>vp(this.options,e)});return o.name=this.name,o.parent=this.parent,o}extend(e={}){const o=new SF(e);return o.parent=this,this.child=o,o.name=e.name?e.name:o.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${o.name}".`),o.options=Ft(_e(o,"addOptions",{name:o.name})),o.storage=Ft(_e(o,"addStorage",{name:o.name,options:o.options})),o}};function UQ(t){return new sX({find:t.find,handler:({state:e,range:o,match:i,pasteEvent:n})=>{const r=Ft(t.getAttributes,void 0,i,n);if(r===!1||r===null)return null;const{tr:s}=e,a=i[i.length-1],u=i[0];let c=o.to;if(a){const m=u.search(/\S/),f=o.from+u.indexOf(a),p=f+a.length;if(U_(o.from,o.to,e.doc).filter(F=>F.mark.type.excluded.find(S=>S===t.type&&S!==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+m,f),c=o.from+m+a.length,s.addMark(o.from+m,c,t.type.create(r||{})),s.removeStoredMark(t.type)}}})}function fb(t){return SM((e,o)=>({get(){return e(),t},set(i){t=i,requestAnimationFrame(()=>{requestAnimationFrame(()=>{o()})})}}))}class jQ extends $Q{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=fb(this.view.state),this.reactiveExtensionStorage=fb(this.extensionStorage),this.on("beforeTransaction",({nextState:o})=>{this.reactiveState.value=o,this.reactiveExtensionStorage.value=this.extensionStorage}),g1(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,o){const i=super.registerPlugin(e,o);return this.reactiveState&&(this.reactiveState.value=i),i}unregisterPlugin(e){const o=super.unregisterPlugin(e);return this.reactiveState&&o&&(this.reactiveState.value=o),o}}const GQ=Pe({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=at(),o=wn();return Lu(()=>{const i=t.editor;i&&i.options.element&&e.value&&Qa(()=>{if(!e.value||!i.options.element.firstChild)return;const n=H(e.value);e.value.append(...i.options.element.childNodes),i.contentComponent=o.ctx._,o&&(i.appContext={...o.appContext,provides:o.provides}),i.setOptions({element:n}),i.createNodeViews()})}),Yr(()=>{const i=t.editor;i&&(i.contentComponent=null,i.appContext=null)}),{rootEl:e}},render(){return mr("div",{ref:t=>{this.rootEl=t}})}}),KQ=(t={})=>{const e=Lo();return qr(()=>{e.value=new jQ(t)}),Yr(()=>{var o,i,n;const r=(o=e.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=e.value)===null||n===void 0||n.destroy()}),e},hb=t=>({type:"doc",content:t.Content.map(qQ)}),qQ=t=>"ParagraphNode"in t?K_(t):"BulletListNode"in t?YQ(t):"OrderedListNode"in t?JQ(t):"DataFieldNode"in t?G_(t):Ei(t),j_=t=>({type:"listItem",content:t.Content.map(e=>"ParagraphNode"in e?K_(e):"ImageNode"in e?q_(e):Ei(e))}),G_=t=>({type:"dataField",marks:CT({textStyle:t.DataFieldNode.TextStyle,commonLinkMark:t.DataFieldNode.CommonLinkMark}),attrs:{stringExpression:t.DataFieldNode.StringExpression}}),YQ=t=>({type:"bulletList",content:t.BulletListNode.Content.map(j_),attrs:{themeName:t.BulletListNode.ListStyle}}),JQ=t=>({type:"orderedList",content:t.OrderedListNode.Content.map(j_),attrs:{themeName:t.OrderedListNode.ListStyle}}),K_=t=>({type:"paragraph",attrs:{themeName:t.ParagraphNode.ThemeName},content:t.ParagraphNode.Content.map(ZQ)}),ZQ=t=>"TextNode"in t?XQ(t):"HardBreakNode"in t?ree():"ImageNode"in t?q_(t):"DataFieldNode"in t?G_(t):Ei(t),CT=t=>{const e=[];return t.textStyle&&e.push(iee(t.textStyle)),t.commonLinkMark&&e.push(nee(t.commonLinkMark)),e.filter(o=>o!==void 0)},XQ=t=>({type:"text",text:t.TextNode.Text,marks:CT({textStyle:t.TextNode.TextStyle,commonLinkMark:t.TextNode.CommonLinkMark})}),QQ=t=>{switch(t){case"Normal":return"normal";case"Bold":return"bold";default:return"normal"}},eee=t=>{switch(t){case"Normal":return"normal";case"Italic":return"italic";default:return"normal"}},tee=t=>{switch(t){case"None":return"none";case"Uppercase":return"uppercase";default:return"none"}},oee=t=>{switch(t){case"None":return"none";case"Underline":return"underline";case"LineThrough":return"line-through";default:return"none"}},iee=t=>({type:"textStyle",attrs:{themeName:t.ThemeName,color:t.Style.Color,fontWeight:t.Style.FontWeight?QQ(t.Style.FontWeight):void 0,fontStyle:t.Style.FontStyle?eee(t.Style.FontStyle):void 0,fontSize:t.Style.FontSize?t.Style.FontSize+"px":void 0,lineHeight:t.Style.LineHeight?t.Style.LineHeight+"px":void 0,fontFamily:t.Style.FontFamily,textTransform:t.Style.TextTransform?tee(t.Style.TextTransform):void 0,textDecoration:t.Style.TextDecoration?oee(t.Style.TextDecoration):void 0}}),nee=t=>Ao(t).Match({LinkMark:e=>see({LinkMark:e}),UnsubscribeLinkMark:()=>aee()}),ree=()=>({type:"hardBreak"}),q_=t=>({type:"image",attrs:{src:t.ImageNode.Src,alt:t.ImageNode.Alt,isRetina:t.ImageNode.IsRetina,width:t.ImageNode.Width,height:t.ImageNode.Height},marks:CT({commonLinkMark:t.ImageNode.CommonLinkMark})}),see=t=>({type:"link",attrs:{href:t.LinkMark.Href}}),aee=()=>({type:"unsubscribeLink"}),lee=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.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}`)})},gT=Xi.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&lee(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Zi(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.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))||t.removeMark(i,i+o.nodeSize,this.type)}),!0}}}}),uee=Xo.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new Uo({key:new vi("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:o,isFocused:i}=this.editor,{anchor:n}=e,r=[];if(!o||!i)return ho.create(t,[]);let s=0;this.options.mode==="deepest"&&t.descendants((u,c)=>{if(u.isText)return;if(!(n>=c&&n<=c+u.nodeSize-1))return!1;s+=1});let a=0;return t.descendants((u,c)=>{if(u.isText||!(n>=c&&n<=c+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(Cn.node(c,c+u.nodeSize,{class:this.options.className}))}),ho.create(t,r)}}})]}}),dee=Qr.create({name:"text",group:"inline"}),cee=Qr.create({name:"doc",topNode:!0,content:"block+"}),Y_=Xi.create({name:"textTransform",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textTransform:{default:"none",parseHTML:t=>t.style.textTransform,renderHTML:t=>t.textTransform?{style:`text-transform: ${t.textTransform}`}:{}}}}]},addCommands(){return{setTextTransform:t=>({chain:e})=>e().setMark("textStyle",{textTransform:t}).run(),unsetTextTransform:()=>({chain:t,state:e})=>{const{from:o,to:i,$from:n}=e.selection;return e.doc.textBetween(o,i," ").length?t().setMark("textStyle",{textTransform:"none"}).run():t().setTextSelection({from:n.pos-n.nodeBefore.nodeSize,to:n.pos+n.nodeAfter.nodeSize}).setMark("textStyle",{textTransform:"none"}).focus().run()}}}}),mee=Xi.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize.replace(/['"]+/g,""),renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t+"px"}).run(),resetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),fee=Xi.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight.replace(/['"]+/g,""),renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t+"px"}).run(),resetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).run()}}}),hee=t=>Xo.create({name:"themeFontStyles",priority:1e3,addOptions(){return{types:["textStyle","bulletList","orderedList","paragraph"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{themeName:{default:t,parseHTML:e=>e.getAttribute("data-theme"),renderHTML:e=>e.themeName?{"data-theme":e.themeName,class:e.themeName}:{"data-theme":t,class:e.themeName}}}}]},addCommands(){return{setThemeSettings:e=>({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:e}).run()},applySiblingNodeThemeSettings:()=>({chain:e,state:o})=>{var F,y;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"||((y=s.maybeChild(a))==null?void 0:y.type.name)==="dataField",c=s.child(a).type.name==="image",m=S=>{const T="NormalText",L=S.index>0?s.child(S.index-1):void 0,v=S.index+1<s.childCount?s.child(S.index+1):void 0,b=L??v;if(b){const P=b.marks.find(w=>w.type.name==="textStyle");if(P)return P.attrs.themeName}return T};if(u){const S=m({index:a});return e().unsetMark("textStyle",{extendEmptyMarkRange:!0}).setThemeSettings(S).run()}if(c)return!1;const f=m({index:a}),p=r.nodeBefore?r.pos-r.nodeBefore.nodeSize:i,C=r.nodeAfter?r.pos+r.nodeAfter.nodeSize:n;return e().setTextSelection({from:p,to:C}).setThemeSettings(f).run()}}},addProseMirrorPlugins(){return[new Uo({key:new vi("syncBlockTheme"),appendTransaction:(e,o,i)=>{const n=i.tr;let r=!1;return i.doc.descendants((s,a)=>{var u,c;if(s.type.name==="bulletList"||s.type.name==="orderedList"){const m=s.firstChild,f=m==null?void 0:m.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 m=s.firstChild;if(m){const f=(c=m.marks.find(p=>p.type.name==="textStyle"))==null?void 0:c.attrs.themeName;f&&s.attrs.themeName!==f&&(n.setNodeMarkup(a,void 0,{...s.attrs,themeName:f}),r=!0)}}}),r?n:null}})]}}),pee=Xi.create({name:"fontWeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontWeight:{default:null,parseHTML:t=>t.style.fontWeight,renderHTML:t=>t.fontWeight?{style:`font-weight: ${t.fontWeight}`}:{}}}}]},addCommands(){return{setFontWeight:t=>({chain:e})=>e().setMark("textStyle",{fontWeight:t}).run(),unsetFontWeight:()=>({chain:t,state:e})=>{const{from:o,to:i,$from:n}=e.selection;return e.doc.textBetween(o,i," ").length?t().setMark("textStyle",{fontWeight:"normal"}).run():t().setTextSelection({from:n.pos-n.nodeBefore.nodeSize,to:n.pos+n.nodeAfter.nodeSize}).setMark("textStyle",{fontWeight:"normal"}).focus().run()},resetFontWeight:()=>({chain:t})=>t().setMark("textStyle",{fontWeight:null}).removeEmptyTextStyle().run()}}}),Cee=Xi.create({name:"fontStyle",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontStyle:{default:null,parseHTML:t=>t.style.fontStyle,renderHTML:t=>t.fontStyle?{style:`font-style: ${t.fontStyle}`}:{}}}}]},addCommands(){return{setFontStyle:t=>({chain:e})=>e().setMark("textStyle",{fontStyle:t}).run(),unsetFontStyle:()=>({chain:t,state:e})=>{const{from:o,to:i,$from:n}=e.selection;return e.doc.textBetween(o,i," ").length?t().setMark("textStyle",{fontStyle:"normal"}).run():t().setTextSelection({from:n.pos-n.nodeBefore.nodeSize,to:n.pos+n.nodeAfter.nodeSize}).setMark("textStyle",{fontStyle:"normal"}).focus().run()},resetFontStyle:()=>({chain:t})=>t().setMark("textStyle",{fontStyle:null}).removeEmptyTextStyle().run()}}}),FT=Xi.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:t}){return["span",Zi(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnsubscribeLink:()=>({chain:t})=>t().setMark("unsubscribeLink").focus().run(),unsetUnsubscribeLink:()=>({chain:t,state:e})=>{const{from:o,to:i}=e.selection,n=e.doc.textBetween(o,i," "),r=e.doc.nodeAt(o);return(r==null?void 0:r.type.name)==="image"?t().unsetMark("unsubscribeLink").focus().run():n.length?t().setTextSelection({from:o,to:o+n.length}).unsetMark("unsubscribeLink").focus().run():t().unsetMark("unsubscribeLink",{extendEmptyMarkRange:!0}).focus().run()}}}}),gee="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Fee="ελ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",bu=(t,e)=>{for(const o in e)t[o]=e[o];return t},VF="numeric",RF="ascii",DF="alpha",Wd="asciinumeric",Vd="alphanumeric",xF="domain",J_="emoji",yee="scheme",Tee="slashscheme",Xg="whitespace";function Bee(t,e){return t in e||(e[t]=[]),e[t]}function _a(t,e,o){e[VF]&&(e[Wd]=!0,e[Vd]=!0),e[RF]&&(e[Wd]=!0,e[DF]=!0),e[Wd]&&(e[Vd]=!0),e[DF]&&(e[Vd]=!0),e[Vd]&&(e[xF]=!0),e[J_]&&(e[xF]=!0);for(const i in e){const n=Bee(i,o);n.indexOf(t)<0&&n.push(t)}}function See(t,e){const o={};for(const i in e)e[i].indexOf(t)>=0&&(o[i]=!0);return o}function Ri(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Ri.groups={};Ri.prototype={accepts(){return!!this.t},go(t){const e=this,o=e.j[t];if(o)return o;for(let i=0;i<e.jr.length;i++){const n=e.jr[i][0],r=e.jr[i][1];if(r&&n.test(t))return r}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,o,i){for(let n=0;n<t.length;n++)this.tt(t[n],e,o,i)},tr(t,e,o,i){i=i||Ri.groups;let n;return e&&e.j?n=e:(n=new Ri(e),o&&i&&_a(e,o,i)),this.jr.push([t,n]),n},ts(t,e,o,i){let n=this;const r=t.length;if(!r)return n;for(let s=0;s<r-1;s++)n=n.tt(t[s]);return n.tt(t[r-1],e,o,i)},tt(t,e,o,i){i=i||Ri.groups;const n=this;if(e&&e.j)return n.j[t]=e,e;const r=e;let s,a=n.go(t);if(a?(s=new Ri,bu(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new Ri,r){if(i)if(s.t&&typeof s.t=="string"){const u=bu(See(s.t,i),o);_a(r,u,i)}else o&&_a(r,o,i);s.t=r}return n.j[t]=s,s}};const st=(t,e,o,i,n)=>t.ta(e,o,i,n),ro=(t,e,o,i,n)=>t.tr(e,o,i,n),pb=(t,e,o,i,n)=>t.ts(e,o,i,n),me=(t,e,o,i,n)=>t.tt(e,o,i,n),Nr="WORD",bF="UWORD",Z_="ASCIINUMERICAL",X_="ALPHANUMERICAL",fc="LOCALHOST",LF="TLD",EF="UTLD",Sf="SCHEME",Hl="SLASH_SCHEME",yT="NUM",vF="WS",TT="NL",Od="OPENBRACE",Md="CLOSEBRACE",dh="OPENBRACKET",ch="CLOSEBRACKET",mh="OPENPAREN",fh="CLOSEPAREN",hh="OPENANGLEBRACKET",ph="CLOSEANGLEBRACKET",Ch="FULLWIDTHLEFTPAREN",gh="FULLWIDTHRIGHTPAREN",Fh="LEFTCORNERBRACKET",yh="RIGHTCORNERBRACKET",Th="LEFTWHITECORNERBRACKET",Bh="RIGHTWHITECORNERBRACKET",Sh="FULLWIDTHLESSTHAN",Vh="FULLWIDTHGREATERTHAN",Rh="AMPERSAND",BT="APOSTROPHE",Dh="ASTERISK",Rs="AT",xh="BACKSLASH",bh="BACKTICK",Lh="CARET",bs="COLON",ST="COMMA",Eh="DOLLAR",Zn="DOT",vh="EQUALS",VT="EXCLAMATION",mn="HYPHEN",Hd="PERCENT",Nh="PIPE",_h="PLUS",Ph="POUND",$d="QUERY",RT="QUOTE",Q_="FULLWIDTHMIDDLEDOT",DT="SEMI",Xn="SLASH",zd="TILDE",Ah="UNDERSCORE",eP="EMOJI",Ih="SYM";var tP=Object.freeze({__proto__:null,WORD:Nr,UWORD:bF,ASCIINUMERICAL:Z_,ALPHANUMERICAL:X_,LOCALHOST:fc,TLD:LF,UTLD:EF,SCHEME:Sf,SLASH_SCHEME:Hl,NUM:yT,WS:vF,NL:TT,OPENBRACE:Od,CLOSEBRACE:Md,OPENBRACKET:dh,CLOSEBRACKET:ch,OPENPAREN:mh,CLOSEPAREN:fh,OPENANGLEBRACKET:hh,CLOSEANGLEBRACKET:ph,FULLWIDTHLEFTPAREN:Ch,FULLWIDTHRIGHTPAREN:gh,LEFTCORNERBRACKET:Fh,RIGHTCORNERBRACKET:yh,LEFTWHITECORNERBRACKET:Th,RIGHTWHITECORNERBRACKET:Bh,FULLWIDTHLESSTHAN:Sh,FULLWIDTHGREATERTHAN:Vh,AMPERSAND:Rh,APOSTROPHE:BT,ASTERISK:Dh,AT:Rs,BACKSLASH:xh,BACKTICK:bh,CARET:Lh,COLON:bs,COMMA:ST,DOLLAR:Eh,DOT:Zn,EQUALS:vh,EXCLAMATION:VT,HYPHEN:mn,PERCENT:Hd,PIPE:Nh,PLUS:_h,POUND:Ph,QUERY:$d,QUOTE:RT,FULLWIDTHMIDDLEDOT:Q_,SEMI:DT,SLASH:Xn,TILDE:zd,UNDERSCORE:Ah,EMOJI:eP,SYM:Ih});const Er=/[a-z]/,gd=/\p{L}/u,Qg=/\p{Emoji}/u,vr=/\d/,e0=/\s/,Cb="\r",t0=`
|
|
171
171
|
`,Vee="️",Ree="",o0="";let sf=null,af=null;function Dee(t=[]){const e={};Ri.groups=e;const o=new Ri;sf==null&&(sf=gb(gee)),af==null&&(af=gb(Fee)),me(o,"'",BT),me(o,"{",Od),me(o,"}",Md),me(o,"[",dh),me(o,"]",ch),me(o,"(",mh),me(o,")",fh),me(o,"<",hh),me(o,">",ph),me(o,"(",Ch),me(o,")",gh),me(o,"「",Fh),me(o,"」",yh),me(o,"『",Th),me(o,"』",Bh),me(o,"<",Sh),me(o,">",Vh),me(o,"&",Rh),me(o,"*",Dh),me(o,"@",Rs),me(o,"`",bh),me(o,"^",Lh),me(o,":",bs),me(o,",",ST),me(o,"$",Eh),me(o,".",Zn),me(o,"=",vh),me(o,"!",VT),me(o,"-",mn),me(o,"%",Hd),me(o,"|",Nh),me(o,"+",_h),me(o,"#",Ph),me(o,"?",$d),me(o,'"',RT),me(o,"/",Xn),me(o,";",DT),me(o,"~",zd),me(o,"_",Ah),me(o,"\\",xh),me(o,"・",Q_);const i=ro(o,vr,yT,{[VF]:!0});ro(i,vr,i);const n=ro(i,Er,Z_,{[Wd]:!0}),r=ro(i,gd,X_,{[Vd]:!0}),s=ro(o,Er,Nr,{[RF]:!0});ro(s,vr,n),ro(s,Er,s),ro(n,vr,n),ro(n,Er,n);const a=ro(o,gd,bF,{[DF]:!0});ro(a,Er),ro(a,vr,r),ro(a,gd,a),ro(r,vr,r),ro(r,Er),ro(r,gd,r);const u=me(o,t0,TT,{[Xg]:!0}),c=me(o,Cb,vF,{[Xg]:!0}),m=ro(o,e0,vF,{[Xg]:!0});me(o,o0,m),me(c,t0,u),me(c,o0,m),ro(c,e0,m),me(m,Cb),me(m,t0),ro(m,e0,m),me(m,o0,m);const f=ro(o,Qg,eP,{[J_]:!0});me(f,"#"),ro(f,Qg,f),me(f,Vee,f);const p=me(f,Ree);me(p,"#"),ro(p,Qg,f);const C=[[Er,s],[vr,n]],F=[[Er,null],[gd,a],[vr,r]];for(let y=0;y<sf.length;y++)Cs(o,sf[y],LF,Nr,C);for(let y=0;y<af.length;y++)Cs(o,af[y],EF,bF,F);_a(LF,{tld:!0,ascii:!0},e),_a(EF,{utld:!0,alpha:!0},e),Cs(o,"file",Sf,Nr,C),Cs(o,"mailto",Sf,Nr,C),Cs(o,"http",Hl,Nr,C),Cs(o,"https",Hl,Nr,C),Cs(o,"ftp",Hl,Nr,C),Cs(o,"ftps",Hl,Nr,C),_a(Sf,{scheme:!0,ascii:!0},e),_a(Hl,{slashscheme:!0,ascii:!0},e),t=t.sort((y,S)=>y[0]>S[0]?1:-1);for(let y=0;y<t.length;y++){const S=t[y][0],L=t[y][1]?{[yee]:!0}:{[Tee]:!0};S.indexOf("-")>=0?L[xF]=!0:Er.test(S)?vr.test(S)?L[Wd]=!0:L[RF]=!0:L[VF]=!0,pb(o,S,S,L)}return pb(o,"localhost",fc,{ascii:!0}),o.jd=new Ri(Ih),{start:o,tokens:bu({groups:e},tP)}}function oP(t,e){const o=xee(e.replace(/[A-Z]/g,a=>a.toLowerCase())),i=o.length,n=[];let r=0,s=0;for(;s<i;){let a=t,u=null,c=0,m=null,f=-1,p=-1;for(;s<i&&(u=a.go(o[s]));)a=u,a.accepts()?(f=0,p=0,m=a):f>=0&&(f+=o[s].length,p++),c+=o[s].length,r+=o[s].length,s++;r-=f,s-=p,c-=f,n.push({t:m.t,v:e.slice(r-c,r),s:r-c,e:r})}return n}function xee(t){const e=[],o=t.length;let i=0;for(;i<o;){let n=t.charCodeAt(i),r,s=n<55296||n>56319||i+1===o||(r=t.charCodeAt(i+1))<56320||r>57343?t[i]:t.slice(i,i+2);e.push(s),i+=s.length}return e}function Cs(t,e,o,i,n){let r;const s=e.length;for(let a=0;a<s-1;a++){const u=e[a];t.j[u]?r=t.j[u]:(r=new Ri(i),r.jr=n.slice(),t.j[u]=r),t=r}return r=new Ri(o),r.jr=n.slice(),t.j[e[s-1]]=r,r}function gb(t){const e=[],o=[];let i=0,n="0123456789";for(;i<t.length;){let r=0;for(;n.indexOf(t[i+r])>=0;)r++;if(r>0){e.push(o.join(""));for(let s=parseInt(t.substring(i,i+r),10);s>0;s--)o.pop();i+=r}else o.push(t[i]),i++}return e}const hc={defaultProtocol:"http",events:null,format:Fb,formatHref:Fb,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function xT(t,e=null){let o=bu({},hc);t&&(o=bu(o,t instanceof xT?t.o:t));const i=o.ignoreTags,n=[];for(let r=0;r<i.length;r++)n.push(i[r].toUpperCase());this.o=o,e&&(this.defaultRender=e),this.ignoreTags=n}xT.prototype={o:hc,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,o){const i=e!=null;let n=this.o[t];return n&&(typeof n=="object"?(n=o.t in n?n[o.t]:hc[t],typeof n=="function"&&i&&(n=n(e,o))):typeof n=="function"&&i&&(n=n(e,o.t,o)),n)},getObj(t,e,o){let i=this.o[t];return typeof i=="function"&&e!=null&&(i=i(e,o.t,o)),i},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function Fb(t){return t}function iP(t,e){this.t="token",this.v=t,this.tk=e}iP.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),o=t.get("truncate",e,this),i=t.get("format",e,this);return o&&i.length>o?i.substring(0,o)+"…":i},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=hc.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,o=this.toHref(t.get("defaultProtocol")),i=t.get("formatHref",o,this),n=t.get("tagName",o,e),r=this.toFormattedString(t),s={},a=t.get("className",o,e),u=t.get("target",o,e),c=t.get("rel",o,e),m=t.getObj("attributes",o,e),f=t.getObj("events",o,e);return s.href=i,a&&(s.class=a),u&&(s.target=u),c&&(s.rel=c),m&&bu(s,m),{tagName:n,attributes:s,content:r,eventListeners:f}}};function _p(t,e){class o extends iP{constructor(n,r){super(n,r),this.t=t}}for(const i in e)o.prototype[i]=e[i];return o.t=t,o}const yb=_p("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Tb=_p("text"),bee=_p("nl"),lf=_p("url",{isLink:!0,toHref(t=hc.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==fc&&t[1].t===bs}}),cn=t=>new Ri(t);function Lee({groups:t}){const e=t.domain.concat([Rh,Dh,Rs,xh,bh,Lh,Eh,vh,mn,yT,Hd,Nh,_h,Ph,Xn,Ih,zd,Ah]),o=[bs,ST,Zn,VT,Hd,$d,RT,DT,hh,ph,Od,Md,ch,dh,mh,fh,Ch,gh,Fh,yh,Th,Bh,Sh,Vh],i=[Rh,BT,Dh,xh,bh,Lh,Eh,vh,mn,Od,Md,Hd,Nh,_h,Ph,$d,Xn,Ih,zd,Ah],n=cn(),r=me(n,zd);st(r,i,r),st(r,t.domain,r);const s=cn(),a=cn(),u=cn();st(n,t.domain,s),st(n,t.scheme,a),st(n,t.slashscheme,u),st(s,i,r),st(s,t.domain,s);const c=me(s,Rs);me(r,Rs,c),me(a,Rs,c),me(u,Rs,c);const m=me(r,Zn);st(m,i,r),st(m,t.domain,r);const f=cn();st(c,t.domain,f),st(f,t.domain,f);const p=me(f,Zn);st(p,t.domain,f);const C=cn(yb);st(p,t.tld,C),st(p,t.utld,C),me(c,fc,C);const F=me(f,mn);me(F,mn,F),st(F,t.domain,f),st(C,t.domain,f),me(C,Zn,p),me(C,mn,F);const y=me(C,bs);st(y,t.numeric,yb);const S=me(s,mn),T=me(s,Zn);me(S,mn,S),st(S,t.domain,s),st(T,i,r),st(T,t.domain,s);const L=cn(lf);st(T,t.tld,L),st(T,t.utld,L),st(L,t.domain,s),st(L,i,r),me(L,Zn,T),me(L,mn,S),me(L,Rs,c);const v=me(L,bs),b=cn(lf);st(v,t.numeric,b);const P=cn(lf),w=cn();st(P,e,P),st(P,o,w),st(w,e,P),st(w,o,w),me(L,Xn,P),me(b,Xn,P);const A=me(a,bs),J=me(u,bs),z=me(J,Xn),ie=me(z,Xn);st(a,t.domain,s),me(a,Zn,T),me(a,mn,S),st(u,t.domain,s),me(u,Zn,T),me(u,mn,S),st(A,t.domain,P),me(A,Xn,P),me(A,$d,P),st(ie,t.domain,P),st(ie,e,P),me(ie,Xn,P);const ne=[[Od,Md],[dh,ch],[mh,fh],[hh,ph],[Ch,gh],[Fh,yh],[Th,Bh],[Sh,Vh]];for(let Q=0;Q<ne.length;Q++){const[Ce,Ie]=ne[Q],Oe=me(P,Ce);me(w,Ce,Oe),me(Oe,Ie,P);const De=cn(lf);st(Oe,e,De);const be=cn();st(Oe,o),st(De,e,De),st(De,o,be),st(be,e,De),st(be,o,be),me(De,Ie,P),me(be,Ie,P)}return me(n,fc,L),me(n,TT,bee),{start:n,tokens:tP}}function Eee(t,e,o){let i=o.length,n=0,r=[],s=[];for(;n<i;){let a=t,u=null,c=null,m=0,f=null,p=-1;for(;n<i&&!(u=a.go(o[n].t));)s.push(o[n++]);for(;n<i&&(c=u||a.go(o[n].t));)u=null,a=c,a.accepts()?(p=0,f=a):p>=0&&p++,n++,m++;if(p<0)n-=m,n<i&&(s.push(o[n]),n++);else{s.length>0&&(r.push(i0(Tb,e,s)),s=[]),n-=p,m-=p;const C=f.t,F=o.slice(n-m,n);r.push(i0(C,e,F))}}return s.length>0&&r.push(i0(Tb,e,s)),r}function i0(t,e,o){const i=o[0].s,n=o[o.length-1].e,r=e.slice(i,n);return new t(r,o)}const vee=typeof console<"u"&&console&&console.warn||(()=>{}),Nee="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Gt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function _ee(){return Ri.groups={},Gt.scanner=null,Gt.parser=null,Gt.tokenQueue=[],Gt.pluginQueue=[],Gt.customSchemes=[],Gt.initialized=!1,Gt}function Bb(t,e=!1){if(Gt.initialized&&vee(`linkifyjs: already initialized - will not register custom scheme "${t}" ${Nee}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))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