@yoopta/embed 4.0.0-rc.5 → 4.0.0-rc.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import{useYooptaEditor as t,UI as e,useBlockData as i,useYooptaPluginOptions as n,useBlockSelected as o,YooptaPlugin as r}from"@yoopta/editor";import{jsxs as s,jsx as a}from"react/jsx-runtime";import*as l from"react";import{useState as c,useEffect as d,useRef as u,useLayoutEffect as p,forwardRef as h,createElement as f,useMemo as g}from"react";import*as m from"react-dom";import{flushSync as w,createPortal as x}from"react-dom";function b(t,{threshold:e=0,root:i=null,rootMargin:n="0%",freezeOnceVisible:o=!1}={}){const[r,s]=c({}),a=r.isIntersecting&&o,l=([t])=>s(t);return d((()=>{const o=null==t?void 0:t.current;if(!window.IntersectionObserver||a||!o)return;const r=new IntersectionObserver(l,{threshold:e,root:i,rootMargin:n});return r.observe(o),()=>r.disconnect()}),[t,e,i,n,a]),r}const v={vimeo:function({provider:t,width:e,height:i,blockId:n}){const o=u(null),[r,l]=c(null),[p,h]=c(!1),{isIntersecting:f}=b(o,{freezeOnceVisible:!0,rootMargin:"50%"});return d((()=>{fetch(`https://vimeo.com/api/v2/embed/${t.id}.json`).then((t=>t.json())).then((t=>l(t[0].thumbnail_medium))).catch((()=>l(null)))}),[t.id]),s("div",Object.assign({ref:o,className:"yoo-video-relative"},{children:[a("img",{src:r||"",alt:"vimeo_embed_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:f&&p?0:1,zIndex:f&&p?-1:0}}),f&&a("iframe",{title:"Embed Player",src:`https://player.vimeo.com/embed/${t.id}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>h(!0),className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:e,height:i})]}))},youtube:function({provider:t,width:e,height:i,blockId:n}){const o=u(null),[r,l]=c(!1),{isIntersecting:d}=b(o,{freezeOnceVisible:!0,rootMargin:"50%"});return s("div",Object.assign({ref:o,className:"yoo-video-relative"},{children:[a("img",{src:`https://i.ytimg.com/vi/${t.id}/default.jpg`,alt:"youtube_embed_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:d&&r?0:1,zIndex:d&&r?-1:0}}),d&&a("iframe",{title:"Embed Player",src:`https://www.youtube.com/embed/${t.id}`,frameBorder:0,onLoad:()=>l(!0),allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:e,height:i})]}))},dailymotion:function({provider:t,width:e,height:i,blockId:n}){const o=u(null),[r,l]=c(null),[p,h]=c(!1),{isIntersecting:f}=b(o,{freezeOnceVisible:!0,rootMargin:"50%"});return d((()=>{var e;fetch((e=t.id,`https://api.dailymotion.com/embed/${e}?fields=thumbnail_url`)).then((t=>t.json())).then((t=>l(t.thumbnail_url))).catch((()=>l(null)))}),[t.id]),s("div",Object.assign({ref:o,className:"yoo-video-relative"},{children:[a("img",{src:r||"",alt:"daylimotion_embed_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:f&&p?0:1,zIndex:f&&p?-1:0}}),f&&a("iframe",{title:"Dailymotion Embed Player",frameBorder:0,onLoad:()=>h(!0),src:`https://www.dailymotion.com/embed/embed/${t.id}`,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:e,height:i})]}))},figma:({provider:t,width:e,height:i,blockId:n})=>{const o=u(null),{isIntersecting:r}=b(o,{freezeOnceVisible:!0,rootMargin:"50%"});return a("div",Object.assign({className:"yoo-video-relative",ref:o},{children:r&&a("iframe",{src:`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(t.url)}`,frameBorder:0,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:e,height:i})}))},twitter:function({provider:e,blockId:i}){const n=u(null),o=t(),{isIntersecting:r}=b(n,{freezeOnceVisible:!0,rootMargin:"50%"}),s=`${i}-${e.id}`;return d((()=>{var t;if(!r)return;const a=document.createElement("script");a.src="https://platform.twitter.com/widgets.js",null===(t=n.current)||void 0===t||t.appendChild(a),a.onload=()=>{window.twttr&&(window.twttr.widgets.createTweet(e.id,document.getElementById(s),{align:"center",conversation:"none",dnt:!0,theme:"dark",height:500,width:550}),o.blocks.Embed.updateElement(i,"embed",{sizes:{width:"auto",height:"auto"}}))}}),[e.id,r]),a("div",Object.assign({className:"w-full h-full",ref:n},{children:a("div",{id:s})}))}},y=({width:t,height:e,provider:i,blockId:n})=>{if(!i)return null;if(i&&i.id&&i.type&&v[i.type]){const o=v[i.type];return a(o,{provider:i,width:t,height:e,blockId:n})}return a("div",Object.assign({className:"w-full"},{children:a("iframe",{src:i.url,width:"100%",height:"100%",frameBorder:0,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"})}))};var z,R=(z=function(t,e){return z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},z(t,e)},function(t,e){function i(){this.constructor=t}z(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),S=function(){return S=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},S.apply(this,arguments)},_={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},E={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},C={width:"20px",height:"20px",position:"absolute"},k={top:S(S({},_),{top:"-5px"}),right:S(S({},E),{left:void 0,right:"-5px"}),bottom:S(S({},_),{top:void 0,bottom:"-5px"}),left:S(S({},E),{left:"-5px"}),topRight:S(S({},C),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:S(S({},C),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:S(S({},C),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:S(S({},C),{left:"-10px",top:"-10px",cursor:"nw-resize"})},O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}return R(e,t),e.prototype.render=function(){return l.createElement("div",{className:this.props.className||"",style:S(S({position:"absolute",userSelect:"none"},k[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},e}(l.PureComponent),N=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),L=function(){return L=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},L.apply(this,arguments)},M={width:"auto",height:"auto"},W=function(t,e,i){return Math.max(Math.min(t,i),e)},T=function(t,e){return Math.round(t/e)*e},j=function(t,e){return new RegExp(t,"i").test(e)},A=function(t){return Boolean(t.touches&&t.touches.length)},B=function(t,e,i){void 0===i&&(i=0);var n=e.reduce((function(i,n,o){return Math.abs(n-t)<Math.abs(e[i]-t)?o:i}),0),o=Math.abs(e[n]-t);return 0===i||o<i?e[n]:t},P=function(t){return"auto"===(t=t.toString())||t.endsWith("px")||t.endsWith("%")||t.endsWith("vh")||t.endsWith("vw")||t.endsWith("vmax")||t.endsWith("vmin")?t:t+"px"},I=function(t,e,i,n){if(t&&"string"==typeof t){if(t.endsWith("px"))return Number(t.replace("px",""));if(t.endsWith("%"))return e*(Number(t.replace("%",""))/100);if(t.endsWith("vw"))return i*(Number(t.replace("vw",""))/100);if(t.endsWith("vh"))return n*(Number(t.replace("vh",""))/100)}return t},H=["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"],F="__resizable_base__",D=function(t){function e(e){var i=t.call(this,e)||this;return i.ratio=1,i.resizable=null,i.parentLeft=0,i.parentTop=0,i.resizableLeft=0,i.resizableRight=0,i.resizableTop=0,i.resizableBottom=0,i.targetLeft=0,i.targetTop=0,i.appendBase=function(){if(!i.resizable||!i.window)return null;var t=i.parentNode;if(!t)return null;var e=i.window.document.createElement("div");return e.style.width="100%",e.style.height="100%",e.style.position="absolute",e.style.transform="scale(0, 0)",e.style.left="0",e.style.flex="0 0 100%",e.classList?e.classList.add(F):e.className+=F,t.appendChild(e),e},i.removeBase=function(t){var e=i.parentNode;e&&e.removeChild(t)},i.ref=function(t){t&&(i.resizable=t)},i.state={isResizing:!1,width:void 0===(i.propsSize&&i.propsSize.width)?"auto":i.propsSize&&i.propsSize.width,height:void 0===(i.propsSize&&i.propsSize.height)?"auto":i.propsSize&&i.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},i.onResizeStart=i.onResizeStart.bind(i),i.onMouseMove=i.onMouseMove.bind(i),i.onMouseUp=i.onMouseUp.bind(i),i}return N(e,t),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||M},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){var t=0,e=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,n=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),t="auto"!==this.resizable.style.width?this.resizable.offsetWidth:i,e="auto"!==this.resizable.style.height?this.resizable.offsetHeight:n,this.resizable.style.position=o}return{width:t,height:e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sizeStyle",{get:function(){var t=this,e=this.props.size,i=function(e){if(void 0===t.state[e]||"auto"===t.state[e])return"auto";if(t.propsSize&&t.propsSize[e]&&t.propsSize[e].toString().endsWith("%")){if(t.state[e].toString().endsWith("%"))return t.state[e].toString();var i=t.getParentSize();return Number(t.state[e].toString().replace("px",""))/i[e]*100+"%"}return P(t.state[e])};return{width:e&&void 0!==e.width&&!this.state.isResizing?P(e.width):i("width"),height:e&&void 0!==e.height&&!this.state.isResizing?P(e.height):i("height")}},enumerable:!1,configurable:!0}),e.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var t=this.appendBase();if(!t)return{width:0,height:0};var e=!1,i=this.parentNode.style.flexWrap;"wrap"!==i&&(e=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%";var n={width:t.offsetWidth,height:t.offsetHeight};return e&&(this.parentNode.style.flexWrap=i),this.removeBase(t),n},e.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))},e.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))},e.prototype.componentDidMount=function(){if(this.resizable&&this.window){var t=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==t.flexBasis?t.flexBasis:void 0})}},e.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},e.prototype.createSizeForCssProperty=function(t,e){var i=this.propsSize&&this.propsSize[e];return"auto"!==this.state[e]||this.state.original[e]!==t||void 0!==i&&"auto"!==i?t:"auto"},e.prototype.calculateNewMaxFromBoundary=function(t,e){var i,n,o=this.props.boundsByDirection,r=this.state.direction,s=o&&j("left",r),a=o&&j("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(i=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),n=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(i=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,n=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(i=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),n=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return i&&Number.isFinite(i)&&(t=t&&t<i?t:i),n&&Number.isFinite(n)&&(e=e&&e<n?e:n),{maxWidth:t,maxHeight:e}},e.prototype.calculateNewSizeFromDirection=function(t,e){var i=this.props.scale||1,n=this.props.resizeRatio||1,o=this.state,r=o.direction,s=o.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,d=a.lockAspectRatioExtraWidth,u=s.width,p=s.height,h=c||0,f=d||0;return j("right",r)&&(u=s.width+(t-s.x)*n/i,l&&(p=(u-f)/this.ratio+h)),j("left",r)&&(u=s.width-(t-s.x)*n/i,l&&(p=(u-f)/this.ratio+h)),j("bottom",r)&&(p=s.height+(e-s.y)*n/i,l&&(u=(p-h)*this.ratio+f)),j("top",r)&&(p=s.height-(e-s.y)*n/i,l&&(u=(p-h)*this.ratio+f)),{newWidth:u,newHeight:p}},e.prototype.calculateNewSizeFromAspectRatio=function(t,e,i,n){var o=this.props,r=o.lockAspectRatio,s=o.lockAspectRatioExtraHeight,a=o.lockAspectRatioExtraWidth,l=void 0===n.width?10:n.width,c=void 0===i.width||i.width<0?t:i.width,d=void 0===n.height?10:n.height,u=void 0===i.height||i.height<0?e:i.height,p=s||0,h=a||0;if(r){var f=(d-p)*this.ratio+h,g=(u-p)*this.ratio+h,m=(l-h)/this.ratio+p,w=(c-h)/this.ratio+p,x=Math.max(l,f),b=Math.min(c,g),v=Math.max(d,m),y=Math.min(u,w);t=W(t,x,b),e=W(e,v,y)}else t=W(t,l,c),e=W(e,d,u);return{newWidth:t,newHeight:e}},e.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var t=this.parentNode;if(t){var e=t.getBoundingClientRect();this.parentLeft=e.left,this.parentTop=e.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var n=this.resizable.getBoundingClientRect(),o=n.left,r=n.top,s=n.right,a=n.bottom;this.resizableLeft=o,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},e.prototype.onResizeStart=function(t,e){if(this.resizable&&this.window){var i,n=0,o=0;if(t.nativeEvent&&function(t){return Boolean((t.clientX||0===t.clientX)&&(t.clientY||0===t.clientY))}(t.nativeEvent)?(n=t.nativeEvent.clientX,o=t.nativeEvent.clientY):t.nativeEvent&&A(t.nativeEvent)&&(n=t.nativeEvent.touches[0].clientX,o=t.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(t,e,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",i=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:n,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:L(L({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:e,flexBasis:i};this.setState(l)}},e.prototype.onMouseMove=function(t){var e=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&A(t))try{t.preventDefault(),t.stopPropagation()}catch(t){}var i=this.props,n=i.maxWidth,o=i.maxHeight,r=i.minWidth,s=i.minHeight,a=A(t)?t.touches[0].clientX:t.clientX,l=A(t)?t.touches[0].clientY:t.clientY,c=this.state,d=c.direction,u=c.original,p=c.width,h=c.height,f=this.getParentSize(),g=function(t,e,i,n,o,r,s){return n=I(n,t.width,e,i),o=I(o,t.height,e,i),r=I(r,t.width,e,i),s=I(s,t.height,e,i),{maxWidth:void 0===n?void 0:Number(n),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,n,o,r,s);n=g.maxWidth,o=g.maxHeight,r=g.minWidth,s=g.minHeight;var m=this.calculateNewSizeFromDirection(a,l),x=m.newHeight,b=m.newWidth,v=this.calculateNewMaxFromBoundary(n,o);this.props.snap&&this.props.snap.x&&(b=B(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(x=B(x,this.props.snap.y,this.props.snapGap));var y=this.calculateNewSizeFromAspectRatio(b,x,{width:v.maxWidth,height:v.maxHeight},{width:r,height:s});if(b=y.newWidth,x=y.newHeight,this.props.grid){var z=T(b,this.props.grid[0]),R=T(x,this.props.grid[1]),S=this.props.snapGap||0;b=0===S||Math.abs(z-b)<=S?z:b,x=0===S||Math.abs(R-x)<=S?R:x}var _={width:b-u.width,height:x-u.height};if(p&&"string"==typeof p)if(p.endsWith("%"))b=b/f.width*100+"%";else if(p.endsWith("vw")){b=b/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){b=b/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))x=x/f.height*100+"%";else if(h.endsWith("vw")){x=x/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){x=x/this.window.innerHeight*100+"vh"}var E={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(x,"height")};"row"===this.flexDir?E.flexBasis=E.width:"column"===this.flexDir&&(E.flexBasis=E.height),w((function(){e.setState(E)})),this.props.onResize&&this.props.onResize(t,d,this.resizable,_)}},e.prototype.onMouseUp=function(t){var e=this.state,i=e.isResizing,n=e.direction,o=e.original;if(i&&this.resizable){var r={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(t,n,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:L(L({},this.state.backgroundStyle),{cursor:"auto"})})}},e.prototype.updateSize=function(t){this.setState({width:t.width,height:t.height})},e.prototype.renderResizer=function(){var t=this,e=this.props,i=e.enable,n=e.handleStyles,o=e.handleClasses,r=e.handleWrapperStyle,s=e.handleWrapperClass,a=e.handleComponent;if(!i)return null;var c=Object.keys(i).map((function(e){return!1!==i[e]?l.createElement(O,{key:e,direction:e,onResizeStart:t.onResizeStart,replaceStyles:n&&n[e],className:o&&o[e]},a&&a[e]?a[e]:null):null}));return l.createElement("div",{className:s,style:r},c)},e.prototype.render=function(){var t=this,e=Object.keys(this.props).reduce((function(e,i){return-1!==H.indexOf(i)||(e[i]=t.props[i]),e}),{}),i=L(L(L({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&&(i.flexBasis=this.state.flexBasis);var n=this.props.as||"div";return l.createElement(n,L({ref:this.ref,style:i,className:this.props.className},e),this.state.isResizing&&l.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},e.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},e}(l.PureComponent);function V(t){return X(t)?(t.nodeName||"").toLowerCase():"#document"}function U(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function $(t){var e;return null==(e=(X(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function X(t){return t instanceof Node||t instanceof U(t).Node}function Y(t){return t instanceof Element||t instanceof U(t).Element}function G(t){return t instanceof HTMLElement||t instanceof U(t).HTMLElement}function Z(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof U(t).ShadowRoot)}function q(t){const{overflow:e,overflowX:i,overflowY:n,display:o}=et(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!["inline","contents"].includes(o)}function J(t){return["table","td","th"].includes(V(t))}function K(t){const e=Q(),i=et(t);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function Q(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function tt(t){return["html","body","#document"].includes(V(t))}function et(t){return U(t).getComputedStyle(t)}function it(t){return Y(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nt(t){if("html"===V(t))return t;const e=t.assignedSlot||t.parentNode||Z(t)&&t.host||$(t);return Z(e)?e.host:e}function ot(t){const e=nt(t);return tt(e)?t.ownerDocument?t.ownerDocument.body:t.body:G(e)&&q(e)?e:ot(e)}function rt(t,e,i){var n;void 0===e&&(e=[]),void 0===i&&(i=!0);const o=ot(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),s=U(o);return r?e.concat(s,s.visualViewport||[],q(o)?o:[],s.frameElement&&i?rt(s.frameElement):[]):e.concat(o,rt(o,[],i))}const st=Math.min,at=Math.max,lt=Math.round,ct=t=>({x:t,y:t}),dt={left:"right",right:"left",bottom:"top",top:"bottom"},ut={start:"end",end:"start"};function pt(t,e,i){return at(t,st(e,i))}function ht(t,e){return"function"==typeof t?t(e):t}function ft(t){return t.split("-")[0]}function gt(t){return t.split("-")[1]}function mt(t){return"x"===t?"y":"x"}function wt(t){return"y"===t?"height":"width"}function xt(t){return["top","bottom"].includes(ft(t))?"y":"x"}function bt(t){return mt(xt(t))}function vt(t){return t.replace(/start|end/g,(t=>ut[t]))}function yt(t){return t.replace(/left|right|bottom|top/g,(t=>dt[t]))}function zt(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function Rt(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function St(t,e,i){let{reference:n,floating:o}=t;const r=xt(e),s=bt(e),a=wt(s),l=ft(e),c="y"===r,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,p=n[a]/2-o[a]/2;let h;switch(l){case"top":h={x:d,y:n.y-o.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-o.width,y:u};break;default:h={x:n.x,y:n.y}}switch(gt(e)){case"start":h[s]-=p*(i&&c?-1:1);break;case"end":h[s]+=p*(i&&c?-1:1)}return h}async function _t(t,e){var i;void 0===e&&(e={});const{x:n,y:o,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=ht(e,t),f=zt(h),g=a[p?"floating"===u?"reference":"floating":u],m=Rt(await r.getClippingRect({element:null==(i=await(null==r.isElement?void 0:r.isElement(g)))||i?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w="floating"===u?{...s.floating,x:n,y:o}:s.reference,x=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),b=await(null==r.isElement?void 0:r.isElement(x))&&await(null==r.getScale?void 0:r.getScale(x))||{x:1,y:1},v=Rt(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:l}):w);return{top:(m.top-v.top+f.top)/b.y,bottom:(v.bottom-m.bottom+f.bottom)/b.y,left:(m.left-v.left+f.left)/b.x,right:(v.right-m.right+f.right)/b.x}}function Et(t){const e=st(...t.map((t=>t.left))),i=st(...t.map((t=>t.top)));return{x:e,y:i,width:at(...t.map((t=>t.right)))-e,height:at(...t.map((t=>t.bottom)))-i}}const Ct=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var i,n;const{x:o,y:r,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:i,platform:n,elements:o}=t,r=await(null==n.isRTL?void 0:n.isRTL(o.floating)),s=ft(i),a=gt(i),l="y"===xt(i),c=["left","top"].includes(s)?-1:1,d=r&&l?-1:1,u=ht(e,t);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&"number"==typeof f&&(h="end"===a?-1*f:f),l?{x:h*d,y:p*c}:{x:p*c,y:h*d}}(e,t);return s===(null==(i=a.offset)?void 0:i.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:s}}}}};function kt(t){const e=et(t);let i=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=G(t),r=o?t.offsetWidth:i,s=o?t.offsetHeight:n,a=lt(i)!==r||lt(n)!==s;return a&&(i=r,n=s),{width:i,height:n,$:a}}function Ot(t){return Y(t)?t:t.contextElement}function Nt(t){const e=Ot(t);if(!G(e))return ct(1);const i=e.getBoundingClientRect(),{width:n,height:o,$:r}=kt(e);let s=(r?lt(i.width):i.width)/n,a=(r?lt(i.height):i.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Lt=ct(0);function Mt(t){const e=U(t);return Q()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Lt}function Wt(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1);const o=t.getBoundingClientRect(),r=Ot(t);let s=ct(1);e&&(n?Y(n)&&(s=Nt(n)):s=Nt(t));const a=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==U(t))&&e}(r,i,n)?Mt(r):ct(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(r){const t=U(r),e=n&&Y(n)?U(n):n;let i=t,o=i.frameElement;for(;o&&n&&e!==i;){const t=Nt(o),e=o.getBoundingClientRect(),n=et(o),r=e.left+(o.clientLeft+parseFloat(n.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(n.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,u*=t.y,l+=r,c+=s,i=U(o),o=i.frameElement}}return Rt({width:d,height:u,x:l,y:c})}const Tt=[":popover-open",":modal"];function jt(t){return Tt.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function At(t){return Wt($(t)).left+it(t).scrollLeft}function Bt(t,e,i){let n;if("viewport"===e)n=function(t,e){const i=U(t),n=$(t),o=i.visualViewport;let r=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){r=o.width,s=o.height;const t=Q();(!t||t&&"fixed"===e)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:a,y:l}}(t,i);else if("document"===e)n=function(t){const e=$(t),i=it(t),n=t.ownerDocument.body,o=at(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=at(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-i.scrollLeft+At(t);const a=-i.scrollTop;return"rtl"===et(n).direction&&(s+=at(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:a}}($(t));else if(Y(e))n=function(t,e){const i=Wt(t,!0,"fixed"===e),n=i.top+t.clientTop,o=i.left+t.clientLeft,r=G(t)?Nt(t):ct(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:n*r.y}}(e,i);else{const i=Mt(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Rt(n)}function Pt(t,e){const i=nt(t);return!(i===e||!Y(i)||tt(i))&&("fixed"===et(i).position||Pt(i,e))}function It(t,e,i){const n=G(e),o=$(e),r="fixed"===i,s=Wt(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=ct(0);if(n||!n&&!r)if(("body"!==V(e)||q(o))&&(a=it(e)),n){const t=Wt(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else o&&(l.x=At(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ht(t,e){return G(t)&&"fixed"!==et(t).position?e?e(t):t.offsetParent:null}function Ft(t,e){const i=U(t);if(!G(t)||jt(t))return i;let n=Ht(t,e);for(;n&&J(n)&&"static"===et(n).position;)n=Ht(n,e);return n&&("html"===V(n)||"body"===V(n)&&"static"===et(n).position&&!K(n))?i:n||function(t){let e=nt(t);for(;G(e)&&!tt(e);){if(K(e))return e;e=nt(e)}return null}(t)||i}const Dt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:i,offsetParent:n,strategy:o}=t;const r="fixed"===o,s=$(n),a=!!e&&jt(e.floating);if(n===s||a&&r)return i;let l={scrollLeft:0,scrollTop:0},c=ct(1);const d=ct(0),u=G(n);if((u||!u&&!r)&&(("body"!==V(n)||q(s))&&(l=it(n)),G(n))){const t=Wt(n);c=Nt(n),d.x=t.x+n.clientLeft,d.y=t.y+n.clientTop}return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-l.scrollLeft*c.x+d.x,y:i.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:$,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:n,strategy:o}=t;const r=[..."clippingAncestors"===i?function(t,e){const i=e.get(t);if(i)return i;let n=rt(t,[],!1).filter((t=>Y(t)&&"body"!==V(t))),o=null;const r="fixed"===et(t).position;let s=r?nt(t):t;for(;Y(s)&&!tt(s);){const e=et(s),i=K(s);i||"fixed"!==e.position||(o=null),(r?!i&&!o:!i&&"static"===e.position&&o&&["absolute","fixed"].includes(o.position)||q(s)&&!i&&Pt(t,s))?n=n.filter((t=>t!==s)):o=e,s=nt(s)}return e.set(t,n),n}(e,this._c):[].concat(i),n],s=r[0],a=r.reduce(((t,i)=>{const n=Bt(e,i,o);return t.top=at(n.top,t.top),t.right=st(n.right,t.right),t.bottom=st(n.bottom,t.bottom),t.left=at(n.left,t.left),t}),Bt(e,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Ft,getElementRects:async function(t){const e=this.getOffsetParent||Ft,i=this.getDimensions;return{reference:It(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await i(t.floating)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:i}=kt(t);return{width:e,height:i}},getScale:Nt,isElement:Y,isRTL:function(t){return"rtl"===et(t).direction}},Vt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:o}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=ht(t,e),c={x:i,y:n},d=await _t(e,l),u=xt(ft(o)),p=mt(u);let h=c[p],f=c[u];if(r){const t="y"===p?"bottom":"right";h=pt(h+d["y"===p?"top":"left"],h,h-d[t])}if(s){const t="y"===u?"bottom":"right";f=pt(f+d["y"===u?"top":"left"],f,f-d[t])}const g=a.fn({...e,[p]:h,[u]:f});return{...g,data:{x:g.x-i,y:g.y-n}}}}},Ut=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,n;const{placement:o,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=ht(t,e);if(null!=(i=r.arrow)&&i.alignmentOffset)return{};const w=ft(o),x=ft(a)===a,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),v=p||(x||!g?[yt(a)]:function(t){const e=yt(t);return[vt(t),e,vt(e)]}(a));p||"none"===f||v.push(...function(t,e,i,n){const o=gt(t);let r=function(t,e,i){const n=["left","right"],o=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return i?e?o:n:e?n:o;case"left":case"right":return e?r:s;default:return[]}}(ft(t),"start"===i,n);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(vt)))),r}(a,g,f,b));const y=[a,...v],z=await _t(e,m),R=[];let S=(null==(n=r.flip)?void 0:n.overflows)||[];if(d&&R.push(z[w]),u){const t=function(t,e,i){void 0===i&&(i=!1);const n=gt(t),o=bt(t),r=wt(o);let s="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=yt(s)),[s,yt(s)]}(o,s,b);R.push(z[t[0]],z[t[1]])}if(S=[...S,{placement:o,overflows:R}],!R.every((t=>t<=0))){var _,E;const t=((null==(_=r.flip)?void 0:_.index)||0)+1,e=y[t];if(e)return{data:{index:t,overflows:S},reset:{placement:e}};let i=null==(E=S.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:E.placement;if(!i)switch(h){case"bestFit":{var C;const t=null==(C=S.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(i=t);break}case"initialPlacement":i=a}if(o!==i)return{reset:{placement:i}}}return{}}}},$t=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:i,elements:n,rects:o,platform:r,strategy:s}=e,{padding:a=2,x:l,y:c}=ht(t,e),d=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(n.reference))||[]),u=function(t){const e=t.slice().sort(((t,e)=>t.y-e.y)),i=[];let n=null;for(let t=0;t<e.length;t++){const o=e[t];!n||o.y-n.y>n.height/2?i.push([o]):i[i.length-1].push(o),n=o}return i.map((t=>Rt(Et(t))))}(d),p=Rt(Et(d)),h=zt(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=c)return u.find((t=>l>t.left-h.left&&l<t.right+h.right&&c>t.top-h.top&&c<t.bottom+h.bottom))||p;if(u.length>=2){if("y"===xt(i)){const t=u[0],e=u[u.length-1],n="top"===ft(i),o=t.top,r=e.bottom,s=n?t.left:e.left,a=n?t.right:e.right;return{top:o,bottom:r,left:s,right:a,width:a-s,height:r-o,x:s,y:o}}const t="left"===ft(i),e=at(...u.map((t=>t.right))),n=st(...u.map((t=>t.left))),o=u.filter((i=>t?i.left===n:i.right===e)),r=o[0].top,s=o[o.length-1].bottom;return{top:r,bottom:s,left:n,right:e,width:e-n,height:s-r,x:n,y:r}}return p}},floating:n.floating,strategy:s});return o.reference.x!==f.reference.x||o.reference.y!==f.reference.y||o.reference.width!==f.reference.width||o.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},Xt=(t,e,i)=>{const n=new Map,o={platform:Dt,...i},r={...o.platform,_c:n};return(async(t,e,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:s}=i,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:u}=St(c,n,l),p=n,h={},f=0;for(let i=0;i<a.length;i++){const{name:r,fn:g}=a[i],{x:m,y:w,data:x,reset:b}=await g({x:d,y:u,initialPlacement:n,placement:p,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:t,floating:e}});d=null!=m?m:d,u=null!=w?w:u,h={...h,[r]:{...h[r],...x}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):b.rects),({x:d,y:u}=St(c,p,l))),i=-1)}return{x:d,y:u,placement:p,strategy:o,middlewareData:h}})(t,e,{...o,platform:r})};var Yt="undefined"!=typeof document?p:d;function Gt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let i,n,o;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(i=t.length,i!==e.length)return!1;for(n=i;0!=n--;)if(!Gt(t[n],e[n]))return!1;return!0}if(o=Object.keys(t),i=o.length,i!==Object.keys(e).length)return!1;for(n=i;0!=n--;)if(!{}.hasOwnProperty.call(e,o[n]))return!1;for(n=i;0!=n--;){const i=o[n];if(("_owner"!==i||!t.$$typeof)&&!Gt(t[i],e[i]))return!1}return!0}return t!=t&&e!=e}function Zt(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function qt(t,e){const i=Zt(t);return Math.round(e*i)/i}function Jt(t){const e=l.useRef(t);return Yt((()=>{e.current=t})),e}
1
+ import{useYooptaEditor as t,UI as e,useBlockData as i,useYooptaPluginOptions as n,useYooptaReadOnly as o,useBlockSelected as r,YooptaPlugin as s,generateId as a}from"@yoopta/editor";import{jsxs as l,jsx as c}from"react/jsx-runtime";import*as d from"react";import{useState as u,useEffect as h,useRef as p,useLayoutEffect as f,forwardRef as g,createElement as m,useMemo as w}from"react";import*as b from"react-dom";import{flushSync as x,createPortal as v}from"react-dom";function y(t,{threshold:e=0,root:i=null,rootMargin:n="0%",freezeOnceVisible:o=!1}={}){const[r,s]=u({}),a=r.isIntersecting&&o,l=([t])=>s(t);return h((()=>{const o=null==t?void 0:t.current;if(!window.IntersectionObserver||a||!o)return;const r=new IntersectionObserver(l,{threshold:e,root:i,rootMargin:n});return r.observe(o),()=>r.disconnect()}),[t,e,i,n,a]),r}const z={vimeo:function({provider:t,width:e,height:i,blockId:n}){const o=p(null),[r,s]=u(null),[a,d]=u(!1),{isIntersecting:f}=y(o,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{fetch(`https://vimeo.com/api/v2/embed/${t.id}.json`).then((t=>t.json())).then((t=>s(t[0].thumbnail_medium))).catch((()=>s(null)))}),[t.id]),l("div",Object.assign({ref:o,className:"yoo-video-relative"},{children:[c("img",{src:r||"",alt:"vimeo_embed_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&c("iframe",{title:"Embed Player",src:`https://player.vimeo.com/embed/${t.id}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>d(!0),className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:e,height:i})]}))},youtube:function({provider:t,width:e,height:i,blockId:n}){const o=p(null),[r,s]=u(!1),{isIntersecting:a}=y(o,{freezeOnceVisible:!0,rootMargin:"50%"});return l("div",Object.assign({ref:o,className:"yoo-video-relative"},{children:[c("img",{src:`https://i.ytimg.com/vi/${t.id}/default.jpg`,alt:"youtube_embed_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:a&&r?0:1,zIndex:a&&r?-1:0}}),a&&c("iframe",{title:"Embed Player",src:`https://www.youtube.com/embed/${t.id}`,frameBorder:0,onLoad:()=>s(!0),allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:e,height:i})]}))},dailymotion:function({provider:t,width:e,height:i,blockId:n}){const o=p(null),[r,s]=u(null),[a,d]=u(!1),{isIntersecting:f}=y(o,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{var e;fetch((e=t.id,`https://api.dailymotion.com/embed/${e}?fields=thumbnail_url`)).then((t=>t.json())).then((t=>s(t.thumbnail_url))).catch((()=>s(null)))}),[t.id]),l("div",Object.assign({ref:o,className:"yoo-video-relative"},{children:[c("img",{src:r||"",alt:"daylimotion_embed_preview",width:"100%",height:"100%",className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-w-full yoo-video-h-full",style:{opacity:f&&a?0:1,zIndex:f&&a?-1:0}}),f&&c("iframe",{title:"Dailymotion Embed Player",frameBorder:0,onLoad:()=>d(!0),src:`https://www.dailymotion.com/embed/embed/${t.id}`,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:e,height:i})]}))},figma:({provider:t,width:e,height:i,blockId:n})=>{const o=p(null),{isIntersecting:r}=y(o,{freezeOnceVisible:!0,rootMargin:"50%"});return c("div",Object.assign({className:"yoo-video-relative",ref:o},{children:r&&c("iframe",{src:`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(t.url)}`,frameBorder:0,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0",width:e,height:i})}))},twitter:function({provider:e,blockId:i}){const n=p(null),o=t(),{isIntersecting:r}=y(n,{freezeOnceVisible:!0,rootMargin:"50%"}),s=`${i}-${e.id}`;return h((()=>{var t;if(!r)return;const a=document.createElement("script");a.src="https://platform.twitter.com/widgets.js",null===(t=n.current)||void 0===t||t.appendChild(a),a.onload=()=>{window.twttr&&(window.twttr.widgets.createTweet(e.id,document.getElementById(s),{align:"center",conversation:"none",dnt:!0,theme:"dark",height:500,width:550}),o.blocks.Embed.updateElement(i,"embed",{sizes:{width:"auto",height:"auto"}}))}}),[e.id,r]),c("div",Object.assign({className:"w-full h-full",ref:n},{children:c("div",{id:s})}))}},R=({width:t,height:e,provider:i,blockId:n})=>{if(!i)return null;if(i&&i.id&&i.type&&z[i.type]){const o=z[i.type];return c(o,{provider:i,width:t,height:e,blockId:n})}return c("div",Object.assign({className:"w-full"},{children:c("iframe",{src:i.url,width:"100%",height:"100%",frameBorder:0,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"})}))};var S,_=(S=function(t,e){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},S(t,e)},function(t,e){function i(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),E=function(){return E=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},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(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}return _(e,t),e.prototype.render=function(){return d.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)},e}(d.PureComponent),M=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),W=function(){return W=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var o in e=arguments[i])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},W.apply(this,arguments)},A={width:"auto",height:"auto"},T=function(t,e,i){return Math.max(Math.min(t,i),e)},j=function(t,e){return Math.round(t/e)*e},B=function(t,e){return new RegExp(t,"i").test(e)},I=function(t){return Boolean(t.touches&&t.touches.length)},P=function(t,e,i){void 0===i&&(i=0);var n=e.reduce((function(i,n,o){return Math.abs(n-t)<Math.abs(e[i]-t)?o:i}),0),o=Math.abs(e[n]-t);return 0===i||o<i?e[n]:t},H=function(t){return"auto"===(t=t.toString())||t.endsWith("px")||t.endsWith("%")||t.endsWith("vh")||t.endsWith("vw")||t.endsWith("vmax")||t.endsWith("vmin")?t:t+"px"},F=function(t,e,i,n){if(t&&"string"==typeof t){if(t.endsWith("px"))return Number(t.replace("px",""));if(t.endsWith("%"))return e*(Number(t.replace("%",""))/100);if(t.endsWith("vw"))return i*(Number(t.replace("vw",""))/100);if(t.endsWith("vh"))return n*(Number(t.replace("vh",""))/100)}return t},D=["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(t){function e(e){var i=t.call(this,e)||this;return i.ratio=1,i.resizable=null,i.parentLeft=0,i.parentTop=0,i.resizableLeft=0,i.resizableRight=0,i.resizableTop=0,i.resizableBottom=0,i.targetLeft=0,i.targetTop=0,i.appendBase=function(){if(!i.resizable||!i.window)return null;var t=i.parentNode;if(!t)return null;var e=i.window.document.createElement("div");return e.style.width="100%",e.style.height="100%",e.style.position="absolute",e.style.transform="scale(0, 0)",e.style.left="0",e.style.flex="0 0 100%",e.classList?e.classList.add(V):e.className+=V,t.appendChild(e),e},i.removeBase=function(t){var e=i.parentNode;e&&e.removeChild(t)},i.ref=function(t){t&&(i.resizable=t)},i.state={isResizing:!1,width:void 0===(i.propsSize&&i.propsSize.width)?"auto":i.propsSize&&i.propsSize.width,height:void 0===(i.propsSize&&i.propsSize.height)?"auto":i.propsSize&&i.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},i.onResizeStart=i.onResizeStart.bind(i),i.onMouseMove=i.onMouseMove.bind(i),i.onMouseUp=i.onMouseUp.bind(i),i}return M(e,t),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||A},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){var t=0,e=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,n=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),t="auto"!==this.resizable.style.width?this.resizable.offsetWidth:i,e="auto"!==this.resizable.style.height?this.resizable.offsetHeight:n,this.resizable.style.position=o}return{width:t,height:e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sizeStyle",{get:function(){var t=this,e=this.props.size,i=function(e){if(void 0===t.state[e]||"auto"===t.state[e])return"auto";if(t.propsSize&&t.propsSize[e]&&t.propsSize[e].toString().endsWith("%")){if(t.state[e].toString().endsWith("%"))return t.state[e].toString();var i=t.getParentSize();return Number(t.state[e].toString().replace("px",""))/i[e]*100+"%"}return H(t.state[e])};return{width:e&&void 0!==e.width&&!this.state.isResizing?H(e.width):i("width"),height:e&&void 0!==e.height&&!this.state.isResizing?H(e.height):i("height")}},enumerable:!1,configurable:!0}),e.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var t=this.appendBase();if(!t)return{width:0,height:0};var e=!1,i=this.parentNode.style.flexWrap;"wrap"!==i&&(e=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%";var n={width:t.offsetWidth,height:t.offsetHeight};return e&&(this.parentNode.style.flexWrap=i),this.removeBase(t),n},e.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))},e.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))},e.prototype.componentDidMount=function(){if(this.resizable&&this.window){var t=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==t.flexBasis?t.flexBasis:void 0})}},e.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},e.prototype.createSizeForCssProperty=function(t,e){var i=this.propsSize&&this.propsSize[e];return"auto"!==this.state[e]||this.state.original[e]!==t||void 0!==i&&"auto"!==i?t:"auto"},e.prototype.calculateNewMaxFromBoundary=function(t,e){var i,n,o=this.props.boundsByDirection,r=this.state.direction,s=o&&B("left",r),a=o&&B("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(i=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),n=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(i=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,n=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(i=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),n=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return i&&Number.isFinite(i)&&(t=t&&t<i?t:i),n&&Number.isFinite(n)&&(e=e&&e<n?e:n),{maxWidth:t,maxHeight:e}},e.prototype.calculateNewSizeFromDirection=function(t,e){var i=this.props.scale||1,n=this.props.resizeRatio||1,o=this.state,r=o.direction,s=o.original,a=this.props,l=a.lockAspectRatio,c=a.lockAspectRatioExtraHeight,d=a.lockAspectRatioExtraWidth,u=s.width,h=s.height,p=c||0,f=d||0;return B("right",r)&&(u=s.width+(t-s.x)*n/i,l&&(h=(u-f)/this.ratio+p)),B("left",r)&&(u=s.width-(t-s.x)*n/i,l&&(h=(u-f)/this.ratio+p)),B("bottom",r)&&(h=s.height+(e-s.y)*n/i,l&&(u=(h-p)*this.ratio+f)),B("top",r)&&(h=s.height-(e-s.y)*n/i,l&&(u=(h-p)*this.ratio+f)),{newWidth:u,newHeight:h}},e.prototype.calculateNewSizeFromAspectRatio=function(t,e,i,n){var o=this.props,r=o.lockAspectRatio,s=o.lockAspectRatioExtraHeight,a=o.lockAspectRatioExtraWidth,l=void 0===n.width?10:n.width,c=void 0===i.width||i.width<0?t:i.width,d=void 0===n.height?10:n.height,u=void 0===i.height||i.height<0?e:i.height,h=s||0,p=a||0;if(r){var f=(d-h)*this.ratio+p,g=(u-h)*this.ratio+p,m=(l-p)/this.ratio+h,w=(c-p)/this.ratio+h,b=Math.max(l,f),x=Math.min(c,g),v=Math.max(d,m),y=Math.min(u,w);t=T(t,b,x),e=T(e,v,y)}else t=T(t,l,c),e=T(e,d,u);return{newWidth:t,newHeight:e}},e.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var t=this.parentNode;if(t){var e=t.getBoundingClientRect();this.parentLeft=e.left,this.parentTop=e.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var n=this.resizable.getBoundingClientRect(),o=n.left,r=n.top,s=n.right,a=n.bottom;this.resizableLeft=o,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},e.prototype.onResizeStart=function(t,e){if(this.resizable&&this.window){var i,n=0,o=0;if(t.nativeEvent&&function(t){return Boolean((t.clientX||0===t.clientX)&&(t.clientY||0===t.clientY))}(t.nativeEvent)?(n=t.nativeEvent.clientX,o=t.nativeEvent.clientY):t.nativeEvent&&I(t.nativeEvent)&&(n=t.nativeEvent.touches[0].clientX,o=t.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(t,e,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",i=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:n,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:W(W({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:e,flexBasis:i};this.setState(l)}},e.prototype.onMouseMove=function(t){var e=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&I(t))try{t.preventDefault(),t.stopPropagation()}catch(t){}var i=this.props,n=i.maxWidth,o=i.maxHeight,r=i.minWidth,s=i.minHeight,a=I(t)?t.touches[0].clientX:t.clientX,l=I(t)?t.touches[0].clientY:t.clientY,c=this.state,d=c.direction,u=c.original,h=c.width,p=c.height,f=this.getParentSize(),g=function(t,e,i,n,o,r,s){return n=F(n,t.width,e,i),o=F(o,t.height,e,i),r=F(r,t.width,e,i),s=F(s,t.height,e,i),{maxWidth:void 0===n?void 0:Number(n),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,n,o,r,s);n=g.maxWidth,o=g.maxHeight,r=g.minWidth,s=g.minHeight;var m=this.calculateNewSizeFromDirection(a,l),w=m.newHeight,b=m.newWidth,v=this.calculateNewMaxFromBoundary(n,o);this.props.snap&&this.props.snap.x&&(b=P(b,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(w=P(w,this.props.snap.y,this.props.snapGap));var y=this.calculateNewSizeFromAspectRatio(b,w,{width:v.maxWidth,height:v.maxHeight},{width:r,height:s});if(b=y.newWidth,w=y.newHeight,this.props.grid){var z=j(b,this.props.grid[0]),R=j(w,this.props.grid[1]),S=this.props.snapGap||0;b=0===S||Math.abs(z-b)<=S?z:b,w=0===S||Math.abs(R-w)<=S?R:w}var _={width:b-u.width,height:w-u.height};if(h&&"string"==typeof h)if(h.endsWith("%"))b=b/f.width*100+"%";else if(h.endsWith("vw")){b=b/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){b=b/this.window.innerHeight*100+"vh"}if(p&&"string"==typeof p)if(p.endsWith("%"))w=w/f.height*100+"%";else if(p.endsWith("vw")){w=w/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){w=w/this.window.innerHeight*100+"vh"}var E={width:this.createSizeForCssProperty(b,"width"),height:this.createSizeForCssProperty(w,"height")};"row"===this.flexDir?E.flexBasis=E.width:"column"===this.flexDir&&(E.flexBasis=E.height),x((function(){e.setState(E)})),this.props.onResize&&this.props.onResize(t,d,this.resizable,_)}},e.prototype.onMouseUp=function(t){var e=this.state,i=e.isResizing,n=e.direction,o=e.original;if(i&&this.resizable){var r={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(t,n,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"})})}},e.prototype.updateSize=function(t){this.setState({width:t.width,height:t.height})},e.prototype.renderResizer=function(){var t=this,e=this.props,i=e.enable,n=e.handleStyles,o=e.handleClasses,r=e.handleWrapperStyle,s=e.handleWrapperClass,a=e.handleComponent;if(!i)return null;var l=Object.keys(i).map((function(e){return!1!==i[e]?d.createElement(L,{key:e,direction:e,onResizeStart:t.onResizeStart,replaceStyles:n&&n[e],className:o&&o[e]},a&&a[e]?a[e]:null):null}));return d.createElement("div",{className:s,style:r},l)},e.prototype.render=function(){var t=this,e=Object.keys(this.props).reduce((function(e,i){return-1!==D.indexOf(i)||(e[i]=t.props[i]),e}),{}),i=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&&(i.flexBasis=this.state.flexBasis);var n=this.props.as||"div";return d.createElement(n,W({ref:this.ref,style:i,className:this.props.className},e),this.state.isResizing&&d.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},e.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},e}(d.PureComponent);function $(t){return G(t)?(t.nodeName||"").toLowerCase():"#document"}function X(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Y(t){var e;return null==(e=(G(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function G(t){return t instanceof Node||t instanceof X(t).Node}function Z(t){return t instanceof Element||t instanceof X(t).Element}function q(t){return t instanceof HTMLElement||t instanceof X(t).HTMLElement}function J(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof X(t).ShadowRoot)}function K(t){const{overflow:e,overflowX:i,overflowY:n,display:o}=nt(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+i)&&!["inline","contents"].includes(o)}function Q(t){return["table","td","th"].includes($(t))}function tt(t){const e=et(),i=nt(t);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function et(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function it(t){return["html","body","#document"].includes($(t))}function nt(t){return X(t).getComputedStyle(t)}function ot(t){return Z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function rt(t){if("html"===$(t))return t;const e=t.assignedSlot||t.parentNode||J(t)&&t.host||Y(t);return J(e)?e.host:e}function st(t){const e=rt(t);return it(e)?t.ownerDocument?t.ownerDocument.body:t.body:q(e)&&K(e)?e:st(e)}function at(t,e,i){var n;void 0===e&&(e=[]),void 0===i&&(i=!0);const o=st(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),s=X(o);return r?e.concat(s,s.visualViewport||[],K(o)?o:[],s.frameElement&&i?at(s.frameElement):[]):e.concat(o,at(o,[],i))}const lt=Math.min,ct=Math.max,dt=Math.round,ut=t=>({x:t,y:t}),ht={left:"right",right:"left",bottom:"top",top:"bottom"},pt={start:"end",end:"start"};function ft(t,e,i){return ct(t,lt(e,i))}function gt(t,e){return"function"==typeof t?t(e):t}function mt(t){return t.split("-")[0]}function wt(t){return t.split("-")[1]}function bt(t){return"x"===t?"y":"x"}function xt(t){return"y"===t?"height":"width"}function vt(t){return["top","bottom"].includes(mt(t))?"y":"x"}function yt(t){return bt(vt(t))}function zt(t){return t.replace(/start|end/g,(t=>pt[t]))}function Rt(t){return t.replace(/left|right|bottom|top/g,(t=>ht[t]))}function St(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function _t(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Et(t,e,i){let{reference:n,floating:o}=t;const r=vt(e),s=yt(e),a=xt(s),l=mt(e),c="y"===r,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let p;switch(l){case"top":p={x:d,y:n.y-o.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-o.width,y:u};break;default:p={x:n.x,y:n.y}}switch(wt(e)){case"start":p[s]-=h*(i&&c?-1:1);break;case"end":p[s]+=h*(i&&c?-1:1)}return p}async function Ct(t,e){var i;void 0===e&&(e={});const{x:n,y:o,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=gt(e,t),f=St(p),g=a[h?"floating"===u?"reference":"floating":u],m=_t(await r.getClippingRect({element:null==(i=await(null==r.isElement?void 0:r.isElement(g)))||i?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w="floating"===u?{...s.floating,x:n,y:o}:s.reference,b=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),x=await(null==r.isElement?void 0:r.isElement(b))&&await(null==r.getScale?void 0:r.getScale(b))||{x:1,y:1},v=_t(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:l}):w);return{top:(m.top-v.top+f.top)/x.y,bottom:(v.bottom-m.bottom+f.bottom)/x.y,left:(m.left-v.left+f.left)/x.x,right:(v.right-m.right+f.right)/x.x}}function kt(t){const e=lt(...t.map((t=>t.left))),i=lt(...t.map((t=>t.top)));return{x:e,y:i,width:ct(...t.map((t=>t.right)))-e,height:ct(...t.map((t=>t.bottom)))-i}}const Ot=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var i,n;const{x:o,y:r,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:i,platform:n,elements:o}=t,r=await(null==n.isRTL?void 0:n.isRTL(o.floating)),s=mt(i),a=wt(i),l="y"===vt(i),c=["left","top"].includes(s)?-1:1,d=r&&l?-1:1,u=gt(e,t);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*d,y:h*c}:{x:h*c,y:p*d}}(e,t);return s===(null==(i=a.offset)?void 0:i.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:s}}}}};function Nt(t){const e=nt(t);let i=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const o=q(t),r=o?t.offsetWidth:i,s=o?t.offsetHeight:n,a=dt(i)!==r||dt(n)!==s;return a&&(i=r,n=s),{width:i,height:n,$:a}}function Lt(t){return Z(t)?t:t.contextElement}function Mt(t){const e=Lt(t);if(!q(e))return ut(1);const i=e.getBoundingClientRect(),{width:n,height:o,$:r}=Nt(e);let s=(r?dt(i.width):i.width)/n,a=(r?dt(i.height):i.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Wt=ut(0);function At(t){const e=X(t);return et()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Wt}function Tt(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1);const o=t.getBoundingClientRect(),r=Lt(t);let s=ut(1);e&&(n?Z(n)&&(s=Mt(n)):s=Mt(t));const a=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==X(t))&&e}(r,i,n)?At(r):ut(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,d=o.width/s.x,u=o.height/s.y;if(r){const t=X(r),e=n&&Z(n)?X(n):n;let i=t,o=i.frameElement;for(;o&&n&&e!==i;){const t=Mt(o),e=o.getBoundingClientRect(),n=nt(o),r=e.left+(o.clientLeft+parseFloat(n.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(n.paddingTop))*t.y;l*=t.x,c*=t.y,d*=t.x,u*=t.y,l+=r,c+=s,i=X(o),o=i.frameElement}}return _t({width:d,height:u,x:l,y:c})}const jt=[":popover-open",":modal"];function Bt(t){return jt.some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function It(t){return Tt(Y(t)).left+ot(t).scrollLeft}function Pt(t,e,i){let n;if("viewport"===e)n=function(t,e){const i=X(t),n=Y(t),o=i.visualViewport;let r=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){r=o.width,s=o.height;const t=et();(!t||t&&"fixed"===e)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:a,y:l}}(t,i);else if("document"===e)n=function(t){const e=Y(t),i=ot(t),n=t.ownerDocument.body,o=ct(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),r=ct(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-i.scrollLeft+It(t);const a=-i.scrollTop;return"rtl"===nt(n).direction&&(s+=ct(e.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:a}}(Y(t));else if(Z(e))n=function(t,e){const i=Tt(t,!0,"fixed"===e),n=i.top+t.clientTop,o=i.left+t.clientLeft,r=q(t)?Mt(t):ut(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:n*r.y}}(e,i);else{const i=At(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return _t(n)}function Ht(t,e){const i=rt(t);return!(i===e||!Z(i)||it(i))&&("fixed"===nt(i).position||Ht(i,e))}function Ft(t,e,i){const n=q(e),o=Y(e),r="fixed"===i,s=Tt(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=ut(0);if(n||!n&&!r)if(("body"!==$(e)||K(o))&&(a=ot(e)),n){const t=Tt(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else o&&(l.x=It(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Dt(t,e){return q(t)&&"fixed"!==nt(t).position?e?e(t):t.offsetParent:null}function Vt(t,e){const i=X(t);if(!q(t)||Bt(t))return i;let n=Dt(t,e);for(;n&&Q(n)&&"static"===nt(n).position;)n=Dt(n,e);return n&&("html"===$(n)||"body"===$(n)&&"static"===nt(n).position&&!tt(n))?i:n||function(t){let e=rt(t);for(;q(e)&&!it(e);){if(tt(e))return e;e=rt(e)}return null}(t)||i}const Ut={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:i,offsetParent:n,strategy:o}=t;const r="fixed"===o,s=Y(n),a=!!e&&Bt(e.floating);if(n===s||a&&r)return i;let l={scrollLeft:0,scrollTop:0},c=ut(1);const d=ut(0),u=q(n);if((u||!u&&!r)&&(("body"!==$(n)||K(s))&&(l=ot(n)),q(n))){const t=Tt(n);c=Mt(n),d.x=t.x+n.clientLeft,d.y=t.y+n.clientTop}return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-l.scrollLeft*c.x+d.x,y:i.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:Y,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:n,strategy:o}=t;const r=[..."clippingAncestors"===i?function(t,e){const i=e.get(t);if(i)return i;let n=at(t,[],!1).filter((t=>Z(t)&&"body"!==$(t))),o=null;const r="fixed"===nt(t).position;let s=r?rt(t):t;for(;Z(s)&&!it(s);){const e=nt(s),i=tt(s);i||"fixed"!==e.position||(o=null),(r?!i&&!o:!i&&"static"===e.position&&o&&["absolute","fixed"].includes(o.position)||K(s)&&!i&&Ht(t,s))?n=n.filter((t=>t!==s)):o=e,s=rt(s)}return e.set(t,n),n}(e,this._c):[].concat(i),n],s=r[0],a=r.reduce(((t,i)=>{const n=Pt(e,i,o);return t.top=ct(n.top,t.top),t.right=lt(n.right,t.right),t.bottom=lt(n.bottom,t.bottom),t.left=ct(n.left,t.left),t}),Pt(e,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Vt,getElementRects:async function(t){const e=this.getOffsetParent||Vt,i=this.getDimensions;return{reference:Ft(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await i(t.floating)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:i}=Nt(t);return{width:e,height:i}},getScale:Mt,isElement:Z,isRTL:function(t){return"rtl"===nt(t).direction}},$t=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:n,placement:o}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=gt(t,e),c={x:i,y:n},d=await Ct(e,l),u=vt(mt(o)),h=bt(u);let p=c[h],f=c[u];if(r){const t="y"===h?"bottom":"right";p=ft(p+d["y"===h?"top":"left"],p,p-d[t])}if(s){const t="y"===u?"bottom":"right";f=ft(f+d["y"===u?"top":"left"],f,f-d[t])}const g=a.fn({...e,[h]:p,[u]:f});return{...g,data:{x:g.x-i,y:g.y-n}}}}},Xt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,n;const{placement:o,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=gt(t,e);if(null!=(i=r.arrow)&&i.alignmentOffset)return{};const w=mt(o),b=mt(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),v=h||(b||!g?[Rt(a)]:function(t){const e=Rt(t);return[zt(t),e,zt(e)]}(a));h||"none"===f||v.push(...function(t,e,i,n){const o=wt(t);let r=function(t,e,i){const n=["left","right"],o=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return i?e?o:n:e?n:o;case"left":case"right":return e?r:s;default:return[]}}(mt(t),"start"===i,n);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(zt)))),r}(a,g,f,x));const y=[a,...v],z=await Ct(e,m),R=[];let S=(null==(n=r.flip)?void 0:n.overflows)||[];if(d&&R.push(z[w]),u){const t=function(t,e,i){void 0===i&&(i=!1);const n=wt(t),o=yt(t),r=xt(o);let s="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=Rt(s)),[s,Rt(s)]}(o,s,x);R.push(z[t[0]],z[t[1]])}if(S=[...S,{placement:o,overflows:R}],!R.every((t=>t<=0))){var _,E;const t=((null==(_=r.flip)?void 0:_.index)||0)+1,e=y[t];if(e)return{data:{index:t,overflows:S},reset:{placement:e}};let i=null==(E=S.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:E.placement;if(!i)switch(p){case"bestFit":{var C;const t=null==(C=S.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(i=t);break}case"initialPlacement":i=a}if(o!==i)return{reset:{placement:i}}}return{}}}},Yt=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:i,elements:n,rects:o,platform:r,strategy:s}=e,{padding:a=2,x:l,y:c}=gt(t,e),d=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(n.reference))||[]),u=function(t){const e=t.slice().sort(((t,e)=>t.y-e.y)),i=[];let n=null;for(let t=0;t<e.length;t++){const o=e[t];!n||o.y-n.y>n.height/2?i.push([o]):i[i.length-1].push(o),n=o}return i.map((t=>_t(kt(t))))}(d),h=_t(kt(d)),p=St(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=c)return u.find((t=>l>t.left-p.left&&l<t.right+p.right&&c>t.top-p.top&&c<t.bottom+p.bottom))||h;if(u.length>=2){if("y"===vt(i)){const t=u[0],e=u[u.length-1],n="top"===mt(i),o=t.top,r=e.bottom,s=n?t.left:e.left,a=n?t.right:e.right;return{top:o,bottom:r,left:s,right:a,width:a-s,height:r-o,x:s,y:o}}const t="left"===mt(i),e=ct(...u.map((t=>t.right))),n=lt(...u.map((t=>t.left))),o=u.filter((i=>t?i.left===n:i.right===e)),r=o[0].top,s=o[o.length-1].bottom;return{top:r,bottom:s,left:n,right:e,width:e-n,height:s-r,x:n,y:r}}return h}},floating:n.floating,strategy:s});return o.reference.x!==f.reference.x||o.reference.y!==f.reference.y||o.reference.width!==f.reference.width||o.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},Gt=(t,e,i)=>{const n=new Map,o={platform:Ut,...i},r={...o.platform,_c:n};return(async(t,e,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:s}=i,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:u}=Et(c,n,l),h=n,p={},f=0;for(let i=0;i<a.length;i++){const{name:r,fn:g}=a[i],{x:m,y:w,data:b,reset:x}=await g({x:d,y:u,initialPlacement:n,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:e}});d=null!=m?m:d,u=null!=w?w:u,p={...p,[r]:{...p[r],...b}},x&&f<=50&&(f++,"object"==typeof x&&(x.placement&&(h=x.placement),x.rects&&(c=!0===x.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):x.rects),({x:d,y:u}=Et(c,h,l))),i=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:p}})(t,e,{...o,platform:r})};var Zt="undefined"!=typeof document?f:h;function qt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let i,n,o;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(i=t.length,i!==e.length)return!1;for(n=i;0!=n--;)if(!qt(t[n],e[n]))return!1;return!0}if(o=Object.keys(t),i=o.length,i!==Object.keys(e).length)return!1;for(n=i;0!=n--;)if(!{}.hasOwnProperty.call(e,o[n]))return!1;for(n=i;0!=n--;){const i=o[n];if(("_owner"!==i||!t.$$typeof)&&!qt(t[i],e[i]))return!1}return!0}return t!=t&&e!=e}function Jt(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Kt(t,e){const i=Jt(t);return Math.round(e*i)/i}function Qt(t){const e=d.useRef(t);return Zt((()=>{e.current=t})),e}
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 Kt=["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(","),Qt="undefined"==typeof Element,te=Qt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ee=!Qt&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},ie=function t(e,i){var n;void 0===i&&(i=!0);var o=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===o||"true"===o||i&&e&&t(e.parentNode)},ne=function t(e,i,n){for(var o=[],r=Array.from(e);r.length;){var s=r.shift();if(!ie(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=t(a.length?a:s.children,!0,n);n.flatten?o.push.apply(o,l):o.push({scopeParent:s,candidates:l})}else{te.call(s,Kt)&&n.filter(s)&&(i||!e.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(s),d=!ie(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(c&&d){var u=t(!0===c?s.children:c.children,!0,n);n.flatten?o.push.apply(o,u):o.push({scopeParent:s,candidates:u})}else r.unshift.apply(r,s.children)}}return o},oe=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},re=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,i=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===i||"true"===i}(t))&&!oe(t)?0:t.tabIndex},se=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},ae=function(t){return"INPUT"===t.tagName},le=function(t){return function(t){return ae(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,i=t.form||ee(t),n=function(t){return i.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=n(window.CSS.escape(t.name));else try{e=n(t.name)}catch(t){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",t.message),!1}var o=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]}(e,t.form);return!o||o===t}(t)},ce=function(t){var e=t.getBoundingClientRect(),i=e.width,n=e.height;return 0===i&&0===n},de=function(t,e){var i=e.displayCheck,n=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var o=te.call(t,"details>summary:first-of-type")?t.parentElement:t;if(te.call(o,"details:not([open]) *"))return!0;if(i&&"full"!==i&&"legacy-full"!==i){if("non-zero-area"===i)return ce(t)}else{if("function"==typeof n){for(var r=t;t;){var s=t.parentElement,a=ee(t);if(s&&!s.shadowRoot&&!0===n(s))return ce(t);t=t.assignedSlot?t.assignedSlot:s||a===t.ownerDocument?s:a.host}t=r}if(function(t){var e,i,n,o,r=t&&ee(t),s=null===(e=r)||void 0===e?void 0:e.host,a=!1;if(r&&r!==t)for(a=!!(null!==(i=s)&&void 0!==i&&null!==(n=i.ownerDocument)&&void 0!==n&&n.contains(s)||null!=t&&null!==(o=t.ownerDocument)&&void 0!==o&&o.contains(t));!a&&s;){var l,c,d;a=!(null===(c=s=null===(l=r=ee(s))||void 0===l?void 0:l.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(s))}return a}(t))return!t.getClientRects().length;if("legacy-full"!==i)return!0}return!1},ue=function(t,e){return!(e.disabled||ie(e)||function(t){return ae(t)&&"hidden"===t.type}(e)||de(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var i=0;i<e.children.length;i++){var n=e.children.item(i);if("LEGEND"===n.tagName)return!!te.call(e,"fieldset[disabled] *")||!n.contains(t)}return!0}e=e.parentElement}return!1}(e))},pe=function(t,e){return!(le(e)||re(e)<0||!ue(t,e))},he=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},fe=function t(e){var i=[],n=[];return e.forEach((function(e,o){var r=!!e.scopeParent,s=r?e.scopeParent:e,a=function(t,e){var i=re(t);return i<0&&e&&!oe(t)?0:i}(s,r),l=r?t(e.candidates):s;0===a?r?i.push.apply(i,l):i.push(s):n.push({documentOrder:o,tabIndex:a,item:e,isScope:r,content:l})})),n.sort(se).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(i)},ge=function(t,e){var i;return i=(e=e||{}).getShadowRoot?ne([t],e.includeContainer,{filter:pe.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:he}):function(t,e,i){if(ie(t))return[];var n=Array.prototype.slice.apply(t.querySelectorAll(Kt));return e&&te.call(t,Kt)&&n.unshift(t),n.filter(i)}(t,e.includeContainer,pe.bind(null,e)),fe(i)};const me=l["useInsertionEffect".toString()]||(t=>t());var we="undefined"!=typeof document?p:d;function xe(){return xe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},xe.apply(this,arguments)}let be=!1,ve=0;const ye=()=>"floating-ui-"+ve++;const ze=l["useId".toString()]||function(){const[t,e]=l.useState((()=>be?ye():void 0));return we((()=>{null==t&&e(ye())}),[]),l.useEffect((()=>{be||(be=!0)}),[]),t};const Re=l.createContext(null),Se=l.createContext(null);function _e(t){return"data-floating-ui-"+t}const Ee=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ce(t,e){const i=ge(t,Ee());"prev"===e&&i.reverse();const n=i.indexOf(function(t){let e=t.activeElement;for(;null!=(null==(i=e)||null==(i=i.shadowRoot)?void 0:i.activeElement);){var i;e=e.shadowRoot.activeElement}return e}((null==(o=t)?void 0:o.ownerDocument)||document));var o;return i.slice(n+1)[0]}function ke(t,e){const i=e||t.currentTarget,n=t.relatedTarget;return!n||!function(t,e){if(!t||!e)return!1;const i=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(i&&Z(i)){let i=e;for(;i;){if(t===i)return!0;i=i.parentNode||i.host}}return!1}(i,n)}function Oe(t){ge(t,Ee()).forEach((t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}))}function Ne(t){t.querySelectorAll("[data-tabindex]").forEach((t=>{const e=t.dataset.tabindex;delete t.dataset.tabindex,e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")}))}const Le={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 Me(t){"Tab"===t.key&&(t.target,clearTimeout(undefined))}const We=l.forwardRef((function(t,e){const[i,n]=l.useState();we((()=>(/apple/i.test(navigator.vendor)&&n("button"),document.addEventListener("keydown",Me),()=>{document.removeEventListener("keydown",Me)})),[]);const o={ref:e,tabIndex:0,role:i,"aria-hidden":!i||void 0,[_e("focus-guard")]:"",style:Le};return l.createElement("span",xe({},t,o))})),Te=l.createContext(null),je=_e("portal");function Ae(t){let{children:e,id:i,root:n=null,preserveTabOrder:o=!0}=t;const r=function(t){let{id:e,root:i}=void 0===t?{}:t;const[n,o]=l.useState(null),r=ze(),s=Be(),a=l.useRef(null);return we((()=>()=>{null==n||n.remove(),queueMicrotask((()=>{a.current=null}))}),[n]),we((()=>{if(a.current)return;const t=e?document.getElementById(e):null;if(!t)return;const i=document.createElement("div");i.id=r,i.setAttribute(je,""),t.appendChild(i),a.current=i,o(i)}),[e,r]),we((()=>{if(a.current)return;let t=i||(null==s?void 0:s.portalNode);t&&!Y(t)&&(t=t.current),t=t||document.body;let n=null;e&&(n=document.createElement("div"),n.id=e,t.appendChild(n));const l=document.createElement("div");l.id=r,l.setAttribute(je,""),t=n||t,t.appendChild(l),a.current=l,o(l)}),[e,i,r,s]),n}({id:i,root:n}),[s,a]=l.useState(null),c=l.useRef(null),d=l.useRef(null),u=l.useRef(null),p=l.useRef(null),h=!!s&&!s.modal&&s.open&&o&&!(!n&&!r);return l.useEffect((()=>{if(r&&o&&(null==s||!s.modal))return r.addEventListener("focusin",t,!0),r.addEventListener("focusout",t,!0),()=>{r.removeEventListener("focusin",t,!0),r.removeEventListener("focusout",t,!0)};function t(t){if(r&&ke(t)){("focusin"===t.type?Ne:Oe)(r)}}}),[r,o,null==s?void 0:s.modal]),l.createElement(Te.Provider,{value:l.useMemo((()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:p,portalNode:r,setFocusManagerState:a})),[o,r])},h&&r&&l.createElement(We,{"data-type":"outside",ref:c,onFocus:t=>{if(ke(t,r)){var e;null==(e=u.current)||e.focus()}else{const t=Ce(document.body,"prev")||(null==s?void 0:s.refs.domReference.current);null==t||t.focus()}}}),h&&r&&l.createElement("span",{"aria-owns":r.id,style:Le}),r&&x(e,r),h&&r&&l.createElement(We,{"data-type":"outside",ref:d,onFocus:t=>{if(ke(t,r)){var e;null==(e=p.current)||e.focus()}else{const e=Ce(document.body,"next")||(null==s?void 0:s.refs.domReference.current);null==e||e.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,t.nativeEvent))}}}))}const Be=()=>l.useContext(Te),Pe=new Set,Ie=l.forwardRef((function(t,e){let{lockScroll:i=!1,...n}=t;const o=ze();return we((()=>{if(!i)return;Pe.add(o);const t=/iP(hone|ad|od)|iOS/.test(function(){const t=navigator.userAgentData;return null!=t&&t.platform?t.platform:navigator.platform}()),e=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=e.left?parseFloat(e.left):window.pageXOffset,a=e.top?parseFloat(e.top):window.pageYOffset;if(e.overflow="hidden",r&&(e[n]=r+"px"),t){var l,c;const t=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,i=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(e,{position:"fixed",top:-(a-Math.floor(i))+"px",left:-(s-Math.floor(t))+"px",right:"0"})}return()=>{Pe.delete(o),0===Pe.size&&(Object.assign(e,{overflow:"",[n]:""}),t&&(Object.assign(e,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a)))}}),[o,i]),l.createElement("div",xe({ref:e},n,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...n.style}}))}));function He(t){var e;void 0===t&&(t={});const{open:i=!1,onOpenChange:n,nodeId:o}=t,[r,s]=l.useState(null),a=(null==(e=t.elements)?void 0:e.reference)||r,c=function(t){void 0===t&&(t={});const{placement:e="bottom",strategy:i="absolute",middleware:n=[],platform:o,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:c,open:d}=t,[u,p]=l.useState({x:0,y:0,strategy:i,placement:e,middlewareData:{},isPositioned:!1}),[h,f]=l.useState(n);Gt(h,n)||f(n);const[g,w]=l.useState(null),[x,b]=l.useState(null),v=l.useCallback((t=>{t!==S.current&&(S.current=t,w(t))}),[]),y=l.useCallback((t=>{t!==_.current&&(_.current=t,b(t))}),[]),z=r||g,R=s||x,S=l.useRef(null),_=l.useRef(null),E=l.useRef(u),C=null!=c,k=Jt(c),O=Jt(o),N=l.useCallback((()=>{if(!S.current||!_.current)return;const t={placement:e,strategy:i,middleware:h};O.current&&(t.platform=O.current),Xt(S.current,_.current,t).then((t=>{const e={...t,isPositioned:!0};L.current&&!Gt(E.current,e)&&(E.current=e,m.flushSync((()=>{p(e)})))}))}),[h,e,i,O]);Yt((()=>{!1===d&&E.current.isPositioned&&(E.current.isPositioned=!1,p((t=>({...t,isPositioned:!1}))))}),[d]);const L=l.useRef(!1);Yt((()=>(L.current=!0,()=>{L.current=!1})),[]),Yt((()=>{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=l.useMemo((()=>({reference:S,floating:_,setReference:v,setFloating:y})),[v,y]),W=l.useMemo((()=>({reference:z,floating:R})),[z,R]),T=l.useMemo((()=>{const t={position:i,left:0,top:0};if(!W.floating)return t;const e=qt(W.floating,u.x),n=qt(W.floating,u.y);return a?{...t,transform:"translate("+e+"px, "+n+"px)",...Zt(W.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:e,top:n}}),[i,a,W.floating,u.x,u.y]);return l.useMemo((()=>({...u,update:N,refs:M,elements:W,floatingStyles:T})),[u,N,M,W,T])}(t),d=l.useContext(Se),u=null!=((null==(p=l.useContext(Re))?void 0:p.id)||null);var p;const h=function(t){const e=l.useRef((()=>{}));return me((()=>{e.current=t})),l.useCallback((function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return null==e.current?void 0:e.current(...i)}),[])}(((t,e,i)=>{t&&(g.current.openEvent=e),w.emit("openchange",{open:t,event:e,reason:i,nested:u}),null==n||n(t,e,i)})),f=l.useRef(null),g=l.useRef({}),w=l.useState((()=>function(){const t=new Map;return{emit(e,i){var n;null==(n=t.get(e))||n.forEach((t=>t(i)))},on(e,i){t.set(e,[...t.get(e)||[],i])},off(e,i){var n;t.set(e,(null==(n=t.get(e))?void 0:n.filter((t=>t!==i)))||[])}}}()))[0],x=ze(),b=l.useCallback((t=>{const e=Y(t)?{getBoundingClientRect:()=>t.getBoundingClientRect(),contextElement:t}:t;c.refs.setReference(e)}),[c.refs]),v=l.useCallback((t=>{(Y(t)||null===t)&&(f.current=t,s(t)),(Y(c.refs.reference.current)||null===c.refs.reference.current||null!==t&&!Y(t))&&c.refs.setReference(t)}),[c.refs]),y=l.useMemo((()=>({...c.refs,setReference:v,setPositionReference:b,domReference:f})),[c.refs,v,b]),z=l.useMemo((()=>({...c.elements,domReference:a})),[c.elements,a]),R=l.useMemo((()=>({...c,refs:y,elements:z,dataRef:g,nodeId:o,floatingId:x,events:w,open:i,onOpenChange:h})),[c,o,x,w,i,h,y,z]);return we((()=>{const t=null==d?void 0:d.nodesRef.current.find((t=>t.id===o));t&&(t.context=R)})),l.useMemo((()=>({...c,context:R,refs:y,elements:z})),[c,y,z,R])}function Fe(t,e){if(null==t)return{};var i,n,o={},r=Object.keys(t);for(n=0;n<r.length;n++)i=r[n],e.indexOf(i)>=0||(o[i]=t[i]);return o}var De=["color"],Ve=h((function(t,e){var i=t.color,n=void 0===i?"currentColor":i,o=Fe(t,De);return f("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:e}),f("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:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Ue=["color"],$e=h((function(t,e){var i=t.color,n=void 0===i?"currentColor":i,o=Fe(t,Ue);return f("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:e}),f("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:n,fillRule:"evenodd",clipRule:"evenodd"}))}));const Xe={youtube:t=>{const e=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return e&&11===e[2].length?e[2]:null},vimeo:t=>new URL(t).pathname.split("/")[1],dailymotion:t=>{const e=t.match(/^.+dailymotion.com\/(embed|hub)\/([^_]+)[^#]*(#embed=([^_&]+))?/);return null!==e?void 0!==e[4]?e[4]:e[2]:null},twitter:function(t){const e=t.match(/\/status\/(\d+)/);return e?e[1]:null},figma:function(t){const e=new URL(t).searchParams,i=e.get("node-id");return e.get("node-id")?i:"unknown"}},Ye=({blockId:e,onClose:i})=>{const n=t(),[o,r]=c(""),l=0===o.length;return s("div",Object.assign({className:"cursor-pointer user-select-none transition-bg duration-20 ease-in white-space-nowrap w-full"},{children:[a("input",{type:"text",placeholder:"Paste embed link",value:o,className:"items-center bg-[hsla(45,13%,94%,.6)] rounded-[4px] shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] cursor-text flex text-[14px] h-[32px] leading-[20px] px-[6px] relative w-full border-none",onChange:t=>r(t.target.value)}),a("button",Object.assign({type:"button",className:"user-select-none transition-bg duration-20 ease-in cursor-pointer flex items-center justify-center flex-shrink-0 white-space-nowrap h-[28px] rounded-[4px] shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] bg-[rgb(35,131,226)] text-white fill-white leading-[1.2] px-[12px] text-[14px] font-medium w-full max-w-[300px] mx-auto m-[12px_0_6px] disabled:bg-[rgba(35,131,226,0.5)] disabled:cursor-not-allowed",disabled:l,onClick:()=>{var t;if(0===o.length)return;const r=(s=o).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===(t=Xe[r])||void 0===t?void 0:t.call(Xe,o):null,l={type:r,id:a,url:o};r&&a||(l.id=o),n.blocks.Embed.updateElement(e,"embed",{provider:l}),i()}},{children:"Embed embed"}))]}))},Ge=({floatingStyles:t,refs:e,onClose:i,blockId:n})=>a(Ae,Object.assign({root:document.getElementById("yoopta-editor")},{children:a(Ie,Object.assign({lockScroll:!0,className:"z-[100]",onClick:i},{children:a("div",Object.assign({ref:e.setFloating,style:t,onClick:t=>t.stopPropagation()},{children:s("div",Object.assign({className:"flex flex-col min-w-[540px] max-w-[calc(100vw-24px)] h-full max-h-[420px] bg-white 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:[a("div",Object.assign({className:"w-full flex text-[14px] p-[0_8px] shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] relative z-10 h-[40px]"},{children:a("button",Object.assign({type:"button",style:{borderBottom:"2px solid #2483e2"},className:"py-[6px] whitespace-nowrap min-w-0 flex-shrink-0 text-[rgb(55,53,47)] relative cursor-pointer user-select-none bg-inherit transition-[height_20ms_ease-in] inline-flex items-center h-full text-[14px] leading-[1.2] px-[8px]"},{children:"Embed link"}))})),a("div",Object.assign({className:"pt-[6px] pb-[6px] mt-[4px] flex justify-center mr-[12px] ml-[12px]"},{children:a(Ye,{onClose:i,blockId:n})}))]}))}))}))})),Ze=({attributes:t,children:e,blockId:i})=>{const[n,o]=c(!1),{refs:r,floatingStyles:l}=He({placement:"bottom",open:n,onOpenChange:o,middleware:[$t(),Ut(),Vt(),Ct(10)]});return s("div",Object.assign({className:"w-full user-select-none m-[20px_0_10px] relative flex"},t,{contentEditable:!1},{children:[s("button",Object.assign({className:"p-[12px_36px_12px_12px] flex items-center text-left w-full overflow-hidden rounded-[3px] text-[14px] text-[rgba(55,53,47,0.65)] relative cursor-pointer border-none bg-[#efefef] transition-[background-color_100ms_ease-in] hover:bg-[#e3e3e3]",onClick:()=>o(!0),ref:r.setReference},{children:[a(Ve,{className:"mr-2 user-select-none",width:24,height:24}),a("span",Object.assign({className:"font-medium"},{children:"Click to add embed"}))]})),n&&a(Ge,{blockId:i,floatingStyles:l,refs:r,onClose:()=>o(!1)}),e]}))},{ExtendedBlockActions:qe,BlockOptionsMenuGroup:Je,BlockOptionsMenuItem:Ke,BlockOptionsSeparator:Qe}=e,ti=({editor:t,block:e,props:i})=>s(qe,Object.assign({onClick:()=>t.setSelection([e.meta.order])},{children:[a(Qe,{}),a(Je,{children:a(Ke,{children:s("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>{var t;window.open(null===(t=null==i?void 0:i.provider)||void 0===t?void 0:t.url,"_blank")}},{children:[a($e,{width:16,height:16,className:"w-4 h-4 mr-2"}),"Open"]}))})})]})),ei=({position:t})=>a("div",Object.assign({contentEditable:!1,className:"absolute pointer-events-none flex items-center justify-center z-10 opacity-1 h-full w-[15px] cursor-col-resize transition-opacity duration-150 ease-in "+("left"===t?"left-0 top-0":"right-0 top-0")},{children:a("div",{className:"opacity-100 transition-opacity duration-300 ease-in rounded-[20px] bg-[rgba(15,15,15,0.6)] border border-[rgba(255,255,255,0.9)] w-[6px] h-[48px] max-h-[50%] shadow-[0_0_0_.5px_#FFF]"})})),ii=new r({type:"Embed",elements:{embed:{render:({element:e,attributes:r,children:l,blockId:u})=>{const{sizes:p,provider:h}=e.props||{},f=i(u),m=t(),w=n("Embed"),[x,b]=c({width:(null==p?void 0:p.width)||750,height:(null==p?void 0:p.height)||440});d((()=>b({width:(null==p?void 0:p.width)||650,height:(null==p?void 0:p.height)||440})),[e.props]);const v=o({blockId:u});const z=g((()=>{var t,e;return{minWidth:300,size:{width:x.width,height:x.height},maxWidth:(null===(t=null==w?void 0:w.maxSizes)||void 0===t?void 0:t.maxWidth)||800,maxHeight:(null===(e=null==w?void 0:w.maxSizes)||void 0===e?void 0:e.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!0,right:!0},handleStyles:{left:{left:0},right:{right:0}},onResize:(t,e,i)=>{b({width:i.offsetWidth,height:i.offsetHeight})},onResizeStop:(t,e,i)=>{m.blocks.Embed.updateElement(u,"embed",{sizes:{width:i.offsetWidth,height:i.offsetHeight}})},handleComponent:{left:a(ei,{position:"left"}),right:a(ei,{position:"right"})}}}),[x.width,x.height]);return h&&(null==h?void 0:h.id)?a("div",Object.assign({"data-element-type":e.type,contentEditable:!1,draggable:!1,className:"mt-4 relative yoopta-embed"},r,{children:s(D,Object.assign({},z,{className:"mx-auto my-0 flex"},{children:[v&&a("div",{className:"absolute pointer-events-none inset-0 bg-[rgba(35,131,226,0.14)] z-[81] rounded-[3px] opacity-100 transition-opacity duration-150 ease-in"}),a(y,{width:null==x?void 0:x.width,height:null==x?void 0:x.height,provider:h,blockId:u}),a(ti,{block:f,editor:m,props:e.props}),l]}))})):a(Ze,Object.assign({attributes:r,blockId:u},{children:l}))},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}}});!function(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}(".pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-\\[100\\]{z-index:100}.z-\\[81\\]{z-index:81}.m-\\[12px_0_6px\\]{margin:12px 0 6px}.m-\\[20px_0_10px\\]{margin:20px 0 10px}.mx-\\[4px\\]{margin-left:4px;margin-right:4px}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.ml-\\[12px\\]{margin-left:12px}.mr-2{margin-right:.5rem}.mr-\\[12px\\]{margin-right:12px}.mt-4{margin-top:1rem}.mt-\\[4px\\]{margin-top:4px}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.h-4{height:1rem}.h-\\[28px\\]{height:28px}.h-\\[32px\\]{height:32px}.h-\\[40px\\]{height:40px}.h-\\[48px\\]{height:48px}.h-full{height:100%}.max-h-\\[420px\\]{max-height:420px}.max-h-\\[50\\%\\]{max-height:50%}.w-4{width:1rem}.w-\\[15px\\]{width:15px}.w-\\[6px\\]{width:6px}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\\[540px\\]{min-width:540px}.max-w-\\[300px\\]{max-width:300px}.max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.flex-shrink-0{flex-shrink:0}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-none{border-style:none}.border-\\[rgba\\(255\\2c 255\\2c 255\\2c 0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.bg-\\[hsla\\(45\\2c 13\\%\\2c 94\\%\\2c \\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.bg-\\[rgb\\(35\\2c 131\\2c 226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.bg-\\[rgba\\(15\\2c 15\\2c 15\\2c 0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.bg-inherit{background-color:inherit}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.fill-white{fill:#fff}.p-\\[0_8px\\]{padding:0 8px}.p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-\\[12px\\]{padding-left:12px;padding-right:12px}.px-\\[6px\\]{padding-left:6px;padding-right:6px}.px-\\[8px\\]{padding-left:8px;padding-right:8px}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-\\[6px\\]{padding-top:6px}.pb-\\[6px\\],.py-\\[6px\\]{padding-bottom:6px}.pt-\\[6px\\]{padding-top:6px}.text-left{text-align:left}.text-\\[14px\\]{font-size:14px}.font-medium{font-weight:500}.leading-\\[1\\.2\\]{line-height:1.2}.leading-\\[120\\%\\]{line-height:120%}.leading-\\[20px\\]{line-height:20px}.text-\\[rgb\\(55\\2c 53\\2c 47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.text-\\[rgba\\(55\\2c 53\\2c 47\\2c 0\\.65\\)\\]{color:rgba(55,53,47,.65)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.opacity-100{opacity:1}.shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color)}.shadow-\\[0_0_0_\\.5px_\\#FFF\\],.shadow-\\[inset_0_0_0_1px_hsla\\(0\\2c 0\\%\\2c 6\\%\\2c \\.1\\)\\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_hsla\\(0\\2c 0\\%\\2c 6\\%\\2c \\.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)}.shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\2c _rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\2c _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)}.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)}.shadow-\\[rgba\\(15\\2c 15\\2c 15\\2c 0\\.1\\)_0px_0px_0px_1px_inset\\2c _rgba\\(15\\2c 15\\2c 15\\2c 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)}.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)}.transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-opacity{transition-duration:.15s}.duration-300{transition-duration:.3s}.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\\:bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{ii as default};
6
+ var te=["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(","),ee="undefined"==typeof Element,ie=ee?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ne=!ee&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},oe=function t(e,i){var n;void 0===i&&(i=!0);var o=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===o||"true"===o||i&&e&&t(e.parentNode)},re=function t(e,i,n){for(var o=[],r=Array.from(e);r.length;){var s=r.shift();if(!oe(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=t(a.length?a:s.children,!0,n);n.flatten?o.push.apply(o,l):o.push({scopeParent:s,candidates:l})}else{ie.call(s,te)&&n.filter(s)&&(i||!e.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(s),d=!oe(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(c&&d){var u=t(!0===c?s.children:c.children,!0,n);n.flatten?o.push.apply(o,u):o.push({scopeParent:s,candidates:u})}else r.unshift.apply(r,s.children)}}return o},se=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ae=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,i=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===i||"true"===i}(t))&&!se(t)?0:t.tabIndex},le=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},ce=function(t){return"INPUT"===t.tagName},de=function(t){return function(t){return ce(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,i=t.form||ne(t),n=function(t){return i.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=n(window.CSS.escape(t.name));else try{e=n(t.name)}catch(t){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",t.message),!1}var o=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]}(e,t.form);return!o||o===t}(t)},ue=function(t){var e=t.getBoundingClientRect(),i=e.width,n=e.height;return 0===i&&0===n},he=function(t,e){var i=e.displayCheck,n=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var o=ie.call(t,"details>summary:first-of-type")?t.parentElement:t;if(ie.call(o,"details:not([open]) *"))return!0;if(i&&"full"!==i&&"legacy-full"!==i){if("non-zero-area"===i)return ue(t)}else{if("function"==typeof n){for(var r=t;t;){var s=t.parentElement,a=ne(t);if(s&&!s.shadowRoot&&!0===n(s))return ue(t);t=t.assignedSlot?t.assignedSlot:s||a===t.ownerDocument?s:a.host}t=r}if(function(t){var e,i,n,o,r=t&&ne(t),s=null===(e=r)||void 0===e?void 0:e.host,a=!1;if(r&&r!==t)for(a=!!(null!==(i=s)&&void 0!==i&&null!==(n=i.ownerDocument)&&void 0!==n&&n.contains(s)||null!=t&&null!==(o=t.ownerDocument)&&void 0!==o&&o.contains(t));!a&&s;){var l,c,d;a=!(null===(c=s=null===(l=r=ne(s))||void 0===l?void 0:l.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(s))}return a}(t))return!t.getClientRects().length;if("legacy-full"!==i)return!0}return!1},pe=function(t,e){return!(e.disabled||oe(e)||function(t){return ce(t)&&"hidden"===t.type}(e)||he(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var i=0;i<e.children.length;i++){var n=e.children.item(i);if("LEGEND"===n.tagName)return!!ie.call(e,"fieldset[disabled] *")||!n.contains(t)}return!0}e=e.parentElement}return!1}(e))},fe=function(t,e){return!(de(e)||ae(e)<0||!pe(t,e))},ge=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},me=function t(e){var i=[],n=[];return e.forEach((function(e,o){var r=!!e.scopeParent,s=r?e.scopeParent:e,a=function(t,e){var i=ae(t);return i<0&&e&&!se(t)?0:i}(s,r),l=r?t(e.candidates):s;0===a?r?i.push.apply(i,l):i.push(s):n.push({documentOrder:o,tabIndex:a,item:e,isScope:r,content:l})})),n.sort(le).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(i)},we=function(t,e){var i;return i=(e=e||{}).getShadowRoot?re([t],e.includeContainer,{filter:fe.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:ge}):function(t,e,i){if(oe(t))return[];var n=Array.prototype.slice.apply(t.querySelectorAll(te));return e&&ie.call(t,te)&&n.unshift(t),n.filter(i)}(t,e.includeContainer,fe.bind(null,e)),me(i)};const be=d["useInsertionEffect".toString()]||(t=>t());var xe="undefined"!=typeof document?f:h;function ve(){return ve=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},ve.apply(this,arguments)}let ye=!1,ze=0;const Re=()=>"floating-ui-"+ze++;const Se=d["useId".toString()]||function(){const[t,e]=d.useState((()=>ye?Re():void 0));return xe((()=>{null==t&&e(Re())}),[]),d.useEffect((()=>{ye||(ye=!0)}),[]),t};const _e=d.createContext(null),Ee=d.createContext(null);function Ce(t){return"data-floating-ui-"+t}const ke=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oe(t,e){const i=we(t,ke());"prev"===e&&i.reverse();const n=i.indexOf(function(t){let e=t.activeElement;for(;null!=(null==(i=e)||null==(i=i.shadowRoot)?void 0:i.activeElement);){var i;e=e.shadowRoot.activeElement}return e}((null==(o=t)?void 0:o.ownerDocument)||document));var o;return i.slice(n+1)[0]}function Ne(t,e){const i=e||t.currentTarget,n=t.relatedTarget;return!n||!function(t,e){if(!t||!e)return!1;const i=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(i&&J(i)){let i=e;for(;i;){if(t===i)return!0;i=i.parentNode||i.host}}return!1}(i,n)}function Le(t){we(t,ke()).forEach((t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}))}function Me(t){t.querySelectorAll("[data-tabindex]").forEach((t=>{const e=t.dataset.tabindex;delete t.dataset.tabindex,e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")}))}const We={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 Ae(t){"Tab"===t.key&&(t.target,clearTimeout(undefined))}const Te=d.forwardRef((function(t,e){const[i,n]=d.useState();xe((()=>(/apple/i.test(navigator.vendor)&&n("button"),document.addEventListener("keydown",Ae),()=>{document.removeEventListener("keydown",Ae)})),[]);const o={ref:e,tabIndex:0,role:i,"aria-hidden":!i||void 0,[Ce("focus-guard")]:"",style:We};return d.createElement("span",ve({},t,o))})),je=d.createContext(null),Be=Ce("portal");function Ie(t){let{children:e,id:i,root:n=null,preserveTabOrder:o=!0}=t;const r=function(t){let{id:e,root:i}=void 0===t?{}:t;const[n,o]=d.useState(null),r=Se(),s=Pe(),a=d.useRef(null);return xe((()=>()=>{null==n||n.remove(),queueMicrotask((()=>{a.current=null}))}),[n]),xe((()=>{if(a.current)return;const t=e?document.getElementById(e):null;if(!t)return;const i=document.createElement("div");i.id=r,i.setAttribute(Be,""),t.appendChild(i),a.current=i,o(i)}),[e,r]),xe((()=>{if(a.current)return;let t=i||(null==s?void 0:s.portalNode);t&&!Z(t)&&(t=t.current),t=t||document.body;let n=null;e&&(n=document.createElement("div"),n.id=e,t.appendChild(n));const l=document.createElement("div");l.id=r,l.setAttribute(Be,""),t=n||t,t.appendChild(l),a.current=l,o(l)}),[e,i,r,s]),n}({id:i,root:n}),[s,a]=d.useState(null),l=d.useRef(null),c=d.useRef(null),u=d.useRef(null),h=d.useRef(null),p=!!s&&!s.modal&&s.open&&o&&!(!n&&!r);return d.useEffect((()=>{if(r&&o&&(null==s||!s.modal))return r.addEventListener("focusin",t,!0),r.addEventListener("focusout",t,!0),()=>{r.removeEventListener("focusin",t,!0),r.removeEventListener("focusout",t,!0)};function t(t){if(r&&Ne(t)){("focusin"===t.type?Me:Le)(r)}}}),[r,o,null==s?void 0:s.modal]),d.createElement(je.Provider,{value:d.useMemo((()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:h,portalNode:r,setFocusManagerState:a})),[o,r])},p&&r&&d.createElement(Te,{"data-type":"outside",ref:l,onFocus:t=>{if(Ne(t,r)){var e;null==(e=u.current)||e.focus()}else{const t=Oe(document.body,"prev")||(null==s?void 0:s.refs.domReference.current);null==t||t.focus()}}}),p&&r&&d.createElement("span",{"aria-owns":r.id,style:We}),r&&v(e,r),p&&r&&d.createElement(Te,{"data-type":"outside",ref:c,onFocus:t=>{if(Ne(t,r)){var e;null==(e=h.current)||e.focus()}else{const e=Oe(document.body,"next")||(null==s?void 0:s.refs.domReference.current);null==e||e.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,t.nativeEvent))}}}))}const Pe=()=>d.useContext(je),He=new Set,Fe=d.forwardRef((function(t,e){let{lockScroll:i=!1,...n}=t;const o=Se();return xe((()=>{if(!i)return;He.add(o);const t=/iP(hone|ad|od)|iOS/.test(function(){const t=navigator.userAgentData;return null!=t&&t.platform?t.platform:navigator.platform}()),e=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=e.left?parseFloat(e.left):window.pageXOffset,a=e.top?parseFloat(e.top):window.pageYOffset;if(e.overflow="hidden",r&&(e[n]=r+"px"),t){var l,c;const t=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,i=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(e,{position:"fixed",top:-(a-Math.floor(i))+"px",left:-(s-Math.floor(t))+"px",right:"0"})}return()=>{He.delete(o),0===He.size&&(Object.assign(e,{overflow:"",[n]:""}),t&&(Object.assign(e,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a)))}}),[o,i]),d.createElement("div",ve({ref:e},n,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...n.style}}))}));function De(t){var e;void 0===t&&(t={});const{open:i=!1,onOpenChange:n,nodeId:o}=t,[r,s]=d.useState(null),a=(null==(e=t.elements)?void 0:e.reference)||r,l=function(t){void 0===t&&(t={});const{placement:e="bottom",strategy:i="absolute",middleware:n=[],platform:o,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,h]=d.useState({x:0,y:0,strategy:i,placement:e,middlewareData:{},isPositioned:!1}),[p,f]=d.useState(n);qt(p,n)||f(n);const[g,m]=d.useState(null),[w,x]=d.useState(null),v=d.useCallback((t=>{t!==S.current&&(S.current=t,m(t))}),[]),y=d.useCallback((t=>{t!==_.current&&(_.current=t,x(t))}),[]),z=r||g,R=s||w,S=d.useRef(null),_=d.useRef(null),E=d.useRef(u),C=null!=l,k=Qt(l),O=Qt(o),N=d.useCallback((()=>{if(!S.current||!_.current)return;const t={placement:e,strategy:i,middleware:p};O.current&&(t.platform=O.current),Gt(S.current,_.current,t).then((t=>{const e={...t,isPositioned:!0};L.current&&!qt(E.current,e)&&(E.current=e,b.flushSync((()=>{h(e)})))}))}),[p,e,i,O]);Zt((()=>{!1===c&&E.current.isPositioned&&(E.current.isPositioned=!1,h((t=>({...t,isPositioned:!1}))))}),[c]);const L=d.useRef(!1);Zt((()=>(L.current=!0,()=>{L.current=!1})),[]),Zt((()=>{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=d.useMemo((()=>({reference:S,floating:_,setReference:v,setFloating:y})),[v,y]),W=d.useMemo((()=>({reference:z,floating:R})),[z,R]),A=d.useMemo((()=>{const t={position:i,left:0,top:0};if(!W.floating)return t;const e=Kt(W.floating,u.x),n=Kt(W.floating,u.y);return a?{...t,transform:"translate("+e+"px, "+n+"px)",...Jt(W.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:e,top:n}}),[i,a,W.floating,u.x,u.y]);return d.useMemo((()=>({...u,update:N,refs:M,elements:W,floatingStyles:A})),[u,N,M,W,A])}(t),c=d.useContext(Ee),u=null!=((null==(h=d.useContext(_e))?void 0:h.id)||null);var h;const p=function(t){const e=d.useRef((()=>{}));return be((()=>{e.current=t})),d.useCallback((function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return null==e.current?void 0:e.current(...i)}),[])}(((t,e,i)=>{t&&(g.current.openEvent=e),m.emit("openchange",{open:t,event:e,reason:i,nested:u}),null==n||n(t,e,i)})),f=d.useRef(null),g=d.useRef({}),m=d.useState((()=>function(){const t=new Map;return{emit(e,i){var n;null==(n=t.get(e))||n.forEach((t=>t(i)))},on(e,i){t.set(e,[...t.get(e)||[],i])},off(e,i){var n;t.set(e,(null==(n=t.get(e))?void 0:n.filter((t=>t!==i)))||[])}}}()))[0],w=Se(),x=d.useCallback((t=>{const e=Z(t)?{getBoundingClientRect:()=>t.getBoundingClientRect(),contextElement:t}:t;l.refs.setReference(e)}),[l.refs]),v=d.useCallback((t=>{(Z(t)||null===t)&&(f.current=t,s(t)),(Z(l.refs.reference.current)||null===l.refs.reference.current||null!==t&&!Z(t))&&l.refs.setReference(t)}),[l.refs]),y=d.useMemo((()=>({...l.refs,setReference:v,setPositionReference:x,domReference:f})),[l.refs,v,x]),z=d.useMemo((()=>({...l.elements,domReference:a})),[l.elements,a]),R=d.useMemo((()=>({...l,refs:y,elements:z,dataRef:g,nodeId:o,floatingId:w,events:m,open:i,onOpenChange:p})),[l,o,w,m,i,p,y,z]);return xe((()=>{const t=null==c?void 0:c.nodesRef.current.find((t=>t.id===o));t&&(t.context=R)})),d.useMemo((()=>({...l,context:R,refs:y,elements:z})),[l,y,z,R])}function Ve(t,e){if(null==t)return{};var i,n,o={},r=Object.keys(t);for(n=0;n<r.length;n++)i=r[n],e.indexOf(i)>=0||(o[i]=t[i]);return o}var Ue=["color"],$e=g((function(t,e){var i=t.color,n=void 0===i?"currentColor":i,o=Ve(t,Ue);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:e}),m("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:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Xe=["color"],Ye=g((function(t,e){var i=t.color,n=void 0===i?"currentColor":i,o=Ve(t,Xe);return m("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:e}),m("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:n,fillRule:"evenodd",clipRule:"evenodd"}))}));const Ge={youtube:t=>{const e=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return e&&11===e[2].length?e[2]:null},vimeo:t=>new URL(t).pathname.split("/")[1],dailymotion:t=>{const e=t.match(/^.+dailymotion.com\/(embed|hub)\/([^_]+)[^#]*(#embed=([^_&]+))?/);return null!==e?void 0!==e[4]?e[4]:e[2]:null},twitter:function(t){const e=t.match(/\/status\/(\d+)/);return e?e[1]:null},figma:function(t){const e=new URL(t).searchParams,i=e.get("node-id");return e.get("node-id")?i:"unknown"}},Ze=({blockId:e,onClose:i})=>{const n=t(),[o,r]=u(""),s=0===o.length;return l("div",Object.assign({className:"cursor-pointer user-select-none transition-bg duration-20 ease-in white-space-nowrap w-full"},{children:[c("input",{type:"text",placeholder:"Paste embed link",value:o,className:"items-center bg-[hsla(45,13%,94%,.6)] rounded-[4px] shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] cursor-text flex text-[14px] h-[32px] leading-[20px] px-[6px] relative w-full border-none",onChange:t=>r(t.target.value)}),c("button",Object.assign({type:"button",className:"user-select-none transition-bg duration-20 ease-in cursor-pointer flex items-center justify-center flex-shrink-0 white-space-nowrap h-[28px] rounded-[4px] shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] bg-[rgb(35,131,226)] text-white fill-white leading-[1.2] px-[12px] text-[14px] font-medium w-full max-w-[300px] mx-auto m-[12px_0_6px] disabled:bg-[rgba(35,131,226,0.5)] disabled:cursor-not-allowed",disabled:s,onClick:()=>{var t;if(0===o.length)return;const r=(s=o).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===(t=Ge[r])||void 0===t?void 0:t.call(Ge,o):null,l={type:r,id:a,url:o};r&&a||(l.id=o),n.blocks.Embed.updateElement(e,"embed",{provider:l}),i()}},{children:"Embed embed"}))]}))},qe=({floatingStyles:t,refs:e,onClose:i,blockId:n})=>c(Ie,Object.assign({root:document.getElementById("yoopta-editor")},{children:c(Fe,Object.assign({lockScroll:!0,className:"z-[100]",onClick:i},{children:c("div",Object.assign({ref:e.setFloating,style:t,onClick:t=>t.stopPropagation()},{children:l("div",Object.assign({className:"flex flex-col min-w-[540px] max-w-[calc(100vw-24px)] h-full max-h-[420px] bg-white 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:[c("div",Object.assign({className:"w-full flex text-[14px] p-[0_8px] shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] relative z-10 h-[40px]"},{children:c("button",Object.assign({type:"button",style:{borderBottom:"2px solid #2483e2"},className:"py-[6px] whitespace-nowrap min-w-0 flex-shrink-0 text-[rgb(55,53,47)] relative cursor-pointer user-select-none bg-inherit transition-[height_20ms_ease-in] inline-flex items-center h-full text-[14px] leading-[1.2] px-[8px]"},{children:"Embed link"}))})),c("div",Object.assign({className:"pt-[6px] pb-[6px] mt-[4px] flex justify-center mr-[12px] ml-[12px]"},{children:c(Ze,{onClose:i,blockId:n})}))]}))}))}))})),Je=({attributes:t,children:e,blockId:i})=>{const[n,o]=u(!1),{refs:r,floatingStyles:s}=De({placement:"bottom",open:n,onOpenChange:o,middleware:[Yt(),Xt(),$t(),Ot(10)]});return l("div",Object.assign({className:"w-full user-select-none m-[20px_0_10px] relative flex"},t,{contentEditable:!1},{children:[l("button",Object.assign({className:"p-[12px_36px_12px_12px] flex items-center text-left w-full overflow-hidden rounded-[3px] text-[14px] text-[rgba(55,53,47,0.65)] relative cursor-pointer border-none bg-[#efefef] transition-[background-color_100ms_ease-in] hover:bg-[#e3e3e3]",onClick:()=>o(!0),ref:r.setReference},{children:[c($e,{className:"mr-2 user-select-none",width:24,height:24}),c("span",Object.assign({className:"font-medium"},{children:"Click to add embed"}))]})),n&&c(qe,{blockId:i,floatingStyles:s,refs:r,onClose:()=>o(!1)}),e]}))},{ExtendedBlockActions:Ke,BlockOptionsMenuGroup:Qe,BlockOptionsMenuItem:ti,BlockOptionsSeparator:ei}=e,ii=({editor:t,block:e,props:i})=>l(Ke,Object.assign({onClick:()=>t.setSelection([e.meta.order])},{children:[c(ei,{}),c(Qe,{children:c(ti,{children:l("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>{var t;window.open(null===(t=null==i?void 0:i.provider)||void 0===t?void 0:t.url,"_blank")}},{children:[c(Ye,{width:16,height:16,className:"w-4 h-4 mr-2"}),"Open"]}))})})]})),ni=({position:t})=>c("div",Object.assign({contentEditable:!1,className:"absolute pointer-events-none flex items-center justify-center z-10 opacity-1 h-full w-[15px] cursor-col-resize transition-opacity duration-150 ease-in "+("left"===t?"left-0 top-0":"right-0 top-0")},{children:c("div",{className:"opacity-100 transition-opacity duration-300 ease-in rounded-[20px] bg-[rgba(15,15,15,0.6)] border border-[rgba(255,255,255,0.9)] w-[6px] h-[48px] max-h-[50%] shadow-[0_0_0_.5px_#FFF]"})})),oi=new s({type:"Embed",elements:{embed:{render:({element:e,attributes:s,children:a,blockId:d})=>{const{sizes:p,provider:f}=e.props||{},g=i(d),m=t(),b=n("Embed"),x=o(),[v,y]=u({width:(null==p?void 0:p.width)||750,height:(null==p?void 0:p.height)||440});h((()=>y({width:(null==p?void 0:p.width)||650,height:(null==p?void 0:p.height)||440})),[e.props]);const z=r({blockId:d}),S=w((()=>{var t,e;return{minWidth:300,size:{width:v.width,height:v.height},maxWidth:(null===(t=null==b?void 0:b.maxSizes)||void 0===t?void 0:t.maxWidth)||800,maxHeight:(null===(e=null==b?void 0:b.maxSizes)||void 0===e?void 0:e.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!x,right:!x},handleStyles:{left:{left:0},right:{right:0}},onResize:(t,e,i)=>{y({width:i.offsetWidth,height:i.offsetHeight})},onResizeStop:(t,e,i)=>{m.blocks.Embed.updateElement(d,"embed",{sizes:{width:i.offsetWidth,height:i.offsetHeight}})},handleComponent:{left:c(ni,{position:"left"}),right:c(ni,{position:"right"})}}}),[v.width,v.height]);return f&&(null==f?void 0:f.id)?c("div",Object.assign({"data-element-type":e.type,contentEditable:!1,draggable:!1,className:"mt-4 relative yoopta-embed"},s,{children:l(U,Object.assign({},S,{className:"mx-auto my-0 flex"},{children:[z&&c("div",{className:"absolute pointer-events-none inset-0 bg-[rgba(35,131,226,0.14)] z-[81] rounded-[3px] opacity-100 transition-opacity duration-150 ease-in"}),c(R,{width:null==v?void 0:v.width,height:null==v?void 0:v.height,provider:f,blockId:d}),!x&&c(ii,{block:g,editor:m,props:e.props}),a]}))})):c(Je,Object.assign({attributes:s,blockId:d},{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:t=>{if("IFRAME"===t.nodeName){const e=new URL(t.getAttribute("src")||"");return{id:a(),type:"embed",children:[{text:""}],props:{provider:{id:e.href,type:e.hostname,url:e.href},sizes:{width:t.getAttribute("width")?parseInt(t.getAttribute("width")||"650",10):650,height:t.getAttribute("height")?parseInt(t.getAttribute("height")||"400",10):400}}}}}}}}});!function(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}(".pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-10{z-index:10}.z-\\[100\\]{z-index:100}.z-\\[81\\]{z-index:81}.m-\\[12px_0_6px\\]{margin:12px 0 6px}.m-\\[20px_0_10px\\]{margin:20px 0 10px}.mx-\\[4px\\]{margin-left:4px;margin-right:4px}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-bottom:0;margin-top:0}.ml-\\[12px\\]{margin-left:12px}.mr-2{margin-right:.5rem}.mr-\\[12px\\]{margin-right:12px}.mt-4{margin-top:1rem}.mt-\\[4px\\]{margin-top:4px}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.h-4{height:1rem}.h-\\[28px\\]{height:28px}.h-\\[32px\\]{height:32px}.h-\\[40px\\]{height:40px}.h-\\[48px\\]{height:48px}.h-full{height:100%}.max-h-\\[420px\\]{max-height:420px}.max-h-\\[50\\%\\]{max-height:50%}.w-4{width:1rem}.w-\\[15px\\]{width:15px}.w-\\[6px\\]{width:6px}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\\[540px\\]{min-width:540px}.max-w-\\[300px\\]{max-width:300px}.max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.flex-shrink-0{flex-shrink:0}.cursor-col-resize{cursor:col-resize}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-none{border-style:none}.border-\\[rgba\\(255\\2c 255\\2c 255\\2c 0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.bg-\\[hsla\\(45\\2c 13\\%\\2c 94\\%\\2c \\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.bg-\\[rgb\\(35\\2c 131\\2c 226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.bg-\\[rgba\\(15\\2c 15\\2c 15\\2c 0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.bg-inherit{background-color:inherit}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.fill-white{fill:#fff}.p-\\[0_8px\\]{padding:0 8px}.p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-\\[12px\\]{padding-left:12px;padding-right:12px}.px-\\[6px\\]{padding-left:6px;padding-right:6px}.px-\\[8px\\]{padding-left:8px;padding-right:8px}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-\\[6px\\]{padding-top:6px}.pb-\\[6px\\],.py-\\[6px\\]{padding-bottom:6px}.pt-\\[6px\\]{padding-top:6px}.text-left{text-align:left}.text-\\[14px\\]{font-size:14px}.font-medium{font-weight:500}.leading-\\[1\\.2\\]{line-height:1.2}.leading-\\[120\\%\\]{line-height:120%}.leading-\\[20px\\]{line-height:20px}.text-\\[rgb\\(55\\2c 53\\2c 47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.text-\\[rgba\\(55\\2c 53\\2c 47\\2c 0\\.65\\)\\]{color:rgba(55,53,47,.65)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.opacity-100{opacity:1}.shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color)}.shadow-\\[0_0_0_\\.5px_\\#FFF\\],.shadow-\\[inset_0_0_0_1px_hsla\\(0\\2c 0\\%\\2c 6\\%\\2c \\.1\\)\\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_hsla\\(0\\2c 0\\%\\2c 6\\%\\2c \\.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)}.shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\2c _rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\2c _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)}.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)}.shadow-\\[rgba\\(15\\2c 15\\2c 15\\2c 0\\.1\\)_0px_0px_0px_1px_inset\\2c _rgba\\(15\\2c 15\\2c 15\\2c 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)}.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)}.transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-opacity{transition-duration:.15s}.duration-300{transition-duration:.3s}.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\\:bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{oi as default};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAuB,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGtF,QAAA,MAAM,KAAK,8DAqBT,CAAC;AAEH,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAuB,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGtF,QAAA,MAAM,KAAK,8DA+CT,CAAC;AAEH,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Embed.d.ts","sourceRoot":"","sources":["../../src/ui/Embed.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,WAAW,8FAiFhB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"Embed.d.ts","sourceRoot":"","sources":["../../src/ui/Embed.tsx"],"names":[],"mappings":"AAgBA,QAAA,MAAM,WAAW,8FAiFhB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/embed",
3
- "version": "4.0.0-rc.5",
3
+ "version": "4.0.0-rc.7",
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": "7e5c32bd4c48dd21d84359a3fe87ed82cdaf964f"
42
+ "gitHead": "f5e7f29c79b383ea691a66682a44fc5a438516a2"
43
43
  }