"use strict";(self.webpackChunk_shopby_react_skin=self.webpackChunk_shopby_react_skin||[]).push([[4373],{13787(e,t,n){n.d(t,{C:()=>G,A:()=>Z});var r=n(96540),o=n(47767),i=n(5556),a=n(98861),l=n(54019),c=n(26528),u=n(91334);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);nv});var r=n(96540),o=n(84976),i=n(47767),a=n(26528),l=n(18535),c=n(13787),u=n(96540);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);nc});var r=n(96540),o=n(5556),i=n(96540),a={PERCENT:function(e){var t=e.screenWidth,n=e.screenHeight;return{width:window.innerWidth*t/100,height:window.innerHeight*n/100}},PIXEL:function(e){return{width:e.screenWidth,height:e.screenHeight}}},l=(0,r.forwardRef)(function(e,t){var n=e.content,o=e.screenWidthUnit,l=e.screenHeightUnit,c=e.bgColor,u=e.screenWidth,s=e.screenHeight,p=e.children,f=(0,r.useRef)(),d={background:c,width:"".concat(a[o]({screenWidth:u,screenHeight:s}).width,"px"),height:"".concat(a[l]({screenWidth:u,screenHeight:s}).height,"px")};return(0,r.useEffect)(function(){var e=null==f?void 0:f.current;if(e&&!(e.children.length>0)){var t=document.createRange().createContextualFragment(n);e.replaceChildren(t)}},[null==f?void 0:f.current]),i.createElement("div",{className:"editor",ref:t},i.createElement("div",{ref:f,className:"design-popup__content",style:d}),p)});const c=l;l.displayName="DesignPopupNormal",l.propTypes={className:o.string,content:o.string,screenWidthUnit:(0,o.oneOf)(["PERCENT","PIXEL"]),screenHeightUnit:(0,o.oneOf)(["PERCENT","PIXEL"]),bgColor:o.string,screenWidth:o.number,screenHeight:o.number,children:o.node}}}]);