@yoopta/video 4.0.0-rc.7 → 4.0.0-rc.9

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.es.js CHANGED
@@ -1,6 +1,6 @@
1
- import{useYooptaEditor as e,useYooptaPluginOptions as t,UI as i,useBlockData as n,useYooptaReadOnly as o,useBlockSelected as r,YooptaPlugin as s,generateId as l}from"@yoopta/editor";import{jsxs as a,jsx as c}from"react/jsx-runtime";import*as u from"react";import{useState as d,useEffect as h,useRef as p,useLayoutEffect as f,forwardRef as g,createElement as m,useMemo as v}from"react";import*as w from"react-dom";import{flushSync as y,createPortal as b}from"react-dom";function x(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i}function C(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{a(n.next(e))}catch(e){r(e)}}function l(e){try{a(n.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,l)}a((n=n.apply(e,t||[])).next())}))}function S(e,{threshold:t=0,root:i=null,rootMargin:n="0%",freezeOnceVisible:o=!1}={}){const[r,s]=d({}),l=r.isIntersecting&&o,a=([e])=>s(e);return h((()=>{const o=null==e?void 0:e.current;if(!window.IntersectionObserver||l||!o)return;const r=new IntersectionObserver(a,{threshold:t,root:i,rootMargin:n});return r.observe(o),()=>r.disconnect()}),[e,t,i,n,l]),r}"function"==typeof SuppressedError&&SuppressedError;const R={vimeo:function(e){var{videoId:t}=e,i=x(e,["videoId"]);const n=p(null),[o,r]=d(null),[s,l]=d(!1),{isIntersecting:u}=S(n,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{fetch(`https://vimeo.com/api/v2/video/${t}.json`).then((e=>e.json())).then((e=>r(e[0].thumbnail_medium))).catch((()=>r(null)))}),[t]),a("div",Object.assign({ref:n,className:"yoo-video-relative"},{children:[c("img",{src:o||"",alt:"vimeo_video_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:u&&s?0:1,zIndex:u&&s?-1:0}}),u&&c("iframe",Object.assign({title:"Video Player",src:`https://player.vimeo.com/video/${t}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>l(!0),className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},i))]}))},youtube:function(e){var{videoId:t}=e,i=x(e,["videoId"]);const n=p(null),[o,r]=d(!1),{isIntersecting:s}=S(n,{freezeOnceVisible:!0,rootMargin:"50%"});return a("div",Object.assign({ref:n,className:"yoo-video-relative"},{children:[c("img",{src:`https://i.ytimg.com/vi/${t}/default.jpg`,alt:"youtube_video_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:s&&o?0:1,zIndex:s&&o?-1:0}}),s&&c("iframe",Object.assign({title:"Video Player",src:`https://www.youtube.com/embed/${t}`,frameBorder:0,onLoad:()=>r(!0),allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},i))]}))},dailymotion:function(e){var{videoId:t}=e,i=x(e,["videoId"]);const n=p(null),[o,r]=d(null),[s,l]=d(!1),{isIntersecting:u}=S(n,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{fetch((e=>`https://api.dailymotion.com/video/${e}?fields=thumbnail_url`)(t)).then((e=>e.json())).then((e=>r(e.thumbnail_url))).catch((()=>r(null)))}),[t]),a("div",Object.assign({ref:n,className:"yoo-video-relative"},{children:[c("img",{src:o||"",alt:"daylimotion_video_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:u&&s?0:1,zIndex:u&&s?-1:0}}),u&&c("iframe",Object.assign({title:"Dailymotion Video Player",frameBorder:0,onLoad:()=>l(!0),src:`https://www.dailymotion.com/embed/video/${t}`,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},i))]}))}},z=({width:e,height:t,src:i,settings:n,bgColor:o,poster:r,provider:s,fit:l})=>{const a={backgroundColor:o||"transparent",objectFit:l||"contain"};if(s&&s.id&&s.type&&R[s.type]){const i=R[s.type];return c(i,{videoId:s.id,width:e,height:t})}return c("div",Object.assign({className:"w-full"},{children:i&&c("video",{preload:"metadata",poster:r,src:i,width:e,height:t,onDragStart:e=>e.preventDefault(),className:"object-cover w-full h-full",style:a,playsInline:!0,controls:!0})}))};var E,O=(E=function(e,t){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},E(e,t)},function(e,t){function i(){this.constructor=e}E(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),N=function(){return N=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},N.apply(this,arguments)},L={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},k={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},_={width:"20px",height:"20px",position:"absolute"},j={top:N(N({},L),{top:"-5px"}),right:N(N({},k),{left:void 0,right:"-5px"}),bottom:N(N({},L),{top:void 0,bottom:"-5px"}),left:N(N({},k),{left:"-5px"}),topRight:N(N({},_),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:N(N({},_),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:N(N({},_),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:N(N({},_),{left:"-10px",top:"-10px",cursor:"nw-resize"})},M=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return O(t,e),t.prototype.render=function(){return u.createElement("div",{className:this.props.className||"",style:N(N({position:"absolute",userSelect:"none"},j[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(u.PureComponent),W=function(){var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},e(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),A=function(){return A=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},A.apply(this,arguments)},T={width:"auto",height:"auto"},B=function(e,t,i){return Math.max(Math.min(e,i),t)},P=function(e,t){return Math.round(e/t)*t},I=function(e,t){return new RegExp(e,"i").test(t)},D=function(e){return Boolean(e.touches&&e.touches.length)},H=function(e,t,i){void 0===i&&(i=0);var n=t.reduce((function(i,n,o){return Math.abs(n-e)<Math.abs(t[i]-e)?o:i}),0),o=Math.abs(t[n]-e);return 0===i||o<i?t[n]:e},V=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},F=function(e,t,i,n){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return i*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return n*(Number(e.replace("vh",""))/100)}return e},U=["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"],$="__resizable_base__",Y=function(e){function t(t){var i=e.call(this,t)||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 e=i.parentNode;if(!e)return null;var t=i.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add($):t.className+=$,e.appendChild(t),t},i.removeBase=function(e){var t=i.parentNode;t&&t.removeChild(e)},i.ref=function(e){e&&(i.resizable=e)},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 W(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||T},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=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"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:i,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:n,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,i=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var i=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/i[t]*100+"%"}return V(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?V(t.width):i("width"),height:t&&void 0!==t.height&&!this.state.isResizing?V(t.height):i("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,i=this.parentNode.style.flexWrap;"wrap"!==i&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var n={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=i),this.removeBase(e),n},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var i=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==i&&"auto"!==i?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var i,n,o=this.props.boundsByDirection,r=this.state.direction,s=o&&I("left",r),l=o&&I("top",r);if("parent"===this.props.bounds){var a=this.parentNode;a&&(i=s?this.resizableRight-this.parentLeft:a.offsetWidth+(this.parentLeft-this.resizableLeft),n=l?this.resizableBottom-this.parentTop:a.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(i=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,n=l?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=l?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return i&&Number.isFinite(i)&&(e=e&&e<i?e:i),n&&Number.isFinite(n)&&(t=t&&t<n?t:n),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var i=this.props.scale||1,n=this.props.resizeRatio||1,o=this.state,r=o.direction,s=o.original,l=this.props,a=l.lockAspectRatio,c=l.lockAspectRatioExtraHeight,u=l.lockAspectRatioExtraWidth,d=s.width,h=s.height,p=c||0,f=u||0;return I("right",r)&&(d=s.width+(e-s.x)*n/i,a&&(h=(d-f)/this.ratio+p)),I("left",r)&&(d=s.width-(e-s.x)*n/i,a&&(h=(d-f)/this.ratio+p)),I("bottom",r)&&(h=s.height+(t-s.y)*n/i,a&&(d=(h-p)*this.ratio+f)),I("top",r)&&(h=s.height-(t-s.y)*n/i,a&&(d=(h-p)*this.ratio+f)),{newWidth:d,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,i,n){var o=this.props,r=o.lockAspectRatio,s=o.lockAspectRatioExtraHeight,l=o.lockAspectRatioExtraWidth,a=void 0===n.width?10:n.width,c=void 0===i.width||i.width<0?e:i.width,u=void 0===n.height?10:n.height,d=void 0===i.height||i.height<0?t:i.height,h=s||0,p=l||0;if(r){var f=(u-h)*this.ratio+p,g=(d-h)*this.ratio+p,m=(a-p)/this.ratio+h,v=(c-p)/this.ratio+h,w=Math.max(a,f),y=Math.min(c,g),b=Math.max(u,m),x=Math.min(d,v);e=B(e,w,y),t=B(t,b,x)}else e=B(e,a,c),t=B(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var 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,l=n.bottom;this.resizableLeft=o,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=l}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var i,n=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(n=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&D(e.nativeEvent)&&(n=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var s=this.parentNode;if(s){var l=this.window.getComputedStyle(s).flexDirection;this.flexDir=l.startsWith("row")?"row":"column",i=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var a={original:{x:n,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:A(A({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:i};this.setState(a)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&D(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var i=this.props,n=i.maxWidth,o=i.maxHeight,r=i.minWidth,s=i.minHeight,l=D(e)?e.touches[0].clientX:e.clientX,a=D(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,d=c.original,h=c.width,p=c.height,f=this.getParentSize(),g=function(e,t,i,n,o,r,s){return n=F(n,e.width,t,i),o=F(o,e.height,t,i),r=F(r,e.width,t,i),s=F(s,e.height,t,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(l,a),v=m.newHeight,w=m.newWidth,b=this.calculateNewMaxFromBoundary(n,o);this.props.snap&&this.props.snap.x&&(w=H(w,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(v=H(v,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(w,v,{width:b.maxWidth,height:b.maxHeight},{width:r,height:s});if(w=x.newWidth,v=x.newHeight,this.props.grid){var C=P(w,this.props.grid[0]),S=P(v,this.props.grid[1]),R=this.props.snapGap||0;w=0===R||Math.abs(C-w)<=R?C:w,v=0===R||Math.abs(S-v)<=R?S:v}var z={width:w-d.width,height:v-d.height};if(h&&"string"==typeof h)if(h.endsWith("%"))w=w/f.width*100+"%";else if(h.endsWith("vw")){w=w/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){w=w/this.window.innerHeight*100+"vh"}if(p&&"string"==typeof p)if(p.endsWith("%"))v=v/f.height*100+"%";else if(p.endsWith("vw")){v=v/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){v=v/this.window.innerHeight*100+"vh"}var E={width:this.createSizeForCssProperty(w,"width"),height:this.createSizeForCssProperty(v,"height")};"row"===this.flexDir?E.flexBasis=E.width:"column"===this.flexDir&&(E.flexBasis=E.height),y((function(){t.setState(E)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,z)}},t.prototype.onMouseUp=function(e){var t=this.state,i=t.isResizing,n=t.direction,o=t.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(e,n,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:A(A({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,i=t.enable,n=t.handleStyles,o=t.handleClasses,r=t.handleWrapperStyle,s=t.handleWrapperClass,l=t.handleComponent;if(!i)return null;var a=Object.keys(i).map((function(t){return!1!==i[t]?u.createElement(M,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:n&&n[t],className:o&&o[t]},l&&l[t]?l[t]:null):null}));return u.createElement("div",{className:s,style:r},a)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,i){return-1!==U.indexOf(i)||(t[i]=e.props[i]),t}),{}),i=A(A(A({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 u.createElement(n,A({ref:this.ref,style:i,className:this.props.className},t),this.state.isResizing&&u.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(u.PureComponent);function X(e){return q(e)?(e.nodeName||"").toLowerCase():"#document"}function Z(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function G(e){var t;return null==(t=(q(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function q(e){return e instanceof Node||e instanceof Z(e).Node}function J(e){return e instanceof Element||e instanceof Z(e).Element}function K(e){return e instanceof HTMLElement||e instanceof Z(e).HTMLElement}function Q(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Z(e).ShadowRoot)}function ee(e){const{overflow:t,overflowX:i,overflowY:n,display:o}=re(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+i)&&!["inline","contents"].includes(o)}function te(e){return["table","td","th"].includes(X(e))}function ie(e){const t=ne(),i=re(e);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!t&&!!i.backdropFilter&&"none"!==i.backdropFilter||!t&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((e=>(i.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(i.contain||"").includes(e)))}function ne(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function oe(e){return["html","body","#document"].includes(X(e))}function re(e){return Z(e).getComputedStyle(e)}function se(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function le(e){if("html"===X(e))return e;const t=e.assignedSlot||e.parentNode||Q(e)&&e.host||G(e);return Q(t)?t.host:t}function ae(e){const t=le(e);return oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:K(t)&&ee(t)?t:ae(t)}function ce(e,t,i){var n;void 0===t&&(t=[]),void 0===i&&(i=!0);const o=ae(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),s=Z(o);return r?t.concat(s,s.visualViewport||[],ee(o)?o:[],s.frameElement&&i?ce(s.frameElement):[]):t.concat(o,ce(o,[],i))}const ue=Math.min,de=Math.max,he=Math.round,pe=e=>({x:e,y:e}),fe={left:"right",right:"left",bottom:"top",top:"bottom"},ge={start:"end",end:"start"};function me(e,t,i){return de(e,ue(t,i))}function ve(e,t){return"function"==typeof e?e(t):e}function we(e){return e.split("-")[0]}function ye(e){return e.split("-")[1]}function be(e){return"x"===e?"y":"x"}function xe(e){return"y"===e?"height":"width"}function Ce(e){return["top","bottom"].includes(we(e))?"y":"x"}function Se(e){return be(Ce(e))}function Re(e){return e.replace(/start|end/g,(e=>ge[e]))}function ze(e){return e.replace(/left|right|bottom|top/g,(e=>fe[e]))}function Ee(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Oe(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ne(e,t,i){let{reference:n,floating:o}=e;const r=Ce(t),s=Se(t),l=xe(s),a=we(t),c="y"===r,u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,h=n[l]/2-o[l]/2;let p;switch(a){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(ye(t)){case"start":p[s]-=h*(i&&c?-1:1);break;case"end":p[s]+=h*(i&&c?-1:1)}return p}async function Le(e,t){var i;void 0===t&&(t={});const{x:n,y:o,platform:r,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=ve(t,e),f=Ee(p),g=l[h?"floating"===d?"reference":"floating":d],m=Oe(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(l.floating)),boundary:c,rootBoundary:u,strategy:a})),v="floating"===d?{...s.floating,x:n,y:o}:s.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),y=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},b=Oe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:w,strategy:a}):v);return{top:(m.top-b.top+f.top)/y.y,bottom:(b.bottom-m.bottom+f.bottom)/y.y,left:(m.left-b.left+f.left)/y.x,right:(b.right-m.right+f.right)/y.x}}function ke(e){const t=ue(...e.map((e=>e.left))),i=ue(...e.map((e=>e.top)));return{x:t,y:i,width:de(...e.map((e=>e.right)))-t,height:de(...e.map((e=>e.bottom)))-i}}const _e=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var i,n;const{x:o,y:r,placement:s,middlewareData:l}=t,a=await async function(e,t){const{placement:i,platform:n,elements:o}=e,r=await(null==n.isRTL?void 0:n.isRTL(o.floating)),s=we(i),l=ye(i),a="y"===Ce(i),c=["left","top"].includes(s)?-1:1,u=r&&a?-1:1,d=ve(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof f&&(p="end"===l?-1*f:f),a?{x:p*u,y:h*c}:{x:h*c,y:p*u}}(t,e);return s===(null==(i=l.offset)?void 0:i.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:o+a.x,y:r+a.y,data:{...a,placement:s}}}}};function je(e){const t=re(e);let i=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=K(e),r=o?e.offsetWidth:i,s=o?e.offsetHeight:n,l=he(i)!==r||he(n)!==s;return l&&(i=r,n=s),{width:i,height:n,$:l}}function Me(e){return J(e)?e:e.contextElement}function We(e){const t=Me(e);if(!K(t))return pe(1);const i=t.getBoundingClientRect(),{width:n,height:o,$:r}=je(t);let s=(r?he(i.width):i.width)/n,l=(r?he(i.height):i.height)/o;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const Ae=pe(0);function Te(e){const t=Z(e);return ne()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ae}function Be(e,t,i,n){void 0===t&&(t=!1),void 0===i&&(i=!1);const o=e.getBoundingClientRect(),r=Me(e);let s=pe(1);t&&(n?J(n)&&(s=We(n)):s=We(e));const l=function(e,t,i){return void 0===t&&(t=!1),!(!i||t&&i!==Z(e))&&t}(r,i,n)?Te(r):pe(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(r){const e=Z(r),t=n&&J(n)?Z(n):n;let i=e,o=i.frameElement;for(;o&&n&&t!==i;){const e=We(o),t=o.getBoundingClientRect(),n=re(o),r=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=r,c+=s,i=Z(o),o=i.frameElement}}return Oe({width:u,height:d,x:a,y:c})}const Pe=[":popover-open",":modal"];function Ie(e){return Pe.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function De(e){return Be(G(e)).left+se(e).scrollLeft}function He(e,t,i){let n;if("viewport"===t)n=function(e,t){const i=Z(e),n=G(e),o=i.visualViewport;let r=n.clientWidth,s=n.clientHeight,l=0,a=0;if(o){r=o.width,s=o.height;const e=ne();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,a=o.offsetTop)}return{width:r,height:s,x:l,y:a}}(e,i);else if("document"===t)n=function(e){const t=G(e),i=se(e),n=e.ownerDocument.body,o=de(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=de(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-i.scrollLeft+De(e);const l=-i.scrollTop;return"rtl"===re(n).direction&&(s+=de(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:l}}(G(e));else if(J(t))n=function(e,t){const i=Be(e,!0,"fixed"===t),n=i.top+e.clientTop,o=i.left+e.clientLeft,r=K(e)?We(e):pe(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:o*r.x,y:n*r.y}}(t,i);else{const i=Te(e);n={...t,x:t.x-i.x,y:t.y-i.y}}return Oe(n)}function Ve(e,t){const i=le(e);return!(i===t||!J(i)||oe(i))&&("fixed"===re(i).position||Ve(i,t))}function Fe(e,t,i){const n=K(t),o=G(t),r="fixed"===i,s=Be(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const a=pe(0);if(n||!n&&!r)if(("body"!==X(t)||ee(o))&&(l=se(t)),n){const e=Be(t,!0,r,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=De(o));return{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function Ue(e,t){return K(e)&&"fixed"!==re(e).position?t?t(e):e.offsetParent:null}function $e(e,t){const i=Z(e);if(!K(e)||Ie(e))return i;let n=Ue(e,t);for(;n&&te(n)&&"static"===re(n).position;)n=Ue(n,t);return n&&("html"===X(n)||"body"===X(n)&&"static"===re(n).position&&!ie(n))?i:n||function(e){let t=le(e);for(;K(t)&&!oe(t);){if(ie(t))return t;t=le(t)}return null}(e)||i}const Ye={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:i,offsetParent:n,strategy:o}=e;const r="fixed"===o,s=G(n),l=!!t&&Ie(t.floating);if(n===s||l&&r)return i;let a={scrollLeft:0,scrollTop:0},c=pe(1);const u=pe(0),d=K(n);if((d||!d&&!r)&&(("body"!==X(n)||ee(s))&&(a=se(n)),K(n))){const e=Be(n);c=We(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}return{width:i.width*c.x,height:i.height*c.y,x:i.x*c.x-a.scrollLeft*c.x+u.x,y:i.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:G,getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:n,strategy:o}=e;const r=[..."clippingAncestors"===i?function(e,t){const i=t.get(e);if(i)return i;let n=ce(e,[],!1).filter((e=>J(e)&&"body"!==X(e))),o=null;const r="fixed"===re(e).position;let s=r?le(e):e;for(;J(s)&&!oe(s);){const t=re(s),i=ie(s);i||"fixed"!==t.position||(o=null),(r?!i&&!o:!i&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||ee(s)&&!i&&Ve(e,s))?n=n.filter((e=>e!==s)):o=t,s=le(s)}return t.set(e,n),n}(t,this._c):[].concat(i),n],s=r[0],l=r.reduce(((e,i)=>{const n=He(t,i,o);return e.top=de(n.top,e.top),e.right=ue(n.right,e.right),e.bottom=ue(n.bottom,e.bottom),e.left=de(n.left,e.left),e}),He(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:$e,getElementRects:async function(e){const t=this.getOffsetParent||$e,i=this.getDimensions;return{reference:Fe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await i(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:i}=je(e);return{width:t,height:i}},getScale:We,isElement:J,isRTL:function(e){return"rtl"===re(e).direction}},Xe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:i,y:n,placement:o}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:i}=e;return{x:t,y:i}}},...a}=ve(e,t),c={x:i,y:n},u=await Le(t,a),d=Ce(we(o)),h=be(d);let p=c[h],f=c[d];if(r){const e="y"===h?"bottom":"right";p=me(p+u["y"===h?"top":"left"],p,p-u[e])}if(s){const e="y"===d?"bottom":"right";f=me(f+u["y"===d?"top":"left"],f,f-u[e])}const g=l.fn({...t,[h]:p,[d]:f});return{...g,data:{x:g.x-i,y:g.y-n}}}}},Ze=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var i,n;const{placement:o,middlewareData:r,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=ve(e,t);if(null!=(i=r.arrow)&&i.alignmentOffset)return{};const v=we(o),w=we(l)===l,y=await(null==a.isRTL?void 0:a.isRTL(c.floating)),b=h||(w||!g?[ze(l)]:function(e){const t=ze(e);return[Re(e),t,Re(t)]}(l));h||"none"===f||b.push(...function(e,t,i,n){const o=ye(e);let r=function(e,t,i){const n=["left","right"],o=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return i?t?o:n:t?n:o;case"left":case"right":return t?r:s;default:return[]}}(we(e),"start"===i,n);return o&&(r=r.map((e=>e+"-"+o)),t&&(r=r.concat(r.map(Re)))),r}(l,g,f,y));const x=[l,...b],C=await Le(t,m),S=[];let R=(null==(n=r.flip)?void 0:n.overflows)||[];if(u&&S.push(C[v]),d){const e=function(e,t,i){void 0===i&&(i=!1);const n=ye(e),o=Se(e),r=xe(o);let s="x"===o?n===(i?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=ze(s)),[s,ze(s)]}(o,s,y);S.push(C[e[0]],C[e[1]])}if(R=[...R,{placement:o,overflows:S}],!S.every((e=>e<=0))){var z,E;const e=((null==(z=r.flip)?void 0:z.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:R},reset:{placement:t}};let i=null==(E=R.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!i)switch(p){case"bestFit":{var O;const e=null==(O=R.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(i=e);break}case"initialPlacement":i=l}if(o!==i)return{reset:{placement:i}}}return{}}}},Ge=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:i,elements:n,rects:o,platform:r,strategy:s}=t,{padding:l=2,x:a,y:c}=ve(e,t),u=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(n.reference))||[]),d=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),i=[];let n=null;for(let e=0;e<t.length;e++){const o=t[e];!n||o.y-n.y>n.height/2?i.push([o]):i[i.length-1].push(o),n=o}return i.map((e=>Oe(ke(e))))}(u),h=Oe(ke(u)),p=Ee(l);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===d.length&&d[0].left>d[1].right&&null!=a&&null!=c)return d.find((e=>a>e.left-p.left&&a<e.right+p.right&&c>e.top-p.top&&c<e.bottom+p.bottom))||h;if(d.length>=2){if("y"===Ce(i)){const e=d[0],t=d[d.length-1],n="top"===we(i),o=e.top,r=t.bottom,s=n?e.left:t.left,l=n?e.right:t.right;return{top:o,bottom:r,left:s,right:l,width:l-s,height:r-o,x:s,y:o}}const e="left"===we(i),t=de(...d.map((e=>e.right))),n=ue(...d.map((e=>e.left))),o=d.filter((i=>e?i.left===n:i.right===t)),r=o[0].top,s=o[o.length-1].bottom;return{top:r,bottom:s,left:n,right:t,width:t-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}}:{}}}},qe=(e,t,i)=>{const n=new Map,o={platform:Ye,...i},r={...o.platform,_c:n};return(async(e,t,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:s}=i,l=r.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ne(c,n,a),h=n,p={},f=0;for(let i=0;i<l.length;i++){const{name:r,fn:g}=l[i],{x:m,y:v,data:w,reset:y}=await g({x:u,y:d,initialPlacement:n,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=m?m:u,d=null!=v?v:d,p={...p,[r]:{...p[r],...w}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:u,y:d}=Ne(c,h,a))),i=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:p}})(e,t,{...o,platform:r})};var Je="undefined"!=typeof document?f:h;function Ke(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let i,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(i=e.length,i!==t.length)return!1;for(n=i;0!=n--;)if(!Ke(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),i=o.length,i!==Object.keys(t).length)return!1;for(n=i;0!=n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=i;0!=n--;){const i=o[n];if(("_owner"!==i||!e.$$typeof)&&!Ke(e[i],t[i]))return!1}return!0}return e!=e&&t!=t}function Qe(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function et(e,t){const i=Qe(e);return Math.round(t*i)/i}function tt(e){const t=u.useRef(e);return Je((()=>{t.current=e})),t}
1
+ import{useYooptaEditor as e,useYooptaPluginOptions as t,UI as o,useBlockData as i,useYooptaReadOnly as n,useBlockSelected as r,YooptaPlugin as s,generateId as a}from"@yoopta/editor";import{jsxs as l,jsx as d,Fragment as c}from"react/jsx-runtime";import*as u from"react";import{useState as p,useEffect as h,useRef as f,useLayoutEffect as v,forwardRef as y,createElement as g,useMemo as m}from"react";import*as w from"react-dom";import{flushSync as b,createPortal as x}from"react-dom";function C(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]])}return o}function z(e,t,o,i){return new(o||(o=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))}function S(e,{threshold:t=0,root:o=null,rootMargin:i="0%",freezeOnceVisible:n=!1}={}){const[r,s]=p({}),a=r.isIntersecting&&n,l=([e])=>s(e);return h((()=>{const n=null==e?void 0:e.current;if(!window.IntersectionObserver||a||!n)return;const r=new IntersectionObserver(l,{threshold:t,root:o,rootMargin:i});return r.observe(n),()=>r.disconnect()}),[e,t,o,i,a]),r}"function"==typeof SuppressedError&&SuppressedError;const R={vimeo:function(e){var{videoId:t}=e,o=C(e,["videoId"]);const i=f(null),[n,r]=p(null),[s,a]=p(!1),{isIntersecting:c}=S(i,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{fetch(`https://vimeo.com/api/v2/video/${t}.json`).then((e=>e.json())).then((e=>r(e[0].thumbnail_medium))).catch((()=>r(null)))}),[t]),l("div",Object.assign({ref:i,className:"yoo-video-relative"},{children:[d("img",{src:n||"",alt:"vimeo_video_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:c&&s?0:1,zIndex:c&&s?-1:0}}),c&&d("iframe",Object.assign({title:"Video Player",src:`https://player.vimeo.com/video/${t}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>a(!0),className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},o))]}))},youtube:function(e){var{videoId:t}=e,o=C(e,["videoId"]);const i=f(null),[n,r]=p(!1),{isIntersecting:s}=S(i,{freezeOnceVisible:!0,rootMargin:"50%"});return l("div",Object.assign({ref:i,className:"yoo-video-relative"},{children:[d("img",{src:`https://i.ytimg.com/vi/${t}/default.jpg`,alt:"youtube_video_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:s&&n?0:1,zIndex:s&&n?-1:0}}),s&&d("iframe",Object.assign({title:"Video Player",src:`https://www.youtube.com/embed/${t}`,frameBorder:0,onLoad:()=>r(!0),allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},o))]}))},dailymotion:function(e){var{videoId:t}=e,o=C(e,["videoId"]);const i=f(null),[n,r]=p(null),[s,a]=p(!1),{isIntersecting:c}=S(i,{freezeOnceVisible:!0,rootMargin:"50%"});return h((()=>{fetch((e=>`https://api.dailymotion.com/video/${e}?fields=thumbnail_url`)(t)).then((e=>e.json())).then((e=>r(e.thumbnail_url))).catch((()=>r(null)))}),[t]),l("div",Object.assign({ref:i,className:"yoo-video-relative"},{children:[d("img",{src:n||"",alt:"daylimotion_video_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:c&&s?0:1,zIndex:c&&s?-1:0}}),c&&d("iframe",Object.assign({title:"Dailymotion Video Player",frameBorder:0,onLoad:()=>a(!0),src:`https://www.dailymotion.com/embed/video/${t}`,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},o))]}))}},_=({width:e,height:t,src:o,settings:i,bgColor:n,poster:r,provider:s,fit:a})=>{const l={backgroundColor:n||"transparent",objectFit:a||"contain"};if(s&&s.id&&s.type&&R[s.type]){const o=R[s.type];return d(o,{videoId:s.id,width:e,height:t})}return d("div",Object.assign({className:"yoo-video-w-full"},{children:o&&d("video",{preload:"metadata",poster:r,src:o,width:e,height:t,onDragStart:e=>e.preventDefault(),className:"yoo-video-object-cover yoo-video-w-full yoo-video-h-full",style:l,playsInline:!0,controls:!0})}))};var E,O=(E=function(e,t){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},E(e,t)},function(e,t){function o(){this.constructor=e}E(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),k=function(){return k=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},k.apply(this,arguments)},L={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},N={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},j={width:"20px",height:"20px",position:"absolute"},M={top:k(k({},L),{top:"-5px"}),right:k(k({},N),{left:void 0,right:"-5px"}),bottom:k(k({},L),{top:void 0,bottom:"-5px"}),left:k(k({},N),{left:"-5px"}),topRight:k(k({},j),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:k(k({},j),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:k(k({},j),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:k(k({},j),{left:"-10px",top:"-10px",cursor:"nw-resize"})},W=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return O(t,e),t.prototype.render=function(){return u.createElement("div",{className:this.props.className||"",style:k(k({position:"absolute",userSelect:"none"},M[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(u.PureComponent),A=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},e(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),T=function(){return T=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},T.apply(this,arguments)},B={width:"auto",height:"auto"},P=function(e,t,o){return Math.max(Math.min(e,o),t)},I=function(e,t){return Math.round(e/t)*t},H=function(e,t){return new RegExp(e,"i").test(t)},D=function(e){return Boolean(e.touches&&e.touches.length)},V=function(e,t,o){void 0===o&&(o=0);var i=t.reduce((function(o,i,n){return Math.abs(i-e)<Math.abs(t[o]-e)?n:o}),0),n=Math.abs(t[i]-e);return 0===o||n<o?t[i]:e},F=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},U=function(e,t,o,i){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return o*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return i*(Number(e.replace("vh",""))/100)}return e},Z=["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"],$="__resizable_base__",Y=function(e){function t(t){var o=e.call(this,t)||this;return o.ratio=1,o.resizable=null,o.parentLeft=0,o.parentTop=0,o.resizableLeft=0,o.resizableRight=0,o.resizableTop=0,o.resizableBottom=0,o.targetLeft=0,o.targetTop=0,o.appendBase=function(){if(!o.resizable||!o.window)return null;var e=o.parentNode;if(!e)return null;var t=o.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add($):t.className+=$,e.appendChild(t),t},o.removeBase=function(e){var t=o.parentNode;t&&t.removeChild(e)},o.ref=function(e){e&&(o.resizable=e)},o.state={isResizing:!1,width:void 0===(o.propsSize&&o.propsSize.width)?"auto":o.propsSize&&o.propsSize.width,height:void 0===(o.propsSize&&o.propsSize.height)?"auto":o.propsSize&&o.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},o.onResizeStart=o.onResizeStart.bind(o),o.onMouseMove=o.onMouseMove.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o}return A(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||B},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,n=this.resizable.style.position;"relative"!==n&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=n}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var o=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/o[t]*100+"%"}return F(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?F(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?F(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==o&&"auto"!==o?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,i,n=this.props.boundsByDirection,r=this.state.direction,s=n&&H("left",r),a=n&&H("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(o=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o=this.props.scale||1,i=this.props.resizeRatio||1,n=this.state,r=n.direction,s=n.original,a=this.props,l=a.lockAspectRatio,d=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,u=s.width,p=s.height,h=d||0,f=c||0;return H("right",r)&&(u=s.width+(e-s.x)*i/o,l&&(p=(u-f)/this.ratio+h)),H("left",r)&&(u=s.width-(e-s.x)*i/o,l&&(p=(u-f)/this.ratio+h)),H("bottom",r)&&(p=s.height+(t-s.y)*i/o,l&&(u=(p-h)*this.ratio+f)),H("top",r)&&(p=s.height-(t-s.y)*i/o,l&&(u=(p-h)*this.ratio+f)),{newWidth:u,newHeight:p}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,i){var n=this.props,r=n.lockAspectRatio,s=n.lockAspectRatioExtraHeight,a=n.lockAspectRatioExtraWidth,l=void 0===i.width?10:i.width,d=void 0===o.width||o.width<0?e:o.width,c=void 0===i.height?10:i.height,u=void 0===o.height||o.height<0?t:o.height,p=s||0,h=a||0;if(r){var f=(c-p)*this.ratio+h,v=(u-p)*this.ratio+h,y=(l-h)/this.ratio+p,g=(d-h)/this.ratio+p,m=Math.max(l,f),w=Math.min(d,v),b=Math.max(c,y),x=Math.min(u,g);e=P(e,m,w),t=P(t,b,x)}else e=P(e,l,d),t=P(t,c,u);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,r=i.top,s=i.right,a=i.bottom;this.resizableLeft=n,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,i=0,n=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&D(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",o=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:T(T({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:o};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&D(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var o=this.props,i=o.maxWidth,n=o.maxHeight,r=o.minWidth,s=o.minHeight,a=D(e)?e.touches[0].clientX:e.clientX,l=D(e)?e.touches[0].clientY:e.clientY,d=this.state,c=d.direction,u=d.original,p=d.width,h=d.height,f=this.getParentSize(),v=function(e,t,o,i,n,r,s){return i=U(i,e.width,t,o),n=U(n,e.height,t,o),r=U(r,e.width,t,o),s=U(s,e.height,t,o),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===n?void 0:Number(n),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(f,this.window.innerWidth,this.window.innerHeight,i,n,r,s);i=v.maxWidth,n=v.maxHeight,r=v.minWidth,s=v.minHeight;var y=this.calculateNewSizeFromDirection(a,l),g=y.newHeight,m=y.newWidth,w=this.calculateNewMaxFromBoundary(i,n);this.props.snap&&this.props.snap.x&&(m=V(m,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(g=V(g,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(m,g,{width:w.maxWidth,height:w.maxHeight},{width:r,height:s});if(m=x.newWidth,g=x.newHeight,this.props.grid){var C=I(m,this.props.grid[0]),z=I(g,this.props.grid[1]),S=this.props.snapGap||0;m=0===S||Math.abs(C-m)<=S?C:m,g=0===S||Math.abs(z-g)<=S?z:g}var R={width:m-u.width,height:g-u.height};if(p&&"string"==typeof p)if(p.endsWith("%"))m=m/f.width*100+"%";else if(p.endsWith("vw")){m=m/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){m=m/this.window.innerHeight*100+"vh"}if(h&&"string"==typeof h)if(h.endsWith("%"))g=g/f.height*100+"%";else if(h.endsWith("vw")){g=g/this.window.innerWidth*100+"vw"}else if(h.endsWith("vh")){g=g/this.window.innerHeight*100+"vh"}var _={width:this.createSizeForCssProperty(m,"width"),height:this.createSizeForCssProperty(g,"height")};"row"===this.flexDir?_.flexBasis=_.width:"column"===this.flexDir&&(_.flexBasis=_.height),b((function(){t.setState(_)})),this.props.onResize&&this.props.onResize(e,c,this.resizable,R)}},t.prototype.onMouseUp=function(e){var t=this.state,o=t.isResizing,i=t.direction,n=t.original;if(o&&this.resizable){var r={width:this.size.width-n.width,height:this.size.height-n.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:T(T({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,i=t.handleStyles,n=t.handleClasses,r=t.handleWrapperStyle,s=t.handleWrapperClass,a=t.handleComponent;if(!o)return null;var l=Object.keys(o).map((function(t){return!1!==o[t]?u.createElement(W,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},a&&a[t]?a[t]:null):null}));return u.createElement("div",{className:s,style:r},l)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,o){return-1!==Z.indexOf(o)||(t[o]=e.props[o]),t}),{}),o=T(T(T({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return u.createElement(i,T({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&u.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(u.PureComponent);function X(e){return J(e)?(e.nodeName||"").toLowerCase():"#document"}function G(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function q(e){var t;return null==(t=(J(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function J(e){return e instanceof Node||e instanceof G(e).Node}function K(e){return e instanceof Element||e instanceof G(e).Element}function Q(e){return e instanceof HTMLElement||e instanceof G(e).HTMLElement}function ee(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof G(e).ShadowRoot)}function te(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=se(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function oe(e){return["table","td","th"].includes(X(e))}function ie(e){const t=ne(),o=se(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function ne(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function re(e){return["html","body","#document"].includes(X(e))}function se(e){return G(e).getComputedStyle(e)}function ae(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function le(e){if("html"===X(e))return e;const t=e.assignedSlot||e.parentNode||ee(e)&&e.host||q(e);return ee(t)?t.host:t}function de(e){const t=le(e);return re(t)?e.ownerDocument?e.ownerDocument.body:e.body:Q(t)&&te(t)?t:de(t)}function ce(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=de(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),s=G(n);return r?t.concat(s,s.visualViewport||[],te(n)?n:[],s.frameElement&&o?ce(s.frameElement):[]):t.concat(n,ce(n,[],o))}const ue=Math.min,pe=Math.max,he=Math.round,fe=e=>({x:e,y:e}),ve={left:"right",right:"left",bottom:"top",top:"bottom"},ye={start:"end",end:"start"};function ge(e,t,o){return pe(e,ue(t,o))}function me(e,t){return"function"==typeof e?e(t):e}function we(e){return e.split("-")[0]}function be(e){return e.split("-")[1]}function xe(e){return"x"===e?"y":"x"}function Ce(e){return"y"===e?"height":"width"}function ze(e){return["top","bottom"].includes(we(e))?"y":"x"}function Se(e){return xe(ze(e))}function Re(e){return e.replace(/start|end/g,(e=>ye[e]))}function _e(e){return e.replace(/left|right|bottom|top/g,(e=>ve[e]))}function Ee(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Oe(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ke(e,t,o){let{reference:i,floating:n}=e;const r=ze(t),s=Se(t),a=Ce(s),l=we(t),d="y"===r,c=i.x+i.width/2-n.width/2,u=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2;let h;switch(l){case"top":h={x:c,y:i.y-n.height};break;case"bottom":h={x:c,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:u};break;case"left":h={x:i.x-n.width,y:u};break;default:h={x:i.x,y:i.y}}switch(be(t)){case"start":h[s]-=p*(o&&d?-1:1);break;case"end":h[s]+=p*(o&&d?-1:1)}return h}async function Le(e,t){var o;void 0===t&&(t={});const{x:i,y:n,platform:r,rects:s,elements:a,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=me(t,e),f=Ee(h),v=a[p?"floating"===u?"reference":"floating":u],y=Oe(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(v)))||o?v:v.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),g="floating"===u?{...s.floating,x:i,y:n}:s.reference,m=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),w=await(null==r.isElement?void 0:r.isElement(m))&&await(null==r.getScale?void 0:r.getScale(m))||{x:1,y:1},b=Oe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:m,strategy:l}):g);return{top:(y.top-b.top+f.top)/w.y,bottom:(b.bottom-y.bottom+f.bottom)/w.y,left:(y.left-b.left+f.left)/w.x,right:(b.right-y.right+f.right)/w.x}}function Ne(e){const t=ue(...e.map((e=>e.left))),o=ue(...e.map((e=>e.top)));return{x:t,y:o,width:pe(...e.map((e=>e.right)))-t,height:pe(...e.map((e=>e.bottom)))-o}}const je=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,i;const{x:n,y:r,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:o,platform:i,elements:n}=e,r=await(null==i.isRTL?void 0:i.isRTL(n.floating)),s=we(o),a=be(o),l="y"===ze(o),d=["left","top"].includes(s)?-1:1,c=r&&l?-1:1,u=me(t,e);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*c,y:p*d}:{x:p*d,y:h*c}}(t,e);return s===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:n+l.x,y:r+l.y,data:{...l,placement:s}}}}};function Me(e){const t=se(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=Q(e),r=n?e.offsetWidth:o,s=n?e.offsetHeight:i,a=he(o)!==r||he(i)!==s;return a&&(o=r,i=s),{width:o,height:i,$:a}}function We(e){return K(e)?e:e.contextElement}function Ae(e){const t=We(e);if(!Q(t))return fe(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=Me(t);let s=(r?he(o.width):o.width)/i,a=(r?he(o.height):o.height)/n;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Te=fe(0);function Be(e){const t=G(e);return ne()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Te}function Pe(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=We(e);let s=fe(1);t&&(i?K(i)&&(s=Ae(i)):s=Ae(e));const a=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==G(e))&&t}(r,o,i)?Be(r):fe(0);let l=(n.left+a.x)/s.x,d=(n.top+a.y)/s.y,c=n.width/s.x,u=n.height/s.y;if(r){const e=G(r),t=i&&K(i)?G(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=Ae(n),t=n.getBoundingClientRect(),i=se(n),r=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,u*=e.y,l+=r,d+=s,o=G(n),n=o.frameElement}}return Oe({width:c,height:u,x:l,y:d})}const Ie=[":popover-open",":modal"];function He(e){return Ie.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function De(e){return Pe(q(e)).left+ae(e).scrollLeft}function Ve(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=G(e),i=q(e),n=o.visualViewport;let r=i.clientWidth,s=i.clientHeight,a=0,l=0;if(n){r=n.width,s=n.height;const e=ne();(!e||e&&"fixed"===t)&&(a=n.offsetLeft,l=n.offsetTop)}return{width:r,height:s,x:a,y:l}}(e,o);else if("document"===t)i=function(e){const t=q(e),o=ae(e),i=e.ownerDocument.body,n=pe(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=pe(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+De(e);const a=-o.scrollTop;return"rtl"===se(i).direction&&(s+=pe(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:s,y:a}}(q(e));else if(K(t))i=function(e,t){const o=Pe(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=Q(e)?Ae(e):fe(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:n*r.x,y:i*r.y}}(t,o);else{const o=Be(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return Oe(i)}function Fe(e,t){const o=le(e);return!(o===t||!K(o)||re(o))&&("fixed"===se(o).position||Fe(o,t))}function Ue(e,t,o){const i=Q(t),n=q(t),r="fixed"===o,s=Pe(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=fe(0);if(i||!i&&!r)if(("body"!==X(t)||te(n))&&(a=ae(t)),i){const e=Pe(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=De(n));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Ze(e,t){return Q(e)&&"fixed"!==se(e).position?t?t(e):e.offsetParent:null}function $e(e,t){const o=G(e);if(!Q(e)||He(e))return o;let i=Ze(e,t);for(;i&&oe(i)&&"static"===se(i).position;)i=Ze(i,t);return i&&("html"===X(i)||"body"===X(i)&&"static"===se(i).position&&!ie(i))?o:i||function(e){let t=le(e);for(;Q(t)&&!re(t);){if(ie(t))return t;t=le(t)}return null}(e)||o}const Ye={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,s=q(i),a=!!t&&He(t.floating);if(i===s||a&&r)return o;let l={scrollLeft:0,scrollTop:0},d=fe(1);const c=fe(0),u=Q(i);if((u||!u&&!r)&&(("body"!==X(i)||te(s))&&(l=ae(i)),Q(i))){const e=Pe(i);d=Ae(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-l.scrollLeft*d.x+c.x,y:o.y*d.y-l.scrollTop*d.y+c.y}},getDocumentElement:q,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:i,strategy:n}=e;const r=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let i=ce(e,[],!1).filter((e=>K(e)&&"body"!==X(e))),n=null;const r="fixed"===se(e).position;let s=r?le(e):e;for(;K(s)&&!re(s);){const t=se(s),o=ie(s);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||te(s)&&!o&&Fe(e,s))?i=i.filter((e=>e!==s)):n=t,s=le(s)}return t.set(e,i),i}(t,this._c):[].concat(o),i],s=r[0],a=r.reduce(((e,o)=>{const i=Ve(t,o,n);return e.top=pe(i.top,e.top),e.right=ue(i.right,e.right),e.bottom=ue(i.bottom,e.bottom),e.left=pe(i.left,e.left),e}),Ve(t,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:$e,getElementRects:async function(e){const t=this.getOffsetParent||$e,o=this.getDimensions;return{reference:Ue(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await o(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=Me(e);return{width:t,height:o}},getScale:Ae,isElement:K,isRTL:function(e){return"rtl"===se(e).direction}},Xe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:i,placement:n}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...l}=me(e,t),d={x:o,y:i},c=await Le(t,l),u=ze(we(n)),p=xe(u);let h=d[p],f=d[u];if(r){const e="y"===p?"bottom":"right";h=ge(h+c["y"===p?"top":"left"],h,h-c[e])}if(s){const e="y"===u?"bottom":"right";f=ge(f+c["y"===u?"top":"left"],f,f-c[e])}const v=a.fn({...t,[p]:h,[u]:f});return{...v,data:{x:v.x-o,y:v.y-i}}}}},Ge=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,i;const{placement:n,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:v=!0,...y}=me(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const g=we(n),m=we(a)===a,w=await(null==l.isRTL?void 0:l.isRTL(d.floating)),b=p||(m||!v?[_e(a)]:function(e){const t=_e(e);return[Re(e),t,Re(t)]}(a));p||"none"===f||b.push(...function(e,t,o,i){const n=be(e);let r=function(e,t,o){const i=["left","right"],n=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return o?t?n:i:t?i:n;case"left":case"right":return t?r:s;default:return[]}}(we(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(Re)))),r}(a,v,f,w));const x=[a,...b],C=await Le(t,y),z=[];let S=(null==(i=r.flip)?void 0:i.overflows)||[];if(c&&z.push(C[g]),u){const e=function(e,t,o){void 0===o&&(o=!1);const i=be(e),n=Se(e),r=Ce(n);let s="x"===n?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=_e(s)),[s,_e(s)]}(n,s,w);z.push(C[e[0]],C[e[1]])}if(S=[...S,{placement:n,overflows:z}],!z.every((e=>e<=0))){var R,_;const e=((null==(R=r.flip)?void 0:R.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let o=null==(_=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:_.placement;if(!o)switch(h){case"bestFit":{var E;const e=null==(E=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0];e&&(o=e);break}case"initialPlacement":o=a}if(n!==o)return{reset:{placement:o}}}return{}}}},qe=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:i,rects:n,platform:r,strategy:s}=t,{padding:a=2,x:l,y:d}=me(e,t),c=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),u=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let i=null;for(let e=0;e<t.length;e++){const n=t[e];!i||n.y-i.y>i.height/2?o.push([n]):o[o.length-1].push(n),i=n}return o.map((e=>Oe(Ne(e))))}(c),p=Oe(Ne(c)),h=Ee(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=d)return u.find((e=>l>e.left-h.left&&l<e.right+h.right&&d>e.top-h.top&&d<e.bottom+h.bottom))||p;if(u.length>=2){if("y"===ze(o)){const e=u[0],t=u[u.length-1],i="top"===we(o),n=e.top,r=t.bottom,s=i?e.left:t.left,a=i?e.right:t.right;return{top:n,bottom:r,left:s,right:a,width:a-s,height:r-n,x:s,y:n}}const e="left"===we(o),t=pe(...u.map((e=>e.right))),i=ue(...u.map((e=>e.left))),n=u.filter((o=>e?o.left===i:o.right===t)),r=n[0].top,s=n[n.length-1].bottom;return{top:r,bottom:s,left:i,right:t,width:t-i,height:s-r,x:i,y:r}}return p}},floating:i.floating,strategy:s});return n.reference.x!==f.reference.x||n.reference.y!==f.reference.y||n.reference.width!==f.reference.width||n.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},Je=(e,t,o)=>{const i=new Map,n={platform:Ye,...o},r={...n.platform,_c:i};return(async(e,t,o)=>{const{placement:i="bottom",strategy:n="absolute",middleware:r=[],platform:s}=o,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:u}=ke(d,i,l),p=i,h={},f=0;for(let o=0;o<a.length;o++){const{name:r,fn:v}=a[o],{x:y,y:g,data:m,reset:w}=await v({x:c,y:u,initialPlacement:i,placement:p,strategy:n,middlewareData:h,rects:d,platform:s,elements:{reference:e,floating:t}});c=null!=y?y:c,u=null!=g?g:u,h={...h,[r]:{...h[r],...m}},w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(d=!0===w.rects?await s.getElementRects({reference:e,floating:t,strategy:n}):w.rects),({x:c,y:u}=ke(d,p,l))),o=-1)}return{x:c,y:u,placement:p,strategy:n,middlewareData:h}})(e,t,{...n,platform:r})};var Ke="undefined"!=typeof document?v:h;function Qe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let o,i,n;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(!Qe(e[i],t[i]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(i=o;0!=i--;)if(!{}.hasOwnProperty.call(t,n[i]))return!1;for(i=o;0!=i--;){const o=n[i];if(("_owner"!==o||!e.$$typeof)&&!Qe(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function et(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tt(e,t){const o=et(e);return Math.round(t*o)/o}function ot(e){const t=u.useRef(e);return Ke((()=>{t.current=e})),t}
2
2
  /*!
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
5
  */
6
- var it=["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(","),nt="undefined"==typeof Element,ot=nt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,rt=!nt&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},st=function e(t,i){var n;void 0===i&&(i=!0);var o=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert");return""===o||"true"===o||i&&t&&e(t.parentNode)},lt=function e(t,i,n){for(var o=[],r=Array.from(t);r.length;){var s=r.shift();if(!st(s,!1))if("SLOT"===s.tagName){var l=s.assignedElements(),a=e(l.length?l:s.children,!0,n);n.flatten?o.push.apply(o,a):o.push({scopeParent:s,candidates:a})}else{ot.call(s,it)&&n.filter(s)&&(i||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(s),u=!st(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(c&&u){var d=e(!0===c?s.children:c.children,!0,n);n.flatten?o.push.apply(o,d):o.push({scopeParent:s,candidates:d})}else r.unshift.apply(r,s.children)}}return o},at=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ct=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,i=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===i||"true"===i}(e))&&!at(e)?0:e.tabIndex},ut=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},dt=function(e){return"INPUT"===e.tagName},ht=function(e){return function(e){return dt(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,i=e.form||rt(e),n=function(e){return i.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=n(window.CSS.escape(e.name));else try{t=n(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var i=0;i<e.length;i++)if(e[i].checked&&e[i].form===t)return e[i]}(t,e.form);return!o||o===e}(e)},pt=function(e){var t=e.getBoundingClientRect(),i=t.width,n=t.height;return 0===i&&0===n},ft=function(e,t){var i=t.displayCheck,n=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=ot.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ot.call(o,"details:not([open]) *"))return!0;if(i&&"full"!==i&&"legacy-full"!==i){if("non-zero-area"===i)return pt(e)}else{if("function"==typeof n){for(var r=e;e;){var s=e.parentElement,l=rt(e);if(s&&!s.shadowRoot&&!0===n(s))return pt(e);e=e.assignedSlot?e.assignedSlot:s||l===e.ownerDocument?s:l.host}e=r}if(function(e){var t,i,n,o,r=e&&rt(e),s=null===(t=r)||void 0===t?void 0:t.host,l=!1;if(r&&r!==e)for(l=!!(null!==(i=s)&&void 0!==i&&null!==(n=i.ownerDocument)&&void 0!==n&&n.contains(s)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&s;){var a,c,u;l=!(null===(c=s=null===(a=r=rt(s))||void 0===a?void 0:a.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(s))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==i)return!0}return!1},gt=function(e,t){return!(t.disabled||st(t)||function(e){return dt(e)&&"hidden"===e.type}(t)||ft(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var i=0;i<t.children.length;i++){var n=t.children.item(i);if("LEGEND"===n.tagName)return!!ot.call(t,"fieldset[disabled] *")||!n.contains(e)}return!0}t=t.parentElement}return!1}(t))},mt=function(e,t){return!(ht(t)||ct(t)<0||!gt(e,t))},vt=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},wt=function e(t){var i=[],n=[];return t.forEach((function(t,o){var r=!!t.scopeParent,s=r?t.scopeParent:t,l=function(e,t){var i=ct(e);return i<0&&t&&!at(e)?0:i}(s,r),a=r?e(t.candidates):s;0===l?r?i.push.apply(i,a):i.push(s):n.push({documentOrder:o,tabIndex:l,item:t,isScope:r,content:a})})),n.sort(ut).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(i)},yt=function(e,t){var i;return i=(t=t||{}).getShadowRoot?lt([e],t.includeContainer,{filter:mt.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:vt}):function(e,t,i){if(st(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(it));return t&&ot.call(e,it)&&n.unshift(e),n.filter(i)}(e,t.includeContainer,mt.bind(null,t)),wt(i)};const bt=u["useInsertionEffect".toString()]||(e=>e());var xt="undefined"!=typeof document?f:h;function Ct(){return Ct=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},Ct.apply(this,arguments)}let St=!1,Rt=0;const zt=()=>"floating-ui-"+Rt++;const Et=u["useId".toString()]||function(){const[e,t]=u.useState((()=>St?zt():void 0));return xt((()=>{null==e&&t(zt())}),[]),u.useEffect((()=>{St||(St=!0)}),[]),e};const Ot=u.createContext(null),Nt=u.createContext(null);function Lt(e){return"data-floating-ui-"+e}const kt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function _t(e,t){const i=yt(e,kt());"prev"===t&&i.reverse();const n=i.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(i=t)||null==(i=i.shadowRoot)?void 0:i.activeElement);){var i;t=t.shadowRoot.activeElement}return t}((null==(o=e)?void 0:o.ownerDocument)||document));var o;return i.slice(n+1)[0]}function jt(e,t){const i=t||e.currentTarget,n=e.relatedTarget;return!n||!function(e,t){if(!e||!t)return!1;const i=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(i&&Q(i)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}(i,n)}function Mt(e){yt(e,kt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Wt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const At={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 Tt(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Bt=u.forwardRef((function(e,t){const[i,n]=u.useState();xt((()=>(/apple/i.test(navigator.vendor)&&n("button"),document.addEventListener("keydown",Tt),()=>{document.removeEventListener("keydown",Tt)})),[]);const o={ref:t,tabIndex:0,role:i,"aria-hidden":!i||void 0,[Lt("focus-guard")]:"",style:At};return u.createElement("span",Ct({},e,o))})),Pt=u.createContext(null),It=Lt("portal");function Dt(e){let{children:t,id:i,root:n=null,preserveTabOrder:o=!0}=e;const r=function(e){let{id:t,root:i}=void 0===e?{}:e;const[n,o]=u.useState(null),r=Et(),s=Ht(),l=u.useRef(null);return xt((()=>()=>{null==n||n.remove(),queueMicrotask((()=>{l.current=null}))}),[n]),xt((()=>{if(l.current)return;const e=t?document.getElementById(t):null;if(!e)return;const i=document.createElement("div");i.id=r,i.setAttribute(It,""),e.appendChild(i),l.current=i,o(i)}),[t,r]),xt((()=>{if(l.current)return;let e=i||(null==s?void 0:s.portalNode);e&&!J(e)&&(e=e.current),e=e||document.body;let n=null;t&&(n=document.createElement("div"),n.id=t,e.appendChild(n));const a=document.createElement("div");a.id=r,a.setAttribute(It,""),e=n||e,e.appendChild(a),l.current=a,o(a)}),[t,i,r,s]),n}({id:i,root:n}),[s,l]=u.useState(null),a=u.useRef(null),c=u.useRef(null),d=u.useRef(null),h=u.useRef(null),p=!!s&&!s.modal&&s.open&&o&&!(!n&&!r);return u.useEffect((()=>{if(r&&o&&(null==s||!s.modal))return r.addEventListener("focusin",e,!0),r.addEventListener("focusout",e,!0),()=>{r.removeEventListener("focusin",e,!0),r.removeEventListener("focusout",e,!0)};function e(e){if(r&&jt(e)){("focusin"===e.type?Wt:Mt)(r)}}}),[r,o,null==s?void 0:s.modal]),u.createElement(Pt.Provider,{value:u.useMemo((()=>({preserveTabOrder:o,beforeOutsideRef:a,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:h,portalNode:r,setFocusManagerState:l})),[o,r])},p&&r&&u.createElement(Bt,{"data-type":"outside",ref:a,onFocus:e=>{if(jt(e,r)){var t;null==(t=d.current)||t.focus()}else{const e=_t(document.body,"prev")||(null==s?void 0:s.refs.domReference.current);null==e||e.focus()}}}),p&&r&&u.createElement("span",{"aria-owns":r.id,style:At}),r&&b(t,r),p&&r&&u.createElement(Bt,{"data-type":"outside",ref:c,onFocus:e=>{if(jt(e,r)){var t;null==(t=h.current)||t.focus()}else{const t=_t(document.body,"next")||(null==s?void 0:s.refs.domReference.current);null==t||t.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent))}}}))}const Ht=()=>u.useContext(Pt),Vt=new Set,Ft=u.forwardRef((function(e,t){let{lockScroll:i=!1,...n}=e;const o=Et();return xt((()=>{if(!i)return;Vt.add(o);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=t.left?parseFloat(t.left):window.pageXOffset,l=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var a,c;const e=(null==(a=window.visualViewport)?void 0:a.offsetLeft)||0,i=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(l-Math.floor(i))+"px",left:-(s-Math.floor(e))+"px",right:"0"})}return()=>{Vt.delete(o),0===Vt.size&&(Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(s,l)))}}),[o,i]),u.createElement("div",Ct({ref:t},n,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...n.style}}))}));function Ut(e){var t;void 0===e&&(e={});const{open:i=!1,onOpenChange:n,nodeId:o}=e,[r,s]=u.useState(null),l=(null==(t=e.elements)?void 0:t.reference)||r,a=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:i="absolute",middleware:n=[],platform:o,elements:{reference:r,floating:s}={},transform:l=!0,whileElementsMounted:a,open:c}=e,[d,h]=u.useState({x:0,y:0,strategy:i,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=u.useState(n);Ke(p,n)||f(n);const[g,m]=u.useState(null),[v,y]=u.useState(null),b=u.useCallback((e=>{e!==R.current&&(R.current=e,m(e))}),[]),x=u.useCallback((e=>{e!==z.current&&(z.current=e,y(e))}),[]),C=r||g,S=s||v,R=u.useRef(null),z=u.useRef(null),E=u.useRef(d),O=null!=a,N=tt(a),L=tt(o),k=u.useCallback((()=>{if(!R.current||!z.current)return;const e={placement:t,strategy:i,middleware:p};L.current&&(e.platform=L.current),qe(R.current,z.current,e).then((e=>{const t={...e,isPositioned:!0};_.current&&!Ke(E.current,t)&&(E.current=t,w.flushSync((()=>{h(t)})))}))}),[p,t,i,L]);Je((()=>{!1===c&&E.current.isPositioned&&(E.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[c]);const _=u.useRef(!1);Je((()=>(_.current=!0,()=>{_.current=!1})),[]),Je((()=>{if(C&&(R.current=C),S&&(z.current=S),C&&S){if(N.current)return N.current(C,S,k);k()}}),[C,S,k,N,O]);const j=u.useMemo((()=>({reference:R,floating:z,setReference:b,setFloating:x})),[b,x]),M=u.useMemo((()=>({reference:C,floating:S})),[C,S]),W=u.useMemo((()=>{const e={position:i,left:0,top:0};if(!M.floating)return e;const t=et(M.floating,d.x),n=et(M.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Qe(M.floating)>=1.5&&{willChange:"transform"}}:{position:i,left:t,top:n}}),[i,l,M.floating,d.x,d.y]);return u.useMemo((()=>({...d,update:k,refs:j,elements:M,floatingStyles:W})),[d,k,j,M,W])}(e),c=u.useContext(Nt),d=null!=((null==(h=u.useContext(Ot))?void 0:h.id)||null);var h;const p=function(e){const t=u.useRef((()=>{}));return bt((()=>{t.current=e})),u.useCallback((function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return null==t.current?void 0:t.current(...i)}),[])}(((e,t,i)=>{e&&(g.current.openEvent=t),m.emit("openchange",{open:e,event:t,reason:i,nested:d}),null==n||n(e,t,i)})),f=u.useRef(null),g=u.useRef({}),m=u.useState((()=>function(){const e=new Map;return{emit(t,i){var n;null==(n=e.get(t))||n.forEach((e=>e(i)))},on(t,i){e.set(t,[...e.get(t)||[],i])},off(t,i){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter((e=>e!==i)))||[])}}}()))[0],v=Et(),y=u.useCallback((e=>{const t=J(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;a.refs.setReference(t)}),[a.refs]),b=u.useCallback((e=>{(J(e)||null===e)&&(f.current=e,s(e)),(J(a.refs.reference.current)||null===a.refs.reference.current||null!==e&&!J(e))&&a.refs.setReference(e)}),[a.refs]),x=u.useMemo((()=>({...a.refs,setReference:b,setPositionReference:y,domReference:f})),[a.refs,b,y]),C=u.useMemo((()=>({...a.elements,domReference:l})),[a.elements,l]),S=u.useMemo((()=>({...a,refs:x,elements:C,dataRef:g,nodeId:o,floatingId:v,events:m,open:i,onOpenChange:p})),[a,o,v,m,i,p,x,C]);return xt((()=>{const e=null==c?void 0:c.nodesRef.current.find((e=>e.id===o));e&&(e.context=S)})),u.useMemo((()=>({...a,context:S,refs:x,elements:C})),[a,x,C,S])}function $t(e,t){if(null==e)return{};var i,n,o={},r=Object.keys(e);for(n=0;n<r.length;n++)i=r[n],t.indexOf(i)>=0||(o[i]=e[i]);return o}var Yt=["color"],Xt=g((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,o=$t(e,Yt);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:t}),m("path",{d:"M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Zt=["color"],Gt=g((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,o=$t(e,Zt);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:t}),m("path",{d:"M7.81832 0.68179C7.64258 0.506054 7.35766 0.506054 7.18192 0.68179L5.18192 2.68179C5.00619 2.85753 5.00619 3.14245 5.18192 3.31819C5.35766 3.49392 5.64258 3.49392 5.81832 3.31819L7.05012 2.08638L7.05012 5.50023C7.05012 5.74876 7.25159 5.95023 7.50012 5.95023C7.74865 5.95023 7.95012 5.74876 7.95012 5.50023L7.95012 2.08638L9.18192 3.31819C9.35766 3.49392 9.64258 3.49392 9.81832 3.31819C9.99406 3.14245 9.99406 2.85753 9.81832 2.68179L7.81832 0.68179ZM7.95012 12.9136V9.50023C7.95012 9.2517 7.74865 9.05023 7.50012 9.05023C7.25159 9.05023 7.05012 9.2517 7.05012 9.50023V12.9136L5.81832 11.6818C5.64258 11.5061 5.35766 11.5061 5.18192 11.6818C5.00619 11.8575 5.00619 12.1424 5.18192 12.3182L7.18192 14.3182C7.26632 14.4026 7.38077 14.45 7.50012 14.45C7.61947 14.45 7.73393 14.4026 7.81832 14.3182L9.81832 12.3182C9.99406 12.1424 9.99406 11.8575 9.81832 11.6818C9.64258 11.5061 9.35766 11.5061 9.18192 11.6818L7.95012 12.9136ZM1.49994 7.00017C1.2238 7.00017 0.999939 7.22403 0.999939 7.50017C0.999939 7.77631 1.2238 8.00017 1.49994 8.00017L13.4999 8.00017C13.7761 8.00017 13.9999 7.77631 13.9999 7.50017C13.9999 7.22403 13.7761 7.00017 13.4999 7.00017L1.49994 7.00017Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),qt=["color"],Jt=g((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,o=$t(e,qt);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:t}),m("path",{d:"M11.5 3.04999C11.7485 3.04999 11.95 3.25146 11.95 3.49999V7.49999C11.95 7.74852 11.7485 7.94999 11.5 7.94999C11.2515 7.94999 11.05 7.74852 11.05 7.49999V4.58639L4.58638 11.05H7.49999C7.74852 11.05 7.94999 11.2515 7.94999 11.5C7.94999 11.7485 7.74852 11.95 7.49999 11.95L3.49999 11.95C3.38064 11.95 3.26618 11.9026 3.18179 11.8182C3.0974 11.7338 3.04999 11.6193 3.04999 11.5L3.04999 7.49999C3.04999 7.25146 3.25146 7.04999 3.49999 7.04999C3.74852 7.04999 3.94999 7.25146 3.94999 7.49999L3.94999 10.4136L10.4136 3.94999L7.49999 3.94999C7.25146 3.94999 7.04999 3.74852 7.04999 3.49999C7.04999 3.25146 7.25146 3.04999 7.49999 3.04999L11.5 3.04999Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Kt=["color"],Qt=g((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,o=$t(e,Kt);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:t}),m("path",{d:"M4.76447 3.12199C5.63151 3.04859 6.56082 3 7.5 3C8.43918 3 9.36849 3.04859 10.2355 3.12199C11.2796 3.21037 11.9553 3.27008 12.472 3.39203C12.9425 3.50304 13.2048 3.64976 13.4306 3.88086C13.4553 3.90618 13.4902 3.94414 13.5133 3.97092C13.7126 4.20149 13.8435 4.4887 13.918 5.03283C13.9978 5.6156 14 6.37644 14 7.52493C14 8.66026 13.9978 9.41019 13.9181 9.98538C13.8439 10.5206 13.7137 10.8061 13.5125 11.0387C13.4896 11.0651 13.4541 11.1038 13.4296 11.1287C13.2009 11.3625 12.9406 11.5076 12.4818 11.6164C11.9752 11.7365 11.3143 11.7942 10.2878 11.8797C9.41948 11.9521 8.47566 12 7.5 12C6.52434 12 5.58052 11.9521 4.7122 11.8797C3.68572 11.7942 3.02477 11.7365 2.51816 11.6164C2.05936 11.5076 1.7991 11.3625 1.57037 11.1287C1.54593 11.1038 1.51035 11.0651 1.48748 11.0387C1.28628 10.8061 1.15612 10.5206 1.08193 9.98538C1.00221 9.41019 1 8.66026 1 7.52493C1 6.37644 1.00216 5.6156 1.082 5.03283C1.15654 4.4887 1.28744 4.20149 1.48666 3.97092C1.5098 3.94414 1.54468 3.90618 1.56942 3.88086C1.7952 3.64976 2.05752 3.50304 2.52796 3.39203C3.04473 3.27008 3.7204 3.21037 4.76447 3.12199ZM0 7.52493C0 5.28296 0 4.16198 0.729985 3.31713C0.766457 3.27491 0.815139 3.22194 0.854123 3.18204C1.63439 2.38339 2.64963 2.29744 4.68012 2.12555C5.56923 2.05028 6.52724 2 7.5 2C8.47276 2 9.43077 2.05028 10.3199 2.12555C12.3504 2.29744 13.3656 2.38339 14.1459 3.18204C14.1849 3.22194 14.2335 3.27491 14.27 3.31713C15 4.16198 15 5.28296 15 7.52493C15 9.74012 15 10.8477 14.2688 11.6929C14.2326 11.7348 14.1832 11.7885 14.1444 11.8281C13.3629 12.6269 12.3655 12.71 10.3709 12.8763C9.47971 12.9505 8.50782 13 7.5 13C6.49218 13 5.52028 12.9505 4.62915 12.8763C2.63446 12.71 1.63712 12.6269 0.855558 11.8281C0.816844 11.7885 0.767442 11.7348 0.731221 11.6929C0 10.8477 0 9.74012 0 7.52493ZM5.25 5.38264C5.25 5.20225 5.43522 5.08124 5.60041 5.15369L10.428 7.27105C10.6274 7.35853 10.6274 7.64147 10.428 7.72895L5.60041 9.84631C5.43522 9.91876 5.25 9.79775 5.25 9.61736V5.38264Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),ei=["color"],ti=g((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,o=$t(e,ei);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:t}),m("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}));const ii={youtube:e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null},vimeo:e=>new URL(e).pathname.split("/")[1],dailymotion:e=>{const t=e.match(/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null}},ni=({blockId:t,onClose:i})=>{const n=e(),[o,r]=d(""),s=0===o.length;return a("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 video 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:e=>r(e.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 e;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":null;var s;const l=r?null===(e=ii[r])||void 0===e?void 0:e.call(ii,o):null;if(!r||!l)return console.warn("Unsopperted video provider or video id is not found.");n.blocks.Video.updateElement(t,"video",{src:o,provider:{type:r,id:l}}),i()}},{children:"Embed video"}))]}))},oi=({accept:i="video/*",onClose:n,blockId:o,onSetLoading:r})=>{const s=t("Video"),l=e();h((()=>{}),[]);return c("div",Object.assign({className:"user-select-none transition-bg duration-20 ease-in white-space-nowrap rounded-[4px] h-[32px] px-[12px] border border-[rgba(55,53,47,0.16)] w-full cursor-pointer"},{children:a("label",Object.assign({htmlFor:"video-uploader",className:"text-[14px] leading-[1.2] font-medium cursor-pointer w-full flex items-center justify-center h-full"},{children:[c("input",{type:"file",id:"video-uploader",className:"absolute left-0 top-0 invisible",accept:(null==s?void 0:s.accept)||i,onChange:e=>{const t=e.target.files[0];t&&(e=>{C(void 0,void 0,void 0,(function*(){if(!(null==s?void 0:s.onUpload))throw new Error("onUpload not provided in plugin options. Check Video.extend({}) method");n(),r(!0);try{const t=yield null==s?void 0:s.onUpload(e);l.blocks.Video.updateElement(o,"video",{src:t.src,sizes:t.sizes,bgColor:t.bgColor})}catch(e){}finally{r(!1)}}))})(t)},multiple:!1}),"Upload video"]}))}))},ri=({floatingStyles:e,refs:t,onClose:i,blockId:n,onSetLoading:o})=>{const[r,s]=d("upload"),l=e=>s(e),u="upload"===r,h="embed"===r,p=e=>({borderBottom:e?"2px solid #2483e2":"2px solid transparent"});return c(Dt,Object.assign({root:document.getElementById("yoopta-editor")},{children:c(Ft,Object.assign({lockScroll:!0,className:"z-[100]",onClick:i},{children:c("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:a("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:[c("button",Object.assign({type:"button",onClick:()=>l("upload"),style:p(u),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:"Upload"})),c("button",Object.assign({type:"button",onClick:()=>l("embed"),style:p(h),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:"Video link"}))]})),a("div",Object.assign({className:"pt-[6px] pb-[6px] mt-[4px] flex justify-center mr-[12px] ml-[12px]"},{children:[h&&c(ni,{onClose:i,blockId:n}),u&&c(oi,{onClose:i,blockId:n,onSetLoading:o})]}))]}))}))}))}))},si=({className:e,width:t,height:i,children:n})=>a("div",Object.assign({className:e},{children:[n,c("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:t,height:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-2 h-4 w-4 animate-spin"},{children:c("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),li=({attributes:e,children:t,blockId:i})=>{const[n,o]=d(!1),[r,s]=d(!1),{refs:l,floatingStyles:u}=Ut({placement:"bottom",open:n,onOpenChange:o,middleware:[Ge(),Ze(),Xe(),_e(10)]});return a("div",Object.assign({className:"w-full user-select-none m-[20px_0_10px] relative flex"},e,{contentEditable:!1},{children:[a("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),disabled:r,ref:l.setReference},{children:[c(r?si:Qt,{className:"mr-2 user-select-none",width:24,height:24}),c("span",Object.assign({className:"font-medium"},{children:r?"Loading...":"Click to add video"})),r&&c("div",{className:"absolute top-0 left-0 h-full bg-[rgba(55,53,47,0.16)]",style:{width:"100%",transition:"width 100ms ease-in"}})]})),n&&c(ri,{blockId:i,floatingStyles:u,refs:l,onClose:()=>o(!1),onSetLoading:e=>s(e)}),t]}))},{ExtendedBlockActions:ai,BlockOptionsMenuGroup:ci,BlockOptionsMenuItem:ui,BlockOptionsSeparator:di}=i,hi=({editor:e,block:t,props:i})=>a(ai,Object.assign({onClick:()=>e.setSelection([t.meta.order]),className:"yoopta-video-options"},{children:[c(di,{}),a(ci,{children:[c(ui,{children:a("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:()=>{e.blocks.Image.updateElement(t.id,"video",{fit:"contain"})}},{children:[c(Gt,{width:16,height:16,className:"w-4 h-4 mr-2"}),"Fit"]}))}),c(ui,{children:a("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:()=>{e.blocks.Image.updateElement(t.id,"video",{fit:"fill"})}},{children:[c(ti,{width:16,height:16,className:"w-4 h-4 mr-2"}),"Fill"]}))}),c(ui,{children:a("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:()=>{e.blocks.Image.updateElement(t.id,"video",{fit:"cover"})}},{children:[c(Jt,{width:16,height:16,className:"w-4 h-4 mr-2"}),"Cover"]}))})]}),c(di,{}),c(ci,{children:c(ui,{children:a("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:()=>{if(!i||!i.src)return;const e=document.createElement("a");e.href=i.src,e.download=i.src,e.target="_blank",e.rel="noopener noreferrer",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},{children:[c(Xt,{width:16,height:16,className:"w-4 h-4 mr-2"}),"Download"]}))})})]})),pi=({position:e})=>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"===e?"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]"})})),fi=new s({type:"Video",elements:{video:{render:({element:i,attributes:s,children:l,blockId:u})=>{const{src:p,srcSet:f,bgColor:g,settings:m,sizes:w,poster:y,provider:b,fit:x}=i.props||{},C=n(u),S=e(),R=t("Video"),E=o(),[O,N]=d({width:(null==w?void 0:w.width)||750,height:(null==w?void 0:w.height)||440});h((()=>N({width:(null==w?void 0:w.width)||650,height:(null==w?void 0:w.height)||440})),[i.props]);const L=r({blockId:u}),k=v((()=>{var e,t;return{minWidth:300,size:{width:O.width,height:O.height},maxWidth:(null===(e=null==R?void 0:R.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(t=null==R?void 0:R.maxSizes)||void 0===t?void 0:t.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!E,right:!E},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,i)=>{N({width:i.offsetWidth,height:i.offsetHeight})},onResizeStop:(e,t,i)=>{S.blocks.Video.updateElement(u,"video",{sizes:{width:i.offsetWidth,height:i.offsetHeight}})},handleComponent:{left:c(pi,{position:"left"}),right:c(pi,{position:"right"})}}}),[O.width,O.height]);return p?c("div",Object.assign({"data-element-type":i.type,contentEditable:!1,draggable:!1,className:"mt-4 relative yoopta-video"},s,{children:a(Y,Object.assign({},k,{className:"mx-auto my-0 flex"},{children:[L&&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(z,{src:p,srcSet:f,width:null==O?void 0:O.width,settings:m,bgColor:g,height:null==O?void 0:O.height,poster:y,provider:b,fit:x}),!E&&c(hi,{block:C,editor:S,settings:m,props:i.props}),l]}))})):c(li,Object.assign({attributes:s,blockId:u},{children:l}))},props:{src:null,srcSet:null,bgColor:null,sizes:{width:650,height:400},nodeType:"void",provider:{type:null,id:""},settings:{controls:!1,loop:!0,muted:!0,autoPlay:!0}}}},options:{accept:"video/*",maxSizes:{maxWidth:650,maxHeight:550},onUpload:()=>C(void 0,void 0,void 0,(function*(){return Promise.resolve({src:""})})),display:{title:"Video",description:"Upload from device, embed from Youtube, Vimeo"}},parsers:{html:{deserialize:{nodeNames:["VIDEO"],parse:e=>{if("VIDEO"===e.nodeName){const t={src:e.getAttribute("src"),srcSet:e.getAttribute("srcset"),bgColor:e.getAttribute("bgcolor"),sizes:{width:e.getAttribute("width"),height:e.getAttribute("height")},settings:{controls:!!e.getAttribute("controls"),loop:!!e.getAttribute("loop"),muted:!!e.getAttribute("muted"),autoPlay:!!e.getAttribute("autoplay")}};return{id:l(),type:"video",children:[{text:""}],props:t}}}}}}});!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"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=e:o.appendChild(document.createTextNode(e))}}(".yoo-video-absolute{position:absolute}.yoo-video-relative{position:relative}.yoo-video-left-0{left:0}.yoo-video-top-0{top:0}.yoo-video-h-full{height:100%}.yoo-video-w-full{width:100%}.yoopta-video .yoopta-video-options{opacity:0;transition:opacity .15s ease-in-out}.yoopta-video:hover .yoopta-video-options{opacity:1}");export{fi as default};
6
+ var it=["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(","),nt="undefined"==typeof Element,rt=nt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,st=!nt&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},at=function e(t,o){var i;void 0===o&&(o=!0);var n=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===n||"true"===n||o&&t&&e(t.parentNode)},lt=function e(t,o,i){for(var n=[],r=Array.from(t);r.length;){var s=r.shift();if(!at(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,i);i.flatten?n.push.apply(n,l):n.push({scopeParent:s,candidates:l})}else{rt.call(s,it)&&i.filter(s)&&(o||!t.includes(s))&&n.push(s);var d=s.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(s),c=!at(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(d&&c){var u=e(!0===d?s.children:d.children,!0,i);i.flatten?n.push.apply(n,u):n.push({scopeParent:s,candidates:u})}else r.unshift.apply(r,s.children)}}return n},dt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ct=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,o=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===o||"true"===o}(e))&&!dt(e)?0:e.tabIndex},ut=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},pt=function(e){return"INPUT"===e.tagName},ht=function(e){return function(e){return pt(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,o=e.form||st(e),i=function(e){return o.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var n=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]}(t,e.form);return!n||n===e}(e)},ft=function(e){var t=e.getBoundingClientRect(),o=t.width,i=t.height;return 0===o&&0===i},vt=function(e,t){var o=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=rt.call(e,"details>summary:first-of-type")?e.parentElement:e;if(rt.call(n,"details:not([open]) *"))return!0;if(o&&"full"!==o&&"legacy-full"!==o){if("non-zero-area"===o)return ft(e)}else{if("function"==typeof i){for(var r=e;e;){var s=e.parentElement,a=st(e);if(s&&!s.shadowRoot&&!0===i(s))return ft(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=r}if(function(e){var t,o,i,n,r=e&&st(e),s=null===(t=r)||void 0===t?void 0:t.host,a=!1;if(r&&r!==e)for(a=!!(null!==(o=s)&&void 0!==o&&null!==(i=o.ownerDocument)&&void 0!==i&&i.contains(s)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!a&&s;){var l,d,c;a=!(null===(d=s=null===(l=r=st(s))||void 0===l?void 0:l.host)||void 0===d||null===(c=d.ownerDocument)||void 0===c||!c.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==o)return!0}return!1},yt=function(e,t){return!(t.disabled||at(t)||function(e){return pt(e)&&"hidden"===e.type}(t)||vt(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var o=0;o<t.children.length;o++){var i=t.children.item(o);if("LEGEND"===i.tagName)return!!rt.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},gt=function(e,t){return!(ht(t)||ct(t)<0||!yt(e,t))},mt=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},wt=function e(t){var o=[],i=[];return t.forEach((function(t,n){var r=!!t.scopeParent,s=r?t.scopeParent:t,a=function(e,t){var o=ct(e);return o<0&&t&&!dt(e)?0:o}(s,r),l=r?e(t.candidates):s;0===a?r?o.push.apply(o,l):o.push(s):i.push({documentOrder:n,tabIndex:a,item:t,isScope:r,content:l})})),i.sort(ut).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(o)},bt=function(e,t){var o;return o=(t=t||{}).getShadowRoot?lt([e],t.includeContainer,{filter:gt.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:mt}):function(e,t,o){if(at(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(it));return t&&rt.call(e,it)&&i.unshift(e),i.filter(o)}(e,t.includeContainer,gt.bind(null,t)),wt(o)};const xt=u["useInsertionEffect".toString()]||(e=>e());var Ct="undefined"!=typeof document?v:h;function zt(){return zt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},zt.apply(this,arguments)}let St=!1,Rt=0;const _t=()=>"floating-ui-"+Rt++;const Et=u["useId".toString()]||function(){const[e,t]=u.useState((()=>St?_t():void 0));return Ct((()=>{null==e&&t(_t())}),[]),u.useEffect((()=>{St||(St=!0)}),[]),e};const Ot=u.createContext(null),kt=u.createContext(null);function Lt(e){return"data-floating-ui-"+e}const Nt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function jt(e,t){const o=bt(e,Nt());"prev"===t&&o.reverse();const i=o.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(o=t)||null==(o=o.shadowRoot)?void 0:o.activeElement);){var o;t=t.shadowRoot.activeElement}return t}((null==(n=e)?void 0:n.ownerDocument)||document));var n;return o.slice(i+1)[0]}function Mt(e,t){const o=t||e.currentTarget,i=e.relatedTarget;return!i||!function(e,t){if(!e||!t)return!1;const o=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&ee(o)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}(o,i)}function Wt(e){bt(e,Nt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function At(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const Tt={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 Bt(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Pt=u.forwardRef((function(e,t){const[o,i]=u.useState();Ct((()=>(/apple/i.test(navigator.vendor)&&i("button"),document.addEventListener("keydown",Bt),()=>{document.removeEventListener("keydown",Bt)})),[]);const n={ref:t,tabIndex:0,role:o,"aria-hidden":!o||void 0,[Lt("focus-guard")]:"",style:Tt};return u.createElement("span",zt({},e,n))})),It=u.createContext(null),Ht=Lt("portal");function Dt(e){let{children:t,id:o,root:i=null,preserveTabOrder:n=!0}=e;const r=function(e){let{id:t,root:o}=void 0===e?{}:e;const[i,n]=u.useState(null),r=Et(),s=Vt(),a=u.useRef(null);return Ct((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{a.current=null}))}),[i]),Ct((()=>{if(a.current)return;const e=t?document.getElementById(t):null;if(!e)return;const o=document.createElement("div");o.id=r,o.setAttribute(Ht,""),e.appendChild(o),a.current=o,n(o)}),[t,r]),Ct((()=>{if(a.current)return;let e=o||(null==s?void 0:s.portalNode);e&&!K(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(Ht,""),e=i||e,e.appendChild(l),a.current=l,n(l)}),[t,o,r,s]),i}({id:o,root:i}),[s,a]=u.useState(null),l=u.useRef(null),d=u.useRef(null),c=u.useRef(null),p=u.useRef(null),h=!!s&&!s.modal&&s.open&&n&&!(!i&&!r);return u.useEffect((()=>{if(r&&n&&(null==s||!s.modal))return r.addEventListener("focusin",e,!0),r.addEventListener("focusout",e,!0),()=>{r.removeEventListener("focusin",e,!0),r.removeEventListener("focusout",e,!0)};function e(e){if(r&&Mt(e)){("focusin"===e.type?At:Wt)(r)}}}),[r,n,null==s?void 0:s.modal]),u.createElement(It.Provider,{value:u.useMemo((()=>({preserveTabOrder:n,beforeOutsideRef:l,afterOutsideRef:d,beforeInsideRef:c,afterInsideRef:p,portalNode:r,setFocusManagerState:a})),[n,r])},h&&r&&u.createElement(Pt,{"data-type":"outside",ref:l,onFocus:e=>{if(Mt(e,r)){var t;null==(t=c.current)||t.focus()}else{const e=jt(document.body,"prev")||(null==s?void 0:s.refs.domReference.current);null==e||e.focus()}}}),h&&r&&u.createElement("span",{"aria-owns":r.id,style:Tt}),r&&x(t,r),h&&r&&u.createElement(Pt,{"data-type":"outside",ref:d,onFocus:e=>{if(Mt(e,r)){var t;null==(t=p.current)||t.focus()}else{const t=jt(document.body,"next")||(null==s?void 0:s.refs.domReference.current);null==t||t.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent))}}}))}const Vt=()=>u.useContext(It),Ft=new Set,Ut=u.forwardRef((function(e,t){let{lockScroll:o=!1,...i}=e;const n=Et();return Ct((()=>{if(!o)return;Ft.add(n);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=t.left?parseFloat(t.left):window.pageXOffset,a=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",r&&(t[i]=r+"px"),e){var l,d;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,o=(null==(d=window.visualViewport)?void 0:d.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(o))+"px",left:-(s-Math.floor(e))+"px",right:"0"})}return()=>{Ft.delete(n),0===Ft.size&&(Object.assign(t,{overflow:"",[i]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a)))}}),[n,o]),u.createElement("div",zt({ref:t},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))}));function Zt(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[r,s]=u.useState(null),a=(null==(t=e.elements)?void 0:t.reference)||r,l=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:i=[],platform:n,elements:{reference:r,floating:s}={},transform:a=!0,whileElementsMounted:l,open:d}=e,[c,p]=u.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[h,f]=u.useState(i);Qe(h,i)||f(i);const[v,y]=u.useState(null),[g,m]=u.useState(null),b=u.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),x=u.useCallback((e=>{e!==R.current&&(R.current=e,m(e))}),[]),C=r||v,z=s||g,S=u.useRef(null),R=u.useRef(null),_=u.useRef(c),E=null!=l,O=ot(l),k=ot(n),L=u.useCallback((()=>{if(!S.current||!R.current)return;const e={placement:t,strategy:o,middleware:h};k.current&&(e.platform=k.current),Je(S.current,R.current,e).then((e=>{const t={...e,isPositioned:!0};N.current&&!Qe(_.current,t)&&(_.current=t,w.flushSync((()=>{p(t)})))}))}),[h,t,o,k]);Ke((()=>{!1===d&&_.current.isPositioned&&(_.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const N=u.useRef(!1);Ke((()=>(N.current=!0,()=>{N.current=!1})),[]),Ke((()=>{if(C&&(S.current=C),z&&(R.current=z),C&&z){if(O.current)return O.current(C,z,L);L()}}),[C,z,L,O,E]);const j=u.useMemo((()=>({reference:S,floating:R,setReference:b,setFloating:x})),[b,x]),M=u.useMemo((()=>({reference:C,floating:z})),[C,z]),W=u.useMemo((()=>{const e={position:o,left:0,top:0};if(!M.floating)return e;const t=tt(M.floating,c.x),i=tt(M.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+i+"px)",...et(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,a,M.floating,c.x,c.y]);return u.useMemo((()=>({...c,update:L,refs:j,elements:M,floatingStyles:W})),[c,L,j,M,W])}(e),d=u.useContext(kt),c=null!=((null==(p=u.useContext(Ot))?void 0:p.id)||null);var p;const h=function(e){const t=u.useRef((()=>{}));return xt((()=>{t.current=e})),u.useCallback((function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return null==t.current?void 0:t.current(...o)}),[])}(((e,t,o)=>{e&&(v.current.openEvent=t),y.emit("openchange",{open:e,event:t,reason:o,nested:c}),null==i||i(e,t,o)})),f=u.useRef(null),v=u.useRef({}),y=u.useState((()=>function(){const e=new Map;return{emit(t,o){var i;null==(i=e.get(t))||i.forEach((e=>e(o)))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var i;e.set(t,(null==(i=e.get(t))?void 0:i.filter((e=>e!==o)))||[])}}}()))[0],g=Et(),m=u.useCallback((e=>{const t=K(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l.refs.setReference(t)}),[l.refs]),b=u.useCallback((e=>{(K(e)||null===e)&&(f.current=e,s(e)),(K(l.refs.reference.current)||null===l.refs.reference.current||null!==e&&!K(e))&&l.refs.setReference(e)}),[l.refs]),x=u.useMemo((()=>({...l.refs,setReference:b,setPositionReference:m,domReference:f})),[l.refs,b,m]),C=u.useMemo((()=>({...l.elements,domReference:a})),[l.elements,a]),z=u.useMemo((()=>({...l,refs:x,elements:C,dataRef:v,nodeId:n,floatingId:g,events:y,open:o,onOpenChange:h})),[l,n,g,y,o,h,x,C]);return Ct((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===n));e&&(e.context=z)})),u.useMemo((()=>({...l,context:z,refs:x,elements:C})),[l,x,C,z])}function $t(e,t){if(null==e)return{};var o,i,n={},r=Object.keys(e);for(i=0;i<r.length;i++)o=r[i],t.indexOf(o)>=0||(n[o]=e[o]);return n}var Yt=["color"],Xt=y((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=$t(e,Yt);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),g("path",{d:"M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Gt=["color"],qt=y((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=$t(e,Gt);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),g("path",{d:"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Jt=["color"],Kt=y((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=$t(e,Jt);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),g("path",{d:"M7.81832 0.68179C7.64258 0.506054 7.35766 0.506054 7.18192 0.68179L5.18192 2.68179C5.00619 2.85753 5.00619 3.14245 5.18192 3.31819C5.35766 3.49392 5.64258 3.49392 5.81832 3.31819L7.05012 2.08638L7.05012 5.50023C7.05012 5.74876 7.25159 5.95023 7.50012 5.95023C7.74865 5.95023 7.95012 5.74876 7.95012 5.50023L7.95012 2.08638L9.18192 3.31819C9.35766 3.49392 9.64258 3.49392 9.81832 3.31819C9.99406 3.14245 9.99406 2.85753 9.81832 2.68179L7.81832 0.68179ZM7.95012 12.9136V9.50023C7.95012 9.2517 7.74865 9.05023 7.50012 9.05023C7.25159 9.05023 7.05012 9.2517 7.05012 9.50023V12.9136L5.81832 11.6818C5.64258 11.5061 5.35766 11.5061 5.18192 11.6818C5.00619 11.8575 5.00619 12.1424 5.18192 12.3182L7.18192 14.3182C7.26632 14.4026 7.38077 14.45 7.50012 14.45C7.61947 14.45 7.73393 14.4026 7.81832 14.3182L9.81832 12.3182C9.99406 12.1424 9.99406 11.8575 9.81832 11.6818C9.64258 11.5061 9.35766 11.5061 9.18192 11.6818L7.95012 12.9136ZM1.49994 7.00017C1.2238 7.00017 0.999939 7.22403 0.999939 7.50017C0.999939 7.77631 1.2238 8.00017 1.49994 8.00017L13.4999 8.00017C13.7761 8.00017 13.9999 7.77631 13.9999 7.50017C13.9999 7.22403 13.7761 7.00017 13.4999 7.00017L1.49994 7.00017Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),Qt=["color"],eo=y((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=$t(e,Qt);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),g("path",{d:"M11.5 3.04999C11.7485 3.04999 11.95 3.25146 11.95 3.49999V7.49999C11.95 7.74852 11.7485 7.94999 11.5 7.94999C11.2515 7.94999 11.05 7.74852 11.05 7.49999V4.58639L4.58638 11.05H7.49999C7.74852 11.05 7.94999 11.2515 7.94999 11.5C7.94999 11.7485 7.74852 11.95 7.49999 11.95L3.49999 11.95C3.38064 11.95 3.26618 11.9026 3.18179 11.8182C3.0974 11.7338 3.04999 11.6193 3.04999 11.5L3.04999 7.49999C3.04999 7.25146 3.25146 7.04999 3.49999 7.04999C3.74852 7.04999 3.94999 7.25146 3.94999 7.49999L3.94999 10.4136L10.4136 3.94999L7.49999 3.94999C7.25146 3.94999 7.04999 3.74852 7.04999 3.49999C7.04999 3.25146 7.25146 3.04999 7.49999 3.04999L11.5 3.04999Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),to=["color"],oo=y((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=$t(e,to);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),g("path",{d:"M4.76447 3.12199C5.63151 3.04859 6.56082 3 7.5 3C8.43918 3 9.36849 3.04859 10.2355 3.12199C11.2796 3.21037 11.9553 3.27008 12.472 3.39203C12.9425 3.50304 13.2048 3.64976 13.4306 3.88086C13.4553 3.90618 13.4902 3.94414 13.5133 3.97092C13.7126 4.20149 13.8435 4.4887 13.918 5.03283C13.9978 5.6156 14 6.37644 14 7.52493C14 8.66026 13.9978 9.41019 13.9181 9.98538C13.8439 10.5206 13.7137 10.8061 13.5125 11.0387C13.4896 11.0651 13.4541 11.1038 13.4296 11.1287C13.2009 11.3625 12.9406 11.5076 12.4818 11.6164C11.9752 11.7365 11.3143 11.7942 10.2878 11.8797C9.41948 11.9521 8.47566 12 7.5 12C6.52434 12 5.58052 11.9521 4.7122 11.8797C3.68572 11.7942 3.02477 11.7365 2.51816 11.6164C2.05936 11.5076 1.7991 11.3625 1.57037 11.1287C1.54593 11.1038 1.51035 11.0651 1.48748 11.0387C1.28628 10.8061 1.15612 10.5206 1.08193 9.98538C1.00221 9.41019 1 8.66026 1 7.52493C1 6.37644 1.00216 5.6156 1.082 5.03283C1.15654 4.4887 1.28744 4.20149 1.48666 3.97092C1.5098 3.94414 1.54468 3.90618 1.56942 3.88086C1.7952 3.64976 2.05752 3.50304 2.52796 3.39203C3.04473 3.27008 3.7204 3.21037 4.76447 3.12199ZM0 7.52493C0 5.28296 0 4.16198 0.729985 3.31713C0.766457 3.27491 0.815139 3.22194 0.854123 3.18204C1.63439 2.38339 2.64963 2.29744 4.68012 2.12555C5.56923 2.05028 6.52724 2 7.5 2C8.47276 2 9.43077 2.05028 10.3199 2.12555C12.3504 2.29744 13.3656 2.38339 14.1459 3.18204C14.1849 3.22194 14.2335 3.27491 14.27 3.31713C15 4.16198 15 5.28296 15 7.52493C15 9.74012 15 10.8477 14.2688 11.6929C14.2326 11.7348 14.1832 11.7885 14.1444 11.8281C13.3629 12.6269 12.3655 12.71 10.3709 12.8763C9.47971 12.9505 8.50782 13 7.5 13C6.49218 13 5.52028 12.9505 4.62915 12.8763C2.63446 12.71 1.63712 12.6269 0.855558 11.8281C0.816844 11.7885 0.767442 11.7348 0.731221 11.6929C0 10.8477 0 9.74012 0 7.52493ZM5.25 5.38264C5.25 5.20225 5.43522 5.08124 5.60041 5.15369L10.428 7.27105C10.6274 7.35853 10.6274 7.64147 10.428 7.72895L5.60041 9.84631C5.43522 9.91876 5.25 9.79775 5.25 9.61736V5.38264Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))})),io=["color"],no=y((function(e,t){var o=e.color,i=void 0===o?"currentColor":o,n=$t(e,io);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n,{ref:t}),g("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:i,fillRule:"evenodd",clipRule:"evenodd"}))}));const ro={youtube:e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null},vimeo:e=>new URL(e).pathname.split("/")[1],dailymotion:e=>{const t=e.match(/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null}},so=({blockId:t,onClose:o})=>{const i=e(),[n,r]=p(""),s=0===n.length;return l("div",Object.assign({className:"yoo-video-cursor-pointer yoo-video-user-select-none yoo-video-transition-bg yoo-video-duration-20 yoo-video-ease-in yoo-video-white-space-nowrap yoo-video-w-full"},{children:[d("input",{type:"text",placeholder:"Paste video link",value:n,className:"yoo-video-items-center yoo-video-bg-[hsla(45,13%,94%,.6)] yoo-video-rounded-[4px] yoo-video-shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] yoo-video-cursor-text yoo-video-flex yoo-video-text-[14px] yoo-video-h-[32px] yoo-video-leading-[20px] yoo-video-px-[6px] yoo-video-relative yoo-video-w-full yoo-video-border-none",onChange:e=>r(e.target.value)}),d("button",Object.assign({type:"button",className:"yoo-video-user-select-none yoo-video-transition-bg yoo-video-duration-20 yoo-video-ease-in yoo-video-cursor-pointer yoo-video-flex yoo-video-items-center yoo-video-justify-center yoo-video-flex-shrink-0 yoo-video-white-space-nowrap yoo-video-h-[28px] yoo-video-rounded-[4px] yoo-video-shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] yoo-video-bg-[rgb(35,131,226)] yoo-video-text-white yoo-video-fill-white yoo-video-leading-[1.2] yoo-video-px-[12px] yoo-video-text-[14px] yoo-video-font-medium yoo-video-w-full yoo-video-max-w-[300px] yoo-video-mx-auto yoo-video-m-[12px_0_6px] disabled:yoo-video-bg-[rgba(35,131,226,0.5)] disabled:yoo-video-cursor-not-allowed",disabled:s,onClick:()=>{var e;if(0===n.length)return;const r=(s=n).includes("youtube.com")||s.includes("youtu.be")?"youtube":s.includes("vimeo.com")?"vimeo":s.includes("dailymotion.com")||s.includes("dai.ly")?"dailymotion":null;var s;const a=r?null===(e=ro[r])||void 0===e?void 0:e.call(ro,n):null;if(!r||!a)return console.warn("Unsopperted video provider or video id is not found.");i.blocks.Video.updateElement(t,"video",{src:n,provider:{type:r,id:a,url:n}}),o()}},{children:"Embed video"}))]}))},ao=({accept:o="video/*",onClose:i,blockId:n,onSetLoading:r})=>{const s=t("Video"),a=e();h((()=>{}),[]);return d("div",Object.assign({className:"yoo-video-user-select-none yoo-video-transition-bg yoo-video-duration-20 yoo-video-ease-in yoo-video-white-space-nowrap yoo-video-rounded-[4px] yoo-video-h-[32px] yoo-video-px-[12px] yoo-video-border yoo-video-border-[rgba(55,53,47,0.16)] yoo-video-w-full yoo-video-cursor-pointer"},{children:l("label",Object.assign({htmlFor:"video-uploader",className:"yoo-video-text-[14px] yoo-video-leading-[1.2] yoo-video-font-medium yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-items-center yoo-video-justify-center yoo-video-h-full"},{children:[d("input",{type:"file",id:"video-uploader",className:"yoo-video-absolute yoo-video-left-0 yoo-video-top-0 yoo-video-invisible",accept:(null==s?void 0:s.accept)||o,onChange:e=>{const t=e.target.files[0];t&&(e=>{z(void 0,void 0,void 0,(function*(){if(!(null==s?void 0:s.onUpload))throw new Error("onUpload not provided in plugin options. Check Video.extend({}) method");i(),r(!0);try{const t=yield null==s?void 0:s.onUpload(e);a.blocks.Video.updateElement(n,"video",{src:t.src,sizes:t.sizes,bgColor:t.bgColor})}catch(e){}finally{r(!1)}}))})(t)},multiple:!1}),"Upload video"]}))}))},lo=({floatingStyles:e,refs:t,onClose:o,blockId:i,onSetLoading:n})=>{const[r,s]=p("upload"),a=e=>s(e),c="upload"===r,u="embed"===r,h=e=>({borderBottom:e?"2px solid #2483e2":"2px solid transparent"});return d(Dt,Object.assign({id:"yoo-video-uploader-portal",root:document.getElementById("yoopta-editor")},{children:d(Ut,Object.assign({lockScroll:!0,className:"yoo-video-z-[100]",onClick:o},{children:d("div",Object.assign({ref:t.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:l("div",Object.assign({className:"yoo-video-flex yoo-video-flex-col yoo-video-min-w-[540px] yoo-video-max-w-[calc(100vw-24px)] yoo-video-h-full yoo-video-max-h-[420px] yoo-video-bg-white yoo-video-shadow-[rgb(15_15_15_/5%)_0px_0px_0px_1px,_rgb(15_15_15_/10%)_0px_3px_6px,_rgb(15_15_15_/20%)_0px_9px_24px]"},{children:[l("div",Object.assign({className:"yoo-video-w-full yoo-video-flex yoo-video-text-[14px] yoo-video-p-[0_8px] yoo-video-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-video-relative yoo-video-z-10 yoo-video-h-[40px]"},{children:[d("button",Object.assign({type:"button",onClick:()=>a("upload"),style:h(c),className:"yoo-video-py-[6px] yoo-video-whitespace-nowrap yoo-video-min-w-0 yoo-video-flex-shrink-0 yoo-video-text-[rgb(55,53,47)] yoo-video-relative yoo-video-cursor-pointer yoo-video-user-select-none yoo-video-bg-inherit yoo-video-transition-[height_20ms_ease-in] yoo-video-inline-flex yoo-video-items-center yoo-video-h-full yoo-video-text-[14px] yoo-video-leading-[1.2] yoo-video-px-[8px]"},{children:"Upload"})),d("button",Object.assign({type:"button",onClick:()=>a("embed"),style:h(u),className:"yoo-video-py-[6px] yoo-video-whitespace-nowrap yoo-video-min-w-0 yoo-video-flex-shrink-0 yoo-video-text-[rgb(55,53,47)] yoo-video-relative yoo-video-cursor-pointer yoo-video-user-select-none yoo-video-bg-inherit yoo-video-transition-[height_20ms_ease-in] yoo-video-inline-flex yoo-video-items-center yoo-video-h-full yoo-video-text-[14px] yoo-video-leading-[1.2] yoo-video-px-[8px]"},{children:"Video link"}))]})),l("div",Object.assign({className:"yoo-video-pt-[6px] yoo-video-pb-[6px] yoo-video-mt-[4px] yoo-video-flex yoo-video-justify-center yoo-video-mr-[12px] yoo-video-ml-[12px]"},{children:[u&&d(so,{onClose:o,blockId:i}),c&&d(ao,{onClose:o,blockId:i,onSetLoading:n})]}))]}))}))}))}))},co=({className:e,width:t,height:o,children:i})=>l("div",Object.assign({className:e},{children:[i,d("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-2 yoo-video-h-4 yoo-video-w-4 yoo-video-animate-spin"},{children:d("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),uo=({attributes:e,children:t,blockId:o})=>{const[i,n]=p(!1),[r,s]=p(!1),{refs:a,floatingStyles:c}=Zt({placement:"bottom",open:i,onOpenChange:n,middleware:[qe(),Ge(),Xe(),je(10)]});return l("div",Object.assign({className:"yoo-video-w-full yoo-video-user-select-none yoo-video-m-[20px_0_10px] yoo-video-relative yoo-video-flex"},e,{contentEditable:!1},{children:[l("button",Object.assign({className:"yoo-video-p-[12px_36px_12px_12px] yoo-video-flex yoo-video-items-center yoo-video-text-left yoo-video-w-full yoo-video-overflow-hidden yoo-video-rounded-[3px] yoo-video-text-[14px] yoo-video-text-[rgba(55,53,47,0.65)] yoo-video-relative yoo-video-cursor-pointer yoo-video-border-none yoo-video-bg-[#efefef] yoo-video-transition-[background-color_100ms_ease-in] hover:yoo-video-bg-[#e3e3e3]",onClick:()=>n(!0),disabled:r,ref:a.setReference},{children:[d(r?co:oo,{className:"yoo-video-mr-2 yoo-video-user-select-none",width:24,height:24}),d("span",Object.assign({className:"yoo-video-font-medium"},{children:r?"Loading...":"Click to add video"})),r&&d("div",{className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-h-full yoo-video-bg-[rgba(55,53,47,0.16)]",style:{width:"100%",transition:"width 100ms ease-in"}})]})),i&&d(lo,{blockId:o,floatingStyles:c,refs:a,onClose:()=>n(!1),onSetLoading:e=>s(e)}),t]}))},{ExtendedBlockActions:po,BlockOptionsMenuGroup:ho,BlockOptionsMenuItem:fo,BlockOptionsSeparator:vo}=o,yo=({editor:e,block:t,props:o})=>{var i;const n=!!(null===(i=null==o?void 0:o.provider)||void 0===i?void 0:i.id);return l(po,Object.assign({onClick:()=>e.setSelection([t.meta.order]),className:"yoopta-video-options"},{children:[d(vo,{}),!n&&l(ho,{children:[d(fo,{children:l("button",Object.assign({type:"button",className:"yoo-video-rounded-sm hover:yoo-video-bg-[#37352f14] yoo-video-leading-[120%] yoo-video-px-2 yoo-video-py-1.5 yoo-video-mx-[4px] yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-justify-start",onClick:()=>{e.blocks.Image.updateElement(t.id,"video",{fit:"contain"})}},{children:[d(Kt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Fit"]}))}),d(fo,{children:l("button",Object.assign({type:"button",className:"yoo-video-rounded-sm hover:yoo-video-bg-[#37352f14] yoo-video-leading-[120%] yoo-video-px-2 yoo-video-py-1.5 yoo-video-mx-[4px] yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-justify-start",onClick:()=>{e.blocks.Image.updateElement(t.id,"video",{fit:"fill"})}},{children:[d(no,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Fill"]}))}),d(fo,{children:l("button",Object.assign({type:"button",className:"yoo-video-rounded-sm hover:yoo-video-bg-[#37352f14] yoo-video-leading-[120%] yoo-video-px-2 yoo-video-py-1.5 yoo-video-mx-[4px] yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-justify-start",onClick:()=>{e.blocks.Image.updateElement(t.id,"video",{fit:"cover"})}},{children:[d(eo,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Cover"]}))})]}),d(vo,{}),d(ho,{children:d(fo,{children:d("button",Object.assign({type:"button",className:"yoo-video-rounded-sm hover:yoo-video-bg-[#37352f14] yoo-video-leading-[120%] yoo-video-px-2 yoo-video-py-1.5 yoo-video-mx-[4px] yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-justify-start",onClick:n?()=>{var e,t;(null===(e=null==o?void 0:o.provider)||void 0===e?void 0:e.url)&&window.open(null===(t=null==o?void 0:o.provider)||void 0===t?void 0:t.url,"_blank")}:()=>{if(!o||!o.src||n)return;const e=document.createElement("a");e.href=o.src,e.download=o.src,e.target="_blank",e.rel="noopener noreferrer",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},{children:l(c,n?{children:[d(qt,{width:16,height:16,className:"yoo-embed-w-4 yoo-embed-h-4 yoo-embed-mr-2"}),"Open"]}:{children:[d(Xt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Download"]})}))})})]}))},go=({position:e})=>d("div",Object.assign({contentEditable:!1,className:"yoo-video-absolute yoo-video-pointer-events-none yoo-video-flex yoo-video-items-center yoo-video-justify-center yoo-video-z-10 yoo-video-opacity-1 yoo-video-h-full yoo-video-w-[15px] yoo-video-cursor-col-resize yoo-video-transition-opacity yoo-video-duration-150 yoo-video-ease-in "+("left"===e?"yoo-video-left-0 yoo-video-top-0":"yoo-video-right-0 yoo-video-top-0")},{children:d("div",{className:"yoo-video-opacity-100 yoo-video-transition-opacity yoo-video-duration-300 yoo-video-ease-in yoo-video-rounded-[20px] yoo-video-bg-[rgba(15,15,15,0.6)] yoo-video-border yoo-video-border-[rgba(255,255,255,0.9)] yoo-video-w-[6px] yoo-video-h-[48px] yoo-video-max-h-[50%] yoo-video-shadow-[0_0_0_.5px_#FFF]"})})),mo=new s({type:"Video",elements:{video:{render:({element:o,attributes:s,children:a,blockId:c})=>{const{src:u,srcSet:f,bgColor:v,settings:y,sizes:g,poster:w,provider:b,fit:x}=o.props||{},C=i(c),z=e(),S=t("Video"),R=n(),[E,O]=p({width:(null==g?void 0:g.width)||750,height:(null==g?void 0:g.height)||440});h((()=>O({width:(null==g?void 0:g.width)||650,height:(null==g?void 0:g.height)||440})),[o.props]);const k=r({blockId:c}),L=m((()=>{var e,t;return{minWidth:300,size:{width:E.width,height:E.height},maxWidth:(null===(e=null==S?void 0:S.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(t=null==S?void 0:S.maxSizes)||void 0===t?void 0:t.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!R,right:!R},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{O({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,t,o)=>{z.blocks.Video.updateElement(c,"video",{sizes:{width:o.offsetWidth,height:o.offsetHeight}})},handleComponent:{left:d(go,{position:"left"}),right:d(go,{position:"right"})}}}),[E.width,E.height]);return u?d("div",Object.assign({"data-element-type":o.type,contentEditable:!1,draggable:!1,className:"yoo-video-mt-4 yoo-video-relative yoopta-video"},s,{children:l(Y,Object.assign({},L,{className:"yoo-video-mx-auto yoo-video-my-0 yoo-video-flex"},{children:[k&&d("div",{className:"yoo-video-absolute yoo-video-pointer-events-none yoo-video-inset-0 yoo-video-bg-[rgba(35,131,226,0.14)] yoo-video-z-[81] yoo-video-rounded-[3px] yoo-video-opacity-100 yoo-video-transition-opacity yoo-video-duration-150 yoo-video-ease-in"}),d(_,{src:u,srcSet:f,width:null==E?void 0:E.width,settings:y,bgColor:v,height:null==E?void 0:E.height,poster:w,provider:b,fit:x}),!R&&d(yo,{block:C,editor:z,settings:y,props:o.props}),a]}))})):d(uo,Object.assign({attributes:s,blockId:c},{children:a}))},props:{src:null,srcSet:null,bgColor:null,sizes:{width:650,height:400},nodeType:"void",provider:{type:null,id:""},settings:{controls:!1,loop:!0,muted:!0,autoPlay:!0}}}},options:{accept:"video/*",maxSizes:{maxWidth:650,maxHeight:550},onUpload:()=>z(void 0,void 0,void 0,(function*(){return Promise.resolve({src:""})})),display:{title:"Video",description:"Upload from device, embed from Youtube, Vimeo"}},parsers:{html:{deserialize:{nodeNames:["VIDEO"],parse:e=>{if("VIDEO"===e.nodeName){const t={src:e.getAttribute("src"),srcSet:e.getAttribute("srcset"),bgColor:e.getAttribute("bgcolor"),sizes:{width:e.getAttribute("width"),height:e.getAttribute("height")},settings:{controls:!!e.getAttribute("controls"),loop:!!e.getAttribute("loop"),muted:!!e.getAttribute("muted"),autoPlay:!!e.getAttribute("autoplay")}};return{id:a(),type:"video",children:[{text:""}],props:t}}}}}}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".yoo-video-pointer-events-none{pointer-events:none}.yoo-video-invisible{visibility:hidden}.yoo-video-absolute{position:absolute}.yoo-video-relative{position:relative}.yoo-video-inset-0{inset:0}.yoo-video-left-0{left:0}.yoo-video-right-0{right:0}.yoo-video-top-0{top:0}.yoo-video-z-10{z-index:10}.yoo-video-z-\\[100\\]{z-index:100}.yoo-video-z-\\[81\\]{z-index:81}.yoo-video-m-\\[12px_0_6px\\]{margin:12px 0 6px}.yoo-video-m-\\[20px_0_10px\\]{margin:20px 0 10px}.yoo-video-mx-\\[4px\\]{margin-left:4px;margin-right:4px}.yoo-video-mx-auto{margin-left:auto;margin-right:auto}.yoo-video-my-0{margin-bottom:0;margin-top:0}.yoo-video-ml-\\[12px\\]{margin-left:12px}.yoo-video-mr-2{margin-right:.5rem}.yoo-video-mr-\\[12px\\]{margin-right:12px}.yoo-video-mt-4{margin-top:1rem}.yoo-video-mt-\\[4px\\]{margin-top:4px}.yoo-video-flex{display:flex}.yoo-video-inline-flex{display:inline-flex}.yoo-video-h-4{height:1rem}.yoo-video-h-\\[28px\\]{height:28px}.yoo-video-h-\\[32px\\]{height:32px}.yoo-video-h-\\[40px\\]{height:40px}.yoo-video-h-\\[48px\\]{height:48px}.yoo-video-h-full{height:100%}.yoo-video-max-h-\\[420px\\]{max-height:420px}.yoo-video-max-h-\\[50\\%\\]{max-height:50%}.yoo-video-w-4{width:1rem}.yoo-video-w-\\[15px\\]{width:15px}.yoo-video-w-\\[6px\\]{width:6px}.yoo-video-w-full{width:100%}.yoo-video-min-w-0{min-width:0}.yoo-video-min-w-\\[540px\\]{min-width:540px}.yoo-video-max-w-\\[300px\\]{max-width:300px}.yoo-video-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.yoo-video-flex-shrink-0{flex-shrink:0}@keyframes yoo-video-spin{to{transform:rotate(1turn)}}.yoo-video-animate-spin{animation:yoo-video-spin 1s linear infinite}.yoo-video-cursor-col-resize{cursor:col-resize}.yoo-video-cursor-pointer{cursor:pointer}.yoo-video-cursor-text{cursor:text}.yoo-video-flex-col{flex-direction:column}.yoo-video-items-center{align-items:center}.yoo-video-justify-start{justify-content:flex-start}.yoo-video-justify-center{justify-content:center}.yoo-video-overflow-hidden{overflow:hidden}.yoo-video-whitespace-nowrap{white-space:nowrap}.yoo-video-rounded-\\[20px\\]{border-radius:20px}.yoo-video-rounded-\\[3px\\]{border-radius:3px}.yoo-video-rounded-\\[4px\\]{border-radius:4px}.yoo-video-rounded-sm{border-radius:.125rem}.yoo-video-border{border-width:1px}.yoo-video-border-none{border-style:none}.yoo-video-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.yoo-video-border-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{border-color:rgba(55,53,47,.16)}.yoo-video-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.yoo-video-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.yoo-video-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.yoo-video-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.yoo-video-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.yoo-video-bg-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{background-color:rgba(55,53,47,.16)}.yoo-video-bg-inherit{background-color:inherit}.yoo-video-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-video-fill-white{fill:#fff}.yoo-video-object-cover{-o-object-fit:cover;object-fit:cover}.yoo-video-p-\\[0_8px\\]{padding:0 8px}.yoo-video-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.yoo-video-px-2{padding-left:.5rem;padding-right:.5rem}.yoo-video-px-\\[12px\\]{padding-left:12px;padding-right:12px}.yoo-video-px-\\[6px\\]{padding-left:6px;padding-right:6px}.yoo-video-px-\\[8px\\]{padding-left:8px;padding-right:8px}.yoo-video-py-1{padding-bottom:.25rem;padding-top:.25rem}.yoo-video-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.yoo-video-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.yoo-video-pb-\\[6px\\]{padding-bottom:6px}.yoo-video-pt-\\[6px\\]{padding-top:6px}.yoo-video-text-left{text-align:left}.yoo-video-text-\\[14px\\]{font-size:14px}.yoo-video-font-medium{font-weight:500}.yoo-video-leading-\\[1\\.2\\]{line-height:1.2}.yoo-video-leading-\\[120\\%\\]{line-height:120%}.yoo-video-leading-\\[20px\\]{line-height:20px}.yoo-video-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.yoo-video-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}.yoo-video-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.yoo-video-opacity-100{opacity:1}.yoo-video-shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-video-shadow-\\[inset_0_0_0_1px_hsla\\(0\\,0\\%\\,6\\%\\,\\.1\\)\\]{--tw-shadow:inset 0 0 0 1px hsla(0,0%,6%,.1);--tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-video-shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\,_rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\,_rgb\\(15_15_15_\\/20\\%\\)_0px_9px_24px\\]{--tw-shadow:rgb(15 15 15/5%) 0px 0px 0px 1px,hsla(0,0%,6%,.1) 0px 3px 6px,hsla(0,0%,6%,.2) 0px 9px 24px;--tw-shadow-colored:0px 0px 0px 1px var(--tw-shadow-color),0px 3px 6px var(--tw-shadow-color),0px 9px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-video-shadow-\\[rgb\\(55_53_47_\\/9\\%\\)_0px_-1px_0px_inset\\]{--tw-shadow:rgb(55 53 47/9%) 0px -1px 0px inset;--tw-shadow-colored:inset 0px -1px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-video-shadow-\\[rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_0px_0px_1px_inset\\,_rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_1px_2px\\]{--tw-shadow:hsla(0,0%,6%,.1) 0px 0px 0px 1px inset,hsla(0,0%,6%,.1) 0px 1px 2px;--tw-shadow-colored:inset 0px 0px 0px 1px var(--tw-shadow-color),0px 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-video-transition-\\[background-color_100ms_ease-in\\]{transition-duration:.15s;transition-property:background-color .1s ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-video-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-video-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-video-duration-150{transition-duration:.15s}.yoo-video-duration-300{transition-duration:.3s}.yoo-video-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-video .yoopta-video-options{opacity:0;transition:opacity .15s ease-in-out}.yoopta-video:hover .yoopta-video-options{opacity:1}.hover\\:yoo-video-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:yoo-video-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:yoo-video-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:yoo-video-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}");export{mo as default};
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@yoopta/editor"),t=require("react/jsx-runtime"),n=require("react"),i=require("react-dom");function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r=o(n),s=o(i);function l(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function a(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{a(i.next(e))}catch(e){r(e)}}function l(e){try{a(i.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,l)}a((i=i.apply(e,t||[])).next())}))}function c(e,{threshold:t=0,root:i=null,rootMargin:o="0%",freezeOnceVisible:r=!1}={}){const[s,l]=n.useState({}),a=s.isIntersecting&&r,c=([e])=>l(e);return n.useEffect((()=>{const n=null==e?void 0:e.current;if(!window.IntersectionObserver||a||!n)return;const r=new IntersectionObserver(c,{threshold:t,root:i,rootMargin:o});return r.observe(n),()=>r.disconnect()}),[e,t,i,o,a]),s}"function"==typeof SuppressedError&&SuppressedError;const u={vimeo:function(e){var{videoId:i}=e,o=l(e,["videoId"]);const r=n.useRef(null),[s,a]=n.useState(null),[u,d]=n.useState(!1),{isIntersecting:h}=c(r,{freezeOnceVisible:!0,rootMargin:"50%"});return n.useEffect((()=>{fetch(`https://vimeo.com/api/v2/video/${i}.json`).then((e=>e.json())).then((e=>a(e[0].thumbnail_medium))).catch((()=>a(null)))}),[i]),t.jsxs("div",Object.assign({ref:r,className:"yoo-video-relative"},{children:[t.jsx("img",{src:s||"",alt:"vimeo_video_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:h&&u?0:1,zIndex:h&&u?-1:0}}),h&&t.jsx("iframe",Object.assign({title:"Video Player",src:`https://player.vimeo.com/video/${i}?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"},o))]}))},youtube:function(e){var{videoId:i}=e,o=l(e,["videoId"]);const r=n.useRef(null),[s,a]=n.useState(!1),{isIntersecting:u}=c(r,{freezeOnceVisible:!0,rootMargin:"50%"});return t.jsxs("div",Object.assign({ref:r,className:"yoo-video-relative"},{children:[t.jsx("img",{src:`https://i.ytimg.com/vi/${i}/default.jpg`,alt:"youtube_video_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:u&&s?0:1,zIndex:u&&s?-1:0}}),u&&t.jsx("iframe",Object.assign({title:"Video Player",src:`https://www.youtube.com/embed/${i}`,frameBorder:0,onLoad:()=>a(!0),allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},o))]}))},dailymotion:function(e){var{videoId:i}=e,o=l(e,["videoId"]);const r=n.useRef(null),[s,a]=n.useState(null),[u,d]=n.useState(!1),{isIntersecting:h}=c(r,{freezeOnceVisible:!0,rootMargin:"50%"});return n.useEffect((()=>{fetch((e=>`https://api.dailymotion.com/video/${e}?fields=thumbnail_url`)(i)).then((e=>e.json())).then((e=>a(e.thumbnail_url))).catch((()=>a(null)))}),[i]),t.jsxs("div",Object.assign({ref:r,className:"yoo-video-relative"},{children:[t.jsx("img",{src:s||"",alt:"daylimotion_video_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:h&&u?0:1,zIndex:h&&u?-1:0}}),h&&t.jsx("iframe",Object.assign({title:"Dailymotion Video Player",frameBorder:0,onLoad:()=>d(!0),src:`https://www.dailymotion.com/embed/video/${i}`,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},o))]}))}},d=({width:e,height:n,src:i,settings:o,bgColor:r,poster:s,provider:l,fit:a})=>{const c={backgroundColor:r||"transparent",objectFit:a||"contain"};if(l&&l.id&&l.type&&u[l.type]){const i=u[l.type];return t.jsx(i,{videoId:l.id,width:e,height:n})}return t.jsx("div",Object.assign({className:"w-full"},{children:i&&t.jsx("video",{preload:"metadata",poster:s,src:i,width:e,height:n,onDragStart:e=>e.preventDefault(),className:"object-cover w-full h-full",style:c,playsInline:!0,controls:!0})}))};var h,p=(h=function(e,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},h(e,t)},function(e,t){function n(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),f=function(){return f=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},f.apply(this,arguments)},g={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},m={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},v={width:"20px",height:"20px",position:"absolute"},w={top:f(f({},g),{top:"-5px"}),right:f(f({},m),{left:void 0,right:"-5px"}),bottom:f(f({},g),{top:void 0,bottom:"-5px"}),left:f(f({},m),{left:"-5px"}),topRight:f(f({},v),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:f(f({},v),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:f(f({},v),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:f(f({},v),{left:"-10px",top:"-10px",cursor:"nw-resize"})},y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return p(t,e),t.prototype.render=function(){return r.createElement("div",{className:this.props.className||"",style:f(f({position:"absolute",userSelect:"none"},w[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(r.PureComponent),b=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),x=function(){return x=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},x.apply(this,arguments)},C={width:"auto",height:"auto"},S=function(e,t,n){return Math.max(Math.min(e,n),t)},R=function(e,t){return Math.round(e/t)*t},z=function(e,t){return new RegExp(e,"i").test(t)},E=function(e){return Boolean(e.touches&&e.touches.length)},j=function(e,t,n){void 0===n&&(n=0);var i=t.reduce((function(n,i,o){return Math.abs(i-e)<Math.abs(t[n]-e)?o:n}),0),o=Math.abs(t[i]-e);return 0===n||o<n?t[i]:e},O=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},L=function(e,t,n,i){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return n*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return i*(Number(e.replace("vh",""))/100)}return e},N=["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"],k="__resizable_base__",_=function(e){function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(k):t.className+=k,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.ref=function(e){e&&(n.resizable=e)},n.state={isResizing:!1,width:void 0===(n.propsSize&&n.propsSize.width)?"auto":n.propsSize&&n.propsSize.width,height:void 0===(n.propsSize&&n.propsSize.height)?"auto":n.propsSize&&n.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},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return b(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||C},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,i=this.resizable.offsetHeight,o=this.resizable.style.position;"relative"!==o&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:n,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=o}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,n=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var n=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/n[t]*100+"%"}return O(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?O(t.width):n("width"),height:t&&void 0!==t.height&&!this.state.isResizing?O(t.height):n("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;"wrap"!==n&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==n&&"auto"!==n?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n,i,o=this.props.boundsByDirection,r=this.state.direction,s=o&&z("left",r),l=o&&z("top",r);if("parent"===this.props.bounds){var a=this.parentNode;a&&(n=s?this.resizableRight-this.parentLeft:a.offsetWidth+(this.parentLeft-this.resizableLeft),i=l?this.resizableBottom-this.parentTop:a.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(n=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=l?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(n=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=l?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return n&&Number.isFinite(n)&&(e=e&&e<n?e:n),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,i=this.props.resizeRatio||1,o=this.state,r=o.direction,s=o.original,l=this.props,a=l.lockAspectRatio,c=l.lockAspectRatioExtraHeight,u=l.lockAspectRatioExtraWidth,d=s.width,h=s.height,p=c||0,f=u||0;return z("right",r)&&(d=s.width+(e-s.x)*i/n,a&&(h=(d-f)/this.ratio+p)),z("left",r)&&(d=s.width-(e-s.x)*i/n,a&&(h=(d-f)/this.ratio+p)),z("bottom",r)&&(h=s.height+(t-s.y)*i/n,a&&(d=(h-p)*this.ratio+f)),z("top",r)&&(h=s.height-(t-s.y)*i/n,a&&(d=(h-p)*this.ratio+f)),{newWidth:d,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,i){var o=this.props,r=o.lockAspectRatio,s=o.lockAspectRatioExtraHeight,l=o.lockAspectRatioExtraWidth,a=void 0===i.width?10:i.width,c=void 0===n.width||n.width<0?e:n.width,u=void 0===i.height?10:i.height,d=void 0===n.height||n.height<0?t:n.height,h=s||0,p=l||0;if(r){var f=(u-h)*this.ratio+p,g=(d-h)*this.ratio+p,m=(a-p)/this.ratio+h,v=(c-p)/this.ratio+h,w=Math.max(a,f),y=Math.min(c,g),b=Math.max(u,m),x=Math.min(d,v);e=S(e,w,y),t=S(t,b,x)}else e=S(e,a,c),t=S(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var n=this.props.bounds.getBoundingClientRect();this.targetLeft=n.left,this.targetTop=n.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),o=i.left,r=i.top,s=i.right,l=i.bottom;this.resizableLeft=o,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=l}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var n,i=0,o=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,o=e.nativeEvent.clientY):e.nativeEvent&&E(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,o=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var s=this.parentNode;if(s){var l=this.window.getComputedStyle(s).flexDirection;this.flexDir=l.startsWith("row")?"row":"column",n=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var a={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:x(x({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:n};this.setState(a)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&E(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var n=this.props,o=n.maxWidth,r=n.maxHeight,s=n.minWidth,l=n.minHeight,a=E(e)?e.touches[0].clientX:e.clientX,c=E(e)?e.touches[0].clientY:e.clientY,u=this.state,d=u.direction,h=u.original,p=u.width,f=u.height,g=this.getParentSize(),m=function(e,t,n,i,o,r,s){return i=L(i,e.width,t,n),o=L(o,e.height,t,n),r=L(r,e.width,t,n),s=L(s,e.height,t,n),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===o?void 0:Number(o),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(g,this.window.innerWidth,this.window.innerHeight,o,r,s,l);o=m.maxWidth,r=m.maxHeight,s=m.minWidth,l=m.minHeight;var v=this.calculateNewSizeFromDirection(a,c),w=v.newHeight,y=v.newWidth,b=this.calculateNewMaxFromBoundary(o,r);this.props.snap&&this.props.snap.x&&(y=j(y,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(w=j(w,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(y,w,{width:b.maxWidth,height:b.maxHeight},{width:s,height:l});if(y=x.newWidth,w=x.newHeight,this.props.grid){var C=R(y,this.props.grid[0]),S=R(w,this.props.grid[1]),z=this.props.snapGap||0;y=0===z||Math.abs(C-y)<=z?C:y,w=0===z||Math.abs(S-w)<=z?S:w}var O={width:y-h.width,height:w-h.height};if(p&&"string"==typeof p)if(p.endsWith("%"))y=y/g.width*100+"%";else if(p.endsWith("vw")){y=y/this.window.innerWidth*100+"vw"}else if(p.endsWith("vh")){y=y/this.window.innerHeight*100+"vh"}if(f&&"string"==typeof f)if(f.endsWith("%"))w=w/g.height*100+"%";else if(f.endsWith("vw")){w=w/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){w=w/this.window.innerHeight*100+"vh"}var N={width:this.createSizeForCssProperty(y,"width"),height:this.createSizeForCssProperty(w,"height")};"row"===this.flexDir?N.flexBasis=N.width:"column"===this.flexDir&&(N.flexBasis=N.height),i.flushSync((function(){t.setState(N)})),this.props.onResize&&this.props.onResize(e,d,this.resizable,O)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,i=t.direction,o=t.original;if(n&&this.resizable){var r={width:this.size.width-o.width,height:this.size.height-o.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:x(x({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,i=t.handleStyles,o=t.handleClasses,s=t.handleWrapperStyle,l=t.handleWrapperClass,a=t.handleComponent;if(!n)return null;var c=Object.keys(n).map((function(t){return!1!==n[t]?r.createElement(y,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:o&&o[t]},a&&a[t]?a[t]:null):null}));return r.createElement("div",{className:l,style:s},c)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,n){return-1!==N.indexOf(n)||(t[n]=e.props[n]),t}),{}),n=x(x(x({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&&(n.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return r.createElement(i,x({ref:this.ref,style:n,className:this.props.className},t),this.state.isResizing&&r.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(r.PureComponent);function M(e){return P(e)?(e.nodeName||"").toLowerCase():"#document"}function W(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function A(e){var t;return null==(t=(P(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function P(e){return e instanceof Node||e instanceof W(e).Node}function T(e){return e instanceof Element||e instanceof W(e).Element}function B(e){return e instanceof HTMLElement||e instanceof W(e).HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof W(e).ShadowRoot)}function D(e){const{overflow:t,overflowX:n,overflowY:i,display:o}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(o)}function H(e){return["table","td","th"].includes(M(e))}function V(e){const t=F(),n=Y(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function F(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function U(e){return["html","body","#document"].includes(M(e))}function Y(e){return W(e).getComputedStyle(e)}function $(e){return T(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function X(e){if("html"===M(e))return e;const t=e.assignedSlot||e.parentNode||I(e)&&e.host||A(e);return I(t)?t.host:t}function Z(e){const t=X(e);return U(t)?e.ownerDocument?e.ownerDocument.body:e.body:B(t)&&D(t)?t:Z(t)}function q(e,t,n){var i;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Z(e),r=o===(null==(i=e.ownerDocument)?void 0:i.body),s=W(o);return r?t.concat(s,s.visualViewport||[],D(o)?o:[],s.frameElement&&n?q(s.frameElement):[]):t.concat(o,q(o,[],n))}const G=Math.min,J=Math.max,K=Math.round,Q=e=>({x:e,y:e}),ee={left:"right",right:"left",bottom:"top",top:"bottom"},te={start:"end",end:"start"};function ne(e,t,n){return J(e,G(t,n))}function ie(e,t){return"function"==typeof e?e(t):e}function oe(e){return e.split("-")[0]}function re(e){return e.split("-")[1]}function se(e){return"x"===e?"y":"x"}function le(e){return"y"===e?"height":"width"}function ae(e){return["top","bottom"].includes(oe(e))?"y":"x"}function ce(e){return se(ae(e))}function ue(e){return e.replace(/start|end/g,(e=>te[e]))}function de(e){return e.replace(/left|right|bottom|top/g,(e=>ee[e]))}function he(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function pe(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function fe(e,t,n){let{reference:i,floating:o}=e;const r=ae(t),s=ce(t),l=le(s),a=oe(t),c="y"===r,u=i.x+i.width/2-o.width/2,d=i.y+i.height/2-o.height/2,h=i[l]/2-o[l]/2;let p;switch(a){case"top":p={x:u,y:i.y-o.height};break;case"bottom":p={x:u,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:d};break;case"left":p={x:i.x-o.width,y:d};break;default:p={x:i.x,y:i.y}}switch(re(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1)}return p}async function ge(e,t){var n;void 0===t&&(t={});const{x:i,y:o,platform:r,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=ie(t,e),f=he(p),g=l[h?"floating"===d?"reference":"floating":d],m=pe(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(g)))||n?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:a})),v="floating"===d?{...s.floating,x:i,y:o}:s.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),y=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},b=pe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:w,strategy:a}):v);return{top:(m.top-b.top+f.top)/y.y,bottom:(b.bottom-m.bottom+f.bottom)/y.y,left:(m.left-b.left+f.left)/y.x,right:(b.right-m.right+f.right)/y.x}}function me(e){const t=G(...e.map((e=>e.left))),n=G(...e.map((e=>e.top)));return{x:t,y:n,width:J(...e.map((e=>e.right)))-t,height:J(...e.map((e=>e.bottom)))-n}}const ve=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:o,y:r,placement:s,middlewareData:l}=t,a=await async function(e,t){const{placement:n,platform:i,elements:o}=e,r=await(null==i.isRTL?void 0:i.isRTL(o.floating)),s=oe(n),l=re(n),a="y"===ae(n),c=["left","top"].includes(s)?-1:1,u=r&&a?-1:1,d=ie(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof f&&(p="end"===l?-1*f:f),a?{x:p*u,y:h*c}:{x:h*c,y:p*u}}(t,e);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(i=l.arrow)&&i.alignmentOffset?{}:{x:o+a.x,y:r+a.y,data:{...a,placement:s}}}}};function we(e){const t=Y(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=B(e),r=o?e.offsetWidth:n,s=o?e.offsetHeight:i,l=K(n)!==r||K(i)!==s;return l&&(n=r,i=s),{width:n,height:i,$:l}}function ye(e){return T(e)?e:e.contextElement}function be(e){const t=ye(e);if(!B(t))return Q(1);const n=t.getBoundingClientRect(),{width:i,height:o,$:r}=we(t);let s=(r?K(n.width):n.width)/i,l=(r?K(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const xe=Q(0);function Ce(e){const t=W(e);return F()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:xe}function Se(e,t,n,i){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),r=ye(e);let s=Q(1);t&&(i?T(i)&&(s=be(i)):s=be(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==W(e))&&t}(r,n,i)?Ce(r):Q(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(r){const e=W(r),t=i&&T(i)?W(i):i;let n=e,o=n.frameElement;for(;o&&i&&t!==n;){const e=be(o),t=o.getBoundingClientRect(),i=Y(o),r=t.left+(o.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(i.paddingTop))*e.y;a*=e.x,c*=e.y,u*=e.x,d*=e.y,a+=r,c+=s,n=W(o),o=n.frameElement}}return pe({width:u,height:d,x:a,y:c})}const Re=[":popover-open",":modal"];function ze(e){return Re.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ee(e){return Se(A(e)).left+$(e).scrollLeft}function je(e,t,n){let i;if("viewport"===t)i=function(e,t){const n=W(e),i=A(e),o=n.visualViewport;let r=i.clientWidth,s=i.clientHeight,l=0,a=0;if(o){r=o.width,s=o.height;const e=F();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,a=o.offsetTop)}return{width:r,height:s,x:l,y:a}}(e,n);else if("document"===t)i=function(e){const t=A(e),n=$(e),i=e.ownerDocument.body,o=J(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=J(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+Ee(e);const l=-n.scrollTop;return"rtl"===Y(i).direction&&(s+=J(t.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:l}}(A(e));else if(T(t))i=function(e,t){const n=Se(e,!0,"fixed"===t),i=n.top+e.clientTop,o=n.left+e.clientLeft,r=B(e)?be(e):Q(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:o*r.x,y:i*r.y}}(t,n);else{const n=Ce(e);i={...t,x:t.x-n.x,y:t.y-n.y}}return pe(i)}function Oe(e,t){const n=X(e);return!(n===t||!T(n)||U(n))&&("fixed"===Y(n).position||Oe(n,t))}function Le(e,t,n){const i=B(t),o=A(t),r="fixed"===n,s=Se(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const a=Q(0);if(i||!i&&!r)if(("body"!==M(t)||D(o))&&(l=$(t)),i){const e=Se(t,!0,r,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=Ee(o));return{x:s.left+l.scrollLeft-a.x,y:s.top+l.scrollTop-a.y,width:s.width,height:s.height}}function Ne(e,t){return B(e)&&"fixed"!==Y(e).position?t?t(e):e.offsetParent:null}function ke(e,t){const n=W(e);if(!B(e)||ze(e))return n;let i=Ne(e,t);for(;i&&H(i)&&"static"===Y(i).position;)i=Ne(i,t);return i&&("html"===M(i)||"body"===M(i)&&"static"===Y(i).position&&!V(i))?n:i||function(e){let t=X(e);for(;B(t)&&!U(t);){if(V(t))return t;t=X(t)}return null}(e)||n}const _e={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:i,strategy:o}=e;const r="fixed"===o,s=A(i),l=!!t&&ze(t.floating);if(i===s||l&&r)return n;let a={scrollLeft:0,scrollTop:0},c=Q(1);const u=Q(0),d=B(i);if((d||!d&&!r)&&(("body"!==M(i)||D(s))&&(a=$(i)),B(i))){const e=Se(i);c=be(i),u.x=e.x+i.clientLeft,u.y=e.y+i.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x,y:n.y*c.y-a.scrollTop*c.y+u.y}},getDocumentElement:A,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:i,strategy:o}=e;const r=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let i=q(e,[],!1).filter((e=>T(e)&&"body"!==M(e))),o=null;const r="fixed"===Y(e).position;let s=r?X(e):e;for(;T(s)&&!U(s);){const t=Y(s),n=V(s);n||"fixed"!==t.position||(o=null),(r?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||D(s)&&!n&&Oe(e,s))?i=i.filter((e=>e!==s)):o=t,s=X(s)}return t.set(e,i),i}(t,this._c):[].concat(n),i],s=r[0],l=r.reduce(((e,n)=>{const i=je(t,n,o);return e.top=J(i.top,e.top),e.right=G(i.right,e.right),e.bottom=G(i.bottom,e.bottom),e.left=J(i.left,e.left),e}),je(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:ke,getElementRects:async function(e){const t=this.getOffsetParent||ke,n=this.getDimensions;return{reference:Le(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=we(e);return{width:t,height:n}},getScale:be,isElement:T,isRTL:function(e){return"rtl"===Y(e).direction}},Me=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:o}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=ie(e,t),c={x:n,y:i},u=await ge(t,a),d=ae(oe(o)),h=se(d);let p=c[h],f=c[d];if(r){const e="y"===h?"bottom":"right";p=ne(p+u["y"===h?"top":"left"],p,p-u[e])}if(s){const e="y"===d?"bottom":"right";f=ne(f+u["y"===d?"top":"left"],f,f-u[e])}const g=l.fn({...t,[h]:p,[d]:f});return{...g,data:{x:g.x-n,y:g.y-i}}}}},We=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:r,rects:s,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=ie(e,t);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const v=oe(o),w=oe(l)===l,y=await(null==a.isRTL?void 0:a.isRTL(c.floating)),b=h||(w||!g?[de(l)]:function(e){const t=de(e);return[ue(e),t,ue(t)]}(l));h||"none"===f||b.push(...function(e,t,n,i){const o=re(e);let r=function(e,t,n){const i=["left","right"],o=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:i:t?i:o;case"left":case"right":return t?r:s;default:return[]}}(oe(e),"start"===n,i);return o&&(r=r.map((e=>e+"-"+o)),t&&(r=r.concat(r.map(ue)))),r}(l,g,f,y));const x=[l,...b],C=await ge(t,m),S=[];let R=(null==(i=r.flip)?void 0:i.overflows)||[];if(u&&S.push(C[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const i=re(e),o=ce(e),r=le(o);let s="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=de(s)),[s,de(s)]}(o,s,y);S.push(C[e[0]],C[e[1]])}if(R=[...R,{placement:o,overflows:S}],!S.every((e=>e<=0))){var z,E;const e=((null==(z=r.flip)?void 0:z.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:R},reset:{placement:t}};let n=null==(E=R.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var j;const e=null==(j=R.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:j[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Ae=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:i,rects:o,platform:r,strategy:s}=t,{padding:l=2,x:a,y:c}=ie(e,t),u=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),d=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let i=null;for(let e=0;e<t.length;e++){const o=t[e];!i||o.y-i.y>i.height/2?n.push([o]):n[n.length-1].push(o),i=o}return n.map((e=>pe(me(e))))}(u),h=pe(me(u)),p=he(l);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===d.length&&d[0].left>d[1].right&&null!=a&&null!=c)return d.find((e=>a>e.left-p.left&&a<e.right+p.right&&c>e.top-p.top&&c<e.bottom+p.bottom))||h;if(d.length>=2){if("y"===ae(n)){const e=d[0],t=d[d.length-1],i="top"===oe(n),o=e.top,r=t.bottom,s=i?e.left:t.left,l=i?e.right:t.right;return{top:o,bottom:r,left:s,right:l,width:l-s,height:r-o,x:s,y:o}}const e="left"===oe(n),t=J(...d.map((e=>e.right))),i=G(...d.map((e=>e.left))),o=d.filter((n=>e?n.left===i:n.right===t)),r=o[0].top,s=o[o.length-1].bottom;return{top:r,bottom:s,left:i,right:t,width:t-i,height:s-r,x:i,y:r}}return h}},floating:i.floating,strategy:s});return 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}}:{}}}},Pe=(e,t,n)=>{const i=new Map,o={platform:_e,...n},r={...o.platform,_c:i};return(async(e,t,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),a=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=fe(c,i,a),h=i,p={},f=0;for(let n=0;n<l.length;n++){const{name:r,fn:g}=l[n],{x:m,y:v,data:w,reset:y}=await g({x:u,y:d,initialPlacement:i,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=m?m:u,d=null!=v?v:d,p={...p,[r]:{...p[r],...w}},y&&f<=50&&(f++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(c=!0===y.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:u,y:d}=fe(c,h,a))),n=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:p}})(e,t,{...o,platform:r})};var Te="undefined"!=typeof document?n.useLayoutEffect:n.useEffect;function Be(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,i,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;0!=i--;)if(!Be(e[i],t[i]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(i=n;0!=i--;)if(!{}.hasOwnProperty.call(t,o[i]))return!1;for(i=n;0!=i--;){const n=o[i];if(("_owner"!==n||!e.$$typeof)&&!Be(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Ie(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function De(e,t){const n=Ie(e);return Math.round(t*n)/n}function He(e){const t=r.useRef(e);return Te((()=>{t.current=e})),t}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@yoopta/editor"),t=require("react/jsx-runtime"),o=require("react"),i=require("react-dom");function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var r=n(o),s=n(i);function a(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(o[i[n]]=e[i[n]])}return o}function l(e,t,o,i){return new(o||(o=Promise))((function(n,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))}function d(e,{threshold:t=0,root:i=null,rootMargin:n="0%",freezeOnceVisible:r=!1}={}){const[s,a]=o.useState({}),l=s.isIntersecting&&r,d=([e])=>a(e);return o.useEffect((()=>{const o=null==e?void 0:e.current;if(!window.IntersectionObserver||l||!o)return;const r=new IntersectionObserver(d,{threshold:t,root:i,rootMargin:n});return r.observe(o),()=>r.disconnect()}),[e,t,i,n,l]),s}"function"==typeof SuppressedError&&SuppressedError;const c={vimeo:function(e){var{videoId:i}=e,n=a(e,["videoId"]);const r=o.useRef(null),[s,l]=o.useState(null),[c,u]=o.useState(!1),{isIntersecting:p}=d(r,{freezeOnceVisible:!0,rootMargin:"50%"});return o.useEffect((()=>{fetch(`https://vimeo.com/api/v2/video/${i}.json`).then((e=>e.json())).then((e=>l(e[0].thumbnail_medium))).catch((()=>l(null)))}),[i]),t.jsxs("div",Object.assign({ref:r,className:"yoo-video-relative"},{children:[t.jsx("img",{src:s||"",alt:"vimeo_video_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:p&&c?0:1,zIndex:p&&c?-1:0}}),p&&t.jsx("iframe",Object.assign({title:"Video Player",src:`https://player.vimeo.com/video/${i}?badge=0&byline=0&portrait=0&title=0`,frameBorder:0,allowFullScreen:!0,onLoad:()=>u(!0),className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},n))]}))},youtube:function(e){var{videoId:i}=e,n=a(e,["videoId"]);const r=o.useRef(null),[s,l]=o.useState(!1),{isIntersecting:c}=d(r,{freezeOnceVisible:!0,rootMargin:"50%"});return t.jsxs("div",Object.assign({ref:r,className:"yoo-video-relative"},{children:[t.jsx("img",{src:`https://i.ytimg.com/vi/${i}/default.jpg`,alt:"youtube_video_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:c&&s?0:1,zIndex:c&&s?-1:0}}),c&&t.jsx("iframe",Object.assign({title:"Video Player",src:`https://www.youtube.com/embed/${i}`,frameBorder:0,onLoad:()=>l(!0),allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},n))]}))},dailymotion:function(e){var{videoId:i}=e,n=a(e,["videoId"]);const r=o.useRef(null),[s,l]=o.useState(null),[c,u]=o.useState(!1),{isIntersecting:p}=d(r,{freezeOnceVisible:!0,rootMargin:"50%"});return o.useEffect((()=>{fetch((e=>`https://api.dailymotion.com/video/${e}?fields=thumbnail_url`)(i)).then((e=>e.json())).then((e=>l(e.thumbnail_url))).catch((()=>l(null)))}),[i]),t.jsxs("div",Object.assign({ref:r,className:"yoo-video-relative"},{children:[t.jsx("img",{src:s||"",alt:"daylimotion_video_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:p&&c?0:1,zIndex:p&&c?-1:0}}),p&&t.jsx("iframe",Object.assign({title:"Dailymotion Video Player",frameBorder:0,onLoad:()=>u(!0),src:`https://www.dailymotion.com/embed/video/${i}`,allowFullScreen:!0,className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0"},n))]}))}},u=({width:e,height:o,src:i,settings:n,bgColor:r,poster:s,provider:a,fit:l})=>{const d={backgroundColor:r||"transparent",objectFit:l||"contain"};if(a&&a.id&&a.type&&c[a.type]){const i=c[a.type];return t.jsx(i,{videoId:a.id,width:e,height:o})}return t.jsx("div",Object.assign({className:"yoo-video-w-full"},{children:i&&t.jsx("video",{preload:"metadata",poster:s,src:i,width:e,height:o,onDragStart:e=>e.preventDefault(),className:"yoo-video-object-cover yoo-video-w-full yoo-video-h-full",style:d,playsInline:!0,controls:!0})}))};var p,h=(p=function(e,t){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},p(e,t)},function(e,t){function o(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),f=function(){return f=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},f.apply(this,arguments)},v={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},y={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},g={width:"20px",height:"20px",position:"absolute"},m={top:f(f({},v),{top:"-5px"}),right:f(f({},y),{left:void 0,right:"-5px"}),bottom:f(f({},v),{top:void 0,bottom:"-5px"}),left:f(f({},y),{left:"-5px"}),topRight:f(f({},g),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:f(f({},g),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:f(f({},g),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:f(f({},g),{left:"-10px",top:"-10px",cursor:"nw-resize"})},x=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMouseDown=function(e){t.props.onResizeStart(e,t.props.direction)},t.onTouchStart=function(e){t.props.onResizeStart(e,t.props.direction)},t}return h(t,e),t.prototype.render=function(){return r.createElement("div",{className:this.props.className||"",style:f(f({position:"absolute",userSelect:"none"},m[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},t}(r.PureComponent),w=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},e(t,o)};return function(t,o){function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)}}(),b=function(){return b=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},b.apply(this,arguments)},C={width:"auto",height:"auto"},S=function(e,t,o){return Math.max(Math.min(e,o),t)},R=function(e,t){return Math.round(e/t)*t},z=function(e,t){return new RegExp(e,"i").test(t)},j=function(e){return Boolean(e.touches&&e.touches.length)},E=function(e,t,o){void 0===o&&(o=0);var i=t.reduce((function(o,i,n){return Math.abs(i-e)<Math.abs(t[o]-e)?n:o}),0),n=Math.abs(t[i]-e);return 0===o||n<o?t[i]:e},_=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},O=function(e,t,o,i){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%"))return t*(Number(e.replace("%",""))/100);if(e.endsWith("vw"))return o*(Number(e.replace("vw",""))/100);if(e.endsWith("vh"))return i*(Number(e.replace("vh",""))/100)}return e},k=["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"],L="__resizable_base__",N=function(e){function t(t){var o=e.call(this,t)||this;return o.ratio=1,o.resizable=null,o.parentLeft=0,o.parentTop=0,o.resizableLeft=0,o.resizableRight=0,o.resizableTop=0,o.resizableBottom=0,o.targetLeft=0,o.targetTop=0,o.appendBase=function(){if(!o.resizable||!o.window)return null;var e=o.parentNode;if(!e)return null;var t=o.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(L):t.className+=L,e.appendChild(t),t},o.removeBase=function(e){var t=o.parentNode;t&&t.removeChild(e)},o.ref=function(e){e&&(o.resizable=e)},o.state={isResizing:!1,width:void 0===(o.propsSize&&o.propsSize.width)?"auto":o.propsSize&&o.propsSize.width,height:void 0===(o.propsSize&&o.propsSize.height)?"auto":o.propsSize&&o.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},o.onResizeStart=o.onResizeStart.bind(o),o.onMouseMove=o.onMouseMove.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o}return w(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||C},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,n=this.resizable.style.position;"relative"!==n&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:i,this.resizable.style.position=n}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&e.propsSize[t].toString().endsWith("%")){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var o=e.getParentSize();return Number(e.state[t].toString().replace("px",""))/o[t]*100+"%"}return _(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?_(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?_(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var i={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"!==this.state[t]||this.state.original[t]!==e||void 0!==o&&"auto"!==o?e:"auto"},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,i,n=this.props.boundsByDirection,r=this.state.direction,s=n&&z("left",r),a=n&&z("top",r);if("parent"===this.props.bounds){var l=this.parentNode;l&&(o=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),i=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,i=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),i=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),i&&Number.isFinite(i)&&(t=t&&t<i?t:i),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o=this.props.scale||1,i=this.props.resizeRatio||1,n=this.state,r=n.direction,s=n.original,a=this.props,l=a.lockAspectRatio,d=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,u=s.width,p=s.height,h=d||0,f=c||0;return z("right",r)&&(u=s.width+(e-s.x)*i/o,l&&(p=(u-f)/this.ratio+h)),z("left",r)&&(u=s.width-(e-s.x)*i/o,l&&(p=(u-f)/this.ratio+h)),z("bottom",r)&&(p=s.height+(t-s.y)*i/o,l&&(u=(p-h)*this.ratio+f)),z("top",r)&&(p=s.height-(t-s.y)*i/o,l&&(u=(p-h)*this.ratio+f)),{newWidth:u,newHeight:p}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,i){var n=this.props,r=n.lockAspectRatio,s=n.lockAspectRatioExtraHeight,a=n.lockAspectRatioExtraWidth,l=void 0===i.width?10:i.width,d=void 0===o.width||o.width<0?e:o.width,c=void 0===i.height?10:i.height,u=void 0===o.height||o.height<0?t:o.height,p=s||0,h=a||0;if(r){var f=(c-p)*this.ratio+h,v=(u-p)*this.ratio+h,y=(l-h)/this.ratio+p,g=(d-h)/this.ratio+p,m=Math.max(l,f),x=Math.min(d,v),w=Math.max(c,y),b=Math.min(u,g);e=S(e,m,x),t=S(t,w,b)}else e=S(e,l,d),t=S(t,c,u);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){if("parent"===this.props.bounds){var e=this.parentNode;if(e){var t=e.getBoundingClientRect();this.parentLeft=t.left,this.parentTop=t.top}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,r=i.top,s=i.right,a=i.bottom;this.resizableLeft=n,this.resizableRight=s,this.resizableTop=r,this.resizableBottom=a}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,i=0,n=0;if(e.nativeEvent&&function(e){return Boolean((e.clientX||0===e.clientX)&&(e.clientY||0===e.clientY))}(e.nativeEvent)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&j(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(e,t,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",o=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var l={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:b(b({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:o};this.setState(l)}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&j(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var o=this.props,n=o.maxWidth,r=o.maxHeight,s=o.minWidth,a=o.minHeight,l=j(e)?e.touches[0].clientX:e.clientX,d=j(e)?e.touches[0].clientY:e.clientY,c=this.state,u=c.direction,p=c.original,h=c.width,f=c.height,v=this.getParentSize(),y=function(e,t,o,i,n,r,s){return i=O(i,e.width,t,o),n=O(n,e.height,t,o),r=O(r,e.width,t,o),s=O(s,e.height,t,o),{maxWidth:void 0===i?void 0:Number(i),maxHeight:void 0===n?void 0:Number(n),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(v,this.window.innerWidth,this.window.innerHeight,n,r,s,a);n=y.maxWidth,r=y.maxHeight,s=y.minWidth,a=y.minHeight;var g=this.calculateNewSizeFromDirection(l,d),m=g.newHeight,x=g.newWidth,w=this.calculateNewMaxFromBoundary(n,r);this.props.snap&&this.props.snap.x&&(x=E(x,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(m=E(m,this.props.snap.y,this.props.snapGap));var b=this.calculateNewSizeFromAspectRatio(x,m,{width:w.maxWidth,height:w.maxHeight},{width:s,height:a});if(x=b.newWidth,m=b.newHeight,this.props.grid){var C=R(x,this.props.grid[0]),S=R(m,this.props.grid[1]),z=this.props.snapGap||0;x=0===z||Math.abs(C-x)<=z?C:x,m=0===z||Math.abs(S-m)<=z?S:m}var _={width:x-p.width,height:m-p.height};if(h&&"string"==typeof h)if(h.endsWith("%"))x=x/v.width*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"}if(f&&"string"==typeof f)if(f.endsWith("%"))m=m/v.height*100+"%";else if(f.endsWith("vw")){m=m/this.window.innerWidth*100+"vw"}else if(f.endsWith("vh")){m=m/this.window.innerHeight*100+"vh"}var k={width:this.createSizeForCssProperty(x,"width"),height:this.createSizeForCssProperty(m,"height")};"row"===this.flexDir?k.flexBasis=k.width:"column"===this.flexDir&&(k.flexBasis=k.height),i.flushSync((function(){t.setState(k)})),this.props.onResize&&this.props.onResize(e,u,this.resizable,_)}},t.prototype.onMouseUp=function(e){var t=this.state,o=t.isResizing,i=t.direction,n=t.original;if(o&&this.resizable){var r={width:this.size.width-n.width,height:this.size.height-n.height};this.props.onResizeStop&&this.props.onResizeStop(e,i,this.resizable,r),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:b(b({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(e){this.setState({width:e.width,height:e.height})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,i=t.handleStyles,n=t.handleClasses,s=t.handleWrapperStyle,a=t.handleWrapperClass,l=t.handleComponent;if(!o)return null;var d=Object.keys(o).map((function(t){return!1!==o[t]?r.createElement(x,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:i&&i[t],className:n&&n[t]},l&&l[t]?l[t]:null):null}));return r.createElement("div",{className:a,style:s},d)},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce((function(t,o){return-1!==k.indexOf(o)||(t[o]=e.props[o]),t}),{}),o=b(b(b({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return r.createElement(i,b({ref:this.ref,style:o,className:this.props.className},t),this.state.isResizing&&r.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(r.PureComponent);function M(e){return P(e)?(e.nodeName||"").toLowerCase():"#document"}function W(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function A(e){var t;return null==(t=(P(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function P(e){return e instanceof Node||e instanceof W(e).Node}function T(e){return e instanceof Element||e instanceof W(e).Element}function B(e){return e instanceof HTMLElement||e instanceof W(e).HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof W(e).ShadowRoot)}function H(e){const{overflow:t,overflowX:o,overflowY:i,display:n}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(n)}function D(e){return["table","td","th"].includes(M(e))}function V(e){const t=F(),o=Y(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function F(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function U(e){return["html","body","#document"].includes(M(e))}function Y(e){return W(e).getComputedStyle(e)}function Z(e){return T(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function $(e){if("html"===M(e))return e;const t=e.assignedSlot||e.parentNode||I(e)&&e.host||A(e);return I(t)?t.host:t}function X(e){const t=$(e);return U(t)?e.ownerDocument?e.ownerDocument.body:e.body:B(t)&&H(t)?t:X(t)}function q(e,t,o){var i;void 0===t&&(t=[]),void 0===o&&(o=!0);const n=X(e),r=n===(null==(i=e.ownerDocument)?void 0:i.body),s=W(n);return r?t.concat(s,s.visualViewport||[],H(n)?n:[],s.frameElement&&o?q(s.frameElement):[]):t.concat(n,q(n,[],o))}const G=Math.min,J=Math.max,K=Math.round,Q=e=>({x:e,y:e}),ee={left:"right",right:"left",bottom:"top",top:"bottom"},te={start:"end",end:"start"};function oe(e,t,o){return J(e,G(t,o))}function ie(e,t){return"function"==typeof e?e(t):e}function ne(e){return e.split("-")[0]}function re(e){return e.split("-")[1]}function se(e){return"x"===e?"y":"x"}function ae(e){return"y"===e?"height":"width"}function le(e){return["top","bottom"].includes(ne(e))?"y":"x"}function de(e){return se(le(e))}function ce(e){return e.replace(/start|end/g,(e=>te[e]))}function ue(e){return e.replace(/left|right|bottom|top/g,(e=>ee[e]))}function pe(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function he(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function fe(e,t,o){let{reference:i,floating:n}=e;const r=le(t),s=de(t),a=ae(s),l=ne(t),d="y"===r,c=i.x+i.width/2-n.width/2,u=i.y+i.height/2-n.height/2,p=i[a]/2-n[a]/2;let h;switch(l){case"top":h={x:c,y:i.y-n.height};break;case"bottom":h={x:c,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:u};break;case"left":h={x:i.x-n.width,y:u};break;default:h={x:i.x,y:i.y}}switch(re(t)){case"start":h[s]-=p*(o&&d?-1:1);break;case"end":h[s]+=p*(o&&d?-1:1)}return h}async function ve(e,t){var o;void 0===t&&(t={});const{x:i,y:n,platform:r,rects:s,elements:a,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=ie(t,e),f=pe(h),v=a[p?"floating"===u?"reference":"floating":u],y=he(await r.getClippingRect({element:null==(o=await(null==r.isElement?void 0:r.isElement(v)))||o?v:v.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:d,rootBoundary:c,strategy:l})),g="floating"===u?{...s.floating,x:i,y:n}:s.reference,m=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),x=await(null==r.isElement?void 0:r.isElement(m))&&await(null==r.getScale?void 0:r.getScale(m))||{x:1,y:1},w=he(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:m,strategy:l}):g);return{top:(y.top-w.top+f.top)/x.y,bottom:(w.bottom-y.bottom+f.bottom)/x.y,left:(y.left-w.left+f.left)/x.x,right:(w.right-y.right+f.right)/x.x}}function ye(e){const t=G(...e.map((e=>e.left))),o=G(...e.map((e=>e.top)));return{x:t,y:o,width:J(...e.map((e=>e.right)))-t,height:J(...e.map((e=>e.bottom)))-o}}const ge=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,i;const{x:n,y:r,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:o,platform:i,elements:n}=e,r=await(null==i.isRTL?void 0:i.isRTL(n.floating)),s=ne(o),a=re(o),l="y"===le(o),d=["left","top"].includes(s)?-1:1,c=r&&l?-1:1,u=ie(t,e);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*c,y:p*d}:{x:p*d,y:h*c}}(t,e);return s===(null==(o=a.offset)?void 0:o.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:n+l.x,y:r+l.y,data:{...l,placement:s}}}}};function me(e){const t=Y(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=B(e),r=n?e.offsetWidth:o,s=n?e.offsetHeight:i,a=K(o)!==r||K(i)!==s;return a&&(o=r,i=s),{width:o,height:i,$:a}}function xe(e){return T(e)?e:e.contextElement}function we(e){const t=xe(e);if(!B(t))return Q(1);const o=t.getBoundingClientRect(),{width:i,height:n,$:r}=me(t);let s=(r?K(o.width):o.width)/i,a=(r?K(o.height):o.height)/n;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const be=Q(0);function Ce(e){const t=W(e);return F()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:be}function Se(e,t,o,i){void 0===t&&(t=!1),void 0===o&&(o=!1);const n=e.getBoundingClientRect(),r=xe(e);let s=Q(1);t&&(i?T(i)&&(s=we(i)):s=we(e));const a=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==W(e))&&t}(r,o,i)?Ce(r):Q(0);let l=(n.left+a.x)/s.x,d=(n.top+a.y)/s.y,c=n.width/s.x,u=n.height/s.y;if(r){const e=W(r),t=i&&T(i)?W(i):i;let o=e,n=o.frameElement;for(;n&&i&&t!==o;){const e=we(n),t=n.getBoundingClientRect(),i=Y(n),r=t.left+(n.clientLeft+parseFloat(i.paddingLeft))*e.x,s=t.top+(n.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,d*=e.y,c*=e.x,u*=e.y,l+=r,d+=s,o=W(n),n=o.frameElement}}return he({width:c,height:u,x:l,y:d})}const Re=[":popover-open",":modal"];function ze(e){return Re.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function je(e){return Se(A(e)).left+Z(e).scrollLeft}function Ee(e,t,o){let i;if("viewport"===t)i=function(e,t){const o=W(e),i=A(e),n=o.visualViewport;let r=i.clientWidth,s=i.clientHeight,a=0,l=0;if(n){r=n.width,s=n.height;const e=F();(!e||e&&"fixed"===t)&&(a=n.offsetLeft,l=n.offsetTop)}return{width:r,height:s,x:a,y:l}}(e,o);else if("document"===t)i=function(e){const t=A(e),o=Z(e),i=e.ownerDocument.body,n=J(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=J(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+je(e);const a=-o.scrollTop;return"rtl"===Y(i).direction&&(s+=J(t.clientWidth,i.clientWidth)-n),{width:n,height:r,x:s,y:a}}(A(e));else if(T(t))i=function(e,t){const o=Se(e,!0,"fixed"===t),i=o.top+e.clientTop,n=o.left+e.clientLeft,r=B(e)?we(e):Q(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:n*r.x,y:i*r.y}}(t,o);else{const o=Ce(e);i={...t,x:t.x-o.x,y:t.y-o.y}}return he(i)}function _e(e,t){const o=$(e);return!(o===t||!T(o)||U(o))&&("fixed"===Y(o).position||_e(o,t))}function Oe(e,t,o){const i=B(t),n=A(t),r="fixed"===o,s=Se(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=Q(0);if(i||!i&&!r)if(("body"!==M(t)||H(n))&&(a=Z(t)),i){const e=Se(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&(l.x=je(n));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function ke(e,t){return B(e)&&"fixed"!==Y(e).position?t?t(e):e.offsetParent:null}function Le(e,t){const o=W(e);if(!B(e)||ze(e))return o;let i=ke(e,t);for(;i&&D(i)&&"static"===Y(i).position;)i=ke(i,t);return i&&("html"===M(i)||"body"===M(i)&&"static"===Y(i).position&&!V(i))?o:i||function(e){let t=$(e);for(;B(t)&&!U(t);){if(V(t))return t;t=$(t)}return null}(e)||o}const Ne={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:i,strategy:n}=e;const r="fixed"===n,s=A(i),a=!!t&&ze(t.floating);if(i===s||a&&r)return o;let l={scrollLeft:0,scrollTop:0},d=Q(1);const c=Q(0),u=B(i);if((u||!u&&!r)&&(("body"!==M(i)||H(s))&&(l=Z(i)),B(i))){const e=Se(i);d=we(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-l.scrollLeft*d.x+c.x,y:o.y*d.y-l.scrollTop*d.y+c.y}},getDocumentElement:A,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:i,strategy:n}=e;const r=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let i=q(e,[],!1).filter((e=>T(e)&&"body"!==M(e))),n=null;const r="fixed"===Y(e).position;let s=r?$(e):e;for(;T(s)&&!U(s);){const t=Y(s),o=V(s);o||"fixed"!==t.position||(n=null),(r?!o&&!n:!o&&"static"===t.position&&n&&["absolute","fixed"].includes(n.position)||H(s)&&!o&&_e(e,s))?i=i.filter((e=>e!==s)):n=t,s=$(s)}return t.set(e,i),i}(t,this._c):[].concat(o),i],s=r[0],a=r.reduce(((e,o)=>{const i=Ee(t,o,n);return e.top=J(i.top,e.top),e.right=G(i.right,e.right),e.bottom=G(i.bottom,e.bottom),e.left=J(i.left,e.left),e}),Ee(t,s,n));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Le,getElementRects:async function(e){const t=this.getOffsetParent||Le,o=this.getDimensions;return{reference:Oe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await o(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=me(e);return{width:t,height:o}},getScale:we,isElement:T,isRTL:function(e){return"rtl"===Y(e).direction}},Me=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:i,placement:n}=t,{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...l}=ie(e,t),d={x:o,y:i},c=await ve(t,l),u=le(ne(n)),p=se(u);let h=d[p],f=d[u];if(r){const e="y"===p?"bottom":"right";h=oe(h+c["y"===p?"top":"left"],h,h-c[e])}if(s){const e="y"===u?"bottom":"right";f=oe(f+c["y"===u?"top":"left"],f,f-c[e])}const v=a.fn({...t,[p]:h,[u]:f});return{...v,data:{x:v.x-o,y:v.y-i}}}}},We=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,i;const{placement:n,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:v=!0,...y}=ie(e,t);if(null!=(o=r.arrow)&&o.alignmentOffset)return{};const g=ne(n),m=ne(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(d.floating)),w=p||(m||!v?[ue(a)]:function(e){const t=ue(e);return[ce(e),t,ce(t)]}(a));p||"none"===f||w.push(...function(e,t,o,i){const n=re(e);let r=function(e,t,o){const i=["left","right"],n=["right","left"],r=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return o?t?n:i:t?i:n;case"left":case"right":return t?r:s;default:return[]}}(ne(e),"start"===o,i);return n&&(r=r.map((e=>e+"-"+n)),t&&(r=r.concat(r.map(ce)))),r}(a,v,f,x));const b=[a,...w],C=await ve(t,y),S=[];let R=(null==(i=r.flip)?void 0:i.overflows)||[];if(c&&S.push(C[g]),u){const e=function(e,t,o){void 0===o&&(o=!1);const i=re(e),n=de(e),r=ae(n);let s="x"===n?i===(o?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=ue(s)),[s,ue(s)]}(n,s,x);S.push(C[e[0]],C[e[1]])}if(R=[...R,{placement:n,overflows:S}],!S.every((e=>e<=0))){var z,j;const e=((null==(z=r.flip)?void 0:z.index)||0)+1,t=b[e];if(t)return{data:{index:e,overflows:R},reset:{placement:t}};let o=null==(j=R.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:j.placement;if(!o)switch(h){case"bestFit":{var E;const e=null==(E=R.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0];e&&(o=e);break}case"initialPlacement":o=a}if(n!==o)return{reset:{placement:o}}}return{}}}},Ae=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:i,rects:n,platform:r,strategy:s}=t,{padding:a=2,x:l,y:d}=ie(e,t),c=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(i.reference))||[]),u=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let i=null;for(let e=0;e<t.length;e++){const n=t[e];!i||n.y-i.y>i.height/2?o.push([n]):o[o.length-1].push(n),i=n}return o.map((e=>he(ye(e))))}(c),p=he(ye(c)),h=pe(a);const f=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=d)return u.find((e=>l>e.left-h.left&&l<e.right+h.right&&d>e.top-h.top&&d<e.bottom+h.bottom))||p;if(u.length>=2){if("y"===le(o)){const e=u[0],t=u[u.length-1],i="top"===ne(o),n=e.top,r=t.bottom,s=i?e.left:t.left,a=i?e.right:t.right;return{top:n,bottom:r,left:s,right:a,width:a-s,height:r-n,x:s,y:n}}const e="left"===ne(o),t=J(...u.map((e=>e.right))),i=G(...u.map((e=>e.left))),n=u.filter((o=>e?o.left===i:o.right===t)),r=n[0].top,s=n[n.length-1].bottom;return{top:r,bottom:s,left:i,right:t,width:t-i,height:s-r,x:i,y:r}}return p}},floating:i.floating,strategy:s});return n.reference.x!==f.reference.x||n.reference.y!==f.reference.y||n.reference.width!==f.reference.width||n.reference.height!==f.reference.height?{reset:{rects:f}}:{}}}},Pe=(e,t,o)=>{const i=new Map,n={platform:Ne,...o},r={...n.platform,_c:i};return(async(e,t,o)=>{const{placement:i="bottom",strategy:n="absolute",middleware:r=[],platform:s}=o,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:u}=fe(d,i,l),p=i,h={},f=0;for(let o=0;o<a.length;o++){const{name:r,fn:v}=a[o],{x:y,y:g,data:m,reset:x}=await v({x:c,y:u,initialPlacement:i,placement:p,strategy:n,middlewareData:h,rects:d,platform:s,elements:{reference:e,floating:t}});c=null!=y?y:c,u=null!=g?g:u,h={...h,[r]:{...h[r],...m}},x&&f<=50&&(f++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(d=!0===x.rects?await s.getElementRects({reference:e,floating:t,strategy:n}):x.rects),({x:c,y:u}=fe(d,p,l))),o=-1)}return{x:c,y:u,placement:p,strategy:n,middlewareData:h}})(e,t,{...n,platform:r})};var Te="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function Be(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let o,i,n;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(i=o;0!=i--;)if(!Be(e[i],t[i]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(i=o;0!=i--;)if(!{}.hasOwnProperty.call(t,n[i]))return!1;for(i=o;0!=i--;){const o=n[i];if(("_owner"!==o||!e.$$typeof)&&!Be(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Ie(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function He(e,t){const o=Ie(e);return Math.round(t*o)/o}function De(e){const t=r.useRef(e);return Te((()=>{t.current=e})),t}
2
2
  /*!
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
5
  */
6
- var Ve=["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(","),Fe="undefined"==typeof Element,Ue=Fe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ye=!Fe&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},$e=function e(t,n){var i;void 0===n&&(n=!0);var o=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Xe=function e(t,n,i){for(var o=[],r=Array.from(t);r.length;){var s=r.shift();if(!$e(s,!1))if("SLOT"===s.tagName){var l=s.assignedElements(),a=e(l.length?l:s.children,!0,i);i.flatten?o.push.apply(o,a):o.push({scopeParent:s,candidates:a})}else{Ue.call(s,Ve)&&i.filter(s)&&(n||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(s),u=!$e(c,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(c&&u){var d=e(!0===c?s.children:c.children,!0,i);i.flatten?o.push.apply(o,d):o.push({scopeParent:s,candidates:d})}else r.unshift.apply(r,s.children)}}return o},Ze=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},qe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Ze(e)?0:e.tabIndex},Ge=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Je=function(e){return"INPUT"===e.tagName},Ke=function(e){return function(e){return Je(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Ye(e),i=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Qe=function(e){var t=e.getBoundingClientRect(),n=t.width,i=t.height;return 0===n&&0===i},et=function(e,t){var n=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=Ue.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Ue.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Qe(e)}else{if("function"==typeof i){for(var r=e;e;){var s=e.parentElement,l=Ye(e);if(s&&!s.shadowRoot&&!0===i(s))return Qe(e);e=e.assignedSlot?e.assignedSlot:s||l===e.ownerDocument?s:l.host}e=r}if(function(e){var t,n,i,o,r=e&&Ye(e),s=null===(t=r)||void 0===t?void 0:t.host,l=!1;if(r&&r!==e)for(l=!!(null!==(n=s)&&void 0!==n&&null!==(i=n.ownerDocument)&&void 0!==i&&i.contains(s)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&s;){var a,c,u;l=!(null===(c=s=null===(a=r=Ye(s))||void 0===a?void 0:a.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(s))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},tt=function(e,t){return!(t.disabled||$e(t)||function(e){return Je(e)&&"hidden"===e.type}(t)||et(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var i=t.children.item(n);if("LEGEND"===i.tagName)return!!Ue.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},nt=function(e,t){return!(Ke(t)||qe(t)<0||!tt(e,t))},it=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ot=function e(t){var n=[],i=[];return t.forEach((function(t,o){var r=!!t.scopeParent,s=r?t.scopeParent:t,l=function(e,t){var n=qe(e);return n<0&&t&&!Ze(e)?0:n}(s,r),a=r?e(t.candidates):s;0===l?r?n.push.apply(n,a):n.push(s):i.push({documentOrder:o,tabIndex:l,item:t,isScope:r,content:a})})),i.sort(Ge).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},rt=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Xe([e],t.includeContainer,{filter:nt.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:it}):function(e,t,n){if($e(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Ve));return t&&Ue.call(e,Ve)&&i.unshift(e),i.filter(n)}(e,t.includeContainer,nt.bind(null,t)),ot(n)};const st=r["useInsertionEffect".toString()]||(e=>e());var lt="undefined"!=typeof document?n.useLayoutEffect:n.useEffect;function at(){return at=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},at.apply(this,arguments)}let ct=!1,ut=0;const dt=()=>"floating-ui-"+ut++;const ht=r["useId".toString()]||function(){const[e,t]=r.useState((()=>ct?dt():void 0));return lt((()=>{null==e&&t(dt())}),[]),r.useEffect((()=>{ct||(ct=!0)}),[]),e};const pt=r.createContext(null),ft=r.createContext(null);function gt(e){return"data-floating-ui-"+e}const mt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function vt(e,t){const n=rt(e,mt());"prev"===t&&n.reverse();const i=n.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}((null==(o=e)?void 0:o.ownerDocument)||document));var o;return n.slice(i+1)[0]}function wt(e,t){const n=t||e.currentTarget,i=e.relatedTarget;return!i||!function(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&I(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}(n,i)}function yt(e){rt(e,mt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function bt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const xt={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 Ct(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const St=r.forwardRef((function(e,t){const[n,i]=r.useState();lt((()=>(/apple/i.test(navigator.vendor)&&i("button"),document.addEventListener("keydown",Ct),()=>{document.removeEventListener("keydown",Ct)})),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[gt("focus-guard")]:"",style:xt};return r.createElement("span",at({},e,o))})),Rt=r.createContext(null),zt=gt("portal");function Et(e){let{children:t,id:n,root:o=null,preserveTabOrder:s=!0}=e;const l=function(e){let{id:t,root:n}=void 0===e?{}:e;const[i,o]=r.useState(null),s=ht(),l=jt(),a=r.useRef(null);return lt((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{a.current=null}))}),[i]),lt((()=>{if(a.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=s,n.setAttribute(zt,""),e.appendChild(n),a.current=n,o(n)}),[t,s]),lt((()=>{if(a.current)return;let e=n||(null==l?void 0:l.portalNode);e&&!T(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const r=document.createElement("div");r.id=s,r.setAttribute(zt,""),e=i||e,e.appendChild(r),a.current=r,o(r)}),[t,n,s,l]),i}({id:n,root:o}),[a,c]=r.useState(null),u=r.useRef(null),d=r.useRef(null),h=r.useRef(null),p=r.useRef(null),f=!!a&&!a.modal&&a.open&&s&&!(!o&&!l);return r.useEffect((()=>{if(l&&s&&(null==a||!a.modal))return l.addEventListener("focusin",e,!0),l.addEventListener("focusout",e,!0),()=>{l.removeEventListener("focusin",e,!0),l.removeEventListener("focusout",e,!0)};function e(e){if(l&&wt(e)){("focusin"===e.type?bt:yt)(l)}}}),[l,s,null==a?void 0:a.modal]),r.createElement(Rt.Provider,{value:r.useMemo((()=>({preserveTabOrder:s,beforeOutsideRef:u,afterOutsideRef:d,beforeInsideRef:h,afterInsideRef:p,portalNode:l,setFocusManagerState:c})),[s,l])},f&&l&&r.createElement(St,{"data-type":"outside",ref:u,onFocus:e=>{if(wt(e,l)){var t;null==(t=h.current)||t.focus()}else{const e=vt(document.body,"prev")||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),f&&l&&r.createElement("span",{"aria-owns":l.id,style:xt}),l&&i.createPortal(t,l),f&&l&&r.createElement(St,{"data-type":"outside",ref:d,onFocus:e=>{if(wt(e,l)){var t;null==(t=p.current)||t.focus()}else{const t=vt(document.body,"next")||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent))}}}))}const jt=()=>r.useContext(Rt),Ot=new Set,Lt=r.forwardRef((function(e,t){let{lockScroll:n=!1,...i}=e;const o=ht();return lt((()=>{if(!n)return;Ot.add(o);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=t.left?parseFloat(t.left):window.pageXOffset,l=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",r&&(t[i]=r+"px"),e){var a,c;const e=(null==(a=window.visualViewport)?void 0:a.offsetLeft)||0,n=(null==(c=window.visualViewport)?void 0:c.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(l-Math.floor(n))+"px",left:-(s-Math.floor(e))+"px",right:"0"})}return()=>{Ot.delete(o),0===Ot.size&&(Object.assign(t,{overflow:"",[i]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(s,l)))}}),[o,n]),r.createElement("div",at({ref:t},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))}));function Nt(e){var t;void 0===e&&(e={});const{open:n=!1,onOpenChange:i,nodeId:o}=e,[l,a]=r.useState(null),c=(null==(t=e.elements)?void 0:t.reference)||l,u=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:l,floating:a}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[h,p]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,g]=r.useState(i);Be(f,i)||g(i);const[m,v]=r.useState(null),[w,y]=r.useState(null),b=r.useCallback((e=>{e!==R.current&&(R.current=e,v(e))}),[]),x=r.useCallback((e=>{e!==z.current&&(z.current=e,y(e))}),[]),C=l||m,S=a||w,R=r.useRef(null),z=r.useRef(null),E=r.useRef(h),j=null!=u,O=He(u),L=He(o),N=r.useCallback((()=>{if(!R.current||!z.current)return;const e={placement:t,strategy:n,middleware:f};L.current&&(e.platform=L.current),Pe(R.current,z.current,e).then((e=>{const t={...e,isPositioned:!0};k.current&&!Be(E.current,t)&&(E.current=t,s.flushSync((()=>{p(t)})))}))}),[f,t,n,L]);Te((()=>{!1===d&&E.current.isPositioned&&(E.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[d]);const k=r.useRef(!1);Te((()=>(k.current=!0,()=>{k.current=!1})),[]),Te((()=>{if(C&&(R.current=C),S&&(z.current=S),C&&S){if(O.current)return O.current(C,S,N);N()}}),[C,S,N,O,j]);const _=r.useMemo((()=>({reference:R,floating:z,setReference:b,setFloating:x})),[b,x]),M=r.useMemo((()=>({reference:C,floating:S})),[C,S]),W=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!M.floating)return e;const t=De(M.floating,h.x),i=De(M.floating,h.y);return c?{...e,transform:"translate("+t+"px, "+i+"px)",...Ie(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:i}}),[n,c,M.floating,h.x,h.y]);return r.useMemo((()=>({...h,update:N,refs:_,elements:M,floatingStyles:W})),[h,N,_,M,W])}(e),d=r.useContext(ft),h=null!=((null==(p=r.useContext(pt))?void 0:p.id)||null);var p;const f=function(e){const t=r.useRef((()=>{}));return st((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return null==t.current?void 0:t.current(...n)}),[])}(((e,t,n)=>{e&&(m.current.openEvent=t),v.emit("openchange",{open:e,event:t,reason:n,nested:h}),null==i||i(e,t,n)})),g=r.useRef(null),m=r.useRef({}),v=r.useState((()=>function(){const e=new Map;return{emit(t,n){var i;null==(i=e.get(t))||i.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var i;e.set(t,(null==(i=e.get(t))?void 0:i.filter((e=>e!==n)))||[])}}}()))[0],w=ht(),y=r.useCallback((e=>{const t=T(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u.refs.setReference(t)}),[u.refs]),b=r.useCallback((e=>{(T(e)||null===e)&&(g.current=e,a(e)),(T(u.refs.reference.current)||null===u.refs.reference.current||null!==e&&!T(e))&&u.refs.setReference(e)}),[u.refs]),x=r.useMemo((()=>({...u.refs,setReference:b,setPositionReference:y,domReference:g})),[u.refs,b,y]),C=r.useMemo((()=>({...u.elements,domReference:c})),[u.elements,c]),S=r.useMemo((()=>({...u,refs:x,elements:C,dataRef:m,nodeId:o,floatingId:w,events:v,open:n,onOpenChange:f})),[u,o,w,v,n,f,x,C]);return lt((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===o));e&&(e.context=S)})),r.useMemo((()=>({...u,context:S,refs:x,elements:C})),[u,x,C,S])}function kt(e,t){if(null==e)return{};var n,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)n=r[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}var _t=["color"],Mt=n.forwardRef((function(e,t){var i=e.color,o=void 0===i?"currentColor":i,r=kt(e,_t);return n.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),n.createElement("path",{d:"M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),Wt=["color"],At=n.forwardRef((function(e,t){var i=e.color,o=void 0===i?"currentColor":i,r=kt(e,Wt);return n.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),n.createElement("path",{d:"M7.81832 0.68179C7.64258 0.506054 7.35766 0.506054 7.18192 0.68179L5.18192 2.68179C5.00619 2.85753 5.00619 3.14245 5.18192 3.31819C5.35766 3.49392 5.64258 3.49392 5.81832 3.31819L7.05012 2.08638L7.05012 5.50023C7.05012 5.74876 7.25159 5.95023 7.50012 5.95023C7.74865 5.95023 7.95012 5.74876 7.95012 5.50023L7.95012 2.08638L9.18192 3.31819C9.35766 3.49392 9.64258 3.49392 9.81832 3.31819C9.99406 3.14245 9.99406 2.85753 9.81832 2.68179L7.81832 0.68179ZM7.95012 12.9136V9.50023C7.95012 9.2517 7.74865 9.05023 7.50012 9.05023C7.25159 9.05023 7.05012 9.2517 7.05012 9.50023V12.9136L5.81832 11.6818C5.64258 11.5061 5.35766 11.5061 5.18192 11.6818C5.00619 11.8575 5.00619 12.1424 5.18192 12.3182L7.18192 14.3182C7.26632 14.4026 7.38077 14.45 7.50012 14.45C7.61947 14.45 7.73393 14.4026 7.81832 14.3182L9.81832 12.3182C9.99406 12.1424 9.99406 11.8575 9.81832 11.6818C9.64258 11.5061 9.35766 11.5061 9.18192 11.6818L7.95012 12.9136ZM1.49994 7.00017C1.2238 7.00017 0.999939 7.22403 0.999939 7.50017C0.999939 7.77631 1.2238 8.00017 1.49994 8.00017L13.4999 8.00017C13.7761 8.00017 13.9999 7.77631 13.9999 7.50017C13.9999 7.22403 13.7761 7.00017 13.4999 7.00017L1.49994 7.00017Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),Pt=["color"],Tt=n.forwardRef((function(e,t){var i=e.color,o=void 0===i?"currentColor":i,r=kt(e,Pt);return n.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),n.createElement("path",{d:"M11.5 3.04999C11.7485 3.04999 11.95 3.25146 11.95 3.49999V7.49999C11.95 7.74852 11.7485 7.94999 11.5 7.94999C11.2515 7.94999 11.05 7.74852 11.05 7.49999V4.58639L4.58638 11.05H7.49999C7.74852 11.05 7.94999 11.2515 7.94999 11.5C7.94999 11.7485 7.74852 11.95 7.49999 11.95L3.49999 11.95C3.38064 11.95 3.26618 11.9026 3.18179 11.8182C3.0974 11.7338 3.04999 11.6193 3.04999 11.5L3.04999 7.49999C3.04999 7.25146 3.25146 7.04999 3.49999 7.04999C3.74852 7.04999 3.94999 7.25146 3.94999 7.49999L3.94999 10.4136L10.4136 3.94999L7.49999 3.94999C7.25146 3.94999 7.04999 3.74852 7.04999 3.49999C7.04999 3.25146 7.25146 3.04999 7.49999 3.04999L11.5 3.04999Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),Bt=["color"],It=n.forwardRef((function(e,t){var i=e.color,o=void 0===i?"currentColor":i,r=kt(e,Bt);return n.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),n.createElement("path",{d:"M4.76447 3.12199C5.63151 3.04859 6.56082 3 7.5 3C8.43918 3 9.36849 3.04859 10.2355 3.12199C11.2796 3.21037 11.9553 3.27008 12.472 3.39203C12.9425 3.50304 13.2048 3.64976 13.4306 3.88086C13.4553 3.90618 13.4902 3.94414 13.5133 3.97092C13.7126 4.20149 13.8435 4.4887 13.918 5.03283C13.9978 5.6156 14 6.37644 14 7.52493C14 8.66026 13.9978 9.41019 13.9181 9.98538C13.8439 10.5206 13.7137 10.8061 13.5125 11.0387C13.4896 11.0651 13.4541 11.1038 13.4296 11.1287C13.2009 11.3625 12.9406 11.5076 12.4818 11.6164C11.9752 11.7365 11.3143 11.7942 10.2878 11.8797C9.41948 11.9521 8.47566 12 7.5 12C6.52434 12 5.58052 11.9521 4.7122 11.8797C3.68572 11.7942 3.02477 11.7365 2.51816 11.6164C2.05936 11.5076 1.7991 11.3625 1.57037 11.1287C1.54593 11.1038 1.51035 11.0651 1.48748 11.0387C1.28628 10.8061 1.15612 10.5206 1.08193 9.98538C1.00221 9.41019 1 8.66026 1 7.52493C1 6.37644 1.00216 5.6156 1.082 5.03283C1.15654 4.4887 1.28744 4.20149 1.48666 3.97092C1.5098 3.94414 1.54468 3.90618 1.56942 3.88086C1.7952 3.64976 2.05752 3.50304 2.52796 3.39203C3.04473 3.27008 3.7204 3.21037 4.76447 3.12199ZM0 7.52493C0 5.28296 0 4.16198 0.729985 3.31713C0.766457 3.27491 0.815139 3.22194 0.854123 3.18204C1.63439 2.38339 2.64963 2.29744 4.68012 2.12555C5.56923 2.05028 6.52724 2 7.5 2C8.47276 2 9.43077 2.05028 10.3199 2.12555C12.3504 2.29744 13.3656 2.38339 14.1459 3.18204C14.1849 3.22194 14.2335 3.27491 14.27 3.31713C15 4.16198 15 5.28296 15 7.52493C15 9.74012 15 10.8477 14.2688 11.6929C14.2326 11.7348 14.1832 11.7885 14.1444 11.8281C13.3629 12.6269 12.3655 12.71 10.3709 12.8763C9.47971 12.9505 8.50782 13 7.5 13C6.49218 13 5.52028 12.9505 4.62915 12.8763C2.63446 12.71 1.63712 12.6269 0.855558 11.8281C0.816844 11.7885 0.767442 11.7348 0.731221 11.6929C0 10.8477 0 9.74012 0 7.52493ZM5.25 5.38264C5.25 5.20225 5.43522 5.08124 5.60041 5.15369L10.428 7.27105C10.6274 7.35853 10.6274 7.64147 10.428 7.72895L5.60041 9.84631C5.43522 9.91876 5.25 9.79775 5.25 9.61736V5.38264Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))})),Dt=["color"],Ht=n.forwardRef((function(e,t){var i=e.color,o=void 0===i?"currentColor":i,r=kt(e,Dt);return n.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),n.createElement("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}));const Vt={youtube:e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null},vimeo:e=>new URL(e).pathname.split("/")[1],dailymotion:e=>{const t=e.match(/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null}},Ft=({blockId:i,onClose:o})=>{const r=e.useYooptaEditor(),[s,l]=n.useState(""),a=0===s.length;return t.jsxs("div",Object.assign({className:"cursor-pointer user-select-none transition-bg duration-20 ease-in white-space-nowrap w-full"},{children:[t.jsx("input",{type:"text",placeholder:"Paste video link",value:s,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:e=>l(e.target.value)}),t.jsx("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:a,onClick:()=>{var e;if(0===s.length)return;const t=(n=s).includes("youtube.com")||n.includes("youtu.be")?"youtube":n.includes("vimeo.com")?"vimeo":n.includes("dailymotion.com")||n.includes("dai.ly")?"dailymotion":null;var n;const l=t?null===(e=Vt[t])||void 0===e?void 0:e.call(Vt,s):null;if(!t||!l)return console.warn("Unsopperted video provider or video id is not found.");r.blocks.Video.updateElement(i,"video",{src:s,provider:{type:t,id:l}}),o()}},{children:"Embed video"}))]}))},Ut=({accept:i="video/*",onClose:o,blockId:r,onSetLoading:s})=>{const l=e.useYooptaPluginOptions("Video"),c=e.useYooptaEditor();n.useEffect((()=>{}),[]);return t.jsx("div",Object.assign({className:"user-select-none transition-bg duration-20 ease-in white-space-nowrap rounded-[4px] h-[32px] px-[12px] border border-[rgba(55,53,47,0.16)] w-full cursor-pointer"},{children:t.jsxs("label",Object.assign({htmlFor:"video-uploader",className:"text-[14px] leading-[1.2] font-medium cursor-pointer w-full flex items-center justify-center h-full"},{children:[t.jsx("input",{type:"file",id:"video-uploader",className:"absolute left-0 top-0 invisible",accept:(null==l?void 0:l.accept)||i,onChange:e=>{const t=e.target.files[0];t&&(e=>{a(void 0,void 0,void 0,(function*(){if(!(null==l?void 0:l.onUpload))throw new Error("onUpload not provided in plugin options. Check Video.extend({}) method");o(),s(!0);try{const t=yield null==l?void 0:l.onUpload(e);c.blocks.Video.updateElement(r,"video",{src:t.src,sizes:t.sizes,bgColor:t.bgColor})}catch(e){}finally{s(!1)}}))})(t)},multiple:!1}),"Upload video"]}))}))},Yt=({floatingStyles:e,refs:i,onClose:o,blockId:r,onSetLoading:s})=>{const[l,a]=n.useState("upload"),c=e=>a(e),u="upload"===l,d="embed"===l,h=e=>({borderBottom:e?"2px solid #2483e2":"2px solid transparent"});return t.jsx(Et,Object.assign({root:document.getElementById("yoopta-editor")},{children:t.jsx(Lt,Object.assign({lockScroll:!0,className:"z-[100]",onClick:o},{children:t.jsx("div",Object.assign({ref:i.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:t.jsxs("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:[t.jsxs("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:[t.jsx("button",Object.assign({type:"button",onClick:()=>c("upload"),style:h(u),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:"Upload"})),t.jsx("button",Object.assign({type:"button",onClick:()=>c("embed"),style:h(d),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:"Video link"}))]})),t.jsxs("div",Object.assign({className:"pt-[6px] pb-[6px] mt-[4px] flex justify-center mr-[12px] ml-[12px]"},{children:[d&&t.jsx(Ft,{onClose:o,blockId:r}),u&&t.jsx(Ut,{onClose:o,blockId:r,onSetLoading:s})]}))]}))}))}))}))},$t=({className:e,width:n,height:i,children:o})=>t.jsxs("div",Object.assign({className:e},{children:[o,t.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:n,height:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-2 h-4 w-4 animate-spin"},{children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),Xt=({attributes:e,children:i,blockId:o})=>{const[r,s]=n.useState(!1),[l,a]=n.useState(!1),{refs:c,floatingStyles:u}=Nt({placement:"bottom",open:r,onOpenChange:s,middleware:[Ae(),We(),Me(),ve(10)]});return t.jsxs("div",Object.assign({className:"w-full user-select-none m-[20px_0_10px] relative flex"},e,{contentEditable:!1},{children:[t.jsxs("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:()=>s(!0),disabled:l,ref:c.setReference},{children:[l?t.jsx($t,{className:"mr-2 user-select-none",width:24,height:24}):t.jsx(It,{className:"mr-2 user-select-none",width:24,height:24}),t.jsx("span",Object.assign({className:"font-medium"},{children:l?"Loading...":"Click to add video"})),l&&t.jsx("div",{className:"absolute top-0 left-0 h-full bg-[rgba(55,53,47,0.16)]",style:{width:"100%",transition:"width 100ms ease-in"}})]})),r&&t.jsx(Yt,{blockId:o,floatingStyles:u,refs:c,onClose:()=>s(!1),onSetLoading:e=>a(e)}),i]}))},{ExtendedBlockActions:Zt,BlockOptionsMenuGroup:qt,BlockOptionsMenuItem:Gt,BlockOptionsSeparator:Jt}=e.UI,Kt=({editor:e,block:n,props:i})=>t.jsxs(Zt,Object.assign({onClick:()=>e.setSelection([n.meta.order]),className:"yoopta-video-options"},{children:[t.jsx(Jt,{}),t.jsxs(qt,{children:[t.jsx(Gt,{children:t.jsxs("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:()=>{e.blocks.Image.updateElement(n.id,"video",{fit:"contain"})}},{children:[t.jsx(At,{width:16,height:16,className:"w-4 h-4 mr-2"}),"Fit"]}))}),t.jsx(Gt,{children:t.jsxs("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:()=>{e.blocks.Image.updateElement(n.id,"video",{fit:"fill"})}},{children:[t.jsx(Ht,{width:16,height:16,className:"w-4 h-4 mr-2"}),"Fill"]}))}),t.jsx(Gt,{children:t.jsxs("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:()=>{e.blocks.Image.updateElement(n.id,"video",{fit:"cover"})}},{children:[t.jsx(Tt,{width:16,height:16,className:"w-4 h-4 mr-2"}),"Cover"]}))})]}),t.jsx(Jt,{}),t.jsx(qt,{children:t.jsx(Gt,{children:t.jsxs("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:()=>{if(!i||!i.src)return;const e=document.createElement("a");e.href=i.src,e.download=i.src,e.target="_blank",e.rel="noopener noreferrer",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},{children:[t.jsx(Mt,{width:16,height:16,className:"w-4 h-4 mr-2"}),"Download"]}))})})]})),Qt=({position:e})=>t.jsx("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"===e?"left-0 top-0":"right-0 top-0")},{children:t.jsx("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]"})})),en=new e.YooptaPlugin({type:"Video",elements:{video:{render:({element:i,attributes:o,children:r,blockId:s})=>{const{src:l,srcSet:a,bgColor:c,settings:u,sizes:h,poster:p,provider:f,fit:g}=i.props||{},m=e.useBlockData(s),v=e.useYooptaEditor(),w=e.useYooptaPluginOptions("Video"),y=e.useYooptaReadOnly(),[b,x]=n.useState({width:(null==h?void 0:h.width)||750,height:(null==h?void 0:h.height)||440});n.useEffect((()=>x({width:(null==h?void 0:h.width)||650,height:(null==h?void 0:h.height)||440})),[i.props]);const C=e.useBlockSelected({blockId:s}),S=n.useMemo((()=>{var e,n;return{minWidth:300,size:{width:b.width,height:b.height},maxWidth:(null===(e=null==w?void 0:w.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(n=null==w?void 0:w.maxSizes)||void 0===n?void 0:n.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!y,right:!y},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,n)=>{x({width:n.offsetWidth,height:n.offsetHeight})},onResizeStop:(e,t,n)=>{v.blocks.Video.updateElement(s,"video",{sizes:{width:n.offsetWidth,height:n.offsetHeight}})},handleComponent:{left:t.jsx(Qt,{position:"left"}),right:t.jsx(Qt,{position:"right"})}}}),[b.width,b.height]);return l?t.jsx("div",Object.assign({"data-element-type":i.type,contentEditable:!1,draggable:!1,className:"mt-4 relative yoopta-video"},o,{children:t.jsxs(_,Object.assign({},S,{className:"mx-auto my-0 flex"},{children:[C&&t.jsx("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"}),t.jsx(d,{src:l,srcSet:a,width:null==b?void 0:b.width,settings:u,bgColor:c,height:null==b?void 0:b.height,poster:p,provider:f,fit:g}),!y&&t.jsx(Kt,{block:m,editor:v,settings:u,props:i.props}),r]}))})):t.jsx(Xt,Object.assign({attributes:o,blockId:s},{children:r}))},props:{src:null,srcSet:null,bgColor:null,sizes:{width:650,height:400},nodeType:"void",provider:{type:null,id:""},settings:{controls:!1,loop:!0,muted:!0,autoPlay:!0}}}},options:{accept:"video/*",maxSizes:{maxWidth:650,maxHeight:550},onUpload:()=>a(void 0,void 0,void 0,(function*(){return Promise.resolve({src:""})})),display:{title:"Video",description:"Upload from device, embed from Youtube, Vimeo"}},parsers:{html:{deserialize:{nodeNames:["VIDEO"],parse:t=>{if("VIDEO"===t.nodeName){const n={src:t.getAttribute("src"),srcSet:t.getAttribute("srcset"),bgColor:t.getAttribute("bgcolor"),sizes:{width:t.getAttribute("width"),height:t.getAttribute("height")},settings:{controls:!!t.getAttribute("controls"),loop:!!t.getAttribute("loop"),muted:!!t.getAttribute("muted"),autoPlay:!!t.getAttribute("autoplay")}};return{id:e.generateId(),type:"video",children:[{text:""}],props:n}}}}}}});!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".yoo-video-absolute{position:absolute}.yoo-video-relative{position:relative}.yoo-video-left-0{left:0}.yoo-video-top-0{top:0}.yoo-video-h-full{height:100%}.yoo-video-w-full{width:100%}.yoopta-video .yoopta-video-options{opacity:0;transition:opacity .15s ease-in-out}.yoopta-video:hover .yoopta-video-options{opacity:1}"),exports.default=en;
6
+ var Ve=["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(","),Fe="undefined"==typeof Element,Ue=Fe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ye=!Fe&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Ze=function e(t,o){var i;void 0===o&&(o=!0);var n=null==t||null===(i=t.getAttribute)||void 0===i?void 0:i.call(t,"inert");return""===n||"true"===n||o&&t&&e(t.parentNode)},$e=function e(t,o,i){for(var n=[],r=Array.from(t);r.length;){var s=r.shift();if(!Ze(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,i);i.flatten?n.push.apply(n,l):n.push({scopeParent:s,candidates:l})}else{Ue.call(s,Ve)&&i.filter(s)&&(o||!t.includes(s))&&n.push(s);var d=s.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(s),c=!Ze(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(s));if(d&&c){var u=e(!0===d?s.children:d.children,!0,i);i.flatten?n.push.apply(n,u):n.push({scopeParent:s,candidates:u})}else r.unshift.apply(r,s.children)}}return n},Xe=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},qe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,o=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===o||"true"===o}(e))&&!Xe(e)?0:e.tabIndex},Ge=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Je=function(e){return"INPUT"===e.tagName},Ke=function(e){return function(e){return Je(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,o=e.form||Ye(e),i=function(e){return o.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var n=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]}(t,e.form);return!n||n===e}(e)},Qe=function(e){var t=e.getBoundingClientRect(),o=t.width,i=t.height;return 0===o&&0===i},et=function(e,t){var o=t.displayCheck,i=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=Ue.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Ue.call(n,"details:not([open]) *"))return!0;if(o&&"full"!==o&&"legacy-full"!==o){if("non-zero-area"===o)return Qe(e)}else{if("function"==typeof i){for(var r=e;e;){var s=e.parentElement,a=Ye(e);if(s&&!s.shadowRoot&&!0===i(s))return Qe(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=r}if(function(e){var t,o,i,n,r=e&&Ye(e),s=null===(t=r)||void 0===t?void 0:t.host,a=!1;if(r&&r!==e)for(a=!!(null!==(o=s)&&void 0!==o&&null!==(i=o.ownerDocument)&&void 0!==i&&i.contains(s)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!a&&s;){var l,d,c;a=!(null===(d=s=null===(l=r=Ye(s))||void 0===l?void 0:l.host)||void 0===d||null===(c=d.ownerDocument)||void 0===c||!c.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==o)return!0}return!1},tt=function(e,t){return!(t.disabled||Ze(t)||function(e){return Je(e)&&"hidden"===e.type}(t)||et(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var o=0;o<t.children.length;o++){var i=t.children.item(o);if("LEGEND"===i.tagName)return!!Ue.call(t,"fieldset[disabled] *")||!i.contains(e)}return!0}t=t.parentElement}return!1}(t))},ot=function(e,t){return!(Ke(t)||qe(t)<0||!tt(e,t))},it=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},nt=function e(t){var o=[],i=[];return t.forEach((function(t,n){var r=!!t.scopeParent,s=r?t.scopeParent:t,a=function(e,t){var o=qe(e);return o<0&&t&&!Xe(e)?0:o}(s,r),l=r?e(t.candidates):s;0===a?r?o.push.apply(o,l):o.push(s):i.push({documentOrder:n,tabIndex:a,item:t,isScope:r,content:l})})),i.sort(Ge).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(o)},rt=function(e,t){var o;return o=(t=t||{}).getShadowRoot?$e([e],t.includeContainer,{filter:ot.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:it}):function(e,t,o){if(Ze(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Ve));return t&&Ue.call(e,Ve)&&i.unshift(e),i.filter(o)}(e,t.includeContainer,ot.bind(null,t)),nt(o)};const st=r["useInsertionEffect".toString()]||(e=>e());var at="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function lt(){return lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},lt.apply(this,arguments)}let dt=!1,ct=0;const ut=()=>"floating-ui-"+ct++;const pt=r["useId".toString()]||function(){const[e,t]=r.useState((()=>dt?ut():void 0));return at((()=>{null==e&&t(ut())}),[]),r.useEffect((()=>{dt||(dt=!0)}),[]),e};const ht=r.createContext(null),ft=r.createContext(null);function vt(e){return"data-floating-ui-"+e}const yt=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function gt(e,t){const o=rt(e,yt());"prev"===t&&o.reverse();const i=o.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(o=t)||null==(o=o.shadowRoot)?void 0:o.activeElement);){var o;t=t.shadowRoot.activeElement}return t}((null==(n=e)?void 0:n.ownerDocument)||document));var n;return o.slice(i+1)[0]}function mt(e,t){const o=t||e.currentTarget,i=e.relatedTarget;return!i||!function(e,t){if(!e||!t)return!1;const o=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&I(o)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}(o,i)}function xt(e){rt(e,yt()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function wt(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const bt={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 Ct(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const St=r.forwardRef((function(e,t){const[o,i]=r.useState();at((()=>(/apple/i.test(navigator.vendor)&&i("button"),document.addEventListener("keydown",Ct),()=>{document.removeEventListener("keydown",Ct)})),[]);const n={ref:t,tabIndex:0,role:o,"aria-hidden":!o||void 0,[vt("focus-guard")]:"",style:bt};return r.createElement("span",lt({},e,n))})),Rt=r.createContext(null),zt=vt("portal");function jt(e){let{children:t,id:o,root:n=null,preserveTabOrder:s=!0}=e;const a=function(e){let{id:t,root:o}=void 0===e?{}:e;const[i,n]=r.useState(null),s=pt(),a=Et(),l=r.useRef(null);return at((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{l.current=null}))}),[i]),at((()=>{if(l.current)return;const e=t?document.getElementById(t):null;if(!e)return;const o=document.createElement("div");o.id=s,o.setAttribute(zt,""),e.appendChild(o),l.current=o,n(o)}),[t,s]),at((()=>{if(l.current)return;let e=o||(null==a?void 0:a.portalNode);e&&!T(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const r=document.createElement("div");r.id=s,r.setAttribute(zt,""),e=i||e,e.appendChild(r),l.current=r,n(r)}),[t,o,s,a]),i}({id:o,root:n}),[l,d]=r.useState(null),c=r.useRef(null),u=r.useRef(null),p=r.useRef(null),h=r.useRef(null),f=!!l&&!l.modal&&l.open&&s&&!(!n&&!a);return r.useEffect((()=>{if(a&&s&&(null==l||!l.modal))return a.addEventListener("focusin",e,!0),a.addEventListener("focusout",e,!0),()=>{a.removeEventListener("focusin",e,!0),a.removeEventListener("focusout",e,!0)};function e(e){if(a&&mt(e)){("focusin"===e.type?wt:xt)(a)}}}),[a,s,null==l?void 0:l.modal]),r.createElement(Rt.Provider,{value:r.useMemo((()=>({preserveTabOrder:s,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:p,afterInsideRef:h,portalNode:a,setFocusManagerState:d})),[s,a])},f&&a&&r.createElement(St,{"data-type":"outside",ref:c,onFocus:e=>{if(mt(e,a)){var t;null==(t=p.current)||t.focus()}else{const e=gt(document.body,"prev")||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),f&&a&&r.createElement("span",{"aria-owns":a.id,style:bt}),a&&i.createPortal(t,a),f&&a&&r.createElement(St,{"data-type":"outside",ref:u,onFocus:e=>{if(mt(e,a)){var t;null==(t=h.current)||t.focus()}else{const t=gt(document.body,"next")||(null==l?void 0:l.refs.domReference.current);null==t||t.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent))}}}))}const Et=()=>r.useContext(Rt),_t=new Set,Ot=r.forwardRef((function(e,t){let{lockScroll:o=!1,...i}=e;const n=pt();return at((()=>{if(!o)return;_t.add(n);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,i=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,s=t.left?parseFloat(t.left):window.pageXOffset,a=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",r&&(t[i]=r+"px"),e){var l,d;const e=(null==(l=window.visualViewport)?void 0:l.offsetLeft)||0,o=(null==(d=window.visualViewport)?void 0:d.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(o))+"px",left:-(s-Math.floor(e))+"px",right:"0"})}return()=>{_t.delete(n),0===_t.size&&(Object.assign(t,{overflow:"",[i]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a)))}}),[n,o]),r.createElement("div",lt({ref:t},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))}));function kt(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:i,nodeId:n}=e,[a,l]=r.useState(null),d=(null==(t=e.elements)?void 0:t.reference)||a,c=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:i=[],platform:n,elements:{reference:a,floating:l}={},transform:d=!0,whileElementsMounted:c,open:u}=e,[p,h]=r.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[f,v]=r.useState(i);Be(f,i)||v(i);const[y,g]=r.useState(null),[m,x]=r.useState(null),w=r.useCallback((e=>{e!==R.current&&(R.current=e,g(e))}),[]),b=r.useCallback((e=>{e!==z.current&&(z.current=e,x(e))}),[]),C=a||y,S=l||m,R=r.useRef(null),z=r.useRef(null),j=r.useRef(p),E=null!=c,_=De(c),O=De(n),k=r.useCallback((()=>{if(!R.current||!z.current)return;const e={placement:t,strategy:o,middleware:f};O.current&&(e.platform=O.current),Pe(R.current,z.current,e).then((e=>{const t={...e,isPositioned:!0};L.current&&!Be(j.current,t)&&(j.current=t,s.flushSync((()=>{h(t)})))}))}),[f,t,o,O]);Te((()=>{!1===u&&j.current.isPositioned&&(j.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[u]);const L=r.useRef(!1);Te((()=>(L.current=!0,()=>{L.current=!1})),[]),Te((()=>{if(C&&(R.current=C),S&&(z.current=S),C&&S){if(_.current)return _.current(C,S,k);k()}}),[C,S,k,_,E]);const N=r.useMemo((()=>({reference:R,floating:z,setReference:w,setFloating:b})),[w,b]),M=r.useMemo((()=>({reference:C,floating:S})),[C,S]),W=r.useMemo((()=>{const e={position:o,left:0,top:0};if(!M.floating)return e;const t=He(M.floating,p.x),i=He(M.floating,p.y);return d?{...e,transform:"translate("+t+"px, "+i+"px)",...Ie(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:i}}),[o,d,M.floating,p.x,p.y]);return r.useMemo((()=>({...p,update:k,refs:N,elements:M,floatingStyles:W})),[p,k,N,M,W])}(e),u=r.useContext(ft),p=null!=((null==(h=r.useContext(ht))?void 0:h.id)||null);var h;const f=function(e){const t=r.useRef((()=>{}));return st((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return null==t.current?void 0:t.current(...o)}),[])}(((e,t,o)=>{e&&(y.current.openEvent=t),g.emit("openchange",{open:e,event:t,reason:o,nested:p}),null==i||i(e,t,o)})),v=r.useRef(null),y=r.useRef({}),g=r.useState((()=>function(){const e=new Map;return{emit(t,o){var i;null==(i=e.get(t))||i.forEach((e=>e(o)))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var i;e.set(t,(null==(i=e.get(t))?void 0:i.filter((e=>e!==o)))||[])}}}()))[0],m=pt(),x=r.useCallback((e=>{const t=T(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c.refs.setReference(t)}),[c.refs]),w=r.useCallback((e=>{(T(e)||null===e)&&(v.current=e,l(e)),(T(c.refs.reference.current)||null===c.refs.reference.current||null!==e&&!T(e))&&c.refs.setReference(e)}),[c.refs]),b=r.useMemo((()=>({...c.refs,setReference:w,setPositionReference:x,domReference:v})),[c.refs,w,x]),C=r.useMemo((()=>({...c.elements,domReference:d})),[c.elements,d]),S=r.useMemo((()=>({...c,refs:b,elements:C,dataRef:y,nodeId:n,floatingId:m,events:g,open:o,onOpenChange:f})),[c,n,m,g,o,f,b,C]);return at((()=>{const e=null==u?void 0:u.nodesRef.current.find((e=>e.id===n));e&&(e.context=S)})),r.useMemo((()=>({...c,context:S,refs:b,elements:C})),[c,b,C,S])}function Lt(e,t){if(null==e)return{};var o,i,n={},r=Object.keys(e);for(i=0;i<r.length;i++)o=r[i],t.indexOf(o)>=0||(n[o]=e[o]);return n}var Nt=["color"],Mt=o.forwardRef((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,r=Lt(e,Nt);return o.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),o.createElement("path",{d:"M7.50005 1.04999C7.74858 1.04999 7.95005 1.25146 7.95005 1.49999V8.41359L10.1819 6.18179C10.3576 6.00605 10.6425 6.00605 10.8182 6.18179C10.994 6.35753 10.994 6.64245 10.8182 6.81819L7.81825 9.81819C7.64251 9.99392 7.35759 9.99392 7.18185 9.81819L4.18185 6.81819C4.00611 6.64245 4.00611 6.35753 4.18185 6.18179C4.35759 6.00605 4.64251 6.00605 4.81825 6.18179L7.05005 8.41359V1.49999C7.05005 1.25146 7.25152 1.04999 7.50005 1.04999ZM2.5 10C2.77614 10 3 10.2239 3 10.5V12C3 12.5539 3.44565 13 3.99635 13H11.0012C11.5529 13 12 12.5528 12 12V10.5C12 10.2239 12.2239 10 12.5 10C12.7761 10 13 10.2239 13 10.5V12C13 13.1041 12.1062 14 11.0012 14H3.99635C2.89019 14 2 13.103 2 12V10.5C2 10.2239 2.22386 10 2.5 10Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Wt=["color"],At=o.forwardRef((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,r=Lt(e,Wt);return o.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),o.createElement("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"}))})),Pt=["color"],Tt=o.forwardRef((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,r=Lt(e,Pt);return o.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),o.createElement("path",{d:"M7.81832 0.68179C7.64258 0.506054 7.35766 0.506054 7.18192 0.68179L5.18192 2.68179C5.00619 2.85753 5.00619 3.14245 5.18192 3.31819C5.35766 3.49392 5.64258 3.49392 5.81832 3.31819L7.05012 2.08638L7.05012 5.50023C7.05012 5.74876 7.25159 5.95023 7.50012 5.95023C7.74865 5.95023 7.95012 5.74876 7.95012 5.50023L7.95012 2.08638L9.18192 3.31819C9.35766 3.49392 9.64258 3.49392 9.81832 3.31819C9.99406 3.14245 9.99406 2.85753 9.81832 2.68179L7.81832 0.68179ZM7.95012 12.9136V9.50023C7.95012 9.2517 7.74865 9.05023 7.50012 9.05023C7.25159 9.05023 7.05012 9.2517 7.05012 9.50023V12.9136L5.81832 11.6818C5.64258 11.5061 5.35766 11.5061 5.18192 11.6818C5.00619 11.8575 5.00619 12.1424 5.18192 12.3182L7.18192 14.3182C7.26632 14.4026 7.38077 14.45 7.50012 14.45C7.61947 14.45 7.73393 14.4026 7.81832 14.3182L9.81832 12.3182C9.99406 12.1424 9.99406 11.8575 9.81832 11.6818C9.64258 11.5061 9.35766 11.5061 9.18192 11.6818L7.95012 12.9136ZM1.49994 7.00017C1.2238 7.00017 0.999939 7.22403 0.999939 7.50017C0.999939 7.77631 1.2238 8.00017 1.49994 8.00017L13.4999 8.00017C13.7761 8.00017 13.9999 7.77631 13.9999 7.50017C13.9999 7.22403 13.7761 7.00017 13.4999 7.00017L1.49994 7.00017Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Bt=["color"],It=o.forwardRef((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,r=Lt(e,Bt);return o.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),o.createElement("path",{d:"M11.5 3.04999C11.7485 3.04999 11.95 3.25146 11.95 3.49999V7.49999C11.95 7.74852 11.7485 7.94999 11.5 7.94999C11.2515 7.94999 11.05 7.74852 11.05 7.49999V4.58639L4.58638 11.05H7.49999C7.74852 11.05 7.94999 11.2515 7.94999 11.5C7.94999 11.7485 7.74852 11.95 7.49999 11.95L3.49999 11.95C3.38064 11.95 3.26618 11.9026 3.18179 11.8182C3.0974 11.7338 3.04999 11.6193 3.04999 11.5L3.04999 7.49999C3.04999 7.25146 3.25146 7.04999 3.49999 7.04999C3.74852 7.04999 3.94999 7.25146 3.94999 7.49999L3.94999 10.4136L10.4136 3.94999L7.49999 3.94999C7.25146 3.94999 7.04999 3.74852 7.04999 3.49999C7.04999 3.25146 7.25146 3.04999 7.49999 3.04999L11.5 3.04999Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Ht=["color"],Dt=o.forwardRef((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,r=Lt(e,Ht);return o.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),o.createElement("path",{d:"M4.76447 3.12199C5.63151 3.04859 6.56082 3 7.5 3C8.43918 3 9.36849 3.04859 10.2355 3.12199C11.2796 3.21037 11.9553 3.27008 12.472 3.39203C12.9425 3.50304 13.2048 3.64976 13.4306 3.88086C13.4553 3.90618 13.4902 3.94414 13.5133 3.97092C13.7126 4.20149 13.8435 4.4887 13.918 5.03283C13.9978 5.6156 14 6.37644 14 7.52493C14 8.66026 13.9978 9.41019 13.9181 9.98538C13.8439 10.5206 13.7137 10.8061 13.5125 11.0387C13.4896 11.0651 13.4541 11.1038 13.4296 11.1287C13.2009 11.3625 12.9406 11.5076 12.4818 11.6164C11.9752 11.7365 11.3143 11.7942 10.2878 11.8797C9.41948 11.9521 8.47566 12 7.5 12C6.52434 12 5.58052 11.9521 4.7122 11.8797C3.68572 11.7942 3.02477 11.7365 2.51816 11.6164C2.05936 11.5076 1.7991 11.3625 1.57037 11.1287C1.54593 11.1038 1.51035 11.0651 1.48748 11.0387C1.28628 10.8061 1.15612 10.5206 1.08193 9.98538C1.00221 9.41019 1 8.66026 1 7.52493C1 6.37644 1.00216 5.6156 1.082 5.03283C1.15654 4.4887 1.28744 4.20149 1.48666 3.97092C1.5098 3.94414 1.54468 3.90618 1.56942 3.88086C1.7952 3.64976 2.05752 3.50304 2.52796 3.39203C3.04473 3.27008 3.7204 3.21037 4.76447 3.12199ZM0 7.52493C0 5.28296 0 4.16198 0.729985 3.31713C0.766457 3.27491 0.815139 3.22194 0.854123 3.18204C1.63439 2.38339 2.64963 2.29744 4.68012 2.12555C5.56923 2.05028 6.52724 2 7.5 2C8.47276 2 9.43077 2.05028 10.3199 2.12555C12.3504 2.29744 13.3656 2.38339 14.1459 3.18204C14.1849 3.22194 14.2335 3.27491 14.27 3.31713C15 4.16198 15 5.28296 15 7.52493C15 9.74012 15 10.8477 14.2688 11.6929C14.2326 11.7348 14.1832 11.7885 14.1444 11.8281C13.3629 12.6269 12.3655 12.71 10.3709 12.8763C9.47971 12.9505 8.50782 13 7.5 13C6.49218 13 5.52028 12.9505 4.62915 12.8763C2.63446 12.71 1.63712 12.6269 0.855558 11.8281C0.816844 11.7885 0.767442 11.7348 0.731221 11.6929C0 10.8477 0 9.74012 0 7.52493ZM5.25 5.38264C5.25 5.20225 5.43522 5.08124 5.60041 5.15369L10.428 7.27105C10.6274 7.35853 10.6274 7.64147 10.428 7.72895L5.60041 9.84631C5.43522 9.91876 5.25 9.79775 5.25 9.61736V5.38264Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Vt=["color"],Ft=o.forwardRef((function(e,t){var i=e.color,n=void 0===i?"currentColor":i,r=Lt(e,Vt);return o.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),o.createElement("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))}));const Ut={youtube:e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null},vimeo:e=>new URL(e).pathname.split("/")[1],dailymotion:e=>{const t=e.match(/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/);return null!==t?void 0!==t[4]?t[4]:t[2]:null}},Yt=({blockId:i,onClose:n})=>{const r=e.useYooptaEditor(),[s,a]=o.useState(""),l=0===s.length;return t.jsxs("div",Object.assign({className:"yoo-video-cursor-pointer yoo-video-user-select-none yoo-video-transition-bg yoo-video-duration-20 yoo-video-ease-in yoo-video-white-space-nowrap yoo-video-w-full"},{children:[t.jsx("input",{type:"text",placeholder:"Paste video link",value:s,className:"yoo-video-items-center yoo-video-bg-[hsla(45,13%,94%,.6)] yoo-video-rounded-[4px] yoo-video-shadow-[inset_0_0_0_1px_hsla(0,0%,6%,.1)] yoo-video-cursor-text yoo-video-flex yoo-video-text-[14px] yoo-video-h-[32px] yoo-video-leading-[20px] yoo-video-px-[6px] yoo-video-relative yoo-video-w-full yoo-video-border-none",onChange:e=>a(e.target.value)}),t.jsx("button",Object.assign({type:"button",className:"yoo-video-user-select-none yoo-video-transition-bg yoo-video-duration-20 yoo-video-ease-in yoo-video-cursor-pointer yoo-video-flex yoo-video-items-center yoo-video-justify-center yoo-video-flex-shrink-0 yoo-video-white-space-nowrap yoo-video-h-[28px] yoo-video-rounded-[4px] yoo-video-shadow-[rgba(15,15,15,0.1)_0px_0px_0px_1px_inset,_rgba(15,15,15,0.1)_0px_1px_2px] yoo-video-bg-[rgb(35,131,226)] yoo-video-text-white yoo-video-fill-white yoo-video-leading-[1.2] yoo-video-px-[12px] yoo-video-text-[14px] yoo-video-font-medium yoo-video-w-full yoo-video-max-w-[300px] yoo-video-mx-auto yoo-video-m-[12px_0_6px] disabled:yoo-video-bg-[rgba(35,131,226,0.5)] disabled:yoo-video-cursor-not-allowed",disabled:l,onClick:()=>{var e;if(0===s.length)return;const t=(o=s).includes("youtube.com")||o.includes("youtu.be")?"youtube":o.includes("vimeo.com")?"vimeo":o.includes("dailymotion.com")||o.includes("dai.ly")?"dailymotion":null;var o;const a=t?null===(e=Ut[t])||void 0===e?void 0:e.call(Ut,s):null;if(!t||!a)return console.warn("Unsopperted video provider or video id is not found.");r.blocks.Video.updateElement(i,"video",{src:s,provider:{type:t,id:a,url:s}}),n()}},{children:"Embed video"}))]}))},Zt=({accept:i="video/*",onClose:n,blockId:r,onSetLoading:s})=>{const a=e.useYooptaPluginOptions("Video"),d=e.useYooptaEditor();o.useEffect((()=>{}),[]);return t.jsx("div",Object.assign({className:"yoo-video-user-select-none yoo-video-transition-bg yoo-video-duration-20 yoo-video-ease-in yoo-video-white-space-nowrap yoo-video-rounded-[4px] yoo-video-h-[32px] yoo-video-px-[12px] yoo-video-border yoo-video-border-[rgba(55,53,47,0.16)] yoo-video-w-full yoo-video-cursor-pointer"},{children:t.jsxs("label",Object.assign({htmlFor:"video-uploader",className:"yoo-video-text-[14px] yoo-video-leading-[1.2] yoo-video-font-medium yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-items-center yoo-video-justify-center yoo-video-h-full"},{children:[t.jsx("input",{type:"file",id:"video-uploader",className:"yoo-video-absolute yoo-video-left-0 yoo-video-top-0 yoo-video-invisible",accept:(null==a?void 0:a.accept)||i,onChange:e=>{const t=e.target.files[0];t&&(e=>{l(void 0,void 0,void 0,(function*(){if(!(null==a?void 0:a.onUpload))throw new Error("onUpload not provided in plugin options. Check Video.extend({}) method");n(),s(!0);try{const t=yield null==a?void 0:a.onUpload(e);d.blocks.Video.updateElement(r,"video",{src:t.src,sizes:t.sizes,bgColor:t.bgColor})}catch(e){}finally{s(!1)}}))})(t)},multiple:!1}),"Upload video"]}))}))},$t=({floatingStyles:e,refs:i,onClose:n,blockId:r,onSetLoading:s})=>{const[a,l]=o.useState("upload"),d=e=>l(e),c="upload"===a,u="embed"===a,p=e=>({borderBottom:e?"2px solid #2483e2":"2px solid transparent"});return t.jsx(jt,Object.assign({id:"yoo-video-uploader-portal",root:document.getElementById("yoopta-editor")},{children:t.jsx(Ot,Object.assign({lockScroll:!0,className:"yoo-video-z-[100]",onClick:n},{children:t.jsx("div",Object.assign({ref:i.setFloating,style:e,onClick:e=>e.stopPropagation()},{children:t.jsxs("div",Object.assign({className:"yoo-video-flex yoo-video-flex-col yoo-video-min-w-[540px] yoo-video-max-w-[calc(100vw-24px)] yoo-video-h-full yoo-video-max-h-[420px] yoo-video-bg-white yoo-video-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:[t.jsxs("div",Object.assign({className:"yoo-video-w-full yoo-video-flex yoo-video-text-[14px] yoo-video-p-[0_8px] yoo-video-shadow-[rgb(55_53_47_/9%)_0px_-1px_0px_inset] yoo-video-relative yoo-video-z-10 yoo-video-h-[40px]"},{children:[t.jsx("button",Object.assign({type:"button",onClick:()=>d("upload"),style:p(c),className:"yoo-video-py-[6px] yoo-video-whitespace-nowrap yoo-video-min-w-0 yoo-video-flex-shrink-0 yoo-video-text-[rgb(55,53,47)] yoo-video-relative yoo-video-cursor-pointer yoo-video-user-select-none yoo-video-bg-inherit yoo-video-transition-[height_20ms_ease-in] yoo-video-inline-flex yoo-video-items-center yoo-video-h-full yoo-video-text-[14px] yoo-video-leading-[1.2] yoo-video-px-[8px]"},{children:"Upload"})),t.jsx("button",Object.assign({type:"button",onClick:()=>d("embed"),style:p(u),className:"yoo-video-py-[6px] yoo-video-whitespace-nowrap yoo-video-min-w-0 yoo-video-flex-shrink-0 yoo-video-text-[rgb(55,53,47)] yoo-video-relative yoo-video-cursor-pointer yoo-video-user-select-none yoo-video-bg-inherit yoo-video-transition-[height_20ms_ease-in] yoo-video-inline-flex yoo-video-items-center yoo-video-h-full yoo-video-text-[14px] yoo-video-leading-[1.2] yoo-video-px-[8px]"},{children:"Video link"}))]})),t.jsxs("div",Object.assign({className:"yoo-video-pt-[6px] yoo-video-pb-[6px] yoo-video-mt-[4px] yoo-video-flex yoo-video-justify-center yoo-video-mr-[12px] yoo-video-ml-[12px]"},{children:[u&&t.jsx(Yt,{onClose:n,blockId:r}),c&&t.jsx(Zt,{onClose:n,blockId:r,onSetLoading:s})]}))]}))}))}))}))},Xt=({className:e,width:o,height:i,children:n})=>t.jsxs("div",Object.assign({className:e},{children:[n,t.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:o,height:i,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-2 yoo-video-h-4 yoo-video-w-4 yoo-video-animate-spin"},{children:t.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}))]})),qt=({attributes:e,children:i,blockId:n})=>{const[r,s]=o.useState(!1),[a,l]=o.useState(!1),{refs:d,floatingStyles:c}=kt({placement:"bottom",open:r,onOpenChange:s,middleware:[Ae(),We(),Me(),ge(10)]});return t.jsxs("div",Object.assign({className:"yoo-video-w-full yoo-video-user-select-none yoo-video-m-[20px_0_10px] yoo-video-relative yoo-video-flex"},e,{contentEditable:!1},{children:[t.jsxs("button",Object.assign({className:"yoo-video-p-[12px_36px_12px_12px] yoo-video-flex yoo-video-items-center yoo-video-text-left yoo-video-w-full yoo-video-overflow-hidden yoo-video-rounded-[3px] yoo-video-text-[14px] yoo-video-text-[rgba(55,53,47,0.65)] yoo-video-relative yoo-video-cursor-pointer yoo-video-border-none yoo-video-bg-[#efefef] yoo-video-transition-[background-color_100ms_ease-in] hover:yoo-video-bg-[#e3e3e3]",onClick:()=>s(!0),disabled:a,ref:d.setReference},{children:[a?t.jsx(Xt,{className:"yoo-video-mr-2 yoo-video-user-select-none",width:24,height:24}):t.jsx(Dt,{className:"yoo-video-mr-2 yoo-video-user-select-none",width:24,height:24}),t.jsx("span",Object.assign({className:"yoo-video-font-medium"},{children:a?"Loading...":"Click to add video"})),a&&t.jsx("div",{className:"yoo-video-absolute yoo-video-top-0 yoo-video-left-0 yoo-video-h-full yoo-video-bg-[rgba(55,53,47,0.16)]",style:{width:"100%",transition:"width 100ms ease-in"}})]})),r&&t.jsx($t,{blockId:n,floatingStyles:c,refs:d,onClose:()=>s(!1),onSetLoading:e=>l(e)}),i]}))},{ExtendedBlockActions:Gt,BlockOptionsMenuGroup:Jt,BlockOptionsMenuItem:Kt,BlockOptionsSeparator:Qt}=e.UI,eo=({editor:e,block:o,props:i})=>{var n;const r=!!(null===(n=null==i?void 0:i.provider)||void 0===n?void 0:n.id);return t.jsxs(Gt,Object.assign({onClick:()=>e.setSelection([o.meta.order]),className:"yoopta-video-options"},{children:[t.jsx(Qt,{}),!r&&t.jsxs(Jt,{children:[t.jsx(Kt,{children:t.jsxs("button",Object.assign({type:"button",className:"yoo-video-rounded-sm hover:yoo-video-bg-[#37352f14] yoo-video-leading-[120%] yoo-video-px-2 yoo-video-py-1.5 yoo-video-mx-[4px] yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-justify-start",onClick:()=>{e.blocks.Image.updateElement(o.id,"video",{fit:"contain"})}},{children:[t.jsx(Tt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Fit"]}))}),t.jsx(Kt,{children:t.jsxs("button",Object.assign({type:"button",className:"yoo-video-rounded-sm hover:yoo-video-bg-[#37352f14] yoo-video-leading-[120%] yoo-video-px-2 yoo-video-py-1.5 yoo-video-mx-[4px] yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-justify-start",onClick:()=>{e.blocks.Image.updateElement(o.id,"video",{fit:"fill"})}},{children:[t.jsx(Ft,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Fill"]}))}),t.jsx(Kt,{children:t.jsxs("button",Object.assign({type:"button",className:"yoo-video-rounded-sm hover:yoo-video-bg-[#37352f14] yoo-video-leading-[120%] yoo-video-px-2 yoo-video-py-1.5 yoo-video-mx-[4px] yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-justify-start",onClick:()=>{e.blocks.Image.updateElement(o.id,"video",{fit:"cover"})}},{children:[t.jsx(It,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Cover"]}))})]}),t.jsx(Qt,{}),t.jsx(Jt,{children:t.jsx(Kt,{children:t.jsx("button",Object.assign({type:"button",className:"yoo-video-rounded-sm hover:yoo-video-bg-[#37352f14] yoo-video-leading-[120%] yoo-video-px-2 yoo-video-py-1.5 yoo-video-mx-[4px] yoo-video-cursor-pointer yoo-video-w-full yoo-video-flex yoo-video-justify-start",onClick:r?()=>{var e,t;(null===(e=null==i?void 0:i.provider)||void 0===e?void 0:e.url)&&window.open(null===(t=null==i?void 0:i.provider)||void 0===t?void 0:t.url,"_blank")}:()=>{if(!i||!i.src||r)return;const e=document.createElement("a");e.href=i.src,e.download=i.src,e.target="_blank",e.rel="noopener noreferrer",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},{children:r?t.jsxs(t.Fragment,{children:[t.jsx(At,{width:16,height:16,className:"yoo-embed-w-4 yoo-embed-h-4 yoo-embed-mr-2"}),"Open"]}):t.jsxs(t.Fragment,{children:[t.jsx(Mt,{width:16,height:16,className:"yoo-video-w-4 yoo-video-h-4 yoo-video-mr-2"}),"Download"]})}))})})]}))},to=({position:e})=>t.jsx("div",Object.assign({contentEditable:!1,className:"yoo-video-absolute yoo-video-pointer-events-none yoo-video-flex yoo-video-items-center yoo-video-justify-center yoo-video-z-10 yoo-video-opacity-1 yoo-video-h-full yoo-video-w-[15px] yoo-video-cursor-col-resize yoo-video-transition-opacity yoo-video-duration-150 yoo-video-ease-in "+("left"===e?"yoo-video-left-0 yoo-video-top-0":"yoo-video-right-0 yoo-video-top-0")},{children:t.jsx("div",{className:"yoo-video-opacity-100 yoo-video-transition-opacity yoo-video-duration-300 yoo-video-ease-in yoo-video-rounded-[20px] yoo-video-bg-[rgba(15,15,15,0.6)] yoo-video-border yoo-video-border-[rgba(255,255,255,0.9)] yoo-video-w-[6px] yoo-video-h-[48px] yoo-video-max-h-[50%] yoo-video-shadow-[0_0_0_.5px_#FFF]"})})),oo=new e.YooptaPlugin({type:"Video",elements:{video:{render:({element:i,attributes:n,children:r,blockId:s})=>{const{src:a,srcSet:l,bgColor:d,settings:c,sizes:p,poster:h,provider:f,fit:v}=i.props||{},y=e.useBlockData(s),g=e.useYooptaEditor(),m=e.useYooptaPluginOptions("Video"),x=e.useYooptaReadOnly(),[w,b]=o.useState({width:(null==p?void 0:p.width)||750,height:(null==p?void 0:p.height)||440});o.useEffect((()=>b({width:(null==p?void 0:p.width)||650,height:(null==p?void 0:p.height)||440})),[i.props]);const C=e.useBlockSelected({blockId:s}),S=o.useMemo((()=>{var e,o;return{minWidth:300,size:{width:w.width,height:w.height},maxWidth:(null===(e=null==m?void 0:m.maxSizes)||void 0===e?void 0:e.maxWidth)||800,maxHeight:(null===(o=null==m?void 0:m.maxSizes)||void 0===o?void 0:o.maxHeight)||720,lockAspectRatio:!0,resizeRatio:2,enable:{left:!x,right:!x},handleStyles:{left:{left:0},right:{right:0}},onResize:(e,t,o)=>{b({width:o.offsetWidth,height:o.offsetHeight})},onResizeStop:(e,t,o)=>{g.blocks.Video.updateElement(s,"video",{sizes:{width:o.offsetWidth,height:o.offsetHeight}})},handleComponent:{left:t.jsx(to,{position:"left"}),right:t.jsx(to,{position:"right"})}}}),[w.width,w.height]);return a?t.jsx("div",Object.assign({"data-element-type":i.type,contentEditable:!1,draggable:!1,className:"yoo-video-mt-4 yoo-video-relative yoopta-video"},n,{children:t.jsxs(N,Object.assign({},S,{className:"yoo-video-mx-auto yoo-video-my-0 yoo-video-flex"},{children:[C&&t.jsx("div",{className:"yoo-video-absolute yoo-video-pointer-events-none yoo-video-inset-0 yoo-video-bg-[rgba(35,131,226,0.14)] yoo-video-z-[81] yoo-video-rounded-[3px] yoo-video-opacity-100 yoo-video-transition-opacity yoo-video-duration-150 yoo-video-ease-in"}),t.jsx(u,{src:a,srcSet:l,width:null==w?void 0:w.width,settings:c,bgColor:d,height:null==w?void 0:w.height,poster:h,provider:f,fit:v}),!x&&t.jsx(eo,{block:y,editor:g,settings:c,props:i.props}),r]}))})):t.jsx(qt,Object.assign({attributes:n,blockId:s},{children:r}))},props:{src:null,srcSet:null,bgColor:null,sizes:{width:650,height:400},nodeType:"void",provider:{type:null,id:""},settings:{controls:!1,loop:!0,muted:!0,autoPlay:!0}}}},options:{accept:"video/*",maxSizes:{maxWidth:650,maxHeight:550},onUpload:()=>l(void 0,void 0,void 0,(function*(){return Promise.resolve({src:""})})),display:{title:"Video",description:"Upload from device, embed from Youtube, Vimeo"}},parsers:{html:{deserialize:{nodeNames:["VIDEO"],parse:t=>{if("VIDEO"===t.nodeName){const o={src:t.getAttribute("src"),srcSet:t.getAttribute("srcset"),bgColor:t.getAttribute("bgcolor"),sizes:{width:t.getAttribute("width"),height:t.getAttribute("height")},settings:{controls:!!t.getAttribute("controls"),loop:!!t.getAttribute("loop"),muted:!!t.getAttribute("muted"),autoPlay:!!t.getAttribute("autoplay")}};return{id:e.generateId(),type:"video",children:[{text:""}],props:o}}}}}}});!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".yoo-video-pointer-events-none{pointer-events:none}.yoo-video-invisible{visibility:hidden}.yoo-video-absolute{position:absolute}.yoo-video-relative{position:relative}.yoo-video-inset-0{inset:0}.yoo-video-left-0{left:0}.yoo-video-right-0{right:0}.yoo-video-top-0{top:0}.yoo-video-z-10{z-index:10}.yoo-video-z-\\[100\\]{z-index:100}.yoo-video-z-\\[81\\]{z-index:81}.yoo-video-m-\\[12px_0_6px\\]{margin:12px 0 6px}.yoo-video-m-\\[20px_0_10px\\]{margin:20px 0 10px}.yoo-video-mx-\\[4px\\]{margin-left:4px;margin-right:4px}.yoo-video-mx-auto{margin-left:auto;margin-right:auto}.yoo-video-my-0{margin-bottom:0;margin-top:0}.yoo-video-ml-\\[12px\\]{margin-left:12px}.yoo-video-mr-2{margin-right:.5rem}.yoo-video-mr-\\[12px\\]{margin-right:12px}.yoo-video-mt-4{margin-top:1rem}.yoo-video-mt-\\[4px\\]{margin-top:4px}.yoo-video-flex{display:flex}.yoo-video-inline-flex{display:inline-flex}.yoo-video-h-4{height:1rem}.yoo-video-h-\\[28px\\]{height:28px}.yoo-video-h-\\[32px\\]{height:32px}.yoo-video-h-\\[40px\\]{height:40px}.yoo-video-h-\\[48px\\]{height:48px}.yoo-video-h-full{height:100%}.yoo-video-max-h-\\[420px\\]{max-height:420px}.yoo-video-max-h-\\[50\\%\\]{max-height:50%}.yoo-video-w-4{width:1rem}.yoo-video-w-\\[15px\\]{width:15px}.yoo-video-w-\\[6px\\]{width:6px}.yoo-video-w-full{width:100%}.yoo-video-min-w-0{min-width:0}.yoo-video-min-w-\\[540px\\]{min-width:540px}.yoo-video-max-w-\\[300px\\]{max-width:300px}.yoo-video-max-w-\\[calc\\(100vw-24px\\)\\]{max-width:calc(100vw - 24px)}.yoo-video-flex-shrink-0{flex-shrink:0}@keyframes yoo-video-spin{to{transform:rotate(1turn)}}.yoo-video-animate-spin{animation:yoo-video-spin 1s linear infinite}.yoo-video-cursor-col-resize{cursor:col-resize}.yoo-video-cursor-pointer{cursor:pointer}.yoo-video-cursor-text{cursor:text}.yoo-video-flex-col{flex-direction:column}.yoo-video-items-center{align-items:center}.yoo-video-justify-start{justify-content:flex-start}.yoo-video-justify-center{justify-content:center}.yoo-video-overflow-hidden{overflow:hidden}.yoo-video-whitespace-nowrap{white-space:nowrap}.yoo-video-rounded-\\[20px\\]{border-radius:20px}.yoo-video-rounded-\\[3px\\]{border-radius:3px}.yoo-video-rounded-\\[4px\\]{border-radius:4px}.yoo-video-rounded-sm{border-radius:.125rem}.yoo-video-border{border-width:1px}.yoo-video-border-none{border-style:none}.yoo-video-border-\\[rgba\\(255\\,255\\,255\\,0\\.9\\)\\]{border-color:hsla(0,0%,100%,.9)}.yoo-video-border-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{border-color:rgba(55,53,47,.16)}.yoo-video-bg-\\[\\#efefef\\]{--tw-bg-opacity:1;background-color:rgb(239 239 239/var(--tw-bg-opacity))}.yoo-video-bg-\\[hsla\\(45\\,13\\%\\,94\\%\\,\\.6\\)\\]{background-color:hsla(45,13%,94%,.6)}.yoo-video-bg-\\[rgb\\(35\\,131\\,226\\)\\]{--tw-bg-opacity:1;background-color:rgb(35 131 226/var(--tw-bg-opacity))}.yoo-video-bg-\\[rgba\\(15\\,15\\,15\\,0\\.6\\)\\]{background-color:hsla(0,0%,6%,.6)}.yoo-video-bg-\\[rgba\\(35\\,131\\,226\\,0\\.14\\)\\]{background-color:rgba(35,131,226,.14)}.yoo-video-bg-\\[rgba\\(55\\,53\\,47\\,0\\.16\\)\\]{background-color:rgba(55,53,47,.16)}.yoo-video-bg-inherit{background-color:inherit}.yoo-video-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.yoo-video-fill-white{fill:#fff}.yoo-video-object-cover{-o-object-fit:cover;object-fit:cover}.yoo-video-p-\\[0_8px\\]{padding:0 8px}.yoo-video-p-\\[12px_36px_12px_12px\\]{padding:12px 36px 12px 12px}.yoo-video-px-2{padding-left:.5rem;padding-right:.5rem}.yoo-video-px-\\[12px\\]{padding-left:12px;padding-right:12px}.yoo-video-px-\\[6px\\]{padding-left:6px;padding-right:6px}.yoo-video-px-\\[8px\\]{padding-left:8px;padding-right:8px}.yoo-video-py-1{padding-bottom:.25rem;padding-top:.25rem}.yoo-video-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.yoo-video-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.yoo-video-pb-\\[6px\\]{padding-bottom:6px}.yoo-video-pt-\\[6px\\]{padding-top:6px}.yoo-video-text-left{text-align:left}.yoo-video-text-\\[14px\\]{font-size:14px}.yoo-video-font-medium{font-weight:500}.yoo-video-leading-\\[1\\.2\\]{line-height:1.2}.yoo-video-leading-\\[120\\%\\]{line-height:120%}.yoo-video-leading-\\[20px\\]{line-height:20px}.yoo-video-text-\\[rgb\\(55\\,53\\,47\\)\\]{--tw-text-opacity:1;color:rgb(55 53 47/var(--tw-text-opacity))}.yoo-video-text-\\[rgba\\(55\\,53\\,47\\,0\\.65\\)\\]{color:rgba(55,53,47,.65)}.yoo-video-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.yoo-video-opacity-100{opacity:1}.yoo-video-shadow-\\[0_0_0_\\.5px_\\#FFF\\]{--tw-shadow:0 0 0 .5px #fff;--tw-shadow-colored:0 0 0 .5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-video-shadow-\\[inset_0_0_0_1px_hsla\\(0\\,0\\%\\,6\\%\\,\\.1\\)\\]{--tw-shadow:inset 0 0 0 1px hsla(0,0%,6%,.1);--tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-video-shadow-\\[rgb\\(15_15_15_\\/5\\%\\)_0px_0px_0px_1px\\,_rgb\\(15_15_15_\\/10\\%\\)_0px_3px_6px\\,_rgb\\(15_15_15_\\/20\\%\\)_0px_9px_24px\\]{--tw-shadow:rgb(15 15 15/5%) 0px 0px 0px 1px,hsla(0,0%,6%,.1) 0px 3px 6px,hsla(0,0%,6%,.2) 0px 9px 24px;--tw-shadow-colored:0px 0px 0px 1px var(--tw-shadow-color),0px 3px 6px var(--tw-shadow-color),0px 9px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-video-shadow-\\[rgb\\(55_53_47_\\/9\\%\\)_0px_-1px_0px_inset\\]{--tw-shadow:rgb(55 53 47/9%) 0px -1px 0px inset;--tw-shadow-colored:inset 0px -1px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-video-shadow-\\[rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_0px_0px_1px_inset\\,_rgba\\(15\\,15\\,15\\,0\\.1\\)_0px_1px_2px\\]{--tw-shadow:hsla(0,0%,6%,.1) 0px 0px 0px 1px inset,hsla(0,0%,6%,.1) 0px 1px 2px;--tw-shadow-colored:inset 0px 0px 0px 1px var(--tw-shadow-color),0px 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.yoo-video-transition-\\[background-color_100ms_ease-in\\]{transition-duration:.15s;transition-property:background-color .1s ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-video-transition-\\[height_20ms_ease-in\\]{transition-duration:.15s;transition-property:height 20ms ease-in;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-video-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.yoo-video-duration-150{transition-duration:.15s}.yoo-video-duration-300{transition-duration:.3s}.yoo-video-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.yoopta-video .yoopta-video-options{opacity:0;transition:opacity .15s ease-in-out}.yoopta-video:hover .yoopta-video-options{opacity:1}.hover\\:yoo-video-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.hover\\:yoo-video-bg-\\[\\#e3e3e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(227 227 227/var(--tw-bg-opacity))}.disabled\\:yoo-video-cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:yoo-video-bg-\\[rgba\\(35\\2c 131\\2c 226\\2c 0\\.5\\)\\]:disabled{background-color:rgba(35,131,226,.5)}"),exports.default=oo;
package/dist/types.d.ts CHANGED
@@ -13,6 +13,7 @@ export type VideoProviderTypes = 'youtube' | 'vimeo' | 'dailymotion' | string |
13
13
  export type VideoProvider = {
14
14
  type: VideoProviderTypes;
15
15
  id: string;
16
+ url?: string;
16
17
  };
17
18
  export type VideoElementProps = {
18
19
  src?: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,IAAI,CAAC;AACrF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,kBAAkB,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAC1C,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,EAAE,KAAK,GAAG,QAAQ,CAAC,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,IAAI,CAAC;AACrF,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,kBAAkB,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAC1C,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,EAAE,KAAK,GAAG,QAAQ,CAAC,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../src/ui/Placeholder.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,WAAW;;;;6CA8ChB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../src/ui/Placeholder.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,WAAW;;;;6CAuDhB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"VideoBlockOptions.d.ts","sourceRoot":"","sources":["../../src/ui/VideoBlockOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAuB,MAAM,UAAU,CAAC;AAIlE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;CAC1C,CAAC;AAEF,QAAA,MAAM,iBAAiB,yCAA0C,KAAK,4CA6ErE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"VideoBlockOptions.d.ts","sourceRoot":"","sources":["../../src/ui/VideoBlockOptions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAuB,MAAM,UAAU,CAAC;AAIlE,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;CAC1C,CAAC;AAEF,QAAA,MAAM,iBAAiB,yCAA0C,KAAK,4CAgGrE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/video",
3
- "version": "4.0.0-rc.7",
3
+ "version": "4.0.0-rc.9",
4
4
  "description": "> TODO: description",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
6
  "homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
@@ -38,5 +38,5 @@
38
38
  "@radix-ui/react-icons": "^1.3.0",
39
39
  "re-resizable": "^6.9.11"
40
40
  },
41
- "gitHead": "2ab435c70924d16a80928f05657f0f9db1ff42f0"
41
+ "gitHead": "567acde8d698e93e42b9090db68d66d93f3cc30d"
42
42
  }