@creaditor/newsletter-starterkit 1.0.43 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/dist/112.creaditor.bundle.js +3 -3
  2. package/dist/112.creaditor.bundle.js.gz +0 -0
  3. package/dist/1260.creaditor.bundle.js +11 -11
  4. package/dist/1260.creaditor.bundle.js.gz +0 -0
  5. package/dist/1271.creaditor.bundle.js +6 -6
  6. package/dist/1271.creaditor.bundle.js.gz +0 -0
  7. package/dist/1334.creaditor.bundle.js +3 -3
  8. package/dist/1334.creaditor.bundle.js.gz +0 -0
  9. package/dist/1452.creaditor.bundle.js +3 -3
  10. package/dist/1452.creaditor.bundle.js.gz +0 -0
  11. package/dist/1456.creaditor.bundle.js +3 -3
  12. package/dist/1456.creaditor.bundle.js.gz +0 -0
  13. package/dist/1529.creaditor.bundle.js +2 -2
  14. package/dist/1529.creaditor.bundle.js.gz +0 -0
  15. package/dist/1565.creaditor.bundle.js +100 -100
  16. package/dist/1565.creaditor.bundle.js.gz +0 -0
  17. package/dist/170.creaditor.bundle.js +8 -8
  18. package/dist/170.creaditor.bundle.js.gz +0 -0
  19. package/dist/175.creaditor.bundle.js +5 -5
  20. package/dist/175.creaditor.bundle.js.gz +0 -0
  21. package/dist/1972.creaditor.bundle.js +2 -2
  22. package/dist/1972.creaditor.bundle.js.gz +0 -0
  23. package/dist/211.creaditor.bundle.js +1 -1
  24. package/dist/211.creaditor.bundle.js.gz +0 -0
  25. package/dist/2112.creaditor.bundle.js +3 -3
  26. package/dist/2112.creaditor.bundle.js.gz +0 -0
  27. package/dist/2350.creaditor.bundle.js +3 -3
  28. package/dist/2350.creaditor.bundle.js.gz +0 -0
  29. package/dist/2377.creaditor.bundle.js +7 -7
  30. package/dist/2377.creaditor.bundle.js.gz +0 -0
  31. package/dist/2384.creaditor.bundle.js +6 -6
  32. package/dist/2384.creaditor.bundle.js.gz +0 -0
  33. package/dist/2397.creaditor.bundle.js +4 -4
  34. package/dist/2397.creaditor.bundle.js.gz +0 -0
  35. package/dist/2409.creaditor.bundle.js +4 -4
  36. package/dist/2409.creaditor.bundle.js.gz +0 -0
  37. package/dist/2438.creaditor.bundle.js +5 -5
  38. package/dist/2438.creaditor.bundle.js.gz +0 -0
  39. package/dist/2547.creaditor.bundle.js +2 -2
  40. package/dist/2547.creaditor.bundle.js.gz +0 -0
  41. package/dist/2590.creaditor.bundle.js +2 -2
  42. package/dist/2590.creaditor.bundle.js.gz +0 -0
  43. package/dist/271.creaditor.bundle.js +7 -7
  44. package/dist/271.creaditor.bundle.js.gz +0 -0
  45. package/dist/2773.creaditor.bundle.js +3 -3
  46. package/dist/2773.creaditor.bundle.js.gz +0 -0
  47. package/dist/2833.creaditor.bundle.js +3 -3
  48. package/dist/2833.creaditor.bundle.js.gz +0 -0
  49. package/dist/2834.creaditor.bundle.js +2 -2
  50. package/dist/2834.creaditor.bundle.js.gz +0 -0
  51. package/dist/2956.creaditor.bundle.js +3 -3
  52. package/dist/2956.creaditor.bundle.js.gz +0 -0
  53. package/dist/2963.creaditor.bundle.js +3 -3
  54. package/dist/2963.creaditor.bundle.js.gz +0 -0
  55. package/dist/307.creaditor.bundle.js +3 -3
  56. package/dist/307.creaditor.bundle.js.gz +0 -0
  57. package/dist/3095.creaditor.bundle.js +13 -13
  58. package/dist/3095.creaditor.bundle.js.gz +0 -0
  59. package/dist/3233.creaditor.bundle.js +2 -2
  60. package/dist/3233.creaditor.bundle.js.gz +0 -0
  61. package/dist/3521.creaditor.bundle.js +3 -3
  62. package/dist/3521.creaditor.bundle.js.gz +0 -0
  63. package/dist/353.creaditor.bundle.js +3 -3
  64. package/dist/353.creaditor.bundle.js.gz +0 -0
  65. package/dist/3553.creaditor.bundle.js +5 -5
  66. package/dist/3553.creaditor.bundle.js.gz +0 -0
  67. package/dist/3606.creaditor.bundle.js +5 -5
  68. package/dist/3606.creaditor.bundle.js.gz +0 -0
  69. package/dist/365.creaditor.bundle.js +3 -3
  70. package/dist/365.creaditor.bundle.js.gz +0 -0
  71. package/dist/3827.creaditor.bundle.js +3 -3
  72. package/dist/3827.creaditor.bundle.js.gz +0 -0
  73. package/dist/3875.creaditor.bundle.js +3 -3
  74. package/dist/3875.creaditor.bundle.js.gz +0 -0
  75. package/dist/3932.creaditor.bundle.js +3 -3
  76. package/dist/3932.creaditor.bundle.js.gz +0 -0
  77. package/dist/3971.creaditor.bundle.js +3 -3
  78. package/dist/3971.creaditor.bundle.js.gz +0 -0
  79. package/dist/407.creaditor.bundle.js +3 -3
  80. package/dist/407.creaditor.bundle.js.gz +0 -0
  81. package/dist/4074.creaditor.bundle.js +3 -3
  82. package/dist/4074.creaditor.bundle.js.gz +0 -0
  83. package/dist/4100.creaditor.bundle.js +2 -2
  84. package/dist/4100.creaditor.bundle.js.gz +0 -0
  85. package/dist/4114.creaditor.bundle.js +3 -3
  86. package/dist/4114.creaditor.bundle.js.gz +0 -0
  87. package/dist/4161.creaditor.bundle.js +3 -3
  88. package/dist/4161.creaditor.bundle.js.gz +0 -0
  89. package/dist/4217.creaditor.bundle.js +7 -7
  90. package/dist/4217.creaditor.bundle.js.gz +0 -0
  91. package/dist/4288.creaditor.bundle.js +4 -4
  92. package/dist/4288.creaditor.bundle.js.gz +0 -0
  93. package/dist/4413.creaditor.bundle.js +3 -3
  94. package/dist/4413.creaditor.bundle.js.gz +0 -0
  95. package/dist/4475.creaditor.bundle.js +3 -3
  96. package/dist/4475.creaditor.bundle.js.gz +0 -0
  97. package/dist/453.creaditor.bundle.js +12 -12
  98. package/dist/453.creaditor.bundle.js.gz +0 -0
  99. package/dist/4569.creaditor.bundle.js +72 -72
  100. package/dist/4569.creaditor.bundle.js.gz +0 -0
  101. package/dist/4615.creaditor.bundle.js +2 -2
  102. package/dist/4615.creaditor.bundle.js.gz +0 -0
  103. package/dist/467.creaditor.bundle.js +3 -3
  104. package/dist/467.creaditor.bundle.js.gz +0 -0
  105. package/dist/4762.creaditor.bundle.js +3 -3
  106. package/dist/4762.creaditor.bundle.js.gz +0 -0
  107. package/dist/4770.creaditor.bundle.js +3 -3
  108. package/dist/4770.creaditor.bundle.js.gz +0 -0
  109. package/dist/4947.creaditor.bundle.js +3 -3
  110. package/dist/4947.creaditor.bundle.js.gz +0 -0
  111. package/dist/4988.creaditor.bundle.js +2 -2
  112. package/dist/4988.creaditor.bundle.js.gz +0 -0
  113. package/dist/5133.creaditor.bundle.js +5 -5
  114. package/dist/5133.creaditor.bundle.js.gz +0 -0
  115. package/dist/5156.creaditor.bundle.js +7 -7
  116. package/dist/5156.creaditor.bundle.js.gz +0 -0
  117. package/dist/5340.creaditor.bundle.js +5 -5
  118. package/dist/5340.creaditor.bundle.js.gz +0 -0
  119. package/dist/5391.creaditor.bundle.js +3 -3
  120. package/dist/5391.creaditor.bundle.js.gz +0 -0
  121. package/dist/5411.creaditor.bundle.js +3 -3
  122. package/dist/5411.creaditor.bundle.js.gz +0 -0
  123. package/dist/5428.creaditor.bundle.js +3 -3
  124. package/dist/5428.creaditor.bundle.js.gz +0 -0
  125. package/dist/5501.creaditor.bundle.js +13 -13
  126. package/dist/5501.creaditor.bundle.js.gz +0 -0
  127. package/dist/5530.creaditor.bundle.js +4 -4
  128. package/dist/5530.creaditor.bundle.js.gz +0 -0
  129. package/dist/5666.creaditor.bundle.js +3 -3
  130. package/dist/5666.creaditor.bundle.js.gz +0 -0
  131. package/dist/567.creaditor.bundle.js +6 -6
  132. package/dist/567.creaditor.bundle.js.gz +0 -0
  133. package/dist/578.creaditor.bundle.js +4 -4
  134. package/dist/578.creaditor.bundle.js.gz +0 -0
  135. package/dist/5839.creaditor.bundle.js +2 -2
  136. package/dist/5839.creaditor.bundle.js.gz +0 -0
  137. package/dist/5849.creaditor.bundle.js +3 -3
  138. package/dist/5849.creaditor.bundle.js.gz +0 -0
  139. package/dist/5850.creaditor.bundle.js +3 -3
  140. package/dist/5850.creaditor.bundle.js.gz +0 -0
  141. package/dist/589.creaditor.bundle.js +11 -11
  142. package/dist/589.creaditor.bundle.js.gz +0 -0
  143. package/dist/5926.creaditor.bundle.js +6 -6
  144. package/dist/5926.creaditor.bundle.js.gz +0 -0
  145. package/dist/6036.creaditor.bundle.js +2 -2
  146. package/dist/6036.creaditor.bundle.js.gz +0 -0
  147. package/dist/638.creaditor.bundle.js +3 -3
  148. package/dist/638.creaditor.bundle.js.gz +0 -0
  149. package/dist/6442.creaditor.bundle.js +3 -3
  150. package/dist/6442.creaditor.bundle.js.gz +0 -0
  151. package/dist/6459.creaditor.bundle.js +3 -3
  152. package/dist/6459.creaditor.bundle.js.gz +0 -0
  153. package/dist/6496.creaditor.bundle.js +3 -3
  154. package/dist/6496.creaditor.bundle.js.gz +0 -0
  155. package/dist/653.creaditor.bundle.js +3 -3
  156. package/dist/653.creaditor.bundle.js.gz +0 -0
  157. package/dist/7155.creaditor.bundle.js +3 -3
  158. package/dist/7155.creaditor.bundle.js.gz +0 -0
  159. package/dist/7209.creaditor.bundle.js +26 -26
  160. package/dist/7209.creaditor.bundle.js.gz +0 -0
  161. package/dist/7238.creaditor.bundle.js +6 -6
  162. package/dist/7238.creaditor.bundle.js.gz +0 -0
  163. package/dist/7255.creaditor.bundle.js +2 -2
  164. package/dist/7255.creaditor.bundle.js.gz +0 -0
  165. package/dist/7307.creaditor.bundle.js +11 -11
  166. package/dist/7307.creaditor.bundle.js.gz +0 -0
  167. package/dist/738.creaditor.bundle.js +2 -2
  168. package/dist/738.creaditor.bundle.js.gz +0 -0
  169. package/dist/7380.creaditor.bundle.js +2 -2
  170. package/dist/7380.creaditor.bundle.js.gz +0 -0
  171. package/dist/752.creaditor.bundle.js +3 -3
  172. package/dist/752.creaditor.bundle.js.gz +0 -0
  173. package/dist/7523.creaditor.bundle.js +3 -3
  174. package/dist/7523.creaditor.bundle.js.gz +0 -0
  175. package/dist/767.creaditor.bundle.js +7 -7
  176. package/dist/767.creaditor.bundle.js.gz +0 -0
  177. package/dist/7759.creaditor.bundle.js +3 -3
  178. package/dist/7759.creaditor.bundle.js.gz +0 -0
  179. package/dist/7838.creaditor.bundle.js +3 -3
  180. package/dist/7838.creaditor.bundle.js.gz +0 -0
  181. package/dist/7937.creaditor.bundle.js +12 -12
  182. package/dist/7937.creaditor.bundle.js.gz +0 -0
  183. package/dist/7997.creaditor.bundle.js +3 -3
  184. package/dist/7997.creaditor.bundle.js.gz +0 -0
  185. package/dist/8042.creaditor.bundle.js +5 -5
  186. package/dist/8042.creaditor.bundle.js.gz +0 -0
  187. package/dist/8064.creaditor.bundle.js +3 -3
  188. package/dist/8064.creaditor.bundle.js.gz +0 -0
  189. package/dist/8141.creaditor.bundle.js +2 -2
  190. package/dist/8141.creaditor.bundle.js.gz +0 -0
  191. package/dist/8251.creaditor.bundle.js +3 -3
  192. package/dist/8251.creaditor.bundle.js.gz +0 -0
  193. package/dist/8305.creaditor.bundle.js +3 -3
  194. package/dist/8305.creaditor.bundle.js.gz +0 -0
  195. package/dist/8315.creaditor.bundle.js +2 -2
  196. package/dist/8315.creaditor.bundle.js.gz +0 -0
  197. package/dist/8443.creaditor.bundle.js +3 -3
  198. package/dist/8443.creaditor.bundle.js.gz +0 -0
  199. package/dist/8516.creaditor.bundle.js +2 -2
  200. package/dist/8516.creaditor.bundle.js.gz +0 -0
  201. package/dist/8570.creaditor.bundle.js +3 -3
  202. package/dist/8570.creaditor.bundle.js.gz +0 -0
  203. package/dist/8646.creaditor.bundle.js +5 -5
  204. package/dist/8646.creaditor.bundle.js.gz +0 -0
  205. package/dist/8654.creaditor.bundle.js +5 -5
  206. package/dist/8654.creaditor.bundle.js.gz +0 -0
  207. package/dist/8676.creaditor.bundle.js +3 -3
  208. package/dist/8676.creaditor.bundle.js.gz +0 -0
  209. package/dist/8854.creaditor.bundle.js +3 -3
  210. package/dist/8854.creaditor.bundle.js.gz +0 -0
  211. package/dist/8916.creaditor.bundle.js +2 -2
  212. package/dist/8916.creaditor.bundle.js.gz +0 -0
  213. package/dist/8921.creaditor.bundle.js +3 -3
  214. package/dist/8921.creaditor.bundle.js.gz +0 -0
  215. package/dist/9041.creaditor.bundle.js +8 -8
  216. package/dist/9041.creaditor.bundle.js.gz +0 -0
  217. package/dist/9089.creaditor.bundle.js +3 -3
  218. package/dist/9089.creaditor.bundle.js.gz +0 -0
  219. package/dist/9162.creaditor.bundle.js +3 -3
  220. package/dist/9162.creaditor.bundle.js.gz +0 -0
  221. package/dist/9184.creaditor.bundle.js +3 -3
  222. package/dist/9184.creaditor.bundle.js.gz +0 -0
  223. package/dist/9250.creaditor.bundle.js +3 -3
  224. package/dist/9250.creaditor.bundle.js.gz +0 -0
  225. package/dist/9386.creaditor.bundle.js +3 -3
  226. package/dist/9386.creaditor.bundle.js.gz +0 -0
  227. package/dist/9453.creaditor.bundle.js +3 -3
  228. package/dist/9453.creaditor.bundle.js.gz +0 -0
  229. package/dist/9570.creaditor.bundle.js +3 -3
  230. package/dist/9570.creaditor.bundle.js.gz +0 -0
  231. package/dist/975.creaditor.bundle.js +3 -3
  232. package/dist/975.creaditor.bundle.js.gz +0 -0
  233. package/dist/976.creaditor.bundle.js +3 -3
  234. package/dist/976.creaditor.bundle.js.gz +0 -0
  235. package/dist/9986.creaditor.bundle.js +3 -3
  236. package/dist/9986.creaditor.bundle.js.gz +0 -0
  237. package/dist/9990.creaditor.bundle.js +3 -3
  238. package/dist/9990.creaditor.bundle.js.gz +0 -0
  239. package/dist/creaditor.bundle.js +269 -268
  240. package/dist/creaditor.bundle.js.gz +0 -0
  241. package/dist/service-worker.js +1 -1
  242. package/dist/service-worker.js.gz +0 -0
  243. package/package.json +1 -1
