@yoopta/editor 4.0.0-rc.15 → 4.0.0-rc.16
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{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from
|
|
|
3
3
|
* tabbable 6.2.0
|
|
4
4
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
5
5
|
*/
|
|
6
|
-
var Zr=["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(","),qr="undefined"==typeof Element,Gr=qr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Jr=!qr&&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},Qr=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},eo=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Qr(a,!1))if("SLOT"===a.tagName){var l=a.assignedElements(),c=e(l.length?l:a.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{Gr.call(a,Zr)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var s=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),d=!Qr(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(s&&d){var u=e(!0===s?a.children:s.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return o},to=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},no=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))&&!to(e)?0:e.tabIndex},ro=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},oo=function(e){return"INPUT"===e.tagName},io=function(e){return function(e){return oo(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Jr(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(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)},ao=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},lo=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=Gr.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Gr.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ao(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,l=Jr(e);if(a&&!a.shadowRoot&&!0===r(a))return ao(e);e=e.assignedSlot?e.assignedSlot:a||l===e.ownerDocument?a:l.host}e=i}if(function(e){var t,n,r,o,i=e&&Jr(e),a=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&a;){var c,s,d;l=!(null===(s=a=null===(c=i=Jr(a))||void 0===c?void 0:c.host)||void 0===s||null===(d=s.ownerDocument)||void 0===d||!d.contains(a))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},co=function(e,t){return!(t.disabled||Qr(t)||function(e){return oo(e)&&"hidden"===e.type}(t)||lo(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 r=t.children.item(n);if("LEGEND"===r.tagName)return!!Gr.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},so=function(e,t){return!(io(t)||no(t)<0||!co(e,t))},uo=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},fo=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,l=function(e,t){var n=no(e);return n<0&&t&&!to(e)?0:n}(a,i),c=i?e(t.candidates):a;0===l?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:c})})),r.sort(ro).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},po=function(e,t){var n;return n=(t=t||{}).getShadowRoot?eo([e],t.includeContainer,{filter:so.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:uo}):function(e,t,n){if(Qr(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Zr));return t&&Gr.call(e,Zr)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,so.bind(null,t)),fo(n)};const ho=r["useInsertionEffect".toString()]||(e=>e());var go="undefined"!=typeof document?c:s;function vo(){return vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vo.apply(this,arguments)}let mo=!1,bo=0;const yo=()=>"floating-ui-"+bo++;const wo=r["useId".toString()]||function(){const[e,t]=r.useState((()=>mo?yo():void 0));return go((()=>{null==e&&t(yo())}),[]),r.useEffect((()=>{mo||(mo=!0)}),[]),e};const xo=r.createContext(null),ko=r.createContext(null);function Eo(e){return"data-floating-ui-"+e}function Co(e){const t=l(e);return go((()=>{t.current=e})),t}const Oo=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function So(e,t){const n=po(e,Oo());"prev"===t&&n.reverse();const r=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(r+1)[0]}function _o(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!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&&Wn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}(n,r)}function Do(e){po(e,Oo()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Ro(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 jo={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 Bo(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Ao=r.forwardRef((function(e,t){const[n,o]=r.useState();go((()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",Bo),()=>{document.removeEventListener("keydown",Bo)})),[]);const i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[Eo("focus-guard")]:"",style:jo};return r.createElement("span",vo({},e,i))})),To=r.createContext(null),Lo=Eo("portal");function Mo(e){let{children:t,id:n,root:o=null,preserveTabOrder:i=!0}=e;const a=function(e){let{id:t,root:n}=void 0===e?{}:e;const[o,i]=r.useState(null),a=wo(),l=No(),c=r.useRef(null);return go((()=>()=>{null==o||o.remove(),queueMicrotask((()=>{c.current=null}))}),[o]),go((()=>{if(c.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=a,n.setAttribute(Lo,""),e.appendChild(n),c.current=n,i(n)}),[t,a]),go((()=>{if(c.current)return;let e=n||(null==l?void 0:l.portalNode);e&&!Hn(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const o=document.createElement("div");o.id=a,o.setAttribute(Lo,""),e=r||e,e.appendChild(o),c.current=o,i(o)}),[t,n,a,l]),o}({id:n,root:o}),[l,c]=r.useState(null),s=r.useRef(null),d=r.useRef(null),u=r.useRef(null),f=r.useRef(null),p=!!l&&!l.modal&&l.open&&i&&!(!o&&!a);return r.useEffect((()=>{if(a&&i&&(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&&_o(e)){("focusin"===e.type?Ro:Do)(a)}}}),[a,i,null==l?void 0:l.modal]),r.createElement(To.Provider,{value:r.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:s,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:c})),[i,a])},p&&a&&r.createElement(Ao,{"data-type":"outside",ref:s,onFocus:e=>{if(_o(e,a)){var t;null==(t=u.current)||t.focus()}else{const e=So(document.body,"prev")||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),p&&a&&r.createElement("span",{"aria-owns":a.id,style:jo}),a&&w(t,a),p&&a&&r.createElement(Ao,{"data-type":"outside",ref:d,onFocus:e=>{if(_o(e,a)){var t;null==(t=f.current)||t.focus()}else{const t=So(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 No=()=>r.useContext(To),Io=new Set,Po=r.forwardRef((function(e,t){let{lockScroll:n=!1,...o}=e;const i=wo();return go((()=>{if(!n)return;Io.add(i);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,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,a=t.left?parseFloat(t.left):window.pageXOffset,l=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",o&&(t[r]=o+"px"),e){var c,s;const e=(null==(c=window.visualViewport)?void 0:c.offsetLeft)||0,n=(null==(s=window.visualViewport)?void 0:s.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(l-Math.floor(n))+"px",left:-(a-Math.floor(e))+"px",right:"0"})}return()=>{Io.delete(i),0===Io.size&&(Object.assign(t,{overflow:"",[r]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(a,l)))}}),[i,n]),r.createElement("div",vo({ref:t},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))}));function zo(e){var t;void 0===e&&(e={});const{open:n=!1,onOpenChange:o,nodeId:i}=e,[a,l]=r.useState(null),c=(null==(t=e.elements)?void 0:t.reference)||a,s=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:s,open:d}=e,[u,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(o);Kr(p,o)||h(o);const[g,v]=r.useState(null),[m,y]=r.useState(null),w=r.useCallback((e=>{e!==C.current&&(C.current=e,v(e))}),[]),x=r.useCallback((e=>{e!==O.current&&(O.current=e,y(e))}),[]),k=a||g,E=l||m,C=r.useRef(null),O=r.useRef(null),S=r.useRef(u),_=null!=s,D=$r(s),R=$r(i),j=r.useCallback((()=>{if(!C.current||!O.current)return;const e={placement:t,strategy:n,middleware:p};R.current&&(e.platform=R.current),Vr(C.current,O.current,e).then((e=>{const t={...e,isPositioned:!0};B.current&&!Kr(S.current,t)&&(S.current=t,b.flushSync((()=>{f(t)})))}))}),[p,t,n,R]);Wr((()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const B=r.useRef(!1);Wr((()=>(B.current=!0,()=>{B.current=!1})),[]),Wr((()=>{if(k&&(C.current=k),E&&(O.current=E),k&&E){if(D.current)return D.current(k,E,j);j()}}),[k,E,j,D,_]);const A=r.useMemo((()=>({reference:C,floating:O,setReference:w,setFloating:x})),[w,x]),T=r.useMemo((()=>({reference:k,floating:E})),[k,E]),L=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!T.floating)return e;const t=Xr(T.floating,u.x),r=Xr(T.floating,u.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...Yr(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,T.floating,u.x,u.y]);return r.useMemo((()=>({...u,update:j,refs:A,elements:T,floatingStyles:L})),[u,j,A,T,L])}(e),d=r.useContext(ko),u=null!=((null==(f=r.useContext(xo))?void 0:f.id)||null);var f;const p=function(e){const t=r.useRef((()=>{}));return ho((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}(((e,t,n)=>{e&&(g.current.openEvent=t),v.emit("openchange",{open:e,event:t,reason:n,nested:u}),null==o||o(e,t,n)})),h=r.useRef(null),g=r.useRef({}),v=r.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}()))[0],m=wo(),y=r.useCallback((e=>{const t=Hn(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s.refs.setReference(t)}),[s.refs]),w=r.useCallback((e=>{(Hn(e)||null===e)&&(h.current=e,l(e)),(Hn(s.refs.reference.current)||null===s.refs.reference.current||null!==e&&!Hn(e))&&s.refs.setReference(e)}),[s.refs]),x=r.useMemo((()=>({...s.refs,setReference:w,setPositionReference:y,domReference:h})),[s.refs,w,y]),k=r.useMemo((()=>({...s.elements,domReference:c})),[s.elements,c]),E=r.useMemo((()=>({...s,refs:x,elements:k,dataRef:g,nodeId:i,floatingId:m,events:v,open:n,onOpenChange:p})),[s,i,m,v,n,p,x,k]);return go((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===i));e&&(e.context=E)})),r.useMemo((()=>({...s,context:E,refs:x,elements:k})),[s,x,k,E])}const Fo=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function Uo(e,t){return"function"==typeof e?e(t):e}function Ho(e,t){void 0===t&&(t={});const{open:n,elements:{floating:o}}=e,{duration:i=250}=t,a=("number"==typeof i?i:i.close)||0,[l,c]=r.useState(!1),[s,d]=r.useState("unmounted"),u=function(e,t){const[n,o]=r.useState(e);return e&&!n&&o(!0),r.useEffect((()=>{if(!e){const e=setTimeout((()=>o(!1)),t);return()=>clearTimeout(e)}}),[e,t]),n}(n,a);return go((()=>{l&&!u&&d("unmounted")}),[l,u]),go((()=>{if(o){if(n){d("initial");const e=requestAnimationFrame((()=>{d("open")}));return()=>{cancelAnimationFrame(e)}}c(!0),d("close")}}),[n,o]),{isMounted:u,status:s}}function Vo(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:o,close:i,common:a,duration:l=250}=t,c=e.placement,s=c.split("-")[0],d=r.useMemo((()=>({side:s,placement:c})),[s,c]),u="number"==typeof l,f=(u?l:l.open)||0,p=(u?l:l.close)||0,[h,g]=r.useState((()=>({...Uo(a,d),...Uo(n,d)}))),{isMounted:v,status:m}=Ho(e,{duration:l}),b=Co(n),y=Co(o),w=Co(i),x=Co(a);return go((()=>{const e=Uo(b.current,d),t=Uo(w.current,d),n=Uo(x.current,d),r=Uo(y.current,d)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===m&&g((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===m&&g({transitionProperty:Object.keys(r).map(Fo).join(","),transitionDuration:f+"ms",...n,...r}),"close"===m){const r=t||e;g({transitionProperty:Object.keys(r).map(Fo).join(","),transitionDuration:p+"ms",...n,...r})}}),[p,w,b,y,x,f,m,d]),{isMounted:v,styles:h}}var Wo;function Ko(){return Ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ko.apply(this,arguments)}var Yo=function(e){return r.createElement("svg",Ko({viewBox:"0 0 16 16",className:"turn_svg__loop",style:{width:16,height:16,display:"block",fill:"currentcolor",flexShrink:0,backfaceVisibility:"hidden"}},e),Wo||(Wo=r.createElement("path",{d:"M5.804 3.123c.006.38.254.622.673.622h4.887c.59 0 .914.305.914.92v6.628l-.901-.978-.514-.514c-.267-.254-.629-.273-.895-.013-.254.26-.248.635.012.895l2.165 2.158c.476.47 1.022.47 1.498 0l2.165-2.158c.26-.26.266-.635.012-.895-.266-.26-.628-.241-.895.013l-.514.514-.895.971V4.564c0-1.358-.71-2.063-2.082-2.063H6.477c-.42 0-.68.241-.673.622ZM.186 7.06c.26.266.622.247.889-.013l.52-.508.889-.971v6.722c0 1.359.71 2.063 2.082 2.063h4.957c.42 0 .68-.241.673-.622-.006-.387-.254-.622-.673-.622h-4.88c-.591 0-.915-.311-.915-.927V5.554l.895.984.52.508c.26.26.629.28.89.013.26-.26.253-.629-.013-.89L3.855 4.013c-.476-.476-1.016-.476-1.492 0L.2 6.17c-.267.26-.273.628-.013.889Z"})))};function Xo(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var $o=["color"],Zo=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Xo(e,$o);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),qo=["color"],Go=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Xo(e,qo);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),Jo=["color"],Qo=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Xo(e,Jo);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M8.51194 3.00541C9.18829 2.54594 10.0435 2.53694 10.6788 2.95419C10.8231 3.04893 10.9771 3.1993 11.389 3.61119C11.8009 4.02307 11.9513 4.17714 12.046 4.32141C12.4633 4.95675 12.4543 5.81192 11.9948 6.48827C11.8899 6.64264 11.7276 6.80811 11.3006 7.23511L10.6819 7.85383C10.4867 8.04909 10.4867 8.36567 10.6819 8.56093C10.8772 8.7562 11.1938 8.7562 11.389 8.56093L12.0077 7.94221L12.0507 7.89929C12.4203 7.52976 12.6568 7.2933 12.822 7.0502C13.4972 6.05623 13.5321 4.76252 12.8819 3.77248C12.7233 3.53102 12.4922 3.30001 12.1408 2.94871L12.0961 2.90408L12.0515 2.85942C11.7002 2.508 11.4692 2.27689 11.2277 2.11832C10.2377 1.46813 8.94398 1.50299 7.95001 2.17822C7.70691 2.34336 7.47044 2.57991 7.1009 2.94955L7.058 2.99247L6.43928 3.61119C6.24401 3.80645 6.24401 4.12303 6.43928 4.31829C6.63454 4.51355 6.95112 4.51355 7.14638 4.31829L7.7651 3.69957C8.1921 3.27257 8.35757 3.11027 8.51194 3.00541ZM4.31796 7.14672C4.51322 6.95146 4.51322 6.63487 4.31796 6.43961C4.12269 6.24435 3.80611 6.24435 3.61085 6.43961L2.99213 7.05833L2.94922 7.10124C2.57957 7.47077 2.34303 7.70724 2.17788 7.95035C1.50265 8.94432 1.4678 10.238 2.11799 11.2281C2.27656 11.4695 2.50766 11.7005 2.8591 12.0518L2.90374 12.0965L2.94837 12.1411C3.29967 12.4925 3.53068 12.7237 3.77214 12.8822C4.76219 13.5324 6.05589 13.4976 7.04986 12.8223C7.29296 12.6572 7.52943 12.4206 7.89896 12.051L7.89897 12.051L7.94188 12.0081L8.5606 11.3894C8.75586 11.1941 8.75586 10.8775 8.5606 10.6823C8.36533 10.487 8.04875 10.487 7.85349 10.6823L7.23477 11.301C6.80777 11.728 6.6423 11.8903 6.48794 11.9951C5.81158 12.4546 4.95642 12.4636 4.32107 12.0464C4.17681 11.9516 4.02274 11.8012 3.61085 11.3894C3.19896 10.9775 3.0486 10.8234 2.95385 10.6791C2.53661 10.0438 2.54561 9.18863 3.00507 8.51227C3.10993 8.35791 3.27224 8.19244 3.69924 7.76544L4.31796 7.14672ZM9.62172 6.08558C9.81698 5.89032 9.81698 5.57373 9.62172 5.37847C9.42646 5.18321 9.10988 5.18321 8.91461 5.37847L5.37908 8.91401C5.18382 9.10927 5.18382 9.42585 5.37908 9.62111C5.57434 9.81637 5.89092 9.81637 6.08619 9.62111L9.62172 6.08558Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),ei=["color"],ti=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Xo(e,ei);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),ni=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}},ri={"text/plain":"Text","text/html":"Url",default:"Text"};var oi=function(e,t){var n,r,o,i,a,l,c=!1;t||(t={}),n=t.debug||!1;try{if(o=ni(),i=document.createRange(),a=document.getSelection(),(l=document.createElement("span")).textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=ri[t.format]||ri.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),i.selectNodeContents(l),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),l&&document.body.removeChild(l),o()}return c};function ii(e){if(!e)return;const t=Object.keys(e);return 1===t.length?t[0]:t.find((t=>e[t].asRoot))}function ai(e){if(!e)return;const t=ii(e);return t?e[t]:void 0}const li=i(void 0),ci=({children:r,tools:o})=>{const i=V(),a=d((()=>o?Object.keys(o).reduce(((e,t)=>{var n;return Object.assign(Object.assign({},e),{[t]:null===(n=o[t])||void 0===n?void 0:n.render})}),{}):{}),[o]),l=d((()=>!o||i?null:Object.keys(o).map((t=>{var n,r,i;const a=null===(n=null==o?void 0:o[t])||void 0===n?void 0:n.tool,l=null===(r=null==o?void 0:o[t])||void 0===r?void 0:r.render,c=null===(i=null==o?void 0:o[t])||void 0===i?void 0:i.props;return a?e(a,Object.assign({render:l},c),t):null}))),[d]);return e(li.Provider,Object.assign({value:a},{children:t(n,{children:[l,r]})}))},si=()=>{const e=a(li);if(void 0===e)throw new Error("useYooptaTools must be used within a ToolsProvider");return e},di=({children:t})=>e("div",Object.assign({className:"flex flex-col"},{children:t})),ui=({children:t})=>e("div",Object.assign({onClick:e=>e.stopPropagation(),className:"bg-[#FFF] relative min-w-[200px] w-auto overflow-hidden rounded-md border bg-popover py-[6px] px-0 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"},{children:t})),fi=({children:t})=>e("div",Object.assign({className:"relative flex cursor-default select-none items-center text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50"},{children:t})),pi=({isOpen:n,onClose:r,refs:o,style:i,children:a})=>{var l,c;const s=z(),d=si(),[u,p]=f(!1),{refs:h,floatingStyles:g,context:v}=zo({placement:"right",open:u,onOpenChange:p,middleware:[Hr(),Ur(),Fr(),Er(10)],whileElementsMounted:zr}),{isMounted:m,styles:b}=Vo(v,{duration:100});if(!n)return null;const y=M(s,{at:s.selection}),w=ai(s.blocks[(null==y?void 0:y.type)||""].elements),x="void"===(null===(l=null==w?void 0:w.props)||void 0===l?void 0:l.nodeType),k=d.ActionMenu,E=Object.assign(Object.assign({},g),b);return e(Mo,Object.assign({root:document.getElementById("yoopta-editor")},{children:e(Po,Object.assign({lockScroll:!0,className:"z-[100]",onClick:r},{children:e("div",Object.assign({style:i,ref:o.setFloating},{children:t(ui,{children:[t(di,{children:[e(fi,{children:t("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:()=>{const e=s.selection;s.deleteBlock({at:e}),s.setBlockSelected(null),s.setSelection(null),r()}},{children:[e(ti,{className:"w-4 h-4 mr-2"}),"Delete"]}))}),e(fi,{children:t("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:()=>{s.duplicateBlock({at:s.selection,focus:!0}),s.setBlockSelected(null),r()}},{children:[e(Zo,{className:"w-4 h-4 mr-2"}),"Duplicate"]}))}),!x&&!(null===(c=s.blocks[(null==y?void 0:y.type)||""])||void 0===c?void 0:c.hasCustomEditor)&&t(fi,{children:[m&&!!k&&e(Mo,Object.assign({root:document.getElementById("yoopta-editor")},{children:e(Po,Object.assign({lockScroll:!0,className:"z-[100]",onClick:()=>p(!1)},{children:e("div",Object.assign({style:E,ref:h.setFloating},{children:e(k,{actions:Object.keys(s.blocks),editor:s,selectedAction:"",onClose:()=>{p(!1),r()},empty:!1,onMouseEnter:()=>{},mode:"toggle"})}))}))})),t("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",ref:h.setReference,onClick:()=>p((e=>!e))},{children:[e(Yo,{className:"w-4 h-4 mr-2"}),"Turn into"]}))]}),e(fi,{children:t("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:()=>{const e=M(s);e&&(oi(`${window.location.origin}${window.location.pathname}#${e.id}`),s.emit("block:copy",e)),r()}},{children:[e(Qo,{className:"w-4 h-4 mr-2"}),"Copy link to block"]}))})]}),a]})}))}))}))};var hi=Object.freeze({__proto__:null,BlockOptions:pi,BlockOptionsMenuContent:ui,BlockOptionsMenuGroup:di,BlockOptionsMenuItem:fi,BlockOptionsSeparator:({className:t})=>e("div",{className:`h-[1px] bg-[#37352f14] my-[4px] w-full ${t}`})});function gi(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var vi={actions:"vuZgncnq",hovered:"_8Eqjiv7m",actionButton:"WabGEp54",plusButton:"_0C8RpLmz"};function mi(...e){return e.filter(Boolean).join(" ")}gi(".vuZgncnq{display:flex;left:-50px;opacity:0;position:absolute;top:2px;transition:opacity .18s ease-in}._8Eqjiv7m{opacity:1}.WabGEp54{all:unset;align-items:center;background-color:inherit;background-color:transparent;border-radius:6px;color:rgba(55,53,47,.35);cursor:pointer;display:flex;height:24px;justify-content:center;margin:0 1px;padding:0;position:relative;transition:background-color .18s cubic-bezier(.4,0,.2,1);width:auto;width:18px}.WabGEp54:active,.WabGEp54:focus,.WabGEp54:hover{background-color:rgba(55,54,47,.08)}._0C8RpLmz{width:24px}");const bi=({block:n,editor:r,dragHandleProps:o,showActions:i,onChangeActiveBlock:a})=>{const[l,c]=f(!1),{refs:s,floatingStyles:d,context:u}=zo({placement:"right-start",open:l,onOpenChange:c,middleware:[Hr(),Ur(),Fr(),Er()]}),{isMounted:p,styles:h}=Vo(u,{duration:100}),{setActivatorNodeRef:g,attributes:v,listeners:m}=o,b=Object.assign(Object.assign({},d),h);return t("div",Object.assign({contentEditable:!1,className:mi(vi.actions,i&&vi.hovered,"yoopta-element-actions")},{children:[e("button",Object.assign({type:"button",onClick:()=>{const e=ee({id:J()}),t=[n.meta.order+1];r.setSelection([n.meta.order]),r.insertBlock(e,{at:t,focus:!0})},className:mi(vi.actionButton,vi.plusButton,"yoopta-element-actions-plus")},{children:e(Nn,{})})),e("button",Object.assign({type:"button",className:mi(vi.actionButton,"yoopta-element-actions-drag"),ref:e=>{g(e),s.setReference(e)}},v,m,{onClick:e=>{e.stopPropagation(),a(n.id);const t=In(r,{at:[n.meta.order]});r.focusBlock(n.id),t&&setTimeout((()=>{r.blocks[n.type].hasCustomEditor||(x.blur(t),x.deselect(t),R.deselect(t)),r.setBlockSelected([n.meta.order],{only:!0}),r.setSelection([n.meta.order]),c(!0)}),10)}},{children:e(Ln,{})})),e(pi,{isOpen:p,refs:s,style:b,onClose:()=>c(!1)})]}))},yi=({children:n,block:r,blockId:o})=>{var i;const a=z(),[l,c]=f(null),{attributes:s,listeners:d,setNodeRef:u,setActivatorNodeRef:p,transform:h,transition:g,isOver:v,isDragging:m}=Sn({id:o,disabled:a.readOnly}),b={transform:h?`translate3d(${h.x}px, ${h.y}px, 0)`:"none",transition:g,opacity:m?.7:1,marginLeft:20*r.meta.depth+"px"},y=null===(i=a.selectedBlocks)||void 0===i?void 0:i.includes(r.meta.order),w=l===o,x={borderBottom:v&&!m?"2px solid #007aff":"none"};return t("div",Object.assign({className:"relative py-0 px-[2px] mt-[2px] mb-[1px] rounded yoopta-block-wrapper",onMouseEnter:()=>{a.readOnly||c(o)},onMouseLeave:()=>{a.readOnly||c(null)},"data-yoopta-block-id":o,style:b,"data-yoopta-block":!0,ref:u},{children:[!a.readOnly&&e(bi,{block:r,editor:a,dragHandleProps:{setActivatorNodeRef:p,attributes:s,listeners:d},showActions:w,onChangeActiveBlock:e=>c(e)}),e("div",Object.assign({className:vi.content,style:x},{children:n})),y&&!a.readOnly&&e("div",{className:"absolute left-0 top-0 bg-[#2383e224] z-[90] rounded opacity-100 h-full w-full pointer-events-none yoopta-selection-block"})]}))};function wi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var xi={};Object.defineProperty(xi,"__esModule",{value:!0});for(var ki="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Ei={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Ci={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:ki?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Oi={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},Si=1;Si<20;Si++)Oi["f"+Si]=111+Si;function _i(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return Di(e,t)})),o=function(e){return r.some((function(t){return Ri(t,e)}))};return null==n?o:o(n)}function Di(e,t){var n=t&&t.byKey,r={},o=(e=e.replace("++","+add")).split("+"),i=o.length;for(var a in Ei)r[Ei[a]]=!1;var l=!0,c=!1,s=void 0;try{for(var d,u=o[Symbol.iterator]();!(l=(d=u.next()).done);l=!0){var f=d.value,p=f.endsWith("?")&&f.length>1;p&&(f=f.slice(0,-1));var h=Bi(f),g=Ei[h];if(f.length>1&&!g&&!Ci[f]&&!Oi[h])throw new TypeError('Unknown modifier: "'+f+'"');1!==i&&g||(n?r.key=h:r.which=ji(f)),g&&(r[g]=!p||null)}}catch(e){c=!0,s=e}finally{try{!l&&u.return&&u.return()}finally{if(c)throw s}}return r}function Ri(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function ji(e){return e=Bi(e),Oi[e]||e.toUpperCase().charCodeAt(0)}function Bi(e){return e=e.toLowerCase(),e=Ci[e]||e}xi.default=_i,xi.isHotkey=_i,xi.isCodeHotkey=function(e,t){return _i(e,t)};var Ai=xi.isKeyHotkey=function(e,t){return _i(e,{byKey:!0},t)};xi.parseHotkey=Di,xi.compareHotkey=Ri,xi.toKeyCode=ji,xi.toKeyName=Bi;const Ti={bold:"mod+b",italic:"mod+i",compose:["down","left","right","up","backspace","enter"],arrowLeft:"left",arrowUp:"up",arrowDown:"down",arrowRight:"right",ctrlLeft:"ctrl+left",escape:"esc",ctrlRight:"ctrl+right",deleteBackward:"shift?+backspace",backspace:"backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",shiftEnter:"shift+enter",enter:"enter",space:"space",undo:"mod+z",select:"mod+a",shiftTab:"shift+tab",shiftArrowUp:"shift+up",shiftArrowDown:"shift+down",tab:"tab",cmd:"mod",cmdEnter:"mod+enter",slashCommand:"/",kekCeburek:"mod+enter"},Li={moveLineBackward:"opt+up",moveLineForward:"opt+down",ctrlLeft:"opt+left",ctrlRight:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},Mi={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ni=e=>{const t=Ti[e],n=Li[e],r=Mi[e],o=t&&Ai(t),i=n&&Ai(n),a=r&&Ai(r);return e=>!(!o||!o(e))||(!(!i||!i(e))||!(!a||!a(e)))},Ii={isBold:Ni("bold"),isCompose:Ni("compose"),isArrowLeft:Ni("arrowLeft"),isArrowRight:Ni("arrowRight"),isArrowUp:Ni("arrowUp"),isArrowDown:Ni("arrowDown"),isDeleteBackward:Ni("deleteBackward"),isDeleteForward:Ni("deleteForward"),isDeleteLineBackward:Ni("deleteLineBackward"),isDeleteLineForward:Ni("deleteLineForward"),isDeleteWordBackward:Ni("deleteWordBackward"),isDeleteWordForward:Ni("deleteWordForward"),isExtendBackward:Ni("extendBackward"),isExtendForward:Ni("extendForward"),isExtendLineBackward:Ni("extendLineBackward"),isExtendLineForward:Ni("extendLineForward"),isItalic:Ni("italic"),isMoveLineBackward:Ni("moveLineBackward"),isMoveLineForward:Ni("moveLineForward"),isCtrlLeft:Ni("ctrlLeft"),isCtrlRight:Ni("ctrlRight"),isRedo:Ni("redo"),isShiftEnter:Ni("shiftEnter"),isEnter:Ni("enter"),isTransposeCharacter:Ni("transposeCharacter"),isUndo:Ni("undo"),isSpace:Ni("space"),isSelect:Ni("select"),isTab:Ni("tab"),isShiftTab:Ni("shiftTab"),isBackspace:Ni("backspace"),isCmdEnter:Ni("cmdEnter"),isCmd:Ni("cmd"),isEscape:Ni("escape"),isSlashCommand:Ni("slashCommand"),isShiftArrowUp:Ni("shiftArrowUp"),isShiftArrowDown:Ni("shiftArrowDown"),isKekceburek:Ni("kekCeburek")};const Pi={onKeyDown:function(e){return t=>{const n=In(e,{at:e.selection});if(!n||!n.selection)return;const r=S.parent(n.selection.anchor.path);if(Ii.isShiftEnter(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void n.insertText("\n")}if(Ii.isEnter(t)){if(t.isDefaultPrevented())return;t.preventDefault();const o=_.isStart(n,n.selection.anchor,r),i=_.isEnd(n,n.selection.anchor,r);if(!o&&!i)return void e.splitBlock({slate:n,focus:!0});const a=ee({id:J()}),l=e.selection?[e.selection[0]+1]:[0];e.insertBlock(a,{at:l,slate:n,focus:!0})}else if(Ii.isBackspace(t)){if(t.isDefaultPrevented())return;const r=M(e,{at:e.selection}),o=e.blocks[(null==r?void 0:r.type)||""],i=S.parent(n.selection.anchor.path);if(_.isStart(n,n.selection.anchor,i)){t.preventDefault();const r=_.string(n,i),a=e.selection?e.selection[0]-1:0,l=In(e,{at:[a]});let c;if(l&&!o.hasCustomEditor&&(c=function(e,t){const[,n]=_.last(e,t);return{path:n,offset:_.string(e,n).length}}(l,i)),0===r.trim().length)return e.deleteBlock({at:e.selection,focus:!0,focusAt:c});{if(j.isExpanded(n.selection))return R.delete(n,{at:n.selection});if(!l)return;if(0===_.string(l,[0,0]).length)return e.deleteBlock({at:[a],focus:!0,focusAt:c});const t=Array.from(_.nodes(n,{at:[0],match:e=>!_.isEditor(e)&&(B.isText(e)||_.isInline(n,e)),mode:"highest"})).map((([e])=>e));return R.insertNodes(l,t,{at:_.end(l,[])}),e.deleteBlock({at:e.selection,focus:!0,focusAt:c})}}}else{if(Ii.isSelect(t)){if(t.isDefaultPrevented())return;const[,r]=_.first(n,[0]),[,o]=_.last(n,[n.children.length-1]),i=_.range(n,r,o),a=j.equals(n.selection,i);if(j.isExpanded(n.selection)&&a)return t.preventDefault(),x.blur(n),x.deselect(n),R.deselect(n),void e.setBlockSelected([],{allSelected:!0})}if(Ii.isShiftTab(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void e.decreaseBlockDepth()}if(Ii.isTab(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void e.increaseBlockDepth()}if(Ii.isArrowUp(t)){if(t.isDefaultPrevented())return;const r=S.parent(n.selection.anchor.path);if(_.isStart(n,n.selection.anchor,r)){const n=e.selection?[e.selection[0]-1]:null,r=In(e,{at:n}),o=M(e,{at:n});if(r&&o){const[,n]=_.last(r,[0]),i={path:n,offset:_.string(r,n).length};return t.preventDefault(),void e.focusBlock(o.id,{focusAt:i,waitExecution:!1,shouldUpdateBlockSelection:!0})}}}if(Ii.isArrowDown(t)){const r=S.parent(n.selection.anchor.path);if(_.isEnd(n,n.selection.anchor,r)){const n=e.selection?[e.selection[0]+1]:null,o=In(e,{at:n}),i=M(e,{at:n});if(o&&i){const n=function(e,t){const[,n]=_.first(e,t);return{path:n,offset:0}}(o,r);return t.preventDefault(),void e.focusBlock(i.id,{focusAt:n,waitExecution:!1})}}}if(j.isExpanded(n.selection)){if(Object.values(e.formats).length>0)for(const n of Object.values(e.formats))if(n.hotkey&&Ai(n.hotkey)(t)){t.preventDefault(),e.formats[n.type].toggle();break}}}}}},zi=({children:t,attributes:n,placeholder:r})=>{const o=k(),i=Object.assign({},n);return o&&r&&(i["data-placeholder"]=r,i.className="yoopta-placeholder"),e("span",Object.assign({},i,{children:t}))};function Fi(e){try{return new URL(e),!0}catch(e){return!1}}const Ui=(e,t)=>{(e=>{const[t]=_.nodes(e,{match:e=>!_.isEditor(e)&&D.isElement(e)&&"link"===e.type});return!!t})(e)&&(e=>{R.unwrapNodes(e,{match:e=>!_.isEditor(e)&&D.isElement(e)&&"link"===e.type})})(e);const{selection:n}=e,r=n&&j.isCollapsed(n),o={type:"link",children:r?[{text:t}]:[],props:{url:t,target:"_blank",rel:"noreferrer"}};r?R.insertNodes(e,o):(R.wrapNodes(e,o,{split:!0}),R.collapse(e,{edge:"end"}))},Hi=({id:t,customEditor:r,elements:o,marks:i,events:a,options:c,placeholder:s="Type '/' for commands"})=>{const u=z(),f=F(t),p=l(f.value).current,h=f.type,g=d((()=>(e=>{const t={};return Object.keys(e).forEach((n=>t[n]=e[n].render)),t})(o)),[o]),v=d((()=>(e=>{const t={};return e?(e.forEach((e=>t[e.type]=e)),t):t})(i)),[i]),m=d((()=>{let e=u.blockEditorsMap[t];return Object.keys(o).forEach((t=>{var n;const r=null===(n=o[t].props)||void 0===n?void 0:n.nodeType,i="inline"===r,a="void"===r,l="inlineVoid"===r;l&&(e.markableVoid=e=>e.type===t),(a||l)&&(e.isVoid=e=>e.type===t),(i||l)&&(e.isInline=e=>e.type===t,e=(e=>{const{insertData:t,insertText:n}=e;return e.insertText=t=>{t&&Fi(t)?Ui(e,t):n(t)},e.insertData=n=>{const r=n.getData("text/plain");r&&Fi(r)?Ui(e,r):t(n)},e})(e))})),e}),[]),b=d((()=>{if(!a||u.readOnly)return{};const e={hotkeys:Ii,currentBlock:f,defaultBlock:ee({id:J()})},t={};return Object.keys(a).forEach((n=>{t[n]=function(t){if(a[n]){a[n](u,m,e)(t)}}})),t}),[a,u,f]);return e("div",Object.assign({"data-plugin-id":t,"data-plugin-type":h},{children:e(Vi,{id:t,slate:m,initialValue:p,onChange:e=>u.updateBlock(t,{value:e}),decorate:e=>{var t;const n=[];if(u.readOnly)return n;const[r,o]=e,i=(null===(t=u.selection)||void 0===t?void 0:t[0])===f.meta.order;return m.selection&&i&&!_.isEditor(r)&&""===_.string(m,[o[0]])&&j.includes(m.selection,o)&&j.isCollapsed(m.selection)&&n.push(Object.assign(Object.assign({},m.selection),{withPlaceholder:!0})),n},renderLeaf:t=>{var n,r,o,i,a;let{children:l,leaf:c,attributes:d}=t;const p=wi(c,["text"]),h=(null===(n=u.selection)||void 0===n?void 0:n[0])===f.meta.order;p&&Object.keys(p).forEach((e=>{const t=v[e];t&&(l=t.render({children:l,leaf:c}))}));const g=!("void"===(null===(a=null===(i=null===(o=null===(r=t.children)||void 0===r?void 0:r.props)||void 0===o?void 0:o.parent)||void 0===i?void 0:i.props)||void 0===a?void 0:a.nodeType))&&h&&c.withPlaceholder;return e(zi,Object.assign({attributes:d,placeholder:g?s:void 0},{children:l}))},renderElement:r=>{const o=g[r.element.type];return o?e(o,Object.assign({},r,{blockId:t,options:c})):e(n,{})},eventHandlers:b,onKeyDown:e=>{var t;u.readOnly||(null===(t=b.onKeyDown)||void 0===t||t.call(b,e),Pi.onKeyDown(u)(e))},onKeyUp:e=>{var t;u.readOnly||null===(t=null==b?void 0:b.onKeyUp)||void 0===t||t.call(b,e)},onFocus:e=>{var t;u.readOnly||null===(t=null==b?void 0:b.onFocus)||void 0===t||t.call(b,e)},onClick:e=>{var t,n;u.readOnly||((null===(t=u.selection)||void 0===t?void 0:t[0])!==f.meta.order&&u.setSelection([f.meta.order]),null===(n=null==b?void 0:b.onClick)||void 0===n||n.call(b,e))},onBlur:e=>{var t;u.readOnly||(e.preventDefault(),null===(t=null==b?void 0:b.onBlur)||void 0===t||t.call(b,e))},customEditor:r,readOnly:u.readOnly})}))},Vi=p((({id:t,slate:n,initialValue:r,onChange:o,renderLeaf:i,renderElement:a,eventHandlers:l,onKeyDown:c,onKeyUp:s,onFocus:d,onClick:u,onBlur:f,customEditor:p,decorate:h,readOnly:g})=>"function"==typeof p?p({blockId:t}):e(E,Object.assign({editor:n,initialValue:r,onChange:o},{children:e(C,Object.assign({renderElement:a,renderLeaf:i,className:"focus-visible:outline-none focus:outline-none",spellCheck:!0},l,{onKeyDown:c,onKeyUp:s,onFocus:d,onClick:u,decorate:h,onBlur:f,readOnly:g,onPaste:e=>{const t=e.clipboardData.getData("text/html"),n=(new DOMParser).parseFromString(t,"text/html");if(n.body.childNodes.length>0){e.preventDefault();const t={H1:"HeadingOne",H2:"HeadingTwo",H3:"HeadingThree",P:"Paragraph",OL:"NumberedList",UL:"BulletedList",BLOCKQUOTE:"Blockquote"},r=Array.from(n.body.childNodes).map(((e,n)=>{if(t[e.nodeName]){const r=t[e.nodeName];return ee({id:J(),type:r,value:[],meta:{order:n,depth:0}})}})).filter(Boolean);console.log("nodes",r),console.log("parsetHTML.body",n.body)}}}),`editable-${t}`)}),`slate-${t}`)));Vi.displayName="SlateEditorInstance";const Wi=({editor:e})=>({sensors:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return d((()=>[...t].filter((e=>null!=e))),[...t])}(Le(Ot,{activationConstraint:{delay:100,tolerance:0}}),Le(wt,{coordinateGetter:Rn})),handleDragEnd:u((t=>{const{active:n,over:r}=t;if(n&&r&&n.id!==r.id){const t=e.children[r.id].meta.order;e.moveBlock(n.id,[t])}}),[]),handleDragStart:u((t=>{e.setBlockSelected(null)}),[])}),Ki=[],Yi=({editor:t,marks:r,placeholder:o})=>{const i=V(),{sensors:a,handleDragEnd:l,handleDragStart:c}=Wi({editor:t}),s=Object.keys(t.children),u=d((()=>0===s.length?Ki:s.sort(((e,n)=>t.children[e].meta.order-t.children[n].meta.order))),[s]),f=[];for(let n=0;n<u.length;n++){const i=u[n],a=t.children[i],l=t.plugins[a.type];a&&l?f.push(e(yi,Object.assign({block:a,blockId:i},{children:e(Hi,{type:a.type,id:i,marks:r,customEditor:l.customEditor,events:l.events,elements:l.elements,options:l.options,placeholder:o},i)}),i)):console.error(`Plugin ${a.type} not found`)}return i?e(n,{children:f}):e(rn,Object.assign({sensors:a,collisionDetection:He,onDragStart:c,onDragEnd:l},{children:e(yn,Object.assign({disabled:i,items:u,strategy:vn},{children:f}))}))},Xi=({editor:e,yooptaEditorRef:t,root:n})=>{const[r,o]=f({origin:[0,0],coords:[0,0],selection:!1}),i=n=>{var i;if(e.readOnly)return;const a=null===(i=t.current)||void 0===i?void 0:i.contains(n.target);if(!a&&!r.selection&&Array.isArray(e.selectedBlocks)&&e.selectedBlocks.length>0)return e.setBlockSelected(null),c();a||o({origin:[n.pageX,n.pageY-window.pageYOffset],coords:[n.pageX,n.pageY-window.pageYOffset],selection:!0})},a=t=>{if(!r.selection||e.readOnly)return;o((e=>Object.assign(Object.assign({},e),{coords:[t.pageX,t.pageY-window.pageYOffset]})));const n=((e,t)=>{const n=[];return document.querySelectorAll("[data-yoopta-block]").forEach(((r,o)=>{if(!r)return;const i=r.getBoundingClientRect(),a=Math.min(e[1],t[1]),l=Math.min(e[0],t[0]),c=Math.max(e[1],t[1]),s=Math.max(e[0],t[0]);a<i.bottom&&c>i.top&&l<i.right&&s>i.left&&n.push(o)})),n})(r.origin,[t.pageX,t.pageY-window.pageYOffset]);e.setBlockSelected(n,{only:!0})},l=()=>{e.readOnly||c()};s((()=>{var r;if(e.readOnly)return;const o=n&&"current"in n?n.current:n||document;if(!o)throw new Error("Root element not found. Please check the `selectionBoxRoot` prop");if(!("nodeType"in o))throw new Error("Root element should be a DOM element or a ref object. Please check the `selectionBoxRoot` prop");if(null===(r=t.current)||void 0===r?void 0:r.contains(o))throw new Error("Root element should not be a child of the editor. Please check the `selectionBoxRoot` prop");return o.addEventListener("mousedown",i),o.addEventListener("mousemove",a),o.addEventListener("mouseup",l),()=>{o.removeEventListener("mousedown",i),o.removeEventListener("mousemove",a),o.removeEventListener("mouseup",l)}}),[e.selectedBlocks,r,n,e.readOnly]);const c=()=>{o({origin:[0,0],coords:[0,0],selection:!1})};return Object.assign(Object.assign({},r),{onClose:c})},$i=({origin:t,coords:n,isOpen:r})=>{if(!r)return null;const o={zIndex:10,left:t[0],top:t[1],height:Math.abs(n[1]-t[1]-1),width:Math.abs(n[0]-t[0]-1),userSelect:"none",transformOrigin:"top left",transform:t[1]>n[1]&&t[0]>n[0]?"scaleY(-1) scaleX(-1)":t[1]>n[1]?"scaleY(-1)":t[0]>n[0]?"scaleX(-1)":void 0,position:"fixed",backgroundColor:"rgba(35, 131, 226, 0.14)"};return e("div",{style:o})},Zi={selectionStarted:!1,indexToSelect:null,startedIndexToSelect:null},qi=({placeholder:n,marks:r,className:o,autoFocus:i=!0,selectionBoxRoot:a})=>{const c=z(),d=V(),u=l(null),f=Xi({editor:c,yooptaEditorRef:u,root:a});let p=l(Zi).current;s((()=>{if(!i||d)return;const e=M(c,{at:[0]});e&&c.focusBlock(e.id,{waitExecution:!0})}),[i,d]),s((()=>{if(!d)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)}),[c.selectedBlocks,d]);const h=()=>{d||Array.isArray(c.selectedBlocks)&&c.selectedBlocks.length>0&&c.setBlockSelected(null)},g=()=>{p.indexToSelect=null,p.startedIndexToSelect=null,p.selectionStarted=!1},v=e=>{var t,n,r,o,i;if(!d){if(Ii.isSelect(e)){if((null===(t=c.selectedBlocks)||void 0===t?void 0:t.length)===Object.keys(c.children).length)return void e.preventDefault();if(p.selectionStarted)return e.preventDefault(),void c.setBlockSelected([],{allSelected:!0})}if(Ii.isBackspace(e)){e.stopPropagation();if(Array.isArray(c.selectedBlocks)&&(null===(n=c.selectedBlocks)||void 0===n?void 0:n.length)===Object.keys(c.children).length)return e.preventDefault(),c.deleteBlock({deleteAll:!0}),c.setBlockSelected(null),void g();if(Array.isArray(c.selectedBlocks)&&(null===(r=c.selectedBlocks)||void 0===r?void 0:r.length)>0)return e.preventDefault(),c.deleteBlock({fromPaths:c.selectedBlocks}),c.setBlockSelected(null),void g()}if(Ii.isShiftArrowUp(e)){if("function"==typeof e.isDefaultPrevented&&e.isDefaultPrevented())return;if(p.selectionStarted&&null!==p.startedIndexToSelect&&null!==p.indexToSelect){const e=p.indexToSelect,t=e-1;if(0===e)return;if(e===p.startedIndexToSelect)return c.setBlockSelected([t]),void(p.indexToSelect=t);if(t<p.startedIndexToSelect)return c.setBlockSelected([t]),void(p.indexToSelect=t);if((null===(o=c.selectedBlocks)||void 0===o?void 0:o.includes(e))&&e!==p.startedIndexToSelect){const n=c.selectedBlocks.filter((t=>t!==e));return c.setBlockSelected(n,{only:!0}),void(p.indexToSelect=t)}return}const t=M(c),n=In(c);if(!n||!n.selection||!t)return;const r=S.parent(n.selection.anchor.path),i=_.isStart(n,n.selection.focus,r);if(j.isExpanded(n.selection)&&i){const r=c.selection?[c.selection[0]-1]:[0],o=M(c,{at:r});t&&o&&(e.preventDefault(),x.blur(n),x.deselect(n),R.deselect(n),c.setSelection(null),c.setBlockSelected([null==t?void 0:t.meta.order,(null==t?void 0:t.meta.order)-1]),p.startedIndexToSelect=t.meta.order,p.indexToSelect=t.meta.order-1,p.selectionStarted=!0)}}if(Ii.isShiftArrowDown(e)){if(p.selectionStarted&&null!==p.indexToSelect&&null!==p.startedIndexToSelect){const e=p.indexToSelect,t=e+1;if(t===Object.keys(c.children).length)return;if(e===p.startedIndexToSelect)return c.setBlockSelected([t]),void(p.indexToSelect=t);if(t>p.startedIndexToSelect)return c.setBlockSelected([t]),void(p.indexToSelect=t);if((null===(i=c.selectedBlocks)||void 0===i?void 0:i.includes(e))&&e!==p.startedIndexToSelect){const n=c.selectedBlocks.filter((t=>t!==e));return c.setBlockSelected(n,{only:!0}),void(p.indexToSelect=t)}return}const t=M(c),n=In(c);if(!n||!n.selection||!t)return;const r=S.parent(n.selection.anchor.path),o=_.isEnd(n,n.selection.focus,r);if(j.isExpanded(n.selection)&&o){const r=c.selection?[c.selection[0]+1]:[0],o=M(c,{at:r});t&&o&&(e.preventDefault(),x.blur(n),x.deselect(n),R.deselect(n),c.setSelection(null),c.setBlockSelected([null==t?void 0:t.meta.order,(null==t?void 0:t.meta.order)+1]),p.startedIndexToSelect=t.meta.order,p.indexToSelect=t.meta.order+1,p.selectionStarted=!0)}}}},m=(b={userSelect:f.selection?"none":"auto",pointerEvents:f.selection?"none":"auto"},Object.assign({paddingBottom:150},b));var b;return t("div",Object.assign({id:"yoopta-editor",className:o,style:m,ref:u,onClick:e=>{d||(g(),(e=>{var t;const n=u.current;if(!n)return;const{bottom:r}=n.getBoundingClientRect(),o=r-parseInt(getComputedStyle(n).paddingBottom,10),i=ee({id:J()});if(e.clientY>=o){const e=Object.keys(c.children).length-1,n=M(c,{at:[e]}),r=In(c,{at:[e]});if(n&&r&&r.selection){const e=_.string(r,r.selection.anchor.path),o=S.parent(r.selection.anchor.path),[a]=_.node(r,o);if(n.type===i.type&&D.isElement(a)&&"void"!==(null===(t=a.props)||void 0===t?void 0:t.nodeType)&&0===e.trim().length)return void c.focusBlock(n.id,{slate:r})}const o=e+1;c.insertBlock(i,{at:[o],focus:!0})}})(e),h())},onBlur:e=>{var t;(null===(t=u.current)||void 0===t?void 0:t.contains(e.relatedTarget))||d||(g(),h())}},{children:[e(Yi,{editor:c,marks:r,placeholder:n}),e($i,{origin:f.origin,coords:f.coords,isOpen:f.selection&&!d})]}))},Gi=({children:e,fallback:t=null})=>{const[n,r]=f(!1);return s((()=>r(!0)),[]),n?e:t};var Ji=Symbol.for("immer-nothing"),Qi=Symbol.for("immer-draftable"),ea=Symbol.for("immer-state");function ta(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var na=Object.getPrototypeOf;function ra(e){return!!e&&!!e[ea]}function oa(e){return!!e&&(aa(e)||Array.isArray(e)||!!e[Qi]||!!e.constructor?.[Qi]||ua(e)||fa(e))}var ia=Object.prototype.constructor.toString();function aa(e){if(!e||"object"!=typeof e)return!1;const t=na(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===ia}function la(e,t){0===ca(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function ca(e){const t=e[ea];return t?t.type_:Array.isArray(e)?1:ua(e)?2:fa(e)?3:0}function sa(e,t){return 2===ca(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function da(e,t,n){const r=ca(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function ua(e){return e instanceof Map}function fa(e){return e instanceof Set}function pa(e){return e.copy_||e.base_}function ha(e,t){if(ua(e))return new Map(e);if(fa(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&aa(e)){if(!na(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const n=Object.getOwnPropertyDescriptors(e);delete n[ea];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],i=n[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(na(e),n)}function ga(e,t=!1){return ma(e)||ra(e)||!oa(e)||(ca(e)>1&&(e.set=e.add=e.clear=e.delete=va),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>ga(t,!0)))),e}function va(){ta(2)}function ma(e){return Object.isFrozen(e)}var ba,ya={};function wa(e){const t=ya[e];return t||ta(0),t}function xa(){return ba}function ka(e,t){t&&(wa("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ea(e){Ca(e),e.drafts_.forEach(Sa),e.drafts_=null}function Ca(e){e===ba&&(ba=e.parent_)}function Oa(e){return ba={drafts_:[],parent_:ba,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Sa(e){const t=e[ea];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function _a(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[ea].modified_&&(Ea(t),ta(4)),oa(e)&&(e=Da(t,e),t.parent_||ja(t,e)),t.patches_&&wa("Patches").generateReplacementPatches_(n[ea].base_,e,t.patches_,t.inversePatches_)):e=Da(t,n,[]),Ea(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ji?e:void 0}function Da(e,t,n){if(ma(t))return t;const r=t[ea];if(!r)return la(t,((o,i)=>Ra(e,r,t,o,i,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return ja(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,i=!1;3===r.type_&&(o=new Set(t),t.clear(),i=!0),la(o,((o,a)=>Ra(e,r,t,o,a,n,i))),ja(e,t,!1),n&&e.patches_&&wa("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Ra(e,t,n,r,o,i,a){if(ra(o)){const a=Da(e,o,i&&t&&3!==t.type_&&!sa(t.assigned_,r)?i.concat(r):void 0);if(da(n,r,a),!ra(a))return;e.canAutoFreeze_=!1}else a&&n.add(o);if(oa(o)&&!ma(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Da(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||ja(e,o)}}function ja(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ga(t,n)}var Ba={get(e,t){if(t===ea)return e;const n=pa(e);if(!sa(n,t))return function(e,t,n){const r=La(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!oa(r)?r:r===Ta(e.base_,t)?(Na(e),e.copy_[t]=Ia(r,e)):r},has:(e,t)=>t in pa(e),ownKeys:e=>Reflect.ownKeys(pa(e)),set(e,t,n){const r=La(pa(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Ta(pa(e),t),a=r?.[ea];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((o=n)===(i=r)?0!==o||1/o==1/i:o!=o&&i!=i)&&(void 0!==n||sa(e.base_,t)))return!0;Na(e),Ma(e)}var o,i;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Ta(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Na(e),Ma(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=pa(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){ta(11)},getPrototypeOf:e=>na(e.base_),setPrototypeOf(){ta(12)}},Aa={};function Ta(e,t){const n=e[ea];return(n?pa(n):e)[t]}function La(e,t){if(!(t in e))return;let n=na(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=na(n)}}function Ma(e){e.modified_||(e.modified_=!0,e.parent_&&Ma(e.parent_))}function Na(e){e.copy_||(e.copy_=ha(e.base_,e.scope_.immer_.useStrictShallowCopy_))}la(Ba,((e,t)=>{Aa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Aa.deleteProperty=function(e,t){return Aa.set.call(this,e,t,void 0)},Aa.set=function(e,t,n){return Ba.set.call(this,e[0],t,n,e[0])};function Ia(e,t){const n=ua(e)?wa("MapSet").proxyMap_(e,t):fa(e)?wa("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:xa(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=Ba;n&&(o=[r],i=Aa);const{revoke:a,proxy:l}=Proxy.revocable(o,i);return r.draft_=l,r.revoke_=a,l}(e,t);return(t?t.scope_:xa()).drafts_.push(n),n}function Pa(e){if(!oa(e)||ma(e))return e;const t=e[ea];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ha(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ha(e,!0);return la(n,((e,t)=>{da(n,e,Pa(t))})),t&&(t.finalized_=!1),n}var za=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&ta(6),void 0!==n&&"function"!=typeof n&&ta(7),oa(e)){const o=Oa(this),i=Ia(e,void 0);let a=!0;try{r=t(i),a=!1}finally{a?Ea(o):Ca(o)}return ka(o,n),_a(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Ji&&(r=void 0),this.autoFreeze_&&ga(r,!0),n){const t=[],o=[];wa("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}ta(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){oa(e)||ta(8),ra(e)&&(e=function(e){ra(e)||ta(10);return Pa(e)}(e));const t=Oa(this),n=Ia(e,void 0);return n[ea].isManual_=!0,Ca(t),n}finishDraft(e,t){const n=e&&e[ea];n&&n.isManual_||ta(9);const{scope_:r}=n;return ka(r,t),_a(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=wa("Patches").applyPatches_;return ra(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};za.produce,za.produceWithPatches.bind(za),za.setAutoFreeze.bind(za),za.setUseStrictShallowCopy.bind(za),za.applyPatches.bind(za);var Fa=za.createDraft.bind(za),Ua=za.finishDraft.bind(za);function Ha(e,t){const n=In(e);if(!n)return!1;const r=_.marks(n);return!!(null==r?void 0:r[t])}const Va=(e,t)=>{const{insertText:n}=t;return t.insertText=r=>{var o;const{selection:i}=t;if(" "===r&&i&&j.isCollapsed(i)){const{anchor:a}=i,l=_.above(t,{match:e=>D.isElement(e)&&_.isBlock(t,e),mode:"lowest"});if(!l)return;const[,c]=l,s=_.parent(t,c),[d]=s;if(D.isElement(d)&&!B.isText(d.children[0]))return n(r);const u=l?c:[],f={anchor:a,focus:_.start(t,u)},p=_.string(t,f),h=null===(o=e.shortcuts)||void 0===o?void 0:o[p];if(!!h&&!h.isActive())return R.select(t,f),R.delete(t),void h.create({deleteText:!1})}n(r)},t};function Wa(e,t,n){e.children=Fa(e.children);let r=!1;const o=e.children[t];if(!o)throw Error(`Block with id ${t} not found`);n.id&&(o.id=n.id,r=!0),n.type&&(o.type=n.type,r=!0),n.meta&&(o.meta=n.meta,r=!0),n.value&&(o.value=n.value),e.children=Ua(e.children),r&&e.applyChanges(),e.emit("change",e.children)}function Ka(e,t,n){e.children=Fa(e.children);const r=M(e,{at:e.selection});if(!r)throw new Error("Block from not found at current selection");const o=ii(e.blocks[r.type].elements);if(r.type===t)return void(e.children=Ua(e.children));const i=In(e,{at:[r.meta.order]});if(!i)throw new Error(`Slate not found for block in position ${r.meta.order}`);const a=ii(e.blocks[t].elements);_.withoutNormalizing(i,(()=>{const n=function(e,t={}){var n;const{at:r,elementType:o}=t,i=r||(null===(n=e.selection)||void 0===n?void 0:n.anchor.path);if(!i)return;let a=e=>!_.isEditor(e)&&D.isElement(e);o&&(a=e=>!_.isEditor(e)&&D.isElement(e)&&e.type===o);const l=S.parent(i),c=_.nodes(e,{at:l,match:a,mode:"lowest"});if(c){const[e]=c;return e}}(i,{elementType:o});console.log({fromBlockRootElementType:o,node:n}),R.setNodes(i,{type:a},{at:[0],mode:"lowest",match:e=>D.isElement(e)&&!_.isInline(i,e)});const l={id:r.id,type:t,meta:Object.assign(Object.assign({},r.meta),{order:r.meta.order}),value:i.children};e.blockEditorsMap[r.id]=i,e.children[r.id]=l,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children)}))}function Ya(e,t={}){const{at:n=e.selection,deleteAll:r=!1,fromPaths:o,focus:i}=t;if(console.log("BEFORE options.focusAt",t.focusAt),Array.isArray(o)&&o.length>0){e.children=Fa(e.children),o.forEach((t=>{const n=M(e,{at:[t]});n&&(delete e.children[n.id],delete e.blockEditorsMap[n.id])}));return Object.keys(e.children).forEach(((t,n)=>{e.children[t].meta.order=n})),e.children=Ua(e.children),e.applyChanges(),void e.emit("change",e.children)}if(r||1===Object.keys(e.children).length){e.children={},e.blockEditorsMap={};const t=ee({id:J()}),n=Va(e,O(A()));return e.children[t.id]=t,e.blockEditorsMap[t.id]=n,e.setSelection([0]),e.setBlockSelected(null),e.focusBlock(t.id,{slate:n,waitExecution:!0}),e.applyChanges(),void e.emit("change",e.children)}if(!n)return;e.children=Fa(e.children);const[a]=n,l=Object.keys(e.children),c=l.find((t=>e.children[t].meta.order===a));if(l.forEach((t=>{const n=e.children[t];n.meta.order>a&&(n.meta.order-=1)})),c&&(delete e.children[c],delete e.blockEditorsMap[c]),e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children),i){const n=e.selection?e.selection[0]-1:0,r=M(e,{at:[n]});r&&e.focusBlock(r.id,{focusAt:t.focusAt})}}function Xa(e,t){const n={};return t.forEach((t=>{const r=t.type;n[r]={hotkey:t.hotkey,type:r,getValue:()=>function(e,t){const n=In(e);if(!n)return null;const r=_.marks(n);return null==r?void 0:r[t]}(e,r),isActive:()=>Ha(e,r),toggle:()=>function(e,t){const n=In(e),r=Ha(e,t);n&&(r?_.removeMark(n,t):_.addMark(n,t,!0),e.applyChanges(),e.emit("change",e.children))}(e,r),update:t=>function(e,t,n){const r=In(e);r&&r.selection&&j.isExpanded(r.selection)&&(_.addMark(r,t,n),e.applyChanges(),e.emit("change",e.children))}(e,r,t)}})),n}function $a(e,t){const n={};return t.forEach(((t,r)=>{var o;const i=ai(t.elements),a=null===(o=null==i?void 0:i.props)||void 0===o?void 0:o.nodeType;if(!("inline"===a||"inlineVoid"===a)){const r={};Object.keys(t.elements).forEach((e=>{const n=wi(t.elements[e],["render"]);r[e]=n}));const{display:o,placeholder:i,align:a,shortcuts:l}=t.options||{};n[t.type]={type:t.type,elements:r,hasCustomEditor:!!t.customEditor,options:{display:o,placeholder:i,align:a,shortcuts:l},isActive:()=>{const n=M(e,{at:e.selection});return(null==n?void 0:n.type)===t.type},toggle:(t,n)=>{Ka(e,t)},create:n=>{!function(e,t,n){var r;e.children=Fa(e.children);const o=M(e);if(!o)throw new Error(`No block found in the current selection path. Passed path: ${e.selection}`);const i=(null==n?void 0:n.slate)||In(e,{at:[null==o?void 0:o.meta.order]});if(!i||!i.selection)return;const a=e.blocks[t],l=ii(a.elements),c=a.elements[l];if(!c)return;const s=Object.assign({nodeType:(null===(r=c.props)||void 0===r?void 0:r.nodeType)||"block"},c.props),d=Q({id:J(),type:l,props:s});R.setNodes(i,d,{at:[0,0],match:e=>D.isElement(e),mode:"highest"}),(null==n?void 0:n.deleteText)&&R.delete(i,{at:[0,0]});const u=ee({id:o.id,type:a.type,meta:{order:o.meta.order,depth:o.meta.depth},value:[d]}),f=u.id;e.children[f]=u,e.blockEditorsMap[f]=i,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children),(null==n?void 0:n.focus)&&e.focusBlock(f,{slate:i,waitExecution:!0})}(e,t.type,n)},update:(t,n)=>{Wa(e,t,n)},updateElement:(t,n,r)=>{!function(e,t,n,r){const o=e.children[t];if(!o)throw new Error(`Block with id ${t} not found`);const i=In(e,{at:[o.meta.order]});i?_.withoutNormalizing(i,(()=>{const[t]=_.nodes(i,{at:[0],match:e=>D.isElement(e)&&e.type===n}),o=null==t?void 0:t[0],a=(null==o?void 0:o.props)||{},l={props:Object.assign(Object.assign({},a),r)};R.setNodes(i,l,{at:[0],match:e=>D.isElement(e)&&e.type===n,mode:"lowest"}),e.applyChanges(),e.emit("change",e.children)})):console.warn("No slate found")}(e,t,n,r)},delete:t=>{Ya(e,t)}}}})),n}function Za(e){return Va(e,O(A()))}function qa({type:e,hotkey:t,render:n}){return{type:e,hotkey:t,render:n}}const Ga=qa({type:"fakeSelection",render:t=>e("span",Object.assign({style:{backgroundColor:"#d7e6fa"}},{children:t.children}))}),Ja=(()=>{const e=J();return{[e]:ee({id:e})}})(),Qa=new $,el=(e,t)=>Qa.on(e,t),tl=(e,t)=>Qa.once(e,t),nl=(e,t)=>Qa.off(e,t),rl=(e,t)=>Qa.emit(e,t);const ol=({editor:n,value:r,marks:o,plugins:i,autoFocus:a,className:l,tools:c,selectionBoxRoot:s,children:u,placeholder:p,readOnly:h})=>{const g=()=>{y((e=>Object.assign(Object.assign({},e),{version:e.version+1})))},v=d((()=>o?[Ga,...o]:[Ga]),[o]),m=d((()=>i.map((e=>e.getPlugin))),[i]),[b,y]=f((()=>(n.applyChanges=g,n.readOnly=h||!1,v&&(n.formats=Xa(n,v)),n.blocks=$a(n,m),n.children=function(e){return!!e&&"object"==typeof e&&0!==Object.keys(e).length}(r)?r:Ja,n.blockEditorsMap=function(e){const t={};return Object.keys(e.children).forEach((n=>{const r=Za(e);t[n]=r})),t}(n),n.shortcuts=function(e){const t={};return Object.values(e.blocks).forEach((e=>{var n,r,o,i;e.options&&Array.isArray(null===(n=e.options)||void 0===n?void 0:n.shortcuts)&&(null===(r=e.options)||void 0===r?void 0:r.shortcuts.length)>0&&(null===(i=null===(o=e.options)||void 0===o?void 0:o.shortcuts)||void 0===i||i.forEach((n=>{t[n]=e})))})),t}(n),n.plugins=function(e){const t={},n={};return e.forEach((e=>{e.elements&&Object.keys(e.elements).forEach((t=>{var r;const o=e.elements[t],i=null===(r=o.props)||void 0===r?void 0:r.nodeType;"inline"!==i&&"inlineVoid"!==i||(n[t]=o)})),t[e.type]=e})),e.forEach((e=>{if(e.elements){const r=Object.assign(Object.assign({},e.elements),n);t[e.type]=Object.assign(Object.assign({},e),{elements:r})}})),t}(m),n.on=el,n.once=tl,n.off=nl,n.emit=rl,{editor:n,version:0})));return e(Gi,{children:e(P,Object.assign({editorState:b},{children:t(ci,Object.assign({tools:c},{children:[e(qi,{placeholder:p,marks:v,autoFocus:a,className:l,selectionBoxRoot:s}),u]}))}))})},il=Object.assign(Object.assign({},hi),{ExtendedBlockActions:({className:r,style:o,onClick:i,children:a})=>{const l=V(),[c,s]=f(!1),{refs:d,floatingStyles:u,context:p}=zo({placement:"bottom-start",open:c,onOpenChange:s,middleware:[Hr(),Ur(),Fr(),Er(10)],whileElementsMounted:zr}),{isMounted:h,styles:g}=Vo(p,{duration:100}),v=Object.assign(Object.assign({},g),u);return l?null:t(n,{children:[h&&e(pi,Object.assign({isOpen:!0,onClose:()=>s(!1),refs:d,style:v},{children:a})),e("button",Object.assign({type:"button",ref:d.setReference,className:`absolute right-[8px] top-[8px] flex items-center justify-between z-10 opacity-1 bg-[#eee] w-[22px] h-[22px] transition-opacity duration-150 ease-in border-none cursor-pointer rounded-[2px] p-[0_4px] ${r||""} yoopta-extended-block-actions`,onClick:()=>{null==i||i(),s(!0)},style:c?Object.assign(Object.assign({},o),{opacity:1}):o},{children:e(Go,{})}))]})}});function al(e,t){const n=Object.keys(e.children),{type:r}=t||{},o=n.find((t=>e.children[t].type===r));return o?e.children[o]:null}function ll(e,t,n={}){const{focusAt:r,waitExecution:o=!0,waitExecutionMs:i=0,shouldUpdateBlockSelection:a=!0}=n,l=()=>{const o=n.slate||e.blockEditorsMap[t],i=e.children[t];if(!o||!i)return;if(!e.blocks[i.type].hasCustomEditor){const e=function(e,t){if(T.isPoint(t))return t;if(S.isPath(t))return{path:t,offset:0};const[,n]=_.first(e,[0]);return{path:n||[0,0],offset:0}}(o,r);R.select(o,e),x.focus(o)}a&&setTimeout((()=>{e.setSelection([i.meta.order])}),0)};o?setTimeout((()=>l()),i):l()}function cl(e){return Array.from(new Set(e))}var sl={};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",l="[object Function]",c="[object GeneratorFunction]",s="[object Map]",d="[object Number]",u="[object Object]",f="[object Promise]",p="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",b="[object ArrayBuffer]",y="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",k="[object Int8Array]",E="[object Int16Array]",C="[object Int32Array]",O="[object Uint8Array]",S="[object Uint8ClampedArray]",_="[object Uint16Array]",D="[object Uint32Array]",R=/\w*$/,j=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,A={};A[o]=A["[object Array]"]=A[b]=A[y]=A[i]=A[a]=A[w]=A[x]=A[k]=A[E]=A[C]=A[s]=A[d]=A[u]=A[p]=A[h]=A[g]=A[v]=A[O]=A[S]=A[_]=A[D]=!0,A["[object Error]"]=A[l]=A[m]=!1;var T="object"==typeof Y&&Y&&Y.Object===Object&&Y,L="object"==typeof self&&self&&self.Object===Object&&self,M=T||L||Function("return this")(),N=t&&!t.nodeType&&t,I=N&&e&&!e.nodeType&&e,P=I&&I.exports===N;function z(e,t){return e.set(t[0],t[1]),e}function F(e,t){return e.add(t),e}function U(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function H(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function V(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e,t){return function(n){return e(t(n))}}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var X,$=Array.prototype,Z=Function.prototype,q=Object.prototype,G=M["__core-js_shared__"],J=(X=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+X:"",Q=Z.toString,ee=q.hasOwnProperty,te=q.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=P?M.Buffer:void 0,oe=M.Symbol,ie=M.Uint8Array,ae=W(Object.getPrototypeOf,Object),le=Object.create,ce=q.propertyIsEnumerable,se=$.splice,de=Object.getOwnPropertySymbols,ue=re?re.isBuffer:void 0,fe=W(Object.keys,Object),pe=Pe(M,"DataView"),he=Pe(M,"Map"),ge=Pe(M,"Promise"),ve=Pe(M,"Set"),me=Pe(M,"WeakMap"),be=Pe(Object,"create"),ye=Ve(pe),we=Ve(he),xe=Ve(ge),ke=Ve(ve),Ee=Ve(me),Ce=oe?oe.prototype:void 0,Oe=Ce?Ce.valueOf:void 0;function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _e(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function De(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Re(e){this.__data__=new _e(e)}function je(e,t){var n=Ke(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Ye(e)}(e)&&ee.call(e,"callee")&&(!ce.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!ee.call(e,a)||i&&("length"==a||Ue(a,r))||n.push(a);return n}function Be(e,t,n){var r=e[t];ee.call(e,t)&&We(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Ae(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function Te(e,t,n,r,f,m,j){var B;if(r&&(B=m?r(e,f,m,j):r(e)),void 0!==B)return B;if(!Ze(e))return e;var T=Ke(e);if(T){if(B=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(e,B)}else{var L=Fe(e),M=L==l||L==c;if(Xe(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(L==u||L==o||M&&!m){if(H(e))return m?e:{};if(B=function(e){return"function"!=typeof e.constructor||He(e)?{}:(t=ae(e),Ze(t)?le(t):{});var t}(M?{}:e),!t)return function(e,t){return Ne(e,ze(e),t)}(e,function(e,t){return e&&Ne(t,qe(t),e)}(B,e))}else{if(!A[L])return m?e:{};B=function(e,t,n,r){var o=e.constructor;switch(t){case b:return Me(e);case i:case a:return new o(+e);case y:return function(e,t){var n=t?Me(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case w:case x:case k:case E:case C:case O:case S:case _:case D:return function(e,t){var n=t?Me(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case s:return function(e,t,n){var r=t?n(V(e),!0):V(e);return U(r,z,new e.constructor)}(e,r,n);case d:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,R.exec(e));return t.lastIndex=e.lastIndex,t}(e);case h:return function(e,t,n){var r=t?n(K(e),!0):K(e);return U(r,F,new e.constructor)}(e,r,n);case v:return l=e,Oe?Object(Oe.call(l)):{}}var l}(e,L,Te,t)}}j||(j=new Re);var N=j.get(e);if(N)return N;if(j.set(e,B),!T)var I=n?function(e){return function(e,t,n){var r=t(e);return Ke(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,qe,ze)}(e):qe(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(I||e,(function(o,i){I&&(o=e[i=o]),Be(B,i,Te(o,t,n,r,i,e,j))})),B}function Le(e){return!(!Ze(e)||(t=e,J&&J in t))&&($e(e)||H(e)?ne:j).test(Ve(e));var t}function Me(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function Ne(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;Be(n,a,void 0===l?e[a]:l)}return n}function Ie(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Pe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Le(n)?n:void 0}Se.prototype.clear=function(){this.__data__=be?be(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(be){var r=t[e];return r===n?void 0:r}return ee.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return be?void 0!==t[e]:ee.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=be&&void 0===t?n:t,this},_e.prototype.clear=function(){this.__data__=[]},_e.prototype.delete=function(e){var t=this.__data__,n=Ae(t,e);return!(n<0)&&(n==t.length-1?t.pop():se.call(t,n,1),!0)},_e.prototype.get=function(e){var t=this.__data__,n=Ae(t,e);return n<0?void 0:t[n][1]},_e.prototype.has=function(e){return Ae(this.__data__,e)>-1},_e.prototype.set=function(e,t){var n=this.__data__,r=Ae(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},De.prototype.clear=function(){this.__data__={hash:new Se,map:new(he||_e),string:new Se}},De.prototype.delete=function(e){return Ie(this,e).delete(e)},De.prototype.get=function(e){return Ie(this,e).get(e)},De.prototype.has=function(e){return Ie(this,e).has(e)},De.prototype.set=function(e,t){return Ie(this,e).set(e,t),this},Re.prototype.clear=function(){this.__data__=new _e},Re.prototype.delete=function(e){return this.__data__.delete(e)},Re.prototype.get=function(e){return this.__data__.get(e)},Re.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof _e){var r=n.__data__;if(!he||r.length<199)return r.push([e,t]),this;n=this.__data__=new De(r)}return n.set(e,t),this};var ze=de?W(de,Object):function(){return[]},Fe=function(e){return te.call(e)};function Ue(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||B.test(e))&&e>-1&&e%1==0&&e<t}function He(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||q)}function Ve(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(pe&&Fe(new pe(new ArrayBuffer(1)))!=y||he&&Fe(new he)!=s||ge&&Fe(ge.resolve())!=f||ve&&Fe(new ve)!=h||me&&Fe(new me)!=m)&&(Fe=function(e){var t=te.call(e),n=t==u?e.constructor:void 0,r=n?Ve(n):void 0;if(r)switch(r){case ye:return y;case we:return s;case xe:return f;case ke:return h;case Ee:return m}return t});var Ke=Array.isArray;function Ye(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!$e(e)}var Xe=ue||function(){return!1};function $e(e){var t=Ze(e)?te.call(e):"";return t==l||t==c}function Ze(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function qe(e){return Ye(e)?je(e):function(e){if(!He(e))return fe(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Te(e,!0,!0)}}({get exports(){return sl},set exports(e){sl=e}},sl);var dl=sl;function ul(e,t={}){const{blockId:n,focus:r}=t;if(!n&&!t.at)throw new Error("blockId or path should be provided");let o=null;if(n&&(o=e.children[n],!o))throw new Error(`Block not with blockId: ${n} found`);if(t.at&&(o=M(e,{at:t.at}),!o))throw new Error(`Block in path ${t.at} not found`);if(!o)throw new Error("Block not found");e.children=Fa(e.children);Object.values(e.children).forEach((e=>{e.meta.order>o.meta.order&&(e.meta.order+=1)}));const i=(a=o,"function"==typeof window.structuredClone?window.structuredClone(a):dl(a));var a;const l=Za(e);i.id=J(),i.meta.order=o.meta.order+1,e.children[i.id]=i,e.blockEditorsMap[i.id]=l;const c=i.id;e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children),r&&e.focusBlock(c,{waitExecution:!0})}function fl(e,t){x.blur(t),x.deselect(t),R.deselect(t),e.setBlockSelected(null),e.setSelection(null)}const pl=()=>{const e={children:{},selection:null,selectedBlocks:null,readOnly:!1,getEditorValue:()=>function(e){return e.applyChanges(),e.children}(e),applyChanges:()=>{},insertBlock:(...t)=>function(e,t,n={}){e.children=Fa(e.children);const{at:r=null,focus:o=!1,slate:i=null}=n,a=M(e),l=r,c={id:J(),value:t.value,type:t.type,meta:Object.assign(Object.assign({},t.meta),{order:0})};let s=!1;if(i&&i.selection){const e=_.string(i,i.selection.anchor.path);s=_.isStart(i,i.selection.anchor,i.selection.anchor.path)&&e.length>0}if(l){const[t]=l;Object.values(e.children).forEach((e=>{e.meta.order>=t&&(e.meta.order+=1)})),c.meta.order=t}else{const t=Object.keys(e.children).length;c.meta.order=t}const d=Za(e);e.blockEditorsMap[c.id]=d,s&&a&&(c.meta.order=a.meta.order,a.meta.order+=1),e.children[c.id]=c;const u=null==a?void 0:a.id;e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children),o&&e.focusBlock(s&&u?u:c.id)}(e,...t),deleteBlock:(...t)=>Ya(e,...t),duplicateBlock:(...t)=>ul(e,...t),toggleBlock:(...t)=>Ka(e,...t),increaseBlockDepth:(...t)=>function(e,t={}){const{at:n=e.selection}=t;if(!n)return;e.children=Fa(e.children);const r=M(e);r&&(r.meta.depth=r.meta.depth+1,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children))}(e,...t),decreaseBlockDepth:(...t)=>function(e,t={}){const{at:n=e.selection}=t;if(!n)return;e.children=Fa(e.children);const r=M(e);r&&(r.meta.depth=0===r.meta.depth?0:r.meta.depth-1,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children))}(e,...t),moveBlock:(...t)=>function(e,t,n){e.children=Fa(e.children);const[r]=n,o=e.children[t],i=Object.values(e.children).find((e=>e.meta.order===r));console.log("blockInNewPosition meta",Object.assign({},i).meta.depth);const a=o.meta.order<i.meta.order,l=o.meta.order>i.meta.order;Object.values(e.children).forEach((e=>{a?e.meta.order>o.meta.order&&e.meta.order<=i.meta.order&&e.meta.order--:l&&e.meta.order<o.meta.order&&e.meta.order>=i.meta.order&&e.meta.order++})),o.meta.order=r,o.meta.depth=i.meta.depth,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children)}(e,...t),focusBlock:(...t)=>ll(e,...t),getBlock:(...e)=>{},updateBlock:(...t)=>Wa(e,...t),splitBlock:(...t)=>function(e,t={}){const{slate:n,focus:r=!0}=t,o=M(e);n&&n.selection&&o&&_.withoutNormalizing(n,(()=>{e.children=Fa(e.children);const t=S.parent(n.selection.anchor.path);R.splitNodes(n,{at:n.selection,match:e=>D.isElement(e),always:!0,mode:"highest"});const i=t[0]+1,a=n.children.slice()[i];R.removeNodes(n,{at:[i],match:e=>D.isElement(e),mode:"highest"});const l={id:J(),type:o.type,meta:{order:o.meta.order+1,depth:o.meta.depth},value:[a]};Object.values(e.children).forEach((e=>{e.meta.order>=l.meta.order&&(e.meta.order+=1)}));const c=Za(e);e.blockEditorsMap[l.id]=c,e.children[l.id]=l,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children),r&&e.focusBlock(l.id,{slate:c})}))}(e,...t),setSelection:(...t)=>function(e,t,n={}){const{applyChanges:r=!0}=n;e.selection=t,r&&e.applyChanges()}(e,...t),setBlockSelected:(...t)=>function(e,t,n={}){const{only:r=!1,allSelected:o=!1}=n,i=e.selectedBlocks||[];if(null===t)e.selectedBlocks=null;else if(r)e.selectedBlocks=t;else if(o){const t=Object.keys(e.children).map(((e,t)=>t));e.selectedBlocks=cl(t)}else e.selectedBlocks=cl(i.concat(t));e.applyChanges()}(e,...t),blur:(...t)=>function(e,t={}){var n;const r=null!==(n=t.slate)&&void 0!==n?n:In(e);if(!r)return;const{waitExecution:o,waitExecutionMs:i}=t;o?setTimeout((()=>fl(e,r)),i):(fl(e,r),e.applyChanges())}(e,...t),blockEditorsMap:{},blocks:{},formats:{},shortcuts:{},plugins:{},on:(e,t)=>{},off:(e,t)=>{},emit:(e,...t)=>{},once:(e,t)=>{}};return e};gi('/*! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.right-\\[8px\\]{right:8px}.top-0{top:0}.top-\\[8px\\]{top:8px}.z-10{z-index:10}.z-\\[100\\]{z-index:100}.z-\\[90\\]{z-index:90}.mx-\\[4px\\]{margin-left:4px;margin-right:4px}.my-\\[4px\\]{margin-bottom:4px;margin-top:4px}.mb-\\[1px\\]{margin-bottom:1px}.mr-2{margin-right:.5rem}.mt-\\[2px\\]{margin-top:2px}.\\!block{display:block!important}.block{display:block}.inline{display:inline}.flex{display:flex}.h-4{height:1rem}.h-\\[1px\\]{height:1px}.h-\\[22px\\]{height:22px}.h-full{height:100%}.w-4{width:1rem}.w-\\[22px\\]{width:22px}.w-auto{width:auto}.w-full{width:100%}.min-w-\\[200px\\]{min-width:200px}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-none{border-style:none}.bg-\\[\\#2383e224\\]{background-color:#2383e224}.bg-\\[\\#37352f14\\]{background-color:#37352f14}.bg-\\[\\#FFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-\\[\\#eee\\]{--tw-bg-opacity:1;background-color:rgb(238 238 238/var(--tw-bg-opacity))}.p-\\[0_4px\\]{padding:0 4px}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-\\[2px\\]{padding-left:2px;padding-right:2px}.py-0{padding-bottom:0;padding-top:0}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.text-sm{font-size:.875rem;line-height:1.25rem}.italic{font-style:italic}.leading-\\[120\\%\\]{line-height:120%}.opacity-100{opacity:1}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -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)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-opacity{transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}::-moz-selection{background:#c6ddf8}::selection{background:#c6ddf8}.yoopta-placeholder:after{color:inherit;content:attr(data-placeholder);font-size:75%;font-style:inherit;font-weight:inherit;opacity:.5;padding-left:5px;position:absolute;text-indent:2px;top:50%;transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;user-select:none}.hover\\:bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}');export{Ii as HOTKEYS,il as UI,L as YooptaPlugin,ee as buildBlockData,Q as buildBlockElement,pl as createYooptaEditor,qa as createYooptaMark,ol as default,M as findPluginBlockBySelectionPath,al as findPluginBlockByType,In as findSlateBySelectionPath,J as generateId,ai as getRootBlockElement,ii as getRootBlockElementType,F as useBlockData,K as useBlockSelected,U as useYooptaBlock,z as useYooptaEditor,H as useYooptaPlugin,W as useYooptaPluginOptions,V as useYooptaReadOnly,si as useYooptaTools};
|
|
6
|
+
var Zr=["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(","),qr="undefined"==typeof Element,Gr=qr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Jr=!qr&&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},Qr=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},eo=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Qr(a,!1))if("SLOT"===a.tagName){var l=a.assignedElements(),c=e(l.length?l:a.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{Gr.call(a,Zr)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var s=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),d=!Qr(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(s&&d){var u=e(!0===s?a.children:s.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return o},to=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},no=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))&&!to(e)?0:e.tabIndex},ro=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},oo=function(e){return"INPUT"===e.tagName},io=function(e){return function(e){return oo(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Jr(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(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)},ao=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},lo=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=Gr.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Gr.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ao(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,l=Jr(e);if(a&&!a.shadowRoot&&!0===r(a))return ao(e);e=e.assignedSlot?e.assignedSlot:a||l===e.ownerDocument?a:l.host}e=i}if(function(e){var t,n,r,o,i=e&&Jr(e),a=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&a;){var c,s,d;l=!(null===(s=a=null===(c=i=Jr(a))||void 0===c?void 0:c.host)||void 0===s||null===(d=s.ownerDocument)||void 0===d||!d.contains(a))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},co=function(e,t){return!(t.disabled||Qr(t)||function(e){return oo(e)&&"hidden"===e.type}(t)||lo(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 r=t.children.item(n);if("LEGEND"===r.tagName)return!!Gr.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},so=function(e,t){return!(io(t)||no(t)<0||!co(e,t))},uo=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},fo=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,l=function(e,t){var n=no(e);return n<0&&t&&!to(e)?0:n}(a,i),c=i?e(t.candidates):a;0===l?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:c})})),r.sort(ro).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},po=function(e,t){var n;return n=(t=t||{}).getShadowRoot?eo([e],t.includeContainer,{filter:so.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:uo}):function(e,t,n){if(Qr(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Zr));return t&&Gr.call(e,Zr)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,so.bind(null,t)),fo(n)};const ho=r["useInsertionEffect".toString()]||(e=>e());var go="undefined"!=typeof document?c:s;function vo(){return vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vo.apply(this,arguments)}let mo=!1,bo=0;const yo=()=>"floating-ui-"+bo++;const wo=r["useId".toString()]||function(){const[e,t]=r.useState((()=>mo?yo():void 0));return go((()=>{null==e&&t(yo())}),[]),r.useEffect((()=>{mo||(mo=!0)}),[]),e};const xo=r.createContext(null),ko=r.createContext(null);function Eo(e){return"data-floating-ui-"+e}function Co(e){const t=l(e);return go((()=>{t.current=e})),t}const Oo=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function So(e,t){const n=po(e,Oo());"prev"===t&&n.reverse();const r=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(r+1)[0]}function _o(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!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&&Wn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}(n,r)}function Do(e){po(e,Oo()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Ro(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 jo={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 Bo(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Ao=r.forwardRef((function(e,t){const[n,o]=r.useState();go((()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",Bo),()=>{document.removeEventListener("keydown",Bo)})),[]);const i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[Eo("focus-guard")]:"",style:jo};return r.createElement("span",vo({},e,i))})),To=r.createContext(null),Lo=Eo("portal");function Mo(e){let{children:t,id:n,root:o=null,preserveTabOrder:i=!0}=e;const a=function(e){let{id:t,root:n}=void 0===e?{}:e;const[o,i]=r.useState(null),a=wo(),l=No(),c=r.useRef(null);return go((()=>()=>{null==o||o.remove(),queueMicrotask((()=>{c.current=null}))}),[o]),go((()=>{if(c.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=a,n.setAttribute(Lo,""),e.appendChild(n),c.current=n,i(n)}),[t,a]),go((()=>{if(c.current)return;let e=n||(null==l?void 0:l.portalNode);e&&!Hn(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const o=document.createElement("div");o.id=a,o.setAttribute(Lo,""),e=r||e,e.appendChild(o),c.current=o,i(o)}),[t,n,a,l]),o}({id:n,root:o}),[l,c]=r.useState(null),s=r.useRef(null),d=r.useRef(null),u=r.useRef(null),f=r.useRef(null),p=!!l&&!l.modal&&l.open&&i&&!(!o&&!a);return r.useEffect((()=>{if(a&&i&&(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&&_o(e)){("focusin"===e.type?Ro:Do)(a)}}}),[a,i,null==l?void 0:l.modal]),r.createElement(To.Provider,{value:r.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:s,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:c})),[i,a])},p&&a&&r.createElement(Ao,{"data-type":"outside",ref:s,onFocus:e=>{if(_o(e,a)){var t;null==(t=u.current)||t.focus()}else{const e=So(document.body,"prev")||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),p&&a&&r.createElement("span",{"aria-owns":a.id,style:jo}),a&&w(t,a),p&&a&&r.createElement(Ao,{"data-type":"outside",ref:d,onFocus:e=>{if(_o(e,a)){var t;null==(t=f.current)||t.focus()}else{const t=So(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 No=()=>r.useContext(To),Io=new Set,Po=r.forwardRef((function(e,t){let{lockScroll:n=!1,...o}=e;const i=wo();return go((()=>{if(!n)return;Io.add(i);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,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,a=t.left?parseFloat(t.left):window.pageXOffset,l=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",o&&(t[r]=o+"px"),e){var c,s;const e=(null==(c=window.visualViewport)?void 0:c.offsetLeft)||0,n=(null==(s=window.visualViewport)?void 0:s.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(l-Math.floor(n))+"px",left:-(a-Math.floor(e))+"px",right:"0"})}return()=>{Io.delete(i),0===Io.size&&(Object.assign(t,{overflow:"",[r]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(a,l)))}}),[i,n]),r.createElement("div",vo({ref:t},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))}));function zo(e){var t;void 0===e&&(e={});const{open:n=!1,onOpenChange:o,nodeId:i}=e,[a,l]=r.useState(null),c=(null==(t=e.elements)?void 0:t.reference)||a,s=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:s,open:d}=e,[u,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(o);Kr(p,o)||h(o);const[g,v]=r.useState(null),[m,y]=r.useState(null),w=r.useCallback((e=>{e!==C.current&&(C.current=e,v(e))}),[]),x=r.useCallback((e=>{e!==O.current&&(O.current=e,y(e))}),[]),k=a||g,E=l||m,C=r.useRef(null),O=r.useRef(null),S=r.useRef(u),_=null!=s,D=$r(s),R=$r(i),j=r.useCallback((()=>{if(!C.current||!O.current)return;const e={placement:t,strategy:n,middleware:p};R.current&&(e.platform=R.current),Vr(C.current,O.current,e).then((e=>{const t={...e,isPositioned:!0};B.current&&!Kr(S.current,t)&&(S.current=t,b.flushSync((()=>{f(t)})))}))}),[p,t,n,R]);Wr((()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const B=r.useRef(!1);Wr((()=>(B.current=!0,()=>{B.current=!1})),[]),Wr((()=>{if(k&&(C.current=k),E&&(O.current=E),k&&E){if(D.current)return D.current(k,E,j);j()}}),[k,E,j,D,_]);const A=r.useMemo((()=>({reference:C,floating:O,setReference:w,setFloating:x})),[w,x]),T=r.useMemo((()=>({reference:k,floating:E})),[k,E]),L=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!T.floating)return e;const t=Xr(T.floating,u.x),r=Xr(T.floating,u.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...Yr(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,T.floating,u.x,u.y]);return r.useMemo((()=>({...u,update:j,refs:A,elements:T,floatingStyles:L})),[u,j,A,T,L])}(e),d=r.useContext(ko),u=null!=((null==(f=r.useContext(xo))?void 0:f.id)||null);var f;const p=function(e){const t=r.useRef((()=>{}));return ho((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}(((e,t,n)=>{e&&(g.current.openEvent=t),v.emit("openchange",{open:e,event:t,reason:n,nested:u}),null==o||o(e,t,n)})),h=r.useRef(null),g=r.useRef({}),v=r.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}()))[0],m=wo(),y=r.useCallback((e=>{const t=Hn(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s.refs.setReference(t)}),[s.refs]),w=r.useCallback((e=>{(Hn(e)||null===e)&&(h.current=e,l(e)),(Hn(s.refs.reference.current)||null===s.refs.reference.current||null!==e&&!Hn(e))&&s.refs.setReference(e)}),[s.refs]),x=r.useMemo((()=>({...s.refs,setReference:w,setPositionReference:y,domReference:h})),[s.refs,w,y]),k=r.useMemo((()=>({...s.elements,domReference:c})),[s.elements,c]),E=r.useMemo((()=>({...s,refs:x,elements:k,dataRef:g,nodeId:i,floatingId:m,events:v,open:n,onOpenChange:p})),[s,i,m,v,n,p,x,k]);return go((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===i));e&&(e.context=E)})),r.useMemo((()=>({...s,context:E,refs:x,elements:k})),[s,x,k,E])}const Fo=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function Uo(e,t){return"function"==typeof e?e(t):e}function Ho(e,t){void 0===t&&(t={});const{open:n,elements:{floating:o}}=e,{duration:i=250}=t,a=("number"==typeof i?i:i.close)||0,[l,c]=r.useState(!1),[s,d]=r.useState("unmounted"),u=function(e,t){const[n,o]=r.useState(e);return e&&!n&&o(!0),r.useEffect((()=>{if(!e){const e=setTimeout((()=>o(!1)),t);return()=>clearTimeout(e)}}),[e,t]),n}(n,a);return go((()=>{l&&!u&&d("unmounted")}),[l,u]),go((()=>{if(o){if(n){d("initial");const e=requestAnimationFrame((()=>{d("open")}));return()=>{cancelAnimationFrame(e)}}c(!0),d("close")}}),[n,o]),{isMounted:u,status:s}}function Vo(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:o,close:i,common:a,duration:l=250}=t,c=e.placement,s=c.split("-")[0],d=r.useMemo((()=>({side:s,placement:c})),[s,c]),u="number"==typeof l,f=(u?l:l.open)||0,p=(u?l:l.close)||0,[h,g]=r.useState((()=>({...Uo(a,d),...Uo(n,d)}))),{isMounted:v,status:m}=Ho(e,{duration:l}),b=Co(n),y=Co(o),w=Co(i),x=Co(a);return go((()=>{const e=Uo(b.current,d),t=Uo(w.current,d),n=Uo(x.current,d),r=Uo(y.current,d)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===m&&g((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===m&&g({transitionProperty:Object.keys(r).map(Fo).join(","),transitionDuration:f+"ms",...n,...r}),"close"===m){const r=t||e;g({transitionProperty:Object.keys(r).map(Fo).join(","),transitionDuration:p+"ms",...n,...r})}}),[p,w,b,y,x,f,m,d]),{isMounted:v,styles:h}}var Wo;function Ko(){return Ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ko.apply(this,arguments)}var Yo=function(e){return r.createElement("svg",Ko({viewBox:"0 0 16 16",className:"turn_svg__loop",style:{width:16,height:16,display:"block",fill:"currentcolor",flexShrink:0,backfaceVisibility:"hidden"}},e),Wo||(Wo=r.createElement("path",{d:"M5.804 3.123c.006.38.254.622.673.622h4.887c.59 0 .914.305.914.92v6.628l-.901-.978-.514-.514c-.267-.254-.629-.273-.895-.013-.254.26-.248.635.012.895l2.165 2.158c.476.47 1.022.47 1.498 0l2.165-2.158c.26-.26.266-.635.012-.895-.266-.26-.628-.241-.895.013l-.514.514-.895.971V4.564c0-1.358-.71-2.063-2.082-2.063H6.477c-.42 0-.68.241-.673.622ZM.186 7.06c.26.266.622.247.889-.013l.52-.508.889-.971v6.722c0 1.359.71 2.063 2.082 2.063h4.957c.42 0 .68-.241.673-.622-.006-.387-.254-.622-.673-.622h-4.88c-.591 0-.915-.311-.915-.927V5.554l.895.984.52.508c.26.26.629.28.89.013.26-.26.253-.629-.013-.89L3.855 4.013c-.476-.476-1.016-.476-1.492 0L.2 6.17c-.267.26-.273.628-.013.889Z"})))};function Xo(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var $o=["color"],Zo=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Xo(e,$o);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),qo=["color"],Go=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Xo(e,qo);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),Jo=["color"],Qo=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Xo(e,Jo);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M8.51194 3.00541C9.18829 2.54594 10.0435 2.53694 10.6788 2.95419C10.8231 3.04893 10.9771 3.1993 11.389 3.61119C11.8009 4.02307 11.9513 4.17714 12.046 4.32141C12.4633 4.95675 12.4543 5.81192 11.9948 6.48827C11.8899 6.64264 11.7276 6.80811 11.3006 7.23511L10.6819 7.85383C10.4867 8.04909 10.4867 8.36567 10.6819 8.56093C10.8772 8.7562 11.1938 8.7562 11.389 8.56093L12.0077 7.94221L12.0507 7.89929C12.4203 7.52976 12.6568 7.2933 12.822 7.0502C13.4972 6.05623 13.5321 4.76252 12.8819 3.77248C12.7233 3.53102 12.4922 3.30001 12.1408 2.94871L12.0961 2.90408L12.0515 2.85942C11.7002 2.508 11.4692 2.27689 11.2277 2.11832C10.2377 1.46813 8.94398 1.50299 7.95001 2.17822C7.70691 2.34336 7.47044 2.57991 7.1009 2.94955L7.058 2.99247L6.43928 3.61119C6.24401 3.80645 6.24401 4.12303 6.43928 4.31829C6.63454 4.51355 6.95112 4.51355 7.14638 4.31829L7.7651 3.69957C8.1921 3.27257 8.35757 3.11027 8.51194 3.00541ZM4.31796 7.14672C4.51322 6.95146 4.51322 6.63487 4.31796 6.43961C4.12269 6.24435 3.80611 6.24435 3.61085 6.43961L2.99213 7.05833L2.94922 7.10124C2.57957 7.47077 2.34303 7.70724 2.17788 7.95035C1.50265 8.94432 1.4678 10.238 2.11799 11.2281C2.27656 11.4695 2.50766 11.7005 2.8591 12.0518L2.90374 12.0965L2.94837 12.1411C3.29967 12.4925 3.53068 12.7237 3.77214 12.8822C4.76219 13.5324 6.05589 13.4976 7.04986 12.8223C7.29296 12.6572 7.52943 12.4206 7.89896 12.051L7.89897 12.051L7.94188 12.0081L8.5606 11.3894C8.75586 11.1941 8.75586 10.8775 8.5606 10.6823C8.36533 10.487 8.04875 10.487 7.85349 10.6823L7.23477 11.301C6.80777 11.728 6.6423 11.8903 6.48794 11.9951C5.81158 12.4546 4.95642 12.4636 4.32107 12.0464C4.17681 11.9516 4.02274 11.8012 3.61085 11.3894C3.19896 10.9775 3.0486 10.8234 2.95385 10.6791C2.53661 10.0438 2.54561 9.18863 3.00507 8.51227C3.10993 8.35791 3.27224 8.19244 3.69924 7.76544L4.31796 7.14672ZM9.62172 6.08558C9.81698 5.89032 9.81698 5.57373 9.62172 5.37847C9.42646 5.18321 9.10988 5.18321 8.91461 5.37847L5.37908 8.91401C5.18382 9.10927 5.18382 9.42585 5.37908 9.62111C5.57434 9.81637 5.89092 9.81637 6.08619 9.62111L9.62172 6.08558Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),ei=["color"],ti=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Xo(e,ei);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),ni=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}},ri={"text/plain":"Text","text/html":"Url",default:"Text"};var oi=function(e,t){var n,r,o,i,a,l,c=!1;t||(t={}),n=t.debug||!1;try{if(o=ni(),i=document.createRange(),a=document.getSelection(),(l=document.createElement("span")).textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=ri[t.format]||ri.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),i.selectNodeContents(l),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),l&&document.body.removeChild(l),o()}return c};function ii(e){if(!e)return;const t=Object.keys(e);return 1===t.length?t[0]:t.find((t=>e[t].asRoot))}function ai(e){if(!e)return;const t=ii(e);return t?e[t]:void 0}const li=i(void 0),ci=({children:r,tools:o})=>{const i=V(),a=d((()=>o?Object.keys(o).reduce(((e,t)=>{var n;return Object.assign(Object.assign({},e),{[t]:null===(n=o[t])||void 0===n?void 0:n.render})}),{}):{}),[o]),l=d((()=>!o||i?null:Object.keys(o).map((t=>{var n,r,i;const a=null===(n=null==o?void 0:o[t])||void 0===n?void 0:n.tool,l=null===(r=null==o?void 0:o[t])||void 0===r?void 0:r.render,c=null===(i=null==o?void 0:o[t])||void 0===i?void 0:i.props;return a?e(a,Object.assign({render:l},c),t):null}))),[d]);return e(li.Provider,Object.assign({value:a},{children:t(n,{children:[l,r]})}))},si=()=>{const e=a(li);if(void 0===e)throw new Error("useYooptaTools must be used within a ToolsProvider");return e},di=({children:t})=>e("div",Object.assign({className:"flex flex-col"},{children:t})),ui=({children:t})=>e("div",Object.assign({onClick:e=>e.stopPropagation(),className:"bg-[#FFF] relative min-w-[200px] w-auto overflow-hidden rounded-md border bg-popover py-[6px] px-0 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"},{children:t})),fi=({children:t})=>e("div",Object.assign({className:"relative flex cursor-default select-none items-center text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50"},{children:t})),pi=({isOpen:n,onClose:r,refs:o,style:i,children:a})=>{var l,c;const s=z(),d=si(),[u,p]=f(!1),{refs:h,floatingStyles:g,context:v}=zo({placement:"right",open:u,onOpenChange:p,middleware:[Hr(),Ur(),Fr(),Er(10)],whileElementsMounted:zr}),{isMounted:m,styles:b}=Vo(v,{duration:100});if(!n)return null;const y=M(s,{at:s.selection}),w=ai(s.blocks[(null==y?void 0:y.type)||""].elements),x="void"===(null===(l=null==w?void 0:w.props)||void 0===l?void 0:l.nodeType),k=d.ActionMenu,E=Object.assign(Object.assign({},g),b);return e(Mo,Object.assign({root:document.getElementById("yoopta-editor")},{children:e(Po,Object.assign({lockScroll:!0,className:"z-[100]",onClick:r},{children:e("div",Object.assign({style:i,ref:o.setFloating},{children:t(ui,{children:[t(di,{children:[e(fi,{children:t("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:()=>{const e=s.selection;s.deleteBlock({at:e}),s.setBlockSelected(null),s.setSelection(null),r()}},{children:[e(ti,{className:"w-4 h-4 mr-2"}),"Delete"]}))}),e(fi,{children:t("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:()=>{s.duplicateBlock({at:s.selection,focus:!0}),s.setBlockSelected(null),r()}},{children:[e(Zo,{className:"w-4 h-4 mr-2"}),"Duplicate"]}))}),!x&&!(null===(c=s.blocks[(null==y?void 0:y.type)||""])||void 0===c?void 0:c.hasCustomEditor)&&t(fi,{children:[m&&!!k&&e(Mo,Object.assign({root:document.getElementById("yoopta-editor")},{children:e(Po,Object.assign({lockScroll:!0,className:"z-[100]",onClick:()=>p(!1)},{children:e("div",Object.assign({style:E,ref:h.setFloating},{children:e(k,{actions:Object.keys(s.blocks),editor:s,selectedAction:"",onClose:()=>{p(!1),r()},empty:!1,onMouseEnter:()=>{},mode:"toggle"})}))}))})),t("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",ref:h.setReference,onClick:()=>p((e=>!e))},{children:[e(Yo,{className:"w-4 h-4 mr-2"}),"Turn into"]}))]}),e(fi,{children:t("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:()=>{const e=M(s);e&&(oi(`${window.location.origin}${window.location.pathname}#${e.id}`),s.emit("block:copy",e)),r()}},{children:[e(Qo,{className:"w-4 h-4 mr-2"}),"Copy link to block"]}))})]}),a]})}))}))}))};var hi=Object.freeze({__proto__:null,BlockOptions:pi,BlockOptionsMenuContent:ui,BlockOptionsMenuGroup:di,BlockOptionsMenuItem:fi,BlockOptionsSeparator:({className:t})=>e("div",{className:`h-[1px] bg-[#37352f14] my-[4px] w-full ${t}`})});function gi(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var vi={actions:"vuZgncnq",hovered:"_8Eqjiv7m",actionButton:"WabGEp54",plusButton:"_0C8RpLmz"};function mi(...e){return e.filter(Boolean).join(" ")}gi(".vuZgncnq{display:flex;left:-50px;opacity:0;position:absolute;top:2px;transition:opacity .18s ease-in}._8Eqjiv7m{opacity:1}.WabGEp54{all:unset;align-items:center;background-color:inherit;background-color:transparent;border-radius:6px;color:rgba(55,53,47,.35);cursor:pointer;display:flex;height:24px;justify-content:center;margin:0 1px;padding:0;position:relative;transition:background-color .18s cubic-bezier(.4,0,.2,1);width:auto;width:18px}.WabGEp54:active,.WabGEp54:focus,.WabGEp54:hover{background-color:rgba(55,54,47,.08)}._0C8RpLmz{width:24px}");const bi=({block:n,editor:r,dragHandleProps:o,showActions:i,onChangeActiveBlock:a})=>{const[l,c]=f(!1),{refs:s,floatingStyles:d,context:u}=zo({placement:"right-start",open:l,onOpenChange:c,middleware:[Hr(),Ur(),Fr(),Er()]}),{isMounted:p,styles:h}=Vo(u,{duration:100}),{setActivatorNodeRef:g,attributes:v,listeners:m}=o,b=Object.assign(Object.assign({},d),h);return t("div",Object.assign({contentEditable:!1,className:mi(vi.actions,i&&vi.hovered,"yoopta-element-actions")},{children:[e("button",Object.assign({type:"button",onClick:()=>{const e=ee({id:J()}),t=[n.meta.order+1];r.setSelection([n.meta.order]),r.insertBlock(e,{at:t,focus:!0})},className:mi(vi.actionButton,vi.plusButton,"yoopta-element-actions-plus")},{children:e(Nn,{})})),e("button",Object.assign({type:"button",className:mi(vi.actionButton,"yoopta-element-actions-drag"),ref:e=>{g(e),s.setReference(e)}},v,m,{onClick:e=>{e.stopPropagation(),a(n.id);const t=In(r,{at:[n.meta.order]});r.focusBlock(n.id),t&&setTimeout((()=>{r.blocks[n.type].hasCustomEditor||(x.blur(t),x.deselect(t),R.deselect(t)),r.setBlockSelected([n.meta.order],{only:!0}),r.setSelection([n.meta.order]),c(!0)}),10)}},{children:e(Ln,{})})),e(pi,{isOpen:p,refs:s,style:b,onClose:()=>c(!1)})]}))},yi=({children:n,block:r,blockId:o})=>{var i;const a=z(),[l,c]=f(null),{attributes:s,listeners:d,setNodeRef:u,setActivatorNodeRef:p,transform:h,transition:g,isOver:v,isDragging:m}=Sn({id:o,disabled:a.readOnly}),b={transform:h?`translate3d(${h.x}px, ${h.y}px, 0)`:"none",transition:g,opacity:m?.7:1,marginLeft:20*r.meta.depth+"px"},y=null===(i=a.selectedBlocks)||void 0===i?void 0:i.includes(r.meta.order),w=l===o,x={borderBottom:v&&!m?"2px solid #007aff":"none"};return t("div",Object.assign({className:"relative py-0 px-[2px] mt-[2px] mb-[1px] rounded yoopta-block-wrapper",onMouseEnter:()=>{a.readOnly||c(o)},onMouseLeave:()=>{a.readOnly||c(null)},"data-yoopta-block-id":o,style:b,"data-yoopta-block":!0,ref:u},{children:[!a.readOnly&&e(bi,{block:r,editor:a,dragHandleProps:{setActivatorNodeRef:p,attributes:s,listeners:d},showActions:w,onChangeActiveBlock:e=>c(e)}),e("div",Object.assign({className:vi.content,style:x},{children:n})),y&&!a.readOnly&&e("div",{className:"absolute left-0 top-0 bg-[#2383e224] z-[90] rounded opacity-100 h-full w-full pointer-events-none yoopta-selection-block"})]}))};function wi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var xi={};Object.defineProperty(xi,"__esModule",{value:!0});for(var ki="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Ei={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Ci={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:ki?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Oi={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},Si=1;Si<20;Si++)Oi["f"+Si]=111+Si;function _i(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return Di(e,t)})),o=function(e){return r.some((function(t){return Ri(t,e)}))};return null==n?o:o(n)}function Di(e,t){var n=t&&t.byKey,r={},o=(e=e.replace("++","+add")).split("+"),i=o.length;for(var a in Ei)r[Ei[a]]=!1;var l=!0,c=!1,s=void 0;try{for(var d,u=o[Symbol.iterator]();!(l=(d=u.next()).done);l=!0){var f=d.value,p=f.endsWith("?")&&f.length>1;p&&(f=f.slice(0,-1));var h=Bi(f),g=Ei[h];if(f.length>1&&!g&&!Ci[f]&&!Oi[h])throw new TypeError('Unknown modifier: "'+f+'"');1!==i&&g||(n?r.key=h:r.which=ji(f)),g&&(r[g]=!p||null)}}catch(e){c=!0,s=e}finally{try{!l&&u.return&&u.return()}finally{if(c)throw s}}return r}function Ri(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function ji(e){return e=Bi(e),Oi[e]||e.toUpperCase().charCodeAt(0)}function Bi(e){return e=e.toLowerCase(),e=Ci[e]||e}xi.default=_i,xi.isHotkey=_i,xi.isCodeHotkey=function(e,t){return _i(e,t)};var Ai=xi.isKeyHotkey=function(e,t){return _i(e,{byKey:!0},t)};xi.parseHotkey=Di,xi.compareHotkey=Ri,xi.toKeyCode=ji,xi.toKeyName=Bi;const Ti={bold:"mod+b",italic:"mod+i",compose:["down","left","right","up","backspace","enter"],arrowLeft:"left",arrowUp:"up",arrowDown:"down",arrowRight:"right",ctrlLeft:"ctrl+left",escape:"esc",ctrlRight:"ctrl+right",deleteBackward:"shift?+backspace",backspace:"backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",shiftEnter:"shift+enter",enter:"enter",space:"space",undo:"mod+z",select:"mod+a",shiftTab:"shift+tab",shiftArrowUp:"shift+up",shiftArrowDown:"shift+down",tab:"tab",cmd:"mod",cmdEnter:"mod+enter",slashCommand:"/",kekCeburek:"mod+enter"},Li={moveLineBackward:"opt+up",moveLineForward:"opt+down",ctrlLeft:"opt+left",ctrlRight:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},Mi={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ni=e=>{const t=Ti[e],n=Li[e],r=Mi[e],o=t&&Ai(t),i=n&&Ai(n),a=r&&Ai(r);return e=>!(!o||!o(e))||(!(!i||!i(e))||!(!a||!a(e)))},Ii={isBold:Ni("bold"),isCompose:Ni("compose"),isArrowLeft:Ni("arrowLeft"),isArrowRight:Ni("arrowRight"),isArrowUp:Ni("arrowUp"),isArrowDown:Ni("arrowDown"),isDeleteBackward:Ni("deleteBackward"),isDeleteForward:Ni("deleteForward"),isDeleteLineBackward:Ni("deleteLineBackward"),isDeleteLineForward:Ni("deleteLineForward"),isDeleteWordBackward:Ni("deleteWordBackward"),isDeleteWordForward:Ni("deleteWordForward"),isExtendBackward:Ni("extendBackward"),isExtendForward:Ni("extendForward"),isExtendLineBackward:Ni("extendLineBackward"),isExtendLineForward:Ni("extendLineForward"),isItalic:Ni("italic"),isMoveLineBackward:Ni("moveLineBackward"),isMoveLineForward:Ni("moveLineForward"),isCtrlLeft:Ni("ctrlLeft"),isCtrlRight:Ni("ctrlRight"),isRedo:Ni("redo"),isShiftEnter:Ni("shiftEnter"),isEnter:Ni("enter"),isTransposeCharacter:Ni("transposeCharacter"),isUndo:Ni("undo"),isSpace:Ni("space"),isSelect:Ni("select"),isTab:Ni("tab"),isShiftTab:Ni("shiftTab"),isBackspace:Ni("backspace"),isCmdEnter:Ni("cmdEnter"),isCmd:Ni("cmd"),isEscape:Ni("escape"),isSlashCommand:Ni("slashCommand"),isShiftArrowUp:Ni("shiftArrowUp"),isShiftArrowDown:Ni("shiftArrowDown"),isKekceburek:Ni("kekCeburek")};const Pi={onKeyDown:function(e){return t=>{const n=In(e,{at:e.selection});if(!n||!n.selection)return;const r=S.parent(n.selection.anchor.path);if(Ii.isShiftEnter(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void n.insertText("\n")}if(Ii.isEnter(t)){if(t.isDefaultPrevented())return;t.preventDefault();const o=_.isStart(n,n.selection.anchor,r),i=_.isEnd(n,n.selection.anchor,r);if(!o&&!i)return void e.splitBlock({slate:n,focus:!0});const a=ee({id:J()}),l=e.selection?[e.selection[0]+1]:[0];e.insertBlock(a,{at:l,slate:n,focus:!0})}else if(Ii.isBackspace(t)){if(t.isDefaultPrevented())return;const r=M(e,{at:e.selection}),o=e.blocks[(null==r?void 0:r.type)||""],i=S.parent(n.selection.anchor.path);if(_.isStart(n,n.selection.anchor,i)){t.preventDefault();const r=_.string(n,i),a=e.selection?e.selection[0]-1:0,l=In(e,{at:[a]});let c;if(l&&!o.hasCustomEditor&&(c=function(e,t){const[,n]=_.last(e,t);return{path:n,offset:_.string(e,n).length}}(l,i)),0===r.trim().length)return e.deleteBlock({at:e.selection,focus:!0,focusAt:c});{if(j.isExpanded(n.selection))return R.delete(n,{at:n.selection});if(!l)return;if(0===_.string(l,[0,0]).length)return e.deleteBlock({at:[a],focus:!0,focusAt:c});const t=Array.from(_.nodes(n,{at:[0],match:e=>!_.isEditor(e)&&(B.isText(e)||_.isInline(n,e)),mode:"highest"})).map((([e])=>e));return R.insertNodes(l,t,{at:_.end(l,[])}),e.deleteBlock({at:e.selection,focus:!0,focusAt:c})}}}else{if(Ii.isSelect(t)){if(t.isDefaultPrevented())return;const[,r]=_.first(n,[0]),[,o]=_.last(n,[n.children.length-1]),i=_.range(n,r,o),a=j.equals(n.selection,i);if(j.isExpanded(n.selection)&&a)return t.preventDefault(),x.blur(n),x.deselect(n),R.deselect(n),void e.setBlockSelected([],{allSelected:!0})}if(Ii.isShiftTab(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void e.decreaseBlockDepth()}if(Ii.isTab(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void e.increaseBlockDepth()}if(Ii.isArrowUp(t)){if(t.isDefaultPrevented())return;const r=S.parent(n.selection.anchor.path);if(_.isStart(n,n.selection.anchor,r)){const n=e.selection?[e.selection[0]-1]:null,r=In(e,{at:n}),o=M(e,{at:n});if(r&&o){const[,n]=_.last(r,[0]),i={path:n,offset:_.string(r,n).length};return t.preventDefault(),void e.focusBlock(o.id,{focusAt:i,waitExecution:!1,shouldUpdateBlockSelection:!0})}}}if(Ii.isArrowDown(t)){const r=S.parent(n.selection.anchor.path);if(_.isEnd(n,n.selection.anchor,r)){const n=e.selection?[e.selection[0]+1]:null,o=In(e,{at:n}),i=M(e,{at:n});if(o&&i){const n=function(e,t){const[,n]=_.first(e,t);return{path:n,offset:0}}(o,r);return t.preventDefault(),void e.focusBlock(i.id,{focusAt:n,waitExecution:!1})}}}if(j.isExpanded(n.selection)){if(Object.values(e.formats).length>0)for(const n of Object.values(e.formats))if(n.hotkey&&Ai(n.hotkey)(t)){t.preventDefault(),e.formats[n.type].toggle();break}}}}}},zi=({children:t,attributes:n,placeholder:r})=>{const o=k(),i=Object.assign({},n);return o&&r&&(i["data-placeholder"]=r,i.className="yoopta-placeholder"),e("span",Object.assign({},i,{children:t}))};function Fi(e){try{return new URL(e),!0}catch(e){return!1}}const Ui=(e,t)=>{(e=>{const[t]=_.nodes(e,{match:e=>!_.isEditor(e)&&D.isElement(e)&&"link"===e.type});return!!t})(e)&&(e=>{R.unwrapNodes(e,{match:e=>!_.isEditor(e)&&D.isElement(e)&&"link"===e.type})})(e);const{selection:n}=e,r=n&&j.isCollapsed(n),o={type:"link",children:r?[{text:t}]:[],props:{url:t,target:"_blank",rel:"noreferrer"}};r?R.insertNodes(e,o):(R.wrapNodes(e,o,{split:!0}),R.collapse(e,{edge:"end"}))},Hi=({id:t,customEditor:r,elements:o,marks:i,events:a,options:c,placeholder:s="Type '/' for commands"})=>{const u=z(),f=F(t),p=l(f.value).current,h=f.type,g=d((()=>(e=>{const t={};return Object.keys(e).forEach((n=>t[n]=e[n].render)),t})(o)),[o]),v=d((()=>(e=>{const t={};return e?(e.forEach((e=>t[e.type]=e)),t):t})(i)),[i]),m=d((()=>{let e=u.blockEditorsMap[t];return Object.keys(o).forEach((t=>{var n;const r=null===(n=o[t].props)||void 0===n?void 0:n.nodeType,i="inline"===r,a="void"===r,l="inlineVoid"===r;l&&(e.markableVoid=e=>e.type===t),(a||l)&&(e.isVoid=e=>e.type===t),(i||l)&&(e.isInline=e=>e.type===t,e=(e=>{const{insertData:t,insertText:n}=e;return e.insertText=t=>{t&&Fi(t)?Ui(e,t):n(t)},e.insertData=n=>{const r=n.getData("text/plain");r&&Fi(r)?Ui(e,r):t(n)},e})(e))})),e}),[]),b=d((()=>{if(!a||u.readOnly)return{};const e={hotkeys:Ii,currentBlock:f,defaultBlock:ee({id:J()})},t={};return Object.keys(a).forEach((n=>{t[n]=function(t){if(a[n]){a[n](u,m,e)(t)}}})),t}),[a,u,f]);return e("div",Object.assign({"data-plugin-id":t,"data-plugin-type":h},{children:e(Vi,{id:t,slate:m,initialValue:p,onChange:e=>u.updateBlock(t,{value:e}),decorate:e=>{var t;const n=[];if(u.readOnly)return n;const[r,o]=e,i=(null===(t=u.selection)||void 0===t?void 0:t[0])===f.meta.order;return m.selection&&i&&!_.isEditor(r)&&""===_.string(m,[o[0]])&&j.includes(m.selection,o)&&j.isCollapsed(m.selection)&&n.push(Object.assign(Object.assign({},m.selection),{withPlaceholder:!0})),n},renderLeaf:t=>{var n,r,o,i,a;let{children:l,leaf:c,attributes:d}=t;const p=wi(c,["text"]),h=(null===(n=u.selection)||void 0===n?void 0:n[0])===f.meta.order;p&&Object.keys(p).forEach((e=>{const t=v[e];t&&(l=t.render({children:l,leaf:c}))}));const g=!("void"===(null===(a=null===(i=null===(o=null===(r=t.children)||void 0===r?void 0:r.props)||void 0===o?void 0:o.parent)||void 0===i?void 0:i.props)||void 0===a?void 0:a.nodeType))&&h&&c.withPlaceholder;return e(zi,Object.assign({attributes:d,placeholder:g?s:void 0},{children:l}))},renderElement:r=>{const o=g[r.element.type];return o?e(o,Object.assign({},r,{blockId:t,options:c})):e(n,{})},eventHandlers:b,onKeyDown:e=>{var t;u.readOnly||(null===(t=b.onKeyDown)||void 0===t||t.call(b,e),Pi.onKeyDown(u)(e))},onKeyUp:e=>{var t;u.readOnly||null===(t=null==b?void 0:b.onKeyUp)||void 0===t||t.call(b,e)},onFocus:e=>{var t;u.readOnly||null===(t=null==b?void 0:b.onFocus)||void 0===t||t.call(b,e)},onClick:e=>{var t,n;u.readOnly||((null===(t=u.selection)||void 0===t?void 0:t[0])!==f.meta.order&&u.setSelection([f.meta.order]),null===(n=null==b?void 0:b.onClick)||void 0===n||n.call(b,e))},onBlur:e=>{var t;u.readOnly||(e.preventDefault(),null===(t=null==b?void 0:b.onBlur)||void 0===t||t.call(b,e))},customEditor:r,readOnly:u.readOnly})}))},Vi=p((({id:t,slate:n,initialValue:r,onChange:o,renderLeaf:i,renderElement:a,eventHandlers:l,onKeyDown:c,onKeyUp:s,onFocus:d,onClick:u,onBlur:f,customEditor:p,decorate:h,readOnly:g})=>"function"==typeof p?(console.log("customEditor",p),p({blockId:t})):e(E,Object.assign({editor:n,initialValue:r,onChange:o},{children:e(C,Object.assign({renderElement:a,renderLeaf:i,className:"focus-visible:outline-none focus:outline-none",spellCheck:!0},l,{onKeyDown:c,onKeyUp:s,onFocus:d,onClick:u,decorate:h,onBlur:f,readOnly:g,onPaste:e=>{const t=e.clipboardData.getData("text/html"),n=(new DOMParser).parseFromString(t,"text/html");if(n.body.childNodes.length>0){e.preventDefault();const t={H1:"HeadingOne",H2:"HeadingTwo",H3:"HeadingThree",P:"Paragraph",OL:"NumberedList",UL:"BulletedList",BLOCKQUOTE:"Blockquote"},r=Array.from(n.body.childNodes).map(((e,n)=>{if(t[e.nodeName]){const r=t[e.nodeName];return ee({id:J(),type:r,value:[],meta:{order:n,depth:0}})}})).filter(Boolean);console.log("nodes",r),console.log("parsetHTML.body",n.body)}}}),`editable-${t}`)}),`slate-${t}`)));Vi.displayName="SlateEditorInstance";const Wi=({editor:e})=>({sensors:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return d((()=>[...t].filter((e=>null!=e))),[...t])}(Le(Ot,{activationConstraint:{delay:100,tolerance:0}}),Le(wt,{coordinateGetter:Rn})),handleDragEnd:u((t=>{const{active:n,over:r}=t;if(n&&r&&n.id!==r.id){const t=e.children[r.id].meta.order;e.moveBlock(n.id,[t])}}),[]),handleDragStart:u((t=>{e.setBlockSelected(null)}),[])}),Ki=[],Yi=({editor:t,marks:r,placeholder:o})=>{const i=V(),{sensors:a,handleDragEnd:l,handleDragStart:c}=Wi({editor:t}),s=Object.keys(t.children),u=d((()=>0===s.length?Ki:s.sort(((e,n)=>t.children[e].meta.order-t.children[n].meta.order))),[s]),f=[];for(let n=0;n<u.length;n++){const i=u[n],a=t.children[i],l=t.plugins[a.type];a&&l?f.push(e(yi,Object.assign({block:a,blockId:i},{children:e(Hi,{type:a.type,id:i,marks:r,customEditor:l.customEditor,events:l.events,elements:l.elements,options:l.options,placeholder:o},i)}),i)):console.error(`Plugin ${a.type} not found`)}return i?e(n,{children:f}):e(rn,Object.assign({sensors:a,collisionDetection:He,onDragStart:c,onDragEnd:l},{children:e(yn,Object.assign({disabled:i,items:u,strategy:vn},{children:f}))}))},Xi=({editor:e,yooptaEditorRef:t,root:n})=>{const[r,o]=f({origin:[0,0],coords:[0,0],selection:!1}),i=n=>{var i;if(e.readOnly)return;const a=null===(i=t.current)||void 0===i?void 0:i.contains(n.target);if(!a&&!r.selection&&Array.isArray(e.selectedBlocks)&&e.selectedBlocks.length>0)return e.setBlockSelected(null),c();a||o({origin:[n.pageX,n.pageY-window.pageYOffset],coords:[n.pageX,n.pageY-window.pageYOffset],selection:!0})},a=t=>{if(!r.selection||e.readOnly)return;o((e=>Object.assign(Object.assign({},e),{coords:[t.pageX,t.pageY-window.pageYOffset]})));const n=((e,t)=>{const n=[];return document.querySelectorAll("[data-yoopta-block]").forEach(((r,o)=>{if(!r)return;const i=r.getBoundingClientRect(),a=Math.min(e[1],t[1]),l=Math.min(e[0],t[0]),c=Math.max(e[1],t[1]),s=Math.max(e[0],t[0]);a<i.bottom&&c>i.top&&l<i.right&&s>i.left&&n.push(o)})),n})(r.origin,[t.pageX,t.pageY-window.pageYOffset]);e.setBlockSelected(n,{only:!0})},l=()=>{e.readOnly||c()};s((()=>{var r;if(e.readOnly)return;const o=n&&"current"in n?n.current:n||document;if(!o)throw new Error("Root element not found. Please check the `selectionBoxRoot` prop");if(!("nodeType"in o))throw new Error("Root element should be a DOM element or a ref object. Please check the `selectionBoxRoot` prop");if(null===(r=t.current)||void 0===r?void 0:r.contains(o))throw new Error("Root element should not be a child of the editor. Please check the `selectionBoxRoot` prop");return o.addEventListener("mousedown",i),o.addEventListener("mousemove",a),o.addEventListener("mouseup",l),()=>{o.removeEventListener("mousedown",i),o.removeEventListener("mousemove",a),o.removeEventListener("mouseup",l)}}),[e.selectedBlocks,r,n,e.readOnly]);const c=()=>{o({origin:[0,0],coords:[0,0],selection:!1})};return Object.assign(Object.assign({},r),{onClose:c})},$i=({origin:t,coords:n,isOpen:r})=>{if(!r)return null;const o={zIndex:10,left:t[0],top:t[1],height:Math.abs(n[1]-t[1]-1),width:Math.abs(n[0]-t[0]-1),userSelect:"none",transformOrigin:"top left",transform:t[1]>n[1]&&t[0]>n[0]?"scaleY(-1) scaleX(-1)":t[1]>n[1]?"scaleY(-1)":t[0]>n[0]?"scaleX(-1)":void 0,position:"fixed",backgroundColor:"rgba(35, 131, 226, 0.14)"};return e("div",{style:o})},Zi={selectionStarted:!1,indexToSelect:null,startedIndexToSelect:null},qi=({placeholder:n,marks:r,className:o,autoFocus:i=!0,selectionBoxRoot:a})=>{const c=z(),d=V(),u=l(null),f=Xi({editor:c,yooptaEditorRef:u,root:a});let p=l(Zi).current;s((()=>{if(!i||d)return;const e=M(c,{at:[0]});e&&c.focusBlock(e.id,{waitExecution:!0})}),[i,d]),s((()=>{if(!d)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)}),[c.selectedBlocks,d]);const h=()=>{d||Array.isArray(c.selectedBlocks)&&c.selectedBlocks.length>0&&c.setBlockSelected(null)},g=()=>{p.indexToSelect=null,p.startedIndexToSelect=null,p.selectionStarted=!1},v=e=>{var t,n,r,o,i;if(!d){if(Ii.isSelect(e)){if((null===(t=c.selectedBlocks)||void 0===t?void 0:t.length)===Object.keys(c.children).length)return void e.preventDefault();if(p.selectionStarted)return e.preventDefault(),void c.setBlockSelected([],{allSelected:!0})}if(Ii.isBackspace(e)){e.stopPropagation();if(Array.isArray(c.selectedBlocks)&&(null===(n=c.selectedBlocks)||void 0===n?void 0:n.length)===Object.keys(c.children).length)return e.preventDefault(),c.deleteBlock({deleteAll:!0}),c.setBlockSelected(null),void g();if(Array.isArray(c.selectedBlocks)&&(null===(r=c.selectedBlocks)||void 0===r?void 0:r.length)>0)return e.preventDefault(),c.deleteBlock({fromPaths:c.selectedBlocks}),c.setBlockSelected(null),void g()}if(Ii.isShiftArrowUp(e)){if("function"==typeof e.isDefaultPrevented&&e.isDefaultPrevented())return;if(p.selectionStarted&&null!==p.startedIndexToSelect&&null!==p.indexToSelect){const e=p.indexToSelect,t=e-1;if(0===e)return;if(e===p.startedIndexToSelect)return c.setBlockSelected([t]),void(p.indexToSelect=t);if(t<p.startedIndexToSelect)return c.setBlockSelected([t]),void(p.indexToSelect=t);if((null===(o=c.selectedBlocks)||void 0===o?void 0:o.includes(e))&&e!==p.startedIndexToSelect){const n=c.selectedBlocks.filter((t=>t!==e));return c.setBlockSelected(n,{only:!0}),void(p.indexToSelect=t)}return}const t=M(c),n=In(c);if(!n||!n.selection||!t)return;const r=S.parent(n.selection.anchor.path),i=_.isStart(n,n.selection.focus,r);if(j.isExpanded(n.selection)&&i){const r=c.selection?[c.selection[0]-1]:[0],o=M(c,{at:r});t&&o&&(e.preventDefault(),x.blur(n),x.deselect(n),R.deselect(n),c.setSelection(null),c.setBlockSelected([null==t?void 0:t.meta.order,(null==t?void 0:t.meta.order)-1]),p.startedIndexToSelect=t.meta.order,p.indexToSelect=t.meta.order-1,p.selectionStarted=!0)}}if(Ii.isShiftArrowDown(e)){if(p.selectionStarted&&null!==p.indexToSelect&&null!==p.startedIndexToSelect){const e=p.indexToSelect,t=e+1;if(t===Object.keys(c.children).length)return;if(e===p.startedIndexToSelect)return c.setBlockSelected([t]),void(p.indexToSelect=t);if(t>p.startedIndexToSelect)return c.setBlockSelected([t]),void(p.indexToSelect=t);if((null===(i=c.selectedBlocks)||void 0===i?void 0:i.includes(e))&&e!==p.startedIndexToSelect){const n=c.selectedBlocks.filter((t=>t!==e));return c.setBlockSelected(n,{only:!0}),void(p.indexToSelect=t)}return}const t=M(c),n=In(c);if(!n||!n.selection||!t)return;const r=S.parent(n.selection.anchor.path),o=_.isEnd(n,n.selection.focus,r);if(j.isExpanded(n.selection)&&o){const r=c.selection?[c.selection[0]+1]:[0],o=M(c,{at:r});t&&o&&(e.preventDefault(),x.blur(n),x.deselect(n),R.deselect(n),c.setSelection(null),c.setBlockSelected([null==t?void 0:t.meta.order,(null==t?void 0:t.meta.order)+1]),p.startedIndexToSelect=t.meta.order,p.indexToSelect=t.meta.order+1,p.selectionStarted=!0)}}}},m=(b={userSelect:f.selection?"none":"auto",pointerEvents:f.selection?"none":"auto"},Object.assign({paddingBottom:150},b));var b;return t("div",Object.assign({id:"yoopta-editor",className:o,style:m,ref:u,onClick:e=>{d||(g(),(e=>{var t;const n=u.current;if(!n)return;const{bottom:r}=n.getBoundingClientRect(),o=r-parseInt(getComputedStyle(n).paddingBottom,10),i=ee({id:J()});if(e.clientY>=o){const e=Object.keys(c.children).length-1,n=M(c,{at:[e]}),r=In(c,{at:[e]});if(n&&r&&r.selection){const e=_.string(r,r.selection.anchor.path),o=S.parent(r.selection.anchor.path),[a]=_.node(r,o);if(n.type===i.type&&D.isElement(a)&&"void"!==(null===(t=a.props)||void 0===t?void 0:t.nodeType)&&0===e.trim().length)return void c.focusBlock(n.id,{slate:r})}const o=e+1;c.insertBlock(i,{at:[o],focus:!0})}})(e),h())},onBlur:e=>{var t;(null===(t=u.current)||void 0===t?void 0:t.contains(e.relatedTarget))||d||(g(),h())}},{children:[e(Yi,{editor:c,marks:r,placeholder:n}),e($i,{origin:f.origin,coords:f.coords,isOpen:f.selection&&!d})]}))},Gi=({children:e,fallback:t=null})=>{const[n,r]=f(!1);return s((()=>r(!0)),[]),n?e:t};var Ji=Symbol.for("immer-nothing"),Qi=Symbol.for("immer-draftable"),ea=Symbol.for("immer-state");function ta(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var na=Object.getPrototypeOf;function ra(e){return!!e&&!!e[ea]}function oa(e){return!!e&&(aa(e)||Array.isArray(e)||!!e[Qi]||!!e.constructor?.[Qi]||ua(e)||fa(e))}var ia=Object.prototype.constructor.toString();function aa(e){if(!e||"object"!=typeof e)return!1;const t=na(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===ia}function la(e,t){0===ca(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function ca(e){const t=e[ea];return t?t.type_:Array.isArray(e)?1:ua(e)?2:fa(e)?3:0}function sa(e,t){return 2===ca(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function da(e,t,n){const r=ca(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function ua(e){return e instanceof Map}function fa(e){return e instanceof Set}function pa(e){return e.copy_||e.base_}function ha(e,t){if(ua(e))return new Map(e);if(fa(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&aa(e)){if(!na(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const n=Object.getOwnPropertyDescriptors(e);delete n[ea];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],i=n[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(na(e),n)}function ga(e,t=!1){return ma(e)||ra(e)||!oa(e)||(ca(e)>1&&(e.set=e.add=e.clear=e.delete=va),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>ga(t,!0)))),e}function va(){ta(2)}function ma(e){return Object.isFrozen(e)}var ba,ya={};function wa(e){const t=ya[e];return t||ta(0),t}function xa(){return ba}function ka(e,t){t&&(wa("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ea(e){Ca(e),e.drafts_.forEach(Sa),e.drafts_=null}function Ca(e){e===ba&&(ba=e.parent_)}function Oa(e){return ba={drafts_:[],parent_:ba,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Sa(e){const t=e[ea];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function _a(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[ea].modified_&&(Ea(t),ta(4)),oa(e)&&(e=Da(t,e),t.parent_||ja(t,e)),t.patches_&&wa("Patches").generateReplacementPatches_(n[ea].base_,e,t.patches_,t.inversePatches_)):e=Da(t,n,[]),Ea(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ji?e:void 0}function Da(e,t,n){if(ma(t))return t;const r=t[ea];if(!r)return la(t,((o,i)=>Ra(e,r,t,o,i,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return ja(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,i=!1;3===r.type_&&(o=new Set(t),t.clear(),i=!0),la(o,((o,a)=>Ra(e,r,t,o,a,n,i))),ja(e,t,!1),n&&e.patches_&&wa("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Ra(e,t,n,r,o,i,a){if(ra(o)){const a=Da(e,o,i&&t&&3!==t.type_&&!sa(t.assigned_,r)?i.concat(r):void 0);if(da(n,r,a),!ra(a))return;e.canAutoFreeze_=!1}else a&&n.add(o);if(oa(o)&&!ma(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Da(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||ja(e,o)}}function ja(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ga(t,n)}var Ba={get(e,t){if(t===ea)return e;const n=pa(e);if(!sa(n,t))return function(e,t,n){const r=La(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!oa(r)?r:r===Ta(e.base_,t)?(Na(e),e.copy_[t]=Ia(r,e)):r},has:(e,t)=>t in pa(e),ownKeys:e=>Reflect.ownKeys(pa(e)),set(e,t,n){const r=La(pa(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Ta(pa(e),t),a=r?.[ea];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((o=n)===(i=r)?0!==o||1/o==1/i:o!=o&&i!=i)&&(void 0!==n||sa(e.base_,t)))return!0;Na(e),Ma(e)}var o,i;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Ta(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Na(e),Ma(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=pa(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){ta(11)},getPrototypeOf:e=>na(e.base_),setPrototypeOf(){ta(12)}},Aa={};function Ta(e,t){const n=e[ea];return(n?pa(n):e)[t]}function La(e,t){if(!(t in e))return;let n=na(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=na(n)}}function Ma(e){e.modified_||(e.modified_=!0,e.parent_&&Ma(e.parent_))}function Na(e){e.copy_||(e.copy_=ha(e.base_,e.scope_.immer_.useStrictShallowCopy_))}la(Ba,((e,t)=>{Aa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Aa.deleteProperty=function(e,t){return Aa.set.call(this,e,t,void 0)},Aa.set=function(e,t,n){return Ba.set.call(this,e[0],t,n,e[0])};function Ia(e,t){const n=ua(e)?wa("MapSet").proxyMap_(e,t):fa(e)?wa("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:xa(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=Ba;n&&(o=[r],i=Aa);const{revoke:a,proxy:l}=Proxy.revocable(o,i);return r.draft_=l,r.revoke_=a,l}(e,t);return(t?t.scope_:xa()).drafts_.push(n),n}function Pa(e){if(!oa(e)||ma(e))return e;const t=e[ea];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ha(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ha(e,!0);return la(n,((e,t)=>{da(n,e,Pa(t))})),t&&(t.finalized_=!1),n}var za=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&ta(6),void 0!==n&&"function"!=typeof n&&ta(7),oa(e)){const o=Oa(this),i=Ia(e,void 0);let a=!0;try{r=t(i),a=!1}finally{a?Ea(o):Ca(o)}return ka(o,n),_a(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Ji&&(r=void 0),this.autoFreeze_&&ga(r,!0),n){const t=[],o=[];wa("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}ta(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){oa(e)||ta(8),ra(e)&&(e=function(e){ra(e)||ta(10);return Pa(e)}(e));const t=Oa(this),n=Ia(e,void 0);return n[ea].isManual_=!0,Ca(t),n}finishDraft(e,t){const n=e&&e[ea];n&&n.isManual_||ta(9);const{scope_:r}=n;return ka(r,t),_a(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=wa("Patches").applyPatches_;return ra(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};za.produce,za.produceWithPatches.bind(za),za.setAutoFreeze.bind(za),za.setUseStrictShallowCopy.bind(za),za.applyPatches.bind(za);var Fa=za.createDraft.bind(za),Ua=za.finishDraft.bind(za);function Ha(e,t){const n=In(e);if(!n)return!1;const r=_.marks(n);return!!(null==r?void 0:r[t])}const Va=(e,t)=>{const{insertText:n}=t;return t.insertText=r=>{var o;const{selection:i}=t;if(" "===r&&i&&j.isCollapsed(i)){const{anchor:a}=i,l=_.above(t,{match:e=>D.isElement(e)&&_.isBlock(t,e),mode:"lowest"});if(!l)return;const[,c]=l,s=_.parent(t,c),[d]=s;if(D.isElement(d)&&!B.isText(d.children[0]))return n(r);const u=l?c:[],f={anchor:a,focus:_.start(t,u)},p=_.string(t,f),h=null===(o=e.shortcuts)||void 0===o?void 0:o[p];if(!!h&&!h.isActive())return R.select(t,f),R.delete(t),void h.create({deleteText:!1})}n(r)},t};function Wa(e,t,n){e.children=Fa(e.children);let r=!1;const o=e.children[t];if(!o)throw Error(`Block with id ${t} not found`);n.id&&(o.id=n.id,r=!0),n.type&&(o.type=n.type,r=!0),n.meta&&(o.meta=n.meta,r=!0),n.value&&(o.value=n.value),e.children=Ua(e.children),r&&e.applyChanges(),e.emit("change",e.children)}function Ka(e,t,n){e.children=Fa(e.children);const r=M(e,{at:e.selection});if(!r)throw new Error("Block from not found at current selection");const o=ii(e.blocks[r.type].elements);if(r.type===t)return void(e.children=Ua(e.children));const i=In(e,{at:[r.meta.order]});if(!i)throw new Error(`Slate not found for block in position ${r.meta.order}`);const a=ii(e.blocks[t].elements);_.withoutNormalizing(i,(()=>{const n=function(e,t={}){var n;const{at:r,elementType:o}=t,i=r||(null===(n=e.selection)||void 0===n?void 0:n.anchor.path);if(!i)return;let a=e=>!_.isEditor(e)&&D.isElement(e);o&&(a=e=>!_.isEditor(e)&&D.isElement(e)&&e.type===o);const l=S.parent(i),c=_.nodes(e,{at:l,match:a,mode:"lowest"});if(c){const[e]=c;return e}}(i,{elementType:o});console.log({fromBlockRootElementType:o,node:n}),R.setNodes(i,{type:a},{at:[0],mode:"lowest",match:e=>D.isElement(e)&&!_.isInline(i,e)});const l={id:r.id,type:t,meta:Object.assign(Object.assign({},r.meta),{order:r.meta.order}),value:i.children};e.blockEditorsMap[r.id]=i,e.children[r.id]=l,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children)}))}function Ya(e,t={}){const{at:n=e.selection,deleteAll:r=!1,fromPaths:o,focus:i}=t;if(console.log("BEFORE options.focusAt",t.focusAt),Array.isArray(o)&&o.length>0){e.children=Fa(e.children),o.forEach((t=>{const n=M(e,{at:[t]});n&&(delete e.children[n.id],delete e.blockEditorsMap[n.id])}));return Object.keys(e.children).forEach(((t,n)=>{e.children[t].meta.order=n})),e.children=Ua(e.children),e.applyChanges(),void e.emit("change",e.children)}if(r||1===Object.keys(e.children).length){e.children={},e.blockEditorsMap={};const t=ee({id:J()}),n=Va(e,O(A()));return e.children[t.id]=t,e.blockEditorsMap[t.id]=n,e.setSelection([0]),e.setBlockSelected(null),e.focusBlock(t.id,{slate:n,waitExecution:!0}),e.applyChanges(),void e.emit("change",e.children)}if(!n)return;e.children=Fa(e.children);const[a]=n,l=Object.keys(e.children),c=l.find((t=>e.children[t].meta.order===a));if(l.forEach((t=>{const n=e.children[t];n.meta.order>a&&(n.meta.order-=1)})),c&&(delete e.children[c],delete e.blockEditorsMap[c]),e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children),i){const n=e.selection?e.selection[0]-1:0,r=M(e,{at:[n]});r&&e.focusBlock(r.id,{focusAt:t.focusAt})}}function Xa(e,t){const n={};return t.forEach((t=>{const r=t.type;n[r]={hotkey:t.hotkey,type:r,getValue:()=>function(e,t){const n=In(e);if(!n)return null;const r=_.marks(n);return null==r?void 0:r[t]}(e,r),isActive:()=>Ha(e,r),toggle:()=>function(e,t){const n=In(e),r=Ha(e,t);n&&(r?_.removeMark(n,t):_.addMark(n,t,!0),e.applyChanges(),e.emit("change",e.children))}(e,r),update:t=>function(e,t,n){const r=In(e);r&&r.selection&&j.isExpanded(r.selection)&&(_.addMark(r,t,n),e.applyChanges(),e.emit("change",e.children))}(e,r,t)}})),n}function $a(e,t){const n={};return t.forEach(((t,r)=>{var o;const i=ai(t.elements),a=null===(o=null==i?void 0:i.props)||void 0===o?void 0:o.nodeType;if(!("inline"===a||"inlineVoid"===a)){const r={};Object.keys(t.elements).forEach((e=>{const n=wi(t.elements[e],["render"]);r[e]=n}));const{display:o,placeholder:i,align:a,shortcuts:l}=t.options||{};n[t.type]={type:t.type,elements:r,hasCustomEditor:!!t.customEditor,options:{display:o,placeholder:i,align:a,shortcuts:l},isActive:()=>{const n=M(e,{at:e.selection});return(null==n?void 0:n.type)===t.type},toggle:(t,n)=>{Ka(e,t)},create:n=>{!function(e,t,n){var r;e.children=Fa(e.children);const o=M(e);if(!o)throw new Error(`No block found in the current selection path. Passed path: ${e.selection}`);const i=(null==n?void 0:n.slate)||In(e,{at:[null==o?void 0:o.meta.order]});if(!i||!i.selection)return;const a=e.blocks[t],l=ii(a.elements),c=a.elements[l];if(!c)return;const s=Object.assign({nodeType:(null===(r=c.props)||void 0===r?void 0:r.nodeType)||"block"},c.props),d=Q({id:J(),type:l,props:s});R.setNodes(i,d,{at:[0,0],match:e=>D.isElement(e),mode:"highest"}),(null==n?void 0:n.deleteText)&&R.delete(i,{at:[0,0]});const u=ee({id:o.id,type:a.type,meta:{order:o.meta.order,depth:o.meta.depth},value:[d]}),f=u.id;e.children[f]=u,e.blockEditorsMap[f]=i,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children),(null==n?void 0:n.focus)&&e.focusBlock(f,{slate:i,waitExecution:!0})}(e,t.type,n)},update:(t,n)=>{Wa(e,t,n)},updateElement:(t,n,r)=>{!function(e,t,n,r){const o=e.children[t];if(!o)throw new Error(`Block with id ${t} not found`);const i=In(e,{at:[o.meta.order]});i?_.withoutNormalizing(i,(()=>{const[t]=_.nodes(i,{at:[0],match:e=>D.isElement(e)&&e.type===n}),o=null==t?void 0:t[0],a=(null==o?void 0:o.props)||{},l={props:Object.assign(Object.assign({},a),r)};R.setNodes(i,l,{at:[0],match:e=>D.isElement(e)&&e.type===n,mode:"lowest"}),e.applyChanges(),e.emit("change",e.children)})):console.warn("No slate found")}(e,t,n,r)},delete:t=>{Ya(e,t)}}}})),n}function Za(e){return Va(e,O(A()))}function qa({type:e,hotkey:t,render:n}){return{type:e,hotkey:t,render:n}}const Ga=qa({type:"fakeSelection",render:t=>e("span",Object.assign({style:{backgroundColor:"#d7e6fa"}},{children:t.children}))}),Ja=(()=>{const e=J();return{[e]:ee({id:e})}})(),Qa=new $,el=(e,t)=>Qa.on(e,t),tl=(e,t)=>Qa.once(e,t),nl=(e,t)=>Qa.off(e,t),rl=(e,t)=>Qa.emit(e,t);const ol=({editor:n,value:r,marks:o,plugins:i,autoFocus:a,className:l,tools:c,selectionBoxRoot:s,children:u,placeholder:p,readOnly:h})=>{const g=()=>{y((e=>Object.assign(Object.assign({},e),{version:e.version+1})))},v=d((()=>o?[Ga,...o]:[Ga]),[o]),m=d((()=>i.map((e=>e.getPlugin))),[i]),[b,y]=f((()=>(n.applyChanges=g,n.readOnly=h||!1,v&&(n.formats=Xa(n,v)),n.blocks=$a(n,m),n.children=function(e){return!!e&&"object"==typeof e&&0!==Object.keys(e).length}(r)?r:Ja,n.blockEditorsMap=function(e){const t={};return Object.keys(e.children).forEach((n=>{const r=Za(e);t[n]=r})),t}(n),n.shortcuts=function(e){const t={};return Object.values(e.blocks).forEach((e=>{var n,r,o,i;e.options&&Array.isArray(null===(n=e.options)||void 0===n?void 0:n.shortcuts)&&(null===(r=e.options)||void 0===r?void 0:r.shortcuts.length)>0&&(null===(i=null===(o=e.options)||void 0===o?void 0:o.shortcuts)||void 0===i||i.forEach((n=>{t[n]=e})))})),t}(n),n.plugins=function(e){const t={},n={};return e.forEach((e=>{e.elements&&Object.keys(e.elements).forEach((t=>{var r;const o=e.elements[t],i=null===(r=o.props)||void 0===r?void 0:r.nodeType;"inline"!==i&&"inlineVoid"!==i||(n[t]=o)})),t[e.type]=e})),e.forEach((e=>{if(e.elements){const r=Object.assign(Object.assign({},e.elements),n);t[e.type]=Object.assign(Object.assign({},e),{elements:r})}})),t}(m),n.on=el,n.once=tl,n.off=nl,n.emit=rl,{editor:n,version:0})));return e(Gi,{children:e(P,Object.assign({editorState:b},{children:t(ci,Object.assign({tools:c},{children:[e(qi,{placeholder:p,marks:v,autoFocus:a,className:l,selectionBoxRoot:s}),u]}))}))})},il=Object.assign(Object.assign({},hi),{ExtendedBlockActions:({className:r,style:o,onClick:i,children:a})=>{const l=V(),[c,s]=f(!1),{refs:d,floatingStyles:u,context:p}=zo({placement:"bottom-start",open:c,onOpenChange:s,middleware:[Hr(),Ur(),Fr(),Er(10)],whileElementsMounted:zr}),{isMounted:h,styles:g}=Vo(p,{duration:100}),v=Object.assign(Object.assign({},g),u);return l?null:t(n,{children:[h&&e(pi,Object.assign({isOpen:!0,onClose:()=>s(!1),refs:d,style:v},{children:a})),e("button",Object.assign({type:"button",ref:d.setReference,className:`absolute right-[8px] top-[8px] flex items-center justify-between z-10 opacity-1 bg-[#eee] w-[22px] h-[22px] transition-opacity duration-150 ease-in border-none cursor-pointer rounded-[2px] p-[0_4px] ${r||""} yoopta-extended-block-actions`,onClick:()=>{null==i||i(),s(!0)},style:c?Object.assign(Object.assign({},o),{opacity:1}):o},{children:e(Go,{})}))]})}});function al(e,t){const n=Object.keys(e.children),{type:r}=t||{},o=n.find((t=>e.children[t].type===r));return o?e.children[o]:null}function ll(e,t,n={}){const{focusAt:r,waitExecution:o=!0,waitExecutionMs:i=0,shouldUpdateBlockSelection:a=!0}=n,l=()=>{const o=n.slate||e.blockEditorsMap[t],i=e.children[t];if(!o||!i)return;if(!e.blocks[i.type].hasCustomEditor){const e=function(e,t){if(T.isPoint(t))return t;if(S.isPath(t))return{path:t,offset:0};const[,n]=_.first(e,[0]);return{path:n||[0,0],offset:0}}(o,r);R.select(o,e),x.focus(o)}a&&setTimeout((()=>{e.setSelection([i.meta.order])}),0)};o?setTimeout((()=>l()),i):l()}function cl(e){return Array.from(new Set(e))}var sl={};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",l="[object Function]",c="[object GeneratorFunction]",s="[object Map]",d="[object Number]",u="[object Object]",f="[object Promise]",p="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",b="[object ArrayBuffer]",y="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",k="[object Int8Array]",E="[object Int16Array]",C="[object Int32Array]",O="[object Uint8Array]",S="[object Uint8ClampedArray]",_="[object Uint16Array]",D="[object Uint32Array]",R=/\w*$/,j=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,A={};A[o]=A["[object Array]"]=A[b]=A[y]=A[i]=A[a]=A[w]=A[x]=A[k]=A[E]=A[C]=A[s]=A[d]=A[u]=A[p]=A[h]=A[g]=A[v]=A[O]=A[S]=A[_]=A[D]=!0,A["[object Error]"]=A[l]=A[m]=!1;var T="object"==typeof Y&&Y&&Y.Object===Object&&Y,L="object"==typeof self&&self&&self.Object===Object&&self,M=T||L||Function("return this")(),N=t&&!t.nodeType&&t,I=N&&e&&!e.nodeType&&e,P=I&&I.exports===N;function z(e,t){return e.set(t[0],t[1]),e}function F(e,t){return e.add(t),e}function U(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function H(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function V(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e,t){return function(n){return e(t(n))}}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var X,$=Array.prototype,Z=Function.prototype,q=Object.prototype,G=M["__core-js_shared__"],J=(X=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+X:"",Q=Z.toString,ee=q.hasOwnProperty,te=q.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=P?M.Buffer:void 0,oe=M.Symbol,ie=M.Uint8Array,ae=W(Object.getPrototypeOf,Object),le=Object.create,ce=q.propertyIsEnumerable,se=$.splice,de=Object.getOwnPropertySymbols,ue=re?re.isBuffer:void 0,fe=W(Object.keys,Object),pe=Pe(M,"DataView"),he=Pe(M,"Map"),ge=Pe(M,"Promise"),ve=Pe(M,"Set"),me=Pe(M,"WeakMap"),be=Pe(Object,"create"),ye=Ve(pe),we=Ve(he),xe=Ve(ge),ke=Ve(ve),Ee=Ve(me),Ce=oe?oe.prototype:void 0,Oe=Ce?Ce.valueOf:void 0;function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _e(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function De(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Re(e){this.__data__=new _e(e)}function je(e,t){var n=Ke(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Ye(e)}(e)&&ee.call(e,"callee")&&(!ce.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!ee.call(e,a)||i&&("length"==a||Ue(a,r))||n.push(a);return n}function Be(e,t,n){var r=e[t];ee.call(e,t)&&We(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Ae(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function Te(e,t,n,r,f,m,j){var B;if(r&&(B=m?r(e,f,m,j):r(e)),void 0!==B)return B;if(!Ze(e))return e;var T=Ke(e);if(T){if(B=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(e,B)}else{var L=Fe(e),M=L==l||L==c;if(Xe(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(L==u||L==o||M&&!m){if(H(e))return m?e:{};if(B=function(e){return"function"!=typeof e.constructor||He(e)?{}:(t=ae(e),Ze(t)?le(t):{});var t}(M?{}:e),!t)return function(e,t){return Ne(e,ze(e),t)}(e,function(e,t){return e&&Ne(t,qe(t),e)}(B,e))}else{if(!A[L])return m?e:{};B=function(e,t,n,r){var o=e.constructor;switch(t){case b:return Me(e);case i:case a:return new o(+e);case y:return function(e,t){var n=t?Me(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case w:case x:case k:case E:case C:case O:case S:case _:case D:return function(e,t){var n=t?Me(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case s:return function(e,t,n){var r=t?n(V(e),!0):V(e);return U(r,z,new e.constructor)}(e,r,n);case d:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,R.exec(e));return t.lastIndex=e.lastIndex,t}(e);case h:return function(e,t,n){var r=t?n(K(e),!0):K(e);return U(r,F,new e.constructor)}(e,r,n);case v:return l=e,Oe?Object(Oe.call(l)):{}}var l}(e,L,Te,t)}}j||(j=new Re);var N=j.get(e);if(N)return N;if(j.set(e,B),!T)var I=n?function(e){return function(e,t,n){var r=t(e);return Ke(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,qe,ze)}(e):qe(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(I||e,(function(o,i){I&&(o=e[i=o]),Be(B,i,Te(o,t,n,r,i,e,j))})),B}function Le(e){return!(!Ze(e)||(t=e,J&&J in t))&&($e(e)||H(e)?ne:j).test(Ve(e));var t}function Me(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function Ne(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;Be(n,a,void 0===l?e[a]:l)}return n}function Ie(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Pe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Le(n)?n:void 0}Se.prototype.clear=function(){this.__data__=be?be(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(be){var r=t[e];return r===n?void 0:r}return ee.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return be?void 0!==t[e]:ee.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=be&&void 0===t?n:t,this},_e.prototype.clear=function(){this.__data__=[]},_e.prototype.delete=function(e){var t=this.__data__,n=Ae(t,e);return!(n<0)&&(n==t.length-1?t.pop():se.call(t,n,1),!0)},_e.prototype.get=function(e){var t=this.__data__,n=Ae(t,e);return n<0?void 0:t[n][1]},_e.prototype.has=function(e){return Ae(this.__data__,e)>-1},_e.prototype.set=function(e,t){var n=this.__data__,r=Ae(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},De.prototype.clear=function(){this.__data__={hash:new Se,map:new(he||_e),string:new Se}},De.prototype.delete=function(e){return Ie(this,e).delete(e)},De.prototype.get=function(e){return Ie(this,e).get(e)},De.prototype.has=function(e){return Ie(this,e).has(e)},De.prototype.set=function(e,t){return Ie(this,e).set(e,t),this},Re.prototype.clear=function(){this.__data__=new _e},Re.prototype.delete=function(e){return this.__data__.delete(e)},Re.prototype.get=function(e){return this.__data__.get(e)},Re.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof _e){var r=n.__data__;if(!he||r.length<199)return r.push([e,t]),this;n=this.__data__=new De(r)}return n.set(e,t),this};var ze=de?W(de,Object):function(){return[]},Fe=function(e){return te.call(e)};function Ue(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||B.test(e))&&e>-1&&e%1==0&&e<t}function He(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||q)}function Ve(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(pe&&Fe(new pe(new ArrayBuffer(1)))!=y||he&&Fe(new he)!=s||ge&&Fe(ge.resolve())!=f||ve&&Fe(new ve)!=h||me&&Fe(new me)!=m)&&(Fe=function(e){var t=te.call(e),n=t==u?e.constructor:void 0,r=n?Ve(n):void 0;if(r)switch(r){case ye:return y;case we:return s;case xe:return f;case ke:return h;case Ee:return m}return t});var Ke=Array.isArray;function Ye(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!$e(e)}var Xe=ue||function(){return!1};function $e(e){var t=Ze(e)?te.call(e):"";return t==l||t==c}function Ze(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function qe(e){return Ye(e)?je(e):function(e){if(!He(e))return fe(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Te(e,!0,!0)}}({get exports(){return sl},set exports(e){sl=e}},sl);var dl=sl;function ul(e,t={}){const{blockId:n,focus:r}=t;if(!n&&!t.at)throw new Error("blockId or path should be provided");let o=null;if(n&&(o=e.children[n],!o))throw new Error(`Block not with blockId: ${n} found`);if(t.at&&(o=M(e,{at:t.at}),!o))throw new Error(`Block in path ${t.at} not found`);if(!o)throw new Error("Block not found");e.children=Fa(e.children);Object.values(e.children).forEach((e=>{e.meta.order>o.meta.order&&(e.meta.order+=1)}));const i=(a=o,"function"==typeof window.structuredClone?window.structuredClone(a):dl(a));var a;const l=Za(e);i.id=J(),i.meta.order=o.meta.order+1,e.children[i.id]=i,e.blockEditorsMap[i.id]=l;const c=i.id;e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children),r&&e.focusBlock(c,{waitExecution:!0})}function fl(e,t){x.blur(t),x.deselect(t),R.deselect(t),e.setBlockSelected(null),e.setSelection(null)}const pl=()=>{const e={children:{},selection:null,selectedBlocks:null,readOnly:!1,getEditorValue:()=>function(e){return e.applyChanges(),e.children}(e),applyChanges:()=>{},insertBlock:(...t)=>function(e,t,n={}){e.children=Fa(e.children);const{at:r=null,focus:o=!1,slate:i=null}=n,a=M(e),l=r,c={id:J(),value:t.value,type:t.type,meta:Object.assign(Object.assign({},t.meta),{order:0})};let s=!1;if(i&&i.selection){const e=_.string(i,i.selection.anchor.path);s=_.isStart(i,i.selection.anchor,i.selection.anchor.path)&&e.length>0}if(l){const[t]=l;Object.values(e.children).forEach((e=>{e.meta.order>=t&&(e.meta.order+=1)})),c.meta.order=t}else{const t=Object.keys(e.children).length;c.meta.order=t}const d=Za(e);e.blockEditorsMap[c.id]=d,s&&a&&(c.meta.order=a.meta.order,a.meta.order+=1),e.children[c.id]=c;const u=null==a?void 0:a.id;e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children),o&&e.focusBlock(s&&u?u:c.id)}(e,...t),deleteBlock:(...t)=>Ya(e,...t),duplicateBlock:(...t)=>ul(e,...t),toggleBlock:(...t)=>Ka(e,...t),increaseBlockDepth:(...t)=>function(e,t={}){const{at:n=e.selection}=t;if(!n)return;e.children=Fa(e.children);const r=M(e);r&&(r.meta.depth=r.meta.depth+1,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children))}(e,...t),decreaseBlockDepth:(...t)=>function(e,t={}){const{at:n=e.selection}=t;if(!n)return;e.children=Fa(e.children);const r=M(e);r&&(r.meta.depth=0===r.meta.depth?0:r.meta.depth-1,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children))}(e,...t),moveBlock:(...t)=>function(e,t,n){e.children=Fa(e.children);const[r]=n,o=e.children[t],i=Object.values(e.children).find((e=>e.meta.order===r));console.log("blockInNewPosition meta",Object.assign({},i).meta.depth);const a=o.meta.order<i.meta.order,l=o.meta.order>i.meta.order;Object.values(e.children).forEach((e=>{a?e.meta.order>o.meta.order&&e.meta.order<=i.meta.order&&e.meta.order--:l&&e.meta.order<o.meta.order&&e.meta.order>=i.meta.order&&e.meta.order++})),o.meta.order=r,o.meta.depth=i.meta.depth,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children)}(e,...t),focusBlock:(...t)=>ll(e,...t),getBlock:(...e)=>{},updateBlock:(...t)=>Wa(e,...t),splitBlock:(...t)=>function(e,t={}){const{slate:n,focus:r=!0}=t,o=M(e);n&&n.selection&&o&&_.withoutNormalizing(n,(()=>{e.children=Fa(e.children);const t=S.parent(n.selection.anchor.path);R.splitNodes(n,{at:n.selection,match:e=>D.isElement(e),always:!0,mode:"highest"});const i=t[0]+1,a=n.children.slice()[i];R.removeNodes(n,{at:[i],match:e=>D.isElement(e),mode:"highest"});const l={id:J(),type:o.type,meta:{order:o.meta.order+1,depth:o.meta.depth},value:[a]};Object.values(e.children).forEach((e=>{e.meta.order>=l.meta.order&&(e.meta.order+=1)}));const c=Za(e);e.blockEditorsMap[l.id]=c,e.children[l.id]=l,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children),r&&e.focusBlock(l.id,{slate:c})}))}(e,...t),setSelection:(...t)=>function(e,t,n={}){const{applyChanges:r=!0}=n;e.selection=t,r&&e.applyChanges()}(e,...t),setBlockSelected:(...t)=>function(e,t,n={}){const{only:r=!1,allSelected:o=!1}=n,i=e.selectedBlocks||[];if(null===t)e.selectedBlocks=null;else if(r)e.selectedBlocks=t;else if(o){const t=Object.keys(e.children).map(((e,t)=>t));e.selectedBlocks=cl(t)}else e.selectedBlocks=cl(i.concat(t));e.applyChanges()}(e,...t),blur:(...t)=>function(e,t={}){var n;const r=null!==(n=t.slate)&&void 0!==n?n:In(e);if(!r)return;const{waitExecution:o,waitExecutionMs:i}=t;o?setTimeout((()=>fl(e,r)),i):(fl(e,r),e.applyChanges())}(e,...t),blockEditorsMap:{},blocks:{},formats:{},shortcuts:{},plugins:{},on:(e,t)=>{},off:(e,t)=>{},emit:(e,...t)=>{},once:(e,t)=>{}};return e};gi('/*! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.right-\\[8px\\]{right:8px}.top-0{top:0}.top-\\[8px\\]{top:8px}.z-10{z-index:10}.z-\\[100\\]{z-index:100}.z-\\[90\\]{z-index:90}.mx-\\[4px\\]{margin-left:4px;margin-right:4px}.my-\\[4px\\]{margin-bottom:4px;margin-top:4px}.mb-\\[1px\\]{margin-bottom:1px}.mr-2{margin-right:.5rem}.mt-\\[2px\\]{margin-top:2px}.\\!block{display:block!important}.block{display:block}.inline{display:inline}.flex{display:flex}.h-4{height:1rem}.h-\\[1px\\]{height:1px}.h-\\[22px\\]{height:22px}.h-full{height:100%}.w-4{width:1rem}.w-\\[22px\\]{width:22px}.w-auto{width:auto}.w-full{width:100%}.min-w-\\[200px\\]{min-width:200px}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-none{border-style:none}.bg-\\[\\#2383e224\\]{background-color:#2383e224}.bg-\\[\\#37352f14\\]{background-color:#37352f14}.bg-\\[\\#FFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-\\[\\#eee\\]{--tw-bg-opacity:1;background-color:rgb(238 238 238/var(--tw-bg-opacity))}.p-\\[0_4px\\]{padding:0 4px}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-\\[2px\\]{padding-left:2px;padding-right:2px}.py-0{padding-bottom:0;padding-top:0}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.text-sm{font-size:.875rem;line-height:1.25rem}.italic{font-style:italic}.leading-\\[120\\%\\]{line-height:120%}.opacity-100{opacity:1}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -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)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-opacity{transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}::-moz-selection{background:#c6ddf8}::selection{background:#c6ddf8}.yoopta-placeholder:after{color:inherit;content:attr(data-placeholder);font-size:75%;font-style:inherit;font-weight:inherit;opacity:.5;padding-left:5px;position:absolute;text-indent:2px;top:50%;transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;user-select:none}.hover\\:bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}');export{Ii as HOTKEYS,il as UI,L as YooptaPlugin,ee as buildBlockData,Q as buildBlockElement,pl as createYooptaEditor,qa as createYooptaMark,ol as default,M as findPluginBlockBySelectionPath,al as findPluginBlockByType,In as findSlateBySelectionPath,J as generateId,ai as getRootBlockElement,ii as getRootBlockElementType,F as useBlockData,K as useBlockSelected,U as useYooptaBlock,z as useYooptaEditor,H as useYooptaPlugin,W as useYooptaPluginOptions,V as useYooptaReadOnly,si as useYooptaTools};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlateEditorComponent.d.ts","sourceRoot":"","sources":["../../src/plugins/SlateEditorComponent.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAA+E,YAAY,EAAE,MAAM,SAAS,CAAC;AAYpH,KAAK,KAAK,CAAC,KAAK,SAAS,MAAM,EAAE,MAAM,EAAE,QAAQ,IAAI,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG;IAC3F,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAgBF,QAAA,MAAM,oBAAoB,2LAsLzB,CAAC;
|
|
1
|
+
{"version":3,"file":"SlateEditorComponent.d.ts","sourceRoot":"","sources":["../../src/plugins/SlateEditorComponent.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAA+E,YAAY,EAAE,MAAM,SAAS,CAAC;AAYpH,KAAK,KAAK,CAAC,KAAK,SAAS,MAAM,EAAE,MAAM,EAAE,QAAQ,IAAI,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG;IAC3F,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAgBF,QAAA,MAAM,oBAAoB,2LAsLzB,CAAC;AAiHF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/editor",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"url": "https://github.com/Darginec05/Yoopta-Editor/issues"
|
|
69
69
|
},
|
|
70
70
|
"homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "abe12edcd3c0425f29fb8442d4e17361b2f665ed"
|
|
72
72
|
}
|