@creaditor/web-starterkit 1.0.16 → 1.0.17

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.
@@ -0,0 +1 @@
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[7918],{47918(e,n,t){t.d(n,{default:()=>R});let o=!0;const a=e=>{{const{component:n,commands:t,helpers:a}=e,i=n.parent("col"),r=e=>"style"===e.text;return{select:e=>{let{changeTab:n,tab:t}=e;t.text||n("style")},tabs:e=>{const n=[{text:"style",selected:!0},{text:"interactions"},{text:"settings"}];return e?(n.forEach(n=>n.selected=n.text===e),n):n},layout:e=>{const{tab:a,changeTab:s,tabs:l}=e;return[{type:"heading",level:6,text:"image",active:()=>r(a)},{type:"gallery",active:()=>r(a),src:n.props.src,hasPreview:!0,previewWidth:n.props.style?.width,text:"openGalleryImage",justify:"flex-start",onChange:e=>{let n=e.detail;Array.isArray(n)&&(n=n[0]),t.execCommand("src",n.src)}},{type:"input",title:"altText",active:()=>r(a),value:n.props.alt||"",onChange:e=>{const n=e.target.value;t.execCommand("alt",n)}},{type:"input",title:"add_urlAddress_from_media_site",active:()=>r(a),value:n.props.src||"",onChange:e=>{const n=e.target.value;t.execCommand("src",n)}},{type:"checkbox",title:"fullWidthOnMobile",checked:!!n.props.isFullWidthOnMobile,active:()=>r(a),onChange:e=>{const n=e.target.checked;t.execCommand("isFullWidthOnMobile",n)}},{type:"heading",level:6,text:"size",active:()=>r(a)},{type:"checkbox",title:"keep_ratio",checked:!!o,active:()=>r(a),onChange:e=>{o=!o,s("style")}},{type:"slider",min:10,title:"size",active:()=>r(a)&&o,max:o?1e3:i?.element?.offsetWidth,value:parseInt(n.props.style.width),onInput:e=>{const n=e.target.value;t.execCommand("style",{width:n+"px",height:"auto"})}},{type:"slider",min:10,title:"width",active:()=>r(a)&&!o,max:o?1e3:i?.element?.offsetWidth,value:parseInt(n.props.style.width),onInput:e=>{const o=e.target.value,a=n.atomElement.getBoundingClientRect().height;t.execCommand("style",{width:o+"px",height:a+"px"})}},{type:"slider",min:10,title:"height",active:()=>r(a)&&!o,max:2*i?.element?.offsetWidth,value:parseInt(n.props.style.height),onInput:e=>{const o=e.target.value,a=n.atomElement.getBoundingClientRect().width;t.execCommand("style",{height:o+"px",width:a+"px"})}},{type:"heading",level:6,text:"border_design",active:()=>r(a)},{type:"radius",title:"radius",active:()=>r(a),min:0,max:parseInt(n.props.style.width)/2,value:parseInt(n.props.style.borderRadius),elementId:n.id,borderTopRightRadius:parseInt(n.props.style.borderTopRightRadius),borderTopLeftRadius:parseInt(n.props.style.borderTopLeftRadius),borderBottomRightRadius:parseInt(n.props.style.borderBottomRightRadius),borderBottomLeftRadius:parseInt(n.props.style.borderBottomLeftRadius),onInput:e=>{const n=e.target.json;t.execCommand("style",{borderTopRightRadius:n.borderTopRightRadius+"px",borderTopLeftRadius:n.borderTopLeftRadius+"px",borderBottomRightRadius:n.borderBottomRightRadius+"px",borderBottomLeftRadius:n.borderBottomLeftRadius+"px",borderRadius:null})}},{type:"heading",level:6,text:"alignment",active:()=>r(a)},{type:"dropdown",title:"horizontal_align",active:()=>r(a),value:"auto"===n.props.style.marginLeft&&"auto"===n.props.style.marginRight?"center":"auto"===n.props.style.marginLeft?"right":"left",items:[{value:"left",label:"left"},{value:"center",label:"center"},{value:"right",label:"right"}],onChange:e=>{const n=e.target.value,o={marginLeft:null,marginRight:null};"center"===n?(o.marginLeft="auto",o.marginRight="auto"):"right"===n?(o.marginLeft="auto",o.marginRight="0"):(o.marginLeft="0",o.marginRight="auto"),t.execCommand("style",o)}},{type:"dropdown",title:"vertical_align",active:()=>r(a),value:n.props.style.verticalAlign||"top",items:[{value:"top",label:"top"},{value:"middle",label:"middle"},{value:"bottom",label:"bottom"}],onChange:e=>{const n=e.target.value;t.execCommand("style",{verticalAlign:n})}},{type:"heading",level:6,text:"ai",active:()=>r(a)},{type:"imagePrompt",active:()=>r(a),onChange:e=>{e.target.value}},{type:"heading",level:6,text:"link",active:()=>"interactions"===a.text},{type:"linkpicker",href:n.props.onClick?.link,protocol:n.props.onClick?.link?.protocol,target:n.props.onClick?.link?.target,autofocus:!0,active:()=>"interactions"===a.text,onChange:e=>{const n={link:e.target.value};t.execCommand("onClick",n)}}]}}}};var i=t(52144);const r=()=>({set:(e,n,t)=>{switch(n){case"src":case"isFullWidthOnMobile":case"isOpenWithModal":case"isCircle":case"alt":case"onClick":return e[n]=t,!0;case"style":if("object"==typeof t)return e[n]=(0,i.A)(e[n],t),!0}}});var s=t(72591),l=t.n(s),c=t(88639),d=t.n(c),p=t(88128),A=t.n(p),u=t(30855),m=t.n(u),g=t(93051),h=t.n(g),y=t(98481),E={};E.setAttributes=m(),E.insert=A().bind(null,"head"),E.domAPI=d(),E.insertStyleElement=h();l()(y.A,E);const f=y.A&&y.A.locals?y.A.locals:void 0;function v(e){const n=document.createElement("div");n.className=f.wrapper;const t=document.createElement("div");t.className=f.skeleton;const o=document.createElement("div");o.className=f.shimmer,t.appendChild(o);const a=document.createElement("div");a.className=f.scanline,t.appendChild(a);const i=document.createElement("div");i.className=f.imageContainer,i.appendChild(e);let r=!1;function s(){if(!r)return;r=!1,n.classList.remove(f.loading),n.classList.add(f.revealed),e.classList.remove(f.imageHidden),e.classList.add(f.imageRevealed);const t=()=>{n.classList.remove(f.revealed),e.classList.remove(f.imageRevealed),e.removeEventListener("animationend",t)};e.addEventListener("animationend",t)}return e.addEventListener("load",s),e.addEventListener("error",s),{wrapper:n,showLoader:function(){(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||e.src&&!e.complete)&&(r=!0,n.classList.add(f.loading),e.classList.add(f.imageHidden))},hideLoader:s,wrap:function(e){n.appendChild(t),n.appendChild(i),e.appendChild(n)},skeleton:t}}var C=t(13681),b=t(86319);const w=(e,n)=>b.M.get("lang",e)||n;function x(e){const n=e?.props?.src;if(!n)return;const t=new Image;t.crossOrigin="anonymous";let o=!1;t.addEventListener("load",()=>o=!0),t.src=n;const a=document.createElement("div");a.style.cssText="\n position: fixed; inset: 0; z-index: 10000;\n display: flex; flex-direction: column; align-items: center; justify-content: center;\n gap: 16px; background: rgba(0,0,0,0.7);\n font-family: var(--font-family, Arial, Helvetica, sans-serif);\n ";const i=document.createElement("div");i.style.cssText="position: relative; line-height: 0; touch-action: none;";const r=document.createElement("img");r.src=n,r.draggable=!1,r.style.cssText="display: block; user-select: none; pointer-events: none; -webkit-user-drag: none;";const s=document.createElement("div");s.style.cssText="\n position: absolute; box-sizing: border-box;\n border: 1px solid #fff; cursor: move;\n box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);\n ";const l=["nw","ne","sw","se"],c={};l.forEach(e=>{const n=document.createElement("div"),t="n"===e[0]?"top: -6px;":"bottom: -6px;",o="w"===e[1]?"left: -6px;":"right: -6px;",a="nw"===e||"se"===e?"nwse-resize":"nesw-resize";n.style.cssText=`\n position: absolute; width: 12px; height: 12px; ${t} ${o}\n background: #fff; border-radius: 2px; cursor: ${a};\n `,n.dataset.corner=e,s.appendChild(n),c[e]=n});const d=document.createElement("div");d.style.cssText="position: relative; z-index: 1; display: flex; gap: 12px;";const p=(e,n)=>{const t=document.createElement("button");return t.type="button",t.textContent=e,t.style.cssText=`\n padding: 8px 20px; border-radius: 8px; border: none; cursor: pointer;\n font-family: inherit; font-size: 14px; font-weight: 600;\n ${n?"background: #6b4eff; color: #fff;":"background: rgba(255,255,255,0.15); color: #fff;"}\n `,t},A=p(w("cancel","Cancel"),!1),u=p(w("apply","Apply"),!0);d.append(A,u);const m=document.createElement("div");m.style.cssText="\n width: 44px; height: 44px; border-radius: 50%;\n border: 3px solid rgba(255,255,255,0.25); border-top-color: #fff;\n ";const g=m.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:800,iterations:1/0});i.style.visibility="hidden",u.disabled=!0,u.style.opacity="0.5",u.style.cursor="default";const h={x:0,y:0,w:0,h:0};let y=0,E=0;function f(){s.style.left=`${h.x}px`,s.style.top=`${h.y}px`,s.style.width=`${h.w}px`,s.style.height=`${h.h}px`}const v=(e,n,t)=>Math.max(n,Math.min(t,e));let b=null,x=0,k=0,B=null;function L(e,n){e.preventDefault(),e.stopPropagation(),b=n,x=e.clientX,k=e.clientY,B={...h},window.addEventListener("pointermove",R),window.addEventListener("pointerup",S)}function R(e){if(!b)return;const n=e.clientX-x,t=e.clientY-k;if("move"===b)h.x=v(B.x+n,0,y-h.w),h.y=v(B.y+t,0,E-h.h);else{const e=B.x+B.w,o=B.y+B.h;b.includes("w")&&(h.x=v(B.x+n,0,e-24),h.w=e-h.x),b.includes("e")&&(h.w=v(B.w+n,24,y-h.x)),b.includes("n")&&(h.y=v(B.y+t,0,o-24),h.h=o-h.y),b.includes("s")&&(h.h=v(B.h+t,24,E-h.y))}f()}function S(){b=null,window.removeEventListener("pointermove",R),window.removeEventListener("pointerup",S)}function M(){window.removeEventListener("pointermove",R),window.removeEventListener("pointerup",S),document.removeEventListener("keydown",D),a.remove()}function D(e){"Escape"===e.key&&M()}s.addEventListener("pointerdown",e=>L(e,"move")),l.forEach(e=>c[e].addEventListener("pointerdown",n=>L(n,c[e].dataset.corner))),A.addEventListener("click",M),u.addEventListener("click",function(){const e=r.naturalWidth/y,n=o?t:r,a=Math.round(h.x*e),i=Math.round(h.y*e),s=Math.max(1,Math.round(h.w*e)),l=Math.max(1,Math.round(h.h*e)),c=document.createElement("canvas");let d;c.width=s,c.height=l,c.getContext("2d").drawImage(n,a,i,s,l,0,0,s,l);try{d=c.toDataURL("image/png")}catch(e){return console.error("Crop export failed (tainted canvas / CORS):",e),void alert(w("crop_cors_error","This image can’t be cropped in the browser because it’s served without CORS headers. Re-upload it through the gallery and try again."))}C.vP.dispatch("on:upload-file",{image:d,type:"base64"}),M()}),a.addEventListener("pointerdown",e=>{e.target===a&&M()}),document.addEventListener("keydown",D),r.addEventListener("load",()=>{const e=r.naturalWidth,n=r.naturalHeight,t=Math.min(.8*window.innerWidth,e),o=.7*window.innerHeight,a=Math.min(t/e,o/n,1);y=Math.round(e*a),E=Math.round(n*a),r.style.width=`${y}px`,r.style.height=`${E}px`,h.x=Math.round(.1*y),h.y=Math.round(.1*E),h.w=Math.round(.8*y),h.h=Math.round(.8*E),f(),g.cancel(),m.remove(),i.style.visibility="visible",u.disabled=!1,u.style.opacity="",u.style.cursor="pointer"}),r.addEventListener("error",()=>{console.error("Cropper: failed to load image",n),M()}),i.append(r,s),a.append(i,m,d),document.body.appendChild(a),r.complete&&r.naturalWidth&&r.dispatchEvent(new Event("load"))}var k=t(44217),B={};B.setAttributes=m(),B.insert=A().bind(null,"head"),B.domAPI=d(),B.insertStyleElement=h();l()(k.A,B);const L=k.A&&k.A.locals?k.A.locals:void 0,R=()=>{const e="image";return{name:e,create:n=>{const{createElement:t,compose:o,helpers:i}=n,{arrayToString:s,mergeDiff:l}=i,c=document.createElement("img"),d=document.createElement("div");o.props.style&&!parseInt(o.props.style.height)&&(o.props.style.height="auto"),c.addEventListener("drop",e=>{e.preventDefault();var n=e.dataTransfer.getData("text/html");const t=document.createElement("div");t.innerHTML=n;const a=t.querySelector("img");a&&a.src&&o.editor.store().updateComponent(o,"src",a.src)}),c.draggable=!0,c.src=o.props.src;const p=s(o.classList);c.className=s(p,"editor-image",L.image),d.append(c);const A=v(c);A.wrap(d);let u=o.props.src;o.props.src&&A.showLoader();const m=document.createElement("button");m.type="button",m.className=f.cropButton;const g=b.M.get("lang","crop_image")||"Crop image";function h(e){const n=e.target;n.classList.contains("amazingbar-content-wrapper")&&"INPUT"!==n.tagName&&"TEXTAREA"!==n.tagName&&("Delete"!==e.key&&"Backspace"!==e.key||y.commands.remove())}m.title=g,m.setAttribute("aria-label",g),m.innerHTML='<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 2v14a2 2 0 0 0 2 2h14"/><path d="M18 22V8a2 2 0 0 0-2-2H2"/></svg>',m.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),x(o)}),A.wrapper.appendChild(m),c.addEventListener("dblclick",()=>{const e=document.createElement("cdtr-gallery");e.opened=!0,e.multi=!0,document.body.append(e),e.addEventListener("file",n=>{let t=n.detail;Array.isArray(t)&&(t=t[0]),o.editor.store().execCommands([{key:"src",value:t.src},{key:"style",value:{height:"auto"}}]),e.opened=!1,setTimeout(()=>{e.remove()},1500)}),e.addEventListener("close",()=>{e.remove()})});const y=t({name:e,id:o.id,template:d,defaultProps:{style:{height:"auto",width:"200px"}},draggable:{group:"element"},droppable:{group:"element"},render:()=>{l(c,{style:o.props.style}),c.width=o.props.width||o.props.style.width,c.height=o.props.height||o.props.style.height,o.props.src&&o.props.src!==u&&(u=o.props.src,A.showLoader(!0)),l(c,{src:o.props.src}),l(c,{alt:o.props.alt})},resizeable:()=>d,handleBar:!0,validator:r(),schema:o.schema,onSelect:e=>{c.classList.add(e),document.addEventListener("keyup",h)},onDeselect:e=>{c.classList.remove(e),document.removeEventListener("keyup",h)},elementProps:o,remove:()=>{d.remove()},createEditor:a});let E=0,C=0,w=!1,k=!1,B=!1,R=!1;return c.addEventListener("dragover",e=>{e.preventDefault()}),c.addEventListener("dragstart",e=>{E=e.clientX,C=e.clientY,w=!0,k=!1,B=!1,R=!1}),c.addEventListener("drag",e=>{if(!w)return;const n=c.closest(".block-component")||c.closest("[data-block]")||c.parentElement;if(!n)return;const t=n.getBoundingClientRect(),o=t.width,a=t.left,i=e.clientX-a,r=.3*o,s=.7*o;if(i<r&&!k){k=!0,R=!1,B=!1;const e=y.parent("col");e&&e.commands.execCommand("justify","start")}else if(i>s&&!B){B=!0,R=!1,k=!1;const e=y.parent("col");e&&e.commands.execCommand("justify","end")}else if(i>=r&&i<=s&&!R){R=!0,k=!1,B=!1;const e=y.closest("col");e&&e.commands.execCommand("justify","center")}}),c.addEventListener("dragend",e=>{w=!1,k=!1,B=!1,R=!1}),y}}}},98481(e,n,t){t.d(n,{A:()=>s});var o=t(82001),a=t.n(o),i=t(40935),r=t.n(i)()(a());r.push([e.id,".lohuqKHS721dHgrbXSxR {\n position: relative;\n display: inline-block;\n overflow: hidden;\n}\n\n.svsvvszZebJje0J5_aR0 {\n position: relative;\n display: block;\n line-height: 0;\n}\n\n/* Crop / edit-image button — appears on hover over the image */\n.pQ89uz0UlGnGPEecwX2t {\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 2;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: 8px;\n color: #fff;\n background: rgba(0, 0, 0, 0.55);\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.15s ease-out, background 0.15s ease-out;\n}\n\n.lohuqKHS721dHgrbXSxR:hover .pQ89uz0UlGnGPEecwX2t {\n opacity: 1;\n}\n\n.pQ89uz0UlGnGPEecwX2t:hover {\n background: rgba(0, 0, 0, 0.75);\n}\n\n.X_p_Nfsu3cFahVFu4_Bw {\n opacity: 0;\n transition: opacity 0.15s ease-out;\n}\n\n._6bzBNhs7hY6_EZJBee1 {\n animation: RDp05pdkytBCK3jwjH1H 0.4s ease-out forwards;\n}\n\n@keyframes RDp05pdkytBCK3jwjH1H {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n/* Skeleton overlay - light purple placeholder */\n.gT24aWaYLc3ogXj85wMz {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background: linear-gradient(\n 110deg,\n #e8e4f0 8%,\n #f0ecf8 18%,\n #e8e4f0 33%\n );\n background-size: 200% 100%;\n animation: _Mzf8MsKMSARt4xYISlA 1.5s ease-in-out infinite;\n pointer-events: none;\n}\n\n.lohuqKHS721dHgrbXSxR.MhfE6WSo5ganwIXH6eLf .gT24aWaYLc3ogXj85wMz {\n opacity: 1;\n z-index: 1;\n}\n\n.lohuqKHS721dHgrbXSxR:not(.MhfE6WSo5ganwIXH6eLf) .gT24aWaYLc3ogXj85wMz {\n opacity: 0;\n pointer-events: none;\n z-index: -1;\n transition: opacity 0.2s ease-out;\n}\n\n.lohuqKHS721dHgrbXSxR.MsTRDhZG2BCJz9_2FibU .gT24aWaYLc3ogXj85wMz {\n animation: j0DUaUfa5Px2EIxpK3zU 0.4s ease-out forwards;\n}\n\n@keyframes _Mzf8MsKMSARt4xYISlA {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n}\n\n@keyframes j0DUaUfa5Px2EIxpK3zU {\n to {\n opacity: 0;\n }\n}\n\n/* Shimmer highlight sweep */\n.EcbfYuWAe3Ej6GnLZxPW {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background: linear-gradient(\n 90deg,\n transparent 0%,\n rgba(255, 255, 255, 0.4) 50%,\n transparent 100%\n );\n background-size: 50% 100%;\n animation: dOhdOxhPYbAyl0kAuAmR 2s ease-in-out infinite;\n}\n\n@keyframes dOhdOxhPYbAyl0kAuAmR {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(200%);\n }\n}\n\n/* Print-style scanline */\n.ixwwhz1RPbWh52COfXpg {\n position: absolute;\n left: 0;\n right: 0;\n height: 2px;\n background: linear-gradient(\n to bottom,\n transparent,\n rgba(255, 255, 255, 0.6),\n transparent\n );\n animation: qDDvb69LDcaVxWWlah1p 1.2s ease-in-out infinite;\n box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);\n}\n\n@keyframes qDDvb69LDcaVxWWlah1p {\n 0% {\n top: 0;\n opacity: 1;\n }\n 90% {\n top: 100%;\n opacity: 0.8;\n }\n 100% {\n top: 100%;\n opacity: 0;\n }\n}\n","",{version:3,sources:["webpack://./../web-editors/image-editor-component/lib/image-loader.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,qBAAqB;EACrB,gBAAgB;AAClB;;AAEA;EACE,kBAAkB;EAClB,cAAc;EACd,cAAc;AAChB;;AAEA,+DAA+D;AAC/D;EACE,kBAAkB;EAClB,QAAQ;EACR,UAAU;EACV,UAAU;EACV,oBAAoB;EACpB,mBAAmB;EACnB,uBAAuB;EACvB,WAAW;EACX,YAAY;EACZ,UAAU;EACV,YAAY;EACZ,kBAAkB;EAClB,WAAW;EACX,+BAA+B;EAC/B,eAAe;EACf,UAAU;EACV,6DAA6D;AAC/D;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,+BAA+B;AACjC;;AAEA;EACE,UAAU;EACV,kCAAkC;AACpC;;AAEA;EACE,sDAA6C;AAC/C;;AAEA;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,gDAAgD;AAChD;EACE,kBAAkB;EAClB,MAAQ;EAAR,QAAQ;EAAR,SAAQ;EAAR,OAAQ;EACR;;;;;GAKC;EACD,0BAA0B;EAC1B,yDAAoD;EACpD,oBAAoB;AACtB;;AAEA;EACE,UAAU;EACV,UAAU;AACZ;;AAEA;EACE,UAAU;EACV,oBAAoB;EACpB,WAAW;EACX,iCAAiC;AACnC;;AAEA;EACE,sDAAiD;AACnD;;AAEA;EACE;IACE,2BAA2B;EAC7B;EACA;IACE,4BAA4B;EAC9B;AACF;;AAEA;EACE;IACE,UAAU;EACZ;AACF;;AAEA,4BAA4B;AAC5B;EACE,kBAAkB;EAClB,MAAQ;EAAR,QAAQ;EAAR,SAAQ;EAAR,OAAQ;EACR;;;;;GAKC;EACD,yBAAyB;EACzB,uDAA+C;AACjD;;AAEA;EACE;IACE,4BAA4B;EAC9B;EACA;IACE,2BAA2B;EAC7B;AACF;;AAEA,yBAAyB;AACzB;EACE,kBAAkB;EAClB,OAAO;EACP,QAAQ;EACR,WAAW;EACX;;;;;GAKC;EACD,yDAAiD;EACjD,4CAA4C;AAC9C;;AAEA;EACE;IACE,MAAM;IACN,UAAU;EACZ;EACA;IACE,SAAS;IACT,YAAY;EACd;EACA;IACE,SAAS;IACT,UAAU;EACZ;AACF",sourcesContent:[".wrapper {\n position: relative;\n display: inline-block;\n overflow: hidden;\n}\n\n.imageContainer {\n position: relative;\n display: block;\n line-height: 0;\n}\n\n/* Crop / edit-image button — appears on hover over the image */\n.cropButton {\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 2;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: 8px;\n color: #fff;\n background: rgba(0, 0, 0, 0.55);\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.15s ease-out, background 0.15s ease-out;\n}\n\n.wrapper:hover .cropButton {\n opacity: 1;\n}\n\n.cropButton:hover {\n background: rgba(0, 0, 0, 0.75);\n}\n\n.imageHidden {\n opacity: 0;\n transition: opacity 0.15s ease-out;\n}\n\n.imageRevealed {\n animation: imageFadeIn 0.4s ease-out forwards;\n}\n\n@keyframes imageFadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n/* Skeleton overlay - light purple placeholder */\n.skeleton {\n position: absolute;\n inset: 0;\n background: linear-gradient(\n 110deg,\n #e8e4f0 8%,\n #f0ecf8 18%,\n #e8e4f0 33%\n );\n background-size: 200% 100%;\n animation: skeletonShimmer 1.5s ease-in-out infinite;\n pointer-events: none;\n}\n\n.wrapper.loading .skeleton {\n opacity: 1;\n z-index: 1;\n}\n\n.wrapper:not(.loading) .skeleton {\n opacity: 0;\n pointer-events: none;\n z-index: -1;\n transition: opacity 0.2s ease-out;\n}\n\n.wrapper.revealed .skeleton {\n animation: skeletonFadeOut 0.4s ease-out forwards;\n}\n\n@keyframes skeletonShimmer {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n}\n\n@keyframes skeletonFadeOut {\n to {\n opacity: 0;\n }\n}\n\n/* Shimmer highlight sweep */\n.shimmer {\n position: absolute;\n inset: 0;\n background: linear-gradient(\n 90deg,\n transparent 0%,\n rgba(255, 255, 255, 0.4) 50%,\n transparent 100%\n );\n background-size: 50% 100%;\n animation: shimmerSweep 2s ease-in-out infinite;\n}\n\n@keyframes shimmerSweep {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(200%);\n }\n}\n\n/* Print-style scanline */\n.scanline {\n position: absolute;\n left: 0;\n right: 0;\n height: 2px;\n background: linear-gradient(\n to bottom,\n transparent,\n rgba(255, 255, 255, 0.6),\n transparent\n );\n animation: scanlineMove 1.2s ease-in-out infinite;\n box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);\n}\n\n@keyframes scanlineMove {\n 0% {\n top: 0;\n opacity: 1;\n }\n 90% {\n top: 100%;\n opacity: 0.8;\n }\n 100% {\n top: 100%;\n opacity: 0;\n }\n}\n"],sourceRoot:""}]),r.locals={wrapper:"lohuqKHS721dHgrbXSxR",imageContainer:"svsvvszZebJje0J5_aR0",cropButton:"pQ89uz0UlGnGPEecwX2t",imageHidden:"X_p_Nfsu3cFahVFu4_Bw",imageRevealed:"_6bzBNhs7hY6_EZJBee1",imageFadeIn:"RDp05pdkytBCK3jwjH1H",skeleton:"gT24aWaYLc3ogXj85wMz",skeletonShimmer:"_Mzf8MsKMSARt4xYISlA",loading:"MhfE6WSo5ganwIXH6eLf",revealed:"MsTRDhZG2BCJz9_2FibU",skeletonFadeOut:"j0DUaUfa5Px2EIxpK3zU",shimmer:"EcbfYuWAe3Ej6GnLZxPW",shimmerSweep:"dOhdOxhPYbAyl0kAuAmR",scanline:"ixwwhz1RPbWh52COfXpg",scanlineMove:"qDDvb69LDcaVxWWlah1p"};const s=r},44217(e,n,t){t.d(n,{A:()=>s});var o=t(82001),a=t.n(o),i=t(40935),r=t.n(i)()(a());r.push([e.id,".YbsG1_k3QD06_W0gNo53{\n display: block;\n max-width: 100%;\n}","",{version:3,sources:["webpack://./../web-editors/image-editor-component/lib/style.module.css"],names:[],mappings:"AAAA;IACI,cAAc;IACd,eAAe;AACnB",sourcesContent:[".image{\n display: block;\n max-width: 100%;\n}"],sourceRoot:""}]),r.locals={image:"YbsG1_k3QD06_W0gNo53"};const s=r},13681(e,n,t){t.d(n,{vP:()=>d});const o=window.cdtrSignalKey||`___${Math.random().toString(36).substr(2,9)}`;window.cdtrSignalKey=o,window[o]||(window[o]={});const a=window[o],i=window.__cdtrEvents||{};function r(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 s(e){if(e.length%2!=0)throw new Error("Invalid hex string");const n=new Uint8Array(e.length/2);for(let t=0;t<e.length;t+=2)n[t/2]=parseInt(e.substr(t,2),16);return n}async function l(e){const n=await r(e),t=a[n];if(t){const e=await crypto.subtle.importKey("raw",s(n),{name:"AES-GCM"},!1,["encrypt","decrypt"]),o=await async function(e,n,t){const o=await crypto.subtle.decrypt({name:"AES-GCM",iv:n},e,t);return(new TextDecoder).decode(o)}(e,t.iv,t.encrypted);return JSON.parse(o)}return null}function c(e,n){if(i[e])for(const t in i[e])Object.prototype.hasOwnProperty.call(i[e],t)&&i[e][t].forEach(e=>e(n));Array.isArray(i["*"])&&i["*"].forEach(e=>e(n))}window.__cdtrEvents=i;const d={set:async function(e,n){const t=JSON.parse(JSON.stringify(n)),o=await r(e),l=await crypto.subtle.importKey("raw",s(o),{name:"AES-GCM"},!1,["encrypt","decrypt"]),d=await async function(e,n){const t=crypto.getRandomValues(new Uint8Array(12)),o=(new TextEncoder).encode(n),a=await crypto.subtle.encrypt({name:"AES-GCM",iv:t},e,o);return{iv:t,encrypted:new Uint8Array(a)}}(l,JSON.stringify(t));a[o]=d,i.set&&i.set[o]&&i.set[o].forEach(e=>e(t)),Array.isArray(i["*"])&&i["*"].forEach(e=>e(t)),c(e,t)},get:l,remove:async function(e){const n=await r(e);delete a[n]},on:async function(e,n,t){i[e]||(i[e]={});const o=await r(n);i[e][o]||(i[e][o]=[]),i[e][o].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.")}(),t(e)});const a=await l(n);return a&&t(a),o},off:function(e,n){i[e]&&i[e][n]&&delete i[e][n]},dispatch:c,OPTIONS:{SET:"set"}}}}]);
Binary file