@creaditor/web-starterkit 1.0.34 → 1.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3521],{83521(t,e,i){i.r(e),i.d(e,{DesignFactory:()=>l});var o=i(5441),n=i(59929),r=i(15604),s=i(18057),d=i(86319);i.e(8315).then(i.bind(i,68315));class l extends n.WF{constructor(){super(),this.lastEditor=null,this._selectedComponentId=null,this._injectedForId=null,d.M.set({injectEditor:t=>{this.injected=!0,this._injectedForId=this._selectedComponentId,this.lastEditor=this.editor,this.backToEditor=this.editor,this.editor=t}}),this.editor=n.qy`<cdtr-ilustration-preference
2
2
  width="200px"
3
3
  height="200px"
4
- ></cdtr-ilustration-preference>`,this.delayer=new s.A,this.connect=this.connect.bind(this),this.editors={block:{selector:"block-editor",load:()=>i.e(1260).then(i.bind(i,91260)),component:null},no_editor:{selector:"cdtr-no-component",load:()=>i.e(8854).then(i.bind(i,68854)),component:null,attrs:{style:"margin:auto;display:block;max-width:150px;margin-top:30px;"}}},this.type=null,r.Ay.on("select",this.connect)}connect(t){let{editor:e,component:i}=t;if(!e)return;let n=e.type;if("string"!=typeof n)return;const r=i?.id??null;if(this.injected){if(null==r||r===this._injectedForId)return;this.injected=!1,this._injectedForId=null}if(this._selectedComponentId=r,this.editor?.type===n)return;if(!this.editors[n]){const t=d.M.get("config","editor","configure","plugins");if(Array.isArray(t)){const e=t.find(t=>t.name===n);if(e&&"function"==typeof e.createEditor){this.editor=document.createElement("cdtr-editor-builder"),this.editor.type=n;const t=e.createEditor();return void(t&&(this.editor.editors=t.layout,t!==this.backToEditor&&this.lastEditor&&(this.lastEditor=null)))}}n="no_editor"}this.type=n;const s=(0,o.A)("div",null,(0,o.A)("cdtr-block-loader",null),(0,o.A)("cdtr-title",{style:"text-align:center;"},(0,o.A)("lang-text",{text:"please_wait_downloading_new_version"})));this.editors[n]&&!this.editors[n].component&&(this.editors[n].load().then(()=>{if(s.remove(),this.editors[n].attrs)for(const t in this.editors[n].attrs)if(Object.hasOwnProperty.call(this.editors[n].attrs,t)){const e=this.editors[n].attrs[t];this.editors[n].component[t]=e}}),this.editors[n].component=document.createElement(this.editors[n].selector),this.editors[n].component.appendChild(s)),this.editors[n].component&&(this.editor=this.editors[n].component)}goBack(){this.lastEditor&&(this.editor=this.lastEditor,this.lastEditor=null,this.injected=!1,this._injectedForId=null)}createRenderRoot(){return this}render(){return n.qy` ${this.lastEditor?n.qy`<div style="display:flex;justify-content:flex-start;padding:12px 16px 4px;direction:var(--direction-locale);">
4
+ ></cdtr-ilustration-preference>`,this.delayer=new s.A,this.connect=this.connect.bind(this),this.editors={block:{selector:"block-editor",load:()=>i.e(8299).then(i.bind(i,68299)),component:null},no_editor:{selector:"cdtr-no-component",load:()=>i.e(8854).then(i.bind(i,68854)),component:null,attrs:{style:"margin:auto;display:block;max-width:150px;margin-top:30px;"}}},this.type=null,r.Ay.on("select",this.connect)}connect(t){let{editor:e,component:i}=t;if(!e)return;let n=e.type;if("string"!=typeof n)return;const r=i?.id??null;if(this.injected){if(null==r||r===this._injectedForId)return;this.injected=!1,this._injectedForId=null}if(this._selectedComponentId=r,this.editor?.type===n)return;if(!this.editors[n]){const t=d.M.get("config","editor","configure","plugins");if(Array.isArray(t)){const e=t.find(t=>t.name===n);if(e&&"function"==typeof e.createEditor){this.editor=document.createElement("cdtr-editor-builder"),this.editor.type=n;const t=e.createEditor();return void(t&&(this.editor.editors=t.layout,t!==this.backToEditor&&this.lastEditor&&(this.lastEditor=null)))}}n="no_editor"}this.type=n;const s=(0,o.A)("div",null,(0,o.A)("cdtr-block-loader",null),(0,o.A)("cdtr-title",{style:"text-align:center;"},(0,o.A)("lang-text",{text:"please_wait_downloading_new_version"})));this.editors[n]&&!this.editors[n].component&&(this.editors[n].load().then(()=>{if(s.remove(),this.editors[n].attrs)for(const t in this.editors[n].attrs)if(Object.hasOwnProperty.call(this.editors[n].attrs,t)){const e=this.editors[n].attrs[t];this.editors[n].component[t]=e}}),this.editors[n].component=document.createElement(this.editors[n].selector),this.editors[n].component.appendChild(s)),this.editors[n].component&&(this.editor=this.editors[n].component)}goBack(){this.lastEditor&&(this.editor=this.lastEditor,this.lastEditor=null,this.injected=!1,this._injectedForId=null)}createRenderRoot(){return this}render(){return n.qy` ${this.lastEditor?n.qy`<div style="display:flex;justify-content:flex-start;padding:12px 16px 4px;direction:var(--direction-locale);">
5
5
  <span
6
6
  @click=${this.goBack}
7
7
  style="display:inline-flex;align-items:center;gap:3px;font-size:12px;color:#555;cursor:pointer;font-family:inherit;"
Binary file
@@ -45,4 +45,4 @@
45
45
  </button>
46
46
  </div>
47
47
  </cdtr-editor-container>
48
- `},{type:"heading",level:6,text:"colors",active:()=>"style"===a.text},{type:"colorSwatchGroup",active:()=>"style"===a.text,columns:2,items:[{title:"button_background",allowGradient:!0,value:t.props.style.background||"#000000",onChange:e=>{const r=e.target.value;if(!r.includes("gradient(")){const e=(0,o.w)(t.props.style.color,r);n.execCommand("style",{color:e})}n.execCommand("style",{background:r,backgroundColor:null})}},{title:"font_color",value:t.props.style.color||"#ffffff",onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}}]},{type:"heading",level:6,text:"typography",active:()=>"style"===a.text},{type:"typography",active:()=>"style"===a.text,bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;n.execCommand("style",{fontWeight:e});break;case"italic":const o="italic"===t.props.style.fontStyle?"normal":"italic";n.execCommand("style",{fontStyle:o});break;case"underline":const r="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:r})}}},{type:"fontFamily",active:()=>"style"===a.text,value:t.props.style.fontFamily,weight:"web"===r.M.get("config","channel"),weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})},onWeightChange:e=>{n.execCommand("style",{fontWeight:e.detail.value})}},{type:"slider",title:"fontSize",step:1,min:8,max:50,active:()=>"style"===a.text,value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;n.execCommand("style",{fontSize:t+"px"})}},{type:"heading",level:6,text:"dimensions",active:()=>"style"===a.text},{type:"slider",title:"width",min:10,max:500,active:()=>"style"===a.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px",minWidth:null})}},{type:"slider",title:"height",min:20,max:300,active:()=>"style"===a.text,value:parseInt(t.props.style.height)||(()=>{const e=document.querySelector(`[data-id="${t.id}"]`);return e&&Math.round(e.getBoundingClientRect().height)||40})(),sizes:[{name:r.M.get("lang","auto")||"auto",value:"auto"}],onInput:e=>{const t=e.target.value;n.execCommand("style",{height:"auto"===t?"auto":parseInt(t)+"px"})}},{type:"heading",level:6,text:"border_design",active:()=>"style"===a.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"style"===a.text,value:parseInt(t.props.style.borderRadius),onInput:e=>{const t=e.target.value;n.execCommand("style",{borderRadius:t+"px"})}},{type:"borderpicker",title:"border",active:()=>"style"===a.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;n.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"style"===a.text,value:t.props.style.borderWidth,onInput:e=>{const t=e.target.value;n.execCommand("style",{borderWidth:t+"px"})}},{type:"colorpicker",title:"borderColor",active:()=>"style"===a.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;n.execCommand("style",{borderColor:t})}},{type:"heading",level:6,text:"shadow",active:()=>"style"===a.text},{type:"boxShadow",active:()=>"style"===a.text,value:t.props.style.boxShadow,onChange:e=>{n.execCommand("style",{boxShadow:e})}},{type:"heading",level:6,text:"link",active:()=>"interactions"===a.text},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"interactions"===a.text,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"heading",level:6,text:"open_modal",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"info",text:c.length?"modal_pick_hint":"modal_none_hint",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"dropdown",title:"modal_block",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel"),value:u,selected:p,items:d,onChange:e=>{n.execCommand("modalBlockId",e.target.value)}},{type:"heading",level:6,text:"icons",active:()=>"style"===a.text},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"style"===a.text,onChange:e=>{const t=e.target.checked;n.execCommand("hasIcon",t),n.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"style"===a.text&&!0===t.props.hasIcon,title:"iconDirection",value:t.props.iconDirection,onChange:e=>{const t=e.target.value;n.execCommand("iconDirection",t)},items:[{value:"left",label:"left"},{value:"right",label:"right"}]},{type:"slider",title:"size",min:10,max:100,active:()=>"style"===a.text&&!0===t.props.hasIcon,value:t.props.iconSize||16,onInput:e=>{const t=e.target.value;n.execCommand("iconSize",t)}},{type:"icons",active:()=>"style"===a.text&&!0===t.props.hasIcon,selectedIcon:t.props.iconUrl,onChange:e=>{const t=e.detail;n.execCommand("iconUrl",t.src)}},{type:"heading",level:6,text:"spacing",active:()=>"style"===a.text},{type:"spacingPicker",active:()=>"style"===a.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(t.props.style.paddingTop)||0,bottom:parseInt(t.props.style.paddingBottom)||0,left:parseInt(t.props.style.paddingLeft)||0,right:parseInt(t.props.style.paddingRight)||0},onChange:e=>{e.target.value;const t=e.target.topValue,o=e.target.bottomValue,r=e.target.leftValue,l=e.target.rightValue;n.execCommand("style",{paddingTop:t+"px",paddingBottom:o+"px",paddingLeft:r+"px",paddingRight:l+"px",padding:null})}},...g]}}}},i=e=>{let{helpers:t,editor:n,getFocused:o}=e;return{set:(e,r,l)=>{switch(r){case"style":return e[r]=t.deepMerge(e[r],l),!0;case"text":return e.text=l,o()||n.chain().setContent(l).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":case"modalBlockId":return e[r]=l,!0;case"onClick":if(l.link)return e[r]=l,!0}}}};var s=n(72591),c=n.n(s),d=n(88639),p=n.n(d),u=n(88128),g=n.n(u),m=n(30855),y=n.n(m),h=n(93051),x=n.n(h),b=n(49536),A={};A.setAttributes=y(),A.insert=g().bind(null,"head"),A.domAPI=p(),A.insertStyleElement=x();c()(b.A,A);const f=b.A&&b.A.locals?b.A.locals:void 0;var C=n(81318),v=n(1366),w=n(67291),k=n(85194),E=n(28396);const B=C.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const S=()=>{const e="button";return{name:e,create:t=>{const{createElement:n,compose:o,helpers:r}=t,{arrayToString:l,mergeDiff:s}=r;let c=!1;const d=document.createElement("div"),p=document.createElement("div"),{editor:u}=function(e){let{content:t,element:n}=e;return{element:n,editor:new C.KE({element:n,extensions:[v.A,w.A,E.A,k.Ay,B],content:t})}}({content:o.props.text,element:p});d.appendChild(p);return u.view.dom.setAttribute("dir","auto"),u.on("update",e=>{let{editor:t}=e;const n=t.getText();o.editor.store().updateComponent(o,"text",n)}),u.on("focus",e=>{let{event:t,editor:n}=e;c=!0}),u.on("blur",e=>{let{event:t,editor:n}=e;c=!1}),d.className=f.button,n({name:e,id:o.id,template:d,commands:{insertContent:e=>{u.commands.insertContent(e),u.chain().focus()}},defaultProps:{style:{height:"auto",width:"200px",padding:"10px",borderRadius:"5px",fontFamily:"Arial",fontSize:"16px"},text:"button"},render:()=>{try{o.props.style.display="",o.props.style.direction=""}catch(e){console.error(e)}s(d,{style:o.props.style});const e=o.props.hasIcon,t=o.props.iconUrl,n=o.props.iconDirection,r=o.props.iconSize,l="icon_in_button";let a=d.querySelector(`.${l}`)||document.createElement("img");e&&t?(a.className=l,a.src=t,a.style.width=(r||16)+"px",a.style.height=(r||16)+"px",a.style.marginRight="8px",a.style.marginLeft="8px","left"===n?d.insertBefore(a,d.firstChild):d.appendChild(a)):a.remove()},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>d,resizeAxis:"xy",handleBar:!0,validator:i({template:d,helpers:r,editor:u,getFocused:function(){return c}}),schema:o.schema,onSelect:e=>{d.classList.add(e)},onDeselect:e=>{d.classList.remove(e)},elementProps:o,destroy:()=>{u.destroy()},remove:()=>{d.remove()},createEditor:a})}}}},49536(e,t,n){n.d(t,{A:()=>i});var o=n(82001),r=n.n(o),l=n(40935),a=n.n(l)()(r());a.push([e.id,".BEr8unIfy4OEGYhlHclN {\n cursor: text !important;\n}\n.BEr8unIfy4OEGYhlHclN {\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.BEr8unIfy4OEGYhlHclN p {\n margin: 0;\n line-height: 1;\n}\n.cI3RTMAdk9qoZ8mu9Sm9 {\n width: 100%;\n}\n.VSumPf0Ui7b1pl8cMATP {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.Vo2Ewnq6ekWFdNMjxBIB {\n left: -8px;\n cursor: w-resize;\n}\n.WLZC84sb1rfaRnHCDyj8 {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.BEr8unIfy4OEGYhlHclN .VSumPf0Ui7b1pl8cMATP {\n display: none;\n}\n.BEr8unIfy4OEGYhlHclN.Qh20ei1Fa8QUbGinFFbw .VSumPf0Ui7b1pl8cMATP {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n","",{version:3,sources:["webpack://./../web-editors/button-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,uBAAuB;AAOzB;AARA;EAEE,eAAe;EACf,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,SAAS;EACT,cAAc;AAChB;AACA;EACE,WAAW;AACb;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,UAAU;EACV,WAAW;EACX,gCAAgC;EAChC,mBAAmB;AACrB;AACA;EACE,UAAU;EACV,gBAAgB;AAClB;AACA;EACE,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;;;;;GAKG",sourcesContent:[".button {\n cursor: text !important;\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.button p {\n margin: 0;\n line-height: 1;\n}\n.contentEditable {\n width: 100%;\n}\n.margin {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.marginLeft {\n left: -8px;\n cursor: w-resize;\n}\n.marginRight {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.button .margin {\n display: none;\n}\n.button.selected .margin {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n"],sourceRoot:""}]),a.locals={button:"BEr8unIfy4OEGYhlHclN",contentEditable:"cI3RTMAdk9qoZ8mu9Sm9",margin:"VSumPf0Ui7b1pl8cMATP",marginLeft:"Vo2Ewnq6ekWFdNMjxBIB",marginRight:"WLZC84sb1rfaRnHCDyj8",selected:"Qh20ei1Fa8QUbGinFFbw"};const i=a},67291(e,t,n){n.d(t,{A:()=>r});var o=n(81318);const r=o.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,o.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})}}]);
48
+ `},{type:"heading",level:6,text:"colors",active:()=>"style"===a.text},{type:"colorSwatchGroup",active:()=>"style"===a.text,columns:2,items:[{title:"button_background",allowGradient:!0,value:t.props.style.background||"#000000",onChange:e=>{const r=e.target.value;if(!r.includes("gradient(")){const e=(0,o.w)(t.props.style.color,r);n.execCommand("style",{color:e})}n.execCommand("style",{background:r,backgroundColor:null})}},{title:"font_color",value:t.props.style.color||"#ffffff",onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}}]},{type:"heading",level:6,text:"typography",active:()=>"style"===a.text},{type:"typography",active:()=>"style"===a.text,bold:700===t.props.style.fontWeight,italic:"italic"===t.props.style.fontStyle,underline:"underline"===t.props.style.textDecoration,onChange:e=>{switch(e){case"bold":const e=700===t.props.style.fontWeight?400:700;n.execCommand("style",{fontWeight:e});break;case"italic":const o="italic"===t.props.style.fontStyle?"normal":"italic";n.execCommand("style",{fontStyle:o});break;case"underline":const r="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:r})}}},{type:"fontFamily",active:()=>"style"===a.text,value:t.props.style.fontFamily,weight:"web"===r.M.get("config","channel"),weightValue:t.props.style.fontWeight,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})},onWeightChange:e=>{n.execCommand("style",{fontWeight:e.detail.value})}},{type:"slider",title:"fontSize",step:1,min:8,max:50,active:()=>"style"===a.text,value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;n.execCommand("style",{fontSize:t+"px"})}},{type:"heading",level:6,text:"dimensions",active:()=>"style"===a.text},{type:"slider",title:"width",min:10,max:500,active:()=>"style"===a.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px",minWidth:null})}},{type:"slider",title:"height",min:20,max:300,active:()=>"style"===a.text,value:parseInt(t.props.style.height)||(()=>{const e=document.querySelector(`[data-id="${t.id}"]`);return e&&Math.round(e.getBoundingClientRect().height)||40})(),sizes:[{name:r.M.get("lang","auto")||"auto",value:"auto"}],onInput:e=>{const t=e.target.value;n.execCommand("style",{height:"auto"===t?"auto":parseInt(t)+"px"})}},{type:"heading",level:6,text:"border_design",active:()=>"style"===a.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"style"===a.text,value:parseInt(t.props.style.borderRadius),onInput:e=>{const t=e.target.value;n.execCommand("style",{borderRadius:t+"px"})}},{type:"borderpicker",title:"border",active:()=>"style"===a.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;n.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"style"===a.text,value:t.props.style.borderWidth,onInput:e=>{const t=e.target.value;n.execCommand("style",{borderWidth:t+"px"})}},{type:"colorpicker",title:"borderColor",active:()=>"style"===a.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;n.execCommand("style",{borderColor:t})}},{type:"heading",level:6,text:"shadow",active:()=>"style"===a.text},{type:"boxShadow",active:()=>"style"===a.text,value:t.props.style.boxShadow,onChange:e=>{n.execCommand("style",{boxShadow:e})}},{type:"heading",level:6,text:"link",active:()=>"interactions"===a.text},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"interactions"===a.text,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"heading",level:6,text:"open_modal",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"info",text:c.length?"modal_pick_hint":"modal_none_hint",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel")},{type:"dropdown",title:"modal_block",active:()=>"interactions"===a.text&&"web"===r.M.get("config","channel"),value:u,selected:p,items:d,onChange:e=>{n.execCommand("modalBlockId",e.target.value)}},{type:"heading",level:6,text:"icons",active:()=>"style"===a.text},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"style"===a.text,onChange:e=>{const t=e.target.checked;n.execCommand("hasIcon",t),n.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"style"===a.text&&!0===t.props.hasIcon,title:"iconDirection",value:t.props.iconDirection,onChange:e=>{const t=e.target.value;n.execCommand("iconDirection",t)},items:[{value:"left",label:"left"},{value:"right",label:"right"}]},{type:"slider",title:"size",min:10,max:100,active:()=>"style"===a.text&&!0===t.props.hasIcon,value:t.props.iconSize||16,onInput:e=>{const t=e.target.value;n.execCommand("iconSize",t)}},{type:"icons",active:()=>"style"===a.text&&!0===t.props.hasIcon,selectedIcon:t.props.iconUrl,onChange:e=>{const t=e.detail;n.execCommand("iconUrl",t.src)}},{type:"heading",level:6,text:"spacing",active:()=>"style"===a.text},{type:"spacingPicker",active:()=>"style"===a.text,hasLeft:!1,hasRight:!1,value:{top:parseInt(t.props.style.paddingTop)||0,bottom:parseInt(t.props.style.paddingBottom)||0,left:parseInt(t.props.style.paddingLeft)||0,right:parseInt(t.props.style.paddingRight)||0},onChange:e=>{e.target.value;const t=e.target.topValue,o=e.target.bottomValue,r=e.target.leftValue,l=e.target.rightValue;n.execCommand("style",{paddingTop:t+"px",paddingBottom:o+"px",paddingLeft:r+"px",paddingRight:l+"px",padding:null})}},...g]}}}},i=e=>{let{helpers:t,editor:n,getFocused:o}=e;return{set:(e,r,l)=>{switch(r){case"style":return e[r]=t.deepMerge(e[r],l),!0;case"text":return e.text=l,o()||n.chain().setContent(l).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":case"modalBlockId":return e[r]=l,!0;case"onClick":if(l.link)return e[r]=l,!0}}}};var s=n(72591),c=n.n(s),d=n(88639),p=n.n(d),u=n(88128),g=n.n(u),m=n(30855),y=n.n(m),h=n(93051),x=n.n(h),b=n(49536),A={};A.setAttributes=y(),A.insert=g().bind(null,"head"),A.domAPI=p(),A.insertStyleElement=x();c()(b.A,A);const f=b.A&&b.A.locals?b.A.locals:void 0;var C=n(81318),v=n(1366),w=n(67291),k=n(85194),E=n(28396);const B=C.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const S=()=>{const e="button";return{name:e,create:t=>{const{createElement:n,compose:o,helpers:r}=t,{arrayToString:l,mergeDiff:s}=r;let c=!1;const d=document.createElement("div"),p=document.createElement("div"),{editor:u}=function(e){let{content:t,element:n}=e;return{element:n,editor:new C.KE({element:n,extensions:[v.A,w.A,E.A,k.Ay,B],content:t})}}({content:o.props.text,element:p});d.appendChild(p);u.view.dom.setAttribute("dir","auto");const g=()=>{let e="";try{e=u.getText()||""}catch(t){e=""}d.setAttribute("dir",function(e){if(!e)return null;for(const t of String(e)){if(/[\u0590-\u05FF\u0600-\u07BF\u0860-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/.test(t))return"rtl";if(/\p{L}/u.test(t))return"ltr"}return null}(e)||"ltr")};return g(),u.on("update",e=>{let{editor:t}=e;const n=t.getText();g(),o.editor.store().updateComponent(o,"text",n)}),u.on("focus",e=>{let{event:t,editor:n}=e;c=!0}),u.on("blur",e=>{let{event:t,editor:n}=e;c=!1}),d.className=f.button,n({name:e,id:o.id,template:d,commands:{insertContent:e=>{u.commands.insertContent(e),u.chain().focus()}},defaultProps:{style:{height:"auto",width:"200px",padding:"10px",borderRadius:"5px",fontFamily:"Arial",fontSize:"16px"},text:"button"},render:()=>{try{o.props.style.display="",o.props.style.direction=""}catch(e){console.error(e)}s(d,{style:o.props.style});const e=o.props.hasIcon,t=o.props.iconUrl,n=o.props.iconDirection,r=o.props.iconSize,l="icon_in_button";g();let a=d.querySelector(`.${l}`)||document.createElement("img");e&&t?(a.className=l,a.src=t,a.style.width=(r||16)+"px",a.style.height=(r||16)+"px",a.style.marginRight="8px",a.style.marginLeft="8px","right"===n?d.appendChild(a):d.insertBefore(a,d.firstChild)):a.remove()},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>d,resizeAxis:"xy",handleBar:!0,validator:i({template:d,helpers:r,editor:u,getFocused:function(){return c}}),schema:o.schema,onSelect:e=>{d.classList.add(e)},onDeselect:e=>{d.classList.remove(e)},elementProps:o,destroy:()=>{u.destroy()},remove:()=>{d.remove()},createEditor:a})}}}},49536(e,t,n){n.d(t,{A:()=>i});var o=n(82001),r=n.n(o),l=n(40935),a=n.n(l)()(r());a.push([e.id,".BEr8unIfy4OEGYhlHclN {\n cursor: text !important;\n}\n.BEr8unIfy4OEGYhlHclN {\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.BEr8unIfy4OEGYhlHclN p {\n margin: 0;\n line-height: 1;\n}\n.cI3RTMAdk9qoZ8mu9Sm9 {\n width: 100%;\n}\n.VSumPf0Ui7b1pl8cMATP {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.Vo2Ewnq6ekWFdNMjxBIB {\n left: -8px;\n cursor: w-resize;\n}\n.WLZC84sb1rfaRnHCDyj8 {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.BEr8unIfy4OEGYhlHclN .VSumPf0Ui7b1pl8cMATP {\n display: none;\n}\n.BEr8unIfy4OEGYhlHclN.Qh20ei1Fa8QUbGinFFbw .VSumPf0Ui7b1pl8cMATP {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n","",{version:3,sources:["webpack://./../web-editors/button-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,uBAAuB;AAOzB;AARA;EAEE,eAAe;EACf,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,kBAAkB;EAClB,YAAY;AACd;AACA;EACE,SAAS;EACT,cAAc;AAChB;AACA;EACE,WAAW;AACb;AACA;EACE,kBAAkB;EAClB,UAAU;EACV,UAAU;EACV,WAAW;EACX,gCAAgC;EAChC,mBAAmB;AACrB;AACA;EACE,UAAU;EACV,gBAAgB;AAClB;AACA;EACE,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;;;;;GAKG",sourcesContent:[".button {\n cursor: text !important;\n min-width: 30px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n padding:10px;\n}\n.button p {\n margin: 0;\n line-height: 1;\n}\n.contentEditable {\n width: 100%;\n}\n.margin {\n position: absolute;\n z-index: 9;\n width: 3px;\n height: 90%;\n background: var(--resizer-color);\n border-radius: 20px;\n}\n.marginLeft {\n left: -8px;\n cursor: w-resize;\n}\n.marginRight {\n left: calc(100% + 5px);\n cursor: e-resize;\n}\n\n.button .margin {\n display: none;\n}\n.button.selected .margin {\n display: block;\n}\n/* .handle{\n display: none;\n}\n.button.selected .handle{\n display: block;\n} */\n"],sourceRoot:""}]),a.locals={button:"BEr8unIfy4OEGYhlHclN",contentEditable:"cI3RTMAdk9qoZ8mu9Sm9",margin:"VSumPf0Ui7b1pl8cMATP",marginLeft:"Vo2Ewnq6ekWFdNMjxBIB",marginRight:"WLZC84sb1rfaRnHCDyj8",selected:"Qh20ei1Fa8QUbGinFFbw"};const i=a},67291(e,t,n){n.d(t,{A:()=>r});var o=n(81318);const r=o.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,o.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})}}]);
Binary file
@@ -343,7 +343,7 @@
343
343
  @keyframes spin {
344
344
  to { transform: rotate(360deg); }
345
345
  }
346
- `,h.properties={loading:{type:Boolean},title:{type:String},description:{type:String},keywordList:{type:Array},keywordDraft:{type:String},keywordsFocused:{type:Boolean},generatingField:{type:String}},customElements.define("cdtr-publish-seo",h);class p extends s.WF{constructor(){super(),this.raf=0,this.dismissTimer=null,this.dismiss=()=>{this.isConnected&&this.remove()},this.copyLink=async()=>{if(this.url)try{await navigator.clipboard.writeText(this.url),this.copied=!0,setTimeout(()=>this.copied=!1,2e3)}catch{}},this.message="",this.sub="",this.url="",this.seoTitle="",this.seoDescription="",this.copied=!1}firstUpdated(){this.launchConfetti(),this.dismissTimer=setTimeout(()=>this.dismiss(),6500)}disconnectedCallback(){super.disconnectedCallback(),cancelAnimationFrame(this.raf),this.dismissTimer&&clearTimeout(this.dismissTimer)}t(e,t){return o.M.get("lang",e)||t}get direction(){const e=o.M.get("theme");return e?.direction||"rtl"}get host(){return this.url?this.url.replace(/^https?:\/\//,"").replace(/\/+$/,""):""}launchConfetti(){const e=this.renderRoot.querySelector("canvas");if(!e)return;const t=e.getContext("2d");if(!t)return;const i=window.devicePixelRatio||1,s=window.innerWidth,o=window.innerHeight;e.width=s*i,e.height=o*i,t.scale(i,i);const r=["#e94560","#1a1a2e","#f6c945","#2ec7a9","#4d7cfe","#ffffff"],n=s/2,a=.42*o,l=Math.min(220,Math.round(s/6)),c=Array.from({length:l},(e,t)=>{const i=2*Math.PI*t/l+t%3*.4,s=4+t%9;return{x:n,y:a,vx:Math.cos(i)*s,vy:Math.sin(i)*s-3,size:5+t%5,color:r[t%r.length],rot:t,vrot:(t%2?1:-1)*(.1+t%5*.03),life:1}}),d=performance.now(),h=e=>{const i=e-d;t.clearRect(0,0,s,o);let r=!1;for(const e of c)e.vy+=.16,e.x+=e.vx,e.y+=e.vy,e.rot+=e.vrot,i>2600*.55&&(e.life=Math.max(0,e.life-.02)),e.life>0&&e.y<o+40&&(r=!0),t.save(),t.globalAlpha=e.life,t.translate(e.x,e.y),t.rotate(e.rot),t.fillStyle=e.color,t.fillRect(-e.size/2,-e.size/2,e.size,.6*e.size),t.restore();r&&i<3e3?this.raf=requestAnimationFrame(h):t.clearRect(0,0,s,o)};this.raf=requestAnimationFrame(h)}renderPreview(){const e=this.host;if(!e)return s.s6;const t=(this.seoTitle||"").trim()||(this.seoDescription?"":e),i=(this.seoDescription||"").trim(),o=(t||e).charAt(0);return s.qy`
346
+ `,h.properties={loading:{type:Boolean},title:{type:String},description:{type:String},keywordList:{type:Array},keywordDraft:{type:String},keywordsFocused:{type:Boolean},generatingField:{type:String}},customElements.define("cdtr-publish-seo",h);class p extends s.WF{constructor(){super(),this.raf=0,this.dismissTimer=null,this.onKeyDown=e=>{"Escape"===e.key&&this.dismiss()},this.dismiss=()=>{this.isConnected&&this.remove()},this.copyLink=async()=>{if(this.url)try{await navigator.clipboard.writeText(this.url),this.copied=!0,setTimeout(()=>this.copied=!1,2e3)}catch{}},this.message="",this.sub="",this.url="",this.seoTitle="",this.seoDescription="",this.copied=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.onKeyDown)}firstUpdated(){this.launchConfetti(),this.dismissTimer=setTimeout(()=>this.dismiss(),6500)}disconnectedCallback(){super.disconnectedCallback(),cancelAnimationFrame(this.raf),this.dismissTimer&&clearTimeout(this.dismissTimer),document.removeEventListener("keydown",this.onKeyDown)}t(e,t){return o.M.get("lang",e)||t}get direction(){const e=o.M.get("theme");return e?.direction||"rtl"}get host(){return this.url?this.url.replace(/^https?:\/\//,"").replace(/\/+$/,""):""}launchConfetti(){const e=this.renderRoot.querySelector("canvas");if(!e)return;const t=e.getContext("2d");if(!t)return;const i=window.devicePixelRatio||1,s=window.innerWidth,o=window.innerHeight;e.width=s*i,e.height=o*i,t.scale(i,i);const r=["#e94560","#1a1a2e","#f6c945","#2ec7a9","#4d7cfe","#ffffff"],n=s/2,a=.42*o,l=Math.min(220,Math.round(s/6)),c=Array.from({length:l},(e,t)=>{const i=2*Math.PI*t/l+t%3*.4,s=4+t%9;return{x:n,y:a,vx:Math.cos(i)*s,vy:Math.sin(i)*s-3,size:5+t%5,color:r[t%r.length],rot:t,vrot:(t%2?1:-1)*(.1+t%5*.03),life:1}}),d=performance.now(),h=e=>{const i=e-d;t.clearRect(0,0,s,o);let r=!1;for(const e of c)e.vy+=.16,e.x+=e.vx,e.y+=e.vy,e.rot+=e.vrot,i>2600*.55&&(e.life=Math.max(0,e.life-.02)),e.life>0&&e.y<o+40&&(r=!0),t.save(),t.globalAlpha=e.life,t.translate(e.x,e.y),t.rotate(e.rot),t.fillStyle=e.color,t.fillRect(-e.size/2,-e.size/2,e.size,.6*e.size),t.restore();r&&i<3e3?this.raf=requestAnimationFrame(h):t.clearRect(0,0,s,o)};this.raf=requestAnimationFrame(h)}renderPreview(){const e=this.host;if(!e)return s.s6;const t=(this.seoTitle||"").trim()||(this.seoDescription?"":e),i=(this.seoDescription||"").trim(),o=(t||e).charAt(0);return s.qy`
347
347
  <div class="preview">
348
348
  <p class="preview-caption">${this.t("search_preview_label","How your page will look on Google")}</p>
349
349
  <div class="result-head">
@@ -359,6 +359,15 @@
359
359
  `}render(){const e=this.direction,t=this.copied?s.qy`<svg viewBox="0 0 24 24" fill="none"><path d="M5 13l4 4L19 7" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" /></svg>`:s.qy`<svg viewBox="0 0 24 24" fill="none"><rect x="9" y="9" width="11" height="11" rx="2" stroke="currentColor" stroke-width="2" /><path d="M5 15V5a2 2 0 0 1 2-2h10" stroke="currentColor" stroke-width="2" stroke-linecap="round" /></svg>`;return s.qy`
360
360
  <canvas @click=${this.dismiss}></canvas>
361
361
  <div class="card" dir=${e}>
362
+ <button
363
+ class="close"
364
+ type="button"
365
+ aria-label=${this.t("close","Close")}
366
+ title=${this.t("close","Close")}
367
+ @click=${this.dismiss}
368
+ >
369
+ <svg viewBox="0 0 24 24" fill="none"><path d="M6 6l12 12M18 6L6 18" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" /></svg>
370
+ </button>
362
371
  <div class="check">
363
372
  <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
364
373
  <path d="M5 13l4 4L19 7" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" />
@@ -420,6 +429,34 @@
420
429
  transform: translate(-50%, -50%) scale(1);
421
430
  }
422
431
  }
432
+ /* Manual dismiss. The card also auto-closes, but the confetti + preview
433
+ invite lingering — the user needs a way out on their own terms.
434
+ inset-inline-end so it lands top-left in the RTL card, top-right in LTR. */
435
+ .close {
436
+ position: absolute;
437
+ top: 12px;
438
+ inset-inline-end: 12px;
439
+ width: 32px;
440
+ height: 32px;
441
+ display: flex;
442
+ align-items: center;
443
+ justify-content: center;
444
+ padding: 0;
445
+ border: none;
446
+ border-radius: 50%;
447
+ background: transparent;
448
+ color: #a7abb5;
449
+ cursor: pointer;
450
+ transition: background 0.15s ease, color 0.15s ease;
451
+ }
452
+ .close:hover {
453
+ background: #f1f2f6;
454
+ color: #1a1a2e;
455
+ }
456
+ .close svg {
457
+ width: 16px;
458
+ height: 16px;
459
+ }
423
460
  .check {
424
461
  width: 68px;
425
462
  height: 68px;
Binary file
@@ -0,0 +1,431 @@
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[8299],{68299(t,e,o){o.r(e),o.d(e,{BlockEditor:()=>g});var r=o(59929),a=o(86319),i=o(15604),n=o(49937),s=o(61084),d=o(30052),l=o(76151),c=o(9334),p=o(96374);const h=[{id:"video-background",name:"video",thumb:"https://i.ytimg.com/vi/RhlQvbvMg-0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLCKBaHlpHj3ghOXWjB2br9kHjPg7w",group:["section-component"],type:"video",preset:{installed:!1,component:"cdtr-background-video",properties:{type:"video",url:"https://www.youtube.com/watch?v=RhlQvbvMg-0",loop:!0,volume:0,controls:0,muted:!0,playing:!0,config:{playerVars:{showinfo:0,controls:0,playsinline:0}},style:{zIndex:0,width:window.innerWidth+500,height:window.innerWidth-560,pointerEvents:"none",transform:"translate(-10%,-0%)"}}}},{id:"images-background",name:"some-images",thumb:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg",group:["section-component"],type:"images",preset:{tags:[],installed:!1,type:"images",component:"cdtr-images-preset",properties:{src:"http://demos.creative-tim.com/paper-kit-2/assets/img/antoine-barres.jpg,https://images.pexels.com/photos/1408221/pexels-photo-1408221.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1",style:{backgroundAttachment:"local",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover"}}}}];o(12258),o(15155);class g extends r.WF{constructor(t){super(),this.onChangeBakgroundExpanding=t=>{const e=t.target.checked;i.Ay.store().execCommand("expand_image_for_outlook",!e)},this.getInnerBlocks=()=>{const t=[],e=this.component.parent();return e&&"section"===e.type?(e.children.forEach(e=>{const o=a.M.get("components",e);o&&"block"===o.type&&t.push(o)}),t):[this.component]},this.onChangeWidth=this.onChangeWidth.bind(this),this.getInnerBlocks=this.getInnerBlocks.bind(this),this.isBackgroundImage=!1,this.backgroundVideo="",this.galleryOpened=!1,this.onChangeBakgroundExpanding=this.onChangeBakgroundExpanding.bind(this);const e=a.M.get("config","channel");this.tabs=[{text:"style",selected:!0},..."web"===e?[{text:"animations"}]:[],{text:"settings"}],this.tabName="style",this.maxWidth=0,this.background="",this.padding={topValue:0,bottomValue:0,leftValue:0,rightValue:0},this.margin={topValue:0,bottomValue:0},this.borderStyle="solid",this.borderWidth=0,this.borderColor="#000",this.theme=a.M.get("theme"),this.connectWith=this.connectWith.bind(this),this.cmds={onchangeRadius:t=>{i.Ay.store().execCommand("style",{...t.target.json})},toggleResponsive:t=>{this.noResponsive=!t.target.checked,i.Ay.store().execCommand("noResponsive",this.noResponsive)},onChangeBorderStyle:t=>{this.borderStyle=t.target.borderStyle||"",this.borderWidth=t.target.borderWidth||1,this.borderColor=t.target.borderColor||"#000",this.borderRadius=t.target.borderRadius||0;t.target.json;i.Ay.store().execCommand("style",{borderStyle:this.borderStyle,borderColor:this.borderColor,borderTopWidth:t.target.borderTopWidth||"0px",borderBottomWidth:t.target.borderBottomWidth||"0px",borderLeftWidth:t.target.borderLeftWidth||"0px",borderRightWidth:t.target.borderRightWidth||"0px",borderTopRightRadius:parseInt(t.target.borderTopRightRadius||0)+"px",borderTopLeftRadius:parseInt(t.target.borderTopLeftRadius||0)+"px",borderBottomRightRadius:parseInt(t.target.borderBottomRightRadius||0)+"px",borderBottomLeftRadius:parseInt(t.target.borderBottomLeftRadius||0)+"px",borderRadius:null})},onRemoveBackground:()=>{this.background="",this.backgroundVideo="",this.backgroundInstance={},i.Ay.store().execCommand("background",null),i.Ay.store().execCommand("style",{background:"",backgroundColor:null,backgroundImage:null})},onChangeBackgroundVideo:t=>{const e=t.target.value;let o;if((0,s.Zj)(e)){const t=h.find(t=>"images"===t.type);t.preset.properties.src=e,o=t.preset}else if((0,d.A)(e));else if((0,l.A)(e)){const t=h.find(t=>"video"===t.type);t.preset.properties.url=e,delete t.preset.properties.videoPath,o=t.preset}o&&(i.Ay.store().execCommand("background",JSON.parse(JSON.stringify(o))),i.Ay.store().execCommand("style",{background:null,backgroundColor:null})),this.backgroundVideo=e},onChangeImage:t=>{const e=t.detail,o=[];Array.isArray(e)?e.forEach(t=>o.push(t.src)):o.push(e.src),this.cmds.onChangeBackgroundVideo({target:{value:o.join(",")}}),this.galleryOpened=!1},onChangeHeight:t=>{const e=t.target.value;i.Ay.store().execCommand("style",{height:e+"%"}),this.height=e},onChangeMargin:t=>{const e=t.target.value,o=t.target.direction;"all"===o?(i.Ay.store().execCommand("style",{marginTop:e+"px",marginBottom:e+"px"}),this.margin={topValue:e,bottomValue:e}):i.Ay.store().execCommand("style",{[(0,c.A)(`margin-${o.toLowerCase()}`)]:e+"px"})},onChangePadding:t=>{const e=t.target.value,o=t.target.direction,r=(0,c.A)(`padding-${o.toLowerCase()}`);"all"===o?(i.Ay.store().execCommand("style",{padding:null,"padding-top":null,"padding-bottom":null,"padding-left":null,"padding-right":null,paddingTop:e+"px",paddingBottom:e+"px",paddingLeft:e+"px",paddingRight:e+"px","padding-right":null,"padding-left":null,"padding-top":null,"padding-bottom":null}),this.padding={topValue:e,bottomValue:e,leftValue:e,rightValue:e}):(i.Ay.store().execCommand("style",{[r]:e+"px",[`padding-${o.toLowerCase()}`]:null}),this.props.style={[r]:e+"px"},this[`padding${o.toLowerCase()}`]=e)},onChangebackground(t){const e=t.target.value;this.background=e;i.Ay.components.forEach(t=>{const o=t.find("text");if(o&&!o.closest("card")){let t=o.tiptap.getAttributes("textStyle").color;if(!t){const e=o.element.querySelector("p,h1,h2,h3,h4,h5,h6");e&&(t=window.getComputedStyle(e).color)}if(t){if("transparent"===t)return;if(!t.includes("var(--")&&!e.includes("var(--")&&"transparent"!==e&&"rgba(0, 0, 0, 0)"!==e&&"rgb(0, 0, 0)"!==e){const r=(0,p.w)(t,e);o.tiptap.chain().selectAll().setColor(r).run()}}}}),i.Ay.store().execCommand("style",{background:e,backgroundColor:null});"web"!==a.M.get("config","channel")&&i.Ay.store().execCommand("background",null)}}}connectedCallback(){super.connectedCallback(),this.connectWith(),i.Ay.on("update",this.connectWith)}disconnectedCallback(){super.disconnectedCallback(),i.Ay.off("update",this.connectWith)}onChangeWidth(t){let e=t.target.value;e<500&&(e=500),e>1e3&&(e=1e3);const o=this.getInnerBlocks();i.Ay.store().execCommand2({transactions:[{key:"style",value:{width:e+"px",maxWidth:"100%"}}],update:[...o]}),this.maxWidth=e}connectWith(){const t=i.Ay.components[i.Ay.components.length-1];if(this.component=t,t&&"block"===t.type){this.props=t.props;let{style:e}=this.props;e||(e={}),t.props||(t.props={}),t.props.style||(t.props.style={}),this.expand_image_for_outlook=!!t.props.expand_image_for_outlook,this.boxShadow=t.props.style.boxShadow,this.borderStyle=t.props.style.borderStyle,this.borderWidth=t.props.style.borderWidth,this.borderTopRightRadius=parseInt(t.props.style.borderTopRightRadius),this.borderTopLeftRadius=parseInt(t.props.style.borderTopLeftRadius),this.borderBottomRightRadius=parseInt(t.props.style.borderBottomRightRadius),this.borderBottomLeftRadius=parseInt(t.props.style.borderBottomLeftRadius),this.borderTopWidth=parseInt(t.props.style.borderTopWidth),this.borderBottomWidth=parseInt(t.props.style.borderBottomWidth),this.borderLeftWidth=parseInt(t.props.style.borderLeftWidth),this.borderRightWidth=parseInt(t.props.style.borderRightWidth),this.borderColor=t.props.style.borderColor;const o=t.props.background;this.isBackgroundImage="images"===o?.type,this.noResponsive=!!t.props.noResponsive,this.modalable=!!t.props.modalable,this.modalName=t.props.modalName||"",this.popupTrigger=t.props.popupTrigger||"button",this.popupDelay=null==t.props.popupDelay?3:t.props.popupDelay,this._rebuildTabs(),this.backgroundInstance=o,this.backgroundVideo=o?.properties?.src||o?.properties?.url||"";const r=t.element,a=window.getComputedStyle(r);this.maxWidth=parseInt(a.width),this.width=parseInt(e.width,10)||this.maxWidth,this.background=e.background||e.backgroundImage||a.backgroundColor,e.backgroundImage&&(this.background=`url(${e.backgroundImage})`),this.padding={topValue:parseInt(a.paddingTop),bottomValue:parseInt(a.paddingBottom),leftValue:parseInt(a.paddingLeft),rightValue:parseInt(a.paddingRight)},this.margin={topValue:parseInt(a.marginTop),bottomValue:parseInt(a.marginBottom)}}}changeTab(t){this.tabName=t.target.value}_toggleModalable(t){this.modalable=t,i.Ay.store().execCommand("modalable",this.modalable),this.tabName=t?"popup":"style",this._rebuildTabs()}_rebuildTabs(){const t=a.M.get("config","channel"),e="web"===t&&this.modalable,o=[{text:"style"},..."web"===t?[{text:"animations"}]:[],{text:"settings"},...e?[{text:"popup"}]:[]];let r=this.tabName;o.some(t=>t.text===r)||(r=e?"popup":"style"),o.forEach(t=>t.selected=t.text===r),this.tabName=r,this.tabs=o}_setModalName(t){this.modalName=t,i.Ay.store().execCommand("modalName",t)}_setPopupTrigger(t){this.popupTrigger=t,i.Ay.store().execCommand("popupTrigger",t)}_setPopupDelay(t){const e=Math.max(0,parseInt(t,10)||0);this.popupDelay=e,i.Ay.store().execCommand("popupDelay",e)}_hasBackground(){if(this.backgroundInstance&&this.backgroundInstance.component)return!0;const t=(this.background||"").trim();return!!t&&"transparent"!==t&&"rgba(0, 0, 0, 0)"!==t&&"none"!==t}render(){const t=a.M.get("config","channel");return r.qy`
2
+ <cdtr-editor-tabs .tabs=${this.tabs} @tabChanged=${this.changeTab}>
3
+ <div slot="content">
4
+ ${"style"===this.tabName?r.qy`
5
+ <cdtr-editor-section .label=${"backgroundColor"} .open=${!0}>
6
+ <cdtr-color-swatch-group
7
+ .columns=${1}
8
+ .items=${[{title:"backgroundColor",allowGradient:"web"===t,value:this.background||"#ffffff",onChange:t=>this.cmds.onChangebackground(t)}]}
9
+ ></cdtr-color-swatch-group>
10
+ </cdtr-editor-section>
11
+
12
+ <cdtr-editor-section .label=${"backgrounds"} .open=${!0}>
13
+ <cdtr-background-panel
14
+ .background=${this.backgroundInstance}
15
+ .channel=${t}
16
+ .opacity=${this.props?.opacity??1}
17
+ .canRemove=${this._hasBackground()}
18
+ .src=${this.backgroundVideo}
19
+ .onOpenGallery=${()=>this.galleryOpened=!0}
20
+ .onChangeSrc=${t=>this.cmds.onChangeBackgroundVideo({target:{value:t}})}
21
+ .onOpenCatalog=${()=>n.A.dispatch("open_add_menu",{type:"backgrounds",disabledOptions:!0,target:i.Ay.components[0]})}
22
+ .onPatchStyle=${t=>i.Ay.store().execCommand("background",(0,s.MC)(this.backgroundInstance,t))}
23
+ .onOpacity=${t=>i.Ay.store().execCommand("opacity",t)}
24
+ .onRemove=${this.cmds.onRemoveBackground}
25
+ ></cdtr-background-panel>
26
+ </cdtr-editor-section>
27
+
28
+ <!-- Distinct from the "layout_behavior" section further down:
29
+ this one is strictly about how the background renders in
30
+ email clients. Both used to be labelled "settings", which
31
+ read as a duplicate and gave the two groups the same
32
+ persistence key shape. -->
33
+ <cdtr-editor-section .label=${"email_compatibility"} .open=${!1}>
34
+ <cdtr-checkbox
35
+ @change=${t=>this.onChangeBakgroundExpanding(t)}
36
+ .checked=${this.expand_image_for_outlook}
37
+ >
38
+ <cdtr-title
39
+ ><lang-text text="expand_image_for_outlook"></lang-text
40
+ ></cdtr-title>
41
+ </cdtr-checkbox>
42
+ <h6>
43
+ <lang-text
44
+ whiteSpace="break-spaces"
45
+ text="expand_image_for_outlook_description"
46
+ ></lang-text>
47
+ </h6>
48
+ </cdtr-editor-section>`:null}
49
+ ${"style"===this.tabName?r.qy`
50
+ <cdtr-editor-section .label=${"width"} .open=${!0}>
51
+ <cdtr-width-editor
52
+ text="width"
53
+ unit="px"
54
+ max="1000"
55
+ min="500"
56
+ .value="${this.width}"
57
+ @input=${this.onChangeWidth}
58
+ .sizes=${[{name:a.M.get("lang","recommended")||"recommended",value:600,default:!0},{name:a.M.get("lang","large")||"large",value:1e3}]}
59
+ ></cdtr-width-editor>
60
+ <p style="font-size:12px">
61
+ <lang-text whiteSpace="" text="email_600"></lang-text>
62
+ </p>
63
+ </cdtr-editor-section>
64
+
65
+ <cdtr-editor-section .label=${"padding"} .open=${!0}>
66
+ <cdtr-row justify="center">
67
+ <cdtr-spacing
68
+ .topValue="${this.padding.topValue}"
69
+ .bottomValue="${this.padding.bottomValue}"
70
+ .leftValue="${this.padding.leftValue}"
71
+ .rightValue="${this.padding.rightValue}"
72
+ isLock=${!1}
73
+ max="500"
74
+ @input=${this.cmds.onChangePadding}
75
+ ></cdtr-spacing>
76
+ </cdtr-row>
77
+ </cdtr-editor-section>
78
+
79
+ <cdtr-editor-section .label=${"border_design"} .open=${!1}>
80
+ <cdtr-border-editor
81
+ .borderStyle=${this.borderStyle}
82
+ .borderWidth=${this.borderWidth}
83
+ .borderColor=${this.borderColor}
84
+ .borderTopWidth=${this.borderTopWidth}
85
+ .borderBottomWidth=${this.borderBottomWidth}
86
+ .borderLeftWidth=${this.borderLeftWidth}
87
+ .borderRightWidth=${this.borderRightWidth}
88
+ .borderTopRightRadius=${this.borderTopRightRadius}
89
+ .borderTopLeftRadius=${this.borderTopLeftRadius}
90
+ .borderBottomRightRadius=${this.borderBottomRightRadius}
91
+ .borderBottomLeftRadius=${this.borderBottomLeftRadius}
92
+ @change=${this.cmds.onChangeBorderStyle}
93
+ ></cdtr-border-editor>
94
+ </cdtr-editor-section>
95
+
96
+ <cdtr-editor-section .label=${"layout_behavior"} .open=${!1}>
97
+ <cdtr-row alignItems="center" justify="space-between">
98
+ <cdtr-col>
99
+ <cdtr-title>
100
+ <lang-text text="no_responsive"></lang-text>
101
+ </cdtr-title>
102
+ </cdtr-col>
103
+ <cdtr-col sm="1">
104
+ <cdtr-checkbox
105
+ @change=${this.cmds.toggleResponsive}
106
+ .checked="${this.noResponsive}"
107
+ ></cdtr-checkbox>
108
+ </cdtr-col>
109
+ </cdtr-row>
110
+ ${"web"===t?r.qy`
111
+ <cdtr-row alignItems="center" justify="space-between">
112
+ <cdtr-col
113
+ style="cursor:pointer"
114
+ @click=${()=>this._toggleModalable(!this.modalable)}
115
+ >
116
+ <cdtr-tooltip content="modal_hidden_on_view">
117
+ <cdtr-title>
118
+ <lang-text text="mark_as_modal"></lang-text>
119
+ </cdtr-title>
120
+ </cdtr-tooltip>
121
+ </cdtr-col>
122
+ <cdtr-col sm="1">
123
+ <cdtr-checkbox
124
+ @change=${t=>this._toggleModalable(!t.target.checked)}
125
+ .checked="${this.modalable}"
126
+ ></cdtr-checkbox>
127
+ </cdtr-col>
128
+ </cdtr-row>
129
+ ${this.modalable?r.qy`<p
130
+ style="font-size:12px;color:#888;line-height:1.5;margin:6px 0 0;font-style:italic;"
131
+ >
132
+ <lang-text
133
+ whiteSpace="normal"
134
+ text="popup_settings_in_tab"
135
+ ></lang-text>
136
+ </p>`:null}
137
+ `:null}
138
+ </cdtr-editor-section>
139
+ `:null}
140
+
141
+ ${"popup"===this.tabName?r.qy`
142
+ <cdtr-editor-section .label=${"modal_name"} .open=${!0}>
143
+ <cdtr-input
144
+ style="width:100%"
145
+ .value=${this.modalName||""}
146
+ .placeholder=${a.M.get("lang","modal_name")||""}
147
+ @change=${t=>this._setModalName(t.target.value)}
148
+ ></cdtr-input>
149
+ </cdtr-editor-section>
150
+
151
+ <cdtr-editor-section .label=${"popup_trigger_label"} .open=${!0}>
152
+ <select
153
+ style="width:100%;padding:8px;border:1px solid var(--color-border,#e0e0e0);border-radius:8px;font:inherit;background:#fff;cursor:pointer;"
154
+ @change=${t=>this._setPopupTrigger(t.target.value)}
155
+ >
156
+ ${["button","load","delay","exit"].map(t=>r.qy`<option
157
+ value=${t}
158
+ ?selected=${this.popupTrigger===t}
159
+ >
160
+ ${a.M.get("lang","popup_trigger_"+t)||t}
161
+ </option>`)}
162
+ </select>
163
+ ${"delay"===this.popupTrigger?r.qy`
164
+ <cdtr-title style="display:block;margin-top:8px">
165
+ <lang-text text="popup_delay_label"></lang-text>
166
+ </cdtr-title>
167
+ <input
168
+ type="number"
169
+ min="0"
170
+ style="width:100%;padding:8px;border:1px solid var(--color-border,#e0e0e0);border-radius:8px;font:inherit;box-sizing:border-box;"
171
+ .value=${String(this.popupDelay)}
172
+ @change=${t=>this._setPopupDelay(t.target.value)}
173
+ />
174
+ `:null}
175
+ <p
176
+ style="font-size:12px;color:#888;line-height:1.5;margin:8px 0 0;font-style:italic;"
177
+ >
178
+ <lang-text
179
+ whiteSpace="normal"
180
+ text="modal_name_hint"
181
+ ></lang-text>
182
+ </p>
183
+ </cdtr-editor-section>
184
+ `:null}
185
+
186
+ <!-- ${"typography"===this.tabName?r.qy` <cdtr-text-editor-plugin></cdtr-text-editor-plugin> `:null} -->
187
+ <!-- ${"spacing"===this.tabName?r.qy`
188
+ <cdtr-editor-container>
189
+ <cdtr-row justify="center">
190
+ <cdtr-col sm="12"
191
+ ><cdtr-title style="display:block" class="align-lang"
192
+ ><lang-text text="padding"></lang-text></cdtr-title
193
+ ></cdtr-col>
194
+ <cdtr-col sm="6"
195
+ ><cdtr-spacing
196
+ .topValue="${this.padding.topValue}"
197
+ .bottomValue="${this.padding.bottomValue}"
198
+ .leftValue="${this.padding.leftValue}"
199
+ .rightValue="${this.padding.rightValue}"
200
+ isLock=${!1}
201
+ max="500"
202
+ @input=${this.cmds.onChangePadding}
203
+ ></cdtr-spacing
204
+ ></cdtr-col>
205
+ </cdtr-row>
206
+ </cdtr-editor-container>
207
+ <cdtr-editor-container>
208
+ <cdtr-row justify="center">
209
+ <cdtr-col sm="12"
210
+ ><cdtr-title style="display:block" class="align-lang"
211
+ ><lang-text text="margin"></lang-text></cdtr-title
212
+ ></cdtr-col>
213
+ <cdtr-col sm="6"
214
+ ><cdtr-spacing
215
+ .topValue=${this.margin.topValue}
216
+ .bottomValue=${this.margin.bottomValue}
217
+ isLock=${!1}
218
+ max="500"
219
+ .hasLeft=${!1}
220
+ .hasRight=${!1}
221
+ @input=${this.cmds.onChangeMargin}
222
+ ></cdtr-spacing
223
+ ></cdtr-col>
224
+ </cdtr-row>
225
+ </cdtr-editor-container>
226
+ `:null} -->
227
+ </div>
228
+ </cdtr-editor-tabs>
229
+ <cdtr-gallery
230
+ .multi=${!0}
231
+ @close=${()=>{this.galleryOpened=!1}}
232
+ .opened=${this.galleryOpened}
233
+ @file=${this.cmds.onChangeImage}
234
+ ></cdtr-gallery>
235
+ `}}g.styles=r.AH`
236
+ paper-button.gallery,
237
+ paper-button.backgrounds {
238
+ text-transform: none;
239
+ font-size: var(--text-sm, 13px);
240
+ font-weight: 500;
241
+ letter-spacing: 0.01em;
242
+ border-radius: var(--radius-sm, 6px);
243
+ padding: var(--space-2, 8px) var(--space-4, 16px);
244
+ min-width: 0;
245
+ transition: background var(--duration-fast, 120ms) var(--ease-default, ease);
246
+ }
247
+ paper-button.gallery {
248
+ background: var(--color-primary, #6366f1);
249
+ color: var(--color-primary-text, #fff);
250
+ }
251
+ paper-button.gallery:hover {
252
+ background: var(--color-primary-hover, #4f46e5);
253
+ }
254
+ paper-button.backgrounds {
255
+ background: var(--color-bg-muted, #f4f4f6);
256
+ color: var(--color-text-secondary, #555);
257
+ }
258
+ paper-button.backgrounds:hover {
259
+ background: #eaeaed;
260
+ }
261
+ `,g.properties={maxWidth:{type:Number},backgroundInstance:{type:Object},padding:{type:Object},margin:{type:Object},tabs:{type:Array},tabName:{type:String},galleryOpened:{type:Boolean},backgroundVideo:{type:String,reflect:!0},isBackgroundImage:{type:Boolean},noResponsive:{type:Boolean},modalable:{type:Boolean},modalName:{type:String},popupTrigger:{type:String},popupDelay:{type:Number},borderStyle:{type:String},borderWidth:{type:Number},borderColor:{type:String},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},borderTopWidth:{type:Number},borderBottomWidth:{type:Number},borderLeftWidth:{type:Number},borderRightWidth:{type:Number}},customElements.define("block-editor",g)},15155(t,e,o){o.d(e,{A:()=>n});var r=o(59929),a=o(57176);class i extends r.WF{constructor(){super(),this.items=[],this.columns=2}async openPicker(t){const e=this.shadowRoot.querySelector(`#picker-${t}`);if(!e)return;await e.updateComplete;const o=e.shadowRoot?.querySelector("color-playground");if(o)if(await o.updateComplete,"function"==typeof o.openColorpicker)o.openColorpicker();else{(o.shadowRoot?.querySelector('[role="button"]')||o.shadowRoot?.querySelector("div")||o).click()}}render(){const t=1===this.columns?"grid single-col":"grid";return r.qy`
262
+ <div class="${t}">
263
+ ${(this.items||[]).map((t,e)=>r.qy`
264
+ <div class="swatch-item" @click=${()=>this.openPicker(e)}>
265
+ <div
266
+ class="swatch-circle"
267
+ style="background: ${t.value||"#fff"}"
268
+ ></div>
269
+ <span class="swatch-label">
270
+ <lang-text text="${t.title}"></lang-text>
271
+ </span>
272
+ <div class="hidden-picker">
273
+ <cdtr-colorpicker-editor
274
+ id="picker-${e}"
275
+ .hasAlpha=${!1}
276
+ .allowGradient=${!0===t.allowGradient}
277
+ @change=${t.onChange}
278
+ .value=${t.value}
279
+ text="${t.title}"
280
+ ></cdtr-colorpicker-editor>
281
+ </div>
282
+ </div>
283
+ `)}
284
+ </div>
285
+ `}}i.styles=[a.L,r.AH`
286
+ :host {
287
+ display: block;
288
+ direction: var(--direction-locale, ltr);
289
+ }
290
+ .grid {
291
+ display: grid;
292
+ grid-template-columns: 1fr 1fr;
293
+ gap: 6px;
294
+ }
295
+ .grid.single-col {
296
+ grid-template-columns: 1fr;
297
+ }
298
+ .swatch-item {
299
+ display: flex;
300
+ align-items: center;
301
+ gap: 8px;
302
+ padding: 8px 10px;
303
+ background: #f6f6f8;
304
+ border-radius: 8px;
305
+ cursor: pointer;
306
+ transition: background 0.15s ease;
307
+ min-width: 0;
308
+ overflow: hidden;
309
+ position: relative;
310
+ }
311
+ .swatch-item:hover {
312
+ background: #eeeff1;
313
+ }
314
+ .swatch-label {
315
+ font-size: 11px;
316
+ color: #555;
317
+ font-weight: 500;
318
+ line-height: 1;
319
+ white-space: nowrap;
320
+ overflow: hidden;
321
+ text-overflow: ellipsis;
322
+ min-width: 0;
323
+ flex: 1;
324
+ }
325
+ .hidden-picker {
326
+ position: absolute;
327
+ width: 1px;
328
+ height: 1px;
329
+ overflow: hidden;
330
+ clip: rect(0,0,0,0);
331
+ pointer-events: none;
332
+ }
333
+ `],i.properties={items:{type:Array},columns:{type:Number}},customElements.define("cdtr-color-swatch-group",i);const n=t=>r.qy`
334
+ <cdtr-color-swatch-group
335
+ .items=${t.items}
336
+ .columns=${t.columns||2}
337
+ ></cdtr-color-swatch-group>
338
+ `},12258(t,e,o){o.d(e,{A:()=>n});var r=o(59929),a=o(40648);class i extends r.WF{constructor(){super(),this.label="",this.open=!0,this.persistKey=""}toggle(){this.open=!this.open,(0,a.Q)(this.persistKey,this.open)}render(){return r.qy`
339
+ <div class="section">
340
+ <div class="header" @click=${this.toggle}>
341
+ <span class="title"><lang-text text="${this.label}"></lang-text></span>
342
+ <svg class="chevron ${this.open?"open":""}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
343
+ <polyline points="6 9 12 15 18 9"></polyline>
344
+ </svg>
345
+ </div>
346
+ <div class="content ${this.open?"open":""}">
347
+ <div class="content-inner">
348
+ <slot></slot>
349
+ </div>
350
+ </div>
351
+ </div>
352
+ `}}i.styles=r.AH`
353
+ :host {
354
+ display: block;
355
+ direction: var(--direction-locale, ltr);
356
+ --editor-container-inline-padding: 0;
357
+ }
358
+ .section {
359
+ position: relative;
360
+ }
361
+ /* Inset to the content gutter, not full-bleed: an edge-to-edge rule reads
362
+ as a table border. */
363
+ .section::after {
364
+ content: "";
365
+ display: block;
366
+ height: 1px;
367
+ margin: 0 var(--space-4, 16px);
368
+ background: var(--color-border-subtle, rgba(0, 0, 0, 0.06));
369
+ }
370
+ :host(:last-of-type) .section::after {
371
+ display: none;
372
+ }
373
+ .header {
374
+ display: flex;
375
+ align-items: center;
376
+ justify-content: space-between;
377
+ padding: var(--space-3) var(--space-4);
378
+ cursor: pointer;
379
+ user-select: none;
380
+ /* Keeps the group name visible while its controls scroll past. */
381
+ position: sticky;
382
+ top: 0;
383
+ z-index: 1;
384
+ background: var(--color-bg, #fff);
385
+ }
386
+ .header:hover {
387
+ background: var(--color-bg-subtle, #fafbfc);
388
+ }
389
+ .title {
390
+ /* Larger and lighter than the labels inside it, not bolder — the labels
391
+ are what you act on. */
392
+ font-size: var(--text-md);
393
+ font-weight: 500;
394
+ color: var(--color-text);
395
+ letter-spacing: 0;
396
+ }
397
+ .chevron {
398
+ width: 14px;
399
+ height: 14px;
400
+ transition: transform var(--duration-normal) var(--ease-default), color var(--duration-fast) var(--ease-default);
401
+ color: var(--color-text-faint);
402
+ }
403
+ .header:hover .chevron {
404
+ color: var(--color-text-muted);
405
+ }
406
+ .chevron.open {
407
+ transform: rotate(180deg);
408
+ }
409
+ .content {
410
+ overflow: hidden;
411
+ transition: max-height var(--duration-normal) var(--ease-default), opacity var(--duration-fast) var(--ease-default);
412
+ max-height: 0;
413
+ opacity: 0;
414
+ }
415
+ .content.open {
416
+ max-height: 1200px;
417
+ opacity: 1;
418
+ }
419
+ .content-inner {
420
+ /* Light on top: the controls inside bring their own leading pad. */
421
+ padding: var(--space-1) var(--space-4) var(--space-3) var(--space-4);
422
+ }
423
+ `,i.properties={label:{type:String,reflect:!0,attribute:"data-label"},open:{type:Boolean,reflect:!0},persistKey:{type:String}},customElements.define("cdtr-editor-section",i);const n=(t,e)=>r.qy`
424
+ <cdtr-editor-section
425
+ .label=${t.label}
426
+ .open=${!1!==t.open}
427
+ .persistKey=${t.persistKey||""}
428
+ >
429
+ ${e}
430
+ </cdtr-editor-section>
431
+ `}}]);
Binary file
@@ -1129,7 +1129,7 @@
1129
1129
  `:null}
1130
1130
  </cdtr-row>
1131
1131
  </cdtr-editor-container>
1132
- `;a.e(4217).then(a.bind(a,94217));a(45888);Promise.resolve().then(a.bind(a,58691));class lt extends r.WF{constructor(){super(),this.editor={},this.tabName="",this.factory=this.factory.bind(this),this.execCommandWrapper=this.execCommandWrapper.bind(this),this.connectWith=this.connectWith.bind(this),this.changeTab=this.changeTab.bind(this),this.$select=this.$select.bind(this),this.$update=this.$update.bind(this),this.handleJustifyContent=this.handleJustifyContent.bind(this),this.handleAlignItems=this.handleAlignItems.bind(this)}$select(){this.editor&&this.editor.select&&this.editor.select({changeTab:this.changeTab,tab:this.tabName}),this.connectWith("select")}$update(){this.connectWith("update")}_sectionScope(){return`${this.type||""}:${this.tabName||""}`}_applyPersistedOpen(t){const e=this._sectionScope();for(const a of t)if(a&&"section"===a.type){a.persistKey=`${e}::${a.label}`;const t=(0,it.i)(a.persistKey);void 0!==t&&(a.open=t)}return t}connectedCallback(){super.connectedCallback(),n.Ay.on("update",this.$update),n.Ay.on("select",this.$select),this.connectWith("load")}disconnectedCallback(){super.disconnectedCallback(),n.Ay.off("update",this.$update),n.Ay.off("select",this.$select)}connectWith(){const t=new UIEvent(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"update",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t);const e=n.Ay.components.find(t=>t.type===this.type);e&&"function"==typeof e.createEditor&&(this.component={...e},this.props=e.props,this.editor=e.createEditor(this.commandsBuilder()))}factory(t,e){if("function"==typeof t&&(t=t()),t.debug,"boolean"==typeof t.active&&!t.active)return null;if("function"==typeof t.active){if(!1===t.active())return null}const a=t.type;switch(a){case"background":return nt(t);case"datetime":return j(t);case"radius":return W(t);case"justifyContent":case"alignItems":return F(t,a);case"node":case"lit":case"custom":return t.node();case"button":return N(t);case"borderpicker":return B(t);case"linkpicker":return q(t);case"input":return(0,i.A)(t);case"dropdown":return(0,s.A)(t);case"fontSize":return c(t);case"fontFamily":return l(t);case"mergeTags":return U(t);case"boxShadow":return v(t);case"colorpicker":return d(t);case"slider":return p(t);case"divider":return b(t);case"heading":return(0,h.A)(t);case"option":return f(t);case"checkbox":return y(t);case"stringListBuilder":return x(t);case"chipsInput":return $(t);case"typography":return M(t);case"icons":return r.qy`<icons-gallery
1132
+ `;a(45888);Promise.resolve().then(a.bind(a,58691));class lt extends r.WF{constructor(){super(),this.editor={},this.tabName="",this.factory=this.factory.bind(this),this.execCommandWrapper=this.execCommandWrapper.bind(this),this.connectWith=this.connectWith.bind(this),this.changeTab=this.changeTab.bind(this),this.$select=this.$select.bind(this),this.$update=this.$update.bind(this),this.handleJustifyContent=this.handleJustifyContent.bind(this),this.handleAlignItems=this.handleAlignItems.bind(this)}$select(){this.editor&&this.editor.select&&this.editor.select({changeTab:this.changeTab,tab:this.tabName}),this.connectWith("select")}$update(){this.connectWith("update")}_sectionScope(){return`${this.type||""}:${this.tabName||""}`}_applyPersistedOpen(t){const e=this._sectionScope();for(const a of t)if(a&&"section"===a.type){a.persistKey=`${e}::${a.label}`;const t=(0,it.i)(a.persistKey);void 0!==t&&(a.open=t)}return t}connectedCallback(){super.connectedCallback(),n.Ay.on("update",this.$update),n.Ay.on("select",this.$select),this.connectWith("load")}disconnectedCallback(){super.disconnectedCallback(),n.Ay.off("update",this.$update),n.Ay.off("select",this.$select)}connectWith(){const t=new UIEvent(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"update",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t);const e=n.Ay.components.find(t=>t.type===this.type);e&&"function"==typeof e.createEditor&&(this.component={...e},this.props=e.props,this.editor=e.createEditor(this.commandsBuilder()))}factory(t,e){if("function"==typeof t&&(t=t()),t.debug,"boolean"==typeof t.active&&!t.active)return null;if("function"==typeof t.active){if(!1===t.active())return null}const a=t.type;switch(a){case"background":return nt(t);case"datetime":return j(t);case"radius":return W(t);case"justifyContent":case"alignItems":return F(t,a);case"node":case"lit":case"custom":return t.node();case"button":return N(t);case"borderpicker":return B(t);case"linkpicker":return q(t);case"input":return(0,i.A)(t);case"dropdown":return(0,s.A)(t);case"fontSize":return c(t);case"fontFamily":return l(t);case"mergeTags":return U(t);case"boxShadow":return v(t);case"colorpicker":return d(t);case"slider":return p(t);case"divider":return b(t);case"heading":return(0,h.A)(t);case"option":return f(t);case"checkbox":return y(t);case"stringListBuilder":return x(t);case"chipsInput":return $(t);case"typography":return M(t);case"icons":return r.qy`<icons-gallery
1133
1133
  .selectedIcon=${t.selectedIcon}
1134
1134
  .useIconsApi=${!0===t.useIconsApi}
1135
1135
  .iconColor=${t.iconColor??"000000"}
Binary file