@creaditor/web-starterkit 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1271.creaditor.bundle.js +1 -1
- package/dist/1271.creaditor.bundle.js.gz +0 -0
- package/dist/1565.creaditor.bundle.js +48 -13
- package/dist/1565.creaditor.bundle.js.gz +0 -0
- package/dist/2384.creaditor.bundle.js +35 -3
- package/dist/2384.creaditor.bundle.js.gz +0 -0
- package/dist/2438.creaditor.bundle.js +6 -6
- package/dist/2438.creaditor.bundle.js.gz +0 -0
- package/dist/4739.creaditor.bundle.js +1 -0
- package/dist/4739.creaditor.bundle.js.gz +0 -0
- package/dist/638.creaditor.bundle.js +3 -3
- package/dist/638.creaditor.bundle.js.gz +0 -0
- package/dist/763.creaditor.bundle.js +1 -1
- package/dist/763.creaditor.bundle.js.gz +0 -0
- package/dist/9041.creaditor.bundle.js +1 -1
- package/dist/9041.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +58 -11
- package/dist/creaditor.bundle.js.gz +0 -0
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.gz +0 -0
- package/package.json +1 -1
|
@@ -436,4 +436,4 @@
|
|
|
436
436
|
opacity: 0.3;
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
`,r=o))||r},71271(e,t,n){n.d(t,{default:()=>
|
|
439
|
+
`,r=o))||r},71271(e,t,n){n.d(t,{default:()=>h});var r=n(53577),o=n(74265),a=n(86319);const i=[100,300,400,500,600,700,900].map(e=>({value:String(e),label:String(e)})),s=e=>{{const{component:t,commands:n,helpers:s}=e,l=t.tiptap,c=l.state.selection.$anchor.node().attrs,p=l.isActive("heading",{level:1})?"h1":l.isActive("heading",{level:2})?"h2":l.isActive("heading",{level:3})?"h3":l.isActive("heading",{level:4})?"h4":l.isActive("heading",{level:5})?"h5":l.isActive("heading",{level:6})?"h6":"paragraph";let d=e.languageJson;const g=e.language||"he";return d||(d="he"===g?r:o),{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=l.isActive("customBulletItem"),n=[{text:"design",selected:!t},...t?[{text:"icons",selected:!0}]:[],{text:"settings"}];return n.forEach(t=>t.selected=t.text===e),n},layout:e=>{let{tab:r,changeTab:o,tabs:s}=e;return[{type:"info",text:"text_micro_copy",active:()=>"design"===r.text},{type:"dropdown",active:()=>"design"===r.text,title:"type",value:p,items:[{value:"H1"},{value:"H2"},{value:"H3"},{value:"H4"},{value:"H5"},{value:"H6"},{value:"paragraph"}],onChange:e=>{const t=e.target.value;switch(t){case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":l.chain().setHeading({level:parseInt(t.slice(1))}).run();break;case"paragraph":l.chain().setParagraph().run()}}},{type:"slider",title:"fontSize",min:8,step:2,max:74,value:parseInt(l.getAttributes("textStyle").fontSize||"16px"),active:()=>"design"===r.text,onInput:e=>{const n=e.target.value,r=t.tiptap,o=r.view.state.selection;o.from===o.to?r.chain().selectAll().setFontSize(n).run():r.chain().setFontSize(n).run()}},{type:"dropdown",title:"fontWeight",active:()=>"design"===r.text&&"web"===a.M.get("config","channel"),value:String(l.getAttributes("textStyle").fontWeight||400),selected:String(l.getAttributes("textStyle").fontWeight||400),items:i,onChange:e=>{const n=e.target.value,r=t.tiptap,o=r.view.state.selection;o.from===o.to?r.chain().selectAll().setFontWeight(n).run():r.chain().setFontWeight(n).run()}},{type:"divider"},{type:"slider",title:"lineHeight",min:1,max:3,step:.1,value:parseFloat(c.lineHeight||1),active:()=>"design"===r.text,onInput:e=>{const n=e.target.value,r=t.tiptap,o=r.view.state.selection;o.from===o.to?r.chain().selectAll().setLineHeight(n).run():r.chain().setLineHeight(n).run()}},{type:"divider",active:()=>"design"===r.text},{type:"slider",title:"letterSpacing",min:1,max:10,step:1,value:parseFloat(c.letterSpacing)||1,active:()=>"design"===r.text,onInput:e=>{const n=e.target.value,r=t.tiptap,o=r.view.state.selection;n<=1?o.from===o.to?r.chain().selectAll().setLetterSpacing("normal").run():r.chain().setLetterSpacing("normal").run():o.from===o.to?r.chain().selectAll().setLetterSpacing(n+"px").run():r.chain().setLetterSpacing(n+"px").run()}},{type:"divider",active:()=>"design"===r.text},{type:"colorpicker",active:()=>"design"===r.text,title:"font_color",alpha:!1,value:l.getAttributes("textStyle").color||"#0000",onChange:e=>{const n=e.target.value,r=t.tiptap,o=r.view.state.selection;if(o.from===o.to){const{state:e,view:t}=r,a=e.tr,{from:i,to:s}=o.from===o.to?{from:0,to:e.doc.content.size}:{from:o.from,to:o.to};e.doc.nodesBetween(i,s,(t,r)=>{if(t.isText){e.doc.resolve(r);if(!t.marks.some(e=>"link"===e.type.name)){const o=r,i=r+t.nodeSize;a.addMark(o,i,e.schema.marks.textStyle.create({color:n}))}}}),t.dispatch(a)}else r.chain().setColor(n).focus().run()}},{type:"divider",active:()=>"design"===r.text},{type:"colorpicker",active:()=>"design"===r.text,title:"backgroundColor",value:t.props.style.background||t.props.style.backgroundColor||"#fff",onChange:e=>{const t=e.target.value;n.execCommand("style",{background:t,backgroundColor:null})}},{type:"divider",active:()=>"design"===r.text},{type:"slider",active:()=>"design"===r.text,title:"maxWidth",value:parseFloat(t.props.style.width),min:20,max:1e3,onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px"})}},{type:"divider"},{type:"colorpicker",active:()=>"icons"===r.text,title:d.iconColor||"Icon color",alpha:!1,value:l.getAttributes(" textStyle").color||"#0000",onChange:e=>{const t=e.target.value;l.chain().setCustomBulletStyles({fill:t}).run()}},{type:"divider",active:()=>"icons"===r.text},{type:"slider",active:()=>"icons"===r.text,title:d.iconSize||"Icon size",value:parseInt(l.getAttributes("customBulletItem").width)||24,min:10,max:40,onInput:e=>{const t=e.target.value;l.chain().setCustomBulletStyles({width:t+"px",height:t+"px"}).run()}},{type:"icons",active:()=>"icons"===r.text,selectedIcon:t.props.src,useIconsApi:!0,iconColor:t.props.iconColor||"000000",iconSize:parseInt(t.props.style?.width,10)||24,onChange:e=>{const n=e.detail;t.tiptap.chain().focus().setCustomBulletIcon({svgIcon:n.urlPng}).run()}}]}}}};var l=n(52144);const c=e=>{let{helpers:t,tiptap:n,composeId:r,template:o}=e;return{set:(e,a,i)=>{switch(a){case"style":return"object"==typeof i&&(e[a]=(0,l.A)(e[a],i),t.mergeDiff(o,{style:e[a]})),!0;case"text":e[a]=i;const s=n.getJSON();return i&&"object"==typeof i&&JSON.stringify(s)!==JSON.stringify(i.childNodes)&&(i&&i.focusedElement&&i.focusedElement===r?(n.chain().focus().setContent(i.childNodes).run(),i.to&&i.from&&n.commands.setTextSelection({from:i.from,to:i.to})):n.chain().setContent(i.childNodes).run()),delete e?.text?.markdown,!0}}}};var p=n(84488),d=n.n(p);n(70567);const g=[];let u=!1,m=null;const h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t="text";return{name:t,create:n=>{const{createElement:r,compose:o,helpers:i}=n,{mergeDiff:l}=i,p=document.createElement("div");l(p,{style:o.props.style});const h=a.M.get("config","editor","configure","editorProps","fonts");let x=a.M.get("config","target");"string"==typeof x&&(x=document.querySelector(x)),x||(x=document.body);const y=d()({element:p,container:x||document.body,editable:!0,offsetTop:40,onClickMagic:e=>{let{insertContent:t,getJSON:n,getHTML:r,getText:o,selectAll:i,insertContentHtml:s}=e;const l=a.M.get("injectEditor"),c=document.createElement("cdtr-text-prompt-editor");l(c),c.context=o(),c.addEventListener("text-generation-start",e=>{i()}),c.addEventListener("text-generation-chunk",e=>{t(e.detail.chunk)}),c.addEventListener("text-generation-complete",e=>{i(),s(e.detail.text)}),c.addEventListener("text-generation-error",e=>{console.error("Text generation error:",e.detail.error)})},content:"string"==typeof o.props.text.markdown?o.props.text.markdown:o.props.text.childNodes,defaultDirection:"rtl",onBlur:()=>{m===y&&(m=null),setTimeout(()=>{m!==y&&(u=!1)},150)},onFocus:()=>{if(!u||m===y||null===m){if(u=!0,m=y,g.length>0)for(g.forEach(e=>{e!==y&&e.hideEditor()});g.length>0;)g.pop();g.push(y),setTimeout(()=>{m===y&&u&&y.showEditor()},100)}},onUpdate:e=>{let{editor:t,transaction:n}=e;if(0===n.steps.length)return;const r=n.curSelection.from,a=n.curSelection.to,i={childNodes:t.getJSON(),from:r,to:a,focusedElement:o.id};f.commands.execCommand("text",i)},ignoresBlurByQuerySelectors:[".ignore-events"],builder:[{type:"fontFamily",fonts:h||[],useCloud:!0},{type:"fontSize",sizes:e.fontSize||[8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74]},{type:"horizonRule"},{type:"clearFormat"},{type:"bold"},{type:"strike"},{type:"italic"},{type:"underline"},{type:"table"},{type:"emoji"},{type:"unLink"},{type:"link"},{type:"customList"},{type:"numbered"},{type:"bullet"},{type:"backcolor"},{type:"fontColor"},{type:"direction"},{type:"justify"},{type:"right"},{type:"center"},{type:"left"},{type:"image"},{type:"mergeTags"},{type:"magic"}]}),f=r({name:t,id:o.id,template:p,defaultProps:{text:{},style:{}},draggable:{group:"element"},droppable:{group:"element"},resizeable:()=>p,handleBar:!0,validator:c({template:p,helpers:i,tiptap:y,composeId:o.id}),schema:o.schema,onSelect:e=>{p.classList.add(e)},onDeselect:e=>{p.classList.remove(e)},elementProps:o,remove:()=>{p.remove()},createEditor:s});return o.props.text.markdown&&y.chain().insertContent(" ").run(),f.addProp("tiptap",y),f}}}}}]);
|
|
Binary file
|
|
@@ -229,7 +229,10 @@
|
|
|
229
229
|
</cdtr-dropdown>
|
|
230
230
|
</cdtr-editor-container>`};var l=r(9507);r(92384);const d=t=>a.qy`<cdtr-font-family-editor
|
|
231
231
|
.name=${t.value}
|
|
232
|
+
.showWeight=${!0===t.weight}
|
|
233
|
+
.weight=${t.weightValue}
|
|
232
234
|
@change=${t.onChange}
|
|
235
|
+
@weightchange=${t.onWeightChange}
|
|
233
236
|
></cdtr-font-family-editor>`,c=t=>a.qy`<cdtr-editor-container>
|
|
234
237
|
<cdtr-range-device-editor
|
|
235
238
|
.value=${"function"==typeof t.value?t.value(t):t.value||0}
|
|
@@ -377,11 +380,11 @@ max-height: 90vh;max-width:500px;"
|
|
|
377
380
|
@change=${t.onChange}
|
|
378
381
|
.sizes=${t.sizes||[]}
|
|
379
382
|
></cdtr-width-editor>
|
|
380
|
-
</cdtr-editor-container>`,k=t=>a.qy`<cdtr-divider></cdtr-divider>`;var R=r(70980);const
|
|
383
|
+
</cdtr-editor-container>`,k=t=>a.qy`<cdtr-divider></cdtr-divider>`;var R=r(70980);const S={margin:0};function I(t){return a.qy` <lang-text
|
|
381
384
|
whiteSpace="break-spaces"
|
|
382
385
|
text="${t}"
|
|
383
386
|
></lang-text>`}const _=t=>a.qy` <cdtr-editor-container>
|
|
384
|
-
${function(t){let{level:e,text:r}=t;switch(e){case 2:return a.qy` <h2 style=${(0,R.W)(
|
|
387
|
+
${function(t){let{level:e,text:r}=t;switch(e){case 2:return a.qy` <h2 style=${(0,R.W)(S)}>${I(r)}</h2>`;case 3:return a.qy` <h3 style=${(0,R.W)(S)}>${I(r)}</h3>`;case 4:return a.qy` <h4 style=${(0,R.W)(S)}>${I(r)}</h4>`;case 5:return a.qy` <h5 style=${(0,R.W)(S)}>${I(r)}</h5>`;case 6:return a.qy` <h6 style=${(0,R.W)(S)}>${I(r)}</h6>`;default:const t={...S};return t.fontSize="13px",a.qy` <div style=${(0,R.W)(t)}>${I(r)}</div>`}}({level:t.level,text:t.text})}
|
|
385
388
|
</cdtr-editor-container>`,V=t=>a.qy` <cdtr-editor-container pt="0">
|
|
386
389
|
<paper-button
|
|
387
390
|
@click=${t.onClick}
|
|
@@ -470,11 +473,11 @@ max-height: 90vh;max-width:500px;"
|
|
|
470
473
|
.freeSolo=${!!t.freeSolo}
|
|
471
474
|
>
|
|
472
475
|
</cdtr-chips-input>
|
|
473
|
-
</cdtr-editor-container>`;var B=r(88385),j=r(75068),
|
|
476
|
+
</cdtr-editor-container>`;var B=r(88385),j=r(75068),W=r.n(j);const F={minWidth:0,margin:0},P=t=>a.qy`
|
|
474
477
|
<cdtr-row alignItems="center" spacing="10px">
|
|
475
478
|
<paper-button
|
|
476
479
|
class="${t.underline?"bold":""}"
|
|
477
|
-
style=${(0,R.W)(
|
|
480
|
+
style=${(0,R.W)(F)}
|
|
478
481
|
@click=${e=>t.onChange("bold",e)}
|
|
479
482
|
><cdtr-icon
|
|
480
483
|
color="${t.bold?"var(--primary)":""}"
|
|
@@ -483,7 +486,7 @@ max-height: 90vh;max-width:500px;"
|
|
|
483
486
|
></cdtr-icon>
|
|
484
487
|
</paper-button>
|
|
485
488
|
<paper-button
|
|
486
|
-
style=${(0,R.W)(
|
|
489
|
+
style=${(0,R.W)(F)}
|
|
487
490
|
@click=${e=>t.onChange("underline",e)}
|
|
488
491
|
><cdtr-icon
|
|
489
492
|
color="${t.underline?"var(--primary)":""}"
|
|
@@ -492,7 +495,7 @@ max-height: 90vh;max-width:500px;"
|
|
|
492
495
|
></cdtr-icon>
|
|
493
496
|
</paper-button>
|
|
494
497
|
<paper-button
|
|
495
|
-
style=${(0,R.W)(
|
|
498
|
+
style=${(0,R.W)(F)}
|
|
496
499
|
@click=${e=>t.onChange("italic",e)}
|
|
497
500
|
><cdtr-icon
|
|
498
501
|
color="${t.italic?"var(--primary)":""}"
|
|
@@ -507,10 +510,10 @@ max-height: 90vh;max-width:500px;"
|
|
|
507
510
|
<lang-text whiteSpace="break-spaces" text="${t.text}"></lang-text
|
|
508
511
|
></i>
|
|
509
512
|
</cdtr-title>
|
|
510
|
-
</cdtr-editor-container>`,O=()=>[{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"></path></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z"></path></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18.26l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928L12 18.26zm0-2.292l4.247 2.377-.949-4.773 3.573-3.305-4.833-.573L12 5.275l-2.038 4.42-4.833.572 3.573 3.305-.949 4.773L12 15.968z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 15.968l4.247 2.377-.949-4.773 3.573-3.305-4.833-.573L12 5.275v10.693zm0 2.292l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928L12 18.26z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18.26l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 .5l4.226 6.183 7.187 2.109-4.575 5.93.215 7.486L12 19.69l-7.053 2.518.215-7.486-4.575-5.93 7.187-2.109L12 .5zm0 3.544L9.022 8.402 3.957 9.887l3.225 4.178-.153 5.275L12 17.566l4.97 1.774-.152-5.275 3.224-4.178-5.064-1.485L12 4.044zM10 12a2 2 0 1 0 4 0h2a4 4 0 1 1-8 0h2z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 .5l4.226 6.183 7.187 2.109-4.575 5.93.215 7.486L12 19.69l-7.053 2.518.215-7.486-4.575-5.93 7.187-2.109L12 .5zM10 12H8a4 4 0 0 0 7.995.2L16 12h-2a2 2 0 0 1-3.995.15L10 12z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M5 4.604v9.185a4 4 0 0 0 1.781 3.328L12 20.597l5.219-3.48A4 4 0 0 0 19 13.79V4.604L12 3.05 5 4.604zM3.783 2.826L12 1l8.217 1.826a1 1 0 0 1 .783.976v9.987a6 6 0 0 1-2.672 4.992L12 23l-6.328-4.219A6 6 0 0 1 3 13.79V3.802a1 1 0 0 1 .783-.976zM12 13.5l-2.939 1.545.561-3.272-2.377-2.318 3.286-.478L12 6l1.47 2.977 3.285.478-2.377 2.318.56 3.272L12 13.5z"/></svg>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M2 19h20v2H2v-2zM2 5l5 3.5L12 2l5 6.5L22 5v12H2V5zm2 3.841V15h16V8.841l-3.42 2.394L12 5.28l-4.58 5.955L4 8.84z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm0-2a5 5 0 1 1 0 10 5 5 0 0 1 0-10zm6.5-.25a1.25 1.25 0 0 1-2.5 0 1.25 1.25 0 0 1 2.5 0zM12 4c-2.474 0-2.878.007-4.029.058-.784.037-1.31.142-1.798.332-.434.168-.747.369-1.08.703a2.89 2.89 0 0 0-.704 1.08c-.19.49-.295 1.015-.331 1.798C4.006 9.075 4 9.461 4 12c0 2.474.007 2.878.058 4.029.037.783.142 1.31.331 1.797.17.435.37.748.702 1.08.337.336.65.537 1.08.703.494.191 1.02.297 1.8.333C9.075 19.994 9.461 20 12 20c2.474 0 2.878-.007 4.029-.058.782-.037 1.309-.142 1.797-.331.433-.169.748-.37 1.08-.702.337-.337.538-.65.704-1.08.19-.493.296-1.02.332-1.8.052-1.104.058-1.49.058-4.029 0-2.474-.007-2.878-.058-4.029-.037-.782-.142-1.31-.332-1.798a2.911 2.911 0 0 0-.703-1.08 2.884 2.884 0 0 0-1.08-.704c-.49-.19-1.016-.295-1.798-.331C14.925 4.006 14.539 4 12 4zm0-2c2.717 0 3.056.01 4.122.06 1.065.05 1.79.217 2.428.465.66.254 1.216.598 1.772 1.153a4.908 4.908 0 0 1 1.153 1.772c.247.637.415 1.363.465 2.428.047 1.066.06 1.405.06 4.122 0 2.717-.01 3.056-.06 4.122-.05 1.065-.218 1.79-.465 2.428a4.883 4.883 0 0 1-1.153 1.772 4.915 4.915 0 0 1-1.772 1.153c-.637.247-1.363.415-2.428.465-1.066.047-1.405.06-4.122.06-2.717 0-3.056-.01-4.122-.06-1.065-.05-1.79-.218-2.428-.465a4.89 4.89 0 0 1-1.772-1.153 4.904 4.904 0 0 1-1.153-1.772c-.248-.637-.415-1.363-.465-2.428C2.013 15.056 2 14.717 2 12c0-2.717.01-3.056.06-4.122.05-1.066.217-1.79.465-2.428a4.88 4.88 0 0 1 1.153-1.772A4.897 4.897 0 0 1 5.45 2.525c.638-.248 1.362-.415 2.428-.465C8.944 2.013 9.283 2 12 2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M7.253 18.494l.724.423A7.953 7.953 0 0 0 12 20a8 8 0 1 0-8-8c0 1.436.377 2.813 1.084 4.024l.422.724-.653 2.401 2.4-.655zM2.004 22l1.352-4.968A9.954 9.954 0 0 1 2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10a9.954 9.954 0 0 1-5.03-1.355L2.004 22zM8.391 7.308c.134-.01.269-.01.403-.004.054.004.108.01.162.016.159.018.334.115.393.249.298.676.588 1.357.868 2.04.062.152.025.347-.093.537a4.38 4.38 0 0 1-.263.372c-.113.145-.356.411-.356.411s-.099.118-.061.265c.014.056.06.137.102.205l.059.095c.256.427.6.86 1.02 1.268.12.116.237.235.363.346.468.413.998.75 1.57 1l.005.002c.085.037.128.057.252.11.062.026.126.049.191.066a.35.35 0 0 0 .367-.13c.724-.877.79-.934.796-.934v.002a.482.482 0 0 1 .378-.127c.06.004.121.015.177.04.531.243 1.4.622 1.4.622l.582.261c.098.047.187.158.19.265.004.067.01.175-.013.373-.032.259-.11.57-.188.733a1.155 1.155 0 0 1-.21.302 2.378 2.378 0 0 1-.33.288 3.71 3.71 0 0 1-.125.09 5.024 5.024 0 0 1-.383.22 1.99 1.99 0 0 1-.833.23c-.185.01-.37.024-.556.014-.008 0-.568-.087-.568-.087a9.448 9.448 0 0 1-3.84-2.046c-.226-.199-.435-.413-.649-.626-.89-.885-1.562-1.84-1.97-2.742A3.47 3.47 0 0 1 6.9 9.62a2.729 2.729 0 0 1 .564-1.68c.073-.094.142-.192.261-.305.127-.12.207-.184.294-.228a.961.961 0 0 1 .371-.1z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M7.764 19.225c.59-.26 1.25-.309 1.868-.139.77.21 1.565.316 2.368.314 4.585 0 8-3.287 8-7.7S16.585 4 12 4s-8 3.287-8 7.7c0 2.27.896 4.272 2.466 5.676a2.8 2.8 0 0 1 .942 2.006l.356-.157zM12 2c5.634 0 10 4.127 10 9.7 0 5.573-4.366 9.7-10 9.7a10.894 10.894 0 0 1-2.895-.384.8.8 0 0 0-.534.039l-1.984.876a.8.8 0 0 1-1.123-.707l-.055-1.78a.797.797 0 0 0-.268-.57C3.195 17.135 2 14.617 2 11.7 2 6.127 6.367 2 12 2zM5.995 14.537l2.937-4.66a1.5 1.5 0 0 1 2.17-.4l2.336 1.75a.6.6 0 0 0 .723 0l3.155-2.396c.421-.319.971.185.689.633l-2.937 4.66a1.5 1.5 0 0 1-2.17.4l-2.336-1.75a.6.6 0 0 0-.723 0l-3.155 2.395c-.421.319-.971-.185-.689-.633z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14 19h5V5H5v14h7v-5h-2v-2h2v-1.654c0-1.337.14-1.822.4-2.311A2.726 2.726 0 0 1 13.536 6.9c.382-.205.857-.328 1.687-.381.329-.021.755.005 1.278.08v1.9H16c-.917 0-1.296.043-1.522.164a.727.727 0 0 0-.314.314c-.12.226-.164.45-.164 1.368V12h2.5l-.5 2h-2v5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/>'},{svg:'<path fill="none" d="M0 0H24V24H0z"/><path d="M5 3v16h16v2H3V3h2zm14.94 2.94l2.12 2.12L16 14.122l-3-3-3.94 3.94-2.12-2.122L13 6.88l3 3 3.94-3.94z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M9.366 10.682a10.556 10.556 0 0 0 3.952 3.952l.884-1.238a1 1 0 0 1 1.294-.296 11.422 11.422 0 0 0 4.583 1.364 1 1 0 0 1 .921.997v4.462a1 1 0 0 1-.898.995c-.53.055-1.064.082-1.602.082C9.94 21 3 14.06 3 5.5c0-.538.027-1.072.082-1.602A1 1 0 0 1 4.077 3h4.462a1 1 0 0 1 .997.921A11.422 11.422 0 0 0 10.9 8.504a1 1 0 0 1-.296 1.294l-1.238.884zm-2.522-.657l1.9-1.357A13.41 13.41 0 0 1 7.647 5H5.01c-.006.166-.009.333-.009.5C5 12.956 11.044 19 18.5 19c.167 0 .334-.003.5-.01v-2.637a13.41 13.41 0 0 1-3.668-1.097l-1.357 1.9a12.442 12.442 0 0 1-1.588-.75l-.058-.033a12.556 12.556 0 0 1-4.702-4.702l-.033-.058a12.442 12.442 0 0 1-.75-1.588z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M2 13h6v8H2v-8zm14-5h6v13h-6V8zM9 3h6v18H9V3zM4 15v4h2v-4H4zm7-10v14h2V5h-2zm7 5v9h2v-9h-2z"/>'},{svg:'<path fill="none" d="M0 0H24V24H0z"/><path d="M5.5 20c.828 0 1.5.672 1.5 1.5S6.328 23 5.5 23 4 22.328 4 21.5 4.672 20 5.5 20zm13 0c.828 0 1.5.672 1.5 1.5s-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5.672-1.5 1.5-1.5zM2.172 1.757l3.827 3.828V17L20 17v2H5c-.552 0-1-.448-1-1V6.413L.756 3.172l1.415-1.415zM16 3c.552 0 1 .448 1 1v2h2.993C20.55 6 21 6.456 21 6.995v8.01c0 .55-.45.995-1.007.995H8.007C7.45 16 7 15.544 7 15.005v-8.01C7 6.445 7.45 6 8.007 6h2.992L11 4c0-.552.448-1 1-1h4zm-6 5H9v6h1V8zm6 0h-4v6h4V8zm3 0h-1v6h1V8zm-4-3h-2v1h2V5z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M22 13.5V21a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1H5v1a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-7.5l-1.243-.31A1 1 0 0 1 0 12.22v-.72a.5.5 0 0 1 .5-.5h1.875l2.138-5.702A2 2 0 0 1 6.386 4h11.228a2 2 0 0 1 1.873 1.298L21.625 11H23.5a.5.5 0 0 1 .5.5v.72a1 1 0 0 1-.757.97L22 13.5zM4 15v2a1 1 0 0 0 1 1h3.245a.5.5 0 0 0 .44-.736C7.88 15.754 6.318 15 4 15zm16 0c-2.317 0-3.879.755-4.686 2.264a.5.5 0 0 0 .441.736H19a1 1 0 0 0 1-1v-2zM6 6l-1.561 4.684A1 1 0 0 0 5.387 12h13.226a1 1 0 0 0 .948-1.316L18 6H6z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5 3h15a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-2v3a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4V4a1 1 0 0 1 1-1zm13 2v3h2V5h-2zM2 19h18v2H2v-2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14.5 2a3.5 3.5 0 0 1 3.163 5.001L21 7a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-1v8a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-8H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1l3.337.001a3.5 3.5 0 0 1 5.664-3.95A3.48 3.48 0 0 1 14.5 2zM18 13H6v7h12v-7zm2-4H4v2h16V9zM9.5 4a1.5 1.5 0 0 0-.144 2.993L9.5 7H11V5.5a1.5 1.5 0 0 0-1.356-1.493L9.5 4zm5 0l-.144.007a1.5 1.5 0 0 0-1.35 1.349L13 5.5V7h1.5l.144-.007a1.5 1.5 0 0 0 0-2.986L14.5 4z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M4 5v14h16V5H4zM3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm11.793 6.793L13 8h5v5l-1.793-1.793-3.864 3.864-2.121-2.121-2.829 2.828-1.414-1.414 4.243-4.243 2.121 2.122 2.45-2.45z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5 9a1 1 0 0 1 1 1 6.97 6.97 0 0 1 4.33 1.5h2.17c1.332 0 2.53.579 3.353 1.499L19 13a5 5 0 0 1 4.516 2.851C21.151 18.972 17.322 21 13 21c-2.79 0-5.15-.603-7.06-1.658A.998.998 0 0 1 5 20H2a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h3zm1.001 3L6 17.021l.045.033C7.84 18.314 10.178 19 13 19c3.004 0 5.799-1.156 7.835-3.13l.133-.133-.12-.1a2.994 2.994 0 0 0-1.643-.63L19 15l-2.112-.001c.073.322.112.657.112 1.001v1H8v-2l6.79-.001-.034-.078a2.501 2.501 0 0 0-2.092-1.416L12.5 13.5H9.57A4.985 4.985 0 0 0 6.002 12zM4 11H3v7h1v-7zm9.646-7.425L14 3.93l.354-.354a2.5 2.5 0 1 1 3.535 3.536L14 11l-3.89-3.89a2.5 2.5 0 1 1 3.536-3.535zm-2.12 1.415a.5.5 0 0 0-.06.637l.058.069L14 8.17l2.476-2.474a.5.5 0 0 0 .058-.638l-.058-.07a.5.5 0 0 0-.638-.057l-.07.058-1.769 1.768-1.767-1.77-.068-.056a.5.5 0 0 0-.638.058z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M17.5 21a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm0-2a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm-11-9a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm0-2a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm12.571-4.485l1.414 1.414L4.93 20.485l-1.414-1.414L19.07 3.515z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M13 16.938V19h5v2H6v-2h5v-2.062A8.001 8.001 0 0 1 4 9V3h16v6a8.001 8.001 0 0 1-7 7.938zM6 5v4a6 6 0 1 0 12 0V5H6zM1 5h2v4H1V5zm20 0h2v4h-2V5z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M3.492 8.065L4.778 19h14.444l1.286-10.935-4.01 2.673L12 4.441l-4.498 6.297-4.01-2.673zM2.801 5.2L7 8l4.186-5.86a1 1 0 0 1 1.628 0L17 8l4.2-2.8a1 1 0 0 1 1.547.95l-1.643 13.967a1 1 0 0 1-.993.883H3.889a1 1 0 0 1-.993-.883L1.253 6.149A1 1 0 0 1 2.8 5.2zM12 15a2 2 0 1 1 0-4 2 2 0 0 1 0 4z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 2a6 6 0 0 1 6 6v1h4v2h-1.167l-.757 9.083a1 1 0 0 1-.996.917H4.92a1 1 0 0 1-.996-.917L3.166 11H2V9h4V8a6 6 0 0 1 6-6zm6.826 9H5.173l.667 8h12.319l.667-8zM13 13v4h-2v-4h2zm-4 0v4H7v-4h2zm8 0v4h-2v-4h2zm-5-9a4 4 0 0 0-3.995 3.8L8 8v1h8V8a4 4 0 0 0-3.8-3.995L12 4z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M4 6.414L.757 3.172l1.415-1.415L5.414 5h15.242a1 1 0 0 1 .958 1.287l-2.4 8a1 1 0 0 1-.958.713H6v2h11v2H5a1 1 0 0 1-1-1V6.414zM6 7v6h11.512l1.8-6H6zm-.5 16a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm12 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5.671 4.257c3.928-3.219 9.733-2.995 13.4.672 3.905 3.905 3.905 10.237 0 14.142-3.905 3.905-10.237 3.905-14.142 0A9.993 9.993 0 0 1 2.25 9.767l.077-.313 1.934.51a8 8 0 1 0 3.053-4.45l-.221.166 1.017 1.017-4.596 1.06 1.06-4.596 1.096 1.096zM13 6v2h2.5v2H10a.5.5 0 0 0-.09.992L10 11h4a2.5 2.5 0 1 1 0 5h-1v2h-2v-2H8.5v-2H14a.5.5 0 0 0 .09-.992L14 13h-4a2.5 2.5 0 1 1 0-5h1V6h2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5.33 3.271a3.5 3.5 0 0 1 4.254 4.963l10.709 10.71-1.414 1.414-10.71-10.71a3.502 3.502 0 0 1-4.962-4.255L5.444 7.63a1.5 1.5 0 1 0 2.121-2.121L5.329 3.27zm10.367 1.884l3.182-1.768 1.414 1.414-1.768 3.182-1.768.354-2.12 2.121-1.415-1.414 2.121-2.121.354-1.768zm-6.718 8.132l1.414 1.414-5.303 5.303a1 1 0 0 1-1.492-1.327l.078-.087 5.303-5.303z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5.636 12.707l1.828 1.829L8.88 13.12 7.05 11.293l1.414-1.414 1.829 1.828 1.414-1.414L9.88 8.464l1.414-1.414L13.12 8.88l1.415-1.415-1.829-1.828 2.829-2.828a1 1 0 0 1 1.414 0l4.242 4.242a1 1 0 0 1 0 1.414L8.464 21.192a1 1 0 0 1-1.414 0L2.808 16.95a1 1 0 0 1 0-1.414l2.828-2.829zm8.485 5.656l4.243-4.242L21 16.757V21h-4.242l-2.637-2.637zM5.636 9.878L2.807 7.05a1 1 0 0 1 0-1.415l2.829-2.828a1 1 0 0 1 1.414 0L9.88 5.635 5.636 9.878z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M20.083 15.2l1.202.721a.5.5 0 0 1 0 .858l-8.77 5.262a1 1 0 0 1-1.03 0l-8.77-5.262a.5.5 0 0 1 0-.858l1.202-.721L12 20.05l8.083-4.85zm0-4.7l1.202.721a.5.5 0 0 1 0 .858L12 17.65l-9.285-5.571a.5.5 0 0 1 0-.858l1.202-.721L12 15.35l8.083-4.85zm-7.569-9.191l8.771 5.262a.5.5 0 0 1 0 .858L12 13 2.715 7.429a.5.5 0 0 1 0-.858l8.77-5.262a1 1 0 0 1 1.03 0zM12 3.332L5.887 7 12 10.668 18.113 7 12 3.332z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14.121 10.48a1 1 0 0 0-1.414 0l-.707.706a2 2 0 1 1-2.828-2.828l5.63-5.632a6.5 6.5 0 0 1 6.377 10.568l-2.108 2.135-4.95-4.95zM3.161 4.468a6.503 6.503 0 0 1 8.009-.938L7.757 6.944a4 4 0 0 0 5.513 5.794l.144-.137 4.243 4.242-4.243 4.243a2 2 0 0 1-2.828 0L3.16 13.66a6.5 6.5 0 0 1 0-9.192z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M17 15.245v6.872a.5.5 0 0 1-.757.429L12 20l-4.243 2.546a.5.5 0 0 1-.757-.43v-6.87a8 8 0 1 1 10 0zM12 15a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm0-2a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 8.5l2.116 5.088 5.492.44-4.184 3.584 1.278 5.36L12 20.1l-4.702 2.872 1.278-5.36-4.184-3.584 5.492-.44L12 8.5zm0 5.207l-.739 1.777-1.916.153 1.46 1.251-.447 1.871L12 17.756l1.641 1.003-.446-1.87 1.459-1.252-1.915-.153L12 13.707zM8 2v9H6V2h2zm10 0v9h-2V2h2zm-5 0v5h-2V2h2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M22 17.002a6.002 6.002 0 0 1-4.713 5.86l-.638-1.914A4.003 4.003 0 0 0 19.465 19H17a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h2.938a8.001 8.001 0 0 0-15.876 0H7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5C2 6.477 6.477 2 12 2s10 4.477 10 10V17.002zM20 17v-4h-3v4h3zM4 13v4h3v-4H4z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M22 20.007a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V19h18V7.3l-8 7.2-10-9V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v16.007zM4.434 5L12 11.81 19.566 5H4.434zM0 15h8v2H0v-2zm0-5h5v2H0v-2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455zm-.692-2H20V5H4v13.385L5.763 17zm5.53-4.879l4.243-4.242 1.414 1.414-5.657 5.657-3.89-3.89 1.415-1.414 2.475 2.475z"/>'},{tags:[],name:"",svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M22 14h-2V7.238l-7.928 7.1L4 7.216V19h10v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v10zM4.511 5l7.55 6.662L19.502 5H4.511zM19 22l-3.536-3.536 1.415-1.414L19 19.172l3.536-3.536 1.414 1.414L19 22z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M20 7.238l-7.928 7.1L4 7.216V19h9v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v7h-2V7.238zM19.501 5H4.511l7.55 6.662L19.502 5zM22 17h1v5h-8v-5h1v-1a3 3 0 0 1 6 0v1zm-2 0v-1a1 1 0 0 0-2 0v1h2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M9 1v2h6V1h2v2h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1h2zm11 9H4v9h16v-9zm-4.964 1.136l1.414 1.414-4.95 4.95-3.536-3.536L9.38 12.55l2.121 2.122 3.536-3.536zM7 5H4v3h16V5h-3v1h-2V5H9v1H7V5z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14.6 8H21a2 2 0 0 1 2 2v2.104a2 2 0 0 1-.15.762l-3.095 7.515a1 1 0 0 1-.925.619H2a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1h3.482a1 1 0 0 0 .817-.423L11.752.85a.5.5 0 0 1 .632-.159l1.814.907a2.5 2.5 0 0 1 1.305 2.853L14.6 8zM7 10.588V19h11.16L21 12.104V10h-6.4a2 2 0 0 1-1.938-2.493l.903-3.548a.5.5 0 0 0-.261-.571l-.661-.33-4.71 6.672c-.25.354-.57.644-.933.858zM5 11H3v8h2v-8z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M19 21H5a1 1 0 0 1-1-1v-9H1l10.327-9.388a1 1 0 0 1 1.346 0L23 11h-3v9a1 1 0 0 1-1 1zm-6-2h5V9.157l-6-5.454-6 5.454V19h5v-6h2v6z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M21 20h2v2H1v-2h2V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v17zm-2 0V4H5v16h14zM8 11h3v2H8v-2zm0-4h3v2H8V7zm0 8h3v2H8v-2zm5 0h3v2h-3v-2zm0-4h3v2h-3v-2zm0-4h3v2h-3V7z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455zm-.692-2H20V5H4v13.385L5.763 17zM11 10h2v2h-2v-2zm-4 0h2v2H7v-2zm8 0h2v2h-2v-2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M9.4 16H3a2 2 0 0 1-2-2v-2.104a2 2 0 0 1 .15-.762L4.246 3.62A1 1 0 0 1 5.17 3H22a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-3.482a1 1 0 0 0-.817.423l-5.453 7.726a.5.5 0 0 1-.632.159L9.802 22.4a2.5 2.5 0 0 1-1.305-2.853L9.4 16zm7.6-2.588V5H5.84L3 11.896V14h6.4a2 2 0 0 1 1.938 2.493l-.903 3.548a.5.5 0 0 0 .261.571l.661.33 4.71-6.672c.25-.354.57-.644.933-.858zM19 13h2V5h-2v8z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M7 4v16h10V4H7zM6 2h12a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm6 15a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M15.396 10.58l.02-.249a32.392 32.392 0 0 0 .083-2.326c0-.87-.294-1.486-.914-2.063-.66-.614-1.459-.942-2.59-.942-1.137 0-1.958.335-2.51.888-.696.695-.958 1.218-.958 2.1 0 .521.061 1.994.096 2.618a2 2 0 0 1-.469 1.402c.055.098.105.204.153.317.3.771.198 1.543-.152 2.271-.392.818-.731 1.393-1.41 2.154a7.973 7.973 0 0 1-.642.643 1.999 1.999 0 0 1 .412.565 5.886 5.886 0 0 1 1.585.074c.81.146 1.324.434 2.194 1.061l.016.011.213.152c.619.44.877.546 1.473.546.609 0 .91-.121 1.523-.552l.207-.146c.876-.632 1.407-.928 2.231-1.076a6.664 6.664 0 0 1 1.559-.074 1.999 1.999 0 0 1 .417-.567 8.409 8.409 0 0 1-.616-.616 9.235 9.235 0 0 1-1.447-2.16c-.363-.749-.47-1.54-.137-2.321.04-.098.085-.19.132-.276a2 2 0 0 1-.469-1.435zm-10.315-.102c.419 0 .6.305 1.219.305.157 0 .26-.035.326-.066-.009-.156-.099-1.986-.099-2.729 0-1.688.72-2.69 1.543-3.514C8.893 3.65 10.175 3 11.996 3c1.82 0 3.066.653 3.952 1.478.886.825 1.551 1.93 1.551 3.528 0 1.555-.099 2.594-.108 2.716a.59.59 0 0 0 .279.065c.63 0 .63-.31 1.33-.31.685 0 .983.57.983.823 0 .621-.833.967-1.33 1.126-.369.117-.931.291-1.075.635-.074.174-.043.4.092.678.003.008 1.26 2.883 3.93 3.326.235.035.391.241.391.483 0 .332-.37.617-.726.782-.443.2-1.091.37-1.952.505-.043.078-.134.485-.235.887-.135.542-.801.366-.991.326A4.997 4.997 0 0 0 16.291 20c-.482.087-.913.378-1.395.726-.713.504-1.465 1.076-2.9 1.076-1.436 0-2.144-.572-2.857-1.076-.482-.348-.905-.637-1.396-.726-.898-.163-1.57.036-1.795.057-.226.02-.842.244-.996-.327-.045-.166-.191-.808-.235-.895-.856-.135-1.508-.313-1.952-.513-.365-.165-.726-.443-.726-.779 0-.235.158-.44.391-.482 2.644-.483 3.766-3.005 3.922-3.33.132-.276.161-.5.091-.679-.143-.343-.704-.513-1.073-.635-.105-.034-1.336-.373-1.336-1.117 0-.24.205-.573.582-.73a1.36 1.36 0 0 1 .465-.092z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14 10.25L17 8v6l-3-2.25V14H7V8h7v2.25zM5.763 17H20V5H4v13.385L5.763 17zm.692 2L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455z"/>'},{svg:'<path d="M17 1L1.15533 8.23675C1.08581 8.2685 1.07616 8.36335 1.13788 8.40845L5.8 11.8154M17 1V19.8031C17 19.8849 16.9071 19.9321 16.841 19.8838L9.44214 14.477M17 1L5.8 11.8154M17 1L9.44214 14.477M5.8 11.8154L9.44214 14.477M5.8 11.8154L6.57033 17.5855C6.58178 17.6712 6.68936 17.703 6.74552 17.6372L9.44214 14.477" stroke="none"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M20 3v14a4 4 0 1 1-2-3.465V6H9v11a4 4 0 1 1-2-3.465V3h13z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 13.535V3h8v3h-6v11a4 4 0 1 1-2-3.465z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 4a8 8 0 0 0-8 8h3a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7C2 6.477 6.477 2 12 2s10 4.477 10 10v7a2 2 0 0 1-2 2h-3a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h3a8 8 0 0 0-8-8zM4 14v5h3v-5H4zm13 0v5h3v-5h-3z"/>'}];var G=r(49549);const N=t=>a.qy` <cdtr-editor-container>
|
|
513
|
+
</cdtr-editor-container>`,N=()=>[{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"></path></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z"></path></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18.26l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928L12 18.26zm0-2.292l4.247 2.377-.949-4.773 3.573-3.305-4.833-.573L12 5.275l-2.038 4.42-4.833.572 3.573 3.305-.949 4.773L12 15.968z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 15.968l4.247 2.377-.949-4.773 3.573-3.305-4.833-.573L12 5.275v10.693zm0 2.292l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928L12 18.26z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18.26l-7.053 3.948 1.575-7.928L.587 8.792l8.027-.952L12 .5l3.386 7.34 8.027.952-5.935 5.488 1.575 7.928z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 .5l4.226 6.183 7.187 2.109-4.575 5.93.215 7.486L12 19.69l-7.053 2.518.215-7.486-4.575-5.93 7.187-2.109L12 .5zm0 3.544L9.022 8.402 3.957 9.887l3.225 4.178-.153 5.275L12 17.566l4.97 1.774-.152-5.275 3.224-4.178-5.064-1.485L12 4.044zM10 12a2 2 0 1 0 4 0h2a4 4 0 1 1-8 0h2z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M12 .5l4.226 6.183 7.187 2.109-4.575 5.93.215 7.486L12 19.69l-7.053 2.518.215-7.486-4.575-5.93 7.187-2.109L12 .5zM10 12H8a4 4 0 0 0 7.995.2L16 12h-2a2 2 0 0 1-3.995.15L10 12z"/></svg>'},{svg:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" ><path fill="none" d="M0 0h24v24H0z"/><path d="M5 4.604v9.185a4 4 0 0 0 1.781 3.328L12 20.597l5.219-3.48A4 4 0 0 0 19 13.79V4.604L12 3.05 5 4.604zM3.783 2.826L12 1l8.217 1.826a1 1 0 0 1 .783.976v9.987a6 6 0 0 1-2.672 4.992L12 23l-6.328-4.219A6 6 0 0 1 3 13.79V3.802a1 1 0 0 1 .783-.976zM12 13.5l-2.939 1.545.561-3.272-2.377-2.318 3.286-.478L12 6l1.47 2.977 3.285.478-2.377 2.318.56 3.272L12 13.5z"/></svg>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M2 19h20v2H2v-2zM2 5l5 3.5L12 2l5 6.5L22 5v12H2V5zm2 3.841V15h16V8.841l-3.42 2.394L12 5.28l-4.58 5.955L4 8.84z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm0-2a5 5 0 1 1 0 10 5 5 0 0 1 0-10zm6.5-.25a1.25 1.25 0 0 1-2.5 0 1.25 1.25 0 0 1 2.5 0zM12 4c-2.474 0-2.878.007-4.029.058-.784.037-1.31.142-1.798.332-.434.168-.747.369-1.08.703a2.89 2.89 0 0 0-.704 1.08c-.19.49-.295 1.015-.331 1.798C4.006 9.075 4 9.461 4 12c0 2.474.007 2.878.058 4.029.037.783.142 1.31.331 1.797.17.435.37.748.702 1.08.337.336.65.537 1.08.703.494.191 1.02.297 1.8.333C9.075 19.994 9.461 20 12 20c2.474 0 2.878-.007 4.029-.058.782-.037 1.309-.142 1.797-.331.433-.169.748-.37 1.08-.702.337-.337.538-.65.704-1.08.19-.493.296-1.02.332-1.8.052-1.104.058-1.49.058-4.029 0-2.474-.007-2.878-.058-4.029-.037-.782-.142-1.31-.332-1.798a2.911 2.911 0 0 0-.703-1.08 2.884 2.884 0 0 0-1.08-.704c-.49-.19-1.016-.295-1.798-.331C14.925 4.006 14.539 4 12 4zm0-2c2.717 0 3.056.01 4.122.06 1.065.05 1.79.217 2.428.465.66.254 1.216.598 1.772 1.153a4.908 4.908 0 0 1 1.153 1.772c.247.637.415 1.363.465 2.428.047 1.066.06 1.405.06 4.122 0 2.717-.01 3.056-.06 4.122-.05 1.065-.218 1.79-.465 2.428a4.883 4.883 0 0 1-1.153 1.772 4.915 4.915 0 0 1-1.772 1.153c-.637.247-1.363.415-2.428.465-1.066.047-1.405.06-4.122.06-2.717 0-3.056-.01-4.122-.06-1.065-.05-1.79-.218-2.428-.465a4.89 4.89 0 0 1-1.772-1.153 4.904 4.904 0 0 1-1.153-1.772c-.248-.637-.415-1.363-.465-2.428C2.013 15.056 2 14.717 2 12c0-2.717.01-3.056.06-4.122.05-1.066.217-1.79.465-2.428a4.88 4.88 0 0 1 1.153-1.772A4.897 4.897 0 0 1 5.45 2.525c.638-.248 1.362-.415 2.428-.465C8.944 2.013 9.283 2 12 2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M7.253 18.494l.724.423A7.953 7.953 0 0 0 12 20a8 8 0 1 0-8-8c0 1.436.377 2.813 1.084 4.024l.422.724-.653 2.401 2.4-.655zM2.004 22l1.352-4.968A9.954 9.954 0 0 1 2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10a9.954 9.954 0 0 1-5.03-1.355L2.004 22zM8.391 7.308c.134-.01.269-.01.403-.004.054.004.108.01.162.016.159.018.334.115.393.249.298.676.588 1.357.868 2.04.062.152.025.347-.093.537a4.38 4.38 0 0 1-.263.372c-.113.145-.356.411-.356.411s-.099.118-.061.265c.014.056.06.137.102.205l.059.095c.256.427.6.86 1.02 1.268.12.116.237.235.363.346.468.413.998.75 1.57 1l.005.002c.085.037.128.057.252.11.062.026.126.049.191.066a.35.35 0 0 0 .367-.13c.724-.877.79-.934.796-.934v.002a.482.482 0 0 1 .378-.127c.06.004.121.015.177.04.531.243 1.4.622 1.4.622l.582.261c.098.047.187.158.19.265.004.067.01.175-.013.373-.032.259-.11.57-.188.733a1.155 1.155 0 0 1-.21.302 2.378 2.378 0 0 1-.33.288 3.71 3.71 0 0 1-.125.09 5.024 5.024 0 0 1-.383.22 1.99 1.99 0 0 1-.833.23c-.185.01-.37.024-.556.014-.008 0-.568-.087-.568-.087a9.448 9.448 0 0 1-3.84-2.046c-.226-.199-.435-.413-.649-.626-.89-.885-1.562-1.84-1.97-2.742A3.47 3.47 0 0 1 6.9 9.62a2.729 2.729 0 0 1 .564-1.68c.073-.094.142-.192.261-.305.127-.12.207-.184.294-.228a.961.961 0 0 1 .371-.1z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M7.764 19.225c.59-.26 1.25-.309 1.868-.139.77.21 1.565.316 2.368.314 4.585 0 8-3.287 8-7.7S16.585 4 12 4s-8 3.287-8 7.7c0 2.27.896 4.272 2.466 5.676a2.8 2.8 0 0 1 .942 2.006l.356-.157zM12 2c5.634 0 10 4.127 10 9.7 0 5.573-4.366 9.7-10 9.7a10.894 10.894 0 0 1-2.895-.384.8.8 0 0 0-.534.039l-1.984.876a.8.8 0 0 1-1.123-.707l-.055-1.78a.797.797 0 0 0-.268-.57C3.195 17.135 2 14.617 2 11.7 2 6.127 6.367 2 12 2zM5.995 14.537l2.937-4.66a1.5 1.5 0 0 1 2.17-.4l2.336 1.75a.6.6 0 0 0 .723 0l3.155-2.396c.421-.319.971.185.689.633l-2.937 4.66a1.5 1.5 0 0 1-2.17.4l-2.336-1.75a.6.6 0 0 0-.723 0l-3.155 2.395c-.421.319-.971-.185-.689-.633z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14 19h5V5H5v14h7v-5h-2v-2h2v-1.654c0-1.337.14-1.822.4-2.311A2.726 2.726 0 0 1 13.536 6.9c.382-.205.857-.328 1.687-.381.329-.021.755.005 1.278.08v1.9H16c-.917 0-1.296.043-1.522.164a.727.727 0 0 0-.314.314c-.12.226-.164.45-.164 1.368V12h2.5l-.5 2h-2v5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"/>'},{svg:'<path fill="none" d="M0 0H24V24H0z"/><path d="M5 3v16h16v2H3V3h2zm14.94 2.94l2.12 2.12L16 14.122l-3-3-3.94 3.94-2.12-2.122L13 6.88l3 3 3.94-3.94z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M9.366 10.682a10.556 10.556 0 0 0 3.952 3.952l.884-1.238a1 1 0 0 1 1.294-.296 11.422 11.422 0 0 0 4.583 1.364 1 1 0 0 1 .921.997v4.462a1 1 0 0 1-.898.995c-.53.055-1.064.082-1.602.082C9.94 21 3 14.06 3 5.5c0-.538.027-1.072.082-1.602A1 1 0 0 1 4.077 3h4.462a1 1 0 0 1 .997.921A11.422 11.422 0 0 0 10.9 8.504a1 1 0 0 1-.296 1.294l-1.238.884zm-2.522-.657l1.9-1.357A13.41 13.41 0 0 1 7.647 5H5.01c-.006.166-.009.333-.009.5C5 12.956 11.044 19 18.5 19c.167 0 .334-.003.5-.01v-2.637a13.41 13.41 0 0 1-3.668-1.097l-1.357 1.9a12.442 12.442 0 0 1-1.588-.75l-.058-.033a12.556 12.556 0 0 1-4.702-4.702l-.033-.058a12.442 12.442 0 0 1-.75-1.588z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M2 13h6v8H2v-8zm14-5h6v13h-6V8zM9 3h6v18H9V3zM4 15v4h2v-4H4zm7-10v14h2V5h-2zm7 5v9h2v-9h-2z"/>'},{svg:'<path fill="none" d="M0 0H24V24H0z"/><path d="M5.5 20c.828 0 1.5.672 1.5 1.5S6.328 23 5.5 23 4 22.328 4 21.5 4.672 20 5.5 20zm13 0c.828 0 1.5.672 1.5 1.5s-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5.672-1.5 1.5-1.5zM2.172 1.757l3.827 3.828V17L20 17v2H5c-.552 0-1-.448-1-1V6.413L.756 3.172l1.415-1.415zM16 3c.552 0 1 .448 1 1v2h2.993C20.55 6 21 6.456 21 6.995v8.01c0 .55-.45.995-1.007.995H8.007C7.45 16 7 15.544 7 15.005v-8.01C7 6.445 7.45 6 8.007 6h2.992L11 4c0-.552.448-1 1-1h4zm-6 5H9v6h1V8zm6 0h-4v6h4V8zm3 0h-1v6h1V8zm-4-3h-2v1h2V5z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M22 13.5V21a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1H5v1a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-7.5l-1.243-.31A1 1 0 0 1 0 12.22v-.72a.5.5 0 0 1 .5-.5h1.875l2.138-5.702A2 2 0 0 1 6.386 4h11.228a2 2 0 0 1 1.873 1.298L21.625 11H23.5a.5.5 0 0 1 .5.5v.72a1 1 0 0 1-.757.97L22 13.5zM4 15v2a1 1 0 0 0 1 1h3.245a.5.5 0 0 0 .44-.736C7.88 15.754 6.318 15 4 15zm16 0c-2.317 0-3.879.755-4.686 2.264a.5.5 0 0 0 .441.736H19a1 1 0 0 0 1-1v-2zM6 6l-1.561 4.684A1 1 0 0 0 5.387 12h13.226a1 1 0 0 0 .948-1.316L18 6H6z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5 3h15a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-2v3a4 4 0 0 1-4 4H8a4 4 0 0 1-4-4V4a1 1 0 0 1 1-1zm13 2v3h2V5h-2zM2 19h18v2H2v-2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14.5 2a3.5 3.5 0 0 1 3.163 5.001L21 7a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-1v8a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-8H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1l3.337.001a3.5 3.5 0 0 1 5.664-3.95A3.48 3.48 0 0 1 14.5 2zM18 13H6v7h12v-7zm2-4H4v2h16V9zM9.5 4a1.5 1.5 0 0 0-.144 2.993L9.5 7H11V5.5a1.5 1.5 0 0 0-1.356-1.493L9.5 4zm5 0l-.144.007a1.5 1.5 0 0 0-1.35 1.349L13 5.5V7h1.5l.144-.007a1.5 1.5 0 0 0 0-2.986L14.5 4z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M4 5v14h16V5H4zM3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm11.793 6.793L13 8h5v5l-1.793-1.793-3.864 3.864-2.121-2.121-2.829 2.828-1.414-1.414 4.243-4.243 2.121 2.122 2.45-2.45z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5 9a1 1 0 0 1 1 1 6.97 6.97 0 0 1 4.33 1.5h2.17c1.332 0 2.53.579 3.353 1.499L19 13a5 5 0 0 1 4.516 2.851C21.151 18.972 17.322 21 13 21c-2.79 0-5.15-.603-7.06-1.658A.998.998 0 0 1 5 20H2a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h3zm1.001 3L6 17.021l.045.033C7.84 18.314 10.178 19 13 19c3.004 0 5.799-1.156 7.835-3.13l.133-.133-.12-.1a2.994 2.994 0 0 0-1.643-.63L19 15l-2.112-.001c.073.322.112.657.112 1.001v1H8v-2l6.79-.001-.034-.078a2.501 2.501 0 0 0-2.092-1.416L12.5 13.5H9.57A4.985 4.985 0 0 0 6.002 12zM4 11H3v7h1v-7zm9.646-7.425L14 3.93l.354-.354a2.5 2.5 0 1 1 3.535 3.536L14 11l-3.89-3.89a2.5 2.5 0 1 1 3.536-3.535zm-2.12 1.415a.5.5 0 0 0-.06.637l.058.069L14 8.17l2.476-2.474a.5.5 0 0 0 .058-.638l-.058-.07a.5.5 0 0 0-.638-.057l-.07.058-1.769 1.768-1.767-1.77-.068-.056a.5.5 0 0 0-.638.058z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M17.5 21a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm0-2a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm-11-9a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7zm0-2a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm12.571-4.485l1.414 1.414L4.93 20.485l-1.414-1.414L19.07 3.515z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M13 16.938V19h5v2H6v-2h5v-2.062A8.001 8.001 0 0 1 4 9V3h16v6a8.001 8.001 0 0 1-7 7.938zM6 5v4a6 6 0 1 0 12 0V5H6zM1 5h2v4H1V5zm20 0h2v4h-2V5z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M3.492 8.065L4.778 19h14.444l1.286-10.935-4.01 2.673L12 4.441l-4.498 6.297-4.01-2.673zM2.801 5.2L7 8l4.186-5.86a1 1 0 0 1 1.628 0L17 8l4.2-2.8a1 1 0 0 1 1.547.95l-1.643 13.967a1 1 0 0 1-.993.883H3.889a1 1 0 0 1-.993-.883L1.253 6.149A1 1 0 0 1 2.8 5.2zM12 15a2 2 0 1 1 0-4 2 2 0 0 1 0 4z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 2a6 6 0 0 1 6 6v1h4v2h-1.167l-.757 9.083a1 1 0 0 1-.996.917H4.92a1 1 0 0 1-.996-.917L3.166 11H2V9h4V8a6 6 0 0 1 6-6zm6.826 9H5.173l.667 8h12.319l.667-8zM13 13v4h-2v-4h2zm-4 0v4H7v-4h2zm8 0v4h-2v-4h2zm-5-9a4 4 0 0 0-3.995 3.8L8 8v1h8V8a4 4 0 0 0-3.8-3.995L12 4z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M4 6.414L.757 3.172l1.415-1.415L5.414 5h15.242a1 1 0 0 1 .958 1.287l-2.4 8a1 1 0 0 1-.958.713H6v2h11v2H5a1 1 0 0 1-1-1V6.414zM6 7v6h11.512l1.8-6H6zm-.5 16a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm12 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5.671 4.257c3.928-3.219 9.733-2.995 13.4.672 3.905 3.905 3.905 10.237 0 14.142-3.905 3.905-10.237 3.905-14.142 0A9.993 9.993 0 0 1 2.25 9.767l.077-.313 1.934.51a8 8 0 1 0 3.053-4.45l-.221.166 1.017 1.017-4.596 1.06 1.06-4.596 1.096 1.096zM13 6v2h2.5v2H10a.5.5 0 0 0-.09.992L10 11h4a2.5 2.5 0 1 1 0 5h-1v2h-2v-2H8.5v-2H14a.5.5 0 0 0 .09-.992L14 13h-4a2.5 2.5 0 1 1 0-5h1V6h2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M24 12l-5.657 5.657-1.414-1.414L21.172 12l-4.243-4.243 1.414-1.414L24 12zM2.828 12l4.243 4.243-1.414 1.414L0 12l5.657-5.657L7.07 7.757 2.828 12zm6.96 9H7.66l6.552-18h2.128L9.788 21z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5.33 3.271a3.5 3.5 0 0 1 4.254 4.963l10.709 10.71-1.414 1.414-10.71-10.71a3.502 3.502 0 0 1-4.962-4.255L5.444 7.63a1.5 1.5 0 1 0 2.121-2.121L5.329 3.27zm10.367 1.884l3.182-1.768 1.414 1.414-1.768 3.182-1.768.354-2.12 2.121-1.415-1.414 2.121-2.121.354-1.768zm-6.718 8.132l1.414 1.414-5.303 5.303a1 1 0 0 1-1.492-1.327l.078-.087 5.303-5.303z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M5.636 12.707l1.828 1.829L8.88 13.12 7.05 11.293l1.414-1.414 1.829 1.828 1.414-1.414L9.88 8.464l1.414-1.414L13.12 8.88l1.415-1.415-1.829-1.828 2.829-2.828a1 1 0 0 1 1.414 0l4.242 4.242a1 1 0 0 1 0 1.414L8.464 21.192a1 1 0 0 1-1.414 0L2.808 16.95a1 1 0 0 1 0-1.414l2.828-2.829zm8.485 5.656l4.243-4.242L21 16.757V21h-4.242l-2.637-2.637zM5.636 9.878L2.807 7.05a1 1 0 0 1 0-1.415l2.829-2.828a1 1 0 0 1 1.414 0L9.88 5.635 5.636 9.878z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414-1.414-1.414-1.414-1.414 1.414 1.414 1.414zM7.242 21H3v-4.243L16.435 3.322a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414L7.243 21z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M20.083 15.2l1.202.721a.5.5 0 0 1 0 .858l-8.77 5.262a1 1 0 0 1-1.03 0l-8.77-5.262a.5.5 0 0 1 0-.858l1.202-.721L12 20.05l8.083-4.85zm0-4.7l1.202.721a.5.5 0 0 1 0 .858L12 17.65l-9.285-5.571a.5.5 0 0 1 0-.858l1.202-.721L12 15.35l8.083-4.85zm-7.569-9.191l8.771 5.262a.5.5 0 0 1 0 .858L12 13 2.715 7.429a.5.5 0 0 1 0-.858l8.77-5.262a1 1 0 0 1 1.03 0zM12 3.332L5.887 7 12 10.668 18.113 7 12 3.332z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14.121 10.48a1 1 0 0 0-1.414 0l-.707.706a2 2 0 1 1-2.828-2.828l5.63-5.632a6.5 6.5 0 0 1 6.377 10.568l-2.108 2.135-4.95-4.95zM3.161 4.468a6.503 6.503 0 0 1 8.009-.938L7.757 6.944a4 4 0 0 0 5.513 5.794l.144-.137 4.243 4.242-4.243 4.243a2 2 0 0 1-2.828 0L3.16 13.66a6.5 6.5 0 0 1 0-9.192z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M17 15.245v6.872a.5.5 0 0 1-.757.429L12 20l-4.243 2.546a.5.5 0 0 1-.757-.43v-6.87a8 8 0 1 1 10 0zM12 15a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm0-2a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 8.5l2.116 5.088 5.492.44-4.184 3.584 1.278 5.36L12 20.1l-4.702 2.872 1.278-5.36-4.184-3.584 5.492-.44L12 8.5zm0 5.207l-.739 1.777-1.916.153 1.46 1.251-.447 1.871L12 17.756l1.641 1.003-.446-1.87 1.459-1.252-1.915-.153L12 13.707zM8 2v9H6V2h2zm10 0v9h-2V2h2zm-5 0v5h-2V2h2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M22 17.002a6.002 6.002 0 0 1-4.713 5.86l-.638-1.914A4.003 4.003 0 0 0 19.465 19H17a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h2.938a8.001 8.001 0 0 0-15.876 0H7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5C2 6.477 6.477 2 12 2s10 4.477 10 10V17.002zM20 17v-4h-3v4h3zM4 13v4h3v-4H4z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M22 20.007a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V19h18V7.3l-8 7.2-10-9V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v16.007zM4.434 5L12 11.81 19.566 5H4.434zM0 15h8v2H0v-2zm0-5h5v2H0v-2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455zm-.692-2H20V5H4v13.385L5.763 17zm5.53-4.879l4.243-4.242 1.414 1.414-5.657 5.657-3.89-3.89 1.415-1.414 2.475 2.475z"/>'},{tags:[],name:"",svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M22 14h-2V7.238l-7.928 7.1L4 7.216V19h10v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v10zM4.511 5l7.55 6.662L19.502 5H4.511zM19 22l-3.536-3.536 1.415-1.414L19 19.172l3.536-3.536 1.414 1.414L19 22z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M20 7.238l-7.928 7.1L4 7.216V19h9v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v7h-2V7.238zM19.501 5H4.511l7.55 6.662L19.502 5zM22 17h1v5h-8v-5h1v-1a3 3 0 0 1 6 0v1zm-2 0v-1a1 1 0 0 0-2 0v1h2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M9 1v2h6V1h2v2h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1h2zm11 9H4v9h16v-9zm-4.964 1.136l1.414 1.414-4.95 4.95-3.536-3.536L9.38 12.55l2.121 2.122 3.536-3.536zM7 5H4v3h16V5h-3v1h-2V5H9v1H7V5z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14.6 8H21a2 2 0 0 1 2 2v2.104a2 2 0 0 1-.15.762l-3.095 7.515a1 1 0 0 1-.925.619H2a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1h3.482a1 1 0 0 0 .817-.423L11.752.85a.5.5 0 0 1 .632-.159l1.814.907a2.5 2.5 0 0 1 1.305 2.853L14.6 8zM7 10.588V19h11.16L21 12.104V10h-6.4a2 2 0 0 1-1.938-2.493l.903-3.548a.5.5 0 0 0-.261-.571l-.661-.33-4.71 6.672c-.25.354-.57.644-.933.858zM5 11H3v8h2v-8z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M19 21H5a1 1 0 0 1-1-1v-9H1l10.327-9.388a1 1 0 0 1 1.346 0L23 11h-3v9a1 1 0 0 1-1 1zm-6-2h5V9.157l-6-5.454-6 5.454V19h5v-6h2v6z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M21 20h2v2H1v-2h2V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v17zm-2 0V4H5v16h14zM8 11h3v2H8v-2zm0-4h3v2H8V7zm0 8h3v2H8v-2zm5 0h3v2h-3v-2zm0-4h3v2h-3v-2zm0-4h3v2h-3V7z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455zm-.692-2H20V5H4v13.385L5.763 17zM11 10h2v2h-2v-2zm-4 0h2v2H7v-2zm8 0h2v2h-2v-2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M9.4 16H3a2 2 0 0 1-2-2v-2.104a2 2 0 0 1 .15-.762L4.246 3.62A1 1 0 0 1 5.17 3H22a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-3.482a1 1 0 0 0-.817.423l-5.453 7.726a.5.5 0 0 1-.632.159L9.802 22.4a2.5 2.5 0 0 1-1.305-2.853L9.4 16zm7.6-2.588V5H5.84L3 11.896V14h6.4a2 2 0 0 1 1.938 2.493l-.903 3.548a.5.5 0 0 0 .261.571l.661.33 4.71-6.672c.25-.354.57-.644.933-.858zM19 13h2V5h-2v8z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M7 4v16h10V4H7zM6 2h12a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm6 15a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M15.396 10.58l.02-.249a32.392 32.392 0 0 0 .083-2.326c0-.87-.294-1.486-.914-2.063-.66-.614-1.459-.942-2.59-.942-1.137 0-1.958.335-2.51.888-.696.695-.958 1.218-.958 2.1 0 .521.061 1.994.096 2.618a2 2 0 0 1-.469 1.402c.055.098.105.204.153.317.3.771.198 1.543-.152 2.271-.392.818-.731 1.393-1.41 2.154a7.973 7.973 0 0 1-.642.643 1.999 1.999 0 0 1 .412.565 5.886 5.886 0 0 1 1.585.074c.81.146 1.324.434 2.194 1.061l.016.011.213.152c.619.44.877.546 1.473.546.609 0 .91-.121 1.523-.552l.207-.146c.876-.632 1.407-.928 2.231-1.076a6.664 6.664 0 0 1 1.559-.074 1.999 1.999 0 0 1 .417-.567 8.409 8.409 0 0 1-.616-.616 9.235 9.235 0 0 1-1.447-2.16c-.363-.749-.47-1.54-.137-2.321.04-.098.085-.19.132-.276a2 2 0 0 1-.469-1.435zm-10.315-.102c.419 0 .6.305 1.219.305.157 0 .26-.035.326-.066-.009-.156-.099-1.986-.099-2.729 0-1.688.72-2.69 1.543-3.514C8.893 3.65 10.175 3 11.996 3c1.82 0 3.066.653 3.952 1.478.886.825 1.551 1.93 1.551 3.528 0 1.555-.099 2.594-.108 2.716a.59.59 0 0 0 .279.065c.63 0 .63-.31 1.33-.31.685 0 .983.57.983.823 0 .621-.833.967-1.33 1.126-.369.117-.931.291-1.075.635-.074.174-.043.4.092.678.003.008 1.26 2.883 3.93 3.326.235.035.391.241.391.483 0 .332-.37.617-.726.782-.443.2-1.091.37-1.952.505-.043.078-.134.485-.235.887-.135.542-.801.366-.991.326A4.997 4.997 0 0 0 16.291 20c-.482.087-.913.378-1.395.726-.713.504-1.465 1.076-2.9 1.076-1.436 0-2.144-.572-2.857-1.076-.482-.348-.905-.637-1.396-.726-.898-.163-1.57.036-1.795.057-.226.02-.842.244-.996-.327-.045-.166-.191-.808-.235-.895-.856-.135-1.508-.313-1.952-.513-.365-.165-.726-.443-.726-.779 0-.235.158-.44.391-.482 2.644-.483 3.766-3.005 3.922-3.33.132-.276.161-.5.091-.679-.143-.343-.704-.513-1.073-.635-.105-.034-1.336-.373-1.336-1.117 0-.24.205-.573.582-.73a1.36 1.36 0 0 1 .465-.092z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M14 10.25L17 8v6l-3-2.25V14H7V8h7v2.25zM5.763 17H20V5H4v13.385L5.763 17zm.692 2L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6.455z"/>'},{svg:'<path d="M17 1L1.15533 8.23675C1.08581 8.2685 1.07616 8.36335 1.13788 8.40845L5.8 11.8154M17 1V19.8031C17 19.8849 16.9071 19.9321 16.841 19.8838L9.44214 14.477M17 1L5.8 11.8154M17 1L9.44214 14.477M5.8 11.8154L9.44214 14.477M5.8 11.8154L6.57033 17.5855C6.58178 17.6712 6.68936 17.703 6.74552 17.6372L9.44214 14.477" stroke="none"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M20 3v14a4 4 0 1 1-2-3.465V6H9v11a4 4 0 1 1-2-3.465V3h13z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 13.535V3h8v3h-6v11a4 4 0 1 1-2-3.465z"/>'},{svg:'<path fill="none" d="M0 0h24v24H0z"/><path d="M12 4a8 8 0 0 0-8 8h3a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7C2 6.477 6.477 2 12 2s10 4.477 10 10v7a2 2 0 0 1-2 2h-3a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h3a8 8 0 0 0-8-8zM4 14v5h3v-5H4zm13 0v5h3v-5h-3z"/>'}];var O=r(49549);const G=t=>a.qy` <cdtr-editor-container>
|
|
511
514
|
<cdtr-title><lang-text text="${t.title}"></lang-text></cdtr-title>
|
|
512
515
|
<cdtr-row style="padding:var(--add-padding-row)" justify="center">
|
|
513
|
-
${(0,
|
|
516
|
+
${(0,O.u)(N(),t=>t.svg,e=>{const r=(new DOMParser).parseFromString(`<svg\n width="30"\n height="30"\n xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 24 24">${e.svg}</svg>`,"text/xml").firstChild;return a.qy`<cdtr-col sm="3">
|
|
514
517
|
<paper-button style="min-width:0;padding:3px" @click=${()=>t.onChange(e)}>
|
|
515
518
|
${r}
|
|
516
519
|
</paper-button>
|
|
@@ -936,7 +939,7 @@ max-height: 90vh;max-width:500px;"
|
|
|
936
939
|
.iconColor=${t.iconColor??"000000"}
|
|
937
940
|
.iconSize=${"number"==typeof t.iconSize?t.iconSize:24}
|
|
938
941
|
@icon-selected=${t.onChange}
|
|
939
|
-
></icons-gallery>`;case"info":return U(t);case"svgpicker":return
|
|
942
|
+
></icons-gallery>`;case"info":return U(t);case"svgpicker":return G(t);case"gallery":return"ai-edit"===o.M.get("config","mode")?null:D(t);case"giphy":return a.qy`<giphy-picker
|
|
940
943
|
.selectedSrc=${t.selectedSrc||""}
|
|
941
944
|
@gif-selected=${t.onChange}
|
|
942
945
|
></giphy-picker>`;case"table":return J(t);case"accordion":return a.qy`<cdtr-accordion-item
|
|
@@ -945,7 +948,7 @@ max-height: 90vh;max-width:500px;"
|
|
|
945
948
|
.isOpen=${t.isOpen}
|
|
946
949
|
>
|
|
947
950
|
${t.children.map(t=>this.factory(t))}
|
|
948
|
-
</cdtr-accordion-item>`;case"imagePrompt":return document.createElement("cdtr-image-prompt-builder");case"spacingPicker":return ht(t)}}execCommandWrapper(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.components=[this.component],l.Ay.store().execCommand(t,e,r)}commandsBuilder(){return{tab:this.tabName,helpers:{Url:B.A,deepMerge:
|
|
951
|
+
</cdtr-accordion-item>`;case"imagePrompt":return document.createElement("cdtr-image-prompt-builder");case"spacingPicker":return ht(t)}}execCommandWrapper(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.components=[this.component],l.Ay.store().execCommand(t,e,r)}commandsBuilder(){return{tab:this.tabName,helpers:{Url:B.A,deepMerge:W()},commands:{execCommand:this.execCommandWrapper,injectEditor:o.M.get("injectEditor")}}}changeTab(t){this.tabName=t,this.editor=this.component.createEditor(this.commandsBuilder())}getColElementData(t){const e=t[0]?.closest("col");return e?{colElement:e,justifyValue:e.props.justify,alignItemsValue:e.props.alignItems,colElementRect:e.element.getBoundingClientRect()}:null}shouldShowDesignControls(t,e){const r=t[0]?.element.getBoundingClientRect(),a=t[0]?.type,o=e.find(t=>t.selected)?.text;let i=("design"===o||void 0===o)&&!["root","section","block","row","col"].includes(a);const n=this.getColElementData(t);return n&&n.colElementRect.width===r.width&&(i=!1),i}handleJustifyContent(t){const e=t.target.value,r=l.Ay.getSelectedComponent(),a=r[0]?.closest("col");a&&l.Ay.store().execCommand("justify",e,{find:"col"})}handleAlignItems(t){const e=t.target.value,r=l.Ay.getSelectedComponent(),a=r[0]?.closest("col");a&&l.Ay.store().execCommand("alignItems",e,{find:"col"})}renderJustifyAlignControls(t){return t?a.qy`${Q({value:t.justifyValue,onChange:this.handleJustifyContent})}
|
|
949
952
|
${Q({value:t.alignItemsValue,type:"alignItems",title:"alignItems",onChange:this.handleAlignItems})}`:null}createRenderRoot(){return this}render(){if(!this.editor)return;const t=l.Ay.getSelectedComponent(),e=this.editor?.tabs(this.tabName),r=this.getColElementData(t),o=this.shouldShowDesignControls(t,e);return a.qy`<cdtr-editor-tabs
|
|
950
953
|
.value=${this.tabName}
|
|
951
954
|
@tabChanged=${t=>this.changeTab(t.target.value)}
|
|
@@ -968,7 +971,7 @@ max-height: 90vh;max-width:500px;"
|
|
|
968
971
|
background: BLACK;
|
|
969
972
|
color: #fff;
|
|
970
973
|
}
|
|
971
|
-
`,ut.properties={type:{type:String},editor:{},tabName:{type:String},tabs:{type:Array}},customElements.define("cdtr-editor-builder",ut)},92384(t,e,r){r.r(e),r.d(e,{FontFamilyEditor:()=>
|
|
974
|
+
`,ut.properties={type:{type:String},editor:{},tabName:{type:String},tabs:{type:Array}},customElements.define("cdtr-editor-builder",ut)},92384(t,e,r){r.r(e),r.d(e,{FONT_WEIGHTS:()=>n,FontFamilyEditor:()=>s});var a=r(59929),o=r(40120),i=r(86319);const n=[{name:"Thin",value:100},{name:"Light",value:300},{name:"Regular",value:400},{name:"Medium",value:500},{name:"SemiBold",value:600},{name:"Bold",value:700},{name:"Black",value:900}];class s extends a.WF{constructor(){super(),this.onchangeFontWeight=t=>{const e=parseInt(t.target.value,10);Number.isNaN(e)||(this.weight=e,this.dispatchEvent(new CustomEvent("weightchange",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e}})))},this.onchangeFontFamily=t=>{const e=t.target.value,r=this.fontFamilies.find(t=>t.name===e);if(!r)return void console.error("cant set font family, font family not founded..");(0,o.sw)(r),this.value=r.cssRule,this.name=e;const a=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(a)},this.onFilteredFonts=t=>{const e=t.target.value;this.filteredFonts=this.fontFamilies.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))},this.filteredFonts=[],this.fontFamilies=[],this.showWeight=!1}connectedCallback(){super.connectedCallback();const t=i.M.get("config","editor","configure","editorProps","fonts"),e=Array.isArray(t)?t:[];this.filteredFonts=this.fontFamilies=e,e.forEach(t=>{t&&t.url&&t.id&&function(t){if(document.getElementById(t.id))return;const e=document.createElement("link");e.href=t.url,e.id=t.id,e.setAttribute("data-name",t.name),e.rel="stylesheet",e.type="text/css",document.head.appendChild(e)}(t)})}disconnectedCallback(){super.disconnectedCallback()}render(){const t=this.fontFamilies.find(t=>"string"==typeof t?.cssRule&&(-1!==t.cssRule.indexOf(this.value||"")||-1!==t.cssRule.indexOf(this.name||"")));t&&(this.name=t.name);const e=a.qy`<cdtr-dropdown
|
|
972
975
|
style="width:100%"
|
|
973
976
|
.value="${this.name}"
|
|
974
977
|
@change=${this.onchangeFontFamily}
|
|
@@ -1009,8 +1012,40 @@ max-height: 90vh;max-width:500px;"
|
|
|
1009
1012
|
</cdtr-col>
|
|
1010
1013
|
</cdtr-row>
|
|
1011
1014
|
</cdtr-editor-container>
|
|
1012
|
-
|
|
1015
|
+
`,o=n.find(t=>String(t.value)===String(this.weight))||n.find(t=>400===t.value),s=a.qy`<cdtr-dropdown
|
|
1016
|
+
style="width:100%"
|
|
1017
|
+
.value="${String(o?.value)}"
|
|
1018
|
+
@change=${this.onchangeFontWeight}
|
|
1019
|
+
>
|
|
1020
|
+
<cdtr-dropdown-button
|
|
1021
|
+
minWidth=${100}
|
|
1022
|
+
class="dropdown-button"
|
|
1023
|
+
slot="trigger"
|
|
1024
|
+
>${o?.value}
|
|
1025
|
+
</cdtr-dropdown-button>
|
|
1026
|
+
<div slot="content">
|
|
1027
|
+
${n.map(t=>a.qy`<cdtr-dropdown-item
|
|
1028
|
+
.focused=${String(t.value)===String(o?.value)}
|
|
1029
|
+
.selected=${String(t.value)===String(o?.value)}
|
|
1030
|
+
value="${t.value}"
|
|
1031
|
+
><span style="font-weight:${t.value};">${t.value}</span>
|
|
1032
|
+
</cdtr-dropdown-item>`)}
|
|
1033
|
+
</div>
|
|
1034
|
+
</cdtr-dropdown>`,l=a.qy`
|
|
1035
|
+
<cdtr-editor-container>
|
|
1036
|
+
<cdtr-row alignItems="center" justify="space-between">
|
|
1037
|
+
<cdtr-title pb="0" style="display:block" class="align-lang"
|
|
1038
|
+
><lang-text text="fontWeight"></lang-text
|
|
1039
|
+
></cdtr-title>
|
|
1040
|
+
<cdtr-col sm="12">
|
|
1041
|
+
<cdtr-row alignItems="center" justify="flex-end">
|
|
1042
|
+
${s}
|
|
1043
|
+
</cdtr-row>
|
|
1044
|
+
</cdtr-col>
|
|
1045
|
+
</cdtr-row>
|
|
1046
|
+
</cdtr-editor-container>
|
|
1047
|
+
`;return this.light?this.showWeight?a.qy`${e}${s}`:e:this.showWeight?a.qy`${r}${l}`:r}}s.properties={value:{type:String},name:{type:String},fontFamilies:{type:Array},filteredFonts:{type:Array},isOpen:{type:Boolean},light:{type:Boolean},showWeight:{type:Boolean,attribute:!1},weight:{}},s.styles=a.AH`
|
|
1013
1048
|
.dropdown-button {
|
|
1014
1049
|
min-width: 100px;
|
|
1015
1050
|
}
|
|
1016
|
-
`,customElements.define("cdtr-font-family-editor",n)},74726(t,e,r){function a(t){try{return function(t){const e=t.split(/ (?![^(]*\))/);let r="",a=0,o=0,i=0,n=0,s=!1;for(let t of e)t=t.trim(),"inset"===t?s=!0:t.endsWith("px")||t.endsWith("em")?0===o?o=parseFloat(t):0===a?a=parseFloat(t):0===i?i=parseFloat(t):0===n&&(n=parseFloat(t)):(t.includes("rgb")||t.includes("#"))&&(r=t);return[{color:r,offsetY:a,offsetX:o,blurRadius:i,spreadRadius:n,inset:s}]}(t)}catch(t){console.error(t)}}r.d(e,{A:()=>a})},13681(t,e,r){r.d(e,{vP:()=>c});const a=window.cdtrSignalKey||`___${Math.random().toString(36).substr(2,9)}`;window.cdtrSignalKey=a,window[a]||(window[a]={});const o=window[a],i=window.__cdtrEvents||{};function n(t){return crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t)).then(t=>Array.from(new Uint8Array(t)).map(t=>t.toString(16).padStart(2,"0")).join(""))}function s(t){if(t.length%2!=0)throw new Error("Invalid hex string");const e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)e[r/2]=parseInt(t.substr(r,2),16);return e}async function l(t){const e=await n(t),r=o[e];if(r){const t=await crypto.subtle.importKey("raw",s(e),{name:"AES-GCM"},!1,["encrypt","decrypt"]),a=await async function(t,e,r){const a=await crypto.subtle.decrypt({name:"AES-GCM",iv:e},t,r);return(new TextDecoder).decode(a)}(t,r.iv,r.encrypted);return JSON.parse(a)}return null}function d(t,e){if(i[t])for(const r in i[t])Object.prototype.hasOwnProperty.call(i[t],r)&&i[t][r].forEach(t=>t(e));Array.isArray(i["*"])&&i["*"].forEach(t=>t(e))}window.__cdtrEvents=i;const c={set:async function(t,e){const r=JSON.parse(JSON.stringify(e)),a=await n(t),l=await crypto.subtle.importKey("raw",s(a),{name:"AES-GCM"},!1,["encrypt","decrypt"]),c=await async function(t,e){const r=crypto.getRandomValues(new Uint8Array(12)),a=(new TextEncoder).encode(e),o=await crypto.subtle.encrypt({name:"AES-GCM",iv:r},t,a);return{iv:r,encrypted:new Uint8Array(o)}}(l,JSON.stringify(r));o[a]=c,i.set&&i.set[a]&&i.set[a].forEach(t=>t(r)),Array.isArray(i["*"])&&i["*"].forEach(t=>t(r)),d(t,r)},get:l,remove:async function(t){const e=await n(t);delete o[e]},on:async function(t,e,r){i[t]||(i[t]={});const a=await n(e);i[t][a]||(i[t][a]=[]),i[t][a].push(t=>{!function(){const t=(new Error).stack;if(t&&t.indexOf(" at <anonymous>:1")>-1)throw console.warn("Function call blocked: Detected console execution."),new Error("Function call blocked: Detected console execution.")}(),r(t)});const o=await l(e);return o&&r(o),a},off:function(t,e){i[t]&&i[t][e]&&delete i[t][e]},dispatch:d,OPTIONS:{SET:"set"}}},88385(t,e,r){r.d(e,{A:()=>s});const a=t=>!(!t||!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),o=t=>!(!t||!t.replace("-","").match(/^[+]*[(]{0,1}[0-9]{9,9}[)]{0,1}[-\s\./0-9]*$/g)&&!t.match(/[0-9]{3}-[0-9]{3}-[0-9]{4}/));function i(t){const e={},r=/([^&=]+)=?([^&]*)/g,a=t=>{try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t.replace(/\+/g," ")}},o=t.indexOf("?");let i,n=-1!==o?t.substring(o+1):"";for(;null!==(i=r.exec(n));){const t=a(i[1]),r=a(i[2]);t&&(e[t]=r)}return e}function n(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],encodeURIComponent(e).replace(/%24/g,"$")}class s{static getProtocol(t){if(!t)return"";const e=t.indexOf(":");return e>0?t.slice(0,e):""}constructor(t,e){if(this.protocol="",this.href="",this.fullHref="",this.target="_self",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.url="",this.isValid=!0,this.params={},"string"==typeof t?this.href=t:t&&"object"==typeof t&&Object.assign(this,t),/^\[\[[^\]]+\]\]\?/.test(this.href)){const t=this.href;this.isValid=!1,this.protocol=e?.protocol??"",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.params={...this.params,...e?.params,...i(t)};const r=t.indexOf("?");return this.url=r>-1?t.slice(0,r):t,this.href=t,void(this.fullHref=t)}this.isValid=this.isValidUrl(this.href),this.protocol=e?.protocol??s.getProtocol(this.href);const r=function(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],e}(this.href);if(this.isEmail=a(r),this.isPhone=o(r),this.protocol||(this.isEmail?this.protocol="mailto:":this.isPhone?this.protocol="tel:":this.isValid&&(this.protocol="https:")),this.isAnchor=this.href.startsWith("#"),e?.target){if(!["_blank","_self","_parent","_top"].includes(e.target))throw new Error(`Url: invalid target "${e.target}"`);this.target=e.target}this.params={...this.params,...e?.params,...i(this.href)},this.url=n(this.href),this.protocol&&!this.protocol.endsWith(":")&&(this.protocol+=":");const l="http:"===this.protocol||"https:"===this.protocol;this.href=l?`${this.protocol}//${this.url}`:this.protocol+this.url,this.fullHref=this.getUrlWithParams(),this.href=this.getUrlWithParams()}addParam(t,e){this.href=this.href.replace(new RegExp(`${t}=[^&]*`),`${t}=${e}`),this.params[t]=e}getUrlWithParams(){let t,e="";try{t=decodeURIComponent(this.url)}catch(e){t=this.url}if(Object.keys(this.params).length>0){t+="?",e="?";for(const r in this.params){const a=this.params[r],o=encodeURIComponent(r).replace(/%24/g,"$");if(a){const r=encodeURIComponent(a).replace(/%24/g,"$");t+=`${o}=${r}&`,e+=`${o}=${r}&`}else t+=`${o}&`,e+=`${o}&`}t=t.slice(0,-1)}const r=t=>{try{return decodeURIComponent(t)}catch{return t}};if(this.protocol&&("http:"===this.protocol||"https:"===this.protocol))return r(this.protocol+"//"+t);if("whatsapp:"===this.protocol){const a=this.extractPhoneFromTextUsingRegex(t);return a.length>0?r("https://wa.me/"+a[0]+e):r("https://wa.me/"+e)}return r(this.protocol+t)}extractPhoneFromTextUsingRegex(t){if(!t)return[];const e=[...t.matchAll(/(?:whatsapp:([^?\s]+)|\+?[\d\s\-\(\)\.]{7,20})/g)];return Array.from(new Set(e.map(t=>t[1]||t[0]).filter(t=>{const e=t.replace(/\D/g,"");return e.length>=7&&e.length<=15}).map(t=>t.trim())))}isValidUrl(t){if(!t)return!1;return/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/.test(t)}}s.resetURL=n},50742(t,e,r){r.d(e,{P:()=>a});const a=[{rule:"rgba(149, 157, 165, 0.2) 0px 8px 24px;"},{rule:"rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;"},{rule:"rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;"},{rule:"rgba(0, 0, 0, 0.35) 0px 5px 15px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px;"},{rule:"rgba(0, 0, 0, 0.24) 0px 3px 8px;"},{rule:"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px, rgb(51, 51, 51) 0px 0px 0px 3px;"},{rule:"rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 12px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;"},{rule:"rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;"},{rule:"rgb(38, 57, 77) 0px 20px 30px -10px;"},{rule:"rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;"},{rule:"rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px;"},{rule:"rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;"},{rule:"rgba(0, 0, 0, 0.06) 0px 2px 4px 0px inset;"},{rule:"rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;"},{rule:"rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px;"},{rule:"rgba(0, 0, 0, 0.09) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;"},{rule:"rgba(0, 0, 0, 0.2) 0px 18px 50px -10px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 50px;"},{rule:"rgba(240, 46, 170, 0.4) -5px 5px, rgba(240, 46, 170, 0.3) -10px 10px, rgba(240, 46, 170, 0.2) -15px 15px, rgba(240, 46, 170, 0.1) -20px 20px, rgba(240, 46, 170, 0.05) -25px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 0px 5px, rgba(240, 46, 170, 0.3) 0px 10px, rgba(240, 46, 170, 0.2) 0px 15px, rgba(240, 46, 170, 0.1) 0px 20px, rgba(240, 46, 170, 0.05) 0px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 5px 5px, rgba(240, 46, 170, 0.3) 10px 10px, rgba(240, 46, 170, 0.2) 15px 15px, rgba(240, 46, 170, 0.1) 20px 20px, rgba(240, 46, 170, 0.05) 25px 25px;"}]}}]);
|
|
1051
|
+
`,customElements.define("cdtr-font-family-editor",s)},74726(t,e,r){function a(t){try{return function(t){const e=t.split(/ (?![^(]*\))/);let r="",a=0,o=0,i=0,n=0,s=!1;for(let t of e)t=t.trim(),"inset"===t?s=!0:t.endsWith("px")||t.endsWith("em")?0===o?o=parseFloat(t):0===a?a=parseFloat(t):0===i?i=parseFloat(t):0===n&&(n=parseFloat(t)):(t.includes("rgb")||t.includes("#"))&&(r=t);return[{color:r,offsetY:a,offsetX:o,blurRadius:i,spreadRadius:n,inset:s}]}(t)}catch(t){console.error(t)}}r.d(e,{A:()=>a})},13681(t,e,r){r.d(e,{vP:()=>c});const a=window.cdtrSignalKey||`___${Math.random().toString(36).substr(2,9)}`;window.cdtrSignalKey=a,window[a]||(window[a]={});const o=window[a],i=window.__cdtrEvents||{};function n(t){return crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t)).then(t=>Array.from(new Uint8Array(t)).map(t=>t.toString(16).padStart(2,"0")).join(""))}function s(t){if(t.length%2!=0)throw new Error("Invalid hex string");const e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)e[r/2]=parseInt(t.substr(r,2),16);return e}async function l(t){const e=await n(t),r=o[e];if(r){const t=await crypto.subtle.importKey("raw",s(e),{name:"AES-GCM"},!1,["encrypt","decrypt"]),a=await async function(t,e,r){const a=await crypto.subtle.decrypt({name:"AES-GCM",iv:e},t,r);return(new TextDecoder).decode(a)}(t,r.iv,r.encrypted);return JSON.parse(a)}return null}function d(t,e){if(i[t])for(const r in i[t])Object.prototype.hasOwnProperty.call(i[t],r)&&i[t][r].forEach(t=>t(e));Array.isArray(i["*"])&&i["*"].forEach(t=>t(e))}window.__cdtrEvents=i;const c={set:async function(t,e){const r=JSON.parse(JSON.stringify(e)),a=await n(t),l=await crypto.subtle.importKey("raw",s(a),{name:"AES-GCM"},!1,["encrypt","decrypt"]),c=await async function(t,e){const r=crypto.getRandomValues(new Uint8Array(12)),a=(new TextEncoder).encode(e),o=await crypto.subtle.encrypt({name:"AES-GCM",iv:r},t,a);return{iv:r,encrypted:new Uint8Array(o)}}(l,JSON.stringify(r));o[a]=c,i.set&&i.set[a]&&i.set[a].forEach(t=>t(r)),Array.isArray(i["*"])&&i["*"].forEach(t=>t(r)),d(t,r)},get:l,remove:async function(t){const e=await n(t);delete o[e]},on:async function(t,e,r){i[t]||(i[t]={});const a=await n(e);i[t][a]||(i[t][a]=[]),i[t][a].push(t=>{!function(){const t=(new Error).stack;if(t&&t.indexOf(" at <anonymous>:1")>-1)throw console.warn("Function call blocked: Detected console execution."),new Error("Function call blocked: Detected console execution.")}(),r(t)});const o=await l(e);return o&&r(o),a},off:function(t,e){i[t]&&i[t][e]&&delete i[t][e]},dispatch:d,OPTIONS:{SET:"set"}}},88385(t,e,r){r.d(e,{A:()=>s});const a=t=>!(!t||!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),o=t=>!(!t||!t.replace("-","").match(/^[+]*[(]{0,1}[0-9]{9,9}[)]{0,1}[-\s\./0-9]*$/g)&&!t.match(/[0-9]{3}-[0-9]{3}-[0-9]{4}/));function i(t){const e={},r=/([^&=]+)=?([^&]*)/g,a=t=>{try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t.replace(/\+/g," ")}},o=t.indexOf("?");let i,n=-1!==o?t.substring(o+1):"";for(;null!==(i=r.exec(n));){const t=a(i[1]),r=a(i[2]);t&&(e[t]=r)}return e}function n(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],encodeURIComponent(e).replace(/%24/g,"$")}class s{static getProtocol(t){if(!t)return"";const e=t.indexOf(":");return e>0?t.slice(0,e):""}constructor(t,e){if(this.protocol="",this.href="",this.fullHref="",this.target="_self",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.url="",this.isValid=!0,this.params={},"string"==typeof t?this.href=t:t&&"object"==typeof t&&Object.assign(this,t),/^\[\[[^\]]+\]\]\?/.test(this.href)){const t=this.href;this.isValid=!1,this.protocol=e?.protocol??"",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.params={...this.params,...e?.params,...i(t)};const r=t.indexOf("?");return this.url=r>-1?t.slice(0,r):t,this.href=t,void(this.fullHref=t)}this.isValid=this.isValidUrl(this.href),this.protocol=e?.protocol??s.getProtocol(this.href);const r=function(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],e}(this.href);if(this.isEmail=a(r),this.isPhone=o(r),this.protocol||(this.isEmail?this.protocol="mailto:":this.isPhone?this.protocol="tel:":this.isValid&&(this.protocol="https:")),this.isAnchor=this.href.startsWith("#"),e?.target){if(!["_blank","_self","_parent","_top"].includes(e.target))throw new Error(`Url: invalid target "${e.target}"`);this.target=e.target}this.params={...this.params,...e?.params,...i(this.href)},this.url=n(this.href),this.protocol&&!this.protocol.endsWith(":")&&(this.protocol+=":");const l="http:"===this.protocol||"https:"===this.protocol;this.href=l?`${this.protocol}//${this.url}`:this.protocol+this.url,this.fullHref=this.getUrlWithParams(),this.href=this.getUrlWithParams()}addParam(t,e){this.href=this.href.replace(new RegExp(`${t}=[^&]*`),`${t}=${e}`),this.params[t]=e}getUrlWithParams(){let t,e="";try{t=decodeURIComponent(this.url)}catch(e){t=this.url}if(Object.keys(this.params).length>0){t+="?",e="?";for(const r in this.params){const a=this.params[r],o=encodeURIComponent(r).replace(/%24/g,"$");if(a){const r=encodeURIComponent(a).replace(/%24/g,"$");t+=`${o}=${r}&`,e+=`${o}=${r}&`}else t+=`${o}&`,e+=`${o}&`}t=t.slice(0,-1)}const r=t=>{try{return decodeURIComponent(t)}catch{return t}};if(this.protocol&&("http:"===this.protocol||"https:"===this.protocol))return r(this.protocol+"//"+t);if("whatsapp:"===this.protocol){const a=this.extractPhoneFromTextUsingRegex(t);return a.length>0?r("https://wa.me/"+a[0]+e):r("https://wa.me/"+e)}return r(this.protocol+t)}extractPhoneFromTextUsingRegex(t){if(!t)return[];const e=[...t.matchAll(/(?:whatsapp:([^?\s]+)|\+?[\d\s\-\(\)\.]{7,20})/g)];return Array.from(new Set(e.map(t=>t[1]||t[0]).filter(t=>{const e=t.replace(/\D/g,"");return e.length>=7&&e.length<=15}).map(t=>t.trim())))}isValidUrl(t){if(!t)return!1;return/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/.test(t)}}s.resetURL=n},50742(t,e,r){r.d(e,{P:()=>a});const a=[{rule:"rgba(149, 157, 165, 0.2) 0px 8px 24px;"},{rule:"rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;"},{rule:"rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;"},{rule:"rgba(0, 0, 0, 0.35) 0px 5px 15px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px;"},{rule:"rgba(0, 0, 0, 0.24) 0px 3px 8px;"},{rule:"rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 1px 4px, rgb(51, 51, 51) 0px 0px 0px 3px;"},{rule:"rgba(0, 0, 0, 0.02) 0px 1px 3px 0px, rgba(27, 31, 35, 0.15) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 12px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px, rgba(10, 37, 64, 0.35) 0px -2px 6px 0px inset;"},{rule:"rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;"},{rule:"rgb(38, 57, 77) 0px 20px 30px -10px;"},{rule:"rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px;"},{rule:"rgba(50, 50, 93, 0.25) 0px 30px 60px -12px inset, rgba(0, 0, 0, 0.3) 0px 18px 36px -18px inset;"},{rule:"rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;"},{rule:"rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;"},{rule:"rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;"},{rule:"rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px;"},{rule:"rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;"},{rule:"rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;"},{rule:"rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;"},{rule:"rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;"},{rule:"rgba(0, 0, 0, 0.06) 0px 2px 4px 0px inset;"},{rule:"rgba(0, 0, 0, 0.1) 0px 0px 5px 0px, rgba(0, 0, 0, 0.1) 0px 0px 1px 0px;"},{rule:"rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px;"},{rule:"rgba(0, 0, 0, 0.09) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;"},{rule:"rgba(0, 0, 0, 0.2) 0px 18px 50px -10px;"},{rule:"rgba(0, 0, 0, 0.1) 0px 10px 50px;"},{rule:"rgba(240, 46, 170, 0.4) -5px 5px, rgba(240, 46, 170, 0.3) -10px 10px, rgba(240, 46, 170, 0.2) -15px 15px, rgba(240, 46, 170, 0.1) -20px 20px, rgba(240, 46, 170, 0.05) -25px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 0px 5px, rgba(240, 46, 170, 0.3) 0px 10px, rgba(240, 46, 170, 0.2) 0px 15px, rgba(240, 46, 170, 0.1) 0px 20px, rgba(240, 46, 170, 0.05) 0px 25px;"},{rule:"rgba(240, 46, 170, 0.4) 5px 5px, rgba(240, 46, 170, 0.3) 10px 10px, rgba(240, 46, 170, 0.2) 15px 15px, rgba(240, 46, 170, 0.1) 20px 20px, rgba(240, 46, 170, 0.05) 25px 25px;"}]}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2384],{92384(t,e,n){n.r(e),n.d(e,{FontFamilyEditor:()=>r});var i=n(59929),
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2384],{92384(t,e,n){n.r(e),n.d(e,{FONT_WEIGHTS:()=>s,FontFamilyEditor:()=>r});var i=n(59929),o=n(40120),a=n(86319);const s=[{name:"Thin",value:100},{name:"Light",value:300},{name:"Regular",value:400},{name:"Medium",value:500},{name:"SemiBold",value:600},{name:"Bold",value:700},{name:"Black",value:900}];class r extends i.WF{constructor(){super(),this.onchangeFontWeight=t=>{const e=parseInt(t.target.value,10);Number.isNaN(e)||(this.weight=e,this.dispatchEvent(new CustomEvent("weightchange",{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e}})))},this.onchangeFontFamily=t=>{const e=t.target.value,n=this.fontFamilies.find(t=>t.name===e);if(!n)return void console.error("cant set font family, font family not founded..");(0,o.sw)(n),this.value=n.cssRule,this.name=e;const i=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(i)},this.onFilteredFonts=t=>{const e=t.target.value;this.filteredFonts=this.fontFamilies.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))},this.filteredFonts=[],this.fontFamilies=[],this.showWeight=!1}connectedCallback(){super.connectedCallback();const t=a.M.get("config","editor","configure","editorProps","fonts"),e=Array.isArray(t)?t:[];this.filteredFonts=this.fontFamilies=e,e.forEach(t=>{t&&t.url&&t.id&&function(t){if(document.getElementById(t.id))return;const e=document.createElement("link");e.href=t.url,e.id=t.id,e.setAttribute("data-name",t.name),e.rel="stylesheet",e.type="text/css",document.head.appendChild(e)}(t)})}disconnectedCallback(){super.disconnectedCallback()}render(){const t=this.fontFamilies.find(t=>"string"==typeof t?.cssRule&&(-1!==t.cssRule.indexOf(this.value||"")||-1!==t.cssRule.indexOf(this.name||"")));t&&(this.name=t.name);const e=i.qy`<cdtr-dropdown
|
|
2
2
|
style="width:100%"
|
|
3
3
|
.value="${this.name}"
|
|
4
4
|
@change=${this.onchangeFontFamily}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</cdtr-dropdown-button>
|
|
12
12
|
<div slot="content">
|
|
13
13
|
<cdtr-input
|
|
14
|
-
.placeholder="${
|
|
14
|
+
.placeholder="${a.M.get("lang","search")}.."
|
|
15
15
|
@input=${this.onFilteredFonts}
|
|
16
16
|
type="search"
|
|
17
17
|
></cdtr-input>
|
|
@@ -39,7 +39,39 @@
|
|
|
39
39
|
</cdtr-col>
|
|
40
40
|
</cdtr-row>
|
|
41
41
|
</cdtr-editor-container>
|
|
42
|
-
|
|
42
|
+
`,o=s.find(t=>String(t.value)===String(this.weight))||s.find(t=>400===t.value),r=i.qy`<cdtr-dropdown
|
|
43
|
+
style="width:100%"
|
|
44
|
+
.value="${String(o?.value)}"
|
|
45
|
+
@change=${this.onchangeFontWeight}
|
|
46
|
+
>
|
|
47
|
+
<cdtr-dropdown-button
|
|
48
|
+
minWidth=${100}
|
|
49
|
+
class="dropdown-button"
|
|
50
|
+
slot="trigger"
|
|
51
|
+
>${o?.value}
|
|
52
|
+
</cdtr-dropdown-button>
|
|
53
|
+
<div slot="content">
|
|
54
|
+
${s.map(t=>i.qy`<cdtr-dropdown-item
|
|
55
|
+
.focused=${String(t.value)===String(o?.value)}
|
|
56
|
+
.selected=${String(t.value)===String(o?.value)}
|
|
57
|
+
value="${t.value}"
|
|
58
|
+
><span style="font-weight:${t.value};">${t.value}</span>
|
|
59
|
+
</cdtr-dropdown-item>`)}
|
|
60
|
+
</div>
|
|
61
|
+
</cdtr-dropdown>`,d=i.qy`
|
|
62
|
+
<cdtr-editor-container>
|
|
63
|
+
<cdtr-row alignItems="center" justify="space-between">
|
|
64
|
+
<cdtr-title pb="0" style="display:block" class="align-lang"
|
|
65
|
+
><lang-text text="fontWeight"></lang-text
|
|
66
|
+
></cdtr-title>
|
|
67
|
+
<cdtr-col sm="12">
|
|
68
|
+
<cdtr-row alignItems="center" justify="flex-end">
|
|
69
|
+
${r}
|
|
70
|
+
</cdtr-row>
|
|
71
|
+
</cdtr-col>
|
|
72
|
+
</cdtr-row>
|
|
73
|
+
</cdtr-editor-container>
|
|
74
|
+
`;return this.light?this.showWeight?i.qy`${e}${r}`:e:this.showWeight?i.qy`${n}${d}`:n}}r.properties={value:{type:String},name:{type:String},fontFamilies:{type:Array},filteredFonts:{type:Array},isOpen:{type:Boolean},light:{type:Boolean},showWeight:{type:Boolean,attribute:!1},weight:{}},r.styles=i.AH`
|
|
43
75
|
.dropdown-button {
|
|
44
76
|
min-width: 100px;
|
|
45
77
|
}
|
|
Binary file
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2438],{22438(t,e,i){i.r(e),i.d(e,{NextButton:()=>r});var
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2438],{22438(t,e,i){i.r(e),i.d(e,{NextButton:()=>r});var n=i(59929),o=i(86319),s=i(93432);class r extends n.WF{constructor(){super(),this.channel="",this.isLoading=!1,this.isLocked=!1,this.lockTimer=null}connectedCallback(){super.connectedCallback(),this.onNextStep||(this.onNextStep=o.M.get("config","onNextStep")),this.channel||(this.channel=o.M.get("config","channel")||"")}disconnectedCallback(){super.disconnectedCallback(),this.clearTimers()}clearTimers(){this.lockTimer&&(clearTimeout(this.lockTimer),this.lockTimer=null)}async handleClick(){if(!this.isLocked&&!this.isLoading){this.isLoading=!0,this.isLocked=!0,this.lockTimer=setTimeout(()=>{this.clearTimers(),this.isLoading=!1,this.isLocked=!1},1e4);try{"function"==typeof this.onNextStep&&await this.onNextStep({toHTML:s.FE,toJSON:s.U2})}catch(t){console.error("Error in onNextStep:",t)}}}render(){if(!this.onNextStep)return null;const t="web"===this.channel?"publish":"next";return n.qy`
|
|
2
2
|
<paper-button
|
|
3
3
|
@click=${this.handleClick}
|
|
4
4
|
class="next-button"
|
|
5
5
|
?disabled=${this.isLocked}
|
|
6
6
|
>
|
|
7
|
-
${this.isLoading?
|
|
7
|
+
${this.isLoading?n.qy`
|
|
8
8
|
<div class="loading-spinner"></div>
|
|
9
|
-
`:
|
|
9
|
+
`:n.qy`
|
|
10
10
|
<div class="button-content ${this.isLoading?"loading":""}">
|
|
11
|
-
<lang-text text
|
|
11
|
+
<lang-text text=${t}></lang-text>
|
|
12
12
|
</div>
|
|
13
13
|
`}
|
|
14
14
|
</paper-button>
|
|
15
|
-
|
|
15
|
+
`}}r.styles=n.AH`
|
|
16
16
|
:host {
|
|
17
17
|
display: block;
|
|
18
18
|
}
|
|
@@ -64,4 +64,4 @@
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
`,r.properties={onNextStep:{type:Function},isLoading:{type:Boolean},isLocked:{type:Boolean},lockTimer:{type:Number}},customElements.define("cdtr-next-button",r)}}]);
|
|
67
|
+
`,r.properties={onNextStep:{type:Function},channel:{type:String},isLoading:{type:Boolean},isLocked:{type:Boolean},lockTimer:{type:Number}},customElements.define("cdtr-next-button",r)}}]);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4739],{54739(e,t,n){n.d(t,{default:()=>k});var o=n(86319);function i(){const e="undefined"!=typeof window&&window.location.hostname||"";return/^(localhost|127\.0\.0\.1|0\.0\.0\.0|\[::1\])$/.test(e)}function a(){const e=o.M.get("config","mcpUrl");if("string"==typeof e&&e)return e;return`${i()?"http://localhost:3000":"https://api.creaditor.ai"}/v1/mcp`}const r="https://claude.ai/settings/connectors";function c(){const e="undefined"!=typeof window?window.open("about:blank","_blank"):null,t=t=>{e?e.location=t:"undefined"!=typeof window&&window.open(t,"_blank","noopener,noreferrer")};(async function(){const e=o.M.get("editor");if(!e)return null;if("function"==typeof e.studioTokenProvider)try{const t=await e.studioTokenProvider({});if("string"==typeof t&&t)return t}catch(e){}return"string"==typeof e.studioToken&&e.studioToken?e.studioToken:null})().then(async e=>{if(!e)return t(r);const n=await fetch(`${a().replace(/\/v1\/mcp\/?$/,"")}/oauth/connect/ticket`,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!n.ok)return t(r);const{sessionUrl:o}=await n.json();t(o||r)}).catch(()=>t(r))}function s(e,t){return o.M.get("lang",e)||t}function l(e,t,n){const o=()=>{return e=t,o=n,void("undefined"!=typeof window&&"function"==typeof window.snackbar&&window.snackbar({text:s(e,o)}));var e,o};"undefined"!=typeof navigator&&navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e).then(o).catch(()=>d(e,o)):d(e,o)}function d(e,t){try{const n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.focus(),n.select(),document.execCommand("copy"),document.body.removeChild(n),t()}catch{}}const A=e=>{const{component:t,commands:n}=e,r=t.id;return{select:e=>{let{changeTab:t,tab:n}=e;n.text||t("ai")},tabs:e=>{const t=[{text:"ai",selected:!0},{text:"design"},{text:"settings"}];return e?(t.forEach(t=>t.selected=t.text===e),t):t},layout:e=>{let{tab:s}=e;const d=()=>"ai"===s.text;return[{type:"info",text:"ai_connect_intro",active:d},{type:"button",text:"ai_connect_btn",bgColor:"#6c47ff",color:"#ffffff",active:d,onClick:()=>{l(a(),"ai_connect_link_copied","Connection link copied — paste it in Claude's connector settings."),c()}},{type:"info",text:"ai_connect_localhost_note",active:()=>d()&&i()},{type:"input",title:"ai_connect_url_label",active:d,value:a(),onChange:e=>{e&&e.target&&(e.target.value=a())}},{type:"button",text:"ai_connect_prompt_btn",active:d,onClick:()=>{l(function(e){const t=o.M.get("app"),n=t&&t._id,i=n?`the AI element with id \`${e}\` on site \`${n}\``:`the AI element with id \`${e}\``;return[`Connect to my Creaditor site builder via its MCP connector at ${a()}.`,"",`Then use the write_element_html tool to build a complete, modern, responsive landing page into ${i}.`,"","If you're not sure what the page should be about, ask me first."].join("\n")}(r),"ai_connect_prompt_copied","Prompt copied — paste it into a Claude chat.")}},{type:"input",title:"elementId",active:d,value:r,onChange:()=>{}},{type:"slider",title:"height",min:200,max:2400,active:()=>"design"===s.text,value:parseInt(t.props.style?.height,10)||900,onInput:e=>{const t=e.target.value;n.execCommand("style",{height:t+"px"})}}]}}},p=e=>{let{helpers:t}=e;return{set:(e,n,o)=>{switch(n){case"style":return e[n]=t.deepMerge(e[n],o),!0;case"html":return e[n]=o,!0;default:return!1}}}};var u=n(72591),h=n.n(u),m=n(88639),f=n.n(m),g=n(88128),C=n.n(g),y=n(30855),b=n.n(y),E=n(93051),v=n.n(E),w=n(79646),B={};B.setAttributes=b(),B.insert=C().bind(null,"head"),B.domAPI=f(),B.insertStyleElement=v();h()(w.A,B);const x=w.A&&w.A.locals?w.A.locals:void 0,k=()=>({name:"ai",create:e=>{const{createElement:t,compose:n,helpers:o}=e,{arrayToString:i,mergeDiff:a}=o,r=document.createElement("div");r.setAttribute("data-id",n.id),r.setAttribute("draggable-element","element"),r.setAttribute("droppable-element","element"),r.className=i("ai-component",x.main);const c=document.createElement("div");c.style.cssText="position:relative;max-width:100%;height:100%;width:100%;",r.appendChild(c);const s=document.createElement("iframe");s.style.cssText="width:100%;height:100%;border:none;display:block;",c.appendChild(s);const l=document.createElement("div");l.className=x.emptyAiHolder;const d=document.createElement("h1");d.setAttribute("align","center");const u=document.createElement("lang-text");u.setAttribute("text","ai_element_empty_connect_claude"),d.appendChild(u),l.appendChild(d),c.appendChild(l);return t({name:"ai",id:n.id,template:r,defaultProps:{style:{display:"block",width:"100%",height:"100vh"},html:""},draggable:{group:"element"},droppable:{group:"element"},render:()=>{a(s,{style:n.props.style});const e=n.props.html||"";e?(s.srcdoc!==e&&(s.srcdoc=e),s.style.display="block",l.style.display="none"):(s.removeAttribute("srcdoc"),s.style.display="none",l.style.display="flex")},resizeable:()=>c,handleBar:!0,validator:p({helpers:o}),schema:n.schema,onSelect:e=>{r.classList.add(e)},onDeselect:e=>{r.classList.remove(e)},elementProps:n,remove:()=>{r.remove()},createEditor:A})}})},79646(e,t,n){n.d(t,{A:()=>c});var o=n(82001),i=n.n(o),a=n(40935),r=n.n(a)()(i());r.push([e.id,'.NBtRDhA9L9rE8tvMRYXh {\n position: relative;\n width: 100%;\n}\n\n.NBtRDhA9L9rE8tvMRYXh:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: #000;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.NBtRDhA9L9rE8tvMRYXh iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.BwJnFUnLniO8YoMqBrOB {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n gap: 15px;\n z-index: 15;\n width: 100%;\n padding: 24px;\n text-align: center;\n}\n\n.BwJnFUnLniO8YoMqBrOB h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n',"",{version:3,sources:["webpack://./../web-editors/ai-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,WAAW;EACX,kBAAkB;EAClB,OAAO;EACP,MAAM;EACN,WAAW;EACX,YAAY;EACZ,gBAAgC;EAAhC,gCAAgC;EAChC,YAAY;EACZ,UAAU;AACZ;;AAEA;EACE,WAAW;EACX,YAAY;EACZ,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,SAAS;EACT,QAAQ;EACR,gCAAgC;EAChC,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,sBAAsB;EACtB,SAAS;EACT,WAAW;EACX,WAAW;EACX,aAAa;EACb,kBAAkB;AACpB;;AAEA;EACE,iBAAiB;EACjB,gBAAgB;EAChB,0BAA0B;AAC5B",sourcesContent:['.main {\n position: relative;\n width: 100%;\n}\n\n.main:hover::after {\n content: "";\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--primary, #000);\n opacity: 0.1;\n z-index: 9;\n}\n\n.main iframe {\n width: 100%;\n height: 100%;\n border: none;\n}\n\n.emptyAiHolder {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n gap: 15px;\n z-index: 15;\n width: 100%;\n padding: 24px;\n text-align: center;\n}\n\n.emptyAiHolder h1 {\n font-size: 1.2rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.72);\n}\n'],sourceRoot:""}]),r.locals={main:"NBtRDhA9L9rE8tvMRYXh",emptyAiHolder:"BwJnFUnLniO8YoMqBrOB"};const c=r}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[638],{638(e,t,i){i.r(t),i.d(t,{DevicePicker:()=>
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[638],{638(e,t,i){i.r(t),i.d(t,{DevicePicker:()=>h});var o,r,c,n,d=i(59088),s=i(36936),p=i(59929);let h=(o=(0,i(49410).MZ)({type:String}),(n=class extends p.WF{constructor(){super(),(0,d.A)(this,"device",c,this),this.device="desktop"}choose(e){this.device=e}render(){return p.qy` <cdtr-row alignItems="center">
|
|
2
2
|
<paper-button @click=${()=>this.choose("phone")}>
|
|
3
3
|
<cdtr-tooltip content="design_for_phone">
|
|
4
4
|
<cdtr-icon
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
width="18"
|
|
16
16
|
icon="desktop"
|
|
17
17
|
></cdtr-icon></cdtr-tooltip></paper-button
|
|
18
|
-
></cdtr-row>`}}).styles=
|
|
18
|
+
></cdtr-row>`}}).styles=p.AH`
|
|
19
19
|
paper-button {
|
|
20
20
|
padding: 0;
|
|
21
21
|
min-width: 0;
|
|
22
22
|
}
|
|
23
|
-
`,r=n,c=(0,
|
|
23
|
+
`,r=n,c=(0,s.A)(r.prototype,"device",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),r);customElements.define("cdtr-device-picker",h)}}]);
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[763],{10763(e,t,n){n.d(t,{default:()=>B});var o=n(96374);const i=e=>{{const{component:t,commands:n,helpers:i}=e;return{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=[{text:"design",selected:!0},{text:"link"},{text:"icons"},{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:i,changeTab:r,tabs:a}=e;return[{type:"input",title:"whatTheBtnSays",mergeTags:!0,emoji:!0,active:()=>"design"===i.text,value:t.props.text||"",onInput:e=>{const t=e.target.value;n.execCommand("text",t)}},{type:"divider",active:()=>"design"===i.text},{type:"divider",active:()=>"design"===i.text},{type:"typography",active:()=>"design"===i.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 i="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:i})}}},{type:"divider",active:()=>"design"===i.text},{type:"fontFamily",active:()=>"design"===i.text,value:t.props.style.fontFamily,onChange:e=>{const t=e.target.value;n.execCommand("style",{fontFamily:t})}},{type:"divider",active:()=>"design"===i.text},{type:"slider",title:"fontSize",step:1,min:8,max:50,active:()=>"design"===i.text,value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;n.execCommand("style",{fontSize:t+"px",height:"auto"})}},{type:"divider",active:()=>"design"===i.text},{type:"slider",title:"width",min:10,max:500,active:()=>"design"===i.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px",minWidth:null})}},{type:"divider",active:()=>"design"===i.text},{type:"colorpicker",alpha:!1,title:"button_background",active:()=>"design"===i.text,value:t.props.style.background,onChange:e=>{const i=e.target.value,r=(0,o.w)(t.props.style.color,i);n.execCommand("style",{color:r}),n.execCommand("style",{background:i,backgroundColor:null})}},{type:"divider",active:()=>"design"===i.text},{type:"colorpicker",title:"font_color",alpha:!1,active:()=>"design"===i.text,value:t.props.style.color,onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}},{type:"divider",active:()=>"design"===i.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"design"===i.text,value:parseInt(t.props.style.borderRadius),onInput:e=>{const t=e.target.value;n.execCommand("style",{borderRadius:t+"px"})}},{type:"divider",active:()=>"design"===i.text},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"link"===i.text,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"icons"===i.text,onChange:e=>{const t=e.target.checked;n.execCommand("hasIcon",t),n.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"icons"===i.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:()=>"icons"===i.text&&!0===t.props.hasIcon,value:t.props.iconSize||16,onInput:e=>{const t=e.target.value;n.execCommand("iconSize",t)}},{type:"icons",active:()=>"icons"===i.text&&!0===t.props.hasIcon,selectedIcon:t.props.iconUrl,onChange:e=>{const t=e.detail;n.execCommand("iconUrl",t.src)}},{type:"divider",active:()=>"design"===i.text},{type:"borderpicker",title:"border",active:()=>"design"===i.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;n.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"design"===i.text,value:t.props.style.borderWidth,onInput:e=>{const t=e.target.value;n.execCommand("style",{borderWidth:t+"px"})}},{type:"colorpicker",title:"borderColor",active:()=>"design"===i.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;n.execCommand("style",{borderColor:t})}},{type:"divider",active:()=>"design"===i.text},{type:"spacingPicker",active:()=>"design"===i.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,i=e.target.leftValue,r=e.target.rightValue;n.execCommand("style",{paddingTop:t+"px",paddingBottom:o+"px",paddingLeft:i+"px",paddingRight:r+"px",padding:null})}}]}}}},r=e=>{let{helpers:t,editor:n,getFocused:o}=e;return{set:(e,i,r)=>{switch(i){case"style":return e[i]=t.deepMerge(e[i],r),!0;case"text":return e.text=r,o()||n.chain().setContent(r).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":return e[i]=r,!0;case"onClick":if(r.link)return e[i]=r,!0}}}};var a=n(72591),s=n.n(a),l=n(88639),c=n.n(l),d=n(88128),p=n.n(d),u=n(30855),m=n.n(u),g=n(93051),A=n.n(g),h=n(49536),y={};y.setAttributes=m(),y.insert=p().bind(null,"head"),y.domAPI=c(),y.insertStyleElement=A();s()(h.A,y);const x=h.A&&h.A.locals?h.A.locals:void 0;var C=n(81318),v=n(1366);const b=C.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,C.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var f=n(85194),E=n(28396);const k=C.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const B=()=>{const e="button";return{name:e,create:t=>{const{createElement:n,compose:o,helpers:a}=t,{arrayToString:s,mergeDiff:l}=a;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,b,E.A,f.Ay,k],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=x.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)}l(d,{style:o.props.style}),d.style.height="auto";const e=o.props.hasIcon,t=o.props.iconUrl,n=o.props.iconDirection,i=o.props.iconSize,r="icon_in_button";let a=d.querySelector(`.${r}`)||document.createElement("img");e&&t?(a.className=r,a.src=t,a.style.width=(i||16)+"px",a.style.height=(i||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,handleBar:!0,validator:r({template:d,helpers:a,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:i})}}}},49536(e,t,n){n.d(t,{A:()=>s});var o=n(82001),i=n.n(o),r=n(40935),a=n.n(r)()(i());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 s=a}}]);
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[763],{10763(e,t,n){n.d(t,{default:()=>I});var o=n(96374),i=n(86319);const r=e=>{{const{component:t,commands:n,helpers:r}=e;return{select:e=>{let{changeTab:t,tab:n}=e},tabs:e=>{const t=[{text:"design",selected:!0},{text:"link"},{text:"icons"},{text:"settings"}];return t.forEach(t=>t.selected=t.selected=t.text===e),t},layout:e=>{let{tab:r,changeTab:a,tabs:s}=e;return[{type:"input",title:"whatTheBtnSays",mergeTags:!0,emoji:!0,active:()=>"design"===r.text,value:t.props.text||"",onInput:e=>{const t=e.target.value;n.execCommand("text",t)}},{type:"divider",active:()=>"design"===r.text},{type:"divider",active:()=>"design"===r.text},{type:"typography",active:()=>"design"===r.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 i="underline"===t.props.style.textDecoration?"none":"underline";n.execCommand("style",{textDecoration:i})}}},{type:"divider",active:()=>"design"===r.text},{type:"fontFamily",active:()=>"design"===r.text,value:t.props.style.fontFamily,weight:"web"===i.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:"divider",active:()=>"design"===r.text},{type:"slider",title:"fontSize",step:1,min:8,max:50,active:()=>"design"===r.text,value:parseInt(t.props.style.fontSize)||14,onInput:e=>{const t=e.target.value;n.execCommand("style",{fontSize:t+"px",height:"auto"})}},{type:"divider",active:()=>"design"===r.text},{type:"slider",title:"width",min:10,max:500,active:()=>"design"===r.text,value:parseInt(t.props.style.width),onInput:e=>{const t=e.target.value;n.execCommand("style",{width:t+"px",minWidth:null})}},{type:"divider",active:()=>"design"===r.text},{type:"colorpicker",alpha:!1,title:"button_background",active:()=>"design"===r.text,value:t.props.style.background,onChange:e=>{const i=e.target.value,r=(0,o.w)(t.props.style.color,i);n.execCommand("style",{color:r}),n.execCommand("style",{background:i,backgroundColor:null})}},{type:"divider",active:()=>"design"===r.text},{type:"colorpicker",title:"font_color",alpha:!1,active:()=>"design"===r.text,value:t.props.style.color,onChange:e=>{const t=e.target.value;n.execCommand("style",{color:t})}},{type:"divider",active:()=>"design"===r.text},{type:"slider",title:"radius",min:0,max:100,active:()=>"design"===r.text,value:parseInt(t.props.style.borderRadius),onInput:e=>{const t=e.target.value;n.execCommand("style",{borderRadius:t+"px"})}},{type:"divider",active:()=>"design"===r.text},{type:"linkpicker",href:t.props.onClick?.link,protocol:t.props.onClick?.link?.protocol,target:t.props.onClick?.link?.target,autofocus:!0,active:()=>"link"===r.text,onChange:e=>{const t={link:e.target.value};n.execCommand("onClick",t)}},{type:"checkbox",title:"hasIcon",useIconsApi:!0,checked:!!t.props.hasIcon,active:()=>"icons"===r.text,onChange:e=>{const t=e.target.checked;n.execCommand("hasIcon",t),n.execCommand("iconDirection","left")}},{type:"dropdown",active:()=>"icons"===r.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:()=>"icons"===r.text&&!0===t.props.hasIcon,value:t.props.iconSize||16,onInput:e=>{const t=e.target.value;n.execCommand("iconSize",t)}},{type:"icons",active:()=>"icons"===r.text&&!0===t.props.hasIcon,selectedIcon:t.props.iconUrl,onChange:e=>{const t=e.detail;n.execCommand("iconUrl",t.src)}},{type:"divider",active:()=>"design"===r.text},{type:"borderpicker",title:"border",active:()=>"design"===r.text,value:t.props.style.border,onChange:e=>{const t=e.target.value;n.execCommand("style",{border:t})}},{type:"slider",title:"borderWidth",active:()=>"design"===r.text,value:t.props.style.borderWidth,onInput:e=>{const t=e.target.value;n.execCommand("style",{borderWidth:t+"px"})}},{type:"colorpicker",title:"borderColor",active:()=>"design"===r.text,value:t.props.style.borderColor,onChange:e=>{const t=e.target.value;n.execCommand("style",{borderColor:t})}},{type:"divider",active:()=>"design"===r.text},{type:"spacingPicker",active:()=>"design"===r.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,i=e.target.leftValue,r=e.target.rightValue;n.execCommand("style",{paddingTop:t+"px",paddingBottom:o+"px",paddingLeft:i+"px",paddingRight:r+"px",padding:null})}}]}}}},a=e=>{let{helpers:t,editor:n,getFocused:o}=e;return{set:(e,i,r)=>{switch(i){case"style":return e[i]=t.deepMerge(e[i],r),!0;case"text":return e.text=r,o()||n.chain().setContent(r).run(),!0;case"ripple":case"rippleColor":case"scaleOnHover":case"hasIcon":case"iconUrl":case"iconSize":case"iconDirection":return e[i]=r,!0;case"onClick":if(r.link)return e[i]=r,!0}}}};var s=n(72591),l=n.n(s),c=n(88639),d=n.n(c),p=n(88128),u=n.n(p),g=n(30855),m=n.n(g),A=n(93051),h=n.n(A),y=n(49536),x={};x.setAttributes=m(),x.insert=u().bind(null,"head"),x.domAPI=d(),x.insertStyleElement=h();l()(y.A,x);const C=y.A&&y.A.locals?y.A.locals:void 0;var v=n(81318),b=n(1366);const f=v.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,v.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var E=n(85194),k=n(28396);const B=v.YY.create({addKeyboardShortcuts:()=>({Enter:()=>!0})});const I=()=>{const e="button";return{name:e,create:t=>{const{createElement:n,compose:o,helpers:i}=t,{arrayToString:s,mergeDiff:l}=i;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 v.KE({element:n,extensions:[b.A,f,k.A,E.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=C.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)}l(d,{style:o.props.style}),d.style.height="auto";const e=o.props.hasIcon,t=o.props.iconUrl,n=o.props.iconDirection,i=o.props.iconSize,r="icon_in_button";let a=d.querySelector(`.${r}`)||document.createElement("img");e&&t?(a.className=r,a.src=t,a.style.width=(i||16)+"px",a.style.height=(i||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,handleBar:!0,validator:a({template:d,helpers:i,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:r})}}}},49536(e,t,n){n.d(t,{A:()=>s});var o=n(82001),i=n.n(o),r=n(40935),a=n.n(r)()(i());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 s=a}}]);
|
|
Binary file
|