@@ -108,7 +108,7 @@
108
108
  .gallery-container {
109
109
  padding: 40px 20px;
110
110
  }
111
- `},27209(e,t,s){s.r(t),s.d(t,{CreaditorGalleryWrapper:()=>v});var i=s(24586),r=s(59929),o=s(5441),l=s(86319),a=s(49549),n=s(91597),d=s(21421),c=s(93967);function p(e){try{localStorage.setItem("creaditor-gallery-folder",e)}catch(e){console.warn("Could not write to localStorage:",e)}}class h extends r.WF{constructor(){super(),(0,i.A)(this,"newFolderModalRef",(0,d._)()),(0,i.A)(this,"newFolderInputRef",(0,d._)()),this.drop=this.drop.bind(this),this.controls=!0,this.sendFiles=this.sendFiles.bind(this),this.onSearch=this.onSearch.bind(this),this.coverEl=document.createElement("div"),this.sortItems=[{index:0,text:"fromNewToOld",value:{filter:"date",sortBy:"ASC"},checked:!0},{index:1,text:"fromOldToNew",value:{filter:"date",sortBy:"DESC"},checked:!1},{index:2,text:l.M.get("lang","aToZ"),value:{filter:"name",sortBy:"ASC"},checked:!1},{index:3,text:l.M.get("lang","zToA"),value:{filter:"name",sortBy:"DESC"},checked:!1}],this.filterItems=[{index:0,text:l.M.get("lang","folders"),value:"folders",checked:!0},{index:1,text:l.M.get("lang","images"),value:"images",checked:!0}]}openNewFolderModal(e){const t=this.newFolderModalRef.value;t&&(t.positionTarget=e.target,t.open(),this.newFolderInputRef.value.focus())}sendFiles(){const e={detail:this.files.filter(e=>e.selected),bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("file",e))}onLiked(e){const t={detail:e,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("like",t))}onClickFolder(e,t){this.freeImages=!1,this.controls=t;const s={detail:e,bubbles:!1,composed:!1};this.folderName=e.name,this.dispatchEvent(new CustomEvent("folder",s))}onSelectFile(e){const t={detail:e,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("file",t))}onSelectPexelsImage(e){const t={detail:e,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("file",t))}onUpload(){const e=(0,o.A)("input",{hidden:!0,type:"file",accept:"image/*"});e.onchange=e=>{const t=e.target;if(t.files&&t.files[0]){const e=new FileReader,s=t.files[0];e.onload=e=>{const t={detail:s,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("upload",t))},e.readAsDataURL(s)}},e.click()}onCreateNewFolder(){const e=this.newFolderInputRef.value.value;if(e.length<=30){const t={detail:e,bubbles:!1,composed:!1};this.newFolderModalRef.value.close(),this.dispatchEvent(new CustomEvent("newFolder",t)),this.newFolderInputRef.value.value=""}}onClickCategory(){}onReset(){p(null),this.freeImages=!1,this.folderName=l.M.get("lang","myImages"),this.dispatchEvent(new CustomEvent("reset",{}))}onSearch(e,t){p(null),this.freeImages=!1;let s=!1;"object"==typeof t&&t.isLiked&&(s=!0);const i=e.target.value;(0,n.A)(()=>{const e={detail:{value:i,isLiked:s},bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("search",e))})}drop(e,t){e.preventDefault();const s=e.dataTransfer.getData("fileId"),i=(e.dataTransfer.getData("folderId"),{detail:{fileId:s,folderId:t},bubbles:!1,composed:!1});this.dispatchEvent(new CustomEvent("moveFile",i))}onFilterMedia(e){const t=e.detail.value,s=t.index,i=[...this.filterItems];i[s].checked=!i[s].checked,this.filterItems=i}onSort(e){const t=e.detail.value,s={detail:t,bubbles:!1,composed:!1},i=t.index,r=[...this.sortItems];r.forEach((e,t)=>{e.checked=i===t}),this.sortItems=r,this.dispatchEvent(new CustomEvent("filter",s))}onDeleteFile(e){const t={detail:e,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("deleteFile",t))}onDeleteFolder(e){const t={detail:e,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("deleteFolder",t))}dragStart(e,t){e.dataTransfer.setData("fileId",t)}dragOver(e,t){e.dataTransfer.setData("folderId",t),e.preventDefault()}onFreeImages(){this.freeImages=!0,p("freeImages"),s.e(767).then(s.bind(s,70767))}onScroll(e){const t=e.target;if(t.scrollTop+t.offsetHeight>=t.scrollHeight-50){const e={detail:{folderId:this.folderId,page:this.page},bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("loadMore",e))}}connectedCallback(){super.connectedCallback(),s.e(5156).then(s.bind(s,85156));"freeImages"===function(){try{return localStorage.getItem("creaditor-gallery-folder")}catch(e){return console.warn("Could not read from localStorage:",e),null}}()&&(this.freeImages=!0,s.e(767).then(s.bind(s,70767)))}render(){Array.isArray(this.files)||(this.files=[]),Array.isArray(this.folders)||(this.folders=[]);const e=this.folders.filter(e=>"public"!==e.visibility),t=this.folders.filter(e=>"public"===e.visibility);return r.qy` <cdtr-row dir="rtl">
111
+ `},27209(e,t,s){s.r(t),s.d(t,{CreaditorGalleryWrapper:()=>g});var i=s(59929),r=s(5441),o=s(86319),l=s(49549),a=s(91597),n=s(21421),d=s(93967);function c(e){try{localStorage.setItem("creaditor-gallery-folder",e)}catch(e){console.warn("Could not write to localStorage:",e)}}class p extends i.WF{constructor(){super(),this.newFolderModalRef=(0,n._)(),this.newFolderInputRef=(0,n._)(),this.drop=this.drop.bind(this),this.controls=!0,this.sendFiles=this.sendFiles.bind(this),this.onSearch=this.onSearch.bind(this),this.coverEl=document.createElement("div"),this.sortItems=[{index:0,text:"fromNewToOld",value:{filter:"date",sortBy:"ASC"},checked:!0},{index:1,text:"fromOldToNew",value:{filter:"date",sortBy:"DESC"},checked:!1},{index:2,text:o.M.get("lang","aToZ"),value:{filter:"name",sortBy:"ASC"},checked:!1},{index:3,text:o.M.get("lang","zToA"),value:{filter:"name",sortBy:"DESC"},checked:!1}],this.filterItems=[{index:0,text:o.M.get("lang","folders"),value:"folders",checked:!0},{index:1,text:o.M.get("lang","images"),value:"images",checked:!0}]}openNewFolderModal(e){const t=this.newFolderModalRef.value;t&&(t.positionTarget=e.target,t.open(),this.newFolderInputRef.value.focus())}sendFiles(){const e={detail:this.files.filter(e=>e.selected),bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("file",e))}onLiked(e){const t={detail:e,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("like",t))}onClickFolder(e,t){this.freeImages=!1,this.controls=t;const s={detail:e,bubbles:!1,composed:!1};this.folderName=e.name,this.dispatchEvent(new CustomEvent("folder",s))}onSelectFile(e){const t={detail:e,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("file",t))}onSelectPexelsImage(e){const t={detail:e,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("file",t))}onUpload(){const e=(0,r.A)("input",{hidden:!0,type:"file",accept:"image/*"});e.onchange=e=>{const t=e.target;if(t.files&&t.files[0]){const e=new FileReader,s=t.files[0];e.onload=e=>{const t={detail:s,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("upload",t))},e.readAsDataURL(s)}},e.click()}onCreateNewFolder(){const e=this.newFolderInputRef.value.value;if(e.length<=30){const t={detail:e,bubbles:!1,composed:!1};this.newFolderModalRef.value.close(),this.dispatchEvent(new CustomEvent("newFolder",t)),this.newFolderInputRef.value.value=""}}onClickCategory(){}onReset(){c(null),this.freeImages=!1,this.folderName=o.M.get("lang","myImages"),this.dispatchEvent(new CustomEvent("reset",{}))}onSearch(e,t){c(null),this.freeImages=!1;let s=!1;"object"==typeof t&&t.isLiked&&(s=!0);const i=e.target.value;(0,a.A)(()=>{const e={detail:{value:i,isLiked:s},bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("search",e))})}drop(e,t){e.preventDefault();const s=e.dataTransfer.getData("fileId"),i=(e.dataTransfer.getData("folderId"),{detail:{fileId:s,folderId:t},bubbles:!1,composed:!1});this.dispatchEvent(new CustomEvent("moveFile",i))}onFilterMedia(e){const t=e.detail.value,s=t.index,i=[...this.filterItems];i[s].checked=!i[s].checked,this.filterItems=i}onSort(e){const t=e.detail.value,s={detail:t,bubbles:!1,composed:!1},i=t.index,r=[...this.sortItems];r.forEach((e,t)=>{e.checked=i===t}),this.sortItems=r,this.dispatchEvent(new CustomEvent("filter",s))}onDeleteFile(e){const t={detail:e,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("deleteFile",t))}onDeleteFolder(e){const t={detail:e,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("deleteFolder",t))}dragStart(e,t){e.dataTransfer.setData("fileId",t)}dragOver(e,t){e.dataTransfer.setData("folderId",t),e.preventDefault()}onFreeImages(){this.freeImages=!0,c("freeImages"),s.e(767).then(s.bind(s,70767))}onScroll(e){const t=e.target;if(t.scrollTop+t.offsetHeight>=t.scrollHeight-50){const e={detail:{folderId:this.folderId,page:this.page},bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("loadMore",e))}}connectedCallback(){super.connectedCallback(),s.e(5156).then(s.bind(s,85156));"freeImages"===function(){try{return localStorage.getItem("creaditor-gallery-folder")}catch(e){return console.warn("Could not read from localStorage:",e),null}}()&&(this.freeImages=!0,s.e(767).then(s.bind(s,70767)))}render(){Array.isArray(this.files)||(this.files=[]),Array.isArray(this.folders)||(this.folders=[]);const e=this.folders.filter(e=>"public"!==e.visibility),t=this.folders.filter(e=>"public"===e.visibility);return i.qy` <cdtr-row dir="rtl">
112
112
  <cdtr-col class="list" sm="3">
