@emailmaker/emailmaker 1.0.12 → 1.0.13
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/README.md +1 -1
- package/README_eng.md +1 -1
- package/asset-manifest.json +20 -20
- package/css.worker.js +1 -1
- package/editor.worker.js +1 -1
- package/emailmaker-esm.js +1 -1
- package/emailmaker.d.ts +5 -1
- package/emailmaker.js +1 -1
- package/html.worker.js +1 -1
- package/iframe/429.js +1 -1
- package/iframe/{iframe-eblock.2d4d86de3113d334deb7.html → iframe-eblock.7f566be24eda2b066c27.html} +1 -1
- package/iframe/{iframe.2d4d86de3113d334deb7.html → iframe.7f566be24eda2b066c27.html} +1 -1
- package/iframe/js/cssbeautify.js +1 -1
- package/iframe/sandbox-eblock.js +1 -1
- package/iframe/sandbox.js +1 -1
- package/json.worker.js +1 -1
- package/package.json +1 -1
- package/plugin.html +63 -4
- package/plugin_blocks_test.html +1 -1
- package/plugin_default.html +1 -1
- package/plugin_s.html +1 -1
- package/static/js/{1431.48c65fb1.js → 1431.aac8dd4b.js} +1 -1
- package/static/js/1472.c0584f98.js +1 -0
- package/static/js/2256.ddb5257e.js +1 -0
- package/static/js/{9141.39b45efc.js → 3144.0887099d.js} +1 -1
- package/static/js/{3651.0034ce56.js → 3651.1f1503f1.js} +1 -1
- package/static/js/{5957.a3ec2a7f.js → 5957.c0deb61f.js} +2 -2
- package/static/js/5974.efafc283.js +1 -0
- package/static/js/7146.9e07333d.chunk.js +1 -0
- package/static/js/8271.33107e6b.chunk.js +1 -0
- package/static/js/8786.3e0f4337.js +1 -0
- package/static/js/emailmaker_core.554aaa7d.js +1 -0
- package/translations.pot +27 -27
- package/ts.worker.js +1 -1
- package/static/js/1472.fe27dc78.js +0 -1
- package/static/js/2256.a33fc284.js +0 -1
- package/static/js/564.b64a95d7.js +0 -1
- package/static/js/5974.441a5974.js +0 -1
- package/static/js/7146.b71a797a.chunk.js +0 -1
- package/static/js/8271.988bf253.chunk.js +0 -1
- package/static/js/emailmaker_core.b71111a7.js +0 -1
- /package/static/css/{564.1f07a6f1.css → 8786.1f07a6f1.css} +0 -0
- /package/static/js/{5957.a3ec2a7f.js.LICENSE.txt → 5957.c0deb61f.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[5974],{84007:(e,t,r)=>{r.d(t,{$$:()=>m,Os:()=>l});var o=r(16799),n=r(8357),s=r(61704);const c=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"],i=new o.H(c),a=new n.X(i);function l(e,t,r){try{e.setAttribute(t,r)}catch{let o=e.tagName.toLowerCase();"html"===o&&(o="div");const n=`<${o} ${t}="${r}"/>`;let s=function(e){let t;switch(e){case"tr":t=document.createElement("table");break;case"td":t=document.createElement("tr");break;case"head":case"body":t=document.createElement("html");break;case"DocumentType":case"html":{const e=document.implementation.createHTMLDocument();for(const t of[...e.childNodes])t.remove();return e}default:t=document.createElement("div")}return t}(o);if(s instanceof Document)return;s.innerHTML=n;const c=1===s.children.length?s.firstElementChild:s.getElementsByTagName(o)[0];if(!c)throw new Error("targetElement is not defined");const i=c.getAttributeNode(t);i&&e.setAttributeNode(i.cloneNode())}}function u(e,t=!0){let r=e.content;switch(e.type){case s.Z.ROOT:{const r=document.implementation.createHTMLDocument();for(const e of[...r.childNodes])r.removeChild(e);if(t)for(const t of e.children)r.appendChild(u(t));return r}case s.Z.DOCTYPE:return(new DOMParser).parseFromString(`<!DOCTYPE${e.content}>`,"text/html").doctype;case s.Z.COMMENT:return document.createComment(r||"");case s.Z.ELEMENT:if(e.tag){const r=document.createElement(e.tag);if(e.attributes)for(const t of e.attributeNames){const n=e.attributes[t];try{l(r,t,"string"===typeof n?n:"")}catch(o){}}if(t)for(const t of e.children)r.appendChild(u(t));return r}return document.createTextNode("<");case s.Z.HTML:return function(e){if(e){const t=document.createElement("div");return t.insertAdjacentHTML("afterbegin",e),t.firstChild||document.createTextNode("")}return document.createTextNode("")}(r||"");default:throw new Error("unsupported node")}}function m(e){var t;return(t=e,a.parse(t)).roots.map((e=>u(e)))}},85974:(e,t,r)=>{r.d(t,{Km:()=>C,Sc:()=>E,Nh:()=>A});var o=r(90854),n=r(84007),s=r(74851),c=r(69279);const i='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',a="<!doctype html>";var l=r(97717);async function u(e,t={}){const r=document.createElement("amp-img"),s=await(0,o.rq)(e),c=null!==s&&void 0!==s&&s.height?`${parseInt(s.height)}px`:"",i=null!==s&&void 0!==s&&s.width?`${parseInt(s.width)}px`:"",a=e.src||e.srcset.split(",")[0];"100%"===e.style.width&&e.style.removeProperty("width"),"100%"===e.style.maxWidth&&e.style.removeProperty("max-width"),t={...(0,l.gu)(e),alt:e.alt,width:i,height:c,src:a,layout:"responsive",...t};for(const o of Object.keys(t))(0,n.Os)(r,o,t[o]);return r}function m(e){const t=document.createElement("img"),{layout:r,height:o,...s}=(0,l.gu)(e),c="responsive"===r;for(const i of Object.keys(s))(0,n.Os)(t,i,s[i]);return c&&(t.style.maxWidth=s.width||"0px",t.style.width="100%"),t}var d=r(59896),f=r(91981),p=r(91391);var y=r(80424);const h=new Map;const v=new Map;const g="$GLOBAL_ATTRS",b=new Map;async function w(){if(!b.size){var e;const t=null===(e=(await(0,y.F)()).attrLists.find((e=>e.name===g)))||void 0===e?void 0:e.attrs;if(t)for(const e of t)b.set(e.name,e)}return b}function A(e){var t;return(0,o.vq)(e)&&(e.tagName.startsWith("AMP")||"FORM"===e.tagName||"TEMPLATE"===e.tagName&&"amp-mustache"===(null===(t=e.getAttribute("type"))||void 0===t?void 0:t.toLowerCase()))}function x(e,t,r){var n,s,c;if(t)if((0,o.vq)(e))switch(e.tagName.toLowerCase()){case"body":case r("script"):case"style":case"meta":case"title":return;case"head":case"html":a();break;default:i()||a()}else(0,o.wz)(e)?a():(0,o.ir)(e)&&(null!==(n=e.textContent)&&void 0!==n&&n.trim()||null!==(s=e.nextSibling)&&void 0!==s&&null!==(c=s.textContent)&&void 0!==c&&c.trim()&&(0,o.ir)(e.nextSibling))&&i();function i(){const r=t.compareDocumentPosition(e);if(!(8&r)){if(2&r)return t.insertBefore(e,t.firstChild),!0;if(4&r)return t.appendChild(e),!0}return!1}function a(){const o=[...e.childNodes];for(let e=o.length-1;e>=0;e--)x(o[e],t,r)}}async function T(e,t){const r=e=>t.replaceSelectors(e.toLowerCase());if(t.replaceImages&&await async function(e){const t=e.querySelectorAll("img");for(const o of t)o.replaceWith(await u(o));const r=e.querySelectorAll("picture");for(const o of r){const e=o.querySelector("img");if(e){const t=await u(e);o.replaceWith(t)}else o.remove()}}(e),t.injectExtensions){const A=t.replaceSelectors(p.Vq);if(!e.querySelector(A)){const T=t.createElementFn("script");T.setAttribute("src",p.zq),T.setAttribute("async","");(0,l.xy)(e).appendChild(T)}}t.injectRequiredTags&&((0,f.y)(e,t.createElementFn,r),function(e){const t=e.doctype;if(t){if((0,o.TM)(t)===a)return;const r=(new DOMParser).parseFromString(a,"text/html").doctype;e.replaceChild(r,t)}else{const t=(new DOMParser).parseFromString(a,"text/html").doctype;e.insertBefore(t,e.firstChild)}}(e),(0,s.R)(e),(0,d.C)(e)),t.replaceStylesAndLinks&&(0,c.Q)(e);const i=await(0,y.F)(),m=await async function(){if(!h.size){const e=await(0,y.F)(),t=e.tags;for(let r=0;r<t.length;r++){const o=t[r],{selector:n,attrs:s,attrLists:c}=o,i=(null===c||void 0===c?void 0:c.flatMap((t=>e.attrLists.filter((({name:e})=>e===t)).flatMap((e=>e.attrs)))))||[];h.set(n,{...o,priority:r,attrs:new Map([...s,...i].map((e=>[e.name,e])))})}}return h}(),g=new Set(t.removeUnsupportedTags?e.querySelectorAll("*"):[]),b=new Map;for(let[S,E]of m){S=r(S);let C=e.querySelectorAll(S);t.injectRequiredTags&&E.required&&!C.length&&(C=[...C,t.createElementFn(E.name)]);for(const q of C){const R=b.get(q);R&&R.priority>E.priority||b.set(q,E)}}for(let[O,L]of b){const P=L.requiredParent?"$ROOT"===L.requiredParent?e:e.querySelector(L.requiredParent):null;!P||O.parentNode&&!t.moveInvalidTagPosition?O.parentNode||e.body.appendChild(O):P!==O.parentNode&&("HEAD"===L.name?P.insertBefore(O,P.firstChild):P.appendChild(O)),t.removeUnsupportedTags&&g.delete(O);const M=await w();if(t.removeUnsupportedAttributes||t.injectRequiredAttributes){const N=L.attrs,k=t.injectRequiredAttributes?new Set([...N].map((([e,t])=>t)).filter((e=>e.required&&e.value))):void 0,F=O.getAttributeNames();for(const j of F){const D=N.get(j)||M.get(j);if(D){if("id"===j||"class"===j||"style"===j){null===k||void 0===k||k.delete(D);continue}if(t.removeUnsupportedAttributes){const $=O.getAttribute(j);if(D.value&&D.value.indexOf($)<0&&O.removeAttribute(j),D.valueRegex){new RegExp(D.valueRegex).test($)||O.removeAttribute(j)}if(D.disallowedValueRegex){new RegExp(D.disallowedValueRegex).test($)&&O.removeAttribute(j)}const U=D.valueUrl;if(U)if(""===$)U.allowEmpty||O.removeAttribute(j);else if($.indexOf("\x3c!--")>0&&$.indexOf("--\x3e")>0);else if(!U.allowRelative)if($.startsWith("#")||$.startsWith("/"))O.removeAttribute(j);else{const H=U.protocol.length?U.protocol:["https"];let W=$.substring(0,$.indexOf(":"));if(W)if(H.indexOf(W)<0){let I=H[0]+$.substring($.indexOf(":"));URL.canParse(I)?(0,n.Os)(O,j,I):O.removeAttribute(j)}else URL.canParse($)||O.removeAttribute(j);else{let z=H[0]+$;URL.canParse(z)?(0,n.Os)(O,j,z):O.removeAttribute(j)}}}null===k||void 0===k||k.delete(D)}else{if("id"===j||"class"===j||"style"===j)continue;t.removeUnsupportedAttributes&&O.removeAttribute(j)}}if(k)for(const B of k)(0,n.Os)(O,B.name,B.value[0])}}t.moveInvalidTagPosition&&x(e,e.body,r);for(const Z of g)Z.remove();if(t.removeUnsupportedStyles){const V=e.querySelectorAll("*"),Y=await async function(){if(!v.size){const e=await(0,y.F)();for(const t of e.declarations)v.set(t.name,t)}return v}();function _(e){const t=e.cssText.replaceAll(/\".*\"/g,"").replaceAll(/\'.*\'/g,"").replaceAll(/\/\*.*\*\/|(-moz-|-ms-|-o-|-webkit-)+\w+(?=:)/g,"").match(/[a-z-]+(?=:[^before|after|hover])/gi)||[];for(const r of t){if(!r)continue;const t=e.getPropertyValue(r);"important"===e.getPropertyPriority(r)&&e.setProperty(r,t);const o=Y.get(r);if(o){if(o.value)o.value.indexOf(t)<0&&e.removeProperty(r);else if(o.valueRegex){new RegExp(o.valueRegex).test(t)||e.removeProperty(r)}}else e.removeProperty(r)}}function G(e){return"CSSStyleRule"===e.constructor.name}function K(e){return"CSSMediaRule"===e.constructor.name}function Q(e){const t=e.cssRules;for(let r=t.length-1;r>=0;r--){const o=t[r];G(o)?o.selectorText.indexOf("[")>=0||o.selectorText.indexOf(":")>=0?e.deleteRule(r):(_(o.style),o.style.cssText||e.deleteRule(r)):K(o)?(Q(o),o.cssRules.length||e.deleteRule(r)):e.deleteRule(r)}}for(const J of V)if((0,o.uE)(J)){const ee=J.getAttribute("style");ee&&(_(J.style),J.style.length?J.style.cssText!==ee&&J.setAttribute("style",J.style.cssText):J.removeAttribute("style"))}const X=e.querySelector("style[amp-custom]");if(X){const te=X.sheet;te&&(Q(te),X.innerHTML=[...te.cssRules].map((e=>e.cssText)).join("\n"))}}await async function(e,t,r){for(const{name:s,versions:c}of t){let t=!1;switch(s){case"amp-mustache":t=!!e.querySelector("template[type='amp-mustache']"),t||(t=!!e.querySelector(r.replaceSelectors(r.replaceSelectors("script[template='amp-mustache']"))));break;case"amp-form":t=!!e.querySelector(s),!t&&r.formsAsAmpForms&&"amp-form"===s&&(t=!!e.querySelector("form"));break;case"amp-bind":t=!!e.querySelector(s),t||(t=!!e.querySelector("[on]"));break;default:t=!!e.querySelector(s)}if(t){const t=r.replaceSelectors("amp-mustache"===s?`script[async][custom-template='${s}']`:`script[async][custom-element='${s}']`);if(!e.querySelector(t)){const t=(0,l.xy)(e),i=r.createElementFn("script"),a=(o=s,n=c.findLast((e=>"latest"!==e))||"v0",`${p.gP}/${o.toLowerCase()}-${n}.js`);i.setAttribute("async",""),i.setAttribute("amp-mustache"===s?"custom-template":"custom-element",s),i.setAttribute("src",a),t.appendChild(i),t.appendChild(e.createTextNode("\n"))}}}var o,n}(e,i.extensions,t)}function S(e,t){return Object.keys(t).reduce(((e,r)=>e.replaceAll(r,t[r])),e)}function E(e,t={}){const{correct:r=!0,injectExtensions:o=!0,mappedTags:n={}}=t;return T(e,{replaceImages:r,replaceStylesAndLinks:r,injectRequiredTags:r,injectExtensions:o,formsAsAmpForms:o,injectRequiredAttributes:r,moveInvalidTagPosition:r,removeUnsupportedTags:r,removeUnsupportedAttributes:r,removeUnsupportedStyles:r,createElementFn:t=>e.createElement(n[t.toLowerCase()]||t),replaceSelectors:e=>S(e.toLowerCase(),n)})}function C(e,t={}){const{correct:r=!0,removeExtensions:n=!0,mappedTags:u={}}=t,d=t=>e.createElement(u[t.toLowerCase()]||t),f=e=>S(e,u);if(r){!function(e){const t=e.querySelectorAll("amp-img");for(const r of t)r.replaceWith(m(r))}(e),function(e){const t=e.doctype;if(t&&(0,o.TM)(t).toLowerCase()===a){const r=(new DOMParser).parseFromString(i,"text/html").doctype;e.replaceChild(r,t)}}(e),(0,c.h)(e),(0,s.C)(e);const t=(0,l.ep)(e);t.removeAttribute("\u26a14email"),t.removeAttribute("data-css-strict")}n&&function(e,t){const r=e.querySelectorAll("*"),o=e.querySelectorAll(t.replaceSelectors("script[src]"));for(const s of o){var n;null!==(n=s.getAttribute("src"))&&void 0!==n&&n.startsWith(p.gP)&&s.remove()}for(const s of r)A(s)&&"FORM"!==s.tagName&&s.remove()}(e,{formsAsAmpForms:t.removeExtensions,createElementFn:d,replaceSelectors:f})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[7146],{90854:(t,e,n)=>{n.d(e,{A6:()=>u,BF:()=>l,Lv:()=>m,ST:()=>p,TM:()=>o,b6:()=>h,d1:()=>g,ir:()=>d,rq:()=>y,uE:()=>s,vq:()=>a,wz:()=>f});const r=new Set(["area","br","col","embed","hr","img","input","link","meta","param"]);function o(t){return"<!DOCTYPE "+t.name+(t.publicId?' PUBLIC "'+t.publicId+'"':"")+(!t.publicId&&t.systemId?" SYSTEM":"")+(t.systemId?' "'+t.systemId+'"':"")+">"}const c=Object.create(null);function i(t,e){const n=c[t]||(c[t]=Object.create(null));let r=n[e];if("boolean"!==typeof r){const o=document.createElement(t)[e.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,((t,e)=>e.toUpperCase()))];r=n[e]="undefined"!==typeof o&&"boolean"!==typeof o}return r}function a(t){return t.nodeType===Node.ELEMENT_NODE}function s(t){return a(t)&&!t.ownerSVGElement}function u(t){return"IMG"===t.tagName}function l(t){return"FORM"===t.tagName}function p(t){return"STYLE"===t.tagName}function f(t){return t.nodeType===Node.DOCUMENT_NODE}function d(t){return t.nodeType===Node.TEXT_NODE}function m(t){return"TABLE"===t.tagName}async function y(t,e=5e3){return"undefined"===typeof t.complete||t.complete?getComputedStyle(t):new Promise(((n,r)=>{setTimeout(n,e),t.onload=()=>n(getComputedStyle(t)),t.onerror=t=>console.log(t)}))}function h(t){if(a(t))return function(t){const e=t.tagName.toLowerCase(),n=function(t){const e=t.tagName.toLowerCase();let n="";for(const r of t.attributes){const t=r.name,o=r.value;n+=""!==o||"em"===t||i(e,t)?` ${t}="${o.replaceAll('"',"'")}"`:` ${t}`}return n}(t);return r.has(e)?`<${e}${n}>`:p(t)?`<${e}${n}>${t.innerHTML}</${e}>`:`<${e}${n}>${function(t){let e="";for(const n of t.childNodes)e+=h(n);return e}(t)}</${e}>`}(t);if(f(t))return[...t.childNodes].map((t=>h(t))).join("");if(function(t){return t.nodeType===Node.DOCUMENT_TYPE_NODE}(t))return o(t);const e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}function g(t,e){for(const c of t.childNodes)c.remove();let n=e.find((t=>function(t){return"HTML"===t.tagName}(t))),r=e.find((t=>function(t){return"BODY"===t.tagName}(t))),o=t;n||(n=t.createElement("html"),t.appendChild(n),o=n,r||(r=t.createElement("body"),n.appendChild(r),o=r));for(const c of e)o===t&&d(c)?o.appendChild(t.createComment(`%%%{{{${c.data}}}}%%%`)):o.appendChild(c)}},58689:(t,e,n)=>{n.d(e,{$l:()=>y,An:()=>A,Ay:()=>h,EB:()=>E,Mp:()=>C,PJ:()=>T,SR:()=>O,T5:()=>I,bc:()=>N,gZ:()=>M,pH:()=>m,qy:()=>$});var r=n(38738),o=n.n(r),c=n(60564),i=n.n(c),a=n(44335),s=n(45053),u=n(90854),l=n(84007),p=n(71210);const f=/url(?:\((['|"]?))(.*?\.(png|jpg|gif|jpeg|tiff){1})(?:['|"]?\))/gi,d="data:message/rfc822 eml,";async function m(t,e,n,r,o){var c={Subject:t,"X-Unsent":1,"Content-Type":"function"===typeof o?"text/html;charset=utf-8":'multipart/alternative; boundary="boundary-string"'};return`${Object.keys(c).reduce(((t,e)=>`${t}${e}:${c[e]}\n`),d)}\n${"function"===typeof o?await S(e,n,r,o):(await Promise.all(Object.keys(o).map((async t=>`\n--boundary-string\nContent-Type: ${t}\n\n${await S(e,n,r,o[t])}\n\n\n`)))).join("")+"----boundary_string--"}`}function y(t){const e=t.replace("\\","/").split("/");return e[e.length-1]}function h(t){return y(t).split(".")}function g(t){return O(t).then((t=>M(t)))}function b(t,e){const n=document.createElement("iframe");n.style.position="absolute",n.style.left="-10000px",document.body.appendChild(n);const r=n.contentWindow.document;try{if(e){const[t,r]=e;void 0!==t&&n.setAttribute("width",String(t)),void 0!==r&&n.setAttribute("height",String(r))}const o=(0,l.$$)(t);(0,u.d1)(r,o)}catch(o){console.log(o)}return[n,()=>document.body.removeChild(n)]}function x(t){return t.replace("<script","<___script").replace("<\/script>","</___script>")}const w=new s.uI((t=>{t.escape("<script","<\/script>",(t=>x(t))).unescape("<___script","</___script>",(t=>t.replace("<___script","<script").replace("</___script>","<\/script>"))),t.escape("<script","/>",(t=>x(t))).unescape("<___script","/>",(t=>t.replace("<___script","<script"))),(0,s.Hk)(t)}));async function A(t,e,n){t=w.getEscapedText(t);const[r,o]=b(t,n);try{const n=r.contentDocument;await e(n,t);const o=n.querySelectorAll("tbody");for(const t of o)t.replaceWith(...t.childNodes);n.querySelectorAll("em-replace").forEach((t=>{if(t.hasAttribute("text")&&(t.insertAdjacentHTML("beforebegin",t.getAttribute("text")),t.parentNode.removeChild(t)),t.hasAttribute("src")){const e=t.querySelector("img");e.setAttribute("src",t.getAttribute("src")),t.replaceWith(e)}})),t=(0,u.b6)(n)}catch(c){}finally{o()}return w.getUnescapedText(t)}async function N(t,e,n,r){const o=new Map;return t=await A(t,((t,r)=>{const c=t=>{let n=o.get(t);return n||(n=e(t),o.set(t,n)),n};function i(t){return function(t,e,n){try{if("function"===typeof n){var r=[];return String.prototype.replace.call(t,e,(function(){return r.push(n.apply(void 0,arguments)),""})),Promise.all(r).then((function(n){return String.prototype.replace.call(t,e,(function(){return n.shift()}))}))}return Promise.resolve(String.prototype.replace.call(t,e,n))}catch(o){return Promise.reject(o)}}(t,f,((t,e="",n)=>c(n).then((t=>`url(${e}${t}${e})`))))}async function a(t){const e=t.getAttribute("style");if(e){const n=await i(e);e!==n&&t.setAttribute("style",n)}}const s=t.querySelectorAll("*"),l=[];for(const e of s)if((0,u.vq)(e)){if(l.push(a(e)),(0,u.A6)(e)){const t=e.getAttribute("src");t&&l.push(c(t).then((t=>e.src=t)))}if((0,u.ST)(e)){const t=e.sheet.cssRules,n=[];for(const e of t){const{cssText:t}=e;t&&n.push(i(t))}l.push(Promise.all(n).then((n=>{n.some(((e,n)=>t[n].cssText!==e))&&(e.innerHTML=n.join("\n"))})))}}let p=Promise.all(l);return n&&(p=p.then((()=>n(t,r)))),p}),r),t}const $=800;function _(t,e){let n=t.getAttribute("href");if(n&&t.protocol.startsWith("http")){const r=function(t){const e=new Map;let n=0;for(;n>=0;)if(n=t.indexOf("\x3c!--",n),n>=0){const r=t.indexOf("--\x3e",n);e.set(t.substring(n,r+3),(0,p.l)()),n=r}return e}(n);r.forEach(((t,e)=>{n=n.replaceAll(e,t)}));const o=n.indexOf("#");let c=o>=0?n.substring(0,o):n,i=o>=0?n.substring(o+1):"";const a=n.indexOf("?"),s=a>=0?c.substring(a+1):"";if(c=a>=0?c.substring(0,a):c,t.host!==document.location.host){const o=new Map(s.split("&").filter((t=>t.indexOf("=")>=0)).map((t=>t.split("=")))),a=Object.keys(e);let u=s;for(const t of a)e[t]&&!o.has(t)&&(u=u+(u?"&":"")+`${t}=${e[t]}`);u!==s&&(n=c+(u?`?${u}`:"")+(i?`#${i}`:""),r.forEach(((t,e)=>{n=n.replaceAll(t,e)})),t.setAttribute("href",n))}}}async function T(t,e,n,r){let[o,c]=e||[$];return"number"===typeof o&&(o+="px"),"number"===typeof c&&(c+="px"),t=await A(t,(e=>{const o=e.querySelectorAll("a");for(const t of o)_(t,n);if(r)return r(e,t)}),[o,c])}async function S(t,e,n,r){let[o,c]=e||[$];return"number"===typeof o&&(o+="px"),"number"===typeof c&&(c+="px"),t=(t=await A(t,(async e=>{const o=e.querySelectorAll("*");for(const t of o)if((0,u.A6)(t)){const e=await(0,u.rq)(t);if(e){const n=parseInt(e.height),r=parseInt(e.width);isNaN(n)||t.setAttribute("height",String(n)),isNaN(r)||t.getAttribute("width")||t.setAttribute("width",String(r))}}else if((0,u.Lv)(t)){const e=parseInt(getComputedStyle(t).width);isNaN(e)||"BODY"===t.parentElement.tagName||t.setAttribute("width",String(e))}else"TD"===t.tagName||"A"===t.tagName&&_(t,n);if(r)return r(e,t)}),[o,c])).replaceAll(/<tbody>/gi,"").replaceAll(/<\/tbody>/gi,"")}function E(t,e){const{width:n,height:r}=t;var c={orientation:"p",unit:"pt",format:[n*e,r*e]},i=new(o())(c);return i.addImage(t,"JPEG",0,0,n*e,r*e,void 0,"NONE"),i}const v="images";async function C(t,e,n,r=g,o){let[c,s]=e||[$];"number"===typeof c&&(c+="px"),"number"===typeof s&&(s+="px");const u=new(i()),l=u.folder(v),p=new Set,f=await N(t,(async t=>{const e=await r(t);let[n,o=a.getExtension(e.type)]=h(t),c=`${n}.${o}`,i=1;for(;p.has(c);)c=`${n}(${++i}).${o}`;return p.add(c),l.file(c,e),`${v}/${c}`}),((t,e)=>{const r=t.querySelectorAll("a");for(const o of r)_(o,n);if(o)return o(t,e)}),[c,s]);return u.file("index.html",new Blob([f],{type:"text/html;charset=utf-8"})),u.generateAsync({type:"blob"})}function O(t){const e=new Image;return e.crossOrigin="anonymous",new Promise(((n,r)=>{e.onload=()=>n(e),e.onerror=r,e.src=t}))}function M(t,e="image/png",n){const r=document.createElement("canvas");r.width=t.width,r.height=t.height;return r.getContext("2d").drawImage(t,0,0),new Promise(((t,o)=>r.toBlob((e=>e?t(e):o("blob is null")),e,n)))}function q(t){var e;const n=null===(e=t.ownerDocument)||void 0===e?void 0:e.body;if(n&&function(t,e){do{if(t===e)return!0;t=t.parentNode}while(t);return!1}(t,n)){if((0,u.vq)(t)){if("IMG"===t.tagName)return"";if("SPAN"===t.tagName&&t.classList.contains("preheader"))return""}if("#text"===t.nodeName)return t.textContent}return t.childNodes?[...t.childNodes].map(q).join(""):""}function I(t){const[e,n]=b(t);try{return q(e.contentDocument.body).replace(/\u2800/g,"").replace(/(\r\n|\r|\n){2,}/g,"\n").trim()}finally{n()}}},71210:(t,e,n)=>{function r(){var t=(new Date).getTime(),e="undefined"!==typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(n){var r=16*Math.random();return t>0?(r=(t+r)%16|0,t=Math.floor(t/16)):(r=(e+r)%16|0,e=Math.floor(e/16)),("x"===n?r:3&r|8).toString(16)}))}n.d(e,{l:()=>r})},7146:(t,e,n)=>{n.r(e),n.d(e,{parseAMP:()=>c});var r=n(58689),o=n(85974);async function c(t){"object"===typeof t&&(t=t.code);const e=await(0,r.An)(t,(async t=>{for(const e of t.querySelectorAll(".em-amp-show-disabled"))e.remove();await(0,o.Sc)(t,{mappedTags:{script:"___script"}})}),[r.qy]);return{code:t,html:await(0,r.An)(t,(async t=>{for(const e of t.querySelectorAll(".em-amp-show-only"))e.remove();await(0,o.Km)(t,{mappedTags:{script:"___script"}})}),[r.qy]),ampHtml:e}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[8271],{90854:(e,t,r)=>{r.d(t,{A6:()=>u,BF:()=>d,Lv:()=>h,ST:()=>l,TM:()=>o,b6:()=>y,d1:()=>g,ir:()=>f,rq:()=>m,uE:()=>s,vq:()=>i,wz:()=>p});const n=new Set(["area","br","col","embed","hr","img","input","link","meta","param"]);function o(e){return"<!DOCTYPE "+e.name+(e.publicId?' PUBLIC "'+e.publicId+'"':"")+(!e.publicId&&e.systemId?" SYSTEM":"")+(e.systemId?' "'+e.systemId+'"':"")+">"}const c=Object.create(null);function a(e,t){const r=c[e]||(c[e]=Object.create(null));let n=r[t];if("boolean"!==typeof n){const o=document.createElement(e)[t.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,((e,t)=>t.toUpperCase()))];n=r[t]="undefined"!==typeof o&&"boolean"!==typeof o}return n}function i(e){return e.nodeType===Node.ELEMENT_NODE}function s(e){return i(e)&&!e.ownerSVGElement}function u(e){return"IMG"===e.tagName}function d(e){return"FORM"===e.tagName}function l(e){return"STYLE"===e.tagName}function p(e){return e.nodeType===Node.DOCUMENT_NODE}function f(e){return e.nodeType===Node.TEXT_NODE}function h(e){return"TABLE"===e.tagName}async function m(e,t=5e3){return"undefined"===typeof e.complete||e.complete?getComputedStyle(e):new Promise(((r,n)=>{setTimeout(r,t),e.onload=()=>r(getComputedStyle(e)),e.onerror=e=>console.log(e)}))}function y(e){if(i(e))return function(e){const t=e.tagName.toLowerCase(),r=function(e){const t=e.tagName.toLowerCase();let r="";for(const n of e.attributes){const e=n.name,o=n.value;r+=""!==o||"em"===e||a(t,e)?` ${e}="${o.replaceAll('"',"'")}"`:` ${e}`}return r}(e);return n.has(t)?`<${t}${r}>`:l(e)?`<${t}${r}>${e.innerHTML}</${t}>`:`<${t}${r}>${function(e){let t="";for(const r of e.childNodes)t+=y(r);return t}(e)}</${t}>`}(e);if(p(e))return[...e.childNodes].map((e=>y(e))).join("");if(function(e){return e.nodeType===Node.DOCUMENT_TYPE_NODE}(e))return o(e);const t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}function g(e,t){for(const c of e.childNodes)c.remove();let r=t.find((e=>function(e){return"HTML"===e.tagName}(e))),n=t.find((e=>function(e){return"BODY"===e.tagName}(e))),o=e;r||(r=e.createElement("html"),e.appendChild(r),o=r,n||(n=e.createElement("body"),r.appendChild(n),o=n));for(const c of t)o===e&&f(c)?o.appendChild(e.createComment(`%%%{{{${c.data}}}}%%%`)):o.appendChild(c)}},7205:(e,t,r)=>{r.d(t,{A:()=>i});const n=(e,t)=>t.some((t=>t instanceof RegExp?t.test(e):t===e)),o=new Set(["https:","http:","file:"]),c=e=>{try{const{protocol:t}=new URL(e);return t.endsWith(":")&&!t.includes(".")&&!o.has(t)}catch{return!1}},a=(e,{stripHash:t})=>{var r,n;const o=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);if(!o)throw new Error(`Invalid URL: ${e}`);let{type:c,data:a,hash:i}=o.groups;const s=c.split(";");i=t?"":i;let u=!1;"base64"===s[s.length-1]&&(s.pop(),u=!0);const d=null!==(r=null===(n=s.shift())||void 0===n?void 0:n.toLowerCase())&&void 0!==r?r:"",l=[...s.map((e=>{let[t,r=""]=e.split("=").map((e=>e.trim()));return"charset"===t&&(r=r.toLowerCase(),"us-ascii"===r)?"":`${t}${r?`=${r}`:""}`})).filter(Boolean)];return u&&l.push("base64"),(l.length>0||d&&"text/plain"!==d)&&l.unshift(d),`data:${l.join(";")},${u?a.trim():a}${i?`#${i}`:""}`};function i(e,t){if("string"!==typeof(t={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...t}).defaultProtocol||t.defaultProtocol.endsWith(":")||(t.defaultProtocol=`${t.defaultProtocol}:`),e=e.trim(),/^data:/i.test(e))return a(e,t);if(c(e))return e;const r=e.startsWith("//");!r&&/^\.*\//.test(e)||(e=e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,t.defaultProtocol));const o=new URL(e);if(t.forceHttp&&t.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(t.forceHttp&&"https:"===o.protocol&&(o.protocol="http:"),t.forceHttps&&"http:"===o.protocol&&(o.protocol="https:"),t.stripAuthentication&&(o.username="",o.password=""),t.stripHash?o.hash="":t.stripTextFragment&&(o.hash=o.hash.replace(/#?:~:text.*?$/i,"")),o.pathname){const e=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let t=0,r="";for(;;){const n=e.exec(o.pathname);if(!n)break;const c=n[0],a=n.index;r+=o.pathname.slice(t,a).replace(/\/{2,}/g,"/"),r+=c,t=a+c.length}r+=o.pathname.slice(t,o.pathname.length).replace(/\/{2,}/g,"/"),o.pathname=r}if(o.pathname)try{o.pathname=decodeURI(o.pathname)}catch{}if(!0===t.removeDirectoryIndex&&(t.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(t.removeDirectoryIndex)&&t.removeDirectoryIndex.length>0){let e=o.pathname.split("/");const r=e[e.length-1];n(r,t.removeDirectoryIndex)&&(e=e.slice(0,-1),o.pathname=e.slice(1).join("/")+"/")}if(o.hostname&&(o.hostname=o.hostname.replace(/\.$/,""),t.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(o.hostname)&&(o.hostname=o.hostname.replace(/^www\./,""))),Array.isArray(t.removeQueryParameters))for(const c of[...o.searchParams.keys()])n(c,t.removeQueryParameters)&&o.searchParams.delete(c);if(Array.isArray(t.keepQueryParameters)||!0!==t.removeQueryParameters||(o.search=""),Array.isArray(t.keepQueryParameters)&&t.keepQueryParameters.length>0)for(const c of[...o.searchParams.keys()])n(c,t.keepQueryParameters)||o.searchParams.delete(c);if(t.sortQueryParameters){o.searchParams.sort();try{o.search=decodeURIComponent(o.search)}catch{}}t.removeTrailingSlash&&(o.pathname=o.pathname.replace(/\/$/,"")),t.removeExplicitPort&&o.port&&(o.port="");const i=e;return e=o.toString(),t.removeSingleSlash||"/"!==o.pathname||i.endsWith("/")||""!==o.hash||(e=e.replace(/\/$/,"")),(t.removeTrailingSlash||"/"===o.pathname)&&""===o.hash&&t.removeSingleSlash&&(e=e.replace(/\/$/,"")),r&&!t.normalizeProtocol&&(e=e.replace(/^http:\/\//,"//")),t.stripProtocol&&(e=e.replace(/^(?:https?:)?\/\//,"")),e}},44141:(e,t,r)=>{r.d(t,{KU:()=>u,Pz:()=>i,hI:()=>l,u$:()=>d});var n=r(93278),o=r(33288),c=r(39217),a=r(67421);const i=o.di.createIdentifier("client"),s=o.di.createIdentifier("ai_client"),u=e=>o.di.getInstance(e,i),d=e=>o.di.getOrCreateInstance(e,s,(()=>new a.LA({baseUrl:"https://ai-mail.emcdn.ru"})));function l(e){return(t,r,a)=>{const i=o.di.getInstance(r,c.no);return(0,n.fetchBaseQuery)({...e,fetchFn:(null===i||void 0===i?void 0:i.execute)||fetch})(t,r,a)}}},53369:(e,t,r)=>{r.d(t,{A:()=>G});var n=r(40342),o=r(39990),c=r(83351),a=r(1779),i=r(141),s=r(65119),u=r(84568),d=r(93563),l=r(17581),p=r(21981),f=r(63531),h=r(53200),m=r(47036),y=r(40869),g=r(56920),A=r(76793),b=r(843),w=r(35317),P=r(62677),v=r(64936),x=r(94925),$=r(34524),S=r(65983),C=r(47358),N=r(7760),E=r(8493),j=r(87790),T=r(86286),I=r(53204),O=r(39738),_=r(87701),L=r(26174),M=r(94381),k=r(18777),D=r(62689),Q=r(46312),H=r(84612),q=r(58819),W=r(15865),R=r(95679),U=r(88528),z=r(77532),F=r(36404),B=r(33481),Y=r(33288),Z=r(23580);const J=(0,n.HY)({[Y.di.reducerPath]:Y.di.reducer,[Q.Z8.reducerPath]:Q.Z8.reducer,[M.Ad.reducerPath]:M.Ad.reducer,[o.Q2.reducerPath]:o.Q2.reducer,[a.S.reducerPath]:a.S.reducer,[i.k.reducerPath]:i.k.reducer,[c.OV.reducerPath]:c.OV.reducer,[s.yR.reducerPath]:s.yR.reducer,[u.Nq.reducerPath]:u.Nq.reducer,[d.kE.reducerPath]:d.kE.reducer,[l.GY.reducerPath]:l.GY.reducer,[_.VM.reducerPath]:_.VM.reducer,[p.m4.reducerPath]:p.m4.reducer,[f.yH.reducerPath]:f.yH.reducer,[h.B.reducerPath]:h.B.reducer,[m.f.reducerPath]:m.f.reducer,[k.Jg.reducerPath]:k.Jg.reducer,[R.CL.reducerPath]:R.CL.reducer,[U.tO.reducerPath]:U.tO.reducer,[D.vx.reducerPath]:D.vx.reducer,[y.M.reducerPath]:y.M.reducer,[g.F.reducerPath]:g.F.reducer,[A.KA.reducerPath]:A.KA.reducer,[b.Sd.reducerPath]:b.Sd.reducer,[w.y.reducerPath]:w.y.reducer,[v.Ay.name]:v.Ay.reducer,[x.Ay.name]:x.Ay.reducer,[$.Ay.name]:$.Ay.reducer,[S.Ay.name]:S.Ay.reducer,[C.Ay.name]:C.Ay.reducer,[N.Ay.name]:N.Ay.reducer,[E.Ay.name]:E.Ay.reducer,[j.Ay.name]:j.Ay.reducer,[T.Ay.name]:T.Ay.reducer,[I.Ay.name]:I.Ay.reducer,[L.Ay.name]:L.Ay.reducer,[z.Ay.name]:z.Ay.reducer,[O.Ay.name]:O.Ay.reducer,[H.Zs.reducerPath]:H.Zs.reducer,[q.Uu.reducerPath]:q.Uu.reducer,[F.Ay.name]:F.Ay.reducer,[W.So.reducerPath]:W.So.reducer,[B.Ay.name]:B.Ay.reducer,[P.C.reducerPath]:P.C.reducer}),G=(e,t)=>"authorizationApi/resetApiState"===t.type?J({[Z.if]:e[Z.if],[M.Ad.reducerPath]:e[M.Ad.reducerPath]},t):J(e,t)},37444:(e,t,r)=>{r.d(t,{y:()=>M});var n=r(90536),o=r(31052),c=r(53369),a=r(39990),i=r(83351),s=r(65119),u=r(84568),d=r(93563),l=r(17581),p=r(21981),f=r(53200),h=r(63531),m=r(87701),y=r(47036),g=r(94381),A=r(18777),b=r(141),w=r(1779),P=r(40869),v=r(56920),x=r(76793),$=r(843),S=r(35317),C=r(95679),N=r(88528),E=r(62689),j=r(46312),T=r(84612),I=r(58819),O=r(15865),_=r(62677);const L=[a.Q2,i.OV,w.S,b.k,s.yR,u.Nq,d.kE,l.GY,p.m4,f.B,m.VM,y.f,g.Ad,A.Jg,P.M,v.F,x.KA,$.Sd,S.y,C.CL,N.tO,E.vx,j.Z8,h.yH,T.Zs,I.Uu,O.So,_.C];function M(){const e=(0,n.configureStore)({reducer:c.A,middleware:e=>e({serializableCheck:!1}).concat(L.map((e=>e.middleware)))});return(0,o.$k)(e.dispatch),e}},90070:(e,t,r)=>{r.d(t,{W0:()=>i,p6:()=>c});var n=r(33288);const o=n.di.createIdentifier(),c=()=>n.di.useInstance(o);class a{constructor(){this._storage=Object.create(null)}get(e){const t=this._storage[e];return t&&(!t.expires||t.expires<Date.now())?t.value:""}set(e,t,r){this._storage[e]={value:t,expires:r.expires?1e3*r.expires+Date.now():void 0}}remove(e){delete this._storage[e]}}const i=e=>n.di.inject(e,o,new a)},23580:(e,t,r)=>{r.d(t,{A$:()=>h,Ff:()=>u,IP:()=>s,My:()=>d,Nj:()=>p,if:()=>i,lg:()=>l,rl:()=>f});var n=r(92810),o=r(45934),c=r(82375),a=r(41664);const i="INJECTION",s=i,u=(e,t)=>{if(!e){const e=c.Q.createChild(),t=(0,a.Q)();return c.Q.inject(t,e),t}return e};function d(e){const t=e.getState()[i];return t&&c.Q.getInstance(t)}function l(){const e=d((0,o.Pj)());return function(t,r){e.inject(t,r)}}function p(e){return d((0,o.Pj)()).getInstance(e)}function f(e){const[t,r]=(0,n.useState)(),c=(0,o.Pj)(),a=(0,n.useRef)(Promise.resolve()),i=d(c);return(0,n.useEffect)((()=>{const t=a.current=a.current.then((()=>i.getInstanceAsync(e))).then((e=>{t===a.current&&r(e)}),(e=>console.log(e)))}),[r,e,c,i]),t}function h(e){return d((0,o.Pj)()).getServices(e)}},58689:(e,t,r)=>{r.d(t,{$l:()=>m,An:()=>P,Ay:()=>y,EB:()=>N,Mp:()=>j,PJ:()=>S,SR:()=>T,T5:()=>_,bc:()=>v,gZ:()=>I,pH:()=>h,qy:()=>x});var n=r(38738),o=r.n(n),c=r(60564),a=r.n(c),i=r(44335),s=r(45053),u=r(90854),d=r(84007),l=r(71210);const p=/url(?:\((['|"]?))(.*?\.(png|jpg|gif|jpeg|tiff){1})(?:['|"]?\))/gi,f="data:message/rfc822 eml,";async function h(e,t,r,n,o){var c={Subject:e,"X-Unsent":1,"Content-Type":"function"===typeof o?"text/html;charset=utf-8":'multipart/alternative; boundary="boundary-string"'};return`${Object.keys(c).reduce(((e,t)=>`${e}${t}:${c[t]}\n`),f)}\n${"function"===typeof o?await C(t,r,n,o):(await Promise.all(Object.keys(o).map((async e=>`\n--boundary-string\nContent-Type: ${e}\n\n${await C(t,r,n,o[e])}\n\n\n`)))).join("")+"----boundary_string--"}`}function m(e){const t=e.replace("\\","/").split("/");return t[t.length-1]}function y(e){return m(e).split(".")}function g(e){return T(e).then((e=>I(e)))}function A(e,t){const r=document.createElement("iframe");r.style.position="absolute",r.style.left="-10000px",document.body.appendChild(r);const n=r.contentWindow.document;try{if(t){const[e,n]=t;void 0!==e&&r.setAttribute("width",String(e)),void 0!==n&&r.setAttribute("height",String(n))}const o=(0,d.$$)(e);(0,u.d1)(n,o)}catch(o){console.log(o)}return[r,()=>document.body.removeChild(r)]}function b(e){return e.replace("<script","<___script").replace("<\/script>","</___script>")}const w=new s.uI((e=>{e.escape("<script","<\/script>",(e=>b(e))).unescape("<___script","</___script>",(e=>e.replace("<___script","<script").replace("</___script>","<\/script>"))),e.escape("<script","/>",(e=>b(e))).unescape("<___script","/>",(e=>e.replace("<___script","<script"))),(0,s.Hk)(e)}));async function P(e,t,r){e=w.getEscapedText(e);const[n,o]=A(e,r);try{const r=n.contentDocument;await t(r,e);const o=r.querySelectorAll("tbody");for(const e of o)e.replaceWith(...e.childNodes);r.querySelectorAll("em-replace").forEach((e=>{if(e.hasAttribute("text")&&(e.insertAdjacentHTML("beforebegin",e.getAttribute("text")),e.parentNode.removeChild(e)),e.hasAttribute("src")){const t=e.querySelector("img");t.setAttribute("src",e.getAttribute("src")),e.replaceWith(t)}})),e=(0,u.b6)(r)}catch(c){}finally{o()}return w.getUnescapedText(e)}async function v(e,t,r,n){const o=new Map;return e=await P(e,((e,n)=>{const c=e=>{let r=o.get(e);return r||(r=t(e),o.set(e,r)),r};function a(e){return function(e,t,r){try{if("function"===typeof r){var n=[];return String.prototype.replace.call(e,t,(function(){return n.push(r.apply(void 0,arguments)),""})),Promise.all(n).then((function(r){return String.prototype.replace.call(e,t,(function(){return r.shift()}))}))}return Promise.resolve(String.prototype.replace.call(e,t,r))}catch(o){return Promise.reject(o)}}(e,p,((e,t="",r)=>c(r).then((e=>`url(${t}${e}${t})`))))}async function i(e){const t=e.getAttribute("style");if(t){const r=await a(t);t!==r&&e.setAttribute("style",r)}}const s=e.querySelectorAll("*"),d=[];for(const t of s)if((0,u.vq)(t)){if(d.push(i(t)),(0,u.A6)(t)){const e=t.getAttribute("src");e&&d.push(c(e).then((e=>t.src=e)))}if((0,u.ST)(t)){const e=t.sheet.cssRules,r=[];for(const t of e){const{cssText:e}=t;e&&r.push(a(e))}d.push(Promise.all(r).then((r=>{r.some(((t,r)=>e[r].cssText!==t))&&(t.innerHTML=r.join("\n"))})))}}let l=Promise.all(d);return r&&(l=l.then((()=>r(e,n)))),l}),n),e}const x=800;function $(e,t){let r=e.getAttribute("href");if(r&&e.protocol.startsWith("http")){const n=function(e){const t=new Map;let r=0;for(;r>=0;)if(r=e.indexOf("\x3c!--",r),r>=0){const n=e.indexOf("--\x3e",r);t.set(e.substring(r,n+3),(0,l.l)()),r=n}return t}(r);n.forEach(((e,t)=>{r=r.replaceAll(t,e)}));const o=r.indexOf("#");let c=o>=0?r.substring(0,o):r,a=o>=0?r.substring(o+1):"";const i=r.indexOf("?"),s=i>=0?c.substring(i+1):"";if(c=i>=0?c.substring(0,i):c,e.host!==document.location.host){const o=new Map(s.split("&").filter((e=>e.indexOf("=")>=0)).map((e=>e.split("=")))),i=Object.keys(t);let u=s;for(const e of i)t[e]&&!o.has(e)&&(u=u+(u?"&":"")+`${e}=${t[e]}`);u!==s&&(r=c+(u?`?${u}`:"")+(a?`#${a}`:""),n.forEach(((e,t)=>{r=r.replaceAll(e,t)})),e.setAttribute("href",r))}}}async function S(e,t,r,n){let[o,c]=t||[x];return"number"===typeof o&&(o+="px"),"number"===typeof c&&(c+="px"),e=await P(e,(t=>{const o=t.querySelectorAll("a");for(const e of o)$(e,r);if(n)return n(t,e)}),[o,c])}async function C(e,t,r,n){let[o,c]=t||[x];return"number"===typeof o&&(o+="px"),"number"===typeof c&&(c+="px"),e=(e=await P(e,(async t=>{const o=t.querySelectorAll("*");for(const e of o)if((0,u.A6)(e)){const t=await(0,u.rq)(e);if(t){const r=parseInt(t.height),n=parseInt(t.width);isNaN(r)||e.setAttribute("height",String(r)),isNaN(n)||e.getAttribute("width")||e.setAttribute("width",String(n))}}else if((0,u.Lv)(e)){const t=parseInt(getComputedStyle(e).width);isNaN(t)||"BODY"===e.parentElement.tagName||e.setAttribute("width",String(t))}else"TD"===e.tagName||"A"===e.tagName&&$(e,r);if(n)return n(t,e)}),[o,c])).replaceAll(/<tbody>/gi,"").replaceAll(/<\/tbody>/gi,"")}function N(e,t){const{width:r,height:n}=e;var c={orientation:"p",unit:"pt",format:[r*t,n*t]},a=new(o())(c);return a.addImage(e,"JPEG",0,0,r*t,n*t,void 0,"NONE"),a}const E="images";async function j(e,t,r,n=g,o){let[c,s]=t||[x];"number"===typeof c&&(c+="px"),"number"===typeof s&&(s+="px");const u=new(a()),d=u.folder(E),l=new Set,p=await v(e,(async e=>{const t=await n(e);let[r,o=i.getExtension(t.type)]=y(e),c=`${r}.${o}`,a=1;for(;l.has(c);)c=`${r}(${++a}).${o}`;return l.add(c),d.file(c,t),`${E}/${c}`}),((e,t)=>{const n=e.querySelectorAll("a");for(const o of n)$(o,r);if(o)return o(e,t)}),[c,s]);return u.file("index.html",new Blob([p],{type:"text/html;charset=utf-8"})),u.generateAsync({type:"blob"})}function T(e){const t=new Image;return t.crossOrigin="anonymous",new Promise(((r,n)=>{t.onload=()=>r(t),t.onerror=n,t.src=e}))}function I(e,t="image/png",r){const n=document.createElement("canvas");n.width=e.width,n.height=e.height;return n.getContext("2d").drawImage(e,0,0),new Promise(((e,o)=>n.toBlob((t=>t?e(t):o("blob is null")),t,r)))}function O(e){var t;const r=null===(t=e.ownerDocument)||void 0===t?void 0:t.body;if(r&&function(e,t){do{if(e===t)return!0;e=e.parentNode}while(e);return!1}(e,r)){if((0,u.vq)(e)){if("IMG"===e.tagName)return"";if("SPAN"===e.tagName&&e.classList.contains("preheader"))return""}if("#text"===e.nodeName)return e.textContent}return e.childNodes?[...e.childNodes].map(O).join(""):""}function _(e){const[t,r]=A(e);try{return O(t.contentDocument.body).replace(/\u2800/g,"").replace(/(\r\n|\r|\n){2,}/g,"\n").trim()}finally{r()}}},39217:(e,t,r)=>{r.d(t,{CJ:()=>m,eT:()=>s,ft:()=>h,jY:()=>l,mg:()=>d,no:()=>f,qT:()=>a});var n=r(14315),o=r(44141),c=r(33288);function a(e){for(;e.endsWith("/");)e=e.slice(0,e.length-1);return`${e}/wp-json`}const i={baseUrl:"https://app.emailmaker.ru/api//wp-json",baseApiParams:{secure:!0,credentials:"same-origin",format:"json"},securityWorker:()=>({credentials:"same-origin"})};i.baseUrl=a("https://app.emailmaker.ru/api/");const s=c.di.createIdentifier();function u(e){return c.di.getOrCreateInstance(e,s,(()=>function(e=i){const t=new Map;return{create(r){const o=new n.RQ({...e,...r});return t.set(o,r),o},getOptions:()=>e,setOptions(r){e=r;for(const[n,o]of t)Object.assign(n,{...e,...o})}}}()))}function d(e,t={}){return u(e).create(t)}const l=c.di.createIdentifier(),p=c.di.createIdentifier(),f=c.di.createIdentifier(),h=e=>{var t;t=e,c.di.inject(t,f,{execute:async(e,r={})=>{const n=c.di.getServices(t,l),o=new Request(e,r);for(const t of n)await t.execute(o);let a=await fetch(o);const i=c.di.getServices(t,p);for(const t of i)a=await t.execute(a);return a}});const r=c.di.getInstance(e,f);c.di.inject(e,o.Pz,d(e,{customFetch:(null===r||void 0===r?void 0:r.execute)||fetch}))};let m;!function(e){const t="https://racs.rest/v3";e.post=function(e,r){const n={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)};return fetch(`${t}?resource=${e}&dataset=${document.location.hostname}`,n)},e.getAll=async function(e,r=0){const n={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:`{"filter":{},"limit":${r}}`},o=await fetch(`${t}/get?resource=${e}&dataset=${document.location.hostname}`,n);return await o.json()}}(m||(m={}))},15230:(e,t,r)=>{r.d(t,{Cd:()=>i,Lz:()=>a,ax:()=>s,f5:()=>o,sZ:()=>c});var n=r(41664);const o="Not implemented in plugin",c=(0,n.Q)(),a=(0,n.Q)(),i=(0,n.Q)(),s=(0,n.Q)();(0,n.Q)(),(0,n.Q)()},12299:(e,t,r)=>{r.r(t),r.d(t,{init:()=>P});var n=r(39217),o=r(90070),c=r(37444),a=r(77509),i=r(33288),s=r(15230),u=r(14386),d=r(8671),l=r(55853),p=r(19209),f=r(33746),h=r(56507),m=r(62410),y=r(63772),g=r(37e3),A=r(91514),b=r(1281);r(85163).EW.isPlugin=!0;const w=(0,u.E)([d.e,l.E,p.F,A.h,f.F,b.Z,h.i,m.r,y.Z,g.JR]);async function P(e){const t=(0,c.y)(),r=new a.j,u=await(0,g.qF)(e.element,r),d=g.sC.get(u);if(d){const t=await d;if(t.getElement()===u)return await t.reset(e)}const l=async function(){i.di.inject(t,s.ax,t),i.di.inject(t,s.Lz,r),(0,o.W0)(t),(0,n.ft)(t);const c=w(t);return await c.setOptions(e),i.di.inject(t,s.Cd,c),c.instance}();return u&&g.sC.set(u,l),l}},37e3:(e,t,r)=>{r.d(t,{JR:()=>g,qF:()=>A,sC:()=>b});r(57650),r(57964);var n=r(26254),o=r(89949),c=r(92810),a=r(97716),i=r(45934),s=r(64617),u=r(82212),d=r(32269),l=r(14386),p=r(893),f=r(33288),h=r(15230),m=r(17126),y=r(70082);const g=(0,l.l)((e=>{let t=null;const r=f.di.getInstance(e,h.Lz);let l;return{instance:{getElement:()=>t},async setOptions(g){let w=await A(g.element,r);const{instance:P}=f.di.getInstance(e,h.Cd)||{};if(t!==w){if(t&&b.delete(t),!(w&&b.has(w)&&P)){if(l&&l.dispose(),t=w,l=r.addDisposable(new d.jG),w)b.set(w,P);else{const e=document.createElement("div");e.style.position="absolute",e.style.left="-10000px",document.body.appendChild(e);const t=()=>{e.isConnected&&document.body.removeChild(e)};l.addDispose(t),w=e}return(t=>new Promise(((r,d)=>{var f;if(null!==(f=l)&&void 0!==f&&f.isDisposed())r();else{const d=(0,a.H)(t);d.render((0,y.jsx)(c.StrictMode,{children:(0,y.jsx)(i.Kq,{store:e,children:(0,y.jsx)(o.R,{onLoad:r,children:(0,y.jsx)(m.or.Provider,{value:{element:t},children:(0,y.jsx)(s.fS,{children:(0,y.jsx)(u.Y,{children:(0,y.jsx)(p.m,{children:(0,y.jsx)(n.A,{})})})})})})})})),l.addDispose(r),l.addDispose((()=>d.unmount()))}})))(w)}console.log("multiple init call on single HTMLELEMENT")}},dispose(){var e;null===(e=l)||void 0===e||e.dispose()}}}));function A(e,t){return"undefined"!==typeof e&&"string"===typeof e?(e=document.querySelector(e))||new Promise(((r,n)=>{const o=new MutationObserver((()=>{(e=document.querySelector(e))&&(t.dispose(),r(e))}));o.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),t.addDisposable({dispose:()=>o.disconnect()})})):e}const b=new Map}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[8786],{13329:(e,t,n)=>{n.d(t,{D3:()=>u,RS:()=>d});var i=n(45934),s=n(92810),o=n(41664),a=n(23397),r=n(23580),c=n(95152);const l=(0,o.Q)();function d(e,t,n){e instanceof c.m||(e=(0,r.My)(e));e.getOrCreateInstance(l,(()=>new a.v)).fire({id:t,payload:n})}const u=(e,t)=>{const n=function(e,t){return(0,r.My)(e).getOrCreateInstance(l,(()=>new a.v)).addEventListener}((0,i.Pj)());(0,s.useEffect)((()=>{const i=n((({id:n,payload:i})=>{n===e&&t(i)}));return()=>i.dispose()}),[n,e,t])}},95152:(e,t,n)=>{n.d(t,{m:()=>a});var i=n(23397),s=n(77509);function o(e){return`service_container_${e}`}class a extends s.j{constructor(e){super(),this._parent=e,this._injections=Object.create(null),this._emitter=this.addDisposable(new i.v)}inject(e,t,n){if("function"===typeof t){let i=this._injections[e],s="function"===typeof i?i():i;const o=this._injections[e]=()=>(s=t(this,s),s);n&&o()}else this._injections[e]=()=>t;this._emitter.fire(e)}_find(e){var t;return this._injections[e]||(null===(t=this._parent)||void 0===t?void 0:t._find(e))}_onInject(e,t,n=new s.j){return n.addDisposable(this._emitter.addEventListener((i=>{e===i&&(n.dispose(),t(this.getInstance(i)))}))),this._parent&&n.addDisposable(this._parent._onInject(e,t,n)),this.addDisposable(n),n}getInstance(e){const t=this._find(e);if("function"===typeof t)return t()}getOrCreateInstance(e,t){const n=this._find(e);if("function"===typeof n)return n();{const n=t(this);return this.inject(e,n),n}}getInstanceAsync(e){const t=this._find(e);return"function"===typeof t?Promise.resolve(t()):new Promise((t=>this._onInject(e,(()=>t(this.getInstance(e))))))}addService(e,t){const n=o(e);this.inject(n,((e,n=[])=>n.indexOf(t)<0?[...n,t]:n))}getServices(e){var t;const n=o(e);return[...this.getInstance(n)||[],...(null===(t=this._parent)||void 0===t?void 0:t.getServices(e))||[]]}createChild(){return new a(this)}dispose(){this._injections=Object.create(null)}}},23397:(e,t,n)=>{n.d(t,{v:()=>s});var i=n(77509);class s extends i.j{constructor(e){super(),this._options=e,this._listeners=[],this.fire=e=>{if(!this.isDisposed()){let t;const n=this._listeners;for(const i of n){if(!1===t)return!1;t=t instanceof Promise?t.then((e=>!1!==e&&!this.isDisposed()&&i(e))).catch((e=>console.log(e))):i(e)}return t}},this.addEventListener=e=>{const t=this._listeners;var n;(t.push(e),1===t.length)&&((null===(n=this._options)||void 0===n?void 0:n.onFirstListenerAdd)&&this._options.onFirstListenerAdd());return{dispose:()=>{const n=t.indexOf(e);var i;n>=0&&(t.splice(n),t.length||(null===(i=this._options)||void 0===i?void 0:i.onFirstListenerAdd)&&this._options.onLastListenerRemove())}}},this.event=this.addEventListener}}let o;!function(e){function t(e){let t;const n=new s({onFirstListenerAdd(){t=e(n.fire)},onLastListenerRemove(){t.dispose()}});return n.event}e.snapshot=t,e.filter=function(e,n){return t((t=>e((e=>n(e)&&t(e)))))},e.map=function(e,n){return t((t=>e((e=>t(n(e))))))}}(o||(o={}))},93982:(e,t,n)=>{n.d(t,{Zc:()=>l,_q:()=>d,cZ:()=>r,dB:()=>c,ml:()=>u});var i=n(45934),s=n(41664),o=n(23580),a=n(55654);function r(e){return(0,s.Q)(e)}function c(e,t){return(0,o.My)(e).getOrCreateInstance(t,(()=>new a.lt))}function l(e,t){return(0,o.My)(e).getOrCreateInstance(t,(()=>new a.lt)).event}function d(e){return u(e).event}function u(e){return c((0,i.Pj)(),e)}},32269:(e,t,n)=>{n.d(t,{Cb:()=>W,Cl:()=>p,DI:()=>B,Dx:()=>A,EU:()=>R,HT:()=>Z,Hy:()=>$,Id:()=>h,Np:()=>D,Qi:()=>U,Tr:()=>K,X7:()=>V,XZ:()=>x,Yq:()=>g,Z1:()=>H,_9:()=>F,_q:()=>G,au:()=>k,d_:()=>P,el:()=>E,ez:()=>w,fq:()=>v,gq:()=>O,i0:()=>L,iV:()=>N,jG:()=>l.j,p6:()=>C,sh:()=>z,vl:()=>d.v,wB:()=>I});var i=n(74267),s=n(92810),o=n(85163),a=n(1741),r=n.n(a),c=n(45695),l=n(77509),d=n(23397),u=n(71210),m=n(70082);const h=e=>{Object.keys(o.A9).forEach((t=>{"onboarding_success"!==e.get(o.A9[t])&&e.remove(o.A9[t])}))};function p(e){const t=(0,i.A)(e);return isNaN(t)?new Date(e):t}const g=(e,t,n=!1)=>{Date;const i=new Date,s=e.getDate()===i.getDate()&&e.getMonth()===i.getMonth()&&e.getFullYear()===i.getFullYear();if(n&&s){const n=Math.floor((i-e)/1e3),s=Math.floor(n/60),o=Math.floor(s/60);if(n<60)return t("Just now");if(o>0){const e=s%60;return`${o} ${t("hour","hours",o)} ${e} ${t("minute","minutes",e)}`}return`${s} ${t("minute","minutes",s)}`}{const t=new Intl.DateTimeFormat(navigator.language,{dateStyle:"short"}),n=new Intl.DateTimeFormat(navigator.language,{timeStyle:"short"});return t.format(e)+" "+n.format(e)}},v=e=>{const t=e.match(/(\(copy\))( \d+)?$/),n=null===t||void 0===t?void 0:t[1],i=null===t||void 0===t?void 0:t[2];return n?i?`${e.slice(0,-i.length)} ${+i.slice(1)+1}`:`${e} 2`:`${e} (copy)`};function f(e,t,n){const i=new Map,s=new RegExp(`(${t})(.*?)(${n})`,"gis");return e=e.replaceAll(s,((e,t,n,s)=>{const o=(0,u.l)();return i.set(o,n),t+o+s})),{escapes:i,html:e}}function _(e,t){let n=[];for(const[i,s]of t){const{escapes:t,html:o}=f(e,i,s);e=o,n.push([i,s,t])}return{escapes:n,html:e}}function y(e,t,n,i){const s=new RegExp(`(${t})(.*?)(${n})`,"gis");return e.replaceAll(s,((e,t,n,s)=>{const o=i.get(n);return"string"===typeof o?t+o+s:e}))}const b=/<title>(.*)<\/title>/gm,E=(e,t)=>{let{escapes:n,html:i}=_(e,[["<style.*?>","<\\/style>"],["<script.*?>","<\\/script>"],["<\\!--","--\x3e"]]);return i=i.replaceAll(b,((e,n)=>n===t?`<title>${v(n)}</title>`:e)),function(e,t){for(const[n,i,s]of t)e=y(e,n,i,s);return e}(i,n.reverse())};function w(e){let{html:t}=_(e,[["<style.*?>","<\\/style>"],["<script.*?>","<\\/script>"],["<\\!--","--\x3e"]]);return[...t.matchAll(b)].map((e=>e[1])).find((e=>!!e))}const S="bottomRight",C=(e,t,n=S)=>{var i,s,o;t.error({message:(0,m.jsx)("div",{dangerouslySetInnerHTML:{__html:(null===(i=e.error)||void 0===i||null===(s=i.data)||void 0===s?void 0:s.code)||e.error.status||e.error}}),description:(0,m.jsx)("div",{dangerouslySetInnerHTML:{__html:(null===(o=e.error.data)||void 0===o?void 0:o.message)||e.error.error}}),placement:n})},I=(e,t,n=S)=>{t.success({message:e,placement:n})},j="ascend",M="descend",T="desc",O=e=>{switch(e){case j:return"asc";case M:return T;default:return""}},D=e=>{switch(e){case"asc":return j;case T:return M;default:return""}},A=e=>{const t=document.createElement("div");return t.className=e||"resizer",t},k=/[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/,B=e=>new Promise(((t,n)=>{let i=new Image;i.src=e,i.addEventListener("load",(()=>{t("success")})),i.addEventListener("error",(()=>{n("error")})),i=null})),R=(e,t)=>{for(const n of t)"object"===typeof e.properties&&(e=e.properties[n]);return e},P=e=>e instanceof Array?e.map((e=>({label:e,value:e}))):Object.keys(e).map((t=>({label:e[t],value:t}))),L=(e,t,n=!0)=>{const i=Object.keys(t);for(const s of i){const i=t[s];void 0!==i&&null!==i&&(e[s]=n&&"object"===typeof i?L(e[s]||{},i,!0):i)}return e},N=e=>new Promise(((t,n)=>{r().load({google:{families:[e]},classes:!1,active:t,inactive:n})})),x=(e,t)=>{t&&e(t)},F=()=>{const e=(0,c.XW)();return(0,s.useCallback)(((t,n)=>{document.querySelectorAll(".block-search__preview").forEach((e=>e.remove()));const i=document.getElementById("iframe-scroll-top"),s=document.getElementById("iframe-scroll-bottom"),a=document.getElementById("email_iframe"),r=document.body.getBoundingClientRect().height,c=a.getClientRects()[0];c.top<0&&(i.style.display="block"),c.top+c.height>r&&(s.style.display="block");const l={operation:o.Ru.SANDBOX_BLOCK_INSERT,settings:{blockHTML:n||null,targetBlock:null,project:"emailmaker"}};t.dataTransfer.setData("Text",JSON.stringify(l)),e(l)}),[e])},U=()=>{const e=(0,c.XW)();return(0,s.useCallback)(((t,n)=>{const i=document.getElementById("iframe-scroll-top"),s=document.getElementById("iframe-scroll-bottom"),a=document.getElementById("email_iframe"),r=document.body.getBoundingClientRect().height,c=a.getClientRects()[0];c.top<0&&(i.style.display="block"),c.top+c.height>r&&(s.style.display="block");const l={operation:o.Ru.SANDBOX_ATOM_INSERT,settings:{atomHTML:n||null,targetBlock:null}};t.dataTransfer.setData("Text",JSON.stringify(l)),e(l)}),[e])},z=()=>{const e=(0,c.XW)();return(0,s.useCallback)(((t,n)=>{e({operation:o.Ru.SANDBOX_BLOCK_INSERT,action:"insert",settings:{blockHTML:n}})}),[e])},V=()=>{const e=(0,c.XW)();return(0,s.useCallback)(((t,n)=>{e({operation:o.Ru.SANDBOX_ATOM_INSERT,action:"insert",settings:{atomHTML:n}})}),[e])},H=(e,t)=>{t.success({maskClosable:!0,centered:!0,title:e("Coming soon"),content:e("The feature is under development."),okText:e("Ok. I'll be waiting"),onOk:()=>{}})},W=()=>{const e=(0,c.XW)();return(t,n)=>{e({operation:o.Ru.SANDBOX_ELEMENT_SETTINGS_SET,settings:t,type:n})}},G=(e,t="")=>{var n,i;const s=[];return null===(n=e._embedded)||void 0===n||null===(i=n["wp:term"])||void 0===i||i.filter((e=>{var n;return!!e.length&&(!t||(null===(n=e[0])||void 0===n?void 0:n.taxonomy)===t)})).forEach((e=>{const t=e[0].taxonomy;s[t]||(s[t]=[]),s[t]=e.map((e=>({id:e.id,name:e.name,children:e.children}))),s[s.length]=s[t]})),""!==t&&s.length?s[t]:s},Z=(e,t="")=>{var n,i,s,o,a;return(null===(n=e._embedded)||void 0===n||null===(i=n["wp:term"])||void 0===i||null===(s=i.find((e=>{var n;return!!e.length&&(!t||(null===(n=e[0])||void 0===n?void 0:n.taxonomy)===t)})))||void 0===s||null===(o=s.find((e=>{var t;return null===e||void 0===e||null===(t=e.name)||void 0===t?void 0:t.startsWith("project_")})))||void 0===o||null===(a=o.children)||void 0===a?void 0:a.map((e=>({id:e.id,name:e.name,count:e.count}))))||null},$=(e,t)=>{const n=e.target,i=t.getBoundingClientRect().height,s=n.getBoundingClientRect().height-i,o=e.clientY-t.getBoundingClientRect().top-30,a=-s*(Math.min(Math.max(o,0),i-60)/(i-60));n.style.transform=`translateY(${a}px)`},K=({target:e})=>{e.style.transform="translateY(0)"}},20116:(e,t,n)=>{n.d(t,{BD:()=>a,R1:()=>o});var i=n(33288);const s=i.di.createIdentifier("mocks");function o(e,t){const n=Object.keys(e.endpoints);for(const o of n){const t={[o]:t=>{e.enhanceEndpoints({endpoints:{[`${o}_base`]:t}});const n=t.queryFn;n&&(t.queryFn=(t,a,r,c)=>{const l=i.di.getInstance(a,s),d=l&&l[e.reducerPath],u=d&&d[o];if(u){const e=u(t);let i={data:null,error:null};return i="function"===typeof e?e((e=>Promise.resolve().then((()=>n(e,a,r,c))).then((e=>{if(!e.error)return e.hasOwnProperty("data")?e.data:e;if(e.error)throw e.error})))):e,Promise.resolve(i).then((e=>({data:e})),(e=>({data:null,error:{data:e}})))}return n(t,a,r,c)})}};e.enhanceEndpoints({endpoints:t})}return{[e.reducerPath]:t}}function a(e,t){const n={};for(const i of Object.keys(t))n[i]="function"===typeof t[i]?t[i](e):t[i];return i.di.inject(e,s,n)}},81304:(e,t,n)=>{n.d(t,{E:()=>a,I:()=>o});var i=n(71210),s=n(814);function o({code:e,...t},n){var s,o;const a=n.getState();return{...t,...e?{html:e}:{},renderGuid:(0,i.l)(),project:null===(s=a.projectSlice)||void 0===s||null===(o=s.project)||void 0===o?void 0:o.id,utm_parameters:t.utm_parameters||{},_embedded:void 0}}function a({html:e,renderGuid:t,...n},i){const o=i.getState(),{project:a,config:r}=o.configSlice;return(0,s.TB)({...n,code:e,project:void 0===a?n.project:a,utm_parameters:r.UTMEnabled?n.utm_parameters:void 0,tags:void 0,template:void 0,guid:void 0,emailtags:void 0,project_title:void 0,project_author:void 0,is_template:void 0,is_inited:void 0,compiled:(0,s.TB)({html:e,ampHtml:e&&""})})}},43347:(e,t,n)=>{n.d(t,{Ri:()=>d,uS:()=>u});var i=n(20116),s=n(15230),o=n(63531),a=n(33288),r=n(55654),c=n(93982),l=n(13522);const d=a.di.createIdentifier(),u=(a.di.createIdentifier(),(0,i.R1)(o.yH,(e=>{const t=a.di.getInstance(e,s.Lz);if(!t)throw new Error("Something was wrong");const n=t.addDisposable(new r.lt);a.di.inject(e,d,n);const i=(0,c.dB)(e,l.A.ON_SEND_TESTEMAIL_ID),o=(0,c.dB)(e,l.A.ON_SEND_LIVEPREVIEW_ID);return{uploadImage:t=>async i=>{const o=e.getState(),{project:r}=o.configSlice,c="tmp"===t.folder?null:await n.fire({file:t.file,project:r}),l=c?c.find((e=>e)):null;return l?[{file_url:l,project:r}]:i({...t,user_id:String((await a.di.getInstanceAsync(e,s.sZ)).app_id)})},sendTestEmail:t=>async n=>{const o=e.getState(),{project:r}=o.configSlice;(await i.fire({project:r,email_id:t.email_id,subject:t.subject,email:t.email,html:t.html,from_name:t.from_name})).some((e=>!1===e))&&await n({...t,user_id:String((await a.di.getInstanceAsync(e,s.sZ)).app_id)})},async sendLivePreview(t){const n=e.getState(),{project:i}=n.configSlice;(await o.fire({project:i,id:t.email,subject:t.subject,html:t.content})).some((e=>!1===e))},sendShortLink:e=>t=>t(e)}})))},62410:(e,t,n)=>{n.d(t,{r:()=>u});var i=n(14386),s=n(33481),o=n(86286);var a=n(33288),r=n(15230),c=n(13652),l=n(47358);function d(e){var t,n;const i=e.getState(),a=i[o.Ay.name],r=i[s.Ay.name],c=i[l.Ay.name];return{...r.config,theme:null===(t=a.currentUser)||void 0===t?void 0:t.theme,locale:null===(n=a.currentUser)||void 0===n?void 0:n.locale,codeModeDirection:c.isCodeMode?c.codeModeDirection:"none",editor:(d=a.monacoOptions,{fontSize:d.font_size,fontFamily:d.font_family,tabSize:d.tab_size,wordWrap:d.word_wrap,minimap:d.minimap,insertSpaces:d.insert_spaces,indentSize:d.indentSize})};var d}const u=(0,i.l)((e=>{const t=e.dispatch,n=d(e),i=a.di.getInstanceAsync(e,r.sZ).then((e=>(null===e||void 0===e?void 0:e.app_config)||{}),(e=>(console.log(e),{}))),u=(0,c.y)(),m=async(...e)=>{const n=Object.assign({},...e),{locale:i,theme:a,editor:r,codeModeDirection:c,...d}=n;if(r){const e=function(e){return{font_size:e.fontSize,font_family:e.fontFamily,tab_size:e.tabSize,word_wrap:e.wordWrap,minimap:e.minimap,insert_spaces:e.insertSpaces,indentSize:e.indentSize}}(r);await t((0,o.ww)(e))}void 0!==c&&("none"===c?t((0,l.N6)(!1)):(t((0,l.N6)(!0)),t((0,l.Uf)(c)))),"string"===typeof i&&t((0,o.ko)(i)),"string"===typeof a&&t((0,o.Yl)(a)),t((0,s._R)(d))};return{setOptions:u.decorate((async({config:e={},project:a,user:r})=>{await m(n,await i,e),t((0,s.bn)(String(a))),r&&t((0,o.gV)({email:"",password:"",...r}))})),instance:{setConfig:u.decorate((async e=>{await m(n,await i,e)})),getConfig:()=>d(e),updateConfig:u.decorate((e=>m(e)))}}}))},33746:(e,t,n)=>{n.d(t,{F:()=>c});var i=n(44141),s=n(33288),o=n(15230),a=n(14386),r=n(39217);const c=(0,a.l)((e=>{let t=!0;return{setOptions(n){if(n.hasOwnProperty("baseUrl")){const i=s.di.getInstance(e,r.eT),o=i.getOptions(),a=(0,r.qT)(n.baseUrl);o.baseUrl!==a&&(i.setOptions({baseUrl:a}),t=!0)}if(t){const n=s.di.getInstance(e,i.Pz);s.di.inject(e,o.sZ,(async(e,t)=>t||n.app.app_init_create({}).then((({data:e})=>e))),!0),t=!0}}}}))},19209:(e,t,n)=>{n.d(t,{F:()=>m});var i=n(14386),s=n(14315),o=n(33288),a=n(41664),r=n(39217),c=n(13652),l=n(85163);const d=(0,a.Q)(),u=(0,a.Q)(),m=(0,i.l)((e=>({setOptions(t){const n=(0,c.y)(),i=(0,r.mg)(e);o.di.addService(e,r.jY,{execute:n.decorate((async n=>{if(t.jwtAuth){let a=o.di.getInstance(e,d),r=o.di.getInstance(e,u);if(!r&&!a){const n=await i.jwtAuth.token_create({body:t.jwtAuth,type:s.cM.Json});if(n.error)throw r=l.ff,o.di.inject(e,u,l.ff),new Error(l.ff);a=n.data.token,o.di.inject(e,d,a)}r||n.headers.append("authorization",`Bearer ${a}`)}}))})}})))},91514:(e,t,n)=>{n.d(t,{h:()=>l});var i=n(14386),s=n(41664),o=n(33288),a=n(39217),r=n(47271);const c=(0,s.Q)(),l=(0,i.l)((e=>{let t;return o.di.addService(e,a.jY,{execute:async n=>{if(t){const t=await o.di.getInstanceAsync(e,c);t&&n.headers.append("authorization",`Bearer ${t}`)}}}),{setOptions(n){t!==n.getAuthToken&&(t=n.getAuthToken,o.di.inject(e,c,void 0),o.di.inject(e,c,(async(e,n)=>{try{let e=await n;var i;return t?e&&1e3*(null===(i=(0,r.iU)(e))||void 0===i?void 0:i.exp)>function(){const e=new Date;return e.valueOf()-60*e.getTimezoneOffset()*1e3}()?e:await t(e):""}catch(s){return console.log(s),""}}),!0))}}}))},14386:(e,t,n)=>{function i(e){return function(t){return{setOptions:()=>{},instance:{},dispose:()=>{},...e(t)||{}}}}function s(e){return t=>{const n={},i=e.map((e=>e(t)));for(const e of i)Object.assign(n,e.instance);return{instance:n,setOptions:e=>{const t=i.map((t=>t.setOptions(e)));return t.some((e=>e instanceof Promise))?Promise.all(t).then((()=>{})):void 0},dispose:()=>{for(const e of i)e.dispose()}}}}n.d(t,{E:()=>s,l:()=>i})},893:(e,t,n)=>{n.d(t,{m:()=>c});var i=n(17126),s=n(92810),o=n(45934),a=n(33481),r=n(70082);const c=({children:e})=>{const[t,n]=(0,s.useState)(),c=(0,o.d4)(a.p5);return(0,r.jsxs)("div",{className:"App blocks-app blocks-plugin",children:[c&&(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:c}}),(0,r.jsx)(i.fh.Provider,{value:t,children:e}),(0,r.jsx)("div",{ref:n,className:"blocks-modal-container"})]})}},56507:(e,t,n)=>{n.d(t,{i:()=>Fe});var i=n(20116),s=n(53200);const o=(0,i.R1)(s.B,{addUserToProject:e=>{}});var a=n(84612);const r=(0,i.R1)(a.Zs,{sendMessage:({body:e})=>t=>t({body:e}),getDialog:e=>t=>t(e)});var c=n(39990);const l=(0,i.R1)(c.Q2,(e=>{let t={id:0,username:"",email:"",password:"",code_editor:{},theme:"light",locale:"ru_RU",counters:{},avatar_urls:{},autosaves:!0};return{userRegistration(){},getSchema:()=>e=>e({}),getMe:()=>t,getUser:e=>t,editMe:e=>t={...t,...e},getSubscriptions:()=>[]}}));var d=n(15230),u=n(47036);const m=(0,i.R1)(u.f,{getEmailRaw({emailId:e,secret_hash:t}){throw new Error(d.f5)}});var h=n(95679);const p=(0,i.R1)(h.CL,{sendAiImageRequest:function({body:e}){return t=>t({body:e})},getAiImage:e=>t=>t(e)});var g=n(62689);const v=(0,i.R1)(g.vx,{getNotifications:e=>[],notificationShown({id:e,datetime:t}){throw new Error(d.f5)}});var f=n(84568);const _=(0,i.R1)(f.Nq,(e=>{let t;return{getProjects:(e={page:1})=>[],getProject:e=>n=>t||(t=n(e).then((t=>({...t,id:e})))),addProject(e){throw new Error},editProject:({projectId:e,...n})=>t=t.then((t=>({...t,...n,id:e}))),deleteProject(e){throw new Error}}}));var y=n(46312);const b=(0,i.R1)(y.Z8,{getFile({url:e,tryFetch:t=!0,type:n}){throw new Error(d.f5)}});var E=n(65119);const w=(0,i.R1)(E.yR,{resetPassword(e){throw new Error(d.f5)},setPassword(e){throw new Error(d.f5)},validateRecoverPasswordCode(e){throw new Error(d.f5)}});var S=n(43347),C=n(83351);const I=(0,i.R1)(C.OV,{tokenCreate:e=>t=>t(e),tokenValidate:()=>e=>e({})});var j=n(87701),M=n(33288),T=n(41664),O=n(32269),D=n(55654);class A extends D.IO{async execute([e],t){for(const n of t){const t=await n(e);t&&(void 0===t.id&&(t.id=e.value.id),e.value=t)}return e.value}}function k(e,t){if(e===t)return!0;if("object"===typeof e&&e&&"object"===typeof t&&t){const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const s of n)if(!k(e[s],t[s]))return!1;return!0}return!1}function B(e,t){if(!e)return t;const n={};for(const i of Object.keys(t))k(t[i],e[i])||(n[i]=t[i]);return n}class R extends D.lt{}var P=n(56991);class L extends O.jG{constructor(...e){super(...e),this._items=new Map,this._onChangeEmitter=new D.HN,this.onChange=this._onChangeEmitter.event}async _getOrCreate(e,t){const n=this._items;let i;if(n.has(e))try{i=await n.get(e)}catch{t&&(i=await t())}else t&&(i=await t(),i&&this._onChangeEmitter.fire());return i}async _addOrUpdate(e,t){let n;const i=this._items;if(i.has(e))try{n=await i.get(e)}catch{}const s=await t(n);return(0,P.bD)(n,s)||this._onChangeEmitter.fire(),s}entries(){return Promise.all([...this._items.entries()].map((([e,t])=>t.then((t=>[e,t]))))).then((e=>e.filter((([e,t])=>!!t))))}values(){return Promise.all([...this._items.values()].map((e=>e)).filter((e=>!!e)))}getOrCreate(e,t){let n=this._getOrCreate(e,(()=>t(e)));return this._items.set(e,n),n}addOrUpdate(e,t){let n=this._addOrUpdate(e,t);return this._items.set(e,n),n}add(e,t){const n=Promise.resolve(t);return this._items.set(e,n),n}remove(e){if(this._items.has(e)){const t=this._items.get(e);return this._items.delete(e),this._onChangeEmitter.fire(),t}return Promise.resolve(void 0)}async setAll(e){try{this.suspendChange();const t=[],n=new Set(Array.from(e).map((([e,t])=>e))),i=(await this.entries()).filter((([e,t])=>!n.has(e)));for(const[s,o]of e)t.push(this.addOrUpdate(s,(()=>o))),n.add(s);for(const[e]of i)t.push(this.remove(e));return await Promise.all(t),i}finally{this.resumeChange()}}clear(){this._items.clear(),this._onChangeEmitter.fire()}suspendChange(){this._onChangeEmitter.suspend()}resumeChange(){this._onChangeEmitter.resume()}}var N=n(71210);class x extends O.jG{constructor(...e){super(...e),this._cache=new L,this._readEmitter=new D.lt,this._saveEmitter=this.addDisposable(new A),this._removeEmitter=this.addDisposable(new R),this._foreignCache=Object.create(null),this.handlerRead=this._readEmitter.event,this.onSave=this._saveEmitter.event,this.onRemove=this._removeEmitter.event,this.onChange=this._cache.onChange}async get(e){return this._cache.getOrCreate(e,(async t=>Object.assign({id:e},...(await this._readEmitter.fire(e)).filter((e=>!!e)))))}get cache(){return this._cache}byForeignKey(e){let t=this._foreignCache[e];if(!t){const n=this.addDisposable(new O.jG);n.addDispose((()=>delete this._foreignCache[e]));const i=n.addDisposable(new L),s=n.addDisposable(new D.lt);t=this._foreignCache[e]={get:async(t,n={})=>(await i.getOrCreate(t,(async()=>{try{const n=function(e=[]){if((e=e.filter((e=>e))).length<=1)return e[0];let t=new Map;for(const n of e)for(const e of n)if(void 0!==e.id){let n=t.get(e.id)||{};t.set(e.id,{...n,...e})}return[...t].map((([e,t])=>t))}(await s.fire(t))||[];for(const i of n)i[e]=t,await this._cache.add(i.id,i);return n}catch{return[]}})),function(e,{filter:t,order:n="asc",orderBy:i,page:s,pageSize:o=20}={}){const a=e.length;let r=e.length;if(void 0!==t){const n=Object.keys(t);r=(e=e.filter((e=>{for(const i of n){const n=e[i],s=t[i];return"id"===i||"string"!==typeof n?n===s:"string"===typeof s&&n.startsWith(s)}return!0}))).length}return i&&(e=e.sort(((e,t)=>(e[i]>t[i]?1:t[i]>e[i]?-1:0)*("asc"===n?1:-1)))),void 0!==s&&(e=e.slice(o*(s-1),o*s-1)),{data:e,filteredTotal:r,total:a,totalPages:Math.floor(a/o)}}(await this._cache.values(),n)),first:(e,n={})=>t.get(e,{...n,page:1,pageSize:1}).then((e=>e[0])),handleRead:s.event,clear(){i.clear()},dispose(){n.dispose()}}}return t}async create(e,{source:t="",silent:n}={}){let i=e;return n||(i=await this._saveEmitter.fire({prev:void 0,patch:e,value:i,source:t})),void 0===i.id&&(i.id=(0,N.l)()),await this._cache.addOrUpdate(i.id,(()=>i))}async update(e,t,{source:n="",silent:i}={}){return this._cache.addOrUpdate(e,(async e=>{let s=e?{...e,...t}:t;if(!i)return t=e?B(e,t):t,await this._saveEmitter.fire({prev:e,patch:t,value:s,source:n})}))}async remove(e,{source:t="",silent:n}={}){const i=await this._cache.remove(e);return n||await this._removeEmitter.fire({value:i,source:t}),i}refresh(){this._cache.clear();for(const e of Object.values(this._foreignCache))e.clear()}suspendChange(){this._cache.suspendChange()}resumeChange(){this._cache.resumeChange()}}var F=n(33481);function U(){const e=(0,T.Q)();return t=>M.di.getOrCreateInstance(t,e,(()=>new x))}function z(e){const t=M.di.getInstance(e,d.ax);if(!t)throw new Error("Failed");return t}function V(e){const t=M.di.getInstance(e,d.Lz);if(!t)throw new Error("Failed");return t}const H=U(),W=U(),G=(0,i.R1)(j.VM,(e=>{const t=H(e),n=t.byForeignKey("project"),i=W(e),s=i.byForeignKey("parent"),{dispatch:o,getState:a}=z(e),r=V(e);return r.addDisposable(t.onChange((()=>o(j.VM.util.invalidateTags(["Blocks"]))))),r.addDisposable(t.onSave((({prev:e,patch:t,value:n})=>{(e=e?{...e,...t}:t)&&n.html===e.html&&n.title===e.title&&(n.renderGuid=e.renderGuid)}),Number.MIN_VALUE)),{async getBlocks(e){const t={};e.name&&(t.title=e.name),e.type&&(t.type=e.type);return await n.get(e.projectId,{filter:t,page:e.page,pageSize:e.pageSize,order:e.order,orderBy:e.orderby}).then((({data:e})=>e))},getBlocksSchema:()=>e=>e({}),getParentEmailBlocks:e=>t=>t(e),getTemplateBlocks:e=>t=>t(e),async getBlock(e){const t=a().projectSlice.project.id;return n.first(t,{filter:{id:e}})},getBlockHistory:async({blockId:e,page:t=1})=>({...await s.get(e,{page:t}),args:{blockId:e,page:t}}),addBlock:e=>async n=>{const i=await t.create(e);return a().configSlice.config.preventSendDataToEM||n(i).catch((e=>console.log(e))),i},editBlock:({blockId:e,...n})=>t.update(e,n),deleteBlock:e=>t.remove("object"===typeof e?e.id:e),addTag:e=>e,getDeletableTag:([e,t])=>[],autoSaveBlock:({blockId:e,body:t})=>i.create({...t,parent:e})}}));var Z=n(18777),$=n(68415);const K=U(),q=(0,i.R1)(Z.Jg,(e=>{const t=K(e),n=t.byForeignKey("post"),{dispatch:i}=z(e);return V(e).addDisposable(t.onChange((()=>i(Z.Jg.util.invalidateTags(["Comments"]))))),{getComments:e=>n.get(e).then((({data:e})=>e)),addComment({subjectId:e,author:n,parent:i,content:s,author_name:o,author_email:a,targetId:r}){const c={post:e,author:n,author_name:o,author_email:a,content:s,parent:i,target_id:r,date:(0,$.A)(new Date),author_avatar_urls:{}};return t.create(c)},deleteComment:e=>t.remove(e),editComment:({commentId:e,...n})=>t.update(e,n),deleteTarget:e=>t.update(e,{target_id:""})}}));var Q=n(94381);const Y=(0,i.R1)(Q.Ad,{getLocale:({id:e})=>t=>t({id:e}),getLocales:()=>e=>e({})}),{useGetLocalesQuery:X,useGetLocaleQuery:J,useLazyGetLocaleQuery:ee,useLazyGetLocalesQuery:te}=Q.Ad;var ne=n(17581);const ie=U(),se=U(),oe=(0,i.R1)(ne.GY,(e=>{const t=ie(e),n=se(e),i=n.byForeignKey("parent"),{dispatch:s}=z(e),o=V(e);return o.addDisposable(t.onChange((async()=>{s(ne.GY.util.invalidateTags(["Email"]))}))),o.addDisposable(n.onChange((()=>{s(ne.GY.util.invalidateTags(["EmailAutosaves"]))}))),o.addDisposable(t.onSave((({prev:e,patch:t,value:n})=>{(e=e?{...e,...t}:t)&&n.subject===e.subject&&n.html===e.html&&n.preheader===e.preheader&&n.title===e.title&&(n.renderGuid=e.renderGuid)}),Number.MIN_VALUE)),{getEmails:e=>[],getTemplateEmails:e=>t=>t(e),getEmail:async e=>await t.get(e),getEmailHistory:async({emailId:e,page:t=1})=>({...await i.get(e,{page:t}),args:{emailId:e,page:t}}),async addEmail({source:e,...n}){const i=await t.create(n,{source:e});return i.renderGuid||(i.renderGuid=(0,N.l)()),i},editEmail:({emailId:e,source:n,...i})=>t.update(e,i,{source:n}),deleteEmail:e=>t.remove("object"===typeof e?e.id:e),addTag:e=>e,getDeletableTag:([e,t])=>[],autoSaveEmail:async({emailId:e,body:t})=>await n.create({...t,parent:e,modified:(new Date).toString()})}})),ae={...o,...r,...l,...G,...q,...oe,...m,...p,...Y,...v,..._,...b,...w,...S.uS,...I};var re=n(14386),ce=n(57227),le=n(44141),de=n(31770),ue=n(91967),me=n(814);function he(e){return{getEmail:async t=>(0,le.KU)(e).wp.email_detail({id:(0,me.mQ)(t)},{extraQuery:{_embed:"wp:term",_fields:"_embedded,id,author,title,emailtags,folder,group,modified,date,type,\n acf.description,\n acf.html,\n acf.common_styles,\n acf.is_template,\n acf.lock,\n acf.parent_email,\n acf.project,\n acf.secret_hash,\n acf.subject,\n acf.utm_parameters\n "}}).then((0,de.SC)(ue.V))}}function pe(e){return{emails:ie(e),blocks:H(e),emailRevisions:se(e),blocksRevision:W(e),comments:K(e)}}var ge=n(23580),ve=n(13329),fe=n(28316);function _e({code:e,...t},n){var i,s;const o=n.getState();return{...t,...e?{html:e}:{},renderGuid:(0,N.l)(),project:null===(i=o.projectSlice)||void 0===i||null===(s=i.project)||void 0===s?void 0:s.id}}function ye({html:e,renderGuid:t,...n},i){const s=i.getState(),{project:o}=s.configSlice;return(0,me.TB)({...n,code:e,project:void 0===o?n.project:o,guid:void 0,link:void 0,status:void 0,slug:void 0,password:void 0,comment_status:void 0,template:void 0,blocktags:void 0,project_title:void 0,ping_status:void 0,lock:void 0,tag:void 0,is_template:void 0})}var be=n(81304);function Ee({code:e,...t},n,i){const s=n.getState();var o,a;void 0===i&&(i=void 0===t.parent?null===(o=s.emailSlice)||void 0===o||null===(a=o.email)||void 0===a?void 0:a.id:t.parent);return{...t,...e?{html:e}:{},parent:i}}function we({html:e,...t},n){return(0,me.TB)({...t,code:e,guid:void 0,compiled:(0,me.TB)({html:e,ampHtml:e&&""})})}function Se(e,t,n){const i=t.getState();var s,o;void 0===n&&(n=void 0===e.post?null===(s=i.emailSlice)||void 0===s||null===(o=s.email)||void 0===o?void 0:o.id:e.post);return{...e,content:e.content?`<p>${e.content}</p>`:"",post:n}}function Ce(e,t){return(0,me.TB)({...e,link:void 0,comment_status:void 0})}var Ie=n(13652),je=n(13522),Me=n(93982),Te=n(90854),Oe=n(58689),De=n(44824),Ae=n(85974),ke=n(91391);const Be=e=>function(e){var t;return function(e){return"___SCRIPT"===e.tagName}(e)&&(null===(t=e.src)||void 0===t?void 0:t.startsWith(ke.gP))}(e)||(0,Ae.Nh)(e)||(0,Te.BF)(e);async function Re(e,t){"string"===typeof e&&(e={code:e});const n=e.code?await(0,Oe.PJ)(e.code||"",[Oe.qy],e.utm_parameters,(async e=>{void 0===t&&(t=(e=>{if(Be(e))return!0;if((0,Te.vq)(e)||(0,Te.wz)(e))for(const t of e.querySelectorAll("*"))if(Be(t))return!0;return!1})(e)),t&&await(0,De.e)(e,"html")})):"",i=e.code&&t?await(0,Oe.PJ)(e.code||"",[Oe.qy],e.utm_parameters,(async e=>{await(0,De.e)(e,"amp")})):"";return{...e,compiled:{html:n,ampHtml:i}}}const Pe="EXTERNAL";class Le extends O.jG{constructor(e){super(),this._store=e,this._emailTemplateCache=Object.create(null),this._prevCommand=void 0,this._prevContent=void 0,this._dataSources=void 0,this._api=void 0,this._eventLock=void 0,this._queue=(0,Ie.y)(),this._model=void 0,this.show=this._queue.decorate(this._show,this),this.save=this._queue.decorate(this._save,this);const t=(0,ge.My)(e);this._dataSources=pe(t),this._api=function(e){return{...he(e),...(0,ce.E)(e)}}(t),this._eventLock=function(e){const t=Object.values(pe(e));return{suspendChange(){t.forEach((e=>e.suspendChange()))},resumeChange(){t.forEach((e=>e.resumeChange()))}}}(t);const n=(0,Me.Zc)(e,je.A.ON_MODEL_CHANGE);this.addDisposable(n((e=>{this._model=e})))}async getProject(){const e=await M.di.getInstanceAsync(this._store,d.sZ);return null===e||void 0===e?void 0:e.project}async getTemplateEmail(e){e=String(e);let t=this._emailTemplateCache[e];if(!t){const n=await this._api.getEmail(e);n.error?console.log(n.error):(t={...n.data,lock:!1,parent_email:e},delete t.id)}return t}async getBlocks(){const{cache:e}=this._dataSources.blocks,t=await this.getProject();return(await e.values()).filter((e=>e.project===t)).map((e=>ye(e,this._store)))}async getComments(){const{cache:e}=this._dataSources.comments,t=await this.getEmail();return(await e.values()).filter((e=>e.post===t.id)).map((e=>Ce(e,this._store)))}async getEmailRevisions(){const{cache:e}=this._dataSources.emailRevisions,t=await this.getEmail();return(await e.values()).filter((e=>e.parent===t.id)).map((e=>we(e,this._store)))}async setBlocks(e=[]){const{cache:t}=this._dataSources.blocks;await t.setAll(e.filter((e=>void 0!==e.id)).map((e=>[e.id,_e(e,this._store)])))}async setEmailRevisions(e=[],t){const{cache:n}=this._dataSources.emailRevisions,i=e.filter((e=>void 0!==e.id)).map((e=>[e.id,Ee(e,this._store,t)]));await n.setAll(i)}async setComments(e=[],t){const{cache:n}=this._dataSources.comments,i=e.filter((e=>void 0!==e.id)).map((e=>[e.id,Se(e,this._store,t)]));await n.setAll(i)}async getEmail(){const e=this._store.getState(),t=e.emailSlice.email.id?e.emailSlice.email:e.newEmailSlice.email;return Re((0,be.E)({...t,html:this._model?this._model.getValue():t.html},this._store),t.isAmp)}async compileEmail(){const e=this._store.getState(),t=e.emailSlice.email.id?e.emailSlice.email:e.newEmailSlice.email;return Re((0,be.E)({...t,html:this._model?this._model.getValue():t.html},this._store),t.isAmp)}async setEmail(e,t,n=!1){const i=this._dataSources.emails,s=i.cache,o=await this.getProject();e="string"===typeof e?{code:e}:{...e};let a=(0,be.I)(e,this._store);const r=a.id;let c=r;if(void 0!==r?a={...await i.get(r),...a,project:o}:(a={...a,project:o},c=(0,N.l)(),delete a.project),t){const e=await this.getTemplateEmail(String(t));e&&(a={...e,id:String(t),...a})}await s.setAll([[c,a]]),n&&this._runShowCommand({isNew:void 0===r,id:c,project:o})}_runShowCommand(e){const t={...e,type:"email"};this._prevCommand&&!(0,P.bD)(this._prevCommand,e)?(0,ve.RS)(this._store,fe._1,t):this._store.dispatch((0,F.Ir)(t)),this._prevCommand=e}async _show(e){try{if(this._eventLock.suspendChange(),e!==this._prevContent){this._prevContent=e;const{email:n,blocks:i,autosaves:s,comments:o,templateId:a}="string"===typeof(t=e)?{email:{code:t}}:function(e){return!e.hasOwnProperty("email")&&!e.hasOwnProperty("block")}(t)?{email:t}:{...t,email:"string"===typeof t.email?{code:t.email}:t.email},r=[];r.push(this.setBlocks(i)),void 0!==n.id&&(r.push(this.setComments(o)),r.push(this.setEmailRevisions(s))),r.push(this.setEmail(n,Number(a),!0)),await Promise.all(r)}}catch(n){console.log(n)}finally{this._eventLock.resumeChange()}var t;return new Promise((e=>{(0,Me.Zc)(this._store,je.A.ON_EMAIL_INIT_ID)((()=>e()))}))}_save(){return new Promise((async e=>{const t=this._dataSources.emails,n=this.addDisposable(t.onSave((({value:t,source:i})=>{i===Pe&&(n.dispose(),e((0,be.E)(t,this._store)))}),Number.MIN_VALUE));(0,ve.RS)(this._store,fe.Kp,Pe)}))}}var Ne=n(48802);class xe extends O.jG{constructor(e){super(),this._store=e,this._events=void 0,this._listenersUpdaters=void 0}_get(){const e=this._store,t=(0,ge.My)(e),{blocks:n,emails:i,comments:s,emailRevisions:o}=pe(t),a=(0,Me.Zc)(e,je.A.ON_SAVEBUTTON_CLICK_ID),r=(0,Me.Zc)(e,je.A.ON_PREVIOUSBUTTON_CLICK_ID),c=(0,Me.Zc)(e,je.A.ON_NEXTBUTTON_CLICK_ID),l=(0,Me.Zc)(e,je.A.ON_EMAIL_INIT_ID),d=(0,Me.Zc)(e,je.A.ON_EMAIL_CHANGED_ID),u=(0,Me.Zc)(e,je.A.ON_CONTENT_CHANGED_ID),m=(0,Me.Zc)(e,je.A.ON_SEND_TESTEMAIL_ID),h=(0,Me.Zc)(e,je.A.ON_SEND_EMAIL_MODAL_ID),p=(0,Me.Zc)(e,je.A.ON_EMAIL_CLONE_ID),g=(0,Me.Zc)(e,je.A.ON_SHARE_ID),v=(0,Me.Zc)(e,je.A.ON_SHOW_PREVIEW_ID),f=(0,Me.Zc)(e,je.A.ON_SEND_LIVEPREVIEW_ID);return{handleReadEmail:(0,Ne.m)(i.handlerRead,(e=>e),(t=>t&&(0,be.I)(t,e))),handleSaveEmail:(0,Ne.m)(i.onSave,(function({prev:t,patch:n,value:i,source:s}){const o=t?(0,be.E)(t,e):void 0;return{prev:o,patch:B(o,(0,be.E)(n,e)),value:(0,be.E)(i,e),source:s}}),(t=>t?(0,be.I)(t,e):void 0)),handleRemoveEmail:(0,Ne.m)(i.onRemove,(({value:t,source:n})=>({value:(0,be.E)(t,e),source:n})),(()=>{})),handleReadBlocks:(0,Ne.m)(n.byForeignKey("project").handleRead,(t=>(0,F.jY)(e.getState())||String(t)),(t=>null===t||void 0===t?void 0:t.map((t=>_e(t,e))))),handleSaveBlock:(0,Ne.m)(n.onSave,(function({prev:t,patch:n,value:i,source:s}){const o=t?ye(t,e):void 0;return{prev:o,patch:B(o,ye(n,e)),value:ye(i,e),source:s}}),(t=>t?_e(t,e):void 0)),handleRemoveBlock:(0,Ne.m)(n.onRemove,(({value:t,source:n})=>({value:ye(t,e),source:n})),(()=>{})),handleReadComments:(0,Ne.m)(s.byForeignKey("post").handleRead,(e=>e),(t=>null===t||void 0===t?void 0:t.map((t=>Se(t,e))))),handleSaveComment:(0,Ne.m)(s.onSave,(function({prev:e,patch:t,value:n,source:i}){const s=e?Ce(e):void 0;return{prev:s,patch:B(s,Ce(t)),value:Ce(n),source:i}}),(t=>t?Se(t,e):void 0)),handleRemoveComment:(0,Ne.m)(s.onRemove,(({value:e,source:t})=>({value:Ce(e),source:t})),(()=>{})),handleReadEmailRevisions:(0,Ne.m)(o.byForeignKey("parent").handleRead,(e=>e),(t=>null===t||void 0===t?void 0:t.map((t=>Ee(t,e))))),handleEmailAutosave:(0,Ne.m)(o.onSave,(function({prev:e,patch:t,value:n,source:i}){return{value:we(n),source:i}}),(t=>t?Ee(t,e):void 0)),handleRemoveEmailAutoSave:(0,Ne.m)(o.onRemove,(({value:e,source:t})=>({value:we(e),source:t})),(()=>{})),handleEmailChanged:(0,Ne.m)((0,D.sg)(d,100),(t=>(0,be.E)(t,e))),handleEmailInit:(0,Ne.m)(l,(t=>(0,be.E)(t,e))),handlePreviousButtonClick:(0,Ne.m)(r,(t=>(0,be.E)(t,e))),handleNextButtonClick:(0,Ne.m)(c,(t=>(0,be.E)(t,e))),handleSaveButtonClick:(0,Ne.m)(a,(t=>(0,be.E)(t,e))),handleHtmlChanged:(0,Ne.m)((0,D.sg)(u,100)),handleTestEmailSend:(0,Ne.m)(m,(({html:e,...t})=>({...t,code:e,compiled:{html:e,ampHtml:""}}))),handleTestEmailModal:(0,Ne.m)(h,(t=>(0,be.E)(t,e))),handleCloneEmail:(0,Ne.m)(p,(t=>(0,be.E)(t,e))),handleShareEmail:(0,Ne.m)(g),handlePreviewEmail:(0,Ne.m)(v),handleLivePreviewEmail:(0,Ne.m)(f)}}get(){return this._events||(this._events=this._get())}setOptions(e={}){const t=this.get();let n=this._listenersUpdaters;if(!n){n=this._listenersUpdaters={};for(const e of Object.keys(t))n[e]=this.addDisposable(new Ne.U(t[e]))}for(const i of Object.keys(t))n[i].setListener(e[i])}}const Fe=(0,re.l)((e=>{(0,i.BD)(e,ae);const t=new Le(e),n=new xe(e);return{async setOptions(e){n.setOptions(e),await t.show(e.content)},instance:{...n.get(),show:e=>t.show(e),save:()=>t.save(),getEmail:()=>t.getEmail(),getBlocks:()=>t.getBlocks(),getEmailRevisions:()=>t.getEmailRevisions(),getComments:()=>t.getComments(),compileEmail:async e=>e?Re(e):await t.compileEmail()}}}))},8671:(e,t,n)=>{n.d(t,{e:()=>c});var i=n(14386),s=n(33288),o=n(15230),a=n(32269),r=n(48802);const c=(0,i.l)((e=>{const t=s.di.getInstance(e,o.Lz),n=t.addDisposable(new a.vl),i=(0,r.m)(n.event),c=t.addDisposable(new r.U(i));return{setOptions({handleDestroy:e}){c.setListener(e)},instance:{handleDestroy:i,destroy:()=>t.dispose()}}}))},63772:(e,t,n)=>{n.d(t,{Z:()=>c});var i=n(14386),s=n(43347),o=n(33288),a=n(48802),r=n(15230);const c=(0,i.l)((e=>{const t=o.di.getInstance(e,r.Lz),n=o.di.getInstance(e,s.Ri),i=(0,a.m)(n.event),c=t.addDisposable(new a.U(i));return{setOptions(e){c.setListener(e.handleLoadImage)},instance:{handleLoadImage:(0,a.m)(n.event)}}}))},55853:(e,t,n)=>{n.d(t,{E:()=>c});var i=n(14386),s=n(33288),o=n(15230),a=n(55654),r=n(48802);const c=(0,i.l)((e=>{const t=s.di.getInstance(e,o.Lz),n=t.addDisposable(new a.vl),i=s.di.getInstanceAsync(e,o.Cd);i.then((({instance:e})=>n.fire(e)));const c=(0,r.m)(n.event),l=t.addDisposable(new r.U(c));return{setOptions({handleLoad:e}){l.setListener(e)},instance:{handleLoad:c,reset:e=>i.then((({instance:t,setOptions:n})=>Promise.resolve(n(e)).then((()=>t))))},destroy:()=>t.dispose()}}))},1281:(e,t,n)=>{n.d(t,{Z:()=>v});var i=n(14386),s=n(33288),o=n(15230),a=n(48802),r=n(13329),c=n(28316),l=(n(92810),n(814)),d=n(70082);function u(e){return"string"===typeof e?e:e?(0,d.jsx)("div",{ref:t=>null===t||void 0===t?void 0:t.replaceWith(e)}):void 0}function m(e,t="success"){return"string"===typeof e&&(e={message:e}),(0,l.TB)({type:e.type||t,data:e.data,innerException:e.innerException,message:u(e.message),description:u(e.description),btn:u(e.btn),onClose:e.onClose,duration:e.duration,icon:u(e.icon),placement:e.placement,style:e.style,closeIcon:"boolean"===typeof e.closeIcon||"undefined"===typeof e.closeIcon?e.closeIcon:u(e.closeIcon),props:e.props,role:e.role})}var h=n(13522),p=n(55654),g=n(93982);const v=(0,i.l)((e=>{const t=s.di.getInstance(e,o.Lz),n=(0,g.Zc)(e,h.A.ON_NOTIFICATION),i=(0,p.pb)(n,(e=>"error"===e.type)),l=(0,p.pb)(n,(e=>"success"===e.type)),d=(0,a.m)(n,(e=>e),(e=>"string"===typeof e||"object"===typeof e?m(e):e)),u=(0,a.m)(i,(e=>e),(e=>"string"===typeof e||"object"===typeof e?m(e,"error"):e)),v=(0,a.m)(l,(e=>e),(e=>"string"===typeof e||"object"===typeof e?m(e):e)),f=t.addDisposable(new a.U(d)),_=t.addDisposable(new a.U(u)),y=t.addDisposable(new a.U(v));return{setOptions({handleNotify:e,handleSuccess:t,handleError:n}){f.setListener(e),_.setListener(n),y.setListener(t)},instance:{notify(t){(0,r.RS)(e,c.Sb,{placement:"bottomRight",...m(t)})},handleNotify:d,handleError:u,handleSuccess:v}}}))},89949:(e,t,n)=>{n.d(t,{R:()=>a});var i=n(92810),s=n(45934),o=n(39990);const a=({onLoad:e,children:t})=>{(0,i.useEffect)((()=>{e&&e()}),[e]);const n=(0,s.wA)();return(0,i.useEffect)((()=>{n(o.Q2.endpoints.getMe.initiate({}))})),t}},55654:(e,t,n)=>{n.d(t,{HN:()=>d,IO:()=>o,P9:()=>a,lt:()=>m,pb:()=>c,sg:()=>l,vl:()=>u});var i=n(32269);class s extends i.jG{constructor(...e){super(...e),this._listeners=[],this.event=this._addListener.bind(this)}getListeners(e){return this._listeners.flatMap((([t])=>"function"===typeof t?t:t.getListeners(e)))}_addListener(e,t=0,n){if(!this.isDisposed()){const i=this._listeners;n&&"function"===typeof e&&(e=e.bind(n));const s=i.findIndex((([e,n])=>t<n)),o=[e,t];return i.splice(s>=0?s:i.length,0,o),{dispose(){const e=i.indexOf(o);e>=0&&i.splice(e,1)}}}}dispose(){this._listeners.splice(0,this._listeners.length),super.dispose()}}class o extends s{constructor(...e){super(...e),this.fire=this._fire.bind(this)}execute(e,t){for(const i of t)try{i(...e)}catch(n){console.log(n)}}_fire(...e){if(!this.isDisposed())return this.execute(e,this.getListeners(e))||void 0}}function a(e,t=0){const n=new s;return n.addDisposable(e(n,t)),n.event}class r extends s{constructor(e){super(),this._filter=e}getListeners(e){return this._filter(...e)?super.getListeners(e):[]}}function c(e,t,n=0){const i=new r(t);return i.addDisposable(e(i,n)),i.event}function l(e,t=0,n=0){const i=new o;let s,a=0;return i.addDisposable(e(((...e)=>{s=e,a||(a=setTimeout((()=>{i.fire(...s),a=0}),t))}),n)),i.event}class d extends o{constructor(...e){super(...e),this._suspendCounter=0,this._wasFired=!1}proccessResult(){}execute([e],t){if(this._suspendCounter)this._wasFired=!0;else for(const i of t)try{i(e)}catch(n){console.log(n)}}suspend(){this._suspendCounter++}resume(){0===--this._suspendCounter&&(this._wasFired&&this.fire(),this._wasFired=!1)}}class u extends o{execute([e],t){for(const i of t)try{i(e)}catch(n){console.log(n)}}}class m extends o{async execute([e],t){const n=[];for(const i of t){const t=await i(e);n.push(t)}return n}}},48802:(e,t,n)=>{n.d(t,{U:()=>o,m:()=>a});var i=n(32269),s=n(55654);class o extends i.jG{constructor(e){super(),this._event=e,this._listener=void 0,this._disposeEvent=void 0}setListener(e){this._listener!==e&&(this._listener=e,this._disposeEvent&&this._disposeEvent(),this._disposeEvent=e?this._event(e):void 0)}dispose(){this._disposeEvent&&this._disposeEvent(),super.dispose()}}function a(e,t,n){const i=(0,s.P9)(e);return(e,s,o)=>{const a=i((async i=>{const s=t?t(i):i;o&&e.bind(o);const a=await e(s);return n?n(a):a}),s,o);return()=>a.dispose()}}},13652:(e,t,n)=>{n.d(t,{y:()=>i});const i=e=>{let t={current:Promise.resolve(),state:e,decorate:(e,n)=>(n&&(e=e.bind(n)),function(...n){const i=t.current.then((()=>e(...n)));return t.current=i.then((e=>{t.state=e}),(e=>{console.log(e)})),i})};return t}},33481:(e,t,n)=>{n.d(t,{Ay:()=>_,Ir:()=>h,RP:()=>d,_R:()=>g,bn:()=>v,jY:()=>m,me:()=>f,p5:()=>u,s0:()=>c,zg:()=>l});var i=n(90536),s=n(31770);const o="configSlice",a=(0,s.ur)({config:{autosaveTimeout:1e4,theme:"",themes:{},mergeTags:void 0,styles:"",headerShow:!0,headerTitleVisible:!0,headerPreheaderVisible:!0,headerArrowBackVisible:!0,historyEnabled:!0,codeEnabled:!0,codeSideEnabled:!0,previewIconEnabled:!0,previewModeEnabled:!0,livePreviewEnabled:!0,sendTestEnabled:!0,sharePreviewEnabled:!0,emailDropdownMenuEnabled:!0,emailDropdownMenuClone:!0,emailDropdownMenuImport:!0,emailDropdownMenuLock:!0,emailDropdownMenuRemove:!0,emailExportEnabled:!0,nextButtonEnabled:!1,nextButtonText:"",saveButtonEnabled:!0,saveButtonText:"",commandButtonsEnabled:!0,emailIdShow:!1,sidePanelFloating:!0,desktopMobileSwitchRule:!0,desktopMobileSwitchPanel:!1,onlyCodeModeInMobile:!1,pathEnabled:!0,copyPasteEnabled:!0,saveBlockEnabled:!0,editImageControlEnabled:!0,menuDirection:"right",defaultBuildPanel:"",commentsEnabled:!0,optimizeEnabled:!0,settingsEnabled:!0,UTMEnabled:!0,subjectEnabled:!0,preheaderEnabled:!0,descriptionEnabled:!0,tagsEnabled:!0,switchDesktopMobilePropsEnabled:!0,stepToOtherElementEnabled:!0,deleteButtonEnabled:!0,toggleSidePanel:!0,formFieldImageTitleEnabled:!0,formFieldBorderEnabled:!0,formFieldBorderRadiusEnabled:!0,formFieldBoxShadowEnabled:!0,formFieldVisibilityEnabled:!0,formFieldExportAsPictureEnabled:!0,emailPaneDesktopSize:0,formButtonFieldInsertImageEnabled:!0,formButtonFieldVerticalAlignEnabled:!0,formButtonFieldTextAlignEnabled:!0,formButtonFieldBackgroundImageEnabled:!0,formButtonFieldPaddingsEnabled:!0,formCellFieldVerticalAlignEnabled:!0,formCellFieldBackgroundImageEnabled:!0,formCellFieldPaddingsEnabled:!0,formLinkFieldInsertImageEnabled:!0,formTableFieldBackgroundImageEnabled:!0,formDivFieldBackgroundImageEnabled:!0,formEmailFieldBackgroundImageEnabled:!0,elementImageEnabled:!0,elementTextEnabled:!0,elementHeaderEnabled:!0,elementButtonEnabled:!0,elementListULEnabled:!0,elementListOLEnabled:!0,elementDividerEnabled:!0,elementSpacerEnabled:!0,elementSocialEnabled:!0,elementTableEnabled:!0,elementCountdownEnabled:!0,elementVideoEnabled:!0,elementAIimageEnabled:!0,elementAItextEnabled:!0,elementCarouselEnabled:!0,elementFormEnabled:!0,preventSendDataToEM:!1,imageInfoToolUrl:"",imageCenterStockEnabled:!0,imageCenterGifEnabled:!0,imageCenterEditorEnabled:!0,compressMaxSize:.7,compressMaxWidthOrHeight:2e3,ampExportEnabled:!0,formFieldAmpVisibilityEnabled:!0,testEmails:[]},project:void 0,page:{isNew:!1,type:"email",project:0,id:""}}),r=(0,i.createSlice)({name:o,initialState:a,reducers:{setPage:(e,t)=>{e.page=t.payload},setConfig:(e,t)=>{e.config={...a.config,...t.payload}},setMergeTags:(e,t)=>{e.config.mergeTags=t.payload},updateConfig:(e,t)=>{e.config={...e.config,...t.payload}},setProject:(e,t)=>{e.project=t.payload}},extraReducers:e=>{}}),c=e=>e[o].page,l=e=>e[o].config,d=e=>e[o].config.themes,u=e=>e[o].config.styles,m=e=>e[o].project,{setPage:h,setConfig:p,updateConfig:g,setProject:v,setMergeTags:f}=r.actions,_=r},47358:(e,t,n)=>{n.d(t,{Ay:()=>L,B:()=>M,Bp:()=>C,CS:()=>A,Ct:()=>D,Fk:()=>g,Fv:()=>B,N6:()=>w,NQ:()=>O,Oo:()=>h,PM:()=>p,Tn:()=>R,Uf:()=>y,V$:()=>P,Wm:()=>T,cL:()=>j,mi:()=>v,qf:()=>m,sy:()=>I,vc:()=>f,vs:()=>_,wW:()=>b,wr:()=>E,yy:()=>k});var i=n(90536),s=n(85163),o=n(31770),a=n(87701);const r=window.localStorage.getItem(s.V0.em_code_mode_settings),c=r&&JSON.parse(r),l=(0,o.ur)({activeModal:"",lastActiveSettingsTab:s.Bv,activeSettingsTab:s.Bv,isPanelHistoryCollapsed:!0,monacoHeight:0,isCodeMode:(null===c||void 0===c?void 0:c.isCodeMode)||s.EW.isPlugin,codeModeDirection:(null===c||void 0===c?void 0:c.codeModeDirection)||"left",emailWidth:"100%",emailViewType:s.Vp,mobileViewActive:{shutdown:!0,styles:!0},emailMaxWidthSize:425,propertiesPanelKey:s.WU,parentBlocks:[]}),d="emailPageSlice",u=(0,i.createSlice)({name:d,initialState:l,reducers:{openModal:(e,t)=>{e.activeModal=t.payload},closeModal:e=>{e.activeModal=""},setActiveSettingsTab:(e,t)=>{e.activeSettingsTab=t.payload,t.payload!==s.yI&&t.payload!==s.Vv&&(e.lastActiveSettingsTab=t.payload),t.payload!==s.Vv&&(e.isPanelHistoryCollapsed=!0)},resetToLastActiveSettingsTab:e=>{e.activeSettingsTab=e.lastActiveSettingsTab,e.lastActiveSettingsTab!==s.Vv&&(e.isPanelHistoryCollapsed=!0)},switchIsPanelHistoryCollapsed:(e,t)=>{e.isPanelHistoryCollapsed=t.payload||!e.isPanelHistoryCollapsed,e.activeSettingsTab=e.lastActiveSettingsTab},setEmailWidth:(e,{payload:t})=>{e.emailWidth=t,e.emailViewType=t>e.emailMaxWidthSize||"100%"===t?s.Vp:s.ND,window.localStorage.setItem(s.V0.em_default_sizes,JSON.stringify(t))},setEmailMaxWidthSize:(e,{payload:t})=>{e.emailMaxWidthSize=t},setEmailViewType:(e,t)=>{e.emailViewType=t.payload},switchCodeMode:e=>{const t=!e.isCodeMode;e.isCodeMode=t,window.localStorage.setItem(s.V0.em_code_mode_settings,JSON.stringify({codeModeDirection:e.codeModeDirection,isCodeMode:t}))},setCodeMode:(e,t)=>{const n=t.payload;e.isCodeMode!==n&&(e.isCodeMode=n,window.localStorage.setItem(s.V0.em_code_mode_settings,JSON.stringify({codeModeDirection:e.codeModeDirection,isCodeMode:n})))},switchCodeModeDirection:(e,t)=>{e.codeModeDirection=t.payload,window.localStorage.setItem(s.V0.em_code_mode_settings,JSON.stringify({isCodeMode:e.isCodeMode,codeModeDirection:t.payload}))},setMobileViewActive:(e,t)=>{e.mobileViewActive=t.payload},setPropertiesPanelKey:(e,t)=>{e.propertiesPanelKey=t.payload},resetParentBlocks:e=>{e.parentBlocks=[]},setParentBlocks:(e,t)=>{e.parentBlocks=t.payload}},extraReducers:e=>{e.addMatcher(a.VM.endpoints.getParentEmailBlocks.matchFulfilled,((e,t)=>{e.parentBlocks=t.payload}))}}),{openModal:m,closeModal:h,setActiveSettingsTab:p,resetToLastActiveSettingsTab:g,switchIsPanelHistoryCollapsed:v,setEmailWidth:f,switchCodeMode:_,switchCodeModeDirection:y,setMobileViewActive:b,setEmailViewType:E,setCodeMode:w,setEmailMaxWidthSize:S,setPropertiesPanelKey:C,resetParentBlocks:I}=u.actions,j=e=>e[d].activeModal,M=e=>e[d].activeSettingsTab,T=e=>e[d].isPanelHistoryCollapsed,O=e=>e[d].emailWidth,D=e=>e[d].emailViewType,A=e=>e[d].mobileViewActive,k=e=>e[d].codeModeDirection,B=e=>e[d].isCodeMode,R=e=>e[d].propertiesPanelKey,P=e=>e[d].parentBlocks,L=u},86286:(e,t,n)=>{n.d(t,{Ay:()=>b,B:()=>v,C1:()=>f,Yl:()=>m,gV:()=>g,hZ:()=>y,ko:()=>h,ku:()=>u,ww:()=>l,yf:()=>_});var i=n(90536),s=n(39990),o=n(85163),a=n(32269);const r=(0,n(31770).ur)({currentUser:{},currentSchema:{},monacoOptions:o.rW,monacoDidMount:!1}),c="userSlice",l=(0,i.createAsyncThunk)("user/setMonacoOptions",(async(e,{getState:t})=>{const n=t()[c],i="string"===typeof e.font_family?`${e.font_family}, sans-serif`:void 0,s=void 0!==e.word_wrap?e.word_wrap?"on":"off":void 0;return i&&n.monacoOptions.fontFamily!==i&&await(0,a.iV)(e.font_family),{tabSize:e.tab_size,fontFamily:i,fontSize:e.font_size,wordWrap:s,insertSpaces:e.insert_spaces,minimap:{enabled:e.minimap}}})),d=(0,i.createSlice)({name:c,initialState:r,reducers:{setMonacoDidMount:(e,{payload:t})=>{e.monacoDidMount=t},setTheme:(e,{payload:t})=>{e.currentUser.theme=t},setUserLocale:(e,{payload:t})=>{e.currentUser.locale=t},setUserAutosaves:(e,{payload:t})=>{e.currentUser.autosaves=t},setUser:(e,{payload:t})=>{e.currentUser={...e.currentUser,...t}}},extraReducers:e=>{e.addCase(l.fulfilled,((e,t)=>{const n=t.payload;e.monacoOptions=(0,a.i0)({...e.monacoOptions},n)})),e.addMatcher(s.Q2.endpoints.editMe.matchFulfilled,((e,t)=>{e.currentUser=t.payload})),e.addMatcher(s.Q2.endpoints.getMe.matchFulfilled,((e,t)=>{e.currentUser=t.payload})),e.addMatcher(s.Q2.endpoints.getSchema.matchFulfilled,((e,t)=>{e.currentSchema=t.payload.schema}))}}),{setMonacoDidMount:u,setTheme:m,setUserLocale:h,setUserAutosaves:p,setUser:g}=d.actions,v=e=>{var t;return null===(t=e[c].currentUser)||void 0===t?void 0:t.locale},f=e=>e[c].currentUser,_=e=>e[c].currentSchema,y=e=>e[c].monacoOptions,b=d},57964:()=>{}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var e={44141:(e,t,r)=>{r.d(t,{KU:()=>s,Pz:()=>l,hI:()=>u,u$:()=>d});var n=r(93278),a=r(33288),c=r(39217),o=r(67421);const l=a.di.createIdentifier("client"),i=a.di.createIdentifier("ai_client"),s=e=>a.di.getInstance(e,l),d=e=>a.di.getOrCreateInstance(e,i,(()=>new o.LA({baseUrl:"https://ai-mail.emcdn.ru"})));function u(e){return(t,r,o)=>{const l=a.di.getInstance(r,c.no);return(0,n.fetchBaseQuery)({...e,fetchFn:(null===l||void 0===l?void 0:l.execute)||fetch})(t,r,o)}}},90070:(e,t,r)=>{r.d(t,{p6:()=>c});var n=r(33288);const a=n.di.createIdentifier(),c=()=>n.di.useInstance(a)},23580:(e,t,r)=>{r.d(t,{A$:()=>b,Ff:()=>s,IP:()=>i,My:()=>d,Nj:()=>f,lg:()=>u,rl:()=>p});var n=r(92810),a=r(45934),c=r(82375),o=r(41664);const l="INJECTION",i=l,s=(e,t)=>{if(!e){const e=c.Q.createChild(),t=(0,o.Q)();return c.Q.inject(t,e),t}return e};function d(e){const t=e.getState()[l];return t&&c.Q.getInstance(t)}function u(){const e=d((0,a.Pj)());return function(t,r){e.inject(t,r)}}function f(e){return d((0,a.Pj)()).getInstance(e)}function p(e){const[t,r]=(0,n.useState)(),c=(0,a.Pj)(),o=(0,n.useRef)(Promise.resolve()),l=d(c);return(0,n.useEffect)((()=>{const t=o.current=o.current.then((()=>l.getInstanceAsync(e))).then((e=>{t===o.current&&r(e)}),(e=>console.log(e)))}),[r,e,c,l]),t}function b(e){return d((0,a.Pj)()).getServices(e)}},58689:(e,t,r)=>{r.d(t,{$l:()=>h,Ay:()=>y,EB:()=>_,Mp:()=>$,PJ:()=>x,SR:()=>N,T5:()=>k,bc:()=>P,gZ:()=>C,pH:()=>b,qy:()=>j});var n=r(38738),a=r.n(n),c=r(60564),o=r.n(c),l=r(44335),i=r(45053),s=r(90854),d=r(84007),u=r(71210);const f=/url(?:\((['|"]?))(.*?\.(png|jpg|gif|jpeg|tiff){1})(?:['|"]?\))/gi,p="data:message/rfc822 eml,";async function b(e,t,r,n,a){var c={Subject:e,"X-Unsent":1,"Content-Type":"function"===typeof a?"text/html;charset=utf-8":'multipart/alternative; boundary="boundary-string"'};return`${Object.keys(c).reduce(((e,t)=>`${e}${t}:${c[t]}\n`),p)}\n${"function"===typeof a?await S(t,r,n,a):(await Promise.all(Object.keys(a).map((async e=>`\n--boundary-string\nContent-Type: ${e}\n\n${await S(t,r,n,a[e])}\n\n\n`)))).join("")+"----boundary_string--"}`}function h(e){const t=e.replace("\\","/").split("/");return t[t.length-1]}function y(e){return h(e).split(".")}function m(e){return N(e).then((e=>C(e)))}function g(e,t){const r=document.createElement("iframe");r.style.position="absolute",r.style.left="-10000px",document.body.appendChild(r);const n=r.contentWindow.document;try{if(t){const[e,n]=t;void 0!==e&&r.setAttribute("width",String(e)),void 0!==n&&r.setAttribute("height",String(n))}const a=(0,d.$$)(e);(0,s.d1)(n,a)}catch(a){console.log(a)}return[r,()=>document.body.removeChild(r)]}function v(e){return e.replace("<script","<___script").replace("<\/script>","</___script>")}const A=new i.uI((e=>{e.escape("<script","<\/script>",(e=>v(e))).unescape("<___script","</___script>",(e=>e.replace("<___script","<script").replace("</___script>","<\/script>"))),e.escape("<script","/>",(e=>v(e))).unescape("<___script","/>",(e=>e.replace("<___script","<script"))),(0,i.Hk)(e)}));async function w(e,t,r){e=A.getEscapedText(e);const[n,a]=g(e,r);try{const r=n.contentDocument;await t(r,e);const a=r.querySelectorAll("tbody");for(const e of a)e.replaceWith(...e.childNodes);r.querySelectorAll("em-replace").forEach((e=>{if(e.hasAttribute("text")&&(e.insertAdjacentHTML("beforebegin",e.getAttribute("text")),e.parentNode.removeChild(e)),e.hasAttribute("src")){const t=e.querySelector("img");t.setAttribute("src",e.getAttribute("src")),e.replaceWith(t)}})),e=(0,s.b6)(r)}catch(c){}finally{a()}return A.getUnescapedText(e)}async function P(e,t,r,n){const a=new Map;return e=await w(e,((e,n)=>{const c=e=>{let r=a.get(e);return r||(r=t(e),a.set(e,r)),r};function o(e){return function(e,t,r){try{if("function"===typeof r){var n=[];return String.prototype.replace.call(e,t,(function(){return n.push(r.apply(void 0,arguments)),""})),Promise.all(n).then((function(r){return String.prototype.replace.call(e,t,(function(){return r.shift()}))}))}return Promise.resolve(String.prototype.replace.call(e,t,r))}catch(a){return Promise.reject(a)}}(e,f,((e,t="",r)=>c(r).then((e=>`url(${t}${e}${t})`))))}async function l(e){const t=e.getAttribute("style");if(t){const r=await o(t);t!==r&&e.setAttribute("style",r)}}const i=e.querySelectorAll("*"),d=[];for(const t of i)if((0,s.vq)(t)){if(d.push(l(t)),(0,s.A6)(t)){const e=t.getAttribute("src");e&&d.push(c(e).then((e=>t.src=e)))}if((0,s.ST)(t)){const e=t.sheet.cssRules,r=[];for(const t of e){const{cssText:e}=t;e&&r.push(o(e))}d.push(Promise.all(r).then((r=>{r.some(((t,r)=>e[r].cssText!==t))&&(t.innerHTML=r.join("\n"))})))}}let u=Promise.all(d);return r&&(u=u.then((()=>r(e,n)))),u}),n),e}const j=800;function O(e,t){let r=e.getAttribute("href");if(r&&e.protocol.startsWith("http")){const n=function(e){const t=new Map;let r=0;for(;r>=0;)if(r=e.indexOf("\x3c!--",r),r>=0){const n=e.indexOf("--\x3e",r);t.set(e.substring(r,n+3),(0,u.l)()),r=n}return t}(r);n.forEach(((e,t)=>{r=r.replaceAll(t,e)}));const a=r.indexOf("#");let c=a>=0?r.substring(0,a):r,o=a>=0?r.substring(a+1):"";const l=r.indexOf("?"),i=l>=0?c.substring(l+1):"";if(c=l>=0?c.substring(0,l):c,e.host!==document.location.host){const a=new Map(i.split("&").filter((e=>e.indexOf("=")>=0)).map((e=>e.split("=")))),l=Object.keys(t);let s=i;for(const e of l)t[e]&&!a.has(e)&&(s=s+(s?"&":"")+`${e}=${t[e]}`);s!==i&&(r=c+(s?`?${s}`:"")+(o?`#${o}`:""),n.forEach(((e,t)=>{r=r.replaceAll(e,t)})),e.setAttribute("href",r))}}}async function x(e,t,r,n){let[a,c]=t||[j];return"number"===typeof a&&(a+="px"),"number"===typeof c&&(c+="px"),e=await w(e,(t=>{const a=t.querySelectorAll("a");for(const e of a)O(e,r);if(n)return n(t,e)}),[a,c])}async function S(e,t,r,n){let[a,c]=t||[j];return"number"===typeof a&&(a+="px"),"number"===typeof c&&(c+="px"),e=(e=await w(e,(async t=>{const a=t.querySelectorAll("*");for(const e of a)if((0,s.A6)(e)){const t=await(0,s.rq)(e);if(t){const r=parseInt(t.height),n=parseInt(t.width);isNaN(r)||e.setAttribute("height",String(r)),isNaN(n)||e.getAttribute("width")||e.setAttribute("width",String(n))}}else if((0,s.Lv)(e)){const t=parseInt(getComputedStyle(e).width);isNaN(t)||"BODY"===e.parentElement.tagName||e.setAttribute("width",String(t))}else"TD"===e.tagName||"A"===e.tagName&&O(e,r);if(n)return n(t,e)}),[a,c])).replaceAll(/<tbody>/gi,"").replaceAll(/<\/tbody>/gi,"")}function _(e,t){const{width:r,height:n}=e;var c={orientation:"p",unit:"pt",format:[r*t,n*t]},o=new(a())(c);return o.addImage(e,"JPEG",0,0,r*t,n*t,void 0,"NONE"),o}const E="images";async function $(e,t,r,n=m,a){let[c,i]=t||[j];"number"===typeof c&&(c+="px"),"number"===typeof i&&(i+="px");const s=new(o()),d=s.folder(E),u=new Set,f=await P(e,(async e=>{const t=await n(e);let[r,a=l.getExtension(t.type)]=y(e),c=`${r}.${a}`,o=1;for(;u.has(c);)c=`${r}(${++o}).${a}`;return u.add(c),d.file(c,t),`${E}/${c}`}),((e,t)=>{const n=e.querySelectorAll("a");for(const a of n)O(a,r);if(a)return a(e,t)}),[c,i]);return s.file("index.html",new Blob([f],{type:"text/html;charset=utf-8"})),s.generateAsync({type:"blob"})}function N(e){const t=new Image;return t.crossOrigin="anonymous",new Promise(((r,n)=>{t.onload=()=>r(t),t.onerror=n,t.src=e}))}function C(e,t="image/png",r){const n=document.createElement("canvas");n.width=e.width,n.height=e.height;return n.getContext("2d").drawImage(e,0,0),new Promise(((e,a)=>n.toBlob((t=>t?e(t):a("blob is null")),t,r)))}function T(e){var t;const r=null===(t=e.ownerDocument)||void 0===t?void 0:t.body;if(r&&function(e,t){do{if(e===t)return!0;e=e.parentNode}while(e);return!1}(e,r)){if((0,s.vq)(e)){if("IMG"===e.tagName)return"";if("SPAN"===e.tagName&&e.classList.contains("preheader"))return""}if("#text"===e.nodeName)return e.textContent}return e.childNodes?[...e.childNodes].map(T).join(""):""}function k(e){const[t,r]=g(e);try{return T(t.contentDocument.body).replace(/\u2800/g,"").replace(/(\r\n|\r|\n){2,}/g,"\n").trim()}finally{r()}}},39217:(e,t,r)=>{r.d(t,{CJ:()=>f,eT:()=>l,jY:()=>d,mg:()=>s,no:()=>u,qT:()=>c});var n=r(14315),a=(r(44141),r(33288));function c(e){for(;e.endsWith("/");)e=e.slice(0,e.length-1);return`${e}/wp-json`}const o={baseUrl:"https://app.emailmaker.ru/api//wp-json",baseApiParams:{secure:!0,credentials:"same-origin",format:"json"},securityWorker:()=>({credentials:"same-origin"})};o.baseUrl=c("https://app.emailmaker.ru/api/");const l=a.di.createIdentifier();function i(e){return a.di.getOrCreateInstance(e,l,(()=>function(e=o){const t=new Map;return{create(r){const a=new n.RQ({...e,...r});return t.set(a,r),a},getOptions:()=>e,setOptions(r){e=r;for(const[n,a]of t)Object.assign(n,{...e,...a})}}}()))}function s(e,t={}){return i(e).create(t)}const d=a.di.createIdentifier(),u=(a.di.createIdentifier(),a.di.createIdentifier());let f;!function(e){const t="https://racs.rest/v3";e.post=function(e,r){const n={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(r)};return fetch(`${t}?resource=${e}&dataset=${document.location.hostname}`,n)},e.getAll=async function(e,r=0){const n={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:`{"filter":{},"limit":${r}}`},a=await fetch(`${t}/get?resource=${e}&dataset=${document.location.hostname}`,n);return await a.json()}}(f||(f={}))},15230:(e,t,r)=>{r.d(t,{Cd:()=>l,Lz:()=>o,ax:()=>i,f5:()=>a,sZ:()=>c});var n=r(41664);const a="Not implemented in plugin",c=(0,n.Q)(),o=(0,n.Q)(),l=(0,n.Q)(),i=(0,n.Q)();(0,n.Q)(),(0,n.Q)()},19504:(e,t,r)=>{r(39217),r(90070);var n=r(40342),a=r(39990),c=r(83351),o=r(1779),l=r(141),i=r(65119),s=r(84568),d=r(93563),u=r(17581),f=r(21981),p=r(63531),b=r(53200),h=r(47036),y=r(40869),m=r(56920),g=r(76793),v=r(843),A=r(35317),w=r(62677),P=r(64936),j=r(94925),O=r(34524),x=r(65983),S=r(47358),_=r(7760),E=r(8493),$=r(87790),N=r(86286),C=r(53204),T=r(39738),k=r(87701),I=r(26174),M=r(94381),q=r(18777),L=r(62689),Q=r(46312),D=r(84612),H=r(58819),U=r(15865),Z=r(95679),B=r(88528),F=r(77532),J=r(36404),R=r(33481),W=r(33288);r(23580);(0,n.HY)({[W.di.reducerPath]:W.di.reducer,[Q.Z8.reducerPath]:Q.Z8.reducer,[M.Ad.reducerPath]:M.Ad.reducer,[a.Q2.reducerPath]:a.Q2.reducer,[o.S.reducerPath]:o.S.reducer,[l.k.reducerPath]:l.k.reducer,[c.OV.reducerPath]:c.OV.reducer,[i.yR.reducerPath]:i.yR.reducer,[s.Nq.reducerPath]:s.Nq.reducer,[d.kE.reducerPath]:d.kE.reducer,[u.GY.reducerPath]:u.GY.reducer,[k.VM.reducerPath]:k.VM.reducer,[f.m4.reducerPath]:f.m4.reducer,[p.yH.reducerPath]:p.yH.reducer,[b.B.reducerPath]:b.B.reducer,[h.f.reducerPath]:h.f.reducer,[q.Jg.reducerPath]:q.Jg.reducer,[Z.CL.reducerPath]:Z.CL.reducer,[B.tO.reducerPath]:B.tO.reducer,[L.vx.reducerPath]:L.vx.reducer,[y.M.reducerPath]:y.M.reducer,[m.F.reducerPath]:m.F.reducer,[g.KA.reducerPath]:g.KA.reducer,[v.Sd.reducerPath]:v.Sd.reducer,[A.y.reducerPath]:A.y.reducer,[P.Ay.name]:P.Ay.reducer,[j.Ay.name]:j.Ay.reducer,[O.Ay.name]:O.Ay.reducer,[x.Ay.name]:x.Ay.reducer,[S.Ay.name]:S.Ay.reducer,[_.Ay.name]:_.Ay.reducer,[E.Ay.name]:E.Ay.reducer,[$.Ay.name]:$.Ay.reducer,[N.Ay.name]:N.Ay.reducer,[C.Ay.name]:C.Ay.reducer,[I.Ay.name]:I.Ay.reducer,[F.Ay.name]:F.Ay.reducer,[T.Ay.name]:T.Ay.reducer,[D.Zs.reducerPath]:D.Zs.reducer,[H.Uu.reducerPath]:H.Uu.reducer,[J.Ay.name]:J.Ay.reducer,[U.So.reducerPath]:U.So.reducer,[R.Ay.name]:R.Ay.reducer,[w.C.reducerPath]:w.C.reducer}),a.Q2,c.OV,o.S,l.k,i.yR,s.Nq,d.kE,u.GY,f.m4,b.B,k.VM,h.f,M.Ad,q.Jg,y.M,m.F,g.KA,v.Sd,A.y,Z.CL,B.tO,L.vx,Q.Z8,p.yH,D.Zs,H.Uu,U.So,w.C;var Y=r(15230),G=r(14386),V=r(8671),K=r(55853),z=r(19209),X=r(33746),ee=r(56507),te=r(62410),re=r(63772),ne=(r(57650),r(57964),r(26254)),ae=r(89949),ce=r(92810),oe=r(97716),le=r(45934),ie=r(64617),se=r(82212),de=r(32269),ue=r(893),fe=r(17126),pe=r(70082);const be=(0,G.l)((e=>{let t=null;const r=W.di.getInstance(e,Y.Lz);let n;return{instance:{getElement:()=>t},async setOptions(a){let c=await function(e,t){return"undefined"!==typeof e&&"string"===typeof e?(e=document.querySelector(e))||new Promise(((r,n)=>{const a=new MutationObserver((()=>{(e=document.querySelector(e))&&(t.dispose(),r(e))}));a.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),t.addDisposable({dispose:()=>a.disconnect()})})):e}(a.element,r);const{instance:o}=W.di.getInstance(e,Y.Cd)||{};if(t!==c){if(t&&he.delete(t),!(c&&he.has(c)&&o)){if(n&&n.dispose(),t=c,n=r.addDisposable(new de.jG),c)he.set(c,o);else{const e=document.createElement("div");e.style.position="absolute",e.style.left="-10000px",document.body.appendChild(e);const t=()=>{e.isConnected&&document.body.removeChild(e)};n.addDispose(t),c=e}return(t=>new Promise(((r,a)=>{var c;if(null!==(c=n)&&void 0!==c&&c.isDisposed())r();else{const a=(0,oe.H)(t);a.render((0,pe.jsx)(ce.StrictMode,{children:(0,pe.jsx)(le.Kq,{store:e,children:(0,pe.jsx)(ae.R,{onLoad:r,children:(0,pe.jsx)(fe.or.Provider,{value:{element:t},children:(0,pe.jsx)(ie.fS,{children:(0,pe.jsx)(se.Y,{children:(0,pe.jsx)(ue.m,{children:(0,pe.jsx)(ne.A,{})})})})})})})})),n.addDispose(r),n.addDispose((()=>a.unmount()))}})))(c)}console.log("multiple init call on single HTMLELEMENT")}},dispose(){var e;null===(e=n)||void 0===e||e.dispose()}}}));const he=new Map;var ye=r(91514),me=r(1281);r(85163).EW.isPlugin=!0;(0,G.E)([V.e,K.E,z.F,ye.h,X.F,me.Z,ee.i,te.r,re.Z,be]);r(58689),r(85974)}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var c=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(c.exports,c,c.exports,r),c.loaded=!0,c.exports}r.m=e,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},(()=>{var e=[];r.O=(t,n,a,c)=>{if(!n){var o=1/0;for(d=0;d<e.length;d++){for(var[n,a,c]=e[d],l=!0,i=0;i<n.length;i++)(!1&c||o>=c)&&Object.keys(r.O).every((e=>r.O[e](n[i])))?n.splice(i--,1):(l=!1,c<o&&(o=c));if(l){e.splice(d--,1);var s=a();void 0!==s&&(t=s)}}return t}c=c||0;for(var d=e.length;d>0&&e[d-1][2]>c;d--)e[d]=e[d-1];e[d]=[n,a,c]}})(),r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(n,a){if(1&a&&(n=this(n)),8&a)return n;if("object"===typeof n&&n){if(4&a&&n.__esModule)return n;if(16&a&&"function"===typeof n.then)return n}var c=Object.create(null);r.r(c);var o={};e=e||[null,t({}),t([]),t(t)];for(var l=2&a&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((e=>o[e]=()=>n[e]));return o.default=()=>n,r.d(c,o),c}})(),r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"static/js/"+({302:"/ant-locale/locale1",732:"/ant-locale/locale16",735:"/ant-locale/locale46",805:"/ant-locale/locale53",881:"/ant-locale/locale13",1279:"/ant-locale/locale8",1290:"/ant-locale/locale5",1401:"/ant-locale/locale26",1712:"/ant-locale/locale41",1723:"/ant-locale/locale42",1782:"/ant-locale/locale58",1788:"/ant-locale/locale38",1793:"/ant-locale/locale57",2104:"/ant-locale/locale70",2169:"/ant-locale/locale35",2180:"/ant-locale/locale30",2466:"/mergeTags/locale0",3157:"/ant-locale/locale66",3222:"/ant-locale/locale21",3541:"/ant-locale/locale17",3544:"/ant-locale/locale49",3614:"/ant-locale/locale50",3690:"/ant-locale/locale10",4145:"/ant-locale/locale62",4210:"/ant-locale/locale25",4221:"/ant-locale/locale22",4286:"/ant-locale/locale14",4521:"/ant-locale/locale40",4532:"/ant-locale/locale45",4591:"/ant-locale/locale59",4597:"/ant-locale/locale39",4602:"/ant-locale/locale54",4684:"/ant-locale/locale3",4695:"/ant-locale/locale0",4913:"/ant-locale/locale71",4989:"/ant-locale/locale31",5122:"/ant-locale/locale69",5187:"/ant-locale/locale55",5506:"/ant-locale/locale18",5523:"/ant-locale/locale4",5574:"/ant-locale/locale32",5672:"/ant-locale/locale7",5955:"/ant-locale/locale60",5966:"/ant-locale/locale65",6031:"/ant-locale/locale20",6353:"/ant-locale/locale48",6562:"/ant-locale/locale36",6859:"/mergeTags/locale1",6954:"/ant-locale/locale61",7008:"/ant-locale/locale27",7019:"/ant-locale/locale24",7095:"/ant-locale/locale15",7330:"/ant-locale/locale43",7341:"/ant-locale/locale44",7493:"/ant-locale/locale2",7923:"/ant-locale/locale11",7926:"/ant-locale/locale47",7931:"/ant-locale/locale68",7996:"/ant-locale/locale52",8007:"/ant-locale/locale51",8315:"/ant-locale/locale19",8383:"/ant-locale/locale33",8470:"/ant-locale/locale9",8775:"/ant-locale/locale64",8984:"/ant-locale/locale56",9360:"/ant-locale/locale34",9371:"/ant-locale/locale37",9447:"/ant-locale/locale28",9752:"/ant-locale/locale63",9828:"/ant-locale/locale23"}[e]||e)+"."+{51:"0157cb43",119:"9a0f51df",127:"9f5a0761",227:"5fd33eeb",302:"5b1308da",393:"2f571faf",451:"d254d20c",577:"ca8a62c4",721:"4c6f728a",732:"49bc0148",735:"8f49c2cd",805:"cea142dd",851:"23920710",881:"9bcbe954",883:"616a487d",1101:"c32ce4f7",1271:"d2ba7d58",1279:"134136c4",1283:"b7058deb",1290:"b2b61134",1401:"b7e751bd",1619:"bb9c2d4f",1663:"cd15901b",1712:"4dee0621",1723:"7061d0fc",1729:"b71e4a99",1782:"d003f49e",1788:"dfa6d712",1793:"e685764a",1818:"053eb89f",1821:"a8efb62e",2029:"041a1c1a",2104:"964bc038",2169:"d58b9c31",2179:"73130a54",2180:"4d3672db",2466:"23c595c1",2475:"c86d0c20",2547:"9cdcf5fd",2581:"4558746b",2675:"dbe09fe1",2851:"fea52359",2935:"c0d4b469",2951:"3f25f72c",3068:"591718b0",3157:"94ea41f2",3222:"7764c4b3",3299:"983ba49b",3447:"2a559817",3541:"2daaf9a6",3544:"c67382b7",3555:"3ae2b597",3614:"6520fd45",3683:"9414adf5",3690:"f74ae841",3763:"5f775790",3960:"89f3c9f4",4001:"0602b191",4047:"25747214",4145:"b21e6edb",4159:"cd6afba9",4210:"7658de4e",4221:"5cbb9959",4286:"138842ea",4299:"440bc3d2",4325:"e27cebb3",4417:"4b3f75b4",4521:"fe7ab935",4532:"a7f6f97e",4591:"556522b5",4597:"31c90381",4602:"16ef125d",4627:"cedc745b",4684:"48f0afe7",4695:"fdb32a9f",4867:"ae5eb9c0",4913:"99926e0d",4989:"406215d5",5122:"27295717",5187:"b1a653c1",5243:"c58a8a21",5315:"1a03f762",5339:"df02c3e0",5445:"7db0b349",5475:"dc9057be",5491:"d8b1b7b0",5506:"f9e62843",5523:"e6fdd0ee",5574:"6167b5e8",5672:"1509b3e0",5853:"ce87dead",5923:"e8e7b96d",5955:"bf3ddb83",5966:"58003560",6021:"7f32cea2",6031:"b5cb6b02",6051:"6cefb17a",6075:"38c621ae",6083:"0ef791dc",6161:"6a73be6e",6275:"19545c93",6353:"bfb8c2b3",6547:"377fc02b",6562:"34d5c9ee",6643:"1eb62a36",6691:"1ee2f23b",6701:"8bd3807d",6739:"22d13837",6859:"3448e6cb",6915:"e4ede32f",6954:"30fe9720",7008:"a47676d9",7019:"3c622cfa",7051:"c0c7cf26",7059:"9c893bc0",7095:"e80eb12a",7187:"7e67eebe",7330:"b3c810a8",7341:"df0a5a76",7493:"b54c0d79",7635:"9d5d1322",7779:"0d221377",7795:"c0e8c528",7824:"e0daa1f7",7923:"cf703a34",7926:"b84733ce",7931:"8a9f32b5",7963:"a4acc856",7996:"11d21631",8003:"a4a62303",8007:"9b89fb56",8015:"b608b9db",8315:"c98c053a",8319:"7ea4b259",8383:"4be05b3c",8470:"9b87d751",8679:"f65e4d91",8775:"fdae6858",8779:"f6f8b6f7",8881:"ce638df9",8911:"8253711c",8984:"83c76bd5",9005:"62fb383a",9267:"67d8f2bb",9360:"3813ab2f",9371:"1c16e25b",9447:"c89eee28",9603:"4321e1c5",9752:"8e66417e",9763:"2e0a4d2d",9828:"2342f692",9898:"93cc5558",9935:"52cd750c"}[e]+".chunk.js",r.miniCssF=e=>{},r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="email-maker:";r.l=(n,a,c,o)=>{if(e[n])e[n].push(a);else{var l,i;if(void 0!==c)for(var s=document.getElementsByTagName("script"),d=0;d<s.length;d++){var u=s[d];if(u.getAttribute("src")==n||u.getAttribute("data-webpack")==t+c){l=u;break}}l||(i=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,r.nc&&l.setAttribute("nonce",r.nc),l.setAttribute("data-webpack",t+c),l.src=n),e[n]=[a];var f=(t,r)=>{l.onerror=l.onload=null,clearTimeout(p);var a=e[n];if(delete e[n],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach((e=>e(r))),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=f.bind(null,l.onerror),l.onload=f.bind(null,l.onload),i&&document.head.appendChild(l)}}})(),r.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",(()=>{var e={6835:0,984:0,3215:0};r.f.j=(t,n)=>{var a=r.o(e,t)?e[t]:void 0;if(0!==a)if(a)n.push(a[2]);else if(/^(3215|984)$/.test(t))e[t]=0;else{var c=new Promise(((r,n)=>a=e[t]=[r,n]));n.push(a[2]=c);var o=r.p+r.u(t),l=new Error;r.l(o,(n=>{if(r.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var c=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+c+": "+o+")",l.name="ChunkLoadError",l.type=c,l.request=o,a[1](l)}}),"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,n)=>{var a,c,[o,l,i]=n,s=0;if(o.some((t=>0!==e[t]))){for(a in l)r.o(l,a)&&(r.m[a]=l[a]);if(i)var d=i(r)}for(t&&t(n);s<o.length;s++)c=o[s],r.o(e,c)&&e[c]&&e[c][0](),e[c]=0;return r.O(d)},n=globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.nc=void 0;var n=r.O(void 0,[4384,3142,6133,984,3991,4231,8345,1212,823,1403,197,5873,9878,7698,6154,8740,3303,6242,3682,1307,5957,2016,9328,8879,8738,2896,8236,8671,353,8075,5796,4498,3704,3215,3041,8309,9061,3651,6091,7018,5497,687,1028,9653,4122,9101,1197,9055,8694,9796,4845,4805,8030,7533,6300,5319,2225,5916,3768,1366,8696,1667,3148,222,1472,4087,2835,2642,3144,2256,5571,2627,1399,9907,698,1431,5632,8786],(()=>r(19504)));n=r.O(n)})();
|
package/translations.pot
CHANGED
|
@@ -694,7 +694,7 @@ msgstr ""
|
|
|
694
694
|
|
|
695
695
|
#: src/modules/components/AddNewBlockModal/AddNewBlockModal.jsx:201
|
|
696
696
|
#: src/modules/components/AddNewProjectModal/AddNewProjectModal.jsx:76
|
|
697
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
697
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:530
|
|
698
698
|
msgid "” was successfully created."
|
|
699
699
|
msgstr ""
|
|
700
700
|
|
|
@@ -1177,7 +1177,7 @@ msgstr ""
|
|
|
1177
1177
|
#: src/modules/components/BlockPageHeader/BlockPageHeader.jsx:104
|
|
1178
1178
|
#: src/modules/components/BlocksSearch/BlocksSearch.jsx:550
|
|
1179
1179
|
#: src/modules/components/BlocksTable/BlocksTable.jsx:293
|
|
1180
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1180
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:565
|
|
1181
1181
|
#: src/modules/components/Discuss/Discuss.jsx:548
|
|
1182
1182
|
#: src/modules/components/EmailsTable/EmailsTable.jsx:325
|
|
1183
1183
|
#: src/modules/components/Folders/Folders.jsx:109
|
|
@@ -1188,7 +1188,7 @@ msgstr ""
|
|
|
1188
1188
|
#: src/modules/components/BlockPageHeader/BlockPageHeader.jsx:105
|
|
1189
1189
|
#: src/modules/components/BlocksSearch/BlocksSearch.jsx:551
|
|
1190
1190
|
#: src/modules/components/BlocksTable/BlocksTable.jsx:294
|
|
1191
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1191
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:566
|
|
1192
1192
|
#: src/modules/components/Discuss/Discuss.jsx:549
|
|
1193
1193
|
#: src/modules/components/EmailsTable/EmailsTable.jsx:326
|
|
1194
1194
|
#: src/modules/components/Folders/Folders.jsx:110
|
|
@@ -1211,7 +1211,7 @@ msgstr ""
|
|
|
1211
1211
|
|
|
1212
1212
|
#: src/modules/components/BlockPageHeader/BlockPageHeader.jsx:205
|
|
1213
1213
|
#: src/modules/components/BlocksTable/BlocksTable.jsx:517
|
|
1214
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1214
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:684
|
|
1215
1215
|
#: src/modules/components/ElementCard/ElementCard.jsx:128
|
|
1216
1216
|
#: src/modules/components/EmailsTable/EmailsTable.jsx:555
|
|
1217
1217
|
msgid "Clone"
|
|
@@ -1219,7 +1219,7 @@ msgstr ""
|
|
|
1219
1219
|
|
|
1220
1220
|
#: src/modules/components/BlockPageHeader/BlockPageHeader.jsx:225
|
|
1221
1221
|
#: src/modules/components/BlocksTable/BlocksTable.jsx:537
|
|
1222
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1222
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:721
|
|
1223
1223
|
#: src/modules/components/ElementCard/ElementCard.jsx:149
|
|
1224
1224
|
#: src/modules/components/EmailsTable/EmailsTable.jsx:575
|
|
1225
1225
|
#: src/modules/components/Folders/Folders.jsx:129
|
|
@@ -1330,88 +1330,88 @@ msgstr ""
|
|
|
1330
1330
|
msgid "Add your first block by clicking the Create a new block button."
|
|
1331
1331
|
msgstr ""
|
|
1332
1332
|
|
|
1333
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1333
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:105
|
|
1334
1334
|
#: src/modules/components/EmailsTable/EmailsTable.jsx:353
|
|
1335
1335
|
#: src/modules/components/ProjectPage/ProjectPage.jsx:272
|
|
1336
1336
|
#: src/modules/components/SendTestEmailModal/SendTestEmailModal.jsx:255
|
|
1337
1337
|
msgid "The email “"
|
|
1338
1338
|
msgstr ""
|
|
1339
1339
|
|
|
1340
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1340
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:121
|
|
1341
1341
|
#: src/modules/components/EmailPageHeader/EmailPageHeader.jsx:193
|
|
1342
1342
|
#: src/modules/components/PreviewMode/PreviewMode.jsx:435
|
|
1343
1343
|
msgid "New email title"
|
|
1344
1344
|
msgstr ""
|
|
1345
1345
|
|
|
1346
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1346
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:355
|
|
1347
1347
|
msgid "The email has been copied to the clipboard."
|
|
1348
1348
|
msgstr ""
|
|
1349
1349
|
|
|
1350
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1350
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:389
|
|
1351
1351
|
msgid "Success!"
|
|
1352
1352
|
msgstr ""
|
|
1353
1353
|
|
|
1354
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1354
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:390
|
|
1355
1355
|
msgid "WebHook successfully sent!"
|
|
1356
1356
|
msgstr ""
|
|
1357
1357
|
|
|
1358
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1358
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:530
|
|
1359
1359
|
#: src/modules/components/EmailsTable/EmailsTable.jsx:400
|
|
1360
1360
|
msgid "The copy of email “"
|
|
1361
1361
|
msgstr ""
|
|
1362
1362
|
|
|
1363
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1363
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:538
|
|
1364
1364
|
msgid "To create a copy, you need to save the email."
|
|
1365
1365
|
msgstr ""
|
|
1366
1366
|
|
|
1367
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1367
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:554
|
|
1368
1368
|
msgid "The draft of the email has been deleted."
|
|
1369
1369
|
msgstr ""
|
|
1370
1370
|
|
|
1371
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1371
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:563
|
|
1372
1372
|
#: src/modules/components/EmailsTable/EmailsTable.jsx:323
|
|
1373
1373
|
msgid "” email?"
|
|
1374
1374
|
msgstr ""
|
|
1375
1375
|
|
|
1376
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1376
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:737
|
|
1377
1377
|
msgid "Code"
|
|
1378
1378
|
msgstr ""
|
|
1379
1379
|
|
|
1380
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1380
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:758
|
|
1381
1381
|
msgid "ZIP"
|
|
1382
1382
|
msgstr ""
|
|
1383
1383
|
|
|
1384
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1384
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:779
|
|
1385
1385
|
msgid "Clipboard"
|
|
1386
1386
|
msgstr ""
|
|
1387
1387
|
|
|
1388
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1388
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:786
|
|
1389
1389
|
#: src/modules/components/SelectedElementFormAmpShow/SelectedElementFormAmpShow.jsx:23
|
|
1390
1390
|
msgid "AMP"
|
|
1391
1391
|
msgstr ""
|
|
1392
1392
|
|
|
1393
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1393
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:791
|
|
1394
1394
|
#: src/modules/components/SelectedElementFormAmpShow/SelectedElementFormAmpShow.jsx:32
|
|
1395
1395
|
msgid "HTML"
|
|
1396
1396
|
msgstr ""
|
|
1397
1397
|
|
|
1398
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1398
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:801
|
|
1399
1399
|
msgid "WebHook"
|
|
1400
1400
|
msgstr ""
|
|
1401
1401
|
|
|
1402
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1402
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:807
|
|
1403
1403
|
msgid "Outlook"
|
|
1404
1404
|
msgstr ""
|
|
1405
1405
|
|
|
1406
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1406
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:813
|
|
1407
1407
|
msgid "PDF"
|
|
1408
1408
|
msgstr ""
|
|
1409
1409
|
|
|
1410
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1410
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:819
|
|
1411
1411
|
msgid "PNG"
|
|
1412
1412
|
msgstr ""
|
|
1413
1413
|
|
|
1414
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
1414
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:887
|
|
1415
1415
|
msgid "Export"
|
|
1416
1416
|
msgstr ""
|
|
1417
1417
|
|
|
@@ -4107,13 +4107,13 @@ msgctxt "recovery"
|
|
|
4107
4107
|
msgid "” was successfully deleted."
|
|
4108
4108
|
msgstr ""
|
|
4109
4109
|
|
|
4110
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
4110
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:105
|
|
4111
4111
|
#: src/modules/components/EmailsTable/EmailsTable.jsx:302
|
|
4112
4112
|
msgctxt "email"
|
|
4113
4113
|
msgid "” was successfully removed."
|
|
4114
4114
|
msgstr ""
|
|
4115
4115
|
|
|
4116
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
4116
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:563
|
|
4117
4117
|
#: src/modules/components/EmailsTable/EmailsTable.jsx:321
|
|
4118
4118
|
msgctxt "email"
|
|
4119
4119
|
msgid "Are you sure to delete “"
|
|
@@ -4134,7 +4134,7 @@ msgctxt "email"
|
|
|
4134
4134
|
msgid "locked."
|
|
4135
4135
|
msgstr ""
|
|
4136
4136
|
|
|
4137
|
-
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:
|
|
4137
|
+
#: src/modules/components/ButtonsEmail/ButtonsEmail.jsx:694
|
|
4138
4138
|
msgctxt "verb"
|
|
4139
4139
|
msgid "Import"
|
|
4140
4140
|
msgstr ""
|