@emailmaker/emailmaker 1.0.118-alpha.1 → 1.0.118

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/asset-manifest.json +20 -20
  3. package/emailmaker-esm.js +1 -1
  4. package/emailmaker.js +1 -1
  5. package/iframe/429.js +1 -1
  6. package/iframe/766.js +1 -1
  7. package/iframe/iframe-eblock.b290b70aabae82ab0df2.html +1 -0
  8. package/iframe/iframe.b290b70aabae82ab0df2.html +1 -0
  9. package/iframe/index.html +1 -1
  10. package/iframe/js/525.a19e4a28.js +1 -0
  11. package/iframe/js/576.f1488d74.js +1 -0
  12. package/iframe/js/847.f4ecd916.js +1 -0
  13. package/iframe/js/882.9810d191.js +1 -0
  14. package/iframe/sandbox-eblock.js +1 -1
  15. package/package.json +1 -1
  16. package/static/css/6468.4c5c8668.chunk.css +2 -0
  17. package/static/css/main.903a39f3.css +2 -0
  18. package/static/js/4994.e5900460.js +2 -0
  19. package/static/js/5172.cd3beb80.js +2 -0
  20. package/static/js/6468.43c9207f.js +3 -0
  21. package/static/js/{6488.d5c32b32.js → 6488.6f159204.js} +3 -3
  22. package/static/js/{emailmaker_core.86853555.js → emailmaker_core.2c9a7c35.js} +2 -2
  23. package/iframe/iframe-eblock.56155892f2bc2a3cb105.html +0 -1
  24. package/iframe/iframe.56155892f2bc2a3cb105.html +0 -1
  25. package/iframe/js/525.2072a806.js +0 -1
  26. package/iframe/js/576.eb29a7e7.js +0 -1
  27. package/iframe/js/847.ca533478.js +0 -1
  28. package/iframe/js/882.684065fa.js +0 -1
  29. package/static/css/781.02739981.chunk.css +0 -2
  30. package/static/css/main.28e32d76.css +0 -2
  31. package/static/js/5172.ad74dde1.js +0 -2
  32. package/static/js/781.fa20049e.js +0 -3
  33. package/static/js/9376.b9825431.js +0 -2
  34. /package/iframe/js/{525.2072a806.js.LICENSE.txt → 525.a19e4a28.js.LICENSE.txt} +0 -0
  35. /package/iframe/js/{576.eb29a7e7.js.LICENSE.txt → 576.f1488d74.js.LICENSE.txt} +0 -0
  36. /package/iframe/js/{847.ca533478.js.LICENSE.txt → 847.f4ecd916.js.LICENSE.txt} +0 -0
  37. /package/static/js/{781.fa20049e.js.LICENSE.txt → 6468.43c9207f.js.LICENSE.txt} +0 -0
  38. /package/static/js/{6488.d5c32b32.js.LICENSE.txt → 6488.6f159204.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ (globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[4994],{77778:(e,t,i)=>{var n={"./ar_EG.js":[62388,4607],"./az_AZ.js":[52072,3816],"./bg_BG.js":[58513,2844],"./bn_BD.js":[50160,6428],"./by_BY.js":[81409,9200],"./ca_ES.js":[6116,1626],"./context.js":[16931],"./cs_CZ.js":[21668,1377],"./da_DK.js":[76784,2066],"./de_DE.js":[35840,8796],"./el_GR.js":[44834,7288],"./en_GB.js":[93535,1502],"./en_US.js":[49788],"./es_ES.js":[83640,2114],"./et_EE.js":[84162,6135],"./eu_ES.js":[17243,9716],"./fa_IR.js":[75295,5322],"./fi_FI.js":[60018,6552],"./fr_BE.js":[89261,3411],"./fr_CA.js":[76746,494],"./fr_FR.js":[98366,1330],"./ga_IE.js":[89831,1872],"./gl_ES.js":[11603,3711],"./he_IL.js":[94493,7974],"./hi_IN.js":[63896,1332],"./hr_HR.js":[68616,1510],"./hu_HU.js":[18827,6764],"./hy_AM.js":[27086,737],"./id_ID.js":[55782,3624],"./index.js":[53152],"./is_IS.js":[31867,7426],"./it_IT.js":[49531,2408],"./ja_JP.js":[73507,8839],"./ka_GE.js":[28463,1454],"./kk_KZ.js":[85435,4425],"./km_KH.js":[38249,6033],"./kmr_IQ.js":[34787,9508],"./kn_IN.js":[63262,3914],"./ko_KR.js":[11070,5261],"./ku_IQ.js":[84019,5108],"./lt_LT.js":[34313,2438],"./lv_LV.js":[5127,3302],"./mk_MK.js":[4573,8466],"./ml_IN.js":[87604,290],"./mn_MN.js":[35276,6832],"./ms_MY.js":[45809,5980],"./my_MM.js":[28853,6618],"./nb_NO.js":[81527,2917],"./ne_NP.js":[14148,5827],"./nl_BE.js":[37468,5653],"./nl_NL.js":[4797,5466],"./pl_PL.js":[46441,5862],"./pt_BR.js":[34885,4702],"./pt_PT.js":[10778,8534],"./ro_RO.js":[95937,2988],"./ru_RU.js":[9817],"./si_LK.js":[10987,4823],"./sk_SK.js":[40347,6418],"./sl_SI.js":[99041,2827],"./sr_RS.js":[44760,8682],"./sv_SE.js":[65787,77],"./ta_IN.js":[68349,1640],"./th_TH.js":[95450,5902],"./tk_TK.js":[69810,5864],"./tr_TR.js":[36695,4686],"./uk_UA.js":[21989,1788],"./ur_PK.js":[43248,8590],"./useLocale.js":[47841],"./uz_UZ.js":[64671,5432],"./vi_VN.js":[44289,1241],"./zh_CN.js":[33124,9169],"./zh_HK.js":[27106,197],"./zh_TW.js":[61034,4813]};function a(e){if(!i.o(n,e))return Promise.resolve().then(()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=n[e],a=t[0];return Promise.all(t.slice(1).map(i.e)).then(()=>i(a))}a.keys=()=>Object.keys(n),a.id=77778,e.exports=a},59687:()=>{},46177:()=>{},78892:()=>{},54529:()=>{},69480:()=>{},68268:(e,t,i)=>{"use strict";i.d(t,{j:()=>n});class n{constructor(e=[]){this._inner=e,this._isDisposed=!1}addDisposable(e){return this._inner.push(e),e instanceof n&&e.addDispose(()=>{this.removeDisposable(e)}),e}addDispose(e){this.addDisposable({dispose:e})}removeDisposable(e){const t=this._inner.indexOf(e);t>=0&&this._inner.splice(t,1)}isDisposed(){return this._isDisposed}dispose(){if(!this._isDisposed){this._isDisposed=!0;for(const e of[...this._inner])e.dispose()}}}},42054:(e,t,i)=>{"use strict";function n(e){return/#set\s*\(\s*.*=.*\)/.test(e)}function a(e){const t=e.indexOf("(");if(t<0)return!0;let i=0,n="",a=!1;for(let l=t;l<e.length;l++){const t=e[l];if(a)a=!1;else if("\\"!==t)if(n)t===n&&(n="");else if('"'!==t&&"'"!==t)if("("!==t){if(")"===t&&(i--,i<0))return!1}else i++;else n=t;else a=!0}return 0===i}function l(e,t){const i=e.length;for(let n=0;n<i;n++){const i=e.charCodeAt(n);if(0===i)return!1;if('"'===t&&34===i)return!1;if("'"===t&&39===i)return!1;if(""===t&&(32===i||9===i||10===i||13===i||12===i||34===i||39===i||60===i||62===i||61===i||96===i))return!1}return!0}i.d(t,{Hk:()=>b,uI:()=>_});const r=new class{constructor(){this._byKey=Object.create(null),this._byValue=Object.create(null)}getOrCreateByKey(e){let t=this._byKey[e];return void 0===t&&(t=function(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",i=new Uint8Array(e);crypto.getRandomValues(i);let n="";for(let a=0;a<e;a++){const e=i[a]%62;n+=t.charAt(e)}return n}(8),this._byKey[e]=t,this._byValue[t]=e),t}getByValue(e){return this._byValue[e]}};function o(e,t){if(void 0!==t&&!l(e,t)){return`%|{${r.getOrCreateByKey(e)}}|%`}return e}function s(e){const t=r.getByValue(e.slice(3,e.length-3));return void 0===t?e:t}function c(e,t,i){if(void 0!==t){if(l(e,t))return e;return`%|{${r.getOrCreateByKey(e)}}|%`}return`\x3c!--${e}--\x3e`}function d(e){if(e.startsWith("\x3c!--")&&e.endsWith("--\x3e")){const t=e.slice(4,-3);return t.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")}return e}function m(e,t,i){if(void 0!==t){if(l(e,t))return e;return`%|{${r.getOrCreateByKey(e)}}|%`}return i||function(e){const t=/[<>&]/g;let i;for(;null!==(i=t.exec(e));)return!0;return!1}(e)||function(e){let t=e;const i=e.match(/\[%\s*([^%]*?)\s*%\]/);i&&(t=i[1]);const n=t.trim();return/^(IF|ELSE|ELSIF|ELSEIF|END|FOREACH|WHILE|NEXT|LAST|BREAK|DO|UNLESS|CONTINUE|SET|UNSET|DEFINE|INCLUDE)\b/i.test(n)||/\w+\s*\(/.test(n)}(e)?`\x3c!--${e}--\x3e`:e}const u=(p=c,(e,t,i)=>!!a(e)&&p(e,t,i));var p;const h=(g=d,e=>!!a(e.startsWith("\x3c!--")&&e.endsWith("--\x3e")?e.slice(4,-3):e)&&g(e));var g;const f=function(e){return(t,i,l)=>!!a(t)&&(n(t)?e(t,i,l):t)}(c),v=function(e){return t=>{const i=t.startsWith("\x3c!--")&&t.endsWith("--\x3e")?t.slice(4,-3):t;return!!a(i)&&(n(i)?e(t):t)}}(d),b=e=>{e.escape("\x3c!--","--\x3e",e=>e,!1),e.escape("<style","</style>",e=>e,!1),e.escape("<script","<\/script>",e=>e,!1),e.unescape("%|{","}|%",s),e.escape("@{","}",c,!0).unescape("\x3c!--@{","}--\x3e",d,!0),e.unescape("\x3c!--%%%{{{","}}}%%%--\x3e",e=>e.substring(10,e.length-9),!1),e.escape("${","}",o,!0),e.escape("{{","}}",o,!0),e.escape("{%","%}",c).unescape("\x3c!--{%","%}--\x3e",d),e.escape("{#","#}",c).unescape("\x3c!--{#","#}--\x3e",d),e.escape("[%","%]",m,!0).unescape("\x3c!--[%","%]--\x3e",d,!0),e.createSyntax("getresponse").escape("[[IF","]]",c).escape("[[if","]]",c).escape("[[ELSE]]","",c).escape("[[else]]","",c).escape("[[ENDIF]]","",c).escape("[[endif]]","",c).unescape("\x3c!--[[IF","]]--\x3e",d).unescape("\x3c!--[[if","]]--\x3e",d).unescape("\x3c!--[[ELSE]]","--\x3e",d).unescape("\x3c!--[[else]]","--\x3e",d).unescape("\x3c!--[[ENDIF]]","--\x3e",d).unescape("\x3c!--[[endif]]","--\x3e",d),e.createSyntax("ExpertSender").escape("<if",">",c).escape("</if",">",c).escape("<else",">",c).escape("</else",">",c).escape("<var ",">",c,!0).unescape("\x3c!--<if ",">--\x3e",d).unescape("\x3c!--</if",">--\x3e",d).unescape("\x3c!--<else ",">--\x3e",d).unescape("\x3c!--</else",">--\x3e",d).unescape("\x3c!--<var",">--\x3e",d,!0),e.createSyntax("velocity").escape("#if",")",u).escape("#elseif",")",u).escape("#else","",c).escape("#foreach",")",u).escape("#macro",")",u).escape("#set",")",f,!0).escape("#parse",")",u).escape("#include",")",u).escape("#evaluate",")",u).escape("#end","",c).escape("#break","",c).escape("#stop","",c).unescape("\x3c!--#macro","--\x3e",h).unescape("\x3c!--#if","--\x3e",h).unescape("\x3c!--#elseif","--\x3e",h).unescape("\x3c!--#else","--\x3e",d).unescape("\x3c!--#foreach","--\x3e",h).unescape("\x3c!--#parse","--\x3e",h).unescape("\x3c!--#include","--\x3e",h).unescape("\x3c!--#evaluate","--\x3e",h).unescape("\x3c!--#end","--\x3e",d).unescape("\x3c!--#break","--\x3e",d).unescape("\x3c!--#stop","--\x3e",d).unescape("\x3c!--#set","--\x3e",v,!0),e.escape("*|","|*",c).unescape("\x3c!--*|","|*--\x3e",d)};function y(e,t,i,n,a=!1){const l=[];if(i&&(t=t.filter(e=>e.isVariable)),!t.length)return l;const r=function(e,t){const i=t.reduce((e,{mapFn:t,start:i,end:n,syntax:a})=>(e[i]||(e[i]=[]),e[i].push({value:n,mapFn:t,syntax:a}),e),Object.create(null)),n=Object.keys(i).map(e=>e.replace(/[-[\]{}()*+?.,\\^$|]/g,"\\$&")).join("|"),a=new RegExp(n,"g"),l=[];let r;for(;null!==(r=a.exec(e));){const e=r[0];l.push({start:r.index,startToken:e,endTokens:i[e]})}return l}(e,t);let o,s=!1,c=!1,d=!1,m=0;for(let p=0;p<r.length;p++){var u;const{start:t,startToken:i,endTokens:h}=r[p];if(n)c=!0,o='"';else for(let n=m;n<t;n++){const t=e[n];c?'"'===o||"'"===o?t===o&&(c=!1,o=void 0):d&&/[\s>]/.test(t)&&(c=!1,o=void 0,d=!1):"<"===t?s=!0:">"===t?s=!1:!s||'"'!==t&&"'"!==t?s&&/\S/.test(t)&&void 0===o&&"="===e[n-1]&&!['"',"'","`"].includes(t)&&(c=!0,o="",d=!0):(c=!0,o=t,d=!1)}m=t;const g=c?null!==(u=o)&&void 0!==u?u:"":void 0;for(const{mapFn:n,value:o}of h){let c=t+i.length,d=e.indexOf(o,c);for(;-1!==d;){let m=d,u=t+i.length,h=0;for(;-1!==m;){const t=e.indexOf(i,u);if(-1!==t&&t<m)h++,u=t+i.length,m=e.indexOf(o,u);else{if(!(h>0))break;h--,u=m+o.length,m=e.indexOf(o,u)}}if(m<0)break;const f=m+o.length,v=e.substring(t,f),b=n(v,g,s);if(!1===b){c=d+Math.max(o.length,1),d=e.indexOf(o,c);continue}(a||b!==v)&&l.push({range:{start:t,end:f},text:a?v:b});const y=r.findIndex(({start:e})=>e>=f);p=y>p?y-1:r.length;break}}}return l}function E(e,t){if(!t.length)return e;const i=t.slice().sort((e,t)=>t.range.start-e.range.start);let n=e;for(const{text:a,range:l}of i)n=n.slice(0,l.start)+a+n.slice(l.end);return n}class _{constructor(e=b){this._disposables=[],this._escapes=[],this._unescapes=[];const{_escapes:t,_unescapes:i}=this;e({createSyntax(e){return{...this,syntax:e}},escape(e,i,n,a){return t.push({start:e,end:i,mapFn:n,isVariable:a,syntax:this.syntax||e}),this},unescape(e,t,n,a){return i.push({start:e,end:t,mapFn:n,isVariable:a,syntax:this.syntax||e}),this}})}getMappings(e,t,i){return y(e,this._escapes,t,i)}getRevertMappings(e,t){return y(e,this._unescapes,t)}getDetectedMappings(e,t,i){return y(e,this._escapes,t,i,!0)}getEscapedText(e,t){return E(e,this.getMappings(e,t))}getUnescapedText(e,t){return E(e,this.getRevertMappings(e,t))}hasDetectedMappings(e,t,i){return this.getDetectedMappings(e,t,i).length>0}addDisposable(e){this._disposables.push(e)}dispose(){for(const e of this._disposables)e.dispose()}}},55857:(e,t,i)=>{"use strict";i.d(t,{vl:()=>a});var n=i(68268);class a extends n.j{constructor(e={}){super(),this._options=e,this._listeners=[],this.on=this.addEventListener.bind(this),this.once=(e,t=0)=>{const i=this.on(t=>{const n=e(t);return i.dispose(),n},t);return i},this.un=e=>{const t=this._listeners.findIndex(([t])=>t===e);t>=0&&this._listeners.splice(t,1),0===this._listeners.length&&this._options.onLastListenerRemove&&this._options.onLastListenerRemove()},this.event=this.on}addEventListener(e,t=0){const i=this._listeners.findIndex(([e,i])=>i<t);return this._listeners.splice(i<0?this._listeners.length:i,0,[e,t]),1===this._listeners.length&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(),{dispose:()=>this.un(e)}}fire(e){if(!this.isDisposed()){const i=[...this._listeners];for(const[n]of i)try{n(e)}catch(t){}}}hasListeners(){return!!this._listeners.length}}n.j},96513:(e,t,i)=>{"use strict";let n;async function a(){return n||(n=await i.e(1729).then(i.t.bind(i,1729,19)).then(e=>e.default))}i.d(t,{F:()=>a})},37704:(e,t,i)=>{"use strict";i.d(t,{C:()=>l,R:()=>a});var n=i(74662);function a(e){const t=(0,n.xy)(e);if(!e.querySelector("style[amp4email-boilerplate]")){const i=e.createElement("style");i.setAttribute("amp4email-boilerplate",""),i.innerHTML="body{visibility:hidden}",t.prepend(i)}}function l(e){const t=e.querySelector("style[amp4email-boilerplate]");t&&t.remove()}},28464:(e,t,i)=>{"use strict";i.d(t,{Vq:()=>l,gP:()=>n,zq:()=>a});const n="https://cdn.ampproject.org/v0",a=`${n}.js`,l=`script[src='${a}']`},42597:(e,t,i)=>{"use strict";i.d(t,{C:()=>a});var n=i(74662);function a(e){const t=e.querySelectorAll("meta");for(const n of t){const e=n.getAttribute("charset");if(e)return void("utf-8"!==e&&n.setAttribute("charset","utf-8"))}const i=(0,n.xy)(e),a=e.createElement("meta");a.setAttribute("charset","utf-8"),i.insertBefore(a,i.firstChild)}},96624:(e,t,i)=>{"use strict";function n(e,t,i){const n=i('script:not([type="application/ld+json"])'),a=e.querySelectorAll(n);for(const r of a){var l;null!==(l=r.getAttribute("src"))&&void 0!==l&&l.startsWith("https://cdn.ampproject.org/")||r.closest("amp-state")&&"application/json"===r.getAttribute("type")||r.remove()}}i.d(t,{y:()=>n})},74662:(e,t,i)=>{"use strict";function n(e){let t=e.documentElement;return t||(t=e.createElement("html"),e.appendChild(t)),t}function a(e){let t=e.head;if(!t){t=e.createElement("head");const i=n(e);i.insertBefore(t,i.firstChild)}return t}function l(e){const t=Object.create(null),i=e.getAttributeNames();for(const n of i)t[n]=e.getAttribute(n);return t}function r(e){for(const t of document.querySelectorAll("iframe"))if(t.contentDocument===e.ownerDocument)return t}i.d(t,{ep:()=>n,gu:()=>l,xm:()=>r,xy:()=>a})},39689:(e,t,i)=>{"use strict";i.d(t,{l:()=>n});const n={wordwrap:200,tables:!0,selectors:[...i(39711).lp.selectors||[],{selector:"table",format:"dataTable"},{selector:"ul",format:"list"},{selector:"ol",format:"list"},{selector:"pre",format:"block"},{selector:"blockquote",format:"blockquote"}],baseElements:{selectors:["body","table"]},preserveNewlines:!1,longWordSplit:{forceWrapOnLimit:!1}}},39711:(e,t,i)=>{"use strict";i.d(t,{lp:()=>Ee,G9:()=>ke});var n={};i.r(n),i.d(n,{block:()=>U,blockHtml:()=>X,blockString:()=>z,blockTag:()=>G,inline:()=>H,inlineHtml:()=>K,inlineString:()=>W,inlineSurround:()=>Y,inlineTag:()=>Z,skip:()=>V});var a={};i.r(a),i.d(a,{anchor:()=>he,blockquote:()=>de,dataTable:()=>ye,heading:()=>ce,horizontalLine:()=>re,image:()=>pe,lineBreak:()=>ae,orderedList:()=>ve,paragraph:()=>oe,pre:()=>se,table:()=>be,unorderedList:()=>fe,wbr:()=>le});var l=i(19481);function r(e){return new l.LC(o(e))}function o(e){const t=e.map(s);return(e,...i)=>t.flatMap(t=>t(e,...i))}function s(e){switch(e.type){case"terminal":return()=>[e.valueContainer];case"tagName":return function(e){const t={};for(const i of e.variants)t[i.value.toLowerCase()]=o(i.cont);return(e,...i)=>{var n;const a=null===(n=e.tagName)||void 0===n?void 0:n.toLowerCase(),l=a&&t[a];return l?l(e,...i):[]}}(e);case"attrValue":return function(e){const t=[];for(const n of e.matchers){const e=n.predicate,i=o(n.cont);t.push((t,n,...a)=>e(t)?i(n,...a):[])}const i=e.name;return(e,...n)=>{const a=e.getAttribute(i);return null!==a?t.flatMap(t=>t(a,e,...n)):[]}}(e);case"attrPresence":return function(e){const t=e.name,i=o(e.cont);return(e,...n)=>e.hasAttribute(t)?i(e,...n):[]}(e);case"pushElement":return function(e){const t=o(e.cont),i="+"===e.combinator?c:d;return(e,...n)=>{const a=i(e);return a?t(a,e,...n):[]}}(e);case"popElement":return function(e){const t=o(e.cont);return(e,i,...n)=>t(i,...n)}(e);default:return()=>[]}}function c(e){let t=e.previousSibling;for(;t&&t.nodeType!==Node.ELEMENT_NODE;)t=t.previousSibling;return t}function d(e){return e.parentElement}var m=i(37782),u=i.n(m);function p(e,t,i=()=>{}){if(void 0===e){const e=function(...i){return t(e,...i)};return e}return e>=0?function(...n){return t(p(e-1,t,i),...n)}:i}function h(e,t){let i=0,n=e.length;for(;i<n&&e[i]===t;)++i;for(;n>i&&e[n-1]===t;)--n;return i>0||n<e.length?e.substring(i,n):e}function g(e,t){const i=new Map;for(let n=e.length;n-- >0;){const a=e[n],l=t(a);i.set(l,i.has(l)?u()(a,i.get(l),{arrayMerge:f}):a)}return[...i.values()].reverse()}const f=(e,t,i)=>[...t];function v(e,t){for(const i of t){if(!e)return;e=e[i]}return e}function b(e,t="a",i=26){const n=[];do{e-=1,n.push(e%i),e=e/i|0}while(e>0);const a=t.charCodeAt(0);return n.reverse().map(e=>String.fromCharCode(a+e)).join("")}const y=["I","X","C","M"],E=["V","L","D"];function _(e){return[...e+""].map(e=>+e).reverse().map((e,t)=>e%5<4?(e<5?"":E[t])+y[t].repeat(e%5):y[t]+(e<5?E[t]:y[t+1])).reverse().join("")}class w{constructor(e,t=void 0){this.lines=[],this.nextLineWords=[],this.maxLineLength=t||e.wordwrap||Number.MAX_VALUE,this.nextLineAvailableChars=this.maxLineLength,this.wrapCharacters=v(e,["longWordSplit","wrapCharacters"])||[],this.forceWrapOnLimit=v(e,["longWordSplit","forceWrapOnLimit"])||!1,this.stashedSpace=!1,this.wordBreakOpportunity=!1}pushWord(e,t=!1){this.nextLineAvailableChars<=0&&!t&&this.startNewLine();const i=0===this.nextLineWords.length,n=e.length+(i?0:1);if(n<=this.nextLineAvailableChars||t)this.nextLineWords.push(e),this.nextLineAvailableChars-=n;else{const[t,...n]=this.splitLongWord(e);i||this.startNewLine(),this.nextLineWords.push(t),this.nextLineAvailableChars-=t.length;for(const e of n)this.startNewLine(),this.nextLineWords.push(e),this.nextLineAvailableChars-=e.length}}popWord(){const e=this.nextLineWords.pop();if(void 0!==e){const t=0===this.nextLineWords.length,i=e.length+(t?0:1);this.nextLineAvailableChars+=i}return e}concatWord(e,t=!1){if(this.wordBreakOpportunity&&e.length>this.nextLineAvailableChars)this.pushWord(e,t),this.wordBreakOpportunity=!1;else{const i=this.popWord();this.pushWord(i?i.concat(e):e,t)}}startNewLine(e=1){this.lines.push(this.nextLineWords),e>1&&this.lines.push(...Array.from({length:e-1},()=>[])),this.nextLineWords=[],this.nextLineAvailableChars=this.maxLineLength}isEmpty(){return 0===this.lines.length&&0===this.nextLineWords.length}clear(){this.lines.length=0,this.nextLineWords.length=0,this.nextLineAvailableChars=this.maxLineLength}toString(){return[...this.lines,this.nextLineWords].map(e=>e.join(" ")).join("\n")}splitLongWord(e){const t=[];let i=0;for(;e.length>this.maxLineLength;){const n=e.substring(0,this.maxLineLength),a=e.substring(this.maxLineLength),l=n.lastIndexOf(this.wrapCharacters[i]);if(l>-1)e=n.substring(l+1)+a,t.push(n.substring(0,l+1));else{if(i++,!(i<this.wrapCharacters.length)){if(this.forceWrapOnLimit){if(t.push(n),(e=a).length>this.maxLineLength)continue}else e=n+a;break}e=n+a}}return t.push(e),t}}class C{constructor(e=null){this.next=e}getRoot(){return this.next?this.next:this}}class k extends C{constructor(e,t=null,i=1,n=void 0){super(t),this.leadingLineBreaks=i,this.inlineTextBuilder=new w(e,n),this.rawText="",this.stashedLineBreaks=0,this.isPre=t&&t.isPre,this.isNoWrap=t&&t.isNoWrap}}class A extends k{constructor(e,t=null,{interRowLineBreaks:i=1,leadingLineBreaks:n=2,maxLineLength:a,maxPrefixLength:l=0,prefixAlign:r="left"}={}){super(e,t,n,a),this.maxPrefixLength=l,this.prefixAlign=r,this.interRowLineBreaks=i}}class S extends k{constructor(e,t=null,{leadingLineBreaks:i=1,maxLineLength:n,prefix:a=""}={}){super(e,t,i,n),this.prefix=a}}class I extends C{constructor(e=null){super(e),this.rows=[],this.isPre=e&&e.isPre,this.isNoWrap=e&&e.isNoWrap}}class x extends C{constructor(e=null){super(e),this.cells=[],this.isPre=e&&e.isPre,this.isNoWrap=e&&e.isNoWrap}}class L extends C{constructor(e,t=null,i=void 0){super(t),this.inlineTextBuilder=new w(e,i),this.rawText="",this.stashedLineBreaks=0,this.isPre=t&&t.isPre,this.isNoWrap=t&&t.isNoWrap}}class N extends C{constructor(e=null,t){super(e),this.transform=t}}class T{constructor(e){this.whitespaceChars=e.preserveNewlines?e.whitespaceCharacters.replace(/\n/g,""):e.whitespaceCharacters;const t=(i=this.whitespaceChars,[...i].map(e=>"\\u"+e.charCodeAt(0).toString(16).padStart(4,"0")).join(""));var i;if(this.leadingWhitespaceRe=new RegExp(`^[${t}]`),this.trailingWhitespaceRe=new RegExp(`[${t}]$`),this.allWhitespaceOrEmptyRe=new RegExp(`^[${t}]*$`),this.newlineOrNonWhitespaceRe=new RegExp(`(\\n|[^\\n${t}])`,"g"),this.newlineOrNonNewlineStringRe=new RegExp("(\\n|[^\\n]+)","g"),e.preserveNewlines){const e=new RegExp(`\\n|[^\\n${t}]+`,"gm");this.shrinkWrapAdd=function(t,i,n=e=>e,a=!1){if(!t)return;const l=i.stashedSpace;let r=!1,o=e.exec(t);if(o)for(r=!0,"\n"===o[0]?i.startNewLine():l||this.testLeadingWhitespace(t)?i.pushWord(n(o[0]),a):i.concatWord(n(o[0]),a);null!==(o=e.exec(t));)"\n"===o[0]?i.startNewLine():i.pushWord(n(o[0]),a);i.stashedSpace=l&&!r||this.testTrailingWhitespace(t)}}else{const e=new RegExp(`[^${t}]+`,"g");this.shrinkWrapAdd=function(t,i,n=e=>e,a=!1){if(!t)return;const l=i.stashedSpace;let r=!1,o=e.exec(t);if(o)for(r=!0,l||this.testLeadingWhitespace(t)?i.pushWord(n(o[0]),a):i.concatWord(n(o[0]),a);null!==(o=e.exec(t));)i.pushWord(n(o[0]),a);i.stashedSpace=l&&!r||this.testTrailingWhitespace(t)}}}addLiteral(e,t,i=!0){if(!e)return;const n=t.stashedSpace;let a=!1,l=this.newlineOrNonNewlineStringRe.exec(e);if(l)for(a=!0,"\n"===l[0]?t.startNewLine():n?t.pushWord(l[0],i):t.concatWord(l[0],i);null!==(l=this.newlineOrNonNewlineStringRe.exec(e));)"\n"===l[0]?t.startNewLine():t.pushWord(l[0],i);t.stashedSpace=n&&!a}testLeadingWhitespace(e){return this.leadingWhitespaceRe.test(e)}testTrailingWhitespace(e){return this.trailingWhitespaceRe.test(e)}testContainsWords(e){return!this.allWhitespaceOrEmptyRe.test(e)}countNewlinesNoWords(e){this.newlineOrNonWhitespaceRe.lastIndex=0;let t,i=0;for(;null!==(t=this.newlineOrNonWhitespaceRe.exec(e));){if("\n"!==t[0])return 0;i++}return i}}class B{constructor(e,t,i=void 0){this.options=e,this.picker=t,this.metadata=i,this.whitespaceProcessor=new T(e),this._stackItem=new k(e),this._wordTransformer=void 0}pushWordTransform(e){this._wordTransformer=new N(this._wordTransformer,e)}popWordTransform(){if(!this._wordTransformer)return;const e=this._wordTransformer.transform;return this._wordTransformer=this._wordTransformer.next,e}startNoWrap(){this._stackItem.isNoWrap=!0}stopNoWrap(){this._stackItem.isNoWrap=!1}_getCombinedWordTransformer(){const e=this._wordTransformer?e=>F(e,this._wordTransformer):void 0,t=this.options.encodeCharacters;return e?t?i=>t(e(i)):e:t}_popStackItem(){const e=this._stackItem;return this._stackItem=e.next,e}addLineBreak(){(this._stackItem instanceof k||this._stackItem instanceof S||this._stackItem instanceof L)&&(this._stackItem.isPre?this._stackItem.rawText+="\n":this._stackItem.inlineTextBuilder.startNewLine())}addWordBreakOpportunity(){(this._stackItem instanceof k||this._stackItem instanceof S||this._stackItem instanceof L)&&(this._stackItem.inlineTextBuilder.wordBreakOpportunity=!0)}addInline(e,{noWordTransform:t=!1}={}){if(this._stackItem instanceof k||this._stackItem instanceof S||this._stackItem instanceof L)if(this._stackItem.isPre)this._stackItem.rawText+=e;else if(0!==e.length&&(!this._stackItem.stashedLineBreaks||this.whitespaceProcessor.testContainsWords(e))){if(this.options.preserveNewlines){const t=this.whitespaceProcessor.countNewlinesNoWords(e);if(t>0)return void this._stackItem.inlineTextBuilder.startNewLine(t)}this._stackItem.stashedLineBreaks&&this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks),this.whitespaceProcessor.shrinkWrapAdd(e,this._stackItem.inlineTextBuilder,t?void 0:this._getCombinedWordTransformer(),this._stackItem.isNoWrap),this._stackItem.stashedLineBreaks=0}}addLiteral(e){(this._stackItem instanceof k||this._stackItem instanceof S||this._stackItem instanceof L)&&0!==e.length&&(this._stackItem.isPre?this._stackItem.rawText+=e:(this._stackItem.stashedLineBreaks&&this._stackItem.inlineTextBuilder.startNewLine(this._stackItem.stashedLineBreaks),this.whitespaceProcessor.addLiteral(e,this._stackItem.inlineTextBuilder,this._stackItem.isNoWrap),this._stackItem.stashedLineBreaks=0))}openBlock({leadingLineBreaks:e=1,reservedLineLength:t=0,isPre:i=!1}={}){const n=Math.max(20,this._stackItem.inlineTextBuilder.maxLineLength-t);this._stackItem=new k(this.options,this._stackItem,e,n),i&&(this._stackItem.isPre=!0)}closeBlock({trailingLineBreaks:e=1,blockTransform:t}={}){const i=this._popStackItem(),n=t?t(P(i)):P(i);R(this._stackItem,n,i.leadingLineBreaks,Math.max(i.stashedLineBreaks,e))}openList({maxPrefixLength:e=0,prefixAlign:t="left",interRowLineBreaks:i=1,leadingLineBreaks:n=2}={}){this._stackItem=new A(this.options,this._stackItem,{interRowLineBreaks:i,leadingLineBreaks:n,maxLineLength:this._stackItem.inlineTextBuilder.maxLineLength,maxPrefixLength:e,prefixAlign:t})}openListItem({prefix:e=""}={}){if(!(this._stackItem instanceof A))throw new Error("Can't add a list item to something that is not a list! Check the formatter.");const t=this._stackItem,i=Math.max(e.length,t.maxPrefixLength),n=Math.max(20,t.inlineTextBuilder.maxLineLength-i);this._stackItem=new S(this.options,t,{prefix:e,maxLineLength:n,leadingLineBreaks:t.interRowLineBreaks})}closeListItem(){const e=this._popStackItem(),t=e.next,i=Math.max(e.prefix.length,t.maxPrefixLength),n="\n"+" ".repeat(i);R(t,("right"===t.prefixAlign?e.prefix.padStart(i):e.prefix.padEnd(i))+P(e).replace(/\n/g,n),e.leadingLineBreaks,Math.max(e.stashedLineBreaks,t.interRowLineBreaks))}closeList({trailingLineBreaks:e=2}={}){const t=this._popStackItem(),i=P(t);i&&R(this._stackItem,i,t.leadingLineBreaks,e)}openTable(){this._stackItem=new I(this._stackItem)}openTableRow(){if(!(this._stackItem instanceof I))throw new Error("Can't add a table row to something that is not a table! Check the formatter.");this._stackItem=new x(this._stackItem)}openTableCell({maxColumnWidth:e}={}){if(!(this._stackItem instanceof x))throw new Error("Can't add a table cell to something that is not a table row! Check the formatter.");this._stackItem=new L(this.options,this._stackItem,e)}closeTableCell({colspan:e=1,rowspan:t=1}={}){const i=this._popStackItem(),n=h(P(i),"\n");i.next.cells.push({colspan:e,rowspan:t,text:n})}closeTableRow(){const e=this._popStackItem();e.next.rows.push(e.cells)}closeTable({tableToString:e,leadingLineBreaks:t=2,trailingLineBreaks:i=2}){const n=e(this._popStackItem().rows);n&&R(this._stackItem,n,t,i)}toString(){return P(this._stackItem.getRoot())}}function P(e){if(!(e instanceof k||e instanceof S||e instanceof L))throw new Error("Only blocks, list items and table cells can be requested for text contents.");return e.inlineTextBuilder.isEmpty()?e.rawText:e.rawText+e.inlineTextBuilder.toString()}function R(e,t,i,n){if(!(e instanceof k||e instanceof S||e instanceof L))throw new Error("Only blocks, list items and table cells can contain text.");const a=P(e),l=Math.max(e.stashedLineBreaks,i);e.inlineTextBuilder.clear(),a?e.rawText=a+"\n".repeat(l)+t:(e.rawText=t,e.leadingLineBreaks=l),e.stashedLineBreaks=n}function F(e,t){return t?F(t.transform(e),t.next):e}var O=i(43930);function M(e={}){const t=e.selectors.filter(e=>!e.format);if(t.length)throw new Error("Following selectors have no specified format: "+t.map(e=>`\`${e.selector}\``).join(", "));const i=new l.bA(e.selectors.map(e=>[e.selector,e])).build(r);"function"!==typeof e.encodeCharacters&&(e.encodeCharacters=function(e){if(!e||0===Object.keys(e).length)return;const t=Object.entries(e).filter(([,e])=>!1!==e),i=new RegExp(t.map(([e])=>{return`(${t=[...e][0],t.replace(/[\s\S]/g,e=>"\\u"+e.charCodeAt().toString(16).padStart(4,"0"))})`;var t}).join("|"),"g"),n=t.map(([,e])=>e),a=(e,...t)=>n[t.findIndex(e=>e)];return e=>e.replace(i,a)}(e.encodeCharacters));const n=new l.bA(e.baseElements.selectors.map((e,t)=>[e,t+1])).build(r);function a(t){return function(e,t,i){const n=[];function a(e,a){a=[...a].slice(0,t.limits.maxChildNodes);for(const l of a){if(!(0,O.vq)(l))continue;const a=i.pick1(l);if(a>0?n.push({selectorIndex:a,element:l}):l.childNodes&&e([...l.childNodes]),n.length>=t.limits.maxBaseElements)return}}const l=p(t.limits.maxDepth,a);l(e),"occurrence"!==t.baseElements.orderBy&&n.sort((e,t)=>e.selectorIndex-t.selectorIndex);return t.baseElements.returnDomByDefault&&0===n.length?e:n.map(e=>e.element)}(t,e,n)}const o=p(e.limits.maxDepth,j,function(t,i){i.addInline(e.limits.ellipsis||"")});return function(t,n=void 0){return function(e,t,i,n,a,l){const r=a([...e.childNodes]),o=new B(i,n,t);return l(r,o),o.toString()}(t,n,e,i,a,o)}}function j(e,t,i){if(!t)return;const n=i.options;t.length>n.limits.maxChildNodes&&(t=t.slice(0,n.limits.maxChildNodes)).push(document.createTextNode(n.limits.ellipsis||""));for(const a of t)switch(a.nodeType){case a.TEXT_NODE:i.addInline(a.data);break;case a.ELEMENT_NODE:{const t=i.picker.pick1(a),l=n.formatters[t.format];l&&l(a,e,i,t.options||{});break}}}var D=i(73841);function V(e,t,i,n){}function W(e,t,i,n){i.addLiteral(n.string||"")}function z(e,t,i,n){i.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),i.addLiteral(n.string||""),i.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function H(e,t,i,n){t([...e.childNodes],i)}function U(e,t,i,n){i.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),t([...e.childNodes],i),i.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function q(e){return(0,D.Ll)(e)}function $(e){return`</${e.tagName.toLoserCase()}>`}function Z(e,t,i,n){i.startNoWrap(),i.addLiteral(q(e)),i.stopNoWrap(),t([...e.childNodes],i),i.startNoWrap(),i.addLiteral($(e)),i.stopNoWrap()}function G(e,t,i,n){i.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),i.startNoWrap(),i.addLiteral(q(e)),i.stopNoWrap(),t([...e.childNodes],i),i.startNoWrap(),i.addLiteral($(e)),i.stopNoWrap(),i.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function K(e,t,i,n){i.startNoWrap(),i.addLiteral((0,O.b6)(e)),i.stopNoWrap()}function X(e,t,i,n){i.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),i.startNoWrap(),i.addLiteral((0,O.b6)(e)),i.stopNoWrap(),i.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function Y(e,t,i,n){i.addLiteral(n.prefix||""),t([...e.childNodes],i),i.addLiteral(n.suffix||"")}function J(e,t){return e[t]||(e[t]=[]),e[t]}function Q(e,t=0){for(;e[t];)t++;return t}function ee(e,t,i,n){for(let a=0;a<e.rowspan;a++){const l=J(t,i+a);for(let t=0;t<e.colspan;t++)l[n+t]=e}}function te(e,t){return void 0===e[t]&&(e[t]=0===t?0:1+te(e,t-1)),e[t]}function ie(e,t,i,n){e[t+i]=Math.max(te(e,t+i),te(e,t)+n)}function ne(e,t,i){const n=[];let a=0;const l=e.length,r=[0];for(let c=0;c<l;c++){const i=J(n,c),l=e[c];let o=0;for(let e=0;e<l.length;e++){const a=l[e];o=Q(i,o),ee(a,n,c,o),o+=a.colspan,a.lines=a.text.split("\n");const s=a.lines.length;ie(r,c,a.rowspan,s+t)}a=i.length>a?i.length:a}!function(e,t){for(let i=0;i<t;i++){const t=J(e,i);for(let n=0;n<i;n++){const a=J(e,n);if(t[n]||a[i]){const e=t[n];t[n]=a[i],a[i]=e}}}}(n,l>a?l:a);const o=[],s=[0];for(let c=0;c<a;c++){let e,t=0;const a=Math.min(l,n[c].length);for(;t<a;)if(e=n[c][t],e){if(!e.rendered){let n=0;for(let i=0;i<e.lines.length;i++){const a=e.lines[i],l=r[t]+i;o[l]=(o[l]||"").padEnd(s[c])+a,n=a.length>n?a.length:n}ie(s,c,e.colspan,n+i),e.rendered=!0}t+=e.rowspan}else{const e=r[t];o[e]=o[e]||"",t++}}return o.join("\n")}function ae(e,t,i,n){i.addLineBreak()}function le(e,t,i,n){i.addWordBreakOpportunity()}function re(e,t,i,n){i.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),i.addInline("-".repeat(n.length||i.options.wordwrap||40)),i.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function oe(e,t,i,n){i.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),t([...e.childNodes],i),i.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function se(e,t,i,n){i.openBlock({isPre:!0,leadingLineBreaks:n.leadingLineBreaks||2}),t([...e.childNodes],i),i.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function ce(e,t,i,n){i.openBlock({leadingLineBreaks:n.leadingLineBreaks||2}),!1!==n.uppercase?(i.pushWordTransform(e=>e.toUpperCase()),t([...e.childNodes],i),i.popWordTransform()):t([...e.childNodes],i),i.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2})}function de(e,t,i,n){i.openBlock({leadingLineBreaks:n.leadingLineBreaks||2,reservedLineLength:2}),t([...e.childNodes],i),i.closeBlock({trailingLineBreaks:n.trailingLineBreaks||2,blockTransform:e=>(!1!==n.trimEmptyLines?h(e,"\n"):e).split("\n").map(e=>"> "+e).join("\n")})}function me(e,t){if(!t)return e;return("string"===typeof t[0]?t[0]:"[")+e+("string"===typeof t[1]?t[1]:"]")}function ue(e,t,i,n,a){const l="function"===typeof t?t(e,n,a):e;return"/"===l[0]&&i?function(e,t){let i=e.length;for(;i>0&&e[i-1]===t;)--i;return i<e.length?e.substring(0,i):e}(i,"/")+l:l}function pe(e,t,i,n){const a=e.getAttribute("alt")||"",l=e.getAttribute("src")?ue(e.getAttribute("src"),n.pathRewrite,n.baseUrl,i.metadata,e):"",r=l?a?a+" "+me(l,n.linkBrackets):me(l,n.linkBrackets):a;i.addInline(r,{noWordTransform:!0})}function he(e,t,i,n){const a=function(){if(n.ignoreHref)return"";if(!e.getAttribute("href"))return"";let t=e.getAttribute("href").replace(/^mailto:/,"");return n.noAnchorUrl&&"#"===t[0]?"":(t=ue(t,n.pathRewrite,n.baseUrl,i.metadata,e),t)}();if(a){let l="";i.pushWordTransform(e=>(e&&(l+=e),e)),t([...e.childNodes],i),i.popWordTransform();n.hideLinkHrefIfSameAsText&&a===l||i.addInline(l?" "+me(a,n.linkBrackets):a,{noWordTransform:!0})}else t([...e.childNodes],i)}function ge(e,t,i,n,a){const l="li"===v(e,["parent","name"]);let r=0;const o=([...e.childNodes]||[]).filter(e=>!(0,O.ir)(e)||!/^\s*$/.test(e.data)).map(function(e){var t;if("li"!==(null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase()))return{node:e,prefix:""};const i=l?a().trimStart():a();return i.length>r&&(r=i.length),{node:e,prefix:i}});if(o.length){i.openList({interRowLineBreaks:1,leadingLineBreaks:l?1:n.leadingLineBreaks||2,maxPrefixLength:r,prefixAlign:"left"});for(const{node:e,prefix:n}of o)i.openListItem({prefix:n}),t([e],i),i.closeListItem();i.closeList({trailingLineBreaks:l?1:n.trailingLineBreaks||2})}}function fe(e,t,i,n){const a=n.itemPrefix||" * ";return ge(e,t,i,n,()=>a)}function ve(e,t,i,n){var a,l;let r=Number((null===(a=e.getAttribute)||void 0===a?void 0:a.call(e,"start"))||"1");const o=function(e="1"){switch(e){case"a":return e=>b(e,"a");case"A":return e=>b(e,"A");case"i":return e=>_(e).toLowerCase();case"I":return e=>_(e);default:return e=>e.toString()}}(null===(l=e.getAttribute)||void 0===l?void 0:l.call(e,"type"));return ge(e,t,i,n,()=>" "+o(r++)+". ")}function be(e,t,i,n){return function(e,t){if(!0===t)return!0;if(!e)return!1;const{classes:i,ids:n}=function(e){const t=[],i=[];for(const n of e)n.startsWith(".")?t.push(n.substring(1)):n.startsWith("#")&&i.push(n.substring(1));return{classes:t,ids:i}}(t),a=(e.getAttribute("class")||"").split(" "),l=(e.getAttribute("id")||"").split(" ");return a.some(e=>i.includes(e))||l.some(e=>n.includes(e))}(e,i.options.tables)?ye(e,t,i,n):function(e,t,i,n){i.openBlock({leadingLineBreaks:n.leadingLineBreaks}),t([...e.childNodes],i),i.closeBlock({trailingLineBreaks:n.trailingLineBreaks})}(e,t,i,n)}function ye(e,t,i,n){function a(e){const a=e.getAttribute("colspan")||1,l=e.getAttribute("rowspan")||1;i.openTableCell({maxColumnWidth:n.maxColumnWidth}),t([...e.childNodes],i),i.closeTableCell({colspan:a,rowspan:l})}i.openTable(),[...e.childNodes].forEach(function e(t){var l;if(!(0,O.vq)(t))return;const r=!1!==n.uppercaseHeaderCells?e=>{i.pushWordTransform(e=>e.toUpperCase()),a(e),i.popWordTransform()}:a;switch(null===(l=t.tagName)||void 0===l?void 0:l.toLowerCase()){case"thead":case"tbody":case"tfoot":case"center":return void[...t.childNodes].forEach(e);case"tr":i.openTableRow();for(const e of[...t.childNodes])if((0,O.vq)(e))switch(e.tagName.toLowerCase()){case"th":r(e);break;case"td":a(e)}i.closeTableRow()}}),i.closeTable({tableToString:e=>{var t,i;return ne(e,null!==(t=n.rowSpacing)&&void 0!==t?t:0,null!==(i=n.colSpacing)&&void 0!==i?i:3)},leadingLineBreaks:n.leadingLineBreaks,trailingLineBreaks:n.trailingLineBreaks})}const Ee={baseElements:{selectors:["body"],orderBy:"selectors",returnDomByDefault:!0},decodeEntities:!0,encodeCharacters:{},formatters:{},limits:{ellipsis:"...",maxBaseElements:void 0,maxChildNodes:void 0,maxDepth:void 0,maxInputLength:1<<24},longWordSplit:{forceWrapOnLimit:!1,wrapCharacters:[]},preserveNewlines:!1,selectors:[{selector:"*",format:"inline"},{selector:"a",format:"anchor",options:{baseUrl:null,hideLinkHrefIfSameAsText:!1,ignoreHref:!1,linkBrackets:["[","]"],noAnchorUrl:!0}},{selector:"article",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"aside",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"blockquote",format:"blockquote",options:{leadingLineBreaks:2,trailingLineBreaks:2,trimEmptyLines:!0}},{selector:"br",format:"lineBreak"},{selector:"div",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"footer",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"form",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"h1",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h2",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h3",format:"heading",options:{leadingLineBreaks:3,trailingLineBreaks:2,uppercase:!0}},{selector:"h4",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"h5",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"h6",format:"heading",options:{leadingLineBreaks:2,trailingLineBreaks:2,uppercase:!0}},{selector:"header",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"hr",format:"horizontalLine",options:{leadingLineBreaks:2,length:void 0,trailingLineBreaks:2}},{selector:"img",format:"image",options:{baseUrl:null,linkBrackets:["[","]"]}},{selector:"main",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"nav",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"ol",format:"orderedList",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"p",format:"paragraph",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"pre",format:"pre",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"section",format:"block",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"table",format:"table",options:{colSpacing:3,leadingLineBreaks:2,maxColumnWidth:60,rowSpacing:0,trailingLineBreaks:2,uppercaseHeaderCells:!0}},{selector:"ul",format:"unorderedList",options:{itemPrefix:" * ",leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"wbr",format:"wbr"}],tables:[],whitespaceCharacters:" \t\r\n\f\u200b"},_e=(e,t,i)=>[...t],we=(e,t,i)=>e.some(e=>"object"===typeof e)?((e,t)=>[...e,...t])(e,t):_e(e,t,i);function Ce(e={}){return(e=u()(Ee,e,{arrayMerge:_e,customMerge:e=>"selectors"===e?we:void 0})).formatters=Object.assign({},n,a,e.formatters),e.selectors=g(e.selectors,e=>e.selector),function(e){if(e.tags){const t=Object.entries(e.tags).map(([e,t])=>({...t,selector:e||"*"}));e.selectors.push(...t),e.selectors=g(e.selectors,e=>e.selector)}function t(e,t,i){const n=t.pop();for(const a of t){let t=e[a];t||(t={},e[a]=t),e=t}e[n]=i}if(e.baseElement){const i=e.baseElement;t(e,["baseElements","selectors"],Array.isArray(i)?i:[i])}void 0!==e.returnDomByDefault&&t(e,["baseElements","returnDomByDefault"],e.returnDomByDefault);for(const i of e.selectors)"anchor"===i.format&&v(i,["options","noLinkBrackets"])&&t(i,["options","linkBrackets"],!1)}(e),M(e)}function ke(e,t={},i=void 0){return Ce(t)(e,i)}},46168:(e,t,i)=>{"use strict";i.d(t,{H:()=>n});class n{constructor(e){this._voidElements=void 0,this._voidElements=new Set(e)}isVoidElement(e){return this._voidElements.has(e.toLowerCase())}}},15471:(e,t,i)=>{"use strict";i.d(t,{X:()=>A});var n=i(420);let a=function(e){return e[e.StartCommentTag=0]="StartCommentTag",e[e.Comment=1]="Comment",e[e.EndCommentTag=2]="EndCommentTag",e[e.StartTagOpen=3]="StartTagOpen",e[e.StartTagClose=4]="StartTagClose",e[e.StartTagSelfClose=5]="StartTagSelfClose",e[e.StartTag=6]="StartTag",e[e.EndTagOpen=7]="EndTagOpen",e[e.EndTagClose=8]="EndTagClose",e[e.EndTag=9]="EndTag",e[e.DelimiterAssign=10]="DelimiterAssign",e[e.AttributeName=11]="AttributeName",e[e.AttributeValue=12]="AttributeValue",e[e.StartDoctypeTag=13]="StartDoctypeTag",e[e.Doctype=14]="Doctype",e[e.EndDoctypeTag=15]="EndDoctypeTag",e[e.Content=16]="Content",e[e.Whitespace=17]="Whitespace",e[e.Unknown=18]="Unknown",e[e.Script=19]="Script",e[e.Styles=20]="Styles",e[e.EOS=21]="EOS",e[e.AdvancedStart=100]="AdvancedStart",e[e.AdvancedEnd=101]="AdvancedEnd",e}({});class l{constructor(e,t){this.source=void 0,this.len=void 0,this.position=void 0,this.source=e,this.len=e.length,this.position=t}eos(){return this.len<=this.position}getSource(){return this.source}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}goToEnd(){this.position=this.source.length}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)}advanceIfChars(e){let t;if(this.position+e.length>this.source.length)return!1;for(t=0;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0}advanceIfRegExp(e){const t=this.source.substr(this.position).match(e);return t?(this.position=this.position+t.index+t[0].length,t[0]):""}advanceUntilRegExp(e){const t=this.source.substr(this.position).match(e);return t?(this.position=this.position+t.index,t[0]):(this.goToEnd(),"")}advanceUntilChar(e){for(;this.position<this.source.length;){if(this.source.charCodeAt(this.position)===e)return!0;this.advance(1)}return!1}advanceUntilChars(e){for(;this.position+e.length<=this.source.length;){let t=0;for(;t<e.length&&this.source.charCodeAt(this.position+t)===e[t];t++);if(t===e.length)return!0;this.advance(1)}return this.goToEnd(),!1}skipWhitespace(){return this.advanceWhileChar(e=>e===v||e===b||e===h||e===f||e===g)>0}advanceWhileChar(e){const t=this.position;for(;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t}}const r="!".charCodeAt(0),o="-".charCodeAt(0),s="<".charCodeAt(0),c=">".charCodeAt(0),d="/".charCodeAt(0),m="=".charCodeAt(0),u='"'.charCodeAt(0),p="'".charCodeAt(0),h="\n".charCodeAt(0),g="\r".charCodeAt(0),f="\f".charCodeAt(0),v=" ".charCodeAt(0),b="\t".charCodeAt(0),y={"text/x-handlebars-template":!0,"text/html":!0};function E(e,t=0,i=n.S5.WithinContent,h=!1){const g=new l(e,t);let f,v,b,E,_,w=i,C=0,k=a.Unknown;function A(){return g.advanceIfRegExp(/^[_:a-zA-Z][_:\w-.\d]*/).toLowerCase()}function S(e,t,i){return k=t,C=e,f=i,t}function I(){const e=g.pos();if(g.eos())return S(e,a.EOS);let t;switch(w){case n.S5.WithinComment:return g.advanceIfChars([o,o,c])?(w=n.S5.WithinContent,S(e,a.EndCommentTag)):(g.advanceUntilChars([o,o,c]),S(e,a.Comment));case n.S5.WithinDoctype:return g.advanceIfChar(c)?(w=n.S5.WithinContent,S(e,a.EndDoctypeTag)):(g.advanceUntilChar(c),S(e,a.Doctype));case n.S5.WithinContent:if(g.advanceIfChar(s)){if(!g.eos()&&g.peekChar()===r){if(g.advanceIfChars([r,o,o]))return w=n.S5.WithinComment,S(e,a.StartCommentTag);if(g.advanceIfRegExp(/^!doctype/i))return w=n.S5.WithinDoctype,S(e,a.StartDoctypeTag)}return g.advanceIfChar(d)?(w=n.S5.AfterOpeningEndTag,S(e,a.EndTagOpen)):(w=n.S5.AfterOpeningStartTag,S(e,a.StartTagOpen))}return g.advanceUntilChar(s),S(e,a.Content);case n.S5.AfterOpeningEndTag:return A().length>0?(w=n.S5.WithinEndTag,S(e,a.EndTag)):g.skipWhitespace()?S(e,a.Whitespace,"Tag name must directly follow the open bracket."):(w=n.S5.WithinEndTag,g.advanceUntilChar(c),e<g.pos()?S(e,a.Unknown,"End tag name expected."):I());case n.S5.WithinEndTag:if(g.skipWhitespace())return S(e,a.Whitespace);if(g.advanceIfChar(c))return w=n.S5.WithinContent,S(e,a.EndTagClose);if(h&&g.peekChar()===s)return w=n.S5.WithinContent,S(e,a.EndTagClose,"Closing bracket missing.");t="Closing bracket expected.";break;case n.S5.AfterOpeningStartTag:return b=A(),_=void 0,E=void 0,b.length>0?(v=!1,w=n.S5.WithinTag,S(e,a.StartTag)):g.skipWhitespace()?S(e,a.Whitespace,"Tag name must directly follow the open bracket."):(w=n.S5.WithinTag,g.advanceUntilChar(c),e<g.pos()?S(e,a.Unknown,"Start tag name expected."):I());case n.S5.WithinTag:return g.skipWhitespace()?(v=!0,S(e,a.Whitespace)):v&&(E=g.advanceIfRegExp(/^[^\s"'></=\x00-\x0F\x7F\x80-\x9F]*/).toLowerCase(),E.length>0)?(w=n.S5.AfterAttributeName,v=!1,S(e,a.AttributeName)):g.advanceIfChars([d,c])?(w=n.S5.WithinContent,S(e,a.StartTagSelfClose)):g.advanceIfChar(c)?(w="script"===b?_&&y[_]?n.S5.WithinContent:n.S5.WithinScriptContent:"style"===b?n.S5.WithinStyleContent:n.S5.WithinContent,S(e,a.StartTagClose)):h&&g.peekChar()===s?(w=n.S5.WithinContent,S(e,a.StartTagClose,"Closing bracket missing.")):(g.advance(1),S(e,a.Unknown,"Unexpected character in tag."));case n.S5.AfterAttributeName:return g.skipWhitespace()?(v=!0,S(e,a.Whitespace)):g.advanceIfChar(m)?(w=n.S5.BeforeAttributeValue,S(e,a.DelimiterAssign)):(w=n.S5.WithinTag,I());case n.S5.BeforeAttributeValue:if(g.skipWhitespace())return S(e,a.Whitespace);let i=g.advanceIfRegExp(/^[^\s"'`=<>]+/);if(i.length>0)return g.peekChar()===c&&g.peekChar(-1)===d&&(g.goBack(1),i=i.substr(0,i.length-1)),"type"===E&&(_=i),w=n.S5.WithinTag,v=!1,S(e,a.AttributeValue);const l=g.peekChar();return l===p||l===u?(g.advance(1),g.advanceUntilChar(l)&&g.advance(1),"type"===E&&(_=g.getSource().substring(e+1,g.pos()-1)),w=n.S5.WithinTag,v=!1,S(e,a.AttributeValue)):(w=n.S5.WithinTag,v=!1,I());case n.S5.WithinScriptContent:let f=1;for(;!g.eos();){const t=g.advanceIfRegExp(/<!--|-->|<\/?script\s*\/?>?/i);if(0===t.length)return g.goToEnd(),S(e,a.Script);if("\x3c!--"===t)1===f&&(f=2);else if("--\x3e"===t)f=1;else if("/"!==t[1])2===f&&(f=3);else{if(3!==f){g.goBack(t.length);break}f=2}}return w=n.S5.WithinContent,e<g.pos()?S(e,a.Script):I();case n.S5.WithinStyleContent:return g.advanceUntilRegExp(/<\/style/i),w=n.S5.WithinContent,e<g.pos()?S(e,a.Styles):I()}return g.advance(1),w=n.S5.WithinContent,S(e,a.Unknown,t)}return{scan:function(){const e=g.pos(),t=I();return t===a.EOS||e!==g.pos()||h&&(t===a.StartTagClose||t===a.EndTagClose)?t:(g.advance(1),S(e,a.Unknown))},getTokenType:()=>k,getTokenOffset:()=>C,getTokenLength:()=>g.pos()-C,getTokenEnd:()=>g.pos(),getTokenText:()=>g.getSource().substring(C,g.pos()),getScannerState:()=>w,getTokenError:()=>f}}var _=i(46168),w=i(75038);function C(e){if("string"===typeof e){const t=e.startsWith("'")||e.startsWith('"')?1:0,i=e.endsWith("'")||e.endsWith('"')?e.length-1:e.length;return e.substring(t,i)}return e}class k{constructor(e,t){this.text=e,this.type=t,this.node=void 0,this.replaces=void 0}get hasNode(){return!!this.node}addReplace(e){var t;null===(t=this.replaces)||void 0===t||t.push(e)}start(e,t,i){if(!this.node){const n=this.node=new w.b(e,this.text.length,[],i);n.type=this.type,n.startTagEnd=t,this.replaces=[]}}finish(e,t){const i=this.replaces,n=this.node,a=e+(t||0);if(i){for(const e of i){const t=e.parent;if(!t)throw new Error("parent not defined");const i=t.children.indexOf(e);t.children.splice(i,1)}this.replaces=void 0}if(n){const i=n.parent;if(!i)throw new Error("parent not defined");i.children.push(n),n.closed=void 0!==t,n.endTagStart=e,n.end=a,n.content=this.text.substring(n.startTagEnd,e),this.node=void 0}}}class A{constructor(e){this.dataManager=e}parse(e,t=[]){var i;const n=E(e,void 0,void 0,!0),l=new w.b(0,e.length,[],void 0);l.type=w.Z.ROOT;let r,o=l,s=-1,c=null,d=n.scan();const m=()=>{if(!o.tag){const t=o.parent.children,i=t[t.length-2],n=e.substring(o.start,o.end);(null===i||void 0===i?void 0:i.type)===w.Z.HTML?(i.content=(i.content||"")+n,i.end=o.end,t.splice(t.length-1,1)):(o.type=w.Z.HTML,o.content=n,o.children=[]),o.type=w.Z.HTML}o=o.parent},u=new k(e,w.Z.COMMENT),p=new k(e,w.Z.DOCTYPE),h=e=>{o.children.push(e)};for(;d!==a.EOS;){switch(d){case a.StartDoctypeTag:p.start(n.getTokenOffset(),n.getTokenEnd(),o);break;case a.EndDoctypeTag:{const t=o.lastChild,i=p.node;if(!i)throw new Error("");const a=t?t.end:void 0!==o.startTagEnd?o.startTagEnd:o.start;if(a!==i.start){const t=e.substring(a,i.start);if(t){const e=new w.b(a,i.start,[],o);e.type=w.Z.HTML,e.content=t,h(e)}}p.finish(n.getTokenOffset(),n.getTokenLength());break}case a.StartCommentTag:u.start(n.getTokenOffset(),n.getTokenEnd(),o);break;case a.EndCommentTag:{const t=o.lastChild,i=u.node;if(!i)throw new Error("");const a=t?t.end:void 0!==o.startTagEnd?o.startTagEnd:o.start;if(a!==i.start){const t=e.substring(a,i.start);if(t){const e=new w.b(a,i.start,[],o);e.type=w.Z.HTML,e.content=t,h(e)}}u.finish(n.getTokenOffset(),n.getTokenLength());break}case a.StartTagOpen:const t=o.lastChild,i=new w.b(n.getTokenOffset(),e.length,[],o),l=t?t.end:void 0!==o.startTagEnd?o.startTagEnd:o.start;if(l!==i.start){const t=e.substring(l,i.start);if(t){const e=new w.b(l,i.start,[],o);e.type=w.Z.HTML,e.content=t,h(e)}}h(i),o=i;break;case a.StartTag:o.tag=n.getTokenText();break;case a.StartTagClose:o.parent&&(o.end=n.getTokenEnd(),n.getTokenLength()?(o.startTagEnd=n.getTokenEnd(),o.tag&&this.dataManager.isVoidElement(o.tag)&&(o.closed=!0,m())):m());break;case a.StartTagSelfClose:o.parent&&(o.closed=!0,o.end=n.getTokenEnd(),o.startTagEnd=n.getTokenEnd(),m());break;case a.EndTagOpen:s=n.getTokenOffset(),r=void 0;break;case a.EndTag:r=n.getTokenText().toLowerCase();break;case a.EndTagClose:let d=o;for(;!d.isSameTag(r)&&d.parent;)d=d.parent;if(d.parent){const t=o.lastChild,i=t?t.end:void 0===o.startTagEnd?o.start:o.startTagEnd;if(i!==s){const t=e.substring(i,s);if(t){const e=new w.b(i,s,[],o);e.type=w.Z.HTML,e.content=t,h(e)}}for(;o!==d;)o.end=s,o.closed=!1,m();o.closed=!0,o.endTagStart=s,o.end=n.getTokenEnd(),m()}break;case a.AttributeName:{c=n.getTokenText();let e=o.attributes;e||(o.attributes=e={}),e[c]=null;break}case a.AttributeValue:{const e=n.getTokenText(),t=o.attributes;t&&c&&(t[c]=C(e),c=null);break}}d=n.scan()}for(;o.parent;)o.end=e.length,o.closed=!1,m();u.hasNode,u.finish(e.length);const g=(null===(i=l.lastChild)||void 0===i?void 0:i.end)||0;if(g<e.length){const t=e.substring(g);if(t){const i=new w.b(g,e.length,[],l);i.type=w.Z.HTML,i.content=t,h(i)}}return{roots:l.children,findNodeBefore:l.findNodeBefore.bind(l),findNodeAt:l.findNodeAt.bind(l)}}}const S=["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr","vk-snippet-end"];new A(new _.H(S))},75038:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a,b:()=>r});var n=i(73841);let a=function(e){return e[e.HTML=0]="HTML",e[e.ELEMENT=1]="ELEMENT",e[e.ROOT=2]="ROOT",e[e.COMMENT=3]="COMMENT",e[e.DOCTYPE=4]="DOCTYPE",e[e.ADVANCED=5]="ADVANCED",e}({});const l=e=>e.type===a.HTML?e.start-1:e.start;class r{get attributeNames(){return this.attributes?Object.keys(this.attributes):[]}get root(){return this.parent?this.parent.root:this}constructor(e,t,i,n){this.start=e,this.end=t,this.children=i,this.parent=n,this.content=void 0,this.type=a.ELEMENT,this.tag=void 0,this.closed=!1,this.startTagEnd=void 0,this.endTagStart=void 0,this.attributes=void 0,this.createdBy=void 0,this.isDirty=void 0}isSameTag(e){return void 0===this.tag?void 0===e:void 0!==e&&this.tag.length===e.length&&this.tag.toLowerCase()===e}get firstChild(){return this.children[0]}get lastChild(){return this.children.length?this.children[this.children.length-1]:void 0}findNodeBefore(e){const t=(0,n.i8)(this.children,t=>e<=l(t))-1;if(t>=0){const i=this.children[t];if(e>l(i)){if(e<i.end)return i.findNodeBefore(e);const t=i.lastChild;return t&&t.end===i.end?i.findNodeBefore(e):i}}return this}findNodeAt(e){const t=(0,n.i8)(this.children,t=>e<=l(t))-1;if(t>=0){const n=this.children[t];if(e>=l(n)&&e<=((i=n).type===a.HTML?i.end+1:i.end))return n.findNodeAt(e)}var i;return this}find(e){if(e(this))return this;for(const t of this.children){const i=t.find(e);if(i)return i}}closest(e){let t=this;do{if(e(t))return t}while(t=t.parent)}parents(){return this.parent?[this.parent,...this.parent.parents()]:[]}closestFromRoot(e,t=!0){const i=t?[this,...this.parents()]:this.parents();for(let n=i.length-1;n>=0;n--){const t=i[n];if(e(t))return t}}contains(e){return Boolean(e.closest(e=>e===this))}clone(e=this.parent,t=this.start,i=!0){const n=this.start-t,a=new r(t,this.end-n,[],e);return a.children=i?this.children.map(e=>e.clone(a,e.start-n)):[],a.attributes={...this.attributes},a.closed=this.closed,a.content=this.content,a.startTagEnd=this.startTagEnd,a.endTagStart=this.endTagStart,a.tag=this.tag,a.type=this.type,a}}},73841:(e,t,i)=>{"use strict";i.d(t,{Ll:()=>r,i8:()=>o,n1:()=>n});i(75038);const n=new Set(["area","br","col","embed","hr","img","input","link","meta","param","vk-snippet-end"]);const a=Object.create(null);function l(e,t){const i=a[e]||(a[e]=Object.create(null));let n=i[t];if("boolean"!==typeof n){const a=document.createElement(e)[t.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(e,t)=>t.toUpperCase())];n=i[t]="undefined"!==typeof a&&"boolean"!==typeof a}return n}function r(e,t){if(e.start!==e.startTagEnd||t){var i;const t=(null===(i=e.tag)||void 0===i?void 0:i.toLowerCase())||"div",n=function(e){var t;const i=null===(t=e.tag)||void 0===t?void 0:t.toLowerCase();let n="";if(i){const t=e.attributes;if(t){const e=Object.keys(t);for(const a of e){const e=null===t[a]?"":t[a];"string"===typeof e&&(n+=""!==e||"em"===a||l(i,a)?` ${a}="${e.replaceAll('"',"'")}"`:` ${a}`)}}}return n}(e);return"vk-snippet-end"===t?`<${t}${n}/>`:`<${t}${n}>`}return""}function o(e,t){let i=0,n=e.length;if(0===n)return 0;for(;i<n;){const a=Math.floor((i+n)/2);t(e[a])?n=a:i=a+1}return i}},48124:(e,t,i)=>{"use strict";i.d(t,{R:()=>s});var n=i(55857),a=i(51861),l=i(97114),r=i(68268);class o extends n.vl{constructor(e={}){super(),this._mutationSummary=void 0,this._mutationSummary=new a.MutationSummary({...e,observeOwnChanges:!0,callback:e=>this.fire(e),queries:[{all:!0}]})}dispose(){this._mutationSummary.disconnect(),super.dispose()}trigger(e){const t=this._mutationSummary.takeSummaries();return(e||null!==t&&void 0!==t&&t.length)&&this.fire(t||[]),t}}class s extends r.j{_nextTickHandler(){(0,l.A)(()=>{this.trigger(),this._summaries.length&&(this._innerEmitter.hasListeners()?this._innerEmitter.fire(this._summaries):this._lostEmitter.fire(this._summaries),this._summaries=[])},Number.MAX_VALUE)}constructor(e={}){super(),this._mutationEmitter=void 0,this._innerEmitter=this.addDisposable(new n.vl({onFirstListenerAdd:()=>{this._nextTickHandler()}})),this._lostEmitter=this.addDisposable(new n.vl),this._paused=0,this._stopped=0,this._summaries=[],this.onMutate=this._innerEmitter.event,this.onLost=this._lostEmitter.event,this.onNativeMutate=void 0,this._mutationEmitter=this.addDisposable(new o(e)),this.onNativeMutate=this._mutationEmitter.event,this.addDisposable(this._mutationEmitter.event(e=>{this._stopped||(this._paused?this._lostEmitter.fire(e):(this._summaries.push(...e),(0,l.A)(()=>{this._summaries.length&&!this._innerEmitter.hasListeners()&&(this._lostEmitter.fire(this._summaries),this._summaries=[])},Number.MAX_VALUE)))}))}get isStoped(){return this._paused>0||this._stopped>0}stop(){this._mutationEmitter.trigger(),this._stopped++}start(){this._mutationEmitter.trigger(),this._stopped--}pause(){this._mutationEmitter.trigger(),this._paused++}resume(){this._mutationEmitter.trigger(),this._paused--}trigger(){this._mutationEmitter.trigger(!0)}}},22278:(e,t,i)=>{"use strict";i.d(t,{f:()=>a});var n=i(43930);function a(e){for(const a of e){if(a.removed)for(const e of a.removed){const i=a.getOldParentNode(e),n=a.getOldPreviousSibling(e);if(i){var t;const a=null!==(t=null===n||void 0===n?void 0:n.nextSibling)&&void 0!==t?t:null;i.insertBefore(e,a)}}if(a.added)for(const e of a.added)e.parentNode&&e.parentNode.removeChild(e);if(a.reordered)for(const e of a.reordered){const t=a.getOldParentNode(e),n=a.getOldPreviousSibling(e);if(t){var i;const a=null!==(i=null===n||void 0===n?void 0:n.nextSibling)&&void 0!==i?i:null;t.insertBefore(e,a)}}if(a.attributeChanged)for(const e of Object.keys(a.attributeChanged))for(const t of a.attributeChanged[e]){const i=a.getOldAttribute(t,e);null==i?t.removeAttribute(e):t.setAttribute(e,i)}if(a.characterDataChanged)for(const e of a.characterDataChanged)((0,n.ir)(e)||(0,n.Cn)(e)||(0,n.Cn)(e))&&(e.data=a.getOldCharacterData(e))}}},97114:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var n=i(55857);let a=0;const l=new Array(1e3);function r(){for(let e=0;e<a;e+=2){(0,l[e])(...l[e+1]),l[e]=void 0,l[e+1]=void 0}a=0}const o=function(){let e=0;const t=new MutationObserver(r),i=document.createTextNode("");return t.observe(i,{characterData:!0}),()=>{i.data=String(e=++e%2)}}();const s=new n.vl({onFirstListenerAdd:function e(){!function(e,...t){l[a]=e,l[a+1]=t,a+=2,2===a&&o()}(()=>{s.hasListeners()&&(s.fire(),e())})}}),c=s.once;const d=c},72813:(e,t,i)=>{"use strict";i.d(t,{J:()=>l,xv:()=>a});const n="em_version";function a(e){if(!e||!e.includes(n))return e;try{const t="undefined"!==typeof document?document.baseURI:"http://localhost/",i=new URL(e,t);if(!i.searchParams.has(n))return e;i.searchParams.delete(n);return/^https?:\/\//i.test(e)||e.startsWith("//")?i.href:i.pathname+i.search+i.hash}catch{return e}}function l(e){try{const t="undefined"!==typeof document?document.baseURI:"http://localhost/",i=new URL(e,t);i.searchParams.set(n,String(Date.now()));return/^https?:\/\//i.test(e)||e.startsWith("//")?i.href:i.pathname+i.search+i.hash}catch{const t=e.includes("?")?"&":"?";return`${e}${t}${n}=${Date.now()}`}}},75563:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var n=i(25366),a=i(91722),l=i(82836),r=i(25914),o=i(16834),s=i(74572),c=i.n(s);const d={alignLeft:"Align left",alignCenter:"Center horizontally",alignRight:"Align right"},m=({value:e,onChange:t,disabled:i=!1,strokeWidth:s,labels:m={},tooltipTitle:u,size:p=18,tooltipPlacement:h="bottom",className:g})=>{const f={...d,...m},[v,b]=(0,n.useState)(null!==e&&void 0!==e?e:"");(0,n.useEffect)(()=>{b(null!==e&&void 0!==e?e:"")},[e]);const y=e=>{const i=e===v?"":e;b(i),null===t||void 0===t||t(i)},E=n.createElement(a.A.Group,{disabled:i,value:v,className:"em-form-align-control"},n.createElement(l.A,{size:8},n.createElement(r.A,{placement:h,title:f.alignLeft},n.createElement(a.A.Button,{value:"left","aria-label":f.alignLeft,onClick:()=>y("left")},n.createElement(o.A,{icon:"AlignHorizontalLeft",size:p,strokeWidth:s,"aria-hidden":!0}))),n.createElement(r.A,{placement:h,title:f.alignCenter},n.createElement(a.A.Button,{value:"center","aria-label":f.alignCenter,onClick:()=>y("center")},n.createElement(o.A,{icon:"AlignHorizontalCenter",size:p,strokeWidth:s,"aria-hidden":!0}))),n.createElement(r.A,{placement:h,title:f.alignRight},n.createElement(a.A.Button,{value:"right","aria-label":f.alignRight,onClick:()=>y("right")},n.createElement(o.A,{icon:"AlignHorizontalRight",size:p,strokeWidth:s,"aria-hidden":!0})))));let _=E;return u&&(_=n.createElement(r.A,{placement:h,title:u},n.createElement("span",{style:{display:"inline-block"}},E))),g&&(_=n.createElement("div",{className:c()("em-form-align-control",g)},_)),n.createElement(n.Fragment,null,_)};m.displayName="FormAlignControl";const u=m},61200:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var n=i(25366),a=i(91722),l=i(82836),r=i(25914),o=i(16834),s=i(74572),c=i.n(s);const d={alignLeft:"Text align left",alignCenter:"Text align center",alignRight:"Text align right",alignJustify:"Text align justify"},m=({value:e,onChange:t,disabled:i=!1,strokeWidth:s,labels:m={},tooltipTitle:u,size:p=18,tooltipPlacement:h="bottom",className:g})=>{const f={...d,...m},[v,b]=(0,n.useState)(null!==e&&void 0!==e?e:"");(0,n.useEffect)(()=>{b(null!==e&&void 0!==e?e:"")},[e]);const y=e=>{const i=e===v?"":e;b(i),null===t||void 0===t||t(i)},E=n.createElement(a.A.Group,{disabled:i,value:v,className:"em-form-align-control"},n.createElement(l.A,{size:8},n.createElement(r.A,{placement:h,title:f.alignLeft},n.createElement(a.A.Button,{value:"left","aria-label":f.alignLeft,onClick:()=>y("left")},n.createElement(o.A,{icon:"AlignLeftOutlined",size:p,strokeWidth:s,"aria-hidden":!0}))),n.createElement(r.A,{placement:h,title:f.alignCenter},n.createElement(a.A.Button,{value:"center","aria-label":f.alignCenter,onClick:()=>y("center")},n.createElement(o.A,{icon:"AlignCenterOutlined",size:p,strokeWidth:s,"aria-hidden":!0}))),n.createElement(r.A,{placement:h,title:f.alignRight},n.createElement(a.A.Button,{value:"right","aria-label":f.alignRight,onClick:()=>y("right")},n.createElement(o.A,{icon:"AlignRightOutlined",size:p,strokeWidth:s,"aria-hidden":!0}))),n.createElement(r.A,{placement:h,title:f.alignJustify},n.createElement(a.A.Button,{value:"justify","aria-label":f.alignJustify,onClick:()=>y("justify")},n.createElement(o.A,{icon:"Justify",size:p,strokeWidth:s,"aria-hidden":!0})))));let _=E;return u&&(_=n.createElement(r.A,{placement:h,title:u},n.createElement("span",{style:{display:"inline-block"}},E))),g&&(_=n.createElement("div",{className:c()("em-form-align-control",g)},_)),n.createElement(n.Fragment,null,_)};m.displayName="FormAlignTextControl";const u=m},25151:(e,t,i)=>{"use strict";i.d(t,{A:()=>v});var n=i(25366),a=i(74572),l=i.n(a),r=i(77155),o=i(85684),s=i(97531),c=i(25914),d=i(96912),m=i(83306),u=i(79975),p=i(16834);const h=[],g=[],f=({colorFieldName:e="backgroundColor",imageEnabled:t=!1,backgroundImageEmpty:i=!0,usedColors:a,backgroundRepeatOptions:f=h,backgroundSizeOptions:v=g,colorPlaceholder:b="Background color",usedLabel:y="Used",recommendedLabel:E="Recommended",imageUploadSlot:_,rowStyle:w,getPopupContainer:C,horizontalPositionPlaceholder:k="Horizontal position",verticalPositionPlaceholder:A="Vertical position",backgroundRepeatTooltip:S="Background image repeat",backgroundSizeTooltip:I="Background image size",selectPlaceholder:x="Please choose",namePrefix:L=""})=>{const N=`${L}backgroundPositionX`,T=`${L}backgroundPositionY`,B=`${L}backgroundRepeat`,P=`${L}backgroundSize`;return n.createElement(o.A,{gutter:10,className:l()("em-form-background-settings__row",{"em-form-background-settings__row--image-empty":i}),style:w},n.createElement(s.A,{span:12},n.createElement(c.A,{trigger:["hover"],title:b,placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},n.createElement(r.A.Item,{name:e,className:l()("em-form-background-settings__form-item-color",{"em-form-background-settings__form-item-color--image-enabled":t})},n.createElement(m.A,{placeholder:b,usedColors:a,usedLabel:y,recommendedLabel:E,placement:"bottomLeft",getPopupContainer:C})))),t&&n.createElement(s.A,{span:i?12:24},_&&n.createElement("div",{className:l()("em-form-background-settings__image-slot",{"em-form-background-settings__image-slot--empty":i})},_),!i&&n.createElement(r.A.Item,{className:"em-form-background-settings__form-item-wrapper"},n.createElement(o.A,{gutter:10},n.createElement(s.A,{span:12},n.createElement(c.A,{trigger:["hover"],title:k,placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},n.createElement(r.A.Item,{name:N,className:"em-form-background-settings__form-item-position"},n.createElement(u.A,{placeholder:k,prefix:n.createElement(p.A,{icon:"BgPositionHorizontal"})})))),n.createElement(s.A,{span:12},n.createElement(c.A,{trigger:["hover"],title:A,placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},n.createElement(r.A.Item,{name:T,className:"em-form-background-settings__form-item-position"},n.createElement(u.A,{placeholder:A,prefix:n.createElement(p.A,{icon:"BgPositionVertical"})}))))),n.createElement(o.A,{gutter:10},n.createElement(s.A,{span:12},n.createElement(c.A,{trigger:["hover"],title:S,placement:"top"},n.createElement(r.A.Item,{name:B,className:"em-form-background-settings__form-item-select"},n.createElement(d.A,{placeholder:x,options:f,placement:"bottomLeft",getPopupContainer:null!==C&&void 0!==C?C:void 0})))),n.createElement(s.A,{span:12},n.createElement(c.A,{trigger:["hover"],title:I,placement:"top"},n.createElement(r.A.Item,{name:P,className:"em-form-background-settings__form-item-select"},n.createElement(d.A,{placeholder:x,options:v,placement:"bottomLeft",getPopupContainer:null!==C&&void 0!==C?C:void 0}))))))))};f.displayName="FormBackgroundSettings";const v=f},73277:(e,t,i)=>{"use strict";i.d(t,{Ok:()=>P,sQ:()=>O,nD:()=>V,eZ:()=>G,vp:()=>A,mw:()=>I,v6:()=>ne,L1:()=>v,y9:()=>c,n6:()=>E,Pr:()=>$,H6:()=>J});var n=i(25366),a=i(74572),l=i.n(a),r=i(84586),o=i(16834);const s=({title:e,collapsible:t=!1,defaultOpen:i=!0,open:a,onToggle:s,dividerTop:c="auto",dividerBottom:d=!1,compact:m=!1,titleStyle:u,children:p,className:h,style:g,bodyStyle:f})=>{const v=void 0!==a,[b,y]=(0,n.useState)(i),E=v?a:b,_=(0,n.useCallback)(()=>{const e=!E;v||y(e),null===s||void 0===s||s(e)},[E,v,s]);return n.createElement("div",{className:l()("form-section",{"form-section--collapsible":t,"form-section--compact":m,"form-section--no-header":null==e},h),style:g},"auto"===c&&n.createElement("div",{className:"form-section__divider form-section__divider--top form-section__divider--auto"}),!0===c&&n.createElement("div",{className:"form-section__divider form-section__divider--top"}),null!=e&&n.createElement("div",{className:"form-section__header"},n.createElement("div",{className:"form-section__title",style:u},e),t&&n.createElement(r.A,{type:"text",className:"form-section__toggle",onClick:_,"aria-expanded":E,"aria-label":E?"\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0435\u043a\u0446\u0438\u044e":"\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0435\u043a\u0446\u0438\u044e"},E?n.createElement(o.A,{icon:"MinusOutlined","aria-hidden":!0}):n.createElement(o.A,{icon:"PlusOutlined","aria-hidden":!0}))),(!t||E)&&n.createElement("div",{className:"form-section__body",style:f},p),d&&n.createElement("div",{className:"form-section__divider form-section__divider--bottom"}))};s.displayName="FormSection";const c=s;var d=i(77155),m=i(85684),u=i(97531),p=i(25914),h=i(79975);const g={horizontal:"Horizontal",vertical:"Vertical",left:"Left",right:"Right",top:"Top",bottom:"Bottom",individual:"Individual padding"},f=({namePrefix:e="",typeOfForm:t="desktop",extended:i,onToggleExtended:a,showHorizontal:s=!0,max:c=300,gutter:f=10,rowStyle:v,buttonClassName:b="selected-td-form__button",formItemClassName:y="form-item-margin-xs",fieldNames:E,labels:_={}})=>{var w,C,k,A,S,I;const x={...g,..._},L="mobile"===t,N=L?"mobilePaddingLeftRight":"paddingLeftRight",T=L?"mobilePaddingLeft":"paddingLeft",B=L?"mobilePaddingRight":"paddingRight",P=L?"mobilePaddingTopBottom":"paddingTopBottom",R=L?"mobilePaddingTop":"paddingTop",F=L?"mobilePaddingBottom":"paddingBottom",O=null!==(w=null===E||void 0===E?void 0:E.paddingLeftRight)&&void 0!==w?w:e+N,M=null!==(C=null===E||void 0===E?void 0:E.paddingLeft)&&void 0!==C?C:e+T,j=null!==(k=null===E||void 0===E?void 0:E.paddingRight)&&void 0!==k?k:e+B,D=null!==(A=null===E||void 0===E?void 0:E.paddingTopBottom)&&void 0!==A?A:e+P,V=null!==(S=null===E||void 0===E?void 0:E.paddingTop)&&void 0!==S?S:e+R,W=null!==(I=null===E||void 0===E?void 0:E.paddingBottom)&&void 0!==I?I:e+F;return n.createElement(m.A,{gutter:f,style:{marginBottom:8,...v},className:"form-padding-inputs"},n.createElement(n.Fragment,null,s&&n.createElement(u.A,{flex:"1 1 0",style:{minWidth:128}},n.createElement("div",{className:"form-padding-inputs__collapsed",style:{display:i?"block":"none"}},n.createElement(p.A,{title:x.horizontal,placement:"bottom"},n.createElement("div",null,n.createElement(d.A.Item,{name:O,className:y},n.createElement(h.A,{min:0,max:c,placeholder:x.horizontal,prefix:n.createElement(o.A,{icon:"PaddingLeftRight"}),addonAfter:"px"}))))),n.createElement("div",{className:"form-padding-inputs__extended",style:{display:i?"none":"block"}},n.createElement(p.A,{trigger:["hover"],title:x.left,placement:"bottom"},n.createElement("div",null,n.createElement(d.A.Item,{name:M,className:y},n.createElement(h.A,{min:0,max:c,placeholder:x.left,prefix:n.createElement(o.A,{icon:"PaddingLeft"}),addonAfter:"px"})))),n.createElement(p.A,{trigger:["hover"],title:x.right,placement:"bottom"},n.createElement("div",null,n.createElement(d.A.Item,{name:j,className:y},n.createElement(h.A,{min:0,max:c,placeholder:x.right,prefix:n.createElement(o.A,{icon:"PaddingRight"}),addonAfter:"px"})))))),n.createElement(u.A,{flex:s?"1 1 0":"1 1 auto",style:{minWidth:128}},n.createElement("div",{className:"form-padding-inputs__collapsed",style:{display:i?"block":"none"}},n.createElement(p.A,{title:x.vertical,placement:"bottom"},n.createElement("div",null,n.createElement(d.A.Item,{name:D,className:y},n.createElement(h.A,{min:0,max:c,placeholder:x.vertical,prefix:n.createElement(o.A,{icon:"PaddingTopBottom"}),addonAfter:"px"}))))),n.createElement("div",{className:"form-padding-inputs__extended",style:{display:i?"none":"block"}},n.createElement(p.A,{trigger:["hover"],title:x.top,placement:"bottom"},n.createElement("div",null,n.createElement(d.A.Item,{name:V,className:y},n.createElement(h.A,{min:0,max:c,placeholder:x.top,prefix:n.createElement(o.A,{icon:"PaddingTop"}),addonAfter:"px"})))),n.createElement(p.A,{trigger:["hover"],title:x.bottom,placement:"bottom"},n.createElement("div",null,n.createElement(d.A.Item,{name:W,className:y},n.createElement(h.A,{min:0,max:c,placeholder:x.bottom,prefix:n.createElement(o.A,{icon:"PaddingBottom"}),addonAfter:"px"})))))),n.createElement(u.A,{flex:"none",style:{width:45}},n.createElement(p.A,{title:x.individual,placement:"bottom"},n.createElement(r.A,{"aria-label":x.individual,className:l()(b,"form-padding-inputs__toggle",{[`${b}--active`]:!i,"form-padding-inputs__toggle--active":!i}),onClick:a},n.createElement(o.A,{icon:"PaddingSwitcher","aria-hidden":!0}))))))};f.displayName="FormPaddingInputs";const v=f,b={width:"Width",height:"Height",minWidth:"Minimum width",maxWidth:"Maximum width"},y=({namePrefix:e="",typeOfForm:t="desktop",showWidth:i=!0,showHeight:a=!0,showMinMax:l=!1,maxWidth:r,dimensionSelect:s,minWidthDimensionSelect:c,maxWidthDimensionSelect:g,gutter:f=10,rowStyle:v,formItemClassName:y="form-size-inputs__form-item",fieldNames:E,labels:_={}})=>{var w,C,k,A,S,I,x;const L={...b,..._},N="mobile"===t,T=N?"mobileWidth":"width",B=N?"mobileHeight":"height",P=N?"mobileWidthDim":"widthDim",R=N?"mobileMinWidth":"minWidth",F=N?"mobileMaxWidth":"maxWidth",O=N?"mobileMinWidthDim":"minWidthDim",M=N?"mobileMaxWidthDim":"maxWidthDim",j=null!==(w=null===E||void 0===E?void 0:E.width)&&void 0!==w?w:e+T,D=null!==(C=null===E||void 0===E?void 0:E.height)&&void 0!==C?C:e+B,V=null!==(k=null===E||void 0===E?void 0:E.widthDim)&&void 0!==k?k:e+P,W=null!==(A=null===E||void 0===E?void 0:E.minWidth)&&void 0!==A?A:e+R,z=null!==(S=null===E||void 0===E?void 0:E.maxWidth)&&void 0!==S?S:e+F,H=null!==(I=null===E||void 0===E?void 0:E.minWidthDim)&&void 0!==I?I:e+O,U=null!==(x=null===E||void 0===E?void 0:E.maxWidthDim)&&void 0!==x?x:e+M,q=(i?1:0)+(a?1:0)+(l?2:0),$=q>0?Math.floor(24/q):24;return n.createElement(m.A,{gutter:f,style:v,className:"form-size-inputs"},i&&n.createElement(u.A,{span:$},n.createElement(p.A,{trigger:["hover"],title:L.width,placement:"bottom"},n.createElement(d.A.Item,{name:j,className:y},n.createElement(h.A,{min:0,max:r,placeholder:L.width,prefix:n.createElement(o.A,{icon:"ColumnWidthOutlined"}),addonAfter:s?n.createElement(d.A.Item,{name:V,noStyle:!0},s):"px"})))),a&&n.createElement(u.A,{span:$},n.createElement(p.A,{trigger:["hover"],title:L.height,placement:"bottom"},n.createElement(d.A.Item,{name:D,className:y},n.createElement(h.A,{min:0,placeholder:L.height,prefix:n.createElement(o.A,{icon:"ColumnHeightOutlined"}),addonAfter:"px"})))),l&&n.createElement(n.Fragment,null,n.createElement(u.A,{span:$},n.createElement(p.A,{trigger:["hover"],title:L.minWidth,placement:"bottom"},n.createElement(d.A.Item,{name:W,className:y},n.createElement(h.A,{min:0,placeholder:L.minWidth,prefix:n.createElement(o.A,{icon:"MinWidth"}),addonAfter:c?n.createElement(d.A.Item,{name:H,noStyle:!0},c):"px"})))),n.createElement(u.A,{span:$},n.createElement(p.A,{trigger:["hover"],title:L.maxWidth,placement:"bottom"},n.createElement(d.A.Item,{name:z,className:y},n.createElement(h.A,{min:0,placeholder:L.maxWidth,prefix:n.createElement(o.A,{icon:"MaxWidth"}),addonAfter:g?n.createElement(d.A.Item,{name:U,noStyle:!0},g):"px"}))))))};y.displayName="FormSizeInputs";const E=y;var _=i(91722),w=i(82836);const C={rtlLabel:"Right to left",ltrLabel:"Left to right"},k=({value:e,onChange:t,labels:i={},disabled:a=!1,size:r,strokeWidth:s,tooltipPlacement:c="top",className:d})=>{const m={...C,...i},[u,h]=(0,n.useState)(null!==e&&void 0!==e?e:"");(0,n.useEffect)(()=>{h(null!==e&&void 0!==e?e:"")},[e]);const g=e=>{const i=e===u?"":e;h(i),null===t||void 0===t||t(i)},f=n.createElement(_.A.Group,{disabled:a,value:u,className:"em-form-direction-control"},n.createElement(w.A,{size:8},n.createElement(p.A,{placement:c,title:m.rtlLabel},n.createElement(_.A.Button,{value:"rtl","aria-label":m.rtlLabel,onClick:()=>g("rtl")},n.createElement(o.A,{icon:"ArrowLeftOutlined",size:r,strokeWidth:s,"aria-hidden":!0}))),n.createElement(p.A,{placement:c,title:m.ltrLabel},n.createElement(_.A.Button,{value:"ltr","aria-label":m.ltrLabel,onClick:()=>g("ltr")},n.createElement(o.A,{icon:"ArrowRightOutlined",size:r,strokeWidth:s,"aria-hidden":!0}))))),v=d?n.createElement("div",{className:l()("em-form-direction-control",d)},f):f;return n.createElement(n.Fragment,null,v)};k.displayName="FormDirectionControl";const A=k,S=({children:e,directionControl:t,gutter:i=20,span:a=12,secondaryColumnAlign:r="right",className:o})=>{const s=`em-form-display-control__secondary--align-${r}`;return n.createElement(m.A,{gutter:i,className:l()("em-form-display-control",o),style:{marginBottom:10}},n.createElement(u.A,{span:a},e),t&&n.createElement(u.A,{span:a,className:s},t))};S.displayName="FormDisplayControl";const I=S;var x=i(71482),L=i(38912),N=i(83306);const T={color:"Color",width:"Width",none:"None",solid:"Solid",dashed:"Dashed",dotted:"Dotted",above:"Above",below:"Below",onLeft:"On the left",onRight:"On the right",around:"Around",usedColors:"Used",recommendedColors:"Recommended"},B=({form:e,namePrefix:t="",typeOfForm:i="desktop",fieldStructure:a="nested",borderValues:r,fieldNames:s,usedColors:c,labels:h={}})=>{var g,f;const v={...T,...h},{token:b}=(0,x.rd)(),y="flat"===a,E=y||"mobile"===i,C=y?null!==(g=null===s||void 0===s?void 0:s.position)&&void 0!==g?g:"mobileBorderPosition":t+(E?"mobileBorderPosition":"borderPosition"),k=d.A.useWatch(C,e),A=E?"mobileBorderAll":"borderAll",S=e.getFieldsValue(!0),I=e=>null!=(null===e||void 0===e?void 0:e.width)||(null===e||void 0===e?void 0:e.style)||(null===e||void 0===e?void 0:e.color);let B,P,R,F,O;if(y){var M,j,D;B=null!==(M=null===s||void 0===s?void 0:s.color)&&void 0!==M?M:"mobileBorderColor",P=null!==(j=null===s||void 0===s?void 0:s.width)&&void 0!==j?j:"mobileBorderWidth",R=null!==(D=null===s||void 0===s?void 0:s.style)&&void 0!==D?D:"mobileBorderStyle",F={borderTop:"top",borderLeft:"left",borderAll:"all",borderRight:"right",borderBottom:"bottom"},O=e=>!!I(null===r||void 0===r?void 0:r[F[e]])}else{var V;const e=k?String(k).replace(t,""):A,i={borderAll:t+(E?"mobileBorderAll":"borderAll"),borderTop:t+(E?"mobileBorderTop":"borderTop"),borderBottom:t+(E?"mobileBorderBottom":"borderBottom"),borderRight:t+(E?"mobileBorderRight":"borderRight"),borderLeft:t+(E?"mobileBorderLeft":"borderLeft")},n=null!==(V=(E?{mobileBorderAll:t+"mobileBorderAll",mobileBorderTop:t+"mobileBorderTop",mobileBorderBottom:t+"mobileBorderBottom",mobileBorderRight:t+"mobileBorderRight",mobileBorderLeft:t+"mobileBorderLeft"}:{borderAll:t+"borderAll",borderTop:t+"borderTop",borderBottom:t+"borderBottom",borderRight:t+"borderRight",borderLeft:t+"borderLeft"})[e])&&void 0!==V?V:"";B=[n,"color"],P=[n,"width"],R=[n,"style"],F=i,O=e=>!!I(S[i[e]])}const W=null!==(f=null===b||void 0===b?void 0:b.formItemMarginBottomXS)&&void 0!==f?f:8;return n.createElement(m.A,{gutter:30,className:"em-form-border-inputs"},n.createElement(u.A,{span:12,className:"em-form-border-inputs__col"},n.createElement(p.A,{placement:"bottom",title:v.color},n.createElement("div",null,n.createElement(d.A.Item,{name:B,className:"form-item-margin-xs"},n.createElement(N.A,{placeholder:v.color,usedColors:c,usedLabel:v.usedColors,recommendedLabel:v.recommendedColors})))),n.createElement(p.A,{placement:"bottom",title:v.width},n.createElement("div",null,n.createElement(d.A.Item,{name:P,className:"form-item-margin-xs"},n.createElement(L.A,{min:0,placeholder:v.width,addonAfter:"px"})))),n.createElement(d.A.Item,{name:R,className:"form-item-margin-xs"},n.createElement(_.A.Group,null,n.createElement(w.A,{size:8},n.createElement(p.A,{placement:"bottom",title:v.none},n.createElement(_.A.Button,{value:"","aria-label":v.none},n.createElement(o.A,{icon:"CloseOutlined","aria-hidden":!0}))),n.createElement(p.A,{placement:"bottom",title:v.solid},n.createElement(_.A.Button,{value:"solid","aria-label":v.solid},n.createElement(o.A,{icon:"LineOutlined","aria-hidden":!0}))),n.createElement(p.A,{placement:"bottom",title:v.dashed},n.createElement(_.A.Button,{value:"dashed","aria-label":v.dashed},n.createElement(o.A,{icon:"DashOutlined","aria-hidden":!0}))),n.createElement(p.A,{placement:"bottom",title:v.dotted},n.createElement(_.A.Button,{value:"dotted","aria-label":v.dotted},n.createElement(o.A,{icon:"SmallDashOutlined","aria-hidden":!0}))))))),n.createElement(u.A,{span:12,style:{textAlign:"center"}},n.createElement(d.A.Item,{label:"",name:C,labelCol:{span:8}},n.createElement(_.A.Group,null,n.createElement(w.A,{size:W,direction:"vertical"},n.createElement(m.A,null,n.createElement(p.A,{placement:"top",title:v.above},n.createElement(_.A.Button,{value:F.borderTop,"aria-label":v.above,style:{margin:"auto"},className:l()("em-form-border-inputs__radio",{"em-form-border-inputs__radio--active":O("borderTop")})},n.createElement(o.A,{icon:"BorderTopOutlined","aria-hidden":!0})))),n.createElement(m.A,null,n.createElement(w.A,{size:W},n.createElement(p.A,{placement:"left",title:v.onLeft},n.createElement(_.A.Button,{value:F.borderLeft,"aria-label":v.onLeft,className:l()("em-form-border-inputs__radio",{"em-form-border-inputs__radio--active":O("borderLeft")})},n.createElement(o.A,{icon:"BorderLeftOutlined","aria-hidden":!0}))),n.createElement(p.A,{placement:"top",title:v.around},n.createElement(_.A.Button,{value:F.borderAll,"aria-label":v.around,className:l()("em-form-border-inputs__radio",{"em-form-border-inputs__radio--active":O("borderAll")})},n.createElement(o.A,{icon:"BorderOuterOutlined","aria-hidden":!0}))),n.createElement(p.A,{placement:"right",title:v.onRight},n.createElement(_.A.Button,{value:F.borderRight,"aria-label":v.onRight,className:l()("em-form-border-inputs__radio",{"em-form-border-inputs__radio--active":O("borderRight")})},n.createElement(o.A,{icon:"BorderRightOutlined","aria-hidden":!0}))))),n.createElement(m.A,null,n.createElement(p.A,{placement:"bottom",title:v.below},n.createElement(_.A.Button,{value:F.borderBottom,"aria-label":v.below,className:l()("em-form-border-inputs__radio",{"em-form-border-inputs__radio--active":O("borderBottom")}),style:{margin:"auto"}},n.createElement(o.A,{icon:"BorderBottomOutlined","aria-hidden":!0})))))))))};B.displayName="FormBorderInputs";const P=B,R={borderRadius:"Border radius",topLeft:"Top left corner",topRight:"Top right corner",bottomLeft:"Bottom left corner",bottomRight:"Bottom right corner",individualCorners:"Individual corner radii"},F=({namePrefix:e="",typeOfForm:t="desktop",oneBorderRadiusValue:i,onToggle:a,borderRadiusIcon:s,labels:c={},buttonClassName:g="selected-td-form__button",formItemClassName:f="form-item-margin-xs",fieldNames:v})=>{var b,y,E,_,C;const k={...R,...c},A="mobile"===t,S=A?"mobileBorderRadiusAll":"borderRadiusAll",I=A?"mobileBorderRadiusTopLeft":"borderRadiusTopLeft",x=A?"mobileBorderRadiusTopRight":"borderRadiusTopRight",L=A?"mobileBorderRadiusBottomRight":"borderRadiusBottomRight",N=A?"mobileBorderRadiusBottomLeft":"borderRadiusBottomLeft",T=e+(null!==(b=null===v||void 0===v?void 0:v.all)&&void 0!==b?b:S),B=e+(null!==(y=null===v||void 0===v?void 0:v.topLeft)&&void 0!==y?y:I),P=e+(null!==(E=null===v||void 0===v?void 0:v.topRight)&&void 0!==E?E:x),F=e+(null!==(_=null===v||void 0===v?void 0:v.bottomRight)&&void 0!==_?_:L),O=e+(null!==(C=null===v||void 0===v?void 0:v.bottomLeft)&&void 0!==C?C:N),M=null!==s&&void 0!==s?s:n.createElement(o.A,{icon:"RadiusUpleftOutlined"});return n.createElement(m.A,{gutter:10,className:"form-border-radius-inputs",style:{marginBottom:8}},n.createElement(u.A,{span:12},n.createElement(w.A,{size:10,align:"start"},n.createElement(d.A.Item,{name:T,className:f},n.createElement(h.A,{min:0,placeholder:k.borderRadius,prefix:M,disabled:!i,addonAfter:"px"})))),n.createElement(u.A,{span:12},n.createElement(r.A,{"aria-label":k.individualCorners,className:l()(g,"form-border-radius-inputs__toggle",{[`${g}--active`]:!i,"form-border-radius-inputs__toggle--active":!i}),onClick:a},M)),n.createElement(u.A,null,n.createElement(m.A,{gutter:10},n.createElement(u.A,{span:12},n.createElement(p.A,{placement:"bottom",title:k.topLeft},n.createElement(d.A.Item,{hidden:i,name:B,className:f},n.createElement(h.A,{min:0,prefix:n.createElement(o.A,{icon:"RadiusUpleftOutlined"}),style:{minHeight:10},addonAfter:"px"}))),n.createElement(p.A,{placement:"bottom",title:k.bottomLeft},n.createElement(d.A.Item,{hidden:i,name:O,className:f},n.createElement(h.A,{min:0,prefix:n.createElement(o.A,{icon:"RadiusBottomleftOutlined"}),style:{minHeight:10},addonAfter:"px"})))),n.createElement(u.A,{span:12},n.createElement(p.A,{placement:"bottom",title:k.topRight},n.createElement(d.A.Item,{hidden:i,name:P,className:f},n.createElement(h.A,{min:0,prefix:n.createElement(o.A,{icon:"RadiusUprightOutlined"}),style:{minHeight:10},addonAfter:"px"}))),n.createElement(p.A,{placement:"bottom",title:k.bottomRight},n.createElement(d.A.Item,{hidden:i,name:F,className:f},n.createElement(h.A,{min:0,prefix:n.createElement(o.A,{icon:"RadiusBottomrightOutlined"}),style:{minHeight:10},addonAfter:"px"})))))))};F.displayName="FormBorderRadiusInputs";const O=F;var M=i(49573);const j={hOffset:"Horizontal offset",vOffset:"Vertical offset",blurRadius:"Blur radius",spreadRadius:"Spread radius",outside:"Outside",inside:"Inside",shadowDirection:"Shadow inside or outside of the element",usedColors:"Used",recommendedColors:"Recommended"},D=({namePrefix:e="",typeOfForm:t="desktop",usedColors:i,labels:a={},formItemClassName:l="form-item-margin-xs",fieldNames:r})=>{var s,c,g,f,v,b;const y={...j,...a},E="mobile"===t,_=E?"mobileBoxShadowHOffset":"boxShadowHOffset",C=E?"mobileBoxShadowVOffset":"boxShadowVOffset",k=E?"mobileBoxShadowBlurRadius":"boxShadowBlurRadius",A=E?"mobileBoxShadowSpreadRadius":"boxShadowSpreadRadius",S=E?"mobileBoxShadowColor":"boxShadowColor",I=E?"mobileBoxShadowInset":"boxShadowInset",x=e+(null!==(s=null===r||void 0===r?void 0:r.hOffset)&&void 0!==s?s:_),L=e+(null!==(c=null===r||void 0===r?void 0:r.vOffset)&&void 0!==c?c:C),T=e+(null!==(g=null===r||void 0===r?void 0:r.blurRadius)&&void 0!==g?g:k),B=e+(null!==(f=null===r||void 0===r?void 0:r.spreadRadius)&&void 0!==f?f:A),P=e+(null!==(v=null===r||void 0===r?void 0:r.color)&&void 0!==v?v:S),R=e+(null!==(b=null===r||void 0===r?void 0:r.inset)&&void 0!==b?b:I);return n.createElement(m.A,{gutter:10,className:"form-box-shadow-inputs",style:{marginBottom:8}},n.createElement(u.A,{span:12},n.createElement(p.A,{placement:"bottom",title:y.hOffset},n.createElement(d.A.Item,{name:x,className:l},n.createElement(h.A,{placeholder:y.hOffset,prefix:n.createElement(o.A,{icon:"SwapOutlined"}),addonAfter:"px"})))),n.createElement(u.A,{span:12},n.createElement(p.A,{placement:"bottom",title:y.vOffset},n.createElement(d.A.Item,{name:L,className:l},n.createElement(h.A,{placeholder:y.vOffset,prefix:n.createElement(o.A,{icon:"VerticalOffset"}),addonAfter:"px"})))),n.createElement(u.A,{span:12},n.createElement(p.A,{placement:"bottom",title:y.blurRadius},n.createElement(d.A.Item,{name:T,className:l},n.createElement(h.A,{min:0,placeholder:y.blurRadius,prefix:n.createElement(o.A,{icon:"Blur",className:"form-box-shadow-inputs__blur-icon"}),addonAfter:"px"})))),n.createElement(u.A,{span:12},n.createElement(p.A,{placement:"bottom",title:y.spreadRadius},n.createElement(d.A.Item,{name:B,className:l},n.createElement(h.A,{placeholder:y.spreadRadius,prefix:n.createElement(o.A,{icon:"ZoomOutMap"}),addonAfter:"px"})))),n.createElement(u.A,{span:12},n.createElement(w.A,{size:10,align:"start"},n.createElement(d.A.Item,{name:P,className:l},n.createElement(N.A,{usedColors:i,usedLabel:y.usedColors,recommendedLabel:y.recommendedColors})))),n.createElement(u.A,{span:12},n.createElement(p.A,{title:y.shadowDirection,key:"inset",placement:"bottom"},n.createElement(d.A.Item,{name:R,valuePropName:"value",className:l},n.createElement(M.A,{style:{width:"100%"},options:[{label:y.outside,value:!1},{label:y.inside,value:!0}]})))))};D.displayName="FormBoxShadowInputs";const V=D,W=({name:e,tooltipTitle:t,icon:i,className:a})=>{var o;const s=d.A.useFormInstance(),c=null!==(o=d.A.useWatch(e,s))&&void 0!==o&&o;return n.createElement(n.Fragment,null,n.createElement(d.A.Item,{name:e,noStyle:!0,hidden:!0},n.createElement("input",{type:"hidden"})),n.createElement(p.A,{placement:"bottom",title:t},n.createElement(r.A,{type:"text",className:l()("form-style-toggle-btn","selected-td-form__button","selected-td-form__button_style",{"selected-td-form__button--active":c},a),onClick:()=>{var t;return s.setFieldValue(e,!(null!==(t=s.getFieldValue(e))&&void 0!==t&&t))}},i)))};W.displayName="FormStyleToggleButton";const z=W;var H=i(76980),U=i(99888);const q=({name:e,label:t,className:i})=>n.createElement(d.A.Item,{className:l()("form-switch-row__item",i)},n.createElement("div",{className:"form-switch-row"},n.createElement(d.A.Item,{name:e,valuePropName:"checked",noStyle:!0},n.createElement(H.A,null)),n.createElement(U.A.Text,{className:"form-switch-row__label"},t)));q.displayName="FormSwitchRow";const $=q,Z=({name:e,label:t,usedColors:i,usedLabel:a,recommendedLabel:r,allowClear:o=!1,className:s})=>n.createElement("div",{className:l()("form-color-field",s)},n.createElement(U.A.Text,{type:"secondary",className:"form-color-field__label"},t),n.createElement(d.A.Item,{name:e,noStyle:!0},n.createElement(N.A,{className:"form-color-field__picker",allowClear:o,usedColors:i,usedLabel:a,recommendedLabel:r})));Z.displayName="FormColorField";const G=Z;var K=i(22582);const X=e=>{var t;return null!==(t=e.parentNode)&&void 0!==t?t:document.body},Y=({namePrefix:e,microLabel:t,usedColors:i,usedLabel:a,recommendedLabel:r,loadGoogleFonts:s,getPopupContainer:c=X,formatLabels:g={},inputLabels:f={},className:v})=>{var b,y,E,_,w,C,k;const A={bold:null!==(b=g.bold)&&void 0!==b?b:"Strong ( Ctrl+B )",italic:null!==(y=g.italic)&&void 0!==y?y:"Italic ( Ctrl+I )",strikethrough:null!==(E=g.strikethrough)&&void 0!==E?E:"Strikethrough ( Alt+Shift+5 )",underline:null!==(_=g.underline)&&void 0!==_?_:"Underline ( Ctrl+U )"},S={fontSize:null!==(w=f.fontSize)&&void 0!==w?w:"Font size",lineHeight:null!==(C=f.lineHeight)&&void 0!==C?C:"Line height",textColor:null!==(k=f.textColor)&&void 0!==k?k:"Text color"};return n.createElement("div",{className:l()("form-typography-fields",v)},n.createElement("div",{className:"form-typography-fields__stack"},n.createElement(U.A.Text,{type:"secondary",className:"form-typography-fields__micro-label"},t),n.createElement(p.A,{trigger:["hover"],title:"Text font",placement:"bottom",zIndex:1,getPopupContainer:e=>e.parentNode},n.createElement(d.A.Item,{name:`${e}FontFamily`,className:"form-item-margin-xs"},n.createElement(K.A,{textEditor:!0,loadGoogleFonts:s,getPopupContainer:c}))),n.createElement(m.A,{gutter:6,className:"form-typography-fields__size-row"},n.createElement(u.A,{span:12},n.createElement(p.A,{trigger:["hover"],title:S.fontSize,placement:"bottom"},n.createElement(d.A.Item,{name:`${e}FontSize`,className:"form-item-margin-xs"},n.createElement(h.A,{min:8,max:90,placeholder:S.fontSize,prefix:n.createElement(o.A,{icon:"FontSizeOutlined"}),addonAfter:"px"})))),n.createElement(u.A,{span:12},n.createElement(p.A,{trigger:["hover"],title:S.lineHeight,placement:"bottom"},n.createElement(d.A.Item,{name:`${e}LineHeight`,className:"form-item-margin-xs"},n.createElement(h.A,{min:10,max:110,placeholder:S.lineHeight,prefix:n.createElement(o.A,{icon:"LineHeightOutlined"}),addonAfter:"px"})))))),n.createElement("div",{className:"form-typography-fields__color-row"},n.createElement("div",{className:"form-typography-fields__color-wrap"},n.createElement(p.A,{trigger:["hover"],title:S.textColor,placement:"bottom",zIndex:2,getPopupContainer:e=>e.parentNode},n.createElement(d.A.Item,{name:`${e}Color`,className:"form-item-margin-xs"},n.createElement(N.A,{className:"form-typography-fields__color-picker",usedColors:i,usedLabel:a,recommendedLabel:r})))),n.createElement("div",{className:"form-typography-fields__fmt-btns"},n.createElement(z,{name:`${e}TextStrong`,tooltipTitle:A.bold,icon:n.createElement(o.A,{icon:"BoldOutlined",className:"selected-td-form__icon-radius"})}),n.createElement(z,{name:`${e}TextItalic`,tooltipTitle:A.italic,icon:n.createElement(o.A,{icon:"ItalicOutlined",className:"selected-td-form__icon-radius"})}),n.createElement(z,{name:`${e}TextStrikethrough`,tooltipTitle:A.strikethrough,icon:n.createElement(o.A,{icon:"StrikethroughOutlined",className:"selected-td-form__icon-radius"})}),n.createElement(z,{name:`${e}TextUnderline`,tooltipTitle:A.underline,icon:n.createElement(o.A,{icon:"UnderlineOutlined",className:"selected-td-form__icon-radius"})}))))};Y.displayName="FormTypographyFields";const J=Y;var Q=i(62113),ee=i(96912);function te({field:e,index:t,isOpen:i,onToggle:a,onRemove:s,canRemove:c,boundValueOptions:m,labels:u,getPopupContainer:h}){return n.createElement("div",{className:l()("form-options-list__option-block",i&&"form-options-list__option-block--open")},n.createElement("div",{className:l()("form-options-list__option-head-wrapper",i&&"form-options-list__option-head-wrapper--open")},n.createElement("button",{type:"button",className:"form-options-list__option-head","aria-expanded":i,onClick:a},n.createElement("span",{className:"form-options-list__option-head-main"},n.createElement("span",null,u.itemTitle(t+1)),n.createElement(o.A,{icon:"DownOutlined",size:16,className:l()("form-options-list__option-chevron",i&&"form-options-list__option-chevron--open")}))),c&&n.createElement(n.Fragment,null,n.createElement("span",{className:"form-options-list__option-head-divider","aria-hidden":!0}),n.createElement("div",{className:"form-options-list__option-head-delete"},n.createElement(p.A,{title:u.removeTooltip,placement:"bottom"},n.createElement(r.A,{type:"text",icon:n.createElement(o.A,{icon:"DeleteOutlined",size:16}),onClick:s}))))),i&&n.createElement("div",{className:"form-options-list__option-body"},n.createElement(d.A.Item,{name:[e.name,"title"],label:u.headingLabel},n.createElement(Q.A,{placeholder:u.headingPlaceholder,allowClear:!0})),n.createElement(d.A.Item,{name:[e.name,"boundValue"],label:u.valueTooltip?n.createElement("span",{className:"form-options-list__label-with-info"},u.valueLabel,n.createElement(p.A,{title:u.valueTooltip},n.createElement("span",{className:"form-options-list__info-icon"},n.createElement(o.A,{icon:"InfoCircleOutlined",size:12})))):u.valueLabel},n.createElement(ee.A,{className:"form-options-list__full-width",placeholder:u.valuePlaceholder,options:m,allowClear:!0,getPopupContainer:h}))))}const ie=({name:e,boundValueOptions:t,minItems:i=1,labels:a={},getPopupContainer:s,className:c})=>{var m,u,p,h,g,f,v,b;const[y,E]=(0,n.useState)(0),_={itemTitle:null!==(m=a.itemTitle)&&void 0!==m?m:e=>`Value ${e}`,headingLabel:null!==(u=a.headingLabel)&&void 0!==u?u:"Heading",valueLabel:null!==(p=a.valueLabel)&&void 0!==p?p:"Value",valueTooltip:null!==(h=a.valueTooltip)&&void 0!==h?h:null,addLabel:null!==(g=a.addLabel)&&void 0!==g?g:"Add value",removeTooltip:null!==(f=a.removeTooltip)&&void 0!==f?f:"Remove",headingPlaceholder:null!==(v=a.headingPlaceholder)&&void 0!==v?v:"Enter heading",valuePlaceholder:null!==(b=a.valuePlaceholder)&&void 0!==b?b:"Enter value"};return n.createElement("div",{className:l()("form-options-list",c)},n.createElement(d.A.List,{name:e},(e,{add:a,remove:l})=>n.createElement(n.Fragment,null,e.map((a,r)=>n.createElement(te,{key:a.key,field:a,index:r,isOpen:y===r,onToggle:()=>E(e=>e===r?-1:r),onRemove:()=>{l(a.name),E(e=>function(e,t){return e===t?Math.max(0,t-1):e>t?e-1:e}(e,r))},canRemove:e.length>i,boundValueOptions:t,labels:_,getPopupContainer:s})),n.createElement("div",{className:"form-options-list__add-wrap"},n.createElement(r.A,{type:"default",block:!0,className:"form-options-list__add-btn",icon:n.createElement(o.A,{icon:"PlusOutlined",size:16}),onClick:()=>{a({title:"",boundValue:void 0}),E(e.length)}},_.addLabel)))))};ie.displayName="FormOptionsList";const ne=ie},57572:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var n=i(25366),a=i(91722),l=i(82836),r=i(25914),o=i(16834),s=i(74572),c=i.n(s);const d={alignTop:"Align top",alignMiddle:"Center vertically",alignBottom:"Align bottom"},m=({value:e,onChange:t,disabled:i=!1,isNewIconType:s=!1,strokeWidth:m,labels:u={},tooltipTitle:p,size:h=18,tooltipPlacement:g="bottom",className:f})=>{const v={...d,...u},[b,y]=(0,n.useState)(null!==e&&void 0!==e?e:"");(0,n.useEffect)(()=>{y(null!==e&&void 0!==e?e:"")},[e]);const E=e=>{const i=e===b?"":e;y(i),null===t||void 0===t||t(i)},_=n.createElement(a.A.Group,{disabled:i,value:b,className:"em-form-vertical-align-control"},n.createElement(l.A,{size:8},n.createElement(r.A,{placement:g,title:v.alignTop},n.createElement(a.A.Button,{value:"top","aria-label":v.alignTop,onClick:()=>E("top")},n.createElement(o.A,{icon:s?"NewVerticalAlignTop":"AlignVerticalTop",size:h,strokeWidth:m,"aria-hidden":!0}))),n.createElement(r.A,{placement:g,title:v.alignMiddle},n.createElement(a.A.Button,{value:"middle","aria-label":v.alignMiddle,onClick:()=>E("middle")},n.createElement(o.A,{icon:s?"NewVerticalAlignCenter":"AlignVerticalCenter",size:h,strokeWidth:m,"aria-hidden":!0}))),n.createElement(r.A,{placement:g,title:v.alignBottom},n.createElement(a.A.Button,{value:"bottom","aria-label":v.alignBottom,onClick:()=>E("bottom")},n.createElement(o.A,{icon:s?"NewVerticalAlignBottom":"AlignVerticalBottom",size:h,strokeWidth:m,"aria-hidden":!0})))));let w=_;return p&&(w=n.createElement(r.A,{placement:g,title:p},n.createElement("span",{style:{display:"inline-block"}},_))),f&&(w=n.createElement("div",{className:c()("em-form-vertical-align-control",f)},w)),n.createElement(n.Fragment,null,w)};m.displayName="FormVerticalAlignControl";const u=m},83306:(e,t,i)=>{"use strict";i.d(t,{t:()=>u,A:()=>g});var n=i(25366),a=i(84661),l=i(83910),r=i(62113),o=i(85684),s=i(97531),c=i(84586),d=i(16834);const m={height:"auto"};function u(e){return n.createElement("svg",Object.assign({width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0},e),n.createElement("path",{d:"M9.99999 5.99998L5.99999 9.99998M5.99999 5.99998L9.99999 9.99998M14.6667 7.99998C14.6667 11.6819 11.6819 14.6666 7.99999 14.6666C4.3181 14.6666 1.33333 11.6819 1.33333 7.99998C1.33333 4.31808 4.3181 1.33331 7.99999 1.33331C11.6819 1.33331 14.6667 4.31808 14.6667 7.99998Z",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round"}))}const p=["#000000","#595959","#BFBFBF","#E5E5E5","#F5F5F5","#F5222D","#FA8C16","#FADB14","#8BBB11","#52C41A","#13A8A8","#1677FF","#2F54EB"],h=(0,n.forwardRef)(({id:e,onChange:t,value:i,externalValue:h,placeholder:g="Select color",disabled:f=!1,usedColors:v=[],recommendedColors:b=p,getPopupContainer:y,allowClear:E=!0,placement:_="bottomLeft",usedLabel:w="Used",recommendedLabel:C="Recommended",className:k,style:A,showEyeDropper:S=!0},I)=>{const[x]=(0,n.useState)(()=>"function"===typeof globalThis.EyeDropper),L=(0,n.useRef)(null),N=(0,n.useRef)(h),T=(0,n.useCallback)(e=>{null===t||void 0===t||t(e)},[t]),B=(0,n.useCallback)(e=>{T(e.toHexString().toUpperCase())},[T]);(0,n.useEffect)(()=>{void 0!==h&&h!==N.current&&T(h),N.current=h},[h,T]);const P=(0,n.useCallback)(async()=>{const e=globalThis.EyeDropper;if(e)try{const t=await(new e).open();T(t.sRGBHex.toUpperCase())}catch{}},[T]),R=S&&x,F=(0,n.useMemo)(()=>[{label:w,colors:[...new Set(v)]},{label:C,colors:[...new Set(b)]}],[w,v,C,b]),O=(0,n.useCallback)((e,{components:{Picker:t,Presets:i}})=>n.createElement(o.A,{justify:"space-between",wrap:!1},n.createElement(s.A,{flex:"auto"},n.createElement("div",{className:"color-picker-input__panel-picker-stack"+(R?" color-picker-input__panel-picker-stack--dropper":"")},n.createElement(t,null),R?n.createElement("div",{className:"color-picker-input__eyedropper-slot"},n.createElement(c.A,{size:"small",className:"color-picker-input__eyedropper-btn",icon:n.createElement(d.A,{icon:"Eyedropper"}),"aria-label":"\u041f\u0438\u043f\u0435\u0442\u043a\u0430",onClick:P})):null)),n.createElement(l.A,{type:"vertical",style:m}),n.createElement(s.A,{span:8},n.createElement(i,null))),[R,P]),M=(0,n.useCallback)(e=>{T(e.target.value)},[T]),j=!String(null!==i&&void 0!==i?i:"").trim(),D=""===i||null==i?void 0:i;return n.createElement("div",{ref:I,className:["color-picker-input",k].filter(Boolean).join(" "),style:A},n.createElement("div",{className:"color-picker-input__control-wrap"+(j?" color-picker-input__empty":"")},n.createElement(a.A,{disabledAlpha:!0,disabledFormat:!0,format:"hex",defaultFormat:"hex",getPopupContainer:y,placement:_,autoAdjustOverflow:!0,className:"color-picker-input__btn-wrap",rootClassName:"verticalColorpicker",value:D,onChange:B,panelRender:O,disabled:f,presets:F}),n.createElement(r.A,{allowClear:!(!E||j)&&{clearIcon:n.createElement(u,null)},id:e,disabled:f,className:"color-picker-input__control",placeholder:g,value:i,ref:L,onChange:M})))});h.displayName="ColorPickerInput";const g=h},22582:(e,t,i)=>{"use strict";i.d(t,{A:()=>m});var n=i(25366),a=i(49679),l=i(20092),r=i(998);const o=e=>{var t,i;const n=null===e||void 0===e?void 0:e.closest(".blocks-app");return n||(null!==(t=null===e||void 0===e||null===(i=e.ownerDocument)||void 0===i?void 0:i.body)&&void 0!==t?t:document.body)};function s(e,t,i,n){return e.filter(e=>e.subsets.some(e=>i.includes(e))&&e.category===t&&e.popularity<n)}function c(e){return e.map(e=>({label:e.family,value:e.family,children:Object.keys(e.fonts).filter(e=>r.f5[e]).map(e=>({label:r.f5[e],value:r.f5[e]}))}))}const d=({value:e,onChange:t,textEditor:i=!1,safeFonts:d,googleFontsData:m,loadGoogleFonts:u,loading:p,getPopupContainer:h=o,style:g,placement:f="bottomRight",labels:v,filterOptions:b})=>{var y,E;const[_,w]=(0,n.useState)(),[C,k]=(0,n.useState)(e),[A,S]=(0,n.useState)(null),[I,x]=(0,n.useState)(!!u),L=(0,n.useMemo)(()=>({...r.xr,...v}),[v]),N=null!==(y=null===b||void 0===b?void 0:b.subsets)&&void 0!==y?y:r.It.subsets,T=null!==(E=null===b||void 0===b?void 0:b.maxPopularity)&&void 0!==E?E:r.It.maxPopularity,B=null!==d&&void 0!==d?d:r.Jn,P=null!==m&&void 0!==m?m:A,R=null!==p&&void 0!==p?p:I;(0,n.useEffect)(()=>{if(!u||m)return;let e=!1;return x(!0),u().then(t=>{e||(S(t),x(!1))}).catch(()=>{e||x(!1)}),()=>{e=!0}},[u,m]);const{filteredSansSerif:F,filteredSerif:O}=(0,n.useMemo)(()=>P?{filteredSansSerif:s(P.familyMetadataList,r.g4,N,T),filteredSerif:s(P.familyMetadataList,r.cP,N,T)}:{filteredSansSerif:[],filteredSerif:[]},[P,N,T]);(0,n.useEffect)(()=>{if(P){if(i&&e!==C)if(e)if(e[1]===r.g4){var t,n;w([r.Xr,r.g4,null!==(t=null===(n=F.find(t=>(null===t||void 0===t?void 0:t.family.replace(/\s/g,""))===String(e[2]).replace(/\s/g,"")))||void 0===n?void 0:n.family)&&void 0!==t?t:"",String(e[3]).replace(/Italic/g," Italic")])}else if(e[1]===r.cP){var a,l;w([r.Xr,r.cP,null!==(a=null===(l=O.find(t=>(null===t||void 0===t?void 0:t.family.replace(/\s/g,""))===String(e[2]).replace(/\s/g,"")))||void 0===l?void 0:l.family)&&void 0!==a?a:"",String(e[3]).replace(/Italic/g," Italic")])}else e[0]!==r.Tg&&void 0!==_||w(e);else w([""]);else void 0===_&&C&&w(e);i||w(e),k(e)}},[e,P,i,C,_,F,O]);const M=(0,n.useMemo)(()=>c(F),[F]),j=(0,n.useMemo)(()=>c(O),[O]),D=(0,n.useMemo)(()=>{if(R)return[{label:n.createElement(l.A,{size:"small",style:{marginLeft:8}}),value:"loading",disabled:!0}];const e=[{label:L.safeFonts,value:r.Tg,children:B}];return P&&e.push({label:L.googleFonts,value:r.Xr,children:[{label:L.sansSerif,value:r.g4,children:M},{label:L.serif,value:r.cP,children:j}]}),e},[R,L,B,P,M,j]),V=(0,n.useCallback)((e,i)=>{const n=e.filter(e=>null!=e);null===t||void 0===t||t(n,i)},[t]),W=(0,n.useCallback)(e=>{var t,i;const n=o(e),a=null===h||void 0===h?void 0:h(e),l=null!==a&&void 0!==a?a:n,r=null===(t=e.ownerDocument)||void 0===t||null===(i=t.defaultView)||void 0===i?void 0:i.getComputedStyle(l);return null!=r&&("hidden"===r.overflowX||"clip"===r.overflowX||"hidden"===r.overflow||"clip"===r.overflow)?n:l},[h]);return n.createElement(a.A,{allowClear:!1,showSearch:!0,value:_,placement:f,popupClassName:"control-font-family-dropdown",options:D,getPopupContainer:W,onChange:V,style:g})};d.displayName="ControlFontFamily";const m=d},79975:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(25366),a=i(38912);const l=n.forwardRef(({dragspeed:e=1,...t},i)=>{const[l,r]=(0,n.useState)(!1),[o,s]=(0,n.useState)(0),[c,d]=(0,n.useState)(t.value||t.defaultValue||null),[m,u]=(0,n.useState)(t.value||t.defaultValue||null),p=()=>r(!1),h=(0,n.useCallback)(i=>{if(l){const n=i.clientX-o;let a=(c||0)+n*e;a=Math.max(0,Math.round(a)),void 0!==t.max&&(a=Math.min(a,Number(t.max))),void 0!==t.min&&(a=Math.max(a,Number(t.min))),u(a),t.onChange&&t.onChange(a)}},[l,t.onChange,t.max,t.min,c,o,e]);return(0,n.useEffect)(()=>{void 0!==t.value&&null!==t.value?u(t.value):void 0!==t.defaultValue&&null!==t.defaultValue?u(t.defaultValue):u(null)},[t.value,t.defaultValue]),(0,n.useEffect)(()=>(document.addEventListener("mouseup",p),document.addEventListener("mousemove",h),()=>{document.removeEventListener("mouseup",p),document.removeEventListener("mousemove",h)}),[l,o,c,h]),n.createElement("div",{role:"none",onMouseDown:e=>{var t;const i=e.target;i.hasAttribute("class")&&null!==(t=i.className)&&void 0!==t&&t.includes("ant-input-number-affix-wrapper")&&(r(!0),s(e.clientX),d(m))}},n.createElement(a.A,Object.assign({},t,{ref:i,value:m,className:"input-draggable"})),l&&n.createElement("div",{role:"none",className:"draggable-input-number-overlay",onMouseUp:p}))})},66872:(e,t,i)=>{"use strict";i.d(t,{A:()=>m});var n=i(25366),a=i(52989),l=i(62113),r=i(96912),o=i(82836),s=i(25914),c=i(998);const{Option:d}=r.A,m=({options:e,position:t,setPosition:i,unit:m,setUnit:u,placeholder:p="",prefix:h="",dropdownStyle:g,tooltipTitle:f,tooltipPlacement:v="bottom",getTooltipPopupContainer:b})=>{const y=(0,n.useCallback)(t=>{if(!t)return!0;if(w(t)){return parseFloat(t)>=0}if(e&&e.length>0){return e.map(e=>"string"===typeof e?e:e.value).some(e=>String(e).toLowerCase().includes(t.toLowerCase()))}return!0},[e]),E=(0,n.useCallback)(e=>{y(e)&&i(e)},[i,y]),_=(0,n.useCallback)(e=>{u(e)},[u]),w=e=>!!e&&(!isNaN(parseFloat(e))&&isFinite(parseFloat(e))),C={width:w(t)?c.yz:c.I1,height:c.jw},k={width:c.uZ},A=(0,n.useCallback)((e,t)=>{var i;if(w(e)){var n;const e=String(null!==(n=null===t||void 0===t?void 0:t.value)&&void 0!==n?n:"");return w(e)&&parseFloat(e)>=0}return String(null!==(i=null===t||void 0===t?void 0:t.value)&&void 0!==i?i:"").toUpperCase().includes(e.toUpperCase())},[]),S=null!==e&&void 0!==e?e:[],I=n.createElement(o.A.Compact,null,n.createElement(a.A,{className:"custom-autocomplete",onChange:E,options:S,style:C,filterOption:A,value:t,dropdownStyle:g},n.createElement(l.A,{value:t,placeholder:p,prefix:h,onKeyDown:t=>{if(!c.qW.includes(t.key)&&!/[\d.]/.test(t.key))if(e&&e.length>0){e.some(e=>{const i="string"===typeof e?e:e.value;return String(i).toLowerCase().includes(t.key.toLowerCase())})||t.preventDefault()}else t.preventDefault()}})),w(t)&&n.createElement(r.A,{className:"select-after",style:k,value:m,onChange:_},n.createElement(d,{value:"px"},"px"),n.createElement(d,{value:"%"},"%")));return f?n.createElement(s.A,{trigger:["hover"],title:f,placement:v,getPopupContainer:b},n.createElement("div",null,I)):I}},1172:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(33350),l=i(998);const r=({text:e,exceeded:t=!1,color:i=l.OT,exceededColor:r=l.MS,className:o,style:s,extra:c})=>{const d=["limits-counter-wrapper",o].filter(Boolean).join(" ");return n.createElement("div",{className:d,style:s},n.createElement(a.A,{bordered:!1,text:e,className:"limits-counter"+(t?" limits-counter--exceeded":""),color:t?r:i}),c&&n.createElement("div",{className:"limits-counter-extra"},c))}},86682:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(25366),a=i(91722),l=i(25914);const r=({value:e,defaultValue:t="",onChange:i,options:r,tooltipPlacement:o="top",className:s})=>n.createElement(a.A.Group,{value:e,defaultValue:t,onChange:i,className:`radio-color-filter ${null!==s&&void 0!==s?s:""}`.trim()},r.map(e=>n.createElement(l.A,{key:e.value,title:e.label,placement:o},n.createElement(a.A.Button,{value:e.value,className:e.colorClass,"aria-label":e.label}))));r.displayName="RadioColorFilter";const o=r},38344:(e,t,i)=>{"use strict";i.d(t,{A:()=>h});var n=i(25366),a=i(74572),l=i.n(a),r=i(84586);const o=(0,n.createContext)(null),s=(0,n.forwardRef)(({children:e,className:t,style:i},a)=>n.createElement("span",{ref:a,className:l()("panel-form__header-title",t),style:i},e));s.displayName="PanelForm.HeaderTitle";const c=(0,n.forwardRef)(({children:e,title:t,extra:i,onClose:a,closeIcon:s,className:c,style:d},m)=>{const u=(0,n.useId)(),p=(0,n.useContext)(o);return(0,n.useEffect)(()=>{if(null!=t&&p)return p(u),()=>p("")},[t,u,p]),n.createElement("div",{ref:m,className:l()("panel-form__header",c),style:d},n.createElement("div",{className:"panel-form__header-content",id:t?u:void 0},null==t?e:n.createElement("span",{className:"panel-form__header-title"},t)),n.createElement("div",{className:"panel-form__header-spacer"}),i&&n.createElement("div",{className:"panel-form__header-extra"},i),a&&n.createElement(r.A,{type:"text",className:"panel-form__close-btn","aria-label":"Close",icon:s,onClick:a}))});function d(e){if(void 0===e)return;if("number"===typeof e)return 0===e?{padding:0}:{padding:`0 ${e}px`};const t=e.horizontal,i=e.vertical;if(void 0===t&&void 0===i)return;const n={};return void 0!==t&&(n.paddingLeft=`${t}px`,n.paddingRight=`${t}px`),void 0!==i&&(n.paddingTop=`${i}px`,n.paddingBottom=`${i}px`),Object.keys(n).length?n:void 0}c.displayName="PanelForm.Header";const m=(0,n.forwardRef)(({children:e,padding:t,disableScroll:i=!1,className:a,style:r},o)=>{var s;return n.createElement("div",{ref:o,className:l()("panel-form__body",{"panel-form__body--no-scroll":i},a),style:r},n.createElement("div",{className:"panel-form__body-content",style:null!==(s=d(t))&&void 0!==s?s:void 0},e))});m.displayName="PanelForm.Body";const u=(0,n.forwardRef)(({children:e,className:t,style:i},a)=>n.createElement("div",{ref:a,className:l()("panel-form__footer",t),style:i},e));u.displayName="PanelForm.Footer";const p=(0,n.forwardRef)(({width:e,children:t,className:i,style:a,"aria-labelledby":r},s)=>{const[c,d]=(0,n.useState)(""),m="small"===e||"medium"===e||"large"===e,u=m||null==e?void 0:{width:"number"===typeof e?`${e}px`:e,maxWidth:"100%"},p=null!==r&&void 0!==r?r:c||void 0;return n.createElement(o.Provider,{value:d},n.createElement("div",{ref:s,role:"region","aria-labelledby":p,className:l()("panel-form",m&&`panel-form--${e}`,i),style:{...u,...a}},t))});p.displayName="PanelForm";const h=Object.assign(p,{Header:c,HeaderTitle:s,Body:m,Footer:u})},69028:(e,t,i)=>{"use strict";var n=i(25366),a=i(16250);const l=e=>n.createElement(a.A,e);l.Ribbon=a.A.Ribbon,l.displayName="Badge"},35501:(e,t,i)=>{"use strict";i(25366)},23404:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(75465);const l=n.forwardRef((e,t)=>n.createElement(a.A,Object.assign({ref:t},e)));l.displayName="Card",l.Meta=a.A.Meta,l.Grid=a.A.Grid;const r=l},73538:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(60236);const l=e=>n.createElement(a.A,e);l.displayName="Comment";const r=l},64676:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>c});var n=i(25366),a=i(392),l=i(74572),r=i.n(l);const o={default:a.A.PRESENTED_IMAGE_DEFAULT,simple:a.A.PRESENTED_IMAGE_SIMPLE,hidden:n.createElement(n.Fragment,null)},s=({variant:e="default",image:t,description:i,className:l,...s})=>{const c=void 0!==t?t:o[e],d="hidden"===e?"":i;return n.createElement(a.A,Object.assign({image:c,description:d,className:r()("hidden"===e&&"empty--hidden",l)},s))};s.displayName="Empty";a.A.PRESENTED_IMAGE_DEFAULT,a.A.PRESENTED_IMAGE_SIMPLE;const c=s},18126:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(80390);const l=e=>n.createElement(a.A,e);l.PreviewGroup=a.A.PreviewGroup,l.displayName="Image";const r=l},98044:(e,t,i)=>{"use strict";i.d(t,{C:()=>l,A:()=>o});var n=i(25366),a=i(53053);const l="list__item-borderless",r=e=>n.createElement(a.A,e);r.Item=a.A.Item;const o=r},10720:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(58050);const l=({status:e,centered:t,className:i,...l})=>{const r=function(e){if(null==e)return;const t=Number(e);return!Number.isNaN(t)&&[403,404,500].includes(t)?String(t):e}(e),o=[i,t?"result--centered":null].filter(Boolean).join(" ");return n.createElement(a.Ay,Object.assign({},l,{status:r,className:o||void 0}))};l.displayName="Result";const r=l},43938:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(50831);const l=e=>n.createElement(a.A,e);l.Button=a.A.Button,l.Avatar=a.A.Avatar,l.Input=a.A.Input,l.Image=a.A.Image,l.Node=a.A.Node;const r=l},21502:(e,t,i)=>{"use strict";i.d(t,{dK:()=>l.A,bs:()=>d,zj:()=>c,Ay:()=>u});var n=i(25366),a=i(32109),l=i(56716),r=i(74572),o=i.n(r),s=i(16834);const c="table__selectedRow",d={container:"table__container",selectedRow:c,columnHeader:"table__columnHeader",columnHeaderSortActive:"table__columnHeader--sortActive",columnHeaderLabel:"table__columnHeaderLabel",filterIcon:"table__filterIcon",fileNameCol:"table__fileNameCol",fileNameColWide:"table__fileNameCol table__fileNameCol--wide",fileName:"table__fileName",fileNameRow:"table__fileNameRow",lockInline:"table__lockInline",title:"table__title",fileItemCount:"table__fileItemCount",fileDate:"table__fileDate",tableMenu:"table__tableMenu",avatarActions:"table__avatarActions",paginationWrapper:"table__paginationWrapper"},m=e=>n.createElement(a.A,e);m.Container=({className:e,children:t,...i})=>n.createElement("div",Object.assign({className:o()(d.container,e)},i),t),m.PaginationWrapper=({className:e,children:t,...i})=>n.createElement("div",Object.assign({className:o()(d.paginationWrapper,e)},i),t),m.ColumnHeader=({label:e,isActive:t=!1,isAsc:i=!1,onClick:a,icon:l})=>n.createElement("div",{className:o()(d.columnHeader,{[d.columnHeaderSortActive]:t}),onClick:a,style:{cursor:a?"pointer":"inherit"},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),null===a||void 0===a||a())},role:a?"button":void 0,tabIndex:a?0:void 0},n.createElement("span",{className:d.columnHeaderLabel},e),n.createElement("span",{className:o()(d.filterIcon,{[`${d.filterIcon}--active`]:t,[`${d.filterIcon}--asc`]:t&&i,[`${d.filterIcon}--desc`]:t&&!i})},null!==l&&void 0!==l?l:n.createElement(s.A,{icon:"BarChart03Icon",size:18,strokeWidth:2}))),m.CLASS_NAMES=d;const u=m},33350:(e,t,i)=>{"use strict";i.d(t,{X:()=>l,A:()=>r});var n=i(25366),a=i(34335);const l=({text:e,children:t,...i})=>n.createElement(a.A.CheckableTag,i,t||e||""),r=({text:e,children:t,...i})=>n.createElement(a.A,i,t||e||"")},52989:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(35380);const l=e=>e.parentNode,r=n.forwardRef(({getPopupContainer:e=l,...t},i)=>n.createElement(a.A,Object.assign({ref:i,getPopupContainer:e},t)))},49679:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(25366),a=i(48331);const l=e=>e.parentNode,r=n.forwardRef(({getPopupContainer:e=l,...t},i)=>n.createElement(a.A,Object.assign({ref:i,getPopupContainer:e},t)));r.SHOW_PARENT=a.A.SHOW_PARENT,r.SHOW_CHILD=a.A.SHOW_CHILD;const o=r},73378:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(25366),a=i(40507);const l=({children:e,onCheckedChange:t,onChange:i,loading:l=!1,disabled:r,...o})=>n.createElement(a.A,Object.assign({},o,{disabled:r||l,onChange:e=>{null===i||void 0===i||i(e),null===t||void 0===t||t(e.target.checked)}}),e)},84661:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(52875);const l=e=>n.createElement(a.A,e);l.displayName="ColorPicker";const r=l},61801:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(84359);const l=n.forwardRef((e,t)=>n.createElement(a.A,Object.assign({ref:t},e)));l.displayName="DatePicker";const r=l},77155:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(12105);i(54529);const a=n.A},62113:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(25366),a=i(9534),l=i(7099);const r=n.forwardRef((e,t)=>n.createElement(a.A,Object.assign({ref:t},e)));r.TextArea=a.A.TextArea,r.Password=l.A,r.Search=a.A.Search,r.Group=a.A.Group;const o=r},38912:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(97293);const l=n.forwardRef((e,t)=>n.createElement(a.A,Object.assign({ref:t},e)));l.displayName="InputNumber";const r=l},21244:(e,t,i)=>{"use strict";i(25366);i(9534).A.OTP},7099:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(25366),a=i(9534);const l=n.forwardRef((e,t)=>n.createElement(a.A.Password,Object.assign({ref:t},e)))},91722:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var n=i(25366),a=i(58693),l=i(74572),r=i.n(l);const o=({className:e,...t})=>n.createElement(a.Ay.Group,Object.assign({className:r()("em-radio",e)},t));o.displayName="Radio.Group";const s=Object.assign(e=>n.createElement(a.Ay,Object.assign({className:r()("em-radio",e.className)},e)),{Group:o,Button:a.Ay.Button});s.displayName="Radio";const c=s},32483:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(25366),a=i(9534);const l=n.forwardRef((e,t)=>n.createElement(a.A.Search,Object.assign({ref:t},e)))},96912:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(25366),a=i(49890);const l=e=>e.parentNode,r=n.forwardRef(({getPopupContainer:e=l,...t},i)=>n.createElement(a.A,Object.assign({ref:i,getPopupContainer:e},t)));r.Option=a.A.Option,r.OptGroup=a.A.OptGroup;const o=r},76980:(e,t,i)=>{"use strict";i.d(t,{A:()=>d});var n=i(25366),a=i(10464),l=i(74572),r=i.n(l),o=i(82836);i(54529);const s={default:"",editorMode:"ant-switch_editor-mode",mobile:"ant-switch_mobile"},c=n.forwardRef(({variant:e="default",className:t,label:i,labelSize:l="default",labelStyle:c,labelClassName:d,id:m,...u},p)=>{const h=(0,n.useId)(),g=null!==m&&void 0!==m?m:h,f="small"===l?"ant-form-item-switch-label-small":"ant-form-item-switch-label",v=n.createElement(a.A,Object.assign({ref:p,id:i?g:m,className:r()(s[e],t)},u));return i?n.createElement(o.A,{size:8,align:"baseline"},v,n.createElement("div",{className:r()(f,d),style:c},n.createElement("label",{htmlFor:g},i))):v});c.displayName="Switch";const d=c},43083:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(25366),a=i(9534);const l=n.forwardRef((e,t)=>n.createElement(a.A.TextArea,Object.assign({ref:t},e)))},31374:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(36436);const l=e=>n.createElement(a.A,e);l.Dragger=a.A.Dragger,l.displayName="Upload";const r=l},17733:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(93268);const l=e=>n.createElement(a.A,e);l.displayName="Alert";const r=l},20702:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(25366),a=i(26811),l=i(74572),r=i.n(l);const o=({className:e,centered:t=!0,rootClassName:i,...l})=>n.createElement(a.A,Object.assign({className:r()("em-modal",e),centered:t,rootClassName:r()("blocks-app",i)},l));o.displayName="Modal";const s=o},4451:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(25366),a=i(66294),l=i(74572),r=i.n(l);const o=({classNames:e,...t})=>{const i="object"===typeof e&&null!==e?{...e,root:r()("em-popconfirm",e.root)}:{root:"em-popconfirm"};return n.createElement(a.A,Object.assign({classNames:i},t))};o.displayName="Popconfirm";const s=o},56827:(e,t,i)=>{"use strict";var n=i(25366),a=i(65759);const l=e=>n.createElement(a.A,e);l.displayName="Progress"},20092:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(25366),a=i(49572),l=i(16834);const r={small:16,default:24,large:48},o=({indicator:e,size:t="default",...i})=>{const o=n.createElement(l.A,{icon:"LoadingOutlined",style:{fontSize:r[t]||24},spin:!0});return n.createElement(a.A,Object.assign({indicator:null!==e&&void 0!==e?e:o,size:t},i))}},25914:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(25366),a=i(78359);const l=n.forwardRef((e,t)=>n.createElement(a.A,Object.assign({ref:t},e)))},13891:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(94093);const l=e=>n.createElement(a.A,e);l.displayName="App",l.useApp=a.A.useApp;const r=l},84586:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(25366),a=i(84613);const l=n.forwardRef((e,t)=>n.createElement(a.Ay,Object.assign({ref:t},e)))},16834:(e,t,i)=>{"use strict";i.d(t,{A:()=>er});var n={};i.r(n),i.d(n,{AimOutlined:()=>ii,ArrowLeftAntd:()=>Fe,ArrowLeftOutlined:()=>Oe,ArrowRightOutlined:()=>Me,BoldOutlined:()=>at,BorderBottomOutlined:()=>gt,BorderLeftOutlined:()=>ft,BorderOuterOutlined:()=>ut,BorderRightOutlined:()=>ht,BorderTopOutlined:()=>pt,BugOutlined:()=>ai,BuildOutlined:()=>ni,CalendarOutlined:()=>ti,CheckCircleFilled:()=>At,CheckCircleOutlined:()=>St,CheckOutlined:()=>tt,CloseCircleFilled:()=>It,CloseOutlined:()=>it,ColumnHeightOutlined:()=>mt,ColumnWidthOutlined:()=>dt,CommentOutlined:()=>Zt,CopyOutlined:()=>Je,CreditCardOutlined:()=>li,DashOutlined:()=>wt,DeleteOutlined:()=>Ye,DesktopOutlined:()=>Qt,EditOutlined:()=>Xe,EllipsisOutlined:()=>$e,ExclamationCircleOutlined:()=>xt,EyeInvisibleOutlined:()=>Ft,FileImageOutlined:()=>jt,FileOutlined:()=>Ot,FilePdfOutlined:()=>Dt,FileTextOutlined:()=>Mt,FileWordOutlined:()=>Vt,FileZipOutlined:()=>Wt,FolderOutlined:()=>zt,FontSizeOutlined:()=>st,HomeOutlined:()=>ri,InboxOutlined:()=>Ht,InfoCircleOutlined:()=>Lt,ItalicOutlined:()=>lt,LineHeightOutlined:()=>ct,LineOutlined:()=>_t,LinkOutlined:()=>Ut,LoadingOutlined:()=>kt,LockOutlined:()=>Pt,LoginOutlined:()=>je,LogoutOutlined:()=>De,MailOutlined:()=>qt,MenuFoldOutlined:()=>He,MenuOutlined:()=>ze,MenuUnfoldOutlined:()=>Ue,MinusOutlined:()=>et,MobileOutlined:()=>ei,MoreOutlined:()=>qe,PhoneOutlined:()=>$t,PicLeftOutlined:()=>Ge,PlayCircleOutlined:()=>Yt,PlusOutlined:()=>Qe,RadiusBottomleftOutlined:()=>yt,RadiusBottomrightOutlined:()=>Et,RadiusUpleftOutlined:()=>vt,RadiusUprightOutlined:()=>bt,ReloadOutlined:()=>oi,RightCircleOutlined:()=>Jt,RightSquareOutlined:()=>si,RollbackOutlined:()=>Ve,SettingOutlinedAntd:()=>ci,SkypeOutlined:()=>Gt,SmallDashOutlined:()=>Ct,SnippetsOutlined:()=>nt,SplitCellsOutlined:()=>Ke,StrikethroughOutlined:()=>ot,SwapOutlined:()=>We,UnderlineOutlined:()=>rt,UnlockOutlined:()=>Rt,UnorderedListOutlined:()=>Ze,UserAddOutlined:()=>Tt,UserOutlined:()=>Nt,UsergroupAddOutlined:()=>Bt,VideoCameraOutlined:()=>Kt,YoutubeOutlined:()=>Xt});var a={};i.r(a),i.d(a,{AI:()=>sl,AMP:()=>cl,AlignCenterOutlined:()=>ba,AlignHorizontalCenter:()=>wa,AlignHorizontalLeft:()=>_a,AlignHorizontalRight:()=>Ca,AlignLeftOutlined:()=>va,AlignRightOutlined:()=>ya,AlignVerticalBottom:()=>Sa,AlignVerticalCenter:()=>Aa,AlignVerticalTop:()=>ka,Anchor:()=>ta,AnnotationQuestionIcon:()=>Dl,ArrowLeftOutlined:()=>Ba,AtSignIcon:()=>wl,Atom:()=>Na,AutoMode:()=>il,BarChart03Icon:()=>Xl,BellRinging04Icon:()=>Vl,Block:()=>La,CheckCircleVerified:()=>ll,Close:()=>Ra,CloudDownloadOutlined:()=>Ja,CloudUploadOutlined:()=>Ya,Code:()=>ol,CodeBrowserIcon:()=>Cl,Column:()=>Ia,CommentOutlined:()=>fl,Copy06Icon:()=>kl,CopyOutlined:()=>ja,CreditCard02Icon:()=>Wl,DarkMode:()=>tl,DeleteOutlined:()=>Da,DotsHoriz:()=>hl,DotsVerticalIcon:()=>Al,DownOutlined:()=>Fa,Edit:()=>Ma,ElementAccordion:()=>ga,ElementButton:()=>aa,ElementCarousel:()=>fa,ElementCountdown:()=>ua,ElementDivider:()=>ca,ElementForm:()=>ha,ElementImage:()=>la,ElementImageAI:()=>ra,ElementListUL:()=>sa,ElementSocial:()=>da,ElementSpacer:()=>oa,ElementTable:()=>ma,ElementText:()=>ia,ElementTitle:()=>na,ElementVideo:()=>pa,Email:()=>dl,EyeOutlined:()=>Za,FileQuestion02Icon:()=>zl,FlipBackwardIcon:()=>Sl,FolderIcon:()=>Il,FolderPlusIcon:()=>Hl,Globe02Icon:()=>xl,GoToParent:()=>Pa,Grid01Icon:()=>Ll,Group:()=>xa,HistoryOutlined:()=>qa,Image:()=>rl,ImageAdd:()=>za,ImageUserIcon:()=>Tl,InfoCircleIcon:()=>Bl,Justify:()=>Ea,LifeBuoy02Icon:()=>Ul,LightMode:()=>el,ListViewIcon:()=>Yl,Lock:()=>nl,LogOut01Icon:()=>ql,Mail02Icon:()=>Nl,MessageChatSquareIcon:()=>$l,PanelLeft:()=>Ta,PlusCircleOutlined:()=>Wa,PlusIcon:()=>Zl,RedoOutlined:()=>Ua,RefreshCcw05Icon:()=>Gl,RightOutlined:()=>Oa,Rocket02Icon:()=>Kl,SaveOutlined:()=>Va,SearchSmIcon:()=>Pl,SendOutlined:()=>Ga,Server05Icon:()=>Rl,SettingOutlined:()=>gl,Settings04Icon:()=>Fl,ShareAltOutlined:()=>Ka,ShieldTickIcon:()=>Ol,SliderAdaptive:()=>El,SliderBlocks:()=>yl,SliderGroup:()=>vl,SliderMagic:()=>_l,SliderTemplates:()=>bl,Speed:()=>ul,Styles:()=>pl,Sun:()=>Qa,SyncOutlined:()=>$a,Target:()=>ml,UnLock:()=>al,UndoOutlined:()=>Ha,User03Icon:()=>Ml,Users02Icon:()=>jl,Web:()=>Xa});var l=i(25366),r=i(77627),o=i(15051),s=i(4461),c=i(6443),d=i(6185),m=i(13988),u=i(63397),p=i(15977),h=i(42283),g=i(60419),f=i(73534),v=i(63097),b=i(19176),y=i(38250),E=i(96235),_=i(61726),w=i(68361),C=i(11231),k=i(90670),A=i(96620),S=i(92680),I=i(75356),x=i(7923),L=i(68191),N=i(75690),T=i(23953),B=i(42596),P=i(81117),R=i(39525),F=i(74597),O=i(65510),M=i(83816),j=i(41494),D=i(53290),V=i(36670),W=i(27048),z=i(66273),H=i(62630),U=i(5728),q=i(61516),$=i(78335),Z=i(50910),G=i(87402),K=i(8504),X=i(50462),Y=i(79708),J=i(32210),Q=i(75081),ee=i(8012),te=i(3943),ie=i(40017),ne=i(4087),ae=i(93987),le=i(81927),re=i(84542),oe=i(96648),se=i(87715),ce=i(56351),de=i(92878),me=i(64890),ue=i(64715),pe=i(17750),he=i(39593),ge=i(86032),fe=i(12014),ve=i(87302),be=i(30111),ye=i(6567),Ee=i(92421),_e=i(88681),we=i(2415),Ce=i(99777),ke=i(95739),Ae=i(91219),Se=i(49476),Ie=i(76871),xe=i(73450),Le=i(93934),Ne=i(26758),Te=i(24816),Be=i(29639),Pe=i(78429),Re=i(58193);const Fe=e=>l.createElement(o.A,e),Oe=e=>l.createElement(o.A,e),Me=e=>l.createElement(s.A,e),je=e=>l.createElement(c.A,e),De=e=>l.createElement(d.A,e),Ve=e=>l.createElement(m.A,e),We=e=>l.createElement(u.A,e),ze=e=>l.createElement(p.A,e),He=e=>l.createElement(h.A,e),Ue=e=>l.createElement(g.A,e),qe=e=>l.createElement(f.A,e),$e=e=>l.createElement(v.A,e),Ze=e=>l.createElement(b.A,e),Ge=e=>l.createElement(y.A,e),Ke=e=>l.createElement(E.A,e),Xe=e=>l.createElement(_.A,e),Ye=e=>l.createElement(w.A,e),Je=e=>l.createElement(C.A,e),Qe=e=>l.createElement(k.A,e),et=e=>l.createElement(A.A,e),tt=e=>l.createElement(S.A,e),it=e=>l.createElement(I.A,e),nt=e=>l.createElement(x.A,e),at=e=>l.createElement(L.A,e),lt=e=>l.createElement(N.A,e),rt=e=>l.createElement(T.A,e),ot=e=>l.createElement(B.A,e),st=e=>l.createElement(P.A,e),ct=e=>l.createElement(R.A,e),dt=e=>l.createElement(F.A,e),mt=e=>l.createElement(O.A,e),ut=e=>l.createElement(M.A,e),pt=e=>l.createElement(j.A,e),ht=e=>l.createElement(D.A,e),gt=e=>l.createElement(V.A,e),ft=e=>l.createElement(W.A,e),vt=e=>l.createElement(z.A,e),bt=e=>l.createElement(H.A,e),yt=e=>l.createElement(U.A,e),Et=e=>l.createElement(q.A,e),_t=e=>l.createElement($.A,e),wt=e=>l.createElement(Z.A,e),Ct=e=>l.createElement(G.A,e),kt=e=>l.createElement(K.A,e),At=e=>l.createElement(X.A,e),St=e=>l.createElement(Y.A,e),It=e=>l.createElement(J.A,e),xt=e=>l.createElement(Q.A,e),Lt=e=>l.createElement(ee.A,e),Nt=e=>l.createElement(te.A,e),Tt=e=>l.createElement(ie.A,e),Bt=e=>l.createElement(ne.A,e),Pt=e=>l.createElement(ae.A,e),Rt=e=>l.createElement(le.A,e),Ft=e=>l.createElement(re.A,e),Ot=e=>l.createElement(oe.A,e),Mt=e=>l.createElement(se.A,e),jt=e=>l.createElement(ce.A,e),Dt=e=>l.createElement(de.A,e),Vt=e=>l.createElement(me.A,e),Wt=e=>l.createElement(ue.A,e),zt=e=>l.createElement(pe.A,e),Ht=e=>l.createElement(he.A,e),Ut=e=>l.createElement(ge.A,e),qt=e=>l.createElement(fe.A,e),$t=e=>l.createElement(ve.A,e),Zt=e=>l.createElement(be.A,e),Gt=e=>l.createElement(ye.A,e),Kt=e=>l.createElement(Ee.A,e),Xt=e=>l.createElement(_e.A,e),Yt=e=>l.createElement(we.A,e),Jt=e=>l.createElement(Ce.A,e),Qt=e=>l.createElement(ke.A,e),ei=e=>l.createElement(Ae.A,e),ti=e=>l.createElement(Se.A,e),ii=e=>l.createElement(Ie.A,e),ni=e=>l.createElement(xe.A,e),ai=e=>l.createElement(Le.A,e),li=e=>l.createElement(Ne.A,e),ri=e=>l.createElement(Te.A,e),oi=e=>l.createElement(Be.A,e),si=e=>l.createElement(Pe.A,e),ci=e=>l.createElement(Re.A,e);var di=i(4495),mi=i(33152),ui=i(61043),pi=i(67765),hi=i(83496),gi=i(25988),fi=i(86671),vi=i(42060),bi=i(14411),yi=i(35602),Ei=i(52631),_i=i(86251),wi=i(75971),Ci=i(43587),ki=i(5958),Ai=i(47603),Si=i(52),Ii=i(45371),xi=i(50409),Li=i(47281),Ni=i(8599),Ti=i(72234),Bi=i(36474),Pi=i(46251),Ri=i(88083),Fi=i(76172),Oi=i(45246),Mi=i(62610),ji=i(96992),Di=i(58711),Vi=i(50741),Wi=i(37179),zi=i(33084),Hi=i(9441),Ui=i(45841),qi=i(54231),$i=i(74386),Zi=i(52183),Gi=i(56466),Ki=i(53916),Xi=i(59223),Yi=i(32607),Ji=i(71014),Qi=i(4947),en=i(32517),tn=i(19615),nn=i(42085),an=i(6931),ln=i(82363),rn=i(81594),on=i(61698),sn=i(114),cn=i(83285),dn=i(39768),mn=i(5115),un=i(79755),pn=i(65745),hn=i(48174),gn=i(47086),fn=i(35967),vn=i(30066),bn=i(52312),yn=i(79513),En=i(6072),_n=i(37802),wn=i(27941),Cn=i(60282),kn=i(11964),An=i(86514),Sn=i(46539),In=i(59893),xn=i(62648),Ln=i(79865),Nn=i(93869),Tn=i(99842),Bn=i(35430),Pn=i(28816),Rn=i(31249),Fn=i(29505),On=i(7490),Mn=i(83227),jn=i(27240),Dn=i(97100),Vn=i(91503),Wn=i(36108),zn=i(59922),Hn=i(38995),Un=i(59415),qn=i(76919),$n=i(51996),Zn=i(46668),Gn=i(69063),Kn=i(36067),Xn=i(91382),Yn=i(7956),Jn=i(34435),Qn=i(11306),ea=i(26458);const ta=e=>{var t;return l.createElement(di.M,Object.assign({size:null!==(t=e.size)&&void 0!==t?t:18},e))},ia=e=>l.createElement(mi.T,e),na=e=>l.createElement(ui.M,e),aa=e=>l.createElement(pi.Y,e),la=e=>l.createElement(hi.p,e),ra=e=>l.createElement(gi.B,e),oa=e=>l.createElement(fi.y,e),sa=e=>l.createElement(vi.B,e),ca=e=>l.createElement(bi.c,e),da=e=>l.createElement(yi.h,e),ma=e=>l.createElement(Ei.W,e),ua=e=>l.createElement(_i.M,e),pa=e=>l.createElement(wi.u,e),ha=e=>l.createElement(Ci.k,e),ga=e=>l.createElement(ki.f,e),fa=e=>l.createElement(Ai.G,e),va=e=>l.createElement(mi.T,e),ba=e=>l.createElement(Si.x,e),ya=e=>l.createElement(Ii.G,e),Ea=e=>l.createElement(xi.m,e),_a=e=>l.createElement(Li.k,e),wa=e=>l.createElement(Ni.U,e),Ca=e=>l.createElement(Ti.R,e),ka=e=>l.createElement(Bi.D,e),Aa=e=>l.createElement(Pi.Q,e),Sa=e=>l.createElement(Ri.e,e),Ia=e=>l.createElement(Fi.x,e),xa=e=>l.createElement(Oi.L,e),La=e=>l.createElement(Mi.H,e),Na=e=>l.createElement(ji.l,e),Ta=e=>l.createElement(Di.Y,e),Ba=e=>l.createElement(Vi.M,e),Pa=e=>l.createElement(Wi.A,e),Ra=e=>l.createElement(zi.X,e),Fa=e=>l.createElement(Hi.y,e),Oa=e=>l.createElement(Ui.c,e),Ma=e=>l.createElement(qi.s,e),ja=e=>l.createElement($i.N,e),Da=e=>l.createElement(Zi._,e),Va=e=>l.createElement(Gi.p,e),Wa=e=>l.createElement(Ki.f,e),za=e=>l.createElement(Xi.e,e),Ha=e=>l.createElement(Yi.u,e),Ua=e=>l.createElement(Ji.p,e),qa=e=>l.createElement(Qi.Q,e),$a=e=>l.createElement(en.w,e),Za=e=>l.createElement(tn.k,e),Ga=e=>l.createElement(nn.E,e),Ka=e=>l.createElement(yi.h,e),Xa=e=>l.createElement(an.m,e),Ya=e=>l.createElement(ln.C,e),Ja=e=>l.createElement(rn.P,e),Qa=e=>l.createElement(on.b,e),el=e=>l.createElement(on.b,e),tl=e=>l.createElement(sn.Z,e),il=e=>l.createElement(cn.U,e),nl=e=>l.createElement(dn.R,e),al=e=>l.createElement(mn.k,e),ll=e=>l.createElement(un.C,e),rl=e=>l.createElement(hi.p,e),ol=e=>l.createElement(pn.a,e),sl=e=>l.createElement(hn.T,e),cl=e=>l.createElement(gn.H,e),dl=e=>l.createElement(fn.M,e),ml=e=>l.createElement(vn.$,e),ul=e=>l.createElement(bn.d,e),pl=e=>l.createElement(yn.O,e),hl=e=>l.createElement(En.F,e),gl=e=>l.createElement(_n.T,e),fl=e=>l.createElement(wn.w,e),vl=e=>l.createElement(Cn.F,e),bl=e=>l.createElement(kn.T,e),yl=e=>l.createElement(An.r,e),El=e=>l.createElement(Sn.I,e),_l=e=>l.createElement(In.W,e),wl=e=>l.createElement(xn.T,e),Cl=e=>l.createElement(Ln.A,e),kl=e=>l.createElement(Nn.G,e),Al=e=>l.createElement(Tn.t,e),Sl=e=>l.createElement(Bn.n,e),Il=e=>l.createElement(Pn.v,e),xl=e=>{var t;return l.createElement(Rn.I,Object.assign({size:null!==(t=e.size)&&void 0!==t?t:18},e))},Ll=e=>l.createElement(Fn.g,e),Nl=e=>l.createElement(fn.M,e),Tl=e=>l.createElement(On.v,e),Bl=e=>l.createElement(Mn.d,e),Pl=e=>l.createElement(jn.V,e),Rl=e=>l.createElement(Dn.r,e),Fl=e=>l.createElement(Vn._,e),Ol=e=>l.createElement(Wn.L,e),Ml=e=>l.createElement(zn.h,e),jl=e=>l.createElement(Cn.F,e),Dl=e=>l.createElement(Hn.y,e),Vl=e=>l.createElement(Un.U,e),Wl=e=>l.createElement(qn.O,e),zl=e=>l.createElement($n.z,e),Hl=e=>l.createElement(Zn.J,e),Ul=e=>l.createElement(Gn.M,e),ql=e=>l.createElement(Kn.O,e),$l=e=>l.createElement(Xn.$,e),Zl=e=>l.createElement(Yn.F,e),Gl=e=>l.createElement(Jn.u,e),Kl=e=>l.createElement(Qn.B,e),Xl=e=>l.createElement(ea.D,e),Yl=e=>l.createElement(vi.B,e),Jl={...n,...r,...a,generationAI:r.GenerationAI,"users-02":jl,"mail-02":Nl,"grid-01":Ll},Ql=({svgString:e,...t})=>l.createElement("span",Object.assign({},t,{dangerouslySetInnerHTML:{__html:e}})),er=({icon:e,configIcons:t,...i})=>{if(null!==t&&void 0!==t&&t[e])return l.createElement(Ql,Object.assign({svgString:t[e]},i));const n=Jl[e];return n?l.createElement(n,i):null}},77627:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AIRequests:()=>Re,AddImage:()=>et,AddSlide:()=>St,AppstoreAddOutlined:()=>Ue,AppstoreOutlined:()=>$e,AutoRenewal:()=>s,BgPositionHorizontal:()=>S,BgPositionVertical:()=>x,Blur:()=>$,BorderOuterOutlined:()=>ze,BorderRadius:()=>ei,BuildOutlined:()=>Ge,Button:()=>rt,CalendarDays:()=>Ne,ChatGpt:()=>r,CheckCircleOutlined:()=>Ve,ChevronDownCustom:()=>Vt,ClearChat:()=>Et,CloseAll:()=>Nt,CloseOutlined:()=>Je,CloseTag:()=>xt,Colorize:()=>dt,CreateBlock:()=>ii,Crescent:()=>z,DarkWhite:()=>E,DesignerMode:()=>bt,Drop:()=>b,EditorMode:()=>ft,ElamaLogo:()=>bi,ElementListOL:()=>J,ElementTextAI:()=>ae,EmailConfirmation:()=>at,EmailEnvelope:()=>xe,EmailGeneration:()=>Be,EnableAutoPayment:()=>d,Eyedropper:()=>ut,FolderOpen:()=>Jt,GenerationAI:()=>ue,GroupArrow:()=>Bt,Import:()=>de,LandscapeView:()=>O,LayoutCol1:()=>ai,LayoutCol2:()=>ri,LayoutCol2WideLeft:()=>si,LayoutCol2WideRight:()=>di,LayoutCol3:()=>ui,LayoutCol4:()=>hi,Link03:()=>jt,MaxWidth:()=>k,MenuProfileAccountSettings:()=>u,MenuProfileBilling:()=>h,MenuProfileSignOut:()=>f,MergeTags:()=>it,MinWidth:()=>w,MixedView:()=>R,NewEmail:()=>se,NewVerticalAlignBottom:()=>Gt,NewVerticalAlignCenter:()=>$t,NewVerticalAlignTop:()=>Xt,Optimization:()=>je,OrderedListOutlined:()=>ee,PaddingBottom:()=>we,PaddingLeft:()=>ke,PaddingLeftRight:()=>fe,PaddingRight:()=>Se,PaddingSwitcher:()=>be,PaddingTop:()=>Ee,PaddingTopBottom:()=>he,Paragraph:()=>X,PortraitView:()=>j,Reload:()=>kt,Replacer:()=>ht,SaveBlock:()=>fi,SearchOutlined:()=>Xe,SquareView:()=>V,Subscript:()=>zt,Superscript:()=>Ut,Table:()=>st,Tests:()=>Oe,Trash03:()=>Rt,Typograf:()=>re,UnorderedListOutlined:()=>ie,UpTo:()=>N,VerticalOffset:()=>B,Vimeo:()=>U,WebHook:()=>wt,XCircleClearIcon:()=>Ot,ZoomOutMap:()=>G});var n=i(25366),a=i(61451);const l=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"chat-gpt",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M11.1396 4.91121C11.2741 4.50723 11.3208 4.07922 11.2764 3.65577C11.2321 3.23232 11.0979 2.82323 10.8827 2.45587C10.5636 1.90021 10.0763 1.46028 9.49105 1.19955C8.90578 0.938823 8.2528 0.870777 7.62631 1.00523C7.34374 0.68679 6.99643 0.432375 6.60757 0.259023C6.21871 0.0856726 5.79733 -0.00261924 5.3716 5.91632e-05C4.7311 -0.00148674 4.10665 0.200409 3.58828 0.576642C3.06991 0.952872 2.68442 1.484 2.48737 2.09345C2.07011 2.17886 1.67592 2.35242 1.33117 2.60252C0.98642 2.85261 0.699078 3.17346 0.488376 3.5436C0.166798 4.09773 0.02953 4.73964 0.0963679 5.37684C0.163206 6.01401 0.430694 6.61347 0.860259 7.08879C0.725757 7.49277 0.679098 7.92078 0.723405 8.34423C0.767712 8.76768 0.901962 9.17676 1.11717 9.54414C1.43623 10.0998 1.92355 10.5397 2.50882 10.8004C3.09409 11.0611 3.74707 11.1292 4.37353 10.9948C4.6561 11.3132 5.00344 11.5676 5.39227 11.741C5.78113 11.9143 6.20251 12.0026 6.62824 11.9999C7.26907 12.0016 7.89385 11.7996 8.4124 11.4232C8.93098 11.0467 9.31654 10.5152 9.51343 9.90537C9.93067 9.81996 10.3249 9.64641 10.6696 9.3963C11.0144 9.14622 11.3017 8.82534 11.5124 8.4552C11.8336 7.90113 11.9705 7.25937 11.9035 6.62244C11.8365 5.98551 11.569 5.38632 11.1396 4.91121ZM6.6292 11.2155C6.10315 11.2162 5.59363 11.032 5.18968 10.695C5.20789 10.6851 5.23984 10.6676 5.26066 10.6548L7.64998 9.27468C7.70995 9.24057 7.75975 9.1911 7.79425 9.13134C7.82878 9.07158 7.84675 9.00372 7.84633 8.93475V5.56626L8.85625 6.1494C8.86153 6.15204 8.86609 6.15594 8.86954 6.16077C8.87296 6.1656 8.87512 6.17121 8.87587 6.17706V8.96667C8.87512 9.5625 8.63824 10.1337 8.21713 10.5552C7.79602 10.9768 7.225 11.2142 6.6292 11.2155ZM1.79754 9.15192C1.53405 8.69664 1.43908 8.16321 1.52927 7.64496C1.54701 7.65561 1.578 7.67454 1.60024 7.68732L3.98956 9.06744C4.04911 9.10224 4.11685 9.1206 4.18582 9.1206C4.25476 9.1206 4.3225 9.10224 4.38205 9.06744L7.29916 7.38309V8.54937C7.29949 8.55531 7.29835 8.56128 7.29583 8.56668C7.29331 8.57208 7.2895 8.57679 7.28473 8.58036L4.86937 9.97491C4.35274 10.2725 3.73915 10.3529 3.16327 10.1986C2.58738 10.0443 2.09621 9.66789 1.79754 9.15192ZM1.16898 3.93582C1.43133 3.47994 1.8457 3.13092 2.33951 2.94981C2.33951 2.97039 2.33833 3.00684 2.33833 3.03213V5.7924C2.33791 5.86134 2.35586 5.92914 2.39033 5.98887C2.42479 6.04857 2.47454 6.09801 2.53445 6.13212L5.45155 7.81626L4.44166 8.39937C4.43668 8.40267 4.43095 8.40465 4.42501 8.40519C4.41907 8.40573 4.41307 8.4048 4.40758 8.40246L1.992 7.00671C1.47626 6.70803 1.10001 6.21705 0.945726 5.64138C0.791445 5.06574 0.871731 4.45239 1.16898 3.93582ZM9.46636 5.86668L6.54922 4.18233L7.55914 3.59943C7.56412 3.59616 7.56985 3.59415 7.57579 3.59361C7.58173 3.59307 7.5877 3.59403 7.59319 3.59637L10.0088 4.99092C10.3789 5.2047 10.6804 5.51946 10.878 5.89839C11.0757 6.27732 11.1613 6.7047 11.1248 7.13052C11.0884 7.55634 10.9313 7.96296 10.6721 8.30277C10.4129 8.64258 10.0623 8.90151 9.66127 9.04923C9.66127 9.02841 9.66127 8.99199 9.66127 8.96667V6.2064C9.66184 6.13758 9.64408 6.06984 9.60982 6.01014C9.57556 5.95044 9.52606 5.90094 9.46636 5.86668ZM10.4715 4.35384C10.4538 4.34295 10.4228 4.32426 10.4006 4.31151L8.01121 2.93136C7.95166 2.89662 7.88395 2.87829 7.81498 2.87829C7.74604 2.87829 7.6783 2.89662 7.61875 2.93136L4.70164 4.61574V3.44946C4.70131 3.44349 4.70245 3.43755 4.70497 3.43215C4.70749 3.42675 4.7113 3.42204 4.71607 3.41847L7.13143 2.02508C7.50145 1.81171 7.9246 1.70813 8.35135 1.72645C8.7781 1.74477 9.19078 1.88423 9.54118 2.12852C9.89155 2.37282 10.1651 2.71184 10.3299 3.10593C10.4946 3.50001 10.5438 3.93285 10.4715 4.35384ZM4.15258 6.43257L3.14242 5.84943C3.13714 5.84679 3.13255 5.84289 3.12913 5.83806C3.12571 5.83323 3.12352 5.82762 3.1228 5.82174V3.03213C3.12307 2.60489 3.24505 2.18654 3.47443 1.82609C3.70384 1.46563 4.03117 1.17798 4.41811 0.996792C4.80505 0.815607 5.23558 0.748392 5.65933 0.80301C6.08311 0.857628 6.48253 1.03182 6.81088 1.3052C6.79267 1.31514 6.76096 1.33265 6.7399 1.34542L4.35058 2.72555C4.29061 2.75963 4.24084 2.80907 4.20631 2.86878C4.17181 2.92848 4.15384 2.99631 4.15423 3.06525L4.15258 6.43257ZM4.70116 5.24973L6.0004 4.49934L7.29961 5.24925V6.74955L6.0004 7.49949L4.70116 6.74955V5.24973Z"})),r=e=>n.createElement(a.A,Object.assign({component:l},e)),o=()=>n.createElement("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:"false","data-icon":"auto-renewal","aria-hidden":"true"},n.createElement("path",{d:"M3.36686 3.36662L4.7002 2.03328M4.7002 2.03328L3.36686 0.699951M4.7002 2.03328H3.36686C1.8941 2.03328 0.700195 3.22719 0.700195 4.69995M11.3669 11.3666L10.0335 12.7M10.0335 12.7L11.3669 14.0333M10.0335 12.7H11.3669C12.8396 12.7 14.0335 11.506 14.0335 10.0333M6.15955 3.69995C6.60359 1.97472 8.16969 0.699951 10.0335 0.699951C12.2427 0.699951 14.0335 2.49081 14.0335 4.69995C14.0335 6.56378 12.7588 8.12987 11.0336 8.57392M8.70019 10.0333C8.70019 12.2424 6.90933 14.0333 4.7002 14.0333C2.49106 14.0333 0.700195 12.2424 0.700195 10.0333C0.700195 7.82415 2.49106 6.03328 4.7002 6.03328C6.90933 6.03328 8.70019 7.82415 8.70019 10.0333Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),s=e=>n.createElement(a.A,Object.assign({component:o},e)),c=()=>n.createElement("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:"false","data-icon":"enable-auto-payment","aria-hidden":"true"},n.createElement("path",{d:"M14.0326 6.7571V7.37043C14.0317 8.80805 13.5662 10.2069 12.7054 11.3583C11.8447 12.5098 10.6347 13.3521 9.25612 13.7597C7.87751 14.1673 6.40406 14.1184 5.05553 13.6202C3.70701 13.1219 2.55566 12.2012 1.77319 10.9951C0.99073 9.78912 0.61908 8.36248 0.71367 6.92798C0.80826 5.49348 1.36402 4.12798 2.29807 3.03515C3.23212 1.94231 4.49441 1.18069 5.89668 0.863864C7.29895 0.54704 8.76606 0.691992 10.0792 1.2771M14.0326 2.03328L7.36589 8.70662L5.36589 6.70662",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),d=e=>n.createElement(a.A,Object.assign({component:c},e)),m=()=>n.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:"false","data-icon":"menu-profile-account-settings","aria-hidden":"true"},n.createElement("path",{d:"M5.99967 10.3333H4.99968C4.0693 10.3333 3.60411 10.3333 3.22558 10.4482C2.37331 10.7067 1.70637 11.3736 1.44783 12.2259C1.33301 12.6044 1.33301 13.0696 1.33301 14M9.66634 5C9.66634 6.65685 8.3232 8 6.66634 8C5.00949 8 3.66634 6.65685 3.66634 5C3.66634 3.34315 5.00949 2 6.66634 2C8.3232 2 9.66634 3.34315 9.66634 5ZM7.33301 14L9.40058 13.4093C9.49959 13.381 9.54909 13.3668 9.59526 13.3456C9.63626 13.3268 9.67524 13.3039 9.71161 13.2772C9.75257 13.2471 9.78897 13.2107 9.86178 13.1379L14.1664 8.83336C14.6266 8.37311 14.6266 7.62689 14.1664 7.16665C13.7061 6.70642 12.9599 6.70642 12.4997 7.16666L8.19512 11.4712C8.12231 11.544 8.0859 11.5804 8.05583 11.6214C8.02914 11.6578 8.0062 11.6967 7.98737 11.7377C7.96617 11.7839 7.95203 11.8334 7.92374 11.9324L7.33301 14Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),u=e=>n.createElement(a.A,Object.assign({component:m},e)),p=()=>n.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:"false","data-icon":"menu-profile-billing","aria-hidden":"true"},n.createElement("path",{d:"M14.6663 6.66671H1.33301M7.33301 9.33337H3.99967M1.33301 5.46671L1.33301 10.5334C1.33301 11.2801 1.33301 11.6535 1.47833 11.9387C1.60616 12.1896 1.81014 12.3935 2.06102 12.5214C2.34624 12.6667 2.7196 12.6667 3.46634 12.6667L12.533 12.6667C13.2797 12.6667 13.6531 12.6667 13.9383 12.5214C14.1892 12.3936 14.3932 12.1896 14.521 11.9387C14.6663 11.6535 14.6663 11.2801 14.6663 10.5334V5.46671C14.6663 4.71997 14.6663 4.3466 14.521 4.06139C14.3932 3.8105 14.1892 3.60653 13.9383 3.4787C13.6531 3.33337 13.2797 3.33337 12.533 3.33337L3.46634 3.33337C2.7196 3.33337 2.34624 3.33337 2.06102 3.4787C1.81014 3.60653 1.60616 3.8105 1.47833 4.06139C1.33301 4.3466 1.33301 4.71997 1.33301 5.46671Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),h=e=>n.createElement(a.A,Object.assign({component:p},e)),g=()=>n.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:"false","data-icon":"menu-profile-sign-out","aria-hidden":"true"},n.createElement("path",{d:"M10.6667 11.3333L14 8M14 8L10.6667 4.66667M14 8H6M6 2H5.2C4.0799 2 3.51984 2 3.09202 2.21799C2.7157 2.40973 2.40973 2.71569 2.21799 3.09202C2 3.51984 2 4.07989 2 5.2V10.8C2 11.9201 2 12.4802 2.21799 12.908C2.40973 13.2843 2.71569 13.5903 3.09202 13.782C3.51984 14 4.0799 14 5.2 14H6",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),f=e=>n.createElement(a.A,Object.assign({component:g},e)),v=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"drop-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M6 0L5.61832 0.458015C5.61832 0.458015 4.64123 1.6355 3.64886 3.09924C3.15268 3.83206 2.64123 4.63168 2.25955 5.40458C1.87787 6.17748 1.60306 6.91794 1.60306 7.60305C1.60306 10.0191 3.58397 12 6 12C8.41603 12 10.397 10.0191 10.397 7.60305C10.397 6.91794 10.1221 6.17748 9.74046 5.40458C9.35878 4.63168 8.84733 3.83206 8.35115 3.09924C7.35878 1.6355 6.38168 0.458015 6.38168 0.458015L6 0ZM6 1.57252C6.27291 1.91031 6.78436 2.50954 7.55726 3.64885C8.03817 4.35687 8.50382 5.1374 8.85497 5.84733C9.20611 6.55725 9.41985 7.21374 9.41985 7.60305C9.41985 9.48664 7.88359 11.0229 6 11.0229C4.11642 11.0229 2.58016 9.48664 2.58016 7.60305C2.58016 7.21374 2.7939 6.55725 3.14504 5.84733C3.49619 5.1374 3.96184 4.35687 4.44275 3.64885C5.21565 2.50954 5.7271 1.91031 6 1.57252ZM3.55726 7.60305C3.55726 8.94466 4.6584 10.0458 6 10.0458V9.0687C5.19084 9.0687 4.53436 8.41221 4.53436 7.60305H3.55726Z"})),b=e=>n.createElement(a.A,Object.assign({component:v},e)),y=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"dark-white",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M0 6C0 2.68629 2.68629 0 6 0C9.31339 0 12 2.68661 12 6C12 9.31339 9.31339 12 6 12C2.68629 12 0 9.31371 0 6ZM6 10.9821C8.75089 10.9821 10.9821 8.75089 10.9821 6C10.9821 3.24911 8.75089 1.01786 6 1.01786V10.9821Z"})),E=e=>n.createElement(a.A,Object.assign({component:y},e)),_=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"min-width-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M1.35714 1.07143H0.607143C0.548214 1.07143 0.5 1.11964 0.5 1.17857V1.92857C0.5 1.9875 0.548214 2.03571 0.607143 2.03571H1.35714C1.41607 2.03571 1.46429 1.9875 1.46429 1.92857V1.17857C1.46429 1.11964 1.41607 1.07143 1.35714 1.07143ZM1.35714 3.29464H0.607143C0.548214 3.29464 0.5 3.34286 0.5 3.40178V4.15178C0.5 4.21071 0.548214 4.25893 0.607143 4.25893H1.35714C1.41607 4.25893 1.46429 4.21071 1.46429 4.15178V3.40178C1.46429 3.34286 1.41607 3.29464 1.35714 3.29464ZM1.35714 7.74107H0.607143C0.548214 7.74107 0.5 7.78928 0.5 7.84821V8.59821C0.5 8.65714 0.548214 8.70536 0.607143 8.70536H1.35714C1.41607 8.70536 1.46429 8.65714 1.46429 8.59821V7.84821C1.46429 7.78928 1.41607 7.74107 1.35714 7.74107ZM1.35714 9.96428H0.607143C0.548214 9.96428 0.5 10.0125 0.5 10.0714V10.8214C0.5 10.8804 0.548214 10.9286 0.607143 10.9286H1.35714C1.41607 10.9286 1.46429 10.8804 1.46429 10.8214V10.0714C1.46429 10.0125 1.41607 9.96428 1.35714 9.96428ZM1.35714 5.51786H0.607143C0.548214 5.51786 0.5 5.56607 0.5 5.625V6.375C0.5 6.43393 0.548214 6.48214 0.607143 6.48214H1.35714C1.41607 6.48214 1.46429 6.43393 1.46429 6.375V5.625C1.46429 5.56607 1.41607 5.51786 1.35714 5.51786Z"}),n.createElement("path",{d:"M11.3571 1.07143H10.6071C10.5482 1.07143 10.5 1.11964 10.5 1.17857V1.92857C10.5 1.9875 10.5482 2.03571 10.6071 2.03571H11.3571C11.4161 2.03571 11.4643 1.9875 11.4643 1.92857V1.17857C11.4643 1.11964 11.4161 1.07143 11.3571 1.07143ZM11.3571 3.29464H10.6071C10.5482 3.29464 10.5 3.34286 10.5 3.40178V4.15178C10.5 4.21071 10.5482 4.25893 10.6071 4.25893H11.3571C11.4161 4.25893 11.4643 4.21071 11.4643 4.15178V3.40178C11.4643 3.34286 11.4161 3.29464 11.3571 3.29464ZM11.3571 7.74107H10.6071C10.5482 7.74107 10.5 7.78928 10.5 7.84821V8.59821C10.5 8.65714 10.5482 8.70536 10.6071 8.70536H11.3571C11.4161 8.70536 11.4643 8.65714 11.4643 8.59821V7.84821C11.4643 7.78928 11.4161 7.74107 11.3571 7.74107ZM11.3571 9.96428H10.6071C10.5482 9.96428 10.5 10.0125 10.5 10.0714V10.8214C10.5 10.8804 10.5482 10.9286 10.6071 10.9286H11.3571C11.4161 10.9286 11.4643 10.8804 11.4643 10.8214V10.0714C11.4643 10.0125 11.4161 9.96428 11.3571 9.96428ZM11.3571 5.51786H10.6071C10.5482 5.51786 10.5 5.56607 10.5 5.625V6.375C10.5 6.43393 10.5482 6.48214 10.6071 6.48214H11.3571C11.4161 6.48214 11.4643 6.43393 11.4643 6.375V5.625C11.4643 5.56607 11.4161 5.51786 11.3571 5.51786Z"}),n.createElement("path",{d:"M11 5.51786H8.20535V4.67679C8.20535 4.59644 8.1116 4.5509 8.04865 4.60045L6.33973 5.95045C6.32816 5.95939 6.3188 5.97086 6.31236 5.98397C6.30592 5.99709 6.30257 6.01151 6.30257 6.02612C6.30257 6.04074 6.30592 6.05516 6.31236 6.06827C6.3188 6.08139 6.32816 6.09286 6.33973 6.10179L8.04732 7.45179C8.11026 7.50135 8.20401 7.45715 8.20401 7.37545V6.48215H11V5.51786Z"}),n.createElement("path",{d:"M1 5.51786H3.79465V4.67679C3.79465 4.59644 3.8884 4.5509 3.95135 4.60045L5.66027 5.95045C5.67184 5.95939 5.6812 5.97086 5.68764 5.98397C5.69408 5.99709 5.69743 6.01151 5.69743 6.02612C5.69743 6.04074 5.69408 6.05516 5.68764 6.06827C5.6812 6.08139 5.67184 6.09286 5.66027 6.10179L3.95268 7.45179C3.88974 7.50135 3.79599 7.45715 3.79599 7.37545V6.48215H1V5.51786Z"})),w=e=>n.createElement(a.A,Object.assign({component:_},e)),C=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"max-width-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M1.35714 1.07143H0.607143C0.548214 1.07143 0.5 1.11964 0.5 1.17857V1.92857C0.5 1.9875 0.548214 2.03571 0.607143 2.03571H1.35714C1.41607 2.03571 1.46429 1.9875 1.46429 1.92857V1.17857C1.46429 1.11964 1.41607 1.07143 1.35714 1.07143ZM1.35714 3.29464H0.607143C0.548214 3.29464 0.5 3.34286 0.5 3.40178V4.15178C0.5 4.21071 0.548214 4.25893 0.607143 4.25893H1.35714C1.41607 4.25893 1.46429 4.21071 1.46429 4.15178V3.40178C1.46429 3.34286 1.41607 3.29464 1.35714 3.29464ZM1.35714 7.74107H0.607143C0.548214 7.74107 0.5 7.78928 0.5 7.84821V8.59821C0.5 8.65714 0.548214 8.70536 0.607143 8.70536H1.35714C1.41607 8.70536 1.46429 8.65714 1.46429 8.59821V7.84821C1.46429 7.78928 1.41607 7.74107 1.35714 7.74107ZM1.35714 9.96428H0.607143C0.548214 9.96428 0.5 10.0125 0.5 10.0714V10.8214C0.5 10.8804 0.548214 10.9286 0.607143 10.9286H1.35714C1.41607 10.9286 1.46429 10.8804 1.46429 10.8214V10.0714C1.46429 10.0125 1.41607 9.96428 1.35714 9.96428ZM1.35714 5.51786H0.607143C0.548214 5.51786 0.5 5.56607 0.5 5.625V6.375C0.5 6.43393 0.548214 6.48214 0.607143 6.48214H1.35714C1.41607 6.48214 1.46429 6.43393 1.46429 6.375V5.625C1.46429 5.56607 1.41607 5.51786 1.35714 5.51786Z"}),n.createElement("path",{d:"M11.3571 1.07143H10.6071C10.5482 1.07143 10.5 1.11964 10.5 1.17857V1.92857C10.5 1.9875 10.5482 2.03571 10.6071 2.03571H11.3571C11.4161 2.03571 11.4643 1.9875 11.4643 1.92857V1.17857C11.4643 1.11964 11.4161 1.07143 11.3571 1.07143ZM11.3571 3.29464H10.6071C10.5482 3.29464 10.5 3.34286 10.5 3.40178V4.15178C10.5 4.21071 10.5482 4.25893 10.6071 4.25893H11.3571C11.4161 4.25893 11.4643 4.21071 11.4643 4.15178V3.40178C11.4643 3.34286 11.4161 3.29464 11.3571 3.29464ZM11.3571 7.74107H10.6071C10.5482 7.74107 10.5 7.78928 10.5 7.84821V8.59821C10.5 8.65714 10.5482 8.70536 10.6071 8.70536H11.3571C11.4161 8.70536 11.4643 8.65714 11.4643 8.59821V7.84821C11.4643 7.78928 11.4161 7.74107 11.3571 7.74107ZM11.3571 9.96428H10.6071C10.5482 9.96428 10.5 10.0125 10.5 10.0714V10.8214C10.5 10.8804 10.5482 10.9286 10.6071 10.9286H11.3571C11.4161 10.9286 11.4643 10.8804 11.4643 10.8214V10.0714C11.4643 10.0125 11.4161 9.96428 11.3571 9.96428ZM11.3571 5.51786H10.6071C10.5482 5.51786 10.5 5.56607 10.5 5.625V6.375C10.5 6.43393 10.5482 6.48214 10.6071 6.48214H11.3571C11.4161 6.48214 11.4643 6.43393 11.4643 6.375V5.625C11.4643 5.56607 11.4161 5.51786 11.3571 5.51786Z"}),n.createElement("path",{d:"M7.95133 4.54822L9.66026 5.89688C9.70848 5.93572 9.70848 6.01072 9.65758 6.04956L7.94999 7.39956C7.88705 7.44911 7.7933 7.40358 7.7933 7.32322V6.48215H4.20401V7.37545C4.20401 7.45715 4.11026 7.50135 4.04732 7.45179L2.33973 6.10179C2.32816 6.09286 2.3188 6.08139 2.31236 6.06827C2.30592 6.05516 2.30257 6.04074 2.30257 6.02612C2.30257 6.01151 2.30592 5.99709 2.31236 5.98397C2.3188 5.97085 2.32816 5.95939 2.33973 5.95045L4.04865 4.60045C4.1116 4.5509 4.20535 4.59644 4.20535 4.67679V5.51786H7.79464V4.62456C7.79459 4.60637 7.79967 4.58853 7.8093 4.57309C7.81892 4.55766 7.8327 4.54524 7.84906 4.53728C7.86541 4.52931 7.88368 4.52611 7.90177 4.52805C7.91986 4.52998 7.93703 4.53697 7.95133 4.54822Z"})),k=e=>n.createElement(a.A,Object.assign({component:C},e)),A=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"bg-position-horizontal",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("g",null,n.createElement("path",{opacity:"0.3",d:"M10.9286 0.85734H1.07142C0.834371 0.85734 0.642853 1.04886 0.642853 1.28591V11.1431C0.642853 11.3801 0.834371 11.5716 1.07142 11.5716H2.5958C2.65473 11.5716 2.70295 11.5234 2.70295 11.4645V10.7145C2.70295 10.6556 2.65473 10.6073 2.5958 10.6073H1.60714V1.82163H10.3929V5.10734C10.3929 5.16627 10.4411 5.21448 10.5 5.21448H11.25C11.3089 5.21448 11.3571 5.16627 11.3571 5.10734V1.28591C11.3571 1.04886 11.1656 0.85734 10.9286 0.85734Z"}),n.createElement("path",{d:"M10.9286 5.95536H3.85715C3.62009 5.95536 3.42857 6.14688 3.42857 6.38393V10.9286C3.42857 11.1656 3.62009 11.3571 3.85715 11.3571H10.9286C11.1656 11.3571 11.3571 11.1656 11.3571 10.9286V6.38393C11.3571 6.14688 11.1656 5.95536 10.9286 5.95536ZM10.3393 10.3393H4.44643V6.97322H10.3393V10.3393Z"}),n.createElement("path",{d:"M3.15129 3.31274H6.94594V2.47167C6.94594 2.39132 7.03969 2.34578 7.10264 2.39533L8.81157 3.74533C8.82313 3.75427 8.83249 3.76574 8.83893 3.77885C8.84537 3.79197 8.84872 3.80639 8.84872 3.821C8.84872 3.83562 8.84537 3.85004 8.83893 3.86315C8.83249 3.87627 8.82313 3.88774 8.81157 3.89667L7.10398 5.24667C7.04103 5.29623 6.94728 5.25203 6.94728 5.17033V4.27703H3.15129V3.31274Z"}))),S=e=>n.createElement(a.A,Object.assign({component:A},e)),I=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"bg-position-vertical",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("g",null,n.createElement("path",{opacity:"0.3",d:"M0.642854 11.143L0.642854 1.2859C0.642854 1.04885 0.834372 0.85733 1.07143 0.85733L10.9286 0.857331C11.1656 0.857331 11.3571 1.04885 11.3571 1.2859L11.3571 2.81028C11.3571 2.86921 11.3089 2.91742 11.25 2.91742L10.5 2.91742C10.4411 2.91742 10.3929 2.86921 10.3929 2.81028L10.3929 1.82162L1.60714 1.82162L1.60714 10.6073L4.89285 10.6073C4.95178 10.6073 5 10.6555 5 10.7145L5 11.4645C5 11.5234 4.95178 11.5716 4.89285 11.5716L1.07143 11.5716C0.834372 11.5716 0.642854 11.3801 0.642854 11.143Z"}),n.createElement("path",{d:"M5.74087 11.1431L5.74088 4.07162C5.74088 3.83457 5.93239 3.64305 6.16945 3.64305L10.7141 3.64305C10.9511 3.64305 11.1427 3.83457 11.1427 4.07162L11.1427 11.1431C11.1427 11.3801 10.9511 11.5716 10.7141 11.5716L6.16945 11.5716C5.93239 11.5716 5.74087 11.3801 5.74087 11.1431ZM10.1248 10.5538L10.1248 4.66091L6.75873 4.66091L6.75873 10.5538L10.1248 10.5538Z"}),n.createElement("path",{d:"M3.09827 3.36576L3.09827 7.1604L2.2572 7.1604C2.17684 7.1604 2.1313 7.25415 2.18086 7.3171L3.53086 9.02603C3.53979 9.03759 3.55126 9.04695 3.56438 9.0534C3.57749 9.05984 3.59191 9.06319 3.60653 9.06319C3.62114 9.06319 3.63556 9.05984 3.64868 9.0534C3.66179 9.04695 3.67326 9.03759 3.6822 9.02603L5.0322 7.31844C5.08175 7.25549 5.03755 7.16174 4.95586 7.16174L4.06255 7.16174L4.06255 3.36576L3.09827 3.36576Z"}))),x=e=>n.createElement(a.A,Object.assign({component:I},e)),L=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"up-to-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("g",null,n.createElement("path",{d:"M11.3571 1.07142L11.3571 10.9286C11.3571 11.1656 11.1656 11.3571 10.9286 11.3571H1.07142C0.834364 11.3571 0.642846 11.1656 0.642846 10.9286V6.10714C0.642846 6.04821 0.69106 6 0.749989 6H1.49999C1.55892 6 1.60713 6.04821 1.60713 6.10714V10.3929H10.3928L10.3928 1.60714L6.10713 1.60714C6.0482 1.60714 5.99999 1.55892 5.99999 1.5V0.749995C5.99999 0.691067 6.0482 0.642853 6.10713 0.642853L10.9286 0.642853C11.1656 0.642853 11.3571 0.834371 11.3571 1.07142Z"}),n.createElement("path",{d:"M1.80978 2.53298L1.11067 3.23209C1.09644 3.24625 1.07852 3.25614 1.05895 3.26062C1.03938 3.2651 1.01894 3.264 0.999964 3.25744C0.980987 3.25088 0.964231 3.23913 0.951603 3.22352C0.938975 3.20791 0.93098 3.18907 0.928529 3.16914L0.647279 0.766466C0.639243 0.698162 0.696833 0.639233 0.766476 0.647269L3.16916 0.928519C3.25755 0.939233 3.29505 1.04772 3.2321 1.11066L2.53032 1.81245L5.96156 5.2437C6.00308 5.28522 6.00308 5.35352 5.96156 5.39504L5.39371 5.96289C5.35219 6.00441 5.28389 6.00441 5.24237 5.96289L1.80978 2.53298Z"}))),N=e=>n.createElement(a.A,Object.assign({component:L},e)),T=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"vertical-offset-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M4.92856 10.4987L4.92856 1.17859C4.92856 1.11966 4.88034 1.07144 4.82141 1.07144L4.01784 1.07144C3.95891 1.07144 3.9107 1.11966 3.9107 1.17859L3.9107 9.28394L1.45981 7.35135C1.39016 7.29644 1.2857 7.346 1.2857 7.43573L1.2857 8.40671C1.2857 8.47234 1.31516 8.53394 1.3674 8.57546L4.23481 10.8362C4.51606 11.0572 4.92856 10.8576 4.92856 10.4987ZM8.08927 10.8214L8.08927 2.71609L10.5402 4.64868C10.6098 4.70359 10.7143 4.65403 10.7143 4.5643L10.7143 3.59332C10.7143 3.52769 10.6848 3.46609 10.6326 3.42457L7.76516 1.16385C7.48391 0.942871 7.07141 1.14243 7.07141 1.50001L7.07141 10.8214C7.07141 10.8804 7.11963 10.9286 7.17856 10.9286L7.98213 10.9286C8.04106 10.9286 8.08927 10.8804 8.08927 10.8214Z"})),B=e=>n.createElement(a.A,Object.assign({component:T},e)),P=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"mixed-view-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M12.0357 11.6071L12.0357 4.42857C12.0357 4.19152 11.8442 4 11.6071 4L7.42857 4C7.19151 4 7 4.19152 7 4.42857L7 11.6071C7 11.8442 7.19151 12.0357 7.42857 12.0357L11.6071 12.0357C11.8442 12.0357 12.0357 11.8442 12.0357 11.6071ZM8.01785 11.0179L8.01785 5.01786L11.0178 5.01786L11.0178 11.0179L8.01785 11.0179Z"}),n.createElement("path",{d:"M6.03571 11.6071L6.0357 6.42857C6.0357 6.19152 5.84419 6 5.60713 6L0.428567 6C0.191514 6 -4.29991e-06 6.19152 -4.31027e-06 6.42857L-4.05979e-06 11.6071C-4.07016e-06 11.8442 0.191514 12.0357 0.428568 12.0357L5.60713 12.0357C5.84419 12.0357 6.03571 11.8442 6.03571 11.6071ZM1.01785 11.0179L1.01785 7.01786L5.01785 7.01786L5.01785 11.0179L1.01785 11.0179Z"}),n.createElement("path",{d:"M5.99999 5.03571L0.428572 5.03571C0.191518 5.03571 0 4.84419 0 4.60714L2.45825e-06 0.428573C2.43753e-06 0.191519 0.191521 0 0.428574 0H7.60714C7.84419 0 8.03571 0.191518 8.03571 0.428572L8.03571 3H7.01785L7.01786 1.01786L1.01786 1.01786L1.01786 4.01785L5.99999 4.01785V5.03571Z"})),R=e=>n.createElement(a.A,Object.assign({component:P},e)),F=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"landscape-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M0.392859 10.0357L11.5714 10.0357C11.8085 10.0357 12 9.84419 12 9.60714L12 2.42858C12 2.19152 11.8085 2 11.5714 2L0.392862 2C0.155808 2 -0.0357096 2.19152 -0.0357097 2.42857L-0.0357132 9.60714C-0.0357132 9.84419 0.155805 10.0357 0.392859 10.0357ZM0.982149 3.01786L10.9821 3.01786L10.9821 9.01786L0.982145 9.01786L0.982149 3.01786Z"})),O=e=>n.createElement(a.A,Object.assign({component:F},e)),M=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"portrait-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M10 11.6071L10 0.428574C10 0.191521 9.80848 2.46721e-06 9.57143 2.45684e-06L2.39286 -3.32519e-07C2.15581 -3.42881e-07 1.96429 0.191518 1.96429 0.428571L1.96429 11.6071C1.96429 11.8442 2.15581 12.0357 2.39286 12.0357L9.57143 12.0357C9.80848 12.0357 10 11.8442 10 11.6071ZM2.98215 11.0179L2.98215 1.01786L8.98214 1.01786L8.98214 11.0179L2.98215 11.0179Z"})),j=e=>n.createElement(a.A,Object.assign({component:M},e)),D=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"square-view",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M1 1.42857L1 10.5893C1 10.8263 1.19152 11.0179 1.42857 11.0179L10.5605 11.0179C10.7976 11.0179 10.9891 10.8263 10.9891 10.5893L10.9891 1.42857C10.9891 1.19151 10.7976 0.999997 10.5605 0.999997L1.42857 0.999997C1.19152 0.999997 1 1.19151 1 1.42857ZM9.97123 2.01785L9.97123 10L2.01786 10L2.01786 2.01785L9.97123 2.01785Z"})),V=e=>n.createElement(a.A,Object.assign({component:D},e)),W=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"crescent-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M6 1C6.112 1 6.22266 1.00383 6.332 1.0115C6.11066 1.48817 6 1.98433 6 2.5C6 2.974 6.0925 3.42717 6.2775 3.8595C6.4625 4.29183 6.71116 4.66417 7.0235 4.9765C7.33583 5.28883 7.70816 5.5375 8.1405 5.7225C8.57283 5.9075 9.026 6 9.5 6C10.0157 6 10.5118 5.88933 10.9885 5.668C10.9962 5.77733 11 5.888 11 6C11 6.453 10.9402 6.89567 10.8205 7.328C10.7008 7.76033 10.5335 8.1595 10.3185 8.5255C10.1035 8.8915 9.8425 9.22816 9.5355 9.5355C9.2285 9.84283 8.89183 10.1038 8.5255 10.3185C8.15916 10.5332 7.76 10.7005 7.328 10.8205C6.896 10.9405 6.45333 11.0003 6 11C5.54666 10.9997 5.104 10.9398 4.672 10.8205C4.24 10.7012 3.84083 10.5338 3.4745 10.3185C3.10817 10.1032 2.7715 9.84216 2.4645 9.5355C2.1575 9.22883 1.8965 8.89216 1.6815 8.5255C1.4665 8.15883 1.29917 7.75967 1.1795 7.328C1.05983 6.89633 1 6.45366 1 6C1 5.54633 1.05983 5.10367 1.1795 4.672C1.29917 4.24033 1.4665 3.84117 1.6815 3.4745C1.8965 3.10783 2.1575 2.77117 2.4645 2.4645C2.7715 2.15783 3.10817 1.89683 3.4745 1.6815C3.84083 1.46617 4.24 1.29883 4.672 1.1795C5.104 1.06017 5.54666 1.00033 6 1ZM5.0155 2.121C4.58583 2.23033 4.1855 2.40733 3.8145 2.652C3.4435 2.89667 3.1245 3.187 2.8575 3.523C2.5905 3.859 2.38083 4.24117 2.2285 4.6695C2.07617 5.09783 2 5.54117 2 5.9995C2 6.54116 2.1055 7.05866 2.3165 7.552C2.5275 8.04533 2.812 8.47116 3.17 8.8295C3.528 9.18783 3.95383 9.47233 4.4475 9.683C4.94116 9.89366 5.45866 9.99916 6 9.9995C6.45833 9.9995 6.90166 9.92333 7.33 9.771C7.75833 9.61866 8.1405 9.409 8.4765 9.142C8.8125 8.875 9.10283 8.556 9.3475 8.185C9.59216 7.814 9.76916 7.41366 9.8785 6.984C9.7665 6.99433 9.64016 6.9995 9.4995 6.9995C8.89016 6.9995 8.30816 6.88033 7.7535 6.642C7.19883 6.40366 6.72033 6.08333 6.318 5.681C5.91566 5.27867 5.59533 4.80017 5.357 4.2455C5.11867 3.69083 4.9995 3.10883 4.9995 2.4995C4.9995 2.35883 5.00516 2.233 5.0155 2.121Z"})),z=e=>n.createElement(a.A,Object.assign({component:W},e)),H=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"vimeo-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M10.9952 3.66719C10.9513 4.59967 10.2888 5.87689 9.00665 7.49794C7.68113 9.19101 6.55939 10.0376 5.64191 10.0376C5.07348 10.0376 4.59281 9.52102 4.19988 8.48818L3.41305 5.64743C3.12152 4.61411 2.80855 4.09732 2.47363 4.09732C2.40051 4.09732 2.14554 4.24829 1.70874 4.54983L1.25 3.96878C1.73068 3.55248 2.20404 3.13609 2.6701 2.72027C3.31116 2.1748 3.79184 1.88809 4.11213 1.85928C4.86971 1.78774 5.33576 2.29679 5.51077 3.38725C5.69992 4.56414 5.83106 5.29554 5.90419 5.58268C6.12259 6.55838 6.36293 7.04614 6.6252 7.04614C6.82898 7.04614 7.13513 6.73064 7.54268 6.09922C7.95072 5.46781 8.16913 4.98707 8.19838 4.65719C8.25639 4.11172 8.03799 3.83953 7.54268 3.83953C7.30966 3.83953 7.06932 3.88961 6.82167 3.98997C7.30235 2.45487 8.22031 1.70847 9.57508 1.75169C10.5798 1.7805 11.0537 2.41875 10.9952 3.66719Z"})),U=e=>n.createElement(a.A,Object.assign({component:H},e)),q=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"blur-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M0.326321 7.56842C0.235089 7.56842 0.157895 7.53684 0.0947368 7.47368C0.0315789 7.41052 0 7.33333 0 7.24211C0 7.15088 0.0315789 7.07368 0.0947368 7.01053C0.157895 6.94737 0.235089 6.91579 0.326321 6.91579C0.417542 6.91579 0.494731 6.94737 0.557889 7.01053C0.621047 7.07368 0.652626 7.15088 0.652626 7.24211C0.652626 7.33333 0.621047 7.41052 0.557889 7.47368C0.494731 7.53684 0.417542 7.56842 0.326321 7.56842ZM0.326321 5.08421C0.235089 5.08421 0.157895 5.05263 0.0947368 4.98947C0.0315789 4.92632 0 4.84912 0 4.75789C0 4.66667 0.0315789 4.58948 0.0947368 4.52632C0.157895 4.46316 0.235089 4.43158 0.326321 4.43158C0.417542 4.43158 0.494731 4.46316 0.557889 4.52632C0.621047 4.58948 0.652626 4.66667 0.652626 4.75789C0.652626 4.84912 0.621047 4.92632 0.557889 4.98947C0.494731 5.05263 0.417542 5.08421 0.326321 5.08421ZM2.21163 10.4C2.03897 10.4 1.89386 10.3416 1.77632 10.2248C1.65877 10.108 1.59999 9.96325 1.59999 9.79058C1.59999 9.61792 1.6584 9.47281 1.77521 9.35526C1.89201 9.23772 2.03675 9.17894 2.20942 9.17894C2.38208 9.17894 2.52719 9.23735 2.64474 9.35416C2.76228 9.47096 2.82106 9.61569 2.82106 9.78837C2.82106 9.96103 2.76265 10.1061 2.64584 10.2237C2.52904 10.3412 2.38431 10.4 2.21163 10.4ZM2.21163 7.85263C2.03897 7.85263 1.89386 7.79423 1.77632 7.67743C1.65877 7.56062 1.59999 7.41588 1.59999 7.24322C1.59999 7.07054 1.6584 6.92544 1.77521 6.8079C1.89201 6.69035 2.03675 6.63158 2.20942 6.63158C2.38208 6.63158 2.52719 6.68998 2.64474 6.80678C2.76228 6.92359 2.82106 7.06833 2.82106 7.24099C2.82106 7.41366 2.76265 7.55877 2.64584 7.67632C2.52904 7.79386 2.38431 7.85263 2.21163 7.85263ZM2.21163 5.36842C2.03897 5.36842 1.89386 5.31002 1.77632 5.19322C1.65877 5.07641 1.59999 4.93167 1.59999 4.75901C1.59999 4.58634 1.6584 4.44123 1.77521 4.32368C1.89201 4.20614 2.03675 4.14737 2.20942 4.14737C2.38208 4.14737 2.52719 4.20577 2.64474 4.32257C2.76228 4.43938 2.82106 4.58412 2.82106 4.75678C2.82106 4.92946 2.76265 5.07456 2.64584 5.1921C2.52904 5.30965 2.38431 5.36842 2.21163 5.36842ZM2.21163 2.82106C2.03897 2.82106 1.89386 2.76265 1.77632 2.64584C1.65877 2.52904 1.59999 2.38431 1.59999 2.21163C1.59999 2.03897 1.6584 1.89386 1.77521 1.77632C1.89201 1.65877 2.03675 1.59999 2.20942 1.59999C2.38208 1.59999 2.52719 1.6584 2.64474 1.77521C2.76228 1.89201 2.82106 2.03675 2.82106 2.20942C2.82106 2.38208 2.76265 2.52719 2.64584 2.64474C2.52904 2.76228 2.38431 2.82106 2.21163 2.82106ZM4.75789 8.12632C4.51228 8.12632 4.30351 8.04035 4.13158 7.86842C3.95965 7.69649 3.87368 7.48772 3.87368 7.24211C3.87368 6.99649 3.95965 6.78772 4.13158 6.61579C4.30351 6.44386 4.51228 6.3579 4.75789 6.3579C5.00351 6.3579 5.21228 6.44386 5.38421 6.61579C5.55614 6.78772 5.6421 6.99649 5.6421 7.24211C5.6421 7.48772 5.55614 7.69649 5.38421 7.86842C5.21228 8.04035 5.00351 8.12632 4.75789 8.12632ZM4.75789 5.6421C4.51228 5.6421 4.30351 5.55614 4.13158 5.38421C3.95965 5.21228 3.87368 5.00351 3.87368 4.75789C3.87368 4.51228 3.95965 4.30351 4.13158 4.13158C4.30351 3.95965 4.51228 3.87368 4.75789 3.87368C5.00351 3.87368 5.21228 3.95965 5.38421 4.13158C5.55614 4.30351 5.6421 4.51228 5.6421 4.75789C5.6421 5.00351 5.55614 5.21228 5.38421 5.38421C5.21228 5.55614 5.00351 5.6421 4.75789 5.6421ZM4.75901 10.4C4.58634 10.4 4.44123 10.3416 4.32368 10.2248C4.20614 10.108 4.14737 9.96325 4.14737 9.79058C4.14737 9.61792 4.20577 9.47281 4.32257 9.35526C4.43938 9.23772 4.58412 9.17894 4.75678 9.17894C4.92946 9.17894 5.07456 9.23735 5.1921 9.35416C5.30965 9.47096 5.36842 9.61569 5.36842 9.78837C5.36842 9.96103 5.31002 10.1061 5.19322 10.2237C5.07641 10.3412 4.93167 10.4 4.75901 10.4ZM4.75901 2.82106C4.58634 2.82106 4.44123 2.76265 4.32368 2.64584C4.20614 2.52904 4.14737 2.38431 4.14737 2.21163C4.14737 2.03897 4.20577 1.89386 4.32257 1.77632C4.43938 1.65877 4.58412 1.59999 4.75678 1.59999C4.92946 1.59999 5.07456 1.6584 5.1921 1.77521C5.30965 1.89201 5.36842 2.03675 5.36842 2.20942C5.36842 2.38208 5.31002 2.52719 5.19322 2.64474C5.07641 2.76228 4.93167 2.82106 4.75901 2.82106ZM4.75789 12C4.66667 12 4.58948 11.9684 4.52632 11.9053C4.46316 11.8421 4.43158 11.7649 4.43158 11.6737C4.43158 11.5825 4.46316 11.5053 4.52632 11.4421C4.58948 11.379 4.66667 11.3474 4.75789 11.3474C4.84912 11.3474 4.92632 11.379 4.98947 11.4421C5.05263 11.5053 5.08421 11.5825 5.08421 11.6737C5.08421 11.7649 5.05263 11.8421 4.98947 11.9053C4.92632 11.9684 4.84912 12 4.75789 12ZM4.75789 0.652626C4.66667 0.652626 4.58948 0.621047 4.52632 0.55789C4.46316 0.494732 4.43158 0.417542 4.43158 0.326321C4.43158 0.235089 4.46316 0.157895 4.52632 0.0947368C4.58948 0.0315789 4.66667 0 4.75789 0C4.84912 0 4.92632 0.0315789 4.98947 0.0947368C5.05263 0.157895 5.08421 0.235089 5.08421 0.326321C5.08421 0.417542 5.05263 0.494732 4.98947 0.55789C4.92632 0.621047 4.84912 0.652626 4.75789 0.652626ZM7.24211 8.12632C6.99649 8.12632 6.78772 8.04035 6.61579 7.86842C6.44386 7.69649 6.3579 7.48772 6.3579 7.24211C6.3579 6.99649 6.44386 6.78772 6.61579 6.61579C6.78772 6.44386 6.99649 6.3579 7.24211 6.3579C7.48772 6.3579 7.69649 6.44386 7.86842 6.61579C8.04035 6.78772 8.12632 6.99649 8.12632 7.24211C8.12632 7.48772 8.04035 7.69649 7.86842 7.86842C7.69649 8.04035 7.48772 8.12632 7.24211 8.12632ZM7.24211 5.6421C6.99649 5.6421 6.78772 5.55614 6.61579 5.38421C6.44386 5.21228 6.3579 5.00351 6.3579 4.75789C6.3579 4.51228 6.44386 4.30351 6.61579 4.13158C6.78772 3.95965 6.99649 3.87368 7.24211 3.87368C7.48772 3.87368 7.69649 3.95965 7.86842 4.13158C8.04035 4.30351 8.12632 4.51228 8.12632 4.75789C8.12632 5.00351 8.04035 5.21228 7.86842 5.38421C7.69649 5.55614 7.48772 5.6421 7.24211 5.6421ZM7.24322 10.4C7.07054 10.4 6.92544 10.3416 6.8079 10.2248C6.69035 10.108 6.63158 9.96325 6.63158 9.79058C6.63158 9.61792 6.68998 9.47281 6.80678 9.35526C6.92359 9.23772 7.06833 9.17894 7.24099 9.17894C7.41366 9.17894 7.55877 9.23735 7.67632 9.35416C7.79386 9.47096 7.85263 9.61569 7.85263 9.78837C7.85263 9.96103 7.79423 10.1061 7.67743 10.2237C7.56062 10.3412 7.41588 10.4 7.24322 10.4ZM7.24322 2.82106C7.07054 2.82106 6.92544 2.76265 6.8079 2.64584C6.69035 2.52904 6.63158 2.38431 6.63158 2.21163C6.63158 2.03897 6.68998 1.89386 6.80678 1.77632C6.92359 1.65877 7.06833 1.59999 7.24099 1.59999C7.41366 1.59999 7.55877 1.6584 7.67632 1.77521C7.79386 1.89201 7.85263 2.03675 7.85263 2.20942C7.85263 2.38208 7.79423 2.52719 7.67743 2.64474C7.56062 2.76228 7.41588 2.82106 7.24322 2.82106ZM7.30527 12C7.21404 12 7.13684 11.9684 7.07368 11.9053C7.01053 11.8421 6.97895 11.7649 6.97895 11.6737C6.97895 11.5825 7.01053 11.5053 7.07368 11.4421C7.13684 11.379 7.21404 11.3474 7.30527 11.3474C7.39649 11.3474 7.47368 11.379 7.53684 11.4421C7.59999 11.5053 7.63157 11.5825 7.63157 11.6737C7.63157 11.7649 7.59999 11.8421 7.53684 11.9053C7.47368 11.9684 7.39649 12 7.30527 12ZM7.24211 0.652626C7.15088 0.652626 7.07368 0.621047 7.01053 0.55789C6.94737 0.494732 6.91579 0.417542 6.91579 0.326321C6.91579 0.235089 6.94737 0.157895 7.01053 0.0947368C7.07368 0.0315789 7.15088 0 7.24211 0C7.33333 0 7.41052 0.0315789 7.47368 0.0947368C7.53684 0.157895 7.56842 0.235089 7.56842 0.326321C7.56842 0.417542 7.53684 0.494732 7.47368 0.55789C7.41052 0.621047 7.33333 0.652626 7.24211 0.652626ZM9.79058 10.4C9.61792 10.4 9.47281 10.3416 9.35526 10.2248C9.23772 10.108 9.17894 9.96325 9.17894 9.79058C9.17894 9.61792 9.23735 9.47281 9.35416 9.35526C9.47096 9.23772 9.61569 9.17894 9.78837 9.17894C9.96103 9.17894 10.1061 9.23735 10.2237 9.35416C10.3412 9.47096 10.4 9.61569 10.4 9.78837C10.4 9.96103 10.3416 10.1061 10.2248 10.2237C10.108 10.3412 9.96325 10.4 9.79058 10.4ZM9.79058 7.85263C9.61792 7.85263 9.47281 7.79423 9.35526 7.67743C9.23772 7.56062 9.17894 7.41588 9.17894 7.24322C9.17894 7.07054 9.23735 6.92544 9.35416 6.8079C9.47096 6.69035 9.61569 6.63158 9.78837 6.63158C9.96103 6.63158 10.1061 6.68998 10.2237 6.80678C10.3412 6.92359 10.4 7.06833 10.4 7.24099C10.4 7.41366 10.3416 7.55877 10.2248 7.67632C10.108 7.79386 9.96325 7.85263 9.79058 7.85263ZM9.79058 5.36842C9.61792 5.36842 9.47281 5.31002 9.35526 5.19322C9.23772 5.07641 9.17894 4.93167 9.17894 4.75901C9.17894 4.58634 9.23735 4.44123 9.35416 4.32368C9.47096 4.20614 9.61569 4.14737 9.78837 4.14737C9.96103 4.14737 10.1061 4.20577 10.2237 4.32257C10.3412 4.43938 10.4 4.58412 10.4 4.75678C10.4 4.92946 10.3416 5.07456 10.2248 5.1921C10.108 5.30965 9.96325 5.36842 9.79058 5.36842ZM9.79058 2.82106C9.61792 2.82106 9.47281 2.76265 9.35526 2.64584C9.23772 2.52904 9.17894 2.38431 9.17894 2.21163C9.17894 2.03897 9.23735 1.89386 9.35416 1.77632C9.47096 1.65877 9.61569 1.59999 9.78837 1.59999C9.96103 1.59999 10.1061 1.6584 10.2237 1.77521C10.3412 1.89201 10.4 2.03675 10.4 2.20942C10.4 2.38208 10.3416 2.52719 10.2248 2.64474C10.108 2.76228 9.96325 2.82106 9.79058 2.82106ZM11.6737 7.56842C11.5825 7.56842 11.5053 7.53684 11.4421 7.47368C11.379 7.41052 11.3474 7.33333 11.3474 7.24211C11.3474 7.15088 11.379 7.07368 11.4421 7.01053C11.5053 6.94737 11.5825 6.91579 11.6737 6.91579C11.7649 6.91579 11.8421 6.94737 11.9053 7.01053C11.9684 7.07368 12 7.15088 12 7.24211C12 7.33333 11.9684 7.41052 11.9053 7.47368C11.8421 7.53684 11.7649 7.56842 11.6737 7.56842ZM11.6737 5.08421C11.5825 5.08421 11.5053 5.05263 11.4421 4.98947C11.379 4.92632 11.3474 4.84912 11.3474 4.75789C11.3474 4.66667 11.379 4.58948 11.4421 4.52632C11.5053 4.46316 11.5825 4.43158 11.6737 4.43158C11.7649 4.43158 11.8421 4.46316 11.9053 4.52632C11.9684 4.58948 12 4.66667 12 4.75789C12 4.84912 11.9684 4.92632 11.9053 4.98947C11.8421 5.05263 11.7649 5.08421 11.6737 5.08421Z"})),$=e=>n.createElement(a.A,Object.assign({component:q},e)),Z=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"zoom-out-map",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M0.650002 11.35V7.88241H1.64073V9.65585L3.7213 7.57528L4.42472 8.2787L2.34415 10.3593H4.11759V11.35H0.650002ZM7.88241 11.35V10.3593H9.65585L7.58519 8.28861L8.28861 7.58519L10.3593 9.65585V7.88241H11.35V11.35H7.88241ZM3.71139 4.41481L1.64073 2.34415V4.11759H0.650002V0.65H4.11759V1.64073H2.34415L4.41481 3.71139L3.71139 4.41481ZM8.28861 4.41481L7.58519 3.71139L9.65585 1.64073H7.88241V0.65H11.35V4.11759H10.3593V2.34415L8.28861 4.41481Z"})),G=e=>n.createElement(a.A,Object.assign({component:Z},e)),K=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"paragraph-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M5.01104 12V7.61696H4.94805C4.12998 7.61696 3.43412 7.29507 2.86047 6.65128C2.28682 6.00748 2 5.22655 2 4.30848C2 3.39041 2.28682 2.60947 2.86047 1.96568C3.43412 1.32189 4.12998 1 4.94805 1H10V2.10281H8.68975V12H7.70709V2.10281H5.99371V12H5.01104Z"})),X=e=>n.createElement(a.A,Object.assign({component:K},e)),Y=()=>n.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-list-ol",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M4.375 26.8749V25.3846H7.5V24.0624H5.625V22.5721H7.5V21.2499H4.375V19.7596H7.93269C8.23238 19.7596 8.48357 19.8609 8.68628 20.0637C8.88901 20.2664 8.99038 20.5176 8.99038 20.8173V22.3077C8.99038 22.6073 8.88901 22.8585 8.68628 23.0613C8.48357 23.264 8.23238 23.3653 7.93269 23.3653C8.23238 23.3653 8.48357 23.4667 8.68628 23.6694C8.88901 23.8721 8.99038 24.1233 8.99038 24.423V25.8173C8.99038 26.1169 8.88901 26.3681 8.68628 26.5708C8.48357 26.7736 8.23238 26.8749 7.93269 26.8749H4.375ZM4.375 18.5577V15.3125C4.375 15.0128 4.47636 14.7616 4.67909 14.5589C4.88182 14.3561 5.13302 14.2548 5.43269 14.2548H7.5V12.9327H4.375V11.4423H7.93269C8.23238 11.4423 8.48357 11.5436 8.68628 11.7464C8.88901 11.9491 8.99038 12.2003 8.99038 12.5V14.6875C8.99038 14.9871 8.88901 15.2383 8.68628 15.4411C8.48357 15.6438 8.23238 15.7452 7.93269 15.7452H5.86537V17.0673H8.99038V18.5577H4.375ZM6.25 10.2404V4.61538H4.375V3.125H7.74038V10.2404H6.25ZM11.6346 23.4374V21.5625H25.6249V23.4374H11.6346ZM11.6346 15.9374V14.0625H25.6249V15.9374H11.6346ZM11.6346 8.43744V6.5625H25.6249V8.43744H11.6346Z"})),J=e=>n.createElement(a.A,Object.assign({component:Y},e)),Q=()=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},n.createElement("path",{d:"M14 4L8 4M14 12L8 12M14 8L8 8",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M4.66667 14H2C2 13.1433 2.29333 12.8577 3 12.5721C3.70667 12.2865 4.66667 11.9038 4.66667 11.1442C4.66667 10.8757 4.55333 10.613 4.34667 10.4074C4.13324 10.2003 3.84326 10.0624 3.5253 10.0166C3.20733 9.9709 2.88067 10.0201 2.6 10.1561C2.32 10.2932 2.10667 10.5102 2 10.7672",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M2 2.75371L3.5253 2C3.5253 3.70385 3.5253 4.60938 3.5253 6H4.66667L2 5.99805",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),ee=e=>n.createElement(a.A,Object.assign({component:Q},e)),te=()=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},n.createElement("path",{d:"M14 7.99967L6 7.99967M14 3.99968L6 3.99967M14 11.9997L6 11.9997M3.33333 7.99967C3.33333 8.36786 3.03486 8.66634 2.66667 8.66634C2.29848 8.66634 2 8.36786 2 7.99967C2 7.63148 2.29848 7.33301 2.66667 7.33301C3.03486 7.33301 3.33333 7.63148 3.33333 7.99967ZM3.33333 3.99967C3.33333 4.36786 3.03486 4.66634 2.66667 4.66634C2.29848 4.66634 2 4.36786 2 3.99967C2 3.63148 2.29848 3.33301 2.66667 3.33301C3.03486 3.33301 3.33333 3.63148 3.33333 3.99967ZM3.33333 11.9997C3.33333 12.3679 3.03486 12.6663 2.66667 12.6663C2.29848 12.6663 2 12.3679 2 11.9997C2 11.6315 2.29848 11.333 2.66667 11.333C3.03486 11.333 3.33333 11.6315 3.33333 11.9997Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),ie=e=>n.createElement(a.A,Object.assign({component:te},e)),ne=()=>n.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"element-text-ai",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M4.375 22.0865V20.2115H18.1249V22.0865H4.375ZM4.375 15.9807V14.1058H25.6249V15.9807H4.375ZM4.375 9.87497V8H11V9.87497H4.375Z"}),n.createElement("path",{d:"M17 13C17 13 16.6521 11.5906 16.0308 10.9692C15.4094 10.3479 14 10 14 10C14 10 15.4094 9.65215 16.0308 9.03077C16.6521 8.40939 17 7 17 7C17 7 17.3479 8.40939 17.9692 9.03077C18.5906 9.65215 20 10 20 10C20 10 18.5906 10.3479 17.9692 10.9692C17.3479 11.5906 17 13 17 13Z"}),n.createElement("path",{d:"M22.5 11C22.5 11 21.8623 8.41612 20.7231 7.27692C19.5839 6.13773 17 5.5 17 5.5C17 5.5 19.5839 4.86227 20.7231 3.72308C21.8623 2.58388 22.5 0 22.5 0C22.5 0 23.1377 2.58388 24.2769 3.72308C25.4161 4.86227 28 5.5 28 5.5C28 5.5 25.4161 6.13773 24.2769 7.27692C23.1377 8.41612 22.5 11 22.5 11Z"}),n.createElement("path",{d:"M15 5C15 5 14.7681 4.06041 14.3538 3.64615C13.9396 3.2319 13 3 13 3C13 3 13.9396 2.7681 14.3538 2.35385C14.7681 1.93959 15 1 15 1C15 1 15.2319 1.93959 15.6462 2.35385C16.0604 2.7681 17 3 17 3C17 3 16.0604 3.2319 15.6462 3.64615C15.2319 4.06041 15 5 15 5Z"}),n.createElement("path",{d:"M27 13C27 13 26.7681 12.0604 26.3538 11.6462C25.9396 11.2319 25 11 25 11C25 11 25.9396 10.7681 26.3538 10.3538C26.7681 9.93959 27 9 27 9C27 9 27.2319 9.93959 27.6462 10.3538C28.0604 10.7681 29 11 29 11C29 11 28.0604 11.2319 27.6462 11.6462C27.2319 12.0604 27 13 27 13Z"})),ae=e=>n.createElement(a.A,Object.assign({component:ne},e)),le=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"typograf-icon",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M6.65333 7.21508H5.1671L3.00719 4.63822L5.1671 2H6.65333L4.44481 4.63822L6.65333 7.21508ZM3.64614 7.21508H2.17379L0 4.63822L2.17379 2H3.63919L1.43762 4.63822L3.64614 7.21508Z"}),n.createElement("path",{d:"M12 6.43338L11.1167 9.98246H9.94694L11.069 6.43338H12ZM9.58089 6.43338L8.72148 9.98246H7.52784L8.6419 6.43338H9.58089Z"})),re=e=>n.createElement(a.A,Object.assign({component:le},e)),oe=()=>n.createElement("svg",{width:"42",height:"43",viewBox:"0 0 42 43",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{x:"0.00830078",y:"0.173828",width:"42",height:"42",rx:"21",fill:"#4597F7"}),n.createElement("g",{clipPath:"url(#clip0_2193_1178)"},n.createElement("path",{d:"M14.0083 30.1739C13.4583 30.1739 12.9875 29.9781 12.5958 29.5864C12.2041 29.1948 12.0083 28.7239 12.0083 28.1739V14.1739C12.0083 13.6239 12.2041 13.1531 12.5958 12.7614C12.9875 12.3698 13.4583 12.1739 14.0083 12.1739H22.9333L20.9333 14.1739H14.0083V28.1739H28.0083V21.2239L30.0083 19.2239V28.1739C30.0083 28.7239 29.8125 29.1948 29.4208 29.5864C29.0291 29.9781 28.5583 30.1739 28.0083 30.1739H14.0083ZM18.0083 24.1739V19.9239L27.1833 10.7489C27.3833 10.5489 27.6083 10.3989 27.8583 10.2989C28.1083 10.1989 28.3583 10.1489 28.6083 10.1489C28.875 10.1489 29.1291 10.1989 29.3708 10.2989C29.6125 10.3989 29.8333 10.5489 30.0333 10.7489L31.4333 12.1739C31.6166 12.3739 31.7583 12.5948 31.8583 12.8364C31.9583 13.0781 32.0083 13.3239 32.0083 13.5739C32.0083 13.8239 31.9625 14.0698 31.8708 14.3114C31.7791 14.5531 31.6333 14.7739 31.4333 14.9739L22.2583 24.1739H18.0083ZM20.0083 22.1739H21.4083L27.2083 16.3739L26.5083 15.6739L25.7833 14.9739L20.0083 20.7489V22.1739Z",fill:"white"}),n.createElement("path",{d:"M14.0083 30.1739C13.4583 30.1739 12.9875 29.9781 12.5958 29.5864C12.2041 29.1948 12.0083 28.7239 12.0083 28.1739V14.1739C12.0083 13.6239 12.2041 13.1531 12.5958 12.7614C12.9875 12.3698 13.4583 12.1739 14.0083 12.1739H22.9333L20.9333 14.1739H14.0083V28.1739H28.0083V21.2239L30.0083 19.2239V28.1739C30.0083 28.7239 29.8125 29.1948 29.4208 29.5864C29.0291 29.9781 28.5583 30.1739 28.0083 30.1739H14.0083ZM18.0083 24.1739V19.9239L27.1833 10.7489C27.3833 10.5489 27.6083 10.3989 27.8583 10.2989C28.1083 10.1989 28.3583 10.1489 28.6083 10.1489C28.875 10.1489 29.1291 10.1989 29.3708 10.2989C29.6125 10.3989 29.8333 10.5489 30.0333 10.7489L31.4333 12.1739C31.6166 12.3739 31.7583 12.5948 31.8583 12.8364C31.9583 13.0781 32.0083 13.3239 32.0083 13.5739C32.0083 13.8239 31.9625 14.0698 31.8708 14.3114C31.7791 14.5531 31.6333 14.7739 31.4333 14.9739L22.2583 24.1739H18.0083ZM20.0083 22.1739H21.4083L27.2083 16.3739L26.5083 15.6739L25.7833 14.9739L20.0083 20.7489V22.1739Z",fill:"white"})),n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_2193_1178"},n.createElement("rect",{width:"24",height:"24",fill:"white",transform:"translate(9.0083 9.17383)"})))),se=e=>n.createElement(a.A,Object.assign({component:oe},e)),ce=()=>n.createElement("svg",{width:"42",height:"43",viewBox:"0 0 42 43",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{x:"0.00830078",y:"0.173828",width:"42",height:"42",rx:"21",fill:"#6A32C9"}),n.createElement("path",{d:"M12.0083 14.0129C12.0083 13.5629 12.1736 13.1726 12.5041 12.8419C12.8347 12.5114 13.225 12.3462 13.6751 12.3462L18.5083 12.3462L18.5083 14.0129L13.6751 14.0129L13.6751 28.6794L28.3416 28.6794L28.3416 14.0129L23.5083 14.0129L23.5083 12.3462L28.3416 12.3462C28.7916 12.3462 29.1819 12.5114 29.5126 12.8419C29.8431 13.1726 30.0083 13.5629 30.0083 14.0129L30.0083 28.6794C30.0083 29.1294 29.843 29.5198 29.5125 29.8504C29.1819 30.1809 28.7916 30.3462 28.3416 30.3462L13.675 30.3462C13.225 30.3462 12.8347 30.1809 12.5041 29.8504C12.1736 29.5198 12.0083 29.1294 12.0083 28.6794L12.0083 14.0129ZM16.1251 19.7294L17.3583 18.5129L20.1751 21.3294L20.1751 12.3462L21.8416 12.3462L21.8416 21.3294L24.6583 18.5129L25.8916 19.7294L21.0083 24.6129L16.1251 19.7294Z",fill:"white"})),de=e=>n.createElement(a.A,Object.assign({component:ce},e)),me=()=>n.createElement("svg",{width:"42",height:"43",viewBox:"0 0 42 43",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{x:"0.00830078",y:"0.173828",width:"42",height:"42",rx:"21",fill:"#72C240"}),n.createElement("path",{d:"M15.0669 30.9687C15.0669 30.9687 14.59 28.8216 13.738 27.875C12.886 26.9284 10.9536 26.3984 10.9536 26.3984C10.9536 26.3984 12.886 25.8684 13.738 24.9218C14.59 23.9752 15.0669 21.8281 15.0669 21.8281C15.0669 21.8281 15.5438 23.9752 16.3958 24.9218C17.2478 25.8684 19.1802 26.3984 19.1802 26.3984C19.1802 26.3984 17.2478 26.9284 16.3958 27.875C15.5438 28.8216 15.0669 30.9687 15.0669 30.9687Z",fill:"white"}),n.createElement("path",{d:"M23.7505 26.0037C23.7505 26.0037 22.9026 22.5682 21.388 21.0536C19.8734 19.539 16.438 18.6912 16.438 18.6912C16.438 18.6912 19.8734 17.8433 21.388 16.3287C22.9026 14.8141 23.7505 11.3787 23.7505 11.3787C23.7505 11.3787 24.5984 14.8141 26.113 16.3287C27.6276 17.8433 31.063 18.6912 31.063 18.6912C31.063 18.6912 27.6276 19.539 26.113 21.0536C24.5984 22.5682 23.7505 26.0037 23.7505 26.0037Z",fill:"white"}),n.createElement("path",{d:"M13.6958 17.7771C13.6958 17.7771 13.3778 16.2741 12.8099 15.6115C12.2419 14.9488 10.9536 14.5779 10.9536 14.5779C10.9536 14.5779 12.2419 14.2069 12.8099 13.5443C13.3778 12.8816 13.6958 11.3787 13.6958 11.3787C13.6958 11.3787 14.0138 12.8816 14.5817 13.5443C15.1497 14.2069 16.438 14.5779 16.438 14.5779C16.438 14.5779 15.1497 14.9488 14.5817 15.6115C14.0138 16.2741 13.6958 17.7771 13.6958 17.7771Z",fill:"white"}),n.createElement("path",{d:"M28.7144 30.2357C28.7144 30.2357 28.4494 29.1622 27.9761 28.6889C27.5028 28.2156 26.4293 27.9506 26.4293 27.9506C26.4293 27.9506 27.5028 27.6856 27.9761 27.2123C28.4494 26.739 28.7144 25.6654 28.7144 25.6654C28.7144 25.6654 28.9794 26.739 29.4527 27.2123C29.926 27.6856 30.9996 27.9506 30.9996 27.9506C30.9996 27.9506 29.926 28.2156 29.4527 28.6889C28.9794 29.1622 28.7144 30.2357 28.7144 30.2357Z",fill:"white"})),ue=e=>n.createElement(a.A,Object.assign({component:me},e)),pe=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-top-bottom-icon",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},n.createElement("path",{d:"M7.43866e-05 1.03733V0L12 0.0407197V1.07805L7.43866e-05 1.03733ZM0 11.9593V10.922L12 10.9627V12L0 11.9593Z"}),n.createElement("rect",{x:"3.5",y:"3.5",width:"5",height:"5",fill:"none",stroke:"currentColor"})),he=e=>n.createElement(a.A,Object.assign({component:pe},e)),ge=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-left-right-icon",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},n.createElement("path",{d:"M10.9626 7.43413e-05L11.9999 7.43866e-05L11.9592 12L10.9218 12L10.9626 7.43413e-05ZM0.0405974 -5.22757e-07L1.07792 -4.77414e-07L1.0372 12L-0.00012271 12L0.0405974 -5.22757e-07Z"}),n.createElement("rect",{x:"8.5",y:"3.5",width:"5",height:"5",transform:"rotate(90 8.5 3.5)",fill:"none",stroke:"currentColor"})),fe=e=>n.createElement(a.A,Object.assign({component:ge},e)),ve=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-switcher",fill:"currentColor",width:"1em",height:"1em","aria-hidden":"true"},n.createElement("path",{d:"M10.959 2.00007L11.9999 2.00007L11.959 10L10.9181 10L10.959 2.00007ZM-0.00012207 2L1.04074 2L0.999842 10L-0.041016 10L-0.00012207 2Z"}),n.createElement("path",{d:"M9.99993 10.9797L9.99993 12.0205L1.99995 11.9796L1.99995 10.9387L9.99993 10.9797ZM10 0.0205078L10 1.06137L1.99995 1.02043L1.99995 -0.0204332L10 0.0205078Z"})),be=e=>n.createElement(a.A,Object.assign({component:ve},e)),ye=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-top-icon",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},n.createElement("path",{d:"M0 1.04086V0L11.9999 0.0408583V1.08172L0 1.04086Z"}),n.createElement("rect",{x:"3.5",y:"3.5",width:"5",height:"5",fill:"none",stroke:"currentColor"})),Ee=e=>n.createElement(a.A,Object.assign({component:ye},e)),_e=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-bottom-icon",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},n.createElement("path",{d:"M0 10.9591V12L11.9999 11.9591V10.9183L0 10.9591Z"}),n.createElement("rect",{x:"0.5",y:"-0.5",width:"5",height:"5",transform:"matrix(1 0 0 -1 3 8)",fill:"none",stroke:"currentColor"})),we=e=>n.createElement(a.A,Object.assign({component:_e},e)),Ce=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-left-icon",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},n.createElement("path",{d:"M-8.67844e-05 -4.54974e-08L1.04077 0L0.999913 12L-0.0409456 12L-8.67844e-05 -4.54974e-08Z"}),n.createElement("rect",{x:"8.5",y:"3.5",width:"5",height:"5",transform:"rotate(90 8.5 3.5)",fill:"none",stroke:"currentColor"})),ke=e=>n.createElement(a.A,Object.assign({component:Ce},e)),Ae=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"padding-right-icon",width:"1em",height:"1em","aria-hidden":"true",fill:"currentColor"},n.createElement("path",{d:"M12.0001 -4.54974e-08L10.9592 0L11.0001 12L12.0409 12L12.0001 -4.54974e-08Z"}),n.createElement("rect",{x:"0.5",y:"0.5",width:"5",height:"5",transform:"matrix(4.37114e-08 1 1 -4.37114e-08 3 3)",fill:"none",stroke:"currentColor"})),Se=e=>n.createElement(a.A,Object.assign({component:Ae},e)),Ie=()=>n.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false","data-icon":"email-envelope","aria-hidden":"true"},n.createElement("path",{d:"M9.16329 1.75576L14.182 5.0179C14.3593 5.13317 14.448 5.1908 14.5122 5.26768C14.5691 5.33574 14.6118 5.41445 14.6379 5.49922C14.6673 5.59498 14.6673 5.70073 14.6673 5.91224V10.8C14.6673 11.9201 14.6673 12.4802 14.4493 12.908C14.2576 13.2843 13.9516 13.5903 13.5753 13.7821C13.1475 14 12.5874 14 11.4673 14H4.53398C3.41388 14 2.85383 14 2.426 13.7821C2.04968 13.5903 1.74372 13.2843 1.55197 12.908C1.33398 12.4802 1.33398 11.9201 1.33398 10.8V5.91224C1.33398 5.70073 1.33398 5.59498 1.36343 5.49922C1.3895 5.41445 1.43222 5.33574 1.48908 5.26768C1.55332 5.1908 1.64199 5.13317 1.81933 5.0179L6.83801 1.75576M9.16329 1.75576C8.74246 1.48222 8.53205 1.34545 8.30533 1.29224C8.10494 1.2452 7.89637 1.2452 7.69597 1.29224C7.46925 1.34545 7.25884 1.48222 6.83801 1.75576M9.16329 1.75576L13.2914 4.43904C13.75 4.7371 13.9793 4.88614 14.0587 5.07514C14.1281 5.2403 14.1281 5.42645 14.0587 5.59162C13.9793 5.78061 13.75 5.92965 13.2914 6.22772L9.16329 8.91099C8.74247 9.18453 8.53205 9.3213 8.30533 9.37452C8.10494 9.42155 7.89637 9.42155 7.69597 9.37452C7.46925 9.3213 7.25884 9.18453 6.83801 8.91099L2.70989 6.22772C2.25133 5.92965 2.02204 5.78061 1.94263 5.59162C1.87324 5.42645 1.87324 5.2403 1.94263 5.07514C2.02204 4.88614 2.25133 4.7371 2.70989 4.43904L6.83801 1.75576M14.334 12.6667L9.90544 8.66671M6.09587 8.66671L1.66732 12.6667",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),xe=e=>n.createElement(a.A,Object.assign({component:Ie},e)),Le=()=>n.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false","data-icon":"calendar-days","aria-hidden":"true"},n.createElement("path",{d:"M14 6.66671H2M10.6667 1.33337V4.00004M5.33333 1.33337V4.00004M7 9.33337L8 8.66671V12M7.16667 12H8.83333M5.2 14.6667H10.8C11.9201 14.6667 12.4802 14.6667 12.908 14.4487C13.2843 14.257 13.5903 13.951 13.782 13.5747C14 13.1469 14 12.5868 14 11.4667V5.86671C14 4.7466 14 4.18655 13.782 3.75873C13.5903 3.3824 13.2843 3.07644 12.908 2.88469C12.4802 2.66671 11.9201 2.66671 10.8 2.66671H5.2C4.0799 2.66671 3.51984 2.66671 3.09202 2.88469C2.71569 3.07644 2.40973 3.3824 2.21799 3.75873C2 4.18655 2 4.7466 2 5.86671V11.4667C2 12.5868 2 13.1469 2.21799 13.5747C2.40973 13.951 2.71569 14.257 3.09202 14.4487C3.51984 14.6667 4.0799 14.6667 5.2 14.6667Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),Ne=e=>n.createElement(a.A,Object.assign({component:Le},e)),Te=()=>n.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false","data-icon":"email-generation","aria-hidden":"true"},n.createElement("path",{d:"M12.334 5.33337V2.00004M3.66732 14V10.6667M10.6673 3.66671H14.0007M2.00065 12.3334H5.33398M4.33398 1.33337L3.81101 2.37932C3.63402 2.7333 3.54552 2.9103 3.4273 3.06367C3.32239 3.19977 3.20038 3.32178 3.06428 3.42669C2.91091 3.54491 2.73391 3.63341 2.37993 3.8104L1.33398 4.33337L2.37993 4.85635C2.73391 5.03334 2.91091 5.12184 3.06428 5.24006C3.20038 5.34497 3.32239 5.46698 3.4273 5.60308C3.54552 5.75645 3.63402 5.93344 3.81101 6.28743L4.33398 7.33337L4.85696 6.28743C5.03395 5.93344 5.12245 5.75645 5.24067 5.60308C5.34558 5.46698 5.46759 5.34497 5.60369 5.24006C5.75706 5.12184 5.93405 5.03334 6.28804 4.85635L7.33398 4.33337L6.28804 3.8104C5.93405 3.63341 5.75706 3.54491 5.60369 3.42669C5.46759 3.32178 5.34558 3.19977 5.24067 3.06367C5.12245 2.9103 5.03395 2.7333 4.85696 2.37932L4.33398 1.33337ZM11.334 8.00004L10.6999 9.26821C10.5229 9.62219 10.4344 9.79919 10.3162 9.95256C10.2113 10.0887 10.0893 10.2107 9.95317 10.3156C9.7998 10.4338 9.6228 10.5223 9.26882 10.6993L8.00065 11.3334L9.26882 11.9675C9.6228 12.1444 9.7998 12.2329 9.95317 12.3512C10.0893 12.4561 10.2113 12.5781 10.3162 12.7142C10.4344 12.8676 10.5229 13.0446 10.6999 13.3985L11.334 14.6667L11.9681 13.3985C12.1451 13.0446 12.2336 12.8676 12.3518 12.7142C12.4567 12.5781 12.5787 12.4561 12.7148 12.3512C12.8682 12.2329 13.0452 12.1445 13.3992 11.9675L14.6673 11.3334L13.3992 10.6993C13.0452 10.5223 12.8682 10.4338 12.7148 10.3156C12.5787 10.2107 12.4567 10.0887 12.3518 9.95256C12.2336 9.79919 12.1451 9.62219 11.9681 9.26821L11.334 8.00004Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),Be=e=>n.createElement(a.A,Object.assign({component:Te},e)),Pe=()=>n.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false","data-icon":"ai-requests","aria-hidden":"true"},n.createElement("g",{clipPath:"url(#clip0_ai_requests)"},n.createElement("path",{d:"M4.33398 8.66671L4.85696 9.71265C5.03395 10.0666 5.12245 10.2436 5.24067 10.397C5.34558 10.5331 5.46759 10.6551 5.60369 10.76C5.75706 10.8782 5.93405 10.9667 6.28804 11.1437L7.33398 11.6667L6.28804 12.1897C5.93405 12.3667 5.75706 12.4552 5.60369 12.5734C5.46759 12.6783 5.34558 12.8003 5.24067 12.9364C5.12245 13.0898 5.03395 13.2668 4.85696 13.6208L4.33398 14.6667L3.81101 13.6208C3.63402 13.2668 3.54552 13.0898 3.4273 12.9364C3.32239 12.8003 3.20038 12.6783 3.06428 12.5734C2.91091 12.4552 2.73391 12.3667 2.37993 12.1897L1.33398 11.6667L2.37993 11.1437C2.73391 10.9667 2.91091 10.8782 3.06428 10.76C3.20038 10.6551 3.32239 10.5331 3.4273 10.397C3.54552 10.2436 3.63402 10.0666 3.81101 9.71265L4.33398 8.66671Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}),n.createElement("path",{d:"M10.0006 1.33337L10.7864 3.37632C10.9744 3.86514 11.0684 4.10955 11.2146 4.31513C11.3442 4.49734 11.5033 4.65654 11.6856 4.7861C11.8911 4.93228 12.1356 5.02628 12.6244 5.21429L14.6673 6.00004L12.6244 6.78579C12.1356 6.9738 11.8911 7.0678 11.6856 7.21398C11.5033 7.34354 11.3442 7.50274 11.2146 7.68495C11.0684 7.89053 10.9744 8.13494 10.7864 8.62376L10.0007 10.6667L9.2149 8.62376C9.02689 8.13494 8.93289 7.89053 8.78671 7.68495C8.65715 7.50274 8.49795 7.34354 8.31575 7.21398C8.11016 7.0678 7.86575 6.9738 7.37693 6.78579L5.33398 6.00004L7.37693 5.21429C7.86575 5.02628 8.11016 4.93228 8.31574 4.7861C8.49795 4.65654 8.65715 4.49734 8.78671 4.31513C8.93289 4.10955 9.02689 3.86514 9.2149 3.37632L10.0006 1.33337Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_ai_requests"},n.createElement("rect",{width:"16",height:"16",fill:"white"})))),Re=e=>n.createElement(a.A,Object.assign({component:Pe},e)),Fe=()=>n.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false","data-icon":"tests","aria-hidden":"true"},n.createElement("g",{clipPath:"url(#clip0_tests)"},n.createElement("path",{d:"M8.00065 1.33337L10.4007 3.73337C12.0007 -0.466626 16.4673 4.00004 12.2673 5.60004L14.6673 8.00004L12.2673 10.4C10.6673 6.20004 6.20065 10.6667 10.4007 12.2667L8.00065 14.6667L5.60065 12.2667C4.00065 16.4667 -0.466016 12 3.73398 10.4L1.33398 8.00004L3.73398 5.60004C5.33398 9.80004 9.80065 5.33337 5.60065 3.73337L8.00065 1.33337Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_tests"},n.createElement("rect",{width:"16",height:"16",fill:"white"})))),Oe=e=>n.createElement(a.A,Object.assign({component:Fe},e)),Me=()=>n.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false","data-icon":"optimization","aria-hidden":"true"},n.createElement("path",{d:"M14.6673 6H1.33398M9.33398 11.6667L11.0007 10L9.33398 8.33333M6.66732 8.33333L5.00065 10L6.66732 11.6667M1.33398 5.2L1.33398 10.8C1.33398 11.9201 1.33398 12.4802 1.55197 12.908C1.74372 13.2843 2.04968 13.5903 2.426 13.782C2.85383 14 3.41388 14 4.53398 14H11.4673C12.5874 14 13.1475 14 13.5753 13.782C13.9516 13.5903 14.2576 13.2843 14.4493 12.908C14.6673 12.4802 14.6673 11.9201 14.6673 10.8V5.2C14.6673 4.0799 14.6673 3.51984 14.4493 3.09202C14.2576 2.7157 13.9516 2.40973 13.5753 2.21799C13.1475 2 12.5874 2 11.4673 2L4.53398 2C3.41388 2 2.85383 2 2.426 2.21799C2.04968 2.40973 1.74372 2.71569 1.55197 3.09202C1.33398 3.51984 1.33398 4.0799 1.33398 5.2Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),je=e=>n.createElement(a.A,Object.assign({component:Me},e)),De=()=>n.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}),n.createElement("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"})),Ve=e=>n.createElement(a.A,Object.assign({component:De},e)),We=()=>n.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"border-outer",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM484 366h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zM302 548h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm364 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-182 0h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 182h56c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8z"})),ze=e=>n.createElement(a.A,Object.assign({component:We},e)),He=()=>n.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"appstore-add",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("defs",null,n.createElement("style",null)),n.createElement("path",{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"})),Ue=e=>n.createElement(a.A,Object.assign({component:He},e)),qe=()=>n.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"appstore",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"})),$e=e=>n.createElement(a.A,Object.assign({component:qe},e)),Ze=()=>n.createElement("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"build",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z"})),Ge=e=>n.createElement(a.A,Object.assign({component:Ze},e)),Ke=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"search-outlined",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M10.7667 11.5L6.80463 7.53797C6.49908 7.79599 6.14443 7.99799 5.74069 8.14398C5.33696 8.28997 4.90735 8.36297 4.45186 8.36297C3.34736 8.36297 2.4126 7.98017 1.64756 7.21458C0.88252 6.449 0.5 5.52131 0.5 4.43149C0.5 3.34168 0.882795 2.41397 1.64838 1.64838C2.41396 0.882795 3.34336 0.5 4.43658 0.5C5.52979 0.5 6.45748 0.882795 7.21967 1.64838C7.98187 2.41397 8.36297 3.34219 8.36297 4.43302C8.36297 4.87336 8.29167 5.29553 8.14908 5.69955C8.00649 6.10355 7.79939 6.47531 7.52778 6.81482L11.5 10.7667L10.7667 11.5ZM4.44167 7.34446C5.248 7.34446 5.93337 7.06012 6.4978 6.49144C7.06223 5.92277 7.34444 5.23612 7.34444 4.43149C7.34444 3.62685 7.06223 2.9402 6.4978 2.37153C5.93337 1.80286 5.248 1.51852 4.44167 1.51852C3.62968 1.51852 2.93949 1.80286 2.3711 2.37153C1.80271 2.9402 1.51851 3.62685 1.51851 4.43149C1.51851 5.23612 1.80271 5.92277 2.3711 6.49144C2.93949 7.06012 3.62968 7.34446 4.44167 7.34446Z"})),Xe=e=>n.createElement(a.A,Object.assign({component:Ke},e)),Ye=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"close-outlined",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M1.84745 11L1 10.1526L5.15255 6L1 1.84745L1.84745 1L6 5.15255L10.1526 1L11 1.84745L6.84745 6L11 10.1526L10.1526 11L6 6.84745L1.84745 11Z"})),Je=e=>n.createElement(a.A,Object.assign({component:Ye},e)),Qe=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"add-image",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M1.11007 11.9944C0.804799 11.9944 0.543469 11.8858 0.326081 11.6684C0.108694 11.451 0 11.1896 0 10.8844V1.11563C0 0.810353 0.108694 0.549023 0.326081 0.331636C0.543469 0.114248 0.804799 0.0055542 1.11007 0.0055542H7.64848V1.11563H1.11007V10.8844H10.8788V4.35707H11.9889V10.8844C11.9889 11.1896 11.8802 11.451 11.6628 11.6684C11.4454 11.8858 11.1841 11.9944 10.8788 11.9944H1.11007ZM9.54672 3.80204V2.45883H8.20352V1.34876H9.54672V0.0055542H10.6568V1.34876H12V2.45883H10.6568V3.80204H9.54672ZM1.99815 9.30805H9.99074L7.55966 6.06661L5.4838 8.80852L3.9408 6.76596L1.99815 9.30805Z"})),et=e=>n.createElement(a.A,Object.assign({component:Qe},e)),tt=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"merge-tags",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M7.2 10.8V9.60001H9C9.17 9.60001 9.3125 9.54251 9.4275 9.42751C9.5425 9.31251 9.6 9.17 9.6 9V7.8C9.6 7.42 9.71 7.07501 9.93 6.76501C10.15 6.45501 10.44 6.235 10.8 6.105V5.895C10.44 5.765 10.15 5.545 9.93 5.235C9.71 4.925 9.6 4.58 9.6 4.2V3C9.6 2.83 9.5425 2.6875 9.4275 2.5725C9.3125 2.4575 9.17 2.4 9 2.4H7.2V1.2H9C9.5 1.2 9.925 1.375 10.275 1.725C10.625 2.075 10.8 2.5 10.8 3V4.2C10.8 4.37 10.8575 4.5125 10.9725 4.6275C11.0875 4.7425 11.23 4.8 11.4 4.8H12V7.2H11.4C11.23 7.2 11.0875 7.25751 10.9725 7.37251C10.8575 7.48751 10.8 7.63 10.8 7.8V9C10.8 9.5 10.625 9.92501 10.275 10.275C9.925 10.625 9.5 10.8 9 10.8H7.2ZM3 10.8C2.5 10.8 2.075 10.625 1.725 10.275C1.375 9.92501 1.2 9.5 1.2 9V7.8C1.2 7.63 1.1425 7.48751 1.0275 7.37251C0.9125 7.25751 0.77 7.2 0.6 7.2H0V4.8H0.6C0.77 4.8 0.9125 4.7425 1.0275 4.6275C1.1425 4.5125 1.2 4.37 1.2 4.2V3C1.2 2.5 1.375 2.075 1.725 1.725C2.075 1.375 2.5 1.2 3 1.2H4.8V2.4H3C2.83 2.4 2.6875 2.4575 2.5725 2.5725C2.4575 2.6875 2.4 2.83 2.4 3V4.2C2.4 4.58 2.29 4.925 2.07 5.235C1.85 5.545 1.56 5.765 1.2 5.895V6.105C1.56 6.235 1.85 6.45501 2.07 6.76501C2.29 7.07501 2.4 7.42 2.4 7.8V9C2.4 9.17 2.4575 9.31251 2.5725 9.42751C2.6875 9.54251 2.83 9.60001 3 9.60001H4.8V10.8H3Z"})),it=e=>n.createElement(a.A,Object.assign({component:tt},e)),nt=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"email-confirmation",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M8.00198 11.3105L5.85436 9.16288L6.47419 8.54304L8.00198 10.0708L11.1186 6.95415L11.7385 7.574L8.00198 11.3105ZM5.95912 5.48748L10.2718 2.75493H1.64641L5.95912 5.48748ZM5.95912 6.36049L1.61149 3.59303V9.2851H4.74564L5.61864 10.1581H1.61149C1.37577 10.1581 1.17134 10.0715 0.998197 9.8984C0.825052 9.72525 0.73848 9.52081 0.73848 9.2851V2.75493C0.73848 2.51922 0.825052 2.31479 0.998197 2.14165C1.17134 1.9685 1.37577 1.88193 1.61149 1.88193H10.3155C10.5512 1.88193 10.7556 1.9685 10.9288 2.14165C11.1019 2.31479 11.1885 2.51922 11.1885 2.75493V5.64463L10.3155 6.51766V3.59303L5.95912 6.36049Z"})),at=e=>n.createElement(a.A,Object.assign({component:nt},e)),lt=()=>n.createElement("svg",{viewBox:"0 -960 960 960",focusable:"false","data-icon":"button",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M186.666-280q-27 0-46.833-19.833T120-346.666v-266.668q0-27 19.833-46.833T186.666-680h586.668q27 0 46.833 19.833T840-613.334v266.668q0 27-19.833 46.833T773.334-280H186.666Zm0-66.666h586.668v-266.668H186.666v266.668Zm0 0v-266.668 266.668Z"})),rt=e=>n.createElement(a.A,Object.assign({component:lt},e)),ot=()=>n.createElement("svg",{viewBox:"0 -960 960 960",focusable:"false","data-icon":"table",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M186.666-120q-27 0-46.833-19.833T120-186.666v-586.668q0-27 19.833-46.833T186.666-840h586.668q27 0 46.833 19.833T840-773.334v586.668q0 27-19.833 46.833T773.334-120H186.666Zm0-66.666h151.001v-151.001H186.666v151.001Zm217.667 0h151.334v-151.001H404.333v151.001Zm218 0h151.001v-151.001H622.333v151.001ZM186.666-404.333h151.001v-151.334H186.666v151.334Zm217.667 0h151.334v-151.334H404.333v151.334Zm218 0h151.001v-151.334H622.333v151.334Zm-435.667-218h151.001v-151.001H186.666v151.001Zm217.667 0h151.334v-151.001H404.333v151.001Zm218 0h151.001v-151.001H622.333v151.001Z"})),st=e=>n.createElement(a.A,Object.assign({component:ot},e)),ct=()=>n.createElement("svg",{viewBox:"0 -960 960 960",focusable:"false","data-icon":"colorize",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M120-120v-175.333L490.667-666l-67.334-66.667 46.667-46L556.667-692l136-136q5-5 11.5-8t13.167-3q6.666 0 13 3 6.333 3 12.333 8L828-742.667q5 6 8 12.333 3 6.334 3 13 0 6.667-3 13.167t-8 11.5L692.333-557 779-469.666l-46.333 46.333L666-490.667 295.333-120H120Zm66.666-66.666h84L618-534.667 534.667-618 186.666-270.666v84Zm457.667-416.667L759-718l-41-41-114.667 114.667 41 41Zm0 0-41-41 41 41Z"})),dt=e=>n.createElement(a.A,Object.assign({component:ct},e)),mt=e=>n.createElement("svg",Object.assign({},e,{viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","data-icon":"eyedropper"}),n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.098 2.598a3.75 3.75 0 1 1 3.622 6.275l-1.72.46V12a.75.75 0 0 1-.22.53l-.75.75a.75.75 0 0 1-1.06 0l-.97-.97-7.94 7.94a2.56 2.56 0 0 1-1.81.75 1.06 1.06 0 0 0-.75.31l-.97.97a.75.75 0 0 1-1.06 0l-.75-.75a.75.75 0 0 1 0-1.06l.97-.97a1.06 1.06 0 0 0 .31-.75c0-.68.27-1.33.75-1.81L11.69 9l-.97-.97a.75.75 0 0 1 0-1.06l.75-.75A.75.75 0 0 1 12 6h2.666l.461-1.72c.165-.617.49-1.2.971-1.682Zm-3.348 7.463L4.81 18a1.06 1.06 0 0 0-.31.75c0 .318-.06.63-.172.922a2.56 2.56 0 0 1 .922-.172c.281 0 .551-.112.75-.31l7.94-7.94-1.19-1.19Z"})),ut=e=>n.createElement(a.A,Object.assign({component:mt},e)),pt=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"replacer",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M8.08337 10V9.16663H9.58337C9.74721 9.16663 9.88538 9.11075 9.99788 8.999C10.1104 8.88717 10.1666 8.74863 10.1666 8.58338V7.41663C10.1666 7.10554 10.2597 6.82637 10.4459 6.57912C10.632 6.33196 10.8722 6.15975 11.1666 6.0625V5.9375C10.8722 5.84583 10.632 5.675 10.4459 5.425C10.2597 5.175 10.1666 4.89446 10.1666 4.58337V3.41663C10.1666 3.25138 10.1108 3.11283 9.999 3.001C9.88717 2.88925 9.74862 2.83337 9.58337 2.83337H8.08337V2H9.58337C9.97779 2 10.3125 2.13775 10.5875 2.41325C10.8625 2.68867 11 3.02313 11 3.41663V4.58337C11 4.74862 11.0559 4.88717 11.1678 4.999C11.2795 5.11075 11.418 5.16663 11.5834 5.16663H12V6.83338H11.5834C11.418 6.83338 11.2795 6.88925 11.1678 7.001C11.0559 7.11283 11 7.25138 11 7.41663V8.58338C11 8.97688 10.8623 9.31133 10.5868 9.58675C10.3113 9.86225 9.97687 10 9.58337 10H8.08337ZM2.41662 10C2.02221 10 1.6875 9.86225 1.4125 9.58675C1.1375 9.31133 1 8.97688 1 8.58338V7.41663C1 7.25138 0.944083 7.11283 0.83225 7.001C0.7205 6.88925 0.581958 6.83338 0.416625 6.83338H0V5.16663H0.416625C0.581958 5.16663 0.7205 5.11075 0.83225 4.999C0.944083 4.88717 1 4.74862 1 4.58337V3.41663C1 3.02313 1.13775 2.68867 1.41325 2.41325C1.68867 2.13775 2.02312 2 2.41662 2H3.91662V2.83337H2.41662C2.25279 2.83337 2.11463 2.88925 2.00213 3.001C1.88963 3.11283 1.83337 3.25138 1.83337 3.41663V4.58337C1.83337 4.89446 1.74029 5.175 1.55413 5.425C1.36804 5.675 1.12779 5.84583 0.833375 5.9375V6.0625C1.12779 6.15975 1.36804 6.33196 1.55413 6.57912C1.74029 6.82637 1.83337 7.10554 1.83337 7.41663V8.58338C1.83337 8.74863 1.88925 8.88717 2.001 8.999C2.11283 9.11075 2.25137 9.16663 2.41662 9.16663H3.91662V10H2.41662Z"}),n.createElement("path",{d:"M6.48214 7.88473V7.13473C6.48214 7.0758 6.43393 7.02759 6.375 7.02759H5.625C5.56607 7.02759 5.51786 7.0758 5.51786 7.13473V7.88473C5.51786 7.94366 5.56607 7.99187 5.625 7.99187H6.375C6.43393 7.99187 6.48214 7.94366 6.48214 7.88473ZM4.25893 7.88473V7.13473C4.25893 7.0758 4.21072 7.02759 4.15179 7.02759H3.40179C3.34286 7.02759 3.29464 7.0758 3.29464 7.13473V7.88473C3.29464 7.94366 3.34286 7.99187 3.40179 7.99187H4.15179C4.21072 7.99187 4.25893 7.94366 4.25893 7.88473ZM8.70536 7.88473V7.13473C8.70536 7.0758 8.65715 7.02759 8.59822 7.02759H7.84822C7.78929 7.02759 7.74107 7.0758 7.74107 7.13473V7.88473C7.74107 7.94366 7.78929 7.99187 7.84822 7.99187H8.59822C8.65715 7.99187 8.70536 7.94366 8.70536 7.88473Z"})),ht=e=>n.createElement(a.A,Object.assign({component:pt},e)),gt=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"editor-mode",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M1 7.14578V6.10422H5.07403V7.14578H1ZM1 4.59375V3.55203H7.38889V4.59375H1ZM1 2.04172V1H7.38889V2.04172H1ZM6 11V9.07812L9.06944 5.64062C9.15278 5.54688 9.24537 5.47917 9.34722 5.4375C9.44907 5.39583 9.55093 5.375 9.65278 5.375C9.76389 5.375 9.87037 5.39844 9.97222 5.44531C10.0741 5.49219 10.1667 5.5625 10.25 5.65625L10.7639 6.23438C10.8442 6.32812 10.9036 6.43229 10.9421 6.54688C10.9807 6.66146 11 6.77604 11 6.89062C11 7.00521 10.98 7.1224 10.9399 7.24219C10.8997 7.36198 10.8382 7.46875 10.7554 7.5625L7.70833 11H6ZM6.83333 10.0625H7.36111L9.04167 8.15625L8.79167 7.85938L8.52778 7.57812L6.83333 9.46875V10.0625ZM8.79167 7.85938L8.52778 7.57812L9.04167 8.15625L8.79167 7.85938Z"})),ft=e=>n.createElement(a.A,Object.assign({component:gt},e)),vt=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"designer-mode",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M6 12C5.18 12 4.405 11.8425 3.675 11.5275C2.945 11.2125 2.3075 10.7825 1.7625 10.2375C1.2175 9.6925 0.7875 9.055 0.4725 8.325C0.1575 7.595 0 6.82 0 6C0 5.1567 0.16085 4.37005 0.48255 3.64005C0.80415 2.91005 1.24245 2.27505 1.79745 1.73505C2.35245 1.19505 3.00165 0.77085 3.74505 0.46245C4.48835 0.15415 5.28335 0 6.13005 0C6.92335 0 7.675 0.13415 8.385 0.40245C9.095 0.67085 9.7175 1.04255 10.2525 1.51755C10.7875 1.99255 11.2125 2.55585 11.5275 3.20745C11.8425 3.85915 12 4.57 12 5.34C12 6.4433 11.6733 7.3058 11.02 7.9275C10.3666 8.5492 9.52665 8.86005 8.50005 8.86005H7.38C7.23 8.86005 7.10585 8.91505 7.00755 9.02505C6.90915 9.13505 6.85995 9.2567 6.85995 9.39C6.85995 9.61 6.9333 9.82085 7.08 10.0225C7.2267 10.2241 7.30005 10.4566 7.30005 10.72C7.30005 11.14 7.1842 11.4584 6.9525 11.6749C6.7208 11.8916 6.4033 12 6 12ZM2.56995 6.46005C2.78995 6.46005 2.9783 6.3817 3.135 6.225C3.2917 6.0683 3.37005 5.87995 3.37005 5.65995C3.37005 5.43995 3.2917 5.25165 3.135 5.09505C2.9783 4.93835 2.78995 4.86 2.56995 4.86C2.34995 4.86 2.16165 4.93835 2.00505 5.09505C1.84835 5.25165 1.77 5.43995 1.77 5.65995C1.77 5.87995 1.84835 6.0683 2.00505 6.225C2.16165 6.3817 2.34995 6.46005 2.56995 6.46005ZM4.42995 3.96C4.64995 3.96 4.8383 3.88165 4.995 3.72495C5.1517 3.56835 5.23005 3.38005 5.23005 3.16005C5.23005 2.94005 5.1517 2.7517 4.995 2.595C4.8383 2.4383 4.64995 2.35995 4.42995 2.35995C4.20995 2.35995 4.02165 2.4383 3.86505 2.595C3.70835 2.7517 3.63 2.94005 3.63 3.16005C3.63 3.38005 3.70835 3.56835 3.86505 3.72495C4.02165 3.88165 4.20995 3.96 4.42995 3.96ZM7.57005 3.96C7.79005 3.96 7.97835 3.88165 8.13495 3.72495C8.29165 3.56835 8.37 3.38005 8.37 3.16005C8.37 2.94005 8.29165 2.7517 8.13495 2.595C7.97835 2.4383 7.79005 2.35995 7.57005 2.35995C7.35005 2.35995 7.1617 2.4383 7.005 2.595C6.8483 2.7517 6.76995 2.94005 6.76995 3.16005C6.76995 3.38005 6.8483 3.56835 7.005 3.72495C7.1617 3.88165 7.35005 3.96 7.57005 3.96ZM9.48 6.46005C9.7 6.46005 9.88835 6.3817 10.045 6.225C10.2016 6.0683 10.28 5.87995 10.28 5.65995C10.28 5.43995 10.2016 5.25165 10.045 5.09505C9.88835 4.93835 9.7 4.86 9.48 4.86C9.26 4.86 9.07165 4.93835 8.91495 5.09505C8.75835 5.25165 8.68005 5.43995 8.68005 5.65995C8.68005 5.87995 8.75835 6.0683 8.91495 6.225C9.07165 6.3817 9.26 6.46005 9.48 6.46005ZM6 11C6.1033 11 6.17915 10.9766 6.22755 10.93C6.27585 10.8833 6.3 10.8133 6.3 10.72C6.3 10.58 6.22665 10.4384 6.07995 10.295C5.93335 10.1517 5.86005 9.88 5.86005 9.48C5.86005 9.0333 6.00835 8.65165 6.30495 8.33505C6.60165 8.01835 6.97335 7.86 7.42005 7.86H8.50005C9.22665 7.86 9.82495 7.6475 10.295 7.2225C10.765 6.7975 11 6.17 11 5.34C11 4.0567 10.5125 3.01255 9.53745 2.20755C8.56245 1.40255 7.42665 1.00005 6.13005 1.00005C4.70335 1.00005 3.49165 1.48335 2.49495 2.44995C1.49835 3.41665 1.00005 4.6 1.00005 6C1.00005 7.3833 1.48755 8.56245 2.46255 9.53745C3.43755 10.5125 4.6167 11 6 11Z"})),bt=e=>n.createElement(a.A,Object.assign({component:vt},e)),yt=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"clear-chat",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M0 9.5V8.33327H9.33333V9.5H0ZM1.33333 6.58327V5.41672H10.6667V6.58327H1.33333ZM2.66667 3.66672V2.5H12V3.66672H2.66667Z"})),Et=e=>n.createElement(a.A,Object.assign({component:yt},e)),_t=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"webhook",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M2.89995 11.7C2.10335 11.7 1.42085 11.4159 0.85245 10.8476C0.28415 10.2792 0 9.59665 0 8.80005C0 8.11005 0.20585 7.50755 0.61755 6.99255C1.02915 6.47755 1.55665 6.14335 2.20005 5.98995V7.035C1.85005 7.1683 1.56255 7.39495 1.33755 7.71495C1.11255 8.03495 1.00005 8.39665 1.00005 8.80005C1.00005 9.32665 1.18505 9.77495 1.55505 10.145C1.92505 10.515 2.37335 10.7 2.89995 10.7C3.42665 10.7 3.875 10.515 4.245 10.145C4.615 9.77495 4.8 9.32665 4.8 8.80005V8.29995H8.46495C8.54495 8.20995 8.6408 8.13745 8.7525 8.08245C8.8642 8.02745 8.98005 7.99995 9.10005 7.99995C9.32335 7.99995 9.5125 8.07745 9.6675 8.23245C9.8225 8.38745 9.9 8.57665 9.9 8.80005C9.9 9.01665 9.8225 9.20415 9.6675 9.36255C9.5125 9.52085 9.32335 9.6 9.10005 9.6C8.98005 9.6 8.8642 9.5725 8.7525 9.5175C8.6408 9.4625 8.54495 9.39 8.46495 9.3H5.76C5.62 9.99 5.28415 10.5625 4.75245 11.0175C4.22085 11.4725 3.60335 11.7 2.89995 11.7ZM9.10005 11.7C8.59335 11.7 8.12915 11.5809 7.70745 11.3426C7.28585 11.1042 6.94505 10.79 6.68505 10.4H8.08005C8.22665 10.5 8.38665 10.575 8.56005 10.625C8.73335 10.675 8.91335 10.7 9.10005 10.7C9.62665 10.7 10.075 10.515 10.445 10.145C10.815 9.77495 11 9.32665 11 8.80005C11 8.27335 10.815 7.825 10.445 7.455C10.075 7.085 9.62665 6.9 9.10005 6.9C8.90665 6.9 8.7283 6.92415 8.565 6.97245C8.4017 7.02085 8.24505 7.09335 8.09505 7.18995L6.195 3.99495C5.9917 3.95495 5.82505 3.8633 5.69505 3.72C5.56505 3.5767 5.50005 3.40335 5.50005 3.19995C5.50005 2.97665 5.5792 2.7875 5.7375 2.6325C5.8958 2.4775 6.0833 2.4 6.3 2.4C6.5233 2.4 6.71245 2.4775 6.86745 2.6325C7.02245 2.7875 7.09995 2.97665 7.09995 3.19995C7.09995 3.24335 7.0983 3.28255 7.095 3.31755C7.0917 3.35255 7.08005 3.4017 7.06005 3.465L8.52495 5.955C8.62495 5.935 8.72495 5.92085 8.82495 5.91255C8.92495 5.90415 9.01665 5.89995 9.10005 5.89995C9.90335 5.89995 10.5875 6.18245 11.1525 6.74745C11.7175 7.31245 12 7.99665 12 8.80005C12 9.59665 11.7175 10.2792 11.1525 10.8476C10.5875 11.4159 9.90335 11.7 9.10005 11.7ZM2.89995 9.6C2.68335 9.6 2.49585 9.52085 2.33745 9.36255C2.17915 9.20415 2.1 9.01665 2.1 8.80005C2.1 8.60665 2.165 8.4383 2.295 8.295C2.425 8.1517 2.58665 8.05505 2.77995 8.00505L4.36005 5.355C4.06335 5.0717 3.82915 4.74585 3.65745 4.37745C3.48585 4.00915 3.40005 3.61665 3.40005 3.19995C3.40005 2.39665 3.6842 1.7125 4.2525 1.1475C4.8208 0.582503 5.5033 0.300003 6.3 0.300003C7.0833 0.300003 7.7558 0.572503 8.3175 1.1175C8.8792 1.6625 9.17335 2.32335 9.19995 3.10005H8.20005C8.18005 2.59335 7.9867 2.16665 7.62 1.81995C7.2533 1.47335 6.8133 1.30005 6.3 1.30005C5.7733 1.30005 5.32495 1.48505 4.95495 1.85505C4.58495 2.22505 4.39995 2.67335 4.39995 3.19995C4.39995 3.62335 4.52495 4.00085 4.77495 4.33245C5.02495 4.66415 5.3433 4.89165 5.73 5.01495L3.645 8.52C3.665 8.5767 3.67915 8.6267 3.68745 8.67C3.69585 8.7133 3.70005 8.75665 3.70005 8.80005C3.70005 9.01665 3.62255 9.20415 3.46755 9.36255C3.31255 9.52085 3.12335 9.6 2.89995 9.6Z"})),wt=e=>n.createElement(a.A,Object.assign({component:_t},e)),Ct=()=>n.createElement("svg",{viewBox:"0 0 30 30",focusable:"false","data-icon":"reload",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M15.0625 24.6874C12.359 24.6874 10.0581 23.7467 8.1599 21.8653C6.26167 19.9839 5.31255 17.6955 5.31255 15V14.0239L3.00002 16.3365L1.68274 15.0192L6.25002 10.4519L10.8173 15.0192L9.50002 16.3365L7.18749 14.0239V15C7.18749 17.1714 7.95192 19.0164 9.48077 20.5348C11.0096 22.0533 12.8702 22.8125 15.0625 22.8125C15.5801 22.8125 16.0974 22.756 16.6142 22.643C17.131 22.5301 17.6354 22.3606 18.1274 22.1346L19.5336 23.5408C18.8301 23.919 18.1038 24.2047 17.3546 24.3978C16.6054 24.5909 15.8414 24.6874 15.0625 24.6874ZM23.75 19.548L19.1827 14.9808L20.5 13.6635L22.8126 15.976V15C22.8126 12.8285 22.0481 10.9835 20.5193 9.46509C18.9904 7.94666 17.1298 7.18744 14.9375 7.18744C14.4199 7.18744 13.9027 7.24393 13.3858 7.35691C12.869 7.46989 12.3646 7.63935 11.8726 7.86531L10.4664 6.45913C11.1699 6.08092 11.8963 5.79526 12.6455 5.60216C13.3947 5.40905 14.1587 5.3125 14.9375 5.3125C17.641 5.3125 19.9419 6.2532 21.8401 8.13459C23.7384 10.016 24.6875 12.3045 24.6875 15V15.976L27 13.6635L28.3173 14.9808L23.75 19.548Z"})),kt=e=>n.createElement(a.A,Object.assign({component:Ct},e)),At=()=>n.createElement("svg",{viewBox:"0 0 12 12",focusable:"false","data-icon":"add-slide",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},n.createElement("path",{d:"M6.49995 7.42005H7.5V5.50005H9.42V4.5H7.5V2.58H6.49995V4.5H4.57995V5.50005H6.49995V7.42005ZM3 10C2.73 10 2.49585 9.90085 2.29755 9.70245C2.09915 9.50415 1.99995 9.27 1.99995 9V1.00005C1.99995 0.73005 2.09915 0.49585 2.29755 0.29745C2.49585 0.0991503 2.73 0 3 0H11C11.27 0 11.5041 0.0991503 11.7025 0.29745C11.9008 0.49585 12 0.73005 12 1.00005V9C12 9.27 11.9008 9.50415 11.7025 9.70245C11.5041 9.90085 11.27 10 11 10H3ZM3 9H11V1.00005H3V9ZM1.00005 12C0.73005 12 0.49585 11.9008 0.29745 11.7025C0.09915 11.5041 0 11.27 0 11V1.99995H1.00005V11H10V12H1.00005Z"})),St=e=>n.createElement(a.A,Object.assign({component:At},e)),It=()=>n.createElement("svg",{width:"18",height:"19",viewBox:"0 0 18 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{x:"0.371338",y:"0.878906",width:"17.29",height:"17.29",rx:"8.645",fill:"white"}),n.createElement("path",{d:"M5.30034 14.1689L4.37134 13.2399L8.08734 9.52391L4.37134 5.80791L5.30034 4.87891L9.01634 8.59491L12.7323 4.87891L13.6613 5.80791L9.94534 9.52391L13.6613 13.2399L12.7323 14.1689L9.01634 10.4529L5.30034 14.1689Z",fill:"#1677FF"})),xt=e=>n.createElement(a.A,Object.assign({component:It},e)),Lt=()=>n.createElement("svg",{width:"18",height:"19",viewBox:"0 0 18 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{x:"0.371338",y:"0.878906",width:"17.29",height:"17.29",rx:"8.645",fill:"#1F1F1F"}),n.createElement("path",{d:"M5.30034 14.1689L4.37134 13.2399L8.08734 9.52391L4.37134 5.80791L5.30034 4.87891L9.01634 8.59491L12.7323 4.87891L13.6613 5.80791L9.94534 9.52391L13.6613 13.2399L12.7323 14.1689L9.01634 10.4529L5.30034 14.1689Z",fill:"white"})),Nt=e=>n.createElement(a.A,Object.assign({component:Lt},e)),Tt=()=>n.createElement("svg",{width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M5.04156 6.58339L0.208313 1.75014L1.39156 0.566895L7.40831 6.58339L1.39156 12.6001L0.208313 11.4169L5.04156 6.58339Z",fill:"#545456"})),Bt=e=>n.createElement(a.A,Object.assign({component:Tt},e)),Pt=()=>n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M6 2H10M2 4H14M12.6667 4L12.1991 11.0129C12.129 12.065 12.0939 12.5911 11.8667 12.99C11.6666 13.3412 11.3648 13.6235 11.0011 13.7998C10.588 14 10.0607 14 9.00623 14H6.99377C5.93927 14 5.41202 14 4.99889 13.7998C4.63517 13.6235 4.33339 13.3412 4.13332 12.99C3.90607 12.5911 3.871 12.065 3.80086 11.0129L3.33333 4M6.66667 7V10.3333M9.33333 7V10.3333",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),Rt=e=>n.createElement(a.A,Object.assign({component:Pt},e)),Ft=e=>{const t=`clip0_149_121_${(0,n.useId)().replace(/:/g,"")}`;return n.createElement("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("g",{clipPath:`url(#${t})`},n.createElement("path",{d:"M10 5.99998L6.00001 9.99998M6.00001 5.99998L10 9.99998M14.6667 7.99998C14.6667 11.6819 11.6819 14.6666 8.00001 14.6666C4.31811 14.6666 1.33334 11.6819 1.33334 7.99998C1.33334 4.31808 4.31811 1.33331 8.00001 1.33331C11.6819 1.33331 14.6667 4.31808 14.6667 7.99998Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})),n.createElement("defs",null,n.createElement("clipPath",{id:t},n.createElement("rect",{width:"16",height:"16",fill:"white"}))))},Ot=e=>n.createElement(a.A,Object.assign({component:Ft},e)),Mt=()=>n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("g",{clipPath:"url(#clip0_149_293)"},n.createElement("path",{d:"M6.66668 8.66666C6.95298 9.04942 7.31825 9.36612 7.73771 9.59529C8.15717 9.82446 8.62102 9.96074 9.09778 9.99489C9.57454 10.029 10.0531 9.96024 10.5009 9.79319C10.9487 9.62613 11.3554 9.36471 11.6933 9.02666L13.6933 7.02666C14.3005 6.39799 14.6365 5.55598 14.6289 4.68199C14.6213 3.808 14.2708 2.97196 13.6527 2.35394C13.0347 1.73591 12.1987 1.38535 11.3247 1.37775C10.4507 1.37016 9.60869 1.70614 8.98001 2.31333L7.83334 3.45333M9.33334 7.33333C9.04704 6.95058 8.68177 6.63388 8.26231 6.4047C7.84285 6.17553 7.37901 6.03925 6.90224 6.00511C6.42548 5.97096 5.94695 6.03975 5.49911 6.20681C5.05128 6.37387 4.6446 6.63528 4.30668 6.97333L2.30668 8.97333C1.69948 9.602 1.3635 10.444 1.3711 11.318C1.37869 12.192 1.72926 13.028 2.34728 13.6461C2.96531 14.2641 3.80135 14.6147 4.67534 14.6222C5.54933 14.6298 6.39134 14.2939 7.02001 13.6867L8.16001 12.5467",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),n.createElement("defs",null,n.createElement("clipPath",{id:"clip0_149_293"},n.createElement("rect",{width:"16",height:"16",fill:"white"})))),jt=e=>n.createElement(a.A,Object.assign({component:Mt},e)),Dt=()=>n.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),Vt=e=>n.createElement(a.A,Object.assign({component:Dt},e)),Wt=()=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",fill:"currentColor"},n.createElement("path",{d:"M760-160v-80q0-17 11.5-28.5T800-280h80v-40H760v-40h120q17 0 28.5 11.5T920-320v40q0 17-11.5 28.5T880-240h-80v40h120v40H760Zm-525-80 185-291-172-269h106l124 200h4l123-200h107L539-531l186 291H618L482-457h-4L342-240H235Z"})),zt=e=>n.createElement(a.A,Object.assign({component:Wt},e)),Ht=()=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",fill:"currentColor"},n.createElement("path",{d:"M760-600v-80q0-17 11.5-28.5T800-720h80v-40H760v-40h120q17 0 28.5 11.5T920-760v40q0 17-11.5 28.5T880-680h-80v40h120v40H760ZM235-160l185-291-172-269h106l124 200h4l123-200h107L539-451l186 291H618L482-377h-4L342-160H235Z"})),Ut=e=>n.createElement(a.A,Object.assign({component:Ht},e)),qt=()=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",style:{overflow:"visible"}},n.createElement("g",{transform:"translate(-5.5, -4.5)"},n.createElement("path",{d:"M13.042 24.5V17.625H8.66699V16.375H13.042V9.5H15.1253V16.375H18.8753V12H20.9587V16.375H25.3337V17.625H20.9587V22H18.8753V17.625H15.1253V24.5H13.042Z"}))),$t=e=>n.createElement(a.A,Object.assign({component:qt},e)),Zt=()=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",style:{overflow:"visible"}},n.createElement("g",{transform:"translate(-5.5, -4.5)"},n.createElement("path",{d:"M8.66699 25.3334V24.0834H25.3337V25.3334H8.66699ZM13.042 22.0001V8.66675H15.1253V22.0001H13.042ZM18.8753 22.0001V13.6667H20.9587V22.0001H18.8753Z"}))),Gt=e=>n.createElement(a.A,Object.assign({component:Zt},e)),Kt=()=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",style:{overflow:"visible"}},n.createElement("g",{transform:"translate(-5.5, -4.5)"},n.createElement("path",{d:"M13.042 25.3334V12.0001H15.1253V25.3334H13.042ZM18.8753 20.3334V12.0001H20.9587V20.3334H18.8753ZM8.66699 9.91675V8.66675H25.3337V9.91675H8.66699Z"}))),Xt=e=>n.createElement(a.A,Object.assign({component:Kt},e)),Yt=()=>n.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none"},n.createElement("path",{d:"M2.32698 19.362C2 18.7202 2 17.8802 2 16.2V12V7V6.2C2 5.0799 2 4.51984 2.21799 4.09202C2.40973 3.71569 2.71569 3.40973 3.09202 3.21799C3.51984 3 4.0799 3 5.2 3H9.02229C9.74021 3 10.0992 3 10.4161 3.10931C10.6963 3.20597 10.9516 3.36373 11.1634 3.57116C11.4029 3.80573 11.5634 4.1268 11.8845 4.76892L13 7C15.3333 7 20 7 20 7V12M2.32698 19.362C2.6146 19.9265 3.07354 20.3854 3.63803 20.673C4.27976 21 5.11984 21 6.8 21H13.8408C15.3463 21 16.099 21 16.7562 20.7633C17.3371 20.554 17.8617 20.2131 18.2888 19.7672C18.7721 19.2629 19.0778 18.575 19.6892 17.1993L22 12H6L2.32698 19.362Z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})),Jt=e=>n.createElement(a.A,Object.assign({component:Yt},e)),Qt=()=>n.createElement("svg",{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"1em",height:"1em","aria-hidden":"true"},n.createElement("path",{d:"M6.5 1.143H5.25A4.108 4.108 0 0 0 1.143 5.25V6.5c0 .078.064.143.142.143h1a.143.143 0 0 0 .143-.143V5.25A2.82 2.82 0 0 1 5.25 2.428H6.5a.143.143 0 0 0 .143-.143v-1a.143.143 0 0 0-.143-.142ZM14.857 6.5V5.25a4.108 4.108 0 0 0-4.107-4.107H9.5a.143.143 0 0 0-.143.142v1c0 .079.064.143.143.143h1.25A2.82 2.82 0 0 1 13.57 5.25V6.5c0 .078.065.143.143.143h1a.143.143 0 0 0 .143-.143ZM9.5 14.857h1.25a4.108 4.108 0 0 0 4.107-4.107V9.5a.143.143 0 0 0-.143-.143h-1a.143.143 0 0 0-.143.143v1.25a2.82 2.82 0 0 1-2.821 2.821H9.5a.143.143 0 0 0-.143.143v1c0 .079.064.143.143.143ZM1.143 9.5v1.25a4.108 4.108 0 0 0 4.107 4.107H6.5a.143.143 0 0 0 .143-.143v-1a.143.143 0 0 0-.143-.143H5.25a2.82 2.82 0 0 1-2.822-2.821V9.5a.143.143 0 0 0-.143-.143h-1a.143.143 0 0 0-.142.143Z",fill:"inherit"})),ei=e=>n.createElement(a.A,Object.assign({component:Qt},e)),ti=()=>n.createElement("svg",{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14",width:"1em",height:"1em","aria-hidden":"true"},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.39 3.12h7.383c.242 0 .438.195.438.437v3.719a.437.437 0 0 1-.438.437H9.547v3.227a.437.437 0 0 1-.438.437H1.727a.437.437 0 0 1-.438-.437V7.22c0-.241.196-.437.438-.437h3.226V3.557c0-.242.196-.438.438-.438Zm.493 7.327h2.734V7.713H5.883v2.734Zm3.664-3.664h2.734V4.05H9.547v2.734Z",fill:"inherit"})),ii=e=>n.createElement(a.A,Object.assign({component:ti},e)),ni=()=>n.createElement("svg",{width:"32",height:"20",viewBox:"0 0 32 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{y:"7",width:"32",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"})),ai=e=>n.createElement(a.A,Object.assign({component:ni},e)),li=()=>n.createElement("svg",{width:"32",height:"20",viewBox:"0 0 32 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{y:"7",width:"15",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),n.createElement("rect",{x:"17",y:"7",width:"15",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"})),ri=e=>n.createElement(a.A,Object.assign({component:li},e)),oi=()=>n.createElement("svg",{width:"32",height:"20",viewBox:"0 0 32 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{y:"7",width:"20.6667",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),n.createElement("rect",{x:"22.6667",y:"7",width:"9.33333",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"})),si=e=>n.createElement(a.A,Object.assign({component:oi},e)),ci=()=>n.createElement("svg",{width:"32",height:"20",viewBox:"0 0 32 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{y:"7",width:"9.33333",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),n.createElement("rect",{x:"11.3333",y:"7",width:"20.6667",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"})),di=e=>n.createElement(a.A,Object.assign({component:ci},e)),mi=()=>n.createElement("svg",{width:"32",height:"20",viewBox:"0 0 32 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{y:"7",width:"9.33333",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),n.createElement("rect",{x:"11.3333",y:"7",width:"9.33333",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),n.createElement("rect",{x:"22.6667",y:"7",width:"9.33333",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"})),ui=e=>n.createElement(a.A,Object.assign({component:mi},e)),pi=()=>n.createElement("svg",{width:"32",height:"20",viewBox:"0 0 32 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("rect",{y:"7",width:"6.5",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),n.createElement("rect",{x:"8.5",y:"7",width:"6.5",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),n.createElement("rect",{x:"17",y:"7",width:"6.5",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"}),n.createElement("rect",{x:"25.5",y:"7",width:"6.5",height:"6",rx:"2",fill:"currentColor",fillOpacity:"0.65"})),hi=e=>n.createElement(a.A,Object.assign({component:pi},e)),gi=()=>n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",focusable:"false",viewBox:"0 0 448 512",width:"1em",height:"1em",fill:"currentColor"},n.createElement("path",{d:"M433.9 129.9l-83.9-83.9A48 48 0 0 0 316.1 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V163.9a48 48 0 0 0 -14.1-33.9zM272 80v80H144V80h128zm122 352H54a6 6 0 0 1 -6-6V86a6 6 0 0 1 6-6h42v104c0 13.3 10.7 24 24 24h176c13.3 0 24-10.7 24-24V83.9l78.2 78.2a6 6 0 0 1 1.8 4.2V426a6 6 0 0 1 -6 6zM224 232c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 128c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40z"})),fi=e=>n.createElement(a.A,Object.assign({component:gi},e)),vi=()=>n.createElement("svg",{width:"24",height:"24",viewBox:"0 0 40 40",preserveAspectRatio:"xMidYMid meet"},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.609 38.644a.437.437 0 01-.566.283C5.43 36.162 0 28.91 0 20.202 0 9.045 8.916 0 19.915 0 30.914 0 39.83 9.045 39.83 20.202c0 10.365-7.695 18.668-17.605 19.795a.439.439 0 01-.48-.508c.037-.235.078-.497.126-.787.7-4.299.868-8.668.503-13.009 0 0-.05-.502-.216-1.811-.043-.337-.011-.496.251-.62.775-.265 1.558-.494 2.325-.785 2.388-.814 4.096-2.927 3.265-5.556-.167-.526-1.163-.73-1.76-.702-.95.04-1.07-.983-.251-1.086.253-.032.92.249.92.1 0-1.96-6.908-.88-8.027-.683a4.478 4.478 0 00-1.667.593 4.55 4.55 0 00-1.316 1.197 4.664 4.664 0 00-.861 3.408c.02.142.056.33.085.479.49 2.56.479 5.284.29 7.871-.219 2.836-.895 6.632-1.296 8.727-.087.457-.323 1.238-.507 1.82zm.978-28.607c.07 1.324.247 2.64.528 3.934.135.747-.03 1.66-1.084 1.937-1.173.309-1.63-.918-1.806-1.568a9.497 9.497 0 01-.386-3.97c.216-1.54.74-2.765 1.565-2.947.858-.19 1.158 1.063 1.183 2.614zm2.736-1.39c.619-1.196 1.17-1.987 1.875-1.86v.002c.707.128.912 1.302.605 2.353a26.682 26.682 0 00-.538 3.144c-.057.755-.783 1.318-1.516 1.173-.703-.128-1.123-.594-1.134-1.526a7.187 7.187 0 01-.708-3.286z",fill:"#3A64F8"})),bi=e=>n.createElement(a.A,Object.assign({component:vi},e))},29770:(e,t,i)=>{"use strict";function n(e,t){if("object"===typeof e&&e){t(e);for(const i of Object.values(e))n(i,t)}}function a(e=".blocks-app"){const t=`${e} &`,i=new WeakSet;return{visit:e=>{if(!i.has(e)){const a={};let l;for(const r of Object.keys(e)){const o=e[r];"object"===typeof o&&o?(o._keyframe&&n(o,e=>i.add(e)),a[r]=o):(l||(l=a[t]={},i.add(l)),l[r]=o)}return a}return e}}}i.d(t,{A:()=>a})},71482:(e,t,i)=>{"use strict";i.d(t,{tS:()=>d,Ay:()=>u,tN:()=>c,rd:()=>m});var n=i(25366),a=i(61374),l=i(87532),r=i(13891);const{defaultAlgorithm:o,darkAlgorithm:s}=a.A,c={hashed:!1,algorithm:o,token:{colorLink:"#1677ff",colorInfo:"#8946F8",colorTextBase:"#000000",colorBgLayout:"#f0f2f5",borderRadius:8},components:{Progress:{colorFillSecondary:"#ffffff"}}},d={hashed:!1,algorithm:s,token:{colorBgBase:"#1F1F1F",colorInfo:"#9254de",colorLink:"#1890ff",colorLinkHover:"#69c0ff",wireframe:!1,borderRadius:8}},m=a.A.useToken,u=(a.A.defaultAlgorithm,a.A.darkAlgorithm,a.A.compactAlgorithm,({withApp:e=!1,children:t,...i})=>{const a=e?n.createElement(r.A,null,t):t;return n.createElement(l.Ay,i,a)})},97531:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(35564);const l=(0,n.forwardRef)((e,t)=>n.createElement(a.A,Object.assign({ref:t},e)));l.displayName="Col";const r=l},83910:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(25366),a=i(96028);const l=e=>n.createElement(a.A,e)},49778:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(34017);const l=(0,n.forwardRef)((e,t)=>n.createElement(a.A,Object.assign({ref:t},e)));l.displayName="Flex";const r=l},85684:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(59246);const l=(0,n.forwardRef)((e,t)=>n.createElement(a.A,Object.assign({ref:t},e)));l.displayName="Row";const r=l},82836:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(8488);const l=(0,n.forwardRef)((e,t)=>n.createElement(a.A,Object.assign({ref:t},e)));l.displayName="Space";const r=Object.assign(l,{Compact:a.A.Compact})},70005:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(54877);const a=n.A;a.Header=n.A.Header,a.Content=n.A.Content,a.Sider=n.A.Sider,a.Footer=n.A.Footer;const l=a},94616:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(25366),a=i(16834),l=i(998);const r=({icon:e,isActive:t,onClick:i,duration:r,onComplete:o})=>{const s=globalThis.localStorage.getItem(l.V0.em_color_scheme),c=matchMedia(l.F3).matches?l.nd:l.T,d=s||c;return n.createElement("div",{className:"carousel-custom-dots-item carousel-custom-dots-item--"+("dark"===d?"dark":"light"),onClick:i},n.createElement("svg",{className:"carousel-custom-dots-item__progress-ring",viewBox:"0 0 50 50"},t&&n.createElement("circle",{cx:"25",cy:"25",r:l.EZ,strokeDasharray:l.uz,strokeDashoffset:l.uz,style:{animationDuration:`${r}ms`},onAnimationEnd:o})),n.createElement(a.A,{icon:e,className:"carousel-custom-dots-item__icon"}))},o=({items:e,duration:t=8e3,autoplay:i=!0,activeIndex:a,defaultActiveIndex:l=0,onChange:o,className:s,style:c})=>{const d=void 0!==a,[m,u]=(0,n.useState)(l),p=d?a:m,[h,g]=(0,n.useState)(i),f=(0,n.useRef)(null),v=(0,n.useCallback)(e=>{d||u(e),null===o||void 0===o||o(e)},[d,o]),b=(0,n.useCallback)(e=>{v(e),g(!1)},[v]),y=(0,n.useCallback)(()=>{const t=(p+1)%e.length;v(t)},[p,e.length,v]);(0,n.useEffect)(()=>{if(i&&h)return f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{v((p+1)%e.length)},t),()=>clearTimeout(f.current)},[i,h,p,t,e.length,v]),(0,n.useEffect)(()=>{i&&g(!0)},[i]);const E=["carousel-custom-dots",s].filter(Boolean).join(" ");return n.createElement("div",{className:E,style:c},e.map((e,i)=>n.createElement(r,{key:e,icon:e,isActive:p===i,onClick:()=>b(i),duration:t,onComplete:y})))}},1703:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(71482),a=i(25366),l=i(68644),r=i(998);const o=a.forwardRef(({data:e=[],coruselStyle:t,customDots:i=!1,carouselRef:o,effect:s=r.Mj.fade,header:c=!1,className:d,style:m,children:u,...p},h)=>{const{token:g}=(0,n.rd)(),f=null!==h&&void 0!==h?h:o,v=null!==u&&void 0!==u?u:e.map(e=>a.createElement("div",{key:e.id,className:"slide"},c&&a.createElement("div",{className:"slide-title",style:{color:g.colorText}},null===e||void 0===e?void 0:e.textHeader),null===e||void 0===e?void 0:e.content));return a.createElement(a.Fragment,null,i&&e.length>0&&a.createElement("div",{className:"custom-dot"},e.length),a.createElement(l.A,Object.assign({ref:f,style:null!==m&&void 0!==m?m:t,className:null!==d&&void 0!==d?d:"em-carousel",effect:s},p),v))});o.displayName="Carousel";const s=o},63332:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(24505);const l=e=>n.createElement(a.A,e);l.Item=a.A.Item,l.displayName="Breadcrumb";const r=l},12179:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var n=i(25366),a=i(74228),l=i(74572),r=i.n(l);const o=({className:e,...t})=>n.createElement(a.A,Object.assign({className:r()("em-dropdown",e)},t));o.displayName="Dropdown";const s=o;s.Button=a.A.Button;const c=s},1331:(e,t,i)=>{"use strict";var n=i(25366),a=i(40399);const l=e=>n.createElement(a.A,e);l.Group=a.A.Group,l.BackTop=a.A.BackTop},35256:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(25366),a=i(56708),l=i(74572),r=i.n(l);const o=({className:e,...t})=>n.createElement(a.A,Object.assign({className:r()("em-menu",e)},t));o.displayName="Menu";const s=o},49573:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(25366),a=i(74572),l=i.n(a),r=i(85531);const o=({variant:e="default",className:t,...i})=>n.createElement(r.A,Object.assign({},i,{className:l()(t,"view-switcher"===e&&"segmented_view-switcher")}))},96923:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(14657);const l={inkBar:!1,tabPane:!1},r=n.forwardRef(({animated:e=l,...t},i)=>n.createElement(a.A,Object.assign({ref:i,animated:e},t)))},41467:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(99233);const l=n.forwardRef((e,t)=>n.createElement(a.A.Link,Object.assign({ref:t},e)));l.displayName="Link";const r=l},32622:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(99233);const l=n.forwardRef((e,t)=>n.createElement(a.A.Paragraph,Object.assign({ref:t},e)));l.displayName="Paragraph";const r=l},29682:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(99233);const l=n.forwardRef((e,t)=>n.createElement(a.A.Text,Object.assign({ref:t},e)));l.displayName="Text";const r=l},88337:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(25366),a=i(99233);const l=n.forwardRef((e,t)=>n.createElement(a.A.Title,Object.assign({ref:t},e)));l.displayName="Title";const r=l},99888:(e,t,i)=>{"use strict";i.d(t,{A:()=>m});var n=i(25366),a=i(99233),l=i(88337),r=i(29682),o=i(41467),s=i(32622);const c=n.forwardRef((e,t)=>n.createElement(a.A,Object.assign({ref:t},e)));c.displayName="Typography";const d=c;d.Title=l.A,d.Text=r.A,d.Paragraph=s.A,d.Link=o.A;const m=d},998:(e,t,i)=>{"use strict";i.d(t,{EZ:()=>o,F3:()=>l,I1:()=>p,It:()=>E,Jn:()=>v,MS:()=>d,Mj:()=>m,OT:()=>c,T:()=>a,Tg:()=>_,V0:()=>r,Xr:()=>w,cP:()=>k,f5:()=>b,g4:()=>C,jw:()=>g,nd:()=>n,qW:()=>f,uZ:()=>h,uz:()=>s,xr:()=>y,yz:()=>u});const n="dark",a="light",l="(prefers-color-scheme: dark)",r={em_color_scheme:"em_color_scheme",em_code_mode_pane_sizes:"em_code_mode_pane_sizes",em_preview_pane_sizes:"em_preview_pane_sizes",em_default_sizes:"em_default_sizes",em_pane_sizes:"em_pane_sizes",em_test_emails:"em_test_emails",em_menu_is_locked:"em_menu_is_locked",em_code_mode_settings:"em_code_mode_settings",em_folder_is_open:"em_folder_is_open",em_active_tab:"em_active_tab",em_ai_settings:"em_ai_settings",em_last_active_page:"em_last_active_page"},o=24,s=2*Math.PI*o,c="rgba(0, 0, 0, 0.06)",d="rgb(255, 77, 79)";let m=function(e){return e.fade="fade",e.scrollx="scrollx",e}({});const u="66%",p="100%",h="34%",g=34,f=["Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Tab","Enter","Home","End"],v=[{label:"Segoe UI, Helvetica Neue, Helvetica, Arial, sans-serif",value:"-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif",className:"Segoe"},{label:"Helvetica, Helvetica Neue, Arial, sans-serif",value:"Helvetica, 'Helvetica Neue', Arial, sans-serif",className:"Helvetica"},{label:"Arial Black, Gadget, sans-serif",value:"'Arial Black', Gadget, sans-serif",className:"ArialBlack"},{label:"Comic Sans MS, cursive",value:"'Comic Sans MS', cursive",className:"ComicSans"},{label:"Courier New, Courier, monospace",value:"'Courier New', Courier, monospace",className:"CourierNew"},{label:"Georgia, serif",value:"Georgia, serif",className:"Georgia"},{label:"Impact, Charcoal, sans-serif",value:"Impact, Charcoal, sans-serif",className:"Impact"},{label:"Lucida Console, Monaco, monospace",value:"'Lucida Console', Monaco, monospace",className:"LucidaConsole"},{label:"Lucida Sans Unicode, Lucida Grande, sans-serif",value:"'Lucida Sans Unicode', 'Lucida Grande', sans-serif",className:"LucidaSans"},{label:"Palatino Linotype, Book Antiqua, Palatino, serif",value:"'Palatino Linotype', 'Book Antiqua', Palatino, serif",className:"Palatino"},{label:"Tahoma, Geneva, sans-serif",value:"Tahoma, Geneva, sans-serif",className:"Tahoma"},{label:"Times New Roman, Times, serif",value:"'Times New Roman', Times, serif",className:"TimesNewRoman"},{label:"Trebuchet MS, Helvetica, sans-serif",value:"'Trebuchet MS', Helvetica, sans-serif",className:"Trebuchet"},{label:"Verdana, Geneva, sans-serif",value:"Verdana, Geneva, sans-serif",className:"Verdana"}],b={100:"Thin","100i":"Thin Italic",200:"ExtraLight","200i":"ExtraLight Italic",300:"Light","300i":"Light Italic",400:"Regular","400i":"Regular Italic",500:"Medium","500i":"Medium Italic",600:"SemiBold","600i":"SemiBold Italic",700:"Bold","700i":"Bold Italic",800:"ExtraBold","800i":"ExtraBold Italic",900:"Black","900i":"Black Italic"},y={safeFonts:"Safe Fonts",googleFonts:"Google Fonts",sansSerif:"Sans Serif",serif:"Serif"},E={subsets:["cyrillic"],maxPopularity:100},_="Safe Fonts",w="Google Fonts",C="Sans Serif",k="Serif"},88147:(e,t,i)=>{"use strict";i.d(t,{Kp:()=>a,Sb:()=>l,_1:()=>n});const n="SHOW",a="SAVE",l="NOTIFY"},13541:(e,t,i)=>{"use strict";i.d(t,{Y:()=>I});var n=i(25366),a=i(85472),l=i(29749),r=i(81415),o=i(52741),s=i.n(o),c=i(14365),d=i(42018),m=i(65751),u=i(10430),p=i(90701),h=i(66959),g=i(9417),f=i(76508),v=i(67815);const b=c.ti;var y=i(69064),E=i(33087),_=i(46975);const w="em_locale",C="em_ant_locale",k="em_mergeTags_locale",A=e=>{try{return JSON.parse(localStorage.getItem(e)||"")}catch{return null}},S=()=>{const e=A(C);return(null===e||void 0===e?void 0:e.data)||b},I=({children:e})=>{const t=(0,g.NF)(),o=(0,a.wA)(),b=(0,p.hN)(),I=(0,a.d4)(m.C1),x=(0,a.d4)(m.B),[L,N]=(0,u.HO)(),[T,B]=(0,u.Yj)(),P=(0,v.ml)(E.AZ.READ_LOCALE),R=x||(y.EW.isPlugin?void 0:"ru_RU"),[F,O]=(0,n.useState)(()=>(0,r.hU)()),[M,j]=(0,n.useState)(S),[D,V]=(0,n.useState)(!0),[W,z]=(0,n.useState)(!1),H=(0,n.useRef)(!1);return(0,n.useEffect)(()=>{if(H.current||!R)return;H.current=!0;const e=A(w)||((e,t)=>{const i=A(e);return i?(localStorage.removeItem(e),localStorage.setItem(t,JSON.stringify(i)),i):null})("locale",w);if(null!==e&&void 0!==e&&e.data&&e.id===R&&(O((0,r.hU)(e.data)),V(!1)),!y.EW.isPlugin){const e=A(k);null!==e&&void 0!==e&&e.data&&o((0,d.Kj)(e.data))}},[R]),(0,n.useEffect)(()=>{R&&i(77778)(`./${"uk"===R?"uk_UA":R}.js`).then(e=>{const t=e.default;j(i=>i.locale!==t.locale?(localStorage.setItem(C,JSON.stringify({id:R,data:e.default})),t):i)}).catch(e=>{})},[R,null===I||void 0===I?void 0:I.id]),(0,n.useEffect)(()=>{!y.EW.isPlugin&&R&&i(93718)(`./${"uk"===R?"uk_UA":R}.ts`).then(e=>{o((0,d.Kj)(e.default)),localStorage.setItem(k,JSON.stringify(e.default))})},[R,o,null===I||void 0===I?void 0:I.id]),(0,h.ZC)(([e])=>{!e&&N.error&&b.fromError("GET_LOCALES_ERROR",void 0,N.error)},[N.error,b]),(0,h.ZC)(([e])=>{R&&e!==R&&P.fire(R).then(([e])=>{if(e){var i;const t=null===(i=s()(e,{format:"jed",fuzzy:!0,domain:"default"}))||void 0===i?void 0:i.locale_data.default;O((0,r.hU)(t)),z(!0)}else y.EW.isPlugin&&t.getInstance(_.Ef)?z(!0):N.isSuccess?T({id:R}):L()})},[R,P,null===I||void 0===I?void 0:I.id]),(0,n.useEffect)(()=>{if(N.isSuccess&&R){const e=N.data.find(([e])=>e===R);if(!e)return void z(!0);const t=A(w);(null===t||void 0===t?void 0:t.id)===R&&e[1]<=t.time?z(!0):T({id:R})}},[R,N,T,null===I||void 0===I?void 0:I.id]),(0,h.ZC)(([e])=>{!e&&B.isError&&b.fromError("GET_LOCALE_ERROR",void 0,B.isError)},[B.isError,b]),(0,n.useEffect)(()=>{if(N.isSuccess&&B.isSuccess){var e,t;if((null===(e=B.originalArgs)||void 0===e?void 0:e.id)!==R)return;const i=B.data,n=N.data.find(([e])=>e===R),a=null===(t=s()(i,{format:"jed",fuzzy:!0,domain:"default"}))||void 0===t?void 0:t.locale_data.default;localStorage.setItem(w,JSON.stringify({id:R,time:(null===n||void 0===n?void 0:n[1])||Date.now(),data:a})),O((0,r.hU)(a)),z(!0)}},[B,R,N,null===I||void 0===I?void 0:I.id]),n.createElement(f.CY,{i18n:F},n.createElement(l.r4.Provider,{value:!D||W},n.createElement(c.NP,{locale:M},e)))}},91476:e=>{e.exports=({__:e})=>`<style em="styles">\n amp-accordion > section > * {\n background: none !important;\n padding: 0 !important;\n border: none !important;\n overflow: visible !important;\n }\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <amp-accordion animate expand-single-section>\n <section>\n <header>\n <table cellpadding="0" cellspacing="0" border="0" width="100%">\n <tr>\n <td style="padding: 10px 0; border-bottom: 1px solid #CCCCCC;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;"><strong>${e("Section title")}</strong></div>\n </td>\n </tr>\n </table>\n </header>\n <div>\n <table cellpadding="0" cellspacing="0" border="0" width="100%" em="atom">\n <tr>\n <td style="padding: 10px 0;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")}</div>\n </td>\n </tr>\n </table>\n </div>\n </section>\n </amp-accordion>\n</td></tr></table>`},7579:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td style="padding: 10px 0;">\n <table cellpadding="0" cellspacing="0" border="0" width="200" class="em-mob-width-100perc">\n <tr>\n <td align="center" valign="middle" height="41" style="background-color: #1C52DC; border-radius: 5px; height: 41px;">\n <a href="" target="_blank" style="display: block; font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #FFFFFF; font-size: 16px; line-height: 41px; text-decoration: none; white-space: nowrap;">\n ${e("Button")}\n </a>\n </td>\n </tr>\n </table>\n</td></tr></table>`},34965:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <amp-carousel width="800" height="600" layout="responsive" type="slides" controls>\n <amp-img src="${e("https://cdn.useblocks.io/1351/241031_18_JoH0f3E.png")}" width="800" height="600" layout="responsive" alt=""></amp-img>\n <amp-img src="${e("https://cdn.useblocks.io/1351/241031_18_aJAY1Xz.png")}" width="800" height="600" layout="responsive" alt=""></amp-img>\n <amp-img src="${e("https://cdn.useblocks.io/1351/241031_18_OQEyMEF.png")}" width="800" height="600" layout="responsive" alt=""></amp-img>\n </amp-carousel>\n</td></tr></table>`},73706:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td height="0" style="padding: 20px 0 0; border-top: 1px solid #BFBFBF;">&nbsp;</td></tr></table>'},32294:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td style="padding: 20px 0 10px;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; line-height: 32px; color: #333333;"><strong>${e("Header text")}</strong></div>\n</td></tr></table>`},22456:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <table class="em-element-list-ol" cellpadding="0" cellspacing="0" border="0" width="100%">\n <tr>\n <td align="left" valign="top" width="20">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">1.&nbsp;</div>\n </td>\n <td align="left" valign="top" style="padding-bottom: 5px; padding-left: 1px;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")}</div>\n </td>\n </tr>\n </table>\n</td></tr></table>`},32802:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <table class="em-element-list-ul" cellpadding="0" cellspacing="0" border="0" width="100%">\n <tr>\n <td align="left" valign="top" width="20">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">&bull;</div>\n </td>\n <td align="left" valign="top" style="padding-bottom: 5px; padding-left: 1px;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")}</div>\n </td>\n </tr>\n </table>\n</td></tr></table>`},29299:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td height="20"></td></tr></table>'},61587:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" width="100%" class="em-mob-width-100perc em-element-custom-table" em="atom" style="border: 1px solid #b9b1b1;" align="center">\n <tr>\n <td align="center" valign="top" style="border: 1px solid #b9b1b1;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Column")} 1</div>\n </td>\n <td align="center" valign="top" style="border: 1px solid #b9b1b1;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Column")} 2</div>\n </td>\n <td align="center" valign="top" style="border: 1px solid #b9b1b1;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Column")} 3</div>\n </td>\n </tr>\n</table>`},10324:e=>{e.exports=({__:e})=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td style="padding-bottom: 10px;">\n <div style="font-family: -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 21px; color: #5A5A5A;">${e("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")}</div>\n</td></tr></table>`},7648:(e,t,i)=>{"use strict";i.d(t,{NW:()=>l,RH:()=>s,Vz:()=>c,ax:()=>d,lS:()=>o,uE:()=>r,wF:()=>a,yy:()=>n});const n={paddingTop:"top",paddingLeft:"left",paddingRight:"right",paddingBottom:"bottom",mobilePaddingTop:"top",mobilePaddingLeft:"left",mobilePaddingRight:"right",mobilePaddingBottom:"bottom"},a={borderRadiusAll:"all",borderRadiusTopLeft:"topLeft",borderRadiusBottomLeft:"bottomLeft",borderRadiusTopRight:"topRight",borderRadiusBottomRight:"bottomRight"},l={mobileBorderRadiusAll:"all",mobileBorderRadiusTopLeft:"topLeft",mobileBorderRadiusBottomLeft:"bottomLeft",mobileBorderRadiusTopRight:"topRight",mobileBorderRadiusBottomRight:"bottomRight"},r={all:"borderAll",top:"borderTop",right:"borderRight",bottom:"borderBottom",left:"borderLeft"},o={all:"mobileBorderAll",top:"mobileBorderTop",right:"mobileBorderRight",bottom:"mobileBorderBottom",left:"mobileBorderLeft"},s={width:null,style:null,color:null},c={borderAll:"all",borderTop:"top",borderRight:"right",borderBottom:"bottom",borderLeft:"left"},d={mobileBorderAll:"all",mobileBorderTop:"top",mobileBorderRight:"right",mobileBorderBottom:"bottom",mobileBorderLeft:"left"}},45354:(e,t,i)=>{"use strict";i.d(t,{EX:()=>r});const n=["vk","telegram","youtube","tiktok","ok","pinterest","max","rutube","yandex_zen","vkv","drbl","fig","gh","ggl","rdt","sptf","twitch"],a=["telegram","whatsapp","instagram","facebook","youtube","tiktok","x","linkedin","pinterest","viber","apple","dis","drbl","fig","ggl","mdm","rdt","sgnl","sc","sptf","tmblr","twitch","thrds","msngr","bs"],l=[{id:"vk",labelMsgid:"VK",brands:["em"]},{id:"telegram",labelMsgid:"Telegram",brands:["em","blocks"]},{id:"youtube",labelMsgid:"YouTube",brands:["em","blocks"]},{id:"tiktok",labelMsgid:"TikTok",brands:["em","blocks"]},{id:"ok",labelMsgid:"\u041e\u0434\u043d\u043e\u043a\u043b\u0430\u0441\u0441\u043d\u0438\u043a\u0438",brands:["em"]},{id:"pinterest",labelMsgid:"Pinterest",brands:["em","blocks"]},{id:"max",labelMsgid:"\u041c\u0430\u043a\u0441",brands:["em"]},{id:"rutube",labelMsgid:"RuTube",brands:["em"]},{id:"yandex_zen",labelMsgid:"\u042f\u043d\u0434\u0435\u043a\u0441 \u0414\u0437\u0435\u043d",brands:["em"]},{id:"whatsapp",labelMsgid:"WhatsApp",brands:["blocks"]},{id:"instagram",labelMsgid:"Instagram",brands:["blocks"]},{id:"facebook",labelMsgid:"Facebook",brands:["blocks"]},{id:"x",labelMsgid:"X (Twitter)",brands:["blocks"]},{id:"linkedin",labelMsgid:"LinkedIn",brands:["blocks"]},{id:"viber",labelMsgid:"Viber",brands:["blocks"]},{id:"apple",labelMsgid:"Apple",brands:["blocks"]},{id:"dis",labelMsgid:"Discord",brands:["blocks"]},{id:"drbl",labelMsgid:"Dribbble",brands:["blocks","em"]},{id:"fig",labelMsgid:"Figma",brands:["blocks","em"]},{id:"gh",labelMsgid:"GitHub",brands:["blocks","em"]},{id:"ggl",labelMsgid:"Google",brands:["blocks","em"]},{id:"mdm",labelMsgid:"Medium",brands:["blocks"]},{id:"rdt",labelMsgid:"Reddit",brands:["blocks","em"]},{id:"sgnl",labelMsgid:"Signal",brands:["blocks"]},{id:"sc",labelMsgid:"Snapchat",brands:["blocks"]},{id:"sptf",labelMsgid:"Spotify",brands:["blocks","em"]},{id:"tmblr",labelMsgid:"Tumblr",brands:["blocks"]},{id:"twitch",labelMsgid:"Twitch",brands:["blocks","em"]},{id:"thrds",labelMsgid:"Threads",brands:["blocks"]},{id:"msngr",labelMsgid:"Messenger",brands:["blocks"]},{id:"bs",labelMsgid:"Bluesky",brands:["blocks"]},{id:"vkv",labelMsgid:"VK \u0412\u0438\u0434\u0435\u043e",brands:["em"]}];function r(e){const t="em"===e?n:a,i=new Set(t),r=Object.fromEntries(l.filter(t=>t.brands.includes(e)&&i.has(t.id)).map(e=>[e.id,e]));return t.map(e=>r[e]).filter(e=>Boolean(e))}},38074:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n\n .em-mob-wrap {\n display: block!important;\n }\n\n .em-mob-padding_right-20 {\n padding-right: 20px!important;\n }\n \n .em-mob-padding_left-20 {\n padding-left: 20px!important;\n }\n }\n</style>\n<tr em="block" class="em-structure">\n <td align="center" style="padding: 30px 40px;" class="em-mob-padding_left-20 em-mob-padding_right-20">\n <table border="0" cellspacing="0" cellpadding="0" class="em-mob-width-100perc">\n <tr>\n <td width="580" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n </tr>\n </table>\n </td>\n</tr>'},11830:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n\n .em-mob-wrap {\n display: block!important;\n }\n\n .em-mob-padding_right-20 {\n padding-right: 20px!important;\n }\n \n .em-mob-padding_left-20 {\n padding-left: 20px!important;\n }\n\n .em-mob-height-20px {\n height: 20px!important;\n }\n }\n</style>\n<tr em="block" class="em-structure">\n <td align="center" style="padding: 30px 40px;" class="em-mob-padding_left-20 em-mob-padding_right-20">\n <table border="0" cellspacing="0" cellpadding="0" class="em-mob-width-100perc">\n <tr>\n <td width="180" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="380" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n </tr>\n </table>\n </td>\n</tr>'},94469:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n\n .em-mob-wrap {\n display: block!important;\n }\n\n .em-mob-padding_right-20 {\n padding-right: 20px!important;\n }\n \n .em-mob-padding_left-20 {\n padding-left: 20px!important;\n }\n\n .em-mob-height-20px {\n height: 20px!important;\n }\n }\n</style>\n<tr em="block" class="em-structure">\n <td align="center" style="padding: 30px 40px;" class="em-mob-padding_left-20 em-mob-padding_right-20">\n <table border="0" cellspacing="0" cellpadding="0" class="em-mob-width-100perc">\n <tr>\n <td width="280" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="280" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n </tr>\n </table>\n </td>\n</tr>'},81396:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n\n .em-mob-wrap {\n display: block!important;\n }\n\n .em-mob-padding_right-20 {\n padding-right: 20px!important;\n }\n \n .em-mob-padding_left-20 {\n padding-left: 20px!important;\n }\n\n .em-mob-height-20px {\n height: 20px!important;\n }\n }\n</style>\n<tr em="block" class="em-structure">\n <td align="center" style="padding: 30px 40px;" class="em-mob-padding_left-20 em-mob-padding_right-20">\n <table border="0" cellspacing="0" cellpadding="0" class="em-mob-width-100perc">\n <tr>\n <td width="380" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="180" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n </tr>\n </table>\n </td>\n</tr>'},17648:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n\n .em-mob-wrap {\n display: block!important;\n }\n\n .em-mob-padding_right-20 {\n padding-right: 20px!important;\n }\n \n .em-mob-padding_left-20 {\n padding-left: 20px!important;\n }\n\n .em-mob-height-20px {\n height: 20px!important;\n }\n }\n</style>\n<tr em="block" class="em-structure">\n <td align="center" style="padding: 30px 40px;" class="em-mob-padding_left-20 em-mob-padding_right-20">\n <table border="0" cellspacing="0" cellpadding="0" class="em-mob-width-100perc">\n <tr>\n <td width="180" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="180" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="180" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n </tr>\n </table>\n </td>\n</tr>'},82917:e=>{e.exports='<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n\n .em-mob-wrap {\n display: block!important;\n }\n\n .em-mob-padding_right-20 {\n padding-right: 20px!important;\n }\n \n .em-mob-padding_left-20 {\n padding-left: 20px!important;\n }\n\n .em-mob-height-20px {\n height: 20px!important;\n }\n }\n</style>\n<tr em="block" class="em-structure">\n <td align="center" style="padding: 30px 40px;" class="em-mob-padding_left-20 em-mob-padding_right-20">\n <table border="0" cellspacing="0" cellpadding="0" class="em-mob-width-100perc">\n <tr>\n <td width="130" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="130" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="130" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n <td width="20" class="em-mob-wrap em-mob-height-20px"></td>\n <td width="130" valign="top" class="em-mob-wrap em-mob-width-100perc"></td>\n </tr>\n </table>\n </td>\n</tr>'},84153:e=>{e.exports='\n<style>\n\t@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {\n\t\t.em-mob-width-100perc {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t}\n\n\t\t.em-mob-width-91perc {\n\t\t\twidth: 91% !important;\n\t\t\tmax-width: 91% !important;\n\t\t}\n\t}\n</style>\n<tr em="block" class="em-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center" valign="top">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30"></td></tr></table>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t<table border="0" cellspacing="0" cellpadding="0">\n\t\t\t\t\t<tr><td width="660" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 100%; max-width: 660px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="602" border="0" cellspacing="0" cellpadding="0" style="width: 91%; max-width: 602px;" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table><![endif]--\x3e\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="10"></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n\n'},82095:e=>{e.exports='\n<style>\n\t@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {\n\t\t.em-mob-width-100perc {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t}\n\n\t\t.em-mob-width-91perc {\n\t\t\twidth: 91% !important;\n\t\t\tmax-width: 91% !important;\n\t\t}\n\t}\n</style>\n<tr em="block" class="em-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center" valign="top">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30"></td></tr></table>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t<table border="0" cellspacing="0" cellpadding="0">\n\t\t\t\t\t<tr><td width="207" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 207px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="187" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]></td><td width="413" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 413px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="393" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table><![endif]--\x3e\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="10"></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n\n'},50820:e=>{e.exports='\n<style>\n\t@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {\n\t\t.em-mob-width-100perc {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t}\n\n\t\t.em-mob-width-91perc {\n\t\t\twidth: 91% !important;\n\t\t\tmax-width: 91% !important;\n\t\t}\n\t}\n</style>\n<tr em="block" class="em-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center" valign="top">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30"></td></tr></table>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t<table border="0" cellspacing="0" cellpadding="0">\n\t\t\t\t\t<tr><td width="311" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 311px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="291" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]></td><td width="311" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 311px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="291" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table><![endif]--\x3e\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="10"></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n\n'},32489:e=>{e.exports='\n<style>\n\t@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {\n\t\t.em-mob-width-100perc {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t}\n\n\t\t.em-mob-width-91perc {\n\t\t\twidth: 91% !important;\n\t\t\tmax-width: 91% !important;\n\t\t}\n\t}\n</style>\n<tr em="block" class="em-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center" valign="top">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30"></td></tr></table>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t<table border="0" cellspacing="0" cellpadding="0">\n\t\t\t\t\t<tr><td width="413" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 413px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="393" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]></td><td width="207" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 207px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="187" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table><![endif]--\x3e\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="10"></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n\n'},72823:e=>{e.exports='\n<style>\n\t@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {\n\t\t.em-mob-width-100perc {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t}\n\n\t\t.em-mob-width-91perc {\n\t\t\twidth: 91% !important;\n\t\t\tmax-width: 91% !important;\n\t\t}\n\t}\n</style>\n<tr em="block" class="em-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center" valign="top">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30"></td></tr></table>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t<table border="0" cellspacing="0" cellpadding="0">\n\t\t\t\t\t<tr><td width="207" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 207px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="187" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]></td><td width="207" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 207px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="187" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]></td><td width="207" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 207px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="187" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table><![endif]--\x3e\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="10"></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n\n'},14294:e=>{e.exports='\n<style>\n\t@media only screen and (max-device-width: 660px), only screen and (max-width: 660px) {\n\t\t.em-mob-width-100perc {\n\t\t\twidth: 100% !important;\n\t\t\tmax-width: 100% !important;\n\t\t}\n\n\t\t.em-mob-width-91perc {\n\t\t\twidth: 91% !important;\n\t\t\tmax-width: 91% !important;\n\t\t}\n\t}\n</style>\n<tr em="block" class="em-structure">\n\t<td align="center">\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t<table cellpadding="0" cellspacing="0" border="0" width="660"><tr><td>\n\t\t<![endif]--\x3e\n\t\t<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width: 660px;">\n\t\t\t<tr>\n\t\t\t\t<td align="center" valign="top">\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="30"></td></tr></table>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t<table border="0" cellspacing="0" cellpadding="0">\n\t\t\t\t\t<tr><td width="310" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 310px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="290" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t\t<td width="20">&nbsp;</td>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]></td><td width="310" valign="top" align="center"><![endif]--\x3e\n\t\t\t\t\t<div style="display: inline-block; width: 310px; vertical-align: top;" class="em-mob-width-100perc">\n\t\t\t\t\t\t<table width="290" border="0" cellspacing="0" cellpadding="0" class="em-mob-width-91perc">\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t\t<td width="20">&nbsp;</td>\n\t\t\t\t\t\t\t\t<td align="left"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="20"></td></tr></table>\n\t\t\t\t\t</div>\n\t\t\t\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t</table><![endif]--\x3e\n\t\t\t\t\t<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height="10"></td></tr></table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\x3c!--[if (gte mso 9)|(IE)]>\n\t\t</td></tr></table>\n\t\t<![endif]--\x3e\n\t</td>\n</tr>\n\n'},42420:(e,t,i)=>{"use strict";i.d(t,{BS:()=>f,Ef:()=>v,d2:()=>g,v3:()=>b,ww:()=>p});const n="https://emcdn.ru/socnets";function a(e){return`${function(e){let t=String(null!==e&&void 0!==e?e:"");for(;t.endsWith("/");)t=t.slice(0,-1);return t}(n)}/${function(e){let t=String(null!==e&&void 0!==e?e:"");for(;t.startsWith("/");)t=t.slice(1);return t}(e)}`}const l={telegram:"tg",youtube:"yt",vk:"vk",yandex_zen:"yd",x:"xa",pinterest:"pi",tiktok:"tt",ok:"ok",max:"max",rutube:"rutube",linkedin:"linkedin",viber:"viber",drbl:"drbl",fig:"fig",gh:"gh",ggl:"ggl",rdt:"rdt",sptf:"sptf",twitch:"twitch",vkv:"vkv"};function r(e,t){return a(`${e}${t?"-negative":""}.png`)}function o(e){var t;const i=function(e){var t,i;const n=String(null!==(t=e.buttonBgColor)&&void 0!==t?t:"").trim();return n||(e.blockBgEnabled&&String(null!==(i=e.blockBgColor)&&void 0!==i?i:"").trim()?String(e.blockBgColor).trim():"")}(e);return i||String(null!==(t=e.hostCellBgForIconLuminance)&&void 0!==t?t:"").trim()}function s(e){const t=String(null!==e&&void 0!==e?e:"").trim();if(t.endsWith("%")){const e=parseFloat(t);return Number.isNaN(e)?null:Math.min(1,Math.max(0,e/100))}const i=parseFloat(t);return Number.isNaN(i)?null:Math.min(1,Math.max(0,i))}function c(e){const t=String(null!==e&&void 0!==e?e:"").trim();if(t.endsWith("%")){const e=parseFloat(t);return Number.isNaN(e)?null:Math.min(255,Math.max(0,Math.round(e/100*255)))}const i=parseFloat(t);return Number.isNaN(i)?null:Math.min(255,Math.max(0,Math.round(i)))}function d(e){const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function m(e){const t=function(e){const t=String(null!==e&&void 0!==e?e:"").trim().toLowerCase();if(!t||"transparent"===t)return null;if(t.startsWith("#")){let e=t.slice(1);return/^[0-9a-f]{3}$/i.test(e)&&(e=e.split("").map(e=>e+e).join("")),/^[0-9a-f]{6}$/i.test(e)?{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1}:/^[0-9a-f]{8}$/i.test(e)?{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:parseInt(e.slice(6,8),16)/255}:null}const i=/^rgba?\(\s*([^)]+)\)$/i.exec(t);if(!i)return null;let n=1,a=i[1];if(a.includes("/")){const e=a.split(/\s*\/\s*/);if(a=e[0].trim(),!e[1])return null;const t=s(e[1]);if(null===t)return null;n=t}const l=a.split(/[\s,]+/).map(e=>e.trim()).filter(Boolean);if(l.length<3)return null;const r=c(l[0]),o=c(l[1]),d=c(l[2]);if(null===r||null===o||null===d)return null;if(l.length>=4&&!i[1].includes("/")){const e=s(l[3]);if(null===e)return null;n=e}return{r:r,g:o,b:d,a:n}}(e);if(!t)return null;const i=t.a,n=e=>Math.round(e*i+255*(1-i)),a=n(t.r),l=n(t.g),r=n(t.b);return.2126*d(a)+.7152*d(l)+.0722*d(r)}function u(e){return Object.fromEntries(Object.entries(l).map(([t,i])=>[t,r(i,e)]))}const p=u(!1),h=u(!0);function g(e,t={}){var i;const n=l[e],r=function({blockBgEnabled:e,blockBgColor:t,buttonBgColor:i}){const n=!(!e||!String(null!==t&&void 0!==t?t:"").trim()),a=!!String(null!==i&&void 0!==i?i:"").trim();return n||a}(t);if(n&&r){const e=o(t);return a(`${n}${!!e&&function(e){const t=m(e);return null!=t&&t>=.6}(e)?"-negative-black":"-negative"}.png`)}if(n&&!r)return a(`${n}.png`);return null!==(i=(r?h:p)[e])&&void 0!==i?i:p[e]}function f(e,t){const i=p[e];var n;return"dark"===t&&null!==(n=h[e])&&void 0!==n?n:i}const v=p;function b(){return[{platform:"vk",label:"VK",href:""},{platform:"telegram",label:"Telegram",href:""},{platform:"max",label:"Max",href:""},{platform:"vkv",label:"VK \u0412\u0438\u0434\u0435\u043e",href:""},{platform:"yandex_zen",label:"\u042f\u043d\u0434\u0435\u043a\u0441 \u0414\u0437\u0435\u043d",href:""}]}["tg","yt","vk","yd","xa","ig","fb"].map(e=>r(e,!1))},58525:(e,t,i)=>{"use strict";i.d(t,{p:()=>l});var n=i(71686),a=i(69613);const l=()=>a.di.useInstance(n.Zw)},19495:(e,t,i)=>{"use strict";async function n(e,t){if(!e||"function"!==typeof e.findFileByUrl)return null;const i=await e.findFileByUrl(t);if(!i)return null;const n="function"===typeof e.getFileById&&i.id&&await e.getFileById(i.id)||i,a=n.thumbnailUrl||n.thumbnail||("function"===typeof e.getThumbnailUrl?await e.getThumbnailUrl(n):"")||"";return a?{file:n,previewUrl:a}:null}i.d(t,{q:()=>n})},86581:(e,t,i)=>{"use strict";i.d(t,{AO:()=>j,Ai:()=>S,Ee:()=>I,N_:()=>F,RM:()=>A,TW:()=>B,TX:()=>W,Ze:()=>D,aQ:()=>T,b9:()=>P,kl:()=>R,ok:()=>O,v9:()=>x,xc:()=>M,z$:()=>V});var n=i(25366),a=i(14365),l=i(1246),r=i(69064),o=i(7648);const{Option:s}=a.Select,{mobileBorderRadiusAll:c,mobileBorderRadiusTopLeft:d,mobileBorderRadiusBottomLeft:m,mobileBorderRadiusTopRight:u,mobileBorderRadiusBottomRight:p,borderRadiusBottomRight:h,borderRadiusTopRight:g,borderRadiusBottomLeft:f,borderRadiusTopLeft:v,alt:b,src:y,title:E,link:_,borderRadiusAll:w,imgReplacer:C,expanded:k}={link:"link",borderRadiusBottomRight:"borderRadiusBottomRight",borderRadiusTopRight:"borderRadiusTopRight",borderRadiusBottomLeft:"borderRadiusBottomLeft",borderRadiusTopLeft:"borderRadiusTopLeft",mobileBorderRadiusAll:"mobileBorderRadiusAll",mobileBorderRadiusTopLeft:"mobileBorderRadiusTopLeft",mobileBorderRadiusBottomLeft:"mobileBorderRadiusBottomLeft",mobileBorderRadiusTopRight:"mobileBorderRadiusTopRight",mobileBorderRadiusBottomRight:"mobileBorderRadiusBottomRight",alt:"alt",imgReplacer:"imgReplacer",src:"src",title:"title",borderRadiusAll:"borderRadiusAll",expanded:"expanded"},A=({linkProtocol:e})=>{switch(e){case"https://":case"#":default:return n.createElement(l.Ay,{icon:"LinkOutlined"});case"mailto:":return n.createElement(l.Ay,{icon:"MailOutlined"});case"tel:":return n.createElement(l.Ay,{icon:"PhoneOutlined"});case"sms:":return n.createElement(l.Ay,{icon:"CommentOutlined"});case"ftp://":return n.createElement(l.Ay,{icon:"FileOutlined"})}},S=({handleLinkProtocolsChange:e,linkProtocol:t,__:i})=>{const l=n.useMemo(()=>(e=>[{value:"https://",label:e("Site")},{value:"mailto:",label:e("E-mail")},{value:"tel:",label:e("Phone")},{value:"sms:",label:e("SMS")},{value:"ftp://",label:e("File")},{value:"#",label:e("Anchor")},{value:"",label:e("Other")}])(i),[i]);return n.createElement(a.Select,{style:{width:90,textAlign:"left"},value:t,onChange:e,options:l})},I=({show:e,__:t,style:i,className:l})=>{const r=n.useMemo(()=>({marginBottom:8,...i}),[i]);return e?n.createElement(a.Fc,{className:l,message:t("Anchor links do not work in Outlook, Gmail, and several other email clients."),type:"warning",showIcon:!0,style:r}):null},x=e=>!!e.startsWith("#")&&-1===e.indexOf("#",1),L=/^(?:<\s*[a-z][\w:-]*\b[^>]*\s+)?href\s*=\s*(["'])((?:\\.|(?!\1).)*?)\1(?:\s*\/?>)?\s*$/i,N=/^(?:<\s*[a-z][\w:-]*\b[^>]*\s+)?href\s*=\s*([^\s/>]+)(?:\s*\/?>)?\s*$/i;function T(e){if("string"!==typeof e)return e;let t=e.trim();if(!t)return t;const i=t.match(L);if(i)t=i[2];else{const e=t.match(N);e&&(t=e[1])}return t.startsWith("https://http")&&(t=t.substring(8)),t}const B=(e,t="https://")=>e?e.startsWith("https://")||e.startsWith("http://")?"https://":e.startsWith("mailto:")?"mailto:":e.startsWith("tel:")?"tel:":e.startsWith("sms:")?"sms:":e.startsWith("ftp://")?"ftp://":x(e)?"#":"":t,P=(e,t)=>{const i=B(e,"");return t(i),i},R=e=>{if(!e||!e.startsWith("mailto:"))return{subject:"",body:"",baseEmail:e||""};try{const t=new URL(e),i=e.split("?")[0],n=t.searchParams.get("subject")||"";return{subject:n,body:t.searchParams.get("body")||"",baseEmail:i}}catch(t){return{subject:"",body:"",baseEmail:e.split("?")[0]}}},F=(e,t,i)=>{if(!e||!e.startsWith("mailto:"))return e;const n=e.split("?")[0],a=[];return t&&a.push(`subject=${encodeURIComponent(t)}`),i&&a.push(`body=${encodeURIComponent(i)}`),a.length>0?`${n}?${a.join("&")}`:n},O=e=>e||(0===e?"0":""),M=e=>e&&"auto"!==e?e:0===e?"0":"";function j(e){var t,i,n,a,l,r,o,s,c,d,m,u,p,h,g,f,v,b,y,E;const _={...e,link:null==e.link?"https://":e.link,borderRadiusAll:O(null===(t=e.borderRadius)||void 0===t?void 0:t.all),borderRadiusTopLeft:O(null===(i=e.borderRadius)||void 0===i?void 0:i.topLeft),borderRadiusBottomLeft:O(null===(n=e.borderRadius)||void 0===n?void 0:n.bottomLeft),borderRadiusTopRight:O(null===(a=e.borderRadius)||void 0===a?void 0:a.topRight),borderRadiusBottomRight:O(null===(l=e.borderRadius)||void 0===l?void 0:l.bottomRight),mobileBorderRadiusAll:O(null===(r=e.mobileBorderRadius)||void 0===r?void 0:r.all),mobileBorderRadiusTopLeft:O(null!==(null===(o=e.mobileBorderRadius)||void 0===o?void 0:o.topLeft)?null===(s=e.mobileBorderRadius)||void 0===s?void 0:s.topLeft:null===(c=e.mobileBorderRadius)||void 0===c?void 0:c.all),mobileBorderRadiusBottomLeft:O(null!==(null===(d=e.mobileBorderRadius)||void 0===d?void 0:d.bottomLeft)?null===(m=e.mobileBorderRadius)||void 0===m?void 0:m.bottomLeft:null===(u=e.mobileBorderRadius)||void 0===u?void 0:u.all),mobileBorderRadiusTopRight:O(null!==(null===(p=e.mobileBorderRadius)||void 0===p?void 0:p.topRight)?null===(h=e.mobileBorderRadius)||void 0===h?void 0:h.topRight:null===(g=e.mobileBorderRadius)||void 0===g?void 0:g.all),mobileBorderRadiusBottomRight:O(null!==(null===(f=e.mobileBorderRadius)||void 0===f?void 0:f.bottomRight)?null===(v=e.mobileBorderRadius)||void 0===v?void 0:v.bottomRight:null===(b=e.mobileBorderRadius)||void 0===b?void 0:b.all),show:e.show?e.show:"all",altSrc:e.src};var w,C;e.video&&(_.videoPlayButton=null!==(w=e.video.playButton)&&void 0!==w?w:"youtube_red",_.videoSource=null!==(C=e.video.source)&&void 0!==C?C:"");if((null===(y=e.carouselImages)||void 0===y?void 0:y.length)>0){var k;const t={};null===(k=e.carouselImages)||void 0===k||k.map((e,i)=>(Object.keys(e).forEach(n=>{t[n+"_"+i]=e[n]}),!0)),_.images=t}if((null===(E=e.sections)||void 0===E?void 0:E.length)>0){var A;const t=[];null===(A=e.sections)||void 0===A||A.map((e,i)=>(t.push({[`expanded_${i}`]:e.expanded}),!0)),_.sections=t}return _}function D(e,t,i){const n=i.hasOwnProperty("images"),a=i.hasOwnProperty("sections"),l=Object.keys(n?i.images:a?i.sections:i)[0],s=n?i.images:a?i.sections:i;let A={};const S=t.getFieldsValue(!0);switch(l.split("_")[0]){case E:case y:case b:case C:if(n){const t=[...e.carouselImages];t[l.split("_")[1]][l.split("_")[0]]=s[l],A={carouselImages:t}}else A=s;break;case k:if(a){const t=[...e.sections];t[l.split("_")[1]][l.split("_")[0]]=s[l],A={sections:t}}break;case _:let i=T(s[l]);e.type===r.bV.CAROUSEL?(A.carouselImages=e.carouselImages,n?(t.setFieldValue(["images",[_+"_"+l.split("_")[1]]],i),A.carouselImages[l.split("_")[1]].link=i,A.link="",t.setFieldValue(_,"")):(e.carouselImages.forEach((e,n)=>{t.setFieldValue(["images",_+"_"+n],i),A.carouselImages[n].link=i,A.link=i}),t.setFieldValue(_,i))):(t.setFieldValue(_,i),A.link=i);break;case w:A={borderRadius:{...e.borderRadius,[o.wF[v]]:S[v],[o.wF[f]]:S[f],[o.wF[g]]:S[g],[o.wF[h]]:S[h],[o.wF[l]]:+s[l]}};break;case v:case f:case g:case h:A={borderRadius:{...e.borderRadius,[o.wF[w]]:null,[o.wF[l]]:+s[l]}};break;case c:case d:case m:case u:case p:A={mobileBorderRadius:{...e.mobileBorderRadius,[o.NW[d]]:S[d],[o.NW[m]]:S[m],[o.NW[u]]:S[u],[o.NW[p]]:S[p],[o.NW[l]]:s[l],classNamePrefix:"em-mob-border_radius_"+o.NW[l]+"-"}};break;default:A=s}return{...e,...A}}const V=n.createElement(a.Select,{className:"select-after"},n.createElement(s,{value:"px"},"px"),n.createElement(s,{value:"%"},"%")),W=n.createElement(a.Select,{className:"select-after"},n.createElement(s,{value:"px"},"px"))},16945:(e,t,i)=>{"use strict";i.d(t,{Gw:()=>l,WJ:()=>n,X_:()=>a,Y6:()=>r});const n=e=>{var t;if(0===e)return"0 B";const i=["B","KB","MB","GB","TB"],n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),i.length-1),a=null!==(t=i.at(n))&&void 0!==t?t:"B";return parseFloat((e/Math.pow(1024,n)).toFixed(1))+" "+a},a=e=>e?(new TextEncoder).encode(e).length:0,l=(e,t=90)=>e>1024*t,r=e=>{const t=[];let i=e;i=i.replace(/<!--\[if[^\]]*\]>[\s\S]*?<!\[endif\]-->/gi,e=>{const i=t.length,n=e.replace(/\s+/g," ").replace(/> </g,"><").replace(/\s+>/g,">").replace(/<!--\[if([^\]]*)\]>\s+/g,"\x3c!--[if$1]>").replace(/\s+<!\[endif\]-->/g,"<![endif]--\x3e");return t.push(n),`___CONDITIONAL_COMMENT_${i}___`});let n=i.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/> </g,"><").replace(/\s+>/g,">").trim();return t.forEach((e,t)=>{n=n.replace(`___CONDITIONAL_COMMENT_${t}___`,e)}),n}},35043:(e,t,i)=>{"use strict";function n(e,t){if(null===e||void 0===e||!e.trim()||!t)return e;const i=String(t);if(e.includes(`em-block-id="${i}"`)||e.includes(`em-block-id='${i}'`))return e;const n=function(e){const t=/<(table|tr|div)(\s[^>]*)>/gi;let i;for(;null!==(i=t.exec(e));){var n;const e=null!==(n=i[2])&&void 0!==n?n:"";if(/\bem\s*=\s*["']block["']/i.test(e))return{full:i[0],index:i.index}}return null}(e);if(!n)return e;const{full:a,index:l}=n;if(/\bem-block-id\s*=/.test(a))return e;const r=a.replace(/>$/,` em-block-id="${function(e){return String(e).replace(/"/g,"&quot;")}(i)}">`);return e.slice(0,l)+r+e.slice(l+a.length)}i.d(t,{g:()=>n})},36786:(e,t,i)=>{"use strict";i.d(t,{w:()=>r});var n=i(69064);function a(e){return null!==e&&"object"===typeof e&&!Array.isArray(e)}function l(e,t){const i={...e};for(const n of Object.keys(t)){const r=t[n],o=e[n];a(r)&&a(o)?i[n]=l(o,r):void 0!==r&&(i[n]=r)}return i}function r(e,t){const i=n.BD;if("string"===typeof e){const t=e.trim();if(t.startsWith("{"))try{const e=JSON.parse(t);if(e&&"object"===typeof e&&!Array.isArray(e)&&Object.keys(e).length>0)return l(i,e)}catch{}}return t&&"object"===typeof t&&!Array.isArray(t)?l(i,t):i}},98213:(e,t,i)=>{"use strict";i.d(t,{r:()=>A});var n=i(69064),a=i(4588),l=i(25366),r=i(85472),o=i(33637),s=i(60538),c=i(9),d=i(54501),m=i(22376),u=i(65751),p=i(42018),h=i(25993),g=i(93149),f=i(54913),v=i(63702),b=i(76508),y=i(90701),E=i(66959),_=i(56883),w=i(27184);const C="AUTOSAVE_RECOVERY";function k(e){return null!==e&&void 0!==e&&e.length?[...e].sort((e,t)=>Date.parse(t.modified)-Date.parse(e.modified))[0]:null}function A(e){const{emailId:t,projectId:i}=(0,o.g)(),{__:A,sprintf:S}=(0,b.s9)(),I=(0,y.hN)(),x=(0,g.rD)(),L=(0,r.d4)(c.M),N=(0,f.fn)(),T=(0,l.useRef)(0),B=(0,r.d4)(d.Wm),P=(0,r.d4)(d.B),R=(0,r.d4)(u.C1),F=(0,r.d4)(p.jY),[O,M]=(0,s.LX)(),j=(0,r.wA)(),{data:D,isSuccess:V}=(0,s.YV)({emailId:t},{skip:!t}),W=(null===D||void 0===D?void 0:D.data)||[],z=!0===(null===x||void 0===x?void 0:x.revisionService),H=(0,r.d4)(h.J3),U=(0,r.d4)(h.dA),q=(0,l.useCallback)(e=>{null!==e&&void 0!==e&&e.html&&(j((0,m.no)(e)),null===N||void 0===N||N.setValue(e.html.replaceAll("\r\n","\n")))},[j,N]);(0,l.useEffect)(()=>()=>{w.Y8.cancel(t),_.lH.cancelPolling(t),j((0,h.AG)())},[t,j]),(0,l.useEffect)(()=>{z&&U&&I.info({key:C,message:A("Loading latest changes..."),duration:0})},[z,U,I,A]),(0,l.useEffect)(()=>{if(!H||!N)return;if(H.emailId!==t)return;if(null===e||void 0===e||!e.id||e.id!==t)return;q(H.payload),j((0,h.AG)());const{phase:i}=H;z&&"normal"!==i&&("found"===i?I.success({key:C,message:A("Changes loaded"),duration:3}):"timeout"===i?I.warning({key:C,message:A("Locally saved version applied"),description:A("Syncing with the server in the background..."),duration:5}):"bg"===i&&I.info({key:"AUTOSAVE_BG_SYNCED",message:A("Email synced with the server"),duration:3}))},[z,H,N,t,null===e||void 0===e?void 0:e.id,q,j,I,A]),(0,l.useEffect)(()=>{if(!M.isLoading)return;const e=e=>{e.preventDefault()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[M.isLoading]);const $=(0,l.useCallback)(t=>{if(null===e||void 0===e||!e.id)return null;if(!B||L||"Discuss"===P)return null;const i=n.EW.isPlugin?F:e.project,a={parent:t,...void 0!==e.meta?{meta:e.meta}:{},title:e.title,author:e.author,project:i,html:(null===N||void 0===N?void 0:N.getValue())||"",excerpt:e.date_gmt,subject:e.subject,preheader:e.preheader,common_styles:e.common_styles,parent_email:e.parent_email};return{emailId:e.id,body:a}},[e,F,N,B,L,P]),Z=(0,l.useCallback)(()=>{var e;const t=k(W);return null!==(e=null===t||void 0===t?void 0:t.id)&&void 0!==e?e:null},[W]),G=(0,l.useCallback)((t,l)=>{if(w.Y8.cancel(null===e||void 0===e?void 0:e.id),I.destroy(w.kr),!n.EW.isPlugin&&null!==e&&void 0!==e&&e.id){const t=(0,a.Wv)(n.Tm,i,e.id,null===l||void 0===l?void 0:l.modified);fetch(t,{mode:"no-cors"})}I.success({id:"EMAIL_AUTOSAVE_SUCCESS",data:t,message:""},!0)},[null===e||void 0===e?void 0:e.id,I,i]),K=(0,l.useCallback)(async e=>{const t=await O(e);return function(e){return e.hasOwnProperty("data")}(t)?{data:t.data}:{error:t.error}},[O]),X=(0,l.useCallback)((t,i)=>{null!==e&&void 0!==e&&e.id&&((0,w.Zh)(i)?w.Y8.scheduleAfterFailure({emailId:e.id,lastError:i,maxAttempts:null===x||void 0===x?void 0:x.autosaveRetryMaxAttempts,intervalMs:null===x||void 0===x?void 0:x.autosaveRetryIntervalMs,getArgs:()=>$(Z()),execute:K,onSuccess:e=>{const t=$(Z());t&&G(t.body,e)},onExhausted:e=>{var i;I.destroy(w.kr);const n=$(Z());I.error({key:w.r2,id:"EMAIL_AUTOSAVE_ERROR",data:null!==(i=null===n||void 0===n?void 0:n.body)&&void 0!==i?i:t,message:A("Saving failed"),description:A("Autosave could not be completed. Export the template and save the code on your local computer to avoid losing your work."),innerException:e,duration:0})},onRetryScheduled:(e,t,i)=>{const n=Math.round(i/1e3);I.warning({key:w.kr,message:A("Autosave failed"),description:S(A("Retrying in %s sec (%d of %d)..."),String(n),e,t),duration:5})}}):I.fromError("EMAIL_AUTOSAVE_ERROR",t,i,!0))},[A,$,null===x||void 0===x?void 0:x.autosaveRetryIntervalMs,null===x||void 0===x?void 0:x.autosaveRetryMaxAttempts,null===e||void 0===e?void 0:e.id,K,G,I,Z,S]),Y=(0,l.useCallback)(({parent:e})=>{const t=$(e);t&&K(t).then(e=>{"data"in e&&e.data?G(t.body,e.data):X(t.body,e.error)}).catch(e=>{X(t.body,e)})},[$,K,X,G]),[J,Q]=(0,l.useState)(!1),ee=(0,l.useCallback)(()=>{const e=k(W);if(e){Date.parse((new Date).toString())-Date.parse(null===e||void 0===e?void 0:e.modified)>1.5*((null===x||void 0===x?void 0:x.autosaveTimeout)||1e4)&&B&&!L&&"Discuss"!==P&&Y({parent:e.id})}else B&&!L&&"Discuss"!==P&&Y({parent:null})},[W,L,B,P,Y,null===x||void 0===x?void 0:x.autosaveTimeout]);(0,E.ZC)(([e])=>{J&&!e&&(ee(),Q(!1))},[J,ee,Q]);const te=null===R||void 0===R?void 0:R.autosaves,ie=(0,l.useCallback)(()=>{L||(clearTimeout(T.current),T.current=setTimeout(()=>Q(!0),(null===x||void 0===x?void 0:x.autosaveTimeout)||1e4))},[L,null===x||void 0===x?void 0:x.autosaveTimeout,Q]);return(0,l.useEffect)(()=>{if(te&&V&&void 0!==(null===e||void 0===e?void 0:e.id)){const t=(0,v.Og)(N,()=>{B&&null!==e&&void 0!==e&&e.is_inited&&ie()});return()=>{t.dispose()}}},[N,ie,te,V,null===e||void 0===e?void 0:e.id,B,null===e||void 0===e?void 0:e.is_inited]),(0,E.ZC)(([t,i])=>{te&&V&&void 0!==(null===e||void 0===e?void 0:e.id)&&B&&null!==e&&void 0!==e&&e.is_inited&&(t===(null===e||void 0===e?void 0:e.title)&&i===(null===e||void 0===e?void 0:e.common_styles)||ie())},[null===e||void 0===e?void 0:e.title,null===e||void 0===e?void 0:e.common_styles,B,V,ie,null===e||void 0===e?void 0:e.id,null===e||void 0===e?void 0:e.is_inited]),(0,l.useEffect)(()=>()=>{clearTimeout(T.current)},[R,null===e||void 0===e?void 0:e.renderGuid]),(0,l.useEffect)(()=>{clearTimeout(T.current)},[null===e||void 0===e?void 0:e.modified]),M}},34043:(e,t,i)=>{"use strict";i.d(t,{f:()=>f});var n=i(69064),a=i(33087),l=i(90388),r=i(67815),o=i(54913),s=i(63702),c=i(28002),d=i(66959),m=i(25366),u=i(22376),p=i(96680),h=i(85472),g=i(73666);const f=(e,t)=>{var i,f,v,b,y;const E=(0,h.wA)(),_=(0,o.fn)(),w=(0,l.QC)(),C=(0,r.ml)(a.AZ.WILL_EMAIL_INIT_ID),k=(0,r.ml)(a.AZ.ON_EMAIL_INIT_ID),A=(0,r.ml)(a.AZ.ON_CONTENT_CHANGED_ID),S=(0,r.ml)(a.AZ.ON_EMAIL_CHANGED_ID),I=(0,r.ml)(a.AZ.ON_MODEL_CHANGE),x=(0,r.ml)(a.AZ.ON_BROWSER_EXTENSION_DETECTED_ID),L=(0,m.useRef)(!1),N=(0,m.useRef)(void 0);N.current=e,(0,m.useEffect)(()=>{const i=N.current;if(n.EW.isPlugin&&!L.current&&(null===e||void 0===e?void 0:e.renderGuid)===(null===i||void 0===i?void 0:i.renderGuid)&&null!==i&&void 0!==i&&i.is_inited&&i){const e=_.getValue();S.fire({...i,id:t||i.isNew?void 0:i.id,html:e})}},[_,null===e||void 0===e?void 0:e.preheader,null===e||void 0===e?void 0:e.common_styles,null===e||void 0===e?void 0:e.meta,null===e||void 0===e?void 0:e.subject,(null===e||void 0===e||null===(i=e.utm_parameters)||void 0===i?void 0:i.utm_campaign)||"",(null===e||void 0===e||null===(f=e.utm_parameters)||void 0===f?void 0:f.utm_content)||"",(null===e||void 0===e||null===(v=e.utm_parameters)||void 0===v?void 0:v.utm_medium)||"",(null===e||void 0===e||null===(b=e.utm_parameters)||void 0===b?void 0:b.utm_source)||"",(null===e||void 0===e||null===(y=e.utm_parameters)||void 0===y?void 0:y.utm_term)||"",S,t]),(0,d.ZC)(([e])=>{e!==_&&I.fire(_)},[_,I]),(0,m.useEffect)(()=>{if(n.EW.isPlugin){const i=_.onDidChangeContent(()=>{const i=N.current;if(!L.current&&(null===e||void 0===e?void 0:e.renderGuid)===(null===i||void 0===i?void 0:i.renderGuid)&&i){const e=_.getValue();A.fire(e),S.fire({...i,id:t||i.isNew?void 0:i.id,html:e})}});return()=>i.dispose()}},[_,A,S,e,t]);const T=(0,m.useCallback)(async()=>{const e=N.current,{html:t,hasBrowserExtensionArtifacts:i}=(0,c.rP)((null===e||void 0===e?void 0:e.html)||"");i&&x.fire();try{(0,s.po)(_),_.setValue(t)}finally{(0,s.SF)(_)}const a=_.getValue();await w.sendAsync(n.Ru.SANDBOX_SET_ENTITY,{html:a,guid:e.renderGuid})},[_,w,x]),B=(0,m.useCallback)(async()=>{const e=N.current;await w.sendAsync(n.Ru.SANDBOX_SET_ENTITY,{html:_.getValue(),guid:e.renderGuid})},[_,w]),P=(0,m.useCallback)(async()=>{const e=N.current;void 0!==e.preheader&&await w.sendAsync(n.Ru.SANDBOX_PREHEADER_UPDATE,{value:e.preheader,guid:e.renderGuid,force:!0})},[w]),R=(0,m.useCallback)(async()=>{const e=N.current;void 0!==e.subject&&await w.sendAsync(n.Ru.SANDBOX_SUBJECT_UPDATE,{value:e.subject,guid:e.renderGuid,force:!0})},[w]),F=(0,m.useCallback)(()=>{const e=N.current;return w.sendAsync(n.Ru.SANDBOX_INITED,{guid:e.renderGuid})},[w]),O=(0,m.useCallback)(e=>{const i=N.current;E(void 0===i.id?(0,p.Uh)(!0):(0,u.Wm)(!0));const n={...i,id:t||i.isNew?void 0:i.id,html:_.getValue()};return e&&(n.reset=!0),k.fire(n)},[E,k,_,t]),M=(0,m.useCallback)(()=>{const e=N.current;return w.sendAsync(n.Ru.SANDBOX_INIT_START,{guid:e.renderGuid})},[w]),j=(0,m.useCallback)(()=>{const e=N.current;return C.fire({...e,id:t||e.isNew?void 0:e.id,html:_.getValue()})},[C,_,t]),[D]=(0,d.cM)(function*(){try{L.current=!0,yield*(0,g.T1)(M),yield*(0,g.T1)(j),yield*(0,g.T1)(T),yield*(0,g.T1)(P),yield*(0,g.T1)(R),yield*(0,g.T1)(F),yield*(0,g.T1)(O)}finally{L.current=!1}},[T,P,R,O,j,M,F]),[V]=(0,d.cM)(function*(){try{yield*(0,g.T1)(M),yield*(0,g.T1)(j),yield*(0,g.T1)(B),yield*(0,g.T1)(P),yield*(0,g.T1)(R),yield*(0,g.T1)(F),yield*(0,g.T1)(O)}catch(e){}},[T,P,R,O,j,M,F]);(0,d.ZC)(async([t])=>{const i=null===e||void 0===e?void 0:e.renderGuid;i&&i!==t&&D()},[null===e||void 0===e?void 0:e.renderGuid,D]),(0,m.useEffect)(()=>{const e=w.addListenerAsync(n.Ru.RELOAD,async()=>{await V()});return()=>e.dispose()},[w,V])}},51675:(e,t,i)=>{"use strict";async function n(e){if("function"===typeof createImageBitmap)try{const i=await createImageBitmap(e);try{return{width:i.width,height:i.height}}finally{var t;null===(t=i.close)||void 0===t||t.call(i)}}catch{}return new Promise((t,i)=>{const n=URL.createObjectURL(e),a=new Image;a.onload=()=>{URL.revokeObjectURL(n);const e=a.naturalWidth||a.width,l=a.naturalHeight||a.height;e>0&&l>0?t({width:e,height:l}):i(new Error("Could not read image dimensions"))},a.onerror=()=>{URL.revokeObjectURL(n),i(new Error("Could not decode image"))},a.src=n})}i.d(t,{Q:()=>n})},93482:(e,t,i)=>{"use strict";function n(e){const t=String(null!==e&&void 0!==e?e:"").split(";")[0].trim();if(!t)return"";const i=t.toLowerCase(),n=i.indexOf("/");if(-1===n)return i;const a=i.slice(n+1);return"svg+xml"===a?"svg":a}i.d(t,{p:()=>n})},14810:(e,t,i)=>{"use strict";function n(e){for(let t=e.length-1;t>=0;t--){const i=e[t];if("string"===typeof i&&i)return i}}function a(e){for(let t=0;t<e.length;t++){const i=e[t];if(i instanceof Blob)return i}}function l(e,t){for(let i=e.length-1;i>=0;i--){const n=e[i];if("string"===typeof n&&n&&n!==t)return n}}i.d(t,{L8:()=>n,RU:()=>l,Xb:()=>a})},85917:(e,t,i)=>{"use strict";function n(e){return e.trim()}function a(){const e=new Map,t=new Map;function i(e,t){return t?new Promise((i,n)=>{if(t.aborted)return void n(new DOMException("Aborted","AbortError"));const a=()=>{n(new DOMException("Aborted","AbortError"))};t.addEventListener("abort",a,{once:!0}),e.then(e=>{t.removeEventListener("abort",a),i(e)},e=>{t.removeEventListener("abort",a),n(e)})}):e}return{resolve:async function(a,l,r){const o=n(a);if(!o)throw new Error("Empty image URL");const s=e.get(o);if(s){if(null!==l&&void 0!==l&&l.aborted)throw new DOMException("Aborted","AbortError");return s}const c=t.get(o);if(c)return i(c.promise,l);const d=new AbortController,m=r(o,d.signal).then(i=>(t.delete(o),e.set(o,i),i)).catch(e=>{throw t.delete(o),e});return t.set(o,{promise:m,controller:d}),i(m,l)},abandonKey:function(i){const a=n(i);if(!a)return;const l=t.get(a);l&&(l.controller.abort(),t.delete(a)),e.delete(a)},invalidateAll:function(){for(const[,e]of t)e.controller.abort();t.clear(),e.clear()}}}i.d(t,{a:()=>a,e:()=>n})},41371:(e,t,i)=>{"use strict";i.d(t,{QM:()=>s,g0:()=>p,oF:()=>g,q2:()=>u,xi:()=>h});var n=i(33616),a=i.n(n),l=i(92221),r=i(86350),o=i(50659);function s(e,t){const i=document.createElement("input");i.type="file",i.accept=e,i.multiple=!1,i.setAttribute("data-testid","uploadFile"),i.style.position="absolute",i.style.opacity="0",i.style.pointerEvents="none",document.body.appendChild(i),i.onchange=()=>{var e;null!==(e=i.files)&&void 0!==e&&e.length&&t(i.files),document.body.removeChild(i)},i.click()}const c="index.html";function d(e,t){return e.find(function(e){return e.name.toLowerCase().endsWith(t)})}async function m(e,t,i){return await(0,l.An)(e,async e=>{const n=e.document;await(0,l.bc)(n,async e=>{e=e.replace("\\","/");const i=(0,l.$l)(e);return t(e,i)}),i&&i(e)})}async function u(e,t,n){if(!e)return;switch(function(e){const t=e.split(".");return t[t.length-1].toLowerCase()}(e.name)){case"zip":return async function(e,t,i){const n=new(a()),{files:r}=await n.loadAsync(e),o=Object.keys(r).map(e=>r[e]),s=r[c]||d(o,c)||d(o,".html")||d(o,".htm");if(s){const e=s.name.split("/"),n=document.location.pathname.split("/"),a=document.location.origin+n.slice(0,n.length-e.length).join("/")+"/",o=await s.async("text"),c=e.slice(0,e.length-1).join("/");return await(0,l.An)(o,async e=>{const n=e.document;await(0,l.bc)(n,async e=>{(e=e.replace("\\","/")).startsWith(".")&&(e=e.substring(1)),e.startsWith("/")&&(e=e.substring(1)),e.startsWith(a)&&(e=e.substring(a.length)),c&&!e.match("^(ht|f)tp(s?)://")&&(e=`${c}/${e}`);const i=r[e];if(i){const e=i.name,n=await i.async("blob");return t(n,e)}const n=(0,l.$l)(e);return t(e,n)}),i&&i(e)})}}(e,t,n);case"eml":{const a=await e.text(),{readEml:l}=await i.e(5370).then(i.bind(i,35370)),r=l(a);if(r instanceof Error)throw r;const o="string"===typeof r?r:r.html;if("undefined"===typeof o){throw new Error("Eml does not contain text/html")}return m(o,t,n)}default:return m(await e.text(),t,n)}}function p(e){if(e&&"object"===typeof e&&!Array.isArray(e)&&"code"in e&&"message"in e&&e.data){if(400===e.data.status)return{file_url:null,error:{code:e.code,message:e.message,status:e.data.status}};if(e.data.file_url)return{file_url:e.data.file_url,error:null}}if(Array.isArray(e)&&e.length>0){const i=e[0];if(i&&"object"===typeof i){var t;if("code"in i&&"message"in i&&400===(null===(t=i.data)||void 0===t?void 0:t.status))return{file_url:null,error:{code:i.code,message:i.message,status:i.data.status}};if("file_url"in i&&i.file_url)return{file_url:i.file_url,error:null}}}if(e&&"object"===typeof e&&!Array.isArray(e)&&0 in e){var i,n;if(400===(null===(i=e.data)||void 0===i?void 0:i.status))return{file_url:null,error:{status:e.data.status}};if(null!==(n=e[0])&&void 0!==n&&n.file_url)return{file_url:e[0].file_url,error:null}}return{file_url:null,error:null}}const h=(e,t,i,n)=>async(a,l)=>{try{const s=await async function(e,t){if("string"!==typeof e)return e;try{const i=(0,r.Ay)(e),n=await t({url:i});return null===n||void 0===n||n.data,(null===n||void 0===n?void 0:n.data)||null}catch{return null}}(a,e);if(!s)return"string"===typeof a?a:"";const c=function(e,t,i){if(!e||"string"!==typeof e)return`default.${i.extension(t)||"bin"}`;if(e.split(".").length<2){const n=i.extension(t);if(n)return`${e}.${n}`}return e}(l,s.type,o),d=new File([s],c.toLowerCase());return function(e,t){if(!e||e.error)return"string"===typeof t?t:"";const i=p(e.data);return i.error?"string"===typeof t?t:"":i.file_url?i.file_url:"string"===typeof t?t:""}(await t({user_id:i.id,folder:n.id,file:d}),a)}catch(s){return"string"===typeof a?a:""}},g=e=>t=>{const i=t.document;i.title=(null===i||void 0===i?void 0:i.title)||(0,l.Ay)(e.name)[0]}},63702:(e,t,i)=>{"use strict";i.d(t,{Og:()=>r,SF:()=>l,po:()=>a});const n=new Set;function a(e){return n.add(e),{dispose(){l(e)}}}function l(e){n.delete(e)}function r(e,t){let i=e.getVersionId();const a=[],l=e.onDidChangeContent(l=>{if(l.versionId>i+1){const r=e.onDidChangeContent(o=>{if(l.versionId===i+1)try{n.has(e)||t(l)}catch(s){}finally{i=l.versionId;const e=a.indexOf(r);e>=0&&a.splice(e,1),r.dispose()}});a.push(r)}else try{n.has(e)||t(l)}catch(r){}finally{i=l.versionId}});return{dispose:()=>{l.dispose(),a.forEach(e=>e.dispose())}}}},87868:(e,t,i)=>{"use strict";i.d(t,{OI:()=>o,yc:()=>r});var n=i(69181),a=i(43952),l=i(5921);function r(){return n.QE.get(a.$D)}function o(){return n.QE.get(l.L)}},76508:(e,t,i)=>{"use strict";i.d(t,{CY:()=>o,nr:()=>c,s9:()=>s});var n=i(25366),a=i(81415);function l(e){return{__:e.__.bind(e),_x:e._x.bind(e),_n:e._n.bind(e),_nx:e._nx.bind(e),sprintf:a.nv,isRTL:e.isRTL.bind(e),hasTranslation:e.hasTranslation.bind(e)}}const r=(0,n.createContext)(l(a.y3));function o(e){const{children:t,i18n:i=a.y3}=e,[,o]=(0,n.useReducer)(()=>[],[]);(0,n.useEffect)(()=>i.subscribe(o),[i]);const s=(0,n.useMemo)(()=>l(i),[i]);return(0,n.createElement)(r.Provider,{value:s},t)}const s=()=>(0,n.useContext)(r),c=a.y3},66959:(e,t,i)=>{"use strict";i.d(t,{ZC:()=>l,cM:()=>r});var n=i(25366),a=i(73666);const l=(e,t)=>{const i=(0,n.useRef)(void 0);i.current=e;const a=(0,n.useRef)(void 0);(0,n.useEffect)(()=>{null!==a.current&&i.current(a.current||[]),a.current=t},t)};function r(e,t){const i=(0,n.useRef)(void 0),l=(0,n.useCallback)(()=>{const e=i.current;if(!e)return;i.current=void 0,e.catch(e=>{!function(e){e instanceof Error&&e.message}(e)});(0,a.eF)(e.halt).catch(()=>{})},[]);(0,n.useEffect)(()=>()=>l(),[l]);const r=(0,n.useCallback)(e,t);return[(0,n.useCallback)((...e)=>{l();const t=(0,a.eF)(()=>r(...e));return i.current=t,t},[l,r]),l]}},41173:(e,t,i)=>{"use strict";i.d(t,{L:()=>o});var n=i(25366),a=i(85472),l=i(69613),r=i(46975);function o(){const e=(0,a.Pj)();return(0,n.useMemo)(()=>function(e){if(!e)return!1;try{return void 0!==l.di.getInstance(e,r.Ef)}catch{return!1}}(e),[e])}},75227:(e,t,i)=>{"use strict";i.d(t,{A5:()=>d,FN:()=>c,Hk:()=>s,c8:()=>m});var n=i(25366),a=i(69064),l=i(90388);const r=document.querySelectorAll("link[rel=stylesheet][media*=prefers-color-scheme][media*=dark]"),o=document.querySelectorAll("link[rel=stylesheet][media*=prefers-color-scheme][media*=light]"),s=e=>{let t,i;e===a.IJ?(t=a.vd,i=a.F3):(t=e===a.T?a.y2:a.CJ,i=e===a.nd?a.y2:a.CJ),[...o].forEach(e=>{e.media=t}),[...r].forEach(e=>{e.media=i})},c=(e={})=>{const t=document.querySelector("head"),i=document.createElement("style");if(i.type="text/css",i.dataset.themeVaribalse=!0,i.setAttribute("data-emailmaker","true"),Object.entries(e).length){let n="";Object.entries(e).forEach(([e,t])=>{"object"!==typeof t&&(n+=`\t--${e}: ${t};\n`)}),n=`.blocks-body, .blocks-app, .ant-modal-root, .ant-tooltip, .ant-notification {\n${n}}`,i.appendChild(document.createTextNode(n));const a=t.querySelector('[data-theme-varibalse="true"]');a?t.replaceChild(i,a):t.insertBefore(i,t.firstChild)}},d=e=>{if(!(e=>{if("string"!==typeof e)return!1;const t=e.trim();return t.length>0&&!/\s/.test(t)})(e))return;const t=e.trim(),i=document.body;i.classList.contains(t)||setTimeout(()=>{i.classList.remove(t===a.nd?a.T:a.nd),i.classList.add(t)},200)},m=()=>{const e=(0,l.XW)();return(0,n.useCallback)(()=>{const t=window.localStorage.getItem(a.V0.em_color_scheme),i=matchMedia(a.F3).matches?a.nd:a.T,n=t||i;e({operation:a.Ru.UPDATE_PREVIEW,theme:n})},[e])}},16585:(e,t,i)=>{"use strict";i.d(t,{a:()=>a,t:()=>l});var n=i(43930);function a(e,t,i,a){const l=(0,n.Sb)(e),r=Symbol(`once-handler-${t}`),o=l?e=>{e[r]||(e[r]=!0,i(e))}:i;return null===l||void 0===l||l.addEventListener(t,o,a),window.addEventListener(t,o,a),{dispose:()=>{null===l||void 0===l||l.removeEventListener(t,o,a),window.removeEventListener(t,o,a)}}}function l(e,t,i,a){const l=(0,n.Sb)(e),r=Symbol(`once-handler-${t}`),o=l?e=>{e[r]||(e[r]=!0,i(e))}:i;return null===l||void 0===l||l.addEventListener(t,o,a),document.addEventListener(t,o,a),{dispose:()=>{null===l||void 0===l||l.removeEventListener(t,o,a),document.removeEventListener(t,o,a)}}}},58981:(e,t,i)=>{"use strict";function n(e){return e=(e=(e=(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?(?:script|embed|object|frameset|frame|iframe|applet|meta)[^>]*>/gi,"")).replace(/ on\w+="[^"]*"/g,"")).replace(/ on\w+='[^']*'/g,"")}i.d(t,{p:()=>n})},78081:(e,t,i)=>{"use strict";i.d(t,{e:()=>a});var n=i(12384);function a(e,t){if("amp"===t)e.handleRender(async({contentDocument:e,managedNodeController:t})=>{for(const i of e.querySelectorAll(".em-amp-show-disabled"))i.remove();await(0,n.Sc)(e,{mappedTags:{script:"___script"},commit:()=>t.commit()})});else if("html"===t){const t=e.document;for(const e of t.querySelectorAll(".em-amp-show-only"))e.remove();(0,n.Km)(t,{mappedTags:{script:"___script"}})}}},88099:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(76508);const a=()=>{const{__:e}=(0,n.s9)();return[{symbol:"\u2022",code:"&bull;",description:e("Bullet")},{symbol:"+",code:"&plus;",description:e("Plus")},{symbol:"\xbb",code:"&raquo;",description:e("Double quotation")},{symbol:"\xd7",code:"&times;",description:e("Cross")},{symbol:"\u2013",code:"&mdash;",description:e("Dash")},{symbol:"\u203a",code:"&rsaquo;",description:e("Single quotation")},{symbol:"\u2192",code:"&rarr;",description:e("Arrow")},{symbol:"\u21d2",code:"&rArr;",description:e("Double arrow")},{symbol:"\u25ba",code:"&blacktriangleright;",description:e("Pointer")},{symbol:"\u2212",code:"&minus;",description:e("Minus")},{symbol:"\u2217",code:"&lowast;",description:e("Star")},{symbol:"\u2666",code:"&diams;",description:e("Diamond")}]}},68998:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(25366),a=i(85472),l=i(33637),r=i(60538),o=i(22376);const s=()=>{const e=(0,a.wA)(),t=(0,a.d4)(o.zn);let i=(0,l.zy)();(0,n.useEffect)(()=>{/emails\/[0-9]+$/.test(i.pathname)||t&&e(r.GY.util.invalidateTags([{type:"Emails",id:+t}]))},[i,e,t])}},91724:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(25366),a=i(90388);function l(e,t){const i=(0,a.QC)();(0,n.useEffect)(()=>{const n=i.addListener(e,t);return()=>{n.dispose()}},[i,e,t])}},65329:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var n=i(25366),a=i(33637),l=i(85472),r=i(65751),o=i(64172);const s=e=>{const t=(0,l.d4)(r.C1),[i,s]=(0,n.useState)({owner:!1,admin:!1}),c=(0,a.KC)(),{data:d}=(0,o.fo)(e,{skip:!e||!t.id||!(null!==c&&void 0!==c&&c.isUninitialized)}),m=(null===c||void 0===c?void 0:c.data)||d;return(0,n.useEffect)(()=>{if(m){var e,i;const{owner:n,admins:a,users:l}=m.members,r=a?a.map(e=>e.ID):a,o=l?l.map(e=>e.ID):l;s({owner:(null===(e=n.ID)||void 0===e?void 0:e.toString())===(null===(i=t.id)||void 0===i?void 0:i.toString()),admin:r&&r.includes(t.id),user:o&&o.includes(t.id)})}},[m,t.id]),i}},74278:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var n=i(25366),a=i(85472),l=i(33637),r=i(31395),o=i(69064),s=i(58525);const c=()=>{const e=(0,a.wA)(),t=(0,s.p)(),i=(0,a.d4)(r.Sl);let c=(0,l.zy)();(0,n.useEffect)(()=>{c.pathname.endsWith("/new")||i&&(e((0,r.X8)()),t.remove(o.A9.em_new_block))},[c,i,e,t])}},92357:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var n=i(25366),a=i(85472),l=i(33637),r=i(96680),o=i(69064),s=i(58525);const c=()=>{const e=(0,s.p)(),t=(0,a.wA)(),i=(0,a.d4)(r.$S);let c=(0,l.zy)();(0,n.useEffect)(()=>{c.pathname.endsWith("/new")||(e.remove(o.A9.em_new_email),e.remove(o.A9.em_template_email),i&&t((0,r.Et)()))},[c,i,t,e])}},13322:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(69064);const a=e=>{if(!n.EW.isPlugin){let t="";t="EmailMaker",document.title=e+" - "+t}}},44363:(e,t,i)=>{"use strict";i.d(t,{wf:()=>m,I9:()=>d,XJ:()=>r});var n=i(25366),a=i(14365),l=i(1246);const r=({integration:e,isConfigured:t,onClick:i,__:r})=>n.createElement(a.Zp,{hoverable:!0,onClick:i,style:{textAlign:"center",height:"100%",position:"relative"},bodyStyle:{padding:"12px 8px"}},t&&n.createElement(l.Ay,{icon:"CheckCircleOutlined",style:{color:"#52c41a",fontSize:"16px",position:"absolute",top:6,left:6}}),n.createElement(a.$x,{direction:"vertical",size:4},n.createElement("img",{src:e.icon,alt:e.name,style:{width:32,height:32},onError:e=>{e.target.style.display="none"}}),n.createElement(a.EY,{strong:!0},r(e.name))));var o=i(21365);const s=(e,t)=>{const i={placeholder:e.placeholder?t(e.placeholder):void 0},r={marginBottom:5};switch(e.type){case"password":return n.createElement(a._2,Object.assign({},i,{style:r,autoComplete:"new-password",iconRender:e=>e?n.createElement(l.Ay,{icon:"EyeOutlined"}):n.createElement(l.Ay,{icon:"EyeInvisibleOutlined"})}));case"email":return n.createElement(a.pd,Object.assign({},i,{type:"email",style:r}));case"number":return n.createElement(a.YI,Object.assign({},i,{style:{width:"100%",...r},min:1}));case"checkbox":return n.createElement(a.Sc,{style:r},t(e.label));default:return n.createElement(a.pd,Object.assign({},i,{style:r}))}},c=(e,t,i,n)=>{var a,l,r;if(!e.required)return"email"===e.type?[{type:"email",message:n("Please enter valid email")}]:[];const s=(null===i||void 0===i||null===(a=i.getFieldValue)||void 0===a?void 0:a.call(i,["integrations",t]))||{},c=o.Gn[t];return null!==(l=null===c||void 0===c||null===(r=c.settingsFields)||void 0===r?void 0:r.some(e=>e.required&&!!s[e.name]))&&void 0!==l&&l?[{required:!0,message:n(`Please enter ${e.label.toLowerCase()}`)},..."email"===e.type?[{type:"email",message:n("Please enter valid email")}]:[]]:"email"===e.type?[{type:"email",message:n("Please enter valid email")}]:[]},d=({integration:e,form:t,__:i})=>{const l=e.settingsFields,r=l.filter(e=>e.helpUrl),o=l.filter(e=>!e.helpUrl);return n.createElement(n.Fragment,null,r.map(l=>n.createElement(n.Fragment,{key:l.name},n.createElement(a.so,{justify:"space-between",style:{marginBottom:8}},n.createElement("span",null,l.required&&"api_key"!==l.name&&n.createElement("span",{style:{color:"#ff4d4f",marginRight:4}},"*"),"api_key"===l.name&&n.createElement("span",{style:{color:"#ff4d4f",marginRight:4}},"*"),i(l.label)),n.createElement("a",{href:l.helpUrl,target:"_blank",rel:"noopener noreferrer"},i("How to get an API key?"))),n.createElement(a.fI,{gutter:24},n.createElement(a.fv,{span:24},n.createElement(a.lV.Item,{name:["integrations",e.id,l.name],rules:c(l,e.id,t,i),extra:l.extra?i(l.extra):void 0,style:{marginBottom:24}},s(l,i)))))),(t=>{const l=o.filter(e=>e.fullWidth),r=o.filter(e=>!e.fullWidth),c=[...l,...r],d=null===(t=c[c.length-1])||void 0===t?void 0:t.name;return n.createElement(n.Fragment,null,l.map(t=>n.createElement(a.fI,{gutter:24,key:t.name},n.createElement(a.fv,{span:24},n.createElement(a.lV.Item,{label:i(t.label),name:["integrations",e.id,t.name],rules:[...t.required?[{required:!0,message:i(`Please enter ${t.label.toLowerCase()}`)}]:[],..."email"===t.type?[{type:"email",message:i("Please enter valid email")}]:[]],extra:t.extra?i(t.extra):void 0,style:t.name===d?{marginBottom:5}:void 0},s(t,i))))),n.createElement(a.fI,{gutter:24},r.map((t,l)=>{const o=l===r.length-1&&r.length%2===1?24:12,c=t.name===d;return n.createElement(a.fv,{span:o,key:t.name},n.createElement(a.lV.Item,{label:i(t.label),name:["integrations",e.id,t.name],rules:[...t.required?[{required:!0,message:i(`Please enter ${t.label.toLowerCase()}`)}]:[],..."email"===t.type?[{type:"email",message:i("Please enter valid email")}]:[]],extra:t.extra?i(t.extra):void 0,style:c?{marginBottom:5}:void 0},s(t,i)))})))})())},m=({integration:e,visible:t,loading:i=!1,onConfirm:l,onCancel:r,__:o})=>{const[s]=a.lV.useForm(),c=e.exportFields||[];(0,n.useEffect)(()=>{t||s.resetFields()},[t,s]);if(0===c.length)return null;const d=c.find(e=>e.helpText);return n.createElement(a.aF,{title:o(`Export to ${e.name}`),open:t,onOk:()=>{i||s.validateFields().then(e=>{l(e)})},onCancel:()=>{s.resetFields(),r()},okText:o("Export"),cancelText:o("Cancel"),confirmLoading:i,cancelButtonProps:{disabled:i}},d&&n.createElement(a.Fc,{message:o(d.label),description:o(d.helpText),type:"info",showIcon:!0,style:{marginBottom:16}}),n.createElement(a.lV,{form:s,layout:"vertical"},c.map(e=>n.createElement(a.lV.Item,{key:e.name,label:o(e.label),name:e.name,rules:[...e.required?[{required:!0,message:o(`Please enter ${e.label.toLowerCase()}`)}]:[],..."number"===e.type?[{type:"number",message:o(`${e.label} must be a number`)}]:[]]},((e,t)=>{const i={placeholder:e.placeholder?t(e.placeholder):void 0,style:{width:"100%"}};switch(e.type){case"number":return n.createElement(a.YI,Object.assign({},i,{min:1}));case"email":return n.createElement(a.pd,Object.assign({},i,{type:"email"}));default:return n.createElement(a.pd,i)}})(e,o)))))}},99208:(e,t,i)=>{"use strict";i.d(t,{_:()=>E});var n=i(77782),a=i(72175),l=i(64908),r=i(61170),o=i(1270),s=i(68301),c=i(13706),d=i(72378),m=i(73275),u=i(47139),p=i(17187),h=i(70826),g=i(58186),f=i(9382),v=i(5240),b=i(83359),y=i(76508);const E=()=>{const{__:e}=(0,y.s9)(),[t,{isLoading:i}]=(0,n.r)(),[E,{isLoading:_}]=(0,a.S)(),[w,{isLoading:C}]=(0,l._)(),[k,{isLoading:A}]=(0,r.k)(),[S,{isLoading:I}]=(0,o.c)(),[x,{isLoading:L}]=(0,s.X)(),[N,{isLoading:T}]=(0,c.X)(),[B,{isLoading:P}]=(0,d.T)(),[R,{isLoading:F}]=(0,m.T)(),[O,{isLoading:M}]=(0,u.X)(),[j,{isLoading:D}]=(0,p.X)(),[V,{isLoading:W}]=(0,h.X)(),[z,{isLoading:H}]=(0,g.X)(),[U,{isLoading:q}]=(0,f.b)(),[$,{isLoading:Z}]=(0,v.X)(),[G,{isLoading:K}]=(0,b.A)(),X={unisender:async(i,n,a,l)=>{try{var r;const o=await t({api_key:i.api_key,sender_name:i.sender_name,sender_email:i.sender_email,subject:l,body:a,list_id:n.list_id,generate_text:1,lang:"ru"}).unwrap();return null!==(r=o.result)&&void 0!==r&&r.message_id?{success:!0,message:e("Email successfully created!"),link:{url:`https://app.unisender.com/ru/v5/spa/email-campaign/editor/${o.result.message_id}?step=send`,text:e("Open in Unisender")}}:o.error?{success:!1,error:o.error+(o.code?` (${o.code})`:"")}:{success:!1,error:e("Unknown error")}}catch(o){return{success:!1,error:o.message||e("Failed to create email")}}},mailganer:async(t,i,n,a)=>{try{const l=await E({api_key:t.api_key,name:i.name,html_content:n,theme:i.theme||a,from_name:t.from_name,from_email:t.from_email}).unwrap();return 1===l.status&&l.public_id?{success:!0,message:e("Mailing successfully created!"),link:l.step1_url?{url:l.step1_url,text:e("Open in Mailganer")}:void 0}:l.error?{success:!1,error:l.error}:{success:!1,error:e("Unknown error")}}catch(l){return{success:!1,error:l.message||e("Failed to create mailing")}}},sendsay:async(t,i,n,a)=>{try{var l;const a=await w({login:t.login,api_key:t.api_key,name:i.name,subject:i.subject,html_content:n,from_name:t.from_name,from_email:t.from_email}).unwrap();return null!==(l=a.obj)&&void 0!==l&&l.id?{success:!0,message:e("Draft successfully created!"),link:{url:`https://app.sendsay.ru/content/drafts/email/${a.obj.id}/settings`,text:e("Open in Sendsay")}}:a.errors&&a.errors.length>0?{success:!1,error:a.errors.map(e=>e.explain).join(", ")}:a.error?{success:!1,error:a.explain||a.error}:{success:!1,error:e("Unknown error")}}catch(r){return{success:!1,error:r.message||e("Failed to create draft")}}},altcraft:async(t,i,n,a)=>{try{const l=await k({api_url:t.api_url,api_key:t.api_key,name:i.name,html_content:n,subject:i.subject||a,from_name:t.from_name,from_email:t.from_email}).unwrap();return 0===l.error?{success:!0,message:e("Template successfully created!")}:{success:!1,error:l.error_text||e("Unknown error")}}catch(l){return{success:!1,error:l.message||e("Failed to create template")}}},enkod:async(t,i,n,a)=>{try{const a=await S({api_key:t.api_key,subject:i.subject,html_content:n,sender_name:t.sender_name,sender_email:t.sender_email}).unwrap();if(a.success||a.messageId||a.id){const t=a.messageId||a.id;return{success:!0,message:e("Draft successfully created!"),link:t?{url:`https://app.enkod.ru/ensend/messages/detail/${t}/preview`,text:e("Open in enKod")}:void 0}}return a.error||a.message?{success:!1,error:a.error||a.message||e("Unknown error")}:{success:!1,error:e("Unknown error")}}catch(l){return{success:!1,error:l.message||e("Failed to create draft")}}},mailchimp:async(t,i,n,a)=>{try{const r=await x({api_key:t.api_key,list_id:i.list_id,subject:i.subject||a,from_name:t.from_name,from_email:t.from_email,html:n}).unwrap();if(r.id){var l;const i=(null===(l=t.api_key)||void 0===l?void 0:l.split("-")[1])||"us1";return{success:!0,message:e("Campaign successfully created!"),link:{url:`https://${i}.admin.mailchimp.com/campaigns/#r:campaignId=${r.id}`,text:e("Open in Mailchimp")}}}return{success:!1,error:e("Unknown error")}}catch(r){return{success:!1,error:r.message||e("Failed to create campaign")}}},klaviyo:async(t,i,n,a)=>{try{const l=await N({api_key:t.api_key,list_id:i.list_id,subject:i.subject||a,from_name:t.from_name,from_email:t.from_email,html:n}).unwrap();return l.id?{success:!0,message:e("Campaign successfully created!"),link:{url:`https://www.klaviyo.com/campaign/${l.id}/wizard/1`,text:e("Open in Klaviyo")}}:{success:!1,error:e("Unknown error")}}catch(l){return{success:!1,error:l.message||e("Failed to create campaign")}}},hubspot:async(t,i,n,a)=>{try{const l=await B({api_key:t.api_key,name:i.name,subject:i.subject||a,from_name:t.from_name,from_email:t.from_email,html:n}).unwrap();return l.id?{success:!0,message:e("Email successfully created!"),link:{url:`https://app.hubspot.com/email/0/edit/${l.id}`,text:e("Open in HubSpot")}}:{success:!1,error:e("Unknown error")}}catch(l){return{success:!1,error:l.message||e("Failed to create email")}}},salesforce_mc:async(t,i,n,a)=>{try{const l=await R({subdomain:t.subdomain,client_id:t.client_id,client_secret:t.client_secret,name:i.name,subject:i.subject||a,from_name:t.from_name,from_email:t.from_email,html:n}).unwrap();return l.id?{success:!0,message:e("Email successfully created!"),link:{url:`https://app.s7.exacttarget.com/ContentBuilder?app=contentbuilder&id=${l.id}`,text:e("Open in Marketing Cloud")}}:{success:!1,error:e("Unknown error")}}catch(l){return{success:!1,error:l.message||e("Failed to create email")}}},activecampaign:async(t,i,n,a)=>{try{const l=await O({api_url:t.api_url,api_key:t.api_key,list_id:t.list_id,name:i.name,subject:i.subject||a,from_name:t.from_name,from_email:t.from_email,html:n}).unwrap();if(l.campaignId){const i=(t.api_url||"").replace(/\/$/,"").match(/https?:\/\/([^.]+)\.api-/),n=i?i[1]:"",a=n?`https://${n}.activehosted.com/app/campaigns/${l.campaignId}`:"https://www.activecampaign.com/app/campaigns";return{success:!0,message:e("Draft campaign created! Open it to review and schedule."),link:{url:a,text:e("Open draft campaign")}}}return{success:!1,error:e("Unknown error")}}catch(l){const i=l.message||l.error||"";if("NO_MAILING_ADDRESS"===i){const i=(t.api_url||"").replace(/\/$/,"").match(/https?:\/\/([^.]+)\.api-/),n=i?i[1]:"",a=n?`https://${n}.activehosted.com/app/settings/addresses`:"https://www.activecampaign.com/app/settings/addresses";return{success:!1,error:e("No mailing address found. Add one in ActiveCampaign: ")+a}}return{success:!1,error:i||e("Failed to create campaign")}}},brevo:async(t,i,n,a)=>{try{const l=await j({api_key:t.api_key,list_id:Number(i.list_id),name:i.name,subject:i.subject||a,from_name:t.from_name,from_email:t.from_email,html:n}).unwrap();return l.id?{success:!0,message:e("Campaign successfully created!"),link:{url:`https://app.brevo.com/marketing-campaign/edit/${l.id}`,text:e("Open in Brevo")}}:{success:!1,error:e("Unknown error")}}catch(l){return{success:!1,error:l.message||e("Failed to create campaign")}}},campaign_monitor:async(t,i,n,a)=>{try{var l;const n=null===(l=i.html_url)||void 0===l?void 0:l.trim();if(!n)return{success:!1,error:e("HTML URL is required. Save the email first, or paste a custom URL to your hosted HTML.")};const r=await V({api_key:t.api_key,client_id:t.client_id,list_id:i.list_id,name:i.name,subject:i.subject||a,from_name:t.from_name,from_email:t.from_email,html_url:n.trim()}).unwrap();return r.id?{success:!0,message:e("Campaign successfully created!"),link:{url:`https://app.createsend.com/campaigns/#/${r.id}`,text:e("Open in Campaign Monitor")}}:{success:!1,error:e("Unknown error")}}catch(r){return{success:!1,error:r.message||e("Failed to create campaign")}}},constant_contact:async(t,i,n,a)=>{try{return(await z({access_token:t.access_token,list_id:i.list_id,name:i.name,subject:i.subject||a,from_name:t.from_name,from_email:t.from_email,html:n}).unwrap()).campaign_id?{success:!0,message:e("Campaign successfully created!"),link:{url:"https://app.constantcontact.com/pages/email/campaigns",text:e("Open in Constant Contact")}}:{success:!1,error:e("Unknown error")}}catch(l){return{success:!1,error:l.message||e("Failed to create campaign")}}},getresponse:async(t,i,n,a)=>{try{const l=await U({api_key:t.api_key,from_field_id:t.from_field_id,campaign_id:i.campaign_id,name:i.name,subject:i.subject||a,html:n}).unwrap();return l.newsletterId?{success:!0,message:e("Newsletter successfully created!"),link:{url:`https://app.getresponse.com/letter/${l.newsletterId}`,text:e("Open in GetResponse")}}:{success:!1,error:e("Unknown error")}}catch(l){return{success:!1,error:l.message||e("Failed to create newsletter")}}},dotdigital:async(t,i,n,a)=>{try{const l=await $({username:t.username,password:t.password,region:t.region||"r1",name:i.name,subject:i.subject||a,from_name:t.from_name,from_email:t.from_email,html:n}).unwrap();return l.id?{success:!0,message:l.usedAccountDefaultFromAddress?e("Campaign created. Dotdigital used your account default sender because this From email is not registered as a custom from address. Add the address in Dotdigital and export again to use it."):e("Campaign successfully created!"),link:{url:"https://login.dotdigital.com/",text:e("Open in Dotdigital")}}:{success:!1,error:e("Unknown error")}}catch(l){return{success:!1,error:l.message||e("Failed to create campaign")}}},bento:async(t,i,n,a)=>{try{return await G({publishable_key:t.publishable_key,secret_key:t.secret_key,site_uuid:t.site_uuid,name:i.name,subject:i.subject||a,from_name:t.from_name,from_email:t.from_email,html:n,inclusive_tags:i.inclusive_tags}).unwrap(),{success:!0,message:e("Broadcast successfully created!"),link:{url:"https://app.bentonow.com/",text:e("Open in Bento")}}}catch(l){return{success:!1,error:l.message||e("Failed to create broadcast")}}}};return{exportToIntegration:async(t,i,n,a,l)=>{const r=X[t];return r?r(i,n,a,l):{success:!1,error:e("Unknown integration")}},isLoading:i||_||C||A||I||L||T||P||F||M||D||W||H||q||Z||K}}},71679:(e,t,i)=>{"use strict";i.d(t,{I9:()=>a.I9,XJ:()=>a.XJ,rg:()=>n.rg,v0:()=>n.v0,hS:()=>n.hS});var n=i(21365),a=i(44363);i(99208),i(25366);i(77782),i(72175),i(64908)},21365:(e,t,i)=>{"use strict";i.d(t,{Gn:()=>n,hS:()=>o,rg:()=>l,v0:()=>r});const n={unisender:{id:"unisender",name:"Unisender",icon:"/images/integrations/unisender.svg",description:"Export emails to Unisender",apps:["emailmaker"],settingsFields:[{name:"api_key",type:"password",label:"API Key",required:!0,placeholder:"Enter Unisender API key",helpUrl:"https://app.unisender.com/ru/v5/cp/user/info/api"},{name:"sender_email",type:"email",label:"Sender Email",required:!0,placeholder:"sender@example.com",extra:"This email must be verified in Unisender"},{name:"sender_name",type:"text",label:"Sender Name",required:!0,placeholder:"e.g., Your Company"}],exportFields:[{name:"list_id",type:"number",label:"Contact List ID",required:!0,placeholder:"e.g., 123456"}]},mailganer:{id:"mailganer",name:"Mailganer",icon:"/images/integrations/mailganer.svg",description:"Export emails to Mailganer",apps:["emailmaker"],settingsFields:[{name:"api_key",type:"password",label:"API Key",required:!0,placeholder:"Enter Mailganer API key",helpUrl:"https://mailganer.com/app/profile/"},{name:"from_email",type:"email",label:"Sender Email",required:!1,placeholder:"sender@example.com",extra:"This email must be verified in Mailganer"},{name:"from_name",type:"text",label:"Sender Name",required:!1,placeholder:"e.g., Your Company"}],exportFields:[{name:"name",type:"text",label:"Mailing Name",required:!0,placeholder:"e.g., Newsletter June 2026"},{name:"theme",type:"text",label:"Email Subject",required:!1,placeholder:"e.g., Special offer for you!"}]},sendsay:{id:"sendsay",name:"Sendsay",icon:"/images/integrations/sendsay.svg",description:"Export emails to Sendsay",apps:["emailmaker"],settingsFields:[{name:"login",type:"text",label:"Account Login",required:!0,placeholder:"e.g., myaccount or myaccount/sublogin",extra:"Your Sendsay account login (not email). For sublogin use format: account/sublogin",fullWidth:!0},{name:"api_key",type:"password",label:"API Key",required:!0,placeholder:"Enter Sendsay API key",helpUrl:"https://docs.sendsay.ru/sendsay-api/how-to-get-apikey"},{name:"from_email",type:"email",label:"Sender Email",required:!1,placeholder:"sender@example.com",extra:"This email must be verified in Sendsay"},{name:"from_name",type:"text",label:"Sender Name",required:!1,placeholder:"e.g., Your Company"}],exportFields:[{name:"name",type:"text",label:"Draft Name",required:!0,placeholder:"e.g., Newsletter June 2026"},{name:"subject",type:"text",label:"Email Subject",required:!0,placeholder:"e.g., Special offer for you!"}]},klaviyo:{id:"klaviyo",name:"Klaviyo",icon:"/images/integrations/klaviyo.svg",description:"Export emails to Klaviyo",apps:["useblocks"],settingsFields:[{name:"api_key",type:"password",label:"API Key",required:!0,placeholder:"e.g., pk_xxxxxxxx",helpUrl:"https://help.klaviyo.com/hc/en-us/articles/7423954176283-How-to-create-a-private-API-key",extra:"Use a custom key with templates:write and campaigns:write (or Full access). Campaigns-only is not enough \u2014 export creates a template first."},{name:"from_email",type:"email",label:"From Email",required:!0,placeholder:"sender@example.com",extra:"This email must be verified in Klaviyo"},{name:"from_name",type:"text",label:"From Name",required:!0,placeholder:"e.g., Your Company"}],exportFields:[{name:"list_id",type:"text",label:"List ID",required:!0,placeholder:"e.g., ABC123",helpText:"Find your List ID in Klaviyo: Lists & Segments \u2192 List \u2192 Settings"},{name:"subject",type:"text",label:"Email Subject",required:!1,placeholder:"e.g., Special offer for you!"}]},campaign_monitor:{id:"campaign_monitor",name:"Campaign Monitor",icon:"/images/integrations/campaign_monitor.svg",description:"Export emails to Campaign Monitor",apps:["useblocks"],settingsFields:[{name:"api_key",type:"password",label:"API Key",required:!0,placeholder:"Enter API Key",fullWidth:!0,helpUrl:"https://help.campaignmonitor.com/s/article/api-keys"},{name:"client_id",type:"text",label:"Client ID",required:!0,placeholder:"e.g., 4a397ccaaa55eb4e6aa1221e1e2d7122",helpText:"Find in Account Settings \u2192 API Keys"},{name:"from_email",type:"email",label:"From Email",required:!0,placeholder:"sender@example.com",extra:"Must be verified in Campaign Monitor"},{name:"from_name",type:"text",label:"From Name",required:!0,placeholder:"e.g., Your Company"}],exportFields:[{name:"name",type:"text",label:"Campaign Name",required:!0,placeholder:"e.g., Newsletter June 2026"},{name:"list_id",type:"text",label:"List ID",required:!0,placeholder:"e.g., a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",helpText:"Find in Lists \u2192 List ID"},{name:"subject",type:"text",label:"Email Subject",required:!1,placeholder:"e.g., Special offer for you!"}]},constant_contact:{id:"constant_contact",name:"Constant Contact",icon:"/images/integrations/constant_contact.svg",description:"Export emails to Constant Contact",apps:["useblocks"],settingsFields:[{name:"access_token",type:"password",label:"Access Token",required:!0,placeholder:"OAuth2 Bearer token",fullWidth:!0,helpText:"Get from Constant Contact Developer Portal. Token expires in 24 hours.",helpUrl:"https://developer.constantcontact.com/api_guide/getting_started.html"},{name:"from_email",type:"email",label:"From Email",required:!0,placeholder:"sender@example.com",extra:"Must be confirmed in Constant Contact"},{name:"from_name",type:"text",label:"From Name",required:!0,placeholder:"e.g., Your Company"}],exportFields:[{name:"name",type:"text",label:"Campaign Name",required:!0,placeholder:"e.g., Newsletter June 2026"},{name:"list_id",type:"text",label:"Contact List ID",required:!0,placeholder:"e.g., fa32f620-6d82-11e8-8b59-fa163e56c9b0",helpText:"Find via GET /contact_lists API"},{name:"subject",type:"text",label:"Email Subject",required:!1,placeholder:"e.g., Special offer for you!"}]},bento:{id:"bento",name:"Bento",icon:"/images/integrations/bento.svg",description:"Export emails to Bento",apps:["useblocks"],settingsFields:[{name:"publishable_key",type:"password",label:"Publishable Key",required:!0,placeholder:"Enter Publishable Key",fullWidth:!0,helpUrl:"https://app.bentonow.com/account/teams"},{name:"secret_key",type:"password",label:"Secret Key",required:!0,placeholder:"Enter Secret Key",fullWidth:!0},{name:"site_uuid",type:"text",label:"Site UUID",required:!0,placeholder:"Your site UUID",helpText:"Find in Bento dashboard"},{name:"from_email",type:"email",label:"From Email",required:!0,placeholder:"sender@example.com",extra:"Must be an author in your Bento account"},{name:"from_name",type:"text",label:"From Name",required:!0,placeholder:"e.g., Your Company"}],exportFields:[{name:"name",type:"text",label:"Broadcast Name",required:!0,placeholder:"e.g., Newsletter June 2026"},{name:"subject",type:"text",label:"Email Subject",required:!1,placeholder:"e.g., Special offer for you!"},{name:"inclusive_tags",type:"text",label:"Tags (inclusive)",required:!1,placeholder:"e.g., subscribers,newsletter",helpText:"Comma-separated tags to send to. Default: subscribers"}]},dotdigital:{id:"dotdigital",name:"Dotdigital",icon:"/images/integrations/dotdigital.svg",description:"Export emails to Dotdigital",apps:["useblocks"],settingsFields:[{name:"username",type:"text",label:"API Username",required:!0,placeholder:"API user email",helpText:"API user email from Settings \u2192 Access \u2192 API users",helpUrl:"https://developer.dotdigital.com/docs/setting-up-an-api-user"},{name:"password",type:"password",label:"API Password",required:!0,placeholder:"API user password",fullWidth:!0},{name:"region",type:"text",label:"Region",required:!0,placeholder:"r1, r2, or r3",helpText:"r1=Europe, r2=North America, r3=Asia Pacific"},{name:"from_email",type:"email",label:"From Email",required:!0,placeholder:"sender@example.com",fullWidth:!0,extra:"Use an email registered as a Custom from address in Dotdigital (see support.dotdigital.com \u2014 \u201cCreate a custom from address\u201d). If it does not match, export uses your account default sender."},{name:"from_name",type:"text",label:"From Name",required:!0,placeholder:"e.g., Your Company"}],exportFields:[{name:"name",type:"text",label:"Campaign Name",required:!0,placeholder:"e.g., Newsletter June 2026"},{name:"subject",type:"text",label:"Email Subject",required:!1,placeholder:"e.g., Special offer for you!"}]},getresponse:{id:"getresponse",name:"GetResponse",icon:"/images/integrations/getresponse.svg",description:"Export emails to GetResponse",apps:["useblocks"],settingsFields:[{name:"api_key",type:"password",label:"API Key",required:!0,placeholder:"Enter API Key",fullWidth:!0,helpUrl:"https://app.getresponse.com/api"},{name:"from_field_id",type:"text",label:"From Field ID",required:!0,placeholder:"e.g., V",helpText:"Find via GET /from-fields API"}],exportFields:[{name:"name",type:"text",label:"Newsletter Name",required:!0,placeholder:"e.g., Newsletter June 2026"},{name:"campaign_id",type:"text",label:"Campaign ID",required:!0,placeholder:"e.g., C",helpText:"List/campaign ID from GET /campaigns"},{name:"subject",type:"text",label:"Email Subject",required:!1,placeholder:"e.g., Special offer for you!"}]},brevo:{id:"brevo",name:"Brevo",icon:"/images/integrations/brevo.svg",description:"Export emails to Brevo",apps:["useblocks"],settingsFields:[{name:"api_key",type:"password",label:"API Key",required:!0,placeholder:"Enter API Key",fullWidth:!0,helpUrl:"https://help.brevo.com/hc/en-us/articles/209467485-Create-and-manage-your-API-keys"},{name:"from_email",type:"email",label:"From Email",required:!0,placeholder:"sender@example.com",extra:"Must be verified in Brevo"},{name:"from_name",type:"text",label:"From Name",required:!0,placeholder:"e.g., Your Company"}],exportFields:[{name:"name",type:"text",label:"Campaign Name",required:!0,placeholder:"e.g., Newsletter June 2026"},{name:"list_id",type:"number",label:"List ID",required:!0,placeholder:"e.g., 2",helpText:"Find in Contacts \u2192 Lists"},{name:"subject",type:"text",label:"Email Subject",required:!1,placeholder:"e.g., Special offer for you!"}]},activecampaign:{id:"activecampaign",name:"ActiveCampaign",icon:"/images/integrations/activecampaign.svg",description:"Export emails as draft campaigns to ActiveCampaign",apps:["useblocks"],settingsFields:[{name:"api_url",type:"text",label:"API URL",required:!0,placeholder:"e.g., https://youraccount.api-us1.com",helpText:"Find in Settings \u2192 Developer \u2192 API Access",helpUrl:"https://help.activecampaign.com/hc/en-us/articles/207317590-Getting-started-with-the-API"},{name:"api_key",type:"password",label:"API Key",required:!0,placeholder:"Enter API Key",fullWidth:!0},{name:"list_id",type:"text",label:"List ID",required:!0,placeholder:"e.g., 1",extra:"Find in Lists \u2192 Click your list \u2192 The ID is in the URL (e.g., /app/contacts?listid=1)"},{name:"from_email",type:"email",label:"From Email",required:!0,placeholder:"sender@example.com",extra:"Must be verified in ActiveCampaign"},{name:"from_name",type:"text",label:"From Name",required:!0,placeholder:"e.g., Your Company"}],exportFields:[{name:"name",type:"text",label:"Campaign Name",required:!0,placeholder:"e.g., Newsletter June 2026"},{name:"subject",type:"text",label:"Email Subject",required:!1,placeholder:"e.g., Special offer for you!"}]},salesforce_mc:{id:"salesforce_mc",name:"Salesforce",icon:"/images/integrations/salesforce.svg",description:"Export emails to Salesforce",apps:["useblocks"],settingsFields:[{name:"subdomain",type:"text",label:"Tenant Subdomain",required:!0,placeholder:"e.g., mc563885gzs27c5t9-63k636ttgm",helpText:"Find in Installed Packages \u2192 API Integration \u2192 REST Base URI",helpUrl:"https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/your-subdomain-tenant-specific-endpoints.html"},{name:"client_id",type:"text",label:"Client ID",required:!0,placeholder:"From Installed Package"},{name:"client_secret",type:"password",label:"Client Secret",required:!0,placeholder:"From Installed Package"},{name:"from_email",type:"email",label:"From Email",required:!0,placeholder:"sender@example.com",extra:"Must be verified in Marketing Cloud"},{name:"from_name",type:"text",label:"From Name",required:!0,placeholder:"e.g., Your Company"}],exportFields:[{name:"name",type:"text",label:"Email Name",required:!0,placeholder:"e.g., Newsletter June 2026"},{name:"subject",type:"text",label:"Email Subject",required:!1,placeholder:"e.g., Special offer for you!"}]},hubspot:{id:"hubspot",name:"HubSpot Email",icon:"/images/integrations/hubspot.svg",description:"Export emails to HubSpot",apps:["useblocks"],settingsFields:[{name:"api_key",type:"password",label:"Private App Access Token",required:!0,placeholder:"e.g., pat-na1-xxxx",helpUrl:"https://developers.hubspot.com/docs/api/private-apps"},{name:"from_email",type:"email",label:"From Email",required:!0,placeholder:"sender@example.com",extra:"This email must be verified in HubSpot"},{name:"from_name",type:"text",label:"From Name",required:!0,placeholder:"e.g., Your Company"}],exportFields:[{name:"name",type:"text",label:"Email Name",required:!0,placeholder:"e.g., Newsletter June 2026"},{name:"subject",type:"text",label:"Email Subject",required:!1,placeholder:"e.g., Special offer for you!"}]},mailchimp:{id:"mailchimp",name:"Mailchimp",icon:"/images/integrations/mailchimp.svg",description:"Export emails to Mailchimp",apps:["useblocks"],settingsFields:[{name:"api_key",type:"password",label:"API Key",required:!0,placeholder:"e.g., xxxxxxxx-us1",helpUrl:"https://mailchimp.com/help/about-api-keys/"},{name:"from_email",type:"email",label:"From Email",required:!0,placeholder:"sender@example.com",extra:"This email must be verified in Mailchimp"},{name:"from_name",type:"text",label:"From Name",required:!0,placeholder:"e.g., Your Company"}],exportFields:[{name:"list_id",type:"text",label:"Audience ID",required:!0,placeholder:"e.g., a1b2c3d4e5",helpText:"Find your Audience ID in Audience settings \u2192 Audience name and defaults"},{name:"subject",type:"text",label:"Email Subject",required:!1,placeholder:"e.g., Special offer for you!"}]},enkod:{id:"enkod",name:"enKod",icon:"/images/integrations/enkod.svg",description:"Export emails to enKod",apps:["emailmaker"],settingsFields:[{name:"api_key",type:"password",label:"API Key",required:!0,placeholder:"Enter enKod API key",helpUrl:"https://help.enkod.io/doku.php/api:start"},{name:"sender_email",type:"email",label:"Sender Email",required:!0,placeholder:"sender@example.com"},{name:"sender_name",type:"text",label:"Sender Name",required:!0,placeholder:"e.g., Your Company"}],exportFields:[{name:"subject",type:"text",label:"Email Subject",required:!0,placeholder:"e.g., Special offer for you!"}]}},a=(e,t)=>!e.apps||0===e.apps.length||e.apps.includes(t),l=e=>{const t=n[e];if(t&&a(t,"emailmaker"))return t},r=()=>{const e="emailmaker",t=Object.values(n).filter(t=>a(t,e));return t},o=(e,t)=>{if(!t)return!1;const i=n[e];if(!i)return!1;return i.settingsFields.filter(e=>e.required).every(e=>!!t[e.name])}},90701:(e,t,i)=>{"use strict";i.d(t,{Gy:()=>m,O5:()=>f,hN:()=>g,x_:()=>u});var n=i(33087),a=i(67815),l=i(25366),r=i(14365),o=i(6472),s=i(88147),c=i(17855);const d="bottomRight";function m(e){return{id:e.id,code:e.html,title:e.title,subject:e.subject,preheader:e.preheader}}function u(e){return{id:e.id,code:e.html,title:e.title}}const p=e=>{var t,i,n,a;return e.message||(null===(t=e.error)||void 0===t||null===(i=t.data)||void 0===i?void 0:i.code)||(null===(n=e.error)||void 0===n?void 0:n.status)||e.error||(null===(a=e.data)||void 0===a?void 0:a.code)||e.status||e||"Unknown error"},h=e=>{var t,i,n,a;return e.description||(null===(t=e.error)||void 0===t||null===(i=t.data)||void 0===i?void 0:i.message)||(null===(n=e.error)||void 0===n?void 0:n.error)||(null===(a=e.data)||void 0===a?void 0:a.message)||e.error||"Unknown error"};function g(){const e=(0,a.ml)(n.AZ.ON_NOTIFICATION),{notification:t}=r.qw.useApp(),i=(0,l.useCallback)((i,n)=>{i.type||(i={...i,type:"info"});const a=(0,c.TB)({...i});return e.fire(a).then(e=>!!e.every(e=>!1!==e)&&(void 0===(i={...i,...a}).placement&&(i.placement=d),i=Object.assign(i,...e.filter(e=>"object"===typeof e)),n||(t[i.type]?t[i.type](i):i.message),i))},[t,e]),o=(0,l.useCallback)((e,t)=>{const n={...e,message:l.createElement("div",{dangerouslySetInnerHTML:{__html:p(e)}}),description:l.createElement("div",{dangerouslySetInnerHTML:{__html:h(e)}})};return i({...n,type:"error"},t)},[i]),s=(0,l.useCallback)((e="Success",t)=>i({..."string"===typeof e?{message:e}:e,type:"success"},t),[i]),m=(0,l.useCallback)((e,t)=>i({...e,type:"warning"},t),[i]),u=(0,l.useCallback)((e,t)=>i({...e,type:"info"},t),[i]),g=(0,l.useCallback)(e=>{t.destroy(e)},[t]),f=(0,l.useCallback)((e,t,i,n,a=d)=>{i&&o({id:e,data:t,message:i.data instanceof Error?"":p(i),description:h(i),placement:a,innerException:(null===i||void 0===i?void 0:i.data)instanceof Error?i.data:i},n)},[o]);return(0,l.useMemo)(()=>({notify:i,success:s,error:o,warning:m,fromError:f,info:u,destroy:g}),[i,s,o,m,f,u,g])}function f(){const{notify:e}=g();(0,o.D3)(s.Sb,e)}},9914:(e,t,i)=>{"use strict";i.d(t,{A:()=>C});var n=i(25366),a=i(33637),l=i(76508),r=i(85472),o=i(14365),s=i(65751),c=i(64172),d=i(44239),m=i(71041),u=i(90701),p=i(16945);const h=(e,t="block",i=!1)=>{if(null===e||void 0===e||!e.html)return[];const{document:n,blockElements:a,styleElement:l,linksElements:r}=((e,t="block")=>{const i=new DOMParser,n=i.parseFromString(e,"text/html"),a=n.querySelectorAll(`[em="${t}"]`),l=n.querySelectorAll("link"),r=n.querySelector('[em="styles"]');return{parser:i,document:n,blockElements:a,styleElement:r,linksElements:l}})(e.html,t),o=function(e){return Array.from(e).map(e=>e.outerHTML).join("")}(r);if(!(a instanceof NodeList))return[];const s=n.querySelector("head"),c=s?s.innerHTML:"";return Array.from(a).map((t,n)=>{if(!(t instanceof Element)||!t.outerHTML)return null;const a=l?l.outerHTML:"";return{id:`${e.id}-${n}`,html:i?`<!DOCTYPE html>\n <html>\n <head>${c}</head>\n <body>\n <table>${t.outerHTML}</table>\n </body>\n </html>`:(0,p.Y6)(`${o}${a}${t.outerHTML.replace(/class="em-structure"/,'class=""')}`)}}).filter(Boolean)};const g=e=>e.replace(/<div\s+[^>]*style="font-family:[^>]*>(.*?)<\/div>/gs,e=>e.replace(/>(.*?)<\/div>/s,"></div>")),f=e=>e.replace(/src="[^"]*"/g,'src=""'),v=e=>/<div\s+[^>]*style="font-family:/i.test(e);var b=i(5948);const y=async e=>{const{block:t,form:i,projectData:n,projectId:a,addBlock:l,editProject:r,addTag:o,notification:s,__:c,handleCloseModal:d,htmlContent:m,refetch:u,refetchBlocks:p,reloadBlockScreens:h,values:g,tagIds:f,projectTagsArray:v}=e;try{await(0,b.Wv)({block:t,form:i,projectId:a,htmlContent:m,values:g,tagIds:f,addBlock:l,editProject:r,notification:s,refetch:u,refetchBlocks:p,reloadBlockScreens:h,projectTagsArray:v,__:c,handleCloseModal:d})}catch(y){throw y}};var E=i(1382),_=i(69064);var w=i(9417);const C=({isModalVisible:e,currentEmail:t,setIsShowAddAllBlocksModal:i,setTriggerOpenSavedBlocksTab:p,projectId:C})=>{const{__:k,_x:A,_n:S}=(0,l.s9)(),I=(0,w.NF)(),{data:x,refetch:L}=(0,a.KC)(),[N,T]=(0,n.useState)(!1),[B]=o.lV.useForm(),[P,R]=(0,n.useState)([]),[F,O]=(0,n.useState)([]),M=(0,n.useRef)({}),[j]=(0,d.Gr)(),[D]=(0,c.OD)(),[V,W]=(0,d.pP)(),z=(0,r.d4)(s.B)||(_.EW.isPlugin?void 0:"ru_RU"),H=(e=>{const t=new Set,i=[];for(const n of e)if(v(n.html)){const e=f(g(n.html));t.has(e)||(t.add(e),i.push(n))}else i.push(n);return i})(h(t)).map(e=>e),U=H.length,q=(0,u.hN)(),$=()=>{N||G||i(!1)},{bulkSave:Z,confirmSavingBlocksLoading:G}=(({projectData:e,addTag:t,addBlock:i,editProject:a,refetch:l,reloadBlockScreens:r,notification:o,__:s,handleCloseModal:c,setTriggerOpenSavedBlocksTab:d,setTagsOptions:m,form:u,projectId:p})=>{const[h,g]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{m((0,E._q)(e,_.YY).map(e=>({value:e.name})))},[e]),{bulkSave:async(n,m,h,f)=>{g(!0);try{if(!m)return;const{tagIds:g,projectTagsArray:E}=await(0,b.cr)({blockTags:f,projectData:e,projectId:p,addTag:t,editProject:a,notification:o,__:s});let _=!0,w=0;for(const l of n)try{await y({block:l,form:u,projectData:e,projectId:p,addBlock:i,editProject:a,addTag:t,notification:o,__:s,handleCloseModal:c,values:h,tagIds:g,projectTagsArray:E})}catch(v){_=!1,w++}if(_&&o.success({id:"BULK_SAVE_SUCCESS",message:s("All blocks saved successfully."),placement:"bottomRight"}),!_){if(w===n.length)throw new Error;o.warning({id:"BULK_SAVE_PARTIAL_SUCCESS",message:s("Some blocks were not saved successfully."),placement:"bottomRight"})}d(!0);try{l()}catch(v){}r()}catch(v){throw v}finally{g(!1),u.resetFields(),c()}},confirmSavingBlocksLoading:h}})({projectData:x,addTag:j,addBlock:V,editProject:D,refetch:L,reloadBlockScreens:b.MA,notification:q,__:k,handleCloseModal:$,setTriggerOpenSavedBlocksTab:p,setTagsOptions:O,form:B,projectId:C}),K=async()=>{try{const{valid:e,values:i,blockTags:n}=await(0,b.q)({form:B,notification:q,__:k});p(!1),T(!0);const a=function(e,t,i){const{images:n}=e,{blocks:a}=t;return null===n||void 0===n?void 0:n.map(e=>{const t=a.find(t=>t.id===e.block_id);return{blockType:e.classification,blockTitle:e.name,htmlContent:(null===t||void 0===t?void 0:t.html)||"",projectId:i}})}(await(0,m.V)(t,z,M,H,I),M.current,t.project.toString());T(!1),await Z(a,e,i,n)}catch(e){T(!1),i(!1),q.error({message:k("Failed to save blocks."),placement:"bottomRight"})}};return n.createElement(o.aF,{title:n.createElement("div",{className:"ant-modal-title"},k("Bulk saving of blocks")),open:e,onOk:K,onCancel:$,footer:n.createElement("div",{className:"modal-footer"},!(N||G)&&n.createElement(o.$n,{key:"submit",size:"large",type:"primary",disabled:N||G,onClick:K},A("Save","block")+" "+U+" "+S("block","blocks",U)))},N||G?n.createElement("div",null,k("All blocks saved at this point can be found in the \u201cSaved Blocks\u201d section in the sidebar.")):n.createElement("div",null,k("Your letter contains")+" "+U+" "+S("block","blocks",U)+" "+k("that can be saved for future use.")),!(N||G)&&n.createElement(o.lV,{form:B,name:"add_all_blocks_form",layout:"vertical",onFinish:K,style:{paddingTop:24}},n.createElement(o.lV.Item,{label:k("Tags"),name:"tags",labelCol:{span:24},wrapperCol:{span:24},style:{display:"block",marginBottom:0}},n.createElement(o.Select,{size:"large",mode:"tags",placeholder:k("Add some tags"),style:{width:"100%"},value:P,onChange:R,disabled:W.isLoading,options:F}))),(G||N)&&n.createElement("div",{className:"modal-spinner"},n.createElement(o.tK,{size:"large"})))}},42082:(e,t,i)=>{"use strict";i.d(t,{G:()=>a,M:()=>n});const n="https://app.emailmaker.ru/api/wp-json/ai-generator/v1/identificate_blocks",a=["Menu","Header","Content","Banners","Lists","Buttons","Promocodes","Feature","Call to Action","E-Commerce","Articles","Polls","Applications","Separators","Contacts","Footer","Other"]},99873:(e,t,i)=>{"use strict";i.d(t,{A:()=>b});var n=i(25366),a=i(85472),l=i(33637),r=i(44239),o=i(64172),s=i(90701),c=i(14365),d=i(1246),m=i(54501),u=i(1382),p=i(76508),h=i(93149),g=i(90388),f=i(5948),v=i(69064);const b=({isModalVisible:e,htmlContent:t,projectId:i,setIsShowAddAllBlocksModal:b,setIsShowAddAllBlocksModalForNewEmail:y})=>{const{__:E}=(0,p.s9)(),_=(0,a.wA)(),[w]=c.lV.useForm(),[C,k]=(0,n.useState)([]),[A,S]=(0,r.pP)(),[I]=(0,r.OZ)(),{data:x}=(0,r.h1)(),L=(0,s.hN)(),N=(0,h.rD)(),[T,B]=(0,n.useState)([]),{data:P,refetch:R}=(0,l.KC)(),{refetch:F}=(0,r.SB)({projectId:i,pageSize:1e3,page:1,tags:null,name:null,type:null,notEmbed:!0,order:"asc",orderby:"title"}),[O,M]=(0,r.Gr)(),[j,D]=(0,o.OD)(),V=(0,g.XW)(),W=(0,n.useCallback)(e=>{V({operation:v.Ru.SANDBOX_EBLOCK_SET_EM_BLOCK_ID,settings:{emBlockId:e}})},[V]);(0,n.useEffect)(()=>{B((0,u._q)(P,v.YY).map(e=>({value:e.name})))},[P]),(0,n.useEffect)(()=>{if(x){const e=x.schema.properties.acf.properties.type.items.enum;let t=[];for(let i in e)t.push({label:E(v.jg[e[i]]),value:e[i]});k(t)}},[x,E]);const z=()=>{_((0,m.Oo)())},H=()=>{b(!0),y(!1),z()},U=async()=>{await(0,f.x0)({form:w,projectData:P,projectId:i,addBlock:A,editBlock:I,editProject:j,addTag:O,notification:L,__:E,handleCloseModal:z,htmlContent:t,refetch:R,refetchBlocks:F,reloadBlockScreens:f.MA,onGlobalBlockTemplateSynced:W})};return n.createElement(c.aF,{title:n.createElement("div",{className:"ant-modal-title"},E("Save block")),open:e,onOk:()=>H(),onCancel:z,footer:n.createElement("div",{style:{display:"flex",justifyContent:"space-between",padding:"8px 0"}},n.createElement(c.$n,{key:"create-all-blocks",size:"large",onClick:H},E("Save all blocks")),n.createElement(c.$n,{key:"submit",size:"large",type:"primary",loading:S.isLoading,onClick:U},n.createElement(d.Ay,{icon:"CreateBlock",className:"modal-new-block__icon-create"}),E("Save block")))},n.createElement(c.lV,{form:w,layout:"vertical",name:"add_new_block_form",onFinish:U,initialValues:{title:"",type:"",tags:[],global_block:!1},autoComplete:"off"},n.createElement(c.fI,{gutter:16},n.createElement(c.fv,{span:12},n.createElement(c.lV.Item,{label:E("Block name"),name:"title",rules:[{required:!0,message:E("Please input block name")}],style:{marginBottom:15}},n.createElement(c.pd,{disabled:S.isLoading||M.isLoading||D.isLoading,size:"large",placeholder:E("Enter block name"),spellCheck:"false"}))),n.createElement(c.fv,{span:12},n.createElement(c.lV.Item,{label:E("Type"),name:"type",rules:[{required:!0,message:E("Please choose block type")}],style:{marginBottom:15}},n.createElement(c.Select,{disabled:S.isLoading||M.isLoading||D.isLoading,size:"large",placeholder:E("Choose block type"),options:C})))),N.tagsEnabled&&n.createElement(c.lV.Item,{label:E("Tags"),name:"tags"},n.createElement(c.Select,{size:"large",mode:"tags",placeholder:E("Add some tags"),tooltip:{title:E("Tags help you find the block in the list."),icon:n.createElement(d.Ay,{icon:"InfoCircleOutlined"})},disabled:S.isLoading||M.isLoading||D.isLoading,options:T})),N.globalBlockCheckboxEnabled&&n.createElement(c.lV.Item,{name:"global_block",valuePropName:"checked",style:{marginBottom:15}},n.createElement(c.dO,{label:E("Global block"),disabled:S.isLoading||M.isLoading||D.isLoading}))))}},5948:(e,t,i)=>{"use strict";i.d(t,{Wv:()=>p,Lm:()=>n,cr:()=>c,x0:()=>l,MA:()=>a,q:()=>d});const n=async({blockTags:e,projectTagsArray:t,addTag:i,parent:n,notification:a})=>{if(!e||0===e.length)return[];const l=e.map(e=>{const l=t.find(t=>t.name===e);return l?Promise.resolve(l.id):i({name:e,parent:n}).then(({error:t,data:i})=>400===(null===t||void 0===t?void 0:t.status)?t.data.data.term_id:i?i.id:t?(a.fromError("TAG_CREATING_ERROR",e,t),null):void 0)});return(await Promise.all(l)).filter(e=>null!==e&&void 0!==e)},a=()=>{document.querySelector(".blocks-search__blocks-wrapper")&&(document.querySelector(".blocks-search__blocks-wrapper").style.removeProperty("transition"),document.querySelector(".blocks-search__blocks-wrapper").style.opacity=0,document.querySelectorAll(".blocks-search__result-body").forEach(e=>e.style.removeProperty("height")),setTimeout(()=>{document.querySelectorAll(".blocks-search__result-body").forEach(e=>{e.style.height=207*e.offsetHeight/660+"px"}),document.querySelector(".blocks-search__blocks-wrapper").style.transition="opacity 0.2s",document.querySelectorAll(".blocks-search__blocks-wrapper").forEach(e=>e.style.opacity=1)},1500))},l=async e=>{const{block:t,form:i,projectData:n,projectId:a,addBlock:l,editBlock:r,editProject:o,addTag:s,notification:m,__:u,handleCloseModal:h,htmlContent:g,refetch:f,refetchBlocks:v,reloadBlockScreens:b,onGlobalBlockTemplateSynced:y}=e;try{const{valid:e,values:E,blockTags:_}=await d({form:i,notification:m,__:u});if(!e)return;const{tagIds:w,projectTagsArray:C}=await c({blockTags:_,projectData:n,projectId:a,addTag:s,editProject:o,notification:m,__:u});await p({block:t,form:i,projectId:a,htmlContent:g,values:E,tagIds:w,addBlock:l,editBlock:r,editProject:o,notification:m,refetch:f,refetchBlocks:v,reloadBlockScreens:b,projectTagsArray:C,__:u,handleCloseModal:h,onGlobalBlockTemplateSynced:y})}catch(E){}};var r=i(1382),o=i(69064),s=i(90701);const c=async({blockTags:e,projectData:t,projectId:i,addTag:a,editProject:l,notification:c,__:d})=>{const m=`project_${i}`,u=(0,r._q)(t,o.YY),p=u.find(e=>e.name===m),h=u||[];let g;if(p)g=p.id;else{const e=await a({name:m});if(e.error)throw c.fromError("FOLDER_CREATING_ERROR",m,e.error),new Error("\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u0433\u0430");{const t=await l({projectId:i,blocktags:e.data.id});if(t.error)throw c.fromError("BLOCK_CLONING_ERROR",(0,s.x_)(e.data),t.error),new Error("\u041e\u0448\u0438\u0431\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043d\u043e\u0432\u044b\u043c \u0442\u0435\u0433\u043e\u043c");g=t.data.blocktags&&t.data.blocktags[0]}}return{tagIds:await n({blockTags:e,projectTagsArray:h,addTag:a,parent:g,notification:c}),projectTagsArray:h}},d=async({form:e,notification:t,__:i})=>{let n=!0;const a=await e.validateFields(),l=a.tags;return(null===l||void 0===l?void 0:l.length)>10&&(t.error({id:"BLOCK_TOO_MANY_TAGS_ERROR",data:(0,s.x_)(a),message:i("Maximum 10 tags available.")}),n=!1),{valid:n,values:a,blockTags:l}};var m=i(35043);function u(e){if(null!==e&&"object"===typeof e&&"data"in e){const t=e.data;return{code:null===t||void 0===t?void 0:t.code,message:null===t||void 0===t?void 0:t.message}}return{}}const p=async({block:e,form:t,projectId:i,htmlContent:n,values:a,tagIds:l,addBlock:r,editBlock:o,editProject:c,notification:d,refetch:p,refetchBlocks:h,reloadBlockScreens:g,projectTagsArray:f,__:v,handleCloseModal:b,onGlobalBlockTemplateSynced:y})=>{const E=function(e){var t;const{block:i,projectId:n,htmlContent:a,values:l}=e;return i?{title:i.blockTitle,project:i.projectId,html:i.htmlContent,type:i.blockType||"Other",global_block:!1}:{title:null!==(t=null===l||void 0===l?void 0:l.title)&&void 0!==t?t:"",project:n,html:a||"",type:(null===l||void 0===l?void 0:l.type)||"Other",...!0===(null===l||void 0===l?void 0:l.global_block)?{global_block:!0}:{}}}({block:e,projectId:i,htmlContent:n,values:a}),_=await r({...E,blocktags:l.join(",")});if(_.error){const e=u(_.error);throw d.error({id:"BLOCK_CREATING_ERROR",data:{title:E.title,code:E.html},innerException:_.error,message:e.code,description:e.message}),t.resetFields(),b(),new Error("\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430")}const w=_.data;!e&&!0===(null===a||void 0===a?void 0:a.global_block)&&null!==w&&void 0!==w&&w.id&&await async function(e){const{created:t,blockData:i,editBlock:n,onGlobalBlockTemplateSynced:a}=e;if(t.id){if(n){var l,r;const e=null!==(l=null!==(r=t.html)&&void 0!==r?r:i.html)&&void 0!==l?l:"",a=(0,m.g)(e,String(t.id));a!==e&&await n({blockId:String(t.id),html:a})}null===a||void 0===a||a(String(t.id))}}({created:w,blockData:E,editBlock:o,onGlobalBlockTemplateSynced:y}),e||(t.resetFields(),b());const C=f.map(e=>e.id),k=new Set([...C,...l]);!e&&p&&p();const A=await c({projectId:i,blocktags:[...k].join(",")});if(A.error){const e=u(A.error);d.error({message:e.message,code:e.code})}else{var S,I;if(!e&&h)d.success({id:"BLOCK_CREATING_SUCCESS",data:(0,s.x_)(_.data),message:v("The block \u201c")+String(null!==(S=null===(I=_.data)||void 0===I?void 0:I.title)&&void 0!==S?S:"")+v("\u201d was successfully created.")}),h()}return!e&&g&&g(),_.data}},87538:(e,t,i)=>{"use strict";i.d(t,{A:()=>B});var n=i(25366),a=i(85472),l=i(33637),r=i(37666),o=i(40093),s=i(76508),c=i(65751),d=i(79349),m=i(93119),u=i(64363),p=i(69064),h=i(89040),g=i(85421),f=i(10763),v=i(17623),b=i(42010),y=i(57782),E=i(6334),_=i(69546),w=i(3344),C=i(23437),k=i(82338),A=i(61706),S=i(1610),I=i(79594),x=i(11824),L=i(17855),N=i(92420),T=i(85459);const B=()=>{var e,t,i,B,P,R,F,O,M,j,D,V,W,z,H;const{__:U,_n:q}=(0,s.s9)();(0,C.aU)(U),(0,C.kr)(U);const $=(0,a.wA)(),Z=(0,l.Zp)(),G=(0,l.zy)(),[K,X]=(0,r.ok)(),Y=(0,a.d4)(c.C1),J=G.pathname.startsWith("/billing"),[Q,ee]=(0,n.useState)({kind:"idle"}),[te,ie]=(0,n.useState)(v.h2.EARLY),[ne,ae]=(0,n.useState)(null),[le,re]=(0,n.useState)(null),[oe,se]=(0,n.useState)(null),[ce,de]=(0,n.useState)(null),me=(0,n.useRef)(null),[ue]=(0,m.on)(),{isSuccess:pe,data:he}=(0,m.W5)(void 0),ge=he,{data:fe}=(0,u.J)(void 0,{skip:!(null!==Y&&void 0!==Y&&Y.id)||!J}),{data:ve}=(0,u.Xi)(void 0,{skip:!(null!==Y&&void 0!==Y&&Y.id)||!J}),{promoState:be}=(0,_.m)(),ye=te===v.h2.MONTHLY&&be.is_for_month||te===v.h2.EARLY&&be.is_for_year,{initiatePayment:Ee,startPlanCardPayment:_e}=(0,y.U)({currentUser:Y,payPeriod:te,promoData:be,onPaymentStart:e=>{$((0,d.uK)(e))},onPaymentSuccess:()=>ue(void 0)}),{pricingCards:we}=(0,E.y)({period:te,gateway:"cloudpayment",subscriptionsList:ge||[]}),{isLoading:Ce,enableRecurring:ke}=(0,w.C)({subscriptionId:null!=(null===Y||void 0===Y?void 0:Y.subscription_id)?String(Y.subscription_id):null,userId:null!=(null===Y||void 0===Y?void 0:Y.id)?String(Y.id):"",recurringPayments:!(null===Y||void 0===Y||!Y.recurring_payments)}),{subscription_end:Ae,enterprise_users_limit:Se,enterprise_price:Ie,enterprise_12_price:xe}=Y||{};(0,n.useEffect)(()=>{var e,t;const i=null===Y||void 0===Y||null===(e=Y.subscription)||void 0===e||null===(t=e.post_title)||void 0===t?void 0:t.trim();i&&i.split(/\s+/).length>1?ie(v.h2.EARLY):i&&ie(v.h2.MONTHLY)},[null===Y||void 0===Y||null===(e=Y.subscription)||void 0===e?void 0:e.post_title]),(0,n.useEffect)(()=>{var e,t;if(!pe||!ge||null===Y||void 0===Y||!Y.subscription)return;const i=null===(e=Y.subscription.ID)||void 0===e?void 0:e.toString();ae(null!==(t=ge.find(e=>{var t;return(null===(t=e.id)||void 0===t?void 0:t.toString())===i}))&&void 0!==t?t:null)},[pe,ge,null===Y||void 0===Y?void 0:Y.subscription]);const Le=null!==(t=null===ne||void 0===ne||null===(i=ne.title)||void 0===i?void 0:i.split(" ")[0])&&void 0!==t?t:"",Ne=(0,n.useMemo)(()=>{var e;if(null===Y||void 0===Y||!Y.id)return!1;const t=Boolean(Y.trial_enabled),i=Boolean(Y.is_paying),n=null!==(e=Y.counters)&&void 0!==e?e:{},a=(0,x.o)(n.payments_counter),l=Number(Y.subscription_amount),r=Number.isFinite(l)&&l>0||"number"===typeof a&&a>0,o=i||r,s=(0,L.Y1)(t,Ae),c=Boolean(Le)&&"Free"!==Le&&"Community"!==Le;return t&&!(t&&(o||!s&&c))},[Le,Y,Ae]),Te=(0,n.useMemo)(()=>{var e;const t=(null===ne||void 0===ne||null===(e=ne.title)||void 0===e?void 0:e.split(" ")[0])||Le||U("Plan");return Ne?U("Trial"):t},[U,ne,Le,Ne]),Be=(0,n.useMemo)(()=>(0,k.h)({currentBilling:ne,pricingCards:we,enterprise_users_limit:Se,enterprise_price:Ie,enterprise_12_price:xe}),[ne,we,Se,Ie,xe]),Pe=(0,n.useCallback)(()=>{document.body.classList.remove("editor"),Z("/billing"),$((0,d.qf)(p.lx.SWITCH_TO_PLAN_MODAL))},[$,Z]),Re=(0,n.useCallback)(()=>{if(!le)return;const{subtitle:e,units:t,priceRub:i}=le,n=`${e} ${t} ${U("units")} \u2014 ${(0,S.ku)(i)}`;re(null),se(n)},[U,le]),Fe=(0,n.useCallback)(()=>{const e=we.find(e=>e.title.includes("Pro"));if(!e)return void o.Ay.info(U("The Pro plan is not available."));const t=e.title.split(" ")[0],i=parseFloat(e.price)||0,n=(0,A.L)(e,{enterpriseUsersLimit:null!==Se&&void 0!==Se?Se:null,enterprisePrice:null!==Ie&&void 0!==Ie?Ie:null,enterprise12Price:null!==xe&&void 0!==xe?xe:null},q);ee({kind:"idle"}),de({title:e.title,currentItemTitle:t,price:i,isEnterpriseActivePrice:!1,featureLines:n})},[U,q,xe,Ie,Se,we]),Oe=(0,n.useCallback)(()=>"banner"===Q.kind&&"plan_expiring"===Q.id?Ne?(ee({kind:"idle"}),void Z("/billing")):void Fe():Be?(ee({kind:"idle"}),void Ee(Be.title,Be.currentItemTitle,Be.price,Be.isEnterpriseActivePrice,Le,ye,Pe)):(Z("/billing"),void o.Ay.info(U("Please complete payment on the Billing page."))),[Be,Ee,Le,ye,Fe,Pe,Ne,Q,Z,U]),Me=(0,n.useCallback)(()=>{de(null)},[]),je=(0,n.useCallback)(()=>{if(!ce)return;const e=ce;de(null);_e(e.title,e.currentItemTitle,e.price,e.isEnterpriseActivePrice,"Free",ye)||o.Ay.warning(U("Card payment is not available for this plan change. Please contact support."))},[U,ye,ce,_e]),De=(0,n.useCallback)(()=>{ce&&(se(ce.title),de(null))},[ce]),Ve=(0,n.useCallback)(()=>{ee(e=>{if(me.current&&"idle"!==e.kind){const e=me.current;me.current=null;const t="plan_activated"===e.id?f.l.bannerPlanActivated:f.l.bannerPackageActivated;return(0,f.Yc)(t),{kind:"success",id:e.id,packageAmount:e.packageAmount}}return{kind:"idle"}})},[]),We=(0,n.useCallback)(e=>{const t="plan_activated"===e.id?f.l.bannerPlanActivated:f.l.bannerPackageActivated;(0,f.X$)(t)||ee(i=>"idle"===i.kind?((0,f.Yc)(t),{kind:"success",id:e.id,packageAmount:e.packageAmount}):(me.current=e,i))},[]);(0,n.useEffect)(()=>{const e=()=>We({id:"plan_activated"}),t=e=>{var t;We({id:"package_activated",packageAmount:null===(t=e.detail)||void 0===t?void 0:t.amount})};return window.addEventListener("em-billing-plan-payment-success",e),window.addEventListener("em-billing-extra-package-success",t),()=>{window.removeEventListener("em-billing-plan-payment-success",e),window.removeEventListener("em-billing-extra-package-success",t)}},[We]),(0,n.useEffect)(()=>{if(null===Y||void 0===Y||!Y.id)return;let e=!1;try{e="1"===sessionStorage.getItem(f.rn)}catch{}const t="1"===K.get("billing_plan_success"),i=K.get("session_id");if(!e||!t&&!i)return;try{sessionStorage.removeItem(f.rn)}catch{}try{window.dispatchEvent(new CustomEvent("em-billing-plan-payment-success"))}catch{}ue(void 0);const n=new URLSearchParams(K);n.delete("billing_plan_success"),n.delete("session_id"),n.toString()!==K.toString()&&X(n,{replace:!0})},[null===Y||void 0===Y?void 0:Y.id,K,X,ue]),(0,n.useEffect)(()=>{(0,f.lu)(null===Y||void 0===Y?void 0:Y.id,null!==Ae&&void 0!==Ae?Ae:null,null!=(null===Y||void 0===Y?void 0:Y.subscription_id)?String(Y.subscription_id):null)},[null===Y||void 0===Y?void 0:Y.id,Ae,null===Y||void 0===Y?void 0:Y.subscription_id]),(0,n.useEffect)(()=>{var e,t,i,n;if(null===Y||void 0===Y||!Y.id||"idle"!==Q.kind)return;const a=(0,N.nz)(null===fe||void 0===fe?void 0:fe.limits,null!==ve&&void 0!==ve?ve:void 0);if(a){const e=function(e){switch(e){case"ai":return f.l.limitUpgradeAi;case"email_generate":return f.l.limitUpgradeEmail;case"optimization":return f.l.limitUpgradeOptimization;case"image_generate":return f.l.limitUpgradeImageGenerate;case"preview":return f.l.limitUpgradePreview;case"link_check":return f.l.limitUpgradeLinkCheck;case"image_check":return f.l.limitUpgradeImageCheck;case"spam_check":return f.l.limitUpgradeSpamCheck;default:return e}}(a.kind);return void((0,f.X$)(e)||((0,f.Yc)(e),ee({kind:"limit",presetId:a.presetId,previousLimit:a.previousLimit,nextLimit:a.nextLimit})))}const l=Le&&"Free"!==Le&&"Community"!==Le,r=(0,I.WU)(null!==Ae&&void 0!==Ae?Ae:null),o=Y.recurring_payments,s=Ne||l&&!o,c=(0,f.X$)(f.l.bannerPlanExpiring);if(s&&Ae&&r>0&&r<=f.jO&&!c)return(0,f.Yc)(f.l.bannerPlanExpiring),void ee({kind:"banner",id:"plan_expiring",live:{plan:{planName:Te,subscriptionEndDisplay:String(Ae),daysRemaining:r}}});const d=null===fe||void 0===fe||null===(e=fe.limits)||void 0===e?void 0:e.ai,m=null===ve||void 0===ve||null===(t=ve.flags)||void 0===t||null===(i=t.ai)||void 0===i?void 0:i.limit_warning,u=null!==(n=null===d||void 0===d?void 0:d.percent)&&void 0!==n?n:0;d&&!d.is_unlimited&&(m||u>=f.w5)&&!(0,f.X$)(f.l.bannerAiLow)&&((0,f.Yc)(f.l.bannerAiLow),ee({kind:"banner",id:"ai_low",live:{ai:{current:d.used,total:Math.max(d.total_limit,1)}}}))},[null===Y||void 0===Y?void 0:Y.id,Q.kind,fe,ve,Ae,Le,ne,null===Y||void 0===Y?void 0:Y.recurring_payments,Ne,Te,U]);const ze=(0,n.useMemo)(()=>{var e;return{planName:(null===ne||void 0===ne||null===(e=ne.title)||void 0===e?void 0:e.split(" ")[0])||Le||U("Plan"),subscriptionEndDisplay:Ae?String(Ae):"\u2014",daysRemaining:(0,I.WU)(null!==Ae&&void 0!==Ae?Ae:null)}},[ne,Le,Ae,U]);if(null===Y||void 0===Y||!Y.id)return null;const He="limit"===Q.kind?(0,h.Si)(Q.presetId):null,Ue="banner"===Q.kind||"success"===Q.kind?Q.id:null,qe=Ue?(0,h.gM)(Ue):null,$e="banner"===Q.kind?Q.live:"success"===Q.kind&&"plan_activated"===Q.id?{plan:ze}:"success"===Q.kind&&"package_activated"===Q.id?{packageAmount:null!==(B=Q.packageAmount)&&void 0!==B?B:0}:{},Ze="banner"===Q.kind||"success"===Q.kind,Ge=Ue,Ke="plan_expiring"===Ge,Xe=Ke?Ne:Boolean(null===qe||void 0===qe?void 0:qe.showPay),Ye=Ke?!Ne&&!Y.recurring_payments:Boolean(null===qe||void 0===qe?void 0:qe.showAutopay);return n.createElement(n.Fragment,null,He&&"limit"===Q.kind?n.createElement(h.Xl,{open:!0,onClose:Ve,title:U(He.titleKey),subtitle:U(He.subtitleKey),usageResource:He.usageResource,previousDisplay:(0,h.hO)(Q.previousLimit),nextDisplay:(0,h.hO)(Q.nextLimit),onChangePlan:()=>{Ve(),Pe()},secondaryAction:He.showSecondaryBuy?{label:(0,T.Q)(He.usageResource,U),onClick:()=>{Ve();const e=(0,b.mr)(He.usageResource)[0];e&&re({type:He.usageResource,subtitle:(0,T.a)(He.usageResource,U),units:e.units,priceRub:e.priceRub})}}:void 0}):null,Ze&&Ge&&qe?n.createElement(h.rG,{open:!0,onClose:Ve,title:U(qe.titleKey),subtitle:U(qe.subtitleKey),bannerTone:qe.bannerTone,bannerVariant:null!==(P=qe.bannerVariant)&&void 0!==P?P:"default",bannerContent:(0,g.h)(Ge,{__:U,_n:q},$e),showAutopayButton:Ye,onEnableAutopay:()=>{ke()},autopayLoading:Ce,payAction:Xe?{label:U(Ke&&Ne?"Choose plan":"Pay"),onClick:()=>{Oe()}}:void 0}):null,n.createElement(h.pw,{open:!!le,onClose:()=>re(null),limitType:null!==(R=null===le||void 0===le?void 0:le.type)&&void 0!==R?R:null,subtitle:null!==(F=null===le||void 0===le?void 0:le.subtitle)&&void 0!==F?F:"",units:null!==(O=null===le||void 0===le?void 0:le.units)&&void 0!==O?O:0,priceRub:null!==(M=null===le||void 0===le?void 0:le.priceRub)&&void 0!==M?M:0,userEmail:String(null!==(j=Y.email)&&void 0!==j?j:""),onInvoiceForLegal:Re}),ce?n.createElement(h.QO,{open:!0,onClose:Me,planShortName:ce.currentItemTitle,featureLines:ce.featureLines,canPayWithCard:!0,onPayByCard:je,onInvoiceForLegal:De}):null,oe?n.createElement(h.OY,{open:!0,onClose:()=>se(null),requestTariff:oe,userEmail:String(null!==(D=Y.email)&&void 0!==D?D:""),userName:String(null!==(V=Y.name)&&void 0!==V?V:""),currentPlane:null!==(W=null===ne||void 0===ne?void 0:ne.title)&&void 0!==W?W:String(null!==(z=null===(H=Y.subscription)||void 0===H?void 0:H.post_title)&&void 0!==z?z:"")}):null)}},25857:(e,t,i)=>{"use strict";i.d(t,{a:()=>m,r:()=>d});var n=i(25366),a=i(74572),l=i.n(a),r=i(14365),o=i(1246),s=i(93149),c=i(76508);function d(e){var t,i;return Boolean(null!==(t=null===e||void 0===e?void 0:e.global_block)&&void 0!==t?t:null===e||void 0===e||null===(i=e.acf)||void 0===i?void 0:i.global_block)}const m=({className:e,size:t=16})=>{const i=(0,s.rD)(),{__:a}=(0,c.s9)(),d=a("Global block");return n.createElement(r.m_,{title:d,placement:"top",trigger:["hover"]},n.createElement("span",{className:l()("block-global-badge",e),"aria-label":d,role:"img"},n.createElement(o.Ay,{icon:"Globe02Icon",size:t,strokeWidth:i.iconStrokeWidth})))}},4373:(e,t,i)=>{"use strict";i.d(t,{b:()=>r});var n=i(25366),a=i(14365),l=i(69064);const r=({users:e,isEditor:t,isPlugin:i,token:r})=>{const[o,s]=(0,n.useState)(!1),c=window.localStorage.getItem(l.V0.em_color_scheme),d=e=>{const t=(e=>{const{first_name:t,last_name:i,email:n}=e.user.name;return t&&i?`${t} ${i}`:t||n})(e);return n.createElement("span",null,t)};return n.createElement(n.Fragment,null,e.length>0&&t&&n.createElement("div",{className:"user-list "+(o?"open":""),style:i?{left:"60px",bottom:"10px"}:{},onMouseOver:()=>s(!0),onMouseOut:()=>s(!1)},e.map(e=>n.createElement("div",{key:e.user.color,className:"user",style:{"--user-color":e.user.color,"--border-color":null===r||void 0===r?void 0:r.colorBgContainer,"--text-color":"dark"===c?null===r||void 0===r?void 0:r.colorIconHover:null===r||void 0===r?void 0:r.colorWhite}},n.createElement(a.m_,{title:d(e),placement:"topLeft",trigger:"hover",color:null===r||void 0===r?void 0:r.colorBgSpotlight},n.createElement("div",null,(e=>{const{first_name:t,last_name:i,email:n}=e.user.name;if(t)return`${t.split("")[0]}${i?`${i.split("")[0]}`:""}`;return(null===n||void 0===n?void 0:n.split("")[0].toUpperCase())||" "})(e)))))))}},82794:(e,t,i)=>{"use strict";i.d(t,{LA:()=>o,LJ:()=>s,Pp:()=>l,Q9:()=>r,ZW:()=>n,k0:()=>c,pX:()=>a});const n="wss://yjs.emailmaker.ru",a=500,l=5e3,r=2e4,o="3769995",s="Not available for collaborative editing",c="Problem with internet connection"},96839:(e,t,i)=>{"use strict";i.d(t,{A:()=>b});var n=i(25366),a=i(14365),l=i(85472),r=i(65751),o=i(22376),s=i(69064),c=i(75227),d=i(93149),m=i(42018),u=i(72899),p=i(29749),h=i(38885);const g=(0,a.Aj)(),f=(0,u.TJ)(a.tN,{token:{colorDarken1:"rgba(0, 0, 0, 0.08)",colorFillSecondaryDarken:"rgba(0, 0, 0, 0.1)",formControlHeight:34,borderWidth:1,borderColorHover:"#C5C5C5",formItemMarginBottomMD:20,formItemMarginBottomXS:8,colorSecondaryH:265.03,colorSecondaryS:"63.92%",colorSecondaryL:"50%",colorSecondaryBgH:273,colorSecondaryBgS:"100%",colorSecondaryBgL:"93%",appZoom:1}}),v=(0,u.TJ)(a.tS,{token:{colorDarken1:"rgba(0, 0, 0, 0.9)",colorFillSecondaryDarken:"rgba(255, 255, 255, 0.16)",formControlHeight:34,borderWidth:1,borderColorHover:"rgba(255, 255, 255, 0.3)",formItemMarginBottomMD:20,formItemMarginBottomXS:8,appZoom:1}});const b=function({children:e}){const t=(0,l.d4)(o.Up),i=(0,l.d4)(r.C1),b=window.localStorage.getItem(s.V0.em_color_scheme),y=matchMedia(s.F3).matches?s.nd:s.T,[E,_]=(0,n.useState)(b||y),w=(0,d.rD)(),C=(0,l.wA)(),k=(0,c.c8)();(0,n.useEffect)(()=>{const e=s.EW.isPlugin?null===i||void 0===i?void 0:i.theme:b||y;_(e),(0,c.A5)(e),C((0,o.eX)(e===s.nd?`vs-${e}`:s.T)),k()},[b,t,y,null===i||void 0===i?void 0:i.theme,w.pathEnabled,C,k]);const A=(0,n.useCallback)(e=>{e&&e!==s.IJ?((0,c.Hk)(e),localStorage.setItem(s.V0.em_color_scheme,e)):localStorage.removeItem(s.V0.em_color_scheme)},[]);(0,n.useEffect)(()=>{const e=null===i||void 0===i?void 0:i.theme,t=localStorage.getItem(s.V0.em_color_scheme);e&&e!==t&&A(e)},[i,A]);const S=(0,n.useCallback)(()=>{const e=localStorage.getItem(s.V0.em_color_scheme);A(e)},[A]);(0,n.useEffect)(()=>{S()},[S]);const I=(0,l.d4)(m.RP),[x,L]=(0,n.useState)("light"===E?f:v),[N]=(0,n.useState)(1);(0,n.useEffect)(()=>{const e="light"===E?f:v,t=I[E],i=t?(0,u.TJ)(e,t):e;L({...i,token:{...i.token,appZoom:N}})},[L,E,I,N]);const T=(0,p.LG)(),B=(0,n.useCallback)(()=>T,[T]);return n.createElement(a.NP,{theme:x,getPopupContainer:B},n.createElement(a.N7,{transformers:[g]},n.createElement(a.qw,null,n.createElement(h.H,null,e))))}},25470:(e,t,i)=>{"use strict";i.d(t,{c:()=>l});let n=null,a=null;const l=()=>{if(n)return Promise.resolve(n);if(a)return a;i.p.replace(/\/$/,"");return a=i.e(2642).then(i.t.bind(i,42642,19)).then(({default:e})=>(n=e,n)).catch(e=>{throw e}),a}},18414:(e,t,i)=>{"use strict";i.d(t,{A:()=>C});var n=i(25366),a=i(14365),l=i(85472),r=i(76508),o=i(69064),s=i(65751),c=i(42018),d=i(91724),m=i(1246),u=i(90701),p=i(97877),h=i(60538),g=i(44239),f=i(90388),v=i(1382),b=i(54913),y=i(74572),E=i.n(y),_=i(93149),w=i(99614);const C=({comments:e,subjectId:t,isLoggedIn:i,projectTitle:y="",emailElementType:C,email:k})=>{const{__:A,_n:S}=(0,r.s9)(),I=(0,f.XW)(),x=(0,u.hN)(),{token:L}=(0,a.rd)(),N=(0,_.rD)(),T=(0,w.u)(),B=(0,n.useRef)(null),[P,R]=(0,n.useState)(""),[F,O]=(0,n.useState)("ADD"),[M,j]=(0,n.useState)(!1),[D,V]=(0,n.useState)(null),[W,z]=(0,n.useState)(null),[H,U]=(0,n.useState)(""),[q,$]=(0,n.useState)(""),[Z,G]=(0,n.useState)(!1),[K,X]=(0,n.useState)(""),[Y,J]=(0,p.z2)(),[Q,ee]=(0,p.HI)(),[te,ie]=(0,p.kk)(),[ne,ae]=(0,p.vn)(),[le]=(0,h.LX)(),[re]=(0,g.yW)(),oe=(0,l.d4)(s.C1),se=(0,l.d4)(c.jY),ce=(0,b.fn)(),de=()=>{const e=o.EW.isPlugin?se:null===k||void 0===k?void 0:k.project,t={...void 0!==(null===k||void 0===k?void 0:k.meta)?{meta:k.meta}:{},title:null===k||void 0===k?void 0:k.title,emailId:null===k||void 0===k?void 0:k.id,project:e,html:null===ce||void 0===ce?void 0:ce.getValue(),excerpt:null===k||void 0===k?void 0:k.date_gmt};"email"===C?le({emailId:null===k||void 0===k?void 0:k.id,body:t}).catch(e=>{}):re({blockId:null===k||void 0===k?void 0:k.id,body:t}).catch(e=>{})};function me(e){z(D),U(""),O("REPLY")}const ue=()=>{x.error({maskClosable:!0,centered:!0,title:A("Please log in"),content:A("To leave comments you must be logged into EmailMaker and added to the project ")+`${y}.`,okText:A("Okay. I'll log in.")})};async function pe(){i?(await te({commentId:W,content:q,targetId:K}).unwrap(),O("ADD"),$(""),z(0),G(!1),j(!1),X(""),I({operation:o.Ru.SANDBOX_DISCUSS_RESET})):ue()}const he=e=>{O("ADD"),$(""),z(0),G(!1),j(!1),X(""),I({operation:o.Ru.SANDBOX_DISCUSS_RESET})},ge=async()=>{i?((P||H)&&await Y({subjectId:t,author:oe.id,parent:"ADD"===F?"0":W,content:P||H,author_name:oe.name,author_email:oe.email,targetId:K}).then(e=>{e.error?x.error({message:e.error.data.code,description:e.error.data.message}):T({event:"submit",action:"send_discussion_chat_message",entity_type:"block"===C?"block":"email",entity_id:null===k||void 0===k?void 0:k.id,project_id:null===k||void 0===k?void 0:k.project,context:"editor"})}),X(""),O("ADD"),U(""),R(""),z(0),G(!1),j(!1),I({operation:o.Ru.SANDBOX_DISCUSS_RESET})):ue()};function fe(){Z?(j(!1),G(!1),I({operation:o.Ru.SANDBOX_DISCUSS_REMOVE_TARGET,value:K})):(j(!M),I({operation:o.Ru.SANDBOX_DISCUSS_SET_TARGET,value:!M}),M&&G(!1))}(0,d.A)(e=>{const t=e.data.operation;if(t===o.Ru.APPLICATION_DISCUSS_SET_ID&&(X(e.data.settings.value),""!==e.data.settings.value?(G(!0),j(!1)):(G(!1),j(!0))),t===o.Ru.APPLICATION_DISCUSS_SAVE_TARGET&&de(),t===o.Ru.APPLICATION_DISCUSS_GET_COMMENT)if(document.querySelector('.comment-icon-target[target-id="'+e.data.settings.targetId+'"]')){let t=document.querySelector('.comment-icon-target[target-id="'+e.data.settings.targetId+'"]').closest(".ant-comment");document.querySelector(".comment-block")?document.querySelector(".comment-block").scrollTo(0,t.offsetTop):document.querySelector(".em-analytics__email-tab-discuss .ant-tabs-content").scrollTo(0,t.offsetTop),t.classList.add("active"),setTimeout(()=>{t.classList.remove("active")},2e3)}else I({operation:o.Ru.SANDBOX_DISCUSS_REMOVE_TARGET,value:e.data.settings.targetId}),x.error({message:A("There's no such comment.")});t===o.Ru.APPLICATION_DISCUSS_NO_COMMENT&&x.error({message:A("There's no such element in the email.")})});const ve=e=>{I({operation:o.Ru.SANDBOX_DISCUSS_GET_TARGET,value:e})},be=e=>(null===e||void 0===e||e.sort((e,t)=>e.date>t.date?1:-1),n.createElement(n.Fragment,null,e&&!!e.length&&n.createElement(a.B8,{className:"comment-list",itemLayout:"horizontal",dataSource:e,renderItem:e=>n.createElement(n.Fragment,null,n.createElement("li",{id:e.id},n.createElement(n.Fragment,null,"deleted"===e.status&&e.clildren&&n.createElement(a.Mw,{className:"deletedComment",content:n.createElement(a.Fc,{description:A("Comment was removed."),type:"info"}),children:be(e.children)}),"deleted"!==e.status&&n.createElement(n.Fragment,null,n.createElement(a.Mw,{author_id:e.author_id,author:e.author_name,avatar:e.author_avatar_urls&&e.author_avatar_urls[48]||"",className:E()(e.target_id&&"targetted-comment-item",(!e.author_avatar_urls||!e.author_avatar_urls[48])&&"comment-item-noavatar"),content:n.createElement(a.ms,{key:"commenMenu",placement:"left",destroyPopupOnHide:!0,onOpenChange:()=>V(e.id),menu:{items:e.author===oe.id?_e:we},overlayStyle:{minWidth:"auto",paddingRight:6}},n.createElement("div",{onClick:()=>e.target_id&&ve(e.target_id),dangerouslySetInnerHTML:{__html:e.content}})),datetime:n.createElement(n.Fragment,null,n.createElement("span",{dangerouslySetInnerHTML:{__html:e.date&&(0,v.Yq)((0,v.Cl)(e.date),S,!0)}}),e.target_id&&n.createElement("span",{className:"comment-icon-target","target-id":e.target_id,onClick:()=>ve(e.target_id)},n.createElement(m.Ay,{icon:"AimOutlined",style:{color:L.colorInfo,top:-2,position:"relative"}}))),children:n.createElement(n.Fragment,null,"REPLY"===F&&W===e.id&&Ee,"EDIT"===F&&W===e.id&&ye,be(e.children))})))))}))),ye=n.createElement(a.lV,{onFinish:pe,className:"commentForm"},n.createElement(a.lV.Item,{style:{marginBottom:10}},n.createElement(a.fs,{className:"textarea-reply",value:q,onChange:e=>$(e.target.value),rows:4,placeholder:A("Editing comments"),onKeyDown:e=>"Escape"===e.key&&he(),onPressEnter:e=>"Enter"===e.key&&e.ctrlKey&&pe(),ref:B})),n.createElement(a.lV.Item,{className:"buttons"},n.createElement(a.$x,null,Z?n.createElement(a.iS,{title:A("Are you sure?"),okText:A("Yes"),cancelText:A("No"),onConfirm:function(e){G(!1),X(""),I({operation:o.Ru.SANDBOX_DISCUSS_REMOVE_TARGET,value:K}),j(!0),I({operation:o.Ru.SANDBOX_DISCUSS_SET_TARGET,value:!0})}},n.createElement(a.$n,{loading:ae.isLoading,type:M||Z&&"EDIT"===F&&""!==K?"primary":"default",className:"button-target "+(M&&!Z?"button-target_choose":""),style:Z&&"EDIT"===F&&""!==K?{background:L.colorInfo}:{}},n.createElement(m.Ay,{icon:"AimOutlined",className:"icon-target"}))):n.createElement(a.$n,{onClick:fe,loading:ae.isLoading,type:M||Z&&"EDIT"===F&&""!==K?"primary":"default",className:"button-target "+(M&&!Z?"button-target_choose":""),style:Z&&"EDIT"===F&&""!==K?{background:L.colorInfo}:{}},n.createElement(m.Ay,{icon:"AimOutlined",className:"icon-target"})),n.createElement(a.$n,{className:"button-reply",type:"primary",loading:ie.isLoading,htmlType:"submit"},A("Save")," ",n.createElement(m.Ay,{icon:"SaveOutlined",size:16,strokeWidth:N.iconStrokeWidth})),n.createElement(a.$n,{onClick:he,className:"button-reply"},A("Cancel"))))),Ee=n.createElement(a.lV,{name:"reply",className:"commentForm",onFinish:ge},n.createElement(a.lV.Item,{style:{marginBottom:10}},n.createElement(a.fs,{className:"textarea-reply",value:H,onChange:e=>U(e.target.value),rows:4,placeholder:A("Reply to the comment"),onKeyDown:e=>"Escape"===e.key&&he(),onPressEnter:e=>"Enter"===e.key&&e.ctrlKey&&ge(),ref:B})),n.createElement(a.lV.Item,{hidden:!0,name:"targetId"},n.createElement(a.pd,{type:"hidden"})),n.createElement(a.lV.Item,{className:"buttons"},n.createElement(a.$x,null,n.createElement(a.m_,{placement:"top",title:A("Add a note"),styles:{body:{maxWidth:"150px"}}},n.createElement(a.$n,{onClick:fe,type:M||Z&&"REPLY"===F&&""!==K?"primary":"default",className:"button-target "+(M&&!Z?"button-target_choose":""),style:Z&&"REPLY"===F&&""!==K?{background:L.colorInfo}:{}},n.createElement(m.Ay,{icon:"AimOutlined",className:"icon-target"}))),n.createElement(a.$n,{className:"button-reply",type:"primary",loading:"REPLY"===F&&J.isLoading,htmlType:"submit"},A("Reply")," ",n.createElement(m.Ay,{icon:"SendOutlined",size:16,strokeWidth:N.iconStrokeWidth})),n.createElement(a.$n,{onClick:he,className:"button-reply",ghost:!0,type:"primary"},A("Cancel")))));(0,n.useEffect)(()=>{"REPLY"===F&&B.current.focus({cursor:"start"}),"EDIT"===F&&B.current.focus({cursor:"end"})},[F]);let _e=[];_e.push({key:"Reply to comment",icon:n.createElement(m.Ay,{icon:"RollbackOutlined",style:{fontSize:"16px"}}),label:A("Reply"),onClick:me},{key:"Edit comment",icon:n.createElement(m.Ay,{icon:"EditOutlined",style:{fontSize:"16px"}}),label:A("Edit"),onClick:function(t){var i,n,a;z(D);const l=e.find(e=>{var t;return(null===(t=e.id)||void 0===t?void 0:t.toString())===D}),r=(null===l||void 0===l||null===(i=l.target_id)||void 0===i?void 0:i.toString())||"";G(Boolean(r)),X(r),$(null===l||void 0===l||null===(n=l.content)||void 0===n||null===(a=n.slice(3,-5))||void 0===a?void 0:a.toString()),O("EDIT")}},{key:"Delete comment",icon:n.createElement(m.Ay,{icon:"DeleteOutlined",size:16}),label:A("Delete"),style:{color:L.colorError},onClick:function(){var t,i;z(D),e.filter(e=>e.parent===D).length?te({commentId:D,status:"deleted"}).unwrap():Q(D),(null===(t=document.querySelector('.discuss-main li[id="'+D+'"] .comment-icon-target'))||void 0===t?void 0:t.getAttribute("target-id"))&&I({operation:o.Ru.SANDBOX_DISCUSS_REMOVE_TARGET,value:null===(i=document.querySelector('.discuss-main li[id="'+D+'"] .comment-icon-target'))||void 0===i?void 0:i.getAttribute("target-id")}),de(),X("")}});let we=[];return we.push({key:"Reply to comment",icon:n.createElement(m.Ay,{icon:"RollbackOutlined",style:{fontSize:"16px"}}),label:A("Reply"),onClick:me}),n.createElement("div",{className:"discuss-main"},e.length>0&&n.createElement(a.B8,{className:"comment-list",itemLayout:"horizontal",dataSource:function(e){let t=JSON.parse(JSON.stringify(e));if(!t||!t.length)return[];let i=[],n=new Map;for(let a=0,l=t.length;a<l;++a){let e=t[a],l=n.get(e.id);if(l&&!Array.isArray(l)||(l&&(e.children=l),n.set(e.id,e)),"0"===String(e.parent))i.push(e);else{let t=n.get(e.parent);if(t){(Array.isArray(t)?t:t.children=t.children||[]).push(e)}else n.set(e.parent,[e])}}return i.forEach(e=>{"deleted"!==e.status||e.children||!ee.isUninitialized&&!ee.isSuccess||Q(e.id).unwrap().catch(e=>{})}),i}(e),renderItem:e=>n.createElement("li",{id:e.id},"deleted"===e.comment_status&&n.createElement(a.Mw,{className:"deletedComment",content:n.createElement(a.Fc,{description:A("Comment was removed."),type:"info"}),children:be(e.children)}),"deleted"!==e.comment_status&&n.createElement(n.Fragment,null,n.createElement(a.Mw,{author_id:e.author_id,author:e.author_name,avatar:e.author_avatar_urls&&e.author_avatar_urls[48]||"",className:E()(e.target_id&&"targetted-comment-item",(!e.author_avatar_urls||!e.author_avatar_urls[48])&&"comment-item-noavatar"),content:n.createElement(a.ms,{key:"commenMenu",placement:"left",destroyPopupOnHide:!0,onOpenChange:()=>V(e.id),menu:{items:e.author===oe.id?_e:we},overlayStyle:{minWidth:"auto"}},n.createElement("div",{onClick:()=>e.target_id&&ve(e.target_id),dangerouslySetInnerHTML:{__html:e.content}})),datetime:n.createElement(n.Fragment,null,n.createElement("span",{dangerouslySetInnerHTML:{__html:e.date&&(0,v.Yq)((0,v.Cl)(e.date),S,!0)}}),e.target_id&&n.createElement("span",{className:"comment-icon-target","target-id":e.target_id,onClick:()=>ve(e.target_id)},n.createElement(m.Ay,{icon:"AimOutlined",style:{color:L.colorInfo,top:-2,position:"relative"}}))),children:n.createElement(n.Fragment,null,"REPLY"===F&&W===e.id&&Ee,"EDIT"===F&&W===e.id&&ye,be(e.children))})))}),n.createElement(a.lV,{onFinish:ge,className:"ADD"===F?"addMode":"replyEditMode"},n.createElement(a.lV.Item,{style:{marginBottom:10}},n.createElement(a.fs,{value:P,onChange:e=>R(e.target.value),rows:4,placeholder:A("Leave your comment"),className:"textarea-comment",onPressEnter:e=>"Enter"===e.key&&e.ctrlKey&&ge()})),n.createElement(a.lV.Item,null,n.createElement(a.$x,{size:8},n.createElement(a.m_,{placement:"top",title:A("Add a note"),styles:{body:{maxWidth:"150px"}}},n.createElement(a.$n,{onClick:fe,type:M||Z&&"ADD"===F&&""!==K?"primary":"default",className:"button-target "+(M&&!Z?"button-target_choose":""),style:Z&&"ADD"===F&&""!==K?{background:L.colorInfo}:{},icon:n.createElement(m.Ay,{icon:"Target",size:16,strokeWidth:N.iconStrokeWidth,className:"icon-target"})})),n.createElement(a.$n,{className:"button-add",type:"primary",loading:"ADD"===F&&J.isLoading,htmlType:"submit"},A("Send")," ",n.createElement(m.Ay,{icon:"SendOutlined",size:16,strokeWidth:N.iconStrokeWidth}))))))}},87755:(e,t,i)=>{"use strict";i.d(t,{A:()=>E});var n=i(25366),a=i(85472),l=i(14365),r=i(76508),o=i(1246),s=i(79349),c=i(65751),d=i(22376),m=i(93119),u=i(90701),p=i(1382),h=i(75227),g=i(90388),f=i(93149),v=i(69064);const{Option:b}=l.Select,y="profile",E=({isModalVisible:e})=>{const{__:t}=(0,r.s9)(),i=(0,a.d4)(c.C1),E=(0,a.d4)(c.yf),_=(0,u.hN)(),w=(0,g.XW)(),C=(0,a.wA)(),[k]=l.lV.useForm(),A=(0,f.rD)(),[S,I]=(0,m.b9)(),[x,L]=(0,m.hZ)(),[N,T]=(0,n.useState)([]),[B,P]=(0,n.useState)([]),[R,F]=(0,n.useState)(y),[O,M]=(0,n.useState)({currentPassword:!1,newPassword:!1,confirmPassword:!1}),[j,D]=(0,n.useState)(()=>i.locale),V=(0,n.useRef)(null),W=t("If you turn the switch off, lines of code will not wrap. If you turn the switch on, lines of code will wrap at the viewport.");(0,n.useEffect)(()=>{if(k&&e){F(y),x(void 0,!0);const e=i.code_editor;D(i.locale),k.setFieldsValue({firstName:i.first_name,lastName:i.last_name,email:i.email,theme:i.theme,currentPassword:"",newPassword:"",confirmPassword:"",autosaves:Boolean(i.autosaves),hideMergetags:Boolean(i.hide_mergetags),language:i.locale,newsLetterConsent:Boolean(i.newsletter_consent),codeEditor:{fontSize:e.font_size||10,fontFamily:e.font_family,tabSize:e.tab_size||2,wordWrap:Boolean(e.word_wrap),minimap:Boolean(e.minimap),insertSpaces:Boolean(e.insert_spaces)}})}},[i,k,e,x,D]),(0,n.useEffect)(()=>{if(k&&e){if(L.isSuccess){var t,i,n,a;let e=null===(t=(0,p.EU)(E,["acf","theme"]))||void 0===t||null===(i=t.items)||void 0===i?void 0:i.enum;const l=null===(n=(0,p.EU)(E,["acf","code_editor","font_family"]))||void 0===n||null===(a=n.items)||void 0===a?void 0:a.enum;T((0,p.d_)(e)),P((0,p.d_)(l))}L.isError&&_.error(L)}},[L,k,e,E]);const z=()=>{const e=window.localStorage.getItem(v.V0.em_color_scheme),t=matchMedia(v.F3).matches?v.nd:v.T;w({operation:v.Ru.UPDATE_PREVIEW,theme:e||t}),k.validateFields().then(e=>{const t=e.codeEditor;e.currentPassword&&e.newPassword?S({password:e.newPassword,old_password:e.currentPassword}):S({first_name:e.firstName,last_name:e.lastName,email:e.email,locale:e.language,autosaves:e.autosaves,hide_mergetags:e.hideMergetags,theme:e.theme,newsletter_consent:e.newsLetterConsent,code_editor:t?{font_size:t.fontSize,font_family:t.fontFamily,tab_size:t.tabSize,word_wrap:t.wordWrap,minimap:t.minimap,insert_spaces:t.insertSpaces}:null})})};(0,n.useEffect)(()=>{I.isError&&_.error(I)},[I]),(0,n.useEffect)(()=>{I.isSuccess&&(_.success(t("Your profile was successfully updated.")),C((0,s.Oo)()))},[C,I,t]);const[H,U]=(0,n.useState)("");(0,n.useEffect)(()=>{const t=window.localStorage.getItem(v.V0.em_color_scheme);e&&(k.setFieldsValue({theme:null!==t?t:v.IJ}),U(null!==t?t:v.IJ))},[k,e]);const q=(0,n.useCallback)(e=>{let t;if((0,h.Hk)(e),e===v.IJ){const e=matchMedia(v.F3).matches?v.nd:v.T;localStorage.removeItem(v.V0.em_color_scheme),t=e}else localStorage.setItem(v.V0.em_color_scheme,e),t=e;C((0,d.eX)(t===v.nd?`vs-${t}`:v.T)),(0,h.A5)(t)},[C]),$=(0,n.useCallback)(()=>{H!==k.getFieldValue("theme")&&q(H),C((0,c.ww)(i.code_editor)),C((0,c.ko)(j)),C((0,s.Oo)())},[i.code_editor,C,k,H,q,j]),Z="true"===localStorage.getItem("elama_user");let G=[{label:n.createElement(n.Fragment,null,n.createElement(o.Ay,{icon:"ImageUserIcon",size:18,strokeWidth:A.iconStrokeWidth}),t("Profile")),key:y,className:"em-analytics__profile-user",children:n.createElement(n.Fragment,null,n.createElement(l.fI,{gutter:16},n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:t("First name"),name:"firstName"},n.createElement(l.pd,{placeholder:t("Enter your first name")}))),n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:t("Last name"),name:"lastName"},n.createElement(l.pd,{placeholder:t("Enter your last name")})))),n.createElement(l.fI,{gutter:16},n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:t("Email"),name:"email"},n.createElement(l.pd,{disabled:!0,placeholder:t("Enter your email")}))),n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:t("Theme"),name:"theme"},n.createElement(l.Select,{placeholder:t("Select a theme")},N.map(e=>{let i="";switch(e.value){case"light":i=t("Light");break;case"dark":i=t("Dark");break;default:i=t("System")}return n.createElement(b,{key:e.value,value:e.value},i)}))))),n.createElement(l.fI,{gutter:16},n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:t("Newsletter Subscription"),valuePropName:"checked",name:["newsLetterConsent"]},n.createElement(l.dO,null))),n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:t("Autosave in editor"),valuePropName:"checked",name:["autosaves"]},n.createElement(l.dO,null)))))},{label:n.createElement(n.Fragment,null,n.createElement(o.Ay,{icon:"CodeBrowserIcon",size:18,strokeWidth:A.iconStrokeWidth}),t("Code editor")),key:"editor",className:"account-settings-codeiditor-tab-content em-analytics__profile-code-editor",children:n.createElement(n.Fragment,null,n.createElement(l.fI,{gutter:16},n.createElement(l.fv,{span:8},n.createElement(l.lV.Item,{label:t("Font size"),name:["codeEditor","fontSize"]},n.createElement(l.FQ,{min:6,max:100}))),n.createElement(l.fv,{span:8},n.createElement(l.lV.Item,{label:t("Tab size"),name:["codeEditor","tabSize"]},n.createElement(l.FQ,{min:1,max:10}))),n.createElement(l.fv,{span:8},n.createElement(l.lV.Item,{label:t("Font family"),name:["codeEditor","fontFamily"]},n.createElement(l.Select,{placeholder:t("Select a font family")},B.map(e=>n.createElement(b,{key:e.value,value:e.value},e.label)))))),n.createElement(l.fI,{gutter:16},n.createElement(l.fv,{span:8},n.createElement(l.lV.Item,{label:t("Line wrap"),valuePropName:"checked",name:["codeEditor","wordWrap"],tooltip:{title:W,icon:n.createElement(o.Ay,{icon:"InfoCircleIcon",size:16})}},n.createElement(l.dO,null))),n.createElement(l.fv,{span:8},n.createElement(l.lV.Item,{label:t("Minimap"),valuePropName:"checked",name:["codeEditor","minimap"],tooltip:{title:t("Display the minimap."),icon:n.createElement(o.Ay,{icon:"InfoCircleIcon",size:16})}},n.createElement(l.dO,null))),n.createElement(l.fv,{span:8},n.createElement(l.lV.Item,{label:t("Insert spaces"),valuePropName:"checked",name:["codeEditor","insertSpaces"],tooltip:{title:t("Prefer spaces over tabs."),icon:n.createElement(o.Ay,{icon:"InfoCircleIcon",size:16})}},n.createElement(l.dO,null)))))}];return Z||G.push({label:n.createElement(n.Fragment,null,n.createElement(o.Ay,{icon:"ShieldTickIcon",size:18,strokeWidth:A.iconStrokeWidth}),t("Security")),key:"security",className:"account-settings-security-tab-content em-analytics__profile-code-editor",children:n.createElement(n.Fragment,null,n.createElement(l.fI,{gutter:16},n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:t("Current password"),name:"currentPassword"},n.createElement(l._2,{readOnly:!O.currentPassword,onFocus:()=>M(e=>({...e,currentPassword:!0})),ref:V,placeholder:t("Enter your current password")})))),n.createElement(l.fI,{gutter:16},n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:t("New password"),name:"newPassword",extra:t("At least 8 characters, including a combination of uppercase and lowercase letters, numbers, and special characters."),validateTrigger:["onSubmit"],rules:[{required:!1,message:t("Enter your new password")},({getFieldValue:e})=>({validator(i,n){if("security"===R){return e("currentPassword")?n.length>=8&&/[0-9]/.test(n)&&/[a-z]/.test(n)&&/[A-Z]/.test(n)&&/\W+|_/g.test(n)?Promise.resolve():Promise.reject(new Error(t("The password is too simple."))):Promise.reject(new Error("Enter your current password"))}return Promise.resolve()}})]},n.createElement(l._2,{readOnly:!O.newPassword,onFocus:()=>M(e=>({...e,newPassword:!0})),placeholder:t("Enter your new password")}))),n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:t("Confirmation"),name:"confirmPassword",validateTrigger:["onSubmit"],rules:[{required:"security"===R,message:t("Repeat the new password")},({getFieldValue:e})=>({validator:(i,n)=>n&&e("newPassword")!==n?Promise.reject(new Error(t("The two passwords that you entered do not match!"))):Promise.resolve()})]},n.createElement(l._2,{readOnly:!O.confirmPassword,onFocus:()=>M(e=>({...e,confirmPassword:!0})),placeholder:t("Repeat the new password")})))))}),n.createElement(l.aF,{width:572,className:"account-settings",title:n.createElement("div",null,n.createElement(o.Ay,{icon:"User03Icon",size:20,strokeWidth:2})," ",t("Account settings")),open:e,onOk:z,onCancel:$,footer:[n.createElement(l.$n,{key:"Update",size:"large",className:"em-analytics__profile-save",type:"primary",loading:I.isLoading,onClick:z},t("Update"))]},n.createElement(l.lV,{form:k,layout:"vertical",name:"edit_profile_form",onFinish:z,initialValues:{remember:!1,firstName:"",lastName:"",email:"",theme:"system",currentPassword:"",newPassword:"",confirmPassword:"",autosaves:!1,email_builder_config:"simple",hideMergetags:!0,newsLetterConsent:!1,code_editor:{fontSize:10,fontFamily:"Anonymous Pro",tabSize:2,wordWrap:!0,minimap:!1,insertSpaces:!1}},onValuesChange:e=>{e.theme&&q(e.theme);const t=e.codeEditor;e.language&&C((0,c.ko)(e.language)),e.codeEditor&&C((0,c.ww)({font_size:t.fontSize,font_family:t.fontFamily,tab_size:t.tabSize,word_wrap:t.wordWrap,minimap:t.minimap,insert_spaces:t.insertSpaces}))},autoComplete:"off"},n.createElement(l.tU,{activeKey:R,onChange:e=>F(e),items:G,className:"modal-tabs"})))}},30202:(e,t,i)=>{"use strict";i.d(t,{A:()=>y});var n=i(25366),a=i(85472),l=i(14365),r=i(1246),o=i(64172),s=i(2519),c=i(79349),d=i(76508),m=i(93149),u=i(71679),p=i(69064),h=i(90701);const g="mainsettings",f="ftpsettings",v="webhooksettings",b=({form:e,activeIntegration:t,setActiveIntegration:i,openFromAnotherPlace:a,inputRefWebHook:o,__:s})=>{const c=e.getFieldValue("webhook"),d=e.getFieldValue("integrations");return n.createElement(n.Fragment,null,null===t&&n.createElement(l.fI,{gutter:[8,8]},n.createElement(l.fv,{span:8},n.createElement(l.Zp,{hoverable:!0,onClick:()=>i("webhook"),style:{textAlign:"center",height:"100%",position:"relative"},bodyStyle:{padding:"12px 8px"}},c&&n.createElement(r.Ay,{icon:"CheckCircleOutlined",style:{color:"#52c41a",fontSize:"16px",position:"absolute",top:6,left:6}}),n.createElement(l.$x,{direction:"vertical",size:4},n.createElement(r.Ay,{icon:"WebHook",style:{fontSize:"32px",margin:0}}),n.createElement(l.EY,{strong:!0},s("Webhook"))))),(0,u.v0)().map(e=>n.createElement(l.fv,{span:8,key:e.id},n.createElement(u.XJ,{integration:e,isConfigured:(0,u.hS)(e.id,null===d||void 0===d?void 0:d[e.id]),onClick:()=>i(e.id),__:s})))),"webhook"===t&&n.createElement(n.Fragment,null,n.createElement(l.$n,{type:"link",icon:n.createElement(r.Ay,{icon:"ArrowLeftOutlined"}),onClick:()=>i(null),style:{padding:0,marginBottom:16}},s("Back to integrations")),n.createElement(l.fI,{gutter:24},n.createElement(l.fv,{span:24},n.createElement(l.lV.Item,{label:s("Webhook URL"),name:"webhook",extra:s("Before exporting the project, make sure to provide the URL where the webhook request will be sent"),rules:[{type:"url",message:s("Please enter the correct URL.")},a&&"webhook"===t&&{required:!0,message:s("Please type the webhook URL.")}]},n.createElement(l.pd,{ref:o,placeholder:s("Type in the project's webhook"),style:{marginBottom:5}}))))),t&&"webhook"!==t&&(()=>{const a=(0,u.v0)().find(e=>e.id===t);return a?n.createElement(n.Fragment,null,n.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16}},n.createElement(l.$n,{type:"link",icon:n.createElement(r.Ay,{icon:"ArrowLeftOutlined"}),onClick:()=>i(null),style:{padding:0}},s("Back to integrations")),n.createElement("div",{style:{display:"flex",alignItems:"center",gap:8}},n.createElement("img",{src:a.icon,alt:"",style:{width:20,height:20}}),n.createElement("span",{style:{fontWeight:500}},a.name))),n.createElement(u.I9,{integration:a,form:e,__:s})):null})())},y=({isModalVisible:e,selectedProject:t=null})=>{var i;const{__:y}=(0,d.s9)(),E=(0,a.wA)(),[_]=l.lV.useForm(),w=(0,n.useRef)(null),C=(0,n.useRef)(null),k=(0,n.useRef)(null),A=(0,a.d4)(s.yN),S=(0,a.d4)(c.gU),I=(0,h.hN)(),{modal:x}=l.qw.useApp(),L=(0,a.d4)(c.cL),[N,T]=(0,n.useState)(g),[B,P]=(0,n.useState)(!1),[R,F]=(0,n.useState)(null),O=t||A,M=[f,g,v].includes(S),[j,D]=(0,o.OD)(),V=(0,m.rD)();(0,n.useEffect)(()=>{if(L===p.lx.EDIT_PROJECT_MODAL){const e={mainsettings:w,ftpsettings:C,webhooksettings:k};setTimeout(()=>{var t;return null===(t=e[N].current)||void 0===t?void 0:t.focus({cursor:"end"})},200)}},[L,N]),(0,n.useEffect)(()=>{M&&T(S)},[S,M,T,E]);const W=(0,a.d4)(c.Tu);(0,n.useEffect)(()=>{L===p.lx.EDIT_PROJECT_MODAL&&W&&(T(v),F(W),E(F(null)))},[L,W,E]);let z=[{label:n.createElement(n.Fragment,null,n.createElement(r.Ay,{icon:"Settings04Icon",size:18,strokeWidth:V.iconStrokeWidth}),y("Main settings")),key:g,className:"em-analytics__mainsettings-project",children:n.createElement(n.Fragment,null,n.createElement(l.fI,{gutter:24},n.createElement(l.fv,{span:24},n.createElement(l.lV.Item,{label:y("Project name"),name:"name",extra:y("This can be\xa0the name of\xa0your company, department, website, project, marketing campaign, or\xa0other activity."),rules:[{required:!0,message:y("Please type the project name.")}]},n.createElement(l.pd,{ref:w,placeholder:y("Type the project name"),style:{marginBottom:5}})))))},{label:n.createElement(n.Fragment,null,n.createElement(r.Ay,{icon:"Server05Icon",size:18,strokeWidth:V.iconStrokeWidth}),y("FTP settings")),key:f,className:"em-analytics__ftpsettings-project",children:n.createElement(n.Fragment,null,n.createElement(l.fI,{gutter:24},n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:y("Host"),name:["ftpSettings","host"]},n.createElement(l.pd,{ref:C,placeholder:y("Type the FTP host"),disabled:B}))),n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:y("Port"),name:["ftpSettings","port"]},n.createElement(l.pd,{placeholder:y("Type the FTP port"),disabled:B})))),n.createElement(l.fI,{gutter:24},n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:y("Directory"),name:["ftpSettings","directory"]},n.createElement(l.pd,{placeholder:y("Type the file directory"),disabled:B}))),n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:y("URL catalog"),name:["ftpSettings","domain"]},n.createElement(l.pd,{placeholder:y("Type the URL catalog"),disabled:B})))),n.createElement(l.fI,{gutter:24},n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:y("Login"),name:["ftpSettings","login"]},n.createElement(l.pd,{placeholder:y("Type the FTP login"),disabled:B}))),n.createElement(l.fv,{span:12},n.createElement(l.lV.Item,{label:y("Password"),name:["ftpSettings","password"]},n.createElement(l._2,{placeholder:y("Type the FTP password"),disabled:B,iconRender:e=>e?n.createElement(r.Ay,{icon:"EyeOutlined"}):n.createElement(r.Ay,{icon:"EyeInvisibleOutlined"})})))),n.createElement(l.fI,{gutter:24},n.createElement(l.fv,{span:24},n.createElement(l.lV.Item,{noStyle:!0},n.createElement(l.Sc,{checked:B,onCheckedChange:P},y("Use default CDN"))))))},{label:n.createElement(n.Fragment,null,n.createElement(r.Ay,{icon:"WebHook",style:{fontSize:"16px",margin:0}}),y("Integrations")),key:v,className:"em-analytics__mainsettings-project",children:n.createElement(b,{form:_,activeIntegration:R,setActiveIntegration:F,openFromAnotherPlace:M,inputRefWebHook:k,__:y})}];(0,n.useEffect)(()=>{if(e&&O){const e=O.ftp_settings,t=O.integrations||{},i={};(0,u.v0)().forEach(e=>{const n=t[e.id]||{};i[e.id]={},e.settingsFields.forEach(t=>{i[e.id][t.name]=n[t.name]||""})}),P(null===e||void 0===e?void 0:e.use_default_cdn),_.setFieldsValue({name:O.title,webhook:O.webhook||"",ftpSettings:{host:(null===e||void 0===e?void 0:e.host)||"",port:(null===e||void 0===e?void 0:e.port)||"",directory:(null===e||void 0===e?void 0:e.directory)||"",domain:(null===e||void 0===e?void 0:e.domain)||"",login:(null===e||void 0===e?void 0:e.login)||"",password:(null===e||void 0===e?void 0:e.password)||""},integrations:i})}},[_,O,e]);const H=()=>{_.validateFields().then(e=>{const t=e.ftpSettings,i=e.integrations||{},n={...(null===O||void 0===O?void 0:O.integrations)||{}};Object.entries(i).forEach(([e,t])=>{t&&(0,u.hS)(e,t)?n[e]=t:n[e]&&!(0,u.hS)(e,t)&&delete n[e]}),O&&j({projectId:O.id,title:e.name,webhook:e.webhook?e.webhook:"",ftp_settings:t?{host:t.host,port:t.port,directory:t.directory,domain:t.domain,login:t.login,password:t.password,use_default_cdn:B}:null,integrations:Object.keys(n).length>0?n:void 0}).then(({data:e,error:t})=>{e?e.title!==O.title?I.success({message:y("The project \u201c")+O.title+y("\u201d was successfully changed to \u201c")+e.title+y("\u201d.")}):I.success({message:y("The project settings was successfully saved.")}):t&&I.error({error:t}),E((0,c.YF)("")),E((0,c.Oo)()),F(null)})})};return n.createElement(l.aF,{title:n.createElement("div",null,n.createElement(r.Ay,{icon:"SettingOutlined",size:20,strokeWidth:2})," ",y("Project settings")),open:e,onOk:H,onCancel:()=>{E((0,c.YF)("")),E((0,c.Oo)()),F(null)},footer:N===v&&null===R?null:[R&&"webhook"!==R&&(0,u.hS)(R,null===O||void 0===O||null===(i=O.integrations)||void 0===i?void 0:i[R])&&n.createElement(l.$n,{key:"disable",size:"large",danger:!0,onClick:()=>{const e=(0,u.v0)().find(e=>e.id===R);e&&O&&x.confirm({title:y("Disable integration"),content:y("Are you sure you want to disable this integration?"),okText:y("Disable"),cancelText:y("Cancel"),okButtonProps:{danger:!0},onOk:()=>{const t=_.getFieldValue("integrations")||{};_.setFieldsValue({integrations:{...t,[e.id]:e.settingsFields.reduce((e,t)=>({...e,[t.name]:""}),{})}});const i=_.getFieldsValue(),n=i.ftpSettings,a=i.integrations||{},l={...O.integrations||{}};Object.entries(a).forEach(([e,t])=>{t&&(0,u.hS)(e,t)?l[e]=t:l[e]&&!(0,u.hS)(e,t)&&delete l[e]}),j({projectId:O.id,title:i.name,webhook:i.webhook?i.webhook:"",ftp_settings:n?{host:n.host,port:n.port,directory:n.directory,domain:n.domain,login:n.login,password:n.password,use_default_cdn:B}:null,integrations:Object.keys(l).length>0?l:void 0}).then(({data:e,error:t})=>{e?I.success({message:y("The project settings was successfully saved.")}):t&&I.error({error:t}),E((0,c.YF)("")),E((0,c.Oo)()),F(null)})}})},style:{marginRight:8}},y("Disable integration")),n.createElement(l.$n,{key:"submit",size:"large",className:"em-analytics__project-save",type:"primary",loading:D.isLoading,onClick:H},y("Update"))].filter(Boolean)},n.createElement(l.lV,{form:_,layout:"vertical",name:`edit_project_form_${null===O||void 0===O?void 0:O.id}`,onFinish:H,initialValues:{remember:!1,name:""},autoComplete:"off"},n.createElement(l.tU,{activeKey:N,onChange:e=>{T(e),F(null)},items:z,className:"modal-tabs"})))}},63168:(e,t,i)=>{"use strict";i.d(t,{A:()=>A});var n=i(25366),a=i(33637),l=i(37666),r=i(14365),o=i(65865),s=i(85472),c=i(74572),d=i.n(c),m=i(25933),u=i.n(m),p=i(44239),h=i(60538),g=i(65751),f=i(22376),v=i(87752),b=i(65329),y=i(1382),E=i(76508),_=i(93149),w=i(69064),C=i(1246),k=i(25857);const A=({element:e,setSearchFilters:t=()=>{},isTrash:i=!1,foldersList:c,projectTags:m=[],foldersHandlers:A={},selected:S=!1})=>{var I,x,L,N,T,B,P,R,F,O,M,j,D,V,W,z;const{__:H}=(0,E.s9)();let U=(0,a.zy)();const{projectId:q}=(0,a.g)(),{owner:$,admin:Z}=(0,b.A)(),G=(0,s.d4)(g.C1),K=(0,s.d4)(f.Yd),X=(0,n.useRef)(null),{token:Y}=(0,r.rd)(),{handleRecover:J,handleClone:Q,handlerChangeFolder:ee,handleRemove:te}=A,ie=(0,_.rD)(),ne=e.hasOwnProperty("type")?w.IE:w.Tm,ae=ne===w.Tm?w.zh:w.YY,le=ne===w.Tm?H("New emails"):H("New blocks"),re=(e,t)=>`${e.pathname}/${t.id}`,[oe]=(0,p.pP)(),[se]=(0,h.Kh)(),ce=(e,t=q,i)=>{var n;let a=window.location.host.indexOf("localhost")>=0?"app.emailmaker.ru":`${window.location.host}`;const l=K[e],r=null!==(n=null!==l&&void 0!==l?l:i)&&void 0!==n?n:e,o=`&cacheControl=true&cache-hash=${u()(String(r))}`;return`https://scr.emcdn.ru/screenshot?${"block"===ne?"":"minHeight=620&"}delay=1000&width=800&fullPage=true&deviceScaleFactor=0.755&format=jpg&force=false${o}&url=${encodeURIComponent(`https://${a}/get${ne}/${e}?secret_hash=${u()(`${t}${e}${w.KI}`)}&raw=true`)}`},de=(null===(I=e[ne===w.IE?"blockfolder":"folder"])||void 0===I?void 0:I[0])||null,me={icon:n.createElement(C.Ay,{icon:"Email",size:18,strokeWidth:ie.iconStrokeWidth}),label:le,key:w.y2,onClick:t=>ee(t,e)},ue=null===c||void 0===c?void 0:c.map(t=>({icon:n.createElement(C.Ay,{icon:"FolderIcon",size:16,strokeWidth:ie.iconStrokeWidth}),label:t.name,key:t.id,className:t.id,onClick:t=>ee(t,e)})),pe=(null===ue||void 0===ue?void 0:ue.filter(e=>!de||e.key!==de))||[];de&&(null===pe||void 0===pe||pe.unshift(me));let he=[];return($||Z||(null===(x=G.id)||void 0===x?void 0:x.toString())===(null===(L=e.author)||void 0===L?void 0:L.toString()))&&!i&&he.push({label:n.createElement(v.A,{key:"Lock",element:e}),icon:e.lock?n.createElement(C.Ay,{icon:"UnLock",size:16,strokeWidth:ie.iconStrokeWidth}):n.createElement(C.Ay,{icon:"Lock",size:16,strokeWidth:ie.iconStrokeWidth})}),($||Z||(null===(N=G.id)||void 0===N?void 0:N.toString())===(null===(T=e.author)||void 0===T?void 0:T.toString()))&&!i&&pe.length>0&&he.push({label:H("Transfer to folder"),icon:n.createElement(C.Ay,{icon:"FolderIcon",size:16,strokeWidth:ie.iconStrokeWidth}),children:pe,popupClassName:"element-card__folder-submenu"}),!i&&he.push({label:H("Clone"),icon:n.createElement(C.Ay,{icon:"CopyOutlined",size:16,strokeWidth:ie.iconStrokeWidth}),key:"Clone",className:ne===w.IE?"em-analytics__block-clone":"em-analytics__email-clone",disabled:ne===w.IE?oe.isLoading:se.isLoading,onClick:()=>Q(e)}),($||Z||(null===(B=G.id)||void 0===B?void 0:B.toString())===(null===(P=e.author)||void 0===P?void 0:P.toString()))&&i&&he.push({label:H("Recover"),icon:n.createElement(C.Ay,{icon:"FlipBackwardIcon",size:16,strokeWidth:ie.iconStrokeWidth}),key:"Recover",onClick:()=>J(e)}),($||Z||(null===(R=G.id)||void 0===R?void 0:R.toString())===(null===(F=e.author)||void 0===F?void 0:F.toString()))&&he.push({label:H("Remove"),icon:n.createElement(C.Ay,{icon:"DeleteOutlined",size:16,strokeWidth:ie.iconStrokeWidth}),key:"Remove",style:{color:"#ff4d4f"},className:ne===w.IE?"em-analytics__block-remove":"em-analytics__email-remove",onClick:()=>te(e)}),n.createElement(r.Zp,{className:`element-card element-card_${ne}`,hoverable:!0,"data-testid":e.id,style:S?{border:`1px solid ${Y.colorPrimary}`,borderRadius:16}:void 0,cover:n.createElement(n.Fragment,null,n.createElement(r.EA,{loading:!0,active:!0,avatar:!0,style:{position:"absolute",width:"83%",margin:"50px 10% 0 7%"}}),n.createElement(l.N_,{ref:X,className:"element-card__img-wrapper",to:i?"":re(U,e),onMouseMove:e=>(0,y.Hy)(e,X.current),style:{cursor:i?"default":"pointer"},onMouseLeave:y.Tr},ce(e.id,e.project,e.modified)&&n.createElement("img",{className:"element-card__img",alt:e.title,src:ce(e.id,e.project,e.modified)})),((0,k.r)(e)||e.is_template||(null===(O=e.acf)||void 0===O?void 0:O.is_template))&&n.createElement("div",{className:"element-card__corner-badges"},(0,k.r)(e)&&n.createElement(k.a,{className:"block-global-badge--tile",size:14}),(e.is_template||(null===(M=e.acf)||void 0===M?void 0:M.is_template))&&n.createElement("div",{className:"element-card__is-template-wrapper"},H("Template"))),(null===(j=e[ae])||void 0===j?void 0:j.length)&&n.createElement("div",{className:"element-card__tags-wrapper"},n.createElement(r.$x,{wrap:!0,size:8},e[ae].map(e=>{const i=null===m||void 0===m?void 0:m.find(t=>{var i;return(null===(i=t.id)||void 0===i?void 0:i.toString())===(null===e||void 0===e?void 0:e.toString())});return i&&n.createElement(r.vw,{color:Y.colorPrimary,style:{borderRadius:6},key:i.id,onClick:()=>t(null,i.id)},i.name)}))))},n.createElement("div",{className:"ant-card-body__left"},n.createElement("div",{className:"element-card__title-row"},n.createElement(l.N_,{to:i?"":re(U,e),style:{cursor:i?"default":"pointer"}},n.createElement("span",{className:"element-card__title"},e.lock&&n.createElement(C.Ay,{icon:"Lock",size:16,strokeWidth:ie.iconStrokeWidth,className:d()("lock-icon",{"lock-icon__disabled":!($||Z||(null===(D=G.id)||void 0===D?void 0:D.toString())===(null===(V=e.author)||void 0===V?void 0:V.toString()))})}),(null===(W=e.title)||void 0===W?void 0:W.trim())||(null===(z=e.subject)||void 0===z?void 0:z.trim()))),n.createElement(r.ms,{menu:{items:he},arrow:"true",placement:"bottom",trigger:["hover"]},n.createElement(r.$n,{type:"default",className:"element-card_menu",onClick:()=>{}},n.createElement(C.Ay,{icon:"DotsVerticalIcon",size:16,strokeWidth:ie.iconStrokeWidth,key:"menu-button"})))),n.createElement("p",{className:"element-card__date"},H("Last update: ")," ",(0,y.Yq)((0,o.A)(e.modified),H))))}},1246:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>o});var n=i(25366),a=i(14365),l=i(93149),r=i(58981);const o=({icon:e,...t})=>{const i=(0,l.rD)(),o=(0,n.useMemo)(()=>{if(null===i||void 0===i||!i.icons)return;const e={};for(const[t,n]of Object.entries(i.icons))"string"===typeof n&&(e[t]=(0,r.p)(n));return Object.keys(e).length>0?e:void 0},[null===i||void 0===i?void 0:i.icons]);return n.createElement(a.HQ,Object.assign({icon:e,configIcons:o},t))}},93603:(e,t,i)=>{"use strict";i.d(t,{A:()=>B});var n=i(25366),a=i(16069),l=i(74572),r=i.n(l);const o=JSON.parse('{"yG":"iframe.b290b70aabae82ab0df2.html","l5":"iframe-eblock.b290b70aabae82ab0df2.html"}');var s=i(54913),c=i(85472),d=i(91724),m=i(93149),u=i(60538),p=i(69064),h=i(42018),g=i(36786),f=i(87868),v=i(90701),b=i(65751),y=i(76508),E=i(23734),_=i(90388),w=i(38984),C=i(63702),k=i(9774);function A(e,t){const{__:i}=(0,y.s9)(),a=(0,_.QC)(),l=(0,s.aD)(e),{error:r}=(0,v.hN)(),o=(0,n.useRef)(0),m=(0,n.useRef)(void 0),u=(0,n.useRef)(!1),h=(0,c.d4)(b.C1),g=(0,n.useCallback)(e=>new Promise((t,i)=>{const n=a.addListener(p.Ru.SANDBOX_READY,()=>{n.dispose(),t()});e&&setTimeout(()=>{n.dispose(),i("timeout")})}),[a]),A=(0,n.useCallback)(n=>{g(2e3).catch(e=>{}).finally(()=>{Promise.resolve().then(()=>{if(!u.current){if(++o.current){if(m.current){if(o.current<5){l.restoreSnapshot(m.current);for(let e=0;e<o.current;e++)l.undo()}}else m.current=l.createSnapshot();a.send(p.Ru.RELOAD)}setTimeout(()=>{if(0===--o.current){m.current=null;const a=new Error(n.message);n.stack&&(a.stack=n.stack);const o=k.Cp(a,{tags:{origin:"iframe"}}),s={past:l.getPast().slice(0,10),future:l.getFuture(),errorResolved:!u.current,text:e.getValue(),message:n.message,stack:n.stack,userId:null===h||void 0===h?void 0:h.id,entityId:null===t||void 0===t?void 0:t.id,entityType:document.location.pathname.indexOf("emails")>0?"email":"block",sentryEventId:o};r({id:"IFRAME_ERROR",data:s,message:i("Something went wrong")}),E.CJ.post("iframe_errors",s).catch(e=>{}),u.current=!1}},2e3)}})})},[l,e,r,null===h||void 0===h?void 0:h.id,null===t||void 0===t?void 0:t.id,i,g,a]);(0,d.A)(p.Ru.APPLICATION_DOMPARSER_ERROR,A),(0,n.useEffect)(()=>{let i=null,n=0;function l(e){const t=[];for(const{rangeOffset:i,rangeLength:n,text:a}of e.changes)t.push({range:{start:i,end:i+n},text:a});return t}let r=!1;const o=new w.j;return o.addDisposable((0,C.Og)(e,e=>(async e=>{if(r)await a.sendAsync(p.Ru.SANDBOX_UPDATE_ENTITY,{edits:[l(e)],guid:t.renderGuid});else if(i)i.push(e);else{i=[e];do{const e=i.splice(0,i.length);await a.sendAsync(p.Ru.SANDBOX_UPDATE_ENTITY,{edits:e.map(l),guid:t.renderGuid})}while(i.length);i=null}})(e).catch(e=>{}))),o.addDisposable(a.addListener(p.Ru.APPLICATION_UPDATE_ENTITY,function({guid:i,edits:a,pushUndoStop:l}){if(e&&i===t.renderGuid)try{r=!0;const t=(0,f.yc)(),i=t.canUndo(e.uri),o=t.canRedo(e.uri),s=a.map(({text:t,range:i})=>{const n=e.getPositionAt(i.start),a=e.getPositionAt(i.end);return{text:t,range:{startColumn:n.column,startLineNumber:n.lineNumber,endColumn:a.column,endLineNumber:a.lineNumber}}});l||i||o?e.pushEditOperations([],s,()=>null):e.applyEdits(s),!1!==l&&(n&&clearTimeout(n),n=setTimeout(()=>{e.pushStackElement(),n=0},1e3))}finally{r=!1}})),()=>{o.dispose(),n&&clearTimeout(n)}},[e,a,t.renderGuid])}const S=Symbol("isIframeEvent");function I({children:e}){const[t,i]=(0,n.useState)(),[a,l]=(0,n.useState)(),[r,o]=(0,n.useState)(!1),s=(0,_.QC)();return(0,n.useEffect)(()=>{if(t){const e=s.addListener(p.Ru.APPLICATION_IFRAME_DRAG_EVENT,e=>{if("drageleave"!==e.type&&"dragenter"!==e.type){const i=t.getBoundingClientRect(),n=e.clientX+i.x+window.scrollX,a=e.clientY+i.y+window.scrollY,l=document.elementFromPoint(n,a);if(l){const t=new DataTransfer,i=new DragEvent(e.type,{clientX:n,clientY:a,cancelable:!0,bubbles:!0,dataTransfer:t});i[S]=!0,l.dispatchEvent(i)}}});return()=>e.dispose()}},[s,t]),(0,n.useEffect)(()=>{const e=e=>{e[S]||o(!0)},t=e=>{e[S]||o(!1)};return window.addEventListener("dragstart",e),window.addEventListener("dragend",t),()=>{window.removeEventListener("dragstart",e),window.removeEventListener("dragend",t)}},[a]),(0,n.useEffect)(()=>{const e=e=>{if(!e[S]){var t;const i=a.getBoundingClientRect();s.send(p.Ru.SANDBOX_DRAG_EVENT,{value:(null===(t=e.dataTransfer)||void 0===t?void 0:t.getData("Text"))||"",type:e.type,clientX:e.pageX-i.x-window.scrollX,clientY:e.pageY-i.y-window.scrollY})}};if(a)return a.addEventListener("dragenter",e),a.addEventListener("dragover",e),a.addEventListener("dragleave",e),a.addEventListener("drop",e),a.addEventListener("dragend",e),()=>{a.removeEventListener("dragenter",e),a.removeEventListener("dragover",e),a.removeEventListener("dragleave",e),a.removeEventListener("drop",e),a.removeEventListener("dragend",e)}},[a,s]),n.createElement("div",{ref:i},r&&n.createElement("div",{ref:l,className:"iframe-provider"}),e)}var x=i(14365),L=i(49330);var N=i(67815),T=i(33087);const B=(0,n.forwardRef)(({className:e=null,email:t=null,handlerSendPosition:l=()=>{}},f)=>{const v=(0,c.wA)(),E=(0,c.d4)(h.mA),w=(0,s.fn)(),C=(0,m.rD)(),k=(0,_.ur)(),S=(0,_.XW)(),B=(0,_.QC)(),P=(0,N._q)(T.AZ.ON_EMAIL_INIT_ID),[R,F]=(0,n.useState)(),O=(0,n.useCallback)(e=>{const i=window.localStorage.getItem(p.V0.em_color_scheme),n=matchMedia(p.F3).matches?p.nd:p.T,a=window.localStorage.getItem(p.V0.em_code_mode_settings)?JSON.parse(window.localStorage.getItem(p.V0.em_code_mode_settings)):null,r={operation:p.Ru.UPDATE_PREVIEW,versionId:(null===w||void 0===w?void 0:w.getVersionId())||0,theme:i&&"system"!==i?i:n,commonStyles:(0,g.w)(null===t||void 0===t?void 0:t.common_styles,E),pathEnabled:C.pathEnabled,copyPasteEnabled:C.copyPasteEnabled,saveBlockEnabled:C.saveBlockEnabled,editImageControlEnabled:C.editImageControlEnabled,codeMode:!!a&&!(!a.isCodeMode||"left"!==a.codeModeDirection&&"right"!==a.codeModeDirection),elementAIimageEnabled:C.elementAIimageEnabled,imageCenterStockEnabled:C.imageCenterStockEnabled,imageCenterGifEnabled:C.imageCenterGifEnabled,imageCenterEditorEnabled:C.imageCenterEditorEnabled,blocksAddPanelEnabled:!1!==C.blocksAddPanelEnabled&&!1!==C.blocksSectionsShow,lockEditor:C.lockEditor,appName:"emailmaker"};F(e.target),k(e.target),f.current.resize(),S(r),l()},[C,l,S,w,null===t||void 0===t?void 0:t.common_styles,E,f,F,k]);(0,n.useEffect)(()=>{B.isInited()&&S({operation:p.Ru.UPDATE_PREVIEW,lockEditor:C.lockEditor})},[B,C.lockEditor]),(0,n.useEffect)(()=>{B.isInited()&&S({operation:p.Ru.UPDATE_PREVIEW,commonStyles:(0,g.w)(null===t||void 0===t?void 0:t.common_styles,E)})},[B,null===t||void 0===t?void 0:t.common_styles,E,S]);const M=(0,n.useCallback)(e=>{var t;e.data.operation===p.Ru.SANDBOX_RESIZED&&(null===(t=f.current)||void 0===t||t.resize())},[f]);(0,n.useEffect)(()=>{const e=P(()=>{f.current.resize()});return()=>e.dispose()},[f,P]),(0,n.useEffect)(()=>()=>{k()},[k]);const j=(0,n.useCallback)(()=>new Promise(e=>{B.setTarget(void 0);const t=()=>{O({target:R}),e(),null===R||void 0===R||R.removeEventListener("load",t)};null===R||void 0===R||R.addEventListener("load",t)}),[B,O,R]);(0,n.useEffect)(()=>{const e=B.addListenerAsync(p.Ru.RELOAD,j,Number.MAX_SAFE_INTEGER);return()=>e.dispose()},[B,j]),(0,d.A)(M),(0,d.A)(()=>{var e;null===(e=f.current)||void 0===e||e.resize()},p.Ru.SANDBOX_INITED),function(){const e=(0,_.QC)(),t=(0,c.d4)(b.C1),{__:i}=(0,y.s9)(),[a,l]=(0,n.useState)("");(0,n.useEffect)(()=>{if(t.locale!==a){const n=(0,p.QV)(i),a=e.onInit(()=>{e.send(p.Ru.SANDBOX_TRANSLATIONS,{name:t.locale,data:n}),l(t.locale)});return()=>a.dispose()}},[t.locale,a,l,i,e]),(0,n.useEffect)(()=>{const t=e.addListener(p.Ru.RELOAD,()=>{l("")});return()=>t.dispose()},[l,e])}(),function(){const e=(0,_.QC)(),{token:t}=(0,x.rd)(),[i,a]=(0,n.useState)();(0,n.useEffect)(()=>{if(!(0,L.b)(i,t)){const i=e.onInit(()=>{e.send(p.Ru.SANDBOX_SET_THEME_VARIABLES,t),a(t)});return()=>i.dispose()}},[t,i,a,e]),(0,n.useEffect)(()=>{const t=e.addListener(p.Ru.RELOAD,()=>{a(void 0)});return()=>t.dispose()},[a,e])}(),(0,n.useEffect)(()=>{matchMedia(p.F3).addEventListener("change",e=>{const t=window.localStorage.getItem(p.V0.em_color_scheme),i=e.matches?p.nd:p.T;S({operation:p.Ru.UPDATE_PREVIEW,theme:t||i})})},[S]),A(w,t),(0,n.useEffect)(()=>{const e=w.onDidChangeContent(()=>{f.current.resize()});return()=>e.dispose()},[w,f]);const D=(0,n.useCallback)(e=>{e.data.operation===p.Ru.APPLICATION_COMMON_STYLES_UPDATE&&v(u.GY.util.updateQueryData("getEmail",t.id,t=>Object.assign(t,{common_styles:JSON.stringify(e.data.settings.commonStyles)})))},[v,t.id]);return(0,d.A)(D),n.createElement(I,null,n.createElement(a.A,{forwardRef:f,checkOrigin:!1,sandbox:"allow-top-navigation allow-scripts allow-popups allow-popups-to-escape-sandbox",className:r()("email-preview",{[e]:e}),width:"100%",minHeight:600,scrolling:"no",id:"email_iframe",allow:"clipboard-read; clipboard-write",src:(p.EW.isPlugin?`${i.p}iframe/`:"/iframe/")+(t.hasOwnProperty("type")?o.l5:o.yG),title:"Email content",onLoad:O}))})},57165:(e,t,i)=>{"use strict";i.d(t,{A:()=>oe});var n=i(25366),a=i(14365),l=i(33637),r=i(85472),o=i(74572),s=i.n(o),c=i(76508),d=i(93149),m=i(95593),u=i(24149),p=i(50659),h=i(67227),g=i(43930),f=i(90701),v=i(4588),b=i(55722),y=i(87752),E=i(1246),_=i(16945);const w=({open:e,codeSize:t,onMinimize:i,onDownloadAsIs:l,onCancel:r})=>{const{__:o}=(0,c.s9)(),s=(0,_.WJ)(t);return n.createElement(a.aF,{open:e,onCancel:r,footer:null,className:"code-size-warning-modal",width:480},n.createElement("div",{className:"code-size-warning-modal__content"},n.createElement("h3",{className:"code-size-warning-modal__title"},o("Code Size Warning")),n.createElement("div",{className:"code-size-warning-modal__message"},n.createElement("p",null,o("The current code size is")," ",n.createElement("strong",null,s),","," ",o("which exceeds the recommended 90 KB limit.")),n.createElement("p",null,o("Large emails may have delivery issues and load slowly. We recommend minimizing code before exporting."))),n.createElement(a.$x,{className:"code-size-warning-modal__actions",size:"middle"},n.createElement(a.$n,{type:"primary",onClick:i,size:"large"},o("Minimize code")),n.createElement(a.$n,{onClick:l,size:"large"},o("Download as is")))))};var C=i(28401),k=i(44363),A=i(71679),S=i(65751),I=i(2519),x=i(79349),L=i(54501),N=i(22376),T=i(60538),B=i(69924),P=i(70158),R=i(49762),F=i(71945),O=i(22339),M=i(89394),j=i(99208),D=i(65329),V=i(1382),W=i(92221),z=i(41371),H=i(78081),U=i(67815),q=i(58525),$=i(99614),Z=i(54913),G=i(69064),K=i(33087),X=i(25933),Y=i.n(X),J=i(39711),Q=i(39689);const ee=({email:e,autoSaveEmailResult:t,autoSaveBlockResult:i})=>{var o,s,m,X,ee,te,ie,ne,ae,le,re;const{__:oe,_x:se}=(0,c.s9)(),ce=(0,r.wA)(),[de]=(0,O.mI)(),[me]=(0,M.dS)(),ue=(0,l.Zp)(),{owner:pe,admin:he}=(0,D.A)(),ge=(0,r.d4)(S.C1),fe=(0,r.d4)(I.yN),{modal:ve}=a.qw.useApp(),be=(0,f.hN)(),{confirm:ye}=ve,Ee=(0,r.Pj)(),_e=(0,q.p)(),we=(0,d.rD)(),{projectId:Ce}=(0,l.g)(),ke=(0,U.ml)(K.AZ.ON_EMAIL_CLONE_ID),[Ae]=(0,R.N)(),{exportToIntegration:Se,isLoading:Ie}=(0,j._)(),xe=(0,$.u)(),[Le,Ne]=(0,n.useState)(!0),[Te,Be]=(0,n.useState)(!1),[Pe,Re]=(0,n.useState)(null),[Fe,Oe]=(0,n.useState)(""),[Me,je]=(0,n.useState)(!1),[De,Ve]=(0,n.useState)(0),[We,ze]=(0,n.useState)(null),[He,Ue]=(0,n.useState)(""),qe=!(0,r.d4)(S.B$)&&(null===(o=ge.id)||void 0===o?void 0:o.toString())===(null===fe||void 0===fe||null===(s=fe.members)||void 0===s?void 0:s.owner.ID),$e="community"===(null===ge||void 0===ge||null===(m=ge.subscription)||void 0===m?void 0:m.post_name),[Ze]=T.GY.useDeleteEmailMutation(),[Ge,Ke]=(0,T.Kh)(),[Xe]=(0,B.ri)(),[Ye]=(0,B.cA)(),[Je]=(0,F.m)(),{data:Qe}=(0,l.KC)(),{data:et,refetch:tt}=(0,P.Jz)({parent:null===Qe||void 0===Qe||null===(X=Qe.folder)||void 0===X?void 0:X[0]},{skip:!(null!==Qe&&void 0!==Qe&&null!==(ee=Qe.folder)&&void 0!==ee&&ee[0])}),it=(0,r.d4)(L.Wv);(0,n.useEffect)(()=>{it.switched&&Ne(!1)},[it]);const nt=()=>null===e.title?oe("New email title"):e.title,at=(e,t,i=!1)=>{const n=(0,_.X_)(e);i&&(0,_.Gw)(n)?(Oe(e),Re(()=>t),Be(!0)):t(e)},lt=(0,Z.fn)(),rt=(0,U._q)(K.AZ.ON_EMAIL_INIT_ID);(0,n.useEffect)(()=>{const e=rt(()=>{Ne(!1)});return()=>e.dispose()},[rt]);const ot=async(t,i=(null===lt||void 0===lt?void 0:lt.getValue())||"")=>{const n=document.querySelector(".email-preview"),a=getComputedStyle(n);return i=await(0,W.PJ)(i,[a.width],e.utm_parameters,async e=>{dt(e)}),Xe({file:i,title:nt(),notification:be}).unwrap().then(e=>{const i={id:e._id,...e};return t(i,()=>Ye({id:i.id,notification:be}))}).catch(e=>{var t,i;be.error({message:null===(t=e.data)||void 0===t?void 0:t.code,description:null===(i=e.data)||void 0===i?void 0:i.message})})},st=(e=1)=>((e=1)=>ot((t,i)=>({href:(0,v.QG)(t.id,void 0,!1,e),dispose:i})))(e).then(({href:e,dispose:t})=>(0,W.SR)(e).finally(t)),ct=async e=>{const t=e.document.querySelectorAll("[em-operation=exportAsPicture]"),i=new Map;for(let n=0,a=t.length;n<a;n++){const e=t[n];e.setAttribute("em-export-id",String(n)),i.set(`[em-export-id='${n}']`,e)}i.size&&e.handleRender(async({contentDocument:e,managedNodeController:t})=>{try{const{data:a,dispose:l}=await((e,t,i=2)=>ot((t,n)=>({data:e.map(e=>({selector:e,href:(0,v.QG)(t.id,void 0,!1,i,e)})),dispose:n}),t))([...i.keys()],(0,g.b6)(e),2);try{const e=a.map(async({href:e,selector:n},a)=>{const l=i.get(n);if("TD"===l.tagName){l.removeAttribute("style");for(const e of[...l.classList])e.startsWith("em-mob-")&&l.classList.remove(e)}t.commit();const r=await(async(e,t)=>{var i;const n="string"===typeof e?null===(i=await de({url:e}))||void 0===i?void 0:i.data:e;if(t.split(".").length<2){const e=p.extension(n.type);e&&(t=`${t}.${e}`)}const a=new File([n],t.toLowerCase());try{const t=await me({user_id:ge.id,folder:String(Qe.id),file:a}).unwrap(),i=(0,z.g0)(t);if(i.error)return"string"===typeof e?e:"";if(i.file_url)return i.file_url}catch(l){}return"string"===typeof e?e:""})(e,`${a}-${l.tagName.toLowerCase()}.png`),o=parseInt(getComputedStyle(l).width);let s=new Image(o);s.setAttribute("border","0"),s.setAttribute("style",`display: block; width: 100%; max-width: ${o}px;`),s.alt="",s.src=r;const c=l.querySelector("a");if(c){const e=document.createElement("a");e.setAttribute("target","_blank"),e.setAttribute("href",c.getAttribute("href")),e.appendChild(s),s=e}if("TD"===l.tagName){const e=l.cloneNode();e.removeAttribute("em-operation"),e.appendChild(s),s=e}l.replaceWith(s),t.commit()});await Promise.all(e)}catch(n){}finally{l()}}catch(n){}})},dt=t=>{var i,n;const a=t.document;if("0"===(null===Qe||void 0===Qe||null===(i=Qe.limits)||void 0===i?void 0:i.preview_limit)&&Ce&&(null===ge||void 0===ge||null===(n=ge.counters)||void 0===n?void 0:n.emails_counter)>2&&!a.querySelector(".em-powered-logo")){const t="https://emcdn.ru/emailmaker/powered.png",i="https%3A%2F%2Femailmaker.ru",n=`<a href="${`https://https://racs.emcdn.ru/v3/v3/link?app=emailmaker&project=${Ce}&email=${e.id}&link=${i}`}" target="_blank"><img src="https://https://racs.emcdn.ru/v3/v3/pixel/123.png?image=${t}&project=${Ce}&email=${e.id}" width="150" height="50" border="0" alt="" style="display: inline-block; width: 100%; max-width: 150px;"></a>`;a.querySelector("body > table:last-child > tbody:last-child > tr:last-child, body > div > table:last-child > tbody:last-child > tr:last-child")&&a.querySelector("body > table:last-child > tbody:last-child > tr:last-child, body > div > table:last-child > tbody:last-child > tr:last-child").insertAdjacentHTML("afterend",`<tr em="block" class="em-powered-logo">\n <td align="center" bgcolor="#FFFFFF">${n}</td>\n </tr>`)}},mt=t=>{const i=(null===lt||void 0===lt?void 0:lt.getValue())||"";at(i,i=>{xe({event:"click",action:"export_email",export_type:"HTML"});const n=document.querySelector(".email-preview"),a=getComputedStyle(n);(0,W.PJ)(i,[a.width],e.utm_parameters,async e=>{await ct(e),dt(e),await(0,H.e)(e,t)}).then(e=>{const t=new Blob([e],{type:"text/html;charset=utf-8"});(0,h.saveAs)(t,`${nt()}.html`)}).catch(e=>{})},!0)},ut=t=>{const i=(null===lt||void 0===lt?void 0:lt.getValue())||"";at(i,i=>{xe({event:"click",action:"export_email",export_type:"TEXT"});const n=document.querySelector(".email-preview"),a=getComputedStyle(n);(0,W.PJ)(i,[a.width],e.utm_parameters,async e=>{await ct(e),dt(e),await(0,H.e)(e,t),e.handleReadHtml(e=>{e.html=(0,J.G9)(e.contentDocument,Q.l)})}).then(e=>{const t=new Blob([e],{type:"text/plain;charset=utf-8"});(0,h.saveAs)(t,`${nt()}.txt`)}).catch(e=>{})})},pt=t=>{const i=(null===lt||void 0===lt?void 0:lt.getValue())||"";at(i,i=>{xe({event:"click",action:"export_email",export_type:"Clipboard"});const n=document.querySelector(".email-preview"),a=getComputedStyle(n);(0,W.PJ)(i,[a.width],e.utm_parameters,async e=>{await ct(e),dt(e),await(0,H.e)(e,t)}).then(e=>navigator.clipboard.writeText(e).then(function(){be.success(oe("The email has been copied to the clipboard."))})).catch(e=>{})},!0)},ht=t=>{if(fe.webhook){const i=(null===lt||void 0===lt?void 0:lt.getValue())||"";at(i,i=>{xe({event:"click",action:"export_email",export_type:"webhook"});const n=document.querySelector(".email-preview"),a=getComputedStyle(n);(0,W.PJ)(i,[a.width],e.utm_parameters,async e=>{await ct(e),dt(e),await(0,H.e)(e,t)}).then(t=>{Ae({url:fe.webhook,body:(0,u.E)({...e,code:t},Ee)}).unwrap().then(t=>{xe({event:"export",action:"export_email",export_type:"webhook",email_id:e.id,project_id:Ce,success:!0}),be.success({message:oe("Success!"),description:oe("Webhook successfully sent!")})}).catch(t=>{xe({event:"export",action:"export_email",export_type:"webhook",email_id:e.id,project_id:Ce,success:!1}),200===t.originalStatus?be.success({message:oe("Success!"),description:oe("Webhook successfully sent!")}):be.error({message:t.status,description:t.error})})})})}else ce((0,x.YF)("webhooksettings")),ce((0,x.qf)(G.lx.EDIT_PROJECT_MODAL))},gt=e=>new Promise((t,i)=>{fetch(e).then(e=>t(e.blob()),()=>(e=>{const t=_e.get(G.A9.em_token);return fetch(`https://app.emailmaker.ru/api/wp-json/cors-proxy/v1/get?url=${encodeURIComponent(e)}`,{headers:{authorization:`Bearer ${t}`}}).then(e=>e.blob())})(e).then(t,i)).catch(()=>{})}),ft=(t,i)=>{const n=(null===lt||void 0===lt?void 0:lt.getValue())||"";at(n,n=>{xe({event:"click",action:"export_email",export_type:"Outlook"});const a=document.querySelector(".email-preview"),l=getComputedStyle(a),r=async(e,t)=>{e.document;(0,H.e)(e,t),await ct(e),dt(e)};(0,W.pH)(e.title,n,[l.width,l.height],e.utm_parameters,t?e=>r(e,"html"):e=>r(e),i?{embedImagesAsBase64:!0,getImageBlob:gt}:void 0).then(e=>{const t=new Blob([e],{type:"text/html;charset=utf-8"});(0,h.saveAs)(t,`${nt()}.eml`)}).catch(e=>{})})},vt=()=>{xe({event:"click",action:"click_delete_email_menu_item",entity_type:"email",entity_id:e.id,project_id:e.project,context:"editor"}),e.isNew?(G.EW.isPlugin||ue(`/projects/${Qe.id}/emails`),be.success(oe("The draft of the email has been deleted."))):bt(e,ue)},bt=(e,t)=>{xe({event:"open",action:"open_delete_email_modal",entity_type:"email",entity_id:e.id,project_id:e.project,context:"editor"}),ye({maskClosable:!0,centered:!0,title:se('Are you sure to delete "',"email")+e.title+oe('" email?'),icon:n.createElement(E.Ay,{icon:"DeleteOutlined",style:{color:"#ff4d4f"}}),okText:oe("Yes"),cancelText:oe("No"),onOk:()=>(async(e,t)=>{try{const i=await Ze(e.id).unwrap();e.project&&!G.EW.isPlugin&&t(`/projects/${e.project}/emails`),be.success(oe('The email "')+i.title+se('" was successfully removed.',"email")),xe({event:"delete",action:"delete_email",entity_type:"email",entity_id:e.id,project_id:e.project,context:"editor"})}catch(i){be.error(i)}})(e,t)})},yt=()=>{(0,z.QM)("application/zip, message/rfc822, text/html",Et)},Et=async e=>{const t=e[0];try{ce((0,L.M7)(!0));const e=(0,z.xi)(de,me,ge,Qe),i=(0,z.oF)(t),n=await(0,z.q2)(t,e,i),[a]=(0,W.Ay)(t.name.replaceAll("&nbsp;"," ")),l=a||(0,V.ez)(n)||"";lt.pushEditOperations([],[{range:lt.getFullModelRange(),text:n}],()=>null),ce((0,N.VK)(l)),ce((0,L.M7)(!1))}catch(i){ce((0,L.M7)(!1));const e=i instanceof Error?i.message:i;be.error({message:e})}xe({event:"upload_file",action:"import_email"})},_t=[];we.emailDropdownMenuClone&&_t.push({label:oe("Clone"),icon:n.createElement(E.Ay,{icon:"CopyOutlined",size:16,strokeWidth:we.iconStrokeWidth}),key:"Clone",className:"em-analytics__email-clone",disabled:Ke.isLoading,onClick:async()=>{if(xe({event:"click",action:"duplicate_email",entity_type:"email",entity_id:e.id,project_id:e.project,context:"editor"}),e.isNew)be.warning({message:oe("To create a copy, you need to save the email.")});else{var t,i,n,a,l;if((await ke.fire(e)).some(e=>!1===e))return;Ge({title:(0,V.fq)(e.title),...void 0!==e.meta?{meta:e.meta}:{},project:null===Qe||void 0===Qe?void 0:Qe.id,description:e.description,html:(0,V.el)((null===lt||void 0===lt?void 0:lt.getValue())||"",e.title),parent_email:e.parent_email||G.iU,common_styles:e.common_styles||"",utm_parameters:{utm_source:null===(t=e.utm_parameters)||void 0===t?void 0:t.utm_source,utm_medium:null===(i=e.utm_parameters)||void 0===i?void 0:i.utm_medium,utm_campaign:null===(n=e.utm_parameters)||void 0===n?void 0:n.utm_campaign,utm_term:null===(a=e.utm_parameters)||void 0===a?void 0:a.utm_term,utm_content:null===(l=e.utm_parameters)||void 0===l?void 0:l.utm_content},emailtags:e.emailtags,folder:e.folder}).unwrap().then(t=>{ue(`/projects/${Qe.id}/emails/${t.id}`),be.success({message:oe('The copy of email "')+e.title+oe('" was successfully created.')}),xe({event:"duplicate",action:"duplicate_email_success",entity_type:"email",entity_id:e.id,cloned_entity_id:t.id,project_id:e.project,context:"editor"}),et&&tt()}).catch(e=>{be.error({message:e.data.code,description:e.data.message})})}}}),we.emailDropdownMenuImport&&_t.push({label:se("Import","verb"),icon:n.createElement(E.Ay,{icon:"CloudUploadOutlined",size:16,strokeWidth:we.iconStrokeWidth}),key:"Import",className:"em-analytics__editor-page__import",onClick:()=>{xe({event:"click",action:"import_email"}),yt()}}),(pe||he||(null===(te=ge.id)||void 0===te?void 0:te.toString())===(null===(ie=e.author)||void 0===ie?void 0:ie.toString()))&&(we.emailDropdownMenuLock&&_t.push({label:n.createElement(y.A,{key:"Lock",element:e,context:"editor"}),icon:e.lock?n.createElement(E.Ay,{icon:"UnLock",size:16,strokeWidth:we.iconStrokeWidth}):n.createElement(E.Ay,{icon:"Lock",size:16,strokeWidth:we.iconStrokeWidth}),disabled:e.isNew}),we.emailDropdownMenuRemove&&_t.push({label:oe("Remove"),icon:n.createElement(E.Ay,{icon:"DeleteOutlined",size:16,strokeWidth:we.iconStrokeWidth}),key:"Remove",className:"em-analytics__email-remove",style:{color:"#ff4d4f"},onClick:vt}));const wt=e.isAmp,Ct=[];if(we.exportHtmlEnabled&&Ct.push({key:"html",label:oe("Code"),icon:n.createElement("span",{style:{position:"relative",display:"inline-flex"}},n.createElement(E.Ay,{icon:"FileTextOutlined",style:{fontSize:"16px"}}),qe&&n.createElement(E.Ay,{icon:"Lock",size:12,strokeWidth:we.iconStrokeWidth,style:{position:"absolute",bottom:-4,right:-4,borderRadius:"100%",backgroundColor:"var(--colorBgContainer)"}})),...qe?{onClick:()=>{je(!0),Ve(1)}}:wt?{children:[{key:"\u0441ode_html",label:oe("AMP"),onClick:()=>mt("amp")},{key:"html_amp",label:oe("HTML"),onClick:()=>mt("html")}]}:{onClick:()=>mt()}}),we.exportZipEnabled&&Ct.push({key:"zip",label:oe("ZIP"),icon:n.createElement("span",{style:{position:"relative",display:"inline-flex"}},n.createElement(E.Ay,{icon:"FileZipOutlined",style:{fontSize:"16px"}}),qe&&n.createElement(E.Ay,{icon:"Lock",size:12,strokeWidth:we.iconStrokeWidth,style:{position:"absolute",bottom:-4,right:-4,borderRadius:"100%",backgroundColor:"var(--colorBgContainer)"}})),...qe?{onClick:()=>{je(!0),Ve(1)}}:{onClick:()=>(async()=>{const t=(null===lt||void 0===lt?void 0:lt.getValue())||"";at(t,async t=>{xe({event:"click",action:"export_email",export_type:"ZIP"});const i=document.querySelector(".email-preview"),n=getComputedStyle(i),a=await(0,W.Ce)(t,[n.width,void 0],e.utm_parameters,gt,async e=>{await ct(e),dt(e),wt&&await(0,H.e)(e,"html")});wt&&(a["amp.html"]=await(0,W.PJ)(t,[n.width],e.utm_parameters,async e=>{await ct(e),dt(e),await(0,H.e)(e,"amp")}));const l=await(0,W.hs)(a);(0,h.saveAs)(l,`${nt()}.zip`)},!0)})().catch(e=>{})}}),we.exportClipboardEnabled&&Ct.push({key:"clipboard",label:oe("Clipboard"),icon:n.createElement("span",{style:{position:"relative",display:"inline-flex"}},n.createElement(E.Ay,{icon:"SnippetsOutlined",style:{fontSize:"16px"}}),qe&&n.createElement(E.Ay,{icon:"Lock",size:12,strokeWidth:we.iconStrokeWidth,style:{position:"absolute",bottom:-4,right:-4,borderRadius:"100%",backgroundColor:"var(--colorBgContainer)"}})),...qe?{onClick:()=>{je(!0),Ve(1)}}:wt?{children:[{key:"clipboard_html",label:oe("AMP"),onClick:()=>pt("amp")},{key:"clipboard_amp",label:oe("HTML"),onClick:()=>pt("html")}]}:{onClick:()=>pt()}}),we.exportTextEnabled&&Ct.push({key:"text",label:oe("Text"),icon:n.createElement(E.Ay,{icon:"FileOutlined",style:{fontSize:"16px"}}),...wt?{children:[{key:"\u0441ode_txt",label:oe("AMP"),onClick:()=>ut("amp")},{key:"html_txt",label:oe("HTML"),onClick:()=>ut("html")}]}:{onClick:()=>ut()}}),we.exportOutlookEnabled&&Ct.push({key:"outlook",icon:n.createElement(E.Ay,{icon:"FileWordOutlined",style:{fontSize:"16px"}}),label:oe("Outlook"),onClick:()=>{return e=wt,void ye({centered:!0,maskClosable:!0,title:oe("Embed images in the file?"),content:oe('If "Yes", images will be included in the file itself. This is useful for offline viewing or if external images are blocked, but increases file size. If "No", images will be loaded from external links.'),okText:oe("Yes"),cancelText:oe("No"),onOk:()=>ft(e,!0),onCancel:()=>ft(e,!1)});var e}}),we.exportPdfEnabled&&Ct.push({key:"pdf",icon:n.createElement(E.Ay,{icon:"FilePdfOutlined",style:{fontSize:"16px"}}),label:oe("PDF"),onClick:async()=>{const t=(null===lt||void 0===lt?void 0:lt.getValue())||"";at(t,async t=>{try{const i=document.querySelector(".email-preview"),n=getComputedStyle(i),a=await(0,W.PJ)(t,[n.width],e.utm_parameters,async e=>{dt(e)}),l=await Je({htmlContent:a,notification:be}).unwrap(),r=window.URL.createObjectURL(new Blob([l],{type:"application/pdf"})),o=document.createElement("a");o.href=r,o.setAttribute("download",`${nt()}.pdf`),document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(r)}catch(i){}})}}),we.exportPngEnabled&&Ct.push({key:"img",icon:n.createElement(E.Ay,{icon:"FileImageOutlined",style:{fontSize:"16px"}}),label:oe("PNG"),onClick:()=>st(1).then(W.gZ).then(e=>(0,h.saveAs)(e,`${nt()}.png`)).then(()=>xe({event:"click",action:"export_email",export_type:"Image"}))}),!G.EW.isPlugin){const t=(0,A.v0)(),i=[...t.filter(e=>{var t;return(0,A.hS)(e.id,null===(t=fe.integrations)||void 0===t?void 0:t[e.id])}),...t.filter(e=>{var t;return!(0,A.hS)(e.id,null===(t=fe.integrations)||void 0===t?void 0:t[e.id])})],a=we.exportWebHookEnabled?{key:"webhook",icon:n.createElement(E.Ay,{icon:"WebHook",style:{fontSize:"16px"}}),label:oe("Webhook"),...wt?{children:[{key:"webhook_amp",label:oe("AMP"),onClick:()=>ht("amp")},{key:"webhook_html",label:oe("HTML"),onClick:()=>ht("html")}]}:{onClick:()=>ht()}}:null,l=[...i.map(t=>{var i;const a=(0,A.hS)(t.id,null===(i=fe.integrations)||void 0===i?void 0:i[t.id]);return{key:t.id,icon:n.createElement("span",{style:{position:"relative",display:"inline-flex",width:16,height:16}},n.createElement("img",{src:t.icon,alt:"",style:{width:16,height:16}}),$e&&a&&n.createElement(E.Ay,{icon:"LockOutlined",style:{position:"absolute",bottom:-2,right:-2,fontSize:10,color:"var(--colorTextSecondary)"}})),label:oe(t.name),onClick:$e&&a?()=>je(!0):()=>(t=>{var i;const n=null===(i=fe.integrations)||void 0===i?void 0:i[t];if(!(0,A.rg)(t)||!(0,A.hS)(t,n))return ce((0,x.YF)("webhooksettings")),void ce((0,x.qf)(G.lx.EDIT_PROJECT_MODAL));const a=(null===lt||void 0===lt?void 0:lt.getValue())||"";at(a,i=>{xe({event:"click",action:"export_email",export_type:t});const n=document.querySelector(".email-preview"),a=getComputedStyle(n);(0,W.PJ)(i,[a.width],e.utm_parameters,async e=>{await ct(e),dt(e)}).then(e=>{Ue(e),ze(t)})})})(t.id)}}),...a?[a]:[]];Ct.push({type:"divider",key:"integrations-divider"}),Ct.push({key:"email-platforms",label:oe("Email platforms"),children:l,popupClassName:"em-export-platforms-submenu"})}return n.createElement(a.$x,null,we.emailDropdownMenuEnabled?n.createElement(a.ms,{key:"Actions",arrow:{pointAtCenter:!0},placement:"bottom",menu:{items:_t}},n.createElement(a.$n,{type:"default",block:!1,className:"email-page-header__btn email-page-header__btn_extra",onClick:()=>{}},n.createElement(E.Ay,{icon:"DotsHoriz",size:18,strokeWidth:we.iconStrokeWidth}))):we.emailDropdownMenuImport&&n.createElement(a.m_,{title:se("Import","verb"),placement:"bottom"},we.emailDropdownMenuImportButton?n.createElement(a.$n,{className:"em-analytics__editor-page__import",icon:n.createElement(E.Ay,{icon:"CloudUploadOutlined",size:16,strokeWidth:we.iconStrokeWidth}),onClick:()=>{xe({event:"click",action:"import_email"}),yt()}},oe("Import")):n.createElement(a.$n,{className:"em-analytics__editor-page__import",type:"text",icon:n.createElement(E.Ay,{icon:"CloudUploadOutlined",size:22,strokeWidth:we.iconStrokeWidth}),onClick:()=>{xe({event:"click",action:"import_email"}),yt()}})),we.emailExportEnabled&&n.createElement(a.ms,{key:"Export",arrow:{pointAtCenter:!0},placement:"bottom",menu:{items:Ct}},n.createElement(a.$n,{key:"Export",className:"em-analytics__email-page__export",type:"default",icon:n.createElement(E.Ay,{icon:"CloudDownloadOutlined",size:16,strokeWidth:we.iconStrokeWidth})},oe("Export"))),!e.hasOwnProperty("type")&&n.createElement(v.Ay,{disabled:Le,autoSaveEmailResult:t,key:"Save",email:e,isEditableRights:pe||he||(null===(ne=ge.id)||void 0===ne?void 0:ne.toString())===(null===(ae=e.author)||void 0===ae?void 0:ae.toString())}),!!e.hasOwnProperty("type")&&n.createElement(b.A,{disabled:Le,rightCol:void 0,key:"Save",block:e,isEditableRights:pe||he||(null===(le=ge.id)||void 0===le?void 0:le.toString())===(null===(re=e.author)||void 0===re?void 0:re.toString()),autoSaveBlockResult:i}),n.createElement(w,{open:Te,codeSize:(0,_.X_)(Fe),onMinimize:()=>{if(Be(!1),Pe&&Fe){(0,_.X_)(Fe);const e=(0,_.Y6)(Fe);(0,_.X_)(e);Pe(e),Re(null),Oe("")}},onDownloadAsIs:()=>{Be(!1),Pe&&Fe&&(Pe(Fe),Re(null),Oe(""))},onCancel:()=>{Be(!1),Re(null),Oe("")}}),We&&(0,A.rg)(We)&&n.createElement(k.wf,{integration:(0,A.rg)(We),visible:!!We,loading:Ie,onConfirm:async t=>{var i;if(!We)return;const a=null===(i=fe.integrations)||void 0===i?void 0:i[We],l=(0,A.rg)(We);if(!a||!l)return;const r=e.subject||e.title||"Email from EmailMaker";if("campaign_monitor"===We){const i="app.emailmaker.ru",n=null===e||void 0===e?void 0:e.id,a=Ce||(null===fe||void 0===fe?void 0:fe.id);n&&a&&(t={...t,html_url:`https://${i}/getemail/${n}?secret_hash=${Y()(`${a}${n}${G.KI}`)}&raw=true`})}const o=await Se(We,a,t,He,r);ze(null),Ue(""),xe({event:"export",action:"export_email",export_type:We,email_id:e.id,project_id:Ce,success:!0===o.success}),!0===o.success?be.success({message:oe("Success!"),description:o.link?n.createElement(n.Fragment,null,oe(o.message),n.createElement("br",null),n.createElement("a",{href:o.link.url,target:"_blank",rel:"noopener noreferrer"},oe(o.link.text))):oe(o.message),duration:10}):be.error({message:oe("Error"),description:o.error})},onCancel:()=>{ze(null),Ue("")},__:oe}),n.createElement(C.A,{open:Me,sideOnOk:void 0,onCancel:()=>je(!1),initialSlide:De}))};var te=i(92980),ie=i(13322),ne=i(90388),ae=i(96680),le=i(78019),re=i(66959);const oe=({email:e,autoSaveEmailResult:t,isCollaborationEditor:i})=>{var o,u,p,h;const[g]=a.lV.useForm(),{__:f}=(0,c.s9)();let v=(0,r.wA)(),b=(0,l.Zp)();const y=(0,r.d4)(S.C1),_=(0,r.d4)(S.B$),w=(0,r.d4)(I.yN),k=(0,ne.QC)(),A=(0,l.KC)(),x=null===A||void 0===A?void 0:A.data,{owner:T,admin:B}=(0,D.A)(),{token:P}=(0,a.rd)(),R=(0,d.rD)(),F=(0,$.u)(),O=(0,n.useRef)(),M=(0,n.useRef)(),j=(0,n.useRef)(),W=(0,U.ml)(K.AZ.ON_PREVIOUSBUTTON_CLICK_ID),z=(0,U.ml)(K.AZ.ON_PREHEADER_CHANGED_ID),H=(0,U.ml)(K.AZ.ON_SUBJECT_CHANGED_ID),q=(0,r.d4)(L.yy),Z=e.hasOwnProperty("type")?G.IE:G.Tm,X=(0,r.d4)(N.qX),Y=(0,r.d4)(le.qX),J=Z===G.Tm?X:Y,Q=(0,r.d4)(L.Fv),[oe,se]=(0,n.useState)(!1),[ce,de]=(0,n.useState)(!1),me=!_&&(null===(o=y.id)||void 0===o?void 0:o.toString())===(null===w||void 0===w||null===(u=w.members)||void 0===u?void 0:u.owner.ID);(0,n.useEffect)(()=>{const e=!(null===J||void 0===J||!J.type)&&((null===J||void 0===J?void 0:J.type)===G.bV.TEXT||(null===J||void 0===J?void 0:J.type)===G.bV.LINK||J.type===G.bV.BUTTON)&&Q&&"bottom"!==q;se(e),v((0,L.oF)(e))},[J,q,Q]);const ue=(0,n.useCallback)(()=>{if(F({event:"click",action:"click_back_button",entity_type:Z===G.IE?"block":"email",entity_id:null===e||void 0===e?void 0:e.id,project_id:(null===e||void 0===e?void 0:e.project)||(null===x||void 0===x?void 0:x.id),context:"editor"}),G.EW.isPlugin)W.fire(e);else{var t;const i=window.localStorage.getItem(G.V0.em_last_active_page);b(`/projects/${x.id}/emails?page=${i||1}&folder=${(null===(t=e.folder)||void 0===t?void 0:t[0])||G.y2}`)}},[b,W,e,null===x||void 0===x?void 0:x.id,F,Z]),[pe,he]=(0,n.useState)(),ge=(0,U._q)(K.AZ.WILL_EMAIL_INIT_ID),fe=(0,U._q)(K.AZ.ON_EMAIL_INIT_ID);(0,re.ZC)(([t])=>{pe&&t!==e.subject&&H.fire(e.subject)},[e.subject,pe]);const ve=(0,n.useCallback)(e=>{const t=e.target.value;H.fire(t)},[H]),be=(0,n.useCallback)(e=>{const t=e.target.value;z.fire(t)},[z]);(0,re.ZC)(([t])=>{pe&&t!==e.preheader&&z.fire(e.preheader)},[e.preheader,pe]),(0,n.useEffect)(()=>{const e=new V.jG;return e.addDisposable(ge(()=>he(!1))),e.addDisposable(fe(e=>{he(!0);const t=g.getFieldValue("subject");e.subject&&e.subject!==t&&g.setFieldValue("subject",e.subject);const i=g.getFieldValue("preheader");e.preheader&&e.preheader!==i&&g.setFieldValue("preheader",e.preheader)})),()=>e.dispose()},[he,ge,fe,g]);const ye=(0,n.useCallback)(t=>{const i=t.target.value.trim();e.isNew?v((0,ae.TU)(i)):v((0,N.HO)(i)),k.send(G.Ru.SANDBOX_SUBJECT_UPDATE,{value:i,guid:e.renderGuid})},[k,e.renderGuid,v,e.isNew]),Ee=(0,U._q)(K.AZ.BEFORE_SAVE_EMAIL),_e=(0,n.useCallback)(async e=>{var t,i;const n=null===(t=M.current)||void 0===t?void 0:t.input;if(document.activeElement===n){const t=n.value.trim();t!==e.subject&&(e.subject=t,e.isNew?v((0,ae.TU)(t)):v((0,N.HO)(t)),await k.sendAsync(G.Ru.SANDBOX_SUBJECT_UPDATE,{value:t,guid:e.renderGuid}))}const a=null===(i=j.current)||void 0===i?void 0:i.input;if(document.activeElement===a){const t=a.value.trim();t!==e.preheader&&(e.preheader=t,e.isNew?v((0,ae.x3)(t)):v((0,N.pl)(t)),await k.sendAsync(G.Ru.SANDBOX_PREHEADER_UPDATE,{value:t,guid:e.renderGuid}))}},[k,v]);(0,n.useEffect)(()=>{const e=Ee(_e);return()=>e.dispose()},[Ee,_e]);const we=(0,n.useCallback)(t=>{const i=t.target.value.trim();e.isNew?v((0,ae.x3)(i)):v((0,N.pl)(i)),k.send(G.Ru.SANDBOX_PREHEADER_UPDATE,{value:i,guid:e.renderGuid})},[k,e.renderGuid,v,e.isNew]),Ce=e.isNew;(0,n.useEffect)(()=>{const t=new V.jG;return t.addDisposable(k.addListenerAsync(G.Ru.APPLICATION_SUBJECT_UPDATE,({guid:t,value:i})=>{if(t===e.renderGuid){const t=i!==(e.subject||g.getFieldValue("subject")||"")&&i;g.setFieldValue("subject",i),v(Ce?(0,ae.TU)(i):(0,N.HO)(i)),t&&F({event:"submit",action:"insert_generated_subject",entity_type:Z===G.IE?"block":"email",entity_id:null===e||void 0===e?void 0:e.id,project_id:(null===e||void 0===e?void 0:e.project)||(null===x||void 0===x?void 0:x.id),context:"editor"})}})),t.addDisposable(k.addListenerAsync(G.Ru.APPLICATION_PREHEADER_UPDATE,({guid:t,value:i})=>{if(t===e.renderGuid){const t=i!==(e.preheader||g.getFieldValue("preheader")||"")&&i;g.setFieldValue("preheader",i),v(Ce?(0,ae.x3)(i):(0,N.pl)(i)),t&&F({event:"submit",action:"insert_generated_preheader",entity_type:Z===G.IE?"block":"email",entity_id:null===e||void 0===e?void 0:e.id,project_id:(null===e||void 0===e?void 0:e.project)||(null===x||void 0===x?void 0:x.id),context:"editor"})}})),()=>t.dispose()},[k,v,Ce,g,e.renderGuid,e.subject,e.preheader,F,Z,e,x]),(0,ie.A)(null===e.title?f("New email title"):e.title);const ke=(0,n.useCallback)(()=>{v((0,L.PM)(G.z$)),setTimeout(()=>{const e=document.querySelector('li.ai-response-change-context[role="theme-and-preheader-generator"]');e&&e.click()},100)},[v]),Ae=(0,n.useCallback)(()=>{me?de(!0):ke()},[me,ke]),Se=n.createElement(n.Fragment,null,n.createElement(a.$x,{ref:O,size:10},R.headerArrowBackVisible&&n.createElement(a.m_,{title:f("Back"),placement:"left"},n.createElement(a.$n,{type:"text",icon:n.createElement(E.Ay,{icon:"ArrowLeftOutlined",size:22,strokeWidth:R.iconStrokeWidth}),onClick:ue,shape:"circle"})),n.createElement("div",null,(R.headerTitleVisible||R.headerPreheaderVisible)&&n.createElement(a.lV,{form:g,layout:"vertical",name:"subject_preheader_form",autoComplete:"off",initialValues:{subject:"",preheader:""}},R.headerTitleVisible&&n.createElement("div",{style:{marginTop:pe?-3:0}},n.createElement(a.$x,{style:{width:"100%"},align:"baseline",size:12},n.createElement("div",{className:"subject_preheader_form__title"},f("Subject")),pe?n.createElement("div",{className:"ant-page-header-heading"},n.createElement(a.lV.Item,{name:"subject",style:{marginBottom:0}},n.createElement(a.pd,{className:"ant-page-header-heading-title",ref:M,placeholder:f("Enter subject line here"),variant:"borderless",onChange:ve,onPressEnter:ye,onBlur:e=>{ye(e),document.querySelector(".ant-page-header-heading-title").closest(".ant-page-header-heading").classList.remove("focus")},onFocus:()=>{document.querySelector(".ant-page-header-heading-title").closest(".ant-page-header-heading").classList.add("focus")},disabled:R.lockPreheaderAndTitle})),R.aiAssistentEnabled&&n.createElement(a.m_,{title:f("Generate with AI")},n.createElement(E.Ay,{icon:"AI",size:12,strokeWidth:R.iconStrokeWidth,onClick:Ae}))):n.createElement(a.EA.Input,{active:!0,size:16,style:{width:"40%",marginTop:3}}))),R.headerPreheaderVisible&&n.createElement("div",null,n.createElement(a.$x,{style:{width:"100%"},align:"baseline",size:12},n.createElement("div",{className:"subject_preheader_form__title"},f("Preheader")),pe?n.createElement("div",{className:"ant-page-header-heading ant-page-header-heading_preheader"},n.createElement(a.lV.Item,{name:"preheader",style:{marginBottom:0}},n.createElement(a.pd,{className:"ant-page-header-heading-preheader",ref:j,placeholder:f("Enter preheader here"),variant:"borderless",onChange:be,onPressEnter:we,onBlur:e=>{we(e),document.querySelector(".ant-page-header-heading-preheader").closest(".ant-page-header-heading").classList.remove("focus")},onFocus:()=>{document.querySelector(".ant-page-header-heading-preheader").closest(".ant-page-header-heading").classList.add("focus")},disabled:R.lockPreheaderAndTitle})),R.aiAssistentEnabled&&n.createElement(a.m_,{title:f("Generate with AI")},n.createElement(E.Ay,{icon:"AI",size:12,strokeWidth:R.iconStrokeWidth,onClick:Ae}))):n.createElement(a.EA.Input,{active:!0,size:16,style:{width:"80%",marginTop:2}}))))))),Ie=n.createElement(n.Fragment,null,R.emailIdShow&&!!e.id&&n.createElement(n.Fragment,null,n.createElement("div",{className:"email-page-header__email-id"},"ID"+e.id),n.createElement(a.cG,{type:"vertical"})),n.createElement(m.A,{emailElement:e,isCollaborationEditor:i}),R.commandButtonsEnabled&&n.createElement(n.Fragment,null,e.lock?n.createElement(E.Ay,{icon:"Lock",size:18,strokeWidth:R.iconStrokeWidth,key:"Lock",className:s()("lock-icon",{"lock-icon__disabled":!(T||B||(null===(p=y.id)||void 0===p?void 0:p.toString())===(null===(h=e.author)||void 0===h?void 0:h.toString()))}),style:{color:P.colorPrimary,verticalAlign:"sub"}}):null,n.createElement(ee,{key:"Buttons",email:e,autoSaveEmailResult:t,isHeaderCodeMenuOpen:oe})));return n.createElement(n.Fragment,null,n.createElement(te.A,{className:"email-pane__header",leftBlock:Se,rightBlock:Ie,isHeaderCodeMenuOpen:oe}),n.createElement(C.A,{open:ce,onCancel:()=>de(!1),initialSlide:9}))}},3437:(e,t,i)=>{"use strict";i.d(t,{A:()=>Pi});var n=i(25366),a=i(14365),l=i(85472),r=i(33637),o=i(76508),s=i(90701),c=i(74572),d=i.n(c),m=i(95074),u=i(65572),p=i(12178),h=i(69064),g=i(93149);const f=({email:e})=>{const{__:t}=(0,o.s9)(),i=e.hasOwnProperty("type")?h.IE:h.Tm,[l,r]=(0,n.useState)(h.yy),s=(0,g.rD)();let c=[{label:n.createElement(n.Fragment,null,t("Settings")),key:h.yy,forceRender:!0,className:"email-settings__collapse-panel",children:n.createElement(u.A,{className:"email-settings__collapse-panel-content",element:e})}];return s.UTMEnabled&&i===h.Tm&&c.push({label:n.createElement(n.Fragment,null,t("UTM parameters")),key:h.iW,forceRender:!0,className:"email-settings__collapse-panel",children:n.createElement(p.A,{className:"email-settings__collapse-panel-content",email:e})}),n.createElement(n.Fragment,null,n.createElement(a.tU,{className:"secondary-tabs email-settings__collapse",size:"large",activeKey:l,onChange:e=>r(e||""),items:c}))};var v=i(56218),b=i(1246),y=i(22376),E=i(54501),_=i(90388);const{backgroundColor:w,backgroundImage:C,backgroundPositionX:k,backgroundPositionY:A,backgroundRepeat:S,backgroundSize:I,responsive:x,backgroundColorContent:L,width:N}={backgroundColor:"backgroundColor",backgroundImage:"backgroundImage",backgroundPositionX:"backgroundPositionX",backgroundPositionY:"backgroundPositionY",backgroundRepeat:"backgroundRepeat",backgroundSize:"backgroundSize",responsive:"responsive",backgroundColorContent:"backgroundColorContent",width:"width"},T={[w]:"",[C]:"",[k]:"",[A]:"",[S]:"checked",[I]:"",[L]:"",[N]:""},B=({className:e="",email:t})=>{var i,r,s;const{__:c}=(0,o.s9)(),{token:m}=(0,a.rd)(),u=(0,l.wA)(),p=(0,g.rD)(),[f]=a.lV.useForm(),L=(0,_.XW)(),N=(0,l.d4)(y.uJ),B=(0,l.d4)(y.iy),P=(0,l.d4)(E.B),R=(0,l.d4)(y.mD),[F,O]=(0,n.useState)(!0),M=c("Email not yet loaded or global container not found.");(0,n.useEffect)(()=>{R&&(u((0,y.S_)(!1)),L({operation:h.Ru.INIT_PREVIEW}))},[f,R,u,L,t.common_styles]);const j=[{label:c("Not defined"),value:"none"},{label:c("Do not repeat background (no-repeat)"),value:"no-repeat"},{label:c("Repeat background (repeat)"),value:"repeat"},{label:c("Repeat background horizontally (repeat-x)"),value:"repeat-x"},{label:c("Repeat background vertically (repeat-y)"),value:"repeat-y"}],D=[{label:c("Not defined"),value:""},{label:c("Contain"),value:"contain"},{label:c("Cover"),value:"cover"}];(0,n.useEffect)(()=>{var e,t,i,n;f.setFieldsValue({...N,width:null===(e=N.width)||void 0===e?void 0:e.value,widthDim:null===(t=N.width)||void 0===t?void 0:t.dim,backgroundImage:N.backgroundImage?null===(i=N.backgroundImage[0])||void 0===i?void 0:i.value:"",backgroundRepeat:""===N[S]?"repeat":N[S],backgroundSize:N[I],responsive:null===(n=N.responsive)||void 0===n?void 0:n.shutdown}),O(!N.backgroundImage)},[N,f]);return n.createElement("div",{className:d()("appearance-panel",{[e]:e})},n.createElement(a.lV,{form:f,layout:"vertical",name:"appearance_panel_form",initialValues:{remember:!1,...T},onValuesChange:e=>{var t;const i=f.getFieldsValue(!0),n=Object.keys(e)[0];switch(n){case k:case A:L({operation:h.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:{[n]:""===e[n]?"none":e[n]}});break;case C:O(""===e[n]),L({operation:h.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:{[n]:[{...null===N||void 0===N||null===(t=N.backgroundImage)||void 0===t?void 0:t[0],type:"url",value:e[n]}],backgroundSize:"cover"}});break;case x:L({operation:h.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:{responsive:{shutdown:e[n],styles:e[n]},width:i.width}});break;default:L({operation:h.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:e})}},autoComplete:"off",className:"element-controls"},B?n.createElement(a.Fc,{style:{marginBottom:"24px"},message:M,type:"error"}):null,n.createElement(a.y9,{title:c("Email layout width"),dividerTop:!1},n.createElement(a.fI,{gutter:10},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:null!==(i=N.width)&&void 0!==i&&i.value?c("This field sets the width of the email."):c("Couldn`t determine the email width"),placement:"right"},n.createElement(a.lV.Item,{name:"width",style:{marginBottom:m.formItemMarginBottomXS}},n.createElement(a.YI,{min:0,max:700,placeholder:c("Width"),prefix:n.createElement(b.Ay,{icon:"ColumnWidthOutlined"}),disabled:!(null!==(r=N.width)&&void 0!==r&&r.value),addonAfter:"px"})))))),p.emailResponsiveControlEnabled&&n.createElement(n.Fragment,null,n.createElement(a.fI,{gutter:20},n.createElement(a.fv,{span:24},n.createElement(a.lV.Item,{name:"responsive",valuePropName:"checked"},n.createElement(a.dO,{id:"responsive",label:c("Responsive email"),size:"small",name:"responsive",disabled:void 0===(null===(s=N.responsive)||void 0===s?void 0:s.shutdown),onChange:e=>{u((0,E.wW)({shutdown:e,styles:e})),L({operation:h.Ru.SANDBOX_IFRAME_SETSIZE,settings:{iframeWidth:document.querySelector(".email-pane__iframe").getBoundingClientRect().width}})}})))),n.createElement(a.cG,{className:"selected-td-form__divider"})),n.createElement(a.y9,{title:c("Email background color"),dividerTop:!p.emailResponsiveControlEnabled},n.createElement(a.fI,{gutter:10,style:{paddingBottom:F?16:4}},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:c("Background color"),placement:"bottom"},n.createElement(a.lV.Item,{name:w,style:{marginBottom:m.formItemMarginBottomXS},rules:[{message:c("Please set the background color")}]},n.createElement(a.it,{placeholder:c("Background color"),usedColors:N.usedColors,usedLabel:c("Used"),recommendedLabel:c("Recommended"),disabled:B})))),n.createElement(a.fv,{span:F?12:24},p.formEmailFieldBackgroundImageEnabled&&n.createElement(n.Fragment,null,n.createElement(v.A,{form:f,label:c("Background image"),name:C,tooltipTitle:c("Background image"),disabled:B||"Styles"!==P,elementSettings:N}),!F&&n.createElement(n.Fragment,null,n.createElement(a.lV.Item,{style:{marginBottom:"0"}},n.createElement(a.fI,{gutter:10},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:c("Horizontal position"),placement:"bottom"},n.createElement(a.lV.Item,{name:k,style:{marginBottom:m.formItemMarginBottomXS}},n.createElement(a.pd,{placeholder:c("Horizontal position"),prefix:n.createElement(b.Ay,{icon:"BgPositionHorizontal"})})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:c("Vertical position"),placement:"bottom"},n.createElement(a.lV.Item,{name:A,style:{marginBottom:m.formItemMarginBottomXS}},n.createElement(a.pd,{placeholder:c("Vertical position"),prefix:n.createElement(b.Ay,{icon:"BgPositionVertical"})})))))),n.createElement(a.fI,{gutter:10},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:c("Background image repeat"),placement:"bottom"},n.createElement(a.lV.Item,{name:S},n.createElement(a.Select,{placeholder:c("Please select"),disabled:B,options:j})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:c("Background image size"),placement:"top"},n.createElement(a.lV.Item,{name:I},n.createElement(a.Select,{placeholder:c("Please select"),disabled:B,options:D}))))))))))))};var P=i(78019);const{Option:R}=a.Select,{width:F,widthDim:O}={width:"width",widthDim:"widthDim"},M={[F]:"",[O]:""},j=({className:e=""})=>{const{__:t}=(0,o.s9)(),i=(0,l.d4)(P.JV),r=(0,l.d4)(P.iy),[s]=a.lV.useForm(),c=(0,_.XW)(),m=t("Block not yet loaded or global container not found.");(0,n.useEffect)(()=>{s.setFieldsValue({width:i.width.value,widthDim:i.width.dim})},[i,s]);return n.createElement("div",{className:d()("block-appearance-panel",{[e]:e})},n.createElement(a.lV,{form:s,layout:"vertical",name:"block_appearance_panel_form",initialValues:{remember:!1,...M},onValuesChange:e=>{const t=s.getFieldsValue(!0),i=Object.keys(e)[0];let n;switch(i){case"width":n={[i]:{value:e[i],dim:t.widthDim}};break;case"widthDim":n={width:{value:t.width,dim:e[i]}};break;default:return}c({operation:h.Ru.SANDBOX_BLOCK_SETTINGS_SET,settings:n})},autoComplete:"off"},r?n.createElement(a.Fc,{style:{marginBottom:"24px"},message:m,type:"error"}):null,n.createElement(a.lV.Item,{label:t("Container width"),name:F,tooltip:{title:t("Specifies the block width."),icon:n.createElement(b.Ay,{icon:"InfoCircleOutlined"})},rules:[{message:t("Please input container width")}]},n.createElement(a.pd,{disabled:r,placeholder:t("Container width"),addonAfter:n.createElement(a.lV.Item,{name:"widthDim",noStyle:!0},n.createElement(a.Select,{className:"select-after"},n.createElement(R,{value:"px"},"px"),n.createElement(R,{value:"%"},"%")))}))))};var D=i(25470),V=i(28753),W=i(59463),z=i(53833),H=i(42018),U=i(86581),q=i(36786);const $=e=>{var t,i,n,a,l,r,o,s,c,d,m,u,p,h,g,f,v,b;return{textFontFamily:e.text.fontFamily,textFontSize:e.text.fontSize,textFontSizeDim:e.text.fontSizeDim,textLineHeight:e.text.lineHeight,textLineHeightDim:e.text.lineHeightDim,textColor:e.text.color,textContrastColor:e.text.contrastColor||"#FFFFFF",textAlign:e.text.textAlign,textPaddingBottom:e.text.paddingBottom,textPaddingBottomDim:e.text.paddingBottomDim,headingFontFamily:e.headings.fontFamily,headingFontSize:e.headings.fontSize,headingFontSizeDim:e.headings.fontSizeDim,headingLineHeight:e.headings.lineHeight,headingLineHeightDim:e.headings.lineHeightDim,headingColor:e.headings.color,headingContrastColor:e.headings.contrastColor||"#FFFFFF",headingAlign:e.headings.textAlign,headingPaddingTop:e.headings.paddingTop,headingPaddingTopDim:e.headings.paddingTopDim,headingPaddingBottom:e.headings.paddingBottom,headingPaddingBottomDim:e.headings.paddingBottomDim,headingLetterSpacing:e.headings.letterSpacing,headingLetterSpacingDim:e.headings.letterSpacingDim,headingBold:e.headings.bold,headingItalic:e.headings.italic,linkColor:e.links.color,linkContrastColor:e.links.contrastColor||"#FFFFFF",linkUnderline:e.links.underline,buttonsFontFamily:e.buttons.fontFamily,buttonsFontSize:e.buttons.fontSize,buttonsFontSizeDim:e.buttons.fontSizeDim,buttonsLetterSpacing:e.buttons.letterSpacing,buttonsLetterSpacingDim:e.buttons.letterSpacingDim,buttonsColor:e.buttons.color,buttonsContrastColor:e.buttons.contrastColor||"#1C52DC",buttonsBold:e.buttons.bold,buttonsItalic:e.buttons.italic,buttonsBackgroundColor:e.buttons.backgroundColor,buttonsContrastBackgroundColor:e.buttons.contrastBackgroundColor||"#FFFFFF",buttonsMarginTop:e.buttons.marginTop,buttonsMarginTopDim:e.buttons.marginTopDim,buttonsMarginBottom:e.buttons.marginBottom,buttonsMarginBottomDim:e.buttons.marginBottomDim,buttonsBorder:e.buttons.border,buttonsAlign:e.buttons.textAlign,buttonsBorderRadius:e.buttons.borderRadius,buttonsPadding:e.buttons.padding,cardsContrastBackgroundColor:(null===(t=e.cards)||void 0===t?void 0:t.contrastBackgroundColor)||"#1C52DC",cardsBaseBackgroundColor:(null===(i=e.cards)||void 0===i?void 0:i.baseBackgroundColor)||"#F8F8F8",cardsContrastTextColor:(null===(n=e.cards)||void 0===n?void 0:n.contrastTextColor)||"#FFFFFF",cardsBaseTextColor:(null===(a=e.cards)||void 0===a?void 0:a.baseTextColor)||"#5A5A5A",cardsBorder:(null===(l=e.cards)||void 0===l?void 0:l.border)||{all:null,top:null,right:null,bottom:null,left:null},cardsBorderRadius:(null===(r=e.cards)||void 0===r?void 0:r.borderRadius)||{all:10,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null},blockBackgroundColor:(null===(o=e.block)||void 0===o?void 0:o.backgroundColor)||"",blockContrastBackgroundColor:(null===(s=e.block)||void 0===s?void 0:s.contrastBackgroundColor)||"#1C52DC",blockPaddingAll:null===(c=e.block)||void 0===c||null===(d=c.padding)||void 0===d?void 0:d.all,blockPaddingTop:null===(m=e.block)||void 0===m||null===(u=m.padding)||void 0===u?void 0:u.top,blockPaddingRight:null===(p=e.block)||void 0===p||null===(h=p.padding)||void 0===h?void 0:h.right,blockPaddingBottom:null===(g=e.block)||void 0===g||null===(f=g.padding)||void 0===f?void 0:f.bottom,blockPaddingLeft:null===(v=e.block)||void 0===v||null===(b=v.padding)||void 0===b?void 0:b.left}},Z={buttons_borderRadiusAll:"all",buttons_borderRadiusTopLeft:"topLeft",buttons_borderRadiusBottomLeft:"bottomLeft",buttons_borderRadiusTopRight:"topRight",buttons_borderRadiusBottomRight:"bottomRight"},G={cards_borderRadiusAll:"all",cards_borderRadiusTopLeft:"topLeft",cards_borderRadiusBottomLeft:"bottomLeft",cards_borderRadiusTopRight:"topRight",cards_borderRadiusBottomRight:"bottomRight"},K={blockPaddingTop:"top",blockPaddingLeft:"left",blockPaddingRight:"right",blockPaddingBottom:"bottom"},X=({className:e,email:t})=>{const{__:i}=(0,o.s9)(),r=(0,l.wA)(),s=(0,_.XW)(),[c]=a.lV.useForm(),m=(0,l.d4)(y.uJ),u=(0,l.d4)(y.dH),p=(0,l.d4)(H.mA),f=(0,g.rD)(),{token:v}=(0,a.rd)(),[w,C]=(0,n.useState)({}),[k,A]=(0,n.useState)({}),[S,I]=(0,n.useState)(!0),[x,L]=(0,n.useState)(!0),[N,T]=(0,n.useState)(!1),[B,P]=(0,n.useState)(!1),R={buttonsPaddingTop:"top",buttonsPaddingLeft:"left",buttonsPaddingRight:"right",buttonsPaddingBottom:"bottom"},F=(0,q.w)(null===t||void 0===t?void 0:t.common_styles,p),[O,M]=(0,n.useState)(F.headings.bold),[j,X]=(0,n.useState)(F.headings.italic),[Y,J]=(0,n.useState)(F.links.underline),[Q,ee]=(0,n.useState)(F.buttons.bold),[te,ie]=(0,n.useState)(F.buttons.italic),[ne,ae]=(0,n.useState)(null),le=!!t.common_styles&&"{}"!==t.common_styles,re=(0,l.d4)(E.Wm);(0,n.useEffect)(()=>{re||ae(null)},[F,ae,re]),(0,n.useEffect)(()=>{re&&!ne&&ae($(F))},[F,ne,re]),(0,n.useEffect)(()=>{u&&(r((0,y.RC)(!1)),c.setFieldsValue($(F)))},[c,u,r,F]);const[oe,se]=(0,n.useState)(Math.min(F.headings.fontSize-1,19)),[ce,de]=(0,n.useState)(Math.max(F.text.fontSize+1,20));(0,n.useEffect)(()=>{if(ne){var e,t,i,n,a,l,r,o,s,d,m,u,p;const h=ne.buttonsBorder;C(h);const g=Object.keys(h).find(e=>{var t,i,n;return(null===(t=h[e])||void 0===t?void 0:t.width)||(null===(i=h[e])||void 0===i?void 0:i.style)||(null===(n=h[e])||void 0===n?void 0:n.color)}),f=ne.cardsBorder;A(f);const v=Object.keys(f).find(e=>{var t,i,n;return(null===(t=f[e])||void 0===t?void 0:t.width)||(null===(i=f[e])||void 0===i?void 0:i.style)||(null===(n=f[e])||void 0===n?void 0:n.color)});c.setFieldsValue({buttons_borderPosition:g||"all",buttons_borderWidth:null!==(null===(e=h[g])||void 0===e?void 0:e.width)?null===(t=h[g])||void 0===t?void 0:t.width:"",buttons_borderColor:(null===(i=h[g])||void 0===i?void 0:i.color)||"",buttons_borderStyle:(null===(n=h[g])||void 0===n?void 0:n.style)||"",cards_borderPosition:v||"all",cards_borderWidth:null!==(null===(a=f[v])||void 0===a?void 0:a.width)?null===(l=f[v])||void 0===l?void 0:l.width:"",cards_borderColor:(null===(r=f[v])||void 0===r?void 0:r.color)||"",cards_borderStyle:(null===(o=f[v])||void 0===o?void 0:o.style)||"",buttons_borderRadiusAll:(0,U.ok)(ne.buttonsBorderRadius.all),buttons_borderRadiusTopLeft:(0,U.ok)(ne.buttonsBorderRadius.topLeft),buttons_borderRadiusBottomLeft:(0,U.ok)(ne.buttonsBorderRadius.bottomLeft),buttons_borderRadiusTopRight:(0,U.ok)(ne.buttonsBorderRadius.topRight),buttons_borderRadiusBottomRight:(0,U.ok)(ne.buttonsBorderRadius.bottomRight),cards_borderRadiusAll:(0,U.ok)(ne.cardsBorderRadius.all),cards_borderRadiusTopLeft:(0,U.ok)(ne.cardsBorderRadius.topLeft),cards_borderRadiusBottomLeft:(0,U.ok)(ne.cardsBorderRadius.bottomLeft),cards_borderRadiusTopRight:(0,U.ok)(ne.cardsBorderRadius.topRight),cards_borderRadiusBottomRight:(0,U.ok)(ne.cardsBorderRadius.bottomRight),blockPaddingAll:(0,U.ok)(ne.blockPaddingAll),blockPaddingTop:(0,U.ok)(ne.blockPaddingTop),blockPaddingRight:(0,U.ok)(ne.blockPaddingRight),blockPaddingBottom:(0,U.ok)(ne.blockPaddingBottom),blockPaddingLeft:(0,U.ok)(ne.blockPaddingLeft),blockPaddingLeftRight:(0,U.ok)(ne.blockPaddingRight)||(0,U.ok)(ne.blockPaddingLeft),blockPaddingTopBottom:(0,U.ok)(ne.blockPaddingTop)||(0,U.ok)(ne.blockPaddingBottom)}),(0,U.ok)(ne.blockPaddingAll)||!((0,U.ok)(ne.blockPaddingTop)||(0,U.ok)(ne.blockPaddingRight)||(0,U.ok)(ne.blockPaddingBottom)||(0,U.ok)(ne.blockPaddingLeft))||ne.blockPaddingTop===ne.blockPaddingBottom&&ne.blockPaddingRight===ne.blockPaddingLeft?P(!0):P(!1),!(0,U.ok)(ne.buttonsBorderRadius.all)&&((0,U.ok)(ne.buttonsBorderRadius.topLeft)||(0,U.ok)(ne.buttonsBorderRadius.bottomLeft)||(0,U.ok)(ne.buttonsBorderRadius.topRight)||(0,U.ok)(ne.buttonsBorderRadius.bottomRight))?I(!1):I(!0),ne.buttonsPadding&&!(0,U.ok)(ne.buttonsPadding.all)&&((0,U.ok)(ne.buttonsPadding.bottom)||(0,U.ok)(ne.buttonsPadding.right)||(0,U.ok)(ne.buttonsPadding.left)||(0,U.ok)(ne.buttonsPadding.top))&&T(!1),!(0,U.ok)(null===(s=ne.cardsBorderRadius)||void 0===s?void 0:s.all)&&((0,U.ok)(null===(d=ne.cardsBorderRadius)||void 0===d?void 0:d.topLeft)||(0,U.ok)(null===(m=ne.cardsBorderRadius)||void 0===m?void 0:m.bottomLeft)||(0,U.ok)(null===(u=ne.cardsBorderRadius)||void 0===u?void 0:u.topRight)||(0,U.ok)(null===(p=ne.cardsBorderRadius)||void 0===p?void 0:p.bottomRight))?L(!1):L(!0)}},[c,ne]);const me=e=>{const t=e.target.closest("button"),i=t.name,n=t.classList.contains("selected-td-form__button--active");t.className=n?"ant-btn ant-btn-default":"ant-btn ant-btn-default selected-td-form__button--active",t.blur(),"headingBold"===i?M(!n):"headingItalic"===i?X(!n):"linkUnderline"===i?J(!n):"buttonsBold"===i?ee(!n):"buttonsItalic"===i&&ie(!n),s({operation:h.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:{[i]:!n}})};return ne&&n.createElement("div",{className:d()("appearance-panel",{[e]:e})},n.createElement(a.lV,{form:c,layout:"vertical",name:"content_appearance_panel_form",initialValues:ne,onValuesChange:e=>{var t,i,n,a,l,r;const o=c.getFieldsValue(!0),d=Object.keys(e)[0];let m={};switch(d){case"headingFontSize":se(Math.min(o.headingFontSize-1,19)),m=e;break;case"textFontSize":de(Math.max(o.textFontSize+1,20)),m=e;break;case"buttons_borderStyle":m={buttonsBorder:{[o.buttons_borderPosition]:{...w[o.buttons_borderPosition],style:e[d]}}},"all"===o.buttons_borderPosition?C(t=>({...h.iV,[o.buttons_borderPosition]:{...t[o.buttons_borderPosition],style:e[d]}})):C(t=>({...t,[o.buttons_borderPosition]:{...t[o.buttons_borderPosition],style:e[d]}}));break;case"buttons_borderColor":m={buttonsBorder:{[o.buttons_borderPosition]:{...w[o.buttonsBorderPosition],color:e[d]}}},"all"===o.buttons_borderPosition?C(t=>({...h.iV,[o.buttons_borderPosition]:{...t[o.buttons_borderPosition],color:e[d]}})):C(t=>({...t,[o.buttons_borderPosition]:{...t[o.buttons_borderPosition],color:e[d]}}));break;case"buttons_borderWidth":m={buttonsBorder:{[o.buttons_borderPosition]:{...w[o.buttons_borderPosition],width:e[d]}}},"all"===o.buttonsBorderPosition?C(t=>({...h.iV,[o.buttons_borderPosition]:{...t[o.buttons_borderPosition],width:e[d]}})):C(t=>({...t,[o.buttons_borderPosition]:{...t[o.buttons_borderPosition],width:e[d]}}));break;case"buttons_borderPosition":c.setFieldsValue({buttons_borderWidth:(null===(t=w[e[d]])||void 0===t?void 0:t.width)||"",buttons_borderColor:(null===(i=w[e[d]])||void 0===i?void 0:i.color)||"",buttons_borderStyle:(null===(n=w[e[d]])||void 0===n?void 0:n.style)||""});break;case"cards_borderStyle":m={cardsBorder:{[o.cards_borderPosition]:{...k[o.cards_borderPosition],style:e[d]}}},"all"===o.cards_borderPosition?A(t=>({...h.iV,[o.cards_borderPosition]:{...t[o.cards_borderPosition],style:e[d]}})):A(t=>({...t,[o.cards_borderPosition]:{...t[o.cards_borderPosition],style:e[d]}}));break;case"cards_borderColor":m={cardsBorder:{[o.cards_borderPosition]:{...k[o.cardsBorderPosition],color:e[d]}}},"all"===o.cards_borderPosition?A(t=>({...h.iV,[o.cards_borderPosition]:{...t[o.cards_borderPosition],color:e[d]}})):A(t=>({...t,[o.cards_borderPosition]:{...t[o.cards_borderPosition],color:e[d]}}));break;case"cards_borderWidth":m={cardsBorder:{[o.cards_borderPosition]:{...k[o.cards_borderPosition],width:e[d]}}},"all"===o.cardsBorderPosition?A(t=>({...h.iV,[o.cards_borderPosition]:{...t[o.cards_borderPosition],width:e[d]}})):A(t=>({...t,[o.cards_borderPosition]:{...t[o.cards_borderPosition],width:e[d]}}));break;case"cards_borderPosition":c.setFieldsValue({cards_borderWidth:(null===(a=k[e[d]])||void 0===a?void 0:a.width)||"",cards_borderColor:(null===(l=k[e[d]])||void 0===l?void 0:l.color)||"",cards_borderStyle:(null===(r=k[e[d]])||void 0===r?void 0:r.style)||""});break;case"buttons_borderRadiusAll":case"buttons_borderRadiusTopLeft":case"buttons_borderRadiusBottomLeft":case"buttons_borderRadiusTopRight":case"buttons_borderRadiusBottomRight":m={buttonsBorderRadius:{[Z[d]]:+e[d]}};break;case"cards_borderRadiusAll":case"cards_borderRadiusTopLeft":case"cards_borderRadiusBottomLeft":case"cards_borderRadiusTopRight":case"cards_borderRadiusBottomRight":m={cardsBorderRadius:{[G[d]]:+e[d]}};break;case"buttonsPaddingTop":case"buttonsPaddingLeft":case"buttonsPaddingRight":case"buttonsPaddingBottom":N?(m={padding:{all:+e[d]}},c.setFieldsValue({paddingTop:e[d],paddingLeft:e[d],paddingRight:e[d],paddingBottom:e[d]})):m={buttonsPadding:{[R[d]]:+e[d]}};break;case"blockPaddingTop":case"blockPaddingLeft":case"blockPaddingRight":case"blockPaddingBottom":m={blockPadding:{[K[d]]:+e[d]}};break;case"blockPaddingTopBottom":m={blockPadding:{top:+e[d],bottom:+e[d]}},o.blockPaddingTop=o.blockPaddingBottom=+e[d];break;case"blockPaddingLeftRight":m={blockPadding:{left:+e[d],right:+e[d]}},o.blockPaddingLeft=o.blockPaddingRight=+e[d];break;default:m=e}"buttons_borderPosition"!==d&&s({operation:h.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:m})},autoComplete:"off",className:"element-controls"},le||h.EW.isPlugin?null:n.createElement(a.Fc,{style:{marginBottom:"24px"},message:i("It looks like the email was not created in our service, so the content styles won`t work. Read more about content styles in the help."),type:"info"}),n.createElement(a.y9,{title:i("Blocks"),dividerTop:!1},n.createElement(a.fI,{gutter:10},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Blocks background color"),placement:"bottom"},n.createElement(a.lV.Item,{name:"blockBackgroundColor",style:{marginBottom:v.formItemMarginBottomMD+4},rules:[{message:i("Please set the background color")}]},n.createElement(a.it,{placeholder:i("Background color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Background color of the contrast blocks"),placement:"bottom"},n.createElement(a.lV.Item,{name:"blockContrastBackgroundColor",style:{marginBottom:v.formItemMarginBottomMD+4},rules:[{message:i("Please set the background color")}]},n.createElement(a.it,{placeholder:i("Background color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")}))))),n.createElement(a.L1,{extended:B,onToggleExtended:()=>{P(e=>!e);const e=c.getFieldsValue(!0);if(!B){e.blockPaddingLeftRight=e.blockPaddingLeft,e.blockPaddingTopBottom=e.blockPaddingTop,e.blockPaddingRight=e.blockPaddingLeft,e.blockPaddingBottom=e.blockPaddingTop;const t=Number(e.blockPaddingTopBottom),i=Number(e.blockPaddingLeftRight);s({operation:h.Ru.SANDBOX_EMAIL_SETTINGS_SET,settings:{blockPadding:{top:Number.isFinite(t)?t:0,bottom:Number.isFinite(t)?t:0,left:Number.isFinite(i)?i:0,right:Number.isFinite(i)?i:0}}})}},fieldNames:{paddingLeftRight:"blockPaddingLeftRight",paddingLeft:"blockPaddingLeft",paddingRight:"blockPaddingRight",paddingTopBottom:"blockPaddingTopBottom",paddingTop:"blockPaddingTop",paddingBottom:"blockPaddingBottom"},labels:{horizontal:i("Horizontal padding"),vertical:i("Vertical padding"),left:i("Left padding"),right:i("Right padding"),top:i("Top padding"),bottom:i("Bottom padding"),individual:i("Individual padding")},gutter:10,rowStyle:{paddingBottom:4}})),n.createElement(a.y9,{title:i("General text"),dividerTop:!0},n.createElement(a.m_,{trigger:["hover"],title:i("Font of the general text"),placement:"bottom"},n.createElement(a.lV.Item,{name:"textFontFamily",style:{marginBottom:v.formItemMarginBottomXS}},n.createElement(a.LW,{loadGoogleFonts:D.c,getPopupContainer:e=>e.closest(".email-pane__content-col")}))),n.createElement(a.fI,{gutter:10},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Font size of the general text"),placement:"bottom"},n.createElement(a.lV.Item,{name:"textFontSize"},n.createElement(a.FQ,{min:15,max:oe,placeholder:i("Font size"),prefix:n.createElement(b.Ay,{icon:"FontSizeOutlined"}),addonAfter:"px"})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Line height of the general text"),placement:"bottom"},n.createElement(a.lV.Item,{name:"textLineHeight"},n.createElement(a.FQ,{min:0,placeholder:i("Line height"),prefix:n.createElement(b.Ay,{icon:"LineHeightOutlined"}),addonAfter:"px"}))))),n.createElement(a.fI,{gutter:10,style:{paddingBottom:4}},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Color of the general text"),placement:"bottom"},n.createElement(a.lV.Item,{name:"textColor"},n.createElement(a.it,{placeholder:i("Text color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Contrast block text color"),placement:"bottom"},n.createElement(a.lV.Item,{name:"textContrastColor"},n.createElement(a.it,{placeholder:i("Text color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")}))))),n.createElement(a.fI,{gutter:10,style:{paddingBottom:4}},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Bottom padding of the general text"),placement:"bottom"},n.createElement(a.lV.Item,{name:"textPaddingBottom"},n.createElement(a.FQ,{min:0,placeholder:i("Bottom padding"),prefix:n.createElement(b.Ay,{icon:"PaddingBottom"}),addonAfter:"px"})))))),n.createElement(a.y9,{title:i("Headings"),dividerTop:!0},n.createElement(a.m_,{trigger:["hover"],title:i("Heading font"),placement:"left"},n.createElement(a.lV.Item,{name:"headingFontFamily",style:{marginBottom:v.formItemMarginBottomXS}},n.createElement(a.LW,{loadGoogleFonts:D.c,getPopupContainer:e=>e.closest(".email-pane__content-col")}))),n.createElement(a.fI,{gutter:10},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Heading font size"),placement:"bottom"},n.createElement(a.lV.Item,{name:"headingFontSize",style:{marginBottom:v.formItemMarginBottomXS}},n.createElement(a.FQ,{min:ce,max:40,placeholder:i("Font size"),prefix:n.createElement(b.Ay,{icon:"FontSizeOutlined"}),addonAfter:"px"})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Heading line height"),placement:"bottom"},n.createElement(a.lV.Item,{name:"headingLineHeight",style:{marginBottom:v.formItemMarginBottomXS}},n.createElement(a.FQ,{min:0,placeholder:i("Line height"),prefix:n.createElement(b.Ay,{icon:"LineHeightOutlined"}),addonAfter:"px"}))))),n.createElement(a.fI,{gutter:10},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Heading letter spacing"),placement:"bottom"},n.createElement(a.lV.Item,{name:"headingLetterSpacing"},n.createElement(a.FQ,{min:0,placeholder:i("Letter spacing"),prefix:n.createElement(b.Ay,{icon:"ColumnWidthOutlined"}),addonAfter:"px"})))),n.createElement(a.fv,{span:12},n.createElement(a.$x,null,n.createElement(a.m_,{placement:"bottom",title:i("Strong")},n.createElement(a.$n,{className:d()({"selected-td-form__button--active":O}),type:"default",name:"headingBold",onClick:me},n.createElement(b.Ay,{icon:"BoldOutlined"}))),n.createElement(a.m_,{placement:"bottom",title:i("Italic")},n.createElement(a.$n,{className:d()({"selected-td-form__button--active":j}),type:"default",name:"headingItalic",onClick:me},n.createElement(b.Ay,{icon:"ItalicOutlined"})))))),n.createElement(a.fI,{gutter:10},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Heading color"),placement:"bottom"},n.createElement(a.lV.Item,{name:"headingColor"},n.createElement(a.it,{placeholder:i("Heading color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Contrast block header color"),placement:"bottom"},n.createElement(a.lV.Item,{name:"headingContrastColor"},n.createElement(a.it,{placeholder:i("Heading color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")}))))),n.createElement(a.fI,{gutter:10,style:{paddingBottom:4}},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Top padding"),placement:"bottom"},n.createElement(a.lV.Item,{name:"headingPaddingTop"},n.createElement(a.FQ,{min:0,placeholder:i("Top padding"),prefix:n.createElement(b.Ay,{icon:"PaddingTop"}),addonAfter:"px"})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Bottom padding"),placement:"bottom"},n.createElement(a.lV.Item,{name:"headingPaddingBottom"},n.createElement(a.FQ,{min:0,placeholder:i("Bottom padding"),prefix:n.createElement(b.Ay,{icon:"PaddingBottom"}),addonAfter:"px"})))))),n.createElement(a.y9,{title:i("Links"),dividerTop:!0},n.createElement(a.fI,{gutter:10},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Link color"),placement:"bottom"},n.createElement(a.lV.Item,{name:"linkColor",style:{marginBottom:v.formItemMarginBottomXS}},n.createElement(a.it,{placeholder:i("Link color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{placement:"bottom",title:i("Underline")},n.createElement(a.$n,{className:d()({"selected-td-form__button--active":Y}),type:"default",name:"linkUnderline",onClick:me},n.createElement(b.Ay,{icon:"UnderlineOutlined"}))))),n.createElement(a.fI,{gutter:10,style:{paddingBottom:4}},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Link color in contrasting blocks"),placement:"bottom"},n.createElement(a.lV.Item,{name:"linkContrastColor"},n.createElement(a.it,{placeholder:i("Link color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")})))))),n.createElement(a.y9,{title:n.createElement(n.Fragment,null,i("Buttons")," ",n.createElement("span",{className:"section-title-bull"},"\u2022")," ",i("Text & background")),dividerTop:!0},n.createElement(a.m_,{trigger:["hover"],title:i("Buttons font"),placement:"left"},n.createElement(a.lV.Item,{name:"buttonsFontFamily",style:{marginBottom:v.formItemMarginBottomXS}},n.createElement(a.LW,{loadGoogleFonts:D.c,getPopupContainer:e=>e.closest(".email-pane__content-col")}))),n.createElement(a.fI,{gutter:10},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Buttons font size"),placement:"bottom"},n.createElement(a.lV.Item,{name:"buttonsFontSize",style:{marginBottom:v.formItemMarginBottomXS}},n.createElement(a.FQ,{min:0,placeholder:i("Font size"),prefix:n.createElement(b.Ay,{icon:"FontSizeOutlined"}),addonAfter:"px"})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Buttons letter spacing"),placement:"bottom"},n.createElement(a.lV.Item,{name:"buttonsLetterSpacing",style:{marginBottom:v.formItemMarginBottomXS}},n.createElement(a.FQ,{min:0,placeholder:i("Letter spacing"),prefix:n.createElement(b.Ay,{icon:"ColumnWidthOutlined"}),addonAfter:"px"}))))),n.createElement(a.fI,{gutter:10,style:{paddingBottom:4}},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Buttons text color"),placement:"bottom"},n.createElement(a.lV.Item,{name:"buttonsColor",style:{marginBottom:v.formItemMarginBottomXS}},n.createElement(a.it,{placeholder:i("Buttons text color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Button text color in contrasting blocks"),placement:"bottom"},n.createElement(a.lV.Item,{name:"buttonsContrastColor",style:{marginBottom:v.formItemMarginBottomXS}},n.createElement(a.it,{placeholder:i("Buttons text color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Buttons background color"),placement:"bottom"},n.createElement(a.lV.Item,{name:"buttonsBackgroundColor"},n.createElement(a.it,{placeholder:i("Background color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Button background color in contrasting blocks"),placement:"bottom"},n.createElement(a.lV.Item,{name:"buttonsContrastBackgroundColor"},n.createElement(a.it,{placeholder:i("Background color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")})))),f.formButtonFieldTextAlignEnabled&&n.createElement(a.fv,{span:12},n.createElement(V.A,{form:c,elementSettings:{textAlign:"",type:"email"},imgParent:!1,name:"buttonsAlign",withHotKeys:!1})),n.createElement(a.fv,{span:12},n.createElement(a.$x,null,n.createElement(a.m_,{placement:"bottom",title:i("Strong")},n.createElement(a.$n,{className:d()({"selected-td-form__button--active":Q}),type:"default",name:"buttonsBold",onClick:me},n.createElement(b.Ay,{icon:"BoldOutlined"}))),n.createElement(a.m_,{placement:"bottom",title:i("Italic")},n.createElement(a.$n,{className:d()({"selected-td-form__button--active":te}),type:"default",name:"buttonsItalic",onClick:me},n.createElement(b.Ay,{icon:"ItalicOutlined"}))))))),f.formFieldBorderEnabled&&n.createElement(a.y9,{title:n.createElement(n.Fragment,null,i("Buttons")," ",n.createElement("span",{className:"section-title-bull"},"\u2022")," ",i("Borders")),dividerTop:!0},n.createElement("div",{style:{paddingBottom:4}},n.createElement(W.A,{form:c,borders:w,namePrefix:"buttons_"}))),f.formFieldBorderRadiusEnabled&&n.createElement(a.y9,{title:n.createElement(n.Fragment,null,i("Buttons")," ",n.createElement("span",{className:"section-title-bull"},"\u2022")," ",i("Border radius")),dividerTop:!0},n.createElement("div",{style:{paddingBottom:4}},n.createElement(z.A,{form:c,oneBorderRadiusValue:S,setOneBorderRadiusValue:I,elementSettings:ne,namePrefix:"buttons_"}))),n.createElement(a.y9,{title:n.createElement(n.Fragment,null,i("Buttons")," ",n.createElement("span",{className:"section-title-bull"},"\u2022")," ",i("Margins")),dividerTop:!0},n.createElement(a.fI,{gutter:10,style:{paddingBottom:4}},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Top margin"),placement:"bottom"},n.createElement(a.lV.Item,{name:"buttonsMarginTop"},n.createElement(a.FQ,{min:0,placeholder:i("Top margin"),prefix:n.createElement(b.Ay,{icon:"PaddingTop"}),addonAfter:"px"})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Bottom margin"),placement:"bottom"},n.createElement(a.lV.Item,{name:"buttonsMarginBottom"},n.createElement(a.FQ,{min:0,placeholder:i("Bottom margin"),prefix:n.createElement(b.Ay,{icon:"PaddingBottom"}),addonAfter:"px"})))))),n.createElement(a.y9,{title:n.createElement(n.Fragment,null,i("Cards")," ",n.createElement("span",{className:"section-title-bull"},"\u2022")," ",i("Colors")),dividerTop:!0},n.createElement(a.fI,{gutter:10},n.createElement(a.fv,{span:12},n.createElement(a.y9,{title:i("Base colors"),compact:!0},n.createElement(a.m_,{trigger:["hover"],title:i("Base background color"),placement:"bottom"},n.createElement(a.lV.Item,{name:"cardsBaseBackgroundColor",style:{marginBottom:v.formItemMarginBottomXS}},n.createElement(a.it,{placeholder:i("Base background color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")}))))),n.createElement(a.fv,{span:12},n.createElement(a.y9,{title:i("Contrasting colors"),compact:!0},n.createElement(a.m_,{trigger:["hover"],title:i("Contrasting background color"),placement:"bottom"},n.createElement(a.lV.Item,{name:"cardsContrastBackgroundColor",style:{marginBottom:v.formItemMarginBottomXS}},n.createElement(a.it,{placeholder:i("Contrasting background color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")})))))),n.createElement(a.fI,{gutter:10,style:{paddingBottom:4}},n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Base text color"),placement:"bottom"},n.createElement(a.lV.Item,{name:"cardsBaseTextColor"},n.createElement(a.it,{placeholder:i("Base text color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")})))),n.createElement(a.fv,{span:12},n.createElement(a.m_,{trigger:["hover"],title:i("Contrasting text color"),placement:"bottom"},n.createElement(a.lV.Item,{name:"cardsContrastTextColor"},n.createElement(a.it,{placeholder:i("Contrasting text color"),usedColors:m.usedColors,usedLabel:i("Used"),recommendedLabel:i("Recommended")})))))),f.formFieldBorderEnabled&&n.createElement(a.y9,{title:n.createElement(n.Fragment,null,i("Cards")," ",n.createElement("span",{className:"section-title-bull"},"\u2022")," ",i("Borders")),dividerTop:!0},n.createElement("div",{style:{paddingBottom:4}},n.createElement(W.A,{form:c,borders:k,namePrefix:"cards_"}))),f.formFieldBorderRadiusEnabled&&n.createElement(a.y9,{title:n.createElement(n.Fragment,null,i("Cards")," ",n.createElement("span",{className:"section-title-bull"},"\u2022")," ",i("Border radius")),dividerTop:!0},n.createElement("div",{style:{paddingBottom:4}},n.createElement(z.A,{form:c,oneBorderRadiusValue:x,setOneBorderRadiusValue:L,elementSettings:ne,namePrefix:"cards_"})))))},Y=({email:e})=>{const{__:t}=(0,o.s9)(),i=e.hasOwnProperty("type")?h.IE:h.Tm,[l,r]=(0,n.useState)(h.xz),s=(0,g.rD)(),c=!!e.common_styles&&"{}"!==e.common_styles,d=i===h.Tm&&s.commonStylesEnabled&&(h.EW.isPlugin||c);let m=[{label:n.createElement(n.Fragment,null,i===h.Tm?t("Global styles"):t("Block styles")),key:h.xz,forceRender:!0,className:"email-settings__collapse-panel",children:i===h.Tm?n.createElement(B,{className:"email-settings__collapse-panel-content",email:e}):n.createElement(j,{className:"email-settings__collapse-panel-content"})}];return d&&m.push({label:n.createElement(n.Fragment,null,t("Content styles")),key:"contentStyles",forceRender:!0,className:"email-settings__collapse-panel",children:n.createElement(X,{className:"email-settings__collapse-panel-content",email:e})}),n.createElement(n.Fragment,null,n.createElement(a.tU,{className:"secondary-tabs email-settings__collapse appearance-panel__content-styles",size:"large",activeKey:l,onChange:e=>r(e||""),items:m}))};var J=i(43930),Q=i(46638),ee=i(64172),te=i(44239),ie=i(1382),ne=i(66959);const ae=i.p+"static/media/icon-menu-block-welcome.1c534a003522feadd2e7.png";var le=i(29749),re=i(58981),oe=i(25857);const{name:se,type:ce,tags:de}={name:"name",type:"type",tags:"tags"},me={[se]:"",[ce]:[],[de]:[]},ue={Header:10,Menu:20,Banners:30,Content:40,Lists:50,Buttons:60,Promocodes:70,"E-Commerce":80,Transactional:80,Articles:90,Polls:100,Applications:110,Feature:120,Separators:130,Contacts:140,Footer:150},pe=({parentEmailId:e=h.iU,blocksTab:t,search:i,reloadBlockScreens:c,email:m,setIsShowAddAllBlocksModal:u})=>{const{projectId:p}=(0,r.g)(),g=(0,ie.sh)(),f=(0,ie._9)(),[v]=a.lV.useForm(),{data:y}=(0,te.h1)(),{token:_}=(0,a.rd)(),{__:w,_x:C}=(0,o.s9)(),k=(0,s.hN)(),{modal:A}=a.qw.useApp(),{confirm:S}=A;let I=(0,r.zy)();const x=(0,l.d4)(E.V$),L=(0,l.d4)(H.mA),N=(0,n.useRef)(null),T=(0,n.useRef)(null),B=(0,le.cR)(),P=207/660,R=e=>(0,oe.r)(e)?n.createElement("div",{className:"blocks-search__result-global-mark"},n.createElement(oe.a,{className:"block-global-badge--tile",size:14})):null,F=(0,n.useMemo)(()=>{if(h.EW.isPlugin)return(0,q.w)(null===m||void 0===m?void 0:m.common_styles,L);if("string"===typeof(null===m||void 0===m?void 0:m.common_styles)&&m.common_styles.startsWith("{"))try{return JSON.parse(m.common_styles)}catch{return{}}return{}},[null===m||void 0===m?void 0:m.common_styles,L]),O=(0,n.useRef)(null),M=(0,n.useRef)(null),j=(0,n.useRef)(null),D=(0,l.Pj)();(0,n.useEffect)(()=>{var e;null===(e=T.current)||void 0===e||e.scrollTo({top:0})},[t,i]);const{data:V}=ee.Nq.endpoints.getProject.select(+p)(D.getState()),[W,z]=(0,n.useState)({projectId:p,pageSize:1e3,page:1,tags:null,name:null,type:null,notEmbed:!0,order:"asc",orderby:"title"});(0,n.useEffect)(()=>{i||(v.setFieldsValue(me),Oe({type:null,name:null}),c())},[i,v,c]),(0,n.useEffect)(()=>{if(y){const e=y.schema.properties.acf.properties.type.items.enum;let t=[];for(let i in e)t.push({label:w(h.jg[e[i]]),value:e[i]})}},[y,w]);const{isSuccess:U,isError:$,isLoading:Z,isFetching:G,data:K,refetch:X,error:Y}=(0,te.SB)({...W,page:1}),pe=(0,n.useMemo)(()=>{if(U&&K)return[...K].sort((e,t)=>ue[e.type]-ue[t.type])},[U,K]),[he,ge]=(0,n.useState)([]);(0,ne.ZC)(e=>{e!==$&&k.fromError("BLOCK_GET_ERROR",{},Y,!0)},[$,Y,k]);const[fe,ve]=(0,n.useState)({emailId:e,pageSize:1e3,page:1,projectId:h.p5,notEmbed:!0,name:null,type:null}),{isSuccess:be,isError:ye,isLoading:Ee,isFetching:_e}=(0,te.OD)({...fe,emailId:e,page:1},{skip:!e||x.length}),we=(0,n.useMemo)(()=>{if(be||x.length)return[...x].sort((e,t)=>ue[e.type]-ue[t.type])},[be,x]),[Ce,ke]=(0,n.useState)([]);(0,n.useEffect)(()=>{const e=new Set;if(x.length&&we){for(const t of we)t.type&&e.add(t.type);ke(Array.from(e))}else ke([])},[x,we]);const[Ae,Se]=(0,n.useState)({pageSize:1e3,page:1,notEmbed:!0,name:null,type:null}),{isSuccess:Ie,isError:xe,isLoading:Le,isFetching:Ne,data:Te=[]}=(0,te.kz)({...Ae,page:1}),Be=(0,n.useMemo)(()=>{if(Te.length)return[...Te].sort((e,t)=>ue[e.type]-ue[t.type])},[Te]),[Pe,Re]=(0,n.useState)([]);(0,n.useEffect)(()=>{const e=new Set;if(Be&&Te.length){for(const t of Be)t.type&&e.add(t.type);Re(Array.from(e))}},[Te.length,Be]);const Fe=(0,n.useMemo)(()=>{const e=new Set;for(const t of he)e.add(t);for(const t of Ce)e.add(t);for(const t of Pe)e.add(t);return Array.from(e)},[Pe,Ce,he]),Oe=e=>{z(t=>({...t,...e,page:1})),ve(t=>({...t,...e,page:1})),Se(t=>({...t,...e,page:1}))},Me=(0,n.useCallback)(()=>{B.querySelector(".blocks-search__result-wrapper.is_search")&&(B.querySelector(".blocks-search__result-wrapper").style.removeProperty("transition"),B.querySelector(".blocks-search__result-wrapper").style.opacity=0,B.querySelectorAll(".blocks-search__result-body").forEach(e=>e.style.removeProperty("height")),B.querySelectorAll(".blocks-search__result-body").forEach(e=>{e.style.height=207*e.offsetHeight/660+"px"}),B.querySelector(".blocks-search__result-wrapper").style.transition="opacity 0.2s",B.querySelectorAll(".blocks-search__result-wrapper").forEach(e=>e.style.opacity=1))},[660,B]);(0,n.useEffect)(()=>{Ne||Le||!Ie||"template"===t||(i?Me():c())},[Ne,Le,Ie,Me,W.name,c,i,t]),(0,n.useEffect)(()=>{const e=new Set;if(U&&pe){for(const t of pe)t.type&&e.add(t.type);ge(Array.from(e))}},[U,pe]);const je=e=>{c(),e.target.getAttribute("data-type")?(e.target.closest(".blocks-search").querySelectorAll(".blocks-search__result").forEach(e=>e.style.display="none"),e.target.closest(".blocks-search").querySelectorAll(`[data-type="${e.target.getAttribute("data-type")}"]`).forEach(e=>e.style.display="block")):e.target.closest(".blocks-search").querySelectorAll(".blocks-search__result").forEach(e=>e.style.display="block"),e.target.parentElement.querySelector(".active").classList.remove("active"),e.target.classList.add("active")};let De=null;const Ve=e=>{clearTimeout(De);let t=B.querySelector(".block-search__preview")?B.querySelector(".block-search__preview"):null,i=B.querySelector(".block-search__preview-title")?B.querySelector(".block-search__preview-title"):null,n=B.querySelector(".block-search__preview-content")?B.querySelector(".block-search__preview-content"):null;B.querySelector(".block-search__preview")||(t=document.createElement("div"),t.classList.add("block-search__preview"),i=document.createElement("div"),i.classList.add("block-search__preview-title"),n=document.createElement("div"),n.classList.add("block-search__preview-content"),t.append(n),t.append(i),B.querySelector(".email-pane__col_settings-inner").append(t)),i.innerHTML="",n.innerHTML="",i.innerHTML=e.title;let a=e.html.replaceAll(/<style((.|\n|\r)*?)<\/style>/gi,"").trim();n.innerHTML=(0,re.p)('<table cellspacing="0" cellpadding="0" border="0" width="100%">'+a+"</table>"),"1"!==t.style.opacity&&setTimeout(function(){t.style.opacity="1",t.style.transform=document.querySelector(".email-pane__col-wrapper_reverse")?"translateX(100%)":"translateX(-100%)"},10)},We=()=>{let e=B.querySelector(".block-search__preview");e&&(De=setTimeout(()=>{e.style.opacity="0",e.style.transform=document.querySelector(".email-pane__col-wrapper_reverse")?"translateX(99%)":"translateX(-99%)",setTimeout(function(){e.remove()},300)},300))};(0,n.useEffect)(()=>{B.querySelectorAll(".blocks-search__result").forEach(e=>{e.style.display="block"})},[t]);const ze=!(null!==K&&void 0!==K&&K.length)&&(!e||!(null!==x&&void 0!==x&&x.length))&&!(null!==Te&&void 0!==Te&&Te.length)&&(W.tags||W.name||W.type)&&!(Z||G);(0,n.useEffect)(()=>{Z||G||c()},[Z,G,c]),(0,n.useEffect)(()=>{("common"===t||i)&&setTimeout(c,50)},[K,c,t,i]);const He=e=>{S({maskClosable:!0,centered:!0,title:C("Are you sure you want to delete the \u201c","block")+e.title+w("\u201d block?"),icon:n.createElement(b.Ay,{icon:"DeleteOutlined"}),okText:w("Yes"),cancelText:w("No"),onOk:()=>(e=>D.dispatch(te.VM.endpoints.deleteBlock.initiate(e.id)).then(t=>{t.error&&k.fromError("BLOCK_REMOVING_ERROR",(0,s.x_)(e),t.error),k.success({id:"BLOCK_REMOVING_SUCCESS",data:(0,s.x_)(e),message:w('The block "')+t.data.title+C('" was successfully removed.',"block")});try{X()}catch(Y){}}))(e)})},Ue=(e,t)=>`${e.pathname.split("emails")[0]}blocks/${t.id}`,qe=e=>{let t=[{key:"Delete block",className:"blocks-search__result__menu-item",icon:n.createElement(b.Ay,{icon:"DeleteOutlined",size:16,style:{margin:0}}),style:{color:_.colorError},onClick:()=>He(e)}];return!h.EW.isPlugin&&t.unshift({key:"Edit block",className:"blocks-search__result__menu-item",icon:n.createElement(b.Ay,{icon:"EditOutlined",style:{fontSize:"16px",margin:0}}),label:n.createElement("a",{target:"_blank",rel:"noreferrer noopener",href:Ue(I,e)}," ")}),t},$e=e=>{let t="<tr"===e.html.substring(0,3)?document.createElement("table"):document.createElement("div");if(t.replaceChildren(...(0,Q.$$)(e.html)),0!==Object.keys(F).length&&(t.querySelectorAll(".em-contrast-card").forEach(e=>{var t,i;null!==(t=F.cards)&&void 0!==t&&t.contrastBackgroundColor&&(e.getAttribute("bgcolor")?F.cards.contrastBackgroundColor?e.setAttribute("bgcolor",F.cards.contrastBackgroundColor):e.removeAttribute("bgcolor"):F.cards.contrastBackgroundColor?e.style.backgroundColor=F.cards.contrastBackgroundColor:e.style.removeProperty("background-color")),null!==(i=F.cards)&&void 0!==i&&i.contrastTextColor&&e.querySelectorAll('div[style*="font-family"], span[style*="font-family"]').forEach(e=>{if("#ffffff"!==Ge(e.style.color).toLowerCase()){let t=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.cards.contrastTextColor};`);e.setAttribute("style",t)}})}),t.querySelectorAll(".em-card").forEach(e=>{var t,i;null!==(t=F.cards)&&void 0!==t&&t.baseBackgroundColor&&(e.getAttribute("bgcolor")?F.cards.baseBackgroundColor?e.setAttribute("bgcolor",F.cards.baseBackgroundColor):e.removeAttribute("bgcolor"):F.cards.baseBackgroundColor?e.style.backgroundColor=F.cards.baseBackgroundColor:e.style.removeProperty("background-color")),null!==(i=F.cards)&&void 0!==i&&i.baseTextColor&&e.querySelectorAll('div[style*="font-family"], span[style*="font-family"]').forEach(e=>{if("#ffffff"!==Ge(e.style.color).toLowerCase()){let t=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.cards.baseTextColor};`);e.setAttribute("style",t)}})}),t.querySelectorAll(".em-card, .em-contrast-card").forEach(e=>{var t,i,n,a,l,r;null!==(t=F.cards)&&void 0!==t&&t.border&&Xe({settings:{border:null===(r=F.cards)||void 0===r?void 0:r.border},elem:e});if(null!==(i=F.cards)&&void 0!==i&&null!==(n=i.borderRadius)&&void 0!==n&&n.all){var o,s,c,d;if(e.style.borderBottomLeftRadius&&"0px"!==e.style.borderBottomLeftRadius)e.style.borderBottomLeftRadius=(null===(o=F.cards)||void 0===o?void 0:o.borderRadius.all)+"px";if(e.style.borderBottomRightRadius&&"0px"!==e.style.borderBottomRightRadius)e.style.borderBottomRightRadius=(null===(s=F.cards)||void 0===s?void 0:s.borderRadius.all)+"px";if(e.style.borderTopLeftRadius&&"0px"!==e.style.borderTopLeftRadius)e.style.borderTopLeftRadius=(null===(c=F.cards)||void 0===c?void 0:c.borderRadius.all)+"px";if(e.style.borderTopRightRadius&&"0px"!==e.style.borderTopRightRadius)e.style.borderTopRightRadius=(null===(d=F.cards)||void 0===d?void 0:d.borderRadius.all)+"px"}else if(""===(null===(a=F.cards)||void 0===a||null===(l=a.borderRadius)||void 0===l?void 0:l.all))e.style.removeProperty("border-radius");else{var m,u,p,h,g,f,v,b,y,E,_,w,C,k,A,S,I,x,L,N;if(null!==(m=F.cards)&&void 0!==m&&null!==(u=m.borderRadius)&&void 0!==u&&u.topLeft&&e.style.borderTopLeftRadius&&"0px"!==e.style.borderTopLeftRadius)e.style.borderTopLeftRadius=(null===(I=F.cards)||void 0===I?void 0:I.borderRadius.topLeft)+"px";else""===(null===(p=F.cards)||void 0===p||null===(h=p.borderRadius)||void 0===h?void 0:h.topLeft)&&e.style.removeProperty("border-top-left-radius");if(null!==(g=F.cards)&&void 0!==g&&null!==(f=g.borderRadius)&&void 0!==f&&f.topRight&&e.style.borderTopRightRadius&&"0px"!==e.style.borderTopRightRadius)e.style.borderTopRightRadius=(null===(x=F.cards)||void 0===x?void 0:x.borderRadius.topRight)+"px";else""===(null===(v=F.cards)||void 0===v||null===(b=v.borderRadius)||void 0===b?void 0:b.topRight)&&e.style.removeProperty("border-top-right-radius");if(null!==(y=F.cards)&&void 0!==y&&null!==(E=y.borderRadius)&&void 0!==E&&E.bottomRight&&e.style.borderBottomRightRadius&&"0px"!==e.style.borderBottomRightRadius)e.style.borderBottomRightRadius=(null===(L=F.cards)||void 0===L?void 0:L.borderRadius.bottomRight)+"px";else""===(null===(_=F.cards)||void 0===_||null===(w=_.borderRadius)||void 0===w?void 0:w.bottomRight)&&e.style.removeProperty("border-bottom-right-radius");if(null!==(C=F.cards)&&void 0!==C&&null!==(k=C.borderRadius)&&void 0!==k&&k.bottomLeft&&e.style.borderBottomLeftRadius&&"0px"!==e.style.borderBottomLeftRadius)e.style.borderBottomLeftRadius=(null===(N=F.cards)||void 0===N?void 0:N.borderRadius.bottomLeft)+"px";else""===(null===(A=F.cards)||void 0===A||null===(S=A.borderRadius)||void 0===S?void 0:S.bottomLeft)&&e.style.removeProperty("border-bottom-left-radius")}}),t.querySelectorAll('div[style*="font-family"], span[style*="font-family"]').forEach(e=>{if(!e.style.display&&parseFloat(e.style.fontSize)<=20){let n="",a=F.text.fontFamily;if(parseFloat(e.style.fontSize)>14&&(n=e.getAttribute("style").replace(/font-size:(\s+)?.*?px/,`font-size: ${F.text.fontSize}px`).replace(/line-height:(\s+)?.*?px/,`line-height: ${F.text.lineHeight}px`),e.setAttribute("style",n)),e.closest(".em-contrast-card, .em-card")||"#ffffff"===Ge(e.style.color).toLowerCase()||(n=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.text.color};`),e.setAttribute("style",n)),e.closest(".em-contrast-block")&&!e.closest(".em-contrast-card, .em-card")&&(n=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.text.contrastColor};`),e.setAttribute("style",n)),"Safe Fonts"===a[0]?(e.style.fontFamily=a[1],Ze({elem:t})):"Google Fonts"===a[0]&&("Sans Serif"===a[1]?e.style.fontFamily="Helvetica, Arial, sans-serif":"Serif"===a[1]&&(e.style.fontFamily='"Times New Roman", Times, serif'),e.classList.remove(...[...e.classList].filter(e=>e.startsWith("em-font"))),e.classList.add(`em-font-${a[2].replace(/\s/g,"")}-${a[3].replace(/\s/g,"")}`),Ke({elem:t,fontFamilyArray:a})),e.closest('[em="atom"] > tr > td')&&e.closest('[em="atom"] > tr > td').style.paddingBottom)e.closest('[em="atom"] > tr > td').style.paddingBottom=F.text.paddingBottom+"px";else if(e.nextElementSibling||e.closest("table")&&e.closest("table").nextElementSibling){var i;let t=null!==(i=e.nextElementSibling)&&void 0!==i?i:e.closest("table").nextElementSibling;t&&"TABLE"===t.tagName&&(t.classList.contains("em-vindent-table")||""===t.querySelector("td").innerHTML)&&t.querySelector("td").setAttribute("height",F.text.paddingBottom)}}else if(!e.style.display&&parseFloat(e.style.fontSize)>=20&&"#eb3737"!==Ge(e.style.color).toLowerCase()){let i="",n=F.headings.fontFamily;parseFloat(e.style.fontSize)<40&&(i=e.getAttribute("style").replace(/font-size:(\s+)?.*?px/,`font-size: ${F.headings.fontSize}px`).replace(/line-height:(\s+)?.*?px/,`line-height: ${F.headings.lineHeight}px`),e.setAttribute("style",i)),e.closest(".em-contrast-card, .em-card")||"#ffffff"===Ge(e.style.color).toLowerCase()||(i=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.headings.color};`),e.setAttribute("style",i)),e.closest(".em-contrast-block")&&!e.closest(".em-contrast-card, .em-card")&&(i=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.headings.contrastColor};`),e.setAttribute("style",i)),"Safe Fonts"===n[0]?(e.style.fontFamily=n[1],Ze({elem:t})):"Google Fonts"===n[0]&&("Sans Serif"===n[1]?e.style.fontFamily="Helvetica, Arial, sans-serif":"Serif"===n[1]&&(e.style.fontFamily='"Times New Roman", Times, serif'),e.classList.remove(...[...e.classList].filter(e=>e.startsWith("em-font"))),e.classList.add(`em-font-${n[2].replace(/\s/g,"")}-${n[3].replace(/\s/g,"")}`),Ke({elem:t,fontFamilyArray:n}));let a="";if(a=F.headings.letterSpacing>0?e.style.letterSpacing?e.getAttribute("style").replace(/letter-spacing:(\s+)?.*?px/,`letter-spacing: ${F.headings.letterSpacing}px`):e.getAttribute("style")+` letter-spacing: ${F.headings.letterSpacing}px;`:e.getAttribute("style").replace(/(\s+)?letter-spacing:(\s+)?.*?px(;)?/,""),e.setAttribute("style",a),F.headings.bold?e.querySelector("b")?e.querySelector("b").replaceWith(...e.querySelector("b").childNodes):e.querySelector("strong")||(e.innerHTML="<strong>"+e.innerHTML+"</strong>"):e.querySelector("strong")?e.querySelector("strong").replaceWith(...e.querySelector("strong").childNodes):e.querySelector("b")&&e.querySelector("b").replaceWith(...e.querySelector("b").childNodes),e.style.fontWeight){let t=e.getAttribute("style").replace(/(\s+)?font-weight:(\s+)?(bold|[0-9]*)(;)?/,"");e.setAttribute("style",t)}if(F.headings.italic?e.querySelector("i")?e.querySelector("i").replaceWith(...e.querySelector("i").childNodes):e.querySelector("em")||(e.innerHTML="<em>"+e.innerHTML+"</em>"):e.querySelector("em")?e.querySelector("em").replaceWith(...e.querySelector("em").childNodes):e.querySelector("i")&&e.querySelector("i").replaceWith(...e.querySelector("i").childNodes),e.style.fontStyle){let t=e.getAttribute("style").replace(/(\s+)?font-style:(\s+)?.*?;/,"");e.setAttribute("style",t)}if(e.closest('[em="atom"] > tr > td')&&e.closest('[em="atom"] > tr > td').style.paddingTop)e.closest('[em="atom"] > tr > td').style.paddingTop=F.headings.paddingTop+"px";else if(e.previousElementSibling){let t=e.previousElementSibling;t&&"TABLE"===t.tagName&&(t.classList.contains("em-vindent-table")||""===t.querySelector("td").innerHTML)&&t.querySelector("td").setAttribute("height",F.headings.paddingTop)}if(e.closest('[em="atom"] > tr > td')&&e.closest('[em="atom"] > tr > td').style.paddingBottom)e.closest('[em="atom"] > tr > td').style.paddingBottom=F.headings.paddingBottom+"px";else if(e.nextElementSibling){let t=e.nextElementSibling;t&&"TABLE"===t.tagName&&(t.classList.contains("em-vindent-table")||""===t.querySelector("td").innerHTML)&&t.querySelector("td").setAttribute("height",F.headings.paddingBottom)}}}),t.querySelectorAll('a[style*="color"]').forEach(e=>{if(e.style.display){if(e.style.display&&"block"===e.style.display){let i="";if(i=e.getAttribute("style").replace(/font-size:(\s+)?.*?px/,`font-size: ${F.buttons.fontSize}px`),e.setAttribute("style",i),!e.closest("td").style.backgroundColor||e.closest("td").style.borderWidth||e.closest(".em-contrast-card"))if(e.closest("td").style.borderWidth)if(Object.values(F.buttons.border).every(e=>null===e)){if(e.closest(".em-contrast-block")){if(F.buttons.contrastBackgroundColor){let t=e.closest("td").getAttribute("style").replace(/border:\s*\d+px\s+solid\s+#[A-Fa-f0-9]{6}/,e=>e.replace(/#[A-Fa-f0-9]{6}/,`${F.buttons.contrastBackgroundColor}`));e.closest("td").setAttribute("style",t),i=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.buttons.contrastBackgroundColor};`),e.setAttribute("style",i)}}else if(F.buttons.backgroundColor){let t=e.closest("td").getAttribute("style").replace(/border:\s*\d+px\s+solid\s+#[A-Fa-f0-9]{6}/,e=>e.replace(/#[A-Fa-f0-9]{6}/,`${F.buttons.backgroundColor}`));e.closest("td").setAttribute("style",t),i=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.buttons.backgroundColor};`),e.setAttribute("style",i)}}else for(const t in F.buttons.border)F.buttons.border[t]&&void 0!==F.buttons.border[t].color&&(i=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.buttons.border[t].color};`),e.setAttribute("style",i));else e.closest(".em-contrast-block")?F.buttons.contrastBackgroundColor&&(i=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.buttons.contrastBackgroundColor};`),e.setAttribute("style",i)):F.buttons.backgroundColor&&(i=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.buttons.backgroundColor};`),e.setAttribute("style",i));else if(i=e.closest(".em-contrast-block")?e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.buttons.contrastColor};`):e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.buttons.color};`),e.setAttribute("style",i),e.closest(".em-contrast-block"))if(F.buttons.contrastBackgroundColor){let t=e.closest("td").getAttribute("style").replace(/background-color:(\s+)?.*?;/,`background-color: ${F.buttons.contrastBackgroundColor};`);e.closest("td").setAttribute("style",t)}else e.closest("td").style.removeProperty("background-color");else if(F.buttons.backgroundColor){let t=e.closest("td").getAttribute("style").replace(/background-color:(\s+)?.*?;/,`background-color: ${F.buttons.backgroundColor};`);e.closest("td").setAttribute("style",t)}else e.closest("td").style.removeProperty("background-color");let n=F.buttons.fontFamily;"Safe Fonts"===n[0]?(e.style.fontFamily=n[1],Ze({elem:t})):"Google Fonts"===n[0]&&("Sans Serif"===n[1]?e.style.fontFamily="Helvetica, Arial, sans-serif":"Serif"===n[1]&&(e.style.fontFamily='"Times New Roman", Times, serif'),e.classList.remove(...[...e.classList].filter(e=>e.startsWith("em-font"))),e.classList.add(`em-font-${n[2].replace(/\s/g,"")}-${n[3].replace(/\s/g,"")}`),Ke({elem:t,fontFamilyArray:n})),e.closest("td").setAttribute("align",F.buttons.textAlign);let a="";if(a=F.buttons.letterSpacing>0?e.style.letterSpacing?e.getAttribute("style").replace(/letter-spacing:(\s+)?.*?px/,`letter-spacing: ${F.buttons.letterSpacing}px`):e.getAttribute("style")+` letter-spacing: ${F.buttons.letterSpacing}px;`:e.getAttribute("style").replace(/(\s+)?letter-spacing:(\s+)?.*?px(;)?/,""),e.setAttribute("style",a),F.buttons.bold?e.querySelector("b")?e.querySelector("b").replaceWith(...e.querySelector("b").childNodes):e.querySelector("strong")||(e.innerHTML="<strong>"+e.innerHTML+"</strong>"):e.querySelector("strong")?e.querySelector("strong").replaceWith(...e.querySelector("strong").childNodes):e.querySelector("b")&&e.querySelector("b").replaceWith(...e.querySelector("b").childNodes),e.style.fontWeight){let t=e.getAttribute("style").replace(/(\s+)?font-weight:(\s+)?(bold|[0-9]*)(;)?/,"");e.setAttribute("style",t)}if(F.buttons.italic?e.querySelector("i")?e.querySelector("i").replaceWith(...e.querySelector("i").childNodes):e.querySelector("em")||(e.innerHTML="<em>"+e.innerHTML+"</em>"):e.querySelector("em")?e.querySelector("em").replaceWith(...e.querySelector("em").childNodes):e.querySelector("i")&&e.querySelector("i").replaceWith(...e.querySelector("i").childNodes),e.style.fontStyle){let t=e.getAttribute("style").replace(/(\s+)?font-style:(\s+)?.*?;/,"");e.setAttribute("style",t)}if(e.closest('[em="atom"] > tr > td')&&e.closest('[em="atom"] > tr > td').style.paddingTop)e.closest('[em="atom"] > tr > td').style.paddingTop=F.buttons.marginTop+"px";else if(e.closest("table").previousElementSibling){let t=e.closest("table").previousElementSibling;t&&"TABLE"===t.tagName&&(t.classList.contains("em-vindent-table")||""===t.querySelector("td").innerHTML)&&t.querySelector("td").setAttribute("height",F.buttons.marginTop)}if(e.closest('[em="atom"] > tr > td')&&e.closest('[em="atom"] > tr > td').style.paddingBottom)e.closest('[em="atom"] > tr > td').style.paddingBottom=F.buttons.marginBottom+"px";else if(e.closest("table").previousElementSibling){let t=e.closest("table").nextElementSibling;t&&"TABLE"===t.tagName&&(t.classList.contains("em-vindent-table")||""===t.querySelector("td").innerHTML)&&t.querySelector("td").setAttribute("height",F.buttons.marginBottom)}F.buttons.padding.all&&(e.style.padding=F.buttons.padding.all+"px"),F.buttons.padding.top&&(e.style.paddingTop=F.buttons.padding.top+"px"),F.buttons.padding.right&&(e.style.paddingRight=F.buttons.padding.right+"px"),F.buttons.padding.bottom&&(e.style.paddingBottom=F.buttons.padding.bottom+"px"),F.buttons.padding.left&&(e.style.paddingLeft=F.buttons.padding.left+"px"),Xe({settings:{border:F.buttons.border},elem:e.closest("td")}),Ye({settings:{borderRadius:F.buttons.borderRadius},elem:e.closest("td")})}}else{let i=F.text.fontFamily;if("#1c52dc"===Ge(e.style.color).toLowerCase()){let t=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.links.color};`);e.setAttribute("style",t)}else{let t=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.text.color};`);e.setAttribute("style",t)}if(e.closest(".em-contrast-block")){let t=e.getAttribute("style").replace(/color:(\s+)?.*?;/,`color: ${F.links.contrastColor};`);e.setAttribute("style",t)}let n="";n=F.links.underline?e.style.textDecoration?e.getAttribute("style").replace(/(\s+)?text-decoration:(\s+)?.*?;/,"text-decoration: underline;"):e.getAttribute("style")+" text-decoration: underline;":e.style.textDecoration?e.getAttribute("style").replace(/(\s+)?text-decoration:(\s+)?.*?;/,"text-decoration: none;"):e.getAttribute("style")+" text-decoration: none;",e.setAttribute("style",n),"Safe Fonts"===i[0]?(e.style.fontFamily=i[1],Ze({elem:t})):"Google Fonts"===i[0]&&("Sans Serif"===i[1]?e.style.fontFamily="Helvetica, Arial, sans-serif":"Serif"===i[1]&&(e.style.fontFamily='"Times New Roman", Times, serif'),e.classList.remove(...[...e.classList].filter(e=>e.startsWith("em-font"))),e.classList.add(`em-font-${i[2].replace(/\s/g,"")}-${i[3].replace(/\s/g,"")}`),Ke({elem:t,fontFamilyArray:i}))}}),t.querySelector('[em="block"]'))){var i,n;const e=t.querySelectorAll('[em="block"]');null!==(i=F.block)&&void 0!==i&&i.backgroundColor&&e.forEach(e=>{e.querySelectorAll(":scope > td").forEach(e=>{e.setAttribute("bgcolor",F.block.backgroundColor)})}),null!==(n=F.block)&&void 0!==n&&n.padding&&e.forEach(e=>{e.querySelectorAll(":scope > td").forEach(e=>{e.style.paddingTop=F.block.padding.top+"px",e.style.paddingRight=F.block.padding.right+"px",e.style.paddingBottom=F.block.padding.bottom+"px",e.style.paddingLeft=F.block.padding.left+"px"})})}return"DIV"===t.tagName?(0,J.uL)(t):(0,J.uL)(t.querySelector("tbody"))},Ze=e=>{e.elem.querySelectorAll("link[em-class]").forEach(t=>{e.elem.querySelector("."+t.getAttribute("em-class"))||t.remove()})};function Ge(e){if(e&&"r"===e.charAt(0)){if("a"===e.charAt(3))return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):"";{e=e.replace("rgb(","").replace(")","").split(",");let t=parseInt(e[0],10).toString(16),i=parseInt(e[1],10).toString(16),n=parseInt(e[2],10).toString(16);return t=1===t.length?"0"+t:t,i=1===i.length?"0"+i:i,n=1===n.length?"0"+n:n,"#"+t+i+n}}if(e&&"#"===e.charAt(0))return e}const Ke=e=>{var t;const i=e.elem.querySelectorAll("link"),n=`em-font-${e.fontFamilyArray[2].replace(/\s/g,"")}-${e.fontFamilyArray[3].replace(/\s/g,"")}`;if(!!(null===(t=Array.from(i))||void 0===t||!t.find(e=>e.getAttribute("em-class")===n))){let t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",`https://fonts.googleapis.com/css2?family=${e.fontFamilyArray[2]}:ital,wght@${Je[e.fontFamilyArray[3]].indexOf("i")>-1?"1":"0"},${Je[e.fontFamilyArray[3]].replaceAll("i","")}&display=swap`),t.setAttribute("em-class",n),e.elem.insertAdjacentElement("afterbegin",t)}!function(e){if(!e.elem.querySelector('style[em="styles"]')){let t=document.createElement("style");t.setAttribute("em","styles"),e.elem.append(t)}}({elem:e.elem});let a=`font-family: '${e.fontFamilyArray[2]}', ${Qe[e.fontFamilyArray[1]]}!important;`;a+=` font-weight: ${Je[e.fontFamilyArray[3]].replaceAll("i","")}!important;`,Je[e.fontFamilyArray[3]].indexOf("i")>-1&&(a+=" font-style: italic!important;"),e.elem.querySelector('style[em="styles"]').insertAdjacentHTML("beforeend",`\n.em-font-${e.fontFamilyArray[2].replace(/\s/g,"")}-${e.fontFamilyArray[3].replace(/\s/g,"")} { ${a} }`),setTimeout(()=>Ze({elem:e.elem}),0)},Xe=e=>{e.settings.border.all?null!=e.settings.border.all.width&&(e.settings.border.all.style||e.settings.border.all.color)?(e.elem.style.borderWidth=e.settings.border.all.width+"px",e.elem.style.borderStyle=e.settings.border.all.style,e.elem.style.borderColor=e.settings.border.all.color):e.elem.style.removeProperty("border"):(e.settings.border.top&&(null!=e.settings.border.top.width&&(e.settings.border.top.style||e.settings.border.top.color)?(e.elem.style.borderTopWidth=e.settings.border.top.width+"px",e.elem.style.borderTopStyle=e.settings.border.top.style,e.elem.style.borderTopColor=e.settings.border.top.color):e.elem.style.removeProperty("border-top")),e.settings.border.right&&(null!=e.settings.border.right.width&&(e.settings.border.right.style||e.settings.border.right.color)?(e.elem.style.borderRightWidth=e.settings.border.right.width+"px",e.elem.style.borderRightStyle=e.settings.border.right.style,e.elem.style.borderRightColor=e.settings.border.right.color):e.elem.style.removeProperty("border-right")),e.settings.border.bottom&&(null!=e.settings.border.bottom.width&&(e.settings.border.bottom.style||e.settings.border.bottom.color)?(e.elem.style.borderBottomWidth=e.settings.border.bottom.width+"px",e.elem.style.borderBottomStyle=e.settings.border.bottom.style,e.elem.style.borderBottomColor=e.settings.border.bottom.color):e.elem.style.removeProperty("border-bottom")),e.settings.border.left&&(null!=e.settings.border.left.width&&(e.settings.border.left.style||e.settings.border.left.color)?(e.elem.style.borderLeftWidth=e.settings.border.left.width+"px",e.elem.style.borderLeftStyle=e.settings.border.left.style,e.elem.style.borderLeftColor=e.settings.border.left.color):e.elem.style.removeProperty("border-left")))},Ye=e=>{e.settings.borderRadius.all?e.elem.style.borderRadius=e.settings.borderRadius.all+"px":""===e.settings.borderRadius.all?e.elem.style.removeProperty("border-radius"):(e.settings.borderRadius.topLeft?e.elem.style.borderTopLeftRadius=e.settings.borderRadius.topLeft+"px":""===e.settings.borderRadius.topLeft&&e.elem.style.removeProperty("border-top-left-radius"),e.settings.borderRadius.topRight?e.elem.style.borderTopRightRadius=e.settings.borderRadius.topRight+"px":""===e.settings.borderRadius.topRight&&e.elem.style.removeProperty("border-top-right-radius"),e.settings.borderRadius.bottomRight?e.elem.style.borderBottomRightRadius=e.settings.borderRadius.bottomRight+"px":""===e.settings.borderRadius.bottomRight&&e.elem.style.removeProperty("border-bottom-right-radius"),e.settings.borderRadius.bottomLeft?e.elem.style.borderBottomLeftRadius=e.settings.borderRadius.bottomLeft+"px":""===e.settings.borderRadius.bottomLeft&&e.elem.style.removeProperty("border-bottom-left-radius"))},Je={Thin:"100","Thin Italic":"100i",ExtraLight:"200","ExtraLight Italic":"200i",Light:"300","Light Italic":"300i",Regular:"400","Regular Italic":"400i",Medium:"500","Medium Italic":"500i",SemiBold:"600","SemiBold Italic":"600i",Bold:"700","Bold Italic":"700i",ExtraBold:"800","ExtraBold Italic":"800i",Black:"900","Black Italic":"900i"},Qe={"Sans Serif":"sans-serif",Serif:"serif"};return n.createElement("div",{className:d()("blocks-search",{is_search:i})},n.createElement(a.lV,{className:d()("blocks-search__form",{is_search:i}),form:v,layout:"vertical",name:"blocks_search_form",initialValues:{...me},onValuesChange:e=>{const t=Object.keys(e)[0],i=v.getFieldsValue(!0);switch(t){case de:const n=(0,ie._q)(V,h.YY).filter(i=>e[t].includes(i.name)).map(e=>e.id)||null;Oe({tags:n});break;case ce:Oe({type:i.type||null});break;case se:N.current&&window.clearTimeout(N.current),N.current=window.setTimeout(function(){Oe({name:i.name||null})},300)}},autoComplete:"off"},n.createElement(a.lV.Item,{name:se},n.createElement(a.DO,{placeholder:w("Search by title"),allowClear:!0,enterButton:!1}))),($||ye||xe)&&n.createElement(a.Fc,{message:w("Error"),description:w("Error when receiving data. Try again (reload page) or contact support."),type:"error",showIcon:!0}),i&&!ze&&n.createElement("div",{className:"blocks-search__type-wrapper"},n.createElement("ul",null,n.createElement("li",{key:"search_All","data-type":"",className:"active",onClick:je},w("All")),Fe.map(e=>n.createElement("li",{"data-type":e,onClick:je,key:"search_"+e},w(h.jg[e]))))),n.createElement("div",{ref:T,className:d()("blocks-search__result-wrapper",{is_search:i})},("project"===t||i)&&n.createElement(n.Fragment,null,!!he.length&&!i&&n.createElement("div",{className:"blocks-search__type-wrapper"},n.createElement("ul",null,n.createElement("li",{key:"blocksSections_All","data-type":"",className:"active",onClick:je},w("All")),he.map(e=>n.createElement("li",{key:"blocksSections_"+e,"data-type":e,onClick:je},w(h.jg[e]))))),n.createElement("div",{className:d()("blocks-search__blocks-wrapper",{is_search:i}),ref:O},n.createElement("div",{className:"blocks-search__result-holder project"},!(Z||G)&&(null!==pe&&void 0!==pe&&pe.length?pe.map((e,t)=>{const i=(0,re.p)('<table cellspacing="0" cellpadding="0" border="0" width="100%">'+e.html+"</table>");return n.createElement("div",{className:"blocks-search__result","data-type":e.type,key:e.id+t.toString()},n.createElement(a.ms,{key:"commenMenu",placement:"leftTop",menu:{items:qe(e)},overlayStyle:{minWidth:"auto",paddingRight:6}},n.createElement("div",{className:"ant-card-hoverable blocks-search__result-body",draggable:!0,onClick:t=>g(t,e.html,"project"),onDragStart:t=>f(t,e.html,"project"),onMouseEnter:()=>Ve({html:e.html,title:e.title}),onMouseLeave:We},R(e),n.createElement("div",{className:"blocks-search__result-html",dangerouslySetInnerHTML:{__html:i},style:{transform:`scale(${P})`}}))))}):!(W.tags||W.name||W.type)&&U&&!(Z||G)&&!i&&n.createElement("div",{style:{padding:"10px 0 20px",display:"flex",flexDirection:"row",justifyContent:"space-between"}},n.createElement("div",{style:{width:"110%"}},n.createElement("h3",{style:{lineHeight:"1.2"}},w("You don`t have any saved blocks yet.")),w("To add a block from the dashboard click the"),' "',w("Save to Blocks button."),'" ',n.createElement(b.Ay,{icon:"SaveBlock",style:{position:"relative",top:"2px"}}),n.createElement("br",null),n.createElement("br",null),w("You can also save all blocks at once. The AI assistant will automatically determine the type and create a name for each block when saving."),n.createElement("br",null),n.createElement("br",null),n.createElement(a.so,{justify:"left"},n.createElement(a.$n,{type:"primary",onClick:()=>u(!0),style:{cursor:"pointer"}},w("Save all blocks")))),n.createElement("div",{style:{width:"80px",height:"200px"}},n.createElement("img",{src:ae,style:{display:"block",width:80,position:"absolute",right:5}}))))),(Z||G)&&n.createElement(a.EA,{active:!0}))),i&&(null===K||void 0===K?void 0:K.length)>0&&(null===x||void 0===x?void 0:x.length)>0&&n.createElement(a.cG,{className:"blocks-search__result-divider"}),("template"===t||i)&&n.createElement(n.Fragment,null,!!Ce.length&&!i&&n.createElement("div",{className:"blocks-search__type-wrapper"},n.createElement("ul",null,n.createElement("li",{"data-type":"",className:"active",onClick:je,key:"templateBlocksSections_All"},w("All")),Ce.map(e=>n.createElement("li",{key:"templateBlocksSections_"+e,"data-type":e,onClick:je},w(h.jg[e]))))),n.createElement("div",{className:d()("blocks-search__blocks-wrapper",{is_search:i}),ref:M},n.createElement("div",{className:"blocks-search__result-holder template"},x&&!Ee&&!_e&&null!==we&&void 0!==we&&we.length?n.createElement(n.Fragment,null,we.map((e,t)=>{const i=(0,re.p)('<table cellspacing="0" cellpadding="0" border="0" width="100%">'+e.html+"</table>");return n.createElement("div",{className:"blocks-search__result","data-type":e.type,key:e.id+t.toString()},n.createElement("div",{className:"ant-card-hoverable blocks-search__result-body",draggable:!0,onClick:t=>g(t,e.html,"template"),onDragStart:t=>f(t,e.html,"template"),onMouseEnter:()=>Ve({html:e.html,title:e.title}),onMouseLeave:()=>We()},R(e),n.createElement("div",{className:"blocks-search__result-html",dangerouslySetInnerHTML:{__html:i},style:{transform:`scale(${P})`}})))})):!i&&!Le&&!_e&&n.createElement("div",{className:"blocks-search__type",style:{padding:"10px 0 20px"}},w("No related blocks found."))," "),(Ee||_e)&&n.createElement(a.EA,{active:!0}))),i&&(null===x||void 0===x?void 0:x.length)>0&&(null===Te||void 0===Te?void 0:Te.length)>0&&n.createElement(a.cG,{className:"blocks-search__result-divider"}),("common"===t||i)&&n.createElement(n.Fragment,null,!(null===Pe||void 0===Pe||!Pe.length)&&!i&&n.createElement("div",{className:"blocks-search__type-wrapper"},n.createElement("ul",null,n.createElement("li",{"data-type":"",className:"active",onClick:je,key:"commonBlocksSections_All"},w("All")),Pe.map(e=>n.createElement("li",{"data-type":e,onClick:je,key:"commonBlocksSections_"+e},w(h.jg[e]))))),n.createElement("div",{className:d()("blocks-search__blocks-wrapper",{is_search:i}),ref:j},n.createElement("div",{className:"blocks-search__result-holder common"},Ie&&!(null===Be||void 0===Be||!Be.length)&&!(Ne||Le)&&n.createElement(n.Fragment,null,Be.map((e,t)=>{const i=$e({html:(0,re.p)('<table cellspacing="0" cellpadding="0" border="0" width="100%">'+e.html+"</table>")});return n.createElement("div",{className:"blocks-search__result","data-type":e.type,key:e.id+t.toString()},n.createElement("div",{className:"ant-card-hoverable blocks-search__result-body",draggable:!0,onClick:t=>g(t,$e({html:e.html}),"common"),onDragStart:t=>f(t,$e({html:e.html}),"common"),onMouseEnter:()=>Ve({html:$e({html:(0,re.p)('<table cellspacing="0" cellpadding="0" border="0" width="100%">'+e.html+"</table>")}),title:e.title}),onMouseLeave:()=>We()},R(e),n.createElement("div",{className:"blocks-search__result-html",dangerouslySetInnerHTML:{__html:i},style:{transform:`scale(${P})`}})))}))," "),(Le||Ne)&&n.createElement(a.EA,{active:!0}))),ze&&n.createElement("div",{className:"blocks-search__type",style:{padding:"10px 0 20px"}},w("There are no blocks for this request."))))};var he=i(94766),ge=i(87332);const fe=`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <img src=${i.p+"static/media/empty-image.1827d6561f3c4042dfb3.png"} width="150" border="0" alt="" style="display: block; width: 100%; max-width: 150px;" />\n</td></tr></table>`,ve=`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <img class="em-ai-img em-just-inserted" src="${i.p+"static/media/ai-image.7c42c2e12001ebf31881.png"}" width="150" border="0" alt="" style="display: block; width: 100%; max-width: 150px;" />\n</td></tr></table>`;var be=i(10324),ye=i.n(be),Ee=i(32294),_e=i.n(Ee),we=i(7579),Ce=i.n(we),ke=i(32802),Ae=i.n(ke),Se=i(22456),Ie=i.n(Se),xe=i(73706),Le=i.n(xe),Ne=i(29299),Te=i.n(Ne),Be=i(42420);i(84973);function Pe(e){return String(null!==e&&void 0!==e?e:"").replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;")}const Re=(0,Be.v3)(),{iconSize:Fe,gap:Oe,align:Me}={align:"center",iconSize:40,borderRadius:0,gap:8,bgEnabled:!1,bgColor:"",borderWidth:0,borderColor:"",buttonBorderColor:"",buttonBorderWidth:0,showLabel:!1},je=Math.max(0,Math.round(Number(Oe)||0)),De=Re.length>1,Ve=Re.map((e,t)=>{const i=function(e){var t;const i=String(null!==e&&void 0!==e?e:"").trim();if(!i)return"";if(/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(i))return i;const n="undefined"!==typeof window&&null!==(t=window.location)&&void 0!==t&&t.origin?window.location.origin:"";if(!n)return i;try{return new URL(i,n).href}catch{return i}}(Be.Ef[e.platform]);if(!i)return"";const n=Pe(e.label),a=Pe(e.href||""),l=De?' draggable="true"':"";return`<td em-platform="${e.platform}"${l}><a href="${a}" target="_blank" draggable="false"><img src="${i}" width="${Fe}" height="${Fe}" border="0" alt="${n}" draggable="false" style="display:block;" /></a></td>`}).filter(Boolean).reduce((e,t,i)=>(i>0&&e.push(function(e){return e>0?`<td width="${e}">&nbsp;</td>`:""}(je)),e.push(t),e),[]).join(""),We=`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom" em-type="social"><tr><td align="${Me}">\n <table border="0" cellspacing="0" cellpadding="0">\n <tr>${Ve}\n </tr>\n </table>\n</td></tr></table>`;var ze=i(61587),He=i.n(ze);const Ue=new Date,qe=new Date(+Ue+432e6).toISOString(),$e=-(new Date).getTimezoneOffset()/60,Ze=e=>`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td align="center"><img class="em-countdown" em-cd-settings="locale=${e.replace("_","-")}&bg=FFFFFF&tp=false&color1=000000&color2=959595&size1=72&size2=28&font1=roboto&font2=roboto&border=10&delimiter=:&spacing=10&time=${qe}&timezone=${$e}&frames=20" src="${(e=>`https://cdt3.emcdn.ru/rndt?locale=${e.replace("_","-")}&bg=FFFFFF&tp=false&color1=000000&color2=959595&size1=72&size2=28&font1=roboto&font2=roboto&border=10&delimiter=:&spacing=10&time=${qe}&timezone=${$e}&frames=20`)(e)}" border="0" alt="" style="display: block;" /></td></tr></table>`,Ge=`<style em="styles">\n @media only screen and (max-device-width:660px),only screen and (max-width:660px) {\n .em-mob-width-100perc {\n width: 100%!important;\n max-width: 100%!important;\n }\n }\n</style>\n<table cellpadding="0" cellspacing="0" border="0" width="100%" class="em-mob-width-100perc" em="atom"><tr><td>\n <img class="em-video" src="${i.p+"static/media/video.854adea50295d0a3f7ae.png"}" width="150" border="0" alt="" style="display: inline-block; width: 100%; max-width: 150px;" />\n</td></tr></table>`;var Ke=i(34965),Xe=i.n(Ke),Ye=i(91476),Je=i.n(Ye),Qe=i(28401),et=i(65751),tt=i(2519);const it=()=>{var e,t;const i=(0,o.s9)(),{__:r}=i,s=(0,g.rD)(),c=(0,l.d4)(tt.yN),d=(0,l.d4)(et.B$),m=(0,l.d4)(et.C1),u=(0,l.d4)(et.B),p=(0,ie.X7)(),h=(0,ie.Qi)(),[f,v]=(0,n.useState)(!1),[y,E]=(0,n.useState)(0);let _=!(d||(null===(e=m.id)||void 0===e?void 0:e.toString())!==(null===c||void 0===c||null===(t=c.members)||void 0===t?void 0:t.owner.ID));const w=[];s.elementImageEnabled&&w.push({title:r("Image"),icon:n.createElement(b.Ay,{icon:"ElementImage",size:24,strokeWidth:s.iconStrokeWidth}),html:fe,className:"",name:"image"}),s.elementAIimageEnabled&&w.push({title:r("AI image"),icon:n.createElement(b.Ay,{icon:"ElementImageAI",size:24,strokeWidth:s.iconStrokeWidth}),html:ve,className:"ai",name:"ai-image"}),s.elementTextEnabled&&w.push({title:r("Text"),icon:n.createElement(b.Ay,{icon:"ElementText",size:24,strokeWidth:s.iconStrokeWidth}),html:ye()(i),className:"",name:"text"}),s.elementHeaderEnabled&&w.push({title:r("Header"),icon:n.createElement(b.Ay,{icon:"ElementTitle",size:24,strokeWidth:s.iconStrokeWidth}),html:_e()(i),className:"",name:"header"}),s.elementButtonEnabled&&w.push({title:r("Button"),icon:n.createElement(b.Ay,{icon:"ElementButton",size:24,strokeWidth:s.iconStrokeWidth}),html:Ce()(i),className:"",name:"button"}),s.elementSpacerEnabled&&w.push({title:r("Spacer"),icon:n.createElement(b.Ay,{icon:"ElementSpacer",size:24,strokeWidth:s.iconStrokeWidth}),html:Te(),className:"",name:"spacer"}),s.elementListULEnabled&&w.push({title:r("List UL"),icon:n.createElement(b.Ay,{icon:"ElementListUL",size:24,strokeWidth:s.iconStrokeWidth}),html:Ae()(i),className:"",name:"list-ul"}),s.elementListOLEnabled&&w.push({title:r("List OL"),icon:n.createElement(b.Ay,{icon:"ElementListOL",size:24,strokeWidth:s.iconStrokeWidth}),html:Ie()(i),className:"",name:"list-ol"}),s.elementDividerEnabled&&w.push({title:r("Divider"),icon:n.createElement(b.Ay,{icon:"ElementDivider",size:24,strokeWidth:s.iconStrokeWidth}),html:Le(),className:"",name:"divider"}),s.elementSocialEnabled&&w.push({title:r("Social media"),icon:n.createElement(b.Ay,{icon:"ElementSocial",size:24,strokeWidth:s.iconStrokeWidth}),html:We,className:"",name:"social"}),s.elementTableEnabled&&w.push({title:r("Table"),icon:n.createElement(b.Ay,{icon:"ElementTable",size:24,strokeWidth:s.iconStrokeWidth}),html:He()(i),className:"",name:"table"}),s.elementCountdownEnabled&&w.push({title:r("Countdown"),icon:n.createElement(b.Ay,{icon:"ElementCountdown",size:24,strokeWidth:s.iconStrokeWidth}),html:Ze(u),className:"",name:"countdown"}),s.elementVideoEnabled&&w.push({title:r("Video"),icon:n.createElement(b.Ay,{icon:"ElementVideo",size:24,strokeWidth:s.iconStrokeWidth}),html:Ge,className:"",name:"video"}),s.elementCarouselEnabled&&w.push({title:r("Carousel"),icon:n.createElement(b.Ay,{icon:"ElementCarousel",size:24,strokeWidth:s.iconStrokeWidth}),html:Xe()(i),className:"amp",name:"amp-carousel"}),s.elementAccordionEnabled&&w.push({title:r("Accordion"),icon:n.createElement(b.Ay,{icon:"ElementAccordion",size:24,strokeWidth:s.iconStrokeWidth}),html:Je()(i),className:"amp",name:"amp-accordion"}),s.elementFormEnabled&&w.push({title:r("Form"),icon:n.createElement(b.Ay,{icon:"ElementForm",size:24,strokeWidth:s.iconStrokeWidth}),html:null,className:"amp",name:"amp-form"});const C=e=>!_||"ai-image"!==e.name||(setTimeout(()=>{v(!0),E(2)},1e3),!1);return n.createElement("div",{className:"atoms"},n.createElement("div",{className:"atoms__list"},n.createElement(a.$x,{wrap:!0,style:{justifyContent:"space-between",rowGap:10}},w&&w.map((e,t)=>e.html?n.createElement("div",{className:"ant-card-hoverable atoms__item "+e.className,draggable:!0,onClick:t=>p(t,e.html),onDragStart:t=>h(t,e,C),key:e.title+t.toString(),"data-test-name":e.name},n.createElement("span",{className:"atom-image"},e.icon),n.createElement("span",{className:"atom-title"},e.title)):n.createElement(a.m_,{title:r("Coming soon"),placement:"top",key:e.title+t.toString()},n.createElement("div",{className:"atoms__item atoms__item_inactive "+e.className,key:e.title+t.toString(),"data-test-name":e.name},n.createElement("span",{className:"atom-image"},e.icon),n.createElement("span",{className:"atom-title"},e.title)))))),n.createElement(Qe.A,{open:f,onCancel:()=>v(!1),initialSlide:y}))};var nt=i(18414),at=i(46588);function lt(){const e=document.querySelector(".selected-element-panel__columns-settings__links__add");return!(null===e||void 0===e||!e.closest(".selected-element-panel"))}const rt=({emailElementType:e,isSelectedElement:t=!1,selectedElement:i={parent:!1}})=>{var r,s,c,d,m,u,p,f,v;const{__:w}=(0,o.s9)(),C=(0,l.wA)(),k=(0,_.XW)(),[A]=a.lV.useForm(),S=(0,n.useRef)(),I=(0,n.useRef)(),x=(0,l.d4)(y.qX),L=(0,l.d4)(P.qX),N=(0,g.rD)(),T=i||(e===h.Tm?x:L),[B,R]=(0,n.useState)(null===(r=T.floatBlocks)||void 0===r?void 0:r.wrap),[F,O]=(0,n.useState)(null===(s=T.floatBlocks)||void 0===s?void 0:s.dirRevers),[M,j]=(0,n.useState)(null),[D,V]=(0,n.useState)(0),[W,z]=(0,n.useState)([]),H=(0,l.d4)(E.Ct),U=(0,n.useCallback)(t=>{C(e===h.Tm?(0,y.A9)(t):(0,P.A9)(t))},[C,e]);(0,n.useEffect)(()=>{if(T&&"{}"!==JSON.stringify(T)&&A._init){var e,t,i,n,a;if(A.resetFields(),A.setFieldsValue({gap:null===(e=T.floatBlocks)||void 0===e?void 0:e.gap,gapMobile:null===(t=T.floatBlocks)||void 0===t?void 0:t.gapMobile,gapDim:"px",valign:null===(i=T.floatBlocks)||void 0===i?void 0:i.valign}),(null===(n=T.floatBlocks)||void 0===n?void 0:n.items.length)>0){var l;const s=T.floatBlocks.items.reduce((e,t)=>e+t.width,0),c=T.floatBlocks.items.map(e=>{var t;return null===(t=(e.width||0)/s*100)||void 0===t?void 0:t.toFixed(1)});function d(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}var r;if(V(s),d(c,W)||"gap"===T.changeKey||z(c),T.floatBlocks.items.forEach((e,t)=>A.setFieldsValue({["width-"+t]:e.width||0})),T.floatBlocks.items.length>=8)null===(r=document.querySelector(".selected-element-panel__columns-settings__links__add"))||void 0===r||r.classList.add("noactive");else if(null!==(l=document.querySelector(".selected-element-panel__columns-settings__links__add"))&&void 0!==l&&l.classList.contains("noactive")){var o;null===(o=document.querySelector(".selected-element-panel__columns-settings__links__add"))||void 0===o||o.classList.remove("noactive")}}R(null===(a=T.floatBlocks)||void 0===a?void 0:a.wrap)}},[A,T,M,W]);let q=0;(null===(c=T.floatBlocks)||void 0===c?void 0:c.items.length)>0&&(q=T.floatBlocks.items.length);const $=(e,t)=>{Object.keys(t).forEach(t=>{if(t.includes("width")){const i=parseInt(t.match(/\d+/));A.setFieldsValue({[t]:e.items[i]})}})},[Z,G]=(0,n.useState)(!1);(0,n.useEffect)(()=>{const e=()=>G(!0),t=()=>G(!1);return document.addEventListener("keyup",t),document.addEventListener("keydown",e),()=>{document.removeEventListener("keyup",t),document.removeEventListener("keydown",e)}},[]);const K=e=>{const i=A.getFieldsValue(!0),n=T.floatBlocks.items.map(e=>e.width),a=T.floatBlocks.gap||20,l=e.cols-n.length;let r=[],o=n.reduce((e,t)=>e+t,0);e.cols>=n.length?o-=a*l:o+=a*Math.abs(l);const s=Math.round(o/e.cols);r=function(t,i){const n=[];for(let r=0;r<t;r++){var a,l;n.push(null!==(a=e.width)&&void 0!==a&&a[r]?Math.round(o/100*(null===(l=e.width)||void 0===l?void 0:l[r])):i)}return n}(e.cols,s);const c=o-r.reduce((e,t)=>e+t,0);if(0!==c){let e=r.map((e,t)=>[t,e]).filter(e=>e[1]>30);const t=e.length-Math.abs(c);e=e.map((e,i)=>{const n=t<=i?e[1]+(c>0?1:-1):e[1];return[e[0],n]}),e.map(e=>(r[e[0]]=e[1],e))}let d={items:r,gap:i.gap||20};const m=r.reduce((e,t)=>e+t,0);z(r.map(e=>{var t;return null===(t=e/m*100)||void 0===t?void 0:t.toFixed(1)})),k({operation:h.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"floatBlocksPreset",settings:d,editFromStructure:lt()}),U({...T,activateSection:t?void 0:"structure",floatBlocks:{...T.floatBlocks,...d,items:d.items.map((e,t)=>({width:e,current:!1}))},changeKey:"width"})},X=e=>{const i=A.getFieldsValue(!0);let n=0;document.querySelectorAll(".selected-element-panel__columns-settings__controls__column").forEach((t,i)=>{t===e.target.closest(".selected-element-panel__columns-settings__controls__column")&&(n=i)});const a=+T.floatBlocks.gap,l=+T.floatBlocks.items[n].width+a,r=T.floatBlocks.items.map(e=>+e.width),o=(r.length-1)*a,s=r.reduce((e,t)=>e+t,0)+o,c=r.length-1,d=Math.floor(l/c);let m=r.filter((e,t)=>t!==n).map(e=>e+d);const u=s-(m.reduce((e,t)=>e+t,0)+(r.length-2)*a);if(0!==u){const e=m.length-Math.abs(u);m=m.map((t,i)=>e<=i?t+(u>0?1:-1):t)}k({operation:h.Ru.SANDBOX_FLOATBLOCK_REMOVE,settings:{removedBlockIndex:n,gap:i.gap},editFromStructure:lt()}),U({...T,activateSection:t?void 0:"structure",floatBlocks:{...T.floatBlocks,items:m.map((e,t)=>({width:e,current:T.floatBlocks.items.filter((e,t)=>t!==n)[t].current}))},changeKey:"width"})};return T.floatBlocks&&T.floatBlocks.items.length>0&&n.createElement(a.lV,{layout:"vertical",form:A,name:"float_blocks_settings_form",autoComplete:"off",initialValues:{gap:(null===(d=T.floatBlocks)||void 0===d?void 0:d.gap)||0,gapDim:"px",gapMobile:(null===(m=T.floatBlocks)||void 0===m?void 0:m.gapMobile)||0,valign:(null===(u=T.floatBlocks)||void 0===u?void 0:u.valign)||"top",...null===(p=T.floatBlocks)||void 0===p?void 0:p.items.reduce((e,{width:t},i)=>(e[`width-${i}`]=t,e),{})},onValuesChange:e=>{I.current&&Z&&clearTimeout(I.current),I.current=setTimeout(()=>function(e){const i=A.getFieldsValue(!0),n=Object.keys(e)[0];if(j(n),n.includes("width")){if(i[n]&&i[n]>=30){let a={items:[],gap:i.gap,valign:i.valign,activateSection:t?void 0:"structure"},l=0;if(document.querySelectorAll(".selected-element-panel__columns-settings__controls__column").length>1){l=parseFloat(Object.keys(e)[0].substring(Object.keys(e)[0].length-1));const t=i["width-"+(l+1)]?l+1:0;let n=D;Object.keys(i).forEach(e=>{e.includes("width")&&-1===e.indexOf("width-"+t)&&(n-=i[e])}),i["width-"+t]=n}Object.keys(i).forEach(e=>{e.includes("width")&&a.items.push(i[e])}),k({operation:h.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"floatBlocksWidths",settings:a}),U({...T,activateSection:t?void 0:"structure",floatBlocks:{...T.floatBlocks,...a,items:T.floatBlocks.items.map((e,t)=>({...T.floatBlocks.items[t],width:a.items[t]}))},changeKey:n})}}else if("gap"===n){const a={items:T.floatBlocks.items.map(e=>e.width),gap:T.floatBlocks.gap},l=a.items.reduce((e,t)=>e+t,0)+(a.items.length-1)*a.gap,r=i.gap,o=l-(a.items.length-1)*r;if(o>30*a.items.length||T.floatBlocks.gap-e>=0){const e=(e,t)=>Math.round(t*e/100);let s=a.items.map((t,i)=>e(W[i],o));const c=l-(s.reduce((e,t)=>e+t,0)+(a.items.length-1)*r);if(0!==c){const e=s.length-Math.abs(c);s=s.map((t,i)=>e<=i?t+(c>0?1:-1):t)}let d={items:s,gap:r||0};$(d,i),k({operation:h.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"floatBlocksGap",settings:d,editFromStructure:lt()}),U({...T,activateSection:t?void 0:"structure",floatBlocks:{...T.floatBlocks,...d,items:T.floatBlocks.items.map((e,t)=>({...e,width:d.items[t]}))},changeKey:n})}}else if("valign"===n){let e={valign:i.valign};k({operation:h.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"floatBlocksValign",settings:e,editFromStructure:lt()}),U({...T,activateSection:t?void 0:"structure",floatBlocks:{...T.floatBlocks,...e},changeKey:n})}else if("gapMobile"===n){let i={mobileHeight:{classNamePrefix:"em-mob-height-",value:e[n],dim:"px"}};k({operation:h.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"floatBlocksGapMobile",settings:i}),U({...T,activateSection:t?void 0:"structure",floatBlocks:{...T.floatBlocks,gapMobile:i.mobileHeight.value},changeKey:n})}setTimeout(()=>(null===S||void 0===S?void 0:S.current)&&S.current.focus({cursor:"end"}),600)}(e),50)},onFieldsChange:()=>setTimeout(()=>(null===S||void 0===S?void 0:S.current)&&S.current.focus({cursor:"end"}),300),className:"element-controls"},n.createElement("div",{className:"selected-element-panel__columns-settings",style:{paddingTop:N.switchDesktopMobilePropsEnabled||N.stepToOtherElementEnabled||N.deleteButtonEnabled||"structure"===T.type?0:24}},1===T.floatBlocks.items.length&&n.createElement(a.Fc,{style:{marginBottom:10},message:w('The selected element is in the block that supports a multicolumn structure. To add a new column, click the "Add a column" button.'),type:"info"}),H!==h.ND&&n.createElement(n.Fragment,null,n.createElement("div",{className:"selected-element-panel__columns-settings__header"},n.createElement("span",{className:"selected-element-panel__columns-settings__header-title"},w("Columns")),n.createElement("div",{className:"selected-element-panel__columns-settings__links"},n.createElement("span",{className:"selected-element-panel__columns-settings__links__add",onClick:()=>{const e=A.getFieldsValue(!0);if(q<8){const i=T.floatBlocks.items.map(e=>e.width),n=T.floatBlocks.gap,a=i.reduce((e,t)=>e+(t>30?t:0),0),l=(a-30-n)/a,r=i.map(e=>e>30?Math.round(e*l):e).reduce((e,t)=>e+(t>30?t:0),0);let o=i.map(e=>e>30?Math.round(e*l):e);o.push(30);const s=a-r-30-n;if(0!==s){let e=o.map((e,t)=>[t,e]).filter(e=>e[1]>30);const t=e.length-Math.abs(s);e=e.map((e,i)=>{const n=t<=i?e[1]+(s>0?1:-1):e[1];return[e[0],n]}),e.map(e=>(o[e[0]]=e[1],e))}k({operation:h.Ru.SANDBOX_FLOATBLOCK_ADD,settings:{gap:e.gap,gapMobile:e.gapMobile,minWidth:30},editFromStructure:lt()}),U({...T,activateSection:t?void 0:"structure",floatBlocks:{...T.floatBlocks,items:o.map((e,t)=>{var i;return{width:e,current:(null===(i=T.floatBlocks.items[t])||void 0===i?void 0:i.current)||!1}})},changeKey:"width"})}else{var i;null===(i=document.querySelector(".selected-element-panel__columns-settings__links__add"))||void 0===i||i.classList.add("noactive")}}},n.createElement(b.Ay,{icon:"PlusCircleOutlined",size:16,strokeWidth:N.iconStrokeWidth})," ",w("Add column")),T.floatBlocks.items.length>1&&n.createElement("span",{onClick:()=>{const e=A.getFieldsValue(!0),i=T.floatBlocks.items.map(e=>e.width);let n={items:[],gap:e.gap};const a=i.reduce((e,t)=>e+t,0),l=i.length,r=Math.ceil(D/l)*l,o=r/l,s=a-r;if(n.items=Array(l).fill(o),0!==s){const e=i.length-Math.abs(s);n.items=n.items.map((t,i)=>e<=i?t+(s>0?1:-1):t)}$(n,e),k({operation:h.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:"floatBlocksWidths",settings:n,editFromStructure:lt()}),U({...T,activateSection:t?void 0:"structure",floatBlocks:{...T.floatBlocks,...n,items:T.floatBlocks.items.map((e,t)=>({...e,width:n.items[t]}))},changeKey:"width"})}},n.createElement(a.m_,{title:w("Make columns the same width.")},n.createElement(b.Ay,{icon:"ColumnWidthOutlined"})," ",w("Equalize"))))),T.floatBlocks.items.length>1&&n.createElement(a.lV.Item,{style:{marginBottom:16}},n.createElement("div",{className:"selected-element-panel__columns-settings__controls"},T.floatBlocks.items.map((e,t)=>n.createElement("div",{key:"floatblock-"+t,className:"selected-element-panel__columns-settings__controls__column "+(e.current?"current":""),style:{width:e.width/D*100+"%"}},T.floatBlocks.items.length>1&&n.createElement("span",{className:"selected-element-panel__columns-settings__controls__column__remove",onClick:X},n.createElement(b.Ay,{icon:"DeleteOutlined",style:{color:"#ff4d4f"}})),n.createElement("div",{className:"selected-element-panel__columns-settings__controls__field"},n.createElement(a.lV.Item,{label:"",name:"width-"+t},n.createElement(a.YI,{min:30,value:e.width||0,placeholder:w("Width"),ref:M==="width-"+t&&S}))))))),n.createElement("div",{className:"columns-presets"},n.createElement(a.$n,{onClick:()=>{K({cols:1})}},n.createElement(b.Ay,{icon:"LayoutCol1"})),n.createElement(a.$n,{onClick:()=>{K({cols:2})}},n.createElement(b.Ay,{icon:"LayoutCol2"})),n.createElement(a.$n,{onClick:()=>{K({cols:2,width:[66,34]})}},n.createElement(b.Ay,{icon:"LayoutCol2WideLeft"})),n.createElement(a.$n,{onClick:()=>{K({cols:2,width:[34,66]})}},n.createElement(b.Ay,{icon:"LayoutCol2WideRight"})),n.createElement(a.$n,{onClick:()=>{K({cols:3})}},n.createElement(b.Ay,{icon:"LayoutCol3"})),n.createElement(a.$n,{onClick:()=>{K({cols:4})}},n.createElement(b.Ay,{icon:"LayoutCol4"})))),T.floatBlocks.items.length>1&&n.createElement(n.Fragment,null,H===h.ND&&n.createElement("div",{style:{marginBottom:24}},n.createElement(a.dO,{id:"column-wrap",label:w("Line break on mobile devices"),size:"small",disabled:void 0===(null===(f=T.floatBlocks)||void 0===f?void 0:f.wrap),checked:B,onChange:e=>{R(e),k({operation:h.Ru.SANDBOX_FLOATBLOCK_WRAP,settings:{wrap:!B}}),U({...T,activateSection:t?void 0:"structure",floatBlocks:{...T.floatBlocks,wrap:!B},changeKey:"wrap"})},labelStyle:{position:"relative",top:2}})),H!==h.ND&&n.createElement("div",{style:{marginBottom:24}},n.createElement(a.dO,{id:"column-dir-revers",label:w("Reverse order on desktop"),size:"small",disabled:void 0===(null===(v=T.floatBlocks)||void 0===v?void 0:v.wrap),checked:F,onChange:e=>{O(e),k({operation:h.Ru.SANDBOX_FLOATBLOCK_DIR,settings:{dirRevert:!F}}),U({...T,activateSection:t?void 0:"structure",floatBlocks:{...T.floatBlocks,dirRevert:!F},changeKey:"dir"})},labelStyle:{position:"relative",top:2}}))),T.floatBlocks.items.length>1&&n.createElement(n.Fragment,null,n.createElement(a.cG,{className:"selected-td-form__divider"}),n.createElement(a.fI,{gutter:10},n.createElement(a.fv,{span:12},n.createElement(a.y9,{title:w("Vertical alignment"),titleStyle:{paddingTop:20}},n.createElement(a.lV.Item,{name:"valign",style:{marginBottom:0}},n.createElement(a.VX,{disabled:T.floatBlocks.items.length<=1,strokeWidth:N.iconStrokeWidth,labels:{alignTop:w("Align top"),alignMiddle:w("Center vertically"),alignBottom:w("Align bottom")}})))),n.createElement(n.Fragment,null,H!==h.ND&&n.createElement(a.fv,{span:12},n.createElement(a.y9,{title:w("Indent between columns"),titleStyle:{paddingTop:20}},n.createElement(a.lV.Item,{name:"gap",style:{marginBottom:20}},n.createElement(a.FQ,{min:0,disabled:T.floatBlocks.items.length<=1,placeholder:w("Indent between columns"),prefix:n.createElement(b.Ay,{icon:"ColumnWidthOutlined"}),addonAfter:"px",ref:"gap"===M&&S})))),H===h.ND&&n.createElement(a.fv,{span:12},n.createElement(a.y9,{title:w("Indent in mobile"),titleStyle:{paddingTop:20}},n.createElement(a.lV.Item,{name:"gapMobile",style:{marginBottom:20}},n.createElement(a.FQ,{min:0,disabled:T.floatBlocks.items.length<=1,placeholder:w("Indent in mobile"),prefix:n.createElement(b.Ay,{icon:"ColumnHeightOutlined"}),addonAfter:"px"})))))))))},ot=()=>{},st=({email:e,formSettings:t,onClosePanel:i=ot})=>{var r,s;const{__:c}=(0,o.s9)(),d=(0,le.cR)(),m=(0,l.wA)(),u=(0,_.XW)(),p=Object.prototype.hasOwnProperty.call(e,"type")?h.IE:h.Tm,f=(0,l.d4)(y.qX),v=(0,l.d4)(P.qX),b=(0,l.d4)(E.Tn),w=p===h.Tm?f:v,C=Object.keys(t).length>0?t.settings:w,k=(0,g.rD)(),A="customTable"===C.type,S=!!C.type&&!(null===(r=C.floatBlocks)||void 0===r||!r.items.length)>0&&!(null===(s=C.floatBlocks)||void 0===s||!s.items.filter(e=>!!e.width).length)>0,I=(0,n.useRef)(null);(0,n.useEffect)(()=>{const e=Object.values(h.bV),t=C.type&&e.includes(C.type)?`${C.type}-${JSON.stringify(C.path||[])}`:null;if(C.type&&e.includes(C.type)){const e=I.current!==t;if(I.current=t,"structure"!==C.activateSection){if(e){const e=d.querySelector(".email-pane .panel-form__body");e&&(e.scrollTop=0)}m((0,E.Bp)(h.WU))}else m((0,E.Bp)(h.mX))}else"{}"!==JSON.stringify(C)&&(I.current=null,m((0,E.Bp)("")))},[C,m,d]);const x=(0,n.useMemo)(()=>{const e=[{key:h.WU,label:n.createElement("span",{style:{textTransform:"capitalize"}},C.caption?C.caption:c("Edit element"))}];return S&&e.push({key:h.mX,label:c("Columns")}),e},[C.caption,S,c]),L=(0,n.useMemo)(()=>[{key:h.WU,label:c("Cell")},{key:h.zX,label:c("Table")}],[c]),N=n.createElement(n.Fragment,null,k.deleteButtonEnabled&&n.createElement(a.m_,{title:c("Remove element by Delete Key"),placement:"bottom"},n.createElement(a.$n,{type:"text",onClick:e=>{e.stopPropagation(),u({operation:h.Ru.SANDBOX_ELEMENT_REMOVE}),m(p===h.Tm?(0,y.A9)({}):(0,P.A9)({}))},disabled:!C.deletable,icon:n.createElement(a.HQ,{icon:"DeleteOutlined",size:18,strokeWidth:k.iconStrokeWidth})})),k.stepToOtherElementEnabled&&n.createElement(a.m_,{title:c("Up to parent element"),placement:"bottom"},n.createElement(a.$n,{type:"text",onClick:e=>{e.stopPropagation(),u({operation:h.Ru.SANDBOX_ELEMENT_PARENT_GET})},disabled:!C.parent,icon:n.createElement(a.HQ,{icon:"GoToParent",size:18,strokeWidth:k.iconStrokeWidth})}))),T=k.switchDesktopMobilePropsEnabled||k.stepToOtherElementEnabled||k.deleteButtonEnabled;return n.createElement(a.T8,null,n.createElement(a.T8.Header,{onClose:()=>{i(C),m((0,E.Fk)()),setTimeout(()=>{p===h.IE?m((0,P.A9)({type:null})):m((0,y.A9)({type:null}))},300),u({operation:h.Ru.SANDBOX_ELEMENT_ACTIVE_RESET})},closeIcon:n.createElement(a.HQ,{icon:"Close",size:24,strokeWidth:k.iconStrokeWidth}),extra:T?N:void 0},n.createElement(a.tU,{items:A?L:x,activeKey:b,onChange:e=>m((0,E.Bp)(e||""))})),n.createElement(a.T8.Body,null,A?n.createElement(n.Fragment,null,n.createElement("div",{style:{display:b===h.WU?void 0:"none"}},n.createElement(at.A,{className:"email-properties__collapse-panel selected-element-panel__content",formSettings:t,emailElementType:p,formName:`${h.om}`})),n.createElement("div",{style:{display:b===h.zX?void 0:"none"}},n.createElement(at.A,{className:"email-properties__collapse-panel selected-element-panel__content",formSettings:t,emailElementType:p,formName:`${h.zX}`}))):n.createElement(n.Fragment,null,n.createElement("div",{style:{display:b===h.WU?void 0:"none"}},n.createElement(at.A,{className:"email-properties__collapse-panel selected-element-panel__content",formSettings:t,emailElementType:p})),S&&n.createElement("div",{style:{display:b===h.mX?void 0:"none"}},n.createElement(rt,{selectedElement:C,emailElementType:p,isSelectedElement:!1})))))};st.defaultProps={formSettings:{},onClosePanel:ot};const ct=st;var dt=i(65865),mt=i(91654),ut=i(43585),pt=i(52134),ht=i(64363),gt=i(99614),ft=i(67815),vt=i(54913),bt=i(92221),yt=i(98614),Et=i(33087);const _t=e=>{const{__:t}=(0,o.s9)();return[{key:"\ud83d\udce7",label:n.createElement("div",{onClick:()=>{e("theme-and-preheader-generator")}},"\ud83d\udce7 ",t("Subject line & preheader generator"))},{key:"\ud83c\udf0e",label:n.createElement("div",{onClick:()=>{e("translator")}},"\ud83c\udf0e ",t("Translator"))},{key:"\ud83d\udcc4",label:n.createElement("div",{onClick:()=>{e("writer")}},"\ud83d\udcc4 ",t("Copywriter"))},{key:"\ud83d\udd0e",label:n.createElement("div",{onClick:()=>{e("corrector")}},"\ud83d\udd0e ",t("Proofreader"))},{key:"\ud83e\udde0",label:n.createElement("div",{onClick:()=>{e("psychologist")}},"\ud83e\udde0 ",t("Psychologist"))},{key:"\ud83d\udcc8",label:n.createElement("div",{onClick:()=>{e("marketolog")}},"\ud83d\udcc8 ",t("Marketer"))},{key:"\u2728",label:n.createElement("div",{onClick:()=>{e("email-generator")}},"\u2728 ",t("Email generator"))}]},wt=({messages:e,newEmailAiGeneratorRef:t})=>{const i=(0,vt.fn)(),{__:c,_n:d}=(0,o.s9)(),m=(0,l.wA)(),u=(0,r.Zp)(),p=(0,n.useRef)(null),f=(0,g.rD)(),v=(0,s.hN)(),{projectId:E,emailId:w}=(0,r.g)(),C=(0,gt.u)(),k=(0,ft.ml)(Et.AZ.ON_LIMIT_ID),[A,S]=(0,n.useState)(null),[I,x]=(0,n.useState)(0),[L,N]=(0,n.useState)(!1),[T,B]=(0,n.useState)(""),[P,R]=(0,n.useState)([]),[F,O]=(0,n.useState)(!1),[M,j]=(0,n.useState)(!1),[D,V]=(0,n.useState)(null),[W,z]=(0,n.useState)(0),[H,U]=(0,n.useState)(null),q=(0,l.d4)(y.Hs),$=(0,l.d4)(et.C1),Z=(0,_.QC)(),[G]=(0,ut.YG)(),K=(0,_.XW)(),[X,Y]=(0,ut.EQ)(),[J,{reset:Q}]=(0,pt.MN)(),[ee,{data:te=[]}]=(0,pt.y4)(),[ne]=(0,ht.Oq)(),ae={cursor:L?"not-allowed":"default",pointerEvents:L?"none":"auto"};(0,n.useEffect)(()=>{H&&F&&(t.current=!0),F||(t.current=!1)},[H,F]);const le=!(!f.limits||!f.counters)&&h.EW.isPlugin,{limits:re}=h.EW.isPlugin&&f.limits?f:{limits:{ai_limit:0,ai_generator_limit:0}},{ai_limit:oe,ai_generator_limit:se}=re,ce=le&&I>=oe&&oe>0,de=le&&W>=se&&se>0,me=(0,n.useCallback)(()=>{k.fire({name:"AiChatCount",count:I+1})},[k,I]),ue=(0,n.useCallback)(()=>{k.fire({name:"AiGeneratorCount",count:W+1})},[k,W]),pe=(0,n.useCallback)(async e=>{var t;if(h.EW.isPlugin)return!0;const i=await ne(e);if(!(0,yt.jq)(null===(t=i.data)||void 0===t?void 0:t.stats))return!0;const n=c("email_generate"===e?"You have reached the limit of AI generator usage.":"You have reached the limit of AI chat usage.");return v.error({message:n,description:c("Please upgrade your plan.")}),R(e=>[...e,{data:{role:"assistant",message:n}}]),!1},[c,ne,v]);(0,n.useEffect)(()=>{var e,t;le&&(x((null===f||void 0===f||null===(e=f.counters)||void 0===e?void 0:e.ai_counter)||0),z((null===f||void 0===f||null===(t=f.counters)||void 0===t?void 0:t.ai_generator_counter)||0))},[f,le]),(0,n.useEffect)(()=>{U((()=>{var e;if(P.length<=0)return!1;return"email-generator"===(null===(e=P.toReversed().find(e=>{var t;return null===(t=e.data)||void 0===t?void 0:t.context}))||void 0===e?void 0:e.data.context)})())},[P]);const he=(0,n.useCallback)(async()=>await Z.sendAsync(h.Ru.SANDBOX_IS_EMAIL_EMPTY),[Z]),ge=(0,n.useCallback)(()=>{var e;const t=null===(e=p.current)||void 0===e?void 0:e.closest(".ant-tabs-content.ant-tabs-content-top");setTimeout(()=>{null===t||void 0===t||t.scrollTo({top:t.scrollHeight,behavior:"smooth"})},0)},[p]),fe=(0,n.useCallback)(()=>{G({entity_id:w}).then(e=>{R(e.data.documents),ge()})},[w,G,R,ge]),ve=(0,n.useCallback)(e=>{O(!0),N(!0),J({task_id:e||A,entity_id:w,status:"started"}).then(()=>{fe()})},[w,J,A,fe]),be=(0,n.useCallback)(()=>{J({task_id:A,entity_id:w,status:"completed"}).then(e=>{403===e.data.status&&Q(),fe()}).catch(e=>{}),N(!1),O(!1)},[w,J,A,fe,Q]);(0,n.useEffect)(()=>{let e;if(F){var t,n;const a=null===(t=te[te.length-1])||void 0===t||null===(n=t.processing)||void 0===n?void 0:n.email;if(a){let t=te[te.length-1].status;e=setInterval(i.setValue(a),500),0===t&&be()}D&&(clearInterval(e),m((0,y.AJ)(a)),O(!1),V(!1))}return()=>{clearInterval(e)}},[i,D,m,te,F,q,w,A,fe,J,Y,be]),(0,n.useEffect)(ge,[ge]),(0,n.useEffect)(()=>{(null===e||void 0===e?void 0:e.length)>0&&R(e),K({operation:h.Ru.SANDBOX_EMAIL_CONTENT_GET})},[e,K]),(0,n.useEffect)(()=>{const e=Z.onInit(()=>{Z.send({operation:h.Ru.SANDBOX_LOCK_EDIT,data:L}),Z.send({operation:h.Ru.SANDBOX_LOCK_DISCUSS,value:L})});return()=>e.dispose()},[L,Z]);const ye=async()=>{if(T){const e=T.replaceAll(/\n/g,"<br>"),t={project_id:E,connection:"chat",entity_id:w,message:e,locale:$.locale.slice(0,2),subject:q.subject||"",preheader:q.preheader||"",textContent:(0,bt.T5)(i.getValue())};if(H&&de||ce){v.error({message:c(H?"You have reached the limit of AI generator usage.":"You have reached the limit of AI chat usage."),description:c("Please upgrade your plan.")});const e={data:{role:"assistant",message:c(H?"You have reached the limit of AI generator usage.":"You have reached the limit of AI chat usage.")}};R(t=>[...t,e])}else{if(!await pe(H?"email_generate":"ai"))return void B("");le&&(H&&W!==se?(ue(),z(e=>e+1)):I!==oe&&(me(),x(e=>e+1))),C({event:"submit_form",action:"chat_whit_ai_assistant",entity_id:t.entity_id,project_id:t.project_id});const i=[{data:{role:"user",message:e,userInfo:{display_name:$.first_name+" "+$.last_name,avatar_url:$.avatar_urls[24]}}},{data:{role:"assistant",message:c("Typing..."),isLoading:!0}}];R(e=>[...e,...i]),X({body:t}).then(e=>{if(401===e.data.status)throw new Error(h.ff);const t=q.hasOwnProperty("type")?h.IE:h.Tm;if(C({event:"submit",action:"send_discussion_chat_message",entity_type:t===h.IE?"block":"email",entity_id:w,project_id:E,context:"editor"}),e.data.task_id){let t=e.data.task_id;S(t),ee({id:t,setError:V}),he().then(e=>{e?ve(t):j(!0)})}fe()}).catch(e=>{var t,i;v.error({message:(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.code)||c("Error"),description:(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.message)||c("Something went wrong.")})})}B("")}},Ee=async e=>{const t={data:{role:"assistant",message:c("Typing..."),isLoading:!0}};R(e=>[...e,t]);const n={project_id:E,connection:"chat",entity_id:w,context:e,locale:$.locale.slice(0,2),subject:q.subject||"",preheader:q.preheader||"",textContent:(0,bt.T5)(i.getValue())};if(le&&(H&&W!==se?(ue(),z(e=>e+1)):I!==oe&&(me(),x(e=>e+1))),ce){v.error({message:c("You have reached the limit of AI chat usage."),description:c("Please upgrade your plan.")});const e={data:{role:"assistant",message:c("You have reached the limit of AI chat usage.")}};R(t=>[...t,e])}else{if(!await pe("ai"))return;C({event:"select",action:"select_ai_assistant_role",context:n.context,entity_id:n.entity_id,project_id:n.project_id}),X({body:n}).then(e=>{if(401===e.data.status)throw new Error(h.ff);fe()}).catch(e=>{var t,i;v.error({message:(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.code)||"Error",description:(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.message)||"Something went wrong"})})}},_e=(0,n.useCallback)(async e=>{const t={data:{role:"user",message:e,userInfo:{display_name:$.first_name+" "+$.last_name,avatar_url:$.avatar_urls[24]}}},n={data:{role:"assistant",message:c("Typing..."),isLoading:!0}};R(e=>[...e,t,n]);const a={project_id:E,connection:"chat",entity_id:w,message:e,locale:$.locale.slice(0,2),subject:q.subject||"",preheader:q.preheader||"",textContent:(0,bt.T5)(i.getValue())};if(de){v.error({message:c("You have reached the limit of AI generator usage."),description:c("Please upgrade your plan.")});const e={data:{role:"assistant",message:c("You have reached the limit of AI chat usage.")}};R(t=>[...t,e])}else{if(!await pe(H?"email_generate":"ai"))return;X({body:a}).then(e=>{if(401===e.data.status)throw new Error(h.ff);const t=q.hasOwnProperty("type")?h.IE:h.Tm;if(C({event:"submit",action:"send_discussion_chat_message",entity_type:t===h.IE?"block":"email",entity_id:w,project_id:E,context:"editor"}),e.data.task_id){let t=e.data.task_id;S(t),ee({id:t,setError:V}),he().then(e=>{e?ve(t):j(!0)})}le&&(H&&W!==se?(ue(),z(e=>e+1)):I!==oe&&(me(),x(e=>e+1))),fe()}).catch(e=>{var t,i;v.error({message:(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.code)||"Error",description:(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.message)||"Something went wrong"})})}},[c,I,W,he,ve,oe,se,$,q,w,H,de,me,ue,le,i,v,pe,E,X,ee,fe]);(0,n.useEffect)(()=>{const e=window.localStorage.getItem(h.V0.em_ai_settings);if(1===P.length&&"assistant"===P[0].data.role&&e&&w){const t=new ie.jG,i={project_id:E,connection:"chat",entity_id:w,context:"email-generator",locale:$.locale.slice(0,2)};window.localStorage.removeItem(h.V0.em_ai_settings),X({body:i}).then(({data:i})=>{t.isDisposed()||_e(e)})}},[P,_e,w,$.locale,E,X]);const we={replace:e=>{var t,i,l,r,o,s,d,m;if(null!==(t=e.attribs)&&void 0!==t&&null!==(i=t.class)&&void 0!==i&&i.split(" ").includes("ai-response-title"))return n.createElement(a.m_,{placement:"left",title:c("Replace the title")},n.createElement("div",{onClick:()=>(e=>{const t=e.children[0].data;Z.send(h.Ru.SANDBOX_SUBJECT_UPDATE,{value:e.children[0].data,guid:q.renderGuid,fromAI:!0}),v.success({id:"EMAIL_TITLE_UPDATED_FROM_AI",message:c("Title copied to email settings"),data:t})})(e)},n.createElement("span",{className:"ai-response-title"},(0,mt.zd)(e.children,we))));if(null!==(l=e.attribs)&&void 0!==l&&null!==(r=l.class)&&void 0!==r&&r.split(" ").includes("ai-response-preheader"))return n.createElement(a.m_,{placement:"left",title:c("Replace the preheader")},n.createElement("div",{onClick:()=>(e=>{const t=e.children[0].data;Z.send(h.Ru.SANDBOX_PREHEADER_UPDATE,{value:e.children[0].data,guid:q.renderGuid,fromAI:!0}),v.success({id:"EMAIL_TITLE_UPDATED_FROM_AI",message:c("Preheader copied to email settings"),data:t,duration:300})})(e)},n.createElement("span",{className:"ai-response-preheader"},(0,mt.zd)(e.children,we))));if(null!==(o=e.attribs)&&void 0!==o&&null!==(s=o.class)&&void 0!==s&&s.split(" ").includes("ai-response-copy"))return n.createElement(a.m_,{placement:"left",title:c("Copy to clipboard")},n.createElement("div",{onClick:()=>(e=>{const t=e.children[0].data;navigator.clipboard.writeText(t).then(()=>{v.success({id:"TEXT_COPIED_TO_CLIPBOARD",message:c("Text copied to clipboard"),data:t})}).catch(e=>{})})(e)},n.createElement("span",{className:"ai-response-copy"},(0,mt.zd)(e.children,we))));if(null!==(d=e.attribs)&&void 0!==d&&null!==(m=d.class)&&void 0!==m&&m.split(" ").includes("ai-response-user-message")){var u,p,g,f,b;const t=(null===(u=e.attribs)||void 0===u?void 0:u.data)||(null===(p=e.children)||void 0===p||null===(g=p[0])||void 0===g?void 0:g.data);return n.createElement("li",{className:null===(f=e.attribs)||void 0===f?void 0:f.class,data:null===(b=e.attribs)||void 0===b?void 0:b.data,onClick:()=>_e(t)},(0,mt.zd)(e.children,we))}}};return n.createElement("div",{ref:p,className:"discuss-main"},P.length>0&&n.createElement(a.B8,{onClick:e=>{"string"===typeof e.target.className&&e.target.className.includes("ai-response-change-context")&&(Y.isLoading||Ee(e.target.role))},className:"comment-list",itemLayout:"horizontal",dataSource:P,renderItem:e=>{var t,i,l;return n.createElement("li",{key:e._id,id:e._id},n.createElement(a.Mw,{className:e.data.userInfo?"":"ai-comment",avatar:"assistant"===e.data.role?n.createElement(b.Ay,{icon:"ChatGpt",className:"anticon-robot",style:{color:"#ffffff",fontSize:16,width:24,height:24,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center"}}):!e.data.userInfo||!e.data._modified&&h.EW.isPlugin?$.avatar_urls[24]||n.createElement(b.Ay,{icon:"UserOutlined",className:"anticon-user",style:{color:"#ffffff",fontSize:16,width:24,height:24,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center"}}):e.data.userInfo.avatar_url,author:n.createElement("div",{style:ae},"user"===(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.role)?h.EW.isPlugin?(null===$||void 0===$?void 0:$.username)||c("User"):null===(i=e.data)||void 0===i||null===(l=i.userInfo)||void 0===l?void 0:l.display_name:c("AI Assistant")),datetime:e._created?n.createElement("span",{dangerouslySetInnerHTML:{__html:(0,ie.Yq)((0,dt.A)(e._created),d,!0)}}):null,content:e.data.isLoading?n.createElement("div",{className:"spin"},n.createElement(b.Ay,{icon:"LoadingOutlined",style:{fontSize:24},spin:!0})):n.createElement("div",{style:ae},(0,mt.Ay)(e.data.message,we))}))}}),le&&(H?n.createElement(a.xl,{text:`${W} ${c("of")} ${se>0?se:"\u221e"} ${c("mail generator")} ${d("was used","were used",W)}`,exceeded:se>0&&W>=se,style:{marginTop:-25},extra:n.createElement("span",{style:{textDecoration:"underline",cursor:"pointer"},onClick:()=>u(f.billingPageUrl||h.vc.billing)},c("Need more?"))}):n.createElement(a.xl,{text:`${I} ${c("of")} ${oe>0?oe:"\u221e"} ${c("messeges")} ${d("was used","were used",I)}`,exceeded:oe>0&&I>=oe,style:{marginTop:-25},extra:n.createElement("span",{style:{textDecoration:"underline",cursor:"pointer"},onClick:()=>u(f.billingPageUrl||h.vc.billing)},c("Need more?"))})),n.createElement(a.lV,{onFinish:ye,className:"addMode"},n.createElement(a.lV.Item,{style:{marginBottom:10}},n.createElement(a.fs,{disabled:L,value:T,onChange:e=>B(e.target.value),rows:4,placeholder:c("Type your request"),className:"textarea-comment",onPressEnter:e=>"Enter"===e.key&&e.ctrlKey&&ye(),spellCheck:"false"})),n.createElement(a.lV.Item,null,n.createElement(a.$x,{size:8},n.createElement(a.$n,{disabled:Y.isLoading||L,type:"default",style:{background:"var(--colorInfo)",color:"#ffffff"},className:"button-target"},n.createElement(a.ms,{placement:"top",disabled:L,key:"Export",arrow:{pointAtCenter:!0},menu:{items:_t(Ee)}},n.createElement("div",{disabled:L,style:{margin:0,padding:0}},n.createElement(b.Ay,{icon:"ChatGpt",style:{marginRight:5}}),c("Role")))),n.createElement(a.$n,{disabled:Y.isLoading||L,className:"button-add",type:"primary",htmlType:"submit"},c("Send")," ",n.createElement(b.Ay,{icon:"SendOutlined",size:16,strokeWidth:f.iconStrokeWidth}))))),n.createElement(a.aF,{title:c("Warning"),open:M,onOk:()=>{ve(),j(!1)},onCancel:()=>{be(),j(!1)}},n.createElement("p",null,c("The current template will be changed to the generated one, are you sure about this?"))))};var Ct=i(93603),kt=i(606),At=i(60538),St=i(56477);const It=({emailElement:e})=>{const{__:t}=(0,o.s9)(),i=(0,_.XW)(),s=(0,l.wA)(),{projectId:c}=(0,r.g)(),m=(0,vt.fn)(),u=(0,l.d4)(St.p1),p=(0,l.d4)(St.RL),f=(0,l.d4)(E.Wm),[v,w]=(0,n.useState)(!0),[C,k]=(0,n.useState)(!1),[A,S]=(0,n.useState)([]),[I,x]=(0,n.useState)([]),L=(0,n.useCallback)(e=>{null!==e&&void 0!==e&&e.html&&(s((0,y.no)(e)),m.setValue(e.html.replaceAll("\r\n","\n")))},[m,s]),{data:N}=ee.Nq.useGetProjectQuery(Number(c),{skip:!c}),[T,B]=(0,n.useState)([]);(0,n.useEffect)(()=>{if(N){const{owner:e,admins:t,users:i}=null===N||void 0===N?void 0:N.members;B([e&&{...e},t&&Array.isArray(t)&&t.map(e=>({...e})),i&&Array.isArray(i)&&i.map(e=>({...e}))].filter(e=>e).flat(1).map(e=>({id:e.ID,display_name:e.display_name})))}},[N,null===N||void 0===N?void 0:N.members,t]);const[R,F]=(0,n.useState)(1),[O,M]=(0,n.useState)(!1);(0,n.useEffect)(()=>{const e=Array.isArray(u)&&u.length&&(null===u||void 0===u?void 0:u.map(e=>{var i;return{key:e.id,author:e.author,date:(0,ie.Yq)((0,ie.Cl)(e.date||e.modified),t),title:e.title,html:e.html,common_styles:e.common_styles,loading:!1,isAutosave:null===(i=e.slug)||void 0===i?void 0:i.includes("autosave")}}));x(e||[]),S(e),w(!1),p<2&&M(!0)},[u,p,t]);const j=v||C||O?null:n.createElement("div",{style:{textAlign:"center",marginTop:24,marginBottom:24,height:32,lineHeight:"32px"}},n.createElement(a.$n,{onClick:()=>{k(!0),x(A.concat([...new Array(3)].map(()=>({loading:!0})))),s(At.GY.endpoints.getEmailHistory.initiate({emailId:e.id,page:R+1})).then(e=>{const{data:i,totalPages:n}=e.data,a=Array.isArray(i)&&(null===i||void 0===i?void 0:i.map(e=>({key:e.id,author:e.author,date:(0,ie.Yq)((0,ie.Cl)(e.date||e.modified),t),title:e.title,html:e.html,loading:!1}))),l=A.concat(a);x(l),S(l),k(!1),window.dispatchEvent(new Event("resize")),R+1>=n&&M(!0),F(R+1)})}},t("loading more"))),[D,V]=(0,n.useState)(),[W,z]=(0,n.useState)(null),H=(0,n.useCallback)(e=>{L(e),V(null),z(null),i({operation:h.Ru.SANDBOX_LOCK_EDIT,data:!1}),s((0,E.Fk)())},[L,i,s]),U=(0,n.useRef)();U.current=e,(0,n.useEffect)(()=>{if(!f&&!W){const e=U.current;e&&z({html:m.getValue(),preheader:e.preheader,common_styles:e.common_styles,subject:e.subject})}},[f,z,m,W]),(0,n.useEffect)(()=>{f&&W&&(L(W),z(null))},[f,W,L]);const q=(0,g.rD)();return n.createElement(n.Fragment,null,n.createElement(a.tU,{className:"secondary-tabs email-settings__collapse secondary-tabs_unset_scroll",size:"large",activeKey:h.Vv,items:[{label:n.createElement(n.Fragment,null,t("Version history")),key:h.Vv,forceRender:!0,className:"email-settings__collapse-panel",style:{height:"100%"},children:n.createElement(a.B8,{className:"history-panel__list",loading:v,itemLayout:"horizontal",loadMore:j,dataSource:I,header:n.createElement("div",{className:"history-panel__list-header"},n.createElement("div",{className:"history-panel__list-date"},t("Time")),n.createElement("div",{className:"history-panel__list-author"},t("Author")),n.createElement("div",{className:"history-panel__restore"},"Set")),renderItem:(e,i)=>{var l;return n.createElement(a.B8.Item,{onClick:()=>{i!==D&&(V(i),L(A[i])),s((0,P.rc)(!0))},className:d()("history-panel__item",{"history-panel__item_active":i===D})},n.createElement(a.EA,{title:!1,loading:e.loading||!1,active:!0},n.createElement("div",{className:"history-panel__list-date"},e.date),n.createElement("div",{className:"history-panel__list-author"},h.EW.isPlugin&&q.revisionService?e.author:(null===(l=T.find(t=>{var i,n;return(null===(i=t.id)||void 0===i?void 0:i.toString())===(null===(n=e.author)||void 0===n?void 0:n.toString())}))||void 0===l?void 0:l.display_name)||"\u2013"),e.isAutosave&&D!==i&&n.createElement("div",{style:{opacity:.45},className:"history-panel__list-autosave"},t("Auto")),!e.isAutosave&&n.createElement(a.$n,{size:"small",className:"history-panel__restore",type:"link",onClick:e=>{D===i&&e.stopPropagation(),H(A[i])}},t("Set")),e.isAutosave&&D===i&&n.createElement(a.$n,{size:"small",className:"history-panel__restore",type:"link",onClick:e=>{D===i&&e.stopPropagation(),H(A[i])}},t("Set"))))}})}]}),n.createElement(a.$n,{type:"text",className:"ant-modal-close","aria-label":"Close",onClick:()=>{var e;s((0,E.Fk)()),W&&L(W),z(null),e=!0,s((0,E.mi)(e)),i({operation:h.Ru.SANDBOX_LOCK_EDIT,data:!1})}},n.createElement(b.Ay,{icon:"Close"})))},xt=({elementPath:e})=>{const{_x:t}=(0,o.s9)(),i=(0,l.wA)(),s=(0,_.QC)(),c=(0,g.rD)(),{emailId:d,blockId:m,projectId:u}=(0,r.g)(),p=(0,l.d4)(tt.yN),f=(0,gt.u)(),v=(0,n.useCallback)(e=>{s.send({operation:h.Ru.SANDBOX_ELEMENT_ACTIVE_SET,index:e})},[s]),y=(0,n.useCallback)(e=>{var t,n,a,l,r,o;let c="element";null!==e&&void 0!==e&&null!==(t=e.target)&&void 0!==t&&t.closest("svg")||null!==e&&void 0!==e&&null!==(n=e.target)&&void 0!==n&&n.closest(".anticon")||null!==e&&void 0!==e&&null!==(a=e.target)&&void 0!==a&&a.closest('[class*="icon"]')?c="icon":null===e||void 0===e||null===(l=e.target)||void 0===l||!l.textContent||null!==e&&void 0!==e&&null!==(r=e.target)&&void 0!==r&&r.closest("svg")||null!==e&&void 0!==e&&null!==(o=e.target)&&void 0!==o&&o.closest(".anticon")||(c="text"),i((0,E.PM)(h.rY)),s.send({operation:h.Ru.SANDBOX_LOCK_EDIT,data:!1}),s.send({operation:h.Ru.SANDBOX_ELEMENT_ACTIVE_RESET}),f({event:"click",action:"click_breadcrumb_email",email_id:d||m,project_id:(null===p||void 0===p?void 0:p.id)||u,click_target:c})},[s,i,f,d,m,u,p]),w={title:n.createElement("span",{onClick:y},n.createElement(b.Ay,{icon:"Email",size:16,strokeWidth:c.iconStrokeWidth})," ",t("Email","letter"))},[C,k]=(0,n.useState)([w]),A=(0,n.useCallback)(e=>{s.send({operation:h.Ru.SANDBOX_ELEMENT_HOVER_SET,index:e})},[s]),S=(0,n.useCallback)((t,i)=>{return n.createElement("span",{className:t.className,onClick:t=>{var n;let a="element";t.target.closest("svg")||t.target.closest(".anticon")||t.target.closest('[class*="icon"]')?a="icon":!t.target.textContent||t.target.closest("svg")||t.target.closest(".anticon")||(a="text");const l=null===e||void 0===e?void 0:e[i],r=(null===l||void 0===l||null===(n=l.className)||void 0===n?void 0:n.replace("em-element-path-item-",""))||"unknown";f({event:"click",action:"click_breadcrumb_element",email_id:d||m,project_id:(null===p||void 0===p?void 0:p.id)||u,element_type:r,element_index:i,element_title:(null===l||void 0===l?void 0:l.title)||"",click_target:a}),v(i)},onMouseOver:()=>{A(i)}},(a=t.className).includes("em-element-path-item-text")?n.createElement(b.Ay,{icon:"ElementText",size:16,strokeWidth:c.iconStrokeWidth}):a.includes("em-element-path-item-image")?n.createElement(b.Ay,{icon:"ElementImage",size:16,strokeWidth:c.iconStrokeWidth}):a.includes("em-element-path-item-link")?n.createElement(b.Ay,{icon:"LinkOutlined",size:16,strokeWidth:c.iconStrokeWidth}):a.includes("em-element-path-item-atom")?n.createElement(b.Ay,{icon:"Atom",size:16,strokeWidth:c.iconStrokeWidth}):a.includes("em-element-path-item-column")?n.createElement(b.Ay,{icon:"Column",size:16,strokeWidth:c.iconStrokeWidth}):a.includes("em-element-path-item-block")?n.createElement(b.Ay,{icon:"Block",size:16,strokeWidth:c.iconStrokeWidth}):a.includes("em-element-path-item-group")?n.createElement(b.Ay,{icon:"Group",size:16,strokeWidth:c.iconStrokeWidth}):a.includes("em-element-path-item-button")?n.createElement(b.Ay,{icon:"ElementButton",size:16,strokeWidth:c.iconStrokeWidth}):a.includes("em-element-path-item-table")?n.createElement(b.Ay,{icon:"ElementTable",size:16,strokeWidth:c.iconStrokeWidth}):a.includes("em-element-path-item-amp")?n.createElement(b.Ay,{icon:"AMP",size:16,strokeWidth:c.iconStrokeWidth}):void 0," ",t.title);var a},[v,A,e,f,d,m,u,p]);return(0,n.useEffect)(()=>{if(e){const i=e.map((e,t)=>({title:S(e,t)}));k([{title:n.createElement("span",{onClick:y},n.createElement(b.Ay,{icon:"Email",size:16,strokeWidth:c.iconStrokeWidth})," ",t("Email","letter"))},...i])}},[e,S,y,t]),n.createElement(n.Fragment,null,n.createElement(a.Qp,{items:C,type:"separator",separator:""}))},Lt=[h.dO,h.Sr,h.e8],Nt=({summary:e,__:t,selectedTags:i,setSelectedTags:l})=>{const r=(0,n.useCallback)((e,t)=>{const n=t?2===i.length?[]:[...i,e]:i.filter(t=>t!==e);l(n)},[i,l]),o=(0,n.useCallback)(e=>e===h.dO?t("Valid"):e===h.e8?t("Warnings"):t("Errors"),[t]);return n.createElement(a.hE,{level:5,className:"optimise__valid-title"},n.createElement(a.$x,{className:"optimise__valid-title-space",size:8},Lt.map((t,l)=>n.createElement(a.Xl,{key:t+l,checked:null===i||void 0===i?void 0:i.includes(t),onChange:e=>r(t,e),className:d()(`${t} optimise__button`,{[`${t}_active`]:i.includes(t)})},o(t),": ",(null===e||void 0===e?void 0:e[t])||0))))},{LINKS:Tt}=h.qG,Bt=(0,n.memo)(({__:e,activeTab:t,validateLinksResult:i,validateLinks:l,selectedTags:r,setSelectedTags:o,isLoading:s,disabled:c,iconStrokeWidth:d,onValidate:m,goToLinkHandler:u})=>t===Tt&&null!==i&&void 0!==i&&i.links?0===i.links.length?n.createElement(a.fI,{className:"optimise__row-mb-24"},n.createElement(a.Fc,{message:e("No links found."),type:"info"})):n.createElement(n.Fragment,null,n.createElement(a.fI,{className:"optimise__row-mb-14"},n.createElement("div",{className:"optimise__title-wrapper"},n.createElement(Nt,{__:e,summary:i.summary,setSelectedTags:o,selectedTags:r}),n.createElement(a.$n,{disabled:c,loading:s,onClick:m,icon:n.createElement(b.Ay,{icon:"SyncOutlined",size:16,strokeWidth:d})},e("Refresh")))),n.createElement(a.fI,{className:"optimise__row-mb-24"},n.createElement(a.fv,{span:24},n.createElement(a.B8,{itemLayout:"horizontal",dataSource:l,renderItem:(t,i)=>{var l,r,o;return n.createElement(a.B8.Item,{className:a.CN,key:i+"_"+t.linkId},n.createElement(a.B8.Item.Meta,{avatar:t.status===h.dO?n.createElement(b.Ay,{icon:"CheckCircleFilled",className:h.dO}):t.status===h.e8?n.createElement(b.Ay,{icon:"CheckCircleFilled",className:h.e8}):n.createElement(b.Ay,{icon:"CloseCircleFilled",className:h.Sr}),title:n.createElement(a.N_,{className:"optimise__link optimise__link-blue",draggable:!1,onClick:()=>u(t.linkId,600>(t.statusCode||0)&&(t.statusCode||0)>399||!t.statusCode)},""===t.url?e("empty link"):t.url),description:n.createElement(n.Fragment,null,!(null===(l=t.text)||void 0===l||!l.length)&&n.createElement(a.EY,{type:"secondary"},t.text),(null===(r=t.page)||void 0===r?void 0:r.title)&&t.page.title,(null===(o=t.page)||void 0===o?void 0:o.secure)&&t.status===h.dO&&n.createElement(n.Fragment,null,n.createElement("span",{className:"image-size-splitter"},"\xa0\u2022\xa0"),n.createElement("span",{className:h.dO},e("secure"))),!t.resolvedUrl&&!t.statusCode&&"url"===t.type&&n.createElement(n.Fragment,null,n.createElement("span",{className:"image-size-splitter"},"\xa0\u2022\xa0"),n.createElement(a.EY,{type:"secondary"},e("Failed to load"))))}))}})))):null);Bt.displayName="LinksSection";var Pt=i(93482);const{IMAGES:Rt}=h.qG,Ft=(0,n.memo)(({__:e,activeTab:t,validateImagesResult:i,validateImages:l,selectedTags:r,setSelectedTags:o,isLoading:s,disabled:c,iconStrokeWidth:m,onValidate:u,goToImageHandler:p,showImgPreviewHandler:g,hideBlockPreviewHandler:f})=>{var v,y;return t===Rt&&null!==i&&void 0!==i&&i.images?0===i.images.length?n.createElement(a.fI,{className:"optimise__row-mb-24"},n.createElement(a.Fc,{message:e("No images found."),type:"info"})):n.createElement(n.Fragment,null,n.createElement(a.fI,{className:"optimise__row-mb-16"},n.createElement(a.Fc,{className:"optimise__alert-custom",message:n.createElement("div",{className:"optimise__summary"},n.createElement("div",null,n.createElement(a.hE,{level:4,className:"optimise__summary-title"},i.images.length," "),n.createElement("span",{className:"optimise__summary-label"},e("images"))),n.createElement("div",null,n.createElement(a.hE,{level:4,className:"optimise__summary-title"},null===(v=i.summaryTime)||void 0===v?void 0:v.value,null===(y=i.summaryTime)||void 0===y?void 0:y.name),n.createElement("span",{className:"optimise__summary-label"},e("total size"))),n.createElement("div",null,n.createElement(a.hE,{level:4,className:"optimise__summary-title"},(Math.max(...i.images.map(e=>e.image.responseTime))/1e3).toFixed(2)+e("s")),n.createElement("span",{className:"optimise__summary-label"},e("time to load")))),type:"warning"})),n.createElement(a.fI,{className:"optimise__row-mb-12"},n.createElement("div",{className:"optimise__title-wrapper"},n.createElement(Nt,{__:e,summary:i.summary,setSelectedTags:o,selectedTags:r}),n.createElement(a.$n,{icon:n.createElement(b.Ay,{icon:"SyncOutlined",size:16,strokeWidth:m}),disabled:c,loading:s,onClick:u},e("Refresh")))),n.createElement(a.fI,{className:"optimise__row-mb-12"},n.createElement(a.fv,{span:24},n.createElement(a.B8,{className:"optimise__result-list",itemLayout:"horizontal",dataSource:l,renderItem:(t,i)=>n.createElement(a.B8.Item,{className:`optimise__image-item image-item ${a.CN}`,key:i},n.createElement(a.B8.Item.Meta,{className:d()("image-item__meta",{"image-item__meta_fail":!t.resolvedUrl&&!t.statusCode}),avatar:n.createElement(a._V,{className:d()("image-item__image optimise__image-auto-height",{"image-item__image_fail":!t.resolvedUrl||!t.valid}),width:92,height:"auto",src:t.resolvedUrl||"",preview:!1,onMouseEnter:()=>{var e;return g(t.url,null===(e=t.image.dimensions)||void 0===e?void 0:e.width)},onMouseLeave:()=>f()}),title:t.url?n.createElement(a.m_,{placement:"top",title:t.message},n.createElement(a.N_,{className:"optimise__link optimise__link-blue",draggable:!1,onClick:()=>p(t.imageId,600>(t.statusCode||0)&&(t.statusCode||0)>399||!t.statusCode)},""===(null===t||void 0===t?void 0:t.url)?e("empty src"):t.url)):t.message,description:n.createElement(n.Fragment,null,n.createElement("div",{className:"image-size"},t.image.dimensions&&n.createElement(n.Fragment,null,t.image.dimensions.width+" \xd7 "+t.image.dimensions.height,n.createElement("span",{className:"image-size-splitter"}," \xa0\u2022\xa0 "),n.createElement("span",null,Math.round(t.image.bytes/1024),e("kB")),n.createElement("span",{className:"image-size-splitter"}," \xa0\u2022\xa0 "),n.createElement("span",null,t.image.responseTime,e("ms")),n.createElement("span",{className:"image-size-splitter"}," \xa0\u2022\xa0 "),n.createElement("span",{className:"image-size-format"},(0,Pt.p)(t.image.contentType))),t.image.secure&&n.createElement(n.Fragment,null,n.createElement("span",{className:"image-size-splitter"}," \xa0\u2022\xa0 "),n.createElement("span",{className:h.dO},e("secure"))),t.resolvedUrl&&!t.valid&&n.createElement(a.EY,{type:"danger"},e("not valid"))),!t.resolvedUrl&&!t.statusCode&&n.createElement(a.EY,{type:"danger"},e("Failed to load")))}))})))):null});Ft.displayName="ImagesSection";const{SPAM_ASSASSIN:Ot}=h.qG,Mt=(0,n.memo)(({__:e,activeTab:t,validateSpamResult:i,isLoading:l,disabled:r,iconStrokeWidth:o,onValidate:s})=>{var c,d;const m=(null===i||void 0===i||null===(c=i.report)||void 0===c?void 0:c.length)||Object.prototype.hasOwnProperty.call(i,"spamScore");if(t!==Ot||!m)return null;const u=i.spamScore||0,p=i.baseSpamScore||0,h=u<2||!i.spamScore||u<=p-1?"success":u<p-1?"warning":"danger";return n.createElement(n.Fragment,null,n.createElement(a.fI,{className:"optimise__row-mb-8"},n.createElement("div",{className:"optimise__title-wrapper optimise__title-wrapper_spam"},n.createElement(a.hE,{level:1,className:"optimise__spam-score-title",type:h},n.createElement("span",{className:"optimise__spam-score-value"},u),n.createElement(a.EY,{className:"optimise__spam-score-text"},"Score")),n.createElement(a.$n,{disabled:r,icon:n.createElement(b.Ay,{icon:"SyncOutlined",size:16,strokeWidth:o}),loading:l,onClick:s},e("Refresh"))),u>p-1&&n.createElement(a.EY,null,e("Lower scores are better. Aim for a score less than ")+(p-1)+".")),n.createElement(a.fI,{className:"optimise__row-mb-8"},n.createElement(a.fv,{span:24},((null===(d=i.report)||void 0===d?void 0:d.length)||0)>0?n.createElement(a.B8,{itemLayout:"horizontal",dataSource:i.report,renderItem:e=>n.createElement(a.B8.Item,{className:a.CN},n.createElement(a.B8.Item.Meta,{title:n.createElement(n.Fragment,null,n.createElement(a.EY,{className:"optimise__spam-report-score"},e.score),n.createElement("span",{className:"optimise__spam-report-description"},e.description))}))}):n.createElement(n.Fragment,null,0===i.spamScore&&e("Your email doesn't look like spam.")))))});Mt.displayName="SpamSection";const{PROBLEMS:jt}=h.qG,Dt=(0,n.memo)(({__:e,activeTab:t,problemsList:i,onSetMonacoPosition:l})=>t!==jt?null:null!==i&&void 0!==i&&i.length?n.createElement(a.fI,{className:"optimise__row-mb-8"},n.createElement(a.fv,{span:24},n.createElement(a.B8,{itemLayout:"horizontal",dataSource:i,renderItem:e=>n.createElement(a.B8.Item,{className:a.CN},n.createElement(a.B8.Item.Meta,{avatar:e.severity<6?n.createElement(b.Ay,{icon:"CloseCircleFilled",className:h.e8}):n.createElement(b.Ay,{icon:"CloseCircleFilled",className:h.Sr}),title:n.createElement(a.EY,{onClick:()=>l(e),className:d()("optimise__text-clickable",{warning:e.severity<6,error:e.severity>=6})},"Line: ",e.startLineNumber," ",e.startLineNumber!==e.endLineNumber&&" \u2013 "+e.endLineNumber),description:n.createElement(a.EY,null,e.message)}))}))):n.createElement(a.fI,{className:"optimise__row-mb-24"},n.createElement(a.Fc,{message:e("No problems found."),type:"info"})));Dt.displayName="ProblemsSection";var Vt=i(77261);const Wt={activeTab:"",selectedTags:[],validateLinks:[],validateImages:[],validateSpamResult:{},optimisationCounter:0,validateLinksResult:{},validateImagesResult:{}},zt=(e,t)=>{switch(t.type){case"SET_ACTIVE_TAB":return{...e,activeTab:t.payload!==e.activeTab?t.payload:""};case"SET_SELECTED_TAGS":return{...e,selectedTags:t.payload};case"SET_VALIDATE_LINKS":return{...e,validateLinks:t.payload};case"SET_VALIDATE_IMAGES":return{...e,validateImages:t.payload};case"SET_VALIDATE_SPAM_RESULT":return{...e,validateSpamResult:t.payload};case"SET_OPTIMISATION_COUNTER":return{...e,optimisationCounter:t.payload};case"INCREMENT_OPTIMISATION_COUNTER":return{...e,optimisationCounter:e.optimisationCounter+1};case"SET_VALIDATE_LINKS_RESULT":return{...e,validateLinksResult:t.payload};case"SET_VALIDATE_IMAGES_RESULT":return{...e,validateImagesResult:t.payload};case"RESET_SELECTED_TAGS":return{...e,selectedTags:[]};default:return e}},{LINKS:Ht,IMAGES:Ut}=h.qG,qt=e=>{var t,i,n,a;if(null!==e.statusCode?e.statusCode<300&&(null===(t=null===(i=e.page)||void 0===i?void 0:i.secure)||void 0===t||t):"invalid"!==e.type)return h.dO;return(e.statusCode&&e.statusCode<400||200===e.statusCode&&(null===(n=null===(a=e.page)||void 0===a?void 0:a.secure)||void 0===n||n))&&"invalid"!==e.type?h.e8:h.Sr},$t=e=>null!==e.statusCode&&e.statusCode<300?h.dO:e.statusCode<400&&e.statusCode>=300||200===e.statusCode&&!e.valid?h.e8:h.Sr,Zt=e=>({valid:e.filter(e=>e.status===h.dO).length,warnings:e.filter(e=>e.status===h.e8).length,errors:e.filter(e=>e.status===h.Sr).length});var Gt=i(3928),Kt=i(81317);const{LINKS:Xt,IMAGES:Yt,SPAM_ASSASSIN:Jt,PROBLEMS:Qt}=h.qG,ei=()=>{var e,t,i,c;const{__:d,_n:m}=(0,o.s9)(),u=(0,l.wA)(),p=(0,r.Zp)(),f=(0,s.hN)(),v=(0,vt.fn)(),E=(0,g.rD)(),{emailId:w,projectId:C}=(0,r.g)(),[k,A]=(0,n.useState)(null),S=(0,n.useRef)(!1),[I]=(0,ht.Oq)(),x=(0,n.useCallback)(e=>{A(e)},[]),L=(0,n.useCallback)((e,t)=>{var i;if(401===(null===e||void 0===e?void 0:e.status)&&(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.code)===Vt.wv){return x({presetId:{link_check:"link_check_exceeded",image_check:"image_check_exceeded",spam_check:"spam_check_exceeded"}[t],previousDisplay:d("\u2014"),nextDisplay:(0,Kt.hO)("infinity")}),u(ht.B3.util.invalidateTags(["LimitsStats","LimitsWarnings"])),!0}return!1},[u,d,x]),N=(0,n.useCallback)(async e=>{var t;if(h.EW.isPlugin)return!0;const i=await I(e),n=(0,yt.c0)(e,null===(t=i.data)||void 0===t?void 0:t.stats);return!n||(x({presetId:n.presetId,previousDisplay:n.previousLimit,nextDisplay:(0,Kt.hO)(n.nextLimit)}),u(ht.B3.util.invalidateTags(["LimitsStats","LimitsWarnings"])),!1)},[u,I,x]),T=(0,_.QC)(),B=(0,l.d4)(y.rd),P=(0,ft.ml)(Et.AZ.ON_LIMIT_ID),R=(0,gt.u)(),[F,O]=(0,n.useReducer)(zt,Wt),[M,j]=(0,Vt.Sr)(),[D,V]=(0,Vt.ku)(),[W,z]=(0,Vt.Ju)(),{data:H,isSuccess:U,refetch:q}=(0,ee.fo)(+(C||0),{skip:!!h.EW.isPlugin||!+C}),$=(0,n.useCallback)(e=>O({type:"SET_OPTIMISATION_COUNTER",payload:e}),[]),Z=(0,n.useCallback)(e=>O({type:"SET_VALIDATE_LINKS",payload:e}),[]),G=(0,n.useCallback)(e=>O({type:"SET_VALIDATE_IMAGES",payload:e}),[]),K=(0,n.useCallback)(e=>O({type:"SET_SELECTED_TAGS",payload:e}),[]),{limitsInPlugin:X,currentBillingOptimisationLimits:Y,disableFields:J}=(({appConfig:e,data:t,isSuccess:i,optimisationCounter:a,setOptimisationCounter:l})=>{const r=(0,n.useMemo)(()=>!(!e.limits||!e.counters)&&h.EW.isPlugin,[e]),{limits:o}=(0,n.useMemo)(()=>h.EW.isPlugin?e.limits?e:{limits:{optimization_limit:0}}:null!==t&&void 0!==t&&t.limits?t:{limits:{optimization_limit:0}},[e,t]),s=(0,n.useMemo)(()=>o.optimization_limit,[o]),c=(0,n.useMemo)(()=>a>=s&&s>0,[a,s]);return(0,n.useEffect)(()=>{if(r){var n;l((null===e||void 0===e||null===(n=e.counters)||void 0===n?void 0:n.optimization_counter)||0)}else{const e=null===t||void 0===t?void 0:t.counters;i&&null!==e&&void 0!==e&&e.optimization_counter&&l(e.optimization_counter)}},[r,t,i,e,l]),{limitsInPlugin:r,currentBillingOptimisationLimits:s,disableFields:c}})({appConfig:E,data:H,isSuccess:U,optimisationCounter:F.optimisationCounter,setOptimisationCounter:$});(({activeTab:e,selectedTags:t,validateLinksResult:i,validateImagesResult:a,setValidateLinks:l,setValidateImages:r})=>{(0,n.useEffect)(()=>{e===Ht&&i.links&&l(t.length>0?i.links.filter(e=>t.includes(e.status)):i.links),e===Ut&&a.images&&r(t.length>0?a.images.filter(e=>t.includes(e.status)):a.images)},[i.links,a.images,t,e,l,r])})({activeTab:F.activeTab,selectedTags:F.selectedTags,validateLinksResult:F.validateLinksResult,validateImagesResult:F.validateImagesResult,setValidateLinks:Z,setValidateImages:G});const{showImgPreviewHandler:Q,hideBlockPreviewHandler:te}=(()=>{const e=(0,n.useRef)(null),t=(0,n.useCallback)((t,i)=>{e.current&&clearTimeout(e.current);let n=document.querySelector(".img-preview"),a=document.querySelector(".img-preview-content");var l;document.querySelector(".img-preview")||(n=document.createElement("div"),n.classList.add("img-preview"),a=document.createElement("div"),a.classList.add("img-preview-content"),n.append(a),null===(l=document.querySelector(".email-pane__col_settings-inner"))||void 0===l||l.append(n)),a&&(a.innerHTML=`<table cellspacing="0" cellpadding="0" border="0" width="100%"><img height="auto" width=${(i||0)+"px"} alt="" style="max-width: 100%; object-fit: contain" src=${t}></table>`),n&&"1"!==n.style.opacity&&setTimeout(()=>{n&&(n.style.opacity="1",n.style.transform="translateX(-100%)")},10)},[]);return{showImgPreviewHandler:t,hideBlockPreviewHandler:(0,n.useCallback)(()=>{const t=document.querySelector(".img-preview");t&&(e.current=setTimeout(()=>{t&&(t.style.opacity="0",t.style.transform="translateX(-99%)",setTimeout(()=>{null===t||void 0===t||t.remove()},300))},300))},[])}})(),ie=(0,n.useCallback)(()=>{P.fire({name:"OptimizationCount",count:F.optimisationCounter+1})},[P,F.optimisationCounter]),ne=(0,n.useCallback)((e,t)=>{T.send({operation:h.Ru.SANDBOX_SET_POSITION_TO_LINK,settings:{elementId:e,isError:t}})},[T]),ae=(0,n.useCallback)((e,t)=>{T.send({operation:h.Ru.SANDBOX_SET_POSITION_TO_IMG,settings:{elementId:e,isError:t}})},[T]),le=(0,n.useCallback)(e=>{const t={startColumn:e.startColumn,startLineNumber:e.startLineNumber,endColumn:e.endColumn,endLineNumber:e.endLineNumber};u((0,y.ps)(t))},[u]),re=(0,n.useCallback)(e=>{O({type:"SET_ACTIVE_TAB",payload:e}),O({type:"RESET_SELECTED_TAGS"}),e===Qt&&(null===B||void 0===B?void 0:B.length)>0&&R({event:"check",action:"check_email_code",email_id:w,project_id:C,problems_count:(null===B||void 0===B?void 0:B.length)||0})},[B,R,w,C]),oe=(0,n.useCallback)(async()=>{if(!w)return void f.error({message:"Save the mail first."});if(J)return void x({presetId:"optimization_exceeded",previousDisplay:Y,nextDisplay:(0,Kt.hO)("infinity")});if(!await N("link_check"))return;X&&(O({type:"INCREMENT_OPTIMISATION_COUNTER"}),ie());const e=v.getValue(),t=(new DOMParser).parseFromString(e,"text/html"),i={},n={};t.querySelectorAll("a[href]").forEach((e,t)=>{i[`link_${t}`]=e.getAttribute("href"),n[`link_${t}`]=e.textContent||""}),T.send({operation:"sandbox_set_attr_to_links"}),D({entity_id:w,data:i}).then(({data:e,error:t})=>{if(t)L(t,"link_check")||f.error({error:t});else if(null!==e&&void 0!==e&&e.result){var i;const t=[...e.result];null===t||void 0===t||t.sort((e,t)=>e.linkId-t.linkId);const a=t.map(e=>({...e,text:n[e.linkId],status:qt(e)})),l={links:a,summary:Zt(a)};O({type:"SET_VALIDATE_LINKS_RESULT",payload:l}),f.success(d("Links validation was successfully completed")),e.limit_warning&&null!=e.limit_remaining&&f.warning({message:`${d("Approaching usage limit. Remaining")}: ${e.limit_remaining}`}),R({event:"check",action:"check_email_links",email_id:w,project_id:C,links_count:(null===(i=l.links)||void 0===i?void 0:i.length)||0}),!h.EW.isPlugin&&q()}else e.statusCode>300||!e.success?f.error({error:{data:e}}):f.error({message:d("Something went wrong.")}),!F.validateLinksResult.links&&re("")}).catch(e=>{L(e,"link_check")||f.error({error:e})})},[w,X,J,Y,x,v,T,D,f,d,R,C,q,ie,F.validateLinksResult.links,L,N]),se=(0,n.useCallback)(async()=>{if(!w)return void f.error({message:"Save the mail first."});if(J)return void x({presetId:"optimization_exceeded",previousDisplay:Y,nextDisplay:(0,Kt.hO)("infinity")});if(!await N("image_check"))return;X&&(O({type:"INCREMENT_OPTIMISATION_COUNTER"}),ie());const e=v.getValue(),t=(new DOMParser).parseFromString(e,"text/html"),i={};t.querySelectorAll("img").forEach((e,t)=>i[`image_${t}`]=e.src),T.send({operation:"sandbox_set_attr_to_images"}),W({entity_id:w,data:i}).then(({data:e,error:t})=>{let i;if(t)L(t,"image_check")||f.error({error:t});else if(null!==e&&void 0!==e&&e.result){var n;const t=Object.values(e.result);t.sort((e,t)=>e.imageId-t.imageId);const a=t.reduce((e,t)=>e+Math.round(t.image.bytes/1024),0);i={images:t.map(e=>({...e,status:$t(e)}))||[],summary:Zt(t.map(e=>({...e,status:$t(e)}))),summaryTime:{value:(a>1200?a/1e3:a).toFixed(1),name:d(a>1200?"MB":"KB")}},i&&O({type:"SET_VALIDATE_IMAGES_RESULT",payload:i}),f.success(d("Images validation was successfully completed")),e.limit_warning&&null!=e.limit_remaining&&f.warning({message:`${d("Approaching usage limit. Remaining")}: ${e.limit_remaining}`}),R({event:"check",action:"check_email_images",email_id:w,project_id:C,images_count:(null===(n=i.images)||void 0===n?void 0:n.length)||0}),!h.EW.isPlugin&&q()}else{var a,l;e.statusCode>300||!e.success?f.error({error:{data:e}}):f.error({message:d("Something went wrong.")}),(null===(a=F.validateImagesResult)||void 0===a||null===(l=a.images)||void 0===l||!l.length)&&re("")}}).catch(e=>{L(e,"image_check")||f.error({error:e})})},[w,X,J,Y,x,v,T,W,f,d,R,C,q,ie,F.validateImagesResult,L,N]),ce=(0,n.useCallback)(async()=>{w?J?x({presetId:"optimization_exceeded",previousDisplay:Y,nextDisplay:(0,Kt.hO)("infinity")}):await N("spam_check")&&(X&&(O({type:"INCREMENT_OPTIMISATION_COUNTER"}),ie()),M({entity_id:w,data:{html:v.getValue()}}).then(({data:e,error:t})=>{if(t)L(t,"spam_check")||f.error({error:t});else if(e&&e.success){var i;const t=!!e.result.report&&Object.values(e.result.report);t?(t.sort((e,t)=>e.score-t.score),O({type:"SET_VALIDATE_SPAM_RESULT",payload:{...e.result,report:t}})):e.result&&O({type:"SET_VALIDATE_SPAM_RESULT",payload:{...e.result,report:t}}),f.success(d("Spam validation was successfully completed")),e.limit_warning&&null!=e.limit_remaining&&f.warning({message:`${d("Approaching usage limit. Remaining")}: ${e.limit_remaining}`}),R({event:"check",action:"check_email_spam",email_id:w,project_id:C,spam_score:(null===(i=e.result)||void 0===i?void 0:i.spamScore)||0}),!h.EW.isPlugin&&q()}else{var n,a;e.statusCode>300||!e.success?f.error({error:{data:e}}):f.error({message:d("Something went wrong.")}),(null===(n=F.validateSpamResult)||void 0===n||null===(a=n.report)||void 0===a||!a.length)&&re("")}}).catch(e=>{L(e,"spam_check")||f.error({error:e})})):f.error({message:"Save the mail first."})},[w,X,J,Y,x,v,M,f,d,R,C,q,ie,F.validateSpamResult,L,N]);(0,n.useEffect)(()=>{Y>0&&F.optimisationCounter>=+Y?S.current||(S.current=!0,x({presetId:"optimization_exceeded",previousDisplay:Y,nextDisplay:(0,Kt.hO)("infinity")})):S.current=!1},[F.optimisationCounter,Y,x]);const de=k?(0,Kt.Si)(k.presetId):null;return n.createElement("div",{className:"optimise selected_form-props-wrapper selected_form-props-wrapper_optimize"},de&&k?n.createElement(Gt.X,{open:!0,onClose:()=>A(null),title:d(de.titleKey),subtitle:d(de.subtitleKey),usageResource:de.usageResource,previousDisplay:k.previousDisplay,nextDisplay:k.nextDisplay,onChangePlan:()=>{A(null),p("/billing")}}):null,X&&n.createElement(a.xl,{text:`${F.optimisationCounter} ${d("of")} ${Y>0?Y:"\u221e"} ${m("test","tests",Y)} ${m("was used","were used",F.optimisationCounter)}`,exceeded:Y>0&&F.optimisationCounter>=Y,extra:n.createElement("span",{style:{textDecoration:"underline",cursor:"pointer"},onClick:()=>p(E.billingPageUrl||h.vc.billing)},d("Need more?"))}),E.optimizeLinksEnabled&&n.createElement(n.Fragment,null,n.createElement(a.cG,{className:"selected-td-form__divider optimise__divider-no-margin"}),n.createElement(a.fI,{gutter:10,align:"middle"},n.createElement(a.fv,{span:20},n.createElement("div",{style:{padding:"15px 0"}},d("Links validation"))),n.createElement(a.fv,{span:4,className:"optimise__col-align-right"},n.createElement(a.$n,{className:"selected-td-form__button ghost-button",type:"text",onMouseDown:e=>e.preventDefault(),onClick:()=>{var e,t;re(Xt),null!==(e=F.validateLinksResult)&&void 0!==e&&null!==(t=e.links)&&void 0!==t&&t.length||F.activeTab===Xt||oe()},loading:V.isLoading,disabled:J&&!(null!==(e=F.validateLinksResult)&&void 0!==e&&null!==(t=e.links)&&void 0!==t&&t.length)},!V.isLoading&&(F.activeTab===Xt?n.createElement(b.Ay,{icon:"DownOutlined",size:16,strokeWidth:E.iconStrokeWidth}):n.createElement(b.Ay,{icon:"RightOutlined",size:16,strokeWidth:E.iconStrokeWidth}))))),n.createElement(Bt,{__:d,activeTab:F.activeTab,validateLinksResult:F.validateLinksResult,validateLinks:F.validateLinks,selectedTags:F.selectedTags,setSelectedTags:K,isLoading:V.isLoading,disabled:J,iconStrokeWidth:E.iconStrokeWidth,onValidate:oe,goToLinkHandler:ne})),E.optimizeImagesEnabled&&n.createElement(n.Fragment,null,n.createElement(a.cG,{className:"selected-td-form__divider optimise__divider-no-margin"}),n.createElement(a.fI,{gutter:10,align:"middle"},n.createElement(a.fv,{span:20},n.createElement("div",{style:{padding:"15px 0"}},d("Images validation"))),n.createElement(a.fv,{span:4,className:"optimise__col-align-right"},n.createElement(a.$n,{className:"selected-td-form__button ghost-button",type:"text",onMouseDown:e=>e.preventDefault(),onClick:()=>{var e,t;re(Yt),null!==(e=F.validateImagesResult)&&void 0!==e&&null!==(t=e.images)&&void 0!==t&&t.length||F.activeTab===Yt||se()},loading:z.isLoading},!z.isLoading&&(F.activeTab===Yt?n.createElement(b.Ay,{icon:"DownOutlined",size:16,strokeWidth:E.iconStrokeWidth}):n.createElement(b.Ay,{icon:"RightOutlined",size:16,strokeWidth:E.iconStrokeWidth}))))),n.createElement(Ft,{__:d,activeTab:F.activeTab,validateImagesResult:F.validateImagesResult,validateImages:F.validateImages,selectedTags:F.selectedTags,setSelectedTags:K,isLoading:z.isLoading,disabled:J,iconStrokeWidth:E.iconStrokeWidth,onValidate:se,goToImageHandler:ae,showImgPreviewHandler:Q,hideBlockPreviewHandler:te})),E.optimizeSpamAssassinEnabled&&n.createElement(n.Fragment,null,n.createElement(a.cG,{className:"selected-td-form__divider optimise__divider-no-margin"}),n.createElement(a.fI,{gutter:10,align:"middle"},n.createElement(a.fv,{span:20},n.createElement("div",{style:{padding:"15px 0"}},d("SpamAssassin"))),n.createElement(a.fv,{span:4,className:"optimise__col-align-right"},n.createElement(a.$n,{className:"selected-td-form__button ghost-button",type:"text",onMouseDown:e=>e.preventDefault(),loading:j.isLoading,onClick:()=>{var e;re(Jt),null!==(e=F.validateSpamResult.report)&&void 0!==e&&e.length||Object.prototype.hasOwnProperty.call(F.validateSpamResult,"spamScore")||ce()},disabled:J&&!(null!==(i=F.validateSpamResult)&&void 0!==i&&null!==(c=i.report)&&void 0!==c&&c.length||Object.prototype.hasOwnProperty.call(F.validateSpamResult,"spamScore"))},!j.isLoading&&(F.activeTab===Jt?n.createElement(b.Ay,{icon:"DownOutlined",size:16,strokeWidth:E.iconStrokeWidth}):n.createElement(b.Ay,{icon:"RightOutlined",size:16,strokeWidth:E.iconStrokeWidth}))))),n.createElement(Mt,{__:d,activeTab:F.activeTab,validateSpamResult:F.validateSpamResult,isLoading:j.isLoading,disabled:J,iconStrokeWidth:E.iconStrokeWidth,onValidate:ce})),E.optimizeCheckCodeEnabled&&n.createElement(n.Fragment,null,n.createElement(a.cG,{className:"selected-td-form__divider optimise__divider-no-margin"}),n.createElement(a.fI,{gutter:10,align:"middle"},n.createElement(a.fv,{span:20},n.createElement("div",{style:{padding:"15px 0"}},d("Source code validation"))),n.createElement(a.fv,{span:4,className:"optimise__col-align-right"},n.createElement(a.$n,{className:"selected-td-form__button ghost-button",type:"text",onMouseDown:e=>e.preventDefault(),onClick:()=>re(Qt)},F.activeTab===Qt?n.createElement(b.Ay,{icon:"DownOutlined",size:16,strokeWidth:E.iconStrokeWidth}):n.createElement(b.Ay,{icon:"RightOutlined",size:16,strokeWidth:E.iconStrokeWidth})))),n.createElement(Dt,{__:d,activeTab:F.activeTab,problemsList:B,onSetMonacoPosition:le})))},ti=({open:e,onClose:t})=>{const{__:i}=(0,o.s9)();return n.createElement(a.aF,{open:e,centered:!0,closable:!1,maskClosable:!1,footer:null,width:520,className:"browser-extension-warning-modal",title:i("Browser extension detected"),onCancel:t},n.createElement("p",null,i("A browser extension (for example, Urban VPN Proxy or similar ad blockers/VPN tools) is injecting code into the email preview. This can corrupt your template when saving.")),n.createElement("p",null,i("We removed the injected code automatically. To avoid this issue, disable the extension for this site or use the editor in an incognito window without extensions.")),n.createElement("div",{className:"browser-extension-warning-modal__footer"},n.createElement(a.$n,{type:"primary",onClick:t},i("Got it")," ")))};var ii=i(74934),ni=i(45060),ai=i(62499),li=i(41173);const ri=(0,n.lazy)(()=>Promise.all([i.e(6368),i.e(1677),i.e(137)]).then(i.bind(i,68589))),oi=(0,n.lazy)(()=>Promise.all([i.e(6811),i.e(1944),i.e(1781)]).then(i.bind(i,41781))),si={height:"100%"},ci=()=>{const e=(0,g.rD)(),t=(0,li.L)(),i=(0,ii.of)(),a=(0,l.d4)(tt.yN),r=(0,ii.XB)(),s=(0,o.s9)(),c=(0,l.d4)(et.C1),d=void 0!==(null===a||void 0===a?void 0:a.id)?String(null===a||void 0===a?void 0:a.id):"",m=h.EW.isPlugin&&"0"!==(null===c||void 0===c?void 0:c.id)?String(c.id):"",{storageProvider:u,pathProxy:p,dataProvider:f}=(0,n.useMemo)(()=>(0,ai.C)({storageProvider:i,projectId:d,restApi:r,i18n:s,pathPostfix:m,appConfig:e,isStandalone:t}),[e,s,t,d,r,i,m]);let v=n.createElement(ni.A,{style:si});return u&&f&&e.imageCenterFileManagerView?v=n.createElement(ri,{storageProvider:u,dataProvider:f,pathProxy:p}):u&&f&&(v=n.createElement(oi,{dataProvider:f})),n.createElement(n.Suspense,{fallback:n.createElement(ni.A,{style:si})},v)};i(7648);var di=i(4373),mi=i(89394),ui=i(97877),pi=i(93119),hi=i(79349),gi=i(9),fi=i(6713),vi=i(91724),bi=i(58525),yi=i(16945),Ei=i(16585),_i=i(41371),wi=i(50028);const Ci=(e,t)=>n.createElement(t,Object.assign({className:"email-pane__tab-bar"},e)),{Content:ki}=a.Layout,Ai=(0,n.memo)(e=>n.createElement(wt,e)),Si=(0,n.memo)(e=>n.createElement(Y,e)),Ii=(0,n.memo)(e=>n.createElement(pe,e)),xi=(0,n.memo)(e=>n.createElement(kt.A,e)),Li=(0,n.memo)((0,n.forwardRef)((e,t)=>n.createElement(Ct.A,Object.assign({},e,{ref:t})))),Ni=(0,n.memo)(e=>n.createElement(it,e)),Ti=(0,n.memo)(e=>n.createElement(f,e)),Bi=(0,n.memo)(e=>n.createElement(It,e)),Pi=({emailElement:e,isSuccess:t,setIsCollaborationEditor:i,isShowAddAllBlocksModal:c,triggerOpenSavedBlocksTab:u,setIsShowAddAllBlocksModal:p})=>{var f,v,w,C,k,A,S;const I=1200,{__:x,_x:L}=(0,o.s9)(),N=(0,_.QC)(),{emailId:T,blockId:B,projectId:R}=(0,r.g)(),F=(0,l.wA)(),{modal:O}=a.qw.useApp(),M=(0,g.rD)(),{token:j}=(0,a.rd)(),D=(0,s.hN)(),V=(0,gt.u)(),W=(0,l.d4)(tt.yN),z=(0,bi.p)(),U=(0,l.d4)(E.B),q=(0,l.d4)(et.C1),$=(0,l.d4)(et.B$),Z=(0,l.Pj)(),G=(0,l.d4)(hi.cL),K=(0,l.d4)(E.NQ),X=(0,l.d4)(y.qX),Y=(0,l.d4)(P.qX),J=(0,l.d4)(E.Fv),Q=(0,l.d4)(E.yy),ee=(0,l.d4)(fi.D2),te=(0,l.d4)(fi.jr),ne=(0,l.d4)(fi.hc),ae=(0,l.d4)(E.Tn),[re]=(0,pt.Ll)(),[oe]=(0,mi.dS)(),[se,ce]=(0,n.useState)(!1),[de,me]=(0,n.useState)(h.T),[ue,pe]=(0,n.useState)(),[fe,ve]=(0,n.useState)(M.defaultBuildPanel||"empty"),[be,ye]=(0,n.useState)("empty"),[Ee,_e]=(0,n.useState)(!1),[we,Ce]=(0,n.useState)([]),[ke,Ae]=(0,n.useState)(!1),[Se,Ie]=(0,n.useState)([]),[xe,Le]=(0,n.useState)(!1),[Ne,Te]=(0,n.useState)(!1),{open:Be,close:Pe}=function(){const[e,t]=(0,n.useState)(!1),i=(0,ft.ml)(Et.AZ.ON_BROWSER_EXTENSION_DETECTED_ID),a=(0,n.useCallback)(()=>{t(!1)},[]);return(0,n.useEffect)(()=>{const e=i.event(()=>{t(!0)});return()=>e.dispose()},[i]),{open:e,close:a}}(),Re=(0,le.cR)(),Fe=(0,vt.fn)(),[Oe,Me]=(0,n.useState)((null===Fe||void 0===Fe?void 0:Fe.getValue())||"");(0,n.useEffect)(()=>{if(!Fe)return;Me(Fe.getValue());const e=Fe.onDidChangeContent(()=>{const e=Fe.getValue();Me(e)});return()=>{e.dispose()}},[Fe]);const je=(0,n.useMemo)(()=>(0,yi.X_)(Oe||(null===e||void 0===e?void 0:e.html)||""),[null===e||void 0===e?void 0:e.html,Oe]),De=(0,yi.WJ)(je),Ve=(0,yi.Gw)(je);let We=!$&&(null===(f=q.id)||void 0===f?void 0:f.toString())===(null===W||void 0===W||null===(v=W.members)||void 0===v?void 0:v.owner.ID);const ze=!h.EW.isPlugin||((null===M||void 0===M?void 0:M.configSwither)||!1);(0,n.useEffect)(()=>{F((0,E.sy)())},[F]),(0,n.useEffect)(()=>{const e=window.localStorage.getItem(h.V0.em_active_tab);e&&F((0,E.PM)(e))},[z,F]);const He=T||B,Ue=e.hasOwnProperty("type")?h.IE:h.Tm,qe=Ue===h.Tm?X:Y,[$e,Ze]=(0,n.useState)({}),Ge=(0,n.useRef)(null),Ke=(0,n.useRef)(),Xe=(0,n.useRef)(),Ye=(0,n.useRef)(),Je=(0,n.useRef)(),it=(0,n.useRef)(),lt=(0,n.useRef)(null),rt=(0,n.useRef)(!1),ot=(0,n.useRef)(!1),st=(0,n.useCallback)(()=>{ot.current=!1},[]),dt=(0,n.useCallback)(()=>{ot.current=!0},[]),mt=(0,n.useCallback)(e=>{(null===e||void 0===e?void 0:e.type)===h.bV.SOCIAL&&dt()},[dt]),[ht,bt]=(0,n.useState)(!1),[yt,_t]=(0,n.useState)(!1),[wt]=(0,pi.b9)(),[Ct,kt]=(0,n.useState)(!1),[At,St]=(0,n.useState)(0),[It,Lt]=(0,n.useState)(!1),Nt=h.EW.isPlugin?!!M.configSwither&&("pro"===localStorage.getItem("configSwither")||"editor"!==localStorage.getItem("configSwither")&&"pro"===M.mode):"pro"===q.email_builder_config||"simple"===q.email_builder_config,Tt=(0,n.useCallback)(()=>{clearTimeout(lt.current);const e=".blocks-search__result-holder";Re.querySelector(e)&&(ee||te||ne)&&(Re.querySelector(e).style.removeProperty("transition"),Re.querySelector(e).style.opacity=0,Re.querySelectorAll(".blocks-search__result-body").forEach(e=>e.style.removeProperty("height")),lt.current=setTimeout(()=>{Re.querySelectorAll(".blocks-search__result-body").forEach(e=>{e.style.height=207*e.getBoundingClientRect().height/660+"px"}),Re.querySelector(e)&&(Re.querySelector(e).style.transition="opacity 0.2s",Re.querySelectorAll(e).forEach(e=>e.style.opacity=1))},200))},[te,ee,ne]),Bt=(0,n.useCallback)(e=>{const t=e.target;setTimeout(()=>{bt(t.closest(".desktop_view")),_t(t.closest(".mobile_view"))},100)});(0,n.useEffect)(()=>{const e=(0,Ei.t)(Re,"mouseover",Bt);return()=>{e.dispose()}},[Re,Bt]),(0,n.useEffect)(()=>{F((0,E.wr)(se?h.ND:h.Vp))},[se,F]),(0,n.useEffect)(()=>{"function"===typeof i&&(Se.length>0?i(!0):i(!1))},[Se]);const[Pt]=(0,ut.EQ)(),{data:Rt={},refetch:Ft,status:Ot}=(0,ut.gb)({entity_id:He},{skip:!He||!1===M.aiAssistentEnabled}),[Mt,jt]=(0,n.useState)([]),[Dt,Vt]=(0,n.useState)(""!==M.defaultBuildPanel?h.nA:h.Jy),[Wt,zt]=(0,n.useState)(null),Ht=(0,n.useCallback)(()=>{var e;const t=null===(e=Xe.current)||void 0===e?void 0:e.getBoundingClientRect(),i=null===ue||void 0===ue?void 0:ue.getBoundingClientRect();N.send({operation:h.Ru.SANDBOX_WINDOW_CHARACTERISTIC,settings:{iframeOffsetTop:J&&"bottom"!==Q?0:30,scrollTop:-(null===t||void 0===t?void 0:t.top)+(null===i||void 0===i?void 0:i.top)+30,innerHeight:window.innerHeight,previewHeight:null===i||void 0===i?void 0:i.height,mode:J&&"bottom"!==Q?"code":"default"}})},[Q,J,ue,N]),Ut=t&&e,qt=(0,n.useCallback)(e=>{const t=window.navigator.platform.match("Mac");M.codeEnabled&&M.codeSideEnabled&&e.altKey&&88===e.keyCode&&(F((0,E.vs)()),We&&(kt(!0),St(1))),((t?e.metaKey:e.ctrlKey)&&e.shiftKey&&76===e.keyCode||(t?e.metaKey:e.ctrlKey)&&e.shiftKey&&69===e.keyCode||(t?e.metaKey:e.ctrlKey)&&e.shiftKey&&82===e.keyCode)&&e.preventDefault()},[F,M.codeEnabled,We,M.codeSideEnabled]),$t=G.includes("UPLOAD_IMAGE_")||G.includes("UPLOAD_BACKGROUND_"),Zt=(0,n.useCallback)(t=>{document.querySelector(".easylogic-colorpicker")||Re.querySelector(".easylogic-colorpicker")||t.target.closest(".email-pane__collapse-wrapper")||t.target.closest(".selected-element-panel__columns-settings__controls__column__remove")||t.target.closest(".email-preview__content-col_main")||t.target.closest(".email-preview-menu")||t.target.closest(".monaco-editor")||t.target.closest(".main__pane-close-btn")||t.target.closest(".main__pane-trigger")||t.target.closest(".ant-modal-wrap")||t.target.closest(".email-pane__sizes")||t.target.closest(".ant-input-clear-icon")||t.target.closest(".ant-color-picker")||t.target.closest(".control-font-family-dropdown")||Wt||t.target.closest(".email-preview-menu__history")||t.target.closest(".selected-element-panel-content")||t.target.closest(".ant-select-dropdown")||t.target.closest(".toggle_view")||t.target.closest(".upload-bg-image__menu")||t.target.closest(".email-pane__paths")||t.target.closest(".ant-tabs-extra-content")||t.target.closest(".anticon-delete")||$t||G===h.lx.IMAGE_EDITOR_MODAL||(U===h.yI&&(dt(),F((0,E.Fk)()),N.send({operation:h.Ru.SANDBOX_ELEMENT_ACTIVE_RESET}),Ce([])),U===h.Vv&&F((0,E.PM)(h.Bv)),F((0,E.mi)(!0)),N.send({operation:h.Ru.SANDBOX_LOCK_EDIT,data:!1}),setTimeout(()=>{e.type?F((0,P.A9)({type:null})):F((0,y.A9)({type:null}))},300)),zt(null)},[F,e.type,G,Wt,U,N,$t]),[Gt,Kt]=(0,n.useState)(!0),{data:Xt=[],refetch:Yt}=(0,ui.Cf)(He,{skip:!He}),[Jt,Qt]=(0,n.useState)(""),[ii,ni]=(0,n.useState)("");(0,n.useEffect)(()=>{He&&Yt()},[U,He,Yt]),(0,n.useEffect)(()=>{He&&!Object.keys(Rt).length&&"fulfilled"===Ot&&Ft()},[U,He,Ft,Rt,Ot]),(0,n.useEffect)(()=>{var e;const t=new ie.jG,i=window.localStorage.getItem(h.V0.em_active_tab);if(0===(null===Rt||void 0===Rt?void 0:Rt.totalCount)&&"pending"!==Ot){const e={project_id:R,connection:"chat",entity_id:He,context:"default",locale:q.locale.slice(0,2)};i||Pt({body:e}).then(()=>{t.isDisposed()||"fulfilled"===Ot&&Ft()})}const n={data:{role:"assistant",message:x("Typing..."),isLoading:!0}};var a,l;(null===Rt||void 0===Rt||null===(e=Rt.documents)||void 0===e?void 0:e.length)>0?(window.localStorage.removeItem(h.V0.em_active_tab),jt(null===Rt||void 0===Rt?void 0:Rt.documents),null!==Rt&&void 0!==Rt&&null!==(a=Rt.documents[(null===Rt||void 0===Rt||null===(l=Rt.documents)||void 0===l?void 0:l.length)-1].data)&&void 0!==a&&a.userInfo&&jt([...null===Rt||void 0===Rt?void 0:Rt.documents,n])):i||jt([n]);return()=>t.dispose()},[He,q.locale,null===Rt||void 0===Rt?void 0:Rt.totalCount,null===Rt||void 0===Rt?void 0:Rt.documents,R,Ft,Pt,Ot]),(0,n.useEffect)(()=>{Ze({}),F(Ue===h.Tm?(0,y.A9)({}):(0,P.A9)({}))},[F,Ue]);const ai=(0,n.useCallback)(e=>{F((0,y.G_)(e))},[F]),li=(0,n.useCallback)(e=>{F((0,P.Dz)(e))},[F]),ri=(0,n.useCallback)(e=>{F(Ue===h.Tm?(0,y.A9)(e):(0,P.A9)(e))},[F,Ue]);(0,n.useEffect)(()=>{const e=Je.current,t=Ye.current;pe(J?t:e)},[J,Q]);const oi=(0,n.useCallback)(e=>{ve(e),"search"===e?_e(!0):(_e(!1),ye(e)),setTimeout(Tt,50)},[Tt]),si=(0,n.useCallback)(t=>{const i=t.data.operation,n=t.data,a=t.data.action;if("application_block_inserted"===i||"application_block_inserted"===t.data.operationId){const i=t.data.operationId?t.data.data:n||{},a="project"===i.type||"template"===i.type||"common"===i.type?"block":"structure",l=i.name||i.type||("block"===a?"block":"structure");V({event:"add",action:"add_element_to_email",element_type:a,element_name:l,entity_id:(null===e||void 0===e?void 0:e.id)||T||B,project_id:(null===W||void 0===W?void 0:W.id)||R})}if(i===h.Ru.APPLICATION_SCROLL_TO&&setTimeout(()=>{var e;null===(e=Ye.current)||void 0===e||e.scrollTo({top:t.data.settings.value,behavior:"smooth"})},100),i===h.Ru.APPLICATION_PREVIEW_ALERT_SHOW&&Le(n.settings.show),i===h.Ru.APPLICATION_TEMPLATE_NOT_EM_ALERT_SHOW&&Te(!0),i===h.Ru.APPLICATION_ACTION&&"toggle_editor"===a&&F((0,E.vs)()),i===h.Ru.APPLICATION_IFRAME_SET_HEIGHT&&(Re.querySelector(".email-pane__iframe").style.height=n.settings.height+"px"),i===h.Ru.APPLICATION_EMAIL_SETTINGS_SET){let e=Object.assign({},n.settings);delete e.preheader;Object.values(e).every(e=>!e)?(F((0,y.M7)(!0)),F((0,E.Fk)())):ai(n.settings),n.settings.noBlocks,F((0,E.wW)(n.settings.responsive)),Kt(e.structuresMedia)}if(i===h.Ru.APPLICATION_BLOCK_SETTINGS_SET){Object.values(n.settings).every(e=>!e)?(F((0,P.rc)(!0)),F((0,E.Fk)())):(li(n.settings),Kt(n.settings.structuresMedia))}if(i===h.Ru.APPLICATION_ELEMENT_SETTINGS_SET){var l,r;const e=Object.values(h.bV),t=!!n.tab||!e.includes(n.type);if(t&&U===h.yI&&F((0,E.Fk)()),n.type===h.bV.EMPTY_TABLE||n.type===h.bV.EMPTY_TD)F((0,E.PM)(h.Bv)),n.type===h.bV.EMPTY_TABLE?(Vt(h.nA),n.tab?oi(n.tab):oi("common")):n.type===h.bV.EMPTY_TD&&Vt(h.Jy);else if(n.type&&U!==h.yI){n.type===h.bV.SOCIAL&&ot.current?st():(st(),F((0,E.PM)(h.yI)))}else n.type!==h.bV.SOCIAL&&st();var o;if(n.type===h.bV.CAROUSEL||n.type===h.bV.ACCORDION||n.type===h.bV.SOCIAL?(Ze({settings:{...n.settings,type:t?null:n.type,caption:n.caption,parent:t?null:n.settings.parent},type:t?null:n.type,parent:t?null:n.settings.parent,caption:n.caption}),ri({})):(ri({...n.settings,type:t?null:n.type,parent:t?null:n.settings.parent,caption:n.caption}),Ze({})),(null===(l=n.settings)||void 0===l||null===(r=l.path)||void 0===r?void 0:r.length)>0)Ce(null===(o=n.settings)||void 0===o?void 0:o.path)}i===h.Ru.APPLICATION_ELEMENT_SETTINGS_CLOSE&&((null===$e||void 0===$e?void 0:$e.type)===h.bV.SOCIAL&&dt(),F((0,E.Fk)()))},[F,ai,li,ri,U,oi,Re,V,e,T,B,W,$e,st,dt]);(0,n.useEffect)(()=>{m.gV({id:null===q||void 0===q?void 0:q.id,email:null===q||void 0===q?void 0:q.email,username:null===q||void 0===q?void 0:q.name})},[q]),(0,n.useEffect)(()=>{var e,t;const i=q.email_builder_config,n=$||(null===(e=q.id)||void 0===e?void 0:e.toString())!==(null===W||void 0===W||null===(t=W.members)||void 0===t?void 0:t.owner.ID),a=(0,H.O4)(Z.getState());if(!i||"string"!==typeof i)return void(!h.EW.isPlugin&&n&&"simple"===a&&F((0,H.bc)("pro")));const l=n&&"simple"===i?"pro":i;l!==a&&F((0,H.bc)(l))},[null===W||void 0===W||null===(w=W.members)||void 0===w||null===(C=w.owner)||void 0===C?void 0:C.ID,q.email_builder_config,q.id,F,$,Z]),(0,n.useEffect)(()=>{var e,t;if(J&&We&&F((0,E.vs)()),h.EW.isPlugin){if(M.configSwither){let e=localStorage.getItem("configSwither")||M.mode||"editor";localStorage.setItem("configSwither",e),F((0,H.bc)(e))}}else $||(null===(e=q.id)||void 0===e?void 0:e.toString())!==(null===W||void 0===W||null===(t=W.members)||void 0===t?void 0:t.owner.ID)?"simple"===M.mode&&F((0,H.bc)("pro")):F((0,H.bc)("simple"))},[]);const Pi=t=>{var i,n;$||(null===(i=q.id)||void 0===i||i.toString(),null===W||void 0===W||null===(n=W.members)||void 0===n||n.owner.ID),setTimeout(()=>{var i,n;if($||(null===(i=q.id)||void 0===i?void 0:i.toString())!==(null===W||void 0===W||null===(n=W.members)||void 0===n?void 0:n.owner.ID)){let i=t?"pro":"editor";localStorage.setItem("configSwither",i),F((0,H.bc)(i)),V({event:"change",action:"change_config_mode",config_mode:i,entity_id:(null===e||void 0===e?void 0:e.id)||T||B,project_id:(null===W||void 0===W?void 0:W.id)||R})}else F((0,H.bc)("pro")),Lt(!0),kt(!0),V({event:"change",action:"change_config_mode",config_mode:"pro",entity_id:(null===e||void 0===e?void 0:e.id)||T||B,project_id:(null===W||void 0===W?void 0:W.id)||R})},200)};(0,vi.A)(si);const Ri=(0,n.useRef)({emailElementType:Ue,emailElementSettings:X,blockElementSettings:Y});Ri.current={emailElementType:Ue,emailElementSettings:X,blockElementSettings:Y},(0,n.useEffect)(()=>{const e=N.addListener(e=>{var t,i;const n=void 0!==(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.operation)?e.data:e;if((null===n||void 0===n?void 0:n.operation)!==h.Ru.APPLICATION_NATIVE_IMAGE_DROP)return;const a=n.file,l=null!==(i=null===W||void 0===W?void 0:W.id)&&void 0!==i?i:R;a&&a instanceof File&&l&&null!==q&&void 0!==q&&q.id?(async()=>{try{let e=a;"image/gif"!==a.type&&(e=await(0,wi.A)(a,{maxSizeMB:M.compressMaxSize||.45,maxWidthOrHeight:M.compressMaxWidthOrHeight||2e3}));const t=await oe({user_id:q.id,folder:String(l),file:e});if(t.error)return D.fromError("IMAGE_UPLOAD_ERROR",a,t.error,!0),void N.send({operation:h.Ru.SANDBOX_NATIVE_IMAGE_DROP_CLEAR});const i=(0,_i.g0)(t.data);if(i.error||!i.file_url)return void N.send({operation:h.Ru.SANDBOX_NATIVE_IMAGE_DROP_CLEAR});const n=i.file_url;N.send({operation:h.Ru.SANDBOX_ELEMENT_SETTINGS_SET,type:h.bV.IMG,settings:{src:n}});const{emailElementType:r,emailElementSettings:o,blockElementSettings:s}=Ri.current,c=r===h.Tm?o:s;(null===c||void 0===c?void 0:c.type)===h.bV.IMG&&ri({...c,src:n,changeKey:"src"})}catch(e){N.send({operation:h.Ru.SANDBOX_NATIVE_IMAGE_DROP_CLEAR})}})():N.send({operation:h.Ru.SANDBOX_NATIVE_IMAGE_DROP_CLEAR})});return()=>e.dispose()},[N,oe,q,R,null===W||void 0===W?void 0:W.id,M.compressMaxSize,M.compressMaxWidthOrHeight,D,ri]),(0,n.useEffect)(()=>{const t=N.addListener("application_atom_inserted",t=>{V({event:"add",action:"add_element_to_email",element_type:"atom",element_name:t||"atom",entity_id:(null===e||void 0===e?void 0:e.id)||T||B,project_id:(null===W||void 0===W?void 0:W.id)||R})}),i=N.addListener("application_block_inserted",t=>{const i="project"===(null===t||void 0===t?void 0:t.type)||"template"===(null===t||void 0===t?void 0:t.type)||"common"===(null===t||void 0===t?void 0:t.type)?"block":"structure",n=(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t?void 0:t.type)||("block"===i?"block":"structure");V({event:"add",action:"add_element_to_email",element_type:i,element_name:n,entity_id:(null===e||void 0===e?void 0:e.id)||T||B,project_id:(null===W||void 0===W?void 0:W.id)||R})});return()=>{null===t||void 0===t||t.dispose(),null===i||void 0===i||i.dispose()}},[N,V,null===e||void 0===e?void 0:e.id,T,B,R,null===W||void 0===W?void 0:W.id]);const Fi=(0,n.useRef)(),[Oi,Mi]=(0,n.useState)("unset"),ji=(0,n.useCallback)(()=>{var e,t;let i;const n=null===(e=Ye.current)||void 0===e?void 0:e.getBoundingClientRect();if((null===Fi||void 0===Fi||null===(t=Fi.current)||void 0===t?void 0:t.getBoundingClientRect().top)>=0){const e=n&&Math.round(n&&(null===n||void 0===n?void 0:n.height)-30);Fi.current.style.height=`${e}px`,Mi(e-30)}i&&window.clearTimeout(i),i=window.setTimeout(function(){N.isInited()&&Ht()},100)},[Ht,N]);(0,n.useEffect)(()=>(U===h.z$?Ge.current=setInterval(()=>{Ft({entity_id:He})},5e3):clearInterval(Ge.current),clearInterval(Ge.current)),[He,Ft,U]);const Di=window.localStorage.getItem(h.V0.em_code_mode_pane_sizes),[Vi,Wi]=(0,n.useState)(+Di||50),zi=(0,n.useRef)(Vi);(0,n.useEffect)(()=>{zi.current=Vi},[Vi]);const Hi=()=>{let e=Re.querySelector(".block-search__preview");e&&(e.style.opacity="0",e.style.transform="translateX(-99%)",setTimeout(function(){e.remove()},300))};let Ui=[];const qi={display:"flex",alignItems:"center",justifyContent:"center"};M.blocksEmptyEnabled&&Ui.push({label:n.createElement(a.m_,{placement:"top",title:x("Empty blocks")},n.createElement("div",{style:qi},n.createElement(b.Ay,{icon:"BorderOuterOutlined",style:{fontSize:18}}))),value:"empty"}),M.blocksSavedEnabled&&Ui.push({label:n.createElement(a.m_,{placement:"top",title:x("Saved blocks")},n.createElement("div",{style:qi},n.createElement(b.Ay,{icon:"AppstoreAddOutlined",style:{fontSize:18}}))),value:"project"}),M.blocksCommonEnabled&&Ui.push({label:n.createElement(a.m_,{placement:"top",title:x("Common blocks")},n.createElement("div",{style:qi},n.createElement(b.Ay,{icon:"AppstoreOutlined",style:{fontSize:18}}))),value:"common"}),M.blocksTemplateEnabled&&Ui.push({label:n.createElement(a.m_,{placement:"top",title:x("Template blocks")},n.createElement("div",{style:qi},n.createElement(b.Ay,{icon:"BuildOutlined",style:{fontSize:18}}))),value:"template"}),M.blocksSearchEnabled&&Ui.push({label:n.createElement(a.m_,{placement:"top",title:x("Blocks search")},n.createElement("div",{style:qi},n.createElement(b.Ay,{icon:"SearchOutlined",style:{fontSize:18}}))),value:"search"});const $i="empty"!==fe||Ee,Zi=!M.blocksSectionsShow||$i?"100%":"calc(100% - 44px)";let Gi=[{label:n.createElement("div",{className:"email-pane__tab"},x("Elements")),key:h.Jy,forceRender:!0,className:"email-pane__collapse-panel email-pane__atoms",children:n.createElement(Ni,null)},{label:n.createElement("div",{className:"email-pane__tab"},x("Blocks")),key:h.nA,forceRender:!0,className:"email-pane__collapse-panel email-pane__blocks-search",style:{height:Zi},children:n.createElement("div",{className:d()("email-pane__blocks-panel",{"email-pane__blocks-panel_scrollable":$i})},M.blocksSectionsShow&&n.createElement("div",{className:"email-pane__blocks-panel-header"},n.createElement(a.$x.Compact,{block:!0},!Ee&&n.createElement(a.$q,{block:!0,style:{width:"100%",marginTop:24},onChange:oi,value:fe,options:Ui}),Ee&&n.createElement("div",{style:{width:"100%",height:36}}),Ee&&n.createElement("div",{style:{width:36,textAlign:"right",marginTop:22}},n.createElement(b.Ay,{icon:"CloseOutlined",style:{padding:"0 2px 0",cursor:"pointer"},onClick:()=>{_e(!1),ve(be)}}))),n.createElement("div",{className:"blocks-search__divider-wrapper",style:{marginTop:Ee?28:12}},n.createElement(a.cG,{className:"blocks-search__divider"}))),n.createElement("div",{className:"email-pane__blocks-panel-body"},n.createElement("div",{className:"blocks-search__empty-shadow",style:{display:"empty"!==fe||Ee?"none":"block"}},Gt?n.createElement(ge.A,null):n.createElement(he.A,null)),n.createElement("div",{className:d()("email-pane__blocks-panel-results",{"email-pane__blocks-panel-results_visible":$i})},n.createElement(Ii,{parentEmailId:null===e||void 0===e?void 0:e.parent_email,blocksTab:fe,search:Ee,reloadBlockScreens:Tt,email:e,setIsShowAddAllBlocksModal:p}))))}],Ki=[{disabled:Ct,key:h.yI,style:{height:M.sidePanelFloating?J&&"bottom"===Q?Oi:"calc(100% - 30px)":"100%"},className:"em-analytics__email-tab-properties",children:n.createElement(n.Fragment,null,(!(null===qe||void 0===qe||!qe.type)||!(null===$e||void 0===$e||!$e.type))&&n.createElement("div",{className:d()("email-pane__collapse-wrapper",{"mobile-view":se,"mobile-properties":se&&ae!==h.mX}),onMouseLeave:Hi},n.createElement(ct,{email:e,formSettings:$e,onClosePanel:mt})))},{disabled:Ct,key:h.Vv,style:{height:M.sidePanelFloating?J&&"bottom"===Q?Oi:"calc(100% - 30px)":"100%"},className:"em-analytics__email-tab-history",children:Ut&&n.createElement("div",{className:"email-pane__collapse-wrapper",onMouseLeave:Hi},n.createElement(Bi,{setCollapsedHistory:()=>F((0,E.mi)(!0)),emailElement:Ut}))},{key:h.rb,className:"em-analytics__email-tab-properties"},{disabled:Ct,label:n.createElement(a.m_,{placement:"left",title:L("Build","tab")},n.createElement(b.Ay,{"data-testid":"contentIcon",icon:"PlusCircleOutlined",size:24,strokeWidth:M.iconStrokeWidth})),key:h.Bv,className:"em-analytics__email-tab-build",style:{height:M.sidePanelFloating?J&&"bottom"===Q?Oi:"calc(100% - 30px)":"100%",overflow:"hidden"},children:n.createElement("div",{className:d()("email-pane__collapse-wrapper",{"email-pane__collapse-wrapper_no-topleft-radius":U===h.Bv||!U,"email-pane__collapse-wrapper_build":Dt===h.nA&&$i}),onMouseLeave:Hi},n.createElement(a.tU,{className:d()("secondary-tabs email-pane__collapse",{"secondary-tabs_unset_scroll":Dt===h.nA}),size:"large",activeKey:Dt,onChange:e=>Vt(e||""),items:Gi}))},{disabled:Ct,label:n.createElement(a.m_,{styles:{body:{border:"2px dot-dash red"}},placement:"left",title:L("Styles","tab")},n.createElement(b.Ay,{"data-testid":"stylesIcon",icon:"Styles",size:24,strokeWidth:M.iconStrokeWidth})),key:h.rY,className:"em-analytics__email-tab-styles",style:{height:M.sidePanelFloating?J&&"bottom"===Q?Oi:"calc(100% - 30px)":"100%",overflow:"hidden"},children:n.createElement("div",{className:"email-pane__collapse-wrapper"},n.createElement(Si,{email:e}))}];M.commentsEnabled&&Ki.push({disabled:Ct,label:n.createElement(a.m_,{placement:"left",title:L("Discuss","tab")},n.createElement(b.Ay,{"data-testid":"commentsIcon",icon:"CommentOutlined",size:24,strokeWidth:M.iconStrokeWidth}),We&&n.createElement(b.Ay,{icon:"Lock",size:14,strokeWidth:M.iconStrokeWidth,className:"free-mode-firewall-icon free-mode-firewall-icon_emailpane"}),!!Xt.length&&n.createElement("span",{className:"email-pane__comment-counter"},Xt.filter(e=>"deleted"!==e.comment_status).length)),key:h.hc,className:"email-pane__tab-discuss em-analytics__email-tab-discuss",style:{height:M.sidePanelFloating?J&&"bottom"===Q?Oi:"calc(100% - 30px)":"100%",overflow:"hidden"},children:n.createElement("div",{className:"email-pane__collapse-wrapper"},n.createElement(a.tU,{className:"secondary-tabs email-settings__collapse discuss-wrapper",size:"large",activeKey:h.hc,items:[{label:n.createElement(n.Fragment,null,x("Discuss")),key:h.hc,forceRender:!0,className:"email-settings__collapse-panel",children:He?n.createElement(nt.A,{email:e,comments:Xt,subjectId:He,isLoggedIn:!0,emailElementType:Ue}):n.createElement("div",{className:"aside-content-wrapper"},e.hasOwnProperty("type")?n.createElement(a.Fc,{description:x("Save the block before commenting."),type:"info",showIcon:!0,style:{marginBottom:20}}):n.createElement(a.Fc,{description:x("Save the email before commenting."),type:"info",showIcon:!0,style:{marginBottom:20}}))}]}))});const Xi=()=>{re({entity_id:He}).then(e=>{e.error?D.error({message:e.error.data.code,description:e.error.data.message}):e.data.success&&D.success({message:x("Success"),description:e.data.success}),Ft(),Ae(!1)})};M.aiAssistentEnabled&&Ki.push({disabled:Ct,label:n.createElement(a.m_,{placement:"left",title:L("AI assistant","tab")},n.createElement(b.Ay,{"data-testid":"aiAssistentIcon",icon:"AI",size:24,strokeWidth:M.iconStrokeWidth}),We&&n.createElement(b.Ay,{icon:"Lock",size:14,strokeWidth:M.iconStrokeWidth,className:"free-mode-firewall-icon free-mode-firewall-icon_emailpane"}),(null===Rt||void 0===Rt?void 0:Rt.totalCount)>0&&He&&n.createElement("span",{className:"email-pane__comment-counter"},null===Rt||void 0===Rt?void 0:Rt.totalCount)),key:h.z$,className:"email-pane__tab-discuss em-analytics__email-tab-discuss",style:{height:M.sidePanelFloating?J&&"bottom"===Q?Oi:"calc(100% - 30px)":"100%",overflow:"hidden"},children:n.createElement(n.Fragment,null,n.createElement("div",{className:"email-pane__collapse-wrapper"},n.createElement(a.tU,{className:"secondary-tabs email-settings__collapse discuss-ai-wrapper",size:"large",activeKey:h.z$,tabBarExtraContent:n.createElement(a.m_,{placement:"top",title:x("Clear chat")},n.createElement(a.iS,{description:x("Clear chat history?"),onConfirm:Xi,okText:x("Yes"),cancelText:x("No"),icon:"",placement:"leftTop",title:!1},n.createElement(a.$n,{type:"text",icon:n.createElement(b.Ay,{icon:"ClearChat",style:{fontSize:16}}),style:{marginRight:16}}))),items:[{label:n.createElement(n.Fragment,null,x("AI assistant")),key:h.z$,forceRender:!0,className:"email-settings__collapse-panel",children:He||window.localStorage.getItem(h.V0.em_active_tab)?n.createElement(Ai,{messages:Mt.length>0?Mt:[{data:{role:"assistant",message:x("Typing..."),isLoading:!0}}],newEmailAiGeneratorRef:rt}):n.createElement("div",{className:"aside-content-wrapper"},e.hasOwnProperty("type")?n.createElement(a.Fc,{description:x("Save the block before commenting."),type:"info",showIcon:!0,style:{marginBottom:20}}):n.createElement(a.Fc,{description:x("Save the email before commenting."),type:"info",showIcon:!0,style:{marginBottom:20}}))}]})))}),M.optimizeEnabled&&Ki.push({disabled:Ct,label:n.createElement(a.m_,{styles:{body:{border:"2px dot-dash red"}},placement:"left",title:L("Optimize","tab")},n.createElement(b.Ay,{"data-testid":"optimizeIcon",icon:"Speed",size:24,strokeWidth:M.iconStrokeWidth}),We&&n.createElement(b.Ay,{icon:"Lock",size:14,strokeWidth:M.iconStrokeWidth,className:"free-mode-firewall-icon free-mode-firewall-icon_emailpane"})),key:h.N7,className:"em-analytics__email-tab-optimise",style:{height:M.sidePanelFloating?J&&"bottom"===Q?Oi:"calc(100% - 30px)":"100%",overflow:"hidden"},children:n.createElement("div",{className:"email-pane__collapse-wrapper"},n.createElement(a.tU,{className:"secondary-tabs secondary-tabs_optimise email-settings__collapse optimise-wrapper",size:"large",activeKey:h.N7,items:[{label:n.createElement(n.Fragment,null,x("Optimize")),key:h.N7,forceRender:!0,className:"email-settings__collapse-panel",children:n.createElement(ei,null)}]}))}),M.settingsEnabled&&Ki.push({disabled:Ct,label:n.createElement(a.m_,{placement:"left",title:L("Settings","tab")},n.createElement("span",null,n.createElement(b.Ay,{"data-testid":"settingsIcon",icon:"SettingOutlined",size:24,strokeWidth:M.iconStrokeWidth}))),key:h.zx,className:"em-analytics__email-tab-edit",style:{height:M.sidePanelFloating?J&&"bottom"===Q?Oi:"calc(100% - 30px)":"100%",overflow:"hidden"},children:n.createElement("div",{className:"email-pane__collapse-wrapper"},n.createElement(Ti,{email:e}))});const[Yi,Ji]=(0,n.useState)([]),[Qi,en]=(0,n.useState)(!1),[tn,nn]=(0,n.useState)(0),[an,ln]=(0,n.useState)(0),rn=(null===(k=Re.querySelector(".email-pane__col_preview"))||void 0===k?void 0:k.getBoundingClientRect().width)-(M.sidePanelFloating?0:38),[on,sn]=(0,n.useState)(null);(0,n.useEffect)(()=>{He&&Yt(He)},[He,Yt]),(0,n.useEffect)(()=>{const e=N.onInit(()=>{N.send({operation:h.Ru.SANDBOX_LOCK_EDIT,data:!1}),N.send({operation:h.Ru.SANDBOX_LOCK_DISCUSS,value:Qi})});return()=>e.dispose()},[Qi,N]),(0,n.useEffect)(()=>{if(Yi.length<2){const e=null===ue||void 0===ue?void 0:ue.getBoundingClientRect(),t=setInterval(i,50);function i(){N.isInited()&&e&&(Ht(),clearInterval(t))}Ji(e=>[...e,t])}return clearInterval(Yi[Yi.length-1])},[Yi,ue,Ht,N]);const cn=(0,n.useCallback)((e=K)=>{var t;N.send({operation:h.Ru.SANDBOX_IFRAME_SETSIZE,settings:{iframeWidth:e+2}}),null===(t=Ke.current)||void 0===t||t.resize()},[K,N]);(0,n.useEffect)(()=>{if(en(U===h.hc),U!==h.rb){var e;const t=Re.querySelector(".email-pane__row"),i=null===t||void 0===t?void 0:t.getBoundingClientRect().width;(null===Xe||void 0===Xe||null===(e=Xe.current)||void 0===e?void 0:e.getBoundingClientRect().width)+540>i&&F((0,E.vc)("100%"))}},[F,U,Re]);const dn=(0,n.useCallback)(()=>{const e=Xe.current;e&&(e.style.borderWidth="1px",M.sidePanelFloating||(e.style.marginLeft="-1px",e.style.marginRight="-1px"),e.style.borderLeftColor=null,e.style.borderRightColor=null)},[M.sidePanelFloating]),mn=(0,n.useCallback)(e=>{const t=zi.current;gn(!1),on&&(setTimeout(()=>cn(),50),sn(null)),e.target.classList.contains("email-pane__handle")||dn(),window.localStorage.setItem(h.V0.em_code_mode_pane_sizes,JSON.stringify(t))},[cn,on,zi.current,dn]),un=e=>t=>{t.target.classList.contains("email-pane__handle")&&(t.preventDefault(),nn(t.target.parentNode.offsetWidth),ln(t.pageX),sn(e),zt(e))},pn=e=>{const t=Xe.current;"string"!==typeof e||on&&on!==e?on||(dn(),Re.querySelector(".email-pane__iframe").style.width="1px",Re.querySelector(".email-pane__iframe").style.removeProperty("margin-left")):(Re.querySelector(".email-pane__iframe").style.width="calc(100% + 1px)","right"===e?(t.style.borderRightColor=j.colorPrimary,t.style.borderRightWidth="2px"):(t.style.borderLeftColor=j.colorPrimary,t.style.borderLeftWidth="2px",Re.querySelector(".email-pane__iframe").style.marginLeft="-1px"))},[hn,gn]=(0,n.useState)(!1),fn=(0,n.useCallback)(e=>{if(!on)return;let t=2*(e.pageX-an),i=tn+("left"===on?-t:t);const n=Math.min(rn,I);if(i>318&&i<n){var a;const e=Math.min(i,I);F((0,E.vc)(e)),"number"===typeof e&&e<=425?se||ce(!0):se&&ce(!1),null===(a=Ke.current)||void 0===a||a.resize()}},[F,tn,an,on,rn,se,ce]),vn=(0,n.useCallback)(e=>{if(hn)if("bottom"===Q){const t=it.current.getBoundingClientRect().height,i=it.current.getBoundingClientRect().top,n=(e.clientY-i)/t*100;if(n<20||n>80)return;Wi(n),ji()}else{const t=it.current.getBoundingClientRect().width,i=it.current.getBoundingClientRect().left,n=(e.clientX-i)/t*100,a=Xe.current.getBoundingClientRect().width;if(M.desktopMobileSwitchPanel&&"number"===typeof a&&a<=425&&(F((0,E.vc)(425)),se||ce(!0)),n<20||n>80)return;Wi(n)}},[hn,Q,ji,se,F,M.desktopMobileSwitchPanel,ce]);(0,n.useEffect)(()=>{ji()},[J,ji]);const bn=e=>{var t;null===e||void 0===e||null===(t=e.stopPropagation)||void 0===t||t.call(e);const i=de===h.T?h.nd:h.T;N.send({operation:h.Ru.SANDBOX_SWITCH_THEME,data:{theme:i}}),me(i)},yn=(e="panel")=>{const t="panel"===e,i=de===h.nd;return n.createElement(a.m_,{title:x(i?"Light theme":"Dark theme"),placement:t?"top":"bottom"},n.createElement(a.$n,{type:t?i?"primary":"text":"default",icon:n.createElement(b.Ay,{icon:i?"LightMode":"DarkMode",size:t?18:16,strokeWidth:t?M.iconStrokeWidth:2}),shape:"circle",size:t?void 0:"small",onClick:bn,className:"toggle_view theme_view email-pane__theme-toggle",style:t?void 0:{left:4,top:4,zIndex:999,padding:0,position:"absolute"}}))},En=t=>{const i="number"===typeof t?Math.min(t,I):t;F((0,E.vc)(i)),setTimeout(()=>cn(i),700),"number"===typeof i&&i<=425?se||ce(!0):se&&ce(!1);const n="number"===typeof i?i:"100%"===i?"full":i,a="number"===typeof i&&i<=425?"mobile":"desktop";V({event:"change",action:"change_email_size",email_id:(null===e||void 0===e?void 0:e.id)||T||B,project_id:(null===W||void 0===W?void 0:W.id)||R,width:n,view_type:a})};(0,n.useEffect)(()=>{const e=new ie.jG;return e.addDisposable((0,Ei.a)(Re,"click",Zt)),e.addDisposable((0,Ei.a)(Re,"mouseup",e=>mn(e,Vi),!0)),()=>{e.dispose()}},[Re,Zt]),(0,n.useEffect)(()=>(window.addEventListener("scroll",ji,!0),window.addEventListener("mousemove",fn,!0),window.addEventListener("mousemove",vn),window.addEventListener("keydown",qt),()=>{window.removeEventListener("mousemove",fn,!0),window.removeEventListener("mousemove",vn),window.removeEventListener("scroll",ji,!0),window.removeEventListener("keydown",qt)}));const[_n,wn]=(0,n.useState)(M.emailPaneDesktopSize||K);(0,n.useEffect)(()=>{M.emailPaneDesktopSize&&F((0,E.vc)(M.emailPaneDesktopSize))},[F,M.emailPaneDesktopSize]),(0,n.useEffect)(()=>{wn(J&&"bottom"!==Q&&!se&&M.desktopMobileSwitchPanel?"100%":K)},[F,M.emailPaneDesktopSize,J,Q,se,M.desktopMobileSwitchPanel,K]);return(0,n.useEffect)(()=>{u&&(Vt(h.nA),oi("project"))},[u]),n.createElement(a.Layout,{className:d()("email-pane",{"email-pane_code-mode":J,"email-pane_only_code_mode_mobile":M.onlyCodeModeInMobile,"email-pane_code-mode-bottom":J&&"bottom"===Q,"email-pane_no-element-navigation":!M.switchDesktopMobilePropsEnabled&&!M.stepToOtherElementEnabled&&!M.deleteButtonEnabled,"email-pane_is-mobile":se,"email-pane_path-enabled":M.pathEnabled})},n.createElement(ki,{className:"email-pane__container",ref:Je},((null===qe||void 0===qe?void 0:qe.type)===h.bV.TEXT||(null===qe||void 0===qe?void 0:qe.type)===h.bV.LINK||qe.type===h.bV.IMG||qe.type===h.bV.BUTTON)&&J&&"bottom"!==Q&&n.createElement(at.A,{className:d()("selected-element-panel__content selected-element-panel__content_abs",{"selected-element-panel__hidden":qe.type===h.bV.IMG}),emailElementType:Ue,formSettings:$e}),xe&&se&&n.createElement(a.Fc,{message:x("Template is not mobile-friendly"),description:x("While editing, some elements of the email no longer fit the screen of the mobile device. Check that these elements are set to a smaller width for mobile devices."),type:"warning",className:"email-pane__col__alert",closable:!0}),Ne&&h.EW.isPlugin&&M.templateNotEmAlertShow&&n.createElement(a.Fc,{message:x("Template from another editor"),description:x("This template was created in another editor. Rebuild it from our components to get stable rendering, error-free editing, and full design control."),type:"warning",className:"email-pane__col__alert",closable:!0}),n.createElement(a.fI,{ref:it,className:d()("email-pane__row",{"email-pane__left":J&&"right"===Q,"email-pane__right":J&&"left"===Q,"email-pane__bottom":J&&"bottom"===Q,"email-pane__sizeSwitcher":M.desktopMobileSwitchPanel,"email-pane__reverse":"left"===M.menuDirection,"email-pane__pinch":!M.sidePanelFloating})},n.createElement(a.fv,{style:{flexGrow:1,overflowY:M.sidePanelFloating?"scroll":"hidden",overflowX:"hidden",height:J&&"bottom"===Q?`calc(${Vi}%)`:"100%",width:`${"left"===Q?100-Vi:"bottom"===Q?100:Vi}%`},id:"pane-content-wrapper",ref:M.sidePanelFloating?Ye:null},n.createElement("div",{className:"email-pane__iframe-scroll-top",id:"iframe-scroll-top"}),M.desktopMobileSwitchPanel&&n.createElement(a.$x,{className:"email-pane__sizes-panel-wrapper",direction:"vertical",size:10},n.createElement(a.$x,{className:"email-pane__sizes-panel",size:0},yn("panel"),n.createElement(a.m_,{title:x("Desktop view"),placement:"top",open:ht},n.createElement(a.$n,{type:se?"text":"primary",icon:n.createElement(b.Ay,{icon:"DesktopOutlined",size:18,strokeWidth:M.iconStrokeWidth}),shape:"circle",onClick:()=>En(M.emailPaneDesktopSize||1e3),className:"toggle_view desktop_view"})),n.createElement(a.m_,{title:x("Mobile view"),placement:"top",open:yt},n.createElement(a.$n,{type:se?"primary":"text",icon:n.createElement(b.Ay,{icon:"MobileOutlined",size:18,strokeWidth:M.iconStrokeWidth}),shape:"circle",onClick:()=>En(425),className:"toggle_view mobile_view"}))),M.codeSideEnabled&&n.createElement(a.m_,{title:x("Code mode"),placement:"right"},n.createElement(a.$n,{type:J?"primary":"default",icon:n.createElement(b.Ay,{icon:"Code"}),shape:"circle",onClick:()=>(t=>{const i=J?"visual":"code",n=!J;if(J?F((0,E.vs)()):"string"===typeof t?(F((0,E.Uf)(t)),!J&&F((0,E.vs)())):F((0,E.vs)()),n){const i=Ue===h.IE?"block":"email",n="string"===typeof t?t:Q||"toggle";V({event:"activate",action:"activate_code_mode",entity_type:i,entity_id:(null===e||void 0===e?void 0:e.id)||T||B,project_id:(null===W||void 0===W?void 0:W.id)||R,code_mode_direction:n})}V({event:"change",action:"change_editor_mode",editor_mode:i,entity_id:(null===e||void 0===e?void 0:e.id)||T||B,project_id:(null===W||void 0===W?void 0:W.id)||R}),F((0,E.Fk)()),setTimeout(()=>{Ue===h.IE?F((0,P.A9)({type:null})):F((0,y.A9)({type:null}))},300),N.send({operation:h.Ru.SANDBOX_ELEMENT_ACTIVE_RESET}),F((0,gi.rI)())})("right")}))),n.createElement(a.fI,{className:d()("email-pane__col-wrapper",{container:J&&"bottom"===Q||!J,"email-pane__col-wrapper_reverse":"left"===M.menuDirection,"email-pane__col-wrapper_pinch":!M.sidePanelFloating}),style:{flexGrow:1,maxWidth:"unset",paddingTop:M.desktopMobileSwitchPanel&&J&&"bottom"!==Q?"60px":""}},n.createElement(a.fv,{className:"email-pane__col email-pane__col_preview",style:{flexGrow:1,maxWidth:"unset"},ref:M.sidePanelFloating?null:Ye},M.desktopMobileSwitchRule&&n.createElement("div",{className:`email-pane__sizes ${Jt}`},n.createElement("div",{className:"email-pane__width-selectors-wrapper"},n.createElement("div",{className:"device-width__theme"},yn("rule")),n.createElement("div",{className:"device-width__full",style:{flexGrow:1},onMouseEnter:()=>{Qt("device-width__full-hovered"),ni(x("Desktop"))},onMouseLeave:()=>{Qt(""),ni("")},onClick:()=>En(1200)}),n.createElement("div",{className:"device-width__768",style:{width:171},onMouseEnter:()=>{Qt("device-width__768-hovered"),ni(x("Small desktop \u2013 768px"))},onMouseLeave:()=>{Qt(""),ni("")},onClick:()=>En(768)}),n.createElement("div",{className:"device-width__425",style:{width:25},onMouseEnter:()=>{Qt("device-width__425-hovered"),ni(x("Mobile L \u2013 425px"))},onMouseLeave:()=>{Qt(""),ni("")},onClick:()=>En(425)}),n.createElement("div",{className:"device-width__375",style:{width:28},onMouseEnter:()=>{Qt("device-width__375-hovered"),ni(x("Mobile M \u2013 375px"))},onMouseLeave:()=>{Qt(""),ni("")},onClick:()=>En(375)}),n.createElement("div",{className:"device-width__320",style:{width:320},onMouseEnter:()=>{Qt("device-width__320-hovered"),ni(x("Mobile S \u2013 320px"))},onMouseLeave:()=>{Qt(""),ni("")},onClick:()=>En(320)},ii),n.createElement("div",{className:"device-width__375",style:{width:28},onMouseEnter:()=>{Qt("device-width__375-hovered"),ni(x("Mobile M \u2013 375px"))},onMouseLeave:()=>{Qt(""),ni("")},onClick:()=>En(375)}),n.createElement("div",{className:"device-width__425",style:{width:25},onMouseEnter:()=>{Qt("device-width__425-hovered"),ni(x("Mobile L \u2013 425px"))},onMouseLeave:()=>{Qt(""),ni("")},onClick:()=>En(425)},n.createElement(a.m_,{title:x("Mobile view"),placement:"bottom"},n.createElement(a.$n,{type:"default",icon:n.createElement(b.Ay,{icon:"MobileOutlined",size:16,strokeWidth:2}),size:"small",shape:"circle",style:{right:-12,top:4,zIndex:999,padding:0,position:"absolute",onClick:()=>En(425)}}))),n.createElement("div",{className:"device-width__768",style:{width:171},onMouseEnter:()=>{Qt("device-width__768-hovered"),ni(x("Small desktop \u2013 768px"))},onMouseLeave:()=>{Qt(""),ni("")},onClick:()=>En(768)},n.createElement(a.m_,{title:x("Desktop view"),placement:"bottom"},n.createElement(a.$n,{type:"default",icon:n.createElement(b.Ay,{icon:"DesktopOutlined",size:16,strokeWidth:2}),size:"small",shape:"circle",style:{right:-12,top:4,zIndex:999,padding:0,position:"absolute",onClick:()=>En(768)}}))),n.createElement("div",{className:"device-width__full",style:{flexGrow:1},onMouseEnter:()=>{Qt("device-width__full-hovered"),ni(x("Desktop"))},onMouseLeave:()=>{Qt(""),ni("")},onClick:()=>En(1200)}))),n.createElement("div",{className:d()("email-pane__resizable",{"email-pane__resizable_drag":on||hn}),style:{maxWidth:"number"===typeof _n?Math.min(_n,I):I}},n.createElement("div",{className:"email-pane__handle left",onMouseDown:un("left"),onMouseEnter:()=>pn("left"),onMouseLeave:pn}),n.createElement("div",{className:"email-pane__handle right",onMouseDown:un("right"),onMouseEnter:()=>pn("right"),onMouseLeave:pn}),n.createElement("div",{className:d()("email-pane__content-col email-pane__content-col_main",{"email-pane__content-col_disable":on||hn}),ref:Xe,id:"pane-content-iframe"},n.createElement(Li,{ref:Ke,className:"email-pane__iframe",email:e,handlerSendPosition:ji})))),n.createElement(a.fv,{style:{display:J&&"bottom"!==Q||M.disableSideMenu?"none":"initial"},ref:Fi,className:d()("email-pane__content-col email-pane__content-col_menu email-pane__content-col_tabs email-pane__col email-pane__col_settings",{"email-pane__col_disabled":U===h.rb})},(!J||"bottom"===Q)&&n.createElement(a.tU,{className:d()("email-pane__col_settings-inner",{"email-pane__col_settings-inner_reverse":"left"===M.menuDirection}),size:"middle",activeKey:U,onTabClick:t=>{Re.querySelector(".atoms__list");if(h.Bv,M.toggleSidePanel&&t===U?F((0,E.PM)(h.rb)):"Optimize"===t?(0,ie.Z1)(x,O):t!==h.yI&&t!==h.Vv?(F((0,E.PM)(t)),V({event:"navigate",action:"navigate_email_pane_tab",tab_name:t===h.rb?"DISABLED_TAB":t,entity_id:(null===e||void 0===e?void 0:e.id)||T||B,project_id:(null===W||void 0===W?void 0:W.id)||R}),N.send({operation:h.Ru.SANDBOX_LOCK_EDIT,data:!1}),N.send({operation:h.Ru.SANDBOX_ELEMENT_ACTIVE_RESET}),Ce([])):t!==h.yI&&t!==h.Vv||V({event:"navigate",action:"navigate_email_pane_tab",tab_name:t,entity_id:(null===e||void 0===e?void 0:e.id)||T||B,project_id:(null===W||void 0===W?void 0:W.id)||R}),We&&("Discuss"===t||"Optimise"===t||"AiChat"===t))switch(kt(!0),t){case"Discuss":St(7);break;case"Optimise":St(6);break;case"AiChat":St(9);break;default:St(0)}},renderTabBar:Ci,tabPosition:"right",items:Ki,tabBarExtraContent:ze&&n.createElement("div",{style:{paddingTop:15,textAlign:"center"}},$||(null===(A=q.id)||void 0===A?void 0:A.toString())!==(null===W||void 0===W||null===(S=W.members)||void 0===S?void 0:S.owner.ID)?n.createElement(a.dO,{variant:"editorMode",checkedChildren:"Pro",unCheckedChildren:"Pro",onChange:Pi,defaultChecked:Nt}):n.createElement(a.dO,{variant:"editorMode",checkedChildren:"Pro",unCheckedChildren:"Pro",onChange:Pi,checked:It}))}))),n.createElement("div",{className:"email-pane__iframe-scroll-bottom",id:"iframe-scroll-bottom"})),n.createElement(a.fv,{style:{width:`${"right"===Q?100-Vi:"bottom"===Q?100:Vi}%`,position:"relative",height:"bottom"===Q?`calc(${100-Vi}%)`:"unset",display:J?"initial":"none"}},n.createElement("div",{className:"email-pane__code-divider",onMouseDown:()=>gn(!0)}),n.createElement("div",{className:"code-mode__pane code-mode__pane_editor email-pane__pane email-pane__pane_editor"},n.createElement("div",{className:"code-mode__pane-content email-pane__pane-content"},n.createElement(xi,{email:e,setOtherUsers:Ie,readOnly:M.lockEditor,newEmailAiGeneratorRef:rt}))))),M.pathEnabled&&n.createElement("div",{className:"email-pane__paths"},n.createElement(xt,{elementPath:we}),n.createElement(a.m_,{placement:"left",title:x(Ve?"The code size exceeds the recommended value 90kB":"Code size")},n.createElement("span",{className:d()("email-pane__code-size",{"email-pane__code-size_exceeded":Ve})},De))),n.createElement("div",{className:"collaborator-list"},n.createElement(di.b,{users:Se,isEditor:h._P.isEditor,isPlugin:h.EW.isPlugin,token:j}))),"img"===(null===$e||void 0===$e?void 0:$e.type)&&J&&"bottom"!==Q&&n.createElement("div",{className:"email-pane__collapse-wrapper email-pane__collapse-wrapper_disabled"},n.createElement(ct,{email:e,formSettings:$e,onClosePanel:mt})),n.createElement(ci,null),n.createElement(Qe.A,{open:Ct,onCancel:()=>{J&&F((0,E.vs)()),F((0,E.Fk)()),F((0,H.bc)("simple")),Lt(!1),kt(!1),V({event:"change",action:"change_config_mode",config_mode:"simple",entity_id:(null===e||void 0===e?void 0:e.id)||T||B,project_id:(null===W||void 0===W?void 0:W.id)||R})},initialSlide:At}),n.createElement(a.aF,{title:x("Warning"),open:ke,onOk:Xi,onCancel:()=>{Ae(!1)}},n.createElement("p",null,x("Clear chat history?"))),n.createElement(ti,{open:Be,onClose:Pe}))}},95593:(e,t,i)=>{"use strict";i.d(t,{A:()=>M});var n=i(25366),a=i(14365),l=i(85472),r=i(33637),o=i(25933),s=i.n(o),c=i(76508),d=i(98120),m=i(1246),u=i(28401),p=i(90701),h=i(79349),g=i(65751),f=i(54501),v=i(22376),b=i(78019),y=i(2519),E=i(60538),_=i(44239),w=i(89394),C=i(64363),k=i(69064),A=i(82794),S=i(65329),I=i(90388),x=i(54913),L=i(93149),N=i(99614),T=i(67815),B=i(33087),P=i(3928),R=i(81317),F=i(98614);const O=(0,R.Si)("preview_exceeded"),M=({emailElement:e,isCollaborationEditor:t})=>{var i,o,M,j;const{__:D}=(0,c.s9)(),V=(0,l.wA)(),W=(0,I.XW)(),{emailId:z,blockId:H}=(0,r.g)(),U=(0,l.d4)(h.cL),[q,$]=(0,n.useState)(!1),[Z,G]=(0,w.Zf)(),K=(0,r.Zp)(),X=(0,l.d4)(g.C1),[Y]=(0,E.YE)(z),[J]=(0,_.lx)(H),[Q]=(0,C.Oq)(),{owner:ee}=(0,S.A)(),te=(0,x.fn)(),ie=(0,x.aD)(te),ne=(0,x.TW)(te),ae=(0,l.d4)(f.Wm),le=(0,l.d4)(f.Fv),re=(0,l.d4)(f.yy),{token:oe}=(0,a.rd)(),se=(0,p.hN)(),ce=(0,L.rD)(),de=e.hasOwnProperty("type")?k.IE:k.Tm,me=(0,T.ml)(B.AZ.ON_SHARE_ID),ue=(0,T.ml)(B.AZ.ON_SHOW_PREVIEW_ID),[pe,he]=(0,n.useState)(!1),[ge,fe]=(0,n.useState)(0),[ve,be]=(0,n.useState)(!1),[ye,Ee]=(0,n.useState)(D("\u2014")),_e=(0,l.d4)(y.yN);let we=!(0,l.d4)(g.B$)&&(null===(i=X.id)||void 0===i?void 0:i.toString())===(null===_e||void 0===_e||null===(o=_e.members)||void 0===o?void 0:o.owner.ID);const Ce=(0,N.u)(),ke=z?"emailId":"blockId",Ae=null===e||void 0===e?void 0:e.project,Se=t=>{const i=de===k.IE?"block":"email";"string"===typeof t?(V((0,f.Uf)(t)),!le&&V((0,f.vs)())):V((0,f.vs)()),Ce({event:"activate",action:"activate_code_mode",entity_type:i,entity_id:(null===e||void 0===e?void 0:e.id)||z||H,project_id:(null===e||void 0===e?void 0:e.project)||Ae}),setTimeout(()=>{de===k.IE?V((0,b.A9)({type:null})):V((0,v.A9)({type:null}))},300),W({operation:k.Ru.SANDBOX_ELEMENT_ACTIVE_RESET}),we&&(he(!0),fe(1))},Ie=(0,n.useCallback)(async()=>{var e;if(k.EW.isPlugin)return!0;const t=await Q("preview"),i=(0,F.c0)("preview",null===(e=t.data)||void 0===e?void 0:e.stats);return!i||(Ee(i.previousLimit),be(!0),!1)},[Q]),xe=(0,n.useCallback)(async()=>{await Ie()&&(Ee(D("\u2014")),be(!0))},[D,Ie]);(0,n.useEffect)(()=>{G.isError&&(se.error(G),$(!1))},[G]),(0,n.useEffect)(()=>{if(G.isSuccess&&q){var e;if(401===(null===(e=G.data)||void 0===e?void 0:e.status))se.error({message:G.data.code,description:G.data.message});else if(G.data){let e=document.createElement("A");e.setAttribute("target","_blank"),e.setAttribute("href",G.data.message),e.click()}$(!1)}},[G,q,se]);const[Le,Ne]=(0,n.useState)(!1),Te=()=>{W({operation:k.Ru.SANDBOX_LOCK_EDIT,data:ae}),V((0,f.mi)(!ae))},Be=z?Y:J;let Pe=[];const Re=(0,n.useCallback)(async()=>{const t=await ue.fire({project:Ae,id:z});!1!==t.find(e=>!1===e||"string"===typeof e)&&(window.open(t.find(e=>e)||`/email/${z}/raw?key=${s()(`${Ae}${z}${k.KI}`)}`),Ce({event:"click",action:"open_email_preview",entity_type:de===k.IE?"block":"email",entity_id:(null===e||void 0===e?void 0:e.id)||z||H,project_id:(null===e||void 0===e?void 0:e.project)||Ae}))},[ue,Ae,z,Ce,de,e,H]),Fe=(0,n.useCallback)(async()=>{window.open(`/getemail/${z}?secret_hash=${s()(`${Ae}${z}${k.KI}`)}&raw=true`),Ce({event:"click",action:"open_web_version",entity_type:de===k.IE?"block":"email",entity_id:(null===e||void 0===e?void 0:e.id)||z||H,project_id:(null===e||void 0===e?void 0:e.project)||Ae})},[Ae,z,Ce,de,e,H]);ce.previewModeEnabled&&Pe.push({key:"Preview_mode",icon:n.createElement(m.Ay,{icon:"EyeOutlined",size:18,strokeWidth:ce.iconStrokeWidth}),label:D("Preview mode"),onClick:Re}),ce.livePreviewEnabled&&Pe.push({key:"Live_preview",icon:q?n.createElement(m.Ay,{icon:"LoadingOutlined",style:{fontSize:16}}):n.createElement(m.Ay,{icon:"CheckCircleVerified",size:18,strokeWidth:ce.iconStrokeWidth}),label:D("Live preview"),onClick:(null===(M=X.id)||void 0===M?void 0:M.toString())===(null===(j=e.project_author)||void 0===j?void 0:j.toString())&&"community"===X.subscription.post_name&&ee?xe:async()=>{if(!q){if(!await Ie())return;const t={email:z,subject:encodeURIComponent("#"+e.project+" "+e.title).replaceAll(/%20/gi,"+").replaceAll(/%0A/gi,"%0D%0A"),content:encodeURIComponent((null===te||void 0===te?void 0:te.getValue())||"").replaceAll(/%20/gi,"+").replaceAll(/%0A/gi,"%0D%0A")};Z(t),$(!0),Ce({event:"click",action:"open_email_inbox_tests",entity_type:de===k.IE?"block":"email",entity_id:(null===e||void 0===e?void 0:e.id)||z||H,project_id:(null===e||void 0===e?void 0:e.project)||Ae})}}}),ce.webversionEnabled&&Pe.push({key:"Web version",icon:n.createElement(m.Ay,{icon:"Web",size:18,strokeWidth:ce.iconStrokeWidth}),label:D("Web version"),onClick:Fe}),ce.sharePreviewEnabled&&Pe.push({key:"Share",icon:n.createElement(m.Ay,{icon:"ShareAltOutlined",size:18,strokeWidth:ce.iconStrokeWidth}),label:D("Share"),onClick:async()=>{const t=(await me.fire({project:Ae,id:z})).find(e=>!1===e||"string"===typeof e);!1!==t&&navigator.clipboard.writeText(t||`https://app.emailmaker.ru/email/${z}/raw?key=${s()(`${Ae}${z}${k.KI}`)}`).then(()=>{se.success(D("A shareable link to this page has been copied to the clipboard.")),Ce({event:"click",action:"share_email",entity_type:de===k.IE?"block":"email",entity_id:(null===e||void 0===e?void 0:e.id)||z||H,project_id:(null===e||void 0===e?void 0:e.project)||Ae})})},className:"em-analytics__email-share"});const Oe=[{key:"Left_mode",icon:n.createElement(m.Ay,{icon:"PanelLeft",size:18,strokeWidth:ce.iconStrokeWidth,style:{color:"left"===re&&le?oe.colorPrimary:"inherit"}}),label:D("Left Code panel"),onClick:()=>Se("left")},{key:"Right_mode",icon:n.createElement(m.Ay,{icon:"PanelLeft",size:18,strokeWidth:ce.iconStrokeWidth,style:{transform:"rotate(180deg)",color:"right"===re&&le?oe.colorPrimary:"inherit"}}),label:D("Right Code panel"),onClick:()=>Se("right")},{key:"Bottom_mode",icon:n.createElement(m.Ay,{icon:"PanelLeft",size:18,strokeWidth:ce.iconStrokeWidth,style:{transform:"rotate(-90deg)",color:"bottom"===re&&le?oe.colorPrimary:"inherit"}}),label:D("Bottom Code panel"),onClick:()=>Se("bottom")}];return n.createElement("div",{className:"email-preview-menu email-preview-menu_new"},n.createElement(a.$x,{size:32},n.createElement(a.$x,{className:"email-preview-menu__versions",size:8,style:{borderRadius:"calc(var(--borderRadius) * 1px"}},n.createElement(a.m_,{title:D(t?A.LJ:"Undo (Ctrl+Z)"),placement:"bottom"},n.createElement(a.$n,{type:"text",icon:n.createElement(m.Ay,{icon:"UndoOutlined",size:22,strokeWidth:ce.iconStrokeWidth}),onClick:()=>{ie.undo()},disabled:!ne.canUndo})),n.createElement(a.m_,{title:D(t?A.LJ:"Redo (Ctrl+Shift+Z)"),placement:"bottom"},n.createElement(a.$n,{type:"text",icon:n.createElement(m.Ay,{icon:"RedoOutlined",size:22,strokeWidth:ce.iconStrokeWidth}),onClick:()=>{ie.redo()},disabled:!ne.canRedo})),ce.historyEnabled&&n.createElement(a.m_,{title:D("Version history"),placement:"bottom"},n.createElement(a.$n,{type:ae?"text":"primary",ghost:!ae,onClick:()=>{ae?(Ne(!0),Be({[ke]:null===e||void 0===e?void 0:e.id}).then(t=>{t.isSuccess?0!==t.data.data.length||k.EW.isPlugin||se.error({message:D("No history records available.")}):t.isError&&se.error(t),Te(),V((0,f.PM)(k.Vv)),Ne(!1),Ce({event:"open",action:"open_version_control",entity_type:de===k.IE?"block":"email",entity_id:(null===e||void 0===e?void 0:e.id)||z||H,project_id:(null===e||void 0===e?void 0:e.project)||Ae}),we&&(he(!0),fe(4))})):(V((0,f.Fk)()),Te())},disabled:e.isNew||Le,className:"email-preview-menu__history",icon:Le?n.createElement(a.tK,{size:"small"}):n.createElement(n.Fragment,null,n.createElement(m.Ay,{icon:"HistoryOutlined",size:22,strokeWidth:ce.iconStrokeWidth,className:"email-preview-menu__list-item-icon email-preview-menu__list-item-icon_revert"}),we&&n.createElement(m.Ay,{icon:"Lock",size:14,strokeWidth:ce.iconStrokeWidth,className:"free-mode-firewall-icon"}))}))),n.createElement(a.$x,{size:8,style:{borderRadius:"calc(var(--borderRadius) * 1px"}},ce.codeEnabled&&n.createElement(a.ms,{arrow:!0,key:"Code mode",placement:"bottom",menu:{items:Oe},trigger:"hover",mouseEnterDelay:0,className:"email-preview-menu__code"},n.createElement(a.$n,{type:le?"primary":"text",ghost:le,icon:n.createElement(n.Fragment,null,n.createElement(m.Ay,{icon:"Code",size:22,strokeWidth:ce.iconStrokeWidth}),we&&n.createElement(m.Ay,{icon:"Lock",size:14,strokeWidth:ce.iconStrokeWidth,className:"free-mode-firewall-icon"})),onClick:Se})),ce.previewIconEnabled&&(we?n.createElement(a.m_,{title:D("Preview mode"),placement:"bottom"},n.createElement(a.$n,{type:"text",icon:n.createElement(n.Fragment,null,n.createElement(m.Ay,{icon:"EyeOutlined",size:22,strokeWidth:ce.iconStrokeWidth,className:"email-preview-menu__list-item-icon"}),n.createElement(m.Ay,{icon:"Lock",size:14,strokeWidth:ce.iconStrokeWidth,className:"free-mode-firewall-icon"})),onClick:()=>{he(!0),fe(7)}})):n.createElement(a.ms,{arrow:!0,key:"Preview",placement:"bottom",menu:{items:Pe},className:"email-preview-menu__preview"},n.createElement(a.$n,{type:"text",target:"_blank",rel:"noreferrer",icon:n.createElement(m.Ay,{icon:"EyeOutlined",size:22,strokeWidth:ce.iconStrokeWidth,className:"email-preview-menu__list-item-icon"}),onClick:ce.previewModeEnabled?Re:void 0}))),ce.sendTestEnabled&&n.createElement(a.m_,{title:D("Send a test email"),placement:"bottom"},n.createElement(a.$n,{className:"em-analytics__email-open-test email-preview-menu__test",type:"text",icon:n.createElement(m.Ay,{icon:"SendOutlined",size:22,strokeWidth:ce.iconStrokeWidth,className:"email-preview-menu__list-item-icon"}),onClick:async()=>{await Ie()&&(V((0,h.qf)(k.lx.SEND_TEST_EMAIL)),Ce({event:"open",action:"open_test_email_modal",entity_type:de===k.IE?"block":"email",entity_id:(null===e||void 0===e?void 0:e.id)||z||H,project_id:(null===e||void 0===e?void 0:e.project)||Ae}))}})))),n.createElement(d.A,{isModalVisible:U===k.lx.SEND_TEST_EMAIL,email:e}),n.createElement(u.A,{open:pe,onCancel:()=>{ae||(Te(),V((0,f.Fk)())),le&&V((0,f.vs)()),he(!1)},initialSlide:ge}),n.createElement(P.X,{open:ve,onClose:()=>be(!1),title:D(O.titleKey),subtitle:D(O.subtitleKey),usageResource:O.usageResource,previousDisplay:ye,nextDisplay:(0,R.hO)("infinity"),onChangePlan:()=>{be(!1),document.body.classList.remove("editor"),K("/billing"),V((0,h.qf)(k.lx.SWITCH_TO_PLAN_MODAL))}}))}},2682:(e,t,i)=>{"use strict";i.d(t,{A:()=>$});var n=i(25366),a=i(14365),l=i(63097),r=i(65865),o=i(37666),s=i(33637),c=i(85472),d=i(74572),m=i.n(d),u=i(95074),p=i(87752),h=i(63168),g=i(25933),f=i.n(g),v=i(1382),b=i(58525),y=i(99614),E=i(76508),_=i(69064),w=i(65751);const C=({element:e,setSearchFilters:t=(e,t)=>{}})=>{var i;const{projectId:l}=(0,s.g)(),r=(0,s.Zp)(),o=(0,b.p)(),{token:d}=(0,a.rd)(),{__:m}=(0,E.s9)(),u=e.type?_.IE:_.Tm,p=`/projects/${l}/emails/new`,h=(0,y.u)(),g=(0,c.d4)(w.C1),C=(0,n.useRef)(null);return n.createElement(a.Zp,{className:`element-card element-card_${u} element-card_template`,hoverable:!0,id:e.id,style:{cursor:"pointer"},"data-testid":e.id,cover:n.createElement(n.Fragment,null,n.createElement("div",{ref:C,className:"element-card__img-wrapper"},n.createElement("img",{className:"element-card__img",alt:e.title,src:((e,t=l,i)=>`https://scr.emcdn.ru/screenshot?delay=1000&width=800&fullPage=true&deviceScaleFactor=0.8&format=jpg&force=false${i?`&cacheControl=true&cache-hash=${f()(i)}`:""}&url=${encodeURIComponent(`https://app.emailmaker.ru/get${u}/${e}?secret_hash=${f()(`${t}${e}${_.KI}`)}&raw=true`)}`)(e.id,e.project,e.modified),onMouseMove:e=>(0,v.Hy)(e,C.current),onMouseLeave:v.Tr})),e.is_template&&e.project===+l&&n.createElement("div",{className:"element-card__is-template-wrapper"},m("Template")),(0,v._q)(e,_.zh).length&&n.createElement("div",{className:"element-card__tags-wrapper"},n.createElement(a.$x,{wrap:!0,size:8},null===(i=(0,v._q)(e,_.zh))||void 0===i?void 0:i.map(e=>n.createElement(a.vw,{bordered:!1,color:d.colorPrimary,style:{borderRadius:6},key:e.id,onClick:()=>t(null,e.id)},e.name))))),onClick:()=>(t=>{var i;h({event:"select",action:"create_new_email",template_id:t,project_id:l,template_title:(0,v.ln)(e.title),description:"Create new email from template",subscription:null===g||void 0===g||null===(i=g.subscription)||void 0===i?void 0:i.post_title}),o.set(_.A9.em_new_email,t),(0,v.XZ)(r,p)})(e.id)},n.createElement("div",null,n.createElement(a.$n,{type:"link",className:"element-card__title"},(0,v.ln)(e.title))))};var k=i(45060),A=i(1246),S=i(79349);const I="description",x=()=>{const{__:e}=(0,E.s9)(),t=(0,c.wA)(),i=(0,y.u)(),[l]=a.lV.useForm(),r=(0,n.useRef)(null),o=(0,c.d4)(S.cL)===_.lx.ADD_NEW_AI_EMAIL,d=(0,b.p)(),m=(0,s.Zp)(),{projectId:u}=(0,s.g)(),p=(0,n.useCallback)(()=>{l.resetFields(),setTimeout(()=>{var e;return null===(e=r.current)||void 0===e?void 0:e.focus()},0)},[l]);(0,n.useEffect)(()=>{o&&p()},[o,p]);const h=()=>t((0,S.Oo)()),g=()=>{const e=`/projects/${u}/emails/new`,t=String(278056);d.set(_.A9.em_new_email,t),l.validateFields().then(({description:t})=>{i({event:"submit_form",action:"ai_email_generation",project_id:u,ai_prompt:t}),window.localStorage.setItem(_.V0.em_active_tab,_.z$),window.localStorage.setItem(_.V0.em_ai_settings,t),(0,v.XZ)(m,e),h()})};return n.createElement(a.aF,{title:n.createElement(n.Fragment,null,n.createElement("span",null,e("I'd be happy to create an email for you! ")),n.createElement("p",null,e("Start with a detailed description of your email."))),open:o,onOk:g,onCancel:h,className:"new-folder-modal",footer:[n.createElement(a.$n,{key:"submit",type:"primary",size:"large",onClick:g},e("Generate Email"))]},n.createElement(a.lV,{form:l,layout:"vertical",name:"add_new_folder_form",onFinish:g,initialValues:{[I]:""},autoComplete:"off",style:{paddingTop:10}},n.createElement(a.lV.Item,{name:I,rules:[{required:!0,message:e("Please enter the description")}]},n.createElement(a.pd,{size:"large",placeholder:e("Please enter the description"),ref:r,style:{marginBottom:5}}))))};var L=i(90701),N=i(60538);const T=({email:e,onUpdated:t})=>{const{__:i}=(0,E.s9)(),l=(0,c.wA)(),[r]=a.lV.useForm(),o=(0,n.useRef)(null),s=(0,L.hN)(),d=(0,c.d4)(S.cL)===_.lx.RENAME_EMAIL_MODAL,[m,u]=(0,N.dN)(),{id:p=null,title:h=""}=e||{};(0,n.useEffect)(()=>{d&&(r.setFieldsValue({name:h}),setTimeout(()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.focus()},0))},[d,h,r]);const g=(0,n.useCallback)(()=>l((0,S.Oo)()),[l]),f=(0,n.useCallback)(()=>{r.validateFields().then(({name:e})=>{const n=(e||"").trim();n?m({emailId:p,title:n}).then(e=>{var n,a;null!==e&&void 0!==e&&e.error?s.error({message:null===(n=e.error.data)||void 0===n?void 0:n.code,description:null===(a=e.error.data)||void 0===a?void 0:a.message}):(s.success({message:i("The email was successfully renamed.")}),t&&t(),g())}):s.error({message:i("Title should not be empty")})})},[r,s,i,m,p,t,g]),v=(0,n.useMemo)(()=>({color:"var(--colorTextSecondary)"}),[]),b=(0,n.useMemo)(()=>n.createElement("span",{style:v},i("Email name")),[i,v]),y=(0,n.useMemo)(()=>[{required:!0,message:i("Please enter the email name")}],[i]),w=(0,n.useMemo)(()=>({remember:!1,name:h}),[h]),C=(0,n.useMemo)(()=>({paddingTop:10}),[]),k=(0,n.useMemo)(()=>({marginBottom:5}),[]),A=(0,n.useMemo)(()=>[n.createElement(a.$n,{key:"submit",type:"primary",size:"large",loading:u.isLoading,onClick:f},i("Done"))],[i,u.isLoading,f]);return n.createElement(a.aF,{title:i("Rename email"),open:d,onOk:f,onCancel:g,className:"new-folder-name-modal",footer:A},n.createElement(a.lV,{form:r,layout:"vertical",name:"rename_email_form",onFinish:f,initialValues:w,autoComplete:"off",requiredMark:!1,style:C},n.createElement(a.lV.Item,{name:"name",label:b,rules:y},n.createElement(a.pd,{disabled:u.isLoading,size:"large",placeholder:i("Enter the email name"),ref:o,style:k}))))};var B=i(93149),P=i(65160);const R=({viewMode:e,onSwitchView:t,sortOption:i,onChangeSort:l})=>{const{__:r}=(0,E.s9)(),o=(0,B.rD)();return n.createElement("div",{className:"selectedEmailsBar"},n.createElement(a.$x,{size:12,className:"cards-search__by-title_unselected"},n.createElement(P.A,{isBlocks:!1})),n.createElement(a.$x,{size:8},n.createElement(a.Select,{className:"emails-table__toolbar-sort",value:i,onChange:l,style:{width:180},options:[{value:"date-desc",label:r("Newest first")},{value:"date-asc",label:r("Oldest first")},{value:"name-asc",label:r("A-Z")},{value:"name-desc",label:r("Z-A")}]}),n.createElement(a.$q,{variant:"view-switcher",defaultValue:e,onChange:t,value:e,key:"Switch radio",options:[{value:_.Y$,label:n.createElement(a.m_,{title:r("Cards view"),placement:"top"},n.createElement(A.Ay,{icon:"Grid01Icon",size:14,strokeWidth:o.iconStrokeWidth}))},{value:_.rl,label:n.createElement(a.m_,{title:r("Table view"),placement:"top"},n.createElement(A.Ay,{icon:"ListViewIcon",size:18,strokeWidth:o.iconStrokeWidth}))}]})))};var F=i(22339),O=i(89394),M=i(87268),j=i(22376),D=i(2519),V=i(65329);const W=({selectedCount:e,isDeletedEmails:t,onClear:i,onBulkDelete:l,onBulkMoveItems:r,onBulkCloneItems:o,onBulkToggleLock:s,selectedAllLocked:c,onRename:d})=>{const{__:m}=(0,E.s9)();return n.createElement("div",{className:"selectedEmailsBar"},n.createElement(a.$x,{size:12},n.createElement("span",null,e," ",m("selected")),n.createElement(a.m_,{title:m("Clear selection")},n.createElement(a.$n,{onClick:i},m("Clear")))),n.createElement(a.$x,{size:8,style:{padding:"1px 0"}},n.createElement(a.$n,{icon:c?n.createElement(A.Ay,{icon:"UnlockOutlined"}):n.createElement(A.Ay,{icon:"LockOutlined"}),onClick:s},m(c?"Unlock":"Lock")),d&&1===e&&n.createElement(a.$n,{icon:n.createElement(A.Ay,{icon:"EditOutlined"}),onClick:d},m("Rename")),n.createElement(a.ms,{arrow:!0,placement:"bottom",menu:{items:o||[],style:{maxHeight:"70vh",overflowY:"auto"}},trigger:["click"]},n.createElement(a.$n,{icon:n.createElement(A.Ay,{icon:"CopyOutlined",size:14})},m("Clone"))),!t&&n.createElement(a.ms,{arrow:!0,placement:"bottom",menu:{items:(null===r||void 0===r?void 0:r.items)||[],style:{maxHeight:"70vh",overflowY:"auto"}},trigger:["click"]},n.createElement(a.$n,{icon:n.createElement(A.Ay,{icon:"FolderOutlined"})},m("Transfer to folder"))),n.createElement(a.$n,{danger:!0,icon:n.createElement(A.Ay,{icon:"DeleteOutlined",size:14}),onClick:l},m(t?"Delete permanently":"Remove"))))};var z=i(41371),H=i(92221),U=i(90989);const q=(e,t)=>`${e.pathname}/${t.id}`,$=({projectId:e,emailsView:t,createPage:i=!1,currentFolderId:d,foldersList:g,refetchProjectFolders:f,projectTags:I=[],activeTagId:B,setActiveTagHandler:P,projectEmailsCounter:$=0,registerFunction:Z=()=>{},groupType:G=null})=>{var K,X,Y,J,Q,ee,te,ie;const{__:ne,_x:ae}=(0,E.s9)(),le=(0,c.wA)(),re=(0,c.d4)(M.MY),oe=(0,c.d4)(M.aO),se=(0,c.d4)(D.RP),ce=(0,c.d4)(D.AQ),de=(0,c.d4)(D.qV),me=(0,c.d4)(w.C1),ue=(0,c.d4)(M.NP),pe=(0,c.d4)(M.qM),he=(0,c.d4)(M.ux),ge=(0,c.d4)(j.CT),fe=(0,c.d4)(D.GD),ve=(0,c.d4)(D.Rw),[be,ye]=(0,o.ok)(),Ee=(0,b.p)(),_e=(0,L.hN)(),{owner:we,admin:Ce}=(0,V.A)();let ke=(0,s.zy)();const Ae=(0,s.Zp)(),{token:Se}=(0,a.rd)(),{modal:Ie}=a.qw.useApp(),xe=(0,c.Pj)(),{confirm:Le}=Ie,Ne=(0,y.u)(),Te=[...fe,...ve],[Be,Pe]=(0,n.useState)(null);(0,n.useEffect)(()=>{G===_.ti.ALL?Pe(se+ce):G===_.ti.PROJECT?Pe(ce):G===_.ti.STANDARD&&Pe(se)},[G,se,ce]);const Re=+be.get("page"),Fe=be.get("folder"),Oe=+be.get("tag");(0,n.useEffect)(()=>{window.localStorage.setItem(_.V0.em_last_active_page,Re)},[Re]);const[Me,je]=(0,N.Kh)(),[De]=(0,N._3)(),[Ve]=(0,N.dN)(),{refetch:We}=(0,s.KC)(),[ze,He]=(0,n.useState)(!1),Ue=`/projects/${e}/emails/new`,qe=d&&d===_.UW,$e=d===_.y2&&!Oe;(0,n.useEffect)(()=>{le((0,M.FC)())},[le,e]);const[Ze,Ge]=(0,n.useState)({projectId:e,page:Re||1,pageSize:_.mU,notEmbed:!0,tags:null,folderTag:null}),{isLoading:Ke,isSuccess:Xe,isError:Ye,isFetching:Je,refetch:Qe,error:et}=(0,N.Xw)({...Ze,folderTag:null,tags:null,status:"main"},{skip:i||!(null===(K=Ze.name)||void 0===K||!K.length)&&d!==_.y2}),[tt,it]=(0,n.useState)({page:Re||1,pageSize:_.mU,folderTag:null,tags:[],groupType:G}),{isLoading:nt,isSuccess:at,isError:lt,isFetching:rt,data:ot=[],refetch:st,error:ct}=(0,N.PX)({...tt,groupType:G},{skip:!i||(Math.ceil(se+ce/_.mU)||1)<tt.page||G===_.ti.PROJECT}),{isLoading:dt,isSuccess:mt,isError:ut,isFetching:pt,data:ht=[],refetch:gt,error:ft}=(0,N.PX)({...tt,projectId:e,groupType:G},{skip:!i||(Math.ceil(ce/_.mU)||1)<tt.page||G===_.ti.STANDARD}),vt=(e,t)=>G===_.ti.ALL?e||t:G===_.ti.PROJECT?t:e,bt=vt(nt,dt),yt=vt(at,mt),Et=vt(lt,ut),_t=vt(rt,pt),wt=vt(st,gt),Ct=vt(ct,ft),[kt,At]=(0,n.useState)({projectId:e,page:Re||1,pageSize:_.mU,notEmbed:!0,tags:Oe&&[Oe],folderTag:d}),{isLoading:St,isSuccess:It,isError:xt,isFetching:Lt,error:Nt,refetch:Tt}=(0,N.Xw)({...kt,tags:d&&kt.folderTag?null:kt.tags,status:"custom"},{skip:i||qe||d===_.y2||kt.folderTag!==d||!(null===(X=kt.name)||void 0===X||!X.length)&&(qe||d===_.y2)}),[Bt,Pt]=(0,n.useState)({projectId:e,page:qe?Re:1,pageSize:_.mU,notEmbed:!0,tags:Oe&&[Oe],folderTag:null,status:"trash"}),[Rt,Ft]=(0,n.useState)(!1),{isLoading:Ot,isSuccess:Mt,isError:jt,isFetching:Dt,data:Vt,refetch:Wt,error:zt}=(0,N.Xw)({...Bt,status:"trash",folderTag:null,page:Rt?Bt.page:1},{skip:i||(Math.ceil(oe/_.mU)||1)<Bt.page||!(null===(Y=Bt.name)||void 0===Y||!Y.length)&&!qe||!(null===(J=Bt.tags)||void 0===J||!J[0])&&he>0});(0,n.useEffect)(()=>{Ft(!1)},[e]),(0,n.useEffect)(()=>{Ge(t=>({...t,projectId:e,page:Re||1})),At(t=>({...t,projectId:e,page:Re||1,tags:Oe&&[Oe],folderTag:d})),Pt(t=>({...t,projectId:e,page:qe&&Re||1,tags:Oe&&[Oe]}))},[e,Re,Oe,d,qe]),(0,n.useEffect)(()=>{Mt&&Wt()},[null===g||void 0===g?void 0:g.length,Wt,Mt]),(0,n.useEffect)(()=>{Ft(!!Vt||Math.ceil(oe/_.mU)>=Bt.page)},[Vt,Bt.page,oe]);const Ht=(0,n.useMemo)(()=>{let e=[];return G!==_.ti.STANDARD&&ht&&de>=tt.page&&(e=[...ht]),G!==_.ti.PROJECT&&ot&&(e=[...e,...ot].slice(0,_.mU)),e},[G,ht,ot,de,tt.page]),Ut=i?tt:qe?Bt:$e?Ze:kt,qt=i?yt:qe?Mt:$e?Xe:It,$t=i?bt:qe?Ot:$e?Ke:St,Zt=i?Et:qe?jt:$e?Ye:xt,Gt=i?_t:qe?Dt:$e?Je:Lt,Kt=i?wt:qe?Wt:$e?Qe:Tt,Xt=i?Ct:qe?zt:$e?et:Nt,Yt=(i?Be:qe?oe:$e?re:null===ue||void 0===ue||null===(Q=ue[d||(null===(ee=kt.tags)||void 0===ee?void 0:ee[0])])||void 0===Q?void 0:Q.total)||0,Jt=i?Ht:qe?he:$e?pe:null===ue||void 0===ue||null===(te=ue[d||(null===(ie=kt.tags)||void 0===ie?void 0:ie[0])])||void 0===te?void 0:te.list,Qt=(0,n.useMemo)(()=>!!(Gt||ze)&&{spinning:!0,size:"large",indicator:n.createElement(A.Ay,{icon:"LoadingOutlined",style:{fontSize:48},spin:!0})},[Gt,ze]),ei=(Jt||[]).map(e=>e.id).join(","),{selectedRowKeys:ti,setSelectedRowKeys:ii,clearSelection:ni,toggleCardSelection:ai}=function(e,t=[]){const[i,a]=n.useState([]),[l,r]=n.useState(null),o=n.useMemo(()=>{const t={};return(e||[]).forEach((e,i)=>{t[e.id]=i}),t},[e]),s=n.useCallback(()=>{a([]),r(null)},[]);n.useEffect(()=>{s()},[s,...t]);const c=n.useCallback(()=>{const t=(e||[]).map(e=>e.id);var i;a(t),t.length&&r(null!==(i=o[t[t.length-1]])&&void 0!==i?i:null)},[e,o]),d=n.useCallback((t,{metaKey:n,ctrlKey:s,shiftKey:c})=>{const d=o[t];if(void 0!==d){if(c&&null!==l){const t=Math.min(l,d),r=Math.max(l,d),o=(e||[]).slice(t,r+1).map(e=>e.id);if(n||s){const e=new Set(i);o.forEach(t=>e.add(t)),a(Array.from(e))}else a(o);return}if(n||s)return i.includes(t)?a(i.filter(e=>e!==t)):a([...i,t]),void r(d);a([t]),r(d)}},[e,o,l,i]);return{selectedRowKeys:i,setSelectedRowKeys:a,clearSelection:s,selectAllOnPage:c,toggleCardSelection:d}}(Jt,[ei,Ut.page,t]),li=n.useCallback(()=>{const e=new Set(ti);return(Jt||[]).filter(t=>e.has(t.id))},[ti,Jt]),ri=n.useMemo(()=>{const e=li();return e.length>0&&e.every(e=>e.lock)},[li]),oi=()=>{const e=li();if(!e.length)return;const t=!ri;Promise.all(e.map(e=>Ve({emailId:e.id,lock:t}).catch(e=>{}))).then(()=>{Kt&&Kt(),f&&f()})},si=async(e,t)=>{var i,n,a,l,r;const o=(await De(e)).data;if(!o)return;const s=await Me({title:(0,v.fq)(o.title),...void 0!==o.meta?{meta:o.meta}:{},project:o.project,subject:o.subject,description:o.description,html:(0,v.el)(o.html||"",o.title),parent_email:o.parent_email||_.iU,common_styles:o.common_styles||"",utm_parameters:{utm_source:null===(i=o.utm_parameters)||void 0===i?void 0:i.utm_source,utm_medium:null===(n=o.utm_parameters)||void 0===n?void 0:n.utm_medium,utm_campaign:null===(a=o.utm_parameters)||void 0===a?void 0:a.utm_campaign,utm_term:null===(l=o.utm_parameters)||void 0===l?void 0:l.utm_term,utm_content:null===(r=o.utm_parameters)||void 0===r?void 0:r.utm_content},emailtags:o.emailtags,folder:t});var c,d;null!==s&&void 0!==s&&s.error?_e.error({message:null===(c=s.error.data)||void 0===c?void 0:c.code,description:null===(d=s.error.data)||void 0===d?void 0:d.message}):Ne({event:"clone",action:"clone_email",email_id:e,cloned_email_id:s.data.id,project_id:o.project})},ci=async e=>{if(!ti.length)return;const t=e===_.y2?[]:[e];He(!0);for(const i of ti)await si(i,t);Kt&&Kt(),f&&f(),ni(),He(!1),_e.success({message:ne("The copies were successfully created.")})},[di,mi]=(0,n.useState)({id:null,title:""}),ui=()=>{if(1!==ti.length)return;const e=ti[0],t=(Jt||[]).find(t=>t.id===e);mi({id:e,title:(null===t||void 0===t?void 0:t.title)||(null===t||void 0===t?void 0:t.subject)||""}),le((0,S.qf)(_.lx.RENAME_EMAIL_MODAL))},pi=e=>{Ee.set(_.A9.em_elements_view,e),le((0,M.NK)(e))},hi=n.useMemo(()=>{const e=((null===Ut||void 0===Ut?void 0:Ut.order)||"desc").toLowerCase(),t=((null===Ut||void 0===Ut?void 0:Ut.orderby)||"date").toLowerCase();return"title"===t?`name-${e}`:"modified"===t?`modified-${e}`:"date"===t?`date-${e}`:"date-desc"},[null===Ut||void 0===Ut?void 0:Ut.order,null===Ut||void 0===Ut?void 0:Ut.orderby]),gi=e=>{const[t,i]=String(e).split("-"),n="asc"===i?"asc":"desc",a="name"===t?"title":"modified"===t?"modified":"date";wi({page:Ut.page||1,order:n,orderby:a,pageSize:_.mU})},fi=(e,t)=>{const i=(null===Ut||void 0===Ut?void 0:Ut.orderby)===t,l="asc"===(null===Ut||void 0===Ut?void 0:Ut.order);return n.createElement(a.XI.ColumnHeader,{label:e,isActive:i,isAsc:l,onClick:()=>(e=>{const t=(null===Ut||void 0===Ut?void 0:Ut.orderby)||"date",i=(null===Ut||void 0===Ut?void 0:Ut.order)||"desc";gi(`${"title"===e?"name":"modified"===e?"modified":"date"}-${t===e?"asc"===i?"desc":"asc":"desc"}`)})(t)})},vi=(0,c.d4)(M.Ni)||t,bi=()=>{ti.length&&Le({maskClosable:!0,centered:!0,title:ae(qe?"Are you sure to irrevocably delete selected emails?":"Are you sure to delete selected emails?","email"),icon:n.createElement(A.Ay,{icon:"DeleteOutlined",style:{color:"#ff4d4f"}}),okText:ne("Yes"),cancelText:ne("No"),onOk:async()=>{const e=(Jt||[]).reduce((e,t)=>(e[t.id]=t,e),{});for(const t of ti){const i=e[t];i&&await Ci(i)}ni()}})},yi=e=>{if(!ti.length)return;const t=e===_.y2?[]:[e],i=e===_.y2;(Jt||[]).reduce((e,t)=>(e[t.id]=t,e),{});Promise.all(ti.map(e=>Ve({emailId:e,folder:t}).then(e=>{var t,i;null!==e&&void 0!==e&&e.error&&_e.error({message:null===(t=e.error.data)||void 0===t?void 0:t.code,description:null===(i=e.error.data)||void 0===i?void 0:i.message});return e}).catch(e=>{}))).then(()=>{t[0]?le(N.GY.endpoints.getEmails.initiate({...Ut,folderTag:t[0]||null},{forceRefetch:!0})):i&&le(N.GY.endpoints.getEmails.initiate({...Ze,folderTag:null,tags:null,status:"main"},{forceRefetch:!0})),d!==_.y2?le(N.GY.endpoints.getEmails.initiate({...Ut,folderTag:d||null},{forceRefetch:!0})):Kt&&Kt(),f&&f(),ni()})},Ei=()=>{if(qe)return[];return[{icon:n.createElement(A.Ay,{icon:"MailOutlined",style:{fontSize:18}}),label:ne("New emails"),key:_.y2,onClick:()=>yi(_.y2)},...(null===g||void 0===g?void 0:g.map(e=>({icon:n.createElement(A.Ay,{icon:"FolderOutlined",style:{fontSize:18}}),label:e.name,key:e.id,onClick:()=>yi(e.id)})))||[]]},_i=()=>[{icon:n.createElement(A.Ay,{icon:"MailOutlined",style:{fontSize:18}}),label:ne("New emails"),key:_.y2,onClick:()=>ci(_.y2)},...(null===g||void 0===g?void 0:g.map(e=>({icon:n.createElement(A.Ay,{icon:"FolderOutlined",style:{fontSize:18}}),label:e.name,key:e.id,onClick:()=>ci(e.id)})))||[]];(0,n.useEffect)(()=>{u.gV({id:null===me||void 0===me?void 0:me.id,email:null===me||void 0===me?void 0:me.email,username:null===me||void 0===me?void 0:me.name})},[me]),(0,n.useEffect)(()=>{qt&&Kt&&Z(Kt)},[Z,Kt,qt]);const wi=(0,n.useCallback)(e=>{const t={...e,folderTag:void 0===e.folderTag?null:e.folderTag};i?it(e=>({...e,...t})):qe?Pt(t=>({...t,...e})):$e?Ge(t=>({...t,...e})):At(t=>({...t,...e}))},[i,qe,$e]);(0,n.useEffect)(()=>{var e;"rest_post_invalid_page_number"===(null===Xt||void 0===Xt||null===(e=Xt.data)||void 0===e?void 0:e.code)&&wi({page:1})},[Xt,wi]),(0,n.useEffect)(()=>{if(!i){(Fe&&Fe!==d||B&&Oe!==B)&&wi({folderTag:d,page:1});let e={page:Fe===d&&Ut.page?Ut.page:1};d&&!Oe&&(e.folder=d),B&&(e.tag=B),ye(e,{replace:!0})}},[Ut.page,Ae,i,Fe,d,B,Oe,wi,ye]);const Ci=e=>xe.dispatch(N.GY.endpoints.deleteEmail.initiate({id:e.id,force:qe})).then(t=>{if(t.error)_e.error(t);else if(t.data){_e.success(ne('The email "')+t.data.title+ae('" was successfully removed.',"email")),Ne({event:"delete",action:"delete_email",entity_type:"email",entity_id:e.id,project_id:e.project,context:"list",force:qe}),Kt();try{f()}catch(et){}if(Wt(),qe&&We)try{We()}catch(et){}}}),ki=e=>{Ne({event:"click",action:"click_delete_email_menu_item",entity_type:"email",entity_id:e.id,project_id:e.project,context:"list"}),Ne({event:"open",action:"open_delete_email_modal",entity_type:"email",entity_id:e.id,project_id:e.project,context:"list"}),Le({maskClosable:!0,centered:!0,title:ae(qe?'Are you sure to irrevocably delete "':'Are you sure to delete "',"email")+e.title+ne('" email?'),icon:n.createElement(A.Ay,{icon:"DeleteOutlined",style:{color:"#ff4d4f"}}),okText:ne("Yes"),cancelText:ne("No"),onOk:()=>Ci(e)})},Ai=e=>{He(!0),Ve({emailId:null===e||void 0===e?void 0:e.id,status:"publish"}).then(t=>{if(t.error)_e.error({message:t.error.data.code,description:t.error.data.message});else{e.folder[0]?Kt():Qe();try{f()}catch(et){}Wt(),_e.success({message:ne("The email \u201c")+e.title+ae("\u201d was successfully recovered.","recovery")})}He(!1)})},Si=e=>{He(!0),De(null===e||void 0===e?void 0:e.id).then(t=>{var i,n,a,l,r;const o=t.data;Me({title:(0,v.fq)(o.title),...void 0!==o.meta?{meta:o.meta}:{},project:o.project,subject:o.subject,description:o.description,html:(0,v.el)(o.html||"",o.title),parent_email:o.parent_email||_.iU,common_styles:o.common_styles||"",utm_parameters:{utm_source:null===(i=o.utm_parameters)||void 0===i?void 0:i.utm_source,utm_medium:null===(n=o.utm_parameters)||void 0===n?void 0:n.utm_medium,utm_campaign:null===(a=o.utm_parameters)||void 0===a?void 0:a.utm_campaign,utm_term:null===(l=o.utm_parameters)||void 0===l?void 0:l.utm_term,utm_content:null===(r=o.utm_parameters)||void 0===r?void 0:r.utm_content},emailtags:e.emailtags,folder:o.folder}).then(t=>{if(t.error)_e.error({message:t.error.data.code,description:t.error.data.message});else{var i;Ne({event:"clone",action:"clone_email",email_id:e.id,cloned_email_id:t.data.id,project_id:o.project}),null!==(i=o.folder)&&void 0!==i&&i[0]?Tt():Qe();try{f()}catch(et){}_e.success({message:ne('The copy of email "')+e.title+ae('" was successfully created.',"copy")})}He(!1)})})},Ii=(e,t)=>{Ve({emailId:t.id,folder:e.key===_.y2?[]:[e.key]}).then(e=>{var i,n;(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.folder[0])&&le(N.GY.endpoints.getEmails.initiate({...Ut,folderTag:(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.folder[0])||null})),d!==_.y2&&(le((0,M.X)({folder:d,emailId:t.id})),le(N.GY.endpoints.getEmails.initiate({...Ut,folderTag:d||null}))),Qe();try{f()}catch(et){}}).catch(e=>{})},xi=[{key:"selection",width:46,render:(e,t)=>n.createElement(a.Sc,{checked:ti.includes(t.id),onChange:e=>{e.stopPropagation(),ai(t.id,{metaKey:!0,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey})}})},{title:fi(ne("Title"),"title"),width:"calc(100% - 532px)",dataIndex:["title"],key:"name",className:a.bs.fileNameCol,render:(e,t)=>{var i,l,r;return n.createElement("div",{className:a.bs.fileName},n.createElement("div",{className:a.bs.fileNameRow},t.lock&&n.createElement(A.Ay,{icon:"LockOutlined",className:m()("lock-icon",a.bs.lockInline,{"lock-icon__disabled":!(we||Ce||(null===(i=me.id)||void 0===i?void 0:i.toString())===(null===(l=t.author)||void 0===l?void 0:l.toString()))})}),n.createElement(o.N_,{className:a.bs.title,to:qe?"":q(ke,t),style:{cursor:qe?"default":"pointer"}},e||ne("No name"))),(null===(r=t.emailtags)||void 0===r?void 0:r.length)>0&&n.createElement("div",{className:a.bs.fileItemCount},n.createElement(a.$x,{wrap:!0,size:4},t.emailtags.map(e=>{const t=null===I||void 0===I?void 0:I.find(t=>{var i;return(null===(i=t.id)||void 0===i?void 0:i.toString())===(null===e||void 0===e?void 0:e.toString())});return t?n.createElement(a.vw,{color:Se.colorPrimary,style:{cursor:"pointer",borderRadius:6,margin:0},key:t.id,onClick:e=>{e.stopPropagation(),e.preventDefault(),P(null,t.id)}},t.name):null}))))}},{title:fi(ne("Creation date"),"date"),key:"date",width:185,className:"nobr",dataIndex:"date",render:e=>n.createElement("div",{className:a.bs.fileDate},e?(0,v.Yq)((0,r.A)(e),ne):"\u2014"),sortOrder:"date"===(null===Ut||void 0===Ut?void 0:Ut.orderby)?(0,v.Np)(Ut.order):null},{title:fi(ne("Update date"),"modified"),key:"modified",width:185,className:"nobr",dataIndex:"modified",render:e=>n.createElement("div",{className:a.bs.fileDate},e?(0,v.Yq)((0,r.A)(e),ne):"\u2014"),sortOrder:"modified"===(null===Ut||void 0===Ut?void 0:Ut.orderby)?(0,v.Np)(Ut.order):null},{width:80,title:"",dataIndex:"",key:"avatar-actions",onCell:()=>({style:{padding:0}}),render:(e,t)=>{var i,r,s,c,d,m,u,h,f,v,b,y;const E=null===(i=t._embedded)||void 0===i||null===(r=i.author)||void 0===r?void 0:r[0],w=(null===(s=me.id)||void 0===s?void 0:s.toString())===(null===(c=t.author)||void 0===c?void 0:c.toString()),C=(0,U.MR)(E&&{display_name:E.name||E.display_name,nickname:E.nickname||E.slug,user_email:E.user_email||E.email})||String(t.author_name||"").trim()||(0,U.MR)(w?{display_name:me.name||[me.first_name,me.last_name].filter(Boolean).join(" ")||void 0,nickname:me.username,user_email:me.email}:null)||String(t.author_email||"").trim()||"",k=(0,U.uD)(C),S=t.folder[0]||null,I={icon:n.createElement(A.Ay,{icon:"MailOutlined",style:{fontSize:18}}),label:ne("New emails"),key:_.y2,onClick:e=>Ii(e,t)},x=null===g||void 0===g?void 0:g.map(e=>({icon:n.createElement(A.Ay,{icon:"FolderOutlined",style:{fontSize:18}}),label:e.name,key:e.id,className:e.id,onClick:e=>Ii(e,t)})),L=(null===x||void 0===x?void 0:x.filter(e=>!S||e.key!==S))||[];S&&(null===L||void 0===L||L.unshift(I));let N=[];return(we||Ce||(null===(d=me.id)||void 0===d?void 0:d.toString())===(null===(m=t.author)||void 0===m?void 0:m.toString()))&&!qe&&N.push({label:n.createElement(p.A,{key:"Lock",element:t}),icon:t.lock?n.createElement(A.Ay,{icon:"UnlockOutlined",style:{fontSize:"16px"}}):n.createElement(A.Ay,{icon:"LockOutlined",style:{fontSize:"16px"}})}),(we||Ce||(null===(u=me.id)||void 0===u?void 0:u.toString())===(null===(h=t.author)||void 0===h?void 0:h.toString()))&&!qe&&L.length>0&&N.push({label:ne("Transfer to folder"),icon:n.createElement(A.Ay,{icon:"FolderOutlined",style:{fontSize:"16px"}}),children:L,popupClassName:"emails-table__folder-submenu"}),!qe&&N.push({label:n.createElement(o.N_,{to:q(ke,t)},ne("Edit")),icon:n.createElement(A.Ay,{icon:"EditOutlined",style:{fontSize:"16px"}}),key:"Enter",className:"em-analytics__email-enter"},{label:ne("Clone"),key:"Clone",icon:n.createElement(A.Ay,{icon:"CopyOutlined",size:16}),className:"em-analytics__email-clone",disabled:je.isLoading,onClick:()=>Si(t)}),(we||Ce||(null===(f=me.id)||void 0===f?void 0:f.toString())===(null===(v=t.author)||void 0===v?void 0:v.toString()))&&qe&&N.push({label:ne("Recover"),icon:n.createElement(A.Ay,{icon:"RollbackOutlined",style:{fontSize:"16px"}}),key:"Recover",onClick:()=>Ai(t)}),(we||Ce||(null===(b=me.id)||void 0===b?void 0:b.toString())===(null===(y=t.author)||void 0===y?void 0:y.toString()))&&N.push({label:ne("Remove"),icon:n.createElement(A.Ay,{icon:"DeleteOutlined",size:16,className:"projects-table__actions-menu-icon"}),key:"Remove",danger:!0,className:"em-analytics__email-remove",onClick:()=>ki(t)}),n.createElement("div",{className:a.bs.avatarActions},n.createElement(a.m_,{title:C,placement:"top"},n.createElement(a.eu,{size:"small",className:"emails-table__author-avatar",alt:C,selected:w},k)),n.createElement(a.ms,{arrow:!1,placement:"leftTop",trigger:["hover","click"],overlayClassName:"projects-table__actions-dropdown",menu:{items:N,className:"projects-table__actions-menu-list",style:{maxHeight:"70vh",overflowY:"auto"}}},n.createElement("span",{className:"projects-table__actions-trigger projects-table__actions-trigger--card tableMenuButton",role:"button",tabIndex:0,onClick:e=>e.stopPropagation(),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.currentTarget.click())}},n.createElement(l.A,{className:"projects-table__actions-trigger-icon",rotate:90}))))}}],[Li,Ni]=(0,n.useState)(!1);(0,n.useEffect)(()=>{var e,t;for(let i in ge)if(i||""===i||0===i.length){Ni(!0),wi({...ge,folderTag:d,page:1});break}(null!==(e=ge.tags)&&void 0!==e&&e.length||ge.name)&&wi({...ge,folderTag:d,page:1}),null!==(t=ge.group)&&void 0!==t&&t.length&&it({...ge,group:ge.group,page:1,pageSize:_.mU})},[ge,le,d,qe,wi,i]);const[Ti,Bi]=(0,n.useState)(!1),[Pi]=(0,F.mI)(),[Ri]=(0,O.dS)(),{data:Fi}=(0,s.KC)(),Oi=async e=>{const t=e[0];try{Bi(!0);const e=(0,z.xi)(Pi,Ri,me,Fi),i=(0,z.oF)(t),n=await(0,z.q2)(t,e,i),[a]=(0,H.Ay)(t.name.replaceAll("&nbsp;"," ")),l=a||(0,v.ez)(n)||"";return Me({title:l,project:Fi.id,subject:l,description:"",html:n,parent_email:_.iU,folder:[],common_styles:JSON.stringify(_.BD)}).then(e=>{e&&(e.error?_e.error({message:e.error.data.code,description:e.error.data.message}):(Ae(`/projects/${Fi.id}/emails/${e.data.id}`),Ne({event:"import",action:"import_email",email_id:e.data.id,project_id:Fi.id,file_name:t.name})))}).finally(()=>Bi(!1))}catch(i){Bi(!1);const e=i instanceof Error?i.message:i;_e.error({message:e})}};return n.createElement("div",{className:"project-page__list"},i&&n.createElement("div",{className:"project-page__cards-grid create-buttons"},n.createElement(a.Zp,{className:"element-card element-card_email element-card_template element-card_template-empty",hoverable:!0,style:{cursor:"pointer"},cover:n.createElement("div",{className:"element-card__empty-template"},n.createElement(A.Ay,{icon:"NewEmail"}),n.createElement("div",{className:"element-card__empty-template__text"},n.createElement("div",{className:"element-card__empty-template__title"},ne("Blank template")),n.createElement("div",{className:"element-card__empty-template__description"},ne("Start from scratch")))),onClick:()=>((e,t)=>{var i;Ne({event:"select",action:"create_new_email",template_id:"0",description:"Create new email from scratch (template = 0)",subscription:null===me||void 0===me||null===(i=me.subscription)||void 0===i?void 0:i.post_title}),Ee.set(_.A9.em_new_email,e),t&&(window.localStorage.setItem(_.V0.em_active_tab,t),window.localStorage.setItem(_.V0.em_ai_settings,t)),(0,v.XZ)(Ae,Ue)})(278056)}),n.createElement(a.Zp,{className:"element-card element-card_email element-card_template element-card_template-empty",hoverable:!0,style:{cursor:"pointer"},loading:Ti,cover:n.createElement("div",{className:"element-card__empty-template"},n.createElement(A.Ay,{icon:"Import"}),n.createElement("div",{className:"element-card__empty-template__text"},n.createElement("div",{className:"element-card__empty-template__title"},ne("Import email")),n.createElement("div",{className:"element-card__empty-template__description"},ne("Work with your markup"))," ")),onClick:()=>{Ne({event:"click",action:"import_email"}),(0,z.QM)("application/zip, message/rfc822, text/html",Oi)}}),n.createElement(a.Zp,{className:"element-card element-card_email element-card_template element-card_template-empty",hoverable:!0,style:{cursor:"pointer"},cover:n.createElement("div",{className:"element-card__empty-template"},n.createElement(A.Ay,{icon:"generationAI"}),n.createElement("div",{className:"element-card__empty-template__text"},n.createElement("div",{className:"element-card__empty-template__title"},ne("AI email generation")),n.createElement("div",{className:"element-card__empty-template__description"},ne("Creating an email on request")," "))),onClick:()=>{Ne({event:"click",action:"ai_email_generation_open",project_id:e}),le((0,S.qf)(_.lx.ADD_NEW_AI_EMAIL))}})),i&&(!!Be||!!Te.length)&&n.createElement("div",{className:"element-card__group-tag-wrapper"},n.createElement(a.so,{gap:"10px",style:{marginBottom:15,marginLeft:4},wrap:!0},Te.map(e=>n.createElement(a.vw,{className:"blue-color element-card__group-tag",key:e.key,color:"#1677ff"},e.name," ",n.createElement(A.Ay,{onClick:()=>{const t=Te.filter(t=>t.key!==e.key);le(fe.length?(0,D.es)(t):(0,D.BN)(t)),le((0,j.ry)({[fe.length?"group":"projectGroup"]:t,[fe.length?"projectGroup":"group"]:[]}))},icon:"CloseTag"}))),Te.length>1&&n.createElement(a.vw,{className:"blue-color element-card__group-tag element-card__group-tag_close"},ne("Clear all")," ",n.createElement(A.Ay,{onClick:()=>{le((0,D.mb)()),le((0,j.ry)({group:[],projectGroup:[]}))},icon:"CloseAll"})))),!i&&vi===_.rl&&n.createElement(n.Fragment,null,ti.length?n.createElement(W,{selectedCount:ti.length,isDeletedEmails:qe,onClear:ni,selectedAllLocked:ri,onBulkDelete:bi,onBulkToggleLock:oi,onRename:1===ti.length?ui:void 0,onBulkMoveItems:{items:Ei()},onBulkCloneItems:_i()}):n.createElement(R,{viewMode:vi,onSwitchView:pi,sortOption:hi,onChangeSort:gi})),!i&&vi===_.Y$&&n.createElement(n.Fragment,null,ti.length?n.createElement(W,{selectedCount:ti.length,isDeletedEmails:qe,onClear:ni,selectedAllLocked:ri,onBulkDelete:bi,onBulkToggleLock:oi,onRename:1===ti.length?ui:void 0,onBulkMoveItems:{items:Ei()},onBulkCloneItems:_i()}):n.createElement(R,{viewMode:vi,onSwitchView:pi,sortOption:hi,onChangeSort:gi})),$t&&!(null!==Jt&&void 0!==Jt&&Jt.length)&&n.createElement(a.EA,{active:!0}),Zt&&n.createElement(a.Fc,{message:ne("Error"),description:ne("Error when receiving data. Try again (reload page) or contact support."),type:"error",showIcon:!0}),!$t&&!Gt&&0===(null===Jt||void 0===Jt?void 0:Jt.length)&&(Li||$>0?n.createElement(a.Fc,{message:ne("Emails not found"),description:"",type:"info",showIcon:!0}):d!==_.y2?n.createElement(a.Fc,{message:ne("You don't have any emails in this folder."),description:ne("Add your first email to the folder..."),type:"info",showIcon:!0}):n.createElement(a.Fc,{message:ne("You don't have any emails yet."),description:ne("Add your first email by clicking the Create a new email button."),type:"info",showIcon:!0})),(null===Jt||void 0===Jt?void 0:Jt.length)>0&&!i&&vi===_.rl&&n.createElement(a.XI.Container,null,n.createElement(a.NP,{renderEmpty:()=>n.createElement(a.Sv,{variant:"hidden"})},n.createElement(a.XI,{rowKey:e=>e.id,dataSource:Jt,columns:xi,loading:Qt,onChange:(e,t,{order:i,field:n},{action:a})=>{if("sort"===a)if(i)wi({page:Ut.page||1,order:(0,v.gq)(i),orderby:n,pageSize:_.mU});else{const e="asc"===((null===Ut||void 0===Ut?void 0:Ut.order)||"desc")?"desc":"asc";wi({page:Ut.page||1,order:e,orderby:n||(null===Ut||void 0===Ut?void 0:Ut.orderby)||"date",pageSize:_.mU})}},showHeader:!0,tableLayout:"fixed",pagination:!1,rowClassName:e=>ti.includes(e.id)?a.zj:"",onRow:e=>({onClick:t=>{var i,n,a,l;const r=t.target,o=null===r||void 0===r||null===(i=r.closest)||void 0===i?void 0:i.call(r,".tableMenuButton"),s=null===r||void 0===r||null===(n=r.closest)||void 0===n?void 0:n.call(r,".ant-dropdown-menu"),c=null===r||void 0===r||null===(a=r.closest)||void 0===a?void 0:a.call(r,".ant-checkbox-wrapper"),d=null===r||void 0===r||null===(l=r.closest)||void 0===l?void 0:l.call(r,".ant-tag"),m=(e=>{var t,i;if(!e)return null;const n=e.nodeType===Node.TEXT_NODE?e.parentElement:e;return null!==(t=null===n||void 0===n||null===(i=n.closest)||void 0===i?void 0:i.call(n,"a"))&&void 0!==t?t:null})(r);if(!o&&!s&&!c&&!d){if((t.metaKey||t.ctrlKey)&&!t.shiftKey&&!qe){if(m)return;return t.preventDefault(),void window.open(new URL(q(ke,e),window.location.origin).href,"_blank","noopener,noreferrer")}if(m&&!qe)return;ai(e.id,{metaKey:!0,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey})}},onDoubleClick:t=>{var i,n,a;const l=t.target;null!==l&&void 0!==l&&null!==(i=l.closest)&&void 0!==i&&i.call(l,".ant-checkbox-wrapper")||null!==l&&void 0!==l&&null!==(n=l.closest)&&void 0!==n&&n.call(l,".tableMenuButton")||null!==l&&void 0!==l&&null!==(a=l.closest)&&void 0!==a&&a.call(l,".ant-tag")||qe||Ae(q(ke,e))}})})),Yt>_.mU&&n.createElement(a.XI.PaginationWrapper,null,n.createElement(a.dK,{current:Ut.page||1,total:Yt,hideOnSinglePage:!0,showSizeChanger:!1,pageSize:_.mU,onChange:(t,i)=>{ni(),wi({projectId:e,page:t,pageSize:i})}}))),((null===Jt||void 0===Jt?void 0:Jt.length)>0||qt)&&(i||vi===_.Y$)&&n.createElement(n.Fragment,null,(Gt||ze||Ti)&&n.createElement("div",{className:"project-page__loader"},n.createElement(k.A,{small:!0})),n.createElement("div",{className:m()("project-page__cards-grid",{"project-page__cards-grid--show-checkboxes":ti.length>0})},Jt&&Jt.map(e=>i?n.createElement(C,{key:e.id,element:e,setSearchFilters:P}):n.createElement("div",{key:e.id,className:"emailCard",onClickCapture:t=>{t.shiftKey&&(t.preventDefault(),t.stopPropagation(),ai(e.id,{metaKey:t.metaKey,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey}))}},n.createElement("div",{className:"selectedEmailCheckbox"},n.createElement(a.Sc,{checked:ti.includes(e.id),onChange:t=>{t.stopPropagation();const i=t.shiftKey,n=!i&&!t.metaKey&&!t.ctrlKey;ai(e.id,{metaKey:n||t.metaKey,ctrlKey:t.ctrlKey,shiftKey:i})}})),n.createElement(h.A,{element:e,setSearchFilters:P,isTrash:qe,foldersList:g,refetch:Qe,projectTags:I,selected:ti.includes(e.id),foldersHandlers:{handleRemove:ki,handleRecover:Ai,handleClone:Si,handlerChangeFolder:Ii}})))),Yt>_.mU&&n.createElement(a.dK,{current:Ut.page||1,total:Yt,hideOnSinglePage:!0,showSizeChanger:!1,pageSize:_.mU,onChange:(e,t)=>wi({page:e,pageSize:t})})),n.createElement(x,null),n.createElement(T,{email:di,onUpdated:Kt}))}},40711:(e,t,i)=>{"use strict";i.d(t,{w:()=>p});var n=i(20736),a=i(76508),l=i(76281);class r{constructor(){this.deletingIds=new Set}beginDeleting(e){for(const t of e)t&&this.deletingIds.add(t)}endDeleting(e){for(const t of e)t&&this.deletingIds.delete(t)}isDeleting(e){return!!e&&this.deletingIds.has(e)}}var o,s=i(98121);function c(e,t){const i=null!==e&&void 0!==e?e:{},n=Array.isArray(i.detailed)?i.detailed.map(e=>{var i;return{requestId:null!==(i=e.requestId)&&void 0!==i?i:e.id,success:!!e.success,data:t(e.data),error:e.error}}):void 0;return{success:!!i.success,error:i.error,detailed:n}}function d(e){return null==e?"":String(e)}function m(e){return{...e,name:d(e.name)}}function u(e){return e&&"object"===typeof e&&"name"in e?{...e,name:d(e.name)}:e}let p=(h=o=class{async _findOrCreateFolderByPath(e){const{__:t}=this.i18n,i=(n=e)?n.replaceAll("\\","/").split("/").filter(Boolean):[];var n;if(i.length>10){const e=t("Path depth exceeds maximum limit of %s").replace("%s",String(10));throw new l.FileManagerApiError(e,"ValidationError")}let a;for(const s of i){var r;const{files:i}=await this.getFiles({folderId:(null===(r=a)||void 0===r?void 0:r.id)||"",itemType:"folder"}),n=i.find(e=>e.name===s);if(n){if(!n.isFolder){const i=t("Path component '%s' in '%s' is not a folder").replace("%s",s).replace("%s",e);throw new l.FileManagerApiError(i,"ValidationError")}a={id:n.id,name:n.name,parentId:n.folderId}}else{var o;if("function"!==typeof this._dataProvider.createFolder)throw new l.FileManagerApiError(t("Create folder operation is not supported by data provider"),"UnsupportedOperation");a=await this.createFolder({name:s,parentId:null===(o=a)||void 0===o?void 0:o.id})}}return a}getTrashFolder(){return this._findOrCreateFolderByPath(this._pathOptions.trashPath||"Trash")}getTempFolder(){return this._findOrCreateFolderByPath(this._pathOptions.tempPath||"Edited")}constructor(e,t={},i,l=a.nr){var o,s;this._dataProvider=e,this._options=t,this._pathOptions=i,this.i18n=l,this._cache=void 0,this._rootId=void 0,this._useSoftDelete=void 0,this._enableTrash=void 0,this._validateDuplicates=void 0,this._blobFetchForceReloadOnceIds=new Set,this._mutationRegistry=new r,this._mapItem=async({childrenCount:e,...t})=>{const i=m(t);if(i.isFolder)return{...i,childCount:e,url:"",thumbnailUrl:""};const[n,a]=await Promise.all([this._getUrl(i),this._getThumbnailUrl(i)]);return{...i,childCount:0,url:n,thumbnailUrl:a}},this._useSoftDelete=this._pathOptions.useSoftDelete,this._rootId=this._pathOptions.rootId||"",this._enableTrash=void 0===this._options.enableTrash||this._options.enableTrash,this._validateDuplicates=this._dataProvider.validateDuplicates,this._cache=new n.vp(t.cacheStrategy||{},null===(o=t.cacheStrategy)||void 0===o?void 0:o.ttl,null===(s=t.cacheStrategy)||void 0===s?void 0:s.errorTtl),this.setController({invalidateItemCache:e=>{this._cache.forceInvalidate(e)},getCachedItem:e=>this._cache.getEntity(e)}),"function"!==typeof this._dataProvider.clearCache&&(this.clearCache=void 0)}setController(e){"function"===typeof this._dataProvider.setController&&this._dataProvider.setController(e)}async clearCache(e){if("function"!==typeof this._dataProvider.clearCache){const{__:e}=this.i18n;throw new l.FileManagerApiError(e("Clear cache is not supported by data provider"),"UnsupportedOperation")}this._cache.forceInvalidate(this._rootId),await this._dataProvider.clearCache(e)}markNextFileBlobFetchBypassHttpCache(e){this._blobFetchForceReloadOnceIds.add(this.normalizeId(e))}normalizeId(e){return e?"root"===e||"folders"===e?this._rootId:e:this._rootId}_isDeletingId(e){return this._mutationRegistry.isDeleting(this.normalizeId(e))}_collectDeletingIds(e){const t=this.normalizeId(e),i=new Set([t]),n=this._cache.getEntity(t);if(null===n||void 0===n||!n.isFolder)return Array.from(i);const a=[t];for(;a.length>0;){const e=a.pop(),t=this._cache.getChildrenIds(e);for(const n of t){if(i.has(n))continue;i.add(n);const e=this._cache.getEntity(n);null!==e&&void 0!==e&&e.isFolder&&a.push(n)}}return Array.from(i)}_emptyFilesResult(e,t){return{files:[],pagination:{..."number"===typeof e?{page:e}:{},..."number"===typeof t?{limit:t}:{},total:0,totalPages:1,hasNext:!1,hasPrev:!1}}}_validateName(e,t=!1){if(!e||0===e.trim().length){const e=t?"FolderInvalidName":"FileInvalidName",{__:i}=this.i18n,n=i(t?"Folder name cannot be empty":"File name cannot be empty");throw new l.FileManagerApiError(n,e)}if(/[\/\\:*?"<>|]/.test(e)){const{__:i}=this.i18n,n=t?"FolderInvalidName":"FileInvalidName",a=t?i("Folder name contains invalid characters: %s").replace("%s",e):i("File name contains invalid characters: %s").replace("%s",e);throw new l.FileManagerApiError(a,n)}}_validateTargetFolderType(e){const t=this.normalizeId(e);if(t===this._rootId)return;const i=this._cache.getEntity(t);if(i&&!i.isFolder){const{__:t}=this.i18n,i=t("Target item with id '%s' is not a folder").replace("%s",e);throw new l.FileManagerApiError(i,"ValidationError")}}_checkNameExistsInCache(e,t,i,n){const a=this.normalizeId(e),l=this._cache.getChildrenIds(a);for(const r of l){const e=this._cache.getEntity(r);if(e&&e.name===t&&!!e.isFolder===i&&(!n||e.id!==n))return!0}return!1}async _getUrl(e){if(e.url)return e.url;try{var t;return"function"===typeof(null===(t=this._dataProvider)||void 0===t?void 0:t.getUrl)&&this._dataProvider.getUrl(e)||""}catch(i){}return""}async _getThumbnailUrl(e){if(e.thumbnailUrl)return e.thumbnailUrl;try{var t;return"function"===typeof(null===(t=this._dataProvider)||void 0===t?void 0:t.getThumbnailUrl)&&this._dataProvider.getThumbnailUrl(e)||""}catch(i){}return""}_isAncestor(e,t){if(!t)return!1;const i=this.normalizeId(t),n=this.normalizeId(e);if(i===n)return!0;let a=this._cache.getEntity(i);const l=new Set;for(;a&&a.folderId&&!l.has(a.id);){l.add(a.id);const e=this.normalizeId(a.folderId);if(e===n)return!0;if(a=this._cache.getEntity(e),!a||!a.isFolder)break}return!1}async getFile(e,t){return this._isDeletingId(e)?null:this._cache.searchByName(t,{parentId:this.normalizeId(e),caseSensitive:!0,recursive:!1,itemType:"file"})[0]||(await this.getFiles({folderId:e,itemType:"file",search:t})).files[0]}async getFileById(e){const t=this.normalizeId(e);if(this._isDeletingId(t))return null;const i=this._cache.getFileSystemItem(t);if(i&&!i.isFolder)return await this._mapItem(i);if(!this._dataProvider.pathMode)return null;const n=await this._getFileByPathStyleId(t);if(n&&!n.isFolder){const e=m(n);return this._cache.upsertEntity(e),await this._mapItem(e)}return null}async _getFileByPathStyleId(e){const t=e.replace(/\\/g,"/").replace(/^\/+/,""),i=t.lastIndexOf("/"),n=i<0?"":t.slice(0,i),a=i<0?t:t.slice(i+1);return a?this.getFile(n,a):null}async getFileUrl(e,t){const i=await this.getFile(e,t);return await this._getUrl(i)||await this._getThumbnailUrl(i)||i.thumbnail}async getFiles({folderId:e,search:t,sortBy:i,sortOrder:n,page:a,limit:l,itemType:r="all",noFolder:o=!1}){var s,c;o&&(e=null===(c=await this.getTempFolder())||void 0===c?void 0:c.id);const d=this.normalizeId(null!==(s=e)&&void 0!==s?s:this._rootId),u=!1===this._options.enablePagination,p=u?1:a,h=u?1e4:l,g=this._options.clientSideFilter,f=this._options.clientSideSorting,v=this._options.clientSidePaging,b=v?Math.max(1,null!==a&&void 0!==a?a:1):void 0,y=v?"number"===typeof l&&Number.isFinite(l)&&l>0?l:25:void 0,E=this._emptyFilesResult(v?b:p,v?y:h);if(this._isDeletingId(d))return E;const _=!1!==this._options.unifiedCatalogFetch&&u&&("folder"===r||"file"===r),w=_?"all":r,C={folderId:d,itemType:w};g||(C.search=t),f||(C.sortBy=null!==i&&void 0!==i?i:"folder"!==w?"date":void 0,C.sortOrder=null!==n&&void 0!==n?n:"folder"!==w?"desc":void 0),v||(C.page=p,C.limit=_?1e4:h);const k=_?1e4:v?void 0:h,A={folderId:d,itemType:w,search:g?void 0:t,sortBy:f?void 0:C.sortBy,sortOrder:f?void 0:C.sortOrder,page:v?void 0:p,pageSize:k};let S;try{S=await this._cache.getOrCreateChildren(d,A,async(e,t)=>{const i=t.pageSize,n=null!=i&&Number.isFinite(Number(i))?Number(i):1e4,a=await this._dataProvider.getItems({...t,folderId:e,limit:n}),l=function(e){return(null!==e&&void 0!==e?e:[]).map(m)}(a.items);var r;return v?{items:l,total:"number"===typeof(null===(r=a.pagination)||void 0===r?void 0:r.total)?a.pagination.total:l.length}:{items:l,...a.pagination}})}catch(B){if(this._isDeletingId(d))return E;throw B}let I,x=S.items;if(_&&("folder"===r?x=x.filter(e=>e.isFolder):"file"===r&&(x=x.filter(e=>!e.isFolder))),g)if("function"===typeof this._options.clientSideFilter)x=this._options.clientSideFilter(x,t);else if(t){const e=t.toLowerCase();x=x.filter(t=>{var i;return null===(i=t.name)||void 0===i?void 0:i.toLowerCase().includes(e)})}var L;f&&(x="function"===typeof this._options.clientSideSorting?this._options.clientSideSorting(x,i,n):this._defaultClientSideSort(x,i,n)),I=v||g||_?x.length:null!==(L=S.total)&&void 0!==L?L:x.length;let N=x;if(v)if("function"===typeof this._options.clientSidePaging)N=this._options.clientSidePaging(x,b,y);else{const e=(b-1)*y,t=e+y;N=x.slice(e,t)}if("function"===typeof this._dataProvider.getUrl||"function"===typeof this._dataProvider.getThumbnailUrl){const e=N.map(async e=>{if(e.isFolder)return e;const[t,i]=await Promise.all([e.url?Promise.resolve(e.url):"function"===typeof this._dataProvider.getUrl?this._dataProvider.getUrl(e):Promise.resolve(void 0),e.thumbnailUrl?Promise.resolve(e.thumbnailUrl):"function"===typeof this._dataProvider.getThumbnailUrl?this._dataProvider.getThumbnailUrl(e):Promise.resolve(void 0)]);return{...e,url:t,thumbnailUrl:i}});N=await Promise.all(e)}const T=v?{page:b,limit:y,total:I,totalPages:Math.max(1,Math.ceil(I/y)),hasNext:b*y<I,hasPrev:b>1}:{page:p,limit:h,total:I,...!v&&S.totalPages&&{totalPages:S.totalPages},...!v&&S.hasNextPage&&{hasNextPage:S.hasNextPage}};return{files:await Promise.all(N.map(this._mapItem)),pagination:T}}_defaultClientSideSort(e,t,i){return e.sort((e,n)=>{let a=0;switch(t){case"name":default:a=(e.name||"").localeCompare(n.name||"");break;case"date":a=new Date(e.date||0).getTime()-new Date(n.date||0).getTime();break;case"size":a=(Number(e.size)||0)-(Number(n.size)||0)}return"desc"===i?-a:a})}async getFileData(e,t){const i=this.normalizeId("string"===typeof e?e:e.id);let n=t;this._blobFetchForceReloadOnceIds.delete(i)&&(n={...t,forceReload:!0});const a=this._cache.getEntity(i)||("string"===typeof e?{id:i,name:"",folderId:this._rootId,isFolder:!1}:{...e,childrenCount:e.childCount});if("function"===typeof this._dataProvider.getFileData)return await this._dataProvider.getFileData(a,n);const{__:r}=this.i18n;if(!a.url&&"function"!==typeof this._dataProvider.getUrl)throw new l.FileManagerApiError(r("Cannot read file"),"FileReadError");const o=a.url||("function"===typeof this._dataProvider.getUrl?await this._dataProvider.getUrl(a):"");var c;if(o)return(await(0,s.Be)(o,{config:this._pathOptions.resourceProxyConfig,standalone:this._pathOptions.isStandalone,intent:"downloadBlob",init:null!==(c=n)&&void 0!==c&&c.forceReload?{cache:"no-store"}:void 0})).blob();throw new l.FileManagerApiError(r("Unable to get file data"),"FileReadError")}async findFileByUrl(e){const t=this._cache.searchByUrl(e);if(t)return t;if("function"===typeof this._dataProvider.findFileByUrl)try{const t=await this._dataProvider.findFileByUrl(e);if(t){const e=m(t);return this._cache.upsertEntity(e),e}}catch(i){}return null}async getChildrenCount(e){if(!e)return 0;const t=this.normalizeId(null!==e&&void 0!==e?e:this._rootId);return this._isDeletingId(t)?0:this._cache.getChildrenCount(t,async()=>{try{if(this._options.clientSidePaging){var e;const i=await this.getFiles({folderId:t,itemType:"all",page:1,limit:25});return null!==(e=i.pagination.total)&&void 0!==e?e:i.files.length}const i=await this._dataProvider.getItems({folderId:t,limit:0,itemType:"all"});return"undefined"!==typeof i.pagination?i.pagination.total||0:!1===this._options.enablePagination?i.items.length:0}catch(i){if(this._isDeletingId(t))return 0;if(this._isPathFolderNotFoundError(i))return 0;throw i}})}_isPathFolderNotFoundError(e){var t,i,n;if(!e||"object"!==typeof e)return!1;const a=e;return"path_folder_not_found"===a.code||"path_folder_not_found"===(null===(t=a.data)||void 0===t?void 0:t.code)||404===a.status||404===(null===(i=a.data)||void 0===i||null===(n=i.data)||void 0===n?void 0:n.status)}async _uploadFile(e){var t;const i=this.normalizeId(null!==(t=e.folderId)&&void 0!==t?t:this._rootId),{__:n}=this.i18n;if("function"!==typeof this._dataProvider.uploadFile)throw new l.FileManagerApiError(n("Upload file operation is not supported by data provider"),"UnsupportedOperation");if(this._validateName(e.name,!1),this._validateDuplicates&&this._checkNameExistsInCache(i,e.name,!1)){const t=n("File '%s' already exists in target folder").replace("%s",e.name);throw new l.FileManagerApiError(t,"FileAlreadyExists")}const a=await this._dataProvider.uploadFile({...e,folderId:i}),r=m({name:e.name,size:e.size,...a,folderId:i});return this._cache.upsertEntity(r),r}async uploadFiles(e){var t,i;const n=e.items.some(e=>e.noFolder)?await this.getTempFolder():null;e={...e,items:null===(t=e.items)||void 0===t?void 0:t.map(e=>({...e,folderId:e.noFolder?null===n||void 0===n?void 0:n.id:e.folderId}))};for(const l of e.items)l.folderId&&(e.folderId=l.folderId);const a=e.items||[],r=null!==(i=e.folderId)&&void 0!==i?i:this._rootId,o=this.normalizeId(r);if(this._validateDuplicates)for(const c of a)if(c.name){var s;this._validateName(c.name,!1);const e=this.normalizeId(null!==(s=c.folderId)&&void 0!==s?s:o);if(this._checkNameExistsInCache(e,c.name,!1)){const{__:e}=this.i18n,t=e("File '%s' already exists in target folder").replace("%s",c.name);throw new l.FileManagerApiError(t,"FileAlreadyExists")}}const u=this._cache.getEntity(o);let p={detailed:new Array(a.length),success:!0};if("function"===typeof this._dataProvider.uploadFiles){const e=a.map(e=>{var t;return{...e,folderId:this.normalizeId(null!==(t=e.folderId)&&void 0!==t?t:o)}});if(p=c(await this._dataProvider.uploadFiles({folderId:o,items:e}),e=>{if(e)return{id:e.id,name:d(e.name),folderId:e.folderId}}),p.detailed&&p.detailed.length){for(let e=0;e<p.detailed.length;e++){const t=p.detailed[e];if(t&&t.success){var h,g;const e=t.data,i=null!==(h=null===e||void 0===e?void 0:e.id)&&void 0!==h?h:t.requestId,n=m({...u,...e,folderId:null!==(g=null===e||void 0===e?void 0:e.folderId)&&void 0!==g?g:o});this._cache.upsertEntity(n),t.requestId=i}}void 0===p.success&&(p.success=!p.detailed.some(e=>!e.success))}else p.success=!p.error&&!!p.success}else{if("function"!==typeof this._dataProvider.uploadFile)throw new l.FileManagerApiError("Upload files is not supported by data provider","UnsupportedOperation");p.detailed=await Promise.all(a.map(async e=>{var t;const i=this.normalizeId(null!==(t=e.folderId)&&void 0!==t?t:o);try{const t=await this._uploadFile({...e,folderId:i});return{requestId:t.id,data:t,success:!0}}catch(n){return{requestId:null===e||void 0===e?void 0:e.id,success:!1,error:n}}})),p.success=!p.detailed.some(e=>!e.success)}if(p.success&&this._enableTrash)try{this._cache.forceInvalidate(o)}catch(f){}return p}async deleteFile(e){const t=this.normalizeId(e),i=[t];this._mutationRegistry.beginDeleting(i);try{if(this._useSoftDelete&&this._enableTrash){const e=await this.getTrashFolder();return await this.moveItem({itemId:t,targetFolderId:e.id,isFolder:!1})}return await this.hardDeleteItem(t)}finally{this._mutationRegistry.endDeleting(i)}}async deleteItems(e,t){const i=Array.from(new Set(e.flatMap(e=>this._collectDeletingIds(this.normalizeId(e)))));this._mutationRegistry.beginDeleting(i);try{if(this._useSoftDelete&&this._enableTrash&&!0!==t.permanent){const t=await this.getTrashFolder();return await this.moveItems(t.id,e)}return await this.hardDeleteItems(e,t)}finally{this._mutationRegistry.endDeleting(i)}}async hardDeleteItems(e,t){let i={success:!0,detailed:[]};const n=t.permanent?null:await this.getTrashFolder();if("function"===typeof this._dataProvider.deleteItems){if(i=c(await this._dataProvider.deleteItems(e.map(e=>this._cache.getEntity(e)),t),e=>e),i.success){const t=i.detailed||e.map(e=>({requestId:e,success:!0,error:void 0}));for(const e of t)e.success&&(n?this._cache.moveEntity(e.requestId,n.id):this._cache.deleteEntity(e.requestId))}}else"function"===typeof this._dataProvider.deleteItem&&(i.detailed=await Promise.all(e.map(async e=>{const i=this._cache.getEntity(e);if(!i){const t="FileNotFound",{__:i}=this.i18n,n=i("Item with id '%s' not found").replace("%s",e);return{requestId:e,success:!1,error:new l.FileManagerApiError(n,t)}}try{return await this._dataProvider.deleteItem(i,t),n?this._cache.moveEntity(e,n.id):this._cache.deleteEntity(e),{requestId:e,success:!0}}catch(a){return{requestId:e,error:a,success:!1}}})),i.success=!i.detailed.some(e=>!e.success));if(i.success&&n)try{this._cache.forceInvalidate(n.id)}catch(a){}return i}async hardDeleteItem(e){const t=this._cache.getEntity(e);if(!t){const{__:t}=this.i18n,i=t("Item with id '%s' not found in cache").replace("%s",e);throw new l.FileManagerApiError(i,"FileNotFound")}if("function"!==typeof this._dataProvider.deleteItem){const{__:e}=this.i18n;throw new l.FileManagerApiError(e("Delete item operation is not supported by data provider"),"DeleteNotAllowed")}if(await this._dataProvider.deleteItem(t,{permanent:!0}),this._cache.deleteEntity(e),this._enableTrash)try{const e=await this.getTrashFolder();e&&this._cache.forceInvalidate(e.id)}catch(i){}return!0}async cleanTrash(){const{__:e}=this.i18n;if(!this._enableTrash)throw new l.FileManagerApiError(e("Trash is not enabled"),"UnsupportedOperation");if("function"===typeof this._dataProvider.cleanTrash){const e=await this._dataProvider.cleanTrash();try{const e=await this.getTrashFolder();e&&this._cache.forceInvalidate(e.id)}catch(t){}return e}throw new l.FileManagerApiError(e("Clean trash is not supported by data provider"),"UnsupportedOperation")}async createFolder({name:e,parentId:t,is_force_create:i}){const n=this.normalizeId(null!==t&&void 0!==t?t:this._rootId);if(this._validateName(e,!0),this._validateDuplicates&&this._checkNameExistsInCache(n,e,!0)){const{__:t}=this.i18n,i=t("Folder '%s' already exists in parent folder").replace("%s",e);throw new l.FileManagerApiError(i,"FolderAlreadyExists")}const a=await this._dataProvider.createFolder(e,n,i),r=m({id:a.id,folderId:n,name:a.name,isFolder:!0,childrenCount:a.childrenCount});return this._cache.upsertEntity(r),{...a,name:r.name}}async deleteFolder(e){const t=this.normalizeId(e),i=this._collectDeletingIds(t);this._mutationRegistry.beginDeleting(i);try{if(this._useSoftDelete&&this._enableTrash)try{const e=await this.getTrashFolder();return!!await this.moveItem({itemId:t,targetFolderId:e.id,isFolder:!0})&&(this._cache.deleteFolderRecursive(t),!0)}catch(n){return await this.hardDeleteItem(t)}return await this.hardDeleteItem(t)}finally{this._mutationRegistry.endDeleting(i)}}async renameFolder(e,t){const{__:i}=this.i18n;if("function"!==typeof this._dataProvider.renameItem)throw new l.FileManagerApiError(i("Rename folder is not supported"),"RenameNotAllowed");const n=this.normalizeId(e),a=this._cache.getEntity(n);if(!a){const t=i("Folder with id '%s' not found in cache").replace("%s",e);throw new l.FileManagerApiError(t,"FolderNotFound")}if(this._validateName(t,!0),this._validateDuplicates){const e=this.normalizeId(a.folderId);if(this._checkNameExistsInCache(e,t,!0,n)){const e=i("Folder '%s' already exists in parent folder").replace("%s",t);throw new l.FileManagerApiError(e,"FolderAlreadyExists")}}const r=u(await this._dataProvider.renameItem(a,t));return this._cache.upsertEntity(m({...this._cache.getEntity(r.id),...r})),this._cache.getEntity(r.id)}async renameFile(e,t){const{__:i}=this.i18n;if("function"!==typeof this._dataProvider.renameItem)throw new l.FileManagerApiError(i("Rename file is not supported"),"RenameNotAllowed");const n=this._cache.getEntity(e);if(!n){const t=i("File with id '%s' not found in cache").replace("%s",e);throw new l.FileManagerApiError(t,"FileNotFound")}const a=this.normalizeId(e);if(this._validateName(t,!1),this._validateDuplicates){const e=this.normalizeId(n.folderId);if(this._checkNameExistsInCache(e,t,!1,a)){const e=i("File '%s' already exists in parent folder").replace("%s",t);throw new l.FileManagerApiError(e,"FileAlreadyExists")}}const r=u(await this._dataProvider.renameItem(n,t));return r&&this._cache.upsertEntity(m({...this._cache.getEntity(a),...r})),this._cache.getEntity(a)}async moveItem({itemId:e,targetFolderId:t,isFolder:i}){if("function"!==typeof this._dataProvider.moveItem){const{__:e}=this.i18n;throw new l.FileManagerApiError(e("Move item operation is not supported by data provider"),"MoveNotAllowed")}const n=this.normalizeId(t);this._validateTargetFolderType(t);const a=this._cache.getEntity(e);if(!a){const t=u(await this._dataProvider.moveItem({id:e,folderId:n,isFolder:i},n));if(t.id===e)this._cache.upsertEntity(m({...t,folderId:n}));else{try{this._cache.deleteEntity(e)}catch(s){}this._cache.upsertEntity(m({...t,folderId:n}))}return!0}const{__:r}=this.i18n;if(a.isFolder){if(e===n)throw new l.FileManagerApiError(r("Cannot move folder into itself"),"MoveIntoSelf");if(this._isAncestor(e,n))throw new l.FileManagerApiError(r("Cannot move folder into its descendant"),"MoveIntoDescendant")}if(this._validateDuplicates&&n!==this.normalizeId(a.folderId)&&a.name&&this._checkNameExistsInCache(n,a.name,!!a.isFolder,e)){const e=a.isFolder?"FolderAlreadyExists":"FileAlreadyExists";throw new l.FileManagerApiError(`${a.isFolder?"Folder":"File"} '${a.name}' already exists in target folder`,e)}const o=u(await this._dataProvider.moveItem(a,n));if(o.id===e){const t=this._cache.moveEntity(e,n);return this._cache.upsertEntity(m({...t,...o})),!0}{const t=this._cache.deleteEntity(e);return this._cache.upsertEntity(m({...t,...o,folderId:n})),!0}}async moveItems(e,t){const i=this.normalizeId(e);this._validateTargetFolderType(e);const n=t.map(e=>this._cache.getEntity(e));for(const r of n)if(r){if(r.isFolder){const{__:e}=this.i18n;if(r.id===i){const t=e("Cannot move folder '%s' into itself").replace("%s",r.name);throw new l.FileManagerApiError(t,"MoveIntoSelf")}if(this._isAncestor(r.id,i)){const t=e("Cannot move folder '%s' into its descendant").replace("%s",r.name);throw new l.FileManagerApiError(t,"MoveIntoDescendant")}}if(this._validateDuplicates){const e=this.normalizeId(r.folderId);if(i!==e&&r.name&&this._checkNameExistsInCache(i,r.name,!!r.isFolder,r.id)){const e=r.isFolder?"FolderAlreadyExists":"FileAlreadyExists";throw new l.FileManagerApiError(`${r.isFolder?"Folder":"File"} '${r.name}' already exists in target folder`,e)}}}let a={detailed:new Array(n.length),success:!0};if("function"===typeof this._dataProvider.moveItems)a=c(await this._dataProvider.moveItems(n,i),e=>e);else{if("function"!==typeof this._dataProvider.moveItem)throw new l.FileManagerApiError("Move items is not supported","MoveNotAllowed");a.detailed=await Promise.all(t.map(async(e,t)=>{const a=n[t]||{id:e,folderId:null,isFolder:!1,name:e};try{return{requestId:e,data:u(await this._dataProvider.moveItem(a,i)),success:!0}}catch(l){return{requestId:e,success:!1,error:l}}}))}if(a.success){const e=a.detailed||t.map(e=>({requestId:e,success:!0,data:void 0}));for(const t of e)if(t.success)if(t.data&&t.data.id!==t.requestId){const e=this._cache.deleteEntity(t.requestId);this._cache.upsertEntity(m({...e,...t.data,folderId:i}))}else this._cache.moveEntity(t.requestId,i),t.data&&this._cache.upsertEntity(m({...this._cache.getEntity(t.requestId),...t.data,folderId:i}));return a}{const{__:e}=this.i18n;return{success:!1,error:a.error||new l.FileManagerApiError(e("Move items failed"),"MoveNotAllowed")}}}async copyItem({itemId:e,targetFolderId:t}){if("function"!==typeof this._dataProvider.copyItem){const{__:e}=this.i18n;throw new l.FileManagerApiError(e("Copy item is not supported"),"CopyNotAllowed")}const i=this.normalizeId(t);this._validateTargetFolderType(t);const n=this._cache.getEntity(e);if(!n){const t=u(await this._dataProvider.copyItem({id:e,folderId:i},i));return this._cache.copyEntity(e,i,t.id),this._cache.upsertEntity(m({...t,folderId:i})),!0}if(this._validateDuplicates&&n.name){const t=i===this.normalizeId(n.folderId)?e:void 0;if(this._checkNameExistsInCache(i,n.name,!!n.isFolder,t)){const e=n.isFolder?"FolderAlreadyExists":"FileAlreadyExists";throw new l.FileManagerApiError(`${n.isFolder?"Folder":"File"} '${n.name}' already exists in target folder`,e)}}const a=u(await this._dataProvider.copyItem(n,i));return this._cache.copyEntity(e,i,a.id,{...a,folderId:i})||this._cache.upsertEntity(m({...a,folderId:i})),!0}async copyItems(e,t){const i=this.normalizeId(e);this._validateTargetFolderType(e);const n=t.map(e=>"string"===typeof e?{id:e}:e),a=n.map(e=>e.id),r=a.map((e,t)=>{var i;const a=this._cache.getEntity(e),l=null===(i=n[t])||void 0===i?void 0:i.newName;return a?l?{...a,name:l}:a:void 0});if(this._validateDuplicates)for(let c=0;c<r.length;c++){const e=r[c];if(e&&e.name){const t=this.normalizeId(e.folderId),n=i===t?a[c]:void 0;if(this._checkNameExistsInCache(i,e.name,!!e.isFolder,n)){const t=e.isFolder?"FolderAlreadyExists":"FileAlreadyExists";throw new l.FileManagerApiError(`${e.isFolder?"Folder":"File"} '${e.name}' already exists in target folder`,t)}}}let o={detailed:new Array(r.length),success:!0};if("function"===typeof this._dataProvider.copyItems)o=c(await this._dataProvider.copyItems(r,i),e=>e);else{if("function"!==typeof this._dataProvider.copyItem){const{__:e}=this.i18n;throw new l.FileManagerApiError(e("Copy items is not supported"),"CopyNotAllowed")}o.detailed=await Promise.all(a.map(async(e,t)=>{const n=r[t]||{id:e,folderId:null,isFolder:!1};try{return{requestId:e,data:u(await this._dataProvider.copyItem(n,i)),success:!0}}catch(a){return{requestId:e,success:!1,error:a}}}))}if(o.success&&o.detailed)for(let l=0,c=o.detailed.length;l<c;l++){const e=o.detailed[l];var s;if(e.success&&null!==(s=e.data)&&void 0!==s&&s.id){const t=e.data.folderId||i;!this._cache.copyEntity(e.requestId,t,e.data.id,{...e.data,folderId:t})&&e.data&&this._cache.upsertEntity(m({...e.data,folderId:t}))}}else if(!o.detailed)throw new l.FileManagerApiError("batchResult in copy method must have detailed results","ValidationError");return o}async uploadFileByUrl(e){var t;if(e.noFolder){const t=await this.getTempFolder();e={...e,folderId:t.id}}const i=this.normalizeId(null!==(t=e.folderId)&&void 0!==t?t:this._rootId);try{const t=m({...await this._dataProvider.uploadFileByUrl(e.url,i,{eventSource:e.eventSource}),folderId:i});return this._cache.upsertEntity(t),t}catch(n){throw n}}async updateFile(e,t){const{__:i}=this.i18n;if("function"!==typeof this._dataProvider.updateFile)throw new l.FileManagerApiError(i("Update file is not supported"),"UnsupportedOperation");const n=this.normalizeId(e),a=this._cache.getEntity(n);if(!a){const t=i("File with id '%s' not found in cache").replace("%s",e);throw new l.FileManagerApiError(t,"FileNotFound")}if(t.name&&t.name!==a.name&&this._validateName(t.name,!1),this._validateDuplicates&&t.name&&t.name!==a.name){const e=this.normalizeId(a.folderId);if(this._checkNameExistsInCache(e,t.name,!1,n)){const e=i("File '%s' already exists in parent folder").replace("%s",t.name);throw new l.FileManagerApiError(e,"FileAlreadyExists")}}const r=u(await this._dataProvider.updateFile(a,{...t}));return this._cache.upsertEntity(m({...this._cache.getEntity(n),...r,...t})),this._cache.getEntity(n)}},class extends h{constructor(...e){super(...e);const t=Object.getOwnPropertyNames(h.prototype);for(const i of t){const e=Object.getOwnPropertyDescriptor(h.prototype,i);"constructor"!==i&&"function"===typeof(null===e||void 0===e?void 0:e.value)&&this[i]&&(this[i]=this[i].bind(this))}}}||o);var h},93453:(e,t,i)=>{"use strict";i.d(t,{T:()=>r});var n=i(58284),a=i(76508),l=i(76281);class r{constructor(e,t="",i="Trash",n="Trash",l=!0,r=a.nr){this._inner=e,this.rootPath=t,this.trashId=i,this.trashPath=n,this.ensureFolderTrailingSlash=l,this.i18n=r,this._pathToId=new Map,this._idToPath=new Map,this.getUrl=void 0,this.getThumbnailUrl=void 0,this.validateDuplicates=void 0,this.validateDuplicates=this._inner.validateDuplicates,"function"===typeof e.getUrl&&(this.getUrl=t=>e.getUrl({...t,id:this.pathForId(t.id,!1),folderId:t.folderId?this.pathForId(t.folderId,!0):this.rootPath})),"function"===typeof e.getThumbnailUrl&&(this.getThumbnailUrl=t=>e.getThumbnailUrl({...t,id:this.pathForId(t.id,!1),folderId:t.folderId?this.pathForId(t.folderId,!0):this.rootPath})),"function"!==typeof this._inner.deleteItems&&(this.deleteItems=void 0),"function"!==typeof this._inner.deleteItem&&(this.deleteItem=void 0),"function"!==typeof this._inner.moveItems?this.moveItems=void 0:this.moveItem=void 0,"function"!==typeof this._inner.copyItems?this.copyItems=void 0:this.copyItem=void 0,"function"!==typeof this._inner.uploadFiles?this.uploadFiles=void 0:this.uploadFile=void 0,"function"!==typeof this._inner.clearCache&&(this.clearCache=void 0),this._getOrGenerateId(this.rootPath)}setController(e){"function"===typeof this._inner.setController&&this._inner.setController({invalidateItemCache:t=>{const i=t.replace(/^\/+|\/+$/g,""),n=this._pathToId.get(i);n&&e.invalidateItemCache(n)},getCachedItem:t=>{const i=t.replace(/^\/+|\/+$/g,""),n=this._pathToId.get(i);if(n){const t=e.getCachedItem(n);if(t)return{...t,id:this.pathForId(t.id,t.isFolder),folderId:this.pathForId(t.folderId,t.isFolder)}}}})}clearCache(e){if("function"===typeof this._inner.clearCache)return this._inner.clearCache(e)}_getOrGenerateId(e){if(e===this.rootPath)return;const t=e.replaceAll(/^\/+|\/+$/g,"");if(t===this.trashPath.replaceAll(/^\/+|\/+$/g,""))return this.trashId;if(this._pathToId.has(t))return this._pathToId.get(t);const i=(0,n.A)();return this._pathToId.set(t,i),this._idToPath.set(i,t),i}pathForId(e,t,i){const{__:n}=this.i18n;if(""===e||void 0===e)return this.rootPath;if(e===this.trashId)return this.trashPath;let a=this._idToPath.get(e);if(!a){if(i)return`unknown folder ${e}`;{const t=n?n(`Path for id '${e}' not found in mapping`):`Path for id '${e}' not found in mapping`;throw new l.FileManagerApiError(t,"FileNotFound")}}let r=0;for(;r<this.rootPath.length&&"/"===this.rootPath[r];)r++;if(r){let e=0;for(;e<a.length&&"/"===a[e];)e++;const t=a.slice(e);a="/".repeat(r)+t}return t&&this.ensureFolderTrailingSlash&&!a.endsWith("/")&&(a+="/"),a}_updateIdMapping(e,t){const i=t.replace(/^\/+|\/+$/g,""),n=this._idToPath.get(e);n&&this._pathToId.delete(n),this._idToPath.set(e,i),this._pathToId.set(i,e)}async getItems(e){const t=e.folderId?this.pathForId(e.folderId,!0):this.rootPath,i=await this._inner.getItems({...e,folderId:t}),n=i.items.map(e=>{const t=this._getOrGenerateId(e.id),i=e.folderId?this._getOrGenerateId(e.folderId):this._getOrGenerateId(this.rootPath);return{...e,id:t,folderId:i}});return{...i,items:n}}async createFolder(e,t,i){const n=t?this.pathForId(t,!0):this.rootPath,a=await this._inner.createFolder(e,n,i),l=this._getOrGenerateId(a.id),r=a.folderId?this._getOrGenerateId(a.folderId):this._getOrGenerateId(this.rootPath);return{...a,id:l,folderId:r}}async renameItem(e,t){const{__:i}=this.i18n;if("function"!==typeof this._inner.renameItem){const e=i?i("Rename item is not supported by inner storage"):"Rename item is not supported by inner storage";throw new l.FileManagerApiError(e,"RenameNotAllowed")}const n=this.pathForId(e.id,e.isFolder),a=n;let{...r}=await this._inner.renameItem({...e,id:n,folderId:this.pathForId(e.folderId,!0)},t);return this._updateIdMapping(e.id,r.id),e.isFolder&&this.remapCachedFolderContents(e.id,a,r.id),r.folderId&&(r={...r,folderId:this._getOrGenerateId(r.folderId)}),{...r,id:this._getOrGenerateId(r.id)}}async deleteItem(e,t){const{__:i}=this.i18n;if("function"!==typeof this._inner.deleteItem){const e=i?i("Delete item is not supported by inner storage"):"Delete item is not supported by inner storage";throw new l.FileManagerApiError(e,"DeleteNotAllowed")}const n=this.pathForId(e.id,e.isFolder);await this._inner.deleteItem({...e,id:n,folderId:this.pathForId(e.folderId,!0)},t),this.recursivelyRemoveMappings(e.id,n)}async uploadFile(e){const{__:t}=this.i18n;if("function"!==typeof this._inner.uploadFile){const e=t?t("Upload file is not supported by inner storage"):"Upload file is not supported by inner storage";throw new l.FileManagerApiError(e,"UnsupportedOperation")}const i=e.folderId?this.pathForId(e.folderId,!0):this.rootPath,n=await this._inner.uploadFile({...e,folderId:i}),a=this._getOrGenerateId(n.id),r=n.folderId?this._getOrGenerateId(n.folderId):this._getOrGenerateId(this.rootPath);return{...n,id:a,folderId:r}}async uploadFiles(e){var t,i,n,a,l;const r=e.folderId,o=null!==(t=null===(i=e.items)||void 0===i?void 0:i.map(e=>e.folderId))&&void 0!==t?t:[],s=e.folderId?this.pathForId(e.folderId,!0):this.rootPath,c={...e,folderId:s,items:null!==(n=null===(a=e.items)||void 0===a?void 0:a.map(e=>({...e,folderId:e.folderId?this.pathForId(e.folderId,!0):s})))&&void 0!==n?n:[]},d=await this._inner.uploadFiles(c);return{...d,detailed:null===(l=d.detailed)||void 0===l?void 0:l.map((e,t)=>{var i,n;if(null===e||void 0===e||!e.data)return e;const a=e.data.id?this._getOrGenerateId(e.data.id):void 0,l=e.data.folderId?this._getOrGenerateId(e.data.folderId):null!==(i=null!==(n=o[t])&&void 0!==n?n:r)&&void 0!==i?i:this._getOrGenerateId(this.rootPath);return{...e,data:{...e.data,id:a,folderId:l}}})}}async findFileByUrl(e,t){const i=t?this.pathForId(t,!0):this.rootPath;if("function"===typeof this._inner.findFileByUrl){const t=await this._inner.findFileByUrl(e,i);if(!t)return;const n=this._getOrGenerateId(t.id),a=t.folderId?this._getOrGenerateId(t.folderId):this._getOrGenerateId(this.rootPath);return{...t,id:n,folderId:a}}}async uploadFileByUrl(e,t,i){const n=t?this.pathForId(t,!0):this.rootPath,a=await this._inner.uploadFileByUrl(e,n,i),l=this._getOrGenerateId(a.id),r=a.folderId?this._getOrGenerateId(a.folderId):this._getOrGenerateId(this.rootPath);return{...a,id:l,folderId:r}}async moveItem(e,t){const{__:i}=this.i18n;if("function"!==typeof this._inner.moveItem){const e=i?i("Move item is not supported by inner storage"):"Move item is not supported by inner storage";throw new l.FileManagerApiError(e,"MoveNotAllowed")}const n=this.pathForId(e.id,e.isFolder),a=this.pathForId(t,!0),r=await this._inner.moveItem({...e,id:n,folderId:this.pathForId(e.folderId,!0)},a);this._updateIdMapping(e.id,r.id),e.isFolder&&this.remapCachedFolderContents(e.id,n,r.id);const o=this._getOrGenerateId(r.id),s=r.folderId?this._getOrGenerateId(r.folderId):t;return{...r,id:o,folderId:s}}async moveItems(e,t){const{__:i}=this.i18n;if("function"!==typeof this._inner.moveItems){const e=i?i("Move items is not supported by inner storage"):"Move items is not supported by inner storage";throw new l.FileManagerApiError(e,"MoveNotAllowed")}const n=t?this.pathForId(t,!0):this.rootPath,a=e.map(e=>({...e,id:this.pathForId(e.id,e.isFolder),folderId:e.folderId?this.pathForId(e.folderId,!0):this.rootPath})),r=await this._inner.moveItems(a,n),o=[];if(r.detailed&&r.detailed.length>0){const n=new Map;for(let t=0;t<r.detailed.length;t++){const i=r.detailed[t],a=i.requestId||(t<e.length?e[t].id:void 0);a&&n.set(a,i)}for(const a of e){const l=n.get(a.id)||(r.detailed.length===e.length?r.detailed[e.indexOf(a)]:void 0);if(null!==l&&void 0!==l&&l.success&&l.data){if(this._updateIdMapping(a.id,l.data.id),a.isFolder){const e=this.pathForId(a.id,a.isFolder);this.remapCachedFolderContents(a.id,e,l.data.id)}o.push({requestId:a.id,success:!0,data:{...l.data,id:this._getOrGenerateId(l.data.id),folderId:l.data.folderId?this._getOrGenerateId(l.data.folderId):t||this._getOrGenerateId(this.rootPath)}})}else{const e=i?i("Move operation failed - no detailed result"):"Move operation failed - no detailed result";o.push({requestId:a.id,success:!1,error:(null===l||void 0===l?void 0:l.error)||{message:e,code:"MoveNotAllowed"}})}}}else for(const l of e){const e=i?i("Move operation failed - no detailed results"):"Move operation failed - no detailed results";o.push({requestId:l.id,success:!1,error:{message:e,code:"MoveNotAllowed"}})}return{success:r.success,detailed:o,error:r.error}}async copyItems(e,t){const{__:i}=this.i18n;if("function"!==typeof this._inner.copyItems){const e=i?i("Copy items is not supported by inner storage"):"Copy items is not supported by inner storage";throw new l.FileManagerApiError(e,"CopyNotAllowed")}const n=t?this.pathForId(t,!0):this.rootPath,a=e.map(e=>({...e,id:this.pathForId(e.id,e.isFolder),folderId:e.folderId?this.pathForId(e.folderId,!0):this.rootPath})),r=await this._inner.copyItems(a,n),o=[];if(r.detailed&&r.detailed.length>0){const n=new Map;for(let t=0;t<r.detailed.length;t++){const i=r.detailed[t],a=i.requestId||(t<e.length?e[t].id:void 0);a&&n.set(a,i)}for(const a of e){var s;const l=n.get(a.id)||(r.detailed.length===e.length?r.detailed[e.indexOf(a)]:void 0);if(null!==l&&void 0!==l&&l.success&&null!==(s=l.data)&&void 0!==s&&s.id){const e=this._getOrGenerateId(l.data.id);o.push({requestId:a.id,success:!0,data:{...l.data,id:e,folderId:l.data.folderId?this._getOrGenerateId(l.data.folderId):t||this._getOrGenerateId(this.rootPath)}})}else{const e=l?l.success?l.data?l.data.id?{message:i?i("Unknown copy error"):"Unknown copy error",code:"CopyNotAllowed"}:{message:i?i("No ID in copied item data"):"No ID in copied item data",code:"CopyNotAllowed"}:{message:i?i("No data returned from copy operation"):"No data returned from copy operation",code:"CopyNotAllowed"}:l.error||{message:i?i("Copy operation failed"):"Copy operation failed",code:"CopyNotAllowed"}:{message:i?i("No detailed result from copy operation"):"No detailed result from copy operation",code:"CopyNotAllowed"};o.push({requestId:a.id,success:!1,error:e})}}}else for(const l of e){const e=i?i("No detailed results from copy operation"):"No detailed results from copy operation";o.push({requestId:l.id,success:!1,error:{message:e,code:"CopyNotAllowed"}})}const c=o.every(e=>e.success),d=i?i("Copy operation completed with errors"):"Copy operation completed with errors";return{success:c,detailed:o,error:c?void 0:r.error||{message:d,code:"CopyNotAllowed"}}}async deleteItems(e,t){const{__:i}=this.i18n;if("function"!==typeof this._inner.deleteItems){const e=i?i("Delete items is not supported by inner storage"):"Delete items is not supported by inner storage";throw new l.FileManagerApiError(e,"DeleteNotAllowed")}const n=e.map(e=>({...e,id:this.pathForId(e.id,e.isFolder),folderId:e.folderId?this.pathForId(e.folderId,!0):this.rootPath})),a=await this._inner.deleteItems(n,t),r=[];if(a.detailed&&a.detailed.length>0){const n=new Map;for(let t=0;t<a.detailed.length;t++){const i=a.detailed[t],l=i.requestId||(t<e.length?e[t].id:void 0);l&&n.set(l,i)}for(const l of e){const o=n.get(l.id)||(a.detailed.length===e.length?a.detailed[e.indexOf(l)]:void 0);if(null!==o&&void 0!==o&&o.success){const e=this.pathForId(l.id,l.isFolder);if(t.permanent)this.recursivelyRemoveMappings(l.id,e);else if(this._updateIdMapping(l.id,this.trashPath+"/"+e+(l.isFolder?"/":"")),l.isFolder){const t=this.pathForId(l.id,l.isFolder);this.remapCachedFolderContents(l.id,t,this.trashPath+"/"+e+(l.isFolder?"/":""))}r.push({requestId:l.id,success:!0})}else{const e=i?i("Delete operation failed"):"Delete operation failed";r.push({requestId:l.id,success:!1,error:(null===o||void 0===o?void 0:o.error)||{message:e,code:"DeleteNotAllowed"}})}}}else for(const l of e)if(a.success){const e=this.pathForId(l.id,l.isFolder);if(t.permanent)this.recursivelyRemoveMappings(l.id,e);else if(this._updateIdMapping(l.id,this.trashPath+"/"+e+(l.isFolder?"/":"")),l.isFolder){const t=this.pathForId(l.id,l.isFolder);this.remapCachedFolderContents(l.id,t,this.trashPath+"/"+e+(l.isFolder?"/":""))}r.push({requestId:l.id,success:!0})}else{const e=i?i("Delete operation failed"):"Delete operation failed";r.push({requestId:l.id,success:!1,error:a.error||{message:e,code:"DeleteNotAllowed"}})}const o=r.every(e=>e.success),s=i?i("Some items failed to delete"):"Some items failed to delete";return{success:o,detailed:r,error:o?void 0:a.error||{message:s,code:"DeleteNotAllowed"}}}remapCachedFolderContents(e,t,i){const n=t.replace(/\/+$/,""),a=i.replace(/\/+$/,""),l=[];for(const[r,o]of this._idToPath.entries()){const e=o.replace(/\/+$/,"");e!==n&&e.startsWith(n+"/")&&l.push({id:r,oldPath:e})}for(const{id:r,oldPath:o}of l){const e=a+o.substring(n.length);this._updateIdMapping(r,e)}}recursivelyRemoveMappings(e,t){const i=t.replace(/\/+$/,""),n=[],a=[];for(const[l,r]of this._idToPath.entries()){const e=r.replace(/\/+$/,"");(e===i||e.startsWith(i+"/"))&&(n.push(l),a.push(e))}for(let l=0;l<n.length;l++)this._idToPath.delete(n[l]),this._pathToId.delete(a[l])}async copyItem(e,t){const{__:i}=this.i18n;if("function"!==typeof this._inner.copyItem){const e=i?i("Copy item is not supported by inner storage"):"Copy item is not supported by inner storage";throw new l.FileManagerApiError(e,"CopyNotAllowed")}const n=this.pathForId(e.id,e.isFolder),a=this.pathForId(t,!0),r=await this._inner.copyItem({...e,id:n,folderId:this.pathForId(e.folderId,!0)},a),o=this._getOrGenerateId(r.id),s=r.folderId?this._getOrGenerateId(r.folderId):t;return{...r,id:o,folderId:s}}async updateFile(e,t){const{__:i}=this.i18n;if("function"!==typeof this._inner.updateFile){const e=i?i("Update file is not supported by inner storage"):"Update file is not supported by inner storage";throw new l.FileManagerApiError(e,"UnsupportedOperation")}const n=this.pathForId(e.id,!1);let{...a}=await this._inner.updateFile({...e,id:n,folderId:this.pathForId(e.folderId,!0)},t);return this._updateIdMapping(e.id,a.id),a.folderId&&(a={...a,folderId:this._getOrGenerateId(a.folderId)}),{...a,id:this._getOrGenerateId(a.id)}}async getFileData(e,t){const{__:i}=this.i18n,n=this.pathForId(e.id,!1);if("function"===typeof this._inner.getFileData)return this._inner.getFileData({...e,id:n,folderId:this.pathForId(e.folderId,!0)},t);const a=e.url||("function"===typeof this.getUrl?await this.getUrl(e):void 0);if(!a){const e=i?i("Cannot get file data: no url and no inner.getFileData"):"Cannot get file data: no url and no inner.getFileData";throw new l.FileManagerApiError(e,"FileReadError")}return fetch(a,null!==t&&void 0!==t&&t.forceReload?{cache:"no-store"}:void 0).then(e=>e.blob())}async cleanTrash(){const{__:e}=this.i18n;if("function"!==typeof this._inner.cleanTrash){const t=e?e("Clean trash is not supported by inner storage"):"Clean trash is not supported by inner storage";throw new l.FileManagerApiError(t,"UnsupportedOperation")}return await this._inner.cleanTrash()}}},20736:(e,t,i)=>{"use strict";i.d(t,{mK:()=>l,vp:()=>h});const n="\x1e";class a{constructor(){this.map=new Map}static childrenViewKey(e,t){return`v${n}${e}${n}${t}`}static childrenCountKey(e){return`c${n}${e}`}getFreshError(e,t){const i=this.map.get(e);return i?t!==1/0&&Date.now()-i.updatedAt>t?(this.map.delete(e),null):i.error:null}setError(e,t){this.map.set(e,{error:t,updatedAt:Date.now()})}delete(e){this.map.delete(e)}clearChildrenViewErrorsForParent(e){const t=`v${n}${e}${n}`;for(const i of[...this.map.keys()])i.startsWith(t)&&this.map.delete(i)}clearAll(){this.map.clear()}}const l=18e5;function r(e){return null==e||""===e?"":e}function o(e){if(null==e)return 1/0;const t=Number(e);return Number.isFinite(t)&&t>=0?t:1/0}function s(e){if(!e)return null;const t=e.folderId;return null==t?null:String(t)}function c(e){return!!e&&e.isFolder}function d(){var e;if("function"===typeof(null===globalThis||void 0===globalThis||null===(e=globalThis.crypto)||void 0===e?void 0:e.randomUUID))return globalThis.crypto.randomUUID();try{const e=globalThis.crypto||globalThis.msCrypto;if(e&&"function"===typeof e.getRandomValues){const t=new Uint8Array(16);e.getRandomValues(t);let i="";for(let e=0;e<t.length;e++)i+=t[e].toString(16).padStart(2,"0");return`id_${i}`}}catch{}return`id_fallback_${Date.now().toString(36)}_${Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(36).slice(0,8)}`}function m(e){if(!e||"object"!==typeof e)return String(null!==e&&void 0!==e?e:"");const t=e,i=[],n={},a=["page","pageSize","sortBy","sortOrder","search","itemType","limit"];for(const s of Object.keys(t).sort()){const e=t[s];a.includes(s)?i.push(`${s}=${String(null!==e&&void 0!==e?e:"")}`):n[s]=e}const l=Object.keys(n).length?JSON.stringify(n):"",r=i.join("|"),o=l?function(e){let t=2166136261;for(let i=0;i<e.length;i++)t^=e.charCodeAt(i),t=t+((t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24))>>>0;return t.toString(36)}(l):"";return`${r}${o?`|${o}`:""}`}class u{constructor(){this.entities=new Map,this.childrenByParent=new Map,this.maxCacheSize=1e4}now(){return Date.now()}checkCacheSize(){if(this.entities.size>this.maxCacheSize){const e=Array.from(this.entities.entries()).sort((e,t)=>e[1].updatedAt-t[1].updatedAt),t=Math.floor(.1*this.maxCacheSize);for(let i=0;i<t&&i<e.length;i++){const[t,n]=e[i];this.deleteEntityById(t)}}}getEntity(e){var t;return null===(t=this.entities.get(e))||void 0===t?void 0:t.value}getRecord(e){return this.entities.get(e)}getFileSystemItem(e){const t=this.getEntity(e);return t&&!c(t)?t:void 0}getFolder(e){const t=this.getEntity(e);return t&&c(t)?t:void 0}getChildrenIds(e,t={}){const i=r(e),n=this.childrenByParent.get(i);return n?t.onlyFileSystemItems?Array.from(n.files):t.onlyFolders?Array.from(n.folders):[...Array.from(n.folders),...Array.from(n.files)]:[]}searchByUrl(e){for(const t of this.entities.values())if(t.value.url===e)return t.value;return null}upsertEntity(e){var t;const i=null!==(t=this.entities.get(e.id))&&void 0!==t?t:null,n=i?i.value:null,a=n?s(n):null,l=s(e),o=!!n&&c(n),d=c(e);let m;if(n&&c(n)&&d){const t=n.childrenCount,i=e.childrenCount;void 0!==t&&void 0===i&&(m=t)}if(n&&(a!==l||o!==d)){const t=r(a),i=this.childrenByParent.get(t);i&&(o?i.folders.delete(e.id):i.files.delete(e.id),0===i.files.size&&0===i.folders.size&&this.childrenByParent.delete(t))}let u=e;void 0!==m&&(u={...e,childrenCount:m}),this.entities.set(e.id,{value:{...u},updatedAt:this.now()}),this.checkCacheSize();const p=r(l);let h=this.childrenByParent.get(p);h||(h={files:new Set,folders:new Set},this.childrenByParent.set(p,h)),d?h.folders.add(e.id):h.files.add(e.id)}updateServerChildrenCount(e,t){if(null==e||null==t||Number.isNaN(t))return;const i=this.entities.get(e);if(!i||!c(i.value))return;const n={...i.value,childrenCount:t};this.entities.set(e,{value:n,updatedAt:this.now()})}deleteEntityById(e){var t;const i=null!==(t=this.entities.get(e))&&void 0!==t?t:null;if(!i)return{entity:null,parentId:null};const n=i.value,a=s(n),l=r(a),o=this.childrenByParent.get(l);return o&&(c(n)?o.folders.delete(e):o.files.delete(e),0===o.files.size&&0===o.folders.size&&this.childrenByParent.delete(l)),this.entities.delete(e),{entity:{...n},parentId:a}}deleteFolderRecursive(e){const t=this.entities.get(e);if(!t||!c(t.value))return{deletedFolderRecords:[],deletedFileSystemItemRecords:[]};const i=[{id:e,parentId:s(t.value)}],n=[],a=[];for(;i.length;){const e=i.shift();n.push(e);const t=this.childrenByParent.get(r(e.id));if(t){for(const e of Array.from(t.folders)){const t=this.entities.get(e);t&&i.push({id:e,parentId:s(t.value)})}for(const e of Array.from(t.files))a.push(e)}}const l=[];for(const c of a){const e=this.entities.get(c);if(!e)continue;const t=e.value,i=r(s(t)),n=this.childrenByParent.get(i);n&&(n.files.delete(c),0===n.files.size&&0===n.folders.size&&this.childrenByParent.delete(i)),this.entities.delete(c),l.push({...t})}const o=[];for(let s=n.length-1;s>=0;s--){const{id:e,parentId:t}=n[s],i=this.entities.get(e);if(!i)continue;const a=i.value,l=r(a.id);this.childrenByParent.delete(l);const c=r(t),d=this.childrenByParent.get(c);d&&(d.folders.delete(e),0===d.files.size&&0===d.folders.size&&this.childrenByParent.delete(c)),this.entities.delete(e),o.push({...a})}return{deletedFolderRecords:o,deletedFileSystemItemRecords:l}}moveEntityById(e,t){var i;const n=null!==(i=this.entities.get(e))&&void 0!==i?i:null;if(!n)return null;const a=n.value,l=r(s(a)),o=this.childrenByParent.get(l);o&&(c(a)?o.folders.delete(e):o.files.delete(e),0===o.files.size&&0===o.folders.size&&this.childrenByParent.delete(l));const d={...a,folderId:t};if(c(a)&&c(d)){const e=a.childrenCount;void 0!==e&&(d.childrenCount=e)}this.entities.set(e,{value:d,updatedAt:this.now()});const m=r(t);let u=this.childrenByParent.get(m);return u||(u={files:new Set,folders:new Set},this.childrenByParent.set(m,u)),c(d)?u.folders.add(e):u.files.add(e),{...d}}copyFileSystemItem(e,t,i){var n;const a=null!==(n=this.entities.get(e))&&void 0!==n?n:null;if(!a||c(a.value))return null;const l={...a.value,id:t,folderId:i};return this.upsertEntity(l),{...l}}copyFolderShallow(e,t,i){var n;const a=null!==(n=this.entities.get(e))&&void 0!==n?n:null;if(!a||!c(a.value))return null;const l={...a.value,id:t,folderId:i};return this.upsertEntity(l),{...l}}isEntityStale(e,t){var i;const n=null!==(i=this.entities.get(e))&&void 0!==i?i:null;return!n||t!==1/0&&this.now()-n.updatedAt>t}touch(e,t){const i=this.entities.get(e);i&&(i.updatedAt=null!==t&&void 0!==t?t:this.now())}getEntitiesByIds(e){return e.map(e=>{var t,i;return null!==(t=null===(i=this.entities.get(e))||void 0===i?void 0:i.value)&&void 0!==t?t:null})}searchByName(e,t){var i,n,a,l;if(!e||""===e.trim())return[];const o=null===t||void 0===t?void 0:t.parentId,d=null!==(i=null===t||void 0===t?void 0:t.recursive)&&void 0!==i&&i,m=null!==(n=null===t||void 0===t?void 0:t.itemType)&&void 0!==n?n:"all",u=null!==(a=null===t||void 0===t?void 0:t.caseSensitive)&&void 0!==a&&a,p=null!==(l=null===t||void 0===t?void 0:t.limit)&&void 0!==l?l:1/0,h=u?e.trim():e.trim().toLowerCase(),g=[];let f=null;if(void 0!==o){f=new Set;const e=r(o);if(f.add(e),d){const t=[e],i=new Set;for(;t.length>0;){const e=t.shift();if(i.has(e))continue;i.add(e);const n=this.childrenByParent.get(e);if(n)for(const i of n.folders)f.add(i),t.push(i)}}}for(const[,b]of this.entities){var v;if(g.length>=p)break;const e=b.value;if(null!==f){const t=r(s(e));if(!f.has(t))continue}if("file"===m&&c(e))continue;if("folder"===m&&!c(e))continue;const t=null!==(v=e.name)&&void 0!==v?v:"";(u?t:t.toLowerCase()).includes(h)&&g.push({...e})}return g}toJSON(){return{entities:Array.from(this.entities.entries()),childrenByParent:Array.from(this.childrenByParent.entries()).map(([e,t])=>[e,{files:Array.from(t.files),folders:Array.from(t.folders)}])}}static fromJSON(e){const t=new u;for(const[a,l]of null!==(i=e.entities)&&void 0!==i?i:[]){var i;t.entities.set(a,{value:l.value,updatedAt:l.updatedAt})}for(const[a,l]of null!==(n=e.childrenByParent)&&void 0!==n?n:[]){var n;t.childrenByParent.set(a,{files:new Set(l.files),folders:new Set(l.folders)})}return t}}class p{constructor(e={},t=l,i,n,r=new a){var o,s,c,d,m;this.views=new Map,this.strategy=void 0,this.ttl=void 0,this.errorTtl=void 0,this.entityTtl=void 0,this.failedRequests=void 0,this.serverChildrenCountHandler=void 0,this.childrenCountInvalidator=void 0,this.maxViewsPerParent=50,this.strategy={allowSortedInsert:null===(o=e.allowSortedInsert)||void 0===o||o,allowSearchInsert:null===(s=e.allowSearchInsert)||void 0===s||s,invalidateOnPaginationFull:null===(c=e.invalidateOnPaginationFull)||void 0===c||c,preloadPagesBefore:null!==(d=e.preloadPagesBefore)&&void 0!==d?d:0,preloadPagesAfter:null!==(m=e.preloadPagesAfter)&&void 0!==m?m:1,comparator:e.comparator,filterMatch:e.filterMatch},this.ttl=t,this.errorTtl=null!==i&&void 0!==i?i:t,this.entityTtl=null!==n&&void 0!==n?n:t,this.failedRequests=r}setServerChildrenCountHandler(e){this.serverChildrenCountHandler=e}setChildrenCountInvalidator(e){this.childrenCountInvalidator=e}now(){return Date.now()}parentKey(e){return r(null!==e&&void 0!==e?e:null)}isExpired(e){return null==e||this.ttl!==1/0&&this.now()-e>this.ttl}areEntitiesStale(e,t){return!e||e.some(e=>!t.getEntity(e)||t.isEntityStale(e,this.entityTtl))}isEntityTypeCompatible(e,t){return!t||"all"===t||("file"===t&&!c(e)||!("folder"!==t||!c(e)))}cleanupOldViews(e){if(e.size<=this.maxViewsPerParent)return;const t=Array.from(e.entries()).sort((e,t)=>(t[1].view.updatedAt||0)-(e[1].view.updatedAt||0));for(;e.size>this.maxViewsPerParent&&t.length>0;){const[i]=t.pop();e.delete(i)}}async getOrCreateChildren(e,t,i,n){var l;const r=this.parentKey(e),s=m(null!==t&&void 0!==t?t:{});let c=this.views.get(r);c||(c=new Map,this.views.set(r,c));const u=a.childrenViewKey(r,s);let p=c.get(s);if(!p){p={params:t,view:{promise:null,value:void 0,meta:void 0,updatedAt:0,loadId:null}},c.set(s,p),this.cleanupOldViews(c)}const h=this.failedRequests.getFreshError(u,this.errorTtl);if(null!=h)throw h;if(p.view.value&&!this.isExpired(p.view.updatedAt)&&!this.areEntitiesStale(p.view.value,n)&&(null===(l=p.view.meta)||void 0===l||!l.stale)){var g,f;const e=p.view.value.map(e=>n.getEntity(e)).filter(Boolean),t=(null===(g=p.params)||void 0===g?void 0:g.itemType)||"all";return{items:e.filter(e=>this.isEntityTypeCompatible(e,t)),...null!==(f=p.view.meta)&&void 0!==f?f:{}}}if(p.view.promise)return p.view.promise;const v=d();p.view.loadId=v;const b=(async()=>{try{var a,l,s;const d=await i(e,t),h=function(e){return!!e&&"string"===typeof e.search&&e.search.trim().length>0}(t),g=h?{...d,total:void 0}:d,f=null===(a=this.views.get(r))||void 0===a?void 0:a.get(m(t));if(!f||f.view.loadId!==v){const e=new Error("StaleLoad");throw e.name="StaleLoad",e}for(const e of g.items)n.upsertEntity(e);p.view.value=g.items.map(e=>e.id);const{items:b,...y}=g,E={...y};p.view.meta=E,p.view.meta.stale=!1,this.failedRequests.delete(u),p.view.updatedAt=this.now(),h||"number"!==typeof E.total||(this.serverChildrenCountHandler?this.serverChildrenCountHandler(null!==e&&void 0!==e?e:null,E.total,n):n.updateServerChildrenCount(e,E.total));const _=null!==(l=this.strategy.preloadPagesAfter)&&void 0!==l?l:0,w=null!==(s=this.strategy.preloadPagesBefore)&&void 0!==s?s:0,C=o(null===t||void 0===t?void 0:t.pageSize),k=Number.isFinite(C);if((_>0||w>0)&&k){var c;const a=e,l={...t},r="number"===typeof E.totalPages?E.totalPages:1,o=null!==(c=null===t||void 0===t?void 0:t.page)&&void 0!==c?c:1,s=C,d=i,m=v;setTimeout(()=>{this.preloadPagesAsync(a,l,o,r,s,_,w,n,E,d,m)},0)}return g}catch(b){var d,h,g,f;if("StaleLoad"===(null===b||void 0===b?void 0:b.name))throw this.failedRequests.delete(u),p.view.value=void 0,p.view.updatedAt=this.now(),b;const e=b,t=null!==(d=null===e||void 0===e?void 0:e.status)&&void 0!==d?d:null===e||void 0===e||null===(h=e.data)||void 0===h?void 0:h.status,i=null!==(g=null===e||void 0===e?void 0:e.code)&&void 0!==g?g:null===e||void 0===e||null===(f=e.data)||void 0===f?void 0:f.code;if(404===t||"FileNotFound"===i||"FolderNotFound"===i||"path_folder_not_found"===i)return this.failedRequests.delete(u),p.view.value=[],p.view.meta={total:0,totalPages:0},p.view.updatedAt=this.now(),{items:[],total:0,totalPages:0};throw this.failedRequests.setError(u,b),p.view.value=void 0,p.view.updatedAt=this.now(),b}finally{p.view.promise=null}})();return p.view.promise=b,b}async preloadPagesAsync(e,t,i,n,a,l,r,o,s,c,d){try{const a=this.parentKey(e),s=this.views.get(a);if(!s)return;const u=s.get(m(t));if(!u)return;if(null!=d&&u.view.loadId!==d)return;const p=s.get(m(t));if(null===p||void 0===p||!p.view.meta)return;const h="number"===typeof p.view.meta.totalPages?p.view.meta.totalPages:1;if(h!==n)return;const g=async i=>{const n={...t,page:i};try{const l=await c(e,n),r=this.views.get(a);if(!r)return;const s=r.get(m(t));if(!s)return;if(null!=d&&s.view.loadId!==d)return;if(s.view.loadId!==d)return;for(const e of l.items)o.upsertEntity(e);const u=m(n);let p=r.get(u);if(!p){p={params:n,view:{promise:null,value:void 0,meta:void 0,updatedAt:0,loadId:s.view.loadId}},r.set(u,p),this.cleanupOldViews(r)}if(!p.view.value||this.isExpired(p.view.updatedAt)){p.view.value=l.items.map(e=>e.id);const{items:e,...t}=l;p.view.meta={...t,page:i,totalPages:h},p.view.updatedAt=this.now()}}catch(l){}};if(l>0&&i<h)for(let e=1;e<=Math.min(l,h-i);e++){const n=i+e,a=m({...t,page:n}),l=s.get(a);null!==l&&void 0!==l&&l.view.value&&!this.isExpired(l.view.updatedAt)||g(n)}if(r>0&&i>1)for(let e=1;e<=Math.min(r,i-1);e++){const n=i-e,a=m({...t,page:n}),l=s.get(a);null!==l&&void 0!==l&&l.view.value&&!this.isExpired(l.view.updatedAt)||g(n)}}catch(u){}}removeEmptyPageIfNeeded(e,t,i,n,a){if(t.view.value&&0===t.view.value.length&&i<n){const t=m({...a,page:i});e.delete(t)}}updateTotalPagesForAllViews(e,t){for(const[,i]of e)i.view.meta&&(i.view.meta.totalPages=t)}isParamsSame(e,t){const i=Object.keys(null!==e&&void 0!==e?e:{}).filter(e=>"page"!==e).sort(),n=Object.keys(null!==t&&void 0!==t?t:{}).filter(e=>"page"!==e).sort();if(i.length!==n.length)return!1;for(let a=0;a<i.length;a++){const l=i[a];if(l!==n[a])return!1;if(e[l]!==t[l])return!1}return!0}syncTotalsInSameViews(e,t){var i;const n=t.view.meta;if(!n||"number"!==typeof n.total)return;const a=Number(n.total),l=o(null===(i=t.params)||void 0===i?void 0:i.pageSize),r=Number.isFinite(l)&&l>0?Math.max(1,Math.ceil(a/l)):void 0;for(const[,o]of e){var s,c;this.isParamsSame(null!==(s=o.params)&&void 0!==s?s:{},null!==(c=t.params)&&void 0!==c?c:{})&&(o.view.meta||(o.view.meta={}),o.view.meta.total=a,void 0!==r&&(o.view.meta.totalPages=r))}}canSafelyModifySortedView(e){return!e.sortBy&&!e.sortOrder||!!this.strategy.comparator}cascadeShiftPages(e,t,i,n,a,l,r){let o=t,s=i,c=!1;let d=0;for(;o.view.value&&o.view.value.length<n&&s<a&&d<100;){d++;const t=m({...r,page:s+1}),i=e.get(t);if(null===i||void 0===i||!i.view.value||this.isExpired(i.view.updatedAt)){var u;o.view.meta={...null!==(u=o.view.meta)&&void 0!==u?u:{},stale:!0};break}const a=n-o.view.value.length,h=i.view.value.slice(0,a).filter(e=>l.getEntity(e));if(0===h.length){var p;o.view.meta={...null!==(p=o.view.meta)&&void 0!==p?p:{},stale:!0};break}if(o.view.value=[...o.view.value,...h],o.view.updatedAt=Date.now(),i.view.value=i.view.value.slice(h.length),i.view.updatedAt=Date.now(),0===i.view.value.length){const t=s+1,n=i.view.meta;if(t<(n&&"number"===typeof n.totalPages?n.totalPages:1)){const i=m({...r,page:t});e.delete(i),c=!0}break}o=i,s++}var h;(!o.view.value||o.view.value.length<n)&&s>=a&&(o.view.meta={...null!==(h=o.view.meta)&&void 0!==h?h:{},stale:!0});return c}cascadeShiftToNextPage(e,t,i,n,a,l,r){var o,s;if(!t.view.value||t.view.value.length<=n)return!1;var c;if(i-(r.page||1)>=10)return t.view.meta={...null!==(c=t.view.meta)&&void 0!==c?c:{},stale:!0},!1;const d={...r,page:i+1},u=m(d);let p=e.get(u),h=!1;if(null===(o=p)||void 0===o||!o.view.value||this.isExpired(p.view.updatedAt)){var g;if(!(i>=a))return t.view.meta={...null!==(g=t.view.meta)&&void 0!==g?g:{},stale:!0},!1;{p={params:d,view:{promise:null,value:void 0,meta:void 0,updatedAt:0,loadId:null}},e.set(u,p),this.cleanupOldViews(e);const n=t.view.meta;n&&(p.view.meta={...n,page:i+1}),h=!0}}const f=t.view.value.slice(n).filter(e=>l.getEntity(e));if(0===f.length)return h&&e.delete(u),!1;t.view.value=t.view.value.slice(0,n),t.view.updatedAt=Date.now(),p.view.value=[...f,...null!==(s=p.view.value)&&void 0!==s?s:[]],p.view.updatedAt=Date.now();const v=p.view.meta&&"number"===typeof p.view.meta.totalPages?p.view.meta.totalPages:a;if(!h){if(this.cascadeShiftToNextPage(e,p,i+1,n,v,l,r))return!0}if(!p.view.value||0===p.view.value.length){const t=i+1,n=p.view.meta,a=n&&"number"===typeof n.totalPages?n.totalPages:1;this.removeEmptyPageIfNeeded(e,p,t,a,r)}return h}tryInsertSorted(e,t,i){var n;const a=this.strategy.comparator;if(!a)return!1;if(!e.view.value)return!1;const l=(null===(n=e.params)||void 0===n?void 0:n.itemType)||"all";if(!this.isEntityTypeCompatible(t,l))return!1;const r=e.view.value.map(e=>i.getEntity(e));if(r.some(e=>!e))return!1;let o=0,s=r.length;for(;o<s;){const i=Math.floor((o+s)/2),n=a(t,r[i],e.params);if("number"!==typeof n||Number.isNaN(n))return!1;n>=0?o=i+1:s=i}return e.view.value.includes(t.id)?(e.view.updatedAt=this.now(),!0):(e.view.value=[...e.view.value.slice(0,o),t.id,...e.view.value.slice(o)],e.view.updatedAt=this.now(),e.view.meta&&"number"===typeof e.view.meta.total&&(e.view.meta.total=Number(e.view.meta.total)+1),!0)}updateChildrenCountForOperation(e,t,i,n){var a,l,r,o;const c=s(t);switch(e){case"delete":this.adjustChildrenCount(n,c,-1),null===(a=this.childrenCountInvalidator)||void 0===a||a.call(this,c);break;case"insert":case"copy":this.adjustChildrenCount(n,c,1),null===(l=this.childrenCountInvalidator)||void 0===l||l.call(this,c);break;case"move":this.adjustChildrenCount(n,i,-1),this.adjustChildrenCount(n,c,1),null===(r=this.childrenCountInvalidator)||void 0===r||r.call(this,i),null===(o=this.childrenCountInvalidator)||void 0===o||o.call(this,c)}}adjustChildrenCount(e,t,i){if(!t)return;const n=e.getFolder(t);if(n&&"number"===typeof n.childrenCount){const a=Math.max(0,n.childrenCount+i);e.updateServerChildrenCount(t,a)}}smartInvalidateChildrenViews(e,t,i,n,a,l){if(!t)return;this.updateChildrenCountForOperation(i,t,a,n);const r=this.parentKey(e),s=this.views.get(r);if(s)for(const[,h]of s){var c,m;const e=null!==(c=h.params)&&void 0!==c?c:{},l=null!==(m=null===e||void 0===e?void 0:e.page)&&void 0!==m?m:1,r=o(null===e||void 0===e?void 0:e.pageSize),g=Number.isFinite(r),f=!!(null!==e&&void 0!==e&&e.sortBy||null!==e&&void 0!==e&&e.sortOrder),v=!(null===e||void 0===e||!e.search),b=(null===e||void 0===e?void 0:e.itemType)||"all";if(!this.isEntityTypeCompatible(t,b))continue;if(v&&this.strategy.filterMatch&&!this.strategy.filterMatch(t,h.params)){var u;null!==(u=h.view.value)&&void 0!==u&&u.includes(t.id)&&(h.view.value=h.view.value.filter(e=>e!==t.id),h.view.meta&&"number"===typeof h.view.meta.total&&(h.view.meta.total=Math.max(0,h.view.meta.total-1)),h.view.updatedAt=Date.now());continue}if(!h.view.value){h.view.meta&&(h.view.meta.stale=!0),h.view.loadId=d(),h.view.abortController&&(h.view.abortController.abort(),h.view.abortController=void 0);continue}h.view.value.includes(t.id);var p;if(this.shouldInvalidateCompletely(h,i,t,f,g,l))h.view.meta={...null!==(p=h.view.meta)&&void 0!==p?p:{},stale:!0},h.view.loadId=d(),h.view.abortController&&(h.view.abortController.abort(),h.view.abortController=void 0);else switch(i){case"delete":this.handleDelete(s,h,l,r,g,t,n);break;case"insert":case"copy":this.handleInsert(s,h,l,r,g,f,t,n);break;case"update":this.handleUpdate(s,h,l,r,g,f,v,t,n);break;case"move":this.handleMove(s,h,l,r,g,f,t,a,n)}}}shouldInvalidateCompletely(e,t,i,n,a,l){return!(!(a&&l>1)||"insert"!==t&&"delete"!==t&&"move"!==t)||(!(!n||this.strategy.comparator||"insert"!==t&&"move"!==t)||!!this.isExpired(e.view.updatedAt))}tryReinsertEntity(e,t,i,n,a){var l,r;const o=(null===(l=e.params)||void 0===l?void 0:l.itemType)||"all";if(!this.isEntityTypeCompatible(t,o))return!1;if(this.strategy.comparator&&this.strategy.filterMatch){if(!this.strategy.filterMatch(t,e.params))return!1;if(this.tryInsertSorted(e,t,i))return!0}const s=null!==(r=e.params)&&void 0!==r?r:{};return!(!(!s.sortBy&&!s.sortOrder)&&!this.canSafelyModifySortedView(s))&&((!n||e.view.value.length<a)&&(e.view.value.push(t.id),!0))}handleDelete(e,t,i,n,a,l,r){const o=t.view.value.includes(l.id);if(o&&(t.view.value=t.view.value.filter(e=>e!==l.id)),t.view.meta&&"number"===typeof t.view.meta.total){if(t.view.meta.total=Math.max(0,t.view.meta.total-1),a&&Number.isFinite(n)&&"number"===typeof t.view.meta.total){const e=n;e>0&&(t.view.meta.totalPages=Math.max(1,Math.ceil(t.view.meta.total/e)))}this.syncTotalsInSameViews(e,t)}if(t.view.updatedAt=Date.now(),o&&a&&t.view.value.length<n&&r){var s;const a=t.view.meta,l=a&&"number"===typeof a.totalPages?a.totalPages:1;if(this.cascadeShiftPages(e,t,i,n,l,r,null!==(s=t.params)&&void 0!==s?s:{})&&t.view.meta&&"number"===typeof t.view.meta.totalPages){const i=Math.max(1,t.view.meta.totalPages-1);t.view.meta.totalPages=i,this.updateTotalPagesForAllViews(e,i)}}t.view.loadId=d(),t.view.abortController&&(t.view.abortController.abort(),t.view.abortController=void 0)}handleInsert(e,t,i,n,a,l,r,o){if(!t.view.value.includes(r.id)){if(l&&this.strategy.allowSortedInsert&&this.strategy.comparator&&o){if(this.tryInsertSorted(t,r,o)&&t.view.meta&&"number"===typeof t.view.meta.total){if(t.view.meta.total+=1,a&&Number.isFinite(n)){const e=n;e>0&&(t.view.meta.totalPages=Math.max(1,Math.ceil(t.view.meta.total/e)))}this.syncTotalsInSameViews(e,t)}if(a&&t.view.value.length>n&&o){var s;const a=t.view.meta,l=a&&"number"===typeof a.totalPages?a.totalPages:1;if(this.cascadeShiftToNextPage(e,t,i,n,l,o,null!==(s=t.params)&&void 0!==s?s:{})&&t.view.meta&&"number"===typeof t.view.meta.totalPages){const i=t.view.meta.totalPages+1;t.view.meta.totalPages=i,this.updateTotalPagesForAllViews(e,i)}}}else if(!a||t.view.value.length<n){if(t.view.value.push(r.id),t.view.meta&&"number"===typeof t.view.meta.total){if(t.view.meta.total+=1,a&&Number.isFinite(n)){const e=n;e>0&&(t.view.meta.totalPages=Math.max(1,Math.ceil(t.view.meta.total/e)))}this.syncTotalsInSameViews(e,t)}t.view.updatedAt=Date.now()}else{var c;t.view.meta={...null!==(c=t.view.meta)&&void 0!==c?c:{},stale:!0}}t.view.loadId=d(),t.view.abortController&&(t.view.abortController.abort(),t.view.abortController=void 0)}}handleUpdate(e,t,i,n,a,l,r,o,s){var c;const m=t.view.value.includes(o.id),u=this.isEntityTypeCompatible(o,(null===(c=t.params)||void 0===c?void 0:c.itemType)||"all");if(m&&!u){if(t.view.value=t.view.value.filter(e=>e!==o.id),t.view.meta&&"number"===typeof t.view.meta.total&&(t.view.meta.total=Math.max(0,t.view.meta.total-1),a&&Number.isFinite(n)&&"number"===typeof t.view.meta.total)){const e=n;e>0&&(t.view.meta.totalPages=Math.max(1,Math.ceil(t.view.meta.total/e)))}if(t.view.updatedAt=Date.now(),a&&t.view.value.length<n&&s){var p;const a=t.view.meta,l=a&&"number"===typeof a.totalPages?a.totalPages:1;if(this.cascadeShiftPages(e,t,i,n,l,s,null!==(p=t.params)&&void 0!==p?p:{})&&t.view.meta&&"number"===typeof t.view.meta.totalPages){const i=Math.max(1,t.view.meta.totalPages-1);t.view.meta.totalPages=i,this.updateTotalPagesForAllViews(e,i)}}return t.view.loadId=d(),void(t.view.abortController&&(t.view.abortController.abort(),t.view.abortController=void 0))}if(m&&(l||r)){t.view.value=t.view.value.filter(e=>e!==o.id);if(this.tryReinsertEntity(t,o,s,a,n)){if(t.view.meta&&"number"===typeof t.view.meta.total){if(t.view.meta.total+=1,a&&Number.isFinite(n)){const e=n;e>0&&(t.view.meta.totalPages=Math.max(1,Math.ceil(t.view.meta.total/e)))}this.syncTotalsInSameViews(e,t)}}else{if(t.view.meta&&"number"===typeof t.view.meta.total){if(t.view.meta.total=Math.max(0,t.view.meta.total-1),a&&Number.isFinite(n)&&"number"===typeof t.view.meta.total){const e=n;e>0&&(t.view.meta.totalPages=Math.max(1,Math.ceil(t.view.meta.total/e)))}this.syncTotalsInSameViews(e,t)}if(a&&t.view.value.length<n&&s){var h;const a=t.view.meta,l=a&&"number"===typeof a.totalPages?a.totalPages:1;if(this.cascadeShiftPages(e,t,i,n,l,s,null!==(h=t.params)&&void 0!==h?h:{})&&t.view.meta&&"number"===typeof t.view.meta.totalPages){const i=Math.max(1,t.view.meta.totalPages-1);t.view.meta.totalPages=i,this.updateTotalPagesForAllViews(e,i)}}}return t.view.updatedAt=Date.now(),t.view.loadId=d(),void(t.view.abortController&&(t.view.abortController.abort(),t.view.abortController=void 0))}if(m)return t.view.updatedAt=Date.now(),t.view.loadId=d(),void(t.view.abortController&&(t.view.abortController.abort(),t.view.abortController=void 0));if(u&&!r){if(l&&this.strategy.allowSortedInsert&&this.strategy.comparator&&s){if(this.tryInsertSorted(t,o,s)&&t.view.meta&&"number"===typeof t.view.meta.total){if(t.view.meta.total+=1,a&&Number.isFinite(n)){const e=n;e>0&&(t.view.meta.totalPages=Math.max(1,Math.ceil(t.view.meta.total/e)))}this.syncTotalsInSameViews(e,t)}}else if(!a||t.view.value.length<n){if(t.view.value.push(o.id),t.view.meta&&"number"===typeof t.view.meta.total){if(t.view.meta.total+=1,a&&Number.isFinite(n)){const e=n;e>0&&(t.view.meta.totalPages=Math.max(1,Math.ceil(t.view.meta.total/e)))}this.syncTotalsInSameViews(e,t)}t.view.updatedAt=Date.now()}else{var g;t.view.meta={...null!==(g=t.view.meta)&&void 0!==g?g:{},stale:!0}}t.view.loadId=d(),t.view.abortController&&(t.view.abortController.abort(),t.view.abortController=void 0)}}handleMove(e,t,i,n,a,l,r,o,s){if(t.view.value.includes(r.id)){if(t.view.value=t.view.value.filter(e=>e!==r.id),t.view.meta&&"number"===typeof t.view.meta.total&&(t.view.meta.total=Math.max(0,t.view.meta.total-1),a&&Number.isFinite(n)&&"number"===typeof t.view.meta.total)){const e=n;e>0&&(t.view.meta.totalPages=Math.max(1,Math.ceil(t.view.meta.total/e)))}if(t.view.updatedAt=Date.now(),a&&t.view.value.length<n&&s){var c;const a=t.view.meta,l=a&&"number"===typeof a.totalPages?a.totalPages:1;if(this.cascadeShiftPages(e,t,i,n,l,s,null!==(c=t.params)&&void 0!==c?c:{})&&t.view.meta&&"number"===typeof t.view.meta.totalPages){const i=Math.max(1,t.view.meta.totalPages-1);t.view.meta.totalPages=i,this.updateTotalPagesForAllViews(e,i)}}this.syncTotalsInSameViews(e,t)}t.view.loadId=d(),t.view.abortController&&(t.view.abortController.abort(),t.view.abortController=void 0)}forceInvalidateChildrenViews(e){const t=this.parentKey(null!==e&&void 0!==e?e:null);this.failedRequests.clearChildrenViewErrorsForParent(t);const i=this.views.get(t);if(i)for(const[,n]of i)n.view.value=void 0,n.view.meta=void 0,n.view.promise=null,n.view.updatedAt=0,n.view.loadId=d(),n.view.abortController&&(n.view.abortController.abort(),n.view.abortController=void 0)}getKnownTotal(e){const t=this.parentKey(null!==e&&void 0!==e?e:null),i=this.views.get(t);if(!i)return;let n=null;for(const[,r]of i){const e=r.view.meta;var a,l;if(e&&"number"===typeof e.total)if(!n||(null!==(a=r.view.updatedAt)&&void 0!==a?a:0)>n.updatedAt)n={total:Number(e.total),updatedAt:null!==(l=r.view.updatedAt)&&void 0!==l?l:0}}return n?n.total:void 0}toJSON(){return{views:Array.from(this.views.entries()).map(([e,t])=>[e,Array.from(t.entries())]),ttl:this.ttl,errorTtl:this.errorTtl,entityTtl:this.entityTtl,strategy:{allowSortedInsert:this.strategy.allowSortedInsert,allowSearchInsert:this.strategy.allowSearchInsert,invalidateOnPaginationFull:this.strategy.invalidateOnPaginationFull,preloadPagesBefore:this.strategy.preloadPagesBefore,preloadPagesAfter:this.strategy.preloadPagesAfter}}}static fromJSON(e,t){var i,n,r,o,s;const c=null!==(i=null!==(n=null===t||void 0===t?void 0:t.ttl)&&void 0!==n?n:null===e||void 0===e?void 0:e.ttl)&&void 0!==i?i:l,d=null!==(r=null!==(o=null===t||void 0===t?void 0:t.errorTtl)&&void 0!==o?o:null===e||void 0===e?void 0:e.errorTtl)&&void 0!==r?r:c,m=null!==(s=null===t||void 0===t?void 0:t.failedRequests)&&void 0!==s?s:new a,u=new p({},c,d,void 0,m);for(const[a,l]of null!==(h=e.views)&&void 0!==h?h:[]){var h;const e=new Map;for(const[t,i]of l){const n=i;null!==n&&void 0!==n&&n.view&&"error"in n.view&&delete n.view.error,e.set(t,n)}u.views.set(a,e)}return u}}class h{invalidateChildrenCountCache(e){const t=r(null!==e&&void 0!==e?e:"");this.childrenCountPromises.delete(t),this.failedRequests.delete(a.childrenCountKey(t))}constructor(e={},t=l,i){this.entities=void 0,this.views=void 0,this.ttl=void 0,this.errorTtl=void 0,this.failedRequests=void 0,this.childrenCountPromises=new Map,this.failedRequests=new a,this.ttl=t,this.errorTtl=null!==i&&void 0!==i?i:t,this.entities=new u,this.views=new p(e,t,this.errorTtl,void 0,this.failedRequests),this.views.setServerChildrenCountHandler((e,t,i)=>{this.handleServerReportedChildrenCount(e,t,null!==i&&void 0!==i?i:this.entities)}),this.views.setChildrenCountInvalidator(e=>{this.invalidateChildrenCountCache(e)})}getEntity(e){var t;return null!==(t=this.entities.getEntity(e))&&void 0!==t?t:null}getFileSystemItem(e){var t;return null!==(t=this.entities.getFileSystemItem(e))&&void 0!==t?t:null}getFolder(e){var t;return null!==(t=this.entities.getFolder(e))&&void 0!==t?t:null}async getOrCreateChildren(e,t,i){return this.views.getOrCreateChildren(e,t,i,this.entities)}upsertEntity(e){const t=this.entities.getEntity(e.id),i=t?s(t):null,n=s(e),a=!!t&&c(t),l=c(e);if(this.entities.upsertEntity(e),t){if(i!==n||a!==l)return this.views.smartInvalidateChildrenViews(i,t,"delete",this.entities),void this.views.smartInvalidateChildrenViews(n,e,"insert",this.entities);this.views.smartInvalidateChildrenViews(n,e,"update",this.entities,void 0,t)}else this.views.smartInvalidateChildrenViews(n,e,"insert",this.entities)}isAncestor(e,t){let i=t;const n=new Set;for(;i&&!n.has(i);){n.add(i);if(r(i)===r(e))return!0;const t=this.entities.getEntity(i);if(!t)break;i=s(t),null===i&&(i="")}return!1}moveEntity(e,t){const i=this.entities.getEntity(e);if(!i)return null;if(c(i)&&null!==t&&this.isAncestor(e,t))return null;const n=s(i),a=this.entities.moveEntityById(e,t);return a?(this.views.smartInvalidateChildrenViews(n,i,"delete",this.entities),this.views.smartInvalidateChildrenViews(t,a,"insert",this.entities),a):null}copyEntity(e,t,i,n){const a=this.entities.getEntity(e);if(!a)return null;let l=null;if(c(a)){var r;const i=[e],a=[];for(;i.length;){const e=i.shift();a.push(e);const t=this.entities.getChildrenIds(e,{onlyFolders:!0});for(const n of t)i.push(n)}const c=new Map;for(const e of a)c.set(e,d());for(const l of a){var o,m;const i=this.entities.getFolder(l),a=c.get(l),r=s(i),d=null===r?t:null!==(o=c.get(r))&&void 0!==o?o:null,u={...i,...l===e?n:void 0,id:a,folderId:null!==(m=l===e?null===n||void 0===n?void 0:n.folderId:void 0)&&void 0!==m?m:d};this.entities.upsertEntity(u)}for(const e of a){const t=c.get(e),i=this.entities.getChildrenIds(e,{onlyFileSystemItems:!0});for(const e of i){const i=this.entities.getFileSystemItem(e);if(!i)continue;const n=d(),a={...i,id:n,folderId:t};this.entities.upsertEntity(a)}}l=null!==(r=this.entities.getEntity(c.get(e)))&&void 0!==r?r:null}else{const a=null!==i&&void 0!==i?i:d();if(l=this.entities.copyFileSystemItem(e,a,null!==t&&void 0!==t?t:null),l&&n){var u,p;const e={...l,...n,id:a,folderId:null!==(u=null!==(p=n.folderId)&&void 0!==p?p:t)&&void 0!==u?u:null};this.entities.upsertEntity(e),l=e}}return l&&this.views.smartInvalidateChildrenViews(t,l,"copy",this.entities),l}searchByUrl(e){var t;return null!==(t=this.entities.searchByUrl(e))&&void 0!==t?t:null}deleteEntity(e){const t=this.entities.getEntity(e);if(!t)return null;if(c(t)){const{deletedFolderRecords:i,deletedFileSystemItemRecords:n}=this.entities.deleteFolderRecursive(e);for(const e of n)this.views.smartInvalidateChildrenViews(e.folderId,e,"delete",this.entities);for(const e of i)this.views.smartInvalidateChildrenViews(e.folderId,e,"delete",this.entities);for(const e of i)this.views.forceInvalidateChildrenViews(e.id);return t}{const{entity:t,parentId:i}=this.entities.deleteEntityById(e);return t&&this.views.smartInvalidateChildrenViews(i,t,"delete",this.entities),t}}deleteFolderRecursive(e){const{deletedFolderRecords:t,deletedFileSystemItemRecords:i}=this.entities.deleteFolderRecursive(e);for(const n of i)this.views.smartInvalidateChildrenViews(n.folderId,n,"delete",this.entities);for(const n of t)this.views.smartInvalidateChildrenViews(n.folderId,n,"delete",this.entities);for(const n of t)this.views.forceInvalidateChildrenViews(n.id);return{deletedFileSystemItemIds:i.map(e=>e.id),deletedFolderIds:t.map(e=>e.id)}}forceInvalidate(e){const t=this.entities.getEntity(e);if(!t)return;const i=new Set;if(c(t)){const t=[e];for(;t.length;){const e=t.pop();if(i.has(e))continue;i.add(e),this.views.forceInvalidateChildrenViews(e),this.invalidateChildrenCountCache(e);const n=this.entities.getChildrenIds(e,{onlyFolders:!0});for(const i of n)t.push(i)}}else{var n;const e=null!==(n=t.folderId)&&void 0!==n?n:null;this.views.forceInvalidateChildrenViews(e),this.invalidateChildrenCountCache(e)}}getChildrenIds(e){return this.entities.getChildrenIds(e)}searchByName(e,t){return this.entities.searchByName(e,t)}async getChildrenCount(e="",t){const i=r(e),n=a.childrenCountKey(i),l=this.failedRequests.getFreshError(n,this.errorTtl);if(null!=l)return Promise.reject(l);const o=this.childrenCountPromises.get(i);if(o)return o;const s=(async()=>{try{const i=this.entities.getFolder(e);if(i&&"number"===typeof i.childrenCount)return this.failedRequests.delete(n),i.childrenCount;const a=this.views.getKnownTotal(e);if("number"===typeof a)return i&&this.handleServerReportedChildrenCount(e,a,this.entities),this.failedRequests.delete(n),a;if(t){const i=await t(e);return this.entities.getFolder(e)&&this.handleServerReportedChildrenCount(e,i,this.entities),this.failedRequests.delete(n),i}return this.failedRequests.delete(n),this.entities.getChildrenIds(e).length}catch(a){if(this.childrenCountPromises.delete(i),function(e){var t,i,n;if(!e||"object"!==typeof e)return!1;const a=e;return"path_folder_not_found"===a.code||"path_folder_not_found"===(null===(t=a.data)||void 0===t?void 0:t.code)||404===a.status||404===(null===(i=a.data)||void 0===i||null===(n=i.data)||void 0===n?void 0:n.status)}(a))return this.failedRequests.delete(n),0;throw this.failedRequests.setError(n,a),a}finally{this.childrenCountPromises.delete(i)}})();return this.childrenCountPromises.set(i,s),s}toJSON(){return{entities:this.entities.toJSON(),views:this.views.toJSON(),ttl:this.ttl,errorTtl:this.errorTtl}}static fromJSON(e,t){var i,n,a,r;const o=null!==(i=null===e||void 0===e?void 0:e.ttl)&&void 0!==i?i:l,s=null!==(n=null===e||void 0===e?void 0:e.errorTtl)&&void 0!==n?n:o,c=new h(null!==t&&void 0!==t?t:{},o,s),d=u.fromJSON(null!==(a=null===e||void 0===e?void 0:e.entities)&&void 0!==a?a:{}),m=p.fromJSON(null!==(r=null===e||void 0===e?void 0:e.views)&&void 0!==r?r:{},{failedRequests:c.failedRequests,ttl:o,errorTtl:s});var g,f,v,b,y;t&&(m.strategy={allowSortedInsert:null===(g=t.allowSortedInsert)||void 0===g||g,allowSearchInsert:null===(f=t.allowSearchInsert)||void 0===f||f,invalidateOnPaginationFull:null===(v=t.invalidateOnPaginationFull)||void 0===v||v,preloadPagesBefore:null!==(b=t.preloadPagesBefore)&&void 0!==b?b:0,preloadPagesAfter:null!==(y=t.preloadPagesAfter)&&void 0!==y?y:1,comparator:t.comparator,filterMatch:t.filterMatch});return c.entities=d,c.views=m,m.setServerChildrenCountHandler((e,t,i)=>{c.handleServerReportedChildrenCount(e,t,null!==i&&void 0!==i?i:d)}),m.setChildrenCountInvalidator(e=>{c.invalidateChildrenCountCache(e)}),c}handleServerReportedChildrenCount(e,t,i){this.checkAndResolveChildrenCountConflict(e,t,i),this.invalidateChildrenCountCache(e)}checkAndResolveChildrenCountConflict(e,t,i){if(!i||void 0===t)return;const n=null!==e&&void 0!==e?e:null;if(!n)return void i.updateServerChildrenCount(n,t);const a=i.getFolder(n),l=null===a||void 0===a?void 0:a.childrenCount;void 0!==l&&l!==t&&this.views.forceInvalidateChildrenViews(n),i.updateServerChildrenCount(n,t)}}},62499:(e,t,i)=>{"use strict";i.d(t,{C:()=>v});var n=i(55436),a=i(21559),l=i(66606),r=i(76508),o=i(76281),s=i(86350),c=i(98121);function d(e,t="BackendError"){switch(e){case 400:return"ValidationError";case 401:return"AuthenticationFailed";case 403:return"AuthorizationFailed";case 404:return"FileNotFound";case 409:return"FolderAlreadyExists";case 413:return"PayloadTooLarge";case 415:return"UnsupportedMediaType";case 429:return"RateLimitExceeded";case 500:return"BackendError";case 503:return"ServiceUnavailable";case 504:return"Timeout";default:return t}}const m={file_too_large:"FileTooLarge",file_size_exceeded:"FileTooLarge",file_size_limit:"FileTooLarge",invalid_file_name:"FileInvalidName",file_name_invalid:"FileInvalidName",invalid_name:"FileInvalidName",invalid_folder_name:"FolderInvalidName",folder_name_invalid:"FolderInvalidName",folder_invalid_name:"FolderInvalidName",file_type_not_allowed:"FileTypeNotAllowed",unsupported_type:"FileTypeNotAllowed",invalid_format:"FileTypeNotAllowed",batch_limit_exceeded:"BatchItemLimitExceeded",exceeded_max_files:"BatchItemLimitExceeded",file_count_exceeded:"BatchItemLimitExceeded",upload_limit_exceeded:"BatchItemLimitExceeded",too_many_files:"BatchItemLimitExceeded"};function u(e){if("string"===typeof e)return e;if(null!==e&&"object"===typeof e&&!Array.isArray(e)&&"400x400"in e){const t=e["400x400"];return"string"===typeof t?t:void 0}}function p(e){if(!e)return["",""];const t=e.replaceAll("\\","/").split("/").filter(Boolean),i=t.pop()||"";return[t.join("/"),i]}class h{constructor(e){this._restApi=void 0,this._projectId=void 0,this.i18n=void 0,this.pathPostfix=void 0,this.appConfig=void 0,this.isStandalone=void 0,this.pathMode=!0,this.rootId="",this.trashPath="trash",this.tempPath="Edited",this.getFileData=async(e,t)=>{const i=e.url||("function"===typeof this.getUrl?this.getUrl(e):""),n=await(0,c.Be)(i,{config:this.appConfig,standalone:this.isStandalone,resourceType:(0,c.dg)(i,this.appConfig)?"cdn":"generic",intent:"downloadBlob",init:null!==t&&void 0!==t&&t.forceReload?{cache:"no-store"}:void 0});if(n.ok)return n.blob();const a=await n.text(),l=d(n.status,"FileReadError"),{__:r}=this.i18n,s=a||r("Failed to get file: %s").replace("%s",n.statusText);throw new o.FileManagerApiError(s,l,n.status)},this.getUrl=e=>(0,c.hs)(this.appConfig,[this._projectId,this.pathPostfix,e.folderId,e.name]),this.getThumbnailUrl=e=>{const t=e.name.lastIndexOf("."),i=t>0?e.name.slice(0,t):e.name,n=t>0?e.name.slice(t+1):"";return(0,c.hs)(this.appConfig,[this._projectId,this.pathPostfix,".thumbs",e.folderId,i,i+"-400x400."+n])},this._restApi=e.restApi,this._projectId=e.projectId,this.i18n=e.i18n||r.nr,this.pathPostfix=e.pathPostfix,this.appConfig=e.appConfig,this.isStandalone=!!e.isStandalone}removePrefix(e){let t=function(e,t){if(!e)return"";const i=new RegExp(`^/?${t}/?`);return e.replace(i,"")}(e,this._projectId);if(this.pathPostfix){const e=new RegExp(`^/?${this.pathPostfix}/?`);t=t.replace(e,"")}return t}handleError(e,t){var i,n;const{__:a}=this.i18n;if(e instanceof Error){if(e instanceof o.FileManagerApiError)throw e;throw new o.FileManagerApiError(e.message,t||"BackendError")}const l=e.data,r=(null===l||void 0===l?void 0:l.message)||a("Unknown error"),s=null!==(i=null===l||void 0===l||null===(n=l.data)||void 0===n?void 0:n.status)&&void 0!==i?i:null===l||void 0===l?void 0:l.status,c=null===l||void 0===l?void 0:l.code,u=t||(c?m[c]:void 0)||("number"===typeof s?d(s):void 0)||"BackendError";throw new o.FileManagerApiError(r,u,s)}convertRestError(e,t){const{__:i}=this.i18n;if(e instanceof o.FileManagerApiError)return e;if(e instanceof Error)return e;if(e&&"object"===typeof e&&"data"in e&&!(e instanceof Error)){var n,a;const l=e.data,r=(null===l||void 0===l?void 0:l.message)||i("Unknown error"),o=null!==(n=null===l||void 0===l||null===(a=l.data)||void 0===a?void 0:a.status)&&void 0!==n?n:null===l||void 0===l?void 0:l.status,s=null===l||void 0===l?void 0:l.code;return{message:r,code:t||(s?m[s]:void 0)||(o?d(o):void 0)||"BackendError",status:o,raw:e}}return null!==e&&void 0!==e?e:{message:i("Unknown error")}}async getFolders({parentId:e}){const t=await this._restApi.emFiles.folders_list({project_id:this._projectId,path_folder:e,per_page:1e4},{type:n.cM.Json});if(t.error){if(this.isPathFolderNotFound(t.error))return[];this.handleError(t.error)}return await t.data.folders.map(e=>({id:this.removePrefix(e.full_path),name:e.name,folderId:this.removePrefix(e.parent_folder),childrenCount:e.files_count+e.folders_count,isFolder:!0}))}async getItems(e){if(void 0===e.limit&&(e.limit=Number.MAX_SAFE_INTEGER),"folder"===e.itemType)return{items:await this.getFolders({parentId:e.folderId})};let t;try{t=await this._restApi.emFiles.files_list({project_id:this._projectId,path_folder:e.folderId,filter_name:e.search,sort_by:e.sortBy,sort_order:e.sortOrder,per_page:e.limit,page:e.page})}catch(r){if(this.isPathFolderNotFound(r)||404===(null===r||void 0===r?void 0:r.status))return{items:[],pagination:{limit:e.limit,page:1,total:0,totalPages:0}};throw r}const i=t,n=!i.ok&&404===i.status||this.isPathFolderNotFound(t.error);if(t.error||!i.ok){if(n)return{items:[],pagination:{limit:e.limit,page:1,total:0,totalPages:0}};t.error&&this.handleError(t.error)}const a=t.data;let l=((null===a||void 0===a?void 0:a.files)||[]).map(e=>{const t=e.thumbnail,i=function(e){var t,i;const n=e.is_folder;if(!0===n||1===n)return!0;if(!1===n||0===n)return!1;if("string"===typeof n){const e=n.trim().toLowerCase();if("true"===e||"1"===e||"yes"===e)return!0;if("false"===e||"0"===e||"no"===e||""===e)return!1}if("folder"===String(null!==(t=e.item_type)&&void 0!==t?t:"").toLowerCase())return!0;const a=String(null!==(i=e.type)&&void 0!==i?i:"").toLowerCase();return"folder"===a||"directory"===a||"dir"===a||!("inode/directory"!==a&&"application/x-directory"!==a&&"httpd/unix-directory"!==a&&!a.endsWith("/directory"))}(e);return{...e,id:`${this.removePrefix(e.folder)}/${e.name}`,size:Number(e.size),date:e.date||(new Date).toISOString(),folderId:this.removePrefix(e.folder),selected:!1,isFolder:i,thumbnail:u(t)}});return a.total===Number.MAX_SAFE_INTEGER&&(a.total=l.length),"file"===e.itemType&&(l=l.filter(e=>!e.isFolder)),{items:l,pagination:{limit:a.per_page,page:a.page,total:a.total,totalPages:a.total_pages}}}async getFile(e){const t=await(0,c.Be)((0,c.hs)(this.appConfig,[this._projectId,e]),{config:this.appConfig,standalone:this.isStandalone,resourceType:"cdn",intent:"downloadBlob"});if(t.ok)return t.blob();{const e=await t.text(),i=d(t.status,"FileReadError"),{__:n}=this.i18n,a=e||n("Failed to get file: %s").replace("%s",t.statusText);throw new o.FileManagerApiError(a,i,t.status)}}isPathFolderNotFound(e){var t,i,n;if(!e||"object"!==typeof e||e instanceof Error)return!1;const a=e;return"path_folder_not_found"===a.code||"path_folder_not_found"===(null===(t=a.data)||void 0===t?void 0:t.code)||404===(null===(i=a.data)||void 0===i||null===(n=i.data)||void 0===n?void 0:n.status)}async deleteItem(e,t){if(e.isFolder){var i;const l=await this._restApi.emFiles.folders_delete({path_folder:e.id,project_id:this._projectId,force:t.permanent},{type:n.cM.Json});if(l.error){var a;if(this.isPathFolderNotFound(l.error))return void await this.clearCache(null!==(a=e.folderId)&&void 0!==a?a:void 0);const t="FolderNotFound";this.handleError(l.error,t)}await this.clearCache(null!==(i=e.folderId)&&void 0!==i?i:void 0)}else{var l;const i=await this._restApi.emFiles.files_delete({project_id:this._projectId,path_folder:null!==(l=e.folderId)&&void 0!==l?l:"",file_name:[e.name],force:t.permanent},{type:n.cM.Json});i.error&&this.handleError(i.error,"FileNotFound")}}async deleteItems(e,t){try{if(0===e.length)return{success:!0};const l=e.filter(e=>e.isFolder),r=e.filter(e=>!e.isFolder);if(l.length>0){const e=new Set(l.map(e=>e.id)),a=l.filter(t=>{var i;const n=null!==(i=t.folderId)&&void 0!==i?i:"";return!e.has(n)}).map(e=>e.id),r=await this._restApi.emFiles.folders_delete({project_id:this._projectId,path_folder:1===a.length?a[0]:a,force:t.permanent},{type:n.cM.Json});if(r.error&&!this.isPathFolderNotFound(r.error))return{success:!1,error:this.convertRestError(r.error)};for(const t of l)try{var i;await this.clearCache(null!==(i=t.folderId)&&void 0!==i?i:void 0)}catch{}}if(r.length>0){const e=new Map;for(const t of r){var a;const i=null!==(a=t.folderId)&&void 0!==a?a:"";e.has(i)||e.set(i,[]),e.get(i).push(t)}for(const[i,a]of e){const e=await this._restApi.emFiles.files_delete({project_id:this._projectId,path_folder:i,file_name:a.map(e=>e.name),force:t.permanent},{type:n.cM.Json});if(e.error)return{success:!1,error:this.convertRestError(e.error)}}}return{success:!0}}catch(l){return{success:!1,error:l}}}async createFolder(e,t,i){const{__:a}=this.i18n;if(!e)throw new o.FileManagerApiError(a("Folder name is required"),"FolderInvalidName");const l=await this._restApi.emFiles.folders_create({name:e,project_id:this._projectId,path_folder:t,is_force_create:i},{type:n.cM.Json});return l.error&&this.handleError(l.error),{id:this.removePrefix(l.data.full_path),name:l.data.name,folderId:this.removePrefix(l.data.parent_folder),childrenCount:l.data.files_count|l.data.folders_count,isFolder:!0}}async _uploadFile(e){var t;const{__:i}=this.i18n;if(!e.name||!e.data)throw new o.FileManagerApiError(i("Invalid file data"),"ValidationError");const a=await this._restApi.emFiles.files_create({file:e.data instanceof File?e.data:new File([e.data],e.name,{type:e.type}),path_folder:e.folderId,project_id:this._projectId},{type:n.cM.FormData});a.error&&this.handleError(a.error);const l=a.data instanceof Array?a.data[0]:a.data;if(!l)throw new o.FileManagerApiError(i("File upload failed"),"ValidationError");return{...l,id:this.removePrefix(l.folder)+"/"+l.name,size:Number(l.size),folderId:this.removePrefix(l.folder),date:l.date||(new Date).toISOString(),selected:!1,isFolder:!1,thumbnail:null===(t=l.thumbnail)||void 0===t?void 0:t["400x400"]}}async uploadFiles(e){try{const t=e.items.map(e=>{if(e.data instanceof File)return e.data;const t=e.name||"file",i=e.data.type||e.type||"application/octet-stream";return new File([e.data],t,{type:i})}),i=await this._restApi.emFiles.files_create({project_id:this._projectId,path_folder:e.folderId,file:t},{type:n.cM.FormData});if(i.error)return{success:!1,error:this.convertRestError(i.error)};const a=Array.isArray(i.data)?i.data:[i.data];return{success:!0,detailed:a.map(e=>{var t;return{success:!0,data:{id:[this.removePrefix(e.folder),e.name].filter(Boolean).join("/"),name:e.name,size:Number(e.size),folderId:this.removePrefix(e.folder),type:e.type,date:e.date||(new Date).toISOString(),selected:!1,isFolder:!1,thumbnail:null===(t=e.thumbnail)||void 0===t?void 0:t["400x400"]}}})}}catch(t){return{success:!1,error:t}}}async renameItem(e,t){const{__:i}=this.i18n;if(!t){const t=e.isFolder?"FolderInvalidName":"FileInvalidName",n=e.isFolder?i("New folder name is required"):i("New file name is required");throw new o.FileManagerApiError(n,t)}const[a,l]=p(e.id),r=await this._restApi.emFiles.files_rename_partial_update({file_name:l,new_name:t,path_folder:a,project_id:this._projectId,is_folder:e.isFolder},{type:n.cM.Json});r.error&&this.handleError(r.error);const s=r.data;return{id:this.removePrefix(s.folder)+"/"+s.name,name:s.name,folderId:this.removePrefix(s.folder)}}async moveItems(e,t){try{const i=e.map(e=>p(e.id)),a=await this._restApi.emFiles.items_move_partial_update({file_name:i.map(e=>e[1]),target_folder:t,path_folder:i[0][0],project_id:this._projectId},{type:n.cM.Json});if(a.error)return{success:!1,error:this.convertRestError(a.error)};const l=a.data;return{success:!0,detailed:l.results.map(e=>({success:e.success,error:this.convertRestError(e.error),data:{id:[this.removePrefix(e.new_path||""),e.item_name].filter(e=>e).join("/")}}))}}catch(i){this.convertRestError(i);return{success:!1,error:i}}}async copyItems(e,t){try{const i=e.map(e=>p(e.id)),a=await this._restApi.emFiles.items_move_partial_update({file_name:i.map(e=>e[1]),target_folder:t,path_folder:i[0][0],project_id:this._projectId,is_copy:!0},{type:n.cM.Json});if(a.error)return{success:!1,error:this.convertRestError(a.error)};const l=a.data;return{success:!0,detailed:l.results.map((t,i)=>({success:t.success,error:this.convertRestError(t.error),requestId:e[i].id,data:{id:[this.removePrefix(t.new_path||""),t.item_name].filter(e=>e).join("/")}}))}}catch(i){return{success:!1,error:this.convertRestError(i)}}}async uploadFileByUrl(e,t,i){const r=(0,a.o)(e);try{var o;if(r.startsWith("http://localhost")||r.startsWith("https://localhost")||null!==(o=this.appConfig)&&void 0!==o&&o.resourceProxy||this.isStandalone){const e=await(await(0,c.Be)(r,{config:this.appConfig,standalone:this.isStandalone,resourceType:"imageStock"===(null===i||void 0===i?void 0:i.eventSource)?"stockImages":"generic",intent:"downloadBlob"})).blob();return this._uploadFile({name:r.split("/").pop()||"file",size:e.size,folderId:t,data:e,type:l.A.getType(r)||"application/octet-stream"})}const e=await this._restApi.emFiles.files_upload_by_url_create({url:r,path_folder:t,project_id:this._projectId},{type:n.cM.Json});e.error&&this.handleError(e.error);const a=e.data instanceof Array?e.data[0]:e.data;return{id:`${this.removePrefix(a.folder)}/${a.name}`,name:a.name,size:Number(a.size),type:a.type,folderId:this.removePrefix(a.folder)||null,date:a.date||(new Date).toISOString(),url:a.url}}catch(s){throw s}}async updateFile(e,t){const[i,a]=p(e.id),l=await this._restApi.emFiles.files_partial_update({file_name:a,project_id:this._projectId,path_folder:i,updates:{data:"string"===typeof t.data?t.data:await(r=t.data,new Promise((e,t)=>{const i=new FileReader;i.onload=()=>{const t=i.result.toString().split(",")[1];e(t)},i.onerror=t,i.readAsDataURL(r)})),name:t.name}},{type:n.cM.Json});var r;if(!l.error){var o;const e=l.data;return{...e,id:`${this.removePrefix(e.folder)}/${e.name}`,size:Number(e.size),folderId:this.removePrefix(e.folder),date:e.date||(new Date).toISOString(),thumbnail:null===(o=e.thumbnail)||void 0===o?void 0:o["400x400"],selected:!1}}this.handleError(l.error)}findFileByUrl(e,t){const i=(0,c.no)(e,this.appConfig),n=(0,c.hs)(this.appConfig,[]);if(n&&(0,s.Ay)(i).startsWith((0,s.Ay)(n))){const e=i.replace((0,s.Ay)(n)+"/","").split("/").filter(Boolean);if(e[0]===this._projectId){const n=this.removePrefix(e.slice(1,-1).join("/")),a=e[e.length-1];if(!t||n===this.removePrefix(t))return{id:[n,a].filter(Boolean).join("/"),name:a,folderId:n,isFolder:!1,url:i}}}}async clearCache(e){const t={project_id:this._projectId,path_folder:e||void 0},i=await this._restApi.emFiles.cache_clear_create(t);i.error&&this.handleError(i.error)}async cleanTrash(){try{var e,t;const i=await this._restApi.emFiles.empty_trash_create({project_id:this._projectId},{type:n.cM.UrlEncoded});i.error&&this.handleError(i.error,"BackendError");const a=i.data;return{success:null===(e=null===a||void 0===a?void 0:a.success)||void 0===e||e,deletedCount:null!==(t=null===a||void 0===a?void 0:a.deleted_count)&&void 0!==t?t:0}}catch(i){if(i instanceof o.FileManagerApiError)throw i;const{__:e}=this.i18n;throw new o.FileManagerApiError(e("Failed to clean trash"),"BackendError")}}}var g=i(40711),f=i(93453);function v({storageProvider:e,projectId:t,restApi:i,i18n:n,pathPostfix:a,appConfig:l,isStandalone:r}){var o,s;const c=null===l||void 0===l?void 0:l.fileManager,d=c?{...c,enablePagination:!1===c.enablePagination?Boolean(c.clientSidePaging):c.enablePagination}:void 0,m=e||new h({projectId:t,restApi:i,i18n:n,pathPostfix:a,appConfig:l,isStandalone:r}),u=m.pathMode?new f.T(m,null!==(o=m.rootId)&&void 0!==o?o:"","Trash",m.trashPath,!0,n):null;return{storageProvider:m,pathProxy:u,dataProvider:new g.w(null!==u&&void 0!==u?u:m,d,{...m,trashPath:m.pathMode?"trash":m.trashPath,rootId:m.pathMode?"":null!==(s=m.rootId)&&void 0!==s?s:"",resourceProxyConfig:l,isStandalone:r},n)}}},30211:(e,t,i)=>{"use strict";i.d(t,{A:()=>y});var n=i(25366),a=i(14365),l=i(85472),r=i(76508),o=i(74572),s=i.n(o),c=i(64172),d=i(70158),m=i(79349),u=i(90701),p=i(69064),h=i(33637);const g=({taxonomy:e})=>{var t;const{__:i,_x:o}=(0,r.s9)(),s=(0,l.wA)(),[g]=a.lV.useForm(),f=(0,n.useRef)(null),v=(0,l.d4)(m.cL)===p.lx.ADD_NEW_GROUP_MODAL,b=(0,u.hN)();let y;({data:y}=(0,h.KC)());const E=`project_${y.id}`,_=null===(t=y[p.bV.GROUP])||void 0===t?void 0:t[0],[w]=(0,c.OD)(),[C]=(0,d.y$)(),k=(0,n.useCallback)(()=>{g.resetFields(),setTimeout(()=>{var e;return null===(e=f.current)||void 0===e?void 0:e.focus({cursor:"start"})},0)},[g]);(0,n.useEffect)(()=>{v&&k()},[v,k]);const A=()=>s((0,m.Oo)()),[S,I]=(0,d.JI)(),[x,L]=(0,n.useState)(!1),[N,T]=(0,n.useState)(_),B=()=>{const t=(t,n)=>w({projectId:y.id,[e]:n||N}).then(async n=>{if("error"in n)b.error(n);else if("data"in n){const a=n.data,l=await S({name:t,parent:a[e][0]});if(!("error"in l))return b.success({message:i("The group \u201c")+l.data.name+o("\u201d was successfully created.",e)}),T(a[e][0]),C({parent:a[e][0]}).then(({data:e,error:t})=>{e?A():t&&b.error({error:t})});b.error({res_1:l})}});g.validateFields().then(({name:n})=>(L(!0),N?S({name:n,parent:N}).then(t=>{"error"in t?b.error(t):(b.success({message:i("The group \u201c")+t.data.name+o("\u201d was successfully created.",e)}),A(),C({parent:N}))}):S({name:E}).then(e=>{if(!("error"in e))return t(n,e.data.id);{const{data:i}=e.error;if("term_exists"===i.code&&i.data.term_id)return t(n,i.data.term_id);b.error(e)}}).catch(e=>{}).finally(()=>L(!1)))).catch(e=>{}).finally(()=>L(!1))};return n.createElement(a.aF,{title:i("Add a new group"),open:v,onOk:B,onCancel:A,className:"new-group-modal",footer:[n.createElement(a.$n,{key:"submit",type:"primary",size:"large",loading:I.isLoading||x,onClick:B},i("Create group"))]},n.createElement(a.lV,{form:g,layout:"vertical",name:"add_new_group_form",onFinish:B,initialValues:{remember:!1,name:""},autoComplete:"off",style:{paddingTop:10}},n.createElement(a.lV.Item,{name:"name",rules:[{required:!0,message:i("Please enter the group name")}]},n.createElement(a.pd,{disabled:I.isLoading,size:"large",placeholder:i("Enter the group name"),ref:f,style:{marginBottom:5}}))))},f=({group:e,refetch:t})=>{const{__:i,_x:o}=(0,r.s9)(),s=(0,l.wA)(),[c]=a.lV.useForm(),h=(0,n.useRef)(null),g=(0,l.d4)(m.cL)===p.lx.EDIT_GROUP_NAME_MODAL,f=(0,u.hN)(),{id:v=null,name:b=""}=e,y=()=>s((0,m.Oo)()),[E,_]=(0,d.CE)();(0,n.useEffect)(()=>{g&&c.setFieldsValue({name:b})},[g,b,c]);const w=()=>{c.validateFields().then(({name:e})=>{E({id:v,data:{name:e}}).then(({data:n,error:a})=>{a?(f.error({message:a.data.code,description:a.data.message}),c.setFieldValue("name",e)):(t().then(({data:e})=>{if(e){var t,i,n;const a=null===(t=e[0])||void 0===t||null===(i=t.children)||void 0===i||null===(n=i.find(e=>e.id===v))||void 0===n?void 0:n.name;c.setFieldValue("name",a)}}),y(),f.success({message:i("The group \u201c")+e+o("\u201d was successfully changed to \u201c","group")+n.name+i("\u201d.")}))})})};return n.createElement(a.aF,{title:i("Change group name"),open:g,onOk:w,onCancel:y,className:"new-group-name-modal",footer:[n.createElement(a.$n,{key:"submit",type:"primary",size:"large",loading:_.isLoading,onClick:w},i("Change name"))]},n.createElement(a.lV,{form:c,layout:"vertical",name:"rename_group_form",onFinish:w,initialValues:{remember:!1,name:b},autoComplete:"off",style:{paddingTop:10}},n.createElement(a.lV.Item,{name:"name",rules:[{required:!0,message:i("Please enter the group name")}]},n.createElement(a.pd,{disabled:_.isLoading,size:"large",placeholder:i("Enter the group name"),ref:h,style:{marginBottom:5}}))))};var v=i(1246),b=i(22376);const y=({className:e,refetchProjectGroups:t,isLoading:i})=>{const{__:o,_x:c}=(0,r.s9)(),h=(0,l.wA)(),y=(0,u.hN)(),{modal:E}=a.qw.useApp(),{confirm:_}=E,{token:w}=(0,a.rd)(),C=(0,l.d4)(b.UI),[k]=(0,d.Lh)(),A=(e,i)=>{_({maskClosable:!0,centered:!0,title:c("Are you sure to delete \u201c","group")+i+o("\u201d group and all nested groups?"),icon:n.createElement(v.Ay,{icon:"DeleteOutlined",style:{color:"#ff4d4f"}}),okText:o("Yes"),cancelText:o("No"),onOk:()=>(e=>{k(e).unwrap().then(e=>{null!==e&&void 0!==e&&e.deleted&&(y.success({message:o("The group \u201c")+e.previous.name+c("\u201d was successfully deleted.","recovery")}),t())}).catch(e=>{y.error({message:e.data.code,description:e.data.message})})})(String(e))})},S=e=>[{label:o("Rename"),key:"Rename",icon:n.createElement(v.Ay,{icon:"CopyOutlined",size:16}),onClick:()=>{return t=e.id,i=e.name,h((0,m.qf)(p.lx.EDIT_GROUP_NAME_MODAL)),void x({id:t,name:i});var t,i}},{label:o("Remove"),icon:n.createElement(v.Ay,{icon:"DeleteOutlined",size:16}),key:"Remove",style:{color:"#ff4d4f"},onClick:()=>A(e.id,e.name)}],[I,x]=(0,n.useState)({id:null,name:""});return n.createElement("div",{className:s()("groups-management",{[e]:e})},i?n.createElement(a.EA,{active:!0}):n.createElement(a.fI,null,!(null===C||void 0===C||!C.length)&&(null===C||void 0===C?void 0:C.map((e,t)=>{var i;return n.createElement(a.fv,{key:e.id,span:24},n.createElement(a.lV.Item,{name:`group_${e.id}`,style:{marginBottom:w.formItemMarginBottomMD},label:n.createElement(a.so,{justify:"space-between",align:"center",style:{width:"100%"}},n.createElement("span",null,e.name),n.createElement(a.$n,{type:"text",className:"groups-management__group_menu","data-group-id":e.id,size:"large"},n.createElement(a.ms,{className:"groups-management__group_menu-inner",placement:"bottomLeft",menu:{items:S(e)},trigger:["hover"]},n.createElement("span",{className:"groups-management__actions"},n.createElement(v.Ay,{icon:"MoreOutlined"}))))),className:"groups-management__group-select",rules:[{message:"Please input category name!",type:"array"}]},n.createElement(a.Select,{mode:"tags",style:{width:"100%"},placeholder:o("Type category here"),options:null===(i=e.children)||void 0===i?void 0:i.map(e=>({label:e.name,value:String(e.id)})),tagRender:e=>{const{label:t,closable:i,onClose:l}=e;return n.createElement(a.vw,{color:w.colorPrimary,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},closable:i,onClose:l,style:{borderRadius:6}},t)},getPopupContainer:()=>document.querySelector(".email-settings__collapse")})))})),n.createElement(a.fv,{span:24},n.createElement(a.lV.Item,{style:{marginBottom:w.formItemMarginBottomMD}},n.createElement(a.$n,{id:"add_group_button",icon:n.createElement(v.Ay,{icon:"AddSlide"}),style:{width:"100%"},onClick:()=>h((0,m.qf)(p.lx.ADD_NEW_GROUP_MODAL))},o("Add group"))))),n.createElement(g,{taxonomy:p.bV.GROUP}),n.createElement(f,{group:I,refetch:t}))}},92980:(e,t,i)=>{"use strict";i.d(t,{A:()=>v});var n=i(25366),a=i(84224),l=i(74572),r=i.n(l),o=i(14365),s=i(85472),c=i(13789),d=i(65751),m=i(1246),u=i(90701),p=i(76508),h=i(99614);const g=()=>{const{__:e}=(0,p.s9)(),t=(0,u.hN)(),i=(0,s.d4)(d.C1),[a]=(0,c.C)(),[l,r]=(0,n.useState)(!1),g=(0,h.u)();(0,n.useEffect)(()=>{i.hasOwnProperty("email_confirmation")&&r(i.email_confirmation)},[i,l]);return null!==i&&void 0!==i&&i.email_confirmation||null===i||void 0===i||!i.privacy_policy_agreement?null:n.createElement("div",{className:"main__ribbon"},n.createElement("span",null,n.createElement(m.Ay,{icon:"EmailConfirmation",size:16,style:{marginRight:10,verticalAlign:"-0.15em"}}),e("Confirmation email was sent to"),"\xa0",n.createElement("em",null,i.email),".\xa0",e("Didn't receive an email?"),"\xa0",n.createElement(o.$n,{type:"primary",size:"small",className:"main__ribbon-resend",style:{fontSize:16,lineHeight:1,display:"inline-flex",alignItems:"center",gap:8},onClick:()=>{g({event:"click",action:"click_resend_confirmation_email",user_email:i.email,user_id:i.id}),a({userId:i.id,email:i.email}).then(({data:n,error:a})=>{n?t.success(e("Confirmation email has been sent to {confirmedEmail}.").replace("{confirmedEmail}",i.email)):a&&t.error(a)})}},e("Resend"),n.createElement(m.Ay,{icon:"SendOutlined",size:16,style:{flexShrink:0}}))))};var f=i(93149);const v=({className:e,leftBlock:t,rightBlock:i,isHeaderCodeMenuOpen:l=!1})=>{const{token:s}=(0,o.rd)(),c=(0,n.useRef)(),d=(0,f.rD)();return n.createElement(n.Fragment,null,n.createElement(g,null),d.headerShow&&n.createElement("header",{className:r()("header",{[e]:e}),style:{borderColor:s.colorBorder}},!l&&n.createElement(a.A,{nodeRef:c,in:!l,timeout:300,classNames:"transition"},n.createElement("div",{className:"header__container container"},n.createElement("div",{className:"header__left",style:{flexGrow:1}},t),n.createElement("div",{className:"header__right"},n.createElement(o.$x,{size:10},i))))))}},38885:(e,t,i)=>{"use strict";i.d(t,{H:()=>o,p:()=>s});var n=i(25366),a=i(85472),l=i(79349);const r=(0,n.createContext)(null),o=({children:e})=>{const t=(0,a.wA)(),i=(0,a.d4)(l.cL),[o,s]=(0,n.useState)(null),c=(0,n.useRef)(null),d=(0,n.useCallback)(e=>{var t;null===(t=c.current)||void 0===t||t.call(c,e),c.current=null},[]),m=(0,n.useCallback)(e=>(d(null),s(e),t((0,l.qf)(e.entryModal)),new Promise(e=>{c.current=e})),[t,d]);(0,n.useEffect)(()=>{(e=>e.includes("UPLOAD_IMAGE_")||e.includes("UPLOAD_BACKGROUND_"))(i)||(s(null),c.current&&d(null))},[i,d]);const u=(0,n.useMemo)(()=>({request:o,openImagePicker:m,resolveImagePicker:d}),[o,m,d]);return n.createElement(r.Provider,{value:u},e)},s=()=>{const e=(0,n.useContext)(r);if(!e)throw new Error("useImagePicker must be used within ImagePickerProvider");return e}},1651:(e,t,i)=>{"use strict";i.d(t,{p:()=>n.p});var n=i(38885)},82148:(e,t,i)=>{"use strict";i.d(t,{vl:()=>y,Ju:()=>b,Ay:()=>I});var n=i(25366),a=i(74572),l=i.n(a),r=i(91937),o=i(84224),s=i(37666),c=i(14365),d=i(65335),m=i(87669),u=i(93149),p=i(76508),h=i(99614),g=i(3344),f=i(79594),v=i(17855);const b=380,y=Math.max(0,b-300),E={enter:480,exit:0};function _({className:e,children:t}){return n.createElement("div",{className:`menu-tariff-widget__card menu-tariff-widget__card_light ${e||""}`.trim()},t)}function w({className:e,children:t}){return n.createElement("div",{className:`menu-tariff-widget__card menu-tariff-widget__card_purple ${e||""}`.trim()},t)}function C({children:e,billingState:t,onNavClick:i,analyticsAction:a}){return n.createElement(s.N_,{to:"/billing",state:t,className:"menu-tariff-widget__btn menu-tariff-widget__btn_primary","data-em-analytics":a,onClick:i},e)}function k({onClick:e,disabled:t,type:i,className:a,children:r}){return n.createElement("button",{type:i,className:l()("menu-tariff-widget__btn","menu-tariff-widget__btn_outline",a),onClick:e,disabled:t},r)}function A({billingState:e,onNavClick:t,analyticsAction:i,className:a,children:r}){return n.createElement(s.N_,{to:"/billing",state:e,className:l()("menu-tariff-widget__header-link",a),"data-em-analytics":i,onClick:t},r)}const S=({isCollapsed:e,isLocked:t,isSiderHovered:i,subscription:a,subscriptionEnd:b,recurringPayments:y,trialEnabled:S,isPaying:I,subscriptionId:x,userId:L,pathname:N,enterpriseUsersLimit:T,enterprisePrice:B,enterprise12Price:P})=>{const{__:R,_n:F,sprintf:O}=(0,p.s9)(),M=(0,u.rD)(),j=(0,h.u)(),[D,V]=(0,n.useState)(()=>!e&&t);(0,n.useEffect)(()=>{if(e)return void V(!1);if(t)return void V(!0);V(!1);const i=window.setTimeout(()=>V(!0),220);return()=>window.clearTimeout(i)},[e,t]);const{isEnabled:W,isLoading:z,enableRecurring:H,disableRecurring:U}=(0,g.C)({subscriptionId:null!=x?String(x):null,userId:null!=L?String(L):"",recurringPayments:Boolean(y)}),q=(0,f.WU)(b),$=(0,f.Kh)(b),Z=Boolean($&&q>0),G=(0,n.useMemo)(()=>{const e=(null===a||void 0===a?void 0:a.post_title)||(null===a||void 0===a?void 0:a.title)||"";return String(e).trim().split(/\s+/)[0]||R("Plan")},[a,R]),K=(0,n.useMemo)(()=>String((null===a||void 0===a?void 0:a.post_title)||(null===a||void 0===a?void 0:a.title)||"").trim(),[a]),X=K?K.split(/\s+/)[0]:"",Y=Boolean(T&&B&&"Enterprise"===K),J=Boolean(T&&P&&"Enterprise 12"===K),Q="Enterprise"===X&&(Y||J),ee=Boolean(x),te=Boolean(b)&&(ee||Q||W),ie=!ee,ne=(0,n.useMemo)(()=>{if(!a)return!0;const e=String(a.post_name||"").toLowerCase();if("community"===e||"free"===e)return!0;return"Free"===G||"Community"===G},[a,G]),{isTrialUi:ae,isTrialExpiredByDate:le,menuActsAsFreeTier:re}=function(e,t,i,n){const a=Boolean(e),l=(0,v.Y1)(a,t),r=!i,o=a&&l&&!(Boolean(n)&&r);return{isTrialUi:o,isTrialExpiredByDate:a&&!l,menuActsAsFreeTier:i&&!o}}(S,b,ne,I),oe=(0,n.useMemo)(()=>ae?R("Trial"):re?R("Free"):G.length<=4?G:G.slice(0,3),[re,ae,G,R]),se=ae||re?"menu-tariff-widget__badge_blue":"menu-tariff-widget__badge_purple",ce=(0,n.useMemo)(()=>({from:N}),[N]),de=(0,n.useCallback)(e=>{j({event:"click",action:e,location:"left_menu_tariff_widget"})},[j]),me=(0,n.useCallback)(e=>{const t=e.currentTarget.getAttribute("data-em-analytics");t&&de(t)},[de]),ue=(0,n.useCallback)(()=>{de("menu_tariff_enable_recurring"),H()},[de,H]),pe=(0,n.useCallback)(()=>{de("menu_tariff_disable_recurring"),U()},[de,U]),he=function({menuActsAsFreeTier:e,isTrialUi:t,daysLeft:i,recurringOn:n}){const a=i<=5&&i>0;return t&&a?"trial_expiring":t?"trial_active":e?"free":a?"paid_expiring":n?"paid_recurring":"paid_enable_recurring"}({menuActsAsFreeTier:re,isTrialUi:ae,daysLeft:q,recurringOn:W}),ge=M.iconStrokeWidth,fe=e||!t&&!D,ve=(0,n.useRef)(null),be=()=>n.createElement("span",{className:"menu-tariff-widget__recurring-tooltip-wrap"},n.createElement(k,{type:"button",disabled:z||ie,onClick:ie?void 0:pe},n.createElement(d.C,{size:16,strokeWidth:ge,className:"menu-tariff-widget__btn-icon"}),R("Auto-payment enabled")));return n.createElement(r.A,{mode:"out-in"},n.createElement(o.A,{key:fe?"badge":"card",nodeRef:ve,timeout:E,classNames:"menu-tariff-widget-anim",appear:!1},n.createElement("div",{ref:ve,className:l()("menu-tariff-widget",{"menu-tariff-widget_collapsed":fe})},fe?n.createElement(s.N_,{to:"/billing",state:ce,className:`menu-tariff-widget__badge ${se}`,"data-em-analytics":"menu_tariff_badge",onClick:me},n.createElement("span",{className:"menu-tariff-widget__badge-text"},oe)):n.createElement("div",{className:l()("menu-tariff-widget__expanded-fade",{"menu-tariff-widget__expanded-fade_hidden":!t&&!i})},"free"===he?n.createElement(_,null,n.createElement("div",{className:"menu-tariff-widget__header"},n.createElement(A,{billingState:ce,onNavClick:me,analyticsAction:"menu_tariff_header_to_billing"},n.createElement("span",{className:"menu-tariff-widget__title menu-tariff-widget__title_dark"},R(le?"Free trial":"Free"))),n.createElement("p",{className:"menu-tariff-widget__desc"},R(le?"The trial has ended. You are on the Free plan.":"You can get more emails and access to all features."))),n.createElement(C,{billingState:ce,onNavClick:me,analyticsAction:le?"menu_tariff_choose_plan_free_after_trial":"menu_tariff_choose_plan_free"},R("Choose plan"))):"trial_expiring"===he?n.createElement(_,{className:"menu-tariff-widget__card_decor menu-tariff-widget__card_decor_trial"},n.createElement("div",{className:"menu-tariff-widget__header"},n.createElement(A,{billingState:ce,onNavClick:me,analyticsAction:"menu_tariff_header_to_billing"},n.createElement("span",{className:"menu-tariff-widget__title menu-tariff-widget__title_dark"},R("Trial")),n.createElement("div",{className:"menu-tariff-widget__row"},n.createElement("span",{className:"menu-tariff-widget__muted"},R("Ends in")),n.createElement("span",{className:"menu-tariff-widget__accent-dark"},(0,f.XQ)(q,F,O))))),n.createElement("p",{className:"menu-tariff-widget__note"},R("When the trial ends, you will return to the Free plan.")),n.createElement(C,{billingState:ce,onNavClick:me,analyticsAction:"menu_tariff_choose_plan_trial_expiring"},R("Choose plan"))):"trial_active"===he?n.createElement(_,null,n.createElement("div",{className:"menu-tariff-widget__header"},n.createElement(A,{billingState:ce,onNavClick:me,analyticsAction:"menu_tariff_header_to_billing"},n.createElement("span",{className:"menu-tariff-widget__title menu-tariff-widget__title_dark"},R("Trial active")),$?n.createElement("div",{className:"menu-tariff-widget__row"},n.createElement("span",{className:"menu-tariff-widget__muted"},R("Valid until")),n.createElement("span",{className:"menu-tariff-widget__date-dark"},$)):null)),n.createElement("p",{className:"menu-tariff-widget__note"},R("When the trial ends, you will return to the Free plan.")),n.createElement(C,{billingState:ce,onNavClick:me,analyticsAction:"menu_tariff_choose_plan_trial"},R("Choose plan"))):"paid_expiring"===he?n.createElement(w,{className:"menu-tariff-widget__card_decor menu-tariff-widget__card_decor_paid"},n.createElement("div",{className:"menu-tariff-widget__header"},n.createElement(A,{billingState:ce,onNavClick:me,analyticsAction:"menu_tariff_header_to_billing"},n.createElement("span",{className:"menu-tariff-widget__title"},G),n.createElement("div",{className:"menu-tariff-widget__row"},n.createElement("span",{className:"menu-tariff-widget__muted-white"},R("Ends in")),n.createElement("span",{className:"menu-tariff-widget__accent-white"},(0,f.XQ)(q,F,O))))),W&&te?be():n.createElement(s.N_,{to:"/billing",state:ce,className:"menu-tariff-widget__btn menu-tariff-widget__btn_outline","data-em-analytics":"menu_tariff_extend",onClick:me},R("Extend plan"))):"paid_recurring"===he?n.createElement(w,null,n.createElement("div",{className:"menu-tariff-widget__header"},n.createElement(A,{billingState:ce,onNavClick:me,analyticsAction:"menu_tariff_header_to_billing"},n.createElement("span",{className:"menu-tariff-widget__title"},G),Z?n.createElement("div",{className:"menu-tariff-widget__row"},n.createElement("span",{className:"menu-tariff-widget__muted-white"},R("Valid until")),n.createElement("span",{className:"menu-tariff-widget__date-white"},$)):null)),te?be():null):n.createElement(w,null,n.createElement("div",{className:"menu-tariff-widget__header"},n.createElement(A,{billingState:ce,onNavClick:me,analyticsAction:"menu_tariff_header_to_billing"},n.createElement("span",{className:"menu-tariff-widget__title"},G),Z?n.createElement("div",{className:"menu-tariff-widget__row"},n.createElement("span",{className:"menu-tariff-widget__muted-white"},R("Valid until")),n.createElement("span",{className:"menu-tariff-widget__date-white"},$)):null)),te?n.createElement(c.m_,{title:ie?R("Auto-payment will be available once the subscription is linked in the payment system."):void 0},n.createElement("span",{className:"menu-tariff-widget__recurring-tooltip-wrap"},n.createElement(k,{type:"button",disabled:z||ie,onClick:ie?void 0:ue},n.createElement(m.W,{size:16,strokeWidth:ge,className:"menu-tariff-widget__btn-icon"}),R("Enable auto-payment")))):null)))))};S.defaultProps={isCollapsed:!1,isLocked:!1,isSiderHovered:!0,subscription:null,subscriptionEnd:null,recurringPayments:!1,trialEnabled:!1,isPaying:!1,subscriptionId:null,userId:null,pathname:"",enterpriseUsersLimit:null,enterprisePrice:null,enterprise12Price:null},k.defaultProps={onClick:void 0,disabled:!1,type:"button",className:void 0},A.defaultProps={className:void 0};const I=S},28401:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var n=i(25366),a=i(14365),l=i(76508),r=i(33637),o=i(99614),s=i(25366);const c=({open:e,sideOnOk:t,onCancel:i,initialSlide:c=0})=>{const{__:d}=(0,l.s9)(),m=(0,r.Zp)(),[u,p]=(0,n.useState)(c),h=(0,n.useRef)(null),g=(0,o.u)();(0,n.useEffect)(()=>{e&&h.current&&(h.current.goTo(c,!0),p(c))},[e,c]);const f=(0,n.useMemo)(()=>[{image:d("https://cdn.useblocks.io/1351/241017_18_1sGjUaZ.png"),backgroundColor:"var(--blue-2)",title:d("More editing features"),description:d("Use our visual editor to customize every element to your needs: change borders and their radius, box shadows, paddings, background, and much more.")},{image:d("https://cdn.useblocks.io/1351/241017_18_J7QtvZ3.png"),backgroundColor:"var(--purple-2)",title:d("Work with the HTML code"),description:d("Edit the HTML version of your email template in the Code mode and see the changes in real time. Builder has no code restrictions \u2014 you can create templates of any complexity!")},{image:d("https://cdn.useblocks.io/1351/241017_18_2fjDRfL.png"),backgroundColor:"var(--cyan-2)",title:d("AI image generation"),description:d("Generate stunning visuals for your emails with ease. We have trained our AI model to ensure the highest quality images.")},{image:d("https://cdn.useblocks.io/1351/241017_18_D5C25Zp.png"),backgroundColor:"var(--green-2)",title:d("Stock photos and GIFs"),description:d("Search the vast gallery of stock photos and GIFs to find visuals for any occasion. You can filter the results by image orientation, color scheme, and more.")},{image:d("https://cdn.useblocks.io/1351/241017_18_NDYloAO.png"),backgroundColor:"var(--magenta-2)",title:d("Version history"),description:d("Check who and when made changes to the email template and, if necessary, restore one of the previous versions.")},{image:d("https://cdn.useblocks.io/1351/241017_18_g5mVlmh.png"),backgroundColor:"var(--red-2)",title:d("Image editor"),description:d("Want to resize an image, add some text, or apply a filter? No need to leave builder! You can make all the basic changes in our image editor.")},{image:d("https://cdn.useblocks.io/1351/241017_18_ur8Lh3W.png"),backgroundColor:"var(--orange-2)",title:d("Email optimization"),description:d("Check your email against broken links, missing alt texts, large images, and other issues that might prevent your emails from hitting inboxes.")},{image:d("https://cdn.useblocks.io/1351/241017_18_S5Pld9p.png"),backgroundColor:"var(--volcano-2)",title:d("Team collaboration"),description:d("Share the project with your team and collaborate in real time. Add comments to individual email blocks and discuss necessary edits right in the builder.")},{image:d("https://cdn.useblocks.io/1351/241017_18_tGbb2j9.png"),backgroundColor:"var(--geekblue-2)",title:d("Email testing"),description:d("Check how your email appears across various devices and email clients.")},{image:d("https://cdn.useblocks.io/1351/241017_18_gDXi4uM.png"),backgroundColor:"var(--geekblue-2)",title:d("AI assistant"),description:d("Let our AI assistant enhance your email template! From creating subject lines and preheaders based on the email copy to generating the whole email with your website in mind!")}],[d]);return(0,n.useEffect)(()=>{if(e&&h.current){h.current.goTo(c,!0),p(c);const e=f[c];g({event:"open_modal",action:"open_premium-features_modal",modal_id:"premium-features",offer_id:e.title})}},[e,f,c,g]),s.createElement(a.aF,{open:e,footer:null,onCancel:i,closable:!1,className:"premium-features-modal",classNames:{mask:"premium-features-modal-mask"},styles:{mask:{background:"rgba(0, 0, 0, 0.65)"}},width:1100,style:{maxWidth:"80%"}},s.createElement(a.FN,{dots:!0,slidesToShow:1,slidesToScroll:1,autoplay:!0,className:"carousel-slider",draggable:!0,autoplaySpeed:5e3,initialSlide:u,ref:h},f.map((e,t)=>s.createElement("div",{key:t},s.createElement("div",{className:"carousel-slide",style:{background:`${e.backgroundColor}`}},s.createElement("div",{className:"slide-item-image"},s.createElement("img",{src:e.image,alt:`slide-${t}`})),s.createElement("div",{className:"slide-item-content"},s.createElement("h3",{className:"slide-title"},e.title),s.createElement("p",{className:"slide-description"},e.description)))))),s.createElement("div",{className:"modal-subtitle"},d("This and other features are available for you on any paid plan.")),s.createElement("div",{className:"modal-buttons"},s.createElement(a.$n,{size:"large",onClick:()=>i(!1)},d("Cancel")),s.createElement(a.$n,{type:"primary",size:"large",onClick:()=>{t&&t(),m("/billing"),i(!1)},style:{padding:"0 30px"}},d("Select plan"))))}},606:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(25366),a=i(14365);const l=(0,n.lazy)(()=>Promise.all([i.e(4910),i.e(8380),i.e(9775),i.e(1631),i.e(3193)]).then(i.bind(i,91903))),r={height:"100%"};function o(e){return n.createElement(n.Suspense,{fallback:n.createElement(a.so,{justify:"center",align:"center",style:r},n.createElement(a.tK,{size:"large"}))},n.createElement(l,e))}},34809:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(25366),a=i(33637);const l=({lastProjectId:e})=>{const{pathname:t,search:i}=(0,a.zy)();return!1===e?n.createElement(a.C5,{to:"/projects"}):e&&n.createElement(a.C5,{to:`/projects/${e+t+i}`})}},58803:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(25366),a=i(33637);const l=({to:e})=>n.createElement(a.C5,{to:e})},45060:(e,t,i)=>{"use strict";i.d(t,{A:()=>l});var n=i(25366),a=i(14365);const l=({small:e=!1,style:t={}})=>{const i={width:e?"100%":"100vw",height:"80vh",...t};return n.createElement(a.so,{justify:"center",align:"center",style:i},n.createElement(a.tK,{size:"large"}))}},30420:(e,t,i)=>{"use strict";i.d(t,{A:()=>p});var n=i(25366),a=i(33637),l=i(37666),r=i(90701),o=i(93119),s=i(1382),c=i(99614),d=i(58525),m=i(69064);const u="emailmaker.ru",p=({children:e})=>{const t=(0,a.zy)(),i=(0,r.hN)(),p=(0,d.p)(),[h,g]=(0,l.ok)(),f=(0,c.u)(),[v,{isError:b,isSuccess:y,error:E,data:_}]=(0,o.i2)(),{isError:w,isUninitialized:C,isLoading:k,isSuccess:A,error:S,data:I,refetch:x}=(0,o.CR)("",{skip:m.EW.isPlugin||!p.get(m.A9.em_token)}),L=(0,n.useMemo)(()=>({email:h.get("email"),hash:h.get("hash"),event:"confirmation"===h.get("event")}),[h]);if((0,n.useEffect)(()=>{b?i.error({error:E}):y&&(f({event:"confirm",action:"confirm_email",user_email:(null===_||void 0===_?void 0:_.email)||L.email,user_id:null===I||void 0===I?void 0:I.id}),i.success(_.message),I&&x())},[_,E,b,y,I,x,f]),(0,n.useEffect)(()=>{!(L.email&&L.hash&&L.event)||!1!==(null===I||void 0===I?void 0:I.email_confirmation)&&p.get(m.A9.em_token)||_||v({hash:L.hash,email:L.email,event:L.event}).catch(e=>{}).finally(()=>g(""))},[L,v,I,p,g,_]),(0,n.useEffect)(()=>{w&&S&&(i.error({error:S}),(0,s.Id)(p))},[I,w,S,p]),m.EW.isPlugin)return e;if(!m.EW.isPlugin&&!p.get(m.A9.em_token)&&!t.pathname.includes("auth"))return n.createElement(a.C5,{to:"/auth",state:{from:t}});if((C||k)&&!t.pathname.includes("auth"))return n.createElement(n.Fragment,null);if(w&&!t.pathname.includes("auth"))return n.createElement(a.C5,{to:"/auth",state:{from:t}});if(A){const{id:i,email:l,name:r,locale:o,carrotquest_hash:s,ducalis_hash:c,email_subscription_consent:d,last_used_project:h}=I;return p.set(m.A9.em_id,i,{domain:u}),p.set(m.A9.em_email,l,{domain:u}),p.set(m.A9.em_name,r,{domain:u}),p.set(m.A9.em_locale,o,{domain:u}),p.set(m.A9.em_carrotquest_hash,s,{domain:u}),p.set(m.A9.em_ducalis_hash,c,{domain:u}),p.set(m.A9.em_email_subscription_consent,d,{domain:u}),h&&"/"===t.pathname?n.createElement(a.C5,{to:`/projects/${h}/emails`,replace:!0}):e}return t.pathname.includes("auth")?e:void 0}},91444:(e,t,i)=>{"use strict";i.d(t,{A:()=>k});var n=i(25366),a=i(14365),l=i(33637),r=i(37666),o=i(85472),s=i(76508),c=i(74572),d=i.n(c),m=i(1246),u=i(79349),p=i(2519),h=i(65751),g=i(93119),f=i(64172),v=i(1382),b=i(58525),y=i(99614),E=i(93149),_=i(90989),w=i(69064),C=i(82148);const k=({isMenuCollapsed:e,setIsMenuCollapsed:t,isLocked:i})=>{const{__:c}=(0,s.s9)();let k=(0,o.wA)(),A=(0,l.Zp)();const{projectId:S,emailId:I,blockId:x}=(0,l.g)(),{pathname:L}=(0,l.zy)(),[N,T]=(0,n.useState)(""),B=(0,o.d4)(p.yN),P=(0,o.d4)(h.C1),R=(0,b.p)(),F=(0,y.u)(),O=(0,E.rD)(),M=(0,n.useCallback)(()=>{L.includes("blocks")?T("Blocks"):L.includes("emails")?T("Emails"):L.includes("members")&&T("Members"),i||t(!0)},[L,t,i]);(0,n.useEffect)(()=>{M()},[M]);let j=[],D=[];const V=(null===B||void 0===B?void 0:B.title)||"",W=()=>{try{F({event:"click",action:"editor_tour",project_id:(null===B||void 0===B?void 0:B.id)||S,location:"left_menu"}),window.LP_show(85420)}catch(e){}};let z=[{label:n.createElement("a",{href:"https://emailmaker.ru/help/",target:"_blank",rel:"noopener noreferrer",onClick:()=>{F({event:"click",action:"help_center",project_id:(null===B||void 0===B?void 0:B.id)||S,location:"left_menu"})}},c("Help")),key:"Help center",icon:n.createElement(m.Ay,{icon:"FileQuestion02Icon",size:18,strokeWidth:O.iconStrokeWidth}),className:"help-center"},{label:c("Chat support"),key:"Support chat",icon:n.createElement(m.Ay,{icon:"MessageChatSquareIcon",size:18,strokeWidth:O.iconStrokeWidth}),className:"open-support-chat",onClick:()=>{try{F({event:"click",action:"support_chat",project_id:(null===B||void 0===B?void 0:B.id)||S,location:"left_menu"}),window.carrotquest.open()}catch(e){}}}];(I||x)&&z.push({label:c("Onboarding"),key:"Onboarding",icon:n.createElement(m.Ay,{icon:"LifeBuoy02Icon",size:18,strokeWidth:O.iconStrokeWidth}),className:"open-onboarding",onClick:W});const H=[{label:c("Account settings"),key:"Account settings",icon:n.createElement(m.Ay,{icon:"MenuProfileAccountSettings",size:16,strokeWidth:O.iconStrokeWidth}),className:"em-analytics__account-settings",onClick:()=>{k((0,u.qf)(w.lx.EDIT_PROFILE_MODAL)),i||t(!0)}},{label:n.createElement(r.N_,{to:"/billing",state:{from:L}},c("Billing")),key:"Billing",icon:n.createElement(m.Ay,{icon:"MenuProfileBilling",size:16,strokeWidth:O.iconStrokeWidth}),className:"em-analytics__billing"},{label:c("Sign out"),icon:n.createElement(m.Ay,{icon:"MenuProfileSignOut",size:16,strokeWidth:O.iconStrokeWidth}),key:"Sign out",className:"em-analytics__sign-out",onClick:()=>{F({event:"logout",action:"logout",user_id:null===P||void 0===P?void 0:P.id,user_email:null===P||void 0===P?void 0:P.email,project_id:(null===B||void 0===B?void 0:B.id)||S}),(0,v.Id)(R),k(g.Q2.util.resetApiState()),A("/auth",{replace:!0})}}],U=(null===P||void 0===P?void 0:P.name)||(null===P||void 0===P?void 0:P.username)||"",q=[{type:"group",key:"User profile header",label:n.createElement("div",{className:"project-menu-profile-popup__header"},n.createElement("div",{className:"project-menu-profile-popup__avatar","aria-hidden":!0},n.createElement(a.eu,{size:40,className:"project-menu-profile-popup__avatar-icon",style:{fontSize:16}},(0,_.uD)((0,_.MR)(P)))),n.createElement("div",{className:"project-menu-profile-popup__meta"},U?n.createElement("div",{className:"project-menu-profile-popup__name"},U):null,null!==P&&void 0!==P&&P.email?n.createElement("div",{className:"project-menu-profile-popup__email"},P.email):null)),children:H}],$="/projects"+(S?"/"+S+"/emails?page=1":""),{data:Z=[]}=(0,f.kB)(6,{skip:!S}),G=(0,n.useMemo)(()=>{if(!S)return[];const e=String(S);return(Z||[]).filter(t=>null!=(null===t||void 0===t?void 0:t.id)&&String(t.id)!==e).slice(0,5).map(e=>({label:n.createElement("span",{className:"project-menu__recent-row"},n.createElement(r.N_,{className:"project-menu__recent-row-title",to:`/projects/${e.id}/emails?page=1`,rel:"noopener noreferrer"},e.title),n.createElement(r.N_,{className:"project-menu__recent-row-mail",to:`/projects/${e.id}/emails?page=1`,rel:"noopener noreferrer","aria-label":c("Emails")},n.createElement("span",{className:"project-menu__recent-row-mail-icon"},n.createElement(m.Ay,{icon:"Email",size:16,strokeWidth:O.iconStrokeWidth})),n.createElement("span",{className:"project-menu__recent-row-mail-count"},Array.isArray(e.emails)?e.emails.length:Number(e.emails)||0))),key:`frequent-project-${e.id}`,className:"project-menu__frequent-project-item"}))},[Z,S,O.iconStrokeWidth,c]),K=[{label:n.createElement(r.N_,{style:{fontSize:16},to:$},V),key:"Project",popupOffset:[10,0],style:{fontWeight:500},icon:S?n.createElement(r.N_,{to:$,className:"project-menu__block",style:{fontSize:"18px",zIndex:99}},n.createElement(a.$n,{type:"primary",className:"project-menu__block-button"},null===V||void 0===V?void 0:V.split(" ").slice(0,2).map(e=>Array.from(e)[0]))):n.createElement(r.N_,{to:$,rel:"noopener noreferrer",className:"project-menu__block"},!e||i?n.createElement("div",{dangerouslySetInnerHTML:{__html:w.KN}}):n.createElement("div",{dangerouslySetInnerHTML:{__html:w.DS}})),className:d()("project-menu__list-item project-menu__list-item_project project-menu__list-item_project",{"project-menu__list-item_logo":!S,"project-menu__list-item_project":S}),popupClassName:"project-menu__submenu-popup",children:S?[{type:"group",label:c("Projects"),key:"recent-projects-group",children:G},{type:"divider",key:"recent-projects-footer-divider",className:"project-menu__projects-section-divider",style:{margin:"0 -16px"}},{label:n.createElement(r.N_,{to:"/projects"},c("List of projects")),key:"List of projects",icon:n.createElement(m.Ay,{icon:"ElementListUL",size:16,strokeWidth:O.iconStrokeWidth}),className:"em-analytics__sign-out project-menu__all-projects-item"}]:void 0},{type:"divider"}];return j.push({icon:n.createElement(m.Ay,{icon:"Email",size:22,strokeWidth:O.iconStrokeWidth}),label:n.createElement(r.N_,{to:`/projects/${S}/emails`,rel:"noopener noreferrer"},c("Emails")),key:"Emails",className:"project-menu__list-item em-analytics__project-menu-emails"},{icon:n.createElement(m.Ay,{icon:"Grid01Icon",size:22,strokeWidth:O.iconStrokeWidth}),label:n.createElement(r.N_,{to:`/projects/${S}/blocks`,rel:"noopener noreferrer"},c("Blocks")),key:"Blocks",className:"project-menu__list-item em-analytics__project-menu-blocks"},{icon:n.createElement(m.Ay,{icon:"Users02Icon",size:22,strokeWidth:O.iconStrokeWidth}),label:n.createElement(r.N_,{to:`/projects/${S}/members`,rel:"noopener noreferrer"},c("Members")),key:"Members",className:"project-menu__list-item em-analytics__project-menu-members"}),D.push({icon:n.createElement(m.Ay,{icon:"AnnotationQuestionIcon",size:22,strokeWidth:O.iconStrokeWidth}),label:c("Help menu"),key:"Help menu",className:"project-menu__list-item support-center-menu",children:z},{icon:n.createElement(m.Ay,{icon:"BellRinging04Icon",size:22,strokeWidth:O.iconStrokeWidth}),label:c("What's new"),key:"What's new",className:"project-menu__list-item ducalis-changelog-widget em-analytics__project-menu-ducalis",onClick:()=>{F({event:"click",action:"whats_new",project_id:(null===B||void 0===B?void 0:B.id)||S,location:"left_menu"})}},{icon:n.createElement("span",{style:{width:"22px",height:"22px",fontSize:"18px",verticalAlign:"baseline"},className:"user-profile__avatar anticon"},n.createElement(a.eu,{size:22,className:"user-profile__avatar-icon",style:{fontSize:10,display:"flex",alignItems:"center",justifyContent:"center"}},(0,_.uD)((0,_.MR)(P)))),label:(null===P||void 0===P?void 0:P.name)||null,key:"User profile",className:"project-menu__list-item user-profile",popupClassName:"project-menu-profile-popup",popupOffset:[8,0],children:q}),n.createElement(n.Fragment,null,n.createElement("div",{className:"project-menu"},n.createElement("div",null,n.createElement(a.W1,{disabledOverflow:!0,className:"project-menu__list project-menu__list_top",style:{fontSize:16},items:K,triggerSubMenuAction:"hover",subMenuOpenDelay:.3,subMenuCloseDelay:.6,selectable:!1}),S&&n.createElement(a.W1,{disabledOverflow:!0,selectable:!0,selectedKeys:[N],className:"project-menu__list project-menu__list_second",style:{fontSize:16,marginTop:30},items:j,triggerSubMenuAction:"hover"})),n.createElement("div",{className:"project-menu__bottom-stack"},n.createElement(C.Ay,{isCollapsed:e&&!i,isLocked:i,subscription:P.subscription,subscriptionEnd:P.subscription_end,recurringPayments:P.recurring_payments,trialEnabled:P.trial_enabled,isPaying:P.is_paying,subscriptionId:P.subscription_id,userId:P.id,pathname:L,enterpriseUsersLimit:P.enterprise_users_limit,enterprisePrice:P.enterprise_price,enterprise12Price:P.enterprise_12_price}),n.createElement(a.W1,{disabledOverflow:!0,selectable:!0,selectedKeys:["Emails"],forceSubMenuRender:"true",className:"project-menu__list project-menu__list_bottom",style:{fontSize:14,marginBottom:6},subMenuOpenDelay:.3,subMenuCloseDelay:.6,items:D,triggerSubMenuAction:"hover"}))))}},93718:(e,t,i)=>{var n={"./en_US.ts":[35333,2466],"./ru_RU.ts":[12434,6859]};function a(e){if(!i.o(n,e))return Promise.resolve().then(()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t});var t=n[e],a=t[0];return i.e(t[1]).then(()=>i(a))}a.keys=()=>Object.keys(n),a.id=93718,e.exports=a},84395:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAcCAYAAAAeC42RAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALqADAAQAAAABAAAAHAAAAACJc8/iAAAEmElEQVRYCd1YW2hcRRj+/tmz12TTXLombpbWpo0PKfrim3gDCxJ88AZ9UBRiizew+lSqCPaiFEUQRavgnSBCVLyRF/FBn8SHCoqKD0pam4uJ3U0sSfY+v/8cd7c9u3vO2Zx90oHdmfnn+7/55j9zOXOA/2iiTnSfQyYeg95HULdr8IT4jBO4X/INBp2X/Bf5fVeBnk5j6ayUW1L+/V07uVC6iwk3K+BqAQzJL0KMvNjmGPgV4I/jvQOztP/n9RaCJoOn8BzGdjBKjzL4biFON/m2VIWsJLivNKxnhnH2WwPIv3P59QA9QlpNMvG2FqcWA/1JhOk8rFMDU2fOtDTXDK7CsxjZz7BeFNG+gtuRa8XHkqeon6J4AIx4O4ynjbCkmR/uuX/xs3a4tsJXMPqUTIVjEil5qltPKl5F374saEyhMjEIDgeiMR0zk34pXkofpgdPly9V0sK4gsxJGc3xwKITGskbV2ENlhFaKyL8UxYoywQKlohYPV4ML51odndE/DzSt0kXH4loqxnYUV3YkjdlEd1RcMArmV5UdncwvR1ezooiviM6tfhp3dqI+BJGUrJDTAcWLYyRK/Itok1H1vw6VM45mLqATvMq47W/3treWG8N4RZCTwpJslOiZhyFGYm97ruYNXcBkN6DJgKN9CLyUN3fFr6KfrMnH6gbg+SRTAHWUMnVVa2Xoda6i7rMhsM8szdiOrGFV5C8QcqBo22IwiLcL6lc0Q/i3U6IljZW7zQgWzhD3+Pt4dOqZMcfcuxWbR3UBfcn0tahjVEz3WrMtnDZDHa2wXRsspJVqETVF09FwZS1L84HsNu01yKOlA/Yu9mS/Sjkv/BIM1SpS+GMQVv4UREvEfcPl5d0o9lft83QIcy9t9rJo44CWso5d6R/iy6EwNUaowecTYgsf5wHhWlaNX/2VJH8D1MJmvSmAudDvu4clQHKr6vE5vW3Jlxm3UxXZOJcyYZ9KThpb8G+OC+ArKbPTbsd8RRoVspdzfPSfMyrPzk7pIOhqDfGt5Wy8XD5SwOzhRPm81I46evnATDCq3+7v5vpvgj0gM/gPPhNk9wN3qX7ljdM2Rb+r5Fel3zZlIMkLhM2f3A/fCujvdJb8IXJjFypEHq2rq0hfDvmF8TY1ftKcS6B4u+JOncjr470QKe2fglqENjTWB/c1qMT629cNmzsDeGmksLCrCzUE6YcNG183+dYqNXBGMpjfUHp7PNBbmMvJA4sfYK5Pcs9CxNyM7GXjJOTcU04i8Wn5Yx7QlocA3Mi3Wsqbm5BWYTG5YS/aghsBaIxHbBcgZ6PTS0eae7NddLlkJmUzw2vynvwrmanDurroR5+Jf4ybQr2uNlRtpzkssxVPJY4uPBhO19PynmMZqLgQxL4e2XwI+0InDZak/o38u3luWEs2J8nNt9OXysvMkeIq5PygN23nYtEKxLl9/KIBPs8cZHHTLN0Qr76yH2UbpGHPi7r4EoZcb/UN2X+rck29aOUv66AZ0axeO5S33q58GZmDystAaDr5AmMySQYFWZLyPNQvCwvHvJRiT6IbcS+oEO/yXXpf5r+AQRWXmGeSGSoAAAAAElFTkSuQmCC"},35711:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAAAcCAYAAADoQggJAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAXqADAAQAAAABAAAAHAAAAADtxwGRAAAGR0lEQVRoBe1ZXWwUVRS+Z6bd/sJWRVBEA/JgEOMf0QcM2pAIKtICAuKDD/4RTCREofJgooOJEVswWAjGmEiMwZiUQFsgQZTwE/wLRngBQgRskCi1ULpla7vLzj1+d7ezzN6dWdrdWR5M72bm3nPuOd+5882dM/fOCjFSRhgYYWCEgaIzQLkihBvq9wvBtTlsJDGdYOL3I03tLTnsRM3q+Q9IKRsFyyeIqMzPlolO9ja23av6p1qLQuf7YjE/WyKxpqex3fLqH726boUhxVIWIonlZYOxL+hZ17ZD7OQx5gB3kZSCElIYCRZOm9A2bOjVofSudlIPe+iZJPcZCfuUsPl3g8XGv5on/ugV09EZTiPP2gDp98F3S3jlvGl+GGNX1I1jaW8nwbNyke7n76vH9Xr1hRvqXicpNuQiPcNvLl0UJC4JOORVCN6Cq4WgaWgsEbb84Y5lZ3aOX3pqjB9eocQ7uFWYFg2OoNexEL0E3d26vhjyhDdn3wxca7jYxLw1wyfrJrjucVaf45nR8awpafekV8+Oc3rddVDEC6SImcKyfPD4eXfQYravlISWAX/scGMYnPgMM1YO3c8h2XVD1MRPF1acPGrLxKZpS38tTasHGz5E6WbXl4nFreHokZm6ZfXbc6ZgPCodFb2MWzV/rCBank+g+OKyE4LtTZm+yCHgUlHsHKl0pAgeJNnFNahO/lIYyfyjmgs7r4anp3TXzoERn4Q0zFnXoFMtU5ZOx2hKdH0gspE5/AGWjyPWbflil5ql68Fnh5+/i2M/E089XtQL9Y7Mkeu9w5VZLNBd8PLNegp0m0BkpDk22CoEq38xncNK5UnM2zNeOMnkkj3RNdPs24NFxTOakQiWeCEmV6+sTy/faq3aEiKerQcNTMbyzymjo0eexiVPdeR869iL5acpUTYH5B9TGE4mV600penG0KLgxX2nbhk08cIges4JcjQarsV4b3HkwGtXqiEy3wsKP/YKnYq9XPkQ8BaB8MPI5wOZXKtcPlg43cKNSef1ZKfqYnUi6nPMnTr/3Mt8AIBq6Xa/A6ZqMuz0rMMquy5zwMqC/4DVz2i8oKSCCh4n5Z96yvgRDSuCOI2I94GmH7LY/1rlNhhvq2j+d4Lg+BTksioDuyMsVwbnv7oBJg4bZxOTLqEIwIFNl3oa1TZDjVDKuB40f+KJLgO2Fbgb3KDYDc6osebV9FitEYO43jUhUmZkfI3RGMkBuR3zadt28r4ahnwHV6sh8Oe49INDfaRHNdTPMEl6P53nvVfDtiuiasdNnNQRwlGJY7Ak+hNHnLZT50+8QjCNNuzSMojHjRhPUfFg9ar5F5ntu5xATm0yHbKJax250Dr8xtxJIH2xjmPaRrM0OSu+bufImLcfYiP8mCMHVWM69JebFZOjGuBQJ4TmlhJ71rZ2YPb+pHdidbEIs+cpXQ/bbjFQpdJMMMU0mSuMdwGmT6A93R+3/RlMkMJQpKRVFzds/1tHKYj4JBgbu3VQvFGwbpVZGxmsCw53b9zam2Wfp4KlXII0nzXbkWfX5QkZpJtEmrV617dt9gLVZ4qXTU6dJHEId0+9QtxJFlt2t5iCwEbiq5xgw+1kcU+WC4tDkabWfVn6G6lgcQyLjLciTbv3+4UtmPjyvtDReFX8LLif7BdkUH8lNKpiz3VsCu7G15b1BYPoACQuYNFwQVdnyMR9WL0cxUt275WmXbsw79Rk9C0FE9+1uSWKz7DfIUJu4on3dVkt+jvGd2D5dOAZ+61n9MO7hGjPx93XB6vDtT1NbZ/4GugdQ0h0hed4FZQ5558gSRMyvtfHF7SMfyO24QupDBq3GHiBEF8uYr/g0erwHyASAPG3/v0B9DB1l8t4cwBINwQiEOI71+3tA7U5Xmh8rHdt++liXhFSarMaRzFjBIkdCPFqQPjor/K8dyHxjXdHYNpLZdXmp4Gh3QCgwIg3jBBWLHTVY8w2vmTghVekgv9K8cVkeae1458iRSgKbM5VDQn5JT6EHfSKjO31Sbf+8kctkfDq+uVYAdzu1mMXEYk27siwFQljH5VkfzhSfth0dDn+x48Lu2aSWOPIeg3bzpsqe7d0WAcG9D4ll4bonLzKvv6mLHGP6wv82+S5AMDuM7jdttdAR3QjDPzvGfgP96UKftxHR1QAAAAASUVORK5CYII="},12718:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAgCAYAAAAMq2gFAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGqADAAQAAAABAAAAIAAAAACnWBYtAAAG/ElEQVRIDa1Wa2xUxxU+Z+5j7768u17byMYpxrWxwbaIYopKSImgCq2jpFX+hPYfVIrJH6KoqlQJqarVH0mrRlErFClJ60aNqKpIVdMWVygVQmmxwY8amwKlNgbMYhaz6/Xuep/3MTM9u6CNbeJgSxnpaubOnHO+c858c2YQ1tnMD0OdfM7rLd7Xtepf3xxcp1pFTK2MHjNgPs1vu7ANvdAUP9YSYgA3FulrPTFjPka1vLxuIDDADzp0oEc8g1mlVQg4FwIUsq87AlGw8f1x+4sA1w9EVtRGp0qtdzZnY9qTTMEeAHk3kcr8hIW0i7Qc+dKAmApuUKFa8YqbwmIh6WADAB6TpnMx8fq2KQbWn4JPz2bwZeCrQSnVG2iq1ECVXlbF08wlbAQIopQHKLJvgYQD6LCWe2e2ha4fa3FJ8mC55Y0BPdR0tRdblBrHRwC58pSELuoPcUU5Y7jhR2FQDy4HKY3VvUf/8vx8OChTXt1KHN9zFhDJmS9uTIegVucMwRIbt5LaCyS9idwPUBBeCfh9YOLZxGutzyVV7M+ZbK7xnf8lVK/DmzTuGJQVp+aX40n9ramIHo5mZ4/sL64Jx0BjXpHAEJ/GlPZPabMuwXErIhqkU0VpZFJIS+SMVsORevTF7oJak8nWzYd8nRrnDQ7nh0wr9ZaYNyZIYXZNIFpAt8z4Ws3/wGCkP5refRgR9oEitqzSeUVyHBYFlirTe2ssGaxdyjdONjUEUBHvOYDT4TdGB1AWf79ghxPQ12GtMgAirQbmP6nrTv91z3HUoI1iaGAgy/YEQooxuKb57F9ZzJ5aqk3eKS8YluOmjXG7HGfJUdVagXIHolgSYCSqXZnb8ItL/02Jl7SAkq/g2QuuTRB1b0dknejIMADzcJAmRXaZUjcnGY4UUuxaDWiJbZEzdhlIldJjcMdXVSheTXvdPqEoIbLYQx4+SUkaBF78sCC8ynIgHnc1WwsukpNbH7BHls5OSgr4GzC40Fb489mKVzSo0FvjQm+/E+/wFqyolHK2JCQRaqn7NnnZ/8LMG0c/iPe0xexgsrRWaSRMJ2ZYgvgNk9Y3bY3/NhjwjVTWHw7KEZXGUhJlHNsfzOZPptx6EhRlNxnYS2kgyoJ/wQ51DKSfUWfNeugJjtwKmDwV1HiCZM4zCRNEtGm0xM1O62s25vrEmkBI/isSXK3RxCcxt386V6XGAUQHKbgofZoltK9cyHYWz2c7TQF4q9uMFL/umo0pXP4ODJxpzX4ce2D89GqM8n8losqq48CrY5fUkIp+wSARCfjSww11melwcJfNmEEH0+hf+M6B/lq4Jw/KK85zatGHnMPxjysmPm+wAog2H5ocpyegYZL25WmKsj5UMJWn7i+ETB2uzns8oazmIoYhVQHwIcNmItIreQmT4TeHroe8dUMziy029OHaqSt5oQlZ9Ernu7RjJIhbiSlO0LLzwUVbWr70+Ji7ZotQfbrpBF0CmFtKpRml6FUYDEpQJpLppXvNxplo6D2ZHz+KK+6nSkTkWbGlWBipEmKnghgsAUuUUSol/6LoPnD2n/TvcIuX2iXuGYv0DmWthi15q7qJyo5KidiHgHtBcV5Oy6p30oujF0h9Bb3LQIoQeV3KrJeLr1JJVYlldylto9SfIpDbzK1fA13sZGCrjMjZvunv2xP5lut30nvOZ/Kbv0GFmNJJqQQRJPYdApTd4Z+P7dJV5SObexYXftyeKQNpUhQ8XBR0kAGKIk6hRAngU8crB7riXcn9p/c7Rw4/tZ2R25RVvdp9s8GjJUcohaOZQmNIgtUGkjfQza4SWVqFhHpibCBnLl5G25qC3t5iGegJ204FHD4HAu8ggzdBsSaODvzwbil9azVDT6a7Nn80PvKPyXeNzk2Hyfg+RGvLMnmFjubrdBMNwxOBk2rQFDGdy1FVCMGketYwjdtpPZ1dpvC5w7wJ/plFbIEdkSOmuL+Lgm0kAukPhDFHBeAGQ/8fFPBMglefU+kCmdU5l7oKmd5TvROkQFvzaGNI/lGxKS2S91bKxPBsWt1Nk88CFOupEJXuIYe+e7Rnd6kyXeKYHebFQhz6/lhYca8/av6zmR+c2nmQhI+Qoe/lLIhfianKlfuKTnN0pZebIOMZYPguuTMEPx0boNmK0xV6PxReVzcyp8wkC7iZmFFKV+kcXJZMXgF03gbwRMFYyCwHKRndEJDNoXQIcwt5JWA5pUsOU4QzKVHQuw6n6NkwA9FMDt6fWnFYNwxkcSjYXC5mTGymfShQKMRMPEF19yL0DUZKBtdqG4poOq4sxXJIxuU5AjhH5+ZTMkxP4sIjEawGXDdQxhaZPMerS0U1R1s8ThHdgETdLThx+st95KezTqZo47UlW87Az/49uNrjx/3/H9o0K/vZg8gqAAAAAElFTkSuQmCC"},78232:e=>{"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEwAAAAYCAYAAABQiBvKAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAATKADAAQAAAABAAAAGAAAAADbKq7rAAAIqklEQVRYCe1Yf3DURxV/u9/v3SWQAAVFQFJCkwOCQIdSqBYVcGq1NZGQSBwNUKFCAh2mMuA444zT+0NnOiOj49iBJK1gW5jaAElqq4hTBKSKlpZKKL+S8KOA/AjYlEDC5e6+u372LnvZ7/cuSRPHGf7oztzse5/39n133+7b9/aIPmkD8gAbkPZdojzt6Tc/09XRPoMxGiU5RZiwL2YMD5xo3Pi1jv/3FHtzGDv/8iMbLOYs40RT001CShklxg7eoYzlwSW7L6XTmfjkrgm2xZsYYzBjNOb8rKmqNJS3amexxewdhoRg91RzzaLpJqbovOUNOcxHlZzRE9D5rFcO58UkyXekZM+01Cz6s1eu+EkVdfeT5NXQm2nOSUra31xT/NV0Y7yYeyE9Upm79M2f5yzZN10w9gVB9DvOJUjJ9Y9zCnAmH8mk8C96hrkpn8/6DhA/Fmj3/IT0Cf8WpWmTlduDJ3Swg02mlVAoxPMrGn7E/fI0I/njdM5S+li0TZJ9npMca47XdCgkOZy5E856CJhrTsTkbIJc6/bV96uUU/6Xt+G48pgUU8/dHvmWJPehxI4/2tsHhEOFXhlGv3q8puiCwoWklJOERb9vjtl+dcYmJuWzJCnTxHujLZ88lk72ypXXi4Dnp5PB9vCCi/VpI8mr36/D9ICc8r82P3Fk2a+eOfE4tYazNYxeDr+07bHxBhAnCypeDyIQH/Tg0nFkVRLjLGWSkmKNWp5fWT+fBK3UvNGrfWvFifsAxFXQsYSMhUf4x5409BIkjpYgsT4FN4CoRfMMtlfyYztMWRDSevvA9WB47dHFdKFzZNKokF1fSjLdhCCnBHEScOFSHj6TU3JIYePX1WYySbkuORiLZSZDkgtWQeS5/4jOSWbPzey8dV9T9aKJgbbIBO4LT0ColUkmtxz65cN3vDYnV+6ahbnM9eImz4lNMfneaLs3QTr8bE3hxeDK+sar4ew56xpL6Nlpv6dgVisWyWZC/xU9ZvHiWuuolMs1n+wl7aQQNhttSNgaKxl9CuFgtpuxAPsgAWD5rAELNcVwH2Mbm6uL4k6nl5fRcaIINC7jp5KHK4HokQ7Za3EazcPRyYh1wcn3aB3Q8zXdV28a6UuvW4Y1ENurmBtdQ+mHjQvpWngYViFmmYP/NTIwF+ucbGII3TDjvq0akw4VYNddGwbbV1p+/Xh7XCcE30jyaX3dY2GrplTW52q+vz5xkoVKPsmGe7QOYfzPJBAn2NT8tduwmL7bAB0GY9yOO0yZbYsOodDJxygm2APIUphHokkhl2ha96gsaptqim5onphVkKS7Cdw0rUkMJxE2m5O8JiTdLyQ7NGlV/fr88j/2u8AhHXYZdtTr+F1w/DvaZHfPZVe2a+M98jg7YIeFefsRdeFqYyfax1Ddv2eOaHnxK/cpbMpTdaNQbpRqeaKXQnBns4kh800z+QTNz7oxpxonMx7CJo7SYgxO8EY+tOtw8Pt1qaHfrTxrVbUP+/iUORa7+p+w1XnAlvwfJq5oJp05XszLD9hhFzaXt8HIe6ahmnMP05XIqPjFL7roG1hMT0aIK7KDLZtLPRNknzNtxGnhHDGx5ue/tYs4PWdiJo3vTCLOtuRX1L86P7TPFd5K75Yz+svoZptj4P3dag0RuxPZmHWZMs65qtH6bAN2mLLGpfUn02oM9+n6oyXxLCMttsyUKVoy5lr0jKV7hiIkJnj1sPhTXqy5quRpJMrVONWJu82rAB53Xdnlyx+lXPjCprVedYvLrQo7c926jLv3gksu5TwXn4YZlMNQSx3AArprn4TVm9GMB1XtBe940/eZIdmZu81v3x7WgaeNHGViig5YPMVhCm+uXlglmAzimz9FtvtQYd6G01acV/Ha1zWOUC1AEnEV1cgip7LEvQfjOjvKHBLMdY/Bxsi8NQ052ka6flAOiznDTsKYa3dwYh6KSLEUjshwfUjwau+jmMeQIT31Fe6Wtvc3FV90jTWYM1Ulrc3Vi35CMf9s5M89hihJMim+qxk84tYgC7teB5L4/pvsUhBPranqh3C/pvV1zyPyi5pO1w/KYed/uyCM3fi72yDL4iQq3ZgqJfhWN6ZCmqdkSMTVCa9eOr5pS+HZDG6jTJBnvXLUaKMVNnnFa9nYgJSrAQ6sRLI5rn+o8X6QaiPldeJSGZTDlAVM7i2XpQTzaTfGX3SVEt1ClAupGVKSOrXxlldZN3r66u3JolLjuj+2oLMd31fJx9WwiTcUICwHLwTqt+RwDdYMpz5PWEpm0eP666WwDnuusZQhjMS2FFABHH8ZYXVmgxPf1bzlUOUdylwRrGjYYQnxhuULnO7wR8L2zajPtv1BsZcqUFqk1Eyo3Opzv7cvg7GPVnrMa9Mfo2cPqIy7P7TAdUfrgYN2WEtN4XvBVQ2dMDREG3P37JQIBA67sUS44CF8rxfnsudvHWTVGQipCQihDQ5jG5xYJOaLUQf5fcyRMgvOTokM6B/NZvbu9kD7HDh/kmkfl3+HQJVhYppGzZgF/SzNYyPsa5dvzwDvKnG0POXDWtB/j2SOmqY3PWSzF/DMcdU5cd0AjcOCU8LNIakf3Vgf895xamOHY5wKs5Q5IzxP29Iqf7emqJOks8I7J0miNjaubWK6H7L6Oq++Q848L6b5QZ8wZYBxuQd/K3qqeiWgdhblNfojZi9iYhrk3kW3trxQeknpTV/9xoiwE51ojumLxslqCHB7xbHqwrbcNX8YQ7EIEoK7IYM/dz60POxGExzKj7+RhbxtvGuhH0ynq7D/yWHE/HsZi573GkfcbD+9ZWHaEIDuePyd7B4jWTJ0b925fscO3PNteLQci5iJyed7SxDYuIbjvYPb1ktNm76ZHOtzYsWwrf65SDbotbVUl6YNL6Xk98cuRhxfI8YZrxPuTxrwENigu7uNf7J2ZMBnj0PRmSWjPJoho+eO/6bsw7t71p/MLumB/wJBHTFIPdd6VwAAAABJRU5ErkJggg=="},16403:()=>{},63779:()=>{},77199:()=>{}}]);
2
+ //# sourceMappingURL=4994.e5900460.js.map