(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.easy-mail-input-number-select{width:100%}.easy-mail-input-number-select .ant-select-selector{padding:0!important}.easy-mail-input-number-select .ant-select-selection-item{padding:0!important;text-align:center!important}.easy-mail-input-number-select-option{text-align:center!important;padding:0!important;line-height:32px!important}.easy-mail-input-number-input{text-align:left}.easy-mail-input-number-input .ant-input-number-input{width:calc(100% - 34px)!important}.easy-mail-input-number-input .ant-input-number-handler-wrap{width:22px!important;opacity:1!important}.easy-marl-src-container label{width:100%}.easy-marl-src-container label:after{content:""!important;margin:0!important}html,body{margin:0;overflow:hidden}*{box-sizing:border-box}.easy-mail-container.dark{scrollbar-color:rgba(255,255,255,.25) rgba(253,253,253,.12)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})(); (function(y,d){typeof exports=="object"&&typeof module<"u"?module.exports=d(require("react"),require("antd"),require("mjml-browser"),require("@ant-design/icons")):typeof define=="function"&&define.amd?define(["react","antd","mjml-browser","@ant-design/icons"],d):(y=typeof globalThis<"u"?globalThis:y||self,y.Easymail=d(y.React,y.antd,y.mjmlBrowser,y["@ant-design/icons"]))})(this,function(y,d,yt,O){"use strict";var We={exports:{}},Me={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var jt;function yr(){if(jt)return Me;jt=1;var t=y,r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(m,u,x){var f,b={},c=null,p=null;x!==void 0&&(c=""+x),u.key!==void 0&&(c=""+u.key),u.ref!==void 0&&(p=u.ref);for(f in u)n.call(u,f)&&!l.hasOwnProperty(f)&&(b[f]=u[f]);if(m&&m.defaultProps)for(f in u=m.defaultProps,u)b[f]===void 0&&(b[f]=u[f]);return{$$typeof:r,type:m,key:c,ref:p,props:b,_owner:s.current}}return Me.Fragment=o,Me.jsx=a,Me.jsxs=a,Me}var Ie={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var vt;function jr(){return vt||(vt=1,process.env.NODE_ENV!=="production"&&function(){var t=y,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),m=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function C(i){if(i===null||typeof i!="object")return null;var h=g&&i[g]||i[v];return typeof h=="function"?h:null}var I=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function D(i){{for(var h=arguments.length,j=new Array(h>1?h-1:0),w=1;w=1&&G>=0&&A[P]!==Z[G];)G--;for(;P>=1&&G>=0;P--,G--)if(A[P]!==Z[G]){if(P!==1||G!==1)do if(P--,G--,G<0||A[P]!==Z[G]){var K=` `+A[P].replace(" at new "," at ");return i.displayName&&K.includes("")&&(K=K.replace("",i.displayName)),typeof i=="function"&&Ve.set(i,K),K}while(P>=1&&G>=0);break}}}finally{pt=!1,dt.current=F,an(),Error.prepareStackTrace=k}var we=i?i.displayName||i.name:"",de=we?Ge(we):"";return typeof i=="function"&&Ve.set(i,de),de}function dn(i,h,j){return sr(i,!1)}function un(i){var h=i.prototype;return!!(h&&h.isReactComponent)}function Je(i,h,j){if(i==null)return"";if(typeof i=="function")return sr(i,un(i));if(typeof i=="string")return Ge(i);switch(i){case x:return Ge("Suspense");case f:return Ge("SuspenseList")}if(typeof i=="object")switch(i.$$typeof){case u:return dn(i.render);case b:return Je(i.type,h,j);case c:{var w=i,k=w._payload,F=w._init;try{return Je(F(k),h,j)}catch{}}}return""}var Ne=Object.prototype.hasOwnProperty,ir={},lr=I.ReactDebugCurrentFrame;function Ze(i){if(i){var h=i._owner,j=Je(i.type,i._source,h?h.type:null);lr.setExtraStackFrame(j)}else lr.setExtraStackFrame(null)}function pn(i,h,j,w,k){{var F=Function.call.bind(Ne);for(var T in i)if(F(i,T)){var A=void 0;try{if(typeof i[T]!="function"){var Z=Error((w||"React class")+": "+j+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Z.name="Invariant Violation",Z}A=i[T](h,T,w,j,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(P){A=P}A&&!(A instanceof Error)&&(Ze(k),D("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",w||"React class",j,T,typeof A),Ze(null)),A instanceof Error&&!(A.message in ir)&&(ir[A.message]=!0,Ze(k),D("Failed %s type: %s",j,A.message),Ze(null))}}}var mn=Array.isArray;function mt(i){return mn(i)}function gn(i){{var h=typeof Symbol=="function"&&Symbol.toStringTag,j=h&&i[Symbol.toStringTag]||i.constructor.name||"Object";return j}}function hn(i){try{return ar(i),!1}catch{return!0}}function ar(i){return""+i}function cr(i){if(hn(i))return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",gn(i)),ar(i)}var _e=I.ReactCurrentOwner,bn={key:!0,ref:!0,__self:!0,__source:!0},dr,ur,gt;gt={};function fn(i){if(Ne.call(i,"ref")){var h=Object.getOwnPropertyDescriptor(i,"ref").get;if(h&&h.isReactWarning)return!1}return i.ref!==void 0}function xn(i){if(Ne.call(i,"key")){var h=Object.getOwnPropertyDescriptor(i,"key").get;if(h&&h.isReactWarning)return!1}return i.key!==void 0}function yn(i,h){if(typeof i.ref=="string"&&_e.current&&h&&_e.current.stateNode!==h){var j=Y(_e.current.type);gt[j]||(D('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Y(_e.current.type),i.ref),gt[j]=!0)}}function jn(i,h){{var j=function(){dr||(dr=!0,D("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};j.isReactWarning=!0,Object.defineProperty(i,"key",{get:j,configurable:!0})}}function vn(i,h){{var j=function(){ur||(ur=!0,D("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};j.isReactWarning=!0,Object.defineProperty(i,"ref",{get:j,configurable:!0})}}var Cn=function(i,h,j,w,k,F,T){var A={$$typeof:r,type:i,key:h,ref:j,props:T,_owner:F};return A._store={},Object.defineProperty(A._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(A,"_self",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.defineProperty(A,"_source",{configurable:!1,enumerable:!1,writable:!1,value:k}),Object.freeze&&(Object.freeze(A.props),Object.freeze(A)),A};function wn(i,h,j,w,k){{var F,T={},A=null,Z=null;j!==void 0&&(cr(j),A=""+j),xn(h)&&(cr(h.key),A=""+h.key),fn(h)&&(Z=h.ref,yn(h,k));for(F in h)Ne.call(h,F)&&!bn.hasOwnProperty(F)&&(T[F]=h[F]);if(i&&i.defaultProps){var P=i.defaultProps;for(F in P)T[F]===void 0&&(T[F]=P[F])}if(A||Z){var G=typeof i=="function"?i.displayName||i.name||"Unknown":i;A&&jn(T,G),Z&&vn(T,G)}return Cn(i,A,Z,k,w,_e.current,T)}}var ht=I.ReactCurrentOwner,pr=I.ReactDebugCurrentFrame;function Ce(i){if(i){var h=i._owner,j=Je(i.type,i._source,h?h.type:null);pr.setExtraStackFrame(j)}else pr.setExtraStackFrame(null)}var bt;bt=!1;function ft(i){return typeof i=="object"&&i!==null&&i.$$typeof===r}function mr(){{if(ht.current){var i=Y(ht.current.type);if(i)return` Check the render method of \``+i+"`."}return""}}function Mn(i){return""}var gr={};function In(i){{var h=mr();if(!h){var j=typeof i=="string"?i:i.displayName||i.name;j&&(h=` Check the top-level render call using <`+j+">.")}return h}}function hr(i,h){{if(!i._store||i._store.validated||i.key!=null)return;i._store.validated=!0;var j=In(h);if(gr[j])return;gr[j]=!0;var w="";i&&i._owner&&i._owner!==ht.current&&(w=" It was passed a child from "+Y(i._owner.type)+"."),Ce(i),D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',j,w),Ce(null)}}function br(i,h){{if(typeof i!="object")return;if(mt(i))for(var j=0;j",A=" Did you accidentally export a JSX literal instead of a component?"):P=typeof i,D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",P,A)}var G=wn(i,h,j,k,F);if(G==null)return G;if(T){var K=h.children;if(K!==void 0)if(w)if(mt(K)){for(var we=0;we0?"{key: someKey, "+W.join(": ..., ")+": ...}":"{key: someKey}";if(!fr[de+xt]){var kn=W.length>0?"{"+W.join(": ..., ")+": ...}":"{}";D(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`,xt,de,kn,de),fr[de+xt]=!0}}return i===n?Ln(G):An(G),G}}function Tn(i,h,j){return xr(i,h,j,!0)}function Sn(i,h,j){return xr(i,h,j,!1)}var Dn=Sn,En=Tn;Ie.Fragment=n,Ie.jsx=Dn,Ie.jsxs=En}()),Ie}process.env.NODE_ENV==="production"?We.exports=yr():We.exports=jr();var e=We.exports;const ue=y.createContext({appData:null,setAppData:()=>{},tab:"add",setTab:()=>{},hoverNode:null,setHoverNode:()=>{},focusNode:null,setFocusNode:()=>{},dataTransfer:null,setDataTransfer:()=>{}}),Ct=y.createContext(null),Qe={skin:"light",colorPrimary:"#1677ff",lang:void 0,value:'',width:"100%",height:"100%",ref:void 0,tinymceLink:void 0,onUpload:void 0,onUploadFocusChange:()=>{}},wt=y.createContext(Qe),pe="mj-column-empty",Mt="drop-block",Xe="focus",vr="focus-child",Ae="hover",It="focus-tool",At="focus-tool-drag",Lt="focus-tool-copy",Tt="focus-tool-delete",St="editor-tool-box",Cr="editor-body";var $e=(t=>(t.MJ_COLUMN_1="mj-column-1",t.MJ_COLUMN_2="mj-column-2",t.MJ_COLUMN_3="mj-column-3",t.MJ_COLUMN_4="mj-column-4",t.MJ_COLUMN_LEFT="mj-column-left",t.MJ_COLUMN_RIGHT="mj-column-right",t))($e||{}),L=(t=>(t.MJML="mjml",t.MJ_BODY="mj-body",t.MJ_SECTION="mj-section",t.MJ_COLUMN="mj-column",t.MJ_TEXT="mj-text",t.MJ_IMAGE="mj-image",t.MJ_BUTTON="mj-button",t.MJ_DIVEDER="mj-divider",t.MJ_SPACER="mj-spacer",t.MJ_SOCIAL="mj-social",t.MJ_SOCIAL_ELEMENT="mj-social-element",t))(L||{});const Le={"mj-button":{tagName:"mj-button",attributes:{"css-class":"mj-button",href:"",target:"_blank","border-radius":"3px","font-size":"13px","line-height":"120%",align:"center",padding:"10px 25px"},content:""},"mj-divider":{tagName:"mj-divider",attributes:{width:"100%","css-class":"mj-divider","border-width":"4px","border-style":"solid","border-color":"#000000",padding:"10px 25px",align:"center"}},"mj-image":{tagName:"mj-image",attributes:{"css-class":"mj-image",src:"data:image/svg+xml;charset=utf-8;base64,PHN2ZyBzdHlsZT0id2lkdGg6IDFlbTtoZWlnaHQ6IDFlbTt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlOyIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjIwNzgwIj48cGF0aCBkPSJNMjA3Ljc2IDI5NS4zMTJBMzIgMzIgMCAwIDEgMjM1LjUyIDI2MC44bDEzNy45Mi0xNy43OTItOTIuOTc2IDk0LjMyIDE0OC4yNzIgMTYyLjE3NnYxMTEuMmwtMjQuNzA0IDEyMy41ODQgOTIuNDQ4LTI4NC4yMDgtMTA4LjI3Mi0xMjYuNTkyTDQ5Ni40OCAyNDBoMy45NTJsMjg0LjE2IDIyLjE5MmEzMiAzMiAwIDAgMSAyOS4zOTIgMzQuNjg4bC0zNy42MzIgNDMwLjkxMmEzMiAzMiAwIDAgMS0zMy45NjggMjkuMTUybC0zNDIuMDE2LTIyLjQzMmEzMS45NjggMzEuOTY4IDAgMCAwLTcuMzYgMC4zNjhsLTExMC41MTIgMTguNDE2YTMyIDMyIDAgMCAxLTM3LjEyLTI4Ljc2OGwtMzcuNjMyLTQyOS4yMTZ6IG00ODIuNDMyIDE0OC45MTJhNDcuMDQgNDcuMDQgMCAxIDAgMC05NC4wOCA0Ny4wNCA0Ny4wNCAwIDAgMCAwIDk0LjA4ek00OTQuMDggNjQ2LjcyYTEzLjg0IDEzLjg0IDAgMCAwIDEyLjc1MiAxNC44NjRsMjI0Ljk3NiAxNy4xMmExMy44NCAxMy44NCAwIDAgMCAyLjExMi0yNy42bC0yMjQuOTkyLTE3LjEyYTEzLjg0IDEzLjg0IDAgMCAwLTE0Ljg0OCAxMi43MzZ6IG0tMTQyLjQ2NCAxLjgyNGExMy44NCAxMy44NCAwIDAgMC04Ljc1Mi0yNi4yNTZsLTc0LjE0NCAyNC43MDRhMTMuODQgMTMuODQgMCAwIDAgOC43NTIgMjYuMjcybDc0LjE0NC0yNC43MnoiIGZpbGw9IiMwMDAwMDAiIGZpbGwtb3BhY2l0eT0iLjEiIHAtaWQ9IjIwNzgxIj48L3BhdGg+PC9zdmc+",href:"",target:"_blank",alt:"",width:"","border-radius":"0px",align:"center",padding:"10px 25px"}},"mj-social":{tagName:"mj-social",attributes:{"css-class":"mj-social","icon-size":"20px","icon-padding":"0px","border-radius":"3px","inner-padding":"4px","font-size":"13px",mode:"horizontal",align:"center",padding:"10px 25px"},children:[{tagName:"mj-social-element",attributes:{name:"facebook","css-class":"mj-social-element",href:"https://www.facebook.com"},content:""},{tagName:"mj-social-element",attributes:{name:"twitter","css-class":"mj-social-element",href:"https://www.twitter.com"},content:""},{tagName:"mj-social-element",attributes:{name:"google","css-class":"mj-social-element",href:"https://www.google.com"},content:""}]},"mj-spacer":{tagName:"mj-spacer",attributes:{"css-class":"mj-spacer",height:"50px"}},"mj-text":{tagName:"mj-text",attributes:{"css-class":"mj-text","font-size":"13px","line-height":1,align:"left",padding:"10px 25px"},content:""},"mj-section":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"}},"mj-column-1":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"},children:[{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]}]},"mj-column-2":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"},children:[{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]}]},"mj-column-3":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"},children:[{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]}]},"mj-column-4":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"},children:[{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column"},children:[]}]},"mj-column-left":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"},children:[{tagName:"mj-column",attributes:{"css-class":"mj-column",width:"60%"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column",width:"40%"},children:[]}]},"mj-column-right":{tagName:"mj-section",attributes:{"css-class":"mj-section","border-radius":"0px","background-repeat":"repeat","background-size":"auto",padding:"20px"},children:[{tagName:"mj-column",attributes:{"css-class":"mj-column",width:"40%"},children:[]},{tagName:"mj-column",attributes:{"css-class":"mj-column",width:"60%"},children:[]}]}},Dt=["mj-button","mj-divider","mj-image","mj-social","mj-spacer","mj-text"],wr=["mjml","mj-body","mj-column","mj-section",...Dt],ae=()=>{const{appData:t,setAppData:r}=y.useContext(ue);return{appData:t,setAppData:r}},Fe=()=>({...y.useContext(wt)}),me=t=>JSON.parse(JSON.stringify(t)),Et=t=>{let o=new DOMParser().parseFromString(yt(t).html,"text/html");return Fr(o.documentElement)},Mr=(t,r,o)=>{const n=t[r];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((s,l)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(l.bind(null,new Error("Unknown variable dynamic import: "+r+(r.split("/").length!==o?". Note that variables only represent file names one level deep.":""))))})},kt=y.createContext(void 0),Ir=({children:t})=>{const[r,o]=y.useState("en"),[n,s]=y.useState({});y.useEffect(()=>{(async()=>{try{const u=await Mr(Object.assign({"./locales/en.json":()=>Promise.resolve().then(()=>ln)}),`./locales/${r}.json`,3);s(u.default)}catch(u){console.error(`Failed to load translations for language: ${r}`,u)}})()},[r]);const l=m=>{o(m)},a=m=>n[m]||m;return e.jsx(kt.Provider,{value:{t:a,changeLanguage:l,language:r},children:t})},z=()=>{const t=y.useContext(kt);if(!t)throw new Error("useTranslation must be used within a TranslationProvider");return t},Ar=(t,r)=>{const o=` @media only screen and (min-width:480px) { .mj-column-per-100 { width:100% !important; max-width: 100%; } .mj-column-per-50 { width:50% !important; max-width: 50%; } .mj-column-per-60 { width:60% !important; max-width: 60%; } .mj-column-per-40 { width:40% !important; max-width: 40%; } .mj-column-per-33-333333333333336 { width:33.333333333333336% !important; max-width: 33.333333333333336%; } .mj-column-per-25 { width:25% !important; max-width: 25%; } } `,n=` .moz-text-html .mj-column-per-100 { width:100% !important; max-width: 100%; } .moz-text-html .mj-column-per-50 { width:50% !important; max-width: 50%; } .moz-text-html .mj-column-per-60 { width:60% !important; max-width: 60%; } .moz-text-html .mj-column-per-40 { width:40% !important; max-width: 40%; } .moz-text-html .mj-column-per-33-333333333333336 { width:33.333333333333336% !important; max-width: 33.333333333333336%; } .moz-text-html .mj-column-per-25 { width:25% !important; max-width: 25%; } `;if(r.length>1)r[1].innerHTML=o,r[2].innerHTML=n;else{const s=document.createElement("style"),l=document.createElement("style");s.innerHTML=o,l.innerHTML=n,t==null||t.appendChild(s),t==null||t.appendChild(l)}},Lr=(t,r)=>{const o=document.createElement("script");o.setAttribute("src",r??"https://cdnjs.cloudflare.com/ajax/libs/tinymce/7.2.1/tinymce.min.js"),t.appendChild(o),o.onload=()=>{ge().tinymce.addI18n("zh_CN",Xr()),ge().tinymce.addI18n("en_US","")}},Ke="easy-mail-iframe",Tr=()=>{const{t}=z(),{lang:r,skin:o,tinymceLink:n}=Fe(),{token:s}=d.theme.useToken(),{appData:l}=ae(),{setRef:a}=so();if(!l)return e.jsx(e.Fragment,{});const m=y.useMemo(()=>{const f=Et(l);return f==null?void 0:f.outerHTML},[]),u=y.useCallback(f=>{if(!f)return;let b=f.querySelector("#easy-mail-style");const c=$r({token:s,t});b?b.innerHTML=c:(b=document.createElement("style"),b.setAttribute("id","easy-mail-style"),b.innerHTML=c,f==null||f.appendChild(b))},[r,o]),x=f=>{const b=f.target;if(b&&b instanceof HTMLIFrameElement&&b.contentWindow){const c=b.contentWindow.document.documentElement;a(c);const p=c.querySelector("head"),g=c.querySelector("body"),v=c.querySelectorAll("style");g==null||g.classList.add(Cr),Ar(p,v),Lr(p,n),u(p)}};return y.useEffect(()=>{u(ge().document.querySelector("head"))},[o]),e.jsx("div",{style:{width:"calc(100% - 406px)",backgroundColor:s.colorBgContainer},children:e.jsx("iframe",{srcDoc:m,onLoad:x,style:{width:"100%",height:"100%",border:"none",outline:"none",display:"block",margin:"auto"},id:Ke})})},ge=()=>document.getElementById(Ke).contentWindow,ie=({node:t,transferAction:r})=>{let o="1";if(!t)return o;if(he(t.parentElement)){let n=0,s=t;for(;s.previousElementSibling;)s=s.previousElementSibling,!(be(s)||r==="move"&&et(s))&&n++;o=`${o}-${n}`}else{let n=0,s=be(t)?t:t.parentElement;for(;s!=null&&s.previousElementSibling;)s=s.previousElementSibling,!(be(s)||r==="move"&&et(s.children[0]))&&n++;const l=n;for(;!Sr(s);)s=s==null?void 0:s.parentElement;for(n=0;s!=null&&s.previousElementSibling;)s=s.previousElementSibling,!be(s)&&n++;const a=n;for(;!Q(s);)s=s==null?void 0:s.parentElement;for(n=0;s!=null&&s.previousElementSibling;)s=s.previousElementSibling,!be(s)&&n++;o=`${o}-${n}-${a}-${l}`}return o},Nt=({appData:t,idx:r})=>r.split("-").reduce((s,l)=>{var a;return(a=s==null?void 0:s.children)==null?void 0:a[Number(l)]},t),re=(t,r)=>{let o=t;if(he(t))return null;let n=r?Array.isArray(r)?r:[r]:wr.filter(s=>s!==L.MJ_COLUMN);for(;o&&n.every(s=>{var l;return!((l=o.classList)!=null&&l.contains(s))})&&!he(o);)o=o.parentNode;return o},_t=({doc:t,idx:r})=>{var l,a,m;if(!r)return null;const o=r.split("-");o.splice(0,1,"0");let n=0,s=t.querySelector("body");for(;o.length>0;){const u=Number(o.shift());n===0||n===1?s=(l=s==null?void 0:s.children)==null?void 0:l[u]:n===2?s=(a=s==null?void 0:s.querySelectorAll(`.${L.MJ_COLUMN}`))==null?void 0:a[u]:n===3&&(s=(m=s==null?void 0:s.querySelectorAll(".mj-column > table > tbody > tr"))==null?void 0:m[u]),n++}return s??null},qe=(t,r)=>{var n,s;const o=t.nextElementSibling;o?(n=t.parentElement)==null||n.insertBefore(r,o):(s=t.parentElement)==null||s.appendChild(r)},he=t=>(t==null?void 0:t.tagName)==="HTML"||(t==null?void 0:t.classList.contains(L.MJ_BODY))||(t==null?void 0:t.tagName)==="BODY",Q=t=>t==null?void 0:t.classList.contains(L.MJ_SECTION),Sr=t=>t==null?void 0:t.classList.contains(L.MJ_COLUMN),Oe=t=>t==null?void 0:t.classList.contains(L.MJ_BUTTON),ze=t=>t==null?void 0:t.classList.contains(L.MJ_TEXT),be=t=>t==null?void 0:t.classList.contains(Mt),et=t=>t==null?void 0:t.classList.contains(Xe),Dr=t=>t==null?void 0:t.classList.contains(Ae),Er=t=>t==null?void 0:t.classList.contains(Lt),kr=t=>t==null?void 0:t.classList.contains(Tt),Nr=t=>t==null?void 0:t.classList.contains(pe),fe=t=>t==null||t==="",Ft=t=>{if(!t)return{};const r={};return t.split(";").filter(n=>!!n).forEach(n=>{const s=n.split(":"),l=s[0],a=s.slice(1).join(":");r[l]=a}),r},_r=t=>Object.entries(t).map(([o,n])=>`${o}:${n}`).join(";"),tt=t=>{const r=Dt.map(o=>`.${o}`).join(",");return t.querySelectorAll(r).length>0},Fr=t=>{const r=t.cloneNode(!0),o=r.querySelector(`div.${L.MJ_BODY}`);return o&&o.childElementCount===0?o.innerHTML="":r.querySelectorAll(`div.${L.MJ_COLUMN}`).forEach(s=>{tt(s)||s.classList.add(pe)}),r},rt=t=>{if(!t)return;const r=Q(t),o=t.querySelectorAll(`.${L.MJ_TEXT}`),n=t.querySelectorAll(`.${L.MJ_BUTTON}`);if(r&&[...o,...n].length===0&&t.tagName!=="TR")return;let s=[t];r&&(s=[...o,...n]),t.tagName==="TR"&&(s=[t.children[0]]),s.forEach(l=>{var m;let a=null;ze(l)&&(a=l.children[0]),Oe(l)&&(a=(l==null?void 0:l.querySelector("p"))||(l==null?void 0:l.querySelector("a"))),((m=a==null?void 0:a.textContent)==null?void 0:m.trim())===""&&a.replaceChildren()})},Or=(t,r)=>{var a,m;let o=t,n=r;const s=he(o);!Q(o)&&!s&&(n=n.children[0]),s&&((m=o.parentElement)==null||m.setAttribute("style",_r({...Ft((a=o.parentElement)==null?void 0:a.getAttribute("style")),...Ft(n==null?void 0:n.getAttribute("style"))}))),o.getAttributeNames().filter(u=>!["id","class","contenteditable","spellcheck"].includes(u)).forEach(u=>{o.setAttribute(u,n==null?void 0:n.getAttribute(u))}),o.replaceChildren(...n.childNodes,s?"":o.lastElementChild)};function zr(t,r){let o,n;return function(...s){const l=Date.now();if(!o||l-n>=r){n=l,o=!0;const a=t.apply(this,s);return setTimeout(()=>{o=!1},r),a}}}const $=(t,r,o)=>{let n=r.split("-").map(a=>Number(a));fe(o)||(n=n.slice(0,o));const s=me(t),l=n.reduce((a,m)=>{var u;return(u=a==null?void 0:a.children)==null?void 0:u[m]},s);return l.children=l.children?l.children:[],{result:s,tree:l}},Ot=t=>{var n;if(!t)return{};const{tree:r}=$(t,"0-0");let o={};return(n=r.children)==null||n.forEach(s=>{const l={};Object.keys(s.attributes).forEach(a=>{l[`${s.tagName.split("-")[1]}_${a}`]=s.attributes[a]}),o={...o,...l}}),o},Rr=(t,r)=>{var s;const{tree:o}=$(t,"0-0");return(s=o.children)==null?void 0:s.map(l=>{const a=l.tagName.split("-")[1],m={};return Object.keys(r).forEach(u=>{if(u.includes(a)){const x=u.split("_")[1];m[x]=r[u]}}),{...l,attributes:{...l.attributes,...m}}})},Br=t=>{const r={};return Object.keys(t).forEach(o=>{const n=`mj-${o.split("_")[0]}`;r[n]={...r[n]??{},[o.split("_")[1]]:t[o]}}),r},zt=({appData:t,idx:r,property:o,index:n})=>{var a,m,u,x;let{result:s,tree:l}=$(t,r);if(r==="1"){const{width:f,"background-color":b}=o,c=(u=(m=(a=s.children)==null?void 0:a[0])==null?void 0:m.children)==null?void 0:u[0];return c.children=Rr(t,o),l.attributes={...l.attributes,width:f,"background-color":b},s}return fe(n)?(l.attributes={...l.attributes,...o},s):(l=(x=l.children)==null?void 0:x[n??0],l.attributes={...o},s)},Rt=({appData:t,idx:r,content:o,index:n})=>{var a;let{result:s,tree:l}=$(t,r);return fe(n)||(l=(a=l.children)==null?void 0:a[n??0]),l.content=o.replace(/"/g,"'"),s},Pr=({appData:t,idx:r,dataTransfer:o})=>{var m,u,x,f,b,c;const n=r.split("-").map(p=>Number(p));let{result:s,tree:l}=$(t,r,-1);const a=me(Le)[(m=o.data)==null?void 0:m.value];if(((u=o.data)==null?void 0:u.type)==="basic"&&n.length===2){const p=me(Le)[$e.MJ_COLUMN_1];(f=(x=p.children)==null?void 0:x[0].children)==null||f.push(a),(b=l.children)==null||b.splice(n[n.length-1],0,p)}else(c=l.children)==null||c.splice(n[n.length-1],0,a);return s},Hr=({appData:t,idx:r})=>{var l;const o=r.split("-").map(a=>Number(a)),{result:n,tree:s}=$(t,r,-1);return(l=s.children)==null||l.splice(o[o.length-1],1),n},Ur=({appData:t,idx:r})=>{var l,a;const o=r.split("-").map(m=>Number(m)),{result:n,tree:s}=$(t,r,-1);return(a=s.children)==null||a.splice(o[o.length-1],0,(l=s.children)==null?void 0:l[o[o.length-1]]),n},Yr=({appData:t,idx:r,originIdx:o})=>{var x,f,b,c,p;const n=r.split("-").map(g=>Number(g)),s=o.split("-").map(g=>Number(g)),{result:l,tree:a}=$(t,o,-1),m=(x=a.children)==null?void 0:x.splice(s[s.length-1],1)[0],u=n.slice(0,-1).reduce((g,v)=>{var C;return(C=g.children)==null?void 0:C[v]},l);if(n.length===2&&(m==null?void 0:m.tagName)!==L.MJ_SECTION){const g=me(Le)[$e.MJ_COLUMN_1];(b=(f=g.children)==null?void 0:f[0].children)==null||b.push(m),(c=u.children)==null||c.splice(n[n.length-1],0,g)}else(p=u.children)==null||p.splice(n[n.length-1],0,m);return l},Gr=({appData:t,idx:r,column:o})=>{var x,f;const n=r.split("-").map(b=>Number(b)),{result:s,tree:l}=$(t,r,-1),a=(x=l.children)==null?void 0:x[n[n.length-1]].children,m=["left","right"].includes(o)?2:Number(o);return(f=me(Le)[`${L.MJ_COLUMN}-${o}`].children)==null||f.forEach((b,c)=>{let p=a==null?void 0:a[c];const g=p==null?void 0:p.attributes;g&&g.width&&delete g.width,p?p.attributes={...p.attributes,...b.attributes}:a==null||a.push(b)}),m<((a==null?void 0:a.length)??0)&&(a==null||a.splice(m)),s},Vr=({appData:t,idx:r,value:o})=>{var l;const{result:n,tree:s}=$(t,r);return(l=s.children)==null||l.splice(s.children.length,0,o),n},Jr=({appData:t,idx:r,index:o})=>{var l;const{result:n,tree:s}=$(t,r);return(l=s.children)==null||l.splice(o,1),n},Bt=({appData:t,idx:r,originIndex:o,targetIndex:n})=>{var m,u;const{result:s,tree:l}=$(t,r),a=(m=l.children)==null?void 0:m.splice(o,1)[0];return(u=l.children)==null||u.splice(n,0,a),s},Zr=t=>new Promise((r,o)=>{const n=new FileReader;n.onload=s=>{var l;r((l=s.target)==null?void 0:l.result)},n.onerror=s=>o(s),n.readAsDataURL(t)});function Wr(t){var r=new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");return r.test(t)}function Qr(t){var r=/^data:image\/(png|jpeg|jpg|gif|bmp|webp);base64,/;return r.test(t)}const Xr=()=>({"#":"#",Accessibility:"辅助功能",Accordion:"","Accordion body...":"","Accordion summary...":"",Action:"动作",Activity:"活动",Address:"地址",Advanced:"高级",Align:"对齐","Align center":"居中对齐","Align left":"左对齐","Align right":"右对齐",Alignment:"对齐","Alignment {0}":"",All:"全部","Alternative description":"替代描述","Alternative source":"镜像","Alternative source URL":"替代来源网址",Anchor:"锚点","Anchor...":"锚点...",Anchors:"锚点","Animals and Nature":"动物和自然",Arrows:"箭头",B:"B","Background color":"背景颜色","Background color {0}":"",Black:"黑色",Block:"块","Block {0}":"",Blockquote:"引文区块",Blocks:"样式",Blue:"蓝色","Blue component":"白色部分",Body:"表体",Bold:"粗体",Border:"框线","Border color":"框线颜色","Border style":"边框样式","Border width":"边框宽度",Bottom:"下方对齐","Browse files":"","Browse for an image":"浏览图像","Browse links":"","Bullet list":"无序列表",Cancel:"取消",Caption:"标题",Cell:"单元格","Cell padding":"单元格内边距","Cell properties":"单元格属性","Cell spacing":"单元格外间距","Cell styles":"单元格样式","Cell type":"储存格别",Center:"居中",Characters:"字符","Characters (no spaces)":"字符(无空格)",Circle:"空心圆",Class:"类型","Clear formatting":"清除格式",Close:"关闭",Code:"代码","Code sample...":"示例代码...","Code view":"代码视图","Color Picker":"选色器","Color swatch":"颜色样本",Cols:"列",Column:"列","Column clipboard actions":"列剪贴板操作","Column group":"列组","Column header":"列标题","Constrain proportions":"保持比例",Copy:"复制","Copy column":"复制列","Copy row":"复制行","Could not find the specified string.":"未找到搜索内容。","Could not load emojis":"无法加载Emojis",Count:"计数",Currency:"货币","Current window":"当前窗口","Custom color":"自定义颜色","Custom...":"自定义......",Cut:"剪切","Cut column":"剪切列","Cut row":"剪切行","Dark Blue":"深蓝色","Dark Gray":"深灰色","Dark Green":"深绿色","Dark Orange":"深橙色","Dark Purple":"深紫色","Dark Red":"深红色","Dark Turquoise":"深蓝绿色","Dark Yellow":"暗黄色",Dashed:"虚线","Date/time":"日期/时间","Decrease indent":"减少缩进",Default:"预设","Delete accordion":"","Delete column":"删除列","Delete row":"删除行","Delete table":"删除表格",Dimensions:"尺寸",Disc:"实心圆",Div:"Div",Document:"文档",Dotted:"虚线",Double:"双精度","Drop an image here":"拖放一张图像至此","Dropped file type is not supported":"此文件类型不支持拖放",Edit:"编辑",Embed:"内嵌",Emojis:"Emojis","Emojis...":"Emojis...",Error:"错误","Error: Form submit field collision.":"错误: 表单提交字段冲突。","Error: No form element found.":"错误: 没有表单控件。","Extended Latin":"拉丁语扩充","Failed to initialize plugin: {0}":"插件初始化失败: {0}","Failed to load plugin url: {0}":"插件加载失败 链接: {0}","Failed to load plugin: {0} from url {1}":"插件加载失败: {0} 来自链接 {1}","Failed to upload image: {0}":"图片上传失败: {0}",File:"文件",Find:"寻找","Find (if searchreplace plugin activated)":"查找(如果查找替换插件已激活)","Find and Replace":"查找和替换","Find and replace...":"查找并替换...","Find in selection":"在选区中查找","Find whole words only":"全字匹配",Flags:"旗帜","Focus to contextual toolbar":"移动焦点到上下文菜单","Focus to element path":"移动焦点到元素路径","Focus to menubar":"移动焦点到菜单栏","Focus to toolbar":"移动焦点到工具栏",Font:"字体","Font size {0}":"","Font sizes":"字体大小","Font {0}":"",Fonts:"字体","Food and Drink":"食物和饮品",Footer:"表尾",Format:"格式","Format {0}":"",Formats:"格式",Fullscreen:"全屏",G:"G",General:"一般",Gray:"灰色",Green:"绿色","Green component":"绿色部分",Groove:"凹槽","Handy Shortcuts":"快捷键",Header:"表头","Header cell":"表头单元格","Heading 1":"一级标题","Heading 2":"二级标题","Heading 3":"三级标题","Heading 4":"四级标题","Heading 5":"五级标题","Heading 6":"六级标题",Headings:"标题",Height:"高度",Help:"帮助","Hex color code":"十六进制颜色代码",Hidden:"隐藏","Horizontal align":"水平对齐","Horizontal line":"水平分割线","Horizontal space":"水平间距",ID:"ID","ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"ID应该以英文字母开头,后面只能有英文字母、数字、破折号、点、冒号或下划线。","Image is decorative":"图像是装饰性的","Image list":"图片清单","Image title":"图片标题","Image...":"图片...","ImageProxy HTTP error: Could not find Image Proxy":"图片代理请求错误:无法找到图片代理","ImageProxy HTTP error: Incorrect Image Proxy URL":"图片代理请求错误:图片代理地址错误","ImageProxy HTTP error: Rejected request":"图片代理请求错误:请求被拒绝","ImageProxy HTTP error: Unknown ImageProxy error":"图片代理请求错误:未知的图片代理错误","Increase indent":"增加缩进",Inline:"文本",Insert:"插入","Insert Template":"插入模板","Insert accordion":"","Insert column after":"在右侧插入列","Insert column before":"在左侧插入列","Insert date/time":"插入日期/时间","Insert image":"插入图片","Insert link (if link plugin activated)":"插入链接 (如果链接插件已激活)","Insert row after":"在下方插入行","Insert row before":"在上方插入行","Insert table":"插入表格","Insert template...":"插入模板...","Insert video":"插入视频","Insert/Edit code sample":"插入/编辑代码示例","Insert/edit image":"插入/编辑图片","Insert/edit link":"插入/编辑链接","Insert/edit media":"插入/编辑媒体","Insert/edit video":"插入/编辑视频",Inset:"嵌入","Invalid hex color code: {0}":"十六进制颜色代码无效: {0}","Invalid input":"无效输入",Italic:"斜体",Justify:"两端对齐","Keyboard Navigation":"键盘指引",Language:"语言","Learn more...":"了解更多...",Left:"左","Left to right":"由左到右","Light Blue":"浅蓝色","Light Gray":"浅灰色","Light Green":"浅绿色","Light Purple":"浅紫色","Light Red":"浅红色","Light Yellow":"浅黄色","Line height":"行高","Link list":"链接清单","Link...":"链接...","List Properties":"列表属性","List properties...":"标题字体属性","Loading emojis...":"正在加载Emojis...","Loading...":"加载中...","Lower Alpha":"小写英文字母","Lower Greek":"小写希腊字母","Lower Roman":"小写罗马数字","Match case":"大小写匹配",Mathematical:"数学","Media poster (Image URL)":"封面(图片地址)","Media...":"多媒体...","Medium Blue":"中蓝色","Medium Gray":"中灰色","Medium Purple":"中紫色","Merge cells":"合并单元格",Middle:"居中对齐","Midnight Blue":"深蓝色","More...":"更多...",Name:"名称","Navy Blue":"海军蓝","New document":"新建文档","New window":"新窗口",Next:"下一个",No:"否","No alignment":"未对齐","No color":"无","Nonbreaking space":"不间断空格",None:"无","Numbered list":"有序列表",OR:"或",Objects:"物件",Ok:"确定","Open help dialog":"打开帮助对话框","Open link":"打开链接","Open link in...":"链接打开位置...","Open popup menu for split buttons":"打开弹出式菜单,用于拆分按钮",Orange:"橙色",Outset:"外置","Page break":"分页符",Paragraph:"段落",Paste:"粘贴","Paste as text":"粘贴为文本","Paste column after":"粘贴后面的列","Paste column before":"粘贴此列前","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"当前为纯文本粘贴模式,再次点击可以回到普通粘贴模式。","Paste or type a link":"粘贴或输入链接","Paste row after":"粘贴行到下方","Paste row before":"粘贴行到上方","Paste your embed code below:":"将内嵌代码粘贴在下面:",People:"人类",Plugins:"插件","Plugins installed ({0}):":"已安装插件 ({0}):","Powered by {0}":"由{0}驱动",Pre:"前言",Preferences:"首选项",Preformatted:"预先格式化的","Premium plugins:":"优秀插件:","Press the Up and Down arrow keys to resize the editor.":"","Press the arrow keys to resize the editor.":"","Press {0} for help":"",Preview:"预览",Previous:"上一个",Print:"打印","Print...":"打印...",Purple:"紫色",Quotations:"引用",R:"R","Range 0 to 255":"范围0至255",Red:"红色","Red component":"红色部分",Redo:"重做",Remove:"移除","Remove color":"移除颜色","Remove link":"移除链接",Replace:"替换","Replace all":"替换全部","Replace with":"替换为",Resize:"调整大小","Restore last draft":"恢复上次的草稿","Reveal or hide additional toolbar items":"","Rich Text Area":"富文本区域","Rich Text Area. Press ALT-0 for help.":"编辑区。按Alt+0键打开帮助。","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"编辑区。按ALT-F9打开菜单,按ALT-F10打开工具栏,按ALT-0查看帮助",Ridge:"海脊座",Right:"右","Right to left":"由右到左",Row:"行","Row clipboard actions":"行剪贴板操作","Row group":"行组","Row header":"行头","Row properties":"行属性","Row type":"行类型",Rows:"行数",Save:"保存","Save (if save plugin activated)":"保存(如果保存插件已激活)",Scope:"范围",Search:"搜索","Select all":"全选","Select...":"选择...",Selection:"选择",Shortcut:"快捷方式","Show blocks":"显示区块边框","Show caption":"显示标题","Show invisible characters":"显示不可见字符",Size:"字号",Solid:"实线",Source:"源","Source code":"源代码","Special Character":"特殊字符","Special character...":"特殊字符...","Split cell":"拆分单元格",Square:"实心方块","Start list at number":"以数字开始列表",Strikethrough:"删除线",Style:"样式",Subscript:"下标",Superscript:"上标","Switch to or from fullscreen mode":"切换全屏模式",Symbols:"符号","System Font":"系统字体",Table:"表格","Table caption":"表格标题","Table properties":"表格属性","Table styles":"表格样式",Template:"模板",Templates:"模板",Text:"文字","Text color":"文本颜色","Text color {0}":"","Text to display":"要显示的文本","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"你所填写的URL地址为邮件地址,需要加上mailto: 前缀吗?","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"你所填写的URL地址属于外部链接,需要加上http:// 前缀吗?","The URL you entered seems to be an external link. Do you want to add the required https:// prefix?":"您输入的 URL 似乎是一个外部链接。您想添加所需的 https:// 前缀吗?",Title:"标题","To open the popup, press Shift+Enter":"按Shitf+Enter键打开对话框","Toggle accordion":"",Tools:"工具",Top:"上方对齐","Travel and Places":"旅游和地点",Turquoise:"青绿色",Underline:"下划线",Undo:"撤销",Upload:"上传","Uploading image":"上传图片","Upper Alpha":"大写英文字母","Upper Roman":"大写罗马数字",Url:"地址","User Defined":"自定义",Valid:"有效",Version:"版本","Vertical align":"垂直对齐","Vertical space":"垂直间距",View:"查看","Visual aids":"网格线",Warn:"警告",White:"白色",Width:"宽度","Word count":"字数",Words:"单词","Words: {0}":"字数:{0}",Yellow:"黄色",Yes:"是","You are using {0}":"你正在使用 {0}","You have unsaved changes are you sure you want to navigate away?":"你还有文档尚未保存,确定要离开?","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"你的浏览器不支持打开剪贴板,请使用Ctrl+X/C/V等快捷键。",alignment:"对齐","austral sign":"澳元符号","cedi sign":"塞地符号","colon sign":"冒号","cruzeiro sign":"克鲁赛罗币符号","currency sign":"货币符号","dollar sign":"美元符号","dong sign":"越南盾符号","drachma sign":"德拉克马符号","euro-currency sign":"欧元符号",example:"示例",formatting:"格式化","french franc sign":"法郎符号","german penny symbol":"德国便士符号","guarani sign":"瓜拉尼符号",history:"历史","hryvnia sign":"格里夫尼亚符号",indentation:"缩进","indian rupee sign":"印度卢比","kip sign":"老挝基普符号","lira sign":"里拉符号","livre tournois sign":"里弗弗尔符号","manat sign":"马纳特符号","mill sign":"密尔符号","naira sign":"奈拉符号","new sheqel sign":"新谢克尔符号","nordic mark sign":"北欧马克","peseta sign":"比塞塔符号","peso sign":"比索符号","ruble sign":"卢布符号","rupee sign":"卢比符号","spesmilo sign":"spesmilo符号",styles:"样式","tenge sign":"坚戈符号","tugrik sign":"图格里克符号","turkish lira sign":"土耳其里拉","won sign":"韩元符号","yen character":"日元字样","yen/yuan character variant one":"元字样(大写)","yuan character":"人民币元字样","yuan character, in hong kong and taiwan":"元字样(港台地区)","{0} characters":"{0} 个字符","{0} columns, {1} rows":"","{0} words":"{0} 字"}),$r=({token:t,t:r})=>{const o=t.colorPrimaryHover,n=t.colorPrimaryBorder,s=t.colorWhite,l=t.colorPrimaryTextHover;return` html { height: 100%; scrollbar-color: ${t.colorBgBase==="#fff"?"":"rgba(255, 255, 255, 0.25) rgba(253, 253, 253, 0.12)"}; } *:focus-visible { outline: none; } * img, * a { -webkit-user-drag: none; } .focus-tool { position: absolute; right: -30px; top: -10px; display: flex; flex-direction: column; z-index: 9; } .focus-tool-drag, .focus-tool-copy, .focus-tool-delete { width: 25px; height: 25px; margin-bottom: 3px; border-radius: 25px; background-repeat: no-repeat; background-size: 18px 18px; background-position: center center; border: none; background-color: ${o}; cursor: pointer; } .focus-tool-drag { cursor: grab; background-image: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3Csvg%20width%3D%2219px%22%20height%3D%2219px%22%20viewBox%3D%220%200%2019%2019%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cg%20id%3D%22drag%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%20%20%20%20%3Cg%20id%3D%22arrow-down-copy%22%20fill%3D%22%23ffffff%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M9.49936886%2C1%20C9.75529117%2C1%2010.0112135%2C1.09763107%2010.2064756%2C1.29289322%20L12.6164551%2C3.62132034%20C13.0069794%2C4.01184464%2013.0069794%2C4.64500961%2012.6164551%2C5.03553391%20C12.2259308%2C5.4260582%2011.5927658%2C5.4260582%2011.2022415%2C5.03553391%20L10.4991165%2C4.41396122%20L10.4998532%2C7.98269085%20L10.4997913%2C8.517%20L14.6028593%2C8.51732521%20L14.003857%2C7.8150837%20C13.6133327%2C7.4245594%2013.6133327%2C6.79139442%2014.003857%2C6.40087013%20C14.3943813%2C6.01034584%2015.0275463%2C6.01034584%2015.4180706%2C6.40087013%20L17.724432%2C8.81047077%20C17.9196941%2C9.00573292%2018.0173252%2C9.26165523%2018.0173252%2C9.51757755%20C18.0173252%2C9.77349987%2017.9196941%2C10.0294222%2017.724432%2C10.2246843%20L15.3960049%2C12.6346638%20C15.0054806%2C13.0251881%2014.3723156%2C13.0251881%2013.9817913%2C12.6346638%20C13.591267%2C12.2441395%2013.591267%2C11.6109745%2013.9817913%2C11.2204502%20L14.603364%2C10.5173252%20L11.0346344%2C10.5180619%20L10.4997913%2C10.518%20L10.5%2C14.621068%20L11.2022415%2C14.0220657%20C11.5927658%2C13.6315414%2012.2259308%2C13.6315414%2012.6164551%2C14.0220657%20C13.0069794%2C14.41259%2013.0069794%2C15.045755%2012.6164551%2C15.4362793%20L10.2068544%2C17.7426407%20C10.0115923%2C17.9379028%209.75566998%2C18.0355339%209.49974766%2C18.0355339%20C9.24382534%2C18.0355339%208.98790302%2C17.9379028%208.79264088%2C17.7426407%20L6.38266144%2C15.4142136%20C5.99213715%2C15.0236893%205.99213715%2C14.3905243%206.38266144%2C14%20C6.77318573%2C13.6094757%207.40635071%2C13.6094757%207.796875%2C14%20L8.5%2C14.6215727%20L8.49926081%2C11.0526954%20L8.4987913%2C10.518%20L4.39625721%2C10.5182087%20L4.99525948%2C11.2204502%20C5.38578377%2C11.6109745%205.38578377%2C12.2441395%204.99525948%2C12.6346638%20C4.60473518%2C13.0251881%203.97157021%2C13.0251881%203.58104591%2C12.6346638%20L1.27468452%2C10.2250631%20C1.07942238%2C10.029801%200.981791305%2C9.77387867%200.981791305%2C9.51795635%20C0.981791305%2C9.26203404%201.07942238%2C9.00611172%201.27468452%2C8.81084957%20L3.60311165%2C6.40087013%20C3.99363594%2C6.01034584%204.62680092%2C6.01034584%205.01732521%2C6.40087013%20C5.4078495%2C6.79139442%205.4078495%2C7.4245594%205.01732521%2C7.8150837%20L4.39575253%2C8.5182087%20L7.9646298%2C8.5174695%20L8.4987913%2C8.517%20L8.49911652%2C4.4144659%20L7.796875%2C5.01346817%20C7.40635071%2C5.40399246%206.77318573%2C5.40399246%206.38266144%2C5.01346817%20C5.99213715%2C4.62294388%205.99213715%2C3.9897789%206.38266144%2C3.59925461%20L8.79226208%2C1.29289322%20C8.98752422%2C1.09763107%209.24344654%2C1%209.49936886%2C1%20Z%22%20id%3D%22Combined-Shape%22%3E%3C%2Fpath%3E%0A%20%20%20%20%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E); } .focus-tool-copy { background-image: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3Csvg%20width%3D%2219px%22%20height%3D%2219px%22%20viewBox%3D%220%200%2019%2019%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cg%20id%3D%22duplicate%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%20%20%20%20%3Cg%20id%3D%22arrow-down-copy-2%22%20fill%3D%22%23ffffff%22%20fill-rule%3D%22nonzero%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11.007983%2C2%20C12.1081436%2C2%2013%2C2.90017617%2013%2C3.99201702%20L13%2C6%20L15.007983%2C6%20C16.1081436%2C6%2017%2C6.90017617%2017%2C7.99201702%20L17%2C15.007983%20C17%2C16.1081436%2016.0998238%2C17%2015.007983%2C17%20L7.99201702%2C17%20C6.8918564%2C17%206%2C16.0998238%206%2C15.007983%20L6%2C13%20L3.99201702%2C13%20C2.8918564%2C13%202%2C12.0998238%202%2C11.007983%20L2%2C3.99201702%20C2%2C2.8918564%202.90017617%2C2%203.99201702%2C2%20L11.007983%2C2%20Z%20M11%2C4%20L4%2C4%20L4%2C11%20L6%2C11%20L6%2C7.99201702%20C6%2C6.8918564%206.90017617%2C6%207.99201702%2C6%20L11%2C6%20L11%2C4%20Z%22%20id%3D%22Combined-Shape%22%3E%3C%2Fpath%3E%0A%20%20%20%20%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E); } .focus-tool-delete { background-image: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3Csvg%20width%3D%2219px%22%20height%3D%2219px%22%20viewBox%3D%220%200%2019%2019%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cg%20id%3D%22trash%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%0A%20%20%20%20%20%20%20%20%3Cg%20fill%3D%22%23ffffff%22%20id%3D%22Combined-Shape%22%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11%2C2%20C11.5522847%2C2%2012%2C2.44771525%2012%2C3%20L15.0014977%2C3%20C15.5529553%2C3%2016%2C3.44266033%2016%2C3.99895656%20L16%2C5.00104344%20C16%2C5.55275191%2015.5525106%2C6%2015.0014977%2C6%20L15%2C6%20L15%2C15%20C15%2C16.1045695%2014.1045695%2C17%2013%2C17%20L6%2C17%20C4.8954305%2C17%204%2C16.1045695%204%2C15%20L4%2C6%20L3.99850233%2C6%20C3.44704472%2C6%203%2C5.55733967%203%2C5.00104344%20L3%2C3.99895656%20C3%2C3.44724809%203.44748943%2C3%203.99850233%2C3%20L7%2C3%20C7%2C2.44771525%207.44771525%2C2%208%2C2%20L11%2C2%20Z%20M7%2C7%20L6%2C7%20L6%2C15%20L7%2C15%20L7%2C7%20Z%20M10%2C7%20L9%2C7%20L9%2C15%20L10%2C15%20L10%2C7%20Z%20M13%2C7%20L12%2C7%20L12%2C15%20L13%2C15%20L13%2C7%20Z%22%3E%3C%2Fpath%3E%0A%20%20%20%20%20%20%20%20%3C%2Fg%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E); } .editor-body .mj-body:empty:before, .mj-column-empty > table:before { content: "${r("basic.empty_body")}"; display: block; padding-top: 20px; padding-bottom: 20px; color: ${l}; font-size: 14px; line-height: 14px; font-weight: 500; font-family: sans-serif; text-align: center; background: transparent; outline: ${n} 1px dashed; border-radius: 0px; vertical-align: middle; } .mj-body a { text-decoration: none; } .mj-column-empty > table:before { content: "${r("basic.empty_column")}"; } .mj-column-empty.mj-column-per-100 > table:before { content: "${r("basic.empty_section")}"; } .editor-body { user-select: none; border: 22px solid ${t.colorBgContainer}; border-left-width: 30px; border-right-width: 30px; min-width: 275px; min-height: calc(100% - 44px); overflow-x: hidden; } .editor-body .mj-section { position: relative; outline: 2px solid transparent; } .editor-body .mj-section.hover, .editor-body .mj-section.focus, .editor-body .mj-section.focus-child { outline-color: ${n}; z-index: 1; } .editor-body .mj-section.hover:before, .editor-body .mj-section.focus:before, .editor-body .mj-section.focus-child:before { content: "${r("block.section")}"; display: block; position: absolute; left: -2px; top: -22px; text-align: left; padding: 1px 6px; line-height: 20px; font-size: 15px; color: ${s}; background-color: ${n}; border-top-left-radius: 4px; border-top-right-radius: 4px; } .editor-body .mj-section.focus { outline-color: ${o}; } .editor-body .mj-section.focus:before { background-color: ${o}; } .editor-body .mj-section.hover .mj-column { outline: 1px dashed ${o}; } .editor-body .mj-text { position: relative; outline: 2px solid transparent; } .editor-body .mj-text > div { outline: none; } .editor-body .mj-text.hover, .editor-body .mj-text.focus { outline-color: ${n}; z-index: 1; } .editor-body .mj-text.hover:before, .editor-body .mj-text.focus:before { content: ""; display: block; width: 20px; height: 30px; position: absolute; left: -20px; top: -2px; color: ${s}; background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBjbGFzcz0ibXgtYXV0byBzdmctdGV4dCIgd2lkdGg9IjFlbSIgaGVpZ2h0PSIxZW0iIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNyA2LjczM2gtLjkzYzAtMS44NjYtMS44Ny0yLjMzMy00LjIwMy0yLjMzM3Y5LjQ3YzAgLjc2My40NjQgMS40NSAxLjE3MyAxLjczM2wxLjE2LjQ2NFYxN0g1Ljh2LS45MzNsMS4xNi0uNDY0YTEuODY3IDEuODY3IDAgMCAwIDEuMTczLTEuNzMzVjQuNGMtMi4zMzMgMC00LjIuNDY3LTQuMiAyLjMzM0gzVjNoMTR2My43MzN6Ij48L3BhdGg+PC9zdmc+) ${n} no-repeat; background-position-y: 5px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .editor-body .mj-text.focus { outline-color: ${o}; z-index: 2; } .editor-body .mj-text.focus:before { background-color: ${o}; } .editor-body .mj-text > div:empty:before { content: "${r("basic.empty_text_plc")}"; display: block; width: 100%; height: 14px; font-size: 14px; color: ${t.colorTextPlaceholder}; } .editor-body .mj-text > div.mce-edit-focus:empty:before { content: ""; } .editor-body .mj-image { position: relative; outline: 2px solid transparent; } .editor-body .mj-image img { min-height: 10px; } .editor-body .mj-image.hover, .editor-body .mj-image.focus { outline-color: ${n}; z-index: 1; } .editor-body .mj-image.hover:before, .editor-body .mj-image.focus:before { content: ""; display: block; width: 20px; height: 30px; position: absolute; left: -20px; top: -2px; color: ${s}; background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBjbGFzcz0ibXgtYXV0byBzdmctdGV4dCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xOCA0LjVBMi41IDIuNSAwIDAgMCAxNS41IDJoLTExQTIuNSAyLjUgMCAwIDAgMiA0LjV2MTFBMi41IDIuNSAwIDAgMCA0LjUgMThoMTFhMi41IDIuNSAwIDAgMCAyLjUtMi41di0xMXptLTEzLjUtMWExIDEgMCAwIDAtMSAxdjkuNzMybDIuNjYtMi44NWExIDEgMCAwIDEgMS4zLS4xNGwxLjgxIDEuMjUyYTEgMSAwIDAgMCAxLjMxOC0uMTZsMi40ODUtMi44MTdhMSAxIDAgMCAxIDEuNDI4LS4wNzNsMS45OTkgMS44NDVWNC41YTEgMSAwIDAgMC0xLTFoLTExem0xIDMuNWExLjUgMS41IDAgMSAxIDMgMCAxLjUgMS41IDAgMCAxLTMgMHoiPjwvcGF0aD48L3N2Zz4=) ${n} no-repeat; background-position-y: 5px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .editor-body .mj-image.focus { outline-color: ${o}; z-index: 2; } .editor-body .mj-image.focus:before { background-color: ${o}; } .editor-body .mj-button { position: relative; outline: 2px solid transparent; } .editor-body .mj-button.hover, .editor-body .mj-button.focus { outline-color: ${n}; z-index: 1; } .editor-body .mj-button.hover:before, .editor-body .mj-button.focus:before { content: ""; display: block; width: 20px; height: 30px; position: absolute; left: -20px; top: -2px; color: ${s}; background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBjbGFzcz0ibXgtYXV0byBzdmctdGV4dCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE4IDVhMi41IDIuNSAwIDAgMC0yLjUtMi41aC0xMUEyLjUgMi41IDAgMCAwIDIgNXY1YTIuNSAyLjUgMCAwIDAgMi41IDIuNWgzLjY1NEw4LjAzOCAxMUg0LjVhMSAxIDAgMCAxLTEtMVY1YTEgMSAwIDAgMSAxLTFoMTFhMSAxIDAgMCAxIDEgMXY1YzAgLjI2MS0uMS40OTktLjI2NC42NzdsMS4yMDMuOTAyYy4zNS0uNDMuNTYxLS45OC41NjEtMS41NzlWNXoiPjwvcGF0aD48cGF0aCBmaWxsPSIjZmZmIiBkPSJNOS43MDYgOC4xMTZsLjkyOSA4LjQ4Yy4wMTIuMTA5LjE0OC4xNS4yMi4wNjhMMTIuNjIgMTQuNmwxLjY2NyAyLjg4N2EuODMzLjgzMyAwIDEgMCAxLjQ0My0uODMzbC0xLjY2Ny0yLjg4NyAyLjY3LS40OThhLjEyNS4xMjUgMCAwIDAgLjA1MS0uMjIzTDkuOTA0IDhhLjEyNS4xMjUgMCAwIDAtLjE5OC4xMTV6Ij48L3BhdGg+PC9zdmc+) ${n} no-repeat; background-position-y: 5px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .editor-body .mj-button.focus { outline-color: ${o}; z-index: 2; } .editor-body .mj-button.focus:before { background-color: ${o}; } .editor-body .mj-button a:empty:before, .editor-body .mj-button p:empty:before, .editor-body .mj-button a > div:empty:before, .editor-body .mj-button p > div:empty:before { content: "${r("basic.empty_text_plc")}"; display: block; width: 100%; height: 14px; font-size: 14px; color: ${s}; } .editor-body .mj-button a.mce-edit-focus:empty:before, .editor-body .mj-button p.mce-edit-focus:empty:before, .editor-body .mj-button a > div.mce-edit-focus:empty:before, .editor-body .mj-button p > div.mce-edit-focus:empty:before { content: ""; } .editor-body .mj-divider { position: relative; outline: 2px solid transparent; } .editor-body .mj-divider.hover, .editor-body .mj-divider.focus { outline-color: ${n}; z-index: 1; } .editor-body .mj-divider.hover:before, .editor-body .mj-divider.focus:before { content: ""; display: block; width: 20px; height: 30px; position: absolute; left: -20px; top: -2px; color: ${s}; background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBjbGFzcz0ibXgtYXV0byBzdmctdGV4dCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTkuODM2IDQuNTYxYS4yNS4yNSAwIDAgMSAuMzI4IDBsMS45MjcgMS42N2EuMjUuMjUgMCAwIDEtLjE2My40MzhIOC4wNzJhLjI1LjI1IDAgMCAxLS4xNjMtLjQzOWwxLjkyNy0xLjY2OXpNMiA4LjQyaDE2djNIMnYtM3pNOS44MzYgMTUuMjc3YS4yNS4yNSAwIDAgMCAuMzI4IDBsMS45MjctMS42NjlhLjI1LjI1IDAgMCAwLS4xNjMtLjQzOUg4LjA3MmEuMjUuMjUgMCAwIDAtLjE2My40NGwxLjkyNyAxLjY2OHoiPjwvcGF0aD48L3N2Zz4=) ${n} no-repeat; background-position-y: 5px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .editor-body .mj-divider.focus { outline-color: ${o}; z-index: 2; } .editor-body .mj-divider.focus:before { background-color: ${o}; } .editor-body .mj-spacer { position: relative; outline: 2px solid transparent; } .editor-body .mj-spacer.hover, .editor-body .mj-spacer.focus { outline-color: ${n}; z-index: 1; } .editor-body .mj-spacer.hover:before, .editor-body .mj-spacer.focus:before { content: ""; display: block; width: 20px; height: 30px; position: absolute; left: -20px; top: -2px; color: ${s}; background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBjbGFzcz0ibXgtYXV0byBzdmctdGV4dCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTkuODM2IDIuMTYxYS4yNS4yNSAwIDAgMSAuMzI4IDBsMS45MjcgMS42N2EuMjUuMjUgMCAwIDEtLjE2My40MzhIOC4wNzJhLjI1LjI1IDAgMCAxLS4xNjMtLjQzOWwxLjkyNy0xLjY2OXoiPjwvcGF0aD48cGF0aCBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE4IDguMDJhMi41IDIuNSAwIDAgMC0yLjUtMi41aC0xMUEyLjUgMi41IDAgMCAwIDIgOC4wMnY0YTIuNSAyLjUgMCAwIDAgMi41IDIuNWgxMWEyLjUgMi41IDAgMCAwIDIuNS0yLjV2LTR6bS0xMy41LTFhMSAxIDAgMCAwLTEgMXY0YTEgMSAwIDAgMCAxIDFoMTFhMSAxIDAgMCAwIDEtMXYtNGExIDEgMCAwIDAtMS0xaC0xMXoiPjwvcGF0aD48cGF0aCBmaWxsPSIjZmZmIiBkPSJNOS44MzYgMTcuODc4YS4yNS4yNSAwIDAgMCAuMzI4IDBsMS45MjctMS42N2EuMjUuMjUgMCAwIDAtLjE2My0uNDM5SDguMDcyYS4yNS4yNSAwIDAgMC0uMTYzLjQ0bDEuOTI3IDEuNjY5eiI+PC9wYXRoPjwvc3ZnPg==) ${n} no-repeat; background-position-y: 5px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .editor-body .mj-spacer.focus { outline-color: ${o}; z-index: 2; } .editor-body .mj-spacer.focus:before { background-color: ${o}; } .editor-body .mj-social { position: relative; outline: 2px solid transparent; } .editor-body .mj-social.hover, .editor-body .mj-social.focus { outline-color: ${n}; z-index: 1; } .editor-body .mj-social.hover:before, .editor-body .mj-social.focus:before { content: ""; display: block; width: 20px; height: 30px; position: absolute; left: -20px; top: -2px; color: ${s}; background: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBjbGFzcz0ibXgtYXV0byBzdmctdGV4dCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjIwIiB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE1LjUgNy41YTIuNSAyLjUgMCAxIDAgMC01IDIuNSAyLjUgMCAwIDAgMCA1ek0xMi4yMiA2LjIyNGMuMTc5LjQ4LjQ2LjkwOS44MTYgMS4yNjJMOS45MTYgOS4yM2EzLjQ4NSAzLjQ4NSAwIDAgMC0uNjQtMS4zNjFsMi45NDQtMS42NDV6TTkgMTBhMy41IDMuNSAwIDEgMS03IDAgMy41IDMuNSAwIDAgMSA3IDB6TTE4IDE1YTIuNSAyLjUgMCAxIDEtNSAwIDIuNSAyLjUgMCAwIDEgNSAwek05Ljg1NCAxMS4wMDVjLS4xNDcuNDkxLS40LjkzNy0uNzMgMS4zMWwzLjAyMiAxLjY4Yy4xNDctLjQ5MS40LS45MzcuNzMtMS4zMWwtMy4wMjItMS42OHoiPjwvcGF0aD48L3N2Zz4=) ${n} no-repeat; background-position-y: 5px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .editor-body .mj-social.focus { outline-color: ${o}; z-index: 2; } .editor-body .mj-social.focus:before { background-color: ${o}; }`},Kr={tagName:"mj-head",attributes:{},children:[{tagName:"mj-attributes",attributes:{},children:[{tagName:"mj-all",attributes:{"font-family":"arial",color:"#000000"}},{tagName:"mj-button",attributes:{color:"#FFFFFF","background-color":"#414141"}},{tagName:"mj-section",attributes:{"background-color":void 0}}]}]},qr=t=>{var o;let r=t;if(((o=r.children)==null?void 0:o.findIndex(n=>n.tagName===L.MJ_BODY))===0){const n=r.children.shift();r.children.length===0&&r.children.push(Kr),r.children.push(n)}return r},Pt=t=>{if(!t)return"";let r="";return Object.keys(t).forEach(o=>{const n=t[o];n&&(r+=` ${o}="${n}"`)}),r},Re=(t,r)=>`<${t.tagName}${Pt(t.attributes)}>${r??""}`,ot=t=>{if(!t)return"";let r="";return t.children&&t.children.forEach(o=>{var s;let n="";if(["mj-social","mj-attributes"].includes(o.tagName)&&(n=(s=o.children)==null?void 0:s.reduce((l,a)=>l+=Re(a),"")),n)return r+=Re(o,n),r;if(["mj-section","mj-column"].includes(o.tagName))return r+=Re(o,ot(o)),r;r+=Re(o,o.content)}),r},eo=t=>{var o,n,s;return`${ot((o=t.children)==null?void 0:o[0])}${ot((s=t.children)==null?void 0:s[1])}`},Ht=t=>{var r,o;for(let n=0;n<(((r=t.children)==null?void 0:r.length)??0);n++){const s=(o=t.children)==null?void 0:o[n];if(s.tagName==="mj-head")continue;const l=s.attributes;s.attributes.hasOwnProperty("css-class")?l["css-class"].includes(s.tagName)||(l["css-class"]=s.tagName+" "+l["css-class"]):l["css-class"]=s.tagName,s.children&&Ht(s)}return me(t)},nt=()=>{const{currentEmptyNode:t,currentFocusNode:r,currentHoverNode:o}=y.useContext(Ct);return{currentEmptyNode:t,currentFocusNode:r,currentHoverNode:o,resetEmptyNode:()=>{t.current&&(t.current.classList.add(pe),t.current=null)},setHoverNodeCls:a=>{if(o.current){if(!Q(o.current)){const m=re(o.current,L.MJ_SECTION);m==null||m.classList[a](Ae)}o.current.classList[a](Ae)}a==="remove"&&(o.current=null)},setFocusNodeCls:a=>{if(r.current){if(!Q(r.current)){const m=re(r.current,L.MJ_SECTION);m==null||m.classList[a](vr,Ae)}r.current.classList[a](Xe)}a==="remove"&&(r.current=null)}}},Be=()=>{const{dataTransfer:t,setDataTransfer:r}=y.useContext(ue);return{dataTransfer:t,setDataTransfer:r}},to=()=>{const[t,r]=y.useState(null),{focusNode:o}=oe();return y.useEffect(()=>{const n=document.createElement("div");n.setAttribute("id",St),n.setAttribute("style","position: absolute; left: 0; top: 0; width: 279px"),n.onclick=s=>{s.stopPropagation()},r(n)},[]),y.useEffect(()=>{var n;if(!(!o||!t)&&(t.replaceChildren(),ze(o)||Oe(o))){const s=o.getRootNode().documentElement;(n=s.querySelector("body"))==null||n.appendChild(t);const{left:l,top:a,width:m,height:u}=o.getBoundingClientRect();t.style.left=`${l+m/2-279/2}px`,t.style.top=a>88?`${a+(s==null?void 0:s.scrollTop)-78-10}px`:`${a+(s==null?void 0:s.scrollTop)+u+10}px`}},[o,t]),y.useEffect(()=>{if(!t)return;const n=s=>{s.stopPropagation()};return t.addEventListener("click",n,!1),t.addEventListener("mouseover",n,!1),()=>{t.removeEventListener("click",n,!1),t.removeEventListener("mouseover",n,!1)}},[t]),{editorTool:t}},oe=()=>{const{focusNode:t,setFocusNode:r}=y.useContext(ue);return{focusNode:t,setFocusNode:r}},ro=()=>{const{appData:t,setAppData:r}=ae(),{focusNode:o,setFocusNode:n}=oe(),{setDataTransfer:s}=Be(),{setFocusNodeCls:l}=nt(),[a,m]=y.useState(null);return y.useEffect(()=>{const u=document.createElement("div");u.className=It,u.innerHTML=`
`,m(u)},[]),y.useEffect(()=>{if(!a||!o||he(o)){a==null||a.remove();return}const u=a.querySelector(`.${At}`);o.appendChild(a);const x=Q(o),f=c=>{var v,C,I,D;c.stopPropagation();const p=c.target,g=ie({node:o});if(Er(p)){r(Ur({appData:t,idx:g}));const N=o.cloneNode(!0);if(N.classList.remove(Xe,Ae),(v=N.querySelector(`.${It}`))==null||v.remove(),x)qe(o,N);else{const _=document.createElement("tr");_.appendChild(N),qe(o.parentElement,_)}s({type:"copy"})}if(kr(p)){if(r(Hr({appData:t,idx:g})),l("remove"),x)((C=o.parentNode)==null?void 0:C.children.length)===1?(I=o==null?void 0:o.parentElement)==null||I.replaceChildren():o==null||o.remove();else{const N=re(o,L.MJ_COLUMN);(D=o==null?void 0:o.parentElement)==null||D.remove(),tt(N)||N==null||N.classList.add(pe)}n(null),s({type:"delete"})}},b=()=>{s({type:"move",data:{type:x?"column":"basic",value:o.classList[0]}})};return a.addEventListener("click",f,!1),u==null||u.addEventListener("dragstart",b),()=>{a.removeEventListener("click",f,!1),u==null||u.removeEventListener("dragstart",b)}},[o,a,t]),{focusTool:a}},oo=()=>{const{hoverNode:t,setHoverNode:r}=y.useContext(ue);return{hoverNode:t,setHoverNode:r}},ce=()=>{const[t,r]=y.useState(void 0),{appData:o,setAppData:n}=ae(),{focusNode:s}=oe(),{idx:l,defaultNodeAttr:a}=y.useMemo(()=>s?{idx:ie({node:s}),defaultNodeAttr:Le[s.classList[0]].attributes}:{idx:"1",defaultNodeAttr:{width:"600px","background-color":""}},[s]),m=u=>{o&&n(zt({appData:o,idx:l,property:u}))};return y.useEffect(()=>{if(!o||!l)return;const u=l==="1"?Ot(o):{},x=Nt({appData:o,idx:l});r({...a,...x==null?void 0:x.attributes,...u})},[l,o]),{property:t,setProperty:m}},Ut=()=>{const{tab:t,setTab:r}=y.useContext(ue);return{tab:t,setTab:r}},no=()=>{const{t}=z(),{token:r}=d.theme.useToken(),{dataTransfer:o}=Be(),{appData:n,setAppData:s}=ae(),[l,a]=y.useState(null),{focusNode:m}=oe(),{lang:u}=Fe(),{style:x,hoverStyle:f}=y.useMemo(()=>{const b=`border: 1px dashed ${r.colorPrimaryBorder}; background-color: ${r.colorPrimaryBg}; padding: 20px; text-align: center; font-size: 14px; line-height: 14px; color: ${r.colorPrimaryTextHover};`;return{style:b,hoverStyle:`${b} background-color: ${r.colorPrimaryBgHover}`}},[r]);return y.useEffect(()=>{const b=document.createElement("div");b.setAttribute("class",Mt),b.setAttribute("style",x),b.innerText=t("basic.drop_here"),a(b)},[]),y.useEffect(()=>{if(!l||!o)return;const b=()=>{l.setAttribute("style",f)},c=()=>{l.setAttribute("style",x)},p=()=>{const v=ie({node:l,transferAction:o.type});if(o.type=="add")s(Pr({appData:n,idx:v,dataTransfer:o}));else if(o.type==="move"){const C=ie({node:m,transferAction:o.type});s(Yr({appData:n,idx:v,originIdx:C}))}},g=v=>{v.stopPropagation(),v.preventDefault()};return l.addEventListener("dragenter",b),l.addEventListener("dragleave",c),l.addEventListener("dragover",g),l.addEventListener("drop",p),()=>{l.removeEventListener("dragenter",b),l.removeEventListener("dragleave",c),l.removeEventListener("drop",p),l.removeEventListener("dragover",g)}},[l,o,n]),y.useEffect(()=>{l&&(l.innerText=t("basic.drop_here"))},[u]),{block:l}},so=()=>{const{setHoverNode:t}=oo(),{focusNode:r,setFocusNode:o}=oe(),{setTab:n}=Ut(),{appData:s,setAppData:l}=ae(),{dataTransfer:a,setDataTransfer:m}=Be(),{block:u}=no(),{editorTool:x}=to(),{skin:f,lang:b}=Fe();ro();const[c,p]=y.useState(null),{currentHoverNode:g,currentFocusNode:v,currentEmptyNode:C,resetEmptyNode:I,setHoverNodeCls:D,setFocusNodeCls:N}=nt();return y.useEffect(()=>{if(!c)return;const _=R=>{const E=R.target;if(!E||a)return;D("remove");const M=re(E);!M||Dr(M)||(g.current!==M&&(g.current=M),D("add"),t(M))},X=()=>{D("remove")},H=R=>{R.preventDefault();const E=R.target;if(!E)return;n("edit"),N("remove");const M=re(E);if(!M){o(null);return}et(M)||(v.current!==M&&(v.current=M),N("add"),o(M))},U=R=>{R.preventDefault(),be(R.target)?C.current=null:I()},J=R=>{R.preventDefault(),R.stopPropagation(),S(R)},S=zr(R=>{var Se,De,Ee,ke,Ye;let E=re(R.target,L.MJ_COLUMN);const M=ge().document.body;if(he(R.target)&&M.children[0].children.length===0){M.children[0].appendChild(u);return}if(((Se=a==null?void 0:a.data)==null?void 0:Se.type)=="basic"&&Nr(E)){I(),C.current=E,E==null||E.classList.remove(pe),E==null||E.children[0].children[0].appendChild(u);return}const Y=(a==null?void 0:a.type)==="move"?((De=a==null?void 0:a.data)==null?void 0:De.type)=="column"||Q(r):((Ee=a==null?void 0:a.data)==null?void 0:Ee.type)=="column";if(E=re(R.target,Y?L.MJ_SECTION:void 0),!E||!u)return;const{height:ee,top:le}=E.getBoundingClientRect(),{clientY:ve}=R,ne=ve-le>ee/2?"down":"up";let se=E.parentElement,te=E;if(Q(E)||(se=(se==null?void 0:se.parentElement)??null,te=te.parentElement),(a==null?void 0:a.type)=="move"){if(E===r)return;if(Q(r)){if(ne=="down"&&(r==null?void 0:r.previousElementSibling)===te||ne=="up"&&(r==null?void 0:r.nextElementSibling)===te)return}else if(ne=="down"&&((ke=r==null?void 0:r.parentElement)==null?void 0:ke.previousElementSibling)===te||ne=="up"&&((Ye=r==null?void 0:r.parentElement)==null?void 0:Ye.nextElementSibling)===te)return}ne=="down"?qe(te,u):se==null||se.insertBefore(u,te),I()},400);return c.addEventListener("mouseover",_),c.addEventListener("mouseout",X),c.addEventListener("click",H),c.addEventListener("drop",U),c.addEventListener("dragover",J),()=>{c.removeEventListener("mouseover",_),c.removeEventListener("click",H),c.removeEventListener("drop",U),c.removeEventListener("dragover",J),c.removeEventListener("mouseout",X)}},[c,u,r,a]),y.useEffect(()=>{if(!c)return;const _=()=>{u&&u.remove(),I(),m(null)};return window.addEventListener("dragend",_),c.addEventListener("dragend",_),()=>{window.removeEventListener("dragend",_),c.removeEventListener("dragend",_)}},[c,u]),y.useEffect(()=>{if(!c||!x)return;let _=null;const X=ge(),H=J=>{var S;(S=X.tinymce)==null||S.remove(),J==null||J.removeAttribute("id"),J==null||J.removeAttribute("class"),J==null||J.removeAttribute("contenteditable"),_=null},U=J=>{var R,E;const S=re(J.target);if(ze(S)||Oe(S)){let M=ze(S)?S==null?void 0:S.children[0]:(S==null?void 0:S.querySelector("p"))||(S==null?void 0:S.querySelector("a"));if(Oe(S))if(M!=null&&M.children[0])M=M.children[0];else{const Y=document.createElement("div");Y.innerText=((R=M==null?void 0:M.textContent)==null?void 0:R.trim())??"",M==null||M.replaceChildren(Y),M=Y}if((M==null?void 0:M.getAttribute("id"))==="editor")return;_&&!_.removed&&H(_.bodyElement),M==null||M.setAttribute("id","editor"),(E=X.tinymce)==null||E.init({selector:"#editor",license_key:"gpl",inline:!0,menubar:!1,language:b??"en",skin:f==="light"?"oxide":"oxide-dark",plugins:"autolink link",toolbar:["fontsize forecolor undo redo","removeformat bold italic underline strikethrough link unlink"],fixed_toolbar_container:`#${St}`,forced_root_block:" ",init_instance_callback:()=>{M.focus()},font_size_formats:"12px 14px 16px 18px 24px 36px 48px 56px 72px",setup:Y=>{_=Y,Y.on("change",ee=>{const le=ee.level.content,ve=ie({node:S});m({type:"tinymce"}),l(ne=>Rt({appData:ne,idx:ve,content:le}))}),Y.on("blur",()=>{setTimeout(()=>{H(M??null)})})}});return}_&&!_.removed&&H(_.bodyElement)};return c.addEventListener("click",U,!1),()=>{c.removeEventListener("click",U,!1)}},[x,c,b,f]),y.useEffect(()=>{var J;if(!s||!c)return;const _=Et(s),X=ie({node:r}),H=_t({doc:_,idx:X});let U=null;if(a){if(["copy","delete","tinymce"].includes(a.type)){m(null);return}const S=ie({node:u,transferAction:a==null?void 0:a.type}),R=_t({doc:_,idx:S});if(a.type==="add")U=R,rt(U),u==null||u.replaceWith(U);else{const E=re(r,L.MJ_COLUMN);(X.split("-")[1]!==S.split("-")[1]||X.length!==S.length)&&N("remove"),Q(r)?r==null||r.remove():(J=r==null?void 0:r.parentElement)==null||J.remove(),tt(E)||E==null||E.classList.add(pe),U=R,U&&(Q(U)?v.current=U:v.current=U.children[0],o(v.current)),rt(U),u==null||u.replaceWith(U),N("add")}}else{const S=r||ge().document.body.children[0];H&&(Q(S)&&S.tagName!==(H==null?void 0:H.tagName)?(H.appendChild(S.lastElementChild),v.current=H,S.replaceWith(H),N("add"),o(H)):setTimeout(()=>{Or(S,H),rt(S)}))}m(null)},[s]),{setRef:p}},io=()=>{const{t}=z(),{token:r}=d.theme.useToken(),{focusNode:o,setFocusNode:n}=oe(),{currentFocusNode:s,setFocusNodeCls:l}=nt(),[a,m]=y.useState("desktop"),u=()=>{const f={title:e.jsx("a",{onClick:c=>{c.preventDefault(),l("remove"),n(null)},children:t("block.body")})},b={title:e.jsx("a",{onClick:c=>{c.preventDefault();const p=re(o,L.MJ_SECTION);l("remove"),s.current=p,l("add"),n(p)},children:t("block.section")})};if(o){if(Q(o))return[f,{title:t("block.section")}];{const c={title:t(`block.${o.classList[0].split("-")[1]}`)};return[f,b,c]}}else return[{title:t("block.body")}]},x=f=>{const b=document.getElementById(Ke);b.style.width=f==="mobile"?"400px":"100%",m(f)};return e.jsxs(d.Flex,{style:{height:40,padding:"0 20px",borderBottom:`1px solid ${r.colorBorder}`,backgroundColor:r.colorBgContainer},align:"center",justify:"space-between",children:[e.jsx(d.Breadcrumb,{separator:">",items:u()}),e.jsx(d.Flex,{gap:10,children:e.jsx(d.Segmented,{value:a,onChange:x,options:[{label:"",value:"desktop",icon:e.jsx(O.DesktopOutlined,{})},{label:"",value:"mobile",icon:e.jsx(O.MobileOutlined,{})}]})})]})},{Text:lo}=d.Typography,Yt=({value:t})=>{const{setDataTransfer:r}=Be(),{t:o}=z(),n=s=>{r({type:"add",data:{type:s.type,value:s.value}})};return e.jsx(d.Flex,{wrap:!0,style:{margin:"10px 0"},justify:"space-between",children:t.map((s,l)=>e.jsxs(d.Card,{style:{width:96,height:96,marginBottom:10},styles:{body:{padding:0,height:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"}},hoverable:!0,draggable:!0,onDragStart:()=>n(s),children:[s.icon,e.jsx(lo,{style:{marginTop:4},strong:!0,children:o(`block.${s.label}`)})]},l))})},ao=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M16 4.5H4a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-9a1 1 0 0 0-1-1zM4 3a2.5 2.5 0 0 0-2.5 2.5v9A2.5 2.5 0 0 0 4 17h12a2.5 2.5 0 0 0 2.5-2.5v-9A2.5 2.5 0 0 0 16 3H4z"}),e.jsx("title",{children:"1 Column"})]}),Gt=t=>e.jsx(O,{component:ao,...t}),co=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M4 4.5h2.75a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zm-2.5 1A2.5 2.5 0 0 1 4 3h2.75a2.5 2.5 0 0 1 2.5 2.5v9a2.5 2.5 0 0 1-2.5 2.5H4a2.5 2.5 0 0 1-2.5-2.5v-9zm11.75-1H16a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-2.75a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zm-2.5 1a2.5 2.5 0 0 1 2.5-2.5H16a2.5 2.5 0 0 1 2.5 2.5v9A2.5 2.5 0 0 1 16 17h-2.75a2.5 2.5 0 0 1-2.5-2.5v-9z"}),e.jsx("title",{children:"2 Column"})]}),Vt=t=>e.jsx(O,{component:co,...t}),uo=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M1.5 4.75C1.5 3.784 2.284 3 3.25 3h1.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0 1 4.75 17h-1.5a1.75 1.75 0 0 1-1.75-1.75V4.75zm1.75-.25a.25.25 0 0 0-.25.25v10.5c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25V4.75a.25.25 0 0 0-.25-.25h-1.5zm4.25.25C7.5 3.784 8.284 3 9.25 3h1.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0 1 10.75 17h-1.5a1.75 1.75 0 0 1-1.75-1.75V4.75zm1.75-.25a.25.25 0 0 0-.25.25v10.5c0 .138.112.25.25.25h1.5a.25.25 0 0 0 .25-.25V4.75a.25.25 0 0 0-.25-.25h-1.5zm6-1.5a1.75 1.75 0 0 0-1.75 1.75v10.5c0 .966.784 1.75 1.75 1.75h1.5a1.75 1.75 0 0 0 1.75-1.75V4.75A1.75 1.75 0 0 0 16.75 3h-1.5zM15 4.75a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v10.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25V4.75z"}),e.jsx("title",{children:"3 Column"})]}),Jt=t=>e.jsx(O,{component:uo,...t}),po=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M2.75 3c-.69 0-1.25.56-1.25 1.25v11.5c0 .69.56 1.25 1.25 1.25h1C4.44 17 5 16.44 5 15.75V4.25C5 3.56 4.44 3 3.75 3h-1zM3 4.75a.25.25 0 0 1 .5 0v10.5a.25.25 0 1 1-.5 0V4.75zM7.25 3C6.56 3 6 3.56 6 4.25v11.5c0 .69.56 1.25 1.25 1.25h1c.69 0 1.25-.56 1.25-1.25V4.25C9.5 3.56 8.94 3 8.25 3h-1zm.25 1.75a.25.25 0 0 1 .5 0v10.5a.25.25 0 1 1-.5 0V4.75zm3-.5c0-.69.56-1.25 1.25-1.25h1c.69 0 1.25.56 1.25 1.25v11.5c0 .69-.56 1.25-1.25 1.25h-1c-.69 0-1.25-.56-1.25-1.25V4.25zm1.75.25a.25.25 0 0 0-.25.25v10.5a.25.25 0 1 0 .5 0V4.75a.25.25 0 0 0-.25-.25zm4-1.5C15.56 3 15 3.56 15 4.25v11.5c0 .69.56 1.25 1.25 1.25h1c.69 0 1.25-.56 1.25-1.25V4.25c0-.69-.56-1.25-1.25-1.25h-1zm.25 1.75a.25.25 0 1 1 .5 0v10.5a.25.25 0 1 1-.5 0V4.75z"}),e.jsx("title",{children:"4 Column"})]}),Zt=t=>e.jsx(O,{component:po,...t}),mo=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M1.5 5.5A2.5 2.5 0 0 1 4 3h5a2.5 2.5 0 0 1 2.5 2.5v9A2.5 2.5 0 0 1 9 17H4a2.5 2.5 0 0 1-2.5-2.5v-9zm2.5-1h5a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zM12.5 5.5A2.5 2.5 0 0 1 15 3h1a2.5 2.5 0 0 1 2.5 2.5v9A2.5 2.5 0 0 1 16 17h-1a2.5 2.5 0 0 1-2.5-2.5v-9zm2.5-1h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z"}),e.jsx("title",{children:"2 Columns left split"})]}),Wt=t=>e.jsx(O,{component:mo,...t}),go=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M8.5 5.5A2.5 2.5 0 0 1 11 3h5a2.5 2.5 0 0 1 2.5 2.5v9A2.5 2.5 0 0 1 16 17h-5a2.5 2.5 0 0 1-2.5-2.5v-9zm2.5-1h5a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1zM1.5 5.5A2.5 2.5 0 0 1 4 3h1a2.5 2.5 0 0 1 2.5 2.5v9A2.5 2.5 0 0 1 5 17H4a2.5 2.5 0 0 1-2.5-2.5v-9zm2.5-1h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z"}),e.jsx("title",{children:"2 Columns right split"})]}),Qt=t=>e.jsx(O,{component:go,...t}),ho=()=>e.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",children:e.jsx("path",{d:"M14 4h.5a1.5 1.5 0 0 1 0 3H14a7 7 0 0 0-6.996 6.76L7 14v.5a1.5 1.5 0 0 1-3 0V14C4 8.477 8.477 4 14 4z",fill:"#979797",fillRule:"nonzero"})}),bo=t=>e.jsx(O,{component:ho,...t}),fo=()=>e.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",children:e.jsx("path",{d:"M14 15h.5a1.5 1.5 0 0 0 0-3H14a7 7 0 0 1-6.996-6.76L7 5v-.5a1.5 1.5 0 0 0-3 0V5c0 5.523 4.477 10 10 10z",fill:"#979797",fillRule:"nonzero"})}),xo=t=>e.jsx(O,{component:fo,...t}),yo=()=>e.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",children:e.jsx("path",{d:"M5 4h-.5a1.5 1.5 0 0 0 0 3H5a7 7 0 0 1 6.996 6.76L12 14v.5a1.5 1.5 0 0 0 3 0V14C15 8.477 10.523 4 5 4z",fill:"#979797",fillRule:"nonzero"})}),jo=t=>e.jsx(O,{component:yo,...t}),vo=()=>e.jsx("svg",{width:"19",height:"19",viewBox:"0 0 19 19",children:e.jsx("path",{d:"M5 15h-.5a1.5 1.5 0 0 1 0-3H5a7 7 0 0 0 6.996-6.76L12 5v-.5a1.5 1.5 0 0 1 3 0V5c0 5.523-4.477 10-10 10z",fill:"#979797",fillRule:"nonzero"})}),Co=t=>e.jsx(O,{component:vo,...t}),wo=()=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M17 6.733h-.93c0-1.866-1.87-2.333-4.203-2.333v9.47c0 .763.464 1.45 1.173 1.733l1.16.464V17H5.8v-.933l1.16-.464a1.867 1.867 0 0 0 1.173-1.733V4.4c-2.333 0-4.2.467-4.2 2.333H3V3h14v3.733z"})}),Mo=t=>e.jsx(O,{component:wo,...t}),Io=()=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M18 4.5A2.5 2.5 0 0 0 15.5 2h-11A2.5 2.5 0 0 0 2 4.5v11A2.5 2.5 0 0 0 4.5 18h11a2.5 2.5 0 0 0 2.5-2.5v-11zm-13.5-1a1 1 0 0 0-1 1v9.732l2.66-2.85a1 1 0 0 1 1.3-.14l1.81 1.252a1 1 0 0 0 1.318-.16l2.485-2.817a1 1 0 0 1 1.428-.073l1.999 1.845V4.5a1 1 0 0 0-1-1h-11zm1 3.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0z"})}),Ao=t=>e.jsx(O,{component:Io,...t}),Lo=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fill:"currentColor",d:"M18 5a2.5 2.5 0 0 0-2.5-2.5h-11A2.5 2.5 0 0 0 2 5v5a2.5 2.5 0 0 0 2.5 2.5h3.654L8.038 11H4.5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h11a1 1 0 0 1 1 1v5c0 .261-.1.499-.264.677l1.203.902c.35-.43.561-.98.561-1.579V5z"}),e.jsx("path",{fill:"currentColor",d:"M9.706 8.116l.929 8.48c.012.109.148.15.22.068L12.62 14.6l1.667 2.887a.833.833 0 1 0 1.443-.833l-1.667-2.887 2.67-.498a.125.125 0 0 0 .051-.223L9.904 8a.125.125 0 0 0-.198.115z"})]}),To=t=>e.jsx(O,{component:Lo,...t}),So=()=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:e.jsx("path",{fill:"currentColor",d:"M9.836 4.561a.25.25 0 0 1 .328 0l1.927 1.67a.25.25 0 0 1-.163.438H8.072a.25.25 0 0 1-.163-.439l1.927-1.669zM2 8.42h16v3H2v-3zM9.836 15.277a.25.25 0 0 0 .328 0l1.927-1.669a.25.25 0 0 0-.163-.439H8.072a.25.25 0 0 0-.163.44l1.927 1.668z"})}),Do=t=>e.jsx(O,{component:So,...t}),Eo=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:[e.jsx("path",{fill:"currentColor",d:"M9.836 2.161a.25.25 0 0 1 .328 0l1.927 1.67a.25.25 0 0 1-.163.438H8.072a.25.25 0 0 1-.163-.439l1.927-1.669z"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M18 8.02a2.5 2.5 0 0 0-2.5-2.5h-11A2.5 2.5 0 0 0 2 8.02v4a2.5 2.5 0 0 0 2.5 2.5h11a2.5 2.5 0 0 0 2.5-2.5v-4zm-13.5-1a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-11z"}),e.jsx("path",{fill:"currentColor",d:"M9.836 17.878a.25.25 0 0 0 .328 0l1.927-1.67a.25.25 0 0 0-.163-.439H8.072a.25.25 0 0 0-.163.44l1.927 1.669z"})]}),ko=t=>e.jsx(O,{component:Eo,...t}),No=()=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",children:e.jsx("path",{fill:"currentColor",d:"M15.5 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zM12.22 6.224c.179.48.46.909.816 1.262L9.916 9.23a3.485 3.485 0 0 0-.64-1.361l2.944-1.645zM9 10a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0zM18 15a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0zM9.854 11.005c-.147.491-.4.937-.73 1.31l3.022 1.68c.147-.491.4-.937.73-1.31l-3.022-1.68z"})}),_o=t=>e.jsx(O,{component:No,...t}),Fo=[{type:"column",value:"mj-column-1",label:"1_column",icon:e.jsx(Gt,{})},{type:"column",value:"mj-column-2",label:"2_columns",icon:e.jsx(Vt,{})},{type:"column",value:"mj-column-3",label:"3_columns",icon:e.jsx(Jt,{})},{type:"column",value:"mj-column-4",label:"4_columns",icon:e.jsx(Zt,{})},{type:"column",value:"mj-column-left",label:"left_columns",icon:e.jsx(Wt,{})},{type:"column",value:"mj-column-right",label:"right_columns",icon:e.jsx(Qt,{})}],Oo=[{type:"basic",value:"mj-text",label:"text",icon:e.jsx(Mo,{})},{type:"basic",value:"mj-image",label:"image",icon:e.jsx(Ao,{})},{type:"basic",value:"mj-button",label:"button",icon:e.jsx(To,{})},{type:"basic",value:"mj-divider",label:"divider",icon:e.jsx(Do,{})},{type:"basic",value:"mj-spacer",label:"spacer",icon:e.jsx(ko,{})},{type:"basic",value:"mj-social",label:"social",icon:e.jsx(_o,{})}],zo=()=>{const{t}=z();return e.jsxs("div",{style:{margin:10},children:[e.jsx(d.Typography.Title,{level:5,children:t("basic.add_component")}),e.jsxs(e.Fragment,{children:[e.jsx(d.Typography.Text,{strong:!0,children:t("basic.layout_component")}),e.jsx(Yt,{value:Fo})]}),e.jsxs(e.Fragment,{children:[e.jsx(d.Typography.Text,{strong:!0,children:t("basic.basic_component")}),e.jsx(Yt,{value:Oo})]})]})},{Text:xe}=d.Typography,Ro=()=>{const{t}=z();return e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.body_style")}),e.jsx(d.Form.Item,{name:"background-color",label:e.jsx(xe,{strong:!0,children:t("property.background_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})}),e.jsx(V,{name:"width",label:e.jsx(xe,{strong:!0,children:t("property.width")})}),e.jsx(B,{children:t("basic.public_style")}),e.jsx(ct,{name:"all_font-family"}),e.jsx(d.Form.Item,{name:"all_color",label:e.jsx(xe,{strong:!0,children:t("property.font_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})}),e.jsx(d.Form.Item,{name:"button_background-color",label:e.jsx(xe,{strong:!0,children:t("property.button_background_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})}),e.jsx(d.Form.Item,{name:"button_color",label:e.jsx(xe,{strong:!0,children:t("property.button_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})}),e.jsx(d.Form.Item,{name:"section_background-color",label:e.jsx(xe,{strong:!0,children:t("property.section_background_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})})]})},{Text:ye}=d.Typography,Bo=()=>{const{t}=z(),{property:r,setProperty:o}=ce();return e.jsxs(e.Fragment,{children:[e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.button_style")}),e.jsx(d.Form.Item,{labelCol:{span:24},name:"href",label:e.jsx(ye,{strong:!0,children:t("property.button_link")}),style:{marginBottom:6},children:e.jsx(d.Input,{placeholder:"https://www.example.com"})}),e.jsx(d.Form.Item,{name:"target",valuePropName:"checked",normalize:n=>n?"_blank":void 0,style:{textAlign:"left"},children:e.jsx(d.Checkbox,{children:t("basic.open_link_new_tab")})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.styles")}),e.jsxs(d.Flex,{justify:"space-between",style:{marginBottom:24},children:[e.jsx(ye,{strong:!0,children:t("property.full_width")}),e.jsx(d.Switch,{value:!fe(r==null?void 0:r.width),onChange:n=>{o({...r,width:n?"100%":""})}})]}),e.jsx(d.Form.Item,{name:"background-color",label:e.jsx(ye,{strong:!0,children:t("property.background_color")}),normalize:n=>n.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})}),e.jsx(Ue,{}),e.jsx(er,{})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.text_style")}),e.jsx(V,{step:1,name:"font-size",label:e.jsx(ye,{strong:!0,children:t("property.font_size")})}),e.jsx(V,{name:"line-height",options:["px","%","-"],label:e.jsx(ye,{strong:!0,children:t("property.line_height")}),step:.1}),e.jsx(d.Form.Item,{name:"color",label:e.jsx(ye,{strong:!0,children:t("property.font_color")}),normalize:n=>n.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.position")}),e.jsx(Te,{}),e.jsx(je,{})]})]})},{Text:st}=d.Typography,Po=()=>{const{t}=z();return e.jsxs(e.Fragment,{children:[e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.divider_style")}),e.jsx(V,{name:"width",percentMax:100,options:["px","%"],label:e.jsx(st,{strong:!0,children:t("property.width")})}),e.jsx(V,{step:1,name:"border-width",label:e.jsx(st,{strong:!0,children:t("property.border_width")})}),e.jsx(d.Form.Item,{name:"border-color",label:e.jsx(st,{strong:!0,children:t("property.border_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.position")}),e.jsx(Te,{}),e.jsx(je,{})]})]})},{Text:Xt}=d.Typography,Ho=()=>{const{t}=z();return e.jsxs(e.Fragment,{children:[e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.image_style")}),e.jsx(nr,{name:"src",label:t("property.image_source")}),e.jsx(d.Form.Item,{labelCol:{span:24},name:"href",label:e.jsx(Xt,{strong:!0,children:t("property.image_link")}),style:{marginBottom:6},children:e.jsx(d.Input,{placeholder:"https://www.example.com"})}),e.jsx(d.Form.Item,{name:"target",valuePropName:"checked",normalize:r=>r?"_blank":void 0,style:{textAlign:"left"},children:e.jsx(d.Checkbox,{children:t("basic.open_link_new_tab")})}),e.jsx(d.Form.Item,{labelCol:{span:24},name:"alt",label:e.jsx(Xt,{strong:!0,children:t("property.alt_text")}),children:e.jsx(d.Input,{placeholder:t("basic.alt_text_plc")})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.size")}),e.jsx(en,{}),e.jsx(Ue,{})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.position")}),e.jsx(Te,{}),e.jsx(je,{})]})]})},{Text:$t}=d.Typography,Kt={"padding-top":0,"padding-right":0,"padding-bottom":0,"padding-left":0},je=()=>{const{t}=z(),[r,o]=y.useState(!1),{property:n,setProperty:s}=ce(),l=y.useMemo(()=>{const c={...Kt};if(!n||Object.keys(n).length==0)return c;const p=n.padding;if(!p)return c;const g=p==null?void 0:p.split(" "),v=g.length;if(v==1)Object.keys(c).forEach(C=>{c[C]=parseInt(g[0])});else if(v==2){const C=parseInt(g[0]),I=parseInt(g[1]);c["padding-left"]=I,c["padding-right"]=I,c["padding-top"]=C,c["padding-bottom"]=C}else if(v==3){const C=parseInt(g[0]),I=parseInt(g[1]),D=parseInt(g[2]);c["padding-left"]=I,c["padding-right"]=I,c["padding-top"]=C,c["padding-bottom"]=D}else Object.keys(c).forEach((C,I)=>{c[C]=parseInt(g[I])});return c},[n]),{["padding-right"]:a,["padding-left"]:m,["padding-top"]:u,["padding-bottom"]:x}=l,f=[u,a,x,m],b=(c,p)=>{let g=null;if(p==="padding")g={...n,padding:`${c}px ${c}px ${c}px ${c}px`};else{const v=Object.assign(l,{[p]:c});g={...n,padding:`${v["padding-top"]}px ${v["padding-right"]}px ${v["padding-bottom"]}px ${v["padding-left"]}px`}}s(g)};return y.useEffect(()=>{!r&&o(!(m===a&&a===u&&u===x))},[l]),e.jsxs(e.Fragment,{children:[e.jsxs(d.Flex,{align:"center",justify:"space-between",children:[e.jsx($t,{strong:!0,children:t("property.padding")}),r?e.jsx(d.Button,{style:{paddingRight:0},onClick:()=>{const c=Math.min(...f),p=`${c}px ${c}px ${c}px ${c}px`;o(!1),s({...n,padding:p})},type:"link",children:t("basic.less_option")}):e.jsxs(d.Flex,{align:"center",children:[e.jsx(d.Button,{style:{paddingRight:5},onClick:()=>o(!0),type:"link",children:t("basic.more_option")}),e.jsx(V,{hasForm:!1,value:Math.min(...f),onChange:c=>b(c??0,"padding")})]})]}),r&&e.jsx(d.Flex,{wrap:!0,justify:"space-between",children:Object.keys(Kt).map((c,p)=>e.jsxs(d.Flex,{align:"center",style:{marginTop:12},children:[e.jsx($t,{style:{width:50,textAlign:"left"},children:t(`property.${c.split("-")[1]}`)}),e.jsx(V,{hasForm:!1,style:{width:80},value:f[p],onChange:g=>b(g??0,c)})]},c))})]})},{Text:Pe}=d.Typography,Uo=()=>{const{t}=z(),{appData:r,setAppData:o}=ae(),{focusNode:n}=oe(),s=[{key:"1",icon:e.jsx(Gt,{})},{key:"2",icon:e.jsx(Vt,{})},{key:"3",icon:e.jsx(Jt,{})},{key:"4",icon:e.jsx(Zt,{})},{key:"left",icon:e.jsx(Wt,{})},{key:"right",icon:e.jsx(Qt,{})}],l=a=>{const m=ie({node:n});o(Gr({appData:r,idx:m,column:a}))};return e.jsxs(e.Fragment,{children:[e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.layout")}),e.jsx(d.Flex,{justify:"space-around",children:s.map(a=>e.jsx(d.Button,{type:"text",onClick:()=>l(a.key),style:{padding:"0px 6px"},children:a.icon},a.key))})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.section_style")}),e.jsx(d.Form.Item,{name:"full-width",label:e.jsx(Pe,{strong:!0,children:t("property.full_width")}),valuePropName:"checked",normalize:a=>a?"full-width":"",children:e.jsx(d.Switch,{})}),e.jsx(Ue,{}),e.jsx(er,{}),e.jsx(d.Form.Item,{name:"background-color",label:e.jsx(Pe,{strong:!0,children:t("property.background_color")}),normalize:a=>a.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})}),e.jsx(nr,{name:"background-url",label:t("property.background_image")}),e.jsx(d.Form.Item,{name:"background-repeat",label:e.jsx(Pe,{strong:!0,children:t("property.background_repeat")}),children:e.jsx(d.Select,{style:{width:120,textAlign:"left"},options:[{value:"repeat",label:t("property.repeat")},{value:"no-repeat",label:t("property.no_repeat")}]})}),e.jsx(d.Form.Item,{name:"background-size",label:e.jsx(Pe,{strong:!0,children:t("property.background_size")}),children:e.jsx(d.Select,{style:{width:120,textAlign:"left"},options:[{value:"auto",label:t("property.auto")},{value:"cover",label:t("property.cover")},{value:"contain",label:t("property.contain")}]})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.position")}),e.jsx(je,{})]})]})},{Text:q}=d.Typography,qt={facebook:{name:"facebook",href:"https://www.facebook.com/"},twitter:{name:"twitter",href:"https://www.twitter.com/"},x:{name:"x",href:"https://www.twitter.com/"},google:{name:"google",href:"https://www.google.com/"},pinterest:{name:"pinterest",href:"https://www.pinterest.com/"},linkedin:{name:"linkedin",href:"https://www.linkedin.com/"},tumblr:{name:"tumblr",href:"https://www.tumblr.com/"},xing:{name:"xing",href:"https://www.xing.com/"},github:{name:"github",href:"https://www.github.com/"},instagram:{name:"instagram",href:"https://www.instagram.com/"},web:{name:"web",href:"https://www.web.com/"},snapchat:{name:"snapchat",href:"https://www.snapchat.com/"},youtube:{name:"youtube",href:"https://www.youtube.com/"},vimeo:{name:"vimeo",href:"https://www.vimeo.com/"},medium:{name:"medium",href:"https://www.medium.com/"},soundcloud:{name:"soundcloud",href:"https://www.soundcloud.com/"},dribbble:{name:"dribbble",href:"https://www.dribbble.com/"},custom:{name:"custom",href:"",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAQAAAD/5HvMAAACDUlEQVR4Ae3BP0tqcQDH4a8NCUHWUg1tElGBEvRvDhoaIlp6BSFmtFdzk29BKgQJCXoBLU1FBIE1ByVFFC5Cehoi7HMRrnAwDY+e3z3CPc8jn8/n8/0fmGVW3YQUKXUP+ilTpl/dgk2qNtUtyFGVU3dgjpo5dQMOqDmQ9whhUWMRktdIYJeQ17jF7lbeYp568/ISh9Q7lHcIYVHPIiSvsEUjW/IKdzRyJ2+wQDML8gJHNHOkf48BPmjmgwGZQIBBwsywxDpxdkmS4pRzcuQp8ZsSeXKcc0qKJLvEWWeJGcIMEpAzRDjjhgeKVDChQpEHbjgjotawQgnTSqyodUTIY1KeiJxhiEtMuWRIztFLGhPS9Kpd7FDBTRV21BlWKeOWMqvqHFGecMMTUbmDYa7o1BXDcg9BMnQiQ1BuY49v2vHNnsxgDQunLNZkDtMUcKLAtMziGSeeZRZhnArLJDZwakMmkcGpjEziBadeZA5jtGNMphCjHTGZwjHtOJYpvNJMmjTNvMoMxmnsnkVJYpF7GhuXCcT56ZN9gvqLIPt88lNcJpCl3gWTqsMkF9TLygTesCsSI6AGCBCjiN2b3McEdllG9AtGyGI3IbeRoOaRZbWAZR6pSchtnFD1RZI+tYg+knxRdSK3UQCuicoholwDBbmLKd7ZpkdtoIdt3pmSm4gwqg4wSkQ+n8/n85nwB8QLTUFkdp6OAAAAAElFTkSuQmCC","background-color":"#c1c1c1"}},Yo=()=>{var b;const{t}=z(),{appData:r,setAppData:o}=ae(),{focusNode:n}=oe(),s=ie({node:n}),l=Nt({appData:r,idx:s}),a=(c,p,g,v)=>{let C=null;if(p==="content")C=Rt({appData:r,idx:s,content:g,index:c});else{const I=p==="name"?qt[g]:{...v,[p]:g};C=zt({appData:r,idx:s,property:I,index:c})}o(C)},m=()=>{o(Vr({appData:r,idx:s,value:{tagName:"mj-social-element",attributes:qt.custom,content:""}}))},u=c=>{o(Bt({appData:r,idx:s,originIndex:c,targetIndex:c-1}))},x=c=>{o(Bt({appData:r,idx:s,originIndex:c,targetIndex:c+1}))},f=c=>{o(Jr({appData:r,idx:s,index:c}))};return e.jsxs(e.Fragment,{children:[e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.content")}),(b=l==null?void 0:l.children)==null?void 0:b.map((c,p)=>{var v,C,I,D;const g=c.attributes;return e.jsxs(d.Card,{style:{marginBottom:12},styles:{header:{textAlign:"left",padding:"0 12px",minHeight:46},body:{padding:"12px"}},title:g.name,extra:e.jsxs(d.Flex,{gap:4,children:[e.jsx(d.Button,{type:"text",style:{padding:"2px 8px"},disabled:p===0||((v=l==null?void 0:l.children)==null?void 0:v.length)===1,onClick:()=>u(p),children:e.jsx(O.UpOutlined,{})}),e.jsx(d.Button,{type:"text",style:{padding:"2px 8px"},disabled:p===(((C=l==null?void 0:l.children)==null?void 0:C.length)??1)-1||((I=l==null?void 0:l.children)==null?void 0:I.length)===1,onClick:()=>x(p),children:e.jsx(O.DownOutlined,{})}),e.jsx(d.Button,{type:"text",style:{padding:"2px 8px"},disabled:((D=l==null?void 0:l.children)==null?void 0:D.length)===1,onClick:()=>f(p),children:e.jsx(O.DeleteOutlined,{})})]}),children:[e.jsxs(d.Flex,{justify:"space-between",align:"center",children:[e.jsx(q,{strong:!0,children:t("property.network")}),e.jsx(d.Select,{value:g.name,style:{width:150,textAlign:"left"},options:[{value:"facebook",label:"Facebook"},{value:"twitter",label:"Twitter(X)"},{value:"x",label:"X"},{value:"google",label:"Google"},{value:"pinterest",label:"Pinterest"},{value:"linkedin",label:"Linkedin"},{value:"tumblr",label:"Tumblr"},{value:"xing",label:"Xing"},{value:"github",label:"Github"},{value:"instagram",label:"Instagram"},{value:"web",label:"Web"},{value:"snapchat",label:"Snapchat"},{value:"youtube",label:"Youtube"},{value:"vimeo",label:"Vimeo"},{value:"medium",label:"Medium"},{value:"soundcloud",label:"Soundcloud"},{value:"dribbble",label:"Dribbble"},{value:"custom",label:t("property.custom")}],onChange:N=>a(p,"name",N,g)})]}),e.jsxs(d.Flex,{justify:"space-between",align:"center",style:{marginTop:6},children:[e.jsx(q,{strong:!0,children:t("property.label")}),e.jsx(d.Input,{value:c.content,style:{width:150},placeholder:t("basic.social_label_plc"),onChange:N=>a(p,"content",N.target.value,g)})]}),e.jsxs(d.Flex,{justify:"space-between",align:"center",style:{marginTop:6},children:[e.jsx(q,{strong:!0,children:t("property.url")}),e.jsx(d.Input,{value:g.href,style:{width:150},placeholder:t("basic.social_url_plc"),onChange:N=>a(p,"href",N.target.value,g)})]}),g.name==="custom"&&e.jsxs(e.Fragment,{children:[e.jsxs(d.Flex,{justify:"space-between",align:"center",style:{marginTop:6},children:[e.jsx(q,{strong:!0,children:t("property.icon")}),e.jsx(d.Input,{value:g==null?void 0:g.src,style:{width:150},placeholder:t("basic.social_icon"),onChange:N=>a(p,"src",N.target.value,g)})]}),e.jsxs(d.Flex,{justify:"space-between",align:"center",style:{marginTop:6},children:[e.jsx(q,{strong:!0,children:t("property.icon_color")}),e.jsx(d.ColorPicker,{value:g==null?void 0:g["background-color"],onChange:(N,_)=>{a(p,"background-color",_,g)},showText:!0})]})]})]},`${g.name}-${p}`)}),e.jsx(d.Button,{icon:e.jsx(O.PlusOutlined,{}),style:{width:"100%"},type:"default",onClick:m,children:t("basic.add_social")})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.social_style")}),e.jsx(V,{step:1,name:"icon-size",label:e.jsx(q,{strong:!0,children:t("property.icon_size")})}),e.jsx(V,{step:1,name:"icon-padding",label:e.jsx(q,{strong:!0,children:t("property.icon_padding")})}),e.jsx(Ue,{}),e.jsx(V,{step:1,name:"inner-padding",label:e.jsx(q,{strong:!0,children:t("property.inner_padding")})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.text_style")}),e.jsx(ct,{}),e.jsx(V,{step:1,name:"font-size",label:e.jsx(q,{strong:!0,children:t("property.font_size")})}),e.jsx(d.Form.Item,{name:"color",label:e.jsx(q,{strong:!0,children:t("property.font_color")}),normalize:c=>c.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.position")}),e.jsx(d.Form.Item,{name:"mode",label:e.jsx(q,{strong:!0,children:t("property.mode")}),children:e.jsx(d.Select,{style:{width:120,textAlign:"left"},options:[{value:"vertical",label:t("property.vertical")},{value:"horizontal",label:t("property.horizontal")}]})}),e.jsx(Te,{}),e.jsx(je,{})]})]})},{Text:Go}=d.Typography,Vo=()=>{const{t}=z();return e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.spacer_style")}),e.jsx(V,{name:"height",label:e.jsx(Go,{strong:!0,children:t("property.height")})})]})},{Text:it}=d.Typography,Jo=()=>{const{t}=z();return e.jsxs(e.Fragment,{children:[e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.text_style")}),e.jsx(ct,{}),e.jsx(V,{step:1,name:"font-size",label:e.jsx(it,{strong:!0,children:t("property.font_size")})}),e.jsx(V,{name:"line-height",options:["px","%","-"],label:e.jsx(it,{strong:!0,children:t("property.line_height")}),step:.1}),e.jsx(d.Form.Item,{name:"color",label:e.jsx(it,{strong:!0,children:t("property.font_color")}),normalize:r=>r.toHexString(),children:e.jsx(d.ColorPicker,{showText:!0})})]}),e.jsxs(e.Fragment,{children:[e.jsx(B,{children:t("basic.position")}),e.jsx(Te,{}),e.jsx(je,{})]})]})},{Text:Zo}=d.Typography,Te=()=>{const{t}=z();return e.jsx(d.Form.Item,{name:"align",label:e.jsx(Zo,{strong:!0,children:t("property.align")}),children:e.jsxs(d.Radio.Group,{children:[e.jsx(d.Radio.Button,{value:"left",children:t("property.left")}),e.jsx(d.Radio.Button,{value:"center",children:t("property.center")}),e.jsx(d.Radio.Button,{value:"right",children:t("property.right")})]})})},{Text:He}=d.Typography,Wo="1px solid #000",Qo=[{label:"top",value:"border-top"},{label:"bottom",value:"border-bottom"},{label:"left",value:"border-left"},{label:"right",value:"border-right"}],Xo=[{label:"Solid",value:"solid"},{label:"Dashed",value:"dashed"},{label:"Dotted",value:"dotted"},{label:"Double",value:"double"},{label:"Groove",value:"groove"},{label:"Ridge",value:"rigde"},{label:"Inset",value:"inset"},{label:"Outset",value:"outset"},{label:"Hidden",value:"hidden"}],er=()=>{const{t}=z(),[r,o]=y.useState(!1),{property:n,setProperty:s}=ce(),l=(n==null?void 0:n.border)&&(n==null?void 0:n.border)!=="none",{borderWidth:a,borderStyle:m,borderColor:u}=y.useMemo(()=>{const p=l?n==null?void 0:n.border:Wo,[g,v,C]=p.split(" ");return{borderWidth:g,borderStyle:v,borderColor:C}},[n]),x=y.useMemo(()=>{const p=["border-top","border-bottom","border-left","border-right"];if(!n||Object.keys(n).length==0)return p;const g={"border-top":n["border-top"],"border-bottom":n["border-bottom"],"border-left":n["border-left"],"border-right":n["border-right"]};return Object.keys(g).filter(v=>g[v]===void 0)},[n]),f=(p,g)=>{const v=Object.assign({borderWidth:a,borderStyle:m,borderColor:u},{[g]:p}),C=`${v.borderWidth} ${v.borderStyle} ${v.borderColor}`;s({...n,border:C})},b=p=>{o(p);const g=p?`${a} ${m} ${u}`:"";s({...n,border:g})},c=p=>{if(x.length>p.length){const g=x.filter(C=>!p.includes(C)),v={};g.forEach(C=>{v[C]="none"}),s({...n,...v})}else p.filter(v=>!x.includes(v)).forEach(v=>{delete n[v]}),s({...n})};return y.useEffect(()=>{o(!!l)},[n]),e.jsxs("div",{style:{marginBottom:24},children:[e.jsxs(d.Flex,{align:"center",justify:"space-between",children:[e.jsx(He,{strong:!0,children:t("property.border")}),e.jsx(d.Switch,{value:!!l,onChange:b})]}),r&&e.jsxs(d.Card,{style:{width:"100%",marginTop:6},styles:{body:{padding:16}},children:[e.jsx(Ko,{style:{marginBottom:12},value:x,options:Qo,onChange:c}),e.jsxs(d.Flex,{align:"center",justify:"space-between",style:{marginBottom:12},children:[e.jsx(He,{strong:!0,children:t("property.border_width")}),e.jsx(V,{hasForm:!1,step:1,value:parseInt(a),onChange:p=>{f(`${p??0}px`,"borderWidth")}})]}),e.jsxs(d.Flex,{align:"center",justify:"space-between",style:{marginBottom:12},children:[e.jsx(He,{strong:!0,children:t("property.border_style")}),e.jsx(d.Select,{value:m,style:{width:100,textAlign:"left"},options:Xo,onChange:p=>{f(p,"borderStyle")}})]}),e.jsxs(d.Flex,{align:"center",justify:"space-between",children:[e.jsx(He,{strong:!0,children:t("property.border_color")}),e.jsx(d.ColorPicker,{showText:!0,value:u,onChange:(p,g)=>{f(g,"borderColor")}})]})]})]})},{Text:$o}=d.Typography,lt={"radius-top":0,"radius-right":0,"radius-bottom":0,"radius-left":0},tr={"radius-top":e.jsx(bo,{}),"radius-right":e.jsx(jo,{}),"radius-bottom":e.jsx(Co,{}),"radius-left":e.jsx(xo,{})},Ue=()=>{const{t}=z(),[r,o]=y.useState(!1),{property:n,setProperty:s}=ce(),l=y.useMemo(()=>{const c={...lt};if(!n||Object.keys(n).length==0)return c;const p=n["border-radius"];if(!p)return c;const g=p.split(" "),v=g.length;if(v==1)Object.keys(c).forEach(C=>{c[C]=parseInt(g[0])});else if(v==2){const C=parseInt(g[0]),I=parseInt(g[1]);c["radius-left"]=I,c["radius-right"]=I,c["radius-top"]=C,c["radius-bottom"]=C}else if(v==3){const C=parseInt(g[0]),I=parseInt(g[1]),D=parseInt(g[2]);c["radius-left"]=I,c["radius-right"]=I,c["radius-top"]=C,c["radius-bottom"]=D}else Object.keys(c).forEach((C,I)=>{c[C]=parseInt(g[I])});return c},[n]),{["radius-right"]:a,["radius-left"]:m,["radius-top"]:u,["radius-bottom"]:x}=l,f=[u,a,x,m],b=(c,p)=>{let g=null;if(p==="radius")g={...n,"border-radius":`${c}px ${c}px ${c}px ${c}px`};else{const v=Object.assign(l,{[p]:c});g={...n,"border-radius":`${v["radius-top"]}px ${v["radius-right"]}px ${v["radius-bottom"]}px ${v["radius-left"]}px`}}s(g)};return y.useEffect(()=>{!r&&o(!(x===m&&m===a&&a===u))},[l]),e.jsxs("div",{style:{marginBottom:24},children:[e.jsxs(d.Flex,{align:"center",justify:"space-between",style:{marginBottom:12},children:[e.jsx($o,{strong:!0,children:t("property.border_radius")}),r?e.jsx(d.Button,{style:{paddingRight:0},onClick:()=>{const c=Math.min(...f),p=`${c}px ${c}px ${c}px ${c}px`;o(!1),s({...n,"border-radius":p})},type:"link",children:t("basic.less_option")}):e.jsxs(d.Flex,{align:"center",children:[e.jsx(d.Button,{style:{paddingRight:5},onClick:()=>o(!0),type:"link",children:t("basic.more_option")}),e.jsx(V,{hasForm:!1,style:{width:74},step:1,value:Math.min(...f),onChange:c=>b(c??0,"radius")})]})]}),r&&e.jsxs(e.Fragment,{children:[e.jsx(d.Flex,{wrap:!0,justify:"space-between",align:"center",gap:12,children:Object.keys(lt).slice(0,2).map((c,p)=>e.jsxs(d.Flex,{gap:12,style:{flexDirection:p%2===0?"row-reverse":"row"},children:[tr[c],e.jsx(V,{hasForm:!1,style:{width:85},value:f[p],step:1,onChange:g=>b(g??0,c)})]},p))}),e.jsx(d.Flex,{wrap:!0,justify:"space-between",align:"center",gap:12,style:{flexDirection:"row-reverse",marginTop:12},children:Object.keys(lt).slice(2).map((c,p)=>e.jsxs(d.Flex,{gap:12,style:{flexDirection:p==0?"row":"row-reverse"},children:[tr[c],e.jsx(V,{hasForm:!1,style:{width:85},value:f[p+2],step:1,onChange:g=>b(g??0,c)})]},p))})]})]})},B=({children:t})=>e.jsx(d.Divider,{orientation:"left",orientationMargin:"0",children:e.jsx(d.Typography.Text,{type:"secondary",children:t})}),Ko=({style:t,value:r,options:o,onChange:n})=>{const{token:s}=d.theme.useToken(),{t:l}=z();return e.jsx(d.Flex,{style:t,justify:"space-between",align:"center",children:o.map(a=>{const m=r.includes(a.value);return e.jsx("div",{onClick:()=>{n(m?r.filter(u=>u!==a.value):[...r,a.value])},style:{width:55,border:`1px solid ${m?s.colorPrimaryBorder:s.colorBorder}`,backgroundColor:m?s.colorPrimaryBg:"transparent",color:m?s.colorPrimaryText:s.colorText,cursor:"pointer",borderRadius:"4px",textAlign:"center"},children:l(`property.${a.label}`)},a.value)})})},at=[{value:"px",label:"px",className:"easy-mail-input-number-select-option"},{value:"%",label:"%",className:"easy-mail-input-number-select-option"},{value:"",label:"-",className:"easy-mail-input-number-select-option"}],rr=10,V=({hasForm:t=!0,name:r,options:o,style:n,step:s=rr,label:l,value:a,percentMax:m,onChange:u})=>{const{property:x}=ce(),f=x==null?void 0:x[r],b=o?o.map(v=>at.find(C=>C.label===v)):[at[0]],c=()=>{var v,C;return((v=String(f))!=null&&v.includes("%")||(C=String(f))!=null&&C.includes("px"))&&s===.1?rr:s},p=e.jsx(d.InputNumber,{min:0,max:m,step:c(),style:n,className:"easy-mail-input-number-input",value:a,onChange:u}),g=e.jsx(d.Select,{value:"px",allowClear:!1,suffixIcon:!1,className:"easy-mail-input-number-select",variant:"borderless",options:t?b:[at[0]],dropdownStyle:{padding:0}});return e.jsx("div",{style:{position:"relative"},children:t?e.jsxs(e.Fragment,{children:[e.jsx(d.Form.Item,{name:r,label:l,children:p}),e.jsx(d.Form.Item,{name:`${r}_unit`,style:{position:"absolute",right:25,top:0,width:20,marginBottom:0,zIndex:99},children:g})]}):e.jsxs(e.Fragment,{children:[p,e.jsx("div",{style:{position:"absolute",right:25,top:0,width:20,marginBottom:0,zIndex:99},children:g})]})})},{Text:qo}=d.Typography,ct=({name:t="font-family"})=>{const{t:r}=z();return e.jsx(d.Form.Item,{name:t,label:e.jsx(qo,{strong:!0,children:r("property.font_family")}),children:e.jsx(d.Select,{style:{width:120,textAlign:"left"},options:[{value:"arial",label:e.jsx("span",{style:{fontFamily:"arial"},children:"Arial"})},{value:"serif ",label:e.jsx("span",{style:{fontFamily:"serif"},children:"Serif"})},{value:"sans-serif",label:e.jsx("span",{style:{fontFamily:"sans-serif"},children:"Sansserif"})},{value:"monospace",label:e.jsx("span",{style:{fontFamily:"monospace"},children:"Monospace"})},{value:"cursive",label:e.jsx("span",{style:{fontFamily:"cursive"},children:"Cursive"})},{value:"fantasy",label:e.jsx("span",{style:{fontFamily:"fantasy"},children:"Fantasy"})},{value:"emoji",label:e.jsx("span",{style:{fontFamily:"emoji"},children:"Emoji"})},{value:"math",label:e.jsx("span",{style:{fontFamily:"math"},children:"Math"})},{value:"fangsong",label:e.jsx("span",{style:{fontFamily:"fangsong"},children:"仿宋"})}]})})},{Text:or}=d.Typography,en=()=>{const{t}=z(),{property:r,setProperty:o}=ce(),[n,s]=y.useState(!1),{width:l}=y.useMemo(()=>!r||Object.keys(r).length==0?{width:""}:{width:r.width||""},[r]);return y.useEffect(()=>{s(l!=="")},[l]),e.jsxs("div",{children:[e.jsxs(d.Flex,{justify:"space-between",style:{marginBottom:24},children:[e.jsx(or,{strong:!0,children:t("property.full_width")}),e.jsx(d.Switch,{value:l==="",onChange:a=>{o({...r,width:a?"":"200px"})}})]}),n&&e.jsxs(d.Flex,{justify:"space-between",style:{marginBottom:24},children:[e.jsx(or,{strong:!0,children:t("property.width")}),e.jsx(V,{hasForm:!1,value:parseInt(l),onChange:a=>{a&&o({...r,width:`${a}px`})}})]})]})},{Text:tn}=d.Typography,nr=({label:t,name:r})=>{const{t:o}=z(),{onUpload:n,onUploadFocusChange:s}=Fe(),{focusNode:l}=oe(),{setProperty:a}=ce(),[m,u]=y.useState(!1),x=()=>{const f=document.createElement("input");f.setAttribute("type","file"),f.setAttribute("accept",".png,.jpg,.jpeg,.webp"),f.click(),f.onchange=async()=>{var c;try{var b=(c=f.files)==null?void 0:c[0];let p="";u(!0),n?p=(await n(b)).url:p=await Zr(b),a({[r]:p}),u(!1)}catch(p){u(!1),console.error(p)}}};return y.useEffect(()=>()=>{m&&(s==null||s())},[l,m]),e.jsx(d.Form.Item,{className:"easy-marl-src-container",labelCol:{span:24},name:r,label:e.jsxs(d.Flex,{align:"center",justify:"space-between",style:{width:"100%"},children:[e.jsx(tn,{strong:!0,children:t}),e.jsx(d.Button,{type:"link",icon:e.jsx(O.UploadOutlined,{}),style:{padding:0},loading:m,onClick:x,children:o("basic.upload_image")})]}),normalize:f=>f===""?void 0:f,children:e.jsx(d.Input,{placeholder:"https://www.example.com"})})},rn={[L.MJ_BODY]:e.jsx(Ro,{}),[L.MJ_SECTION]:e.jsx(Uo,{}),[L.MJ_TEXT]:e.jsx(Jo,{}),[L.MJ_IMAGE]:e.jsx(Ho,{}),[L.MJ_BUTTON]:e.jsx(Bo,{}),[L.MJ_DIVEDER]:e.jsx(Po,{}),[L.MJ_SPACER]:e.jsx(Vo,{}),[L.MJ_SOCIAL]:e.jsx(Yo,{})},on=()=>{const{t}=z(),{token:r}=d.theme.useToken(),[o]=d.Form.useForm(),{focusNode:n}=oe(),{property:s,setProperty:l}=ce(),{appData:a}=ae(),m=(n==null?void 0:n.classList[0])??L.MJ_BODY;return y.useEffect(()=>{if(!s)return;const u=Object.keys(s);let x={};u.forEach(b=>{const c=s[b],p=String(c);Wr(p)||Qr(p)?x[b]=c:typeof c=="number"?(x[b]=c,x[`${b}_unit`]=""):p.includes("px")?(x[b]=parseInt(c),x[`${b}_unit`]="px"):p.includes("%")?(x[b]=parseInt(c),x[`${b}_unit`]="%"):x[b]=c});const f=Br(Ot(a));m==L.MJ_BUTTON&&(x={...f[L.MJ_BUTTON],...x}),m==L.MJ_SECTION&&(x={...f[L.MJ_SECTION],...x}),x={...f["mj-all"],...x},o.setFieldsValue(x)},[s]),e.jsxs("div",{style:{padding:20},children:[e.jsxs(d.Row,{children:[e.jsx(d.Col,{style:{background:r.colorPrimary,width:4,marginRight:4}}),e.jsx(d.Col,{children:e.jsx(d.Typography.Title,{level:4,style:{margin:0},children:t(`block.${m==null?void 0:m.split("-")[1]}`).toUpperCase()})})]}),e.jsx(d.Form,{form:o,colon:!1,preserve:!1,style:{textAlign:"right"},onValuesChange:(u,x)=>{const f=Object.keys(x),b={};f.forEach(c=>{const p=x[c];if(!c.includes("unit"))b[c]=p;else{const g=c.split("_")[0];fe(p)||(b[g]=`${b[g]}${p}`)}}),l(b)},children:rn[m]})]})},nn=()=>{const{token:t}=d.theme.useToken(),{t:r}=z(),{tab:o,setTab:n}=Ut(),s=[{key:"add",label:e.jsxs(d.Flex,{vertical:!0,align:"center",gap:4,style:{padding:"10px 0"},children:[e.jsx(O.PlusOutlined,{}),r("basic.add")]})},{key:"edit",label:e.jsxs(d.Flex,{vertical:!0,align:"center",gap:4,style:{padding:"10px 0"},children:[e.jsx(O.EditOutlined,{}),r("basic.edit")]})}];return e.jsxs(d.Flex,{style:{width:406,borderRight:`1px solid ${t.colorBorder}`,backgroundColor:t.colorBgContainer},children:[e.jsx("div",{style:{width:77,height:"100%"},children:e.jsx(d.Tabs,{style:{height:"100%"},tabPosition:"left",items:s,activeKey:o,onChange:l=>{n(l)}})}),e.jsx("div",{style:{flex:1,overflow:"auto"},children:o==="add"?e.jsx(zo,{}):e.jsx(on,{})})]})},sn=y.forwardRef((t,r)=>{const{changeLanguage:o}=z(),n={...Qe,...t,value:fe(t.value)?Qe.value:t.value},{value:s,width:l,height:a,colorPrimary:m,skin:u,lang:x}=n,[f,b]=y.useState(()=>Ht(qr(typeof s=="string"?yt(s).json:s))),[c,p]=y.useState("add"),[g,v]=y.useState(null),[C,I]=y.useState(null),[D,N]=y.useState(null),_=y.useRef(null),X=y.useRef(null),H=y.useRef(null);y.useImperativeHandle(r,()=>({getData:()=>({json:f,mjml:eo(f)})}));const U=`easy-mail-container ${u==="dark"?"dark":""}`;return y.useEffect(()=>{o(x??"en")},[x]),e.jsx(Ir,{children:e.jsx(d.ConfigProvider,{theme:{algorithm:u==="light"?d.theme.defaultAlgorithm:d.theme.darkAlgorithm,token:{colorPrimary:m}},children:e.jsx("div",{className:U,style:{height:a,width:l},children:e.jsx(wt.Provider,{value:{...n},children:e.jsx(ue.Provider,{value:{appData:f,setAppData:b,tab:c,setTab:p,hoverNode:g,setHoverNode:v,focusNode:C,setFocusNode:I,dataTransfer:D,setDataTransfer:N},children:e.jsxs(Ct.Provider,{value:{currentHoverNode:_,currentFocusNode:X,currentEmptyNode:H},children:[e.jsx(io,{}),e.jsxs(d.Flex,{style:{height:"calc(100% - 40px)"},children:[e.jsx(nn,{}),e.jsx(Tr,{})]})]})})})})})})}),ln=Object.freeze(Object.defineProperty({__proto__:null,default:{"basic.add":"Add","basic.edit":"Edit","basic.add_component":"Add Component","basic.layout_component":"Layout Component","basic.basic_component":"Basic Component","basic.empty_body":"Empty Canvas - Drop content here","basic.empty_column":"Empty Column","basic.empty_section":"Empty Section - Drop content here","basic.empty_text_plc":"Please enter text","basic.drop_here":"Drop here","basic.body_style":"BODY STYLES","basic.public_style":"TEMPLATE DEFAULTS","basic.more_option":"More Options","basic.less_option":"Less Options","basic.upload_image":"Upload Image","basic.layout":"LAYOUT","basic.section_style":"SECTION STYLES","basic.position":"POSITION","basic.text_style":"TEXT STYLES","basic.image_style":"IMAGE STYLES","basic.size":"SIZE","basic.button_style":"BUTTON STYLES","basic.styles":"STYLES","basic.open_link_new_tab":"Open link in new tab","basic.divider_style":"DIVIDER STYLES","basic.spacer_style":"SPACER STYLES","basic.content":"CONTENT","basic.add_social":"Add Social","basic.social_style":"SOCIAL STYLES","basic.alt_text_plc":"Enter a text","basic.social_label_plc":"Social Label","basic.social_url_plc":"Social URL","basic.social_icon_plc":"Social Icon","block.1_column":"1 Column","block.2_columns":"2 Column","block.3_columns":"3 Column","block.4_columns":"4 Column","block.left_columns":"Left Split","block.right_columns":"Right Split","block.text":"Text","block.image":"Image","block.button":"Button","block.divider":"Divider","block.spacer":"Spacer","block.social":"Social","block.body":"Body","block.section":"Section","property.width":"Width","property.background_color":"Background Color","property.background_image":"Background Image","property.background_repeat":"Background Repeat","property.background_size":"Background Size","property.border_radius":"Border Radius","property.border":"Border","property.border_width":"Border Width","property.border_style":"Border Style","property.border_color":"Border Color","property.padding":"Padding","property.top":"Top","property.right":"Right","property.bottom":"Bottom","property.left":"Left","property.font_family":"Font Family","property.font_size":"Font Size","property.line_height":"Line Height","property.font_color":"Font Color","property.align":"Align","property.center":"Center","property.image_source":"Image Source","property.image_link":"Image Link","property.alt_text":"Alt Text","property.full_width":"Full Width","property.button_link":"Button Link","property.height":"Height","property.network":"Network","property.label":"Label","property.url":"URL","property.icon":"Icon","property.icon_color":"Icon Color","property.icon_size":"Icon Size","property.icon_padding":"Icon Padding","property.inner_padding":"Inner Padding","property.mode":"Mode","property.custom":"Custom","property.horizontal":"Horizontal","property.vertical":"Vertical","property.repeat":"Repeat","property.no_repeat":"No Repeat","property.auto":"Auto","property.cover":"Cover","property.contain":"Contain","property.button_background_color":"Button Color","property.button_color":"Button Text Color","property.section_background_color":"Section Background Color"}},Symbol.toStringTag,{value:"Module"}));return sn});