@yoopta/video 4.0.0-rc.10 → 4.0.0-rc.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3,4 +3,4 @@ import{useYooptaEditor as e,useYooptaPluginOptions as t,UI as o,useBlockData as
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,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};
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();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/types.d.ts CHANGED
@@ -27,9 +27,9 @@ export type VideoElementProps = {
27
27
  };
28
28
  export type VideoPluginElements = 'video';
29
29
  export type VideoElement = SlateElement<'video', VideoElementProps>;
30
- export type onUploadResponse = Omit<VideoElementProps, 'fit' | 'srcSet'>;
30
+ export type OnUploadResponse = Omit<VideoElementProps, 'fit' | 'srcSet'>;
31
31
  export type VideoPluginOptions = {
32
- onUpload: (file: File) => Promise<onUploadResponse>;
32
+ onUpload: (file: File) => Promise<OnUploadResponse>;
33
33
  accept?: string;
34
34
  maxSizes?: {
35
35
  maxWidth?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../../src/ui/FileUploader.tsx"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,YAAY,+CAA4D,KAAK,4CAmDlF,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../../src/ui/FileUploader.tsx"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,YAAY,+CAA4D,KAAK,4CAiDlF,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/video",
3
- "version": "4.0.0-rc.10",
3
+ "version": "4.0.0-rc.12",
4
4
  "description": "> TODO: description",
5
5
  "author": "Darginec05 <devopsbanda@gmail.com>",
6
6
  "homepage": "https://github.com/Darginec05/Editor-Yoopta#readme",
@@ -39,5 +39,5 @@
39
39
  "@radix-ui/react-icons": "^1.3.0",
40
40
  "re-resizable": "^6.9.11"
41
41
  },
42
- "gitHead": "a4599f8ecac6c322b01ae25b4829d120db250736"
42
+ "gitHead": "92fc1c6c6e38b757ae264ffa34f126cf280d348a"
43
43
  }