113
113
  <cdtr-row alignItems="center" class="upload-container">
114
114
  <paper-button @click=${this.onUpload} class="upload">
@@ -124,23 +124,23 @@
124
124
  ><lang-text text="favorites"></lang-text
125
125
  ></paper-item>
126
126
  <paper-item @click=${this.onFreeImages}> <lang-text text="freeImages"></lang-text> </paper-item>
127
- ${Array.isArray(t)?t.map(e=>r.qy`<paper-item
127
+ ${Array.isArray(t)?t.map(e=>i.qy`<paper-item
128
128
  @click=${()=>this.onClickFolder(e,!1)}
129
129
  ><lang-text text="${e.name}"></lang-text
130
130
  ></paper-item>`):null}
131
131
  </paper-listbox>
132
132
  </cdtr-col>
133
- ${this.freeImages?r.qy`<cdtr-col>
133
+ ${this.freeImages?i.qy`<cdtr-col>
134
134
  <cdtr-pexels-gallery
135
135
  @file=${e=>this.onSelectPexelsImage(e.detail)}
136
136
  ></cdtr-pexels-gallery>
137
- </cdtr-col>`:r.qy`<cdtr-col>
137
+ </cdtr-col>`:i.qy`<cdtr-col>
138
138
  <div class="gallery-container">
139
139
  <cdtr-row alignItems="center">
140
140
  <cdtr-input
141
141
  type="search"
142
142
  @input=${this.onSearch}
143
- placeholder="${l.M.get("lang","search")}"
143
+ placeholder="${o.M.get("lang","search")}"
144
144
  class="search"
145
145
  ></cdtr-input>
146
146
 
@@ -155,7 +155,7 @@
155
155
  ></paper-button>
156
156
  </cdtr-row>
157
157
  <cdtr-row mt="1">
158
- ${this.folderName?r.qy`
158
+ ${this.folderName?i.qy`
159
159
  <cdtr-title style="font-size:14px"
160
160
  ><lang-text text="main"></lang-text
161
161
  ></cdtr-title>
@@ -170,7 +170,7 @@
170
170
  `:null}
171
171
  </cdtr-row>
172
172
  <cdtr-row mt="2" justify="space-between">
173
- ${this.filterItems[0].checked?r.qy` <cdtr-col sm="2">
173
+ ${this.filterItems[0].checked?i.qy` <cdtr-col sm="2">
174
174
  <cdtr-row
175
175
  spacing="2px"
176
176
  class="scroll-body"
@@ -181,10 +181,10 @@
181
181
  @click=${()=>{this.onReset()}}
182
182
  .controls=${!1}
183
183
  type="folder"
184
- name=${l.M.get("lang","myImages")}
184
+ name=${o.M.get("lang","myImages")}
185
185
  ></cdtr-editor-media-card>
186
186
  </cdtr-col>
187
- ${(0,a.u)(e||[],e=>e.id,(e,t)=>r.qy`<cdtr-col sm="12">
187
+ ${(0,l.u)(e||[],e=>e.id,(e,t)=>i.qy`<cdtr-col sm="12">
188
188
  <cdtr-editor-media-card
189
189
  @deleteFolder=${()=>this.onDeleteFolder(e)}
190
190
  @deleteFile=${()=>this.onDeleteFile(e)}
@@ -200,14 +200,14 @@
200
200
  </cdtr-col>`)}
201
201
  </cdtr-row>
202
202
  </cdtr-col>`:null}
203
- ${this.filterItems[1].checked?r.qy` <cdtr-col sm="10">
203
+ ${this.filterItems[1].checked?i.qy` <cdtr-col sm="10">
204
204
  <cdtr-row
205
205
  @scroll=${this.onScroll}
206
206
  class="scroll-body"
207
207
  justify="space-evenly"
208
208
  >
209
- ${(0,a.u)(this.files||[],e=>e.id,(e,t)=>r.qy`<cdtr-col class="file-col" sm="3">
210
- ${e.moved?r.qy` <div class="moved"></div> `:null}
209
+ ${(0,l.u)(this.files||[],e=>e.id,(e,t)=>i.qy`<cdtr-col class="file-col" sm="3">
210
+ ${e.moved?i.qy` <div class="moved"></div> `:null}
211
211
  <cdtr-editor-media-card
212
212
  @deleteFile=${()=>this.onDeleteFile(e)}
213
213
  @deleteFolder=${()=>this.onDeleteFolder(e)}
@@ -235,7 +235,7 @@
235
235
  </div>
236
236
  </cdtr-col>`}
237
237
  <paper-dialog
238
- ${(0,d.K)(this.newFolderModalRef)}
238
+ ${(0,n.K)(this.newFolderModalRef)}
239
239
  no-overlap
240
240
  horizontal-align="left"
241
241
  vertical-align="top"
@@ -251,7 +251,7 @@
251
251
  <cdtr-col sm="10"
252
252
  ><cdtr-input
253
253
  @submit=${this.onCreateNewFolder}
254
- ${(0,d.K)(this.newFolderInputRef)}
254
+ ${(0,n.K)(this.newFolderInputRef)}
255
255
  autofocus=${!0}
256
256
  maxLength=${30}
257
257
  ></cdtr-input
@@ -264,7 +264,7 @@
264
264
  </cdtr-row>
265
265
  </form>
266
266
  </paper-dialog>
267
- </cdtr-row>`}}(0,i.A)(h,"styles",c.T),(0,i.A)(h,"properties",{folders:{type:Array},files:{type:Array},pageCount:{type:Number},prevUrl:{type:String},nextUrl:{type:String},folderName:{type:String},filterItems:{type:Array},multi:{type:Boolean},controls:{type:Boolean},freeImages:{type:Boolean}}),customElements.define("cdtr-gallery-files",h);class u extends r.WF{constructor(){super(),this.uploads={}}connectedCallback(){super.connectedCallback(),this.addEventListener("upload-start",this.handleUploadStart.bind(this)),this.addEventListener("upload-progress",this.handleUploadProgress.bind(this)),this.addEventListener("upload-complete",this.handleUploadComplete.bind(this)),this.addEventListener("upload-error",this.handleUploadError.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("upload-start",this.handleUploadStart.bind(this)),this.removeEventListener("upload-progress",this.handleUploadProgress.bind(this)),this.removeEventListener("upload-complete",this.handleUploadComplete.bind(this)),this.removeEventListener("upload-error",this.handleUploadError.bind(this))}handleUploadStart(e){const{uploadId:t,fileName:s}=e.detail;this.uploads[t]={fileName:s,status:"uploading",progress:0,error:null},this.requestUpdate()}handleUploadProgress(e){const{uploadId:t,progress:s}=e.detail;this.uploads[t]&&(this.uploads[t].progress=s,this.requestUpdate())}handleUploadComplete(e){const{uploadId:t}=e.detail;this.uploads[t]&&(this.uploads[t].status="completed",this.uploads[t].progress=100,this.requestUpdate(),setTimeout(()=>{this.removeUpload(t)},3e3))}handleUploadError(e){const{uploadId:t,error:s}=e.detail;this.uploads[t]&&(this.uploads[t].status="error",this.uploads[t].error=s,this.requestUpdate(),setTimeout(()=>{this.removeUpload(t)},5e3))}removeUpload(e){delete this.uploads[e],this.requestUpdate()}getStatusIcon(e){switch(e){case"uploading":default:return r.qy`<div class="status-icon uploading"></div>`;case"completed":return r.qy`<div class="status-icon completed"></div>`;case"error":return r.qy`<div class="status-icon error"></div>`}}getProgressFillClass(e){switch(e){case"completed":return"progress-fill completed";case"error":return"progress-fill error";default:return"progress-fill"}}render(){const e=Object.entries(this.uploads).map(e=>{let[t,s]=e;return r.qy`
267
+ </cdtr-row>`}}p.styles=d.T,p.properties={folders:{type:Array},files:{type:Array},pageCount:{type:Number},prevUrl:{type:String},nextUrl:{type:String},folderName:{type:String},filterItems:{type:Array},multi:{type:Boolean},controls:{type:Boolean},freeImages:{type:Boolean}},customElements.define("cdtr-gallery-files",p);class h extends i.WF{constructor(){super(),this.uploads={}}connectedCallback(){super.connectedCallback(),this.addEventListener("upload-start",this.handleUploadStart.bind(this)),this.addEventListener("upload-progress",this.handleUploadProgress.bind(this)),this.addEventListener("upload-complete",this.handleUploadComplete.bind(this)),this.addEventListener("upload-error",this.handleUploadError.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("upload-start",this.handleUploadStart.bind(this)),this.removeEventListener("upload-progress",this.handleUploadProgress.bind(this)),this.removeEventListener("upload-complete",this.handleUploadComplete.bind(this)),this.removeEventListener("upload-error",this.handleUploadError.bind(this))}handleUploadStart(e){const{uploadId:t,fileName:s}=e.detail;this.uploads[t]={fileName:s,status:"uploading",progress:0,error:null},this.requestUpdate()}handleUploadProgress(e){const{uploadId:t,progress:s}=e.detail;this.uploads[t]&&(this.uploads[t].progress=s,this.requestUpdate())}handleUploadComplete(e){const{uploadId:t}=e.detail;this.uploads[t]&&(this.uploads[t].status="completed",this.uploads[t].progress=100,this.requestUpdate(),setTimeout(()=>{this.removeUpload(t)},3e3))}handleUploadError(e){const{uploadId:t,error:s}=e.detail;this.uploads[t]&&(this.uploads[t].status="error",this.uploads[t].error=s,this.requestUpdate(),setTimeout(()=>{this.removeUpload(t)},5e3))}removeUpload(e){delete this.uploads[e],this.requestUpdate()}getStatusIcon(e){switch(e){case"uploading":default:return i.qy`<div class="status-icon uploading"></div>`;case"completed":return i.qy`<div class="status-icon completed"></div>`;case"error":return i.qy`<div class="status-icon error"></div>`}}getProgressFillClass(e){switch(e){case"completed":return"progress-fill completed";case"error":return"progress-fill error";default:return"progress-fill"}}render(){const e=Object.entries(this.uploads).map(e=>{let[t,s]=e;return i.qy`
268
268
  <div class="upload-item">
269
269
  <div class="upload-header">
270
270
  <span class="file-name" title="${s.fileName}">${s.fileName}</span>
@@ -289,17 +289,17 @@
289
289
  ${"uploading"===s.status?`${s.progress}%`:"completed"===s.status?"Upload completed":"error"===s.status?"Upload failed":""}
290
290
  </div>
291
291
 
292
- ${s.error?r.qy`
292
+ ${s.error?i.qy`
293
293
  <div class="error-message">
294
294
  ${s.error.message||s.error}
295
295
  </div>
296
296
  `:""}
297
297
  </div>
298
- `});return r.qy`
298
+ `});return i.qy`
299
299
  <div>
300
300
  ${e}
301
301
  </div>
302
- `}}(0,i.A)(u,"styles",r.AH`
302
+ `}}h.styles=i.AH`
303
303
  :host {
304
304
  display: block;
305
305
  position: fixed;
@@ -431,7 +431,7 @@
431
431
  .close-btn:hover {
432
432
  color: #666;
433
433
  }
434
- `),(0,i.A)(u,"properties",{uploads:{type:Object}}),customElements.define("cdtr-upload-loading",u);s(2590);class f extends r.WF{constructor(){super(),this.isVisible=!1,this.fileName="",this.status="uploading",this.progress=0,this.timeElapsed=0,this.pollInterval=null,this.timeoutId=null,this.progressInterval=null,this.startTime=null,this.maxDuration=3e4,this.pollFrequency=7e3}connectedCallback(){super.connectedCallback(),window.addEventListener("cdtr-upload-start",this.handleUploadStart.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.cleanup(),window.removeEventListener("cdtr-upload-start",this.handleUploadStart.bind(this))}handleUploadStart(e){console.log("Upload monitor received event:",e.detail);const{fileName:t,file:s}=e.detail;this.startUploadMonitor(t,s)}startUploadMonitor(e,t){console.log("Starting upload monitor for:",e),this.fileName=e,this.isVisible=!0,this.status="uploading",this.progress=0,this.timeElapsed=0,this.startTime=Date.now(),this.uploadedFile=t,console.log("Component should be visible now, isVisible:",this.isVisible),this.requestUpdate(),this.simulateUploadProgress(),setTimeout(()=>{this.status="checking",this.startPolling(),this.startTimeout()},this.pollFrequency)}simulateUploadProgress(){let e=0;this.progressInterval=setInterval(()=>{e+=15*Math.random(),e>=90&&(e=90,clearInterval(this.progressInterval),this.progressInterval=null),this.progress=Math.floor(e),this.requestUpdate()},300)}startPolling(){this.progress=100,this.status="completed",this.requestUpdate(),setTimeout(()=>{this.isVisible=!1,this.requestUpdate()},5e3)}startTimeout(){this.timeoutId=setTimeout(()=>{"completed"!==this.status&&this.handleTimeout()},this.maxDuration)}handleUploadSuccess(){this.cleanup(),this.status="completed",this.progress=100,this.requestUpdate(),setTimeout(()=>{this.isVisible=!1,this.requestUpdate()},2e3)}handleTimeout(){this.cleanup(),this.status="timeout",this.requestUpdate(),setTimeout(()=>{this.isVisible=!1,this.requestUpdate()},1e4)}cleanup(){this.pollInterval&&(clearInterval(this.pollInterval),this.pollInterval=null),this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.progressInterval&&(clearInterval(this.progressInterval),this.progressInterval=null)}getCircleProgress(){const e=2*Math.PI*26;return e-this.progress/100*e}renderContent(){switch(this.status){case"uploading":return r.qy`
434
+ `,h.properties={uploads:{type:Object}},customElements.define("cdtr-upload-loading",h);s(2590);class u extends i.WF{constructor(){super(),this.isVisible=!1,this.fileName="",this.status="uploading",this.progress=0,this.timeElapsed=0,this.pollInterval=null,this.timeoutId=null,this.progressInterval=null,this.startTime=null,this.maxDuration=3e4,this.pollFrequency=7e3}connectedCallback(){super.connectedCallback(),window.addEventListener("cdtr-upload-start",this.handleUploadStart.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.cleanup(),window.removeEventListener("cdtr-upload-start",this.handleUploadStart.bind(this))}handleUploadStart(e){console.log("Upload monitor received event:",e.detail);const{fileName:t,file:s}=e.detail;this.startUploadMonitor(t,s)}startUploadMonitor(e,t){console.log("Starting upload monitor for:",e),this.fileName=e,this.isVisible=!0,this.status="uploading",this.progress=0,this.timeElapsed=0,this.startTime=Date.now(),this.uploadedFile=t,console.log("Component should be visible now, isVisible:",this.isVisible),this.requestUpdate(),this.simulateUploadProgress(),setTimeout(()=>{this.status="checking",this.startPolling(),this.startTimeout()},this.pollFrequency)}simulateUploadProgress(){let e=0;this.progressInterval=setInterval(()=>{e+=15*Math.random(),e>=90&&(e=90,clearInterval(this.progressInterval),this.progressInterval=null),this.progress=Math.floor(e),this.requestUpdate()},300)}startPolling(){this.progress=100,this.status="completed",this.requestUpdate(),setTimeout(()=>{this.isVisible=!1,this.requestUpdate()},5e3)}startTimeout(){this.timeoutId=setTimeout(()=>{"completed"!==this.status&&this.handleTimeout()},this.maxDuration)}handleUploadSuccess(){this.cleanup(),this.status="completed",this.progress=100,this.requestUpdate(),setTimeout(()=>{this.isVisible=!1,this.requestUpdate()},2e3)}handleTimeout(){this.cleanup(),this.status="timeout",this.requestUpdate(),setTimeout(()=>{this.isVisible=!1,this.requestUpdate()},1e4)}cleanup(){this.pollInterval&&(clearInterval(this.pollInterval),this.pollInterval=null),this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.progressInterval&&(clearInterval(this.progressInterval),this.progressInterval=null)}getCircleProgress(){const e=2*Math.PI*26;return e-this.progress/100*e}renderContent(){switch(this.status){case"uploading":return i.qy`
435
435
  <div class="progress-circle">
436
436
  <svg class="progress-ring" width="60" height="60">
437
437
  <circle class="progress-ring-bg" cx="30" cy="30" r="26"></circle>
@@ -449,26 +449,26 @@
449
449
  <lang-text text="uploading"></lang-text>
450
450
  </div>
451
451
  <div class="file-name" title="${this.fileName}">${this.fileName}</div>
452
- `;case"checking":return r.qy`
452
+ `;case"checking":return i.qy`
453
453
  <div class="spinner"></div>
454
454
  <div class="status-text">
455
455
  <lang-text text="verifying"></lang-text>
456
456
  </div>
457
457
  <div class="file-name" title="${this.fileName}">${this.fileName}</div>
458
- `;case"completed":return r.qy`
458
+ `;case"completed":return i.qy`
459
459
  <div class="success-icon"></div>
460
460
  <div class="status-text">
461
461
  <lang-text text="completed"></lang-text>
462
462
  </div>
463
463
  <div class="file-name" title="${this.fileName}">${this.fileName}</div>
464
- `;case"timeout":return r.qy`
464
+ `;case"timeout":return i.qy`
465
465
  <div class="error-icon"></div>
466
466
  <div class="status-text"><lang-text text="timeout"></lang-text></div>
467
467
  <div class="file-name" title="${this.fileName}">${this.fileName}</div>
468
468
  <div style="font-size: 10px; color: #666; margin-top: 4px;">
469
469
  File may be uploaded. Refresh gallery.
470
470
  </div>
471
- `;default:return r.qy``}}render(){return console.log("Render called - isVisible:",this.isVisible,"status:",this.status,"progress:",this.progress),this.isVisible?r.qy` <div class="upload-card">${this.renderContent()}</div> `:r.qy``}}(0,i.A)(f,"styles",r.AH`
471
+ `;default:return i.qy``}}render(){return console.log("Render called - isVisible:",this.isVisible,"status:",this.status,"progress:",this.progress),this.isVisible?i.qy` <div class="upload-card">${this.renderContent()}</div> `:i.qy``}}u.styles=i.AH`
472
472
  :host {
473
473
  display: block;
474
474
  position: fixed;
@@ -623,7 +623,7 @@
623
623
  color: white;
624
624
  font-weight: bold;
625
625
  }
626
- `),(0,i.A)(f,"properties",{isVisible:{type:Boolean},fileName:{type:String},status:{type:String},progress:{type:Number},timeElapsed:{type:Number}}),customElements.define("cdtr-upload-progress-monitor",f);var m=s(18396),g=s(13681);class v extends r.WF{constructor(){super(),this.sortBy="ASC",this.files=[],this.folders=[],this.uploadStatus={},this.onSearch=this.onSearch.bind(this),this.close=this.close.bind(this),this.reset=this.reset.bind(this);const e=new m.A;this.eventEmitter=e;const t=l.M.get("config","editor","configure","mediaGalleryManager");e.files=this.files,e.close=this.close,"function"==typeof t&&(e.render=this.reset,console.log("init mediaGalleryManager"),t(e)),this.reset()}reset(){this.dirId=null,this.eventEmitter.dispatch("load-folders",{resolve:e=>{this.folders=e}}),this.eventEmitter.dispatch("load-files",{resolve:e=>{this.files=[...e]}})}uploadFile(e){this.folders||(this.folders=[]);const t=e.detail,s=this.folders.find(e=>e.selected),i=`${t.name}-${Date.now()}`;this.uploadStatus[i]={fileName:t.name,status:"uploading",progress:0,error:null},console.log("Dispatching cdtr-upload-start event for:",t.name),this.dispatchEvent(new CustomEvent("cdtr-upload-start",{detail:{uploadId:i,fileName:t.name,file:t},bubbles:!0,composed:!0})),console.log("Event dispatched"),this.eventEmitter.dispatch("upload-file",{file:t,dirId:s?s.id:null,uploadId:i,execCommand:(e,t)=>{l.M.get("editor").store().execCommand(e,t)},options:{},onProgress:e=>{this.uploadStatus[i]&&(this.uploadStatus[i].progress=e,this.requestUpdate("uploadStatus"),this.dispatchEvent(new CustomEvent("upload-progress",{detail:{uploadId:i,fileName:t.name,progress:e},bubbles:!0,composed:!0})))},onComplete:e=>{this.uploadStatus[i]&&(this.uploadStatus[i].status="completed",this.uploadStatus[i].progress=100,this.requestUpdate("uploadStatus"),this.dispatchEvent(new CustomEvent("cdtr-upload-complete",{detail:{uploadId:i,fileName:t.name,result:e},bubbles:!0,composed:!0})),setTimeout(()=>{delete this.uploadStatus[i],this.requestUpdate("uploadStatus")},3e3))},onError:e=>{this.uploadStatus[i]&&(this.uploadStatus[i].status="error",this.uploadStatus[i].error=e,this.requestUpdate("uploadStatus"),this.dispatchEvent(new CustomEvent("cdtr-upload-error",{detail:{uploadId:i,fileName:t.name,error:e},bubbles:!0,composed:!0})),setTimeout(()=>{delete this.uploadStatus[i],this.requestUpdate("uploadStatus")},5e3))}}),this.opened=!1}onSearch(e){const{value:t,isLiked:s}=e.detail;s?this.eventEmitter.dispatch("load-files",{isLiked:s,resolve:e=>{Array.isArray(e)?this.files=[...e]:console.error("files is not array",e)}}):t.trim().length>2?this.eventEmitter.dispatch("load-files",{filter:"name",search:t,resolve:e=>{this.files=[...e]}}):0===t.trim().length&&this.reset()}onFilter(e){const t=e.detail;this.eventEmitter.dispatch("load-files",{filter:"name",search:t.value})}onSelectFolder(e){const t=e.detail,s=this.sortBy,i=t.id;this.dirId=i,this.eventEmitter.dispatch("load-files",{filter:"dir",dirId:i,sortBy:s,resolve:e=>{this.files=e}})}oncreateNewFolder(e){const t=e.detail;this.eventEmitter.dispatch("create-folder",{name:t,resolve:e=>{this.folders||(this.folders=[]);const t=[...this.folders];t.forEach(e=>e.selected=!1),e.selected=!0,t.unshift(e),this.folders=t,this.onSelectFolder({detail:e})}})}onMoveFile(e){const t=e.detail;this.eventEmitter.dispatch("on-move-file",{data:t,resolve:e=>{if(this.folders||(this.folders=[]),this.dirId===t.folderId)return;const s=this.files.findIndex(e=>e.id===t.fileId);if(-1!==s){const e=[...this.files];e[s].moved=!0,this.files=e}const i=this.folders.findIndex(e=>e.id===t.folderId);if(-1!==i){const e=[...this.folders];e[i].file_count+=1,this.folders=e}}})}onLike(e){const t=e.detail;this.eventEmitter.dispatch("on-like",{fileId:t.id,resolve:e=>{const s=this.files.findIndex(e=>e.id===t.id);if(-1!==s){const e=[...this.files];e[s].isLiked=!e[s].isLiked,this.files=e}}})}onselectFile(e){const t={detail:e.detail,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("file",t))}close(){this.dispatchEvent(new CustomEvent("close",{}))}onDleteFile(e){const t=e.detail;this.eventEmitter.dispatch("delete-file",{id:t.id,type:"image",resolve:e=>{const s=this.files.findIndex(e=>e.id===t.id);if(-1!==s){const e=[...this.files];e.splice(s,1),this.files=e}}})}onLoadMore(){this.eventEmitter.dispatch("lazy-load-files-on-scroll",{resolve:e=>{if(Array.isArray(e)&&e.length>0){const t=[...this.files,...e];this.files=t}}})}onDeleteFolder(e){const t=e.detail;this.eventEmitter.dispatch("delete-folder",{id:t.id,resolve:e=>{this.folders||(this.folders=[]);const s=this.folders.findIndex(e=>e.id===t.id);if(-1!==s){const e=[...this.folders];e.splice(s,1),this.folders=e}}})}connectedCallback(){super.connectedCallback(),g.vP.on("on:upload-file","gallery:on:upload-file",e=>{let{image:t,type:s}=e;if("base64"===s){const e=t.split(",")[1]||t,s=atob(e),i=new Array(s.length);for(let e=0;e<s.length;e++)i[e]=s.charCodeAt(e);const r=new Uint8Array(i),o=new Blob([r],{type:"image/png"}),l=new File([o],"uploaded-image.png",{type:"image/png"});this.uploadFile({detail:l})}})}render(){return r.qy`
626
+ `,u.properties={isVisible:{type:Boolean},fileName:{type:String},status:{type:String},progress:{type:Number},timeElapsed:{type:Number}},customElements.define("cdtr-upload-progress-monitor",u);var f=s(18396),m=s(13681);class g extends i.WF{constructor(){super(),this.sortBy="ASC",this.files=[],this.folders=[],this.uploadStatus={},this.onSearch=this.onSearch.bind(this),this.close=this.close.bind(this),this.reset=this.reset.bind(this);const e=new f.A;this.eventEmitter=e;const t=o.M.get("config","editor","configure","mediaGalleryManager");e.files=this.files,e.close=this.close,"function"==typeof t&&(e.render=this.reset,console.log("init mediaGalleryManager"),t(e)),this.reset()}reset(){this.dirId=null,this.eventEmitter.dispatch("load-folders",{resolve:e=>{this.folders=e}}),this.eventEmitter.dispatch("load-files",{resolve:e=>{this.files=[...e]}})}uploadFile(e){this.folders||(this.folders=[]);const t=e.detail,s=this.folders.find(e=>e.selected),i=`${t.name}-${Date.now()}`;this.uploadStatus[i]={fileName:t.name,status:"uploading",progress:0,error:null},console.log("Dispatching cdtr-upload-start event for:",t.name),this.dispatchEvent(new CustomEvent("cdtr-upload-start",{detail:{uploadId:i,fileName:t.name,file:t},bubbles:!0,composed:!0})),console.log("Event dispatched"),this.eventEmitter.dispatch("upload-file",{file:t,dirId:s?s.id:null,uploadId:i,execCommand:(e,t)=>{o.M.get("editor").store().execCommand(e,t)},options:{},onProgress:e=>{this.uploadStatus[i]&&(this.uploadStatus[i].progress=e,this.requestUpdate("uploadStatus"),this.dispatchEvent(new CustomEvent("upload-progress",{detail:{uploadId:i,fileName:t.name,progress:e},bubbles:!0,composed:!0})))},onComplete:e=>{this.uploadStatus[i]&&(this.uploadStatus[i].status="completed",this.uploadStatus[i].progress=100,this.requestUpdate("uploadStatus"),this.dispatchEvent(new CustomEvent("cdtr-upload-complete",{detail:{uploadId:i,fileName:t.name,result:e},bubbles:!0,composed:!0})),setTimeout(()=>{delete this.uploadStatus[i],this.requestUpdate("uploadStatus")},3e3))},onError:e=>{this.uploadStatus[i]&&(this.uploadStatus[i].status="error",this.uploadStatus[i].error=e,this.requestUpdate("uploadStatus"),this.dispatchEvent(new CustomEvent("cdtr-upload-error",{detail:{uploadId:i,fileName:t.name,error:e},bubbles:!0,composed:!0})),setTimeout(()=>{delete this.uploadStatus[i],this.requestUpdate("uploadStatus")},5e3))}}),this.opened=!1}onSearch(e){const{value:t,isLiked:s}=e.detail;s?this.eventEmitter.dispatch("load-files",{isLiked:s,resolve:e=>{Array.isArray(e)?this.files=[...e]:console.error("files is not array",e)}}):t.trim().length>2?this.eventEmitter.dispatch("load-files",{filter:"name",search:t,resolve:e=>{this.files=[...e]}}):0===t.trim().length&&this.reset()}onFilter(e){const t=e.detail;this.eventEmitter.dispatch("load-files",{filter:"name",search:t.value})}onSelectFolder(e){const t=e.detail,s=this.sortBy,i=t.id;this.dirId=i,this.eventEmitter.dispatch("load-files",{filter:"dir",dirId:i,sortBy:s,resolve:e=>{this.files=e}})}oncreateNewFolder(e){const t=e.detail;this.eventEmitter.dispatch("create-folder",{name:t,resolve:e=>{this.folders||(this.folders=[]);const t=[...this.folders];t.forEach(e=>e.selected=!1),e.selected=!0,t.unshift(e),this.folders=t,this.onSelectFolder({detail:e})}})}onMoveFile(e){const t=e.detail;this.eventEmitter.dispatch("on-move-file",{data:t,resolve:e=>{if(this.folders||(this.folders=[]),this.dirId===t.folderId)return;const s=this.files.findIndex(e=>e.id===t.fileId);if(-1!==s){const e=[...this.files];e[s].moved=!0,this.files=e}const i=this.folders.findIndex(e=>e.id===t.folderId);if(-1!==i){const e=[...this.folders];e[i].file_count+=1,this.folders=e}}})}onLike(e){const t=e.detail;this.eventEmitter.dispatch("on-like",{fileId:t.id,resolve:e=>{const s=this.files.findIndex(e=>e.id===t.id);if(-1!==s){const e=[...this.files];e[s].isLiked=!e[s].isLiked,this.files=e}}})}onselectFile(e){const t={detail:e.detail,bubbles:!1,composed:!1};this.dispatchEvent(new CustomEvent("file",t))}close(){this.dispatchEvent(new CustomEvent("close",{}))}onDleteFile(e){const t=e.detail;this.eventEmitter.dispatch("delete-file",{id:t.id,type:"image",resolve:e=>{const s=this.files.findIndex(e=>e.id===t.id);if(-1!==s){const e=[...this.files];e.splice(s,1),this.files=e}}})}onLoadMore(){this.eventEmitter.dispatch("lazy-load-files-on-scroll",{resolve:e=>{if(Array.isArray(e)&&e.length>0){const t=[...this.files,...e];this.files=t}}})}onDeleteFolder(e){const t=e.detail;this.eventEmitter.dispatch("delete-folder",{id:t.id,resolve:e=>{this.folders||(this.folders=[]);const s=this.folders.findIndex(e=>e.id===t.id);if(-1!==s){const e=[...this.folders];e.splice(s,1),this.folders=e}}})}connectedCallback(){super.connectedCallback(),m.vP.on("on:upload-file","gallery:on:upload-file",async e=>{let{image:t,type:s}=e;if("base64"===s){const e=t.split(",")[1]||t,s=atob(e),i=new Array(s.length);for(let e=0;e<s.length;e++)i[e]=s.charCodeAt(e);const r=new Uint8Array(i),o=new Blob([r],{type:"image/png"}),l=new File([o],"uploaded-image.png",{type:"image/png"});this.uploadFile({detail:l})}else if("url"===s){const e=await fetch(t),s=await e.blob(),i=new File([s],"uploaded-image.png",{type:s.type||"image/png"});this.uploadFile({detail:i})}})}render(){return i.qy`
627
627
  <cdtr-upload-loading></cdtr-upload-loading>
628
628
  <cdtr-upload-progress-monitor></cdtr-upload-progress-monitor>
629
629
  <cdtr-drawer
@@ -651,10 +651,10 @@
651
651
  .multi=${this.multi}
652
652
  .folders=${this.folders}
653
653
  ></cdtr-gallery-files>
654
- </cdtr-drawer>`}}(0,i.A)(v,"styles",r.AH``),(0,i.A)(v,"properties",{folders:{type:Array},files:{type:Array},pageCount:{type:Number},prevUrl:{type:String},nextUrl:{type:String},opened:{type:Boolean},multi:{type:Boolean},uploadStatus:{type:Object}}),customElements.define("cdtr-gallery",v)},2590(e,t,s){s.r(t),s.d(t,{TitleEditor:()=>l});var i=s(24586),r=s(59929),o=s(86319);class l extends r.WF{constructor(){super(),this.text="",this.whiteSpace="pre"}connectedCallback(){super.connectedCallback(),this.style.fontFamily="var(--font-family)",this.bold&&(this.style.fontWeight="bold")}render(){const e=o.M.get("theme");e&&(this.style.direction=e.direction,this.style.textAlign=this.textAlign||e.textAlign);const t=o.M.get("lang",this.text);return r.qy`<slot
654
+ </cdtr-drawer>`}}g.styles=i.AH``,g.properties={folders:{type:Array},files:{type:Array},pageCount:{type:Number},prevUrl:{type:String},nextUrl:{type:String},opened:{type:Boolean},multi:{type:Boolean},uploadStatus:{type:Object}},customElements.define("cdtr-gallery",g)},2590(e,t,s){s.r(t),s.d(t,{TitleEditor:()=>o});var i=s(59929),r=s(86319);class o extends i.WF{constructor(){super(),this.text="",this.whiteSpace="pre"}connectedCallback(){super.connectedCallback(),this.style.fontFamily="var(--font-family)",this.bold&&(this.style.fontWeight="bold")}render(){const e=r.M.get("theme");e&&(this.style.direction=e.direction,this.style.textAlign=this.textAlign||e.textAlign);const t=r.M.get("lang",this.text);return i.qy`<slot
655
655
  ><span
656
656
  style="-webkit-font-smoothing: antialiased;text-transform:capitalize;
657
657
  display:inline-block;direction:var(--direction-locale);text-align:var(--text-align-locale);white-space:${this.whiteSpace}"
658
658
  >${t||this.text}</span
659
659
  ></slot
660
- >`}}(0,i.A)(l,"properties",{text:{type:String,reflect:!1},whiteSpace:{type:String},textAlign:{type:String},bold:{type:Boolean}}),customElements.get("lang-text")||customElements.define("lang-text",l)},13681(e,t,s){s.d(t,{vP:()=>c});const i=window.cdtrSignalKey||`___${Math.random().toString(36).substr(2,9)}`;window.cdtrSignalKey=i,window[i]||(window[i]={});const r=window[i],o=window.__cdtrEvents||{};function l(e){return crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e)).then(e=>Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,"0")).join(""))}function a(e){if(e.length%2!=0)throw new Error("Invalid hex string");const t=new Uint8Array(e.length/2);for(let s=0;s<e.length;s+=2)t[s/2]=parseInt(e.substr(s,2),16);return t}async function n(e){const t=await l(e),s=r[t];if(s){const e=await crypto.subtle.importKey("raw",a(t),{name:"AES-GCM"},!1,["encrypt","decrypt"]),i=await async function(e,t,s){const i=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,s);return(new TextDecoder).decode(i)}(e,s.iv,s.encrypted);return JSON.parse(i)}return null}function d(e,t){if(o[e])for(const s in o[e])Object.prototype.hasOwnProperty.call(o[e],s)&&o[e][s].forEach(e=>e(t));Array.isArray(o["*"])&&o["*"].forEach(e=>e(t))}window.__cdtrEvents=o;const c={set:async function(e,t){const s=JSON.parse(JSON.stringify(t)),i=await l(e),n=await crypto.subtle.importKey("raw",a(i),{name:"AES-GCM"},!1,["encrypt","decrypt"]),c=await async function(e,t){const s=crypto.getRandomValues(new Uint8Array(12)),i=(new TextEncoder).encode(t),r=await crypto.subtle.encrypt({name:"AES-GCM",iv:s},e,i);return{iv:s,encrypted:new Uint8Array(r)}}(n,JSON.stringify(s));r[i]=c,o.set&&o.set[i]&&o.set[i].forEach(e=>e(s)),Array.isArray(o["*"])&&o["*"].forEach(e=>e(s)),d(e,s)},get:n,remove:async function(e){const t=await l(e);delete r[t]},on:async function(e,t,s){o[e]||(o[e]={});const i=await l(t);o[e][i]||(o[e][i]=[]),o[e][i].push(e=>{!function(){const e=(new Error).stack;if(e&&e.indexOf(" at <anonymous>:1")>-1)throw console.warn("Function call blocked: Detected console execution."),new Error("Function call blocked: Detected console execution.")}(),s(e)});const r=await n(t);return r&&s(r),i},off:function(e,t){o[e]&&o[e][t]&&delete o[e][t]},dispatch:d,OPTIONS:{SET:"set"}}}}]);
660
+ >`}}o.properties={text:{type:String,reflect:!1},whiteSpace:{type:String},textAlign:{type:String},bold:{type:Boolean}},customElements.get("lang-text")||customElements.define("lang-text",o)},13681(e,t,s){s.d(t,{vP:()=>c});const i=window.cdtrSignalKey||`___${Math.random().toString(36).substr(2,9)}`;window.cdtrSignalKey=i,window[i]||(window[i]={});const r=window[i],o=window.__cdtrEvents||{};function l(e){return crypto.subtle.digest("SHA-256",(new TextEncoder).encode(e)).then(e=>Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,"0")).join(""))}function a(e){if(e.length%2!=0)throw new Error("Invalid hex string");const t=new Uint8Array(e.length/2);for(let s=0;s<e.length;s+=2)t[s/2]=parseInt(e.substr(s,2),16);return t}async function n(e){const t=await l(e),s=r[t];if(s){const e=await crypto.subtle.importKey("raw",a(t),{name:"AES-GCM"},!1,["encrypt","decrypt"]),i=await async function(e,t,s){const i=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,s);return(new TextDecoder).decode(i)}(e,s.iv,s.encrypted);return JSON.parse(i)}return null}function d(e,t){if(o[e])for(const s in o[e])Object.prototype.hasOwnProperty.call(o[e],s)&&o[e][s].forEach(e=>e(t));Array.isArray(o["*"])&&o["*"].forEach(e=>e(t))}window.__cdtrEvents=o;const c={set:async function(e,t){const s=JSON.parse(JSON.stringify(t)),i=await l(e),n=await crypto.subtle.importKey("raw",a(i),{name:"AES-GCM"},!1,["encrypt","decrypt"]),c=await async function(e,t){const s=crypto.getRandomValues(new Uint8Array(12)),i=(new TextEncoder).encode(t),r=await crypto.subtle.encrypt({name:"AES-GCM",iv:s},e,i);return{iv:s,encrypted:new Uint8Array(r)}}(n,JSON.stringify(s));r[i]=c,o.set&&o.set[i]&&o.set[i].forEach(e=>e(s)),Array.isArray(o["*"])&&o["*"].forEach(e=>e(s)),d(e,s)},get:n,remove:async function(e){const t=await l(e);delete r[t]},on:async function(e,t,s){o[e]||(o[e]={});const i=await l(t);o[e][i]||(o[e][i]=[]),o[e][i].push(e=>{!function(){const e=(new Error).stack;if(e&&e.indexOf(" at <anonymous>:1")>-1)throw console.warn("Function call blocked: Detected console execution."),new Error("Function call blocked: Detected console execution.")}(),s(e)});const r=await n(t);return r&&s(r),i},off:function(e,t){o[e]&&o[e][t]&&delete o[e][t]},dispatch:d,OPTIONS:{SET:"set"}}}}]);
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7238],{97238(t,e,n){n.r(e),n.d(e,{TextEditorPlugin:()=>d});var i=n(24586),o=n(59929),r=n(9507),s=n(40120),c=n(86319),a=n(75068),l=n.n(a);class d extends o.WF{constructor(){super(),(0,i.A)(this,"setHeading",t=>{this.editors.forEach(e=>{e.chain().setHeading({level:t}).run()})}),(0,i.A)(this,"onchangeFontFamily",t=>{const e=t.target.value,n=this.fontFamilies.find(t=>t.name===e);n?(this.editors.forEach(t=>{const e=t.view.state.selection;e.from===e.to?t.chain().selectAll().setFontFamily(n).run():t.chain().setFontFamily(n).run()}),this.fontFamily=e):console.error("cant set font family, font family not founded..")}),(0,i.A)(this,"onChangeFontSize",t=>{const e=t.target.device;this.device=e;const n=t.target.value;"phone"===e?r.Ay.execCommand("breakpoints",t=>{const e=t.props.breakpoints?.sm||{};l()(e,{style:{fontSize:n+"px"}});return{sm:e}}):this.editors.forEach(t=>{const e=t.view.state.selection;e.from===e.to?t.chain().selectAll().setFontSize(n).run():t.chain().setFontSize(n).run()}),this.fontSize=n}),(0,i.A)(this,"onChangeLineHeight",t=>{const e=parseFloat(t.target.value);this.editors.forEach(t=>{const n=t.view.state.selection;n.from===n.to?t.chain().selectAll().setLineHeight(e).run():t.chain().setLineHeight(e).run()}),this.lineHeight=e}),(0,i.A)(this,"onChangeletterSpace",t=>{const e=t.target.value+"px";this.editors.forEach(t=>{const n=t.view.state.selection;n.from===n.to?t.chain().selectAll().setLetterSpacing(e).run():t.chain().setLetterSpacing(e).run()}),this.letterSpacing=e}),(0,i.A)(this,"onChangeImage",t=>{}),(0,i.A)(this,"onFilteredFonts",t=>{const e=t.target.value;this.filteredFonts=this.fontFamilies.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))}),(0,i.A)(this,"onChangeFontColor",t=>{const e=t.target.value;this.editors.forEach(t=>{const n=t.view.state.selection;n.from===n.to?t.chain().selectAll().setColor(e).run():t.chain().setColor(e).run()}),this.fontColor=e}),this.editors=[],this.hasTextComponent=!0,this.filteredFonts=[],this.fontFamilies=[],this.onConnect=this.onConnect.bind(this),this.THEMES=[{type:"paragraph",onClick:()=>{this.editors.forEach(t=>{t.chain().setParagraph().run()})}},{type:"h1",onClick:()=>this.setHeading(1)},{type:"h2",onClick:()=>this.setHeading(2)},{type:"h3",onClick:()=>this.setHeading(3)},{type:"h4",onClick:()=>this.setHeading(4)},{type:"h5",onClick:()=>this.setHeading(5)},{type:"h5",onClick:()=>this.setHeading(5)}]}onConnect(){setTimeout(()=>{this.editors=[];const t=r.Ay.getSelectedComponent({find:"text"});if(this.hasTextComponent=t.length>0,t.forEach(t=>{"text"===t.type&&this.editors.push(t.editor)}),this.editors.length>0){const e=this.editors[0];if(e){const n={...e.getAttributes("paragraph"),...e.getAttributes("heading")};"phone"===this.device?this.fontSize=parseInt(t[0].props?.breakpoints?.sm?.style?.fontSize):this.fontSize=parseInt(e.getAttributes("textStyle").fontSize)||16,this.fontColor=e.getAttributes("textStyle").color||"#000",this.fontFamily=e.getAttributes("textStyle").fontFamily?.split(",")[0].replace(/['"]+/g,"")||"Arial",n.lineHeight&&(this.lineHeight=parseFloat(n.lineHeight)),n.letterSpacing&&(this.letterSpacing=parseInt(n.letterSpacing)||1),this.themeType=e.isActive("heading",{level:1})?"h1":e.isActive("heading",{level:2})?"h2":e.isActive("heading",{level:3})?"h3":e.isActive("heading",{level:4})?"h4":e.isActive("heading",{level:5})?"h5":e.isActive("heading",{level:6})?"h6":"paragraph"}}},0)}connectedCallback(){super.connectedCallback(),r.Ay.on("select",this.onConnect),r.Ay.on("update",this.onConnect),this.onConnect(),(0,s.VH)().then(t=>{this.filteredFonts=this.fontFamilies=t})}disconnectedCallback(){super.disconnectedCallback(),r.Ay.off("select",this.onConnect),r.Ay.off("update",this.onConnect)}render(){const t=o.qy`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7238],{97238(t,e,n){n.r(e),n.d(e,{TextEditorPlugin:()=>l});var i=n(59929),o=n(9507),r=n(40120),s=n(86319),c=n(75068),a=n.n(c);class l extends i.WF{constructor(){super(),this.setHeading=t=>{this.editors.forEach(e=>{e.chain().setHeading({level:t}).run()})},this.onchangeFontFamily=t=>{const e=t.target.value,n=this.fontFamilies.find(t=>t.name===e);n?(this.editors.forEach(t=>{const e=t.view.state.selection;e.from===e.to?t.chain().selectAll().setFontFamily(n).run():t.chain().setFontFamily(n).run()}),this.fontFamily=e):console.error("cant set font family, font family not founded..")},this.onChangeFontSize=t=>{const e=t.target.device;this.device=e;const n=t.target.value;"phone"===e?o.Ay.execCommand("breakpoints",t=>{const e=t.props.breakpoints?.sm||{};a()(e,{style:{fontSize:n+"px"}});return{sm:e}}):this.editors.forEach(t=>{const e=t.view.state.selection;e.from===e.to?t.chain().selectAll().setFontSize(n).run():t.chain().setFontSize(n).run()}),this.fontSize=n},this.onChangeLineHeight=t=>{const e=parseFloat(t.target.value);this.editors.forEach(t=>{const n=t.view.state.selection;n.from===n.to?t.chain().selectAll().setLineHeight(e).run():t.chain().setLineHeight(e).run()}),this.lineHeight=e},this.onChangeletterSpace=t=>{const e=t.target.value+"px";this.editors.forEach(t=>{const n=t.view.state.selection;n.from===n.to?t.chain().selectAll().setLetterSpacing(e).run():t.chain().setLetterSpacing(e).run()}),this.letterSpacing=e},this.onChangeImage=t=>{},this.onFilteredFonts=t=>{const e=t.target.value;this.filteredFonts=this.fontFamilies.filter(t=>t.name.toLowerCase().includes(e.toLowerCase()))},this.onChangeFontColor=t=>{const e=t.target.value;this.editors.forEach(t=>{const n=t.view.state.selection;n.from===n.to?t.chain().selectAll().setColor(e).run():t.chain().setColor(e).run()}),this.fontColor=e},this.editors=[],this.hasTextComponent=!0,this.filteredFonts=[],this.fontFamilies=[],this.onConnect=this.onConnect.bind(this),this.THEMES=[{type:"paragraph",onClick:()=>{this.editors.forEach(t=>{t.chain().setParagraph().run()})}},{type:"h1",onClick:()=>this.setHeading(1)},{type:"h2",onClick:()=>this.setHeading(2)},{type:"h3",onClick:()=>this.setHeading(3)},{type:"h4",onClick:()=>this.setHeading(4)},{type:"h5",onClick:()=>this.setHeading(5)},{type:"h5",onClick:()=>this.setHeading(5)}]}onConnect(){setTimeout(()=>{this.editors=[];const t=o.Ay.getSelectedComponent({find:"text"});if(this.hasTextComponent=t.length>0,t.forEach(t=>{"text"===t.type&&this.editors.push(t.editor)}),this.editors.length>0){const e=this.editors[0];if(e){const n={...e.getAttributes("paragraph"),...e.getAttributes("heading")};"phone"===this.device?this.fontSize=parseInt(t[0].props?.breakpoints?.sm?.style?.fontSize):this.fontSize=parseInt(e.getAttributes("textStyle").fontSize)||16,this.fontColor=e.getAttributes("textStyle").color||"#000",this.fontFamily=e.getAttributes("textStyle").fontFamily?.split(",")[0].replace(/['"]+/g,"")||"Arial",n.lineHeight&&(this.lineHeight=parseFloat(n.lineHeight)),n.letterSpacing&&(this.letterSpacing=parseInt(n.letterSpacing)||1),this.themeType=e.isActive("heading",{level:1})?"h1":e.isActive("heading",{level:2})?"h2":e.isActive("heading",{level:3})?"h3":e.isActive("heading",{level:4})?"h4":e.isActive("heading",{level:5})?"h5":e.isActive("heading",{level:6})?"h6":"paragraph"}}},0)}connectedCallback(){super.connectedCallback(),o.Ay.on("select",this.onConnect),o.Ay.on("update",this.onConnect),this.onConnect(),(0,r.VH)().then(t=>{this.filteredFonts=this.fontFamilies=t})}disconnectedCallback(){super.disconnectedCallback(),o.Ay.off("select",this.onConnect),o.Ay.off("update",this.onConnect)}render(){const t=i.qy`
2
2
  <cdtr-editor-container>
3
3
  <cdtr-title style="color:var(--micro-info-color)">
4
4
  <i>
@@ -20,7 +20,7 @@
20
20
  >${this.themeType}</cdtr-dropdown-button
21
21
  >
22
22
  <div slot="content">
23
- ${this.THEMES.map(t=>o.qy`<cdtr-dropdown-item
23
+ ${this.THEMES.map(t=>i.qy`<cdtr-dropdown-item
24
24
  .value=${t.type}
25
25
  .focused=${t.type===this.themeType}
26
26
  .selected=${t.type===this.fontFamily}
@@ -67,11 +67,11 @@
67
67
  </cdtr-dropdown-button>
68
68
  <div slot="content">
69
69
  <cdtr-input
70
- .placeholder="${c.M.get("lang","search")}.."
70
+ .placeholder="${s.M.get("lang","search")}.."
71
71
  @input=${this.onFilteredFonts}
72
72
  type="search"
73
73
  ></cdtr-input>
74
- ${this.filteredFonts.map(t=>o.qy`<cdtr-dropdown-item
74
+ ${this.filteredFonts.map(t=>i.qy`<cdtr-dropdown-item
75
75
  .focused=${t.name===this.fontFamily}
76
76
  .selected=${t.name===this.fontFamily}
77
77
  value="${t.name}"
@@ -124,8 +124,8 @@
124
124
  min="8"
125
125
  ></cdtr-range-device-editor>
126
126
  </cdtr-editor-container>
127
- `;return this.hasTextComponent?o.qy`${t} `:null}}(0,i.A)(d,"properties",{themeType:{type:String},fontFamily:{type:String},fontSize:{type:Number},fontColor:{type:String},lineHeight:{type:Number},letterSpacing:{type:Number},fontFamilies:{type:Array},filteredFonts:{type:Array},hasTextComponent:{type:Boolean},accordion:{type:Boolean},isOpen:{type:Boolean},device:{type:String}}),(0,i.A)(d,"styles",o.AH`
127
+ `;return this.hasTextComponent?i.qy`${t} `:null}}l.properties={themeType:{type:String},fontFamily:{type:String},fontSize:{type:Number},fontColor:{type:String},lineHeight:{type:Number},letterSpacing:{type:Number},fontFamilies:{type:Array},filteredFonts:{type:Array},hasTextComponent:{type:Boolean},accordion:{type:Boolean},isOpen:{type:Boolean},device:{type:String}},l.styles=i.AH`
128
128
  .dropdown-button {
129
129
  min-width: 100px;
130
130
  }
131
- `),customElements.define("cdtr-text-editor-plugin",d)}}]);
131
+ `,customElements.define("cdtr-text-editor-plugin",l)}}]);
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7255],{7255(t,e,i){i.r(e),i.d(e,{MoreIcon:()=>c});var s=i(24586),r=i(59929);class c extends r.WF{constructor(){super(),this.iconStyle=""}render(){return r.qy` <svg style="${this.iconStyle}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z" /><path d="M12 3c-.825 0-1.5.675-1.5 1.5S11.175 6 12 6s1.5-.675 1.5-1.5S12.825 3 12 3zm0 15c-.825 0-1.5.675-1.5 1.5S11.175 21 12 21s1.5-.675 1.5-1.5S12.825 18 12 18zm0-7.5c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5 1.5-.675 1.5-1.5-.675-1.5-1.5-1.5z" /></svg>`}}(0,s.A)(c,"styles",r.AH`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7255],{7255(t,e,i){i.r(e),i.d(e,{MoreIcon:()=>r});var s=i(59929);class r extends s.WF{constructor(){super(),this.iconStyle=""}render(){return s.qy` <svg style="${this.iconStyle}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z" /><path d="M12 3c-.825 0-1.5.675-1.5 1.5S11.175 6 12 6s1.5-.675 1.5-1.5S12.825 3 12 3zm0 15c-.825 0-1.5.675-1.5 1.5S11.175 21 12 21s1.5-.675 1.5-1.5S12.825 18 12 18zm0-7.5c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5 1.5-.675 1.5-1.5-.675-1.5-1.5-1.5z" /></svg>`}}r.styles=s.AH`
2
2
  :host {
3
3
  --cdtr-icon-width: 20px;
4
4
  --cdtr-icon-height: 20px;
@@ -8,4 +8,4 @@
8
8
  height: var(--cdtr-icon-height);
9
9
  fill: var(--cdtr-icon-color);
10
10
  }
11
- `),(0,s.A)(c,"properties",{iconStyle:{type:String}}),customElements.define("cdtr-more-icon",c)}}]);
11
+ `,r.properties={iconStyle:{type:String}},customElements.define("cdtr-more-icon",r)}}]);
Binary file
@@ -1,8 +1,8 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7307],{47307(t,e,s){s.r(e),s.d(e,{default:()=>r});var i=s(24586),n=s(59929),a=s(21421),o=s(91597),l=s(81744),c=s(86319);const u=(0,o.S)();class r extends n.WF{constructor(){super(),(0,i.A)(this,"inputRef",(0,a._)()),this.min=0,this.max=100,this.step=1,this.autofocus=!1,this.type="text",this.value="number"===this.type?"0":"",this.placeholder="",this.oldValue=this.value,this.successActive=!1,this._successTimeout=null}onSubmit(t){t.preventDefault();const e=new UIEvent("submit",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e),this.oldValue=this.value}focus(){const t=this.inputRef.value;t.focus(),t.setSelectionRange(t.value.length,t.value.length)}onFocus(){const t=new UIEvent("focus",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}onBlur(){const t=new UIEvent("blur",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),this.oldValue=this.value}render(){this.fullWidth&&(this.style.width="100%"),this.value||"text"!==this.type||(this.value=""),this.icon&&"string"!=typeof this.inputStyle&&(this.inputStyle="");const t=c.M.get("lang",this.placeholder)||this.placeholder||"";t&&("string"!=typeof this.inputStyle&&(this.inputStyle=""),-1===this.inputStyle.indexOf("text-align")&&(this.inputStyle+=";text-align:"+("rtl"===(0,l.o)(t)?"right":"")));const e=this.multiline?n.qy` <textarea
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7307],{47307(t,e,s){s.r(e),s.d(e,{default:()=>u});var i=s(59929),n=s(21421),a=s(91597),o=s(81744),l=s(86319);const c=(0,a.S)();class u extends i.WF{constructor(){super(),this.inputRef=(0,n._)(),this.min=0,this.max=100,this.step=1,this.autofocus=!1,this.type="text",this.value="number"===this.type?"0":"",this.placeholder="",this.oldValue=this.value,this.successActive=!1,this._successTimeout=null}onSubmit(t){t.preventDefault();const e=new UIEvent("submit",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e),this.oldValue=this.value}focus(){const t=this.inputRef.value;t.focus(),t.setSelectionRange(t.value.length,t.value.length)}onFocus(){const t=new UIEvent("focus",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}onBlur(){const t=new UIEvent("blur",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),this.oldValue=this.value}render(){this.fullWidth&&(this.style.width="100%"),this.value||"text"!==this.type||(this.value=""),this.icon&&"string"!=typeof this.inputStyle&&(this.inputStyle="");const t=l.M.get("lang",this.placeholder)||this.placeholder||"";t&&("string"!=typeof this.inputStyle&&(this.inputStyle=""),-1===this.inputStyle.indexOf("text-align")&&(this.inputStyle+=";text-align:"+("rtl"===(0,o.o)(t)?"right":"")));const e=this.multiline?i.qy` <textarea
2
2
  row=${this.row||4}
3
3
  .disabled=${this.disabled}
4
4
  dir="auto"
5
- ${(0,a.K)(this.inputRef)}
5
+ ${(0,n.K)(this.inputRef)}
6
6
  style="${this.inputStyle}"
7
7
  .autofocus="${this.autofocus}"
8
8
  .placeholder="${t}"
@@ -12,10 +12,10 @@
12
12
  .max="${String(this.max)}"
13
13
  .step="${String(this.step)}"
14
14
  .value="${String(this.value)}"
15
- />`:n.qy` <input
15
+ />`:i.qy` <input
16
16
  .disabled=${this.disabled}
17
17
  dir="auto"
18
- ${(0,a.K)(this.inputRef)}
18
+ ${(0,n.K)(this.inputRef)}
19
19
  style="${this.inputStyle}"
20
20
  .autofocus="${this.autofocus}"
21
21
  .placeholder="${t}"
@@ -26,9 +26,9 @@
26
26
  .max="${String(this.max)}"
27
27
  .step="${String(this.step)}"
28
28
  .value="${String(this.value)}"
29
- />`;return n.qy`<form @submit=${this.onSubmit}>
29
+ />`;return i.qy`<form @submit=${this.onSubmit}>
30
30
  ${e}
31
- ${!this.icon||this.couchOnEmpty||this.successActive?null:n.qy`<cdtr-icon
31
+ ${!this.icon||this.couchOnEmpty||this.successActive?null:i.qy`<cdtr-icon
32
32
  color="#d9d9d9"
33
33
  width=${20}
34
34
  height=${20}
@@ -37,19 +37,19 @@
37
37
  left: 10px;"
38
38
  icon="${this.icon}"
39
39
  ></cdtr-icon>`}
40
- ${this.successActive?n.qy`<div class="success-overlay" aria-live="polite">
40
+ ${this.successActive?i.qy`<div class="success-overlay" aria-live="polite">
41
41
  <cdtr-couch-mark></cdtr-couch-mark>
42
42
  <span class="success-icon">✓</span>
43
43
  </div>`:null}
44
- ${!this.couchOnEmpty||this.value||this.successActive?null:n.qy`<cdtr-couch-mark
44
+ ${!this.couchOnEmpty||this.value||this.successActive?null:i.qy`<cdtr-couch-mark
45
45
  style="position: absolute;
46
46
  transform: translateY(-50%);
47
47
  left: 0;"
48
48
  ></cdtr-couch-mark>`}
49
- ${"text"===this.type&&this.maxLength?n.qy`<span class="counter"
49
+ ${"text"===this.type&&this.maxLength?i.qy`<span class="counter"
50
50
  >${this.value.length}/${this.maxLength}</span
51
51
  > `:null}
52
- </form>`}firstUpdated(){this.autofocus&&setTimeout(()=>{this.inputRef.value&&this.inputRef.value.focus()},500),void 0===this.value&&(this.value="")}focus(){super.focus(),this.inputRef.value.focus()}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null)}setValue(t){if(this.selectionStart=this.inputRef.value.selectionStart,!this.inputRef.value)return;const e=this.inputRef.value;if("text"===this.type&&this.max&&e.value.length>this.max)return e.value=this.value,void this.inputRef.value.focus();this.value=e.value;const s=new UIEvent(t.type,{view:window,bubbles:!0,cancelable:!0});if(this.dispatchEvent(s),"input"===t.type){const t=()=>{const t=new UIEvent("debounce",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)};u.run(t,500)}}success(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3;this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null),this.successActive=!0;const e=Number(t);!Number.isFinite(e)||e<=0||(this._successTimeout=setTimeout(()=>{this.successActive=!1,this._successTimeout=null},e))}patch(t){this.value=t}}(0,i.A)(r,"styles",n.AH`
52
+ </form>`}firstUpdated(){this.autofocus&&setTimeout(()=>{this.inputRef.value&&this.inputRef.value.focus()},500),void 0===this.value&&(this.value="")}focus(){super.focus(),this.inputRef.value.focus()}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null)}setValue(t){if(this.selectionStart=this.inputRef.value.selectionStart,!this.inputRef.value)return;const e=this.inputRef.value;if("text"===this.type&&this.max&&e.value.length>this.max)return e.value=this.value,void this.inputRef.value.focus();this.value=e.value;const s=new UIEvent(t.type,{view:window,bubbles:!0,cancelable:!0});if(this.dispatchEvent(s),"input"===t.type){const t=()=>{const t=new UIEvent("debounce",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)};c.run(t,500)}}success(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3;this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null),this.successActive=!0;const e=Number(t);!Number.isFinite(e)||e<=0||(this._successTimeout=setTimeout(()=>{this.successActive=!1,this._successTimeout=null},e))}patch(t){this.value=t}}u.styles=i.AH`
53
53
  :host {
54
54
  display: inline-block;
55
55
  --cdtr-input-height: 30px;
@@ -183,4 +183,4 @@
183
183
  box-shadow: 0 0 10px rgba(79, 192, 111, 0.2);
184
184
  }
185
185
  }
186
- `),(0,i.A)(r,"properties",{value:{type:String,reflect:!0},step:{type:Number,reflect:!0},min:{type:Number,reflect:!0},max:{type:Number,reflect:!0},type:{type:String,reflect:!0},inputDir:{type:String},icon:{type:String,reflect:!0},placeholder:{type:String,reflect:!0},autofocus:{type:Boolean,reflect:!0},fullWidth:{type:Boolean,reflect:!0},selectionStart:{type:Number},inputStyle:{type:String,reflect:!0},maxLength:{type:Number},couchOnEmpty:{type:Boolean},disabled:{type:Boolean},multiline:{type:Boolean},row:{type:Number},successActive:{type:Boolean}}),customElements.get("cdtr-input")||customElements.define("cdtr-input",r)}}]);
186
+ `,u.properties={value:{type:String,reflect:!0},step:{type:Number,reflect:!0},min:{type:Number,reflect:!0},max:{type:Number,reflect:!0},type:{type:String,reflect:!0},inputDir:{type:String},icon:{type:String,reflect:!0},placeholder:{type:String,reflect:!0},autofocus:{type:Boolean,reflect:!0},fullWidth:{type:Boolean,reflect:!0},selectionStart:{type:Number},inputStyle:{type:String,reflect:!0},maxLength:{type:Number},couchOnEmpty:{type:Boolean},disabled:{type:Boolean},multiline:{type:Boolean},row:{type:Number},successActive:{type:Boolean}},customElements.get("cdtr-input")||customElements.define("cdtr-input",u)}}]);
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[738],{60738(t,e,s){s.r(e),s.d(e,{CloseIcon:()=>h});var i=s(24586),r=s(59929);class h extends r.WF{constructor(){super(),this.iconStyle="",this.width="24",this.height="24"}render(){return r.qy`<svg
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[738],{60738(t,e,s){s.r(e),s.d(e,{CloseIcon:()=>r});var i=s(59929);class r extends i.WF{constructor(){super(),this.iconStyle="",this.width="24",this.height="24"}render(){return i.qy`<svg
2
2
  style="${this.iconStyle}"
3
3
  width="${this.width}"
4
4
  height="${this.height}"
@@ -11,4 +11,4 @@
11
11
  <path
12
12
  d="M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"
13
13
  ></path>
14
- </svg>`}}(0,i.A)(h,"styles",r.AH``),(0,i.A)(h,"properties",{iconStyle:{type:String},width:{type:String},height:{type:String}}),customElements.define("cdtr-close-icon",h)}}]);
14
+ </svg>`}}r.styles=i.AH``,r.properties={iconStyle:{type:String},width:{type:String},height:{type:String}},customElements.define("cdtr-close-icon",r)}}]);
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7380],{27380(e,t,i){i.r(t),i.d(t,{FolderIcon:()=>s});var r=i(24586),o=i(59929);class s extends o.WF{constructor(){super(),this.iconStyle="",this.width="24",this.height="24"}render(){return o.qy`<svg
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7380],{27380(e,t,i){i.r(t),i.d(t,{FolderIcon:()=>o});var r=i(59929);class o extends r.WF{constructor(){super(),this.iconStyle="",this.width="24",this.height="24"}render(){return r.qy`<svg
2
2
  class="_1C-Vw-oio9_ZWjQnvpMqhl"
3
3
  xmlns="http://www.w3.org/2000/svg"
4
4
  role="img"
@@ -16,4 +16,4 @@
16
16
  >
17
17
  <title id="folderIconTitle">Folder</title>
18
18
  <path d="M3 5h6l1 2h11v12H3z"></path>
19
- </svg>`}}(0,r.A)(s,"styles",o.AH``),(0,r.A)(s,"properties",{iconStyle:{type:String},width:{type:String},height:{type:String}}),customElements.define("cdtr-folder-icon",s)}}]);
19
+ </svg>`}}o.styles=r.AH``,o.properties={iconStyle:{type:String},width:{type:String},height:{type:String}},customElements.define("cdtr-folder-icon",o)}}]);
Binary file
@@ -1,9 +1,9 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[752],{40752(t,e,i){i.r(e),i.d(e,{EditorContainer:()=>o});var n=i(24586),a=i(59929);class o extends a.WF{constructor(){super(),this.pt="10px",this.isAnimate=!0}render(){return a.qy`<div
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[752],{40752(t,e,i){i.r(e),i.d(e,{EditorContainer:()=>a});var n=i(59929);class a extends n.WF{constructor(){super(),this.pt="10px",this.isAnimate=!0}render(){return n.qy`<div
2
2
  style="padding-top:${this.pt}"
3
3
  class="container ${this.isAnimate?"animate":""}"
4
4
  >
5
5
  <slot></slot>
6
- </div> `}}(0,n.A)(o,"styles",a.AH`
6
+ </div> `}}a.styles=n.AH`
7
7
  //create fade in animation
8
8
  :host{
9
9
  direction: var(--direction-locale);
@@ -37,4 +37,4 @@
37
37
  transform: translateX(0%);
38
38
  }
39
39
  }
40
- `),(0,n.A)(o,"properties",{pt:{type:String},isAnimate:{type:Boolean}}),customElements.define("cdtr-editor-container",o)}}]);
40
+ `,a.properties={pt:{type:String},isAnimate:{type:Boolean}},customElements.define("cdtr-editor-container",a)}}]);
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7523],{67523(t,e,r){r.r(e),r.d(e,{FormatColor:()=>h});var i=r(24586),o=r(59929);class h extends o.WF{constructor(){super(),this.iconStyle=""}render(){return o.qy`
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7523],{67523(t,e,r){r.r(e),r.d(e,{FormatColor:()=>o});var i=r(59929);class o extends i.WF{constructor(){super(),this.iconStyle=""}render(){return i.qy`
2
2
  <svg
3
3
  style=${this.iconStyle}
4
4
  xmlns="http://www.w3.org/2000/svg"
@@ -13,7 +13,7 @@
13
13
  />
14
14
  <path style="fill:${this.color}" d="M0 20h24v4H0z"></path>
15
15
  </svg>
16
- `}}(0,i.A)(h,"styles",o.AH`
16
+ `}}o.styles=i.AH`
17
17
  :host {
18
18
  display: inherit;
19
19
  --cdtr-icon-width: 20px;
@@ -24,4 +24,4 @@
24
24
  height: var(--cdtr-icon-height);
25
25
  color: var(--cdtr-icon-color);
26
26
  }
27
- `),(0,i.A)(h,"properties",{iconStyle:{type:String},color:{type:String}}),customElements.define("cdtr-text-format-color",h)}}]);
27
+ `,o.properties={iconStyle:{type:String},color:{type:String}},customElements.define("cdtr-text-format-color",o)}}]);
Binary file