@yoopta/embed 4.0.0-rc.12 → 4.0.0-rc.14

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 (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import{useYooptaEditor as e,UI as t,useBlockData as o,useYooptaPluginOptions as i,useYooptaReadOnly as n,useBlockSelected as r,YooptaPlugin as s,generateId as a}from"@yoopta/editor";import{jsxs as l,jsx as d}from"react/jsx-runtime";import*as c from"react";import{useState as u,useEffect as h,useRef as p,useLayoutEffect as f,forwardRef as m,createElement as b,useMemo as y}from"react";import*as g from"react-dom";import{flushSync as w,createPortal as x}from"react-dom";function v(e,{threshold:t=0,root:o=null,rootMargin:i="0%",freezeOnceVisible:n=!1}={}){const[r,s]=u({}),a=r.isIntersecting&&n,l=([e])=>s(e);return h((()=>{const n=null==e?void 0:e.current;if(!window.IntersectionObserver||a||!n)return;const r=new IntersectionObserver(l,{threshold:t,root:o,rootMargin:i});return r.observe(n),()=>r.disconnect()}),[e,t,o,i,a]),r}const z={vimeo:function({provider:e,width:t,height:o,blockId:i}){const n=p(null),[r,s]=u(null),[a,c]=u(!1),{isIntersecting:f}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{fetch(`https://vimeo.com/api/v2/embed/${e.id}.json`).then((e=>e.json())).then((e=>s(e[0].thumbnail_medium))).catch((()=>s(null)))}),[e.id]),l("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[d("img",{src:r||"",alt:"vimeo_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&d("iframe",{title:"Embed Player",src:`https://player.vimeo.com/embed/${e.id}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>c(!0),className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},youtube:function({provider:e,width:t,height:o,blockId:i}){const n=p(null),[r,s]=u(!1),{isIntersecting:a}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return l("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[d("img",{src:`https://i.ytimg.com/vi/${e.id}/default.jpg`,alt:"youtube_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:a&&r?0:1,zIndex:a&&r?-1:0}}),a&&d("iframe",{title:"Embed Player",src:`https://www.youtube.com/embed/${e.id}`,frameBorder:0,onLoad:()=>s(!0),allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},dailymotion:function({provider:e,width:t,height:o,blockId:i}){const n=p(null),[r,s]=u(null),[a,c]=u(!1),{isIntersecting:f}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{var t;fetch((t=e.id,`https://api.dailymotion.com/embed/${t}?fields=thumbnail_url`)).then((e=>e.json())).then((e=>s(e.thumbnail_url))).catch((()=>s(null)))}),[e.id]),l("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[d("img",{src:r||"",alt:"daylimotion_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&d("iframe",{title:"Dailymotion Embed Player",frameBorder:0,onLoad:()=>c(!0),src:`https://www.dailymotion.com/embed/embed/${e.id}`,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},figma:({provider:e,width:t,height:o,blockId:i})=>{const n=p(null),{isIntersecting:r}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return d("div",Object.assign({className:"yoo-embed-relative",ref:n},{children:r&&d("iframe",{src:`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(e.url)}`,frameBorder:0,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})}))},twitter:function({provider:t,blockId:o}){const i=p(null),n=e(),{isIntersecting:r}=v(i,{freezeOnceVisible:!0,rootMargin:"50%"}),s=`${o}-${t.id}`;return h((()=>{var e;if(!r)return;const a=document.createElement("script");a.src="https://platform.twitter.com/widgets.js",null===(e=i.current)||void 0===e||e.appendChild(a),a.onload=()=>{window.twttr&&(window.twttr.widgets.createTweet(t.id,document.getElementById(s),{align:"center",conversation:"none",dnt:!0,theme:"dark",height:500,width:550}),n.blocks.Embed.updateElement(o,"embed",{sizes:{width:"auto",height:"auto"}}))}}),[t.id,r]),d("div",Object.assign({className:"yoo-embed-w-full yoo-embed-h-full",ref:i},{children:d("div",{id:s})}))}},R=({width:e,height:t,provider:o,blockId:i})=>{if(!o)return null;if(o&&o.id&&o.type&&z[o.type]){const n=z[o.type];return d(n,{provider:o,width:e,height:t,blockId:i})}return d("div",Object.assign({className:"yoo-embed-w-full"},{children:d("iframe",{src:o.url,width:"100%",height:"100%",frameBorder:0,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0"})}))};var S,_=(S=function(e,t){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},S(e,t)},function(e,t){function o(){this.constructor=e}S(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),E=function(){return E=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},E.apply(this,arguments)},C={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},k={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},O={width:"20px",height:"20px",position:"absolute"},N={top:E(E({},C),{top:"-5px"}),right:E(E({},k),{left:void 0,right:"-5px"}),bottom:E(E({},C),{top:void 0,bottom:"-5px"}),left:E(E({},k),{left:"-5px"}),topRight:E(E({},O),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:E(E({},O),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:E(E({},O),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:E(E({},O),{left:"-10px",top:"-10px",cursor:"nw-resize"})},L=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return _(t,e),t.prototype.render=function(){return c.createElement("div",{className:this.props.className||"",style:E(E({position:"absolute",userSelect:"none"},N[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(c.PureComponent),M=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},e(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),W=function(){return W=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},W.apply(this,arguments)},A={width:"auto",height:"auto"},T=function(e,t,o){return Math.max(Math.min(e,o),t)},j=function(e,t){return Math.round(e/t)*t},B=function(e,t){return new RegExp(e,"i").test(t)},I=function(e){return Boolean(e.touches&&e.touches.length)},P=function(e,t,o){void 0===o&&(o=0);var i=t.reduce((function(o,i,n){return Math.abs(i-e)<Math.abs(t[o]-e)?n:o}),0),n=Math.abs(t[i]-e);return 0===o||n<o?t[i]:e},H=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},D=function(e,t,o,i){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return o*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return i*(Number(e.replace("vh",""))/100)}return e},F=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],V="__resizable_base__",U=function(e){function t(t){var o=e.call(this,t)||this;return o.ratio=1,o.resizable=null,o.parentLeft=0,o.parentTop=0,o.resizableLeft=0,o.resizableRight=0,o.resizableTop=0,o.resizableBottom=0,o.targetLeft=0,o.targetTop=0,o.appendBase=function(){if(!o.resizable||!o.window)return null;var e=o.parentNode;if(!e)return null;var t=o.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(V):t.className+=V,e.appendChild(t),t},o.removeBase=function(e){var t=o.parentNode;t&&t.removeChild(e)},o.ref=function(e){e&&(o.resizable=e)},o.state={isResizing:!1,width:void 0===(o.propsSize&&o.propsSize.width)?"auto":o.propsSize&&o.propsSize.width,height:void 0===(o.propsSize&&o.propsSize.height)?"auto":o.propsSize&&o.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},o.onResizeStart=o.onResizeStart.bind(o),o.onMouseMove=o.onMouseMove.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o}return M(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||A},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,n=this.resizable.style.position;"relative"!==n&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=n}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var o=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/o[t]*100+"%"}return H(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?H(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?H(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==o&&"auto"!==o?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,i,n=this.props.boundsByDirection,r=this.state.direction,s=n&&B("left",r),a=n&&B("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(o=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o=this.props.scale||1,i=this.props.resizeRatio||1,n=this.state,r=n.direction,s=n.original,a=this.props,l=a.lockAspectRatio,d=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,u=s.width,h=s.height,p=d||0,f=c||0;return B("right",r)&&(u=s.width+(e-s.x)*i/o,l&&(h=(u-f)/this.ratio+p)),B("left",r)&&(u=s.width-(e-s.x)*i/o,l&&(h=(u-f)/this.ratio+p)),B("bottom",r)&&(h=s.height+(t-s.y)*i/o,l&&(u=(h-p)*this.ratio+f)),B("top",r)&&(h=s.height-(t-s.y)*i/o,l&&(u=(h-p)*this.ratio+f)),{newWidth:u,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,i){var n=this.props,r=n.lockAspectRatio,s=n.lockAspectRatioExtraHeight,a=n.lockAspectRatioExtraWidth,l=void 0===i.width?10:i.width,d=void 0===o.width||o.width<0?e:o.width,c=void 0===i.height?10:i.height,u=void 0===o.height||o.height<0?t:o.height,h=s||0,p=a||0;if(r){var f=(c-h)*this.ratio+p,m=(u-h)*this.ratio+p,b=(l-p)/this.ratio+h,y=(d-p)/this.ratio+h,g=Math.max(l,f),w=Math.min(d,m),x=Math.max(c,b),v=Math.min(u,y);e=T(e,g,w),t=T(t,x,v)}else e=T(e,l,d),t=T(t,c,u);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,r=i.top,s=i.right,a=i.bottom;this.resizableLeft=n,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,i=0,n=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&I(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",o=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:W(W({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:o};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&I(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var o=this.props,i=o.maxWidth,n=o.maxHeight,r=o.minWidth,s=o.minHeight,a=I(e)?e.touches[0].clientX:e.clientX,l=I(e)?e.touches[0].clientY:e.clientY,d=this.state,c=d.direction,u=d.original,h=d.width,p=d.height,f=this.getParentSize(),m=function(e,t,o,i,n,r,s){return i=D(i,e.width,t,o),n=D(n,e.height,t,o),r=D(r,e.width,t,o),s=D(s,e.height,t,o),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===n?void 0:Number(n),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,i,n,r,s);i=m.maxWidth,n=m.maxHeight,r=m.minWidth,s=m.minHeight;var b=this.calculateNewSizeFromDirection(a,l),y=b.newHeight,g=b.newWidth,x=this.calculateNewMaxFromBoundary(i,n);this.props.snap&&this.props.snap.x&&(g=P(g,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(y=P(y,this.props.snap.y,this.props.snapGap));var v=this.calculateNewSizeFromAspectRatio(g,y,{width:x.maxWidth,height:x.maxHeight},{width:r,height:s});if(g=v.newWidth,y=v.newHeight,this.props.grid){var z=j(g,this.props.grid[0]),R=j(y,this.props.grid[1]),S=this.props.snapGap||0;g=0===S||Math.abs(z-g)<=S?z:g,y=0===S||Math.abs(R-y)<=S?R:y}var _={width:g-u.width,height:y-u.height};if(h&&"string"==typeof h)if(h.endsWith("%"))g=g/f.width*100+"%";else if(h.endsWith("vw")){g=g/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){g=g/this.window.innerHeight*100+"vh"}if(p&&"string"==typeof p)if(p.endsWith("%"))y=y/f.height*100+"%";else if(p.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}var E={width:this.createSizeForCssProperty(g,"width"),height:this.createSizeForCssProperty(y,"height")};"row"===this.flexDir?E.flexBasis=E.width:"column"===this.flexDir&&(E.flexBasis=E.height),w((function(){t.setState(E)})),this.props.onResize&&this.props.onResize(e,c,this.resizable,_)}},t.prototype.onMouseUp=function(e){var t=this.state,o=t.isResizing,i=t.direction,n=t.original;if(o&&this.resizable){var r={width:this.size.width-n.width,height:this.size.height-n.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:W(W({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,i=t.handleStyles,n=t.handleClasses,r=t.handleWrapperStyle,s=t.handleWrapperClass,a=t.handleComponent;if(!o)return null;var l=Object.keys(o).map((function(t){return!1!==o[t]?c.createElement(L,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},a&&a[t]?a[t]:null):null}));return c.createElement("div",{className:s,style:r},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,o){return-1!==F.indexOf(o)||(t[o]=e.props[o]),t}),{}),o=W(W(W({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return c.createElement(i,W({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&c.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(c.PureComponent);function $(e){return G(e)?(e.nodeName||"").toLowerCase():"#document"}function X(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Y(e){var t;return null==(t=(G(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function G(e){return e instanceof Node||e instanceof X(e).Node}function Z(e){return e instanceof Element||e instanceof X(e).Element}function q(e){return e instanceof HTMLElement||e instanceof X(e).HTMLElement}function J(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof X(e).ShadowRoot)}function K(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function Q(e){return["table","td","th"].includes($(e))}function ee(e){const t=te(),o=ie(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function te(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function oe(e){return["html","body","#document"].includes($(e))}function ie(e){return X(e).getComputedStyle(e)}function ne(e){return Z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(e){if("html"===$(e))return e;const t=e.assignedSlot||e.parentNode||J(e)&&e.host||Y(e);return J(t)?t.host:t}function se(e){const t=re(e);return oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&K(t)?t:se(t)}function ae(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=se(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),s=X(n);return r?t.concat(s,s.visualViewport||[],K(n)?n:[],s.frameElement&&o?ae(s.frameElement):[]):t.concat(n,ae(n,[],o))}const le=Math.min,de=Math.max,ce=Math.round,ue=e=>({x:e,y:e}),he={left:"right",right:"left",bottom:"top",top:"bottom"},pe={start:"end",end:"start"};function fe(e,t,o){return de(e,le(t,o))}function me(e,t){return"function"==typeof e?e(t):e}function be(e){return e.split("-")[0]}function ye(e){return e.split("-")[1]}function ge(e){return"x"===e?"y":"x"}function we(e){return"y"===e?"height":"width"}function xe(e){return["top","bottom"].includes(be(e))?"y":"x"}function ve(e){return ge(xe(e))}function ze(e){return e.replace(/start|end/g,(e=>pe[e]))}function Re(e){return e.replace(/left|right|bottom|top/g,(e=>he[e]))}function Se(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function _e(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ee(e,t,o){let{reference:i,floating:n}=e;const r=xe(t),s=ve(t),a=we(s),l=be(t),d="y"===r,c=i.x+i.width/2-n.width/2,u=i.y+i.height/2-n.height/2,h=i[a]/2-n[a]/2;let p;switch(l){case"top":p={x:c,y:i.y-n.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:u};break;case"left":p={x:i.x-n.width,y:u};break;default:p={x:i.x,y:i.y}}switch(ye(t)){case"start":p[s]-=h*(o&&d?-1:1);break;case"end":p[s]+=h*(o&&d?-1:1)}return p}async function Ce(e,t){var o;void 0===t&&(t={});const{x:i,y:n,platform:r,rects:s,elements:a,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=me(t,e),f=Se(p),m=a[h?"floating"===u?"reference":"floating":u],b=_e(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(m)))||o?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),y="floating"===u?{...s.floating,x:i,y:n}:s.reference,g=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),w=await(null==r.isElement?void 0:r.isElement(g))&&await(null==r.getScale?void 0:r.getScale(g))||{x:1,y:1},x=_e(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:l}):y);return{top:(b.top-x.top+f.top)/w.y,bottom:(x.bottom-b.bottom+f.bottom)/w.y,left:(b.left-x.left+f.left)/w.x,right:(x.right-b.right+f.right)/w.x}}function ke(e){const t=le(...e.map((e=>e.left))),o=le(...e.map((e=>e.top)));return{x:t,y:o,width:de(...e.map((e=>e.right)))-t,height:de(...e.map((e=>e.bottom)))-o}}const Oe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,i;const{x:n,y:r,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:o,platform:i,elements:n}=e,r=await(null==i.isRTL?void 0:i.isRTL(n.floating)),s=be(o),a=ye(o),l="y"===xe(o),d=["left","top"].includes(s)?-1:1,c=r&&l?-1:1,u=me(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&"number"==typeof f&&(p="end"===a?-1*f:f),l?{x:p*c,y:h*d}:{x:h*d,y:p*c}}(t,e);return s===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:n+l.x,y:r+l.y,data:{...l,placement:s}}}}};function Ne(e){const t=ie(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=q(e),r=n?e.offsetWidth:o,s=n?e.offsetHeight:i,a=ce(o)!==r||ce(i)!==s;return a&&(o=r,i=s),{width:o,height:i,$:a}}function Le(e){return Z(e)?e:e.contextElement}function Me(e){const t=Le(e);if(!q(t))return ue(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=Ne(t);let s=(r?ce(o.width):o.width)/i,a=(r?ce(o.height):o.height)/n;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const We=ue(0);function Ae(e){const t=X(e);return te()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:We}function Te(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=Le(e);let s=ue(1);t&&(i?Z(i)&&(s=Me(i)):s=Me(e));const a=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==X(e))&&t}(r,o,i)?Ae(r):ue(0);let l=(n.left+a.x)/s.x,d=(n.top+a.y)/s.y,c=n.width/s.x,u=n.height/s.y;if(r){const e=X(r),t=i&&Z(i)?X(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=Me(n),t=n.getBoundingClientRect(),i=ie(n),r=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,u*=e.y,l+=r,d+=s,o=X(n),n=o.frameElement}}return _e({width:c,height:u,x:l,y:d})}const je=[":popover-open",":modal"];function Be(e){return je.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ie(e){return Te(Y(e)).left+ne(e).scrollLeft}function Pe(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=X(e),i=Y(e),n=o.visualViewport;let r=i.clientWidth,s=i.clientHeight,a=0,l=0;if(n){r=n.width,s=n.height;const e=te();(!e||e&&"fixed"===t)&&(a=n.offsetLeft,l=n.offsetTop)}return{width:r,height:s,x:a,y:l}}(e,o);else if("document"===t)i=function(e){const t=Y(e),o=ne(e),i=e.ownerDocument.body,n=de(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=de(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Ie(e);const a=-o.scrollTop;return"rtl"===ie(i).direction&&(s+=de(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:s,y:a}}(Y(e));else if(Z(t))i=function(e,t){const o=Te(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=q(e)?Me(e):ue(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:n*r.x,y:i*r.y}}(t,o);else{const o=Ae(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return _e(i)}function He(e,t){const o=re(e);return!(o===t||!Z(o)||oe(o))&&("fixed"===ie(o).position||He(o,t))}function De(e,t,o){const i=q(t),n=Y(t),r="fixed"===o,s=Te(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=ue(0);if(i||!i&&!r)if(("body"!==$(t)||K(n))&&(a=ne(t)),i){const e=Te(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=Ie(n));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Fe(e,t){return q(e)&&"fixed"!==ie(e).position?t?t(e):e.offsetParent:null}function Ve(e,t){const o=X(e);if(!q(e)||Be(e))return o;let i=Fe(e,t);for(;i&&Q(i)&&"static"===ie(i).position;)i=Fe(i,t);return i&&("html"===$(i)||"body"===$(i)&&"static"===ie(i).position&&!ee(i))?o:i||function(e){let t=re(e);for(;q(t)&&!oe(t);){if(ee(t))return t;t=re(t)}return null}(e)||o}const Ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,s=Y(i),a=!!t&&Be(t.floating);if(i===s||a&&r)return o;let l={scrollLeft:0,scrollTop:0},d=ue(1);const c=ue(0),u=q(i);if((u||!u&&!r)&&(("body"!==$(i)||K(s))&&(l=ne(i)),q(i))){const e=Te(i);d=Me(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-l.scrollLeft*d.x+c.x,y:o.y*d.y-l.scrollTop*d.y+c.y}},getDocumentElement:Y,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:i,strategy:n}=e;const r=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let i=ae(e,[],!1).filter((e=>Z(e)&&"body"!==$(e))),n=null;const r="fixed"===ie(e).position;let s=r?re(e):e;for(;Z(s)&&!oe(s);){const t=ie(s),o=ee(s);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||K(s)&&!o&&He(e,s))?i=i.filter((e=>e!==s)):n=t,s=re(s)}return t.set(e,i),i}(t,this._c):[].concat(o),i],s=r[0],a=r.reduce(((e,o)=>{const i=Pe(t,o,n);return e.top=de(i.top,e.top),e.right=le(i.right,e.right),e.bottom=le(i.bottom,e.bottom),e.left=de(i.left,e.left),e}),Pe(t,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Ve,getElementRects:async function(e){const t=this.getOffsetParent||Ve,o=this.getDimensions;return{reference:De(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await o(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=Ne(e);return{width:t,height:o}},getScale:Me,isElement:Z,isRTL:function(e){return"rtl"===ie(e).direction}},$e=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:i,placement:n}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...l}=me(e,t),d={x:o,y:i},c=await Ce(t,l),u=xe(be(n)),h=ge(u);let p=d[h],f=d[u];if(r){const e="y"===h?"bottom":"right";p=fe(p+c["y"===h?"top":"left"],p,p-c[e])}if(s){const e="y"===u?"bottom":"right";f=fe(f+c["y"===u?"top":"left"],f,f-c[e])}const m=a.fn({...t,[h]:p,[u]:f});return{...m,data:{x:m.x-o,y:m.y-i}}}}},Xe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,i;const{placement:n,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...b}=me(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const y=be(n),g=be(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(d.floating)),x=h||(g||!m?[Re(a)]:function(e){const t=Re(e);return[ze(e),t,ze(t)]}(a));h||"none"===f||x.push(...function(e,t,o,i){const n=ye(e);let r=function(e,t,o){const i=["left","right"],n=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return o?t?n:i:t?i:n;case"left":case"right":return t?r:s;default:return[]}}(be(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(ze)))),r}(a,m,f,w));const v=[a,...x],z=await Ce(t,b),R=[];let S=(null==(i=r.flip)?void 0:i.overflows)||[];if(c&&R.push(z[y]),u){const e=function(e,t,o){void 0===o&&(o=!1);const i=ye(e),n=ve(e),r=we(n);let s="x"===n?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Re(s)),[s,Re(s)]}(n,s,w);R.push(z[e[0]],z[e[1]])}if(S=[...S,{placement:n,overflows:R}],!R.every((e=>e<=0))){var _,E;const e=((null==(_=r.flip)?void 0:_.index)||0)+1,t=v[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let o=null==(E=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!o)switch(p){case"bestFit":{var C;const e=null==(C=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(o=e);break}case"initialPlacement":o=a}if(n!==o)return{reset:{placement:o}}}return{}}}},Ye=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:i,rects:n,platform:r,strategy:s}=t,{padding:a=2,x:l,y:d}=me(e,t),c=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),u=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let i=null;for(let e=0;e<t.length;e++){const n=t[e];!i||n.y-i.y>i.height/2?o.push([n]):o[o.length-1].push(n),i=n}return o.map((e=>_e(ke(e))))}(c),h=_e(ke(c)),p=Se(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=d)return u.find((e=>l>e.left-p.left&&l<e.right+p.right&&d>e.top-p.top&&d<e.bottom+p.bottom))||h;if(u.length>=2){if("y"===xe(o)){const e=u[0],t=u[u.length-1],i="top"===be(o),n=e.top,r=t.bottom,s=i?e.left:t.left,a=i?e.right:t.right;return{top:n,bottom:r,left:s,right:a,width:a-s,height:r-n,x:s,y:n}}const e="left"===be(o),t=de(...u.map((e=>e.right))),i=le(...u.map((e=>e.left))),n=u.filter((o=>e?o.left===i:o.right===t)),r=n[0].top,s=n[n.length-1].bottom;return{top:r,bottom:s,left:i,right:t,width:t-i,height:s-r,x:i,y:r}}return h}},floating:i.floating,strategy:s});return n.reference.x!==f.reference.x||n.reference.y!==f.reference.y||n.reference.width!==f.reference.width||n.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},Ge=(e,t,o)=>{const i=new Map,n={platform:Ue,...o},r={...n.platform,_c:i};return(async(e,t,o)=>{const{placement:i="bottom",strategy:n="absolute",middleware:r=[],platform:s}=o,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:u}=Ee(d,i,l),h=i,p={},f=0;for(let o=0;o<a.length;o++){const{name:r,fn:m}=a[o],{x:b,y:y,data:g,reset:w}=await m({x:c,y:u,initialPlacement:i,placement:h,strategy:n,middlewareData:p,rects:d,platform:s,elements:{reference:e,floating:t}});c=null!=b?b:c,u=null!=y?y:u,p={...p,[r]:{...p[r],...g}},w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(h=w.placement),w.rects&&(d=!0===w.rects?await s.getElementRects({reference:e,floating:t,strategy:n}):w.rects),({x:c,y:u}=Ee(d,h,l))),o=-1)}return{x:c,y:u,placement:h,strategy:n,middlewareData:p}})(e,t,{...n,platform:r})};var Ze="undefined"!=typeof document?f:h;function qe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let o,i,n;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(!qe(e[i],t[i]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(i=o;0!=i--;)if(!{}.hasOwnProperty.call(t,n[i]))return!1;for(i=o;0!=i--;){const o=n[i];if(("_owner"!==o||!e.$$typeof)&&!qe(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Je(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ke(e,t){const o=Je(e);return Math.round(t*o)/o}function Qe(e){const t=c.useRef(e);return Ze((()=>{t.current=e})),t}
1
+ import{useYooptaEditor as e,UI as t,useBlockData as o,useYooptaPluginOptions as i,useYooptaReadOnly as n,useBlockSelected as r,YooptaPlugin as s,generateId as a}from"@yoopta/editor";import{jsxs as d,jsx as l}from"react/jsx-runtime";import*as c from"react";import{useState as p,useEffect as u,useRef as h,useLayoutEffect as f,forwardRef as m,createElement as b,useMemo as y}from"react";import*as g from"react-dom";import{flushSync as w,createPortal as x}from"react-dom";function v(e,{threshold:t=0,root:o=null,rootMargin:i="0%",freezeOnceVisible:n=!1}={}){const[r,s]=p({}),a=r.isIntersecting&&n,d=([e])=>s(e);return u((()=>{const n=null==e?void 0:e.current;if(!window.IntersectionObserver||a||!n)return;const r=new IntersectionObserver(d,{threshold:t,root:o,rootMargin:i});return r.observe(n),()=>r.disconnect()}),[e,t,o,i,a]),r}const z={vimeo:function({provider:e,width:t,height:o,blockId:i}){const n=h(null),[r,s]=p(null),[a,c]=p(!1),{isIntersecting:f}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return u((()=>{fetch(`https://vimeo.com/api/v2/embed/${e.id}.json`).then((e=>e.json())).then((e=>s(e[0].thumbnail_medium))).catch((()=>s(null)))}),[e.id]),d("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[l("img",{src:r||"",alt:"vimeo_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&l("iframe",{title:"Embed Player",src:`https://player.vimeo.com/embed/${e.id}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>c(!0),className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},youtube:function({provider:e,width:t,height:o,blockId:i}){const n=h(null),[r,s]=p(!1),{isIntersecting:a}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return d("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[l("img",{src:`https://i.ytimg.com/vi/${e.id}/default.jpg`,alt:"youtube_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:a&&r?0:1,zIndex:a&&r?-1:0}}),a&&l("iframe",{title:"Embed Player",src:`https://www.youtube.com/embed/${e.id}`,frameBorder:0,onLoad:()=>s(!0),allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},dailymotion:function({provider:e,width:t,height:o,blockId:i}){const n=h(null),[r,s]=p(null),[a,c]=p(!1),{isIntersecting:f}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return u((()=>{var t;fetch((t=e.id,`https://api.dailymotion.com/embed/${t}?fields=thumbnail_url`)).then((e=>e.json())).then((e=>s(e.thumbnail_url))).catch((()=>s(null)))}),[e.id]),d("div",Object.assign({ref:n,className:"yoo-embed-relative"},{children:[l("img",{src:r||"",alt:"daylimotion_embed_preview",width:"100%",height:"100%",className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0 yoo-embed-w-full yoo-embed-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&l("iframe",{title:"Dailymotion Embed Player",frameBorder:0,onLoad:()=>c(!0),src:`https://www.dailymotion.com/embed/embed/${e.id}`,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})]}))},figma:({provider:e,width:t,height:o,blockId:i})=>{const n=h(null),{isIntersecting:r}=v(n,{freezeOnceVisible:!0,rootMargin:"50%"});return l("div",Object.assign({className:"yoo-embed-relative",ref:n},{children:r&&l("iframe",{src:`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(e.url)}`,frameBorder:0,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0",width:t,height:o})}))},twitter:function({provider:t,blockId:o}){const i=h(null),n=e(),{isIntersecting:r}=v(i,{freezeOnceVisible:!0,rootMargin:"50%"}),s=`${o}-${t.id}`;return u((()=>{var e;if(!r)return;const a=document.createElement("script");a.src="https://platform.twitter.com/widgets.js",null===(e=i.current)||void 0===e||e.appendChild(a),a.onload=()=>{window.twttr&&(window.twttr.widgets.createTweet(t.id,document.getElementById(s),{align:"center",conversation:"none",dnt:!0,theme:"dark",height:500,width:550}),n.blocks.Embed.updateElement(o,"embed",{sizes:{width:"auto",height:"auto"}}))}}),[t.id,r]),l("div",Object.assign({className:"yoo-embed-w-full yoo-embed-h-full",ref:i},{children:l("div",{id:s})}))}},R=({width:e,height:t,provider:o,blockId:i})=>{if(!o)return null;if(o&&o.id&&o.type&&z[o.type]){const n=z[o.type];return l(n,{provider:o,width:e,height:t,blockId:i})}return l("div",Object.assign({className:"yoo-embed-w-full"},{children:l("iframe",{src:o.url,width:"100%",height:"100%",frameBorder:0,allowFullScreen:!0,className:"yoo-embed-absolute yoo-embed-top-0 yoo-embed-left-0"})}))};var S,_=(S=function(e,t){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},S(e,t)},function(e,t){function o(){this.constructor=e}S(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),E=function(){return E=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},E.apply(this,arguments)},C={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},k={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},O={width:"20px",height:"20px",position:"absolute"},N={top:E(E({},C),{top:"-5px"}),right:E(E({},k),{left:void 0,right:"-5px"}),bottom:E(E({},C),{top:void 0,bottom:"-5px"}),left:E(E({},k),{left:"-5px"}),topRight:E(E({},O),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:E(E({},O),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:E(E({},O),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:E(E({},O),{left:"-10px",top:"-10px",cursor:"nw-resize"})},L=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return _(t,e),t.prototype.render=function(){return c.createElement("div",{className:this.props.className||"",style:E(E({position:"absolute",userSelect:"none"},N[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(c.PureComponent),M=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},e(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),W=function(){return W=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},W.apply(this,arguments)},A={width:"auto",height:"auto"},T=function(e,t,o){return Math.max(Math.min(e,o),t)},j=function(e,t){return Math.round(e/t)*t},B=function(e,t){return new RegExp(e,"i").test(t)},I=function(e){return Boolean(e.touches&&e.touches.length)},P=function(e,t,o){void 0===o&&(o=0);var i=t.reduce((function(o,i,n){return Math.abs(i-e)<Math.abs(t[o]-e)?n:o}),0),n=Math.abs(t[i]-e);return 0===o||n<o?t[i]:e},H=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},D=function(e,t,o,i){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return o*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return i*(Number(e.replace("vh",""))/100)}return e},F=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],V="__resizable_base__",U=function(e){function t(t){var o=e.call(this,t)||this;return o.ratio=1,o.resizable=null,o.parentLeft=0,o.parentTop=0,o.resizableLeft=0,o.resizableRight=0,o.resizableTop=0,o.resizableBottom=0,o.targetLeft=0,o.targetTop=0,o.appendBase=function(){if(!o.resizable||!o.window)return null;var e=o.parentNode;if(!e)return null;var t=o.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(V):t.className+=V,e.appendChild(t),t},o.removeBase=function(e){var t=o.parentNode;t&&t.removeChild(e)},o.ref=function(e){e&&(o.resizable=e)},o.state={isResizing:!1,width:void 0===(o.propsSize&&o.propsSize.width)?"auto":o.propsSize&&o.propsSize.width,height:void 0===(o.propsSize&&o.propsSize.height)?"auto":o.propsSize&&o.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},o.onResizeStart=o.onResizeStart.bind(o),o.onMouseMove=o.onMouseMove.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o}return M(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||A},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,n=this.resizable.style.position;"relative"!==n&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=n}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var o=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/o[t]*100+"%"}return H(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?H(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?H(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==o&&"auto"!==o?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,i,n=this.props.boundsByDirection,r=this.state.direction,s=n&&B("left",r),a=n&&B("top",r);if("parent"===this.props.bounds){var d=this.parentNode;d&&(o=s?this.resizableRight-this.parentLeft:d.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:d.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o=this.props.scale||1,i=this.props.resizeRatio||1,n=this.state,r=n.direction,s=n.original,a=this.props,d=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,p=s.width,u=s.height,h=l||0,f=c||0;return B("right",r)&&(p=s.width+(e-s.x)*i/o,d&&(u=(p-f)/this.ratio+h)),B("left",r)&&(p=s.width-(e-s.x)*i/o,d&&(u=(p-f)/this.ratio+h)),B("bottom",r)&&(u=s.height+(t-s.y)*i/o,d&&(p=(u-h)*this.ratio+f)),B("top",r)&&(u=s.height-(t-s.y)*i/o,d&&(p=(u-h)*this.ratio+f)),{newWidth:p,newHeight:u}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,i){var n=this.props,r=n.lockAspectRatio,s=n.lockAspectRatioExtraHeight,a=n.lockAspectRatioExtraWidth,d=void 0===i.width?10:i.width,l=void 0===o.width||o.width<0?e:o.width,c=void 0===i.height?10:i.height,p=void 0===o.height||o.height<0?t:o.height,u=s||0,h=a||0;if(r){var f=(c-u)*this.ratio+h,m=(p-u)*this.ratio+h,b=(d-h)/this.ratio+u,y=(l-h)/this.ratio+u,g=Math.max(d,f),w=Math.min(l,m),x=Math.max(c,b),v=Math.min(p,y);e=T(e,g,w),t=T(t,x,v)}else e=T(e,d,l),t=T(t,c,p);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,r=i.top,s=i.right,a=i.bottom;this.resizableLeft=n,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,i=0,n=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&I(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",o=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var d={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:W(W({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:o};this.setState(d)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&I(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var o=this.props,i=o.maxWidth,n=o.maxHeight,r=o.minWidth,s=o.minHeight,a=I(e)?e.touches[0].clientX:e.clientX,d=I(e)?e.touches[0].clientY:e.clientY,l=this.state,c=l.direction,p=l.original,u=l.width,h=l.height,f=this.getParentSize(),m=function(e,t,o,i,n,r,s){return i=D(i,e.width,t,o),n=D(n,e.height,t,o),r=D(r,e.width,t,o),s=D(s,e.height,t,o),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===n?void 0:Number(n),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,i,n,r,s);i=m.maxWidth,n=m.maxHeight,r=m.minWidth,s=m.minHeight;var b=this.calculateNewSizeFromDirection(a,d),y=b.newHeight,g=b.newWidth,x=this.calculateNewMaxFromBoundary(i,n);this.props.snap&&this.props.snap.x&&(g=P(g,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(y=P(y,this.props.snap.y,this.props.snapGap));var v=this.calculateNewSizeFromAspectRatio(g,y,{width:x.maxWidth,height:x.maxHeight},{width:r,height:s});if(g=v.newWidth,y=v.newHeight,this.props.grid){var z=j(g,this.props.grid[0]),R=j(y,this.props.grid[1]),S=this.props.snapGap||0;g=0===S||Math.abs(z-g)<=S?z:g,y=0===S||Math.abs(R-y)<=S?R:y}var _={width:g-p.width,height:y-p.height};if(u&&"string"==typeof u)if(u.endsWith("%"))g=g/f.width*100+"%";else if(u.endsWith("vw")){g=g/this.window.innerWidth*100+"vw"}else if(u.endsWith("vh")){g=g/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))y=y/f.height*100+"%";else if(h.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}var E={width:this.createSizeForCssProperty(g,"width"),height:this.createSizeForCssProperty(y,"height")};"row"===this.flexDir?E.flexBasis=E.width:"column"===this.flexDir&&(E.flexBasis=E.height),w((function(){t.setState(E)})),this.props.onResize&&this.props.onResize(e,c,this.resizable,_)}},t.prototype.onMouseUp=function(e){var t=this.state,o=t.isResizing,i=t.direction,n=t.original;if(o&&this.resizable){var r={width:this.size.width-n.width,height:this.size.height-n.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:W(W({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,i=t.handleStyles,n=t.handleClasses,r=t.handleWrapperStyle,s=t.handleWrapperClass,a=t.handleComponent;if(!o)return null;var d=Object.keys(o).map((function(t){return!1!==o[t]?c.createElement(L,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},a&&a[t]?a[t]:null):null}));return c.createElement("div",{className:s,style:r},d)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,o){return-1!==F.indexOf(o)||(t[o]=e.props[o]),t}),{}),o=W(W(W({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return c.createElement(i,W({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&c.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(c.PureComponent);function $(e){return G(e)?(e.nodeName||"").toLowerCase():"#document"}function X(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Y(e){var t;return null==(t=(G(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function G(e){return e instanceof Node||e instanceof X(e).Node}function Z(e){return e instanceof Element||e instanceof X(e).Element}function q(e){return e instanceof HTMLElement||e instanceof X(e).HTMLElement}function J(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof X(e).ShadowRoot)}function K(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function Q(e){return["table","td","th"].includes($(e))}function ee(e){const t=te(),o=ie(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function te(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function oe(e){return["html","body","#document"].includes($(e))}function ie(e){return X(e).getComputedStyle(e)}function ne(e){return Z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function re(e){if("html"===$(e))return e;const t=e.assignedSlot||e.parentNode||J(e)&&e.host||Y(e);return J(t)?t.host:t}function se(e){const t=re(e);return oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:q(t)&&K(t)?t:se(t)}function ae(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=se(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),s=X(n);return r?t.concat(s,s.visualViewport||[],K(n)?n:[],s.frameElement&&o?ae(s.frameElement):[]):t.concat(n,ae(n,[],o))}const de=Math.min,le=Math.max,ce=Math.round,pe=e=>({x:e,y:e}),ue={left:"right",right:"left",bottom:"top",top:"bottom"},he={start:"end",end:"start"};function fe(e,t,o){return le(e,de(t,o))}function me(e,t){return"function"==typeof e?e(t):e}function be(e){return e.split("-")[0]}function ye(e){return e.split("-")[1]}function ge(e){return"x"===e?"y":"x"}function we(e){return"y"===e?"height":"width"}function xe(e){return["top","bottom"].includes(be(e))?"y":"x"}function ve(e){return ge(xe(e))}function ze(e){return e.replace(/start|end/g,(e=>he[e]))}function Re(e){return e.replace(/left|right|bottom|top/g,(e=>ue[e]))}function Se(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function _e(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ee(e,t,o){let{reference:i,floating:n}=e;const r=xe(t),s=ve(t),a=we(s),d=be(t),l="y"===r,c=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,u=i[a]/2-n[a]/2;let h;switch(d){case"top":h={x:c,y:i.y-n.height};break;case"bottom":h={x:c,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:p};break;case"left":h={x:i.x-n.width,y:p};break;default:h={x:i.x,y:i.y}}switch(ye(t)){case"start":h[s]-=u*(o&&l?-1:1);break;case"end":h[s]+=u*(o&&l?-1:1)}return h}async function Ce(e,t){var o;void 0===t&&(t={});const{x:i,y:n,platform:r,rects:s,elements:a,strategy:d}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:u=!1,padding:h=0}=me(t,e),f=Se(h),m=a[u?"floating"===p?"reference":"floating":p],b=_e(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(m)))||o?m:m.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:l,rootBoundary:c,strategy:d})),y="floating"===p?{...s.floating,x:i,y:n}:s.reference,g=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),w=await(null==r.isElement?void 0:r.isElement(g))&&await(null==r.getScale?void 0:r.getScale(g))||{x:1,y:1},x=_e(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:d}):y);return{top:(b.top-x.top+f.top)/w.y,bottom:(x.bottom-b.bottom+f.bottom)/w.y,left:(b.left-x.left+f.left)/w.x,right:(x.right-b.right+f.right)/w.x}}function ke(e){const t=de(...e.map((e=>e.left))),o=de(...e.map((e=>e.top)));return{x:t,y:o,width:le(...e.map((e=>e.right)))-t,height:le(...e.map((e=>e.bottom)))-o}}const Oe=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,i;const{x:n,y:r,placement:s,middlewareData:a}=t,d=await async function(e,t){const{placement:o,platform:i,elements:n}=e,r=await(null==i.isRTL?void 0:i.isRTL(n.floating)),s=be(o),a=ye(o),d="y"===xe(o),l=["left","top"].includes(s)?-1:1,c=r&&d?-1:1,p=me(t,e);let{mainAxis:u,crossAxis:h,alignmentAxis:f}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return a&&"number"==typeof f&&(h="end"===a?-1*f:f),d?{x:h*c,y:u*l}:{x:u*l,y:h*c}}(t,e);return s===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:n+d.x,y:r+d.y,data:{...d,placement:s}}}}};function Ne(e){const t=ie(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=q(e),r=n?e.offsetWidth:o,s=n?e.offsetHeight:i,a=ce(o)!==r||ce(i)!==s;return a&&(o=r,i=s),{width:o,height:i,$:a}}function Le(e){return Z(e)?e:e.contextElement}function Me(e){const t=Le(e);if(!q(t))return pe(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=Ne(t);let s=(r?ce(o.width):o.width)/i,a=(r?ce(o.height):o.height)/n;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const We=pe(0);function Ae(e){const t=X(e);return te()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:We}function Te(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=Le(e);let s=pe(1);t&&(i?Z(i)&&(s=Me(i)):s=Me(e));const a=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==X(e))&&t}(r,o,i)?Ae(r):pe(0);let d=(n.left+a.x)/s.x,l=(n.top+a.y)/s.y,c=n.width/s.x,p=n.height/s.y;if(r){const e=X(r),t=i&&Z(i)?X(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=Me(n),t=n.getBoundingClientRect(),i=ie(n),r=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;d*=e.x,l*=e.y,c*=e.x,p*=e.y,d+=r,l+=s,o=X(n),n=o.frameElement}}return _e({width:c,height:p,x:d,y:l})}const je=[":popover-open",":modal"];function Be(e){return je.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ie(e){return Te(Y(e)).left+ne(e).scrollLeft}function Pe(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=X(e),i=Y(e),n=o.visualViewport;let r=i.clientWidth,s=i.clientHeight,a=0,d=0;if(n){r=n.width,s=n.height;const e=te();(!e||e&&"fixed"===t)&&(a=n.offsetLeft,d=n.offsetTop)}return{width:r,height:s,x:a,y:d}}(e,o);else if("document"===t)i=function(e){const t=Y(e),o=ne(e),i=e.ownerDocument.body,n=le(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=le(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Ie(e);const a=-o.scrollTop;return"rtl"===ie(i).direction&&(s+=le(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:s,y:a}}(Y(e));else if(Z(t))i=function(e,t){const o=Te(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=q(e)?Me(e):pe(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:n*r.x,y:i*r.y}}(t,o);else{const o=Ae(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return _e(i)}function He(e,t){const o=re(e);return!(o===t||!Z(o)||oe(o))&&("fixed"===ie(o).position||He(o,t))}function De(e,t,o){const i=q(t),n=Y(t),r="fixed"===o,s=Te(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const d=pe(0);if(i||!i&&!r)if(("body"!==$(t)||K(n))&&(a=ne(t)),i){const e=Te(t,!0,r,t);d.x=e.x+t.clientLeft,d.y=e.y+t.clientTop}else n&&(d.x=Ie(n));return{x:s.left+a.scrollLeft-d.x,y:s.top+a.scrollTop-d.y,width:s.width,height:s.height}}function Fe(e,t){return q(e)&&"fixed"!==ie(e).position?t?t(e):e.offsetParent:null}function Ve(e,t){const o=X(e);if(!q(e)||Be(e))return o;let i=Fe(e,t);for(;i&&Q(i)&&"static"===ie(i).position;)i=Fe(i,t);return i&&("html"===$(i)||"body"===$(i)&&"static"===ie(i).position&&!ee(i))?o:i||function(e){let t=re(e);for(;q(t)&&!oe(t);){if(ee(t))return t;t=re(t)}return null}(e)||o}const Ue={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,s=Y(i),a=!!t&&Be(t.floating);if(i===s||a&&r)return o;let d={scrollLeft:0,scrollTop:0},l=pe(1);const c=pe(0),p=q(i);if((p||!p&&!r)&&(("body"!==$(i)||K(s))&&(d=ne(i)),q(i))){const e=Te(i);l=Me(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}return{width:o.width*l.x,height:o.height*l.y,x:o.x*l.x-d.scrollLeft*l.x+c.x,y:o.y*l.y-d.scrollTop*l.y+c.y}},getDocumentElement:Y,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:i,strategy:n}=e;const r=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let i=ae(e,[],!1).filter((e=>Z(e)&&"body"!==$(e))),n=null;const r="fixed"===ie(e).position;let s=r?re(e):e;for(;Z(s)&&!oe(s);){const t=ie(s),o=ee(s);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||K(s)&&!o&&He(e,s))?i=i.filter((e=>e!==s)):n=t,s=re(s)}return t.set(e,i),i}(t,this._c):[].concat(o),i],s=r[0],a=r.reduce(((e,o)=>{const i=Pe(t,o,n);return e.top=le(i.top,e.top),e.right=de(i.right,e.right),e.bottom=de(i.bottom,e.bottom),e.left=le(i.left,e.left),e}),Pe(t,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Ve,getElementRects:async function(e){const t=this.getOffsetParent||Ve,o=this.getDimensions;return{reference:De(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await o(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=Ne(e);return{width:t,height:o}},getScale:Me,isElement:Z,isRTL:function(e){return"rtl"===ie(e).direction}},$e=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:i,placement:n}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...d}=me(e,t),l={x:o,y:i},c=await Ce(t,d),p=xe(be(n)),u=ge(p);let h=l[u],f=l[p];if(r){const e="y"===u?"bottom":"right";h=fe(h+c["y"===u?"top":"left"],h,h-c[e])}if(s){const e="y"===p?"bottom":"right";f=fe(f+c["y"===p?"top":"left"],f,f-c[e])}const m=a.fn({...t,[u]:h,[p]:f});return{...m,data:{x:m.x-o,y:m.y-i}}}}},Xe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,i;const{placement:n,middlewareData:r,rects:s,initialPlacement:a,platform:d,elements:l}=t,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...b}=me(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const y=be(n),g=be(a)===a,w=await(null==d.isRTL?void 0:d.isRTL(l.floating)),x=u||(g||!m?[Re(a)]:function(e){const t=Re(e);return[ze(e),t,ze(t)]}(a));u||"none"===f||x.push(...function(e,t,o,i){const n=ye(e);let r=function(e,t,o){const i=["left","right"],n=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return o?t?n:i:t?i:n;case"left":case"right":return t?r:s;default:return[]}}(be(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(ze)))),r}(a,m,f,w));const v=[a,...x],z=await Ce(t,b),R=[];let S=(null==(i=r.flip)?void 0:i.overflows)||[];if(c&&R.push(z[y]),p){const e=function(e,t,o){void 0===o&&(o=!1);const i=ye(e),n=ve(e),r=we(n);let s="x"===n?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Re(s)),[s,Re(s)]}(n,s,w);R.push(z[e[0]],z[e[1]])}if(S=[...S,{placement:n,overflows:R}],!R.every((e=>e<=0))){var _,E;const e=((null==(_=r.flip)?void 0:_.index)||0)+1,t=v[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let o=null==(E=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!o)switch(h){case"bestFit":{var C;const e=null==(C=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(o=e);break}case"initialPlacement":o=a}if(n!==o)return{reset:{placement:o}}}return{}}}},Ye=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:i,rects:n,platform:r,strategy:s}=t,{padding:a=2,x:d,y:l}=me(e,t),c=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),p=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let i=null;for(let e=0;e<t.length;e++){const n=t[e];!i||n.y-i.y>i.height/2?o.push([n]):o[o.length-1].push(n),i=n}return o.map((e=>_e(ke(e))))}(c),u=_e(ke(c)),h=Se(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&p[0].left>p[1].right&&null!=d&&null!=l)return p.find((e=>d>e.left-h.left&&d<e.right+h.right&&l>e.top-h.top&&l<e.bottom+h.bottom))||u;if(p.length>=2){if("y"===xe(o)){const e=p[0],t=p[p.length-1],i="top"===be(o),n=e.top,r=t.bottom,s=i?e.left:t.left,a=i?e.right:t.right;return{top:n,bottom:r,left:s,right:a,width:a-s,height:r-n,x:s,y:n}}const e="left"===be(o),t=le(...p.map((e=>e.right))),i=de(...p.map((e=>e.left))),n=p.filter((o=>e?o.left===i:o.right===t)),r=n[0].top,s=n[n.length-1].bottom;return{top:r,bottom:s,left:i,right:t,width:t-i,height:s-r,x:i,y:r}}return u}},floating:i.floating,strategy:s});return n.reference.x!==f.reference.x||n.reference.y!==f.reference.y||n.reference.width!==f.reference.width||n.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},Ge=(e,t,o)=>{const i=new Map,n={platform:Ue,...o},r={...n.platform,_c:i};return(async(e,t,o)=>{const{placement:i="bottom",strategy:n="absolute",middleware:r=[],platform:s}=o,a=r.filter(Boolean),d=await(null==s.isRTL?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:p}=Ee(l,i,d),u=i,h={},f=0;for(let o=0;o<a.length;o++){const{name:r,fn:m}=a[o],{x:b,y:y,data:g,reset:w}=await m({x:c,y:p,initialPlacement:i,placement:u,strategy:n,middlewareData:h,rects:l,platform:s,elements:{reference:e,floating:t}});c=null!=b?b:c,p=null!=y?y:p,h={...h,[r]:{...h[r],...g}},w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(u=w.placement),w.rects&&(l=!0===w.rects?await s.getElementRects({reference:e,floating:t,strategy:n}):w.rects),({x:c,y:p}=Ee(l,u,d))),o=-1)}return{x:c,y:p,placement:u,strategy:n,middlewareData:h}})(e,t,{...n,platform:r})};var Ze="undefined"!=typeof document?f:u;function qe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let o,i,n;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(!qe(e[i],t[i]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(i=o;0!=i--;)if(!{}.hasOwnProperty.call(t,n[i]))return!1;for(i=o;0!=i--;){const o=n[i];if(("_owner"!==o||!e.$$typeof)&&!qe(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Je(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ke(e,t){const o=Je(e);return Math.round(t*o)/o}function Qe(e){const t=c.useRef(e);return Ze((()=>{t.current=e})),t}
2
2
  /*!
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
5
  */
6
- var et=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),tt="undefined"==typeof Element,ot=tt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,it=!tt&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},nt=function e(t,o){var i;void 0===o&&(o=!0);var n=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===n||"true"===n||o&&t&&e(t.parentNode)},rt=function e(t,o,i){for(var n=[],r=Array.from(t);r.length;){var s=r.shift();if(!nt(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,i);i.flatten?n.push.apply(n,l):n.push({scopeParent:s,candidates:l})}else{ot.call(s,et)&&i.filter(s)&&(o||!t.includes(s))&&n.push(s);var d=s.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(s),c=!nt(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(d&&c){var u=e(!0===d?s.children:d.children,!0,i);i.flatten?n.push.apply(n,u):n.push({scopeParent:s,candidates:u})}else r.unshift.apply(r,s.children)}}return n},st=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},at=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,o=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===o||"true"===o}(e))&&!st(e)?0:e.tabIndex},lt=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},dt=function(e){return"INPUT"===e.tagName},ct=function(e){return function(e){return dt(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,o=e.form||it(e),i=function(e){return o.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var n=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]}(t,e.form);return!n||n===e}(e)},ut=function(e){var t=e.getBoundingClientRect(),o=t.width,i=t.height;return 0===o&&0===i},ht=function(e,t){var o=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=ot.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ot.call(n,"details:not([open]) *"))return!0;if(o&&"full"!==o&&"legacy-full"!==o){if("non-zero-area"===o)return ut(e)}else{if("function"==typeof i){for(var r=e;e;){var s=e.parentElement,a=it(e);if(s&&!s.shadowRoot&&!0===i(s))return ut(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=r}if(function(e){var t,o,i,n,r=e&&it(e),s=null===(t=r)||void 0===t?void 0:t.host,a=!1;if(r&&r!==e)for(a=!!(null!==(o=s)&&void 0!==o&&null!==(i=o.ownerDocument)&&void 0!==i&&i.contains(s)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!a&&s;){var l,d,c;a=!(null===(d=s=null===(l=r=it(s))||void 0===l?void 0:l.host)||void 0===d||null===(c=d.ownerDocument)||void 0===c||!c.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==o)return!0}return!1},pt=function(e,t){return!(t.disabled||nt(t)||function(e){return dt(e)&&"hidden"===e.type}(t)||ht(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var o=0;o<t.children.length;o++){var i=t.children.item(o);if("LEGEND"===i.tagName)return!!ot.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},ft=function(e,t){return!(ct(t)||at(t)<0||!pt(e,t))},mt=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},bt=function e(t){var o=[],i=[];return t.forEach((function(t,n){var r=!!t.scopeParent,s=r?t.scopeParent:t,a=function(e,t){var o=at(e);return o<0&&t&&!st(e)?0:o}(s,r),l=r?e(t.candidates):s;0===a?r?o.push.apply(o,l):o.push(s):i.push({documentOrder:n,tabIndex:a,item:t,isScope:r,content:l})})),i.sort(lt).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(o)},yt=function(e,t){var o;return o=(t=t||{}).getShadowRoot?rt([e],t.includeContainer,{filter:ft.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:mt}):function(e,t,o){if(nt(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(et));return t&&ot.call(e,et)&&i.unshift(e),i.filter(o)}(e,t.includeContainer,ft.bind(null,t)),bt(o)};const gt=c["useInsertionEffect".toString()]||(e=>e());var wt="undefined"!=typeof document?f:h;function xt(){return xt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},xt.apply(this,arguments)}let vt=!1,zt=0;const Rt=()=>"floating-ui-"+zt++;const St=c["useId".toString()]||function(){const[e,t]=c.useState((()=>vt?Rt():void 0));return wt((()=>{null==e&&t(Rt())}),[]),c.useEffect((()=>{vt||(vt=!0)}),[]),e};const _t=c.createContext(null),Et=c.createContext(null);function Ct(e){return"data-floating-ui-"+e}const kt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ot(e,t){const o=yt(e,kt());"prev"===t&&o.reverse();const i=o.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(o=t)||null==(o=o.shadowRoot)?void 0:o.activeElement);){var o;t=t.shadowRoot.activeElement}return t}((null==(n=e)?void 0:n.ownerDocument)||document));var n;return o.slice(i+1)[0]}function Nt(e,t){const o=t||e.currentTarget,i=e.relatedTarget;return!i||!function(e,t){if(!e||!t)return!1;const o=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&J(o)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}(o,i)}function Lt(e){yt(e,kt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Mt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const Wt={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function At(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Tt=c.forwardRef((function(e,t){const[o,i]=c.useState();wt((()=>(/apple/i.test(navigator.vendor)&&i("button"),document.addEventListener("keydown",At),()=>{document.removeEventListener("keydown",At)})),[]);const n={ref:t,tabIndex:0,role:o,"aria-hidden":!o||void 0,[Ct("focus-guard")]:"",style:Wt};return c.createElement("span",xt({},e,n))})),jt=c.createContext(null),Bt=Ct("portal");function It(e){let{children:t,id:o,root:i=null,preserveTabOrder:n=!0}=e;const r=function(e){let{id:t,root:o}=void 0===e?{}:e;const[i,n]=c.useState(null),r=St(),s=Pt(),a=c.useRef(null);return wt((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{a.current=null}))}),[i]),wt((()=>{if(a.current)return;const e=t?document.getElementById(t):null;if(!e)return;const o=document.createElement("div");o.id=r,o.setAttribute(Bt,""),e.appendChild(o),a.current=o,n(o)}),[t,r]),wt((()=>{if(a.current)return;let e=o||(null==s?void 0:s.portalNode);e&&!Z(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(Bt,""),e=i||e,e.appendChild(l),a.current=l,n(l)}),[t,o,r,s]),i}({id:o,root:i}),[s,a]=c.useState(null),l=c.useRef(null),d=c.useRef(null),u=c.useRef(null),h=c.useRef(null),p=!!s&&!s.modal&&s.open&&n&&!(!i&&!r);return c.useEffect((()=>{if(r&&n&&(null==s||!s.modal))return r.addEventListener("focusin",e,!0),r.addEventListener("focusout",e,!0),()=>{r.removeEventListener("focusin",e,!0),r.removeEventListener("focusout",e,!0)};function e(e){if(r&&Nt(e)){("focusin"===e.type?Mt:Lt)(r)}}}),[r,n,null==s?void 0:s.modal]),c.createElement(jt.Provider,{value:c.useMemo((()=>({preserveTabOrder:n,beforeOutsideRef:l,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:h,portalNode:r,setFocusManagerState:a})),[n,r])},p&&r&&c.createElement(Tt,{"data-type":"outside",ref:l,onFocus:e=>{if(Nt(e,r)){var t;null==(t=u.current)||t.focus()}else{const e=Ot(document.body,"prev")||(null==s?void 0:s.refs.domReference.current);null==e||e.focus()}}}),p&&r&&c.createElement("span",{"aria-owns":r.id,style:Wt}),r&&x(t,r),p&&r&&c.createElement(Tt,{"data-type":"outside",ref:d,onFocus:e=>{if(Nt(e,r)){var t;null==(t=h.current)||t.focus()}else{const t=Ot(document.body,"next")||(null==s?void 0:s.refs.domReference.current);null==t||t.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent))}}}))}const Pt=()=>c.useContext(jt),Ht=new Set,Dt=c.forwardRef((function(e,t){let{lockScroll:o=!1,...i}=e;const n=St();return wt((()=>{if(!o)return;Ht.add(n);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=t.left?parseFloat(t.left):window.pageXOffset,a=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",r&&(t[i]=r+"px"),e){var l,d;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,o=(null==(d=window.visualViewport)?void 0:d.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(o))+"px",left:-(s-Math.floor(e))+"px",right:"0"})}return()=>{Ht.delete(n),0===Ht.size&&(Object.assign(t,{overflow:"",[i]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a)))}}),[n,o]),c.createElement("div",xt({ref:t},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))}));function Ft(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[r,s]=c.useState(null),a=(null==(t=e.elements)?void 0:t.reference)||r,l=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:i=[],platform:n,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:l,open:d}=e,[u,h]=c.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=c.useState(i);qe(p,i)||f(i);const[m,b]=c.useState(null),[y,w]=c.useState(null),x=c.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),v=c.useCallback((e=>{e!==_.current&&(_.current=e,w(e))}),[]),z=r||m,R=s||y,S=c.useRef(null),_=c.useRef(null),E=c.useRef(u),C=null!=l,k=Qe(l),O=Qe(n),N=c.useCallback((()=>{if(!S.current||!_.current)return;const e={placement:t,strategy:o,middleware:p};O.current&&(e.platform=O.current),Ge(S.current,_.current,e).then((e=>{const t={...e,isPositioned:!0};L.current&&!qe(E.current,t)&&(E.current=t,g.flushSync((()=>{h(t)})))}))}),[p,t,o,O]);Ze((()=>{!1===d&&E.current.isPositioned&&(E.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[d]);const L=c.useRef(!1);Ze((()=>(L.current=!0,()=>{L.current=!1})),[]),Ze((()=>{if(z&&(S.current=z),R&&(_.current=R),z&&R){if(k.current)return k.current(z,R,N);N()}}),[z,R,N,k,C]);const M=c.useMemo((()=>({reference:S,floating:_,setReference:x,setFloating:v})),[x,v]),W=c.useMemo((()=>({reference:z,floating:R})),[z,R]),A=c.useMemo((()=>{const e={position:o,left:0,top:0};if(!W.floating)return e;const t=Ke(W.floating,u.x),i=Ke(W.floating,u.y);return a?{...e,transform:"translate("+t+"px, "+i+"px)",...Je(W.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,a,W.floating,u.x,u.y]);return c.useMemo((()=>({...u,update:N,refs:M,elements:W,floatingStyles:A})),[u,N,M,W,A])}(e),d=c.useContext(Et),u=null!=((null==(h=c.useContext(_t))?void 0:h.id)||null);var h;const p=function(e){const t=c.useRef((()=>{}));return gt((()=>{t.current=e})),c.useCallback((function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return null==t.current?void 0:t.current(...o)}),[])}(((e,t,o)=>{e&&(m.current.openEvent=t),b.emit("openchange",{open:e,event:t,reason:o,nested:u}),null==i||i(e,t,o)})),f=c.useRef(null),m=c.useRef({}),b=c.useState((()=>function(){const e=new Map;return{emit(t,o){var i;null==(i=e.get(t))||i.forEach((e=>e(o)))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var i;e.set(t,(null==(i=e.get(t))?void 0:i.filter((e=>e!==o)))||[])}}}()))[0],y=St(),w=c.useCallback((e=>{const t=Z(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l.refs.setReference(t)}),[l.refs]),x=c.useCallback((e=>{(Z(e)||null===e)&&(f.current=e,s(e)),(Z(l.refs.reference.current)||null===l.refs.reference.current||null!==e&&!Z(e))&&l.refs.setReference(e)}),[l.refs]),v=c.useMemo((()=>({...l.refs,setReference:x,setPositionReference:w,domReference:f})),[l.refs,x,w]),z=c.useMemo((()=>({...l.elements,domReference:a})),[l.elements,a]),R=c.useMemo((()=>({...l,refs:v,elements:z,dataRef:m,nodeId:n,floatingId:y,events:b,open:o,onOpenChange:p})),[l,n,y,b,o,p,v,z]);return wt((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===n));e&&(e.context=R)})),c.useMemo((()=>({...l,context:R,refs:v,elements:z})),[l,v,z,R])}function Vt(e,t){if(null==e)return{};var o,i,n={},r=Object.keys(e);for(i=0;i<r.length;i++)o=r[i],t.indexOf(o)>=0||(n[o]=e[o]);return n}var Ut=["color"],$t=m((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Vt(e,Ut);return b("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),b("path",{d:"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Xt=["color"],Yt=m((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Vt(e,Xt);return b("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),b("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}));const Gt={youtube:e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null},vimeo:e=>new URL(e).pathname.split("/")[1],dailymotion:e=>{const t=e.match(/^.+dailymotion.com\/(embed|hub)\/([^_]+)[^#]*(#embed=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null},twitter:function(e){const t=e.match(/\/status\/(\d+)/);return t?t[1]:null},figma:function(e){const t=new URL(e).searchParams,o=t.get("node-id");return t.get("node-id")?o:"unknown"}},Zt=({blockId:t,onClose:o})=>{const i=e(),[n,r]=u(""),s=0===n.length;return l("div",Object.assign({className:"yoo-embed-cursor-pointer yoo-embed-user-select-none yoo-embed-transition-bg yoo-embed-duration-20 yoo-embed-ease-in yoo-embed-white-space-nowrap yoo-embed-w-full"},{children:[d("input",{type:"text",placeholder:"Paste embed link",value:n,className:"yoo-embed-items-center yoo-embed-bg-[hsla(45,13%,94%,.6)] yoo-embed-rounded-[4px] yoo-embed-shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] yoo-embed-cursor-text yoo-embed-flex yoo-embed-text-[14px] yoo-embed-h-[32px] yoo-embed-leading-[20px] yoo-embed-px-[6px] yoo-embed-relative yoo-embed-w-full yoo-embed-border-none",onChange:e=>r(e.target.value)}),d("button",Object.assign({type:"button",className:"yoo-embed-user-select-none yoo-embed-transition-bg yoo-embed-duration-20 yoo-embed-ease-in yoo-embed-cursor-pointer yoo-embed-flex yoo-embed-items-center yoo-embed-justify-center yoo-embed-flex-shrink-0 yoo-embed-white-space-nowrap yoo-embed-h-[28px] yoo-embed-rounded-[4px] yoo-embed-shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] yoo-embed-bg-[rgb(35,131,226)] yoo-embed-text-white yoo-embed-fill-white yoo-embed-leading-[1.2] yoo-embed-px-[12px] yoo-embed-text-[14px] yoo-embed-font-medium yoo-embed-w-full yoo-embed-max-w-[300px] yoo-embed-mx-auto yoo-embed-m-[12px_0_6px] disabled:yoo-embed-bg-[rgba(35,131,226,0.5)] disabled:yoo-embed-cursor-not-allowed",disabled:s,onClick:()=>{var e;if(0===n.length)return;const r=(s=n).includes("youtube.com")||s.includes("youtu.be")?"youtube":s.includes("vimeo.com")?"vimeo":s.includes("dailymotion.com")||s.includes("dai.ly")?"dailymotion":s.includes("twitter")?"twitter":s.includes("figma")?"figma":null;var s;const a=r?null===(e=Gt[r])||void 0===e?void 0:e.call(Gt,n):null,l={type:r,id:a,url:n};r&&a||(l.id=n),i.blocks.Embed.updateElement(t,"embed",{provider:l}),o()}},{children:"Embed embed"}))]}))},qt=({floatingStyles:e,refs:t,onClose:o,blockId:i})=>d(It,Object.assign({id:"yoo-embed-uploader-portal",root:document.getElementById("yoopta-editor")},{children:d(Dt,Object.assign({lockScroll:!0,className:"yoo-embed-z-[100]",onClick:o},{children:d("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:l("div",Object.assign({className:"yoo-embed-flex yoo-embed-flex-col yoo-embed-min-w-[540px] yoo-embed-max-w-[calc(100vw-24px)] yoo-embed-h-full yoo-embed-max-h-[420px] yoo-embed-bg-white yoo-embed-shadow-[rgb(15_15_15_/5%)_0px_0px_0px_1px,_rgb(15_15_15_/10%)_0px_3px_6px,_rgb(15_15_15_/20%)_0px_9px_24px]"},{children:[d("div",Object.assign({className:"yoo-embed-w-full yoo-embed-flex yoo-embed-text-[14px] yoo-embed-p-[0_8px] yoo-embed-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-embed-relative yoo-embed-z-10 yoo-embed-h-[40px]"},{children:d("button",Object.assign({type:"button",style:{borderBottom:"2px solid #2483e2"},className:"yoo-embed-py-[6px] yoo-embed-whitespace-nowrap yoo-embed-min-w-0 yoo-embed-flex-shrink-0 yoo-embed-text-[rgb(55,53,47)] yoo-embed-relative yoo-embed-cursor-pointer yoo-embed-user-select-none yoo-embed-bg-inherit yoo-embed-transition-[height_20ms_ease-in] yoo-embed-inline-flex yoo-embed-items-center yoo-embed-h-full yoo-embed-text-[14px] yoo-embed-leading-[1.2] yoo-embed-px-[8px]"},{children:"Embed link"}))})),d("div",Object.assign({className:"yoo-embed-pt-[6px] yoo-embed-pb-[6px] yoo-embed-mt-[4px] yoo-embed-flex yoo-embed-justify-center yoo-embed-mr-[12px] yoo-embed-ml-[12px]"},{children:d(Zt,{onClose:o,blockId:i})}))]}))}))}))})),Jt=({attributes:e,children:t,blockId:o})=>{const[i,n]=u(!1),{refs:r,floatingStyles:s}=Ft({placement:"bottom",open:i,onOpenChange:n,middleware:[Ye(),Xe(),$e(),Oe(10)]});return l("div",Object.assign({className:"yoo-embed-w-full yoo-embed-user-select-none yoo-embed-m-[20px_0_10px] yoo-embed-relative yoo-embed-flex"},e,{contentEditable:!1},{children:[l("button",Object.assign({className:"yoo-embed-p-[12px_36px_12px_12px] yoo-embed-flex yoo-embed-items-center yoo-embed-text-left yoo-embed-w-full yoo-embed-overflow-hidden yoo-embed-rounded-[3px] yoo-embed-text-[14px] yoo-embed-text-[rgba(55,53,47,0.65)] yoo-embed-relative yoo-embed-cursor-pointer yoo-embed-border-none yoo-embed-bg-[#efefef] yoo-embed-transition-[background-color_100ms_ease-in] hover:yoo-embed-bg-[#e3e3e3]",onClick:()=>n(!0),ref:r.setReference},{children:[d($t,{className:"yoo-embed-mr-2 yoo-embed-user-select-none",width:24,height:24}),d("span",Object.assign({className:"yoo-embed-font-medium"},{children:"Click to add embed"}))]})),i&&d(qt,{blockId:o,floatingStyles:s,refs:r,onClose:()=>n(!1)}),t]}))},{ExtendedBlockActions:Kt,BlockOptionsMenuGroup:Qt,BlockOptionsMenuItem:eo,BlockOptionsSeparator:to}=t,oo=({editor:e,block:t,props:o})=>l(Kt,Object.assign({onClick:()=>e.setSelection([t.meta.order])},{children:[d(to,{}),d(Qt,{children:d(eo,{children:l("button",Object.assign({type:"button",className:"yoo-embed-rounded-sm hover:yoo-embed-bg-[#37352f14] yoo-embed-leading-[120%] yoo-embed-px-2 yoo-embed-py-1.5 yoo-embed-mx-[4px] yoo-embed-cursor-pointer yoo-embed-w-full yoo-embed-flex yoo-embed-justify-start",onClick:()=>{var e;window.open(null===(e=null==o?void 0:o.provider)||void 0===e?void 0:e.url,"_blank")}},{children:[d(Yt,{width:16,height:16,className:"yoo-embed-w-4 yoo-embed-h-4 yoo-embed-mr-2"}),"Open"]}))})})]})),io=({position:e})=>d("div",Object.assign({contentEditable:!1,className:"yoo-embed-absolute yoo-embed-pointer-events-none yoo-embed-flex yoo-embed-items-center yoo-embed-justify-center yoo-embed-z-10 yoo-embed-opacity-1 yoo-embed-h-full yoo-embed-w-[15px] yoo-embed-cursor-col-resize yoo-embed-transition-opacity yoo-embed-duration-150 yoo-embed-ease-in "+("left"===e?"yoo-embed-left-0 yoo-embed-top-0":"yoo-embed-right-0 yoo-embed-top-0")},{children:d("div",{className:"yoo-embed-opacity-100 yoo-embed-transition-opacity yoo-embed-duration-300 yoo-embed-ease-in yoo-embed-rounded-[20px] yoo-embed-bg-[rgba(15,15,15,0.6)] yoo-embed-border yoo-embed-border-[rgba(255,255,255,0.9)] yoo-embed-w-[6px] yoo-embed-h-[48px] yoo-embed-max-h-[50%] yoo-embed-shadow-[0_0_0_.5px_#FFF]"})})),no=new s({type:"Embed",elements:{embed:{render:({element:t,attributes:s,children:a,blockId:c})=>{const{sizes:p,provider:f}=t.props||{},m=o(c),b=e(),g=i("Embed"),w=n(),[x,v]=u({width:(null==p?void 0:p.width)||750,height:(null==p?void 0:p.height)||440});h((()=>v({width:(null==p?void 0:p.width)||650,height:(null==p?void 0:p.height)||440})),[t.props]);const z=r({blockId:c}),S=y((()=>{var e,t;return{minWidth:300,size:{width:x.width,height:x.height},maxWidth:(null===(e=null==g?void 0:g.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(t=null==g?void 0:g.maxSizes)||void 0===t?void 0:t.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!w,right:!w},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{v({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,t,o)=>{b.blocks.Embed.updateElement(c,"embed",{sizes:{width:o.offsetWidth,height:o.offsetHeight}})},handleComponent:{left:d(io,{position:"left"}),right:d(io,{position:"right"})}}}),[x.width,x.height]);return f&&(null==f?void 0:f.id)?d("div",Object.assign({"data-element-type":t.type,contentEditable:!1,draggable:!1,className:"yoo-embed-mt-4 yoo-embed-relative yoopta-embed"},s,{children:l(U,Object.assign({},S,{className:"yoo-embed-mx-auto yoo-embed-my-0 yoo-embed-flex"},{children:[z&&d("div",{className:"yoo-embed-absolute yoo-embed-pointer-events-none yoo-embed-inset-0 yoo-embed-bg-[rgba(35,131,226,0.14)] yoo-embed-z-[81] yoo-embed-rounded-[3px] yoo-embed-opacity-100 yoo-embed-transition-opacity yoo-embed-duration-150 yoo-embed-ease-in"}),d(R,{width:null==x?void 0:x.width,height:null==x?void 0:x.height,provider:f,blockId:c}),!w&&d(oo,{block:m,editor:b,props:t.props}),a]}))})):d(Jt,Object.assign({attributes:s,blockId:c},{children:a}))},props:{sizes:{width:650,height:400},nodeType:"void"}}},options:{display:{title:"Embed",description:"For embed videos, google maps and more"},maxSizes:{maxWidth:650,maxHeight:550}},parsers:{html:{deserialize:{nodeNames:["IFRAME"],parse:e=>{if("IFRAME"===e.nodeName){const t=new URL(e.getAttribute("src")||"");return{id:a(),type:"embed",children:[{text:""}],props:{provider:{id:t.href,type:t.hostname,url:t.href},sizes:{width:e.getAttribute("width")?parseInt(e.getAttribute("width")||"650",10):650,height:e.getAttribute("height")?parseInt(e.getAttribute("height")||"400",10):400}}}}}}}}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".yoo-embed-pointer-events-none{pointer-events:none}.yoo-embed-absolute{position:absolute}.yoo-embed-relative{position:relative}.yoo-embed-inset-0{inset:0}.yoo-embed-left-0{left:0}.yoo-embed-right-0{right:0}.yoo-embed-top-0{top:0}.yoo-embed-z-10{z-index:10}.yoo-embed-z-\\[100\\]{z-index:100}.yoo-embed-z-\\[81\\]{z-index:81}.yoo-embed-m-\\[12px_0_6px\\]{margin:12px 0 6px}.yoo-embed-m-\\[20px_0_10px\\]{margin:20px 0 10px}.yoo-embed-mx-\\[4px\\]{margin-left:4px;margin-right:4px}.yoo-embed-mx-auto{margin-left:auto;margin-right:auto}.yoo-embed-my-0{margin-bottom:0;margin-top:0}.yoo-embed-ml-\\[12px\\]{margin-left:12px}.yoo-embed-mr-2{margin-right:.5rem}.yoo-embed-mr-\\[12px\\]{margin-right:12px}.yoo-embed-mt-4{margin-top:1rem}.yoo-embed-mt-\\[4px\\]{margin-top:4px}.yoo-embed-flex{display:flex}.yoo-embed-inline-flex{display:inline-flex}.yoo-embed-h-4{height:1rem}.yoo-embed-h-\\[28px\\]{height:28px}.yoo-embed-h-\\[32px\\]{height:32px}.yoo-embed-h-\\[40px\\]{height:40px}.yoo-embed-h-\\[48px\\]{height:48px}.yoo-embed-h-full{height:100%}.yoo-embed-max-h-\\[420px\\]{max-height:420px}.yoo-embed-max-h-\\[50\\%\\]{max-height:50%}.yoo-embed-w-4{width:1rem}.yoo-embed-w-\\[15px\\]{width:15px}.yoo-embed-w-\\[6px\\]{width:6px}.yoo-embed-w-full{width:100%}.yoo-embed-min-w-0{min-width:0}.yoo-embed-min-w-\\[540px\\]{min-width:540px}.yoo-embed-max-w-\\[300px\\]{max-width:300px}.yoo-embed-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.yoo-embed-flex-shrink-0{flex-shrink:0}.yoo-embed-cursor-col-resize{cursor:col-resize}.yoo-embed-cursor-pointer{cursor:pointer}.yoo-embed-cursor-text{cursor:text}.yoo-embed-flex-col{flex-direction:column}.yoo-embed-items-center{align-items:center}.yoo-embed-justify-start{justify-content:flex-start}.yoo-embed-justify-center{justify-content:center}.yoo-embed-overflow-hidden{overflow:hidden}.yoo-embed-whitespace-nowrap{white-space:nowrap}.yoo-embed-rounded-\\[20px\\]{border-radius:20px}.yoo-embed-rounded-\\[3px\\]{border-radius:3px}.yoo-embed-rounded-\\[4px\\]{border-radius:4px}.yoo-embed-rounded-sm{border-radius:.125rem}.yoo-embed-border{border-width:1px}.yoo-embed-border-none{border-style:none}.yoo-embed-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.yoo-embed-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.yoo-embed-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.yoo-embed-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.yoo-embed-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.yoo-embed-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.yoo-embed-bg-inherit{background-color:inherit}.yoo-embed-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-embed-fill-white{fill:#fff}.yoo-embed-p-\\[0_8px\\]{padding:0 8px}.yoo-embed-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.yoo-embed-px-2{padding-left:.5rem;padding-right:.5rem}.yoo-embed-px-\\[12px\\]{padding-left:12px;padding-right:12px}.yoo-embed-px-\\[6px\\]{padding-left:6px;padding-right:6px}.yoo-embed-px-\\[8px\\]{padding-left:8px;padding-right:8px}.yoo-embed-py-1{padding-bottom:.25rem;padding-top:.25rem}.yoo-embed-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.yoo-embed-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.yoo-embed-pb-\\[6px\\]{padding-bottom:6px}.yoo-embed-pt-\\[6px\\]{padding-top:6px}.yoo-embed-text-left{text-align:left}.yoo-embed-text-\\[14px\\]{font-size:14px}.yoo-embed-font-medium{font-weight:500}.yoo-embed-leading-\\[1\\.2\\]{line-height:1.2}.yoo-embed-leading-\\[120\\%\\]{line-height:120%}.yoo-embed-leading-\\[20px\\]{line-height:20px}.yoo-embed-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.yoo-embed-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}.yoo-embed-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.yoo-embed-opacity-100{opacity:1}.yoo-embed-shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[inset_0_0_0_1px_hsla\\(0\\,0\\%\\,6\\%\\,\\.1\\)\\]{--tw-shadow:inset 0 0 0 1px hsla(0,0%,6%,.1);--tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\,_rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\,_rgb\\(15_15_15_\\/20\\%\\)_0px_9px_24px\\]{--tw-shadow:rgb(15 15 15/5%) 0px 0px 0px 1px,hsla(0,0%,6%,.1) 0px 3px 6px,hsla(0,0%,6%,.2) 0px 9px 24px;--tw-shadow-colored:0px 0px 0px 1px var(--tw-shadow-color),0px 3px 6px var(--tw-shadow-color),0px 9px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[rgb\\(55_53_47_\\/9\\%\\)_0px_-1px_0px_inset\\]{--tw-shadow:rgb(55 53 47/9%) 0px -1px 0px inset;--tw-shadow-colored:inset 0px -1px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-shadow-\\[rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_0px_0px_1px_inset\\,_rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_1px_2px\\]{--tw-shadow:hsla(0,0%,6%,.1) 0px 0px 0px 1px inset,hsla(0,0%,6%,.1) 0px 1px 2px;--tw-shadow-colored:inset 0px 0px 0px 1px var(--tw-shadow-color),0px 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-embed-transition-\\[background-color_100ms_ease-in\\]{transition-duration:.15s;transition-property:background-color .1s ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-embed-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-embed-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-embed-duration-150{transition-duration:.15s}.yoo-embed-duration-300{transition-duration:.3s}.yoo-embed-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-embed .yoopta-extended-block-actions{opacity:0;transition:opacity .15s ease-in-out}.yoopta-embed:hover .yoopta-extended-block-actions{opacity:1}.hover\\:yoo-embed-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:yoo-embed-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:yoo-embed-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:yoo-embed-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{no as default};
6
+ var et=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),tt="undefined"==typeof Element,ot=tt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,it=!tt&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},nt=function e(t,o){var i;void 0===o&&(o=!0);var n=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===n||"true"===n||o&&t&&e(t.parentNode)},rt=function e(t,o,i){for(var n=[],r=Array.from(t);r.length;){var s=r.shift();if(!nt(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),d=e(a.length?a:s.children,!0,i);i.flatten?n.push.apply(n,d):n.push({scopeParent:s,candidates:d})}else{ot.call(s,et)&&i.filter(s)&&(o||!t.includes(s))&&n.push(s);var l=s.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(s),c=!nt(l,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(l&&c){var p=e(!0===l?s.children:l.children,!0,i);i.flatten?n.push.apply(n,p):n.push({scopeParent:s,candidates:p})}else r.unshift.apply(r,s.children)}}return n},st=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},at=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,o=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===o||"true"===o}(e))&&!st(e)?0:e.tabIndex},dt=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},lt=function(e){return"INPUT"===e.tagName},ct=function(e){return function(e){return lt(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,o=e.form||it(e),i=function(e){return o.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var n=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]}(t,e.form);return!n||n===e}(e)},pt=function(e){var t=e.getBoundingClientRect(),o=t.width,i=t.height;return 0===o&&0===i},ut=function(e,t){var o=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=ot.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ot.call(n,"details:not([open]) *"))return!0;if(o&&"full"!==o&&"legacy-full"!==o){if("non-zero-area"===o)return pt(e)}else{if("function"==typeof i){for(var r=e;e;){var s=e.parentElement,a=it(e);if(s&&!s.shadowRoot&&!0===i(s))return pt(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=r}if(function(e){var t,o,i,n,r=e&&it(e),s=null===(t=r)||void 0===t?void 0:t.host,a=!1;if(r&&r!==e)for(a=!!(null!==(o=s)&&void 0!==o&&null!==(i=o.ownerDocument)&&void 0!==i&&i.contains(s)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!a&&s;){var d,l,c;a=!(null===(l=s=null===(d=r=it(s))||void 0===d?void 0:d.host)||void 0===l||null===(c=l.ownerDocument)||void 0===c||!c.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==o)return!0}return!1},ht=function(e,t){return!(t.disabled||nt(t)||function(e){return lt(e)&&"hidden"===e.type}(t)||ut(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var o=0;o<t.children.length;o++){var i=t.children.item(o);if("LEGEND"===i.tagName)return!!ot.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},ft=function(e,t){return!(ct(t)||at(t)<0||!ht(e,t))},mt=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},bt=function e(t){var o=[],i=[];return t.forEach((function(t,n){var r=!!t.scopeParent,s=r?t.scopeParent:t,a=function(e,t){var o=at(e);return o<0&&t&&!st(e)?0:o}(s,r),d=r?e(t.candidates):s;0===a?r?o.push.apply(o,d):o.push(s):i.push({documentOrder:n,tabIndex:a,item:t,isScope:r,content:d})})),i.sort(dt).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(o)},yt=function(e,t){var o;return o=(t=t||{}).getShadowRoot?rt([e],t.includeContainer,{filter:ft.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:mt}):function(e,t,o){if(nt(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(et));return t&&ot.call(e,et)&&i.unshift(e),i.filter(o)}(e,t.includeContainer,ft.bind(null,t)),bt(o)};const gt=c["useInsertionEffect".toString()]||(e=>e());var wt="undefined"!=typeof document?f:u;function xt(){return xt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},xt.apply(this,arguments)}let vt=!1,zt=0;const Rt=()=>"floating-ui-"+zt++;const St=c["useId".toString()]||function(){const[e,t]=c.useState((()=>vt?Rt():void 0));return wt((()=>{null==e&&t(Rt())}),[]),c.useEffect((()=>{vt||(vt=!0)}),[]),e};const _t=c.createContext(null),Et=c.createContext(null);function Ct(e){return"data-floating-ui-"+e}const kt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ot(e,t){const o=yt(e,kt());"prev"===t&&o.reverse();const i=o.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(o=t)||null==(o=o.shadowRoot)?void 0:o.activeElement);){var o;t=t.shadowRoot.activeElement}return t}((null==(n=e)?void 0:n.ownerDocument)||document));var n;return o.slice(i+1)[0]}function Nt(e,t){const o=t||e.currentTarget,i=e.relatedTarget;return!i||!function(e,t){if(!e||!t)return!1;const o=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&J(o)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}(o,i)}function Lt(e){yt(e,kt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Mt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const Wt={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function At(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Tt=c.forwardRef((function(e,t){const[o,i]=c.useState();wt((()=>(/apple/i.test(navigator.vendor)&&i("button"),document.addEventListener("keydown",At),()=>{document.removeEventListener("keydown",At)})),[]);const n={ref:t,tabIndex:0,role:o,"aria-hidden":!o||void 0,[Ct("focus-guard")]:"",style:Wt};return c.createElement("span",xt({},e,n))})),jt=c.createContext(null),Bt=Ct("portal");function It(e){let{children:t,id:o,root:i=null,preserveTabOrder:n=!0}=e;const r=function(e){let{id:t,root:o}=void 0===e?{}:e;const[i,n]=c.useState(null),r=St(),s=Pt(),a=c.useRef(null);return wt((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{a.current=null}))}),[i]),wt((()=>{if(a.current)return;const e=t?document.getElementById(t):null;if(!e)return;const o=document.createElement("div");o.id=r,o.setAttribute(Bt,""),e.appendChild(o),a.current=o,n(o)}),[t,r]),wt((()=>{if(a.current)return;let e=o||(null==s?void 0:s.portalNode);e&&!Z(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const d=document.createElement("div");d.id=r,d.setAttribute(Bt,""),e=i||e,e.appendChild(d),a.current=d,n(d)}),[t,o,r,s]),i}({id:o,root:i}),[s,a]=c.useState(null),d=c.useRef(null),l=c.useRef(null),p=c.useRef(null),u=c.useRef(null),h=!!s&&!s.modal&&s.open&&n&&!(!i&&!r);return c.useEffect((()=>{if(r&&n&&(null==s||!s.modal))return r.addEventListener("focusin",e,!0),r.addEventListener("focusout",e,!0),()=>{r.removeEventListener("focusin",e,!0),r.removeEventListener("focusout",e,!0)};function e(e){if(r&&Nt(e)){("focusin"===e.type?Mt:Lt)(r)}}}),[r,n,null==s?void 0:s.modal]),c.createElement(jt.Provider,{value:c.useMemo((()=>({preserveTabOrder:n,beforeOutsideRef:d,afterOutsideRef:l,beforeInsideRef:p,afterInsideRef:u,portalNode:r,setFocusManagerState:a})),[n,r])},h&&r&&c.createElement(Tt,{"data-type":"outside",ref:d,onFocus:e=>{if(Nt(e,r)){var t;null==(t=p.current)||t.focus()}else{const e=Ot(document.body,"prev")||(null==s?void 0:s.refs.domReference.current);null==e||e.focus()}}}),h&&r&&c.createElement("span",{"aria-owns":r.id,style:Wt}),r&&x(t,r),h&&r&&c.createElement(Tt,{"data-type":"outside",ref:l,onFocus:e=>{if(Nt(e,r)){var t;null==(t=u.current)||t.focus()}else{const t=Ot(document.body,"next")||(null==s?void 0:s.refs.domReference.current);null==t||t.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent))}}}))}const Pt=()=>c.useContext(jt),Ht=new Set,Dt=c.forwardRef((function(e,t){let{lockScroll:o=!1,...i}=e;const n=St();return wt((()=>{if(!o)return;Ht.add(n);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=t.left?parseFloat(t.left):window.pageXOffset,a=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",r&&(t[i]=r+"px"),e){var d,l;const e=(null==(d=window.visualViewport)?void 0:d.offsetLeft)||0,o=(null==(l=window.visualViewport)?void 0:l.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(o))+"px",left:-(s-Math.floor(e))+"px",right:"0"})}return()=>{Ht.delete(n),0===Ht.size&&(Object.assign(t,{overflow:"",[i]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a)))}}),[n,o]),c.createElement("div",xt({ref:t},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))}));function Ft(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[r,s]=c.useState(null),a=(null==(t=e.elements)?void 0:t.reference)||r,d=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:i=[],platform:n,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:d,open:l}=e,[p,u]=c.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=c.useState(i);qe(h,i)||f(i);const[m,b]=c.useState(null),[y,w]=c.useState(null),x=c.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),v=c.useCallback((e=>{e!==_.current&&(_.current=e,w(e))}),[]),z=r||m,R=s||y,S=c.useRef(null),_=c.useRef(null),E=c.useRef(p),C=null!=d,k=Qe(d),O=Qe(n),N=c.useCallback((()=>{if(!S.current||!_.current)return;const e={placement:t,strategy:o,middleware:h};O.current&&(e.platform=O.current),Ge(S.current,_.current,e).then((e=>{const t={...e,isPositioned:!0};L.current&&!qe(E.current,t)&&(E.current=t,g.flushSync((()=>{u(t)})))}))}),[h,t,o,O]);Ze((()=>{!1===l&&E.current.isPositioned&&(E.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[l]);const L=c.useRef(!1);Ze((()=>(L.current=!0,()=>{L.current=!1})),[]),Ze((()=>{if(z&&(S.current=z),R&&(_.current=R),z&&R){if(k.current)return k.current(z,R,N);N()}}),[z,R,N,k,C]);const M=c.useMemo((()=>({reference:S,floating:_,setReference:x,setFloating:v})),[x,v]),W=c.useMemo((()=>({reference:z,floating:R})),[z,R]),A=c.useMemo((()=>{const e={position:o,left:0,top:0};if(!W.floating)return e;const t=Ke(W.floating,p.x),i=Ke(W.floating,p.y);return a?{...e,transform:"translate("+t+"px, "+i+"px)",...Je(W.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,a,W.floating,p.x,p.y]);return c.useMemo((()=>({...p,update:N,refs:M,elements:W,floatingStyles:A})),[p,N,M,W,A])}(e),l=c.useContext(Et),p=null!=((null==(u=c.useContext(_t))?void 0:u.id)||null);var u;const h=function(e){const t=c.useRef((()=>{}));return gt((()=>{t.current=e})),c.useCallback((function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return null==t.current?void 0:t.current(...o)}),[])}(((e,t,o)=>{e&&(m.current.openEvent=t),b.emit("openchange",{open:e,event:t,reason:o,nested:p}),null==i||i(e,t,o)})),f=c.useRef(null),m=c.useRef({}),b=c.useState((()=>function(){const e=new Map;return{emit(t,o){var i;null==(i=e.get(t))||i.forEach((e=>e(o)))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var i;e.set(t,(null==(i=e.get(t))?void 0:i.filter((e=>e!==o)))||[])}}}()))[0],y=St(),w=c.useCallback((e=>{const t=Z(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;d.refs.setReference(t)}),[d.refs]),x=c.useCallback((e=>{(Z(e)||null===e)&&(f.current=e,s(e)),(Z(d.refs.reference.current)||null===d.refs.reference.current||null!==e&&!Z(e))&&d.refs.setReference(e)}),[d.refs]),v=c.useMemo((()=>({...d.refs,setReference:x,setPositionReference:w,domReference:f})),[d.refs,x,w]),z=c.useMemo((()=>({...d.elements,domReference:a})),[d.elements,a]),R=c.useMemo((()=>({...d,refs:v,elements:z,dataRef:m,nodeId:n,floatingId:y,events:b,open:o,onOpenChange:h})),[d,n,y,b,o,h,v,z]);return wt((()=>{const e=null==l?void 0:l.nodesRef.current.find((e=>e.id===n));e&&(e.context=R)})),c.useMemo((()=>({...d,context:R,refs:v,elements:z})),[d,v,z,R])}function Vt(e,t){if(null==e)return{};var o,i,n={},r=Object.keys(e);for(i=0;i<r.length;i++)o=r[i],t.indexOf(o)>=0||(n[o]=e[o]);return n}var Ut=["color"],$t=m((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Vt(e,Ut);return b("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),b("path",{d:"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Xt=["color"],Yt=m((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=Vt(e,Xt);return b("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),b("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}));const Gt={youtube:e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null},vimeo:e=>new URL(e).pathname.split("/")[1],dailymotion:e=>{const t=e.match(/^.+dailymotion.com\/(embed|hub)\/([^_]+)[^#]*(#embed=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null},twitter:function(e){const t=e.match(/\/status\/(\d+)/);return t?t[1]:null},figma:function(e){const t=new URL(e).searchParams,o=t.get("node-id");return t.get("node-id")?o:"unknown"}},Zt=({blockId:t,onClose:o})=>{const i=e(),[n,r]=p(""),s=0===n.length;return d("div",Object.assign({className:"yoo-embed-cursor-pointer yoo-embed-user-select-none yoo-embed-transition-bg yoo-embed-duration-20 yoo-embed-ease-in yoo-embed-white-space-nowrap yoo-embed-w-full"},{children:[l("input",{type:"text",placeholder:"Paste embed link",value:n,className:"yoo-embed-items-center yoo-embed-bg-[hsla(45,13%,94%,.6)] yoo-embed-rounded-[4px] yoo-embed-shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] yoo-embed-cursor-text yoo-embed-flex yoo-embed-text-[14px] yoo-embed-h-[32px] yoo-embed-leading-[20px] yoo-embed-px-[6px] yoo-embed-relative yoo-embed-w-full yoo-embed-border-none",onChange:e=>r(e.target.value)}),l("button",Object.assign({type:"button",className:"yoo-embed-user-select-none yoo-embed-transition-bg yoo-embed-duration-20 yoo-embed-ease-in yoo-embed-cursor-pointer yoo-embed-flex yoo-embed-items-center yoo-embed-justify-center yoo-embed-flex-shrink-0 yoo-embed-white-space-nowrap yoo-embed-h-[28px] yoo-embed-rounded-[4px] yoo-embed-shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] yoo-embed-bg-[rgb(35,131,226)] yoo-embed-text-white yoo-embed-fill-white yoo-embed-leading-[1.2] yoo-embed-px-[12px] yoo-embed-text-[14px] yoo-embed-font-medium yoo-embed-w-full yoo-embed-max-w-[300px] yoo-embed-mx-auto yoo-embed-m-[12px_0_6px] disabled:yoo-embed-bg-[rgba(35,131,226,0.5)] disabled:yoo-embed-cursor-not-allowed",disabled:s,onClick:()=>{var e;if(0===n.length)return;const r=(s=n).includes("youtube.com")||s.includes("youtu.be")?"youtube":s.includes("vimeo.com")?"vimeo":s.includes("dailymotion.com")||s.includes("dai.ly")?"dailymotion":s.includes("twitter")?"twitter":s.includes("figma")?"figma":null;var s;const a=r?null===(e=Gt[r])||void 0===e?void 0:e.call(Gt,n):null,d={type:r,id:a,url:n};r&&a||(d.id=n),i.blocks.Embed.updateElement(t,"embed",{provider:d}),o()}},{children:"Embed embed"}))]}))},qt=({floatingStyles:e,refs:t,onClose:o,blockId:i})=>l(It,Object.assign({id:"yoo-embed-uploader-portal",root:document.getElementById("yoopta-editor")},{children:l(Dt,Object.assign({lockScroll:!0,className:"yoo-embed-z-[100]",onClick:o},{children:l("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:d("div",Object.assign({className:"yoo-embed-flex yoo-embed-flex-col yoo-embed-min-w-[540px] yoo-embed-max-w-[calc(100vw-24px)] yoo-embed-h-full yoo-embed-max-h-[420px] yoo-embed-bg-white yoo-embed-shadow-[rgb(15_15_15_/5%)_0px_0px_0px_1px,_rgb(15_15_15_/10%)_0px_3px_6px,_rgb(15_15_15_/20%)_0px_9px_24px]"},{children:[l("div",Object.assign({className:"yoo-embed-w-full yoo-embed-flex yoo-embed-text-[14px] yoo-embed-p-[0_8px] yoo-embed-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-embed-relative yoo-embed-z-10 yoo-embed-h-[40px]"},{children:l("button",Object.assign({type:"button",style:{borderBottom:"2px solid #2483e2"},className:"yoo-embed-py-[6px] yoo-embed-whitespace-nowrap yoo-embed-min-w-0 yoo-embed-flex-shrink-0 yoo-embed-text-[rgb(55,53,47)] yoo-embed-relative yoo-embed-cursor-pointer yoo-embed-user-select-none yoo-embed-bg-inherit yoo-embed-transition-[height_20ms_ease-in] yoo-embed-inline-flex yoo-embed-items-center yoo-embed-h-full yoo-embed-text-[14px] yoo-embed-leading-[1.2] yoo-embed-px-[8px]"},{children:"Embed link"}))})),l("div",Object.assign({className:"yoo-embed-pt-[6px] yoo-embed-pb-[6px] yoo-embed-mt-[4px] yoo-embed-flex yoo-embed-justify-center yoo-embed-mr-[12px] yoo-embed-ml-[12px]"},{children:l(Zt,{onClose:o,blockId:i})}))]}))}))}))})),Jt=({attributes:e,children:t,blockId:o})=>{const[i,n]=p(!1),{refs:r,floatingStyles:s}=Ft({placement:"bottom",open:i,onOpenChange:n,middleware:[Ye(),Xe(),$e(),Oe(10)]});return d("div",Object.assign({className:"yoo-embed-w-full yoo-embed-user-select-none yoo-embed-m-[20px_0_10px] yoo-embed-relative yoo-embed-flex"},e,{contentEditable:!1},{children:[d("button",Object.assign({className:"yoo-embed-p-[12px_36px_12px_12px] yoo-embed-flex yoo-embed-items-center yoo-embed-text-left yoo-embed-w-full yoo-embed-overflow-hidden yoo-embed-rounded-[3px] yoo-embed-text-[14px] yoo-embed-text-[rgba(55,53,47,0.65)] yoo-embed-relative yoo-embed-cursor-pointer yoo-embed-border-none yoo-embed-bg-[#efefef] yoo-embed-transition-[background-color_100ms_ease-in] hover:yoo-embed-bg-[#e3e3e3]",onClick:()=>n(!0),ref:r.setReference},{children:[l($t,{className:"yoo-embed-mr-2 yoo-embed-user-select-none",width:24,height:24}),l("span",Object.assign({className:"yoo-embed-font-medium"},{children:"Click to add embed"}))]})),i&&l(qt,{blockId:o,floatingStyles:s,refs:r,onClose:()=>n(!1)}),t]}))},{ExtendedBlockActions:Kt,BlockOptionsMenuGroup:Qt,BlockOptionsMenuItem:eo,BlockOptionsSeparator:to}=t,oo=({editor:e,block:t,props:o})=>d(Kt,Object.assign({onClick:()=>e.setSelection([t.meta.order])},{children:[l(to,{}),l(Qt,{children:l(eo,{children:d("button",Object.assign({type:"button",className:"yoo-embed-rounded-sm hover:yoo-embed-bg-[#37352f14] yoo-embed-leading-[120%] yoo-embed-px-2 yoo-embed-py-1.5 yoo-embed-mx-[4px] yoo-embed-cursor-pointer yoo-embed-w-full yoo-embed-flex yoo-embed-justify-start",onClick:()=>{var e;window.open(null===(e=null==o?void 0:o.provider)||void 0===e?void 0:e.url,"_blank")}},{children:[l(Yt,{width:16,height:16,className:"yoo-embed-w-4 yoo-embed-h-4 yoo-embed-mr-2"}),"Open"]}))})})]})),io=({position:e})=>l("div",Object.assign({contentEditable:!1,className:"yoo-embed-absolute yoo-embed-pointer-events-none yoo-embed-flex yoo-embed-items-center yoo-embed-justify-center yoo-embed-z-10 yoo-embed-opacity-1 yoo-embed-h-full yoo-embed-w-[15px] yoo-embed-cursor-col-resize yoo-embed-transition-opacity yoo-embed-duration-150 yoo-embed-ease-in "+("left"===e?"yoo-embed-left-0 yoo-embed-top-0":"yoo-embed-right-0 yoo-embed-top-0")},{children:l("div",{className:"yoo-embed-opacity-100 yoo-embed-transition-opacity yoo-embed-duration-300 yoo-embed-ease-in yoo-embed-rounded-[20px] yoo-embed-bg-[rgba(15,15,15,0.6)] yoo-embed-border yoo-embed-border-[rgba(255,255,255,0.9)] yoo-embed-w-[6px] yoo-embed-h-[48px] yoo-embed-max-h-[50%] yoo-embed-shadow-[0_0_0_.5px_#FFF]"})})),no=new s({type:"Embed",elements:{embed:{render:({element:t,attributes:s,children:a,blockId:c})=>{const{sizes:h,provider:f}=t.props||{},m=o(c),b=e(),g=i("Embed"),w=n(),[x,v]=p({width:(null==h?void 0:h.width)||750,height:(null==h?void 0:h.height)||440});u((()=>v({width:(null==h?void 0:h.width)||650,height:(null==h?void 0:h.height)||440})),[t.props]);const z=r({blockId:c}),S=y((()=>{var e,t;return{minWidth:300,size:{width:x.width,height:x.height},maxWidth:(null===(e=null==g?void 0:g.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(t=null==g?void 0:g.maxSizes)||void 0===t?void 0:t.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!w,right:!w},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{v({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,t,o)=>{b.blocks.Embed.updateElement(c,"embed",{sizes:{width:o.offsetWidth,height:o.offsetHeight}})},handleComponent:{left:l(io,{position:"left"}),right:l(io,{position:"right"})}}}),[x.width,x.height]);return f&&(null==f?void 0:f.id)?l("div",Object.assign({"data-element-type":t.type,contentEditable:!1,draggable:!1,className:"yoo-embed-mt-4 yoo-embed-relative yoopta-embed"},s,{children:d(U,Object.assign({},S,{className:"yoo-embed-mx-auto yoo-embed-my-0 yoo-embed-flex"},{children:[z&&l("div",{className:"yoo-embed-absolute yoo-embed-pointer-events-none yoo-embed-inset-0 yoo-embed-bg-[rgba(35,131,226,0.14)] yoo-embed-z-[81] yoo-embed-rounded-[3px] yoo-embed-opacity-100 yoo-embed-transition-opacity yoo-embed-duration-150 yoo-embed-ease-in"}),l(R,{width:null==x?void 0:x.width,height:null==x?void 0:x.height,provider:f,blockId:c}),!w&&l(oo,{block:m,editor:b,props:t.props}),a]}))})):l(Jt,Object.assign({attributes:s,blockId:c},{children:a}))},props:{sizes:{width:650,height:400},nodeType:"void"}}},options:{display:{title:"Embed",description:"For embed videos, google maps and more"},maxSizes:{maxWidth:650,maxHeight:550}},parsers:{html:{deserialize:{nodeNames:["IFRAME"],parse:e=>{if("IFRAME"===e.nodeName){const t=new URL(e.getAttribute("src")||"");return{id:a(),type:"embed",children:[{text:""}],props:{provider:{id:t.href,type:t.hostname,url:t.href},sizes:{width:e.getAttribute("width")?parseInt(e.getAttribute("width")||"650",10):650,height:e.getAttribute("height")?parseInt(e.getAttribute("height")||"400",10):400}}}}}}}}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("#yoopta-editor .yoo-embed-pointer-events-none{pointer-events:none}#yoopta-editor .yoo-embed-absolute{position:absolute}#yoopta-editor .yoo-embed-relative{position:relative}#yoopta-editor .yoo-embed-inset-0{inset:0}#yoopta-editor .yoo-embed-left-0{left:0}#yoopta-editor .yoo-embed-right-0{right:0}#yoopta-editor .yoo-embed-top-0{top:0}#yoopta-editor .yoo-embed-z-10{z-index:10}#yoopta-editor .yoo-embed-z-\\[100\\]{z-index:100}#yoopta-editor .yoo-embed-z-\\[81\\]{z-index:81}#yoopta-editor .yoo-embed-m-\\[12px_0_6px\\]{margin:12px 0 6px}#yoopta-editor .yoo-embed-m-\\[20px_0_10px\\]{margin:20px 0 10px}#yoopta-editor .yoo-embed-mx-\\[4px\\]{margin-left:4px;margin-right:4px}#yoopta-editor .yoo-embed-mx-auto{margin-left:auto;margin-right:auto}#yoopta-editor .yoo-embed-my-0{margin-bottom:0;margin-top:0}#yoopta-editor .yoo-embed-ml-\\[12px\\]{margin-left:12px}#yoopta-editor .yoo-embed-mr-2{margin-right:.5rem}#yoopta-editor .yoo-embed-mr-\\[12px\\]{margin-right:12px}#yoopta-editor .yoo-embed-mt-4{margin-top:1rem}#yoopta-editor .yoo-embed-mt-\\[4px\\]{margin-top:4px}#yoopta-editor .yoo-embed-flex{display:flex}#yoopta-editor .yoo-embed-inline-flex{display:inline-flex}#yoopta-editor .yoo-embed-h-4{height:1rem}#yoopta-editor .yoo-embed-h-\\[28px\\]{height:28px}#yoopta-editor .yoo-embed-h-\\[32px\\]{height:32px}#yoopta-editor .yoo-embed-h-\\[40px\\]{height:40px}#yoopta-editor .yoo-embed-h-\\[48px\\]{height:48px}#yoopta-editor .yoo-embed-h-full{height:100%}#yoopta-editor .yoo-embed-max-h-\\[420px\\]{max-height:420px}#yoopta-editor .yoo-embed-max-h-\\[50\\%\\]{max-height:50%}#yoopta-editor .yoo-embed-w-4{width:1rem}#yoopta-editor .yoo-embed-w-\\[15px\\]{width:15px}#yoopta-editor .yoo-embed-w-\\[6px\\]{width:6px}#yoopta-editor .yoo-embed-w-full{width:100%}#yoopta-editor .yoo-embed-min-w-0{min-width:0}#yoopta-editor .yoo-embed-min-w-\\[540px\\]{min-width:540px}#yoopta-editor .yoo-embed-max-w-\\[300px\\]{max-width:300px}#yoopta-editor .yoo-embed-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}#yoopta-editor .yoo-embed-flex-shrink-0{flex-shrink:0}#yoopta-editor .yoo-embed-cursor-col-resize{cursor:col-resize}#yoopta-editor .yoo-embed-cursor-pointer{cursor:pointer}#yoopta-editor .yoo-embed-cursor-text{cursor:text}#yoopta-editor .yoo-embed-flex-col{flex-direction:column}#yoopta-editor .yoo-embed-items-center{align-items:center}#yoopta-editor .yoo-embed-justify-start{justify-content:flex-start}#yoopta-editor .yoo-embed-justify-center{justify-content:center}#yoopta-editor .yoo-embed-overflow-hidden{overflow:hidden}#yoopta-editor .yoo-embed-whitespace-nowrap{white-space:nowrap}#yoopta-editor .yoo-embed-rounded-\\[20px\\]{border-radius:20px}#yoopta-editor .yoo-embed-rounded-\\[3px\\]{border-radius:3px}#yoopta-editor .yoo-embed-rounded-\\[4px\\]{border-radius:4px}#yoopta-editor .yoo-embed-rounded-sm{border-radius:.125rem}#yoopta-editor .yoo-embed-border{border-width:1px}#yoopta-editor .yoo-embed-border-none{border-style:none}#yoopta-editor .yoo-embed-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}#yoopta-editor .yoo-embed-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}#yoopta-editor .yoo-embed-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}#yoopta-editor .yoo-embed-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}#yoopta-editor .yoo-embed-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}#yoopta-editor .yoo-embed-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}#yoopta-editor .yoo-embed-bg-inherit{background-color:inherit}#yoopta-editor .yoo-embed-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}#yoopta-editor .yoo-embed-fill-white{fill:#fff}#yoopta-editor .yoo-embed-p-\\[0_8px\\]{padding:0 8px}#yoopta-editor .yoo-embed-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}#yoopta-editor .yoo-embed-px-2{padding-left:.5rem;padding-right:.5rem}#yoopta-editor .yoo-embed-px-\\[12px\\]{padding-left:12px;padding-right:12px}#yoopta-editor .yoo-embed-px-\\[6px\\]{padding-left:6px;padding-right:6px}#yoopta-editor .yoo-embed-px-\\[8px\\]{padding-left:8px;padding-right:8px}#yoopta-editor .yoo-embed-py-1{padding-bottom:.25rem;padding-top:.25rem}#yoopta-editor .yoo-embed-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}#yoopta-editor .yoo-embed-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}#yoopta-editor .yoo-embed-pb-\\[6px\\]{padding-bottom:6px}#yoopta-editor .yoo-embed-pt-\\[6px\\]{padding-top:6px}#yoopta-editor .yoo-embed-text-left{text-align:left}#yoopta-editor .yoo-embed-text-\\[14px\\]{font-size:14px}#yoopta-editor .yoo-embed-font-medium{font-weight:500}#yoopta-editor .yoo-embed-leading-\\[1\\.2\\]{line-height:1.2}#yoopta-editor .yoo-embed-leading-\\[120\\%\\]{line-height:120%}#yoopta-editor .yoo-embed-leading-\\[20px\\]{line-height:20px}#yoopta-editor .yoo-embed-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}#yoopta-editor .yoo-embed-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}#yoopta-editor .yoo-embed-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}#yoopta-editor .yoo-embed-opacity-100{opacity:1}#yoopta-editor .yoo-embed-shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-embed-shadow-\\[inset_0_0_0_1px_hsla\\(0\\,0\\%\\,6\\%\\,\\.1\\)\\]{--tw-shadow:inset 0 0 0 1px hsla(0,0%,6%,.1);--tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-embed-shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\,_rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\,_rgb\\(15_15_15_\\/20\\%\\)_0px_9px_24px\\]{--tw-shadow:rgb(15 15 15/5%) 0px 0px 0px 1px,hsla(0,0%,6%,.1) 0px 3px 6px,hsla(0,0%,6%,.2) 0px 9px 24px;--tw-shadow-colored:0px 0px 0px 1px var(--tw-shadow-color),0px 3px 6px var(--tw-shadow-color),0px 9px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-embed-shadow-\\[rgb\\(55_53_47_\\/9\\%\\)_0px_-1px_0px_inset\\]{--tw-shadow:rgb(55 53 47/9%) 0px -1px 0px inset;--tw-shadow-colored:inset 0px -1px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-embed-shadow-\\[rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_0px_0px_1px_inset\\,_rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_1px_2px\\]{--tw-shadow:hsla(0,0%,6%,.1) 0px 0px 0px 1px inset,hsla(0,0%,6%,.1) 0px 1px 2px;--tw-shadow-colored:inset 0px 0px 0px 1px var(--tw-shadow-color),0px 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}#yoopta-editor .yoo-embed-transition-\\[background-color_100ms_ease-in\\]{transition-duration:.15s;transition-property:background-color .1s ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-embed-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-embed-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-embed-duration-150{transition-duration:.15s}#yoopta-editor .yoo-embed-duration-300{transition-duration:.3s}#yoopta-editor .yoo-embed-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}#yoopta-editor .yoopta-embed .yoopta-extended-block-actions{opacity:0;transition:opacity .15s ease-in-out}#yoopta-editor .yoopta-embed:hover .yoopta-extended-block-actions{opacity:1}#yoopta-editor .hover\\:yoo-embed-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}#yoopta-editor .hover\\:yoo-embed-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}#yoopta-editor .disabled\\:yoo-embed-cursor-not-allowed:disabled{cursor:not-allowed}#yoopta-editor .disabled\\:yoo-embed-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{no as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/embed",
3
- "version": "4.0.0-rc.12",
3
+ "version": "4.0.0-rc.14",
4
4
  "description": "> TODO: description",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
6
  "homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
@@ -39,5 +39,5 @@
39
39
  "@radix-ui/react-icons": "^1.3.0",
40
40
  "re-resizable": "^6.9.11"
41
41
  },
42
- "gitHead": "520057761efabc31e3d87b58a16f9ebe76e6fe22"
42
+ "gitHead": "47486295e1f53b2033ef0c859d1e4c831832b1e3"
43
43
  }