@yoopta/editor 4.0.0-rc.30 → 4.0.0-rc.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import*as n from"react";import r,{createContext as i,useContext as a,useRef as l,useLayoutEffect as c,useEffect as s,useMemo as d,useCallback as u,useState as f,memo as p,useReducer as h,forwardRef as y,createElement as g}from"react";import*as v from"react-dom";import{unstable_batchedUpdates as m,createPortal as b}from"react-dom";import{ReactEditor as w,useSelected as x,Slate as k,Editable as E,DefaultElement as C,withReact as O}from"slate-react";import{Path as S,Editor as D,Element as _,Transforms as R,Range as j,Text as B,createEditor as A,Point as T}from"slate";class M{constructor(e){this.plugin=e}get getPlugin(){return this.plugin}extend(e){const{renders:t,options:o}=e,n=Object.assign(Object.assign({},this.plugin.options),o),r=Object.assign({},this.plugin.elements);return t&&Object.keys(t).forEach((e=>{const o=r[e];o&&o.render&&(r[e].render=o=>t[e](o))})),new M(Object.assign(Object.assign({},this.plugin),{elements:r,options:n}))}}function L(e,t={}){const o=Object.keys(e.children),{at:n=e.selection}=t,r=o.find((t=>e.children[t].meta.order===(null==n?void 0:n[0])));return r?e.children[r]:null}const N={editor:{getBlock:()=>{},insertBlock:()=>{},insertBlocks:()=>{},updateBlock:()=>{},moveBlock:()=>{},splitBlock:()=>{},deleteBlock:()=>{},toggleBlock:()=>{},focusBlock:()=>{},setSelection:()=>{},applyChanges:()=>{},decreaseBlockDepth:()=>{},increaseBlockDepth:()=>{},setBlockSelected:()=>{},selectedBlocks:[],duplicateBlock:()=>{},getEditorValue:()=>{},blur:()=>{},blocks:{},shortcuts:{},plugins:{},formats:{},selection:null,readOnly:!1,blockEditorsMap:{},children:{},emit:()=>{},on:()=>{},off:()=>{},once:()=>{}}},I=i(N),P=({children:t,editorState:o})=>{const n=l(N);return n.current={editor:o.editor},e(I.Provider,Object.assign({value:n.current},{children:t}))},z=()=>{const e=a(I);if(!e)throw new Error("useYooptaEditor must be used within a YooptaEditorContext");return e.editor},F=e=>z().children[e],U=e=>z().blocks[e],H=e=>z().plugins[e],V=()=>z().readOnly,K=e=>{var t;return null===(t=H(e))||void 0===t?void 0:t.options},W=({blockId:e,path:t})=>{var o;const n=z();if(!e&&!t)throw new Error("useBlockSelected must receive either blockId or path");let r;return e&&(r=n.children[e]),t&&(r=L(n,{at:t})),(null===(o=n.selection)||void 0===o?void 0:o[0])===(null==r?void 0:r.meta.order)};var Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},$={};!function(e){var t=Object.prototype.hasOwnProperty,o="~";function n(){}function r(e,t,o){this.fn=e,this.context=t,this.once=o||!1}function i(e,t,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var l=new r(n,i||e,a),c=o?o+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],l]:e._events[c].push(l):(e._events[c]=l,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function l(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(o=!1)),l.prototype.eventNames=function(){var e,n,r=[];if(0===this._eventsCount)return r;for(n in e=this._events)t.call(e,n)&&r.push(o?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},l.prototype.listeners=function(e){var t=o?o+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,a=new Array(i);r<i;r++)a[r]=n[r].fn;return a},l.prototype.listenerCount=function(e){var t=o?o+e:e,n=this._events[t];return n?n.fn?1:n.length:0},l.prototype.emit=function(e,t,n,r,i,a){var l=o?o+e:e;if(!this._events[l])return!1;var c,s,d=this._events[l],u=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),u){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,n),!0;case 4:return d.fn.call(d.context,t,n,r),!0;case 5:return d.fn.call(d.context,t,n,r,i),!0;case 6:return d.fn.call(d.context,t,n,r,i,a),!0}for(s=1,c=new Array(u-1);s<u;s++)c[s-1]=arguments[s];d.fn.apply(d.context,c)}else{var f,p=d.length;for(s=0;s<p;s++)switch(d[s].once&&this.removeListener(e,d[s].fn,void 0,!0),u){case 1:d[s].fn.call(d[s].context);break;case 2:d[s].fn.call(d[s].context,t);break;case 3:d[s].fn.call(d[s].context,t,n);break;case 4:d[s].fn.call(d[s].context,t,n,r);break;default:if(!c)for(f=1,c=new Array(u-1);f<u;f++)c[f-1]=arguments[f];d[s].fn.apply(d[s].context,c)}}return!0},l.prototype.on=function(e,t,o){return i(this,e,t,o,!1)},l.prototype.once=function(e,t,o){return i(this,e,t,o,!0)},l.prototype.removeListener=function(e,t,n,r){var i=o?o+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var l=this._events[i];if(l.fn)l.fn!==t||r&&!l.once||n&&l.context!==n||a(this,i);else{for(var c=0,s=[],d=l.length;c<d;c++)(l[c].fn!==t||r&&!l[c].once||n&&l[c].context!==n)&&s.push(l[c]);s.length?this._events[i]=1===s.length?s[0]:s:a(this,i)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=o,l.EventEmitter=l,e.exports=l}({get exports(){return $},set exports(e){$=e}});var X=$;function Z(){let e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}const q=()=>{var e,t;return"undefined"==typeof window||"function"!=typeof(null===(e=window.crypto)||void 0===e?void 0:e.randomUUID)?Z():null===(t=window.crypto)||void 0===t?void 0:t.randomUUID()},G=e=>({id:q(),type:(null==e?void 0:e.type)||"paragraph",children:(null==e?void 0:e.children)||[{text:""}],props:Object.assign({nodeType:"block"},null==e?void 0:e.props)}),J=e=>({id:(null==e?void 0:e.id)||q(),value:(null==e?void 0:e.value)||[G()],type:(null==e?void 0:e.type)||"Paragraph",meta:Object.assign({order:0,depth:0},null==e?void 0:e.meta)});const Q="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ee(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function te(e){return"nodeType"in e}function oe(e){var t,o;return e?ee(e)?e:te(e)&&null!=(t=null==(o=e.ownerDocument)?void 0:o.defaultView)?t:window:window}function ne(e){const{Document:t}=oe(e);return e instanceof t}function re(e){return!ee(e)&&e instanceof oe(e).HTMLElement}function ie(e){return e instanceof oe(e).SVGElement}function ae(e){return e?ee(e)?e.document:te(e)?ne(e)?e:re(e)||ie(e)?e.ownerDocument:document:document:document}const le=Q?c:s;function ce(e){const t=l(e);return le((()=>{t.current=e})),u((function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return null==t.current?void 0:t.current(...o)}),[])}function se(e,t){void 0===t&&(t=[e]);const o=l(e);return le((()=>{o.current!==e&&(o.current=e)}),t),o}function de(e,t){const o=l();return d((()=>{const t=e(o.current);return o.current=t,t}),[...t])}function ue(e){const t=ce(e),o=l(null),n=u((e=>{e!==o.current&&(null==t||t(e,o.current)),o.current=e}),[]);return[o,n]}function fe(e){const t=l();return s((()=>{t.current=e}),[e]),t.current}let pe={};function he(e,t){return d((()=>{if(t)return t;const o=null==pe[e]?0:pe[e]+1;return pe[e]=o,e+"-"+o}),[e,t])}function ye(e){return function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return n.reduce(((t,o)=>{const n=Object.entries(o);for(const[o,r]of n){const n=t[o];null!=n&&(t[o]=n+e*r)}return t}),{...t})}}const ge=ye(1),ve=ye(-1);function me(e){if(!e)return!1;const{KeyboardEvent:t}=oe(e.target);return t&&e instanceof t}function be(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=oe(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:o}=e.touches[0];return{x:t,y:o}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:o}=e.changedTouches[0];return{x:t,y:o}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const we=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:o}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(o?Math.round(o):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:o}=e;return"scaleX("+t+") scaleY("+o+")"}},Transform:{toString(e){if(e)return[we.Translate.toString(e),we.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:o,easing:n}=e;return t+" "+o+"ms "+n}}}),xe="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ke(e){return e.matches(xe)?e:e.querySelector(xe)}const Ee={display:"none"};function Ce(e){let{id:t,value:o}=e;return r.createElement("div",{id:t,style:Ee},o)}function Oe(e){let{id:t,announcement:o,ariaLiveType:n="assertive"}=e;return r.createElement("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":n,"aria-atomic":!0},o)}const Se=i(null);const De={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},_e={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:o}=e;return o?"Draggable item "+t.id+" was moved over droppable area "+o.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:o}=e;return o?"Draggable item "+t.id+" was dropped over droppable area "+o.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Re(e){let{announcements:t=_e,container:o,hiddenTextDescribedById:n,screenReaderInstructions:i=De}=e;const{announce:l,announcement:c}=function(){const[e,t]=f("");return{announce:u((e=>{null!=e&&t(e)}),[]),announcement:e}}(),p=he("DndLiveRegion"),[h,y]=f(!1);if(s((()=>{y(!0)}),[]),function(e){const t=a(Se);s((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}(d((()=>({onDragStart(e){let{active:o}=e;l(t.onDragStart({active:o}))},onDragMove(e){let{active:o,over:n}=e;t.onDragMove&&l(t.onDragMove({active:o,over:n}))},onDragOver(e){let{active:o,over:n}=e;l(t.onDragOver({active:o,over:n}))},onDragEnd(e){let{active:o,over:n}=e;l(t.onDragEnd({active:o,over:n}))},onDragCancel(e){let{active:o,over:n}=e;l(t.onDragCancel({active:o,over:n}))}})),[l,t])),!h)return null;const g=r.createElement(r.Fragment,null,r.createElement(Ce,{id:n,value:i.draggable}),r.createElement(Oe,{id:p,announcement:c}));return o?b(g,o):g}var je;function Be(){}function Ae(e,t){return d((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(je||(je={}));const Te=Object.freeze({x:0,y:0});function Me(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Le(e,t){let{data:{value:o}}=e,{data:{value:n}}=t;return o-n}function Ne(e,t){let{data:{value:o}}=e,{data:{value:n}}=t;return n-o}function Ie(e){let{left:t,top:o,height:n,width:r}=e;return[{x:t,y:o},{x:t+r,y:o},{x:t,y:o+n},{x:t+r,y:o+n}]}function Pe(e,t){if(!e||0===e.length)return null;const[o]=e;return t?o[t]:o}function ze(e,t,o){return void 0===t&&(t=e.left),void 0===o&&(o=e.top),{x:t+.5*e.width,y:o+.5*e.height}}const Fe=e=>{let{collisionRect:t,droppableRects:o,droppableContainers:n}=e;const r=ze(t,t.left,t.top),i=[];for(const e of n){const{id:t}=e,n=o.get(t);if(n){const o=Me(ze(n),r);i.push({id:t,data:{droppableContainer:e,value:o}})}}return i.sort(Le)};function Ue(e,t){const o=Math.max(t.top,e.top),n=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=r-n,l=i-o;if(n<r&&o<i){const o=t.width*t.height,n=e.width*e.height,r=a*l;return Number((r/(o+n-r)).toFixed(4))}return 0}const He=e=>{let{collisionRect:t,droppableRects:o,droppableContainers:n}=e;const r=[];for(const e of n){const{id:n}=e,i=o.get(n);if(i){const o=Ue(i,t);o>0&&r.push({id:n,data:{droppableContainer:e,value:o}})}}return r.sort(Ne)};function Ve(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Te}function Ke(e){return function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return n.reduce(((t,o)=>({...t,top:t.top+e*o.y,bottom:t.bottom+e*o.y,left:t.left+e*o.x,right:t.right+e*o.x})),{...t})}}const We=Ke(1);const Ye={ignoreTransform:!1};function $e(e,t){void 0===t&&(t=Ye);let o=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:n}=oe(e).getComputedStyle(e);t&&(o=function(e,t,o){const n=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!n)return e;const{scaleX:r,scaleY:i,x:a,y:l}=n,c=e.left-a-(1-r)*parseFloat(o),s=e.top-l-(1-i)*parseFloat(o.slice(o.indexOf(" ")+1)),d=r?e.width/r:e.width,u=i?e.height/i:e.height;return{width:d,height:u,top:s,right:c+d,bottom:s+u,left:c}}(o,t,n))}const{top:n,left:r,width:i,height:a,bottom:l,right:c}=o;return{top:n,left:r,width:i,height:a,bottom:l,right:c}}function Xe(e){return $e(e,{ignoreTransform:!0})}function Ze(e,t){const o=[];return e?function n(r){if(null!=t&&o.length>=t)return o;if(!r)return o;if(ne(r)&&null!=r.scrollingElement&&!o.includes(r.scrollingElement))return o.push(r.scrollingElement),o;if(!re(r)||ie(r))return o;if(o.includes(r))return o;const i=oe(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=oe(e).getComputedStyle(e));const o=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const n=t[e];return"string"==typeof n&&o.test(n)}))}(r,i)&&o.push(r),function(e,t){return void 0===t&&(t=oe(e).getComputedStyle(e)),"fixed"===t.position}(r,i)?o:n(r.parentNode)}(e):o}function qe(e){const[t]=Ze(e,1);return null!=t?t:null}function Ge(e){return Q&&e?ee(e)?e:te(e)?ne(e)||e===ae(e).scrollingElement?window:re(e)?e:null:null:null}function Je(e){return ee(e)?e.scrollX:e.scrollLeft}function Qe(e){return ee(e)?e.scrollY:e.scrollTop}function et(e){return{x:Je(e),y:Qe(e)}}var tt;function ot(e){return!(!Q||!e)&&e===document.scrollingElement}function nt(e){const t={x:0,y:0},o=ot(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-o.width,y:e.scrollHeight-o.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=n.y,isRight:e.scrollLeft>=n.x,maxScroll:n,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(tt||(tt={}));const rt={x:.2,y:.2};function it(e,t,o,n,r){let{top:i,left:a,right:l,bottom:c}=o;void 0===n&&(n=10),void 0===r&&(r=rt);const{isTop:s,isBottom:d,isLeft:u,isRight:f}=nt(e),p={x:0,y:0},h={x:0,y:0},y=t.height*r.y,g=t.width*r.x;return!s&&i<=t.top+y?(p.y=tt.Backward,h.y=n*Math.abs((t.top+y-i)/y)):!d&&c>=t.bottom-y&&(p.y=tt.Forward,h.y=n*Math.abs((t.bottom-y-c)/y)),!f&&l>=t.right-g?(p.x=tt.Forward,h.x=n*Math.abs((t.right-g-l)/g)):!u&&a<=t.left+g&&(p.x=tt.Backward,h.x=n*Math.abs((t.left+g-a)/g)),{direction:p,speed:h}}function at(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:o,right:n,bottom:r}=e.getBoundingClientRect();return{top:t,left:o,right:n,bottom:r,width:e.clientWidth,height:e.clientHeight}}function lt(e){return e.reduce(((e,t)=>ge(e,et(t))),Te)}const ct=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Je(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+Qe(t)),0)}]];class st{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=Ze(t),n=lt(o);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of ct)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=r(o),a=n[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class dt{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,o){var n;null==(n=this.target)||n.addEventListener(e,t,o),this.listeners.push([e,t,o])}}function ut(e,t){const o=Math.abs(e.x),n=Math.abs(e.y);return"number"==typeof t?Math.sqrt(o**2+n**2)>t:"x"in t&&"y"in t?o>t.x&&n>t.y:"x"in t?o>t.x:"y"in t&&n>t.y}var ft,pt;function ht(e){e.preventDefault()}function yt(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ft||(ft={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(pt||(pt={}));const gt={start:[pt.Space,pt.Enter],cancel:[pt.Esc],end:[pt.Space,pt.Enter]},vt=(e,t)=>{let{currentCoordinates:o}=t;switch(e.code){case pt.Right:return{...o,x:o.x+25};case pt.Left:return{...o,x:o.x-25};case pt.Down:return{...o,y:o.y+25};case pt.Up:return{...o,y:o.y-25}}};class mt{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new dt(ae(t)),this.windowListeners=new dt(oe(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ft.Resize,this.handleCancel),this.windowListeners.add(ft.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(ft.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,o=e.node.current;o&&function(e,t){if(void 0===t&&(t=$e),!e)return;const{top:o,left:n,bottom:r,right:i}=t(e);qe(e)&&(r<=0||i<=0||o>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(o),t(Te)}handleKeyDown(e){if(me(e)){const{active:t,context:o,options:n}=this.props,{keyboardCodes:r=gt,coordinateGetter:i=vt,scrollBehavior:a="smooth"}=n,{code:l}=e;if(r.end.includes(l))return void this.handleEnd(e);if(r.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:c}=o.current,s=c?{x:c.left,y:c.top}:Te;this.referenceCoordinates||(this.referenceCoordinates=s);const d=i(e,{active:t,context:o.current,currentCoordinates:s});if(d){const t=ve(d,s),n={x:0,y:0},{scrollableAncestors:r}=o.current;for(const o of r){const r=e.code,{isTop:i,isRight:l,isLeft:c,isBottom:s,maxScroll:u,minScroll:f}=nt(o),p=at(o),h={x:Math.min(r===pt.Right?p.right-p.width/2:p.right,Math.max(r===pt.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(r===pt.Down?p.bottom-p.height/2:p.bottom,Math.max(r===pt.Down?p.top:p.top+p.height/2,d.y))},y=r===pt.Right&&!l||r===pt.Left&&!c,g=r===pt.Down&&!s||r===pt.Up&&!i;if(y&&h.x!==d.x){const e=o.scrollLeft+t.x,i=r===pt.Right&&e<=u.x||r===pt.Left&&e>=f.x;if(i&&!t.y)return void o.scrollTo({left:e,behavior:a});n.x=i?o.scrollLeft-e:r===pt.Right?o.scrollLeft-u.x:o.scrollLeft-f.x,n.x&&o.scrollBy({left:-n.x,behavior:a});break}if(g&&h.y!==d.y){const e=o.scrollTop+t.y,i=r===pt.Down&&e<=u.y||r===pt.Up&&e>=f.y;if(i&&!t.x)return void o.scrollTo({top:e,behavior:a});n.y=i?o.scrollTop-e:r===pt.Down?o.scrollTop-u.y:o.scrollTop-f.y,n.y&&o.scrollBy({top:-n.y,behavior:a});break}}this.handleMove(e,ge(ve(d,this.referenceCoordinates),n))}}}handleMove(e,t){const{onMove:o}=this.props;e.preventDefault(),o(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function bt(e){return Boolean(e&&"distance"in e)}function wt(e){return Boolean(e&&"delay"in e)}mt.activators=[{eventName:"onKeyDown",handler:(e,t,o)=>{let{keyboardCodes:n=gt,onActivation:r}=t,{active:i}=o;const{code:a}=e.nativeEvent;if(n.start.includes(a)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class xt{constructor(e,t,o){var n;void 0===o&&(o=function(e){const{EventTarget:t}=oe(e);return e instanceof t?e:ae(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=ae(i),this.documentListeners=new dt(this.document),this.listeners=new dt(o),this.windowListeners=new dt(oe(i)),this.initialCoordinates=null!=(n=be(r))?n:Te,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:o}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(ft.Resize,this.handleCancel),this.windowListeners.add(ft.DragStart,ht),this.windowListeners.add(ft.VisibilityChange,this.handleCancel),this.windowListeners.add(ft.ContextMenu,ht),this.documentListeners.add(ft.Keydown,this.handleKeydown),t){if(null!=o&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(wt(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(bt(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ft.Click,yt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ft.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:o,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;const l=null!=(t=be(e))?t:Te,c=ve(n,l);if(!o&&a){if(bt(a)){if(null!=a.tolerance&&ut(c,a.tolerance))return this.handleCancel();if(ut(c,a.distance))return this.handleStart()}return wt(a)&&ut(c,a.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===pt.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const kt={move:{name:"pointermove"},end:{name:"pointerup"}};class Et extends xt{constructor(e){const{event:t}=e,o=ae(t.target);super(e,kt,o)}}Et.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:o}=e,{onActivation:n}=t;return!(!o.isPrimary||0!==o.button)&&(null==n||n({event:o}),!0)}}];const Ct={move:{name:"mousemove"},end:{name:"mouseup"}};var Ot;!function(e){e[e.RightClick=2]="RightClick"}(Ot||(Ot={}));(class extends xt{constructor(e){super(e,Ct,ae(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:o}=e,{onActivation:n}=t;return o.button!==Ot.RightClick&&(null==n||n({event:o}),!0)}}];const St={move:{name:"touchmove"},end:{name:"touchend"}};var Dt,_t;function Rt(e){let{acceleration:t,activator:o=Dt.Pointer,canScroll:n,draggingRect:r,enabled:i,interval:a=5,order:c=_t.TreeOrder,pointerCoordinates:f,scrollableAncestors:p,scrollableAncestorRects:h,delta:y,threshold:g}=e;const v=function(e){let{delta:t,disabled:o}=e;const n=fe(t);return de((e=>{if(o||!n||!e)return jt;const r={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[tt.Backward]:e.x[tt.Backward]||-1===r.x,[tt.Forward]:e.x[tt.Forward]||1===r.x},y:{[tt.Backward]:e.y[tt.Backward]||-1===r.y,[tt.Forward]:e.y[tt.Forward]||1===r.y}}}),[o,t,n])}({delta:y,disabled:!i}),[m,b]=function(){const e=l(null);return[u(((t,o)=>{e.current=setInterval(t,o)}),[]),u((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),w=l({x:0,y:0}),x=l({x:0,y:0}),k=d((()=>{switch(o){case Dt.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case Dt.DraggableRect:return r}}),[o,r,f]),E=l(null),C=u((()=>{const e=E.current;if(!e)return;const t=w.current.x*x.current.x,o=w.current.y*x.current.y;e.scrollBy(t,o)}),[]),O=d((()=>c===_t.TreeOrder?[...p].reverse():p),[c,p]);s((()=>{if(i&&p.length&&k){for(const e of O){if(!1===(null==n?void 0:n(e)))continue;const o=p.indexOf(e),r=h[o];if(!r)continue;const{direction:i,speed:l}=it(e,r,k,t,g);for(const e of["x","y"])v[e][i[e]]||(l[e]=0,i[e]=0);if(l.x>0||l.y>0)return b(),E.current=e,m(C,a),w.current=l,void(x.current=i)}w.current={x:0,y:0},x.current={x:0,y:0},b()}else b()}),[t,C,n,b,i,a,JSON.stringify(k),JSON.stringify(v),m,p,O,h,JSON.stringify(g)])}(class extends xt{constructor(e){super(e,St)}static setup(){return window.addEventListener(St.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(St.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:o}=e,{onActivation:n}=t;const{touches:r}=o;return!(r.length>1)&&(null==n||n({event:o}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Dt||(Dt={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(_t||(_t={}));const jt={x:{[tt.Backward]:!1,[tt.Forward]:!1},y:{[tt.Backward]:!1,[tt.Forward]:!1}};var Bt,At;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Bt||(Bt={})),function(e){e.Optimized="optimized"}(At||(At={}));const Tt=new Map;function Mt(e,t){return de((o=>e?o||("function"==typeof t?t(e):e):null),[t,e])}function Lt(e){let{callback:t,disabled:o}=e;const n=ce(t),r=d((()=>{if(o||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(n)}),[o]);return s((()=>()=>null==r?void 0:r.disconnect()),[r]),r}function Nt(e){return new st($e(e),e)}function It(e,t,o){void 0===t&&(t=Nt);const[n,r]=h((function(n){if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=null!=n?n:o)?r:null;const i=t(e);if(JSON.stringify(n)===JSON.stringify(i))return n;return i}),null),i=function(e){let{callback:t,disabled:o}=e;const n=ce(t),r=d((()=>{if(o||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(n)}),[n,o]);return s((()=>()=>null==r?void 0:r.disconnect()),[r]),r}({callback(t){if(e)for(const o of t){const{type:t,target:n}=o;if("childList"===t&&n instanceof HTMLElement&&n.contains(e)){r();break}}}}),a=Lt({callback:r});return le((()=>{r(),e?(null==a||a.observe(e),null==i||i.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==i||i.disconnect())}),[e]),n}const Pt=[];function zt(e,t){void 0===t&&(t=[]);const o=l(null);return s((()=>{o.current=null}),t),s((()=>{const t=e!==Te;t&&!o.current&&(o.current=e),!t&&o.current&&(o.current=null)}),[e]),o.current?ve(e,o.current):Te}function Ft(e){return d((()=>e?function(e){const t=e.innerWidth,o=e.innerHeight;return{top:0,left:0,right:t,bottom:o,width:t,height:o}}(e):null),[e])}const Ut=[];function Ht(e){let{measure:t}=e;const[o,n]=f(null),r=u((e=>{for(const{target:o}of e)if(re(o)){n((e=>{const n=t(o);return e?{...e,width:n.width,height:n.height}:n}));break}}),[t]),i=Lt({callback:r}),a=u((e=>{const o=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return re(t)?t:e}(e);null==i||i.disconnect(),o&&(null==i||i.observe(o)),n(o?t(o):null)}),[t,i]),[l,c]=ue(a);return d((()=>({nodeRef:l,rect:o,setRef:c})),[o,l,c])}const Vt=[{sensor:Et,options:{}},{sensor:mt,options:{}}],Kt={current:{}},Wt={draggable:{measure:Xe},droppable:{measure:Xe,strategy:Bt.WhileDragging,frequency:At.Optimized},dragOverlay:{measure:$e}};class Yt extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,o;return null!=(t=null==(o=this.get(e))?void 0:o.node.current)?t:void 0}}const $t={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Yt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Be},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Wt,measureDroppableContainers:Be,windowRect:null,measuringScheduled:!1},Xt=i({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Be,draggableNodes:new Map,over:null,measureDroppableContainers:Be}),Zt=i($t);function qt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Yt}}}function Gt(e,t){switch(t.type){case je.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case je.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case je.DragEnd:case je.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case je.RegisterDroppable:{const{element:o}=t,{id:n}=o,r=new Yt(e.droppable.containers);return r.set(n,o),{...e,droppable:{...e.droppable,containers:r}}}case je.SetDroppableDisabled:{const{id:o,key:n,disabled:r}=t,i=e.droppable.containers.get(o);if(!i||n!==i.key)return e;const a=new Yt(e.droppable.containers);return a.set(o,{...i,disabled:r}),{...e,droppable:{...e.droppable,containers:a}}}case je.UnregisterDroppable:{const{id:o,key:n}=t,r=e.droppable.containers.get(o);if(!r||n!==r.key)return e;const i=new Yt(e.droppable.containers);return i.delete(o),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Jt(e){let{disabled:t}=e;const{active:o,activatorEvent:n,draggableNodes:r}=a(Xt),i=fe(n),l=fe(null==o?void 0:o.id);return s((()=>{if(!t&&!n&&i&&null!=l){if(!me(i))return;if(document.activeElement===i.target)return;const e=r.get(l);if(!e)return;const{activatorNode:t,node:o}=e;if(!t.current&&!o.current)return;requestAnimationFrame((()=>{for(const e of[t.current,o.current]){if(!e)continue;const t=ke(e);if(t){t.focus();break}}}))}}),[n,t,r,l,i]),null}const Qt=i({...Te,scaleX:1,scaleY:1});var eo;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(eo||(eo={}));const to=p((function(e){var t,o,n,i;let{id:a,accessibility:c,autoScroll:p=!0,children:y,sensors:g=Vt,collisionDetection:v=He,measuring:b,modifiers:w,...x}=e;const k=h(Gt,void 0,qt),[E,C]=k,[O,S]=function(){const[e]=f((()=>new Set)),t=u((t=>(e.add(t),()=>e.delete(t))),[e]);return[u((t=>{let{type:o,event:n}=t;e.forEach((e=>{var t;return null==(t=e[o])?void 0:t.call(e,n)}))}),[e]),t]}(),[D,_]=f(eo.Uninitialized),R=D===eo.Initialized,{draggable:{active:j,nodes:B,translate:A},droppable:{containers:T}}=E,M=j?B.get(j):null,L=l({initial:null,translated:null}),N=d((()=>{var e;return null!=j?{id:j,data:null!=(e=null==M?void 0:M.data)?e:Kt,rect:L}:null}),[j,M]),I=l(null),[P,z]=f(null),[F,U]=f(null),H=se(x,Object.values(x)),V=he("DndDescribedBy",a),K=d((()=>T.getEnabled()),[T]),W=d((()=>({draggable:{...Wt.draggable,...null==Y?void 0:Y.draggable},droppable:{...Wt.droppable,...null==Y?void 0:Y.droppable},dragOverlay:{...Wt.dragOverlay,...null==Y?void 0:Y.dragOverlay}})),[null==(Y=b)?void 0:Y.draggable,null==Y?void 0:Y.droppable,null==Y?void 0:Y.dragOverlay]);var Y;const{droppableRects:$,measureDroppableContainers:X,measuringScheduled:Z}=function(e,t){let{dragging:o,dependencies:n,config:r}=t;const[i,a]=f(null),{frequency:c,measure:d,strategy:p}=r,h=l(e),y=function(){switch(p){case Bt.Always:return!1;case Bt.BeforeDragging:return o;default:return!o}}(),g=se(y),v=u((function(e){void 0===e&&(e=[]),g.current||a((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[g]),m=l(null),b=de((t=>{if(y&&!o)return Tt;if(!t||t===Tt||h.current!==e||null!=i){const t=new Map;for(let o of e){if(!o)continue;if(i&&i.length>0&&!i.includes(o.id)&&o.rect.current){t.set(o.id,o.rect.current);continue}const e=o.node.current,n=e?new st(d(e),e):null;o.rect.current=n,n&&t.set(o.id,n)}return t}return t}),[e,i,o,y,d]);return s((()=>{h.current=e}),[e]),s((()=>{y||v()}),[o,y]),s((()=>{i&&i.length>0&&a(null)}),[JSON.stringify(i)]),s((()=>{y||"number"!=typeof c||null!==m.current||(m.current=setTimeout((()=>{v(),m.current=null}),c))}),[c,y,v,...n]),{droppableRects:b,measureDroppableContainers:v,measuringScheduled:null!=i}}(K,{dragging:R,dependencies:[A.x,A.y],config:W.droppable}),q=function(e,t){const o=null!==t?e.get(t):void 0,n=o?o.node.current:null;return de((e=>{var o;return null===t?null:null!=(o=null!=n?n:e)?o:null}),[n,t])}(B,j),G=d((()=>F?be(F):null),[F]),J=function(){const e=!1===(null==P?void 0:P.autoScrollEnabled),t="object"==typeof p?!1===p.enabled:!1===p,o=R&&!e&&!t;if("object"==typeof p)return{...p,enabled:o};return{enabled:o}}(),ee=function(e,t){return Mt(e,t)}(q,W.draggable.measure);!function(e){let{activeNode:t,measure:o,initialRect:n,config:r=!0}=e;const i=l(!1),{x:a,y:c}="boolean"==typeof r?{x:r,y:r}:r;le((()=>{if(!a&&!c||!t)return void(i.current=!1);if(i.current||!n)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=Ve(o(e),n);if(a||(r.x=0),c||(r.y=0),i.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=qe(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,a,c,n,o])}({activeNode:j?B.get(j):null,config:J.layoutShiftCompensation,initialRect:ee,measure:W.draggable.measure});const te=It(q,W.draggable.measure,ee),ne=It(q?q.parentElement:null),re=l({activatorEvent:null,active:null,activeNode:q,collisionRect:null,collisions:null,droppableRects:$,draggableNodes:B,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=T.getNodeFor(null==(t=re.current.over)?void 0:t.id),ae=Ht({measure:W.dragOverlay.measure}),ce=null!=(o=ae.nodeRef.current)?o:q,ue=R?null!=(n=ae.rect)?n:te:null,fe=Boolean(ae.nodeRef.current&&ae.rect),pe=Ve(ye=fe?null:te,Mt(ye));var ye;const ve=Ft(ce?oe(ce):null),me=function(e){const t=l(e),o=de((o=>e?o&&o!==Pt&&e&&t.current&&e.parentNode===t.current.parentNode?o:Ze(e):Pt),[e]);return s((()=>{t.current=e}),[e]),o}(R?null!=ie?ie:q:null),we=function(e,t){void 0===t&&(t=$e);const[o]=e,n=Ft(o?oe(o):null),[r,i]=h((function(){return e.length?e.map((e=>ot(e)?n:new st(t(e),e))):Ut}),Ut),a=Lt({callback:i});return e.length>0&&r===Ut&&i(),le((()=>{e.length?e.forEach((e=>null==a?void 0:a.observe(e))):(null==a||a.disconnect(),i())}),[e]),r}(me),xe=function(e,t){let{transform:o,...n}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...n})),o):o}(w,{transform:{x:A.x-pe.x,y:A.y-pe.y,scaleX:1,scaleY:1},activatorEvent:F,active:N,activeNodeRect:te,containerNodeRect:ne,draggingNodeRect:ue,over:re.current.over,overlayNodeRect:ae.rect,scrollableAncestors:me,scrollableAncestorRects:we,windowRect:ve}),ke=G?ge(G,A):null,Ee=function(e){const[t,o]=f(null),n=l(e),r=u((e=>{const t=Ge(e.target);t&&o((e=>e?(e.set(t,et(t)),new Map(e)):null))}),[]);return s((()=>{const t=n.current;if(e!==t){i(t);const a=e.map((e=>{const t=Ge(e);return t?(t.addEventListener("scroll",r,{passive:!0}),[t,et(t)]):null})).filter((e=>null!=e));o(a.length?new Map(a):null),n.current=e}return()=>{i(e),i(t)};function i(e){e.forEach((e=>{const t=Ge(e);null==t||t.removeEventListener("scroll",r)}))}}),[r,e]),d((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>ge(e,t)),Te):lt(e):Te),[e,t])}(me),Ce=zt(Ee),Oe=zt(Ee,[te]),De=ge(xe,Ce),_e=ue?We(ue,xe):null,Be=N&&_e?v({active:N,collisionRect:_e,droppableRects:$,droppableContainers:K,pointerCoordinates:ke}):null,Ae=Pe(Be,"id"),[Me,Le]=f(null),Ne=function(e,t,o){return{...e,scaleX:t&&o?t.width/o.width:1,scaleY:t&&o?t.height/o.height:1}}(fe?xe:ge(xe,Oe),null!=(i=null==Me?void 0:Me.rect)?i:null,te),Ie=u(((e,t)=>{let{sensor:o,options:n}=t;if(null==I.current)return;const r=B.get(I.current);if(!r)return;const i=e.nativeEvent,a=new o({active:I.current,activeNode:r,event:i,options:n,context:re,onStart(e){const t=I.current;if(null==t)return;const o=B.get(t);if(!o)return;const{onDragStart:n}=H.current,r={active:{id:t,data:o.data,rect:L}};m((()=>{null==n||n(r),_(eo.Initializing),C({type:je.DragStart,initialCoordinates:e,active:t}),O({type:"onDragStart",event:r})}))},onMove(e){C({type:je.DragMove,coordinates:e})},onEnd:l(je.DragEnd),onCancel:l(je.DragCancel)});function l(e){return async function(){const{active:t,collisions:o,over:n,scrollAdjustedTranslate:r}=re.current;let a=null;if(t&&r){const{cancelDrop:l}=H.current;if(a={activatorEvent:i,active:t,collisions:o,delta:r,over:n},e===je.DragEnd&&"function"==typeof l){await Promise.resolve(l(a))&&(e=je.DragCancel)}}I.current=null,m((()=>{C({type:e}),_(eo.Uninitialized),Le(null),z(null),U(null);const t=e===je.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=H.current[t];null==e||e(a),O({type:t,event:a})}}))}}m((()=>{z(a),U(e.nativeEvent)}))}),[B]),ze=u(((e,t)=>(o,n)=>{const r=o.nativeEvent,i=B.get(n);if(null!==I.current||!i||r.dndKit||r.defaultPrevented)return;const a={active:i};!0===e(o,t.options,a)&&(r.dndKit={capturedBy:t.sensor},I.current=n,Ie(o,t))}),[B,Ie]),Fe=function(e,t){return d((()=>e.reduce(((e,o)=>{const{sensor:n}=o;return[...e,...n.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,o)})))]}),[])),[e,t])}(g,ze);!function(e){s((()=>{if(!Q)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(g),le((()=>{te&&D===eo.Initializing&&_(eo.Initialized)}),[te,D]),s((()=>{const{onDragMove:e}=H.current,{active:t,activatorEvent:o,collisions:n,over:r}=re.current;if(!t||!o)return;const i={active:t,activatorEvent:o,collisions:n,delta:{x:De.x,y:De.y},over:r};m((()=>{null==e||e(i),O({type:"onDragMove",event:i})}))}),[De.x,De.y]),s((()=>{const{active:e,activatorEvent:t,collisions:o,droppableContainers:n,scrollAdjustedTranslate:r}=re.current;if(!e||null==I.current||!t||!r)return;const{onDragOver:i}=H.current,a=n.get(Ae),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,c={active:e,activatorEvent:t,collisions:o,delta:{x:r.x,y:r.y},over:l};m((()=>{Le(l),null==i||i(c),O({type:"onDragOver",event:c})}))}),[Ae]),le((()=>{re.current={activatorEvent:F,active:N,activeNode:q,collisionRect:_e,collisions:Be,droppableRects:$,draggableNodes:B,draggingNode:ce,draggingNodeRect:ue,droppableContainers:T,over:Me,scrollableAncestors:me,scrollAdjustedTranslate:De},L.current={initial:ue,translated:_e}}),[N,q,Be,_e,B,ce,ue,$,T,Me,me,De]),Rt({...J,delta:A,draggingRect:_e,pointerCoordinates:ke,scrollableAncestors:me,scrollableAncestorRects:we});const Ue=d((()=>({active:N,activeNode:q,activeNodeRect:te,activatorEvent:F,collisions:Be,containerNodeRect:ne,dragOverlay:ae,draggableNodes:B,droppableContainers:T,droppableRects:$,over:Me,measureDroppableContainers:X,scrollableAncestors:me,scrollableAncestorRects:we,measuringConfiguration:W,measuringScheduled:Z,windowRect:ve})),[N,q,te,F,Be,ne,ae,B,T,$,Me,X,me,we,W,Z,ve]),Ke=d((()=>({activatorEvent:F,activators:Fe,active:N,activeNodeRect:te,ariaDescribedById:{draggable:V},dispatch:C,draggableNodes:B,over:Me,measureDroppableContainers:X})),[F,Fe,N,te,C,V,B,Me,X]);return r.createElement(Se.Provider,{value:S},r.createElement(Xt.Provider,{value:Ke},r.createElement(Zt.Provider,{value:Ue},r.createElement(Qt.Provider,{value:Ne},y)),r.createElement(Jt,{disabled:!1===(null==c?void 0:c.restoreFocus)})),r.createElement(Re,{...c,hiddenTextDescribedById:V}))})),oo=i(null),no="button",ro="Droppable";function io(e){let{id:t,data:o,disabled:n=!1,attributes:r}=e;const i=he(ro),{activators:l,activatorEvent:c,active:s,activeNodeRect:u,ariaDescribedById:f,draggableNodes:p,over:h}=a(Xt),{role:y=no,roleDescription:g="draggable",tabIndex:v=0}=null!=r?r:{},m=(null==s?void 0:s.id)===t,b=a(m?Qt:oo),[w,x]=ue(),[k,E]=ue(),C=function(e,t){return d((()=>e.reduce(((e,o)=>{let{eventName:n,handler:r}=o;return e[n]=e=>{r(e,t)},e}),{})),[e,t])}(l,t),O=se(o);le((()=>(p.set(t,{id:t,key:i,node:w,activatorNode:k,data:O}),()=>{const e=p.get(t);e&&e.key===i&&p.delete(t)})),[p,t]);return{active:s,activatorEvent:c,activeNodeRect:u,attributes:d((()=>({role:y,tabIndex:v,"aria-disabled":n,"aria-pressed":!(!m||y!==no)||void 0,"aria-roledescription":g,"aria-describedby":f.draggable})),[n,y,v,m,g,f.draggable]),isDragging:m,listeners:n?void 0:C,node:w,over:h,setNodeRef:x,setActivatorNodeRef:E,transform:b}}const ao="Droppable",lo={timeout:25};function co(e,t,o){const n=e.slice();return n.splice(o<0?n.length+o:o,0,n.splice(t,1)[0]),n}function so(e,t){return e.reduce(((e,o,n)=>{const r=t.get(o);return r&&(e[n]=r),e}),Array(e.length))}function uo(e){return null!==e&&e>=0}const fo=e=>{let{rects:t,activeIndex:o,overIndex:n,index:r}=e;const i=co(t,n,o),a=t[r],l=i[r];return l&&a?{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}:null},po={scaleX:1,scaleY:1},ho=e=>{var t;let{activeIndex:o,activeNodeRect:n,index:r,rects:i,overIndex:a}=e;const l=null!=(t=i[o])?t:n;if(!l)return null;if(r===o){const e=i[a];return e?{x:0,y:o<a?e.top+e.height-(l.top+l.height):e.top-l.top,...po}:null}const c=function(e,t,o){const n=e[t],r=e[t-1],i=e[t+1];if(!n)return 0;if(o<t)return r?n.top-(r.top+r.height):i?i.top-(n.top+n.height):0;return i?i.top-(n.top+n.height):r?n.top-(r.top+r.height):0}(i,r,o);return r>o&&r<=a?{x:0,y:-l.height-c,...po}:r<o&&r>=a?{x:0,y:l.height+c,...po}:{x:0,y:0,...po}};const yo="Sortable",go=r.createContext({activeIndex:-1,containerId:yo,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:fo,disabled:{draggable:!1,droppable:!1}});function vo(e){let{children:t,id:o,items:n,strategy:i=fo,disabled:c=!1}=e;const{active:u,dragOverlay:f,droppableRects:p,over:h,measureDroppableContainers:y}=a(Zt),g=he(yo,o),v=Boolean(null!==f.rect),m=d((()=>n.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[n]),b=null!=u,w=u?m.indexOf(u.id):-1,x=h?m.indexOf(h.id):-1,k=l(m),E=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}(m,k.current),C=-1!==x&&-1===w||E,O=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(c);le((()=>{E&&b&&y(m)}),[E,m,b,y]),s((()=>{k.current=m}),[m]);const S=d((()=>({activeIndex:w,containerId:g,disabled:O,disableTransforms:C,items:m,overIndex:x,useDragOverlay:v,sortedRects:so(m,p),strategy:i})),[w,g,O.draggable,O.droppable,C,m,x,p,v,i]);return r.createElement(go.Provider,{value:S},t)}const mo=e=>{let{id:t,items:o,activeIndex:n,overIndex:r}=e;return co(o,n,r).indexOf(t)},bo=e=>{let{containerId:t,isSorting:o,wasDragging:n,index:r,items:i,newIndex:a,previousItems:l,previousContainerId:c,transition:s}=e;return!(!s||!n)&&((l===i||r!==a)&&(!!o||a!==r&&t===c))},wo={duration:200,easing:"ease"},xo="transform",ko=we.Transition.toString({property:xo,duration:0,easing:"linear"}),Eo={roleDescription:"sortable"};function Co(e){let{animateLayoutChanges:t=bo,attributes:o,disabled:n,data:r,getNewIndex:i=mo,id:c,strategy:p,resizeObserverConfig:h,transition:y=wo}=e;const{items:g,containerId:v,activeIndex:m,disabled:b,disableTransforms:w,sortedRects:x,overIndex:k,useDragOverlay:E,strategy:C}=a(go),O=function(e,t){var o,n;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(o=null==e?void 0:e.draggable)?o:t.draggable,droppable:null!=(n=null==e?void 0:e.droppable)?n:t.droppable}}(n,b),S=g.indexOf(c),D=d((()=>({sortable:{containerId:v,index:S,items:g},...r})),[v,r,S,g]),_=d((()=>g.slice(g.indexOf(c))),[g,c]),{rect:R,node:j,isOver:B,setNodeRef:A}=function(e){let{data:t,disabled:o=!1,id:n,resizeObserverConfig:r}=e;const i=he(ao),{active:c,dispatch:d,over:f,measureDroppableContainers:p}=a(Xt),h=l({disabled:o}),y=l(!1),g=l(null),v=l(null),{disabled:m,updateMeasurementsFor:b,timeout:w}={...lo,...r},x=se(null!=b?b:n),k=Lt({callback:u((()=>{y.current?(null!=v.current&&clearTimeout(v.current),v.current=setTimeout((()=>{p(Array.isArray(x.current)?x.current:[x.current]),v.current=null}),w)):y.current=!0}),[w]),disabled:m||!c}),E=u(((e,t)=>{k&&(t&&(k.unobserve(t),y.current=!1),e&&k.observe(e))}),[k]),[C,O]=ue(E),S=se(t);return s((()=>{k&&C.current&&(k.disconnect(),y.current=!1,k.observe(C.current))}),[C,k]),le((()=>(d({type:je.RegisterDroppable,element:{id:n,key:i,disabled:o,node:C,rect:g,data:S}}),()=>d({type:je.UnregisterDroppable,key:i,id:n}))),[n]),s((()=>{o!==h.current.disabled&&(d({type:je.SetDroppableDisabled,id:n,key:i,disabled:o}),h.current.disabled=o)}),[n,i,o,d]),{active:c,rect:g,isOver:(null==f?void 0:f.id)===n,node:C,over:f,setNodeRef:O}}({id:c,data:D,disabled:O.droppable,resizeObserverConfig:{updateMeasurementsFor:_,...h}}),{active:T,activatorEvent:M,activeNodeRect:L,attributes:N,setNodeRef:I,listeners:P,isDragging:z,over:F,setActivatorNodeRef:U,transform:H}=io({id:c,data:D,attributes:{...Eo,...o},disabled:O.draggable}),V=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return d((()=>e=>{t.forEach((t=>t(e)))}),t)}(A,I),K=Boolean(T),W=K&&!w&&uo(m)&&uo(k),Y=!E&&z,$=Y&&W?H:null,X=W?null!=$?$:(null!=p?p:C)({rects:x,activeNodeRect:L,activeIndex:m,overIndex:k,index:S}):null,Z=uo(m)&&uo(k)?i({id:c,items:g,activeIndex:m,overIndex:k}):S,q=null==T?void 0:T.id,G=l({activeId:q,items:g,newIndex:Z,containerId:v}),J=g!==G.current.items,Q=t({active:T,containerId:v,isDragging:z,isSorting:K,id:c,index:S,items:g,newIndex:G.current.newIndex,previousItems:G.current.items,previousContainerId:G.current.containerId,transition:y,wasDragging:null!=G.current.activeId}),ee=function(e){let{disabled:t,index:o,node:n,rect:r}=e;const[i,a]=f(null),c=l(o);return le((()=>{if(!t&&o!==c.current&&n.current){const e=r.current;if(e){const t=$e(n.current,{ignoreTransform:!0}),o={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(o.x||o.y)&&a(o)}}o!==c.current&&(c.current=o)}),[t,o,n,r]),s((()=>{i&&a(null)}),[i]),i}({disabled:!Q,index:S,node:j,rect:R});return s((()=>{K&&G.current.newIndex!==Z&&(G.current.newIndex=Z),v!==G.current.containerId&&(G.current.containerId=v),g!==G.current.items&&(G.current.items=g)}),[K,Z,v,g]),s((()=>{if(q===G.current.activeId)return;if(q&&!G.current.activeId)return void(G.current.activeId=q);const e=setTimeout((()=>{G.current.activeId=q}),50);return()=>clearTimeout(e)}),[q]),{active:T,activeIndex:m,attributes:N,data:D,rect:R,index:S,newIndex:Z,items:g,isOver:B,isSorting:K,isDragging:z,listeners:P,node:j,overIndex:k,over:F,setNodeRef:V,setActivatorNodeRef:U,setDroppableNodeRef:A,setDraggableNodeRef:I,transform:null!=ee?ee:X,transition:function(){if(ee||J&&G.current.newIndex===S)return ko;if(Y&&!me(M)||!y)return;if(K||Q)return we.Transition.toString({...y,property:xo});return}()}}function Oo(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const So=[pt.Down,pt.Right,pt.Up,pt.Left],Do=(e,t)=>{let{context:{active:o,collisionRect:n,droppableRects:r,droppableContainers:i,over:a,scrollableAncestors:l}}=t;if(So.includes(e.code)){if(e.preventDefault(),!o||!n)return;const t=[];i.getEnabled().forEach((o=>{if(!o||null!=o&&o.disabled)return;const i=r.get(o.id);if(i)switch(e.code){case pt.Down:n.top<i.top&&t.push(o);break;case pt.Up:n.top>i.top&&t.push(o);break;case pt.Left:n.left>i.left&&t.push(o);break;case pt.Right:n.left<i.left&&t.push(o)}}));const c=(e=>{let{collisionRect:t,droppableRects:o,droppableContainers:n}=e;const r=Ie(t),i=[];for(const e of n){const{id:t}=e,n=o.get(t);if(n){const o=Ie(n),a=r.reduce(((e,t,n)=>e+Me(o[n],t)),0),l=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:l}})}}return i.sort(Le)})({active:o,collisionRect:n,droppableRects:r,droppableContainers:t,pointerCoordinates:null});let s=Pe(c,"id");if(s===(null==a?void 0:a.id)&&c.length>1&&(s=c[1].id),null!=s){const e=i.get(o.id),t=i.get(s),a=t?r.get(t.id):null,c=null==t?void 0:t.node.current;if(c&&a&&e&&t){const o=Ze(c).some(((e,t)=>l[t]!==e)),r=_o(e,t),i=function(e,t){if(!Oo(e)||!Oo(t))return!1;if(!_o(e,t))return!1;return e.data.current.sortable.index<t.data.current.sortable.index}(e,t),s=o||!r?{x:0,y:0}:{x:i?n.width-a.width:0,y:i?n.height-a.height:0},d={x:a.left,y:a.top};return s.x&&s.y?d:ve(d,s)}}}};function _o(e,t){return!(!Oo(e)||!Oo(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}var Ro;function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},jo.apply(this,arguments)}var Bo,Ao=function(e){return n.createElement("svg",jo({viewBox:"0 0 10 10",fill:"currentColor",style:{width:14,height:14,display:"block",flexShrink:0,backfaceVisibility:"hidden"}},e),Ro||(Ro=n.createElement("path",{d:"M3 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm4-8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"})))};function To(){return To=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},To.apply(this,arguments)}var Mo=function(e){return n.createElement("svg",To({viewBox:"0 0 16 16",fill:"currentColor",style:{width:16,height:16,display:"block",flexShrink:0,backfaceVisibility:"hidden"}},e),Bo||(Bo=n.createElement("path",{d:"M7.977 14.963c.407 0 .747-.324.747-.723V8.72h5.362c.399 0 .74-.34.74-.747a.746.746 0 0 0-.74-.738H8.724V1.706c0-.398-.34-.722-.747-.722a.732.732 0 0 0-.739.722v5.529h-5.37a.746.746 0 0 0-.74.738c0 .407.341.747.74.747h5.37v5.52c0 .399.332.723.739.723z"})))};function Lo(e,t={}){const o=Object.keys(e.children),{at:n=e.selection}=t,r=o.find((t=>e.children[t].meta.order===(null==n?void 0:n[0])));if(r)return e.blockEditorsMap[r]}function No(e){return zo(e)?(e.nodeName||"").toLowerCase():"#document"}function Io(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Po(e){var t;return null==(t=(zo(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function zo(e){return e instanceof Node||e instanceof Io(e).Node}function Fo(e){return e instanceof Element||e instanceof Io(e).Element}function Uo(e){return e instanceof HTMLElement||e instanceof Io(e).HTMLElement}function Ho(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Io(e).ShadowRoot)}function Vo(e){const{overflow:t,overflowX:o,overflowY:n,display:r}=Xo(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!["inline","contents"].includes(r)}function Ko(e){return["table","td","th"].includes(No(e))}function Wo(e){const t=Yo(),o=Xo(e);return"none"!==o.transform||"none"!==o.perspective||!!o.containerType&&"normal"!==o.containerType||!t&&!!o.backdropFilter&&"none"!==o.backdropFilter||!t&&!!o.filter&&"none"!==o.filter||["transform","perspective","filter"].some((e=>(o.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(o.contain||"").includes(e)))}function Yo(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $o(e){return["html","body","#document"].includes(No(e))}function Xo(e){return Io(e).getComputedStyle(e)}function Zo(e){return Fo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function qo(e){if("html"===No(e))return e;const t=e.assignedSlot||e.parentNode||Ho(e)&&e.host||Po(e);return Ho(t)?t.host:t}function Go(e){const t=qo(e);return $o(t)?e.ownerDocument?e.ownerDocument.body:e.body:Uo(t)&&Vo(t)?t:Go(t)}function Jo(e,t,o){var n;void 0===t&&(t=[]),void 0===o&&(o=!0);const r=Go(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=Io(r);return i?t.concat(a,a.visualViewport||[],Vo(r)?r:[],a.frameElement&&o?Jo(a.frameElement):[]):t.concat(r,Jo(r,[],o))}const Qo=Math.min,en=Math.max,tn=Math.round,on=Math.floor,nn=e=>({x:e,y:e}),rn={left:"right",right:"left",bottom:"top",top:"bottom"},an={start:"end",end:"start"};function ln(e,t,o){return en(e,Qo(t,o))}function cn(e,t){return"function"==typeof e?e(t):e}function sn(e){return e.split("-")[0]}function dn(e){return e.split("-")[1]}function un(e){return"x"===e?"y":"x"}function fn(e){return"y"===e?"height":"width"}function pn(e){return["top","bottom"].includes(sn(e))?"y":"x"}function hn(e){return un(pn(e))}function yn(e){return e.replace(/start|end/g,(e=>an[e]))}function gn(e){return e.replace(/left|right|bottom|top/g,(e=>rn[e]))}function vn(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function mn(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function bn(e,t,o){let{reference:n,floating:r}=e;const i=pn(t),a=hn(t),l=fn(a),c=sn(t),s="y"===i,d=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2,f=n[l]/2-r[l]/2;let p;switch(c){case"top":p={x:d,y:n.y-r.height};break;case"bottom":p={x:d,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-r.width,y:u};break;default:p={x:n.x,y:n.y}}switch(dn(t)){case"start":p[a]-=f*(o&&s?-1:1);break;case"end":p[a]+=f*(o&&s?-1:1)}return p}async function wn(e,t){var o;void 0===t&&(t={});const{x:n,y:r,platform:i,rects:a,elements:l,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=cn(t,e),h=vn(p),y=l[f?"floating"===u?"reference":"floating":u],g=mn(await i.getClippingRect({element:null==(o=await(null==i.isElement?void 0:i.isElement(y)))||o?y:y.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:d,strategy:c})),v="floating"===u?{...a.floating,x:n,y:r}:a.reference,m=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(m))&&await(null==i.getScale?void 0:i.getScale(m))||{x:1,y:1},w=mn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:m,strategy:c}):v);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function xn(e){const t=Qo(...e.map((e=>e.left))),o=Qo(...e.map((e=>e.top)));return{x:t,y:o,width:en(...e.map((e=>e.right)))-t,height:en(...e.map((e=>e.bottom)))-o}}const kn=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:r,y:i,placement:a,middlewareData:l}=t,c=await async function(e,t){const{placement:o,platform:n,elements:r}=e,i=await(null==n.isRTL?void 0:n.isRTL(r.floating)),a=sn(o),l=dn(o),c="y"===pn(o),s=["left","top"].includes(a)?-1:1,d=i&&c?-1:1,u=cn(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),c?{x:p*d,y:f*s}:{x:f*s,y:p*d}}(t,e);return a===(null==(o=l.offset)?void 0:o.placement)&&null!=(n=l.arrow)&&n.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:a}}}}};function En(e){const t=Xo(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=Uo(e),i=r?e.offsetWidth:o,a=r?e.offsetHeight:n,l=tn(o)!==i||tn(n)!==a;return l&&(o=i,n=a),{width:o,height:n,$:l}}function Cn(e){return Fo(e)?e:e.contextElement}function On(e){const t=Cn(e);if(!Uo(t))return nn(1);const o=t.getBoundingClientRect(),{width:n,height:r,$:i}=En(t);let a=(i?tn(o.width):o.width)/n,l=(i?tn(o.height):o.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const Sn=nn(0);function Dn(e){const t=Io(e);return Yo()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Sn}function _n(e,t,o,n){void 0===t&&(t=!1),void 0===o&&(o=!1);const r=e.getBoundingClientRect(),i=Cn(e);let a=nn(1);t&&(n?Fo(n)&&(a=On(n)):a=On(e));const l=function(e,t,o){return void 0===t&&(t=!1),!(!o||t&&o!==Io(e))&&t}(i,o,n)?Dn(i):nn(0);let c=(r.left+l.x)/a.x,s=(r.top+l.y)/a.y,d=r.width/a.x,u=r.height/a.y;if(i){const e=Io(i),t=n&&Fo(n)?Io(n):n;let o=e,r=o.frameElement;for(;r&&n&&t!==o;){const e=On(r),t=r.getBoundingClientRect(),n=Xo(r),i=t.left+(r.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(r.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,s*=e.y,d*=e.x,u*=e.y,c+=i,s+=a,o=Io(r),r=o.frameElement}}return mn({width:d,height:u,x:c,y:s})}const Rn=[":popover-open",":modal"];function jn(e){return Rn.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Bn(e){return _n(Po(e)).left+Zo(e).scrollLeft}function An(e,t,o){let n;if("viewport"===t)n=function(e,t){const o=Io(e),n=Po(e),r=o.visualViewport;let i=n.clientWidth,a=n.clientHeight,l=0,c=0;if(r){i=r.width,a=r.height;const e=Yo();(!e||e&&"fixed"===t)&&(l=r.offsetLeft,c=r.offsetTop)}return{width:i,height:a,x:l,y:c}}(e,o);else if("document"===t)n=function(e){const t=Po(e),o=Zo(e),n=e.ownerDocument.body,r=en(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=en(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-o.scrollLeft+Bn(e);const l=-o.scrollTop;return"rtl"===Xo(n).direction&&(a+=en(t.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:l}}(Po(e));else if(Fo(t))n=function(e,t){const o=_n(e,!0,"fixed"===t),n=o.top+e.clientTop,r=o.left+e.clientLeft,i=Uo(e)?On(e):nn(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:n*i.y}}(t,o);else{const o=Dn(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return mn(n)}function Tn(e,t){const o=qo(e);return!(o===t||!Fo(o)||$o(o))&&("fixed"===Xo(o).position||Tn(o,t))}function Mn(e,t,o){const n=Uo(t),r=Po(t),i="fixed"===o,a=_n(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=nn(0);if(n||!n&&!i)if(("body"!==No(t)||Vo(r))&&(l=Zo(t)),n){const e=_n(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&(c.x=Bn(r));return{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function Ln(e,t){return Uo(e)&&"fixed"!==Xo(e).position?t?t(e):e.offsetParent:null}function Nn(e,t){const o=Io(e);if(!Uo(e)||jn(e))return o;let n=Ln(e,t);for(;n&&Ko(n)&&"static"===Xo(n).position;)n=Ln(n,t);return n&&("html"===No(n)||"body"===No(n)&&"static"===Xo(n).position&&!Wo(n))?o:n||function(e){let t=qo(e);for(;Uo(t)&&!$o(t);){if(Wo(t))return t;t=qo(t)}return null}(e)||o}const In={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e;const i="fixed"===r,a=Po(n),l=!!t&&jn(t.floating);if(n===a||l&&i)return o;let c={scrollLeft:0,scrollTop:0},s=nn(1);const d=nn(0),u=Uo(n);if((u||!u&&!i)&&(("body"!==No(n)||Vo(a))&&(c=Zo(n)),Uo(n))){const e=_n(n);s=On(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}return{width:o.width*s.x,height:o.height*s.y,x:o.x*s.x-c.scrollLeft*s.x+d.x,y:o.y*s.y-c.scrollTop*s.y+d.y}},getDocumentElement:Po,getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e;const i=[..."clippingAncestors"===o?function(e,t){const o=t.get(e);if(o)return o;let n=Jo(e,[],!1).filter((e=>Fo(e)&&"body"!==No(e))),r=null;const i="fixed"===Xo(e).position;let a=i?qo(e):e;for(;Fo(a)&&!$o(a);){const t=Xo(a),o=Wo(a);o||"fixed"!==t.position||(r=null),(i?!o&&!r:!o&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||Vo(a)&&!o&&Tn(e,a))?n=n.filter((e=>e!==a)):r=t,a=qo(a)}return t.set(e,n),n}(t,this._c):[].concat(o),n],a=i[0],l=i.reduce(((e,o)=>{const n=An(t,o,r);return e.top=en(n.top,e.top),e.right=Qo(n.right,e.right),e.bottom=Qo(n.bottom,e.bottom),e.left=en(n.left,e.left),e}),An(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Nn,getElementRects:async function(e){const t=this.getOffsetParent||Nn,o=this.getDimensions;return{reference:Mn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await o(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:o}=En(e);return{width:t,height:o}},getScale:On,isElement:Fo,isRTL:function(e){return"rtl"===Xo(e).direction}};function Pn(e,t,o,n){void 0===n&&(n={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=n,s=Cn(e),d=r||i?[...s?Jo(s):[],...Jo(t)]:[];d.forEach((e=>{r&&e.addEventListener("scroll",o,{passive:!0}),i&&e.addEventListener("resize",o)}));const u=s&&l?function(e,t){let o,n=null;const r=Po(e);function i(){var e;clearTimeout(o),null==(e=n)||e.disconnect(),n=null}return function a(l,c){void 0===l&&(l=!1),void 0===c&&(c=1),i();const{left:s,top:d,width:u,height:f}=e.getBoundingClientRect();if(l||t(),!u||!f)return;const p={rootMargin:-on(d)+"px "+-on(r.clientWidth-(s+u))+"px "+-on(r.clientHeight-(d+f))+"px "+-on(s)+"px",threshold:en(0,Qo(1,c))||1};let h=!0;function y(e){const t=e[0].intersectionRatio;if(t!==c){if(!h)return a();t?a(!1,t):o=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{n=new IntersectionObserver(y,{...p,root:r.ownerDocument})}catch(e){n=new IntersectionObserver(y,p)}n.observe(e)}(!0),i}(s,o):null;let f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[n]=e;n&&n.target===s&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),o()})),s&&!c&&h.observe(s),h.observe(t));let y=c?_n(e):null;return c&&function t(){const n=_n(e);!y||n.x===y.x&&n.y===y.y&&n.width===y.width&&n.height===y.height||o();y=n,f=requestAnimationFrame(t)}(),o(),()=>{var e;d.forEach((e=>{r&&e.removeEventListener("scroll",o),i&&e.removeEventListener("resize",o)})),null==u||u(),null==(e=h)||e.disconnect(),h=null,c&&cancelAnimationFrame(f)}}const zn=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:o}=e;return{x:t,y:o}}},...c}=cn(e,t),s={x:o,y:n},d=await wn(t,c),u=pn(sn(r)),f=un(u);let p=s[f],h=s[u];if(i){const e="y"===f?"bottom":"right";p=ln(p+d["y"===f?"top":"left"],p,p-d[e])}if(a){const e="y"===u?"bottom":"right";h=ln(h+d["y"===u?"top":"left"],h,h-d[e])}const y=l.fn({...t,[f]:p,[u]:h});return{...y,data:{x:y.x-o,y:y.y-n}}}}},Fn=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:r,middlewareData:i,rects:a,initialPlacement:l,platform:c,elements:s}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:y=!0,...g}=cn(e,t);if(null!=(o=i.arrow)&&o.alignmentOffset)return{};const v=sn(r),m=sn(l)===l,b=await(null==c.isRTL?void 0:c.isRTL(s.floating)),w=f||(m||!y?[gn(l)]:function(e){const t=gn(e);return[yn(e),t,yn(t)]}(l));f||"none"===h||w.push(...function(e,t,o,n){const r=dn(e);let i=function(e,t,o){const n=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return o?t?r:n:t?n:r;case"left":case"right":return t?i:a;default:return[]}}(sn(e),"start"===o,n);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(yn)))),i}(l,y,h,b));const x=[l,...w],k=await wn(t,g),E=[];let C=(null==(n=i.flip)?void 0:n.overflows)||[];if(d&&E.push(k[v]),u){const e=function(e,t,o){void 0===o&&(o=!1);const n=dn(e),r=hn(e),i=fn(r);let a="x"===r?n===(o?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=gn(a)),[a,gn(a)]}(r,a,b);E.push(k[e[0]],k[e[1]])}if(C=[...C,{placement:r,overflows:E}],!E.every((e=>e<=0))){var O,S;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let o=null==(S=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!o)switch(p){case"bestFit":{var D;const e=null==(D=C.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(o=e);break}case"initialPlacement":o=l}if(r!==o)return{reset:{placement:o}}}return{}}}},Un=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:o,elements:n,rects:r,platform:i,strategy:a}=t,{padding:l=2,x:c,y:s}=cn(e,t),d=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(n.reference))||[]),u=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),o=[];let n=null;for(let e=0;e<t.length;e++){const r=t[e];!n||r.y-n.y>n.height/2?o.push([r]):o[o.length-1].push(r),n=r}return o.map((e=>mn(xn(e))))}(d),f=mn(xn(d)),p=vn(l);const h=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=c&&null!=s)return u.find((e=>c>e.left-p.left&&c<e.right+p.right&&s>e.top-p.top&&s<e.bottom+p.bottom))||f;if(u.length>=2){if("y"===pn(o)){const e=u[0],t=u[u.length-1],n="top"===sn(o),r=e.top,i=t.bottom,a=n?e.left:t.left,l=n?e.right:t.right;return{top:r,bottom:i,left:a,right:l,width:l-a,height:i-r,x:a,y:r}}const e="left"===sn(o),t=en(...u.map((e=>e.right))),n=Qo(...u.map((e=>e.left))),r=u.filter((o=>e?o.left===n:o.right===t)),i=r[0].top,a=r[r.length-1].bottom;return{top:i,bottom:a,left:n,right:t,width:t-n,height:a-i,x:n,y:i}}return f}},floating:n.floating,strategy:a});return r.reference.x!==h.reference.x||r.reference.y!==h.reference.y||r.reference.width!==h.reference.width||r.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Hn=(e,t,o)=>{const n=new Map,r={platform:In,...o},i={...r.platform,_c:n};return(async(e,t,o)=>{const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:a}=o,l=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(t));let s=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:u}=bn(s,n,c),f=n,p={},h=0;for(let o=0;o<l.length;o++){const{name:i,fn:y}=l[o],{x:g,y:v,data:m,reset:b}=await y({x:d,y:u,initialPlacement:n,placement:f,strategy:r,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=v?v:u,p={...p,[i]:{...p[i],...m}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(s=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:r}):b.rects),({x:d,y:u}=bn(s,f,c))),o=-1)}return{x:d,y:u,placement:f,strategy:r,middlewareData:p}})(e,t,{...r,platform:i})};var Vn="undefined"!=typeof document?c:s;function Kn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let o,n,r;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;0!=n--;)if(!Kn(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(t).length)return!1;for(n=o;0!=n--;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=o;0!=n--;){const o=r[n];if(("_owner"!==o||!e.$$typeof)&&!Kn(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function Wn(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yn(e,t){const o=Wn(e);return Math.round(t*o)/o}function $n(e){const t=n.useRef(e);return Vn((()=>{t.current=e})),t}
1
+ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as o from"react";import r,{createContext as i,useContext as a,useRef as l,useLayoutEffect as c,useEffect as s,useMemo as d,useCallback as u,useState as f,memo as p,useReducer as h,forwardRef as y,createElement as g}from"react";import*as v from"react-dom";import{unstable_batchedUpdates as m,createPortal as b}from"react-dom";import{ReactEditor as w,useSelected as x,Slate as k,Editable as E,DefaultElement as C,withReact as O}from"slate-react";import{Path as S,Editor as D,Element as _,Transforms as R,Range as j,Text as B,createEditor as A,Point as T}from"slate";class L{constructor(e){this.plugin=e}get getPlugin(){return this.plugin}extend(e){const{renders:t,options:n}=e,o=Object.assign(Object.assign({},this.plugin.options),n),r=Object.assign({},this.plugin.elements);return t&&Object.keys(t).forEach((e=>{const n=r[e];n&&n.render&&(r[e].render=n=>t[e](n))})),new L(Object.assign(Object.assign({},this.plugin),{elements:r,options:o}))}}function N(e,t={}){const n=Object.keys(e.children),{at:o=e.selection}=t,r=n.find((t=>e.children[t].meta.order===(null==o?void 0:o[0])));return r?e.children[r]:null}const M={editor:{getBlock:()=>{},insertBlock:()=>{},insertBlocks:()=>{},updateBlock:()=>{},moveBlock:()=>{},splitBlock:()=>{},deleteBlock:()=>{},toggleBlock:()=>{},focusBlock:()=>{},setSelection:()=>{},applyChanges:()=>{},decreaseBlockDepth:()=>{},increaseBlockDepth:()=>{},setBlockSelected:()=>{},selectedBlocks:[],duplicateBlock:()=>{},getEditorValue:()=>{},blur:()=>{},blocks:{},shortcuts:{},plugins:{},formats:{},selection:null,readOnly:!1,blockEditorsMap:{},children:{},emit:()=>{},on:()=>{},off:()=>{},once:()=>{}}},I=i(M),P=({children:t,editorState:n})=>{const o=l(M);return o.current={editor:n.editor},e(I.Provider,Object.assign({value:o.current},{children:t}))},F=()=>{const e=a(I);if(!e)throw new Error("useYooptaEditor must be used within a YooptaEditorContext");return e.editor},z=e=>F().children[e],U=e=>F().blocks[e],H=e=>F().plugins[e],V=()=>F().readOnly,K=e=>{var t;return null===(t=H(e))||void 0===t?void 0:t.options},W=({blockId:e,path:t})=>{var n;const o=F();if(!e&&!t)throw new Error("useBlockSelected must receive either blockId or path");let r;return e&&(r=o.children[e]),t&&(r=N(o,{at:t})),(null===(n=o.selection)||void 0===n?void 0:n[0])===(null==r?void 0:r.meta.order)};var Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},$={};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function o(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,o,i,a){if("function"!=typeof o)throw new TypeError("The listener must be a function");var l=new r(o,i||e,a),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],l]:e._events[c].push(l):(e._events[c]=l,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function l(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(n=!1)),l.prototype.eventNames=function(){var e,o,r=[];if(0===this._eventsCount)return r;for(o in e=this._events)t.call(e,o)&&r.push(n?o.slice(1):o);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},l.prototype.listeners=function(e){var t=n?n+e:e,o=this._events[t];if(!o)return[];if(o.fn)return[o.fn];for(var r=0,i=o.length,a=new Array(i);r<i;r++)a[r]=o[r].fn;return a},l.prototype.listenerCount=function(e){var t=n?n+e:e,o=this._events[t];return o?o.fn?1:o.length:0},l.prototype.emit=function(e,t,o,r,i,a){var l=n?n+e:e;if(!this._events[l])return!1;var c,s,d=this._events[l],u=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),u){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,o),!0;case 4:return d.fn.call(d.context,t,o,r),!0;case 5:return d.fn.call(d.context,t,o,r,i),!0;case 6:return d.fn.call(d.context,t,o,r,i,a),!0}for(s=1,c=new Array(u-1);s<u;s++)c[s-1]=arguments[s];d.fn.apply(d.context,c)}else{var f,p=d.length;for(s=0;s<p;s++)switch(d[s].once&&this.removeListener(e,d[s].fn,void 0,!0),u){case 1:d[s].fn.call(d[s].context);break;case 2:d[s].fn.call(d[s].context,t);break;case 3:d[s].fn.call(d[s].context,t,o);break;case 4:d[s].fn.call(d[s].context,t,o,r);break;default:if(!c)for(f=1,c=new Array(u-1);f<u;f++)c[f-1]=arguments[f];d[s].fn.apply(d[s].context,c)}}return!0},l.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},l.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},l.prototype.removeListener=function(e,t,o,r){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var l=this._events[i];if(l.fn)l.fn!==t||r&&!l.once||o&&l.context!==o||a(this,i);else{for(var c=0,s=[],d=l.length;c<d;c++)(l[c].fn!==t||r&&!l[c].once||o&&l[c].context!==o)&&s.push(l[c]);s.length?this._events[i]=1===s.length?s[0]:s:a(this,i)}return this},l.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new o,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l}({get exports(){return $},set exports(e){$=e}});var X=$;function Z(){let e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}const q=()=>{var e,t;return"undefined"==typeof window||"function"!=typeof(null===(e=window.crypto)||void 0===e?void 0:e.randomUUID)?Z():null===(t=window.crypto)||void 0===t?void 0:t.randomUUID()},G=e=>({id:q(),type:(null==e?void 0:e.type)||"paragraph",children:(null==e?void 0:e.children)||[{text:""}],props:Object.assign({nodeType:"block"},null==e?void 0:e.props)}),J=e=>({id:(null==e?void 0:e.id)||q(),value:(null==e?void 0:e.value)||[G()],type:(null==e?void 0:e.type)||"Paragraph",meta:Object.assign({order:0,depth:0},null==e?void 0:e.meta)});const Q="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ee(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function te(e){return"nodeType"in e}function ne(e){var t,n;return e?ee(e)?e:te(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function oe(e){const{Document:t}=ne(e);return e instanceof t}function re(e){return!ee(e)&&e instanceof ne(e).HTMLElement}function ie(e){return e instanceof ne(e).SVGElement}function ae(e){return e?ee(e)?e.document:te(e)?oe(e)?e:re(e)||ie(e)?e.ownerDocument:document:document:document}const le=Q?c:s;function ce(e){const t=l(e);return le((()=>{t.current=e})),u((function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)}),[])}function se(e,t){void 0===t&&(t=[e]);const n=l(e);return le((()=>{n.current!==e&&(n.current=e)}),t),n}function de(e,t){const n=l();return d((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function ue(e){const t=ce(e),n=l(null),o=u((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function fe(e){const t=l();return s((()=>{t.current=e}),[e]),t.current}let pe={};function he(e,t){return d((()=>{if(t)return t;const n=null==pe[e]?0:pe[e]+1;return pe[e]=n,e+"-"+n}),[e,t])}function ye(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>{const o=Object.entries(n);for(const[n,r]of o){const o=t[n];null!=o&&(t[n]=o+e*r)}return t}),{...t})}}const ge=ye(1),ve=ye(-1);function me(e){if(!e)return!1;const{KeyboardEvent:t}=ne(e.target);return t&&e instanceof t}function be(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=ne(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const we=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[we.Translate.toString(e),we.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),xe="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ke(e){return e.matches(xe)?e:e.querySelector(xe)}const Ee={display:"none"};function Ce(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:Ee},n)}function Oe(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;return r.createElement("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":o,"aria-atomic":!0},n)}const Se=i(null);const De={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},_e={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Re(e){let{announcements:t=_e,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=De}=e;const{announce:l,announcement:c}=function(){const[e,t]=f("");return{announce:u((e=>{null!=e&&t(e)}),[]),announcement:e}}(),p=he("DndLiveRegion"),[h,y]=f(!1);if(s((()=>{y(!0)}),[]),function(e){const t=a(Se);s((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}(d((()=>({onDragStart(e){let{active:n}=e;l(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:o}=e;t.onDragMove&&l(t.onDragMove({active:n,over:o}))},onDragOver(e){let{active:n,over:o}=e;l(t.onDragOver({active:n,over:o}))},onDragEnd(e){let{active:n,over:o}=e;l(t.onDragEnd({active:n,over:o}))},onDragCancel(e){let{active:n,over:o}=e;l(t.onDragCancel({active:n,over:o}))}})),[l,t])),!h)return null;const g=r.createElement(r.Fragment,null,r.createElement(Ce,{id:o,value:i.draggable}),r.createElement(Oe,{id:p,announcement:c}));return n?b(g,n):g}var je;function Be(){}function Ae(e,t){return d((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(je||(je={}));const Te=Object.freeze({x:0,y:0});function Le(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ne(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function Me(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function Ie(e){let{left:t,top:n,height:o,width:r}=e;return[{x:t,y:n},{x:t+r,y:n},{x:t,y:n+o},{x:t+r,y:n+o}]}function Pe(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function Fe(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const ze=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=Fe(t,t.left,t.top),i=[];for(const e of o){const{id:t}=e,o=n.get(t);if(o){const n=Le(Fe(o),r);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(Ne)};function Ue(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=r-o,l=i-n;if(o<r&&n<i){const n=t.width*t.height,o=e.width*e.height,r=a*l;return Number((r/(n+o-r)).toFixed(4))}return 0}const He=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const e of o){const{id:o}=e,i=n.get(o);if(i){const n=Ue(i,t);n>0&&r.push({id:o,data:{droppableContainer:e,value:n}})}}return r.sort(Me)};function Ve(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Te}function Ke(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const We=Ke(1);const Ye={ignoreTransform:!1};function $e(e,t){void 0===t&&(t=Ye);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:o}=ne(e).getComputedStyle(e);t&&(n=function(e,t,n){const o=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!o)return e;const{scaleX:r,scaleY:i,x:a,y:l}=o,c=e.left-a-(1-r)*parseFloat(n),s=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=r?e.width/r:e.width,u=i?e.height/i:e.height;return{width:d,height:u,top:s,right:c+d,bottom:s+u,left:c}}(n,t,o))}const{top:o,left:r,width:i,height:a,bottom:l,right:c}=n;return{top:o,left:r,width:i,height:a,bottom:l,right:c}}function Xe(e){return $e(e,{ignoreTransform:!0})}function Ze(e,t){const n=[];return e?function o(r){if(null!=t&&n.length>=t)return n;if(!r)return n;if(oe(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!re(r)||ie(r))return n;if(n.includes(r))return n;const i=ne(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=ne(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const o=t[e];return"string"==typeof o&&n.test(o)}))}(r,i)&&n.push(r),function(e,t){return void 0===t&&(t=ne(e).getComputedStyle(e)),"fixed"===t.position}(r,i)?n:o(r.parentNode)}(e):n}function qe(e){const[t]=Ze(e,1);return null!=t?t:null}function Ge(e){return Q&&e?ee(e)?e:te(e)?oe(e)||e===ae(e).scrollingElement?window:re(e)?e:null:null:null}function Je(e){return ee(e)?e.scrollX:e.scrollLeft}function Qe(e){return ee(e)?e.scrollY:e.scrollTop}function et(e){return{x:Je(e),y:Qe(e)}}var tt;function nt(e){return!(!Q||!e)&&e===document.scrollingElement}function ot(e){const t={x:0,y:0},n=nt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=o.y,isRight:e.scrollLeft>=o.x,maxScroll:o,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(tt||(tt={}));const rt={x:.2,y:.2};function it(e,t,n,o,r){let{top:i,left:a,right:l,bottom:c}=n;void 0===o&&(o=10),void 0===r&&(r=rt);const{isTop:s,isBottom:d,isLeft:u,isRight:f}=ot(e),p={x:0,y:0},h={x:0,y:0},y=t.height*r.y,g=t.width*r.x;return!s&&i<=t.top+y?(p.y=tt.Backward,h.y=o*Math.abs((t.top+y-i)/y)):!d&&c>=t.bottom-y&&(p.y=tt.Forward,h.y=o*Math.abs((t.bottom-y-c)/y)),!f&&l>=t.right-g?(p.x=tt.Forward,h.x=o*Math.abs((t.right-g-l)/g)):!u&&a<=t.left+g&&(p.x=tt.Backward,h.x=o*Math.abs((t.left+g-a)/g)),{direction:p,speed:h}}function at(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function lt(e){return e.reduce(((e,t)=>ge(e,et(t))),Te)}const ct=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Je(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+Qe(t)),0)}]];class st{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Ze(t),o=lt(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of ct)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=r(n),a=o[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class dt{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var o;null==(o=this.target)||o.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ut(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t&&o>t.y}var ft,pt;function ht(e){e.preventDefault()}function yt(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ft||(ft={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(pt||(pt={}));const gt={start:[pt.Space,pt.Enter],cancel:[pt.Esc],end:[pt.Space,pt.Enter]},vt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case pt.Right:return{...n,x:n.x+25};case pt.Left:return{...n,x:n.x-25};case pt.Down:return{...n,y:n.y+25};case pt.Up:return{...n,y:n.y-25}}};class mt{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new dt(ae(t)),this.windowListeners=new dt(ne(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ft.Resize,this.handleCancel),this.windowListeners.add(ft.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(ft.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=$e),!e)return;const{top:n,left:o,bottom:r,right:i}=t(e);qe(e)&&(r<=0||i<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Te)}handleKeyDown(e){if(me(e)){const{active:t,context:n,options:o}=this.props,{keyboardCodes:r=gt,coordinateGetter:i=vt,scrollBehavior:a="smooth"}=o,{code:l}=e;if(r.end.includes(l))return void this.handleEnd(e);if(r.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:c}=n.current,s=c?{x:c.left,y:c.top}:Te;this.referenceCoordinates||(this.referenceCoordinates=s);const d=i(e,{active:t,context:n.current,currentCoordinates:s});if(d){const t=ve(d,s),o={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:i,isRight:l,isLeft:c,isBottom:s,maxScroll:u,minScroll:f}=ot(n),p=at(n),h={x:Math.min(r===pt.Right?p.right-p.width/2:p.right,Math.max(r===pt.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(r===pt.Down?p.bottom-p.height/2:p.bottom,Math.max(r===pt.Down?p.top:p.top+p.height/2,d.y))},y=r===pt.Right&&!l||r===pt.Left&&!c,g=r===pt.Down&&!s||r===pt.Up&&!i;if(y&&h.x!==d.x){const e=n.scrollLeft+t.x,i=r===pt.Right&&e<=u.x||r===pt.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});o.x=i?n.scrollLeft-e:r===pt.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,o.x&&n.scrollBy({left:-o.x,behavior:a});break}if(g&&h.y!==d.y){const e=n.scrollTop+t.y,i=r===pt.Down&&e<=u.y||r===pt.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});o.y=i?n.scrollTop-e:r===pt.Down?n.scrollTop-u.y:n.scrollTop-f.y,o.y&&n.scrollBy({top:-o.y,behavior:a});break}}this.handleMove(e,ge(ve(d,this.referenceCoordinates),o))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function bt(e){return Boolean(e&&"distance"in e)}function wt(e){return Boolean(e&&"delay"in e)}mt.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=gt,onActivation:r}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(o.start.includes(a)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class xt{constructor(e,t,n){var o;void 0===n&&(n=function(e){const{EventTarget:t}=ne(e);return e instanceof t?e:ae(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=ae(i),this.documentListeners=new dt(this.document),this.listeners=new dt(n),this.windowListeners=new dt(ne(i)),this.initialCoordinates=null!=(o=be(r))?o:Te,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(ft.Resize,this.handleCancel),this.windowListeners.add(ft.DragStart,ht),this.windowListeners.add(ft.VisibilityChange,this.handleCancel),this.windowListeners.add(ft.ContextMenu,ht),this.documentListeners.add(ft.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(wt(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(bt(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ft.Click,yt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ft.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:o,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!o)return;const l=null!=(t=be(e))?t:Te,c=ve(o,l);if(!n&&a){if(bt(a)){if(null!=a.tolerance&&ut(c,a.tolerance))return this.handleCancel();if(ut(c,a.distance))return this.handleStart()}return wt(a)&&ut(c,a.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),i(l)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===pt.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const kt={move:{name:"pointermove"},end:{name:"pointerup"}};class Et extends xt{constructor(e){const{event:t}=e,n=ae(t.target);super(e,kt,n)}}Et.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!(!n.isPrimary||0!==n.button)&&(null==o||o({event:n}),!0)}}];const Ct={move:{name:"mousemove"},end:{name:"mouseup"}};var Ot;!function(e){e[e.RightClick=2]="RightClick"}(Ot||(Ot={}));(class extends xt{constructor(e){super(e,Ct,ae(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button!==Ot.RightClick&&(null==o||o({event:n}),!0)}}];const St={move:{name:"touchmove"},end:{name:"touchend"}};var Dt,_t;function Rt(e){let{acceleration:t,activator:n=Dt.Pointer,canScroll:o,draggingRect:r,enabled:i,interval:a=5,order:c=_t.TreeOrder,pointerCoordinates:f,scrollableAncestors:p,scrollableAncestorRects:h,delta:y,threshold:g}=e;const v=function(e){let{delta:t,disabled:n}=e;const o=fe(t);return de((e=>{if(n||!o||!e)return jt;const r={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[tt.Backward]:e.x[tt.Backward]||-1===r.x,[tt.Forward]:e.x[tt.Forward]||1===r.x},y:{[tt.Backward]:e.y[tt.Backward]||-1===r.y,[tt.Forward]:e.y[tt.Forward]||1===r.y}}}),[n,t,o])}({delta:y,disabled:!i}),[m,b]=function(){const e=l(null);return[u(((t,n)=>{e.current=setInterval(t,n)}),[]),u((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),w=l({x:0,y:0}),x=l({x:0,y:0}),k=d((()=>{switch(n){case Dt.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case Dt.DraggableRect:return r}}),[n,r,f]),E=l(null),C=u((()=>{const e=E.current;if(!e)return;const t=w.current.x*x.current.x,n=w.current.y*x.current.y;e.scrollBy(t,n)}),[]),O=d((()=>c===_t.TreeOrder?[...p].reverse():p),[c,p]);s((()=>{if(i&&p.length&&k){for(const e of O){if(!1===(null==o?void 0:o(e)))continue;const n=p.indexOf(e),r=h[n];if(!r)continue;const{direction:i,speed:l}=it(e,r,k,t,g);for(const e of["x","y"])v[e][i[e]]||(l[e]=0,i[e]=0);if(l.x>0||l.y>0)return b(),E.current=e,m(C,a),w.current=l,void(x.current=i)}w.current={x:0,y:0},x.current={x:0,y:0},b()}else b()}),[t,C,o,b,i,a,JSON.stringify(k),JSON.stringify(v),m,p,O,h,JSON.stringify(g)])}(class extends xt{constructor(e){super(e,St)}static setup(){return window.addEventListener(St.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(St.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:r}=n;return!(r.length>1)&&(null==o||o({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Dt||(Dt={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(_t||(_t={}));const jt={x:{[tt.Backward]:!1,[tt.Forward]:!1},y:{[tt.Backward]:!1,[tt.Forward]:!1}};var Bt,At;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Bt||(Bt={})),function(e){e.Optimized="optimized"}(At||(At={}));const Tt=new Map;function Lt(e,t){return de((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Nt(e){let{callback:t,disabled:n}=e;const o=ce(t),r=d((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)}),[n]);return s((()=>()=>null==r?void 0:r.disconnect()),[r]),r}function Mt(e){return new st($e(e),e)}function It(e,t,n){void 0===t&&(t=Mt);const[o,r]=h((function(o){if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=null!=o?o:n)?r:null;const i=t(e);if(JSON.stringify(o)===JSON.stringify(i))return o;return i}),null),i=function(e){let{callback:t,disabled:n}=e;const o=ce(t),r=d((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)}),[o,n]);return s((()=>()=>null==r?void 0:r.disconnect()),[r]),r}({callback(t){if(e)for(const n of t){const{type:t,target:o}=n;if("childList"===t&&o instanceof HTMLElement&&o.contains(e)){r();break}}}}),a=Nt({callback:r});return le((()=>{r(),e?(null==a||a.observe(e),null==i||i.observe(document.body,{childList:!0,subtree:!0})):(null==a||a.disconnect(),null==i||i.disconnect())}),[e]),o}const Pt=[];function Ft(e,t){void 0===t&&(t=[]);const n=l(null);return s((()=>{n.current=null}),t),s((()=>{const t=e!==Te;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?ve(e,n.current):Te}function zt(e){return d((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Ut=[];function Ht(e){let{measure:t}=e;const[n,o]=f(null),r=u((e=>{for(const{target:n}of e)if(re(n)){o((e=>{const o=t(n);return e?{...e,width:o.width,height:o.height}:o}));break}}),[t]),i=Nt({callback:r}),a=u((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return re(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),o(n?t(n):null)}),[t,i]),[l,c]=ue(a);return d((()=>({nodeRef:l,rect:n,setRef:c})),[n,l,c])}const Vt=[{sensor:Et,options:{}},{sensor:mt,options:{}}],Kt={current:{}},Wt={draggable:{measure:Xe},droppable:{measure:Xe,strategy:Bt.WhileDragging,frequency:At.Optimized},dragOverlay:{measure:$e}};class Yt extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const $t={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Yt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Be},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Wt,measureDroppableContainers:Be,windowRect:null,measuringScheduled:!1},Xt=i({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Be,draggableNodes:new Map,over:null,measureDroppableContainers:Be}),Zt=i($t);function qt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Yt}}}function Gt(e,t){switch(t.type){case je.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case je.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case je.DragEnd:case je.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case je.RegisterDroppable:{const{element:n}=t,{id:o}=n,r=new Yt(e.droppable.containers);return r.set(o,n),{...e,droppable:{...e.droppable,containers:r}}}case je.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const a=new Yt(e.droppable.containers);return a.set(n,{...i,disabled:r}),{...e,droppable:{...e.droppable,containers:a}}}case je.UnregisterDroppable:{const{id:n,key:o}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const i=new Yt(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Jt(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:r}=a(Xt),i=fe(o),l=fe(null==n?void 0:n.id);return s((()=>{if(!t&&!o&&i&&null!=l){if(!me(i))return;if(document.activeElement===i.target)return;const e=r.get(l);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=ke(e);if(t){t.focus();break}}}))}}),[o,t,r,l,i]),null}const Qt=i({...Te,scaleX:1,scaleY:1});var en;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(en||(en={}));const tn=p((function(e){var t,n,o,i;let{id:a,accessibility:c,autoScroll:p=!0,children:y,sensors:g=Vt,collisionDetection:v=He,measuring:b,modifiers:w,...x}=e;const k=h(Gt,void 0,qt),[E,C]=k,[O,S]=function(){const[e]=f((()=>new Set)),t=u((t=>(e.add(t),()=>e.delete(t))),[e]);return[u((t=>{let{type:n,event:o}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,o)}))}),[e]),t]}(),[D,_]=f(en.Uninitialized),R=D===en.Initialized,{draggable:{active:j,nodes:B,translate:A},droppable:{containers:T}}=E,L=j?B.get(j):null,N=l({initial:null,translated:null}),M=d((()=>{var e;return null!=j?{id:j,data:null!=(e=null==L?void 0:L.data)?e:Kt,rect:N}:null}),[j,L]),I=l(null),[P,F]=f(null),[z,U]=f(null),H=se(x,Object.values(x)),V=he("DndDescribedBy",a),K=d((()=>T.getEnabled()),[T]),W=d((()=>({draggable:{...Wt.draggable,...null==Y?void 0:Y.draggable},droppable:{...Wt.droppable,...null==Y?void 0:Y.droppable},dragOverlay:{...Wt.dragOverlay,...null==Y?void 0:Y.dragOverlay}})),[null==(Y=b)?void 0:Y.draggable,null==Y?void 0:Y.droppable,null==Y?void 0:Y.dragOverlay]);var Y;const{droppableRects:$,measureDroppableContainers:X,measuringScheduled:Z}=function(e,t){let{dragging:n,dependencies:o,config:r}=t;const[i,a]=f(null),{frequency:c,measure:d,strategy:p}=r,h=l(e),y=function(){switch(p){case Bt.Always:return!1;case Bt.BeforeDragging:return n;default:return!n}}(),g=se(y),v=u((function(e){void 0===e&&(e=[]),g.current||a((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[g]),m=l(null),b=de((t=>{if(y&&!n)return Tt;if(!t||t===Tt||h.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new st(d(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,i,n,y,d]);return s((()=>{h.current=e}),[e]),s((()=>{y||v()}),[n,y]),s((()=>{i&&i.length>0&&a(null)}),[JSON.stringify(i)]),s((()=>{y||"number"!=typeof c||null!==m.current||(m.current=setTimeout((()=>{v(),m.current=null}),c))}),[c,y,v,...o]),{droppableRects:b,measureDroppableContainers:v,measuringScheduled:null!=i}}(K,{dragging:R,dependencies:[A.x,A.y],config:W.droppable}),q=function(e,t){const n=null!==t?e.get(t):void 0,o=n?n.node.current:null;return de((e=>{var n;return null===t?null:null!=(n=null!=o?o:e)?n:null}),[o,t])}(B,j),G=d((()=>z?be(z):null),[z]),J=function(){const e=!1===(null==P?void 0:P.autoScrollEnabled),t="object"==typeof p?!1===p.enabled:!1===p,n=R&&!e&&!t;if("object"==typeof p)return{...p,enabled:n};return{enabled:n}}(),ee=function(e,t){return Lt(e,t)}(q,W.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:r=!0}=e;const i=l(!1),{x:a,y:c}="boolean"==typeof r?{x:r,y:r}:r;le((()=>{if(!a&&!c||!t)return void(i.current=!1);if(i.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=Ve(n(e),o);if(a||(r.x=0),c||(r.y=0),i.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=qe(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,a,c,o,n])}({activeNode:j?B.get(j):null,config:J.layoutShiftCompensation,initialRect:ee,measure:W.draggable.measure});const te=It(q,W.draggable.measure,ee),oe=It(q?q.parentElement:null),re=l({activatorEvent:null,active:null,activeNode:q,collisionRect:null,collisions:null,droppableRects:$,draggableNodes:B,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=T.getNodeFor(null==(t=re.current.over)?void 0:t.id),ae=Ht({measure:W.dragOverlay.measure}),ce=null!=(n=ae.nodeRef.current)?n:q,ue=R?null!=(o=ae.rect)?o:te:null,fe=Boolean(ae.nodeRef.current&&ae.rect),pe=Ve(ye=fe?null:te,Lt(ye));var ye;const ve=zt(ce?ne(ce):null),me=function(e){const t=l(e),n=de((n=>e?n&&n!==Pt&&e&&t.current&&e.parentNode===t.current.parentNode?n:Ze(e):Pt),[e]);return s((()=>{t.current=e}),[e]),n}(R?null!=ie?ie:q:null),we=function(e,t){void 0===t&&(t=$e);const[n]=e,o=zt(n?ne(n):null),[r,i]=h((function(){return e.length?e.map((e=>nt(e)?o:new st(t(e),e))):Ut}),Ut),a=Nt({callback:i});return e.length>0&&r===Ut&&i(),le((()=>{e.length?e.forEach((e=>null==a?void 0:a.observe(e))):(null==a||a.disconnect(),i())}),[e]),r}(me),xe=function(e,t){let{transform:n,...o}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...o})),n):n}(w,{transform:{x:A.x-pe.x,y:A.y-pe.y,scaleX:1,scaleY:1},activatorEvent:z,active:M,activeNodeRect:te,containerNodeRect:oe,draggingNodeRect:ue,over:re.current.over,overlayNodeRect:ae.rect,scrollableAncestors:me,scrollableAncestorRects:we,windowRect:ve}),ke=G?ge(G,A):null,Ee=function(e){const[t,n]=f(null),o=l(e),r=u((e=>{const t=Ge(e.target);t&&n((e=>e?(e.set(t,et(t)),new Map(e)):null))}),[]);return s((()=>{const t=o.current;if(e!==t){i(t);const a=e.map((e=>{const t=Ge(e);return t?(t.addEventListener("scroll",r,{passive:!0}),[t,et(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),o.current=e}return()=>{i(e),i(t)};function i(e){e.forEach((e=>{const t=Ge(e);null==t||t.removeEventListener("scroll",r)}))}}),[r,e]),d((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>ge(e,t)),Te):lt(e):Te),[e,t])}(me),Ce=Ft(Ee),Oe=Ft(Ee,[te]),De=ge(xe,Ce),_e=ue?We(ue,xe):null,Be=M&&_e?v({active:M,collisionRect:_e,droppableRects:$,droppableContainers:K,pointerCoordinates:ke}):null,Ae=Pe(Be,"id"),[Le,Ne]=f(null),Me=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(fe?xe:ge(xe,Oe),null!=(i=null==Le?void 0:Le.rect)?i:null,te),Ie=u(((e,t)=>{let{sensor:n,options:o}=t;if(null==I.current)return;const r=B.get(I.current);if(!r)return;const i=e.nativeEvent,a=new n({active:I.current,activeNode:r,event:i,options:o,context:re,onStart(e){const t=I.current;if(null==t)return;const n=B.get(t);if(!n)return;const{onDragStart:o}=H.current,r={active:{id:t,data:n.data,rect:N}};m((()=>{null==o||o(r),_(en.Initializing),C({type:je.DragStart,initialCoordinates:e,active:t}),O({type:"onDragStart",event:r})}))},onMove(e){C({type:je.DragMove,coordinates:e})},onEnd:l(je.DragEnd),onCancel:l(je.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:r}=re.current;let a=null;if(t&&r){const{cancelDrop:l}=H.current;if(a={activatorEvent:i,active:t,collisions:n,delta:r,over:o},e===je.DragEnd&&"function"==typeof l){await Promise.resolve(l(a))&&(e=je.DragCancel)}}I.current=null,m((()=>{C({type:e}),_(en.Uninitialized),Ne(null),F(null),U(null);const t=e===je.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=H.current[t];null==e||e(a),O({type:t,event:a})}}))}}m((()=>{F(a),U(e.nativeEvent)}))}),[B]),Fe=u(((e,t)=>(n,o)=>{const r=n.nativeEvent,i=B.get(o);if(null!==I.current||!i||r.dndKit||r.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(r.dndKit={capturedBy:t.sensor},I.current=o,Ie(n,t))}),[B,Ie]),ze=function(e,t){return d((()=>e.reduce(((e,n)=>{const{sensor:o}=n;return[...e,...o.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(g,Fe);!function(e){s((()=>{if(!Q)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(g),le((()=>{te&&D===en.Initializing&&_(en.Initialized)}),[te,D]),s((()=>{const{onDragMove:e}=H.current,{active:t,activatorEvent:n,collisions:o,over:r}=re.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:o,delta:{x:De.x,y:De.y},over:r};m((()=>{null==e||e(i),O({type:"onDragMove",event:i})}))}),[De.x,De.y]),s((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:o,scrollAdjustedTranslate:r}=re.current;if(!e||null==I.current||!t||!r)return;const{onDragOver:i}=H.current,a=o.get(Ae),l=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:l};m((()=>{Ne(l),null==i||i(c),O({type:"onDragOver",event:c})}))}),[Ae]),le((()=>{re.current={activatorEvent:z,active:M,activeNode:q,collisionRect:_e,collisions:Be,droppableRects:$,draggableNodes:B,draggingNode:ce,draggingNodeRect:ue,droppableContainers:T,over:Le,scrollableAncestors:me,scrollAdjustedTranslate:De},N.current={initial:ue,translated:_e}}),[M,q,Be,_e,B,ce,ue,$,T,Le,me,De]),Rt({...J,delta:A,draggingRect:_e,pointerCoordinates:ke,scrollableAncestors:me,scrollableAncestorRects:we});const Ue=d((()=>({active:M,activeNode:q,activeNodeRect:te,activatorEvent:z,collisions:Be,containerNodeRect:oe,dragOverlay:ae,draggableNodes:B,droppableContainers:T,droppableRects:$,over:Le,measureDroppableContainers:X,scrollableAncestors:me,scrollableAncestorRects:we,measuringConfiguration:W,measuringScheduled:Z,windowRect:ve})),[M,q,te,z,Be,oe,ae,B,T,$,Le,X,me,we,W,Z,ve]),Ke=d((()=>({activatorEvent:z,activators:ze,active:M,activeNodeRect:te,ariaDescribedById:{draggable:V},dispatch:C,draggableNodes:B,over:Le,measureDroppableContainers:X})),[z,ze,M,te,C,V,B,Le,X]);return r.createElement(Se.Provider,{value:S},r.createElement(Xt.Provider,{value:Ke},r.createElement(Zt.Provider,{value:Ue},r.createElement(Qt.Provider,{value:Me},y)),r.createElement(Jt,{disabled:!1===(null==c?void 0:c.restoreFocus)})),r.createElement(Re,{...c,hiddenTextDescribedById:V}))})),nn=i(null),on="button",rn="Droppable";function an(e){let{id:t,data:n,disabled:o=!1,attributes:r}=e;const i=he(rn),{activators:l,activatorEvent:c,active:s,activeNodeRect:u,ariaDescribedById:f,draggableNodes:p,over:h}=a(Xt),{role:y=on,roleDescription:g="draggable",tabIndex:v=0}=null!=r?r:{},m=(null==s?void 0:s.id)===t,b=a(m?Qt:nn),[w,x]=ue(),[k,E]=ue(),C=function(e,t){return d((()=>e.reduce(((e,n)=>{let{eventName:o,handler:r}=n;return e[o]=e=>{r(e,t)},e}),{})),[e,t])}(l,t),O=se(n);le((()=>(p.set(t,{id:t,key:i,node:w,activatorNode:k,data:O}),()=>{const e=p.get(t);e&&e.key===i&&p.delete(t)})),[p,t]);return{active:s,activatorEvent:c,activeNodeRect:u,attributes:d((()=>({role:y,tabIndex:v,"aria-disabled":o,"aria-pressed":!(!m||y!==on)||void 0,"aria-roledescription":g,"aria-describedby":f.draggable})),[o,y,v,m,g,f.draggable]),isDragging:m,listeners:o?void 0:C,node:w,over:h,setNodeRef:x,setActivatorNodeRef:E,transform:b}}const ln="Droppable",cn={timeout:25};function sn(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function dn(e,t){return e.reduce(((e,n,o)=>{const r=t.get(n);return r&&(e[o]=r),e}),Array(e.length))}function un(e){return null!==e&&e>=0}const fn=e=>{let{rects:t,activeIndex:n,overIndex:o,index:r}=e;const i=sn(t,o,n),a=t[r],l=i[r];return l&&a?{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}:null},pn={scaleX:1,scaleY:1},hn=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:r,rects:i,overIndex:a}=e;const l=null!=(t=i[n])?t:o;if(!l)return null;if(r===n){const e=i[a];return e?{x:0,y:n<a?e.top+e.height-(l.top+l.height):e.top-l.top,...pn}:null}const c=function(e,t,n){const o=e[t],r=e[t-1],i=e[t+1];if(!o)return 0;if(n<t)return r?o.top-(r.top+r.height):i?i.top-(o.top+o.height):0;return i?i.top-(o.top+o.height):r?o.top-(r.top+r.height):0}(i,r,n);return r>n&&r<=a?{x:0,y:-l.height-c,...pn}:r<n&&r>=a?{x:0,y:l.height+c,...pn}:{x:0,y:0,...pn}};const yn="Sortable",gn=r.createContext({activeIndex:-1,containerId:yn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:fn,disabled:{draggable:!1,droppable:!1}});function vn(e){let{children:t,id:n,items:o,strategy:i=fn,disabled:c=!1}=e;const{active:u,dragOverlay:f,droppableRects:p,over:h,measureDroppableContainers:y}=a(Zt),g=he(yn,n),v=Boolean(null!==f.rect),m=d((()=>o.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[o]),b=null!=u,w=u?m.indexOf(u.id):-1,x=h?m.indexOf(h.id):-1,k=l(m),E=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(m,k.current),C=-1!==x&&-1===w||E,O=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(c);le((()=>{E&&b&&y(m)}),[E,m,b,y]),s((()=>{k.current=m}),[m]);const S=d((()=>({activeIndex:w,containerId:g,disabled:O,disableTransforms:C,items:m,overIndex:x,useDragOverlay:v,sortedRects:dn(m,p),strategy:i})),[w,g,O.draggable,O.droppable,C,m,x,p,v,i]);return r.createElement(gn.Provider,{value:S},t)}const mn=e=>{let{id:t,items:n,activeIndex:o,overIndex:r}=e;return sn(n,o,r).indexOf(t)},bn=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:r,items:i,newIndex:a,previousItems:l,previousContainerId:c,transition:s}=e;return!(!s||!o)&&((l===i||r!==a)&&(!!n||a!==r&&t===c))},wn={duration:200,easing:"ease"},xn="transform",kn=we.Transition.toString({property:xn,duration:0,easing:"linear"}),En={roleDescription:"sortable"};function Cn(e){let{animateLayoutChanges:t=bn,attributes:n,disabled:o,data:r,getNewIndex:i=mn,id:c,strategy:p,resizeObserverConfig:h,transition:y=wn}=e;const{items:g,containerId:v,activeIndex:m,disabled:b,disableTransforms:w,sortedRects:x,overIndex:k,useDragOverlay:E,strategy:C}=a(gn),O=function(e,t){var n,o;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(o=null==e?void 0:e.droppable)?o:t.droppable}}(o,b),S=g.indexOf(c),D=d((()=>({sortable:{containerId:v,index:S,items:g},...r})),[v,r,S,g]),_=d((()=>g.slice(g.indexOf(c))),[g,c]),{rect:R,node:j,isOver:B,setNodeRef:A}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:r}=e;const i=he(ln),{active:c,dispatch:d,over:f,measureDroppableContainers:p}=a(Xt),h=l({disabled:n}),y=l(!1),g=l(null),v=l(null),{disabled:m,updateMeasurementsFor:b,timeout:w}={...cn,...r},x=se(null!=b?b:o),k=Nt({callback:u((()=>{y.current?(null!=v.current&&clearTimeout(v.current),v.current=setTimeout((()=>{p(Array.isArray(x.current)?x.current:[x.current]),v.current=null}),w)):y.current=!0}),[w]),disabled:m||!c}),E=u(((e,t)=>{k&&(t&&(k.unobserve(t),y.current=!1),e&&k.observe(e))}),[k]),[C,O]=ue(E),S=se(t);return s((()=>{k&&C.current&&(k.disconnect(),y.current=!1,k.observe(C.current))}),[C,k]),le((()=>(d({type:je.RegisterDroppable,element:{id:o,key:i,disabled:n,node:C,rect:g,data:S}}),()=>d({type:je.UnregisterDroppable,key:i,id:o}))),[o]),s((()=>{n!==h.current.disabled&&(d({type:je.SetDroppableDisabled,id:o,key:i,disabled:n}),h.current.disabled=n)}),[o,i,n,d]),{active:c,rect:g,isOver:(null==f?void 0:f.id)===o,node:C,over:f,setNodeRef:O}}({id:c,data:D,disabled:O.droppable,resizeObserverConfig:{updateMeasurementsFor:_,...h}}),{active:T,activatorEvent:L,activeNodeRect:N,attributes:M,setNodeRef:I,listeners:P,isDragging:F,over:z,setActivatorNodeRef:U,transform:H}=an({id:c,data:D,attributes:{...En,...n},disabled:O.draggable}),V=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return d((()=>e=>{t.forEach((t=>t(e)))}),t)}(A,I),K=Boolean(T),W=K&&!w&&un(m)&&un(k),Y=!E&&F,$=Y&&W?H:null,X=W?null!=$?$:(null!=p?p:C)({rects:x,activeNodeRect:N,activeIndex:m,overIndex:k,index:S}):null,Z=un(m)&&un(k)?i({id:c,items:g,activeIndex:m,overIndex:k}):S,q=null==T?void 0:T.id,G=l({activeId:q,items:g,newIndex:Z,containerId:v}),J=g!==G.current.items,Q=t({active:T,containerId:v,isDragging:F,isSorting:K,id:c,index:S,items:g,newIndex:G.current.newIndex,previousItems:G.current.items,previousContainerId:G.current.containerId,transition:y,wasDragging:null!=G.current.activeId}),ee=function(e){let{disabled:t,index:n,node:o,rect:r}=e;const[i,a]=f(null),c=l(n);return le((()=>{if(!t&&n!==c.current&&o.current){const e=r.current;if(e){const t=$e(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&a(n)}}n!==c.current&&(c.current=n)}),[t,n,o,r]),s((()=>{i&&a(null)}),[i]),i}({disabled:!Q,index:S,node:j,rect:R});return s((()=>{K&&G.current.newIndex!==Z&&(G.current.newIndex=Z),v!==G.current.containerId&&(G.current.containerId=v),g!==G.current.items&&(G.current.items=g)}),[K,Z,v,g]),s((()=>{if(q===G.current.activeId)return;if(q&&!G.current.activeId)return void(G.current.activeId=q);const e=setTimeout((()=>{G.current.activeId=q}),50);return()=>clearTimeout(e)}),[q]),{active:T,activeIndex:m,attributes:M,data:D,rect:R,index:S,newIndex:Z,items:g,isOver:B,isSorting:K,isDragging:F,listeners:P,node:j,overIndex:k,over:z,setNodeRef:V,setActivatorNodeRef:U,setDroppableNodeRef:A,setDraggableNodeRef:I,transform:null!=ee?ee:X,transition:function(){if(ee||J&&G.current.newIndex===S)return kn;if(Y&&!me(L)||!y)return;if(K||Q)return we.Transition.toString({...y,property:xn});return}()}}function On(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Sn=[pt.Down,pt.Right,pt.Up,pt.Left],Dn=(e,t)=>{let{context:{active:n,collisionRect:o,droppableRects:r,droppableContainers:i,over:a,scrollableAncestors:l}}=t;if(Sn.includes(e.code)){if(e.preventDefault(),!n||!o)return;const t=[];i.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const i=r.get(n.id);if(i)switch(e.code){case pt.Down:o.top<i.top&&t.push(n);break;case pt.Up:o.top>i.top&&t.push(n);break;case pt.Left:o.left>i.left&&t.push(n);break;case pt.Right:o.left<i.left&&t.push(n)}}));const c=(e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=Ie(t),i=[];for(const e of o){const{id:t}=e,o=n.get(t);if(o){const n=Ie(o),a=r.reduce(((e,t,o)=>e+Le(n[o],t)),0),l=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:l}})}}return i.sort(Ne)})({active:n,collisionRect:o,droppableRects:r,droppableContainers:t,pointerCoordinates:null});let s=Pe(c,"id");if(s===(null==a?void 0:a.id)&&c.length>1&&(s=c[1].id),null!=s){const e=i.get(n.id),t=i.get(s),a=t?r.get(t.id):null,c=null==t?void 0:t.node.current;if(c&&a&&e&&t){const n=Ze(c).some(((e,t)=>l[t]!==e)),r=_n(e,t),i=function(e,t){if(!On(e)||!On(t))return!1;if(!_n(e,t))return!1;return e.data.current.sortable.index<t.data.current.sortable.index}(e,t),s=n||!r?{x:0,y:0}:{x:i?o.width-a.width:0,y:i?o.height-a.height:0},d={x:a.left,y:a.top};return s.x&&s.y?d:ve(d,s)}}}};function _n(e,t){return!(!On(e)||!On(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}var Rn;function jn(){return jn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},jn.apply(this,arguments)}var Bn,An=function(e){return o.createElement("svg",jn({viewBox:"0 0 10 10",fill:"currentColor",style:{width:14,height:14,display:"block",flexShrink:0,backfaceVisibility:"hidden"}},e),Rn||(Rn=o.createElement("path",{d:"M3 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm4-8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"})))};function Tn(){return Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Tn.apply(this,arguments)}var Ln=function(e){return o.createElement("svg",Tn({viewBox:"0 0 16 16",fill:"currentColor",style:{width:16,height:16,display:"block",flexShrink:0,backfaceVisibility:"hidden"}},e),Bn||(Bn=o.createElement("path",{d:"M7.977 14.963c.407 0 .747-.324.747-.723V8.72h5.362c.399 0 .74-.34.74-.747a.746.746 0 0 0-.74-.738H8.724V1.706c0-.398-.34-.722-.747-.722a.732.732 0 0 0-.739.722v5.529h-5.37a.746.746 0 0 0-.74.738c0 .407.341.747.74.747h5.37v5.52c0 .399.332.723.739.723z"})))};function Nn(e,t={}){const n=Object.keys(e.children),{at:o=e.selection}=t,r=n.find((t=>e.children[t].meta.order===(null==o?void 0:o[0])));if(r)return e.blockEditorsMap[r]}function Mn(e){return Fn(e)?(e.nodeName||"").toLowerCase():"#document"}function In(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Pn(e){var t;return null==(t=(Fn(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Fn(e){return e instanceof Node||e instanceof In(e).Node}function zn(e){return e instanceof Element||e instanceof In(e).Element}function Un(e){return e instanceof HTMLElement||e instanceof In(e).HTMLElement}function Hn(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof In(e).ShadowRoot)}function Vn(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Xn(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function Kn(e){return["table","td","th"].includes(Mn(e))}function Wn(e){const t=Yn(),n=Xn(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Yn(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $n(e){return["html","body","#document"].includes(Mn(e))}function Xn(e){return In(e).getComputedStyle(e)}function Zn(e){return zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function qn(e){if("html"===Mn(e))return e;const t=e.assignedSlot||e.parentNode||Hn(e)&&e.host||Pn(e);return Hn(t)?t.host:t}function Gn(e){const t=qn(e);return $n(t)?e.ownerDocument?e.ownerDocument.body:e.body:Un(t)&&Vn(t)?t:Gn(t)}function Jn(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=Gn(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),a=In(r);return i?t.concat(a,a.visualViewport||[],Vn(r)?r:[],a.frameElement&&n?Jn(a.frameElement):[]):t.concat(r,Jn(r,[],n))}const Qn=Math.min,eo=Math.max,to=Math.round,no=Math.floor,oo=e=>({x:e,y:e}),ro={left:"right",right:"left",bottom:"top",top:"bottom"},io={start:"end",end:"start"};function ao(e,t,n){return eo(e,Qn(t,n))}function lo(e,t){return"function"==typeof e?e(t):e}function co(e){return e.split("-")[0]}function so(e){return e.split("-")[1]}function uo(e){return"x"===e?"y":"x"}function fo(e){return"y"===e?"height":"width"}function po(e){return["top","bottom"].includes(co(e))?"y":"x"}function ho(e){return uo(po(e))}function yo(e){return e.replace(/start|end/g,(e=>io[e]))}function go(e){return e.replace(/left|right|bottom|top/g,(e=>ro[e]))}function vo(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function mo(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function bo(e,t,n){let{reference:o,floating:r}=e;const i=po(t),a=ho(t),l=fo(a),c=co(t),s="y"===i,d=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,f=o[l]/2-r[l]/2;let p;switch(c){case"top":p={x:d,y:o.y-r.height};break;case"bottom":p={x:d,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:u};break;case"left":p={x:o.x-r.width,y:u};break;default:p={x:o.x,y:o.y}}switch(so(t)){case"start":p[a]-=f*(n&&s?-1:1);break;case"end":p[a]+=f*(n&&s?-1:1)}return p}async function wo(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:a,elements:l,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=lo(t,e),h=vo(p),y=l[f?"floating"===u?"reference":"floating":u],g=mo(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(y)))||n?y:y.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:d,strategy:c})),v="floating"===u?{...a.floating,x:o,y:r}:a.reference,m=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(m))&&await(null==i.getScale?void 0:i.getScale(m))||{x:1,y:1},w=mo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:m,strategy:c}):v);return{top:(g.top-w.top+h.top)/b.y,bottom:(w.bottom-g.bottom+h.bottom)/b.y,left:(g.left-w.left+h.left)/b.x,right:(w.right-g.right+h.right)/b.x}}function xo(e){const t=Qn(...e.map((e=>e.left))),n=Qn(...e.map((e=>e.top)));return{x:t,y:n,width:eo(...e.map((e=>e.right)))-t,height:eo(...e.map((e=>e.bottom)))-n}}const ko=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:l}=t,c=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=co(n),l=so(n),c="y"===po(n),s=["left","top"].includes(a)?-1:1,d=i&&c?-1:1,u=lo(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return l&&"number"==typeof h&&(p="end"===l?-1*h:h),c?{x:p*d,y:f*s}:{x:f*s,y:p*d}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:a}}}}};function Eo(e){const t=Xn(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Un(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,l=to(n)!==i||to(o)!==a;return l&&(n=i,o=a),{width:n,height:o,$:l}}function Co(e){return zn(e)?e:e.contextElement}function Oo(e){const t=Co(e);if(!Un(t))return oo(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Eo(t);let a=(i?to(n.width):n.width)/o,l=(i?to(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const So=oo(0);function Do(e){const t=In(e);return Yn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:So}function _o(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Co(e);let a=oo(1);t&&(o?zn(o)&&(a=Oo(o)):a=Oo(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==In(e))&&t}(i,n,o)?Do(i):oo(0);let c=(r.left+l.x)/a.x,s=(r.top+l.y)/a.y,d=r.width/a.x,u=r.height/a.y;if(i){const e=In(i),t=o&&zn(o)?In(o):o;let n=e,r=n.frameElement;for(;r&&o&&t!==n;){const e=Oo(r),t=r.getBoundingClientRect(),o=Xn(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,a=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,s*=e.y,d*=e.x,u*=e.y,c+=i,s+=a,n=In(r),r=n.frameElement}}return mo({width:d,height:u,x:c,y:s})}const Ro=[":popover-open",":modal"];function jo(e){return Ro.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Bo(e){return _o(Pn(e)).left+Zn(e).scrollLeft}function Ao(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=In(e),o=Pn(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,l=0,c=0;if(r){i=r.width,a=r.height;const e=Yn();(!e||e&&"fixed"===t)&&(l=r.offsetLeft,c=r.offsetTop)}return{width:i,height:a,x:l,y:c}}(e,n);else if("document"===t)o=function(e){const t=Pn(e),n=Zn(e),o=e.ownerDocument.body,r=eo(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=eo(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Bo(e);const l=-n.scrollTop;return"rtl"===Xn(o).direction&&(a+=eo(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:l}}(Pn(e));else if(zn(t))o=function(e,t){const n=_o(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=Un(e)?Oo(e):oo(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=Do(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return mo(o)}function To(e,t){const n=qn(e);return!(n===t||!zn(n)||$n(n))&&("fixed"===Xn(n).position||To(n,t))}function Lo(e,t,n){const o=Un(t),r=Pn(t),i="fixed"===n,a=_o(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=oo(0);if(o||!o&&!i)if(("body"!==Mn(t)||Vn(r))&&(l=Zn(t)),o){const e=_o(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else r&&(c.x=Bo(r));return{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function No(e,t){return Un(e)&&"fixed"!==Xn(e).position?t?t(e):e.offsetParent:null}function Mo(e,t){const n=In(e);if(!Un(e)||jo(e))return n;let o=No(e,t);for(;o&&Kn(o)&&"static"===Xn(o).position;)o=No(o,t);return o&&("html"===Mn(o)||"body"===Mn(o)&&"static"===Xn(o).position&&!Wn(o))?n:o||function(e){let t=qn(e);for(;Un(t)&&!$n(t);){if(Wn(t))return t;t=qn(t)}return null}(e)||n}const Io={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,a=Pn(o),l=!!t&&jo(t.floating);if(o===a||l&&i)return n;let c={scrollLeft:0,scrollTop:0},s=oo(1);const d=oo(0),u=Un(o);if((u||!u&&!i)&&(("body"!==Mn(o)||Vn(a))&&(c=Zn(o)),Un(o))){const e=_o(o);s=Oo(o),d.x=e.x+o.clientLeft,d.y=e.y+o.clientTop}return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-c.scrollLeft*s.x+d.x,y:n.y*s.y-c.scrollTop*s.y+d.y}},getDocumentElement:Pn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=Jn(e,[],!1).filter((e=>zn(e)&&"body"!==Mn(e))),r=null;const i="fixed"===Xn(e).position;let a=i?qn(e):e;for(;zn(a)&&!$n(a);){const t=Xn(a),n=Wn(a);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||Vn(a)&&!n&&To(e,a))?o=o.filter((e=>e!==a)):r=t,a=qn(a)}return t.set(e,o),o}(t,this._c):[].concat(n),o],a=i[0],l=i.reduce(((e,n)=>{const o=Ao(t,n,r);return e.top=eo(o.top,e.top),e.right=Qn(o.right,e.right),e.bottom=Qn(o.bottom,e.bottom),e.left=eo(o.left,e.left),e}),Ao(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Mo,getElementRects:async function(e){const t=this.getOffsetParent||Mo,n=this.getDimensions;return{reference:Lo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Eo(e);return{width:t,height:n}},getScale:Oo,isElement:zn,isRTL:function(e){return"rtl"===Xn(e).direction}};function Po(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,s=Co(e),d=r||i?[...s?Jn(s):[],...Jn(t)]:[];d.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const u=s&&l?function(e,t){let n,o=null;const r=Pn(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function a(l,c){void 0===l&&(l=!1),void 0===c&&(c=1),i();const{left:s,top:d,width:u,height:f}=e.getBoundingClientRect();if(l||t(),!u||!f)return;const p={rootMargin:-no(d)+"px "+-no(r.clientWidth-(s+u))+"px "+-no(r.clientHeight-(d+f))+"px "+-no(s)+"px",threshold:eo(0,Qn(1,c))||1};let h=!0;function y(e){const t=e[0].intersectionRatio;if(t!==c){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{o=new IntersectionObserver(y,{...p,root:r.ownerDocument})}catch(e){o=new IntersectionObserver(y,p)}o.observe(e)}(!0),i}(s,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[o]=e;o&&o.target===s&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),s&&!c&&h.observe(s),h.observe(t));let y=c?_o(e):null;return c&&function t(){const o=_o(e);!y||o.x===y.x&&o.y===y.y&&o.width===y.width&&o.height===y.height||n();y=o,f=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=h)||e.disconnect(),h=null,c&&cancelAnimationFrame(f)}}const Fo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=lo(e,t),s={x:n,y:o},d=await wo(t,c),u=po(co(r)),f=uo(u);let p=s[f],h=s[u];if(i){const e="y"===f?"bottom":"right";p=ao(p+d["y"===f?"top":"left"],p,p-d[e])}if(a){const e="y"===u?"bottom":"right";h=ao(h+d["y"===u?"top":"left"],h,h-d[e])}const y=l.fn({...t,[f]:p,[u]:h});return{...y,data:{x:y.x-n,y:y.y-o}}}}},zo=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:l,platform:c,elements:s}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:y=!0,...g}=lo(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=co(r),m=co(l)===l,b=await(null==c.isRTL?void 0:c.isRTL(s.floating)),w=f||(m||!y?[go(l)]:function(e){const t=go(e);return[yo(e),t,yo(t)]}(l));f||"none"===h||w.push(...function(e,t,n,o){const r=so(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:a;default:return[]}}(co(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(yo)))),i}(l,y,h,b));const x=[l,...w],k=await wo(t,g),E=[];let C=(null==(o=i.flip)?void 0:o.overflows)||[];if(d&&E.push(k[v]),u){const e=function(e,t,n){void 0===n&&(n=!1);const o=so(e),r=ho(e),i=fo(r);let a="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=go(a)),[a,go(a)]}(r,a,b);E.push(k[e[0]],k[e[1]])}if(C=[...C,{placement:r,overflows:E}],!E.every((e=>e<=0))){var O,S;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(S=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!n)switch(p){case"bestFit":{var D;const e=null==(D=C.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}},Uo=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:o,rects:r,platform:i,strategy:a}=t,{padding:l=2,x:c,y:s}=lo(e,t),d=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]),u=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let o=null;for(let e=0;e<t.length;e++){const r=t[e];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((e=>mo(xo(e))))}(d),f=mo(xo(d)),p=vo(l);const h=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=c&&null!=s)return u.find((e=>c>e.left-p.left&&c<e.right+p.right&&s>e.top-p.top&&s<e.bottom+p.bottom))||f;if(u.length>=2){if("y"===po(n)){const e=u[0],t=u[u.length-1],o="top"===co(n),r=e.top,i=t.bottom,a=o?e.left:t.left,l=o?e.right:t.right;return{top:r,bottom:i,left:a,right:l,width:l-a,height:i-r,x:a,y:r}}const e="left"===co(n),t=eo(...u.map((e=>e.right))),o=Qn(...u.map((e=>e.left))),r=u.filter((n=>e?n.left===o:n.right===t)),i=r[0].top,a=r[r.length-1].bottom;return{top:i,bottom:a,left:o,right:t,width:t-o,height:a-i,x:o,y:i}}return f}},floating:o.floating,strategy:a});return r.reference.x!==h.reference.x||r.reference.y!==h.reference.y||r.reference.width!==h.reference.width||r.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Ho=(e,t,n)=>{const o=new Map,r={platform:Io,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(t));let s=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:u}=bo(s,o,c),f=o,p={},h=0;for(let n=0;n<l.length;n++){const{name:i,fn:y}=l[n],{x:g,y:v,data:m,reset:b}=await y({x:d,y:u,initialPlacement:o,placement:f,strategy:r,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});d=null!=g?g:d,u=null!=v?v:u,p={...p,[i]:{...p[i],...m}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(s=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:r}):b.rects),({x:d,y:u}=bo(s,f,c))),n=-1)}return{x:d,y:u,placement:f,strategy:r,middlewareData:p}})(e,t,{...r,platform:i})};var Vo="undefined"!=typeof document?c:s;function Ko(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;0!=o--;)if(!Ko(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;0!=o--;){const n=r[o];if(("_owner"!==n||!e.$$typeof)&&!Ko(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Wo(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yo(e,t){const n=Wo(e);return Math.round(t*n)/n}function $o(e){const t=o.useRef(e);return Vo((()=>{t.current=e})),t}
2
2
  /*!
3
3
  * tabbable 6.2.0
4
4
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
5
  */
6
- var Xn=["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(","),Zn="undefined"==typeof Element,qn=Zn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gn=!Zn&&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},Jn=function e(t,o){var n;void 0===o&&(o=!0);var r=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert");return""===r||"true"===r||o&&t&&e(t.parentNode)},Qn=function e(t,o,n){for(var r=[],i=Array.from(t);i.length;){var a=i.shift();if(!Jn(a,!1))if("SLOT"===a.tagName){var l=a.assignedElements(),c=e(l.length?l:a.children,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:a,candidates:c})}else{qn.call(a,Xn)&&n.filter(a)&&(o||!t.includes(a))&&r.push(a);var s=a.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(a),d=!Jn(s,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(s&&d){var u=e(!0===s?a.children:s.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},er=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},tr=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,o=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===o||"true"===o}(e))&&!er(e)?0:e.tabIndex},or=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},nr=function(e){return"INPUT"===e.tagName},rr=function(e){return function(e){return nr(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,o=e.form||Gn(e),n=function(e){return o.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=n(window.CSS.escape(e.name));else try{t=n(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var r=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]}(t,e.form);return!r||r===e}(e)},ir=function(e){var t=e.getBoundingClientRect(),o=t.width,n=t.height;return 0===o&&0===n},ar=function(e,t){var o=t.displayCheck,n=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var r=qn.call(e,"details>summary:first-of-type")?e.parentElement:e;if(qn.call(r,"details:not([open]) *"))return!0;if(o&&"full"!==o&&"legacy-full"!==o){if("non-zero-area"===o)return ir(e)}else{if("function"==typeof n){for(var i=e;e;){var a=e.parentElement,l=Gn(e);if(a&&!a.shadowRoot&&!0===n(a))return ir(e);e=e.assignedSlot?e.assignedSlot:a||l===e.ownerDocument?a:l.host}e=i}if(function(e){var t,o,n,r,i=e&&Gn(e),a=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(o=a)&&void 0!==o&&null!==(n=o.ownerDocument)&&void 0!==n&&n.contains(a)||null!=e&&null!==(r=e.ownerDocument)&&void 0!==r&&r.contains(e));!l&&a;){var c,s,d;l=!(null===(s=a=null===(c=i=Gn(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"!==o)return!0}return!1},lr=function(e,t){return!(t.disabled||Jn(t)||function(e){return nr(e)&&"hidden"===e.type}(t)||ar(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var o=0;o<t.children.length;o++){var n=t.children.item(o);if("LEGEND"===n.tagName)return!!qn.call(t,"fieldset[disabled] *")||!n.contains(e)}return!0}t=t.parentElement}return!1}(t))},cr=function(e,t){return!(rr(t)||tr(t)<0||!lr(e,t))},sr=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},dr=function e(t){var o=[],n=[];return t.forEach((function(t,r){var i=!!t.scopeParent,a=i?t.scopeParent:t,l=function(e,t){var o=tr(e);return o<0&&t&&!er(e)?0:o}(a,i),c=i?e(t.candidates):a;0===l?i?o.push.apply(o,c):o.push(a):n.push({documentOrder:r,tabIndex:l,item:t,isScope:i,content:c})})),n.sort(or).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(o)},ur=function(e,t){var o;return o=(t=t||{}).getShadowRoot?Qn([e],t.includeContainer,{filter:cr.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:sr}):function(e,t,o){if(Jn(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Xn));return t&&qn.call(e,Xn)&&n.unshift(e),n.filter(o)}(e,t.includeContainer,cr.bind(null,t)),dr(o)};const fr=n["useInsertionEffect".toString()]||(e=>e());var pr="undefined"!=typeof document?c:s;function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},hr.apply(this,arguments)}let yr=!1,gr=0;const vr=()=>"floating-ui-"+gr++;const mr=n["useId".toString()]||function(){const[e,t]=n.useState((()=>yr?vr():void 0));return pr((()=>{null==e&&t(vr())}),[]),n.useEffect((()=>{yr||(yr=!0)}),[]),e};const br=n.createContext(null),wr=n.createContext(null);function xr(e){return"data-floating-ui-"+e}function kr(e){const t=l(e);return pr((()=>{t.current=e})),t}const Er=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Cr(e,t){const o=ur(e,Er());"prev"===t&&o.reverse();const n=o.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(o=t)||null==(o=o.shadowRoot)?void 0:o.activeElement);){var o;t=t.shadowRoot.activeElement}return t}((null==(r=e)?void 0:r.ownerDocument)||document));var r;return o.slice(n+1)[0]}function Or(e,t){const o=t||e.currentTarget,n=e.relatedTarget;return!n||!function(e,t){if(!e||!t)return!1;const o=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(o&&Ho(o)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}(o,n)}function Sr(e){ur(e,Er()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Dr(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 _r={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 Rr(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const jr=n.forwardRef((function(e,t){const[o,r]=n.useState();pr((()=>(/apple/i.test(navigator.vendor)&&r("button"),document.addEventListener("keydown",Rr),()=>{document.removeEventListener("keydown",Rr)})),[]);const i={ref:t,tabIndex:0,role:o,"aria-hidden":!o||void 0,[xr("focus-guard")]:"",style:_r};return n.createElement("span",hr({},e,i))})),Br=n.createContext(null),Ar=xr("portal");function Tr(e){let{children:t,id:o,root:r=null,preserveTabOrder:i=!0}=e;const a=function(e){let{id:t,root:o}=void 0===e?{}:e;const[r,i]=n.useState(null),a=mr(),l=Mr(),c=n.useRef(null);return pr((()=>()=>{null==r||r.remove(),queueMicrotask((()=>{c.current=null}))}),[r]),pr((()=>{if(c.current)return;const e=t?document.getElementById(t):null;if(!e)return;const o=document.createElement("div");o.id=a,o.setAttribute(Ar,""),e.appendChild(o),c.current=o,i(o)}),[t,a]),pr((()=>{if(c.current)return;let e=o||(null==l?void 0:l.portalNode);e&&!Fo(e)&&(e=e.current),e=e||document.body;let n=null;t&&(n=document.createElement("div"),n.id=t,e.appendChild(n));const r=document.createElement("div");r.id=a,r.setAttribute(Ar,""),e=n||e,e.appendChild(r),c.current=r,i(r)}),[t,o,a,l]),r}({id:o,root:r}),[l,c]=n.useState(null),s=n.useRef(null),d=n.useRef(null),u=n.useRef(null),f=n.useRef(null),p=!!l&&!l.modal&&l.open&&i&&!(!r&&!a);return n.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&&Or(e)){("focusin"===e.type?Dr:Sr)(a)}}}),[a,i,null==l?void 0:l.modal]),n.createElement(Br.Provider,{value:n.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:s,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:c})),[i,a])},p&&a&&n.createElement(jr,{"data-type":"outside",ref:s,onFocus:e=>{if(Or(e,a)){var t;null==(t=u.current)||t.focus()}else{const e=Cr(document.body,"prev")||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),p&&a&&n.createElement("span",{"aria-owns":a.id,style:_r}),a&&b(t,a),p&&a&&n.createElement(jr,{"data-type":"outside",ref:d,onFocus:e=>{if(Or(e,a)){var t;null==(t=f.current)||t.focus()}else{const t=Cr(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 Mr=()=>n.useContext(Br),Lr=new Set,Nr=n.forwardRef((function(e,t){let{lockScroll:o=!1,...r}=e;const i=mr();return pr((()=>{if(!o)return;Lr.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,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=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",r&&(t[n]=r+"px"),e){var c,s;const e=(null==(c=window.visualViewport)?void 0:c.offsetLeft)||0,o=(null==(s=window.visualViewport)?void 0:s.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(l-Math.floor(o))+"px",left:-(a-Math.floor(e))+"px",right:"0"})}return()=>{Lr.delete(i),0===Lr.size&&(Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(a,l)))}}),[i,o]),n.createElement("div",hr({ref:t},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))}));function Ir(e){var t;void 0===e&&(e={});const{open:o=!1,onOpenChange:r,nodeId:i}=e,[a,l]=n.useState(null),c=(null==(t=e.elements)?void 0:t.reference)||a,s=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:s,open:d}=e,[u,f]=n.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=n.useState(r);Kn(p,r)||h(r);const[y,g]=n.useState(null),[m,b]=n.useState(null),w=n.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),x=n.useCallback((e=>{e!==O.current&&(O.current=e,b(e))}),[]),k=a||y,E=l||m,C=n.useRef(null),O=n.useRef(null),S=n.useRef(u),D=null!=s,_=$n(s),R=$n(i),j=n.useCallback((()=>{if(!C.current||!O.current)return;const e={placement:t,strategy:o,middleware:p};R.current&&(e.platform=R.current),Hn(C.current,O.current,e).then((e=>{const t={...e,isPositioned:!0};B.current&&!Kn(S.current,t)&&(S.current=t,v.flushSync((()=>{f(t)})))}))}),[p,t,o,R]);Vn((()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const B=n.useRef(!1);Vn((()=>(B.current=!0,()=>{B.current=!1})),[]),Vn((()=>{if(k&&(C.current=k),E&&(O.current=E),k&&E){if(_.current)return _.current(k,E,j);j()}}),[k,E,j,_,D]);const A=n.useMemo((()=>({reference:C,floating:O,setReference:w,setFloating:x})),[w,x]),T=n.useMemo((()=>({reference:k,floating:E})),[k,E]),M=n.useMemo((()=>{const e={position:o,left:0,top:0};if(!T.floating)return e;const t=Yn(T.floating,u.x),n=Yn(T.floating,u.y);return c?{...e,transform:"translate("+t+"px, "+n+"px)",...Wn(T.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:n}}),[o,c,T.floating,u.x,u.y]);return n.useMemo((()=>({...u,update:j,refs:A,elements:T,floatingStyles:M})),[u,j,A,T,M])}(e),d=n.useContext(wr),u=null!=((null==(f=n.useContext(br))?void 0:f.id)||null);var f;const p=function(e){const t=n.useRef((()=>{}));return fr((()=>{t.current=e})),n.useCallback((function(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return null==t.current?void 0:t.current(...o)}),[])}(((e,t,o)=>{e&&(y.current.openEvent=t),g.emit("openchange",{open:e,event:t,reason:o,nested:u}),null==r||r(e,t,o)})),h=n.useRef(null),y=n.useRef({}),g=n.useState((()=>function(){const e=new Map;return{emit(t,o){var n;null==(n=e.get(t))||n.forEach((e=>e(o)))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter((e=>e!==o)))||[])}}}()))[0],m=mr(),b=n.useCallback((e=>{const t=Fo(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s.refs.setReference(t)}),[s.refs]),w=n.useCallback((e=>{(Fo(e)||null===e)&&(h.current=e,l(e)),(Fo(s.refs.reference.current)||null===s.refs.reference.current||null!==e&&!Fo(e))&&s.refs.setReference(e)}),[s.refs]),x=n.useMemo((()=>({...s.refs,setReference:w,setPositionReference:b,domReference:h})),[s.refs,w,b]),k=n.useMemo((()=>({...s.elements,domReference:c})),[s.elements,c]),E=n.useMemo((()=>({...s,refs:x,elements:k,dataRef:y,nodeId:i,floatingId:m,events:g,open:o,onOpenChange:p})),[s,i,m,g,o,p,x,k]);return pr((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===i));e&&(e.context=E)})),n.useMemo((()=>({...s,context:E,refs:x,elements:k})),[s,x,k,E])}const Pr=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function zr(e,t){return"function"==typeof e?e(t):e}function Fr(e,t){void 0===t&&(t={});const{open:o,elements:{floating:r}}=e,{duration:i=250}=t,a=("number"==typeof i?i:i.close)||0,[l,c]=n.useState(!1),[s,d]=n.useState("unmounted"),u=function(e,t){const[o,r]=n.useState(e);return e&&!o&&r(!0),n.useEffect((()=>{if(!e){const e=setTimeout((()=>r(!1)),t);return()=>clearTimeout(e)}}),[e,t]),o}(o,a);return pr((()=>{l&&!u&&d("unmounted")}),[l,u]),pr((()=>{if(r){if(o){d("initial");const e=requestAnimationFrame((()=>{d("open")}));return()=>{cancelAnimationFrame(e)}}c(!0),d("close")}}),[o,r]),{isMounted:u,status:s}}function Ur(e,t){void 0===t&&(t={});const{initial:o={opacity:0},open:r,close:i,common:a,duration:l=250}=t,c=e.placement,s=c.split("-")[0],d=n.useMemo((()=>({side:s,placement:c})),[s,c]),u="number"==typeof l,f=(u?l:l.open)||0,p=(u?l:l.close)||0,[h,y]=n.useState((()=>({...zr(a,d),...zr(o,d)}))),{isMounted:g,status:v}=Fr(e,{duration:l}),m=kr(o),b=kr(r),w=kr(i),x=kr(a);return pr((()=>{const e=zr(m.current,d),t=zr(w.current,d),o=zr(x.current,d),n=zr(b.current,d)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===v&&y((t=>({transitionProperty:t.transitionProperty,...o,...e}))),"open"===v&&y({transitionProperty:Object.keys(n).map(Pr).join(","),transitionDuration:f+"ms",...o,...n}),"close"===v){const n=t||e;y({transitionProperty:Object.keys(n).map(Pr).join(","),transitionDuration:p+"ms",...o,...n})}}),[p,w,m,b,x,f,v,d]),{isMounted:g,styles:h}}var Hr;function Vr(){return Vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Vr.apply(this,arguments)}var Kr=function(e){return n.createElement("svg",Vr({viewBox:"0 0 16 16",className:"turn_svg__loop",style:{width:16,height:16,display:"block",fill:"currentcolor",flexShrink:0,backfaceVisibility:"hidden"}},e),Hr||(Hr=n.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 Wr(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}var Yr=["color"],$r=y((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,r=Wr(e,Yr);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),g("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:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Xr=["color"],Zr=y((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,r=Wr(e,Xr);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),g("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:n,fillRule:"evenodd",clipRule:"evenodd"}))})),qr=["color"],Gr=y((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,r=Wr(e,qr);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),g("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:n,fillRule:"evenodd",clipRule:"evenodd"}))})),Jr=["color"],Qr=y((function(e,t){var o=e.color,n=void 0===o?"currentColor":o,r=Wr(e,Jr);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),g("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:n,fillRule:"evenodd",clipRule:"evenodd"}))})),ei=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,o=[],n=0;n<e.rangeCount;n++)o.push(e.getRangeAt(n));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||o.forEach((function(t){e.addRange(t)})),t&&t.focus()}},ti={"text/plain":"Text","text/html":"Url",default:"Text"};var oi=function(e,t){var o,n,r,i,a,l,c=!1;t||(t={}),o=t.debug||!1;try{if(r=ei(),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(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),void 0===n.clipboardData){o&&console.warn("unable to use e.clipboardData"),o&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var r=ti[t.format]||ti.default;window.clipboardData.setData(r,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))})),document.body.appendChild(l),i.selectNodeContents(l),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(r){o&&console.error("unable to copy using execCommand: ",r),o&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(r){o&&console.error("unable to copy using clipboardData: ",r),o&&console.error("falling back to prompt"),n=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(n,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),l&&document.body.removeChild(l),r()}return c};function ni(e){if(!e)return;const t=Object.keys(e);return 1===t.length?t[0]:t.find((t=>e[t].asRoot))}function ri(e){if(!e)return;const t=ni(e);return t?e[t]:void 0}const ii=i(void 0),ai=({children:n,tools:r})=>{const i=V(),a=d((()=>r?Object.keys(r).reduce(((e,t)=>{var o;return Object.assign(Object.assign({},e),{[t]:null===(o=r[t])||void 0===o?void 0:o.render})}),{}):{}),[r]),l=d((()=>!r||i?null:Object.keys(r).map((t=>{var o,n,i;const a=null===(o=null==r?void 0:r[t])||void 0===o?void 0:o.tool,l=null===(n=null==r?void 0:r[t])||void 0===n?void 0:n.render,c=null===(i=null==r?void 0:r[t])||void 0===i?void 0:i.props;return a?e(a,Object.assign({render:l},c),t):null}))),[d]);return e(ii.Provider,Object.assign({value:a},{children:t(o,{children:[l,n]})}))},li=()=>{const e=a(ii);if(void 0===e)throw new Error("useYooptaTools must be used within a ToolsProvider");return e},ci=({children:t})=>e("div",Object.assign({className:"yoo-editor-flex yoo-editor-flex-col"},{children:t})),si=({children:t})=>e("div",Object.assign({onClick:e=>e.stopPropagation(),className:"yoo-editor-bg-[#FFF] yoo-editor-relative yoo-editor-min-w-[200px] yoo-editor-w-auto yoo-editor-overflow-hidden yoo-editor-rounded-md yoo-editor-border yoo-editor-bg-popover yoo-editor-py-[6px] yoo-editor-px-0 yoo-editor-text-popover-foreground yoo-editor-shadow-md data-[state=open]:yoo-editor-animate-in data-[state=closed]:yoo-editor-animate-out data-[state=closed]:yoo-editor-fade-out-0 data-[state=open]:yoo-editor-fade-in-0 data-[state=closed]:yoo-editor-zoom-out-95 data-[state=open]:yoo-editor-zoom-in-95 data-[side=bottom]:yoo-editor-slide-in-from-top-2 data-[side=left]:yoo-editor-slide-in-from-right-2 data-[side=right]:yoo-editor-slide-in-from-left-2 data-[side=top]:yoo-editor-slide-in-from-bottom-2"},{children:t})),di=({children:t})=>e("div",Object.assign({className:"yoo-editor-relative yoo-editor-flex yoo-editor-cursor-default yoo-editor-select-none yoo-editor-items-center yoo-editor-text-sm yoo-editor-outline-none yoo-editor-transition-colors focus:yoo-editor-bg-accent focus:yoo-editor-text-accent-foreground data-[disabled]:yoo-editor-pointer-events-none data-[disabled]:yoo-editor-opacity-50"},{children:t})),ui=({isOpen:o,onClose:n,refs:r,style:i,children:a})=>{var l,c;const s=z(),d=li(),[u,p]=f(!1),{refs:h,floatingStyles:y,context:g}=Ir({placement:"right",open:u,onOpenChange:p,middleware:[Un(),Fn(),zn(),kn(10)],whileElementsMounted:Pn}),{isMounted:v,styles:m}=Ur(g,{duration:100});if(!o)return null;const b=L(s,{at:s.selection}),w=ri(s.blocks[(null==b?void 0:b.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({},y),m);return e(Tr,Object.assign({id:"yoo-block-options-portal",root:document.getElementById("yoopta-editor")},{children:e(Nr,Object.assign({lockScroll:!0,className:"yoo-editor-z-[100]",onClick:n},{children:e("div",Object.assign({style:i,ref:r.setFloating},{children:t(si,{children:[t(ci,{children:[e(di,{children:t("button",Object.assign({type:"button",className:"yoo-editor-rounded-sm hover:yoo-editor-bg-[#37352f14] yoo-editor-leading-[120%] yoo-editor-px-2 yoo-editor-py-1.5 yoo-editor-mx-[4px] yoo-editor-cursor-pointer yoo-editor-w-full yoo-editor-flex yoo-editor-justify-start",onClick:()=>{const e=s.selection;s.deleteBlock({at:e}),s.setBlockSelected(null),s.setSelection(null),n()}},{children:[e(Qr,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Delete"]}))}),e(di,{children:t("button",Object.assign({type:"button",className:"yoo-editor-rounded-sm hover:yoo-editor-bg-[#37352f14] yoo-editor-leading-[120%] yoo-editor-px-2 yoo-editor-py-1.5 yoo-editor-mx-[4px] yoo-editor-cursor-pointer yoo-editor-w-full yoo-editor-flex yoo-editor-justify-start",onClick:()=>{s.duplicateBlock({at:s.selection,focus:!0}),s.setBlockSelected(null),n()}},{children:[e($r,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Duplicate"]}))}),!x&&!(null===(c=s.blocks[(null==b?void 0:b.type)||""])||void 0===c?void 0:c.hasCustomEditor)&&t(di,{children:[v&&!!k&&e(Tr,Object.assign({id:"yoo-block-options-portal",root:document.getElementById("yoopta-editor")},{children:e(Nr,Object.assign({lockScroll:!0,className:"yoo-editor-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),n()},empty:!1,onMouseEnter:()=>{},mode:"toggle",view:"small"})}))}))})),t("button",Object.assign({type:"button",className:"yoo-editor-rounded-sm hover:yoo-editor-bg-[#37352f14] yoo-editor-leading-[120%] yoo-editor-px-2 yoo-editor-py-1.5 yoo-editor-mx-[4px] yoo-editor-cursor-pointer yoo-editor-w-full yoo-editor-flex yoo-editor-justify-start",ref:h.setReference,onClick:()=>p((e=>!e))},{children:[e(Kr,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Turn into"]}))]}),e(di,{children:t("button",Object.assign({type:"button",className:"yoo-editor-rounded-sm hover:yoo-editor-bg-[#37352f14] yoo-editor-leading-[120%] yoo-editor-px-2 yoo-editor-py-1.5 yoo-editor-mx-[4px] yoo-editor-cursor-pointer yoo-editor-w-full yoo-editor-flex yoo-editor-justify-start",onClick:()=>{const e=L(s);e&&(oi(`${window.location.origin}${window.location.pathname}#${e.id}`),s.emit("block:copy",e)),n()}},{children:[e(Gr,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Copy link to block"]}))})]}),a]})}))}))}))};var fi=Object.freeze({__proto__:null,BlockOptions:ui,BlockOptionsMenuContent:si,BlockOptionsMenuGroup:ci,BlockOptionsMenuItem:di,BlockOptionsSeparator:({className:t})=>e("div",{className:`yoo-editor-h-[1px] yoo-editor-bg-[#37352f14] yoo-editor-my-[4px] yoo-editor-w-full ${t}`})});const pi=({block:o,editor:n,dragHandleProps:r,showActions:i,onChangeActiveBlock:a})=>{const[l,c]=f(!1),{refs:s,floatingStyles:d,context:u}=Ir({placement:"right-start",open:l,onOpenChange:c,middleware:[Un(),Fn(),zn(),kn()]}),{isMounted:p,styles:h}=Ur(u,{duration:100}),{setActivatorNodeRef:y,attributes:g,listeners:v}=r,m=Object.assign(Object.assign({},d),h);return t("div",Object.assign({contentEditable:!1,"data-hovered-state":i,className:'yoo-editor-flex yoo-editor-absolute -yoo-editor-left-[50px] yoo-editor-top-[2px] yoo-editor-opacity-0 yoo-editor-transition-opacity yoopta-element-actions data-[hovered-state="true"]:yoo-editor-opacity-100'},{children:[e("button",Object.assign({type:"button",onClick:()=>{const e=J({id:q()}),t=[o.meta.order+1];n.setSelection([o.meta.order]),n.insertBlock(e,{at:t,focus:!0})},className:"yoo-editor-cursor-pointer yoo-editor-rounded-[6px] yoo-editor-h-[24px] yoo-editor-flex yoo-editor-items-center yoo-editor-justify-center yoo-editor-bg-inherit yoo-editor-bg-transparent yoo-editor-transition-colors yoo-editor-duration-[180ms] yoo-editor-ease-[cubic-bezier(0.4,0,0.2,1)] yoo-editor-relative yoo-editor-w-[18px] yoo-editor-p-0 yoo-editor-text-[rgba(55,53,47,0.35)] yoo-editor-m-[0_1px] hover:yoo-editor-bg-[rgba(55,54,47,0.08)] focus:yoo-editor-bg-[rgba(55,54,47,0.08)] active:yoo-editor-bg-[rgba(55,54,47,0.08)] yoo-editor-w-[24px] yoopta-element-actions-plus"},{children:e(Mo,{})})),e("button",Object.assign({type:"button",className:"yoo-editor-cursor-pointer yoo-editor-rounded-[6px] yoo-editor-h-[24px] yoo-editor-flex yoo-editor-items-center yoo-editor-justify-center yoo-editor-bg-inherit yoo-editor-bg-transparent yoo-editor-transition-colors yoo-editor-duration-[180ms] yoo-editor-ease-[cubic-bezier(0.4,0,0.2,1)] yoo-editor-relative yoo-editor-w-[18px] yoo-editor-p-0 yoo-editor-text-[rgba(55,53,47,0.35)] yoo-editor-m-[0_1px] hover:yoo-editor-bg-[rgba(55,54,47,0.08)] focus:yoo-editor-bg-[rgba(55,54,47,0.08)] active:yoo-editor-bg-[rgba(55,54,47,0.08)] yoopta-element-actions-drag",ref:e=>{y(e),s.setReference(e)}},g,v,{onClick:e=>{e.stopPropagation(),a(o.id);const t=Lo(n,{at:[o.meta.order]});n.focusBlock(o.id),t&&setTimeout((()=>{n.blocks[o.type].hasCustomEditor||(w.blur(t),w.deselect(t),R.deselect(t)),n.setBlockSelected([o.meta.order],{only:!0}),n.setSelection([o.meta.order]),c(!0)}),10)}},{children:e(Ao,{})})),e(ui,{isOpen:p,refs:s,style:m,onClose:()=>c(!1)})]}))},hi=({children:o,block:n,blockId:r})=>{var i;const a=z(),[l,c]=f(null),{attributes:s,listeners:d,setNodeRef:u,setActivatorNodeRef:p,transform:h,transition:y,isOver:g,isDragging:v}=Co({id:r,disabled:a.readOnly}),m={transform:h?`translate3d(${h.x}px, ${h.y}px, 0)`:"none",transition:y,opacity:v?.7:1,marginLeft:20*n.meta.depth+"px"},b=null===(i=a.selectedBlocks)||void 0===i?void 0:i.includes(n.meta.order),w=l===r,x={borderBottom:g&&!v?"2px solid #007aff":"none"};return t("div",Object.assign({ref:u,className:"yoo-editor-relative yoo-editor-py-0 yoo-editor-px-[2px] yoo-editor-mt-[2px] yoo-editor-mb-[1px] yoo-editor-rounded yoopta-block-wrapper",onMouseEnter:()=>{a.readOnly||c(r)},onMouseLeave:()=>{a.readOnly||c(null)},style:m,"data-hovered-block":w,"data-yoopta-block":!0,"data-yoopta-block-id":r},{children:[!a.readOnly&&e(pi,{block:n,editor:a,dragHandleProps:{setActivatorNodeRef:p,attributes:s,listeners:d},showActions:w,onChangeActiveBlock:e=>c(e)}),e("div",Object.assign({style:x},{children:o})),b&&!a.readOnly&&e("div",{className:"yoo-editor-absolute yoo-editor-left-0 yoo-editor-top-0 yoo-editor-bg-[#2383e224] yoo-editor-z-[90] yoo-editor-rounded yoo-editor-opacity-100 yoo-editor-h-full yoo-editor-w-full yoo-editor-pointer-events-none yoopta-selection-block"})]}))};function yi(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o}"function"==typeof SuppressedError&&SuppressedError;var gi={};Object.defineProperty(gi,"__esModule",{value:!0});for(var vi="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),mi={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},bi={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:vi?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},wi={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},xi=1;xi<20;xi++)wi["f"+xi]=111+xi;function ki(e,t,o){t&&!("byKey"in t)&&(o=t,t=null),Array.isArray(e)||(e=[e]);var n=e.map((function(e){return Ei(e,t)})),r=function(e){return n.some((function(t){return Ci(t,e)}))};return null==o?r:r(o)}function Ei(e,t){var o=t&&t.byKey,n={},r=(e=e.replace("++","+add")).split("+"),i=r.length;for(var a in mi)n[mi[a]]=!1;var l=!0,c=!1,s=void 0;try{for(var d,u=r[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=Si(f),y=mi[h];if(f.length>1&&!y&&!bi[f]&&!wi[h])throw new TypeError('Unknown modifier: "'+f+'"');1!==i&&y||(o?n.key=h:n.which=Oi(f)),y&&(n[y]=!p||null)}}catch(e){c=!0,s=e}finally{try{!l&&u.return&&u.return()}finally{if(c)throw s}}return n}function Ci(e,t){for(var o in e){var n=e[o],r=void 0;if(null!=n&&((null!=(r="key"===o&&null!=t.key?t.key.toLowerCase():"which"===o?91===n&&93===t.which?91:t.which:t[o])||!1!==n)&&r!==n))return!1}return!0}function Oi(e){return e=Si(e),wi[e]||e.toUpperCase().charCodeAt(0)}function Si(e){return e=e.toLowerCase(),e=bi[e]||e}gi.default=ki,gi.isHotkey=ki,gi.isCodeHotkey=function(e,t){return ki(e,t)};var Di=gi.isKeyHotkey=function(e,t){return ki(e,{byKey:!0},t)};gi.parseHotkey=Ei,gi.compareHotkey=Ci,gi.toKeyCode=Oi,gi.toKeyName=Si;const _i={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"},Ri={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"},ji={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Bi=e=>{const t=_i[e],o=Ri[e],n=ji[e],r=t&&Di(t),i=o&&Di(o),a=n&&Di(n);return e=>!(!r||!r(e))||(!(!i||!i(e))||!(!a||!a(e)))},Ai={isBold:Bi("bold"),isCompose:Bi("compose"),isArrowLeft:Bi("arrowLeft"),isArrowRight:Bi("arrowRight"),isArrowUp:Bi("arrowUp"),isArrowDown:Bi("arrowDown"),isDeleteBackward:Bi("deleteBackward"),isDeleteForward:Bi("deleteForward"),isDeleteLineBackward:Bi("deleteLineBackward"),isDeleteLineForward:Bi("deleteLineForward"),isDeleteWordBackward:Bi("deleteWordBackward"),isDeleteWordForward:Bi("deleteWordForward"),isExtendBackward:Bi("extendBackward"),isExtendForward:Bi("extendForward"),isExtendLineBackward:Bi("extendLineBackward"),isExtendLineForward:Bi("extendLineForward"),isItalic:Bi("italic"),isMoveLineBackward:Bi("moveLineBackward"),isMoveLineForward:Bi("moveLineForward"),isCtrlLeft:Bi("ctrlLeft"),isCtrlRight:Bi("ctrlRight"),isRedo:Bi("redo"),isShiftEnter:Bi("shiftEnter"),isEnter:Bi("enter"),isTransposeCharacter:Bi("transposeCharacter"),isUndo:Bi("undo"),isSpace:Bi("space"),isSelect:Bi("select"),isTab:Bi("tab"),isShiftTab:Bi("shiftTab"),isBackspace:Bi("backspace"),isCmdEnter:Bi("cmdEnter"),isCmd:Bi("cmd"),isEscape:Bi("escape"),isSlashCommand:Bi("slashCommand"),isShiftArrowUp:Bi("shiftArrowUp"),isShiftArrowDown:Bi("shiftArrowDown"),isKekceburek:Bi("kekCeburek")};const Ti={onKeyDown:function(e){return t=>{const o=Lo(e,{at:e.selection});if(!o||!o.selection)return;const n=S.parent(o.selection.anchor.path);if(Ai.isShiftEnter(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void o.insertText("\n")}if(Ai.isEnter(t)){if(t.isDefaultPrevented())return;t.preventDefault();const r=D.isStart(o,o.selection.anchor,n),i=D.isEnd(o,o.selection.anchor,n);if(!r&&!i)return void e.splitBlock({slate:o,focus:!0});const a=J({id:q()}),l=e.selection?[e.selection[0]+1]:[0];e.insertBlock(a,{at:l,slate:o,focus:!0})}else if(Ai.isBackspace(t)){if(t.isDefaultPrevented())return;const n=L(e,{at:e.selection}),r=e.blocks[(null==n?void 0:n.type)||""],i=S.parent(o.selection.anchor.path);if(D.isStart(o,o.selection.anchor,i)){t.preventDefault();const n=D.string(o,i),a=e.selection?e.selection[0]-1:0,l=Lo(e,{at:[a]});let c;if(l&&!r.hasCustomEditor&&(c=function(e,t){const[,o]=D.last(e,t);return{path:o,offset:D.string(e,o).length}}(l,i)),0===n.trim().length)return e.deleteBlock({at:e.selection,focus:!0,focusAt:c});{if(j.isExpanded(o.selection))return R.delete(o,{at:o.selection});if(!l)return;if(0===D.string(l,[0,0]).length)return e.deleteBlock({at:[a],focus:!0,focusAt:c});const t=Array.from(D.nodes(o,{at:[0],match:e=>!D.isEditor(e)&&(B.isText(e)||D.isInline(o,e)),mode:"highest"})).map((([e])=>e));return R.insertNodes(l,t,{at:D.end(l,[])}),e.deleteBlock({at:e.selection,focus:!0,focusAt:c})}}}else{if(Ai.isSelect(t)){if(t.isDefaultPrevented())return;const[,n]=D.first(o,[0]),[,r]=D.last(o,[o.children.length-1]),i=D.range(o,n,r),a=j.equals(o.selection,i);if(j.isExpanded(o.selection)&&a)return t.preventDefault(),w.blur(o),w.deselect(o),R.deselect(o),void e.setBlockSelected([],{allSelected:!0})}if(Ai.isShiftTab(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void e.decreaseBlockDepth()}if(Ai.isTab(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void e.increaseBlockDepth()}if(Ai.isArrowUp(t)){if(t.isDefaultPrevented())return;const n=S.parent(o.selection.anchor.path);if(D.isStart(o,o.selection.anchor,n)){const o=e.selection?[e.selection[0]-1]:null,n=Lo(e,{at:o}),r=L(e,{at:o});if(n&&r){const[,o]=D.last(n,[0]),i={path:o,offset:D.string(n,o).length};return t.preventDefault(),void e.focusBlock(r.id,{focusAt:i,waitExecution:!1,shouldUpdateBlockSelection:!0})}}}if(Ai.isArrowDown(t)){if(t.isDefaultPrevented())return;const n=S.parent(o.selection.anchor.path);if(D.isEnd(o,o.selection.anchor,n)){const o=e.selection?[e.selection[0]+1]:null,r=Lo(e,{at:o}),i=L(e,{at:o});if(r&&i){const o=function(e,t){const[,o]=D.first(e,t);return{path:o,offset:0}}(r,n);return t.preventDefault(),void e.focusBlock(i.id,{focusAt:o,waitExecution:!1})}}}if(j.isExpanded(o.selection)){if(Object.values(e.formats).length>0)for(const o of Object.values(e.formats))if(o.hotkey&&Di(o.hotkey)(t)){t.preventDefault(),e.formats[o.type].toggle();break}}}}}},Mi=({children:t,attributes:o,placeholder:n})=>{const r=x(),i=Object.assign({},o);return r&&n&&(i["data-placeholder"]=n,i.className="yoopta-placeholder"),e("span",Object.assign({},i,{children:t}))};function Li(e){try{return new URL(e),!0}catch(e){return!1}}const Ni=(e,t)=>{(e=>{const[t]=D.nodes(e,{match:e=>!D.isEditor(e)&&_.isElement(e)&&"link"===e.type});return!!t})(e)&&(e=>{R.unwrapNodes(e,{match:e=>!D.isEditor(e)&&_.isElement(e)&&"link"===e.type})})(e);const{selection:o}=e,n=o&&j.isCollapsed(o),r={type:"link",children:n?[{text:t}]:[],props:{url:t,target:"_blank",rel:"noreferrer"}};n?R.insertNodes(e,r):(R.wrapNodes(e,r,{split:!0}),R.collapse(e,{edge:"end"}))};function Ii(e){return!!(e&&e.id&&e.type&&e.value&&e.meta)}const Pi={B:{type:"bold"},STRONG:{type:"bold"},I:{type:"italic"},U:{type:"underline"},S:{type:"strike"},CODE:{type:"code"},EM:{type:"code"}};function zi(e,t,o){var n,r,i;if(3===o.nodeType){return null===(n=o.textContent)||void 0===n?void 0:n.replace(/[\t\n\r\f\v]+/g," ")}if(1!==o.nodeType)return null;if("BR"===o.nodeName)return"\n";const a=o;let l=Array.from(a.childNodes).map((o=>zi(e,t,o))).flat();if(Pi[o.nodeName]){return{[Pi[o.nodeName].type]:!0,text:null===(r=o.textContent)||void 0===r?void 0:r.replace(/[\t\n\r\f\v]+/g," ")}}if(t[o.nodeName]){const n=t[o.nodeName],r=e.blocks[n.type],a=ni(r.elements)||"",c=r.elements[a],s="void"===(null===(i=c.props)||void 0===i?void 0:i.nodeType);let d={id:q(),type:a,children:s&&!r.hasCustomEditor?[{text:""}]:l.map(Fi),props:Object.assign({nodeType:"block"},c.props)};if(n.parse){const e=n.parse(o);if(e)if(_.isElement(e))d=e;else if(Array.isArray(e)){return e}}0===d.children.length&&(d.children=[{text:""}]);return J({id:q(),type:n.type,value:[d],meta:{order:0,depth:0}})}return l}function Fi(e){if("string"==typeof e)return{text:e};if(Array.isArray(e))return{text:e[0]};if(e.text)return e;if(Ii(e)){let t="";return e.value[0].children.forEach((e=>{t+=`${e.text}`})),{text:t}}return{text:""}}const Ui={html:{deserialize:function(e,t){console.log("pasted html",t);const o=function(e){const t={};return Object.keys(e.plugins).forEach((o=>{const n=e.plugins[o],{parsers:r}=n;if(r){const{html:e}=r;if(e){const{deserialize:n}=e;if(n){const{nodeNames:e}=n;e&&e.forEach((e=>{t[e]={type:o,parse:n.parse}}))}}}})),t}(e);return zi(e,o,t).filter(Ii)},serialize:function(){}},markdown:{}},Hi=({id:t,customEditor:o,elements:n,marks:r,events:i,options:a,placeholder:c="Type '/' for commands"})=>{var s,f;const p=z(),h=F(t),y=l(h.value).current,g=h.type,v=d((()=>(e=>{const t={};return Object.keys(e).forEach((o=>t[o]=e[o].render)),t})(n)),[n]),m=d((()=>(e=>{const t={};return e?(e.forEach((e=>t[e.type]=e)),t):t})(r)),[r]),b=d((()=>{let e=p.blockEditorsMap[t];return Object.keys(n).forEach((t=>{var o;const r=null===(o=n[t].props)||void 0===o?void 0:o.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:o}=e;return e.insertText=t=>{t&&Li(t)?Ni(e,t):o(t)},e.insertData=o=>{const n=o.getData("text/plain");n&&Li(n)?Ni(e,n):t(o)},e})(e))})),e}),[]),w=d((()=>{if(!i||p.readOnly)return{};const e={hotkeys:Ai,currentBlock:h,defaultBlock:J({id:q()})},t={};return Object.keys(i).forEach((o=>{t[o]=function(t){if(i[o]){i[o](p,b,e)(t)}}})),t}),[i,p,h]),x=u((e=>p.updateBlock(t,{value:e})),[t]),k=u((o=>{const n=v[o.element.type];return n?e(n,Object.assign({},o,{blockId:t,HTMLAttributes:null==a?void 0:a.HTMLAttributes})):e(C,Object.assign({},o))}),[n]),E=u((t=>{var o,n,r,i,a;let{children:l,leaf:s,attributes:d}=t;const u=yi(s,["text"]),f=(null===(o=p.selection)||void 0===o?void 0:o[0])===h.meta.order;u&&Object.keys(u).forEach((e=>{const t=m[e];t&&(l=t.render({children:l,leaf:s}))}));const y=!("void"===(null===(a=null===(i=null===(r=null===(n=t.children)||void 0===n?void 0:n.props)||void 0===r?void 0:r.parent)||void 0===i?void 0:i.props)||void 0===a?void 0:a.nodeType))&&f&&s.withPlaceholder;return e(Mi,Object.assign({attributes:d,placeholder:y?c:void 0},{children:l}))}),[r]),O=u((e=>{var t;p.readOnly||(null===(t=w.onKeyDown)||void 0===t||t.call(w,e),Ti.onKeyDown(p)(e))}),[w.onKeyDown,p.readOnly]),S=u((e=>{var t;p.readOnly||null===(t=null==w?void 0:w.onKeyUp)||void 0===t||t.call(w,e)}),[w.onKeyUp,p.readOnly]),_=u((e=>{var t,o;p.readOnly||((null===(t=p.selection)||void 0===t?void 0:t[0])!==h.meta.order&&p.setSelection([h.meta.order]),null===(o=null==w?void 0:w.onClick)||void 0===o||o.call(w,e))}),[w.onClick,p.readOnly,null===(s=p.selection)||void 0===s?void 0:s[0]]),R=u((e=>{var t;p.readOnly||(e.preventDefault(),null===(t=null==w?void 0:w.onBlur)||void 0===t||t.call(w,e))}),[w.onBlur,p.readOnly]),B=u((e=>{var t;p.readOnly||null===(t=null==w?void 0:w.onFocus)||void 0===t||t.call(w,e)}),[w.onFocus,p.readOnly]),A=u((e=>{var t;if(p.readOnly)return;null===(t=null==w?void 0:w.onPaste)||void 0===t||t.call(w,e);const o=e.clipboardData.getData("text/html"),n=(new DOMParser).parseFromString(o,"text/html");if(n.body.childNodes.length>0){const e=Ui.html.deserialize(p,n.body);if(e.length>0)return void p.insertBlocks(e,{at:p.selection,focus:!0})}}),[w.onPaste,p.readOnly]),T=u((e=>{var t;const o=[];if(p.readOnly)return o;const[n,r]=e,i=(null===(t=p.selection)||void 0===t?void 0:t[0])===h.meta.order;return b.selection&&i&&!D.isEditor(n)&&""===D.string(b,[r[0]])&&j.includes(b.selection,r)&&j.isCollapsed(b.selection)&&o.push(Object.assign(Object.assign({},b.selection),{withPlaceholder:!0})),o}),[p.readOnly,null===(f=p.selection)||void 0===f?void 0:f[0]]);return e("div",Object.assign({"data-plugin-id":t,"data-plugin-type":g},{children:e(Vi,{id:t,slate:b,initialValue:y,onChange:x,decorate:T,renderLeaf:E,renderElement:k,eventHandlers:w,onKeyDown:O,onKeyUp:S,onFocus:B,onClick:_,onBlur:R,customEditor:o,readOnly:p.readOnly,onPaste:A})}))},Vi=p((({id:t,slate:o,initialValue:n,onChange:r,renderLeaf:i,renderElement:a,eventHandlers:l,onKeyDown:c,onKeyUp:s,onFocus:d,onClick:u,onBlur:f,onPaste:p,customEditor:h,decorate:y,readOnly:g})=>"function"==typeof h?h({blockId:t}):e(k,Object.assign({editor:o,initialValue:n,onChange:r},{children:e(E,Object.assign({id:`yoopta-slate-editor-${t}`,renderElement:a,renderLeaf:i,className:"focus-visible:yoo-editor-outline-none focus:yoo-editor-outline-none",spellCheck:!0},l,{onKeyDown:c,onKeyUp:s,onFocus:d,onClick:u,decorate:y,onBlur:f,readOnly:g,onPaste:p}),`editable-${t}`)}),`slate-${t}`)));Vi.displayName="SlateEditorInstance";const Ki=({editor:e})=>({sensors:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return d((()=>[...t].filter((e=>null!=e))),[...t])}(Ae(Et,{activationConstraint:{delay:100,tolerance:0}}),Ae(mt,{coordinateGetter:Do})),handleDragEnd:u((t=>{const{active:o,over:n}=t;if(o&&n&&o.id!==n.id){const t=e.children[n.id].meta.order;e.moveBlock(o.id,[t])}}),[]),handleDragStart:u((t=>{e.setBlockSelected(null)}),[])}),Wi=[],Yi=({editor:t,marks:n,placeholder:r})=>{const i=V(),{sensors:a,handleDragEnd:l,handleDragStart:c}=Ki({editor:t}),s=Object.keys(t.children),u=d((()=>0===s.length?Wi:s.sort(((e,o)=>t.children[e].meta.order-t.children[o].meta.order))),[s]),f=[];for(let o=0;o<u.length;o++){const i=u[o],a=t.children[i],l=t.plugins[a.type];a&&l?f.push(e(hi,Object.assign({block:a,blockId:i},{children:e(Hi,{type:a.type,id:i,marks:n,customEditor:l.customEditor,events:l.events,elements:l.elements,options:l.options,placeholder:r},i)}),i)):console.error(`Plugin ${a.type} not found`)}return i?e(o,{children:f}):e(to,Object.assign({sensors:a,collisionDetection:Fe,onDragStart:c,onDragEnd:l},{children:e(vo,Object.assign({disabled:i,items:u,strategy:ho},{children:f}))}))},$i=({editor:e,yooptaEditorRef:t,root:o})=>{const[n,r]=f({origin:[0,0],coords:[0,0],selection:!1}),i=i=>{var a;if(e.readOnly||!1===o)return;const l=null===(a=t.current)||void 0===a?void 0:a.contains(i.target);if(!l&&!n.selection&&Array.isArray(e.selectedBlocks)&&e.selectedBlocks.length>0)return e.setBlockSelected(null),c();l||r({origin:[i.pageX,i.pageY-window.pageYOffset],coords:[i.pageX,i.pageY-window.pageYOffset],selection:!0})},a=t=>{if(!n.selection||e.readOnly||!1===o)return;r((e=>Object.assign(Object.assign({},e),{coords:[t.pageX,t.pageY-window.pageYOffset]})));const i=((e,t)=>{const o=[];return document.querySelectorAll("[data-yoopta-block]").forEach(((n,r)=>{if(!n)return;const i=n.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&&o.push(r)})),o})(n.origin,[t.pageX,t.pageY-window.pageYOffset]);e.setBlockSelected(i,{only:!0})},l=()=>{e.readOnly||c()};s((()=>{var n;if(e.readOnly||!1===o)return;const r=o&&"current"in o?o.current:o||document;if(!r)throw new Error("Root element not found. Please check the `selectionBoxRoot` prop");if(!("nodeType"in r))throw new Error("Root element should be a DOM element or a ref object. Please check the `selectionBoxRoot` prop");if(null===(n=t.current)||void 0===n?void 0:n.contains(r))throw new Error("Root element should not be a child of the editor. Please check the `selectionBoxRoot` prop");return r.addEventListener("mousedown",i),r.addEventListener("mousemove",a),r.addEventListener("mouseup",l),()=>{r.removeEventListener("mousedown",i),r.removeEventListener("mousemove",a),r.removeEventListener("mouseup",l)}}),[e.selectedBlocks,n,o,e.readOnly]);const c=()=>{r({origin:[0,0],coords:[0,0],selection:!1})};return Object.assign(Object.assign({},n),{onClose:c})},Xi=({origin:t,coords:o,isOpen:n})=>{if(!n)return null;const r={zIndex:10,left:t[0],top:t[1],height:Math.abs(o[1]-t[1]-1),width:Math.abs(o[0]-t[0]-1),userSelect:"none",transformOrigin:"top left",transform:t[1]>o[1]&&t[0]>o[0]?"scaleY(-1) scaleX(-1)":t[1]>o[1]?"scaleY(-1)":t[0]>o[0]?"scaleX(-1)":void 0,position:"fixed",backgroundColor:"rgba(35, 131, 226, 0.14)"};return e("div",{style:r})},Zi={selectionStarted:!1,indexToSelect:null,startedIndexToSelect:null},qi=({placeholder:o,marks:n,className:r,selectionBoxRoot:i,width:a,autoFocus:c=!0})=>{const d=z(),u=V(),f=l(null),p=$i({editor:d,yooptaEditorRef:f,root:i});let h=l(Zi).current;s((()=>{if(!c||u)return;const e=L(d,{at:[0]});e&&d.focusBlock(e.id,{waitExecution:!0})}),[c,u]),s((()=>{if(!u)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)}),[d.selectedBlocks,u]);const y=()=>{u||Array.isArray(d.selectedBlocks)&&d.selectedBlocks.length>0&&d.setBlockSelected(null)},g=()=>{h.indexToSelect=null,h.startedIndexToSelect=null,h.selectionStarted=!1},v=e=>{var t,o,n,r,i;if(!u){if(Ai.isSelect(e)){if((null===(t=d.selectedBlocks)||void 0===t?void 0:t.length)===Object.keys(d.children).length)return void e.preventDefault();if(h.selectionStarted)return e.preventDefault(),void d.setBlockSelected([],{allSelected:!0})}if(Ai.isBackspace(e)){e.stopPropagation();if(Array.isArray(d.selectedBlocks)&&(null===(o=d.selectedBlocks)||void 0===o?void 0:o.length)===Object.keys(d.children).length)return e.preventDefault(),d.deleteBlock({deleteAll:!0}),d.setBlockSelected(null),void g();if(Array.isArray(d.selectedBlocks)&&(null===(n=d.selectedBlocks)||void 0===n?void 0:n.length)>0)return e.preventDefault(),d.deleteBlock({fromPaths:d.selectedBlocks}),d.setBlockSelected(null),void g()}if(Ai.isShiftArrowUp(e)){if("function"==typeof e.isDefaultPrevented&&e.isDefaultPrevented())return;if(h.selectionStarted&&null!==h.startedIndexToSelect&&null!==h.indexToSelect){const e=h.indexToSelect,t=e-1;if(0===e)return;if(e===h.startedIndexToSelect)return d.setBlockSelected([t]),void(h.indexToSelect=t);if(t<h.startedIndexToSelect)return d.setBlockSelected([t]),void(h.indexToSelect=t);if((null===(r=d.selectedBlocks)||void 0===r?void 0:r.includes(e))&&e!==h.startedIndexToSelect){const o=d.selectedBlocks.filter((t=>t!==e));return d.setBlockSelected(o,{only:!0}),void(h.indexToSelect=t)}return}const t=L(d),o=Lo(d);if(!o||!o.selection||!t)return;const n=S.parent(o.selection.anchor.path),i=D.isStart(o,o.selection.focus,n);if(j.isExpanded(o.selection)&&i){const n=d.selection?[d.selection[0]-1]:[0],r=L(d,{at:n});t&&r&&(e.preventDefault(),w.blur(o),w.deselect(o),R.deselect(o),d.setSelection(null),d.setBlockSelected([null==t?void 0:t.meta.order,t.meta.order-1]),h.startedIndexToSelect=t.meta.order,h.indexToSelect=t.meta.order-1,h.selectionStarted=!0)}}if(Ai.isShiftArrowDown(e)){if(h.selectionStarted&&null!==h.indexToSelect&&null!==h.startedIndexToSelect){const e=h.indexToSelect,t=e+1;if(t===Object.keys(d.children).length)return;if(e===h.startedIndexToSelect)return d.setBlockSelected([t]),void(h.indexToSelect=t);if(t>h.startedIndexToSelect)return d.setBlockSelected([t]),void(h.indexToSelect=t);if((null===(i=d.selectedBlocks)||void 0===i?void 0:i.includes(e))&&e!==h.startedIndexToSelect){const o=d.selectedBlocks.filter((t=>t!==e));return d.setBlockSelected(o,{only:!0}),void(h.indexToSelect=t)}return}const t=L(d),o=Lo(d);if(!o||!o.selection||!t)return;const n=S.parent(o.selection.anchor.path),r=D.isEnd(o,o.selection.focus,n);if(j.isExpanded(o.selection)&&r){const n=d.selection?[d.selection[0]+1]:[0],r=L(d,{at:n});t&&r&&(e.preventDefault(),w.blur(o),w.deselect(o),R.deselect(o),d.setSelection(null),d.setBlockSelected([null==t?void 0:t.meta.order,(null==t?void 0:t.meta.order)+1]),h.startedIndexToSelect=t.meta.order,h.indexToSelect=t.meta.order+1,h.selectionStarted=!0)}}}},m=(b={userSelect:p.selection?"none":"auto",pointerEvents:p.selection?"none":"auto",width:a},Object.assign({paddingBottom:150},b));var b;return t("div",Object.assign({id:"yoopta-editor",className:r,style:m,ref:f,onClick:e=>{u||(g(),(e=>{var t;const o=f.current;if(!o)return;const{bottom:n}=o.getBoundingClientRect(),r=n-parseInt(getComputedStyle(o).paddingBottom,10),i=J({id:q()});if(e.clientY>=r){const e=Object.keys(d.children).length-1,o=L(d,{at:[e]}),n=Lo(d,{at:[e]});if(o&&n&&n.selection){const e=D.string(n,n.selection.anchor.path),r=S.parent(n.selection.anchor.path),[a]=D.node(n,r);if(o.type===i.type&&_.isElement(a)&&"void"!==(null===(t=a.props)||void 0===t?void 0:t.nodeType)&&0===e.trim().length)return void d.focusBlock(o.id,{slate:n})}const r=e+1;d.insertBlock(i,{at:[r],focus:!0})}})(e),y())},onBlur:e=>{var t;(null===(t=f.current)||void 0===t?void 0:t.contains(e.relatedTarget))||u||(g(),y())}},{children:[e(Yi,{editor:d,marks:n,placeholder:o}),!1!==i&&e(Xi,{origin:p.origin,coords:p.coords,isOpen:p.selection&&!u})]}))},Gi=({children:e,fallback:t=null})=>{const[o,n]=f(!1);return s((()=>n(!0)),[]),o?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 oa=Object.getPrototypeOf;function na(e){return!!e&&!!e[ea]}function ra(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=oa(e);if(null===t)return!0;const o=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return o===Object||"function"==typeof o&&Function.toString.call(o)===ia}function la(e,t){0===ca(e)?Reflect.ownKeys(e).forEach((o=>{t(o,e[o],e)})):e.forEach(((o,n)=>t(n,o,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,o){const n=ca(e);2===n?e.set(t,o):3===n?e.add(o):e[t]=o}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(!oa(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const o=Object.getOwnPropertyDescriptors(e);delete o[ea];let n=Reflect.ownKeys(o);for(let t=0;t<n.length;t++){const r=n[t],i=o[r];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(o[r]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[r]})}return Object.create(oa(e),o)}function ya(e,t=!1){return va(e)||na(e)||!ra(e)||(ca(e)>1&&(e.set=e.add=e.clear=e.delete=ga),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>ya(t,!0)))),e}function ga(){ta(2)}function va(e){return Object.isFrozen(e)}var ma,ba={};function wa(e){const t=ba[e];return t||ta(0),t}function xa(){return ma}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===ma&&(ma=e.parent_)}function Oa(e){return ma={drafts_:[],parent_:ma,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 Da(e,t){t.unfinalizedDrafts_=t.drafts_.length;const o=t.drafts_[0];return void 0!==e&&e!==o?(o[ea].modified_&&(Ea(t),ta(4)),ra(e)&&(e=_a(t,e),t.parent_||ja(t,e)),t.patches_&&wa("Patches").generateReplacementPatches_(o[ea].base_,e,t.patches_,t.inversePatches_)):e=_a(t,o,[]),Ea(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ji?e:void 0}function _a(e,t,o){if(va(t))return t;const n=t[ea];if(!n)return la(t,((r,i)=>Ra(e,n,t,r,i,o))),t;if(n.scope_!==e)return t;if(!n.modified_)return ja(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const t=n.copy_;let r=t,i=!1;3===n.type_&&(r=new Set(t),t.clear(),i=!0),la(r,((r,a)=>Ra(e,n,t,r,a,o,i))),ja(e,t,!1),o&&e.patches_&&wa("Patches").generatePatches_(n,o,e.patches_,e.inversePatches_)}return n.copy_}function Ra(e,t,o,n,r,i,a){if(na(r)){const a=_a(e,r,i&&t&&3!==t.type_&&!sa(t.assigned_,n)?i.concat(n):void 0);if(da(o,n,a),!na(a))return;e.canAutoFreeze_=!1}else a&&o.add(r);if(ra(r)&&!va(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;_a(e,r),t&&t.scope_.parent_||"symbol"==typeof n||!Object.prototype.propertyIsEnumerable.call(o,n)||ja(e,r)}}function ja(e,t,o=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ya(t,o)}var Ba={get(e,t){if(t===ea)return e;const o=pa(e);if(!sa(o,t))return function(e,t,o){const n=Ma(t,o);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}(e,o,t);const n=o[t];return e.finalized_||!ra(n)?n:n===Ta(e.base_,t)?(Na(e),e.copy_[t]=Ia(n,e)):n},has:(e,t)=>t in pa(e),ownKeys:e=>Reflect.ownKeys(pa(e)),set(e,t,o){const n=Ma(pa(e),t);if(n?.set)return n.set.call(e.draft_,o),!0;if(!e.modified_){const n=Ta(pa(e),t),a=n?.[ea];if(a&&a.base_===o)return e.copy_[t]=o,e.assigned_[t]=!1,!0;if(((r=o)===(i=n)?0!==r||1/r==1/i:r!=r&&i!=i)&&(void 0!==o||sa(e.base_,t)))return!0;Na(e),La(e)}var r,i;return e.copy_[t]===o&&(void 0!==o||t in e.copy_)||Number.isNaN(o)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=o,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Ta(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Na(e),La(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const o=pa(e),n=Reflect.getOwnPropertyDescriptor(o,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:o[t]}:n},defineProperty(){ta(11)},getPrototypeOf:e=>oa(e.base_),setPrototypeOf(){ta(12)}},Aa={};function Ta(e,t){const o=e[ea];return(o?pa(o):e)[t]}function Ma(e,t){if(!(t in e))return;let o=oa(e);for(;o;){const e=Object.getOwnPropertyDescriptor(o,t);if(e)return e;o=oa(o)}}function La(e){e.modified_||(e.modified_=!0,e.parent_&&La(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,o){return Ba.set.call(this,e[0],t,o,e[0])};function Ia(e,t){const o=ua(e)?wa("MapSet").proxyMap_(e,t):fa(e)?wa("MapSet").proxySet_(e,t):function(e,t){const o=Array.isArray(e),n={type_:o?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 r=n,i=Ba;o&&(r=[n],i=Aa);const{revoke:a,proxy:l}=Proxy.revocable(r,i);return n.draft_=l,n.revoke_=a,l}(e,t);return(t?t.scope_:xa()).drafts_.push(o),o}function Pa(e){if(!ra(e)||va(e))return e;const t=e[ea];let o;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,o=ha(e,t.scope_.immer_.useStrictShallowCopy_)}else o=ha(e,!0);return la(o,((e,t)=>{da(o,e,Pa(t))})),t&&(t.finalized_=!1),o}var za=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,o)=>{if("function"==typeof e&&"function"!=typeof t){const o=t;t=e;const n=this;return function(e=o,...r){return n.produce(e,(e=>t.call(this,e,...r)))}}let n;if("function"!=typeof t&&ta(6),void 0!==o&&"function"!=typeof o&&ta(7),ra(e)){const r=Oa(this),i=Ia(e,void 0);let a=!0;try{n=t(i),a=!1}finally{a?Ea(r):Ca(r)}return ka(r,o),Da(n,r)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===Ji&&(n=void 0),this.autoFreeze_&&ya(n,!0),o){const t=[],r=[];wa("Patches").generateReplacementPatches_(e,n,t,r),o(t,r)}return n}ta(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...o)=>this.produceWithPatches(t,(t=>e(t,...o)));let o,n;return[this.produce(e,t,((e,t)=>{o=e,n=t})),o,n]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ra(e)||ta(8),na(e)&&(e=function(e){na(e)||ta(10);return Pa(e)}(e));const t=Oa(this),o=Ia(e,void 0);return o[ea].isManual_=!0,Ca(t),o}finishDraft(e,t){const o=e&&e[ea];o&&o.isManual_||ta(9);const{scope_:n}=o;return ka(n,t),Da(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let o;for(o=t.length-1;o>=0;o--){const n=t[o];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}o>-1&&(t=t.slice(o+1));const n=wa("Patches").applyPatches_;return na(e)?n(e,t):this.produce(e,(e=>n(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 o=Lo(e);if(!o)return!1;const n=D.marks(o);return!!(null==n?void 0:n[t])}const Va=(e,t)=>{const{insertText:o}=t;return t.insertText=n=>{var r;const{selection:i}=t;if(" "===n&&i&&j.isCollapsed(i)){const{anchor:a}=i,l=D.above(t,{match:e=>_.isElement(e)&&D.isBlock(t,e),mode:"lowest"});if(!l)return;const[,c]=l,s=D.parent(t,c),[d]=s;if(_.isElement(d)&&!B.isText(d.children[0]))return o(n);const u=l?c:[],f={anchor:a,focus:D.start(t,u)},p=D.string(t,f),h=null===(r=e.shortcuts)||void 0===r?void 0:r[p];if(!!h&&!h.isActive())return R.select(t,f),R.delete(t),void h.create({deleteText:!1})}o(n)},t};function Ka(e,t,o){e.children=Fa(e.children);let n=!1;const r=e.children[t];if(!r)throw Error(`Block with id ${t} not found`);o.id&&(r.id=o.id,n=!0),o.type&&(r.type=o.type,n=!0),o.meta&&(r.meta=o.meta,n=!0),o.value&&(r.value=o.value),e.children=Ua(e.children),n&&e.applyChanges(),e.emit("change",e.children)}function Wa(e,t,o){e.children=Fa(e.children);const n=L(e,{at:e.selection});if(!n)throw new Error("Block from not found at current selection");const r=ni(e.blocks[n.type].elements);if(n.type===t)return void(e.children=Ua(e.children));const i=Lo(e,{at:[n.meta.order]});if(!i)throw new Error(`Slate not found for block in position ${n.meta.order}`);const a=ni(e.blocks[t].elements);D.withoutNormalizing(i,(()=>{!function(e,t={}){var o;const{at:n,elementType:r}=t,i=n||(null===(o=e.selection)||void 0===o?void 0:o.anchor.path);if(!i)return;let a=e=>!D.isEditor(e)&&_.isElement(e);r&&(a=e=>!D.isEditor(e)&&_.isElement(e)&&e.type===r);const l=S.parent(i),c=D.nodes(e,{at:l,match:a,mode:"lowest"});if(c){const[e]=c}}(i,{elementType:r}),R.setNodes(i,{type:a},{at:[0],mode:"lowest",match:e=>_.isElement(e)&&!D.isInline(i,e)});const o={id:n.id,type:t,meta:Object.assign(Object.assign({},n.meta),{order:n.meta.order}),value:i.children};e.blockEditorsMap[n.id]=i,e.children[n.id]=o,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children)}))}function Ya(e,t={}){const{at:o=e.selection,deleteAll:n=!1,fromPaths:r,focus:i}=t;if(Array.isArray(r)&&r.length>0){e.children=Fa(e.children),r.forEach((t=>{const o=L(e,{at:[t]});o&&(delete e.children[o.id],delete e.blockEditorsMap[o.id])}));return Object.keys(e.children).forEach(((t,o)=>{e.children[t].meta.order=o})),e.children=Ua(e.children),e.applyChanges(),void e.emit("change",e.children)}if(n||1===Object.keys(e.children).length){e.children={},e.blockEditorsMap={};const t=J({id:q()}),o=Za(e);return e.children[t.id]=t,e.blockEditorsMap[t.id]=o,e.setSelection([0]),e.setBlockSelected(null),e.focusBlock(t.id,{slate:o,waitExecution:!0}),e.applyChanges(),void e.emit("change",e.children)}if(!o)return;e.children=Fa(e.children);const[a]=o,l=Object.keys(e.children),c=l.find((t=>e.children[t].meta.order===a));if(l.forEach((t=>{const o=e.children[t];o.meta.order>a&&(o.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 o=e.selection?e.selection[0]-1:0,n=L(e,{at:[o]});n&&e.focusBlock(n.id,{focusAt:t.focusAt})}}function $a(e,t){const o={};return t.forEach((t=>{const n=t.type;o[n]={hotkey:t.hotkey,type:n,getValue:()=>function(e,t){const o=Lo(e);if(!o)return null;const n=D.marks(o);return null==n?void 0:n[t]}(e,n),isActive:()=>Ha(e,n),toggle:()=>function(e,t){const o=Lo(e),n=Ha(e,t);o&&(n?D.removeMark(o,t):D.addMark(o,t,!0),e.applyChanges(),e.emit("change",e.children))}(e,n),update:t=>function(e,t,o){const n=Lo(e);n&&n.selection&&j.isExpanded(n.selection)&&(D.addMark(n,t,o),e.applyChanges(),e.emit("change",e.children))}(e,n,t)}})),o}function Xa(e,t){const o={};return t.forEach(((t,n)=>{var r;const i=ri(t.elements),a=null===(r=null==i?void 0:i.props)||void 0===r?void 0:r.nodeType;if(!("inline"===a||"inlineVoid"===a)){const n={};Object.keys(t.elements).forEach((e=>{const o=yi(t.elements[e],["render"]);n[e]=o}));const{display:r,placeholder:i,align:a,shortcuts:l}=t.options||{};o[t.type]={type:t.type,elements:n,hasCustomEditor:!!t.customEditor,options:{display:r,placeholder:i,align:a,shortcuts:l},isActive:()=>{const o=L(e,{at:e.selection});return(null==o?void 0:o.type)===t.type},toggle:(t,o)=>{Wa(e,t)},create:o=>{!function(e,t,o){var n;e.children=Fa(e.children);const r=L(e);if(!r)throw new Error(`No block found in the current selection path. Passed path: ${e.selection}`);const i=(null==o?void 0:o.slate)||Lo(e,{at:[null==r?void 0:r.meta.order]});if(!i||!i.selection)return;const a=e.blocks[t],l=ni(a.elements),c=a.elements[l];if(!c)return;const s=Object.assign({nodeType:(null===(n=c.props)||void 0===n?void 0:n.nodeType)||"block"},c.props),d=G({id:q(),type:l,props:s});R.setNodes(i,d,{at:[0,0],match:e=>_.isElement(e),mode:"highest"}),(null==o?void 0:o.deleteText)&&R.delete(i,{at:[0,0]});const u=J({id:r.id,type:a.type,meta:{order:r.meta.order,depth:r.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==o?void 0:o.focus)&&e.focusBlock(f,{slate:i,waitExecution:!0})}(e,t.type,o)},update:(t,o)=>{Ka(e,t,o)},updateElement:(t,o,n)=>{!function(e,t,o,n){const r=e.children[t];if(!r)throw new Error(`Block with id ${t} not found`);const i=Lo(e,{at:[r.meta.order]});i?D.withoutNormalizing(i,(()=>{const[t]=D.nodes(i,{at:[0],match:e=>_.isElement(e)&&e.type===o}),r=null==t?void 0:t[0],a=(null==r?void 0:r.props)||{},l={props:Object.assign(Object.assign({},a),n)};R.setNodes(i,l,{at:[0],match:e=>_.isElement(e)&&e.type===o,mode:"lowest"}),e.applyChanges(),e.emit("change",e.children)})):console.warn("No slate found")}(e,t,o,n)},delete:t=>{Ya(e,t)}}}})),o}function Za(e){return Va(e,O(A()))}function qa({type:e,hotkey:t,render:o}){return{type:e,hotkey:t,render:o}}const Ga=qa({type:"fakeSelection",render:t=>e("span",Object.assign({style:{backgroundColor:"#d7e6fa"}},{children:t.children}))}),Ja=(()=>{const e=q();return{[e]:J({id:e})}})(),Qa=new X,el=(e,t)=>Qa.on(e,t),tl=(e,t)=>Qa.once(e,t),ol=(e,t)=>Qa.off(e,t),nl=(e,t)=>Qa.emit(e,t);const rl=({editor:o,value:n,marks:r,plugins:i,autoFocus:a,className:l,tools:c,selectionBoxRoot:s,children:u,placeholder:p,readOnly:h,width:y})=>{const g=()=>{w((e=>Object.assign(Object.assign({},e),{version:e.version+1})))},v=d((()=>r?[Ga,...r]:[Ga]),[r]),m=d((()=>i.map((e=>e.getPlugin))),[i]),[b,w]=f((()=>(o.applyChanges=g,o.readOnly=h||!1,v&&(o.formats=$a(o,v)),o.blocks=Xa(o,m),o.children=function(e){return!!e&&"object"==typeof e&&0!==Object.keys(e).length}(n)?n:Ja,o.blockEditorsMap=function(e){const t={};return Object.keys(e.children).forEach((o=>{const n=Za(e);t[o]=n})),t}(o),o.shortcuts=function(e){const t={};return Object.values(e.blocks).forEach((e=>{var o,n,r,i;e.options&&Array.isArray(null===(o=e.options)||void 0===o?void 0:o.shortcuts)&&(null===(n=e.options)||void 0===n?void 0:n.shortcuts.length)>0&&(null===(i=null===(r=e.options)||void 0===r?void 0:r.shortcuts)||void 0===i||i.forEach((o=>{t[o]=e})))})),t}(o),o.plugins=function(e){const t={},o={};return e.forEach((e=>{e.elements&&Object.keys(e.elements).forEach((t=>{var n;const r=e.elements[t],i=null===(n=r.props)||void 0===n?void 0:n.nodeType;"inline"!==i&&"inlineVoid"!==i||(o[t]=r)})),t[e.type]=e})),e.forEach((e=>{if(e.elements){const n=Object.assign(Object.assign({},e.elements),o);t[e.type]=Object.assign(Object.assign({},e),{elements:n})}})),t}(m),o.on=el,o.once=tl,o.off=ol,o.emit=nl,{editor:o,version:0})));return e(Gi,{children:e(P,Object.assign({editorState:b},{children:t(ai,Object.assign({tools:c},{children:[e(qi,{placeholder:p,marks:v,autoFocus:a,className:l,selectionBoxRoot:s,width:y}),u]}))}))})},il=Object.assign(Object.assign({},fi),{ExtendedBlockActions:({className:n,style:r,onClick:i,children:a})=>{const l=V(),[c,s]=f(!1),{refs:d,floatingStyles:u,context:p}=Ir({placement:"bottom-start",open:c,onOpenChange:s,middleware:[Un(),Fn(),zn(),kn(10)],whileElementsMounted:Pn}),{isMounted:h,styles:y}=Ur(p,{duration:100}),g=Object.assign(Object.assign({},y),u);return l?null:t(o,{children:[h&&e(ui,Object.assign({isOpen:!0,onClose:()=>s(!1),refs:d,style:g},{children:a})),e("button",Object.assign({type:"button",ref:d.setReference,className:`yoo-editor-absolute yoo-editor-right-[8px] yoo-editor-top-[8px] yoo-editor-flex yoo-editor-items-center yoo-editor-justify-between yoo-editor-z-10 yoo-editor-opacity-1 yoo-editor-bg-[#eee] yoo-editor-w-[22px] yoo-editor-h-[22px] yoo-editor-transition-opacity yoo-editor-duration-150 yoo-editor-ease-in yoo-editor-border-none yoo-editor-cursor-pointer yoo-editor-rounded-[2px] yoo-editor-p-[0_4px] ${n||""} yoopta-extended-block-actions`,onClick:()=>{null==i||i(),s(!0)},style:c?Object.assign(Object.assign({},r),{opacity:1}):r},{children:e(Zr,{})}))]})}});function al(e,t){const o=Object.keys(e.children),{type:n}=t||{},r=o.find((t=>e.children[t].type===n));return r?e.children[r]:null}function ll(e,t,o={}){try{const{focusAt:n,waitExecution:r=!0,waitExecutionMs:i=0,shouldUpdateBlockSelection:a=!0}=o,l=()=>{const r=o.slate||e.blockEditorsMap[t],i=e.children[t];if(!r||!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[,o]=D.first(e,[0]);return{path:o||[0,0],offset:0}}(r,n);R.select(r,e),w.focus(r)}a&&setTimeout((()=>{e.setSelection([i.meta.order])}),0)};r?setTimeout((()=>l()),i):l()}catch(e){}}function cl(e){return Array.from(new Set(e))}var sl={};!function(e,t){var o="__lodash_hash_undefined__",n=9007199254740991,r="[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]",y="[object String]",g="[object Symbol]",v="[object WeakMap]",m="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",k="[object Int8Array]",E="[object Int16Array]",C="[object Int32Array]",O="[object Uint8Array]",S="[object Uint8ClampedArray]",D="[object Uint16Array]",_="[object Uint32Array]",R=/\w*$/,j=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,A={};A[r]=A["[object Array]"]=A[m]=A[b]=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[y]=A[g]=A[O]=A[S]=A[D]=A[_]=!0,A["[object Error]"]=A[l]=A[v]=!1;var T="object"==typeof Y&&Y&&Y.Object===Object&&Y,M="object"==typeof self&&self&&self.Object===Object&&self,L=T||M||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,o,n){var r=-1,i=e?e.length:0;for(n&&i&&(o=e[++r]);++r<i;)o=t(o,e[r],r,e);return o}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,o=Array(e.size);return e.forEach((function(e,n){o[++t]=[n,e]})),o}function K(e,t){return function(o){return e(t(o))}}function W(e){var t=-1,o=Array(e.size);return e.forEach((function(e){o[++t]=e})),o}var $,X=Array.prototype,Z=Function.prototype,q=Object.prototype,G=L["__core-js_shared__"],J=($=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",Q=Z.toString,ee=q.hasOwnProperty,te=q.toString,oe=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=P?L.Buffer:void 0,re=L.Symbol,ie=L.Uint8Array,ae=K(Object.getPrototypeOf,Object),le=Object.create,ce=q.propertyIsEnumerable,se=X.splice,de=Object.getOwnPropertySymbols,ue=ne?ne.isBuffer:void 0,fe=K(Object.keys,Object),pe=Pe(L,"DataView"),he=Pe(L,"Map"),ye=Pe(L,"Promise"),ge=Pe(L,"Set"),ve=Pe(L,"WeakMap"),me=Pe(Object,"create"),be=Ve(pe),we=Ve(he),xe=Ve(ye),ke=Ve(ge),Ee=Ve(ve),Ce=re?re.prototype:void 0,Oe=Ce?Ce.valueOf:void 0;function Se(e){var t=-1,o=e?e.length:0;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function De(e){var t=-1,o=e?e.length:0;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function _e(e){var t=-1,o=e?e.length:0;for(this.clear();++t<o;){var n=e[t];this.set(n[0],n[1])}}function Re(e){this.__data__=new De(e)}function je(e,t){var o=We(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)==r)}(e)?function(e,t){for(var o=-1,n=Array(e);++o<e;)n[o]=t(o);return n}(e.length,String):[],n=o.length,i=!!n;for(var a in e)!t&&!ee.call(e,a)||i&&("length"==a||Ue(a,n))||o.push(a);return o}function Be(e,t,o){var n=e[t];ee.call(e,t)&&Ke(n,o)&&(void 0!==o||t in e)||(e[t]=o)}function Ae(e,t){for(var o=e.length;o--;)if(Ke(e[o][0],t))return o;return-1}function Te(e,t,o,n,f,v,j){var B;if(n&&(B=v?n(e,f,v,j):n(e)),void 0!==B)return B;if(!Ze(e))return e;var T=We(e);if(T){if(B=function(e){var t=e.length,o=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(o.index=e.index,o.input=e.input);return o}(e),!t)return function(e,t){var o=-1,n=e.length;t||(t=Array(n));for(;++o<n;)t[o]=e[o];return t}(e,B)}else{var M=Fe(e),L=M==l||M==c;if($e(e))return function(e,t){if(t)return e.slice();var o=new e.constructor(e.length);return e.copy(o),o}(e,t);if(M==u||M==r||L&&!v){if(H(e))return v?e:{};if(B=function(e){return"function"!=typeof e.constructor||He(e)?{}:(t=ae(e),Ze(t)?le(t):{});var t}(L?{}: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[M])return v?e:{};B=function(e,t,o,n){var r=e.constructor;switch(t){case m:return Le(e);case i:case a:return new r(+e);case b:return function(e,t){var o=t?Le(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}(e,n);case w:case x:case k:case E:case C:case O:case S:case D:case _:return function(e,t){var o=t?Le(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}(e,n);case s:return function(e,t,o){var n=t?o(V(e),!0):V(e);return U(n,z,new e.constructor)}(e,n,o);case d:case y:return new r(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,o){var n=t?o(W(e),!0):W(e);return U(n,F,new e.constructor)}(e,n,o);case g:return l=e,Oe?Object(Oe.call(l)):{}}var l}(e,M,Te,t)}}j||(j=new Re);var N=j.get(e);if(N)return N;if(j.set(e,B),!T)var I=o?function(e){return function(e,t,o){var n=t(e);return We(e)?n:function(e,t){for(var o=-1,n=t.length,r=e.length;++o<n;)e[r+o]=t[o];return e}(n,o(e))}(e,qe,ze)}(e):qe(e);return function(e,t){for(var o=-1,n=e?e.length:0;++o<n&&!1!==t(e[o],o,e););}(I||e,(function(r,i){I&&(r=e[i=r]),Be(B,i,Te(r,t,o,n,i,e,j))})),B}function Me(e){return!(!Ze(e)||(t=e,J&&J in t))&&(Xe(e)||H(e)?oe:j).test(Ve(e));var t}function Le(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function Ne(e,t,o,n){o||(o={});for(var r=-1,i=t.length;++r<i;){var a=t[r],l=n?n(o[a],e[a],a,o,e):void 0;Be(o,a,void 0===l?e[a]:l)}return o}function Ie(e,t){var o,n,r=e.__data__;return("string"==(n=typeof(o=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==o:null===o)?r["string"==typeof t?"string":"hash"]:r.map}function Pe(e,t){var o=function(e,t){return null==e?void 0:e[t]}(e,t);return Me(o)?o:void 0}Se.prototype.clear=function(){this.__data__=me?me(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===o?void 0:n}return ee.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?o:t,this},De.prototype.clear=function(){this.__data__=[]},De.prototype.delete=function(e){var t=this.__data__,o=Ae(t,e);return!(o<0)&&(o==t.length-1?t.pop():se.call(t,o,1),!0)},De.prototype.get=function(e){var t=this.__data__,o=Ae(t,e);return o<0?void 0:t[o][1]},De.prototype.has=function(e){return Ae(this.__data__,e)>-1},De.prototype.set=function(e,t){var o=this.__data__,n=Ae(o,e);return n<0?o.push([e,t]):o[n][1]=t,this},_e.prototype.clear=function(){this.__data__={hash:new Se,map:new(he||De),string:new Se}},_e.prototype.delete=function(e){return Ie(this,e).delete(e)},_e.prototype.get=function(e){return Ie(this,e).get(e)},_e.prototype.has=function(e){return Ie(this,e).has(e)},_e.prototype.set=function(e,t){return Ie(this,e).set(e,t),this},Re.prototype.clear=function(){this.__data__=new De},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 o=this.__data__;if(o instanceof De){var n=o.__data__;if(!he||n.length<199)return n.push([e,t]),this;o=this.__data__=new _e(n)}return o.set(e,t),this};var ze=de?K(de,Object):function(){return[]},Fe=function(e){return te.call(e)};function Ue(e,t){return!!(t=null==t?n: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 Ke(e,t){return e===t||e!=e&&t!=t}(pe&&Fe(new pe(new ArrayBuffer(1)))!=b||he&&Fe(new he)!=s||ye&&Fe(ye.resolve())!=f||ge&&Fe(new ge)!=h||ve&&Fe(new ve)!=v)&&(Fe=function(e){var t=te.call(e),o=t==u?e.constructor:void 0,n=o?Ve(o):void 0;if(n)switch(n){case be:return b;case we:return s;case xe:return f;case ke:return h;case Ee:return v}return t});var We=Array.isArray;function Ye(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}(e.length)&&!Xe(e)}var $e=ue||function(){return!1};function Xe(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 o in Object(e))ee.call(e,o)&&"constructor"!=o&&t.push(o);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:o,focus:n}=t;if(!o&&!t.at)throw new Error("blockId or path should be provided");let r=null;if(o&&(r=e.children[o],!r))throw new Error(`Block not with blockId: ${o} found`);if(t.at&&(r=L(e,{at:t.at}),!r))throw new Error(`Block in path ${t.at} not found`);if(!r)throw new Error("Block not found");e.children=Fa(e.children);Object.values(e.children).forEach((e=>{e.meta.order>r.meta.order&&(e.meta.order+=1)}));const i=(a=r,"function"==typeof window.structuredClone?window.structuredClone(a):dl(a));var a;const l=Za(e);i.id=q(),i.meta.order=r.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),n&&e.focusBlock(c,{waitExecution:!0})}function fl(e,t){w.blur(t),w.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,o={}){e.children=Fa(e.children);const{at:n=null,focus:r=!1,slate:i=null}=o,a=L(e),l=n,c={id:q(),value:t.value,type:t.type,meta:Object.assign(Object.assign({},t.meta),{order:0})};let s=!1;if(i&&i.selection){const e=D.string(i,i.selection.anchor.path);s=D.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),r&&e.focusBlock(s&&u?u:c.id)}(e,...t),insertBlocks:(...t)=>function(e,t,o={}){e.children=Fa(e.children);const{at:n,focus:r}=o;let i=n||[0];const a=L(e),l=Lo(e);let c=!1,s=!1;if(l&&l.selection){const t=S.parent(l.selection.anchor.path),o=D.string(l,t).trim(),n=D.isStart(l,l.selection.anchor,t);c=""===o&&n,s=!n||o.length>0,w.blur(l),e.setSelection(null)}s&&(i=[i[0]+1]),Object.values(e.children).forEach((e=>{e.meta.order>=i[0]&&(e.meta.order+=t.length)}));const d=[];if(t.forEach(((t,o)=>{const n={id:t.id,value:t.value,type:t.type,meta:Object.assign(Object.assign({},t.meta),{order:i[0]+o})};d.push(n.meta.order),e.children[n.id]=n;const r=Za(e);e.blockEditorsMap[n.id]=r})),a&&c){const t=a.meta.order;delete e.children[a.id],delete e.blockEditorsMap[a.id],Object.keys(e.children).forEach((o=>{const n=e.children[o];n.meta.order>t&&(n.meta.order-=1)}))}e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children),r&&e.setBlockSelected(d)}(e,...t),deleteBlock:(...t)=>Ya(e,...t),duplicateBlock:(...t)=>ul(e,...t),toggleBlock:(...t)=>Wa(e,...t),increaseBlockDepth:(...t)=>function(e,t={}){const{at:o=e.selection}=t;if(!o)return;e.children=Fa(e.children);const n=L(e);n&&(n.meta.depth=n.meta.depth+1,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children))}(e,...t),decreaseBlockDepth:(...t)=>function(e,t={}){const{at:o=e.selection}=t;if(!o)return;e.children=Fa(e.children);const n=L(e);n&&(n.meta.depth=0===n.meta.depth?0:n.meta.depth-1,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children))}(e,...t),moveBlock:(...t)=>function(e,t,o){e.children=Fa(e.children);const[n]=o,r=e.children[t],i=Object.values(e.children).find((e=>e.meta.order===n)),a=r.meta.order<i.meta.order,l=r.meta.order>i.meta.order;Object.values(e.children).forEach((e=>{a?e.meta.order>r.meta.order&&e.meta.order<=i.meta.order&&e.meta.order--:l&&e.meta.order<r.meta.order&&e.meta.order>=i.meta.order&&e.meta.order++})),r.meta.order=n,r.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)=>Ka(e,...t),splitBlock:(...t)=>function(e,t={}){const{slate:o,focus:n=!0}=t,r=L(e);o&&o.selection&&r&&D.withoutNormalizing(o,(()=>{e.children=Fa(e.children);const t=S.parent(o.selection.anchor.path);R.splitNodes(o,{at:o.selection,match:e=>_.isElement(e),always:!0,mode:"highest"});const i=t[0]+1,a=o.children.slice()[i];R.removeNodes(o,{at:[i],match:e=>_.isElement(e),mode:"highest"});const l={id:q(),type:r.type,meta:{order:r.meta.order+1,depth:r.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),n&&e.focusBlock(l.id,{slate:c})}))}(e,...t),setSelection:(...t)=>function(e,t,o={}){const{applyChanges:n=!0}=o;e.selection=t,n&&e.applyChanges()}(e,...t),setBlockSelected:(...t)=>function(e,t,o={}){const{only:n=!1,allSelected:r=!1}=o,i=e.selectedBlocks||[];if(null===t)e.selectedBlocks=null;else if(t.length>1)e.selectedBlocks=t;else if(n)e.selectedBlocks=t;else if(r){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 o;const n=null!==(o=t.slate)&&void 0!==o?o:Lo(e);if(!n)return;const{waitExecution:r,waitExecutionMs:i}=t;r?setTimeout((()=>fl(e,n)),i):(fl(e,n),e.applyChanges())}(e,...t),blockEditorsMap:{},blocks:{},formats:{},shortcuts:{},plugins:{},on:(e,t)=>{},off:(e,t)=>{},emit:(e,...t)=>{},once:(e,t)=>{}};return e};!function(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('/*! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com*/#yoopta-editor *,#yoopta-editor :after,#yoopta-editor :before{border:0 solid #e5e7eb;box-sizing:border-box}#yoopta-editor :after,#yoopta-editor :before{--tw-content:""}#yoopta-editor,:host{-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}#yoopta-editor{line-height:inherit;margin:0}#yoopta-editor hr{border-top-width:1px;color:inherit;height:0}#yoopta-editor abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}#yoopta-editor h1,#yoopta-editor h2,#yoopta-editor h3,#yoopta-editor h4,#yoopta-editor h5,#yoopta-editor h6{font-size:inherit;font-weight:inherit}#yoopta-editor a{color:inherit;text-decoration:inherit}#yoopta-editor b,#yoopta-editor strong{font-weight:bolder}#yoopta-editor code,#yoopta-editor kbd,#yoopta-editor pre,#yoopta-editor 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}#yoopta-editor small{font-size:80%}#yoopta-editor sub,#yoopta-editor sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}#yoopta-editor sub{bottom:-.25em}#yoopta-editor sup{top:-.5em}#yoopta-editor table{border-collapse:collapse;border-color:inherit;text-indent:0}#yoopta-editor button,#yoopta-editor input,#yoopta-editor optgroup,#yoopta-editor select,#yoopta-editor 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}#yoopta-editor button,#yoopta-editor select{text-transform:none}#yoopta-editor [type=button],#yoopta-editor [type=reset],#yoopta-editor [type=submit],#yoopta-editor button{-webkit-appearance:button;background-color:transparent;background-image:none}#yoopta-editor :-moz-focusring{outline:auto}#yoopta-editor :-moz-ui-invalid{box-shadow:none}#yoopta-editor progress{vertical-align:baseline}#yoopta-editor ::-webkit-inner-spin-button,#yoopta-editor ::-webkit-outer-spin-button{height:auto}#yoopta-editor [type=search]{-webkit-appearance:textfield;outline-offset:-2px}#yoopta-editor ::-webkit-search-decoration{-webkit-appearance:none}#yoopta-editor ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}#yoopta-editor summary{display:list-item}#yoopta-editor blockquote,#yoopta-editor dd,#yoopta-editor dl,#yoopta-editor figure,#yoopta-editor h1,#yoopta-editor h2,#yoopta-editor h3,#yoopta-editor h4,#yoopta-editor h5,#yoopta-editor h6,#yoopta-editor hr,#yoopta-editor p,#yoopta-editor pre{margin:0}#yoopta-editor fieldset{margin:0;padding:0}#yoopta-editor legend{padding:0}#yoopta-editor menu,#yoopta-editor ol,#yoopta-editor ul{list-style:none;margin:0;padding:0}#yoopta-editor dialog{padding:0}#yoopta-editor textarea{resize:vertical}#yoopta-editor input::-moz-placeholder,#yoopta-editor textarea::-moz-placeholder{color:#9ca3af;opacity:1}#yoopta-editor input::placeholder,#yoopta-editor textarea::placeholder{color:#9ca3af;opacity:1}#yoopta-editor [role=button],#yoopta-editor button{cursor:pointer}#yoopta-editor :disabled{cursor:default}#yoopta-editor audio,#yoopta-editor canvas,#yoopta-editor embed,#yoopta-editor iframe,#yoopta-editor img,#yoopta-editor object,#yoopta-editor svg,#yoopta-editor video{display:block;vertical-align:middle}#yoopta-editor img,#yoopta-editor video{height:auto;max-width:100%}#yoopta-editor [hidden]{display:none}#yoopta-editor *,#yoopta-editor :after,#yoopta-editor :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: }#yoopta-editor ::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: }#yoopta-editor .yoo-editor-pointer-events-none{pointer-events:none}#yoopta-editor .yoo-editor-absolute{position:absolute}#yoopta-editor .yoo-editor-relative{position:relative}#yoopta-editor .-yoo-editor-left-\\[50px\\]{left:-50px}#yoopta-editor .yoo-editor-left-0{left:0}#yoopta-editor .yoo-editor-right-\\[8px\\]{right:8px}#yoopta-editor .yoo-editor-top-0{top:0}#yoopta-editor .yoo-editor-top-\\[2px\\]{top:2px}#yoopta-editor .yoo-editor-top-\\[8px\\]{top:8px}#yoopta-editor .yoo-editor-z-10{z-index:10}#yoopta-editor .yoo-editor-z-\\[100\\]{z-index:100}#yoopta-editor .yoo-editor-z-\\[90\\]{z-index:90}#yoopta-editor .yoo-editor-m-\\[0_1px\\]{margin:0 1px}#yoopta-editor .yoo-editor-mx-\\[4px\\]{margin-left:4px;margin-right:4px}#yoopta-editor .yoo-editor-my-\\[4px\\]{margin-bottom:4px;margin-top:4px}#yoopta-editor .yoo-editor-mb-\\[1px\\]{margin-bottom:1px}#yoopta-editor .yoo-editor-mr-2{margin-right:.5rem}#yoopta-editor .yoo-editor-mt-\\[2px\\]{margin-top:2px}#yoopta-editor .yoo-editor-flex{display:flex}#yoopta-editor .yoo-editor-h-4{height:1rem}#yoopta-editor .yoo-editor-h-\\[1px\\]{height:1px}#yoopta-editor .yoo-editor-h-\\[22px\\]{height:22px}#yoopta-editor .yoo-editor-h-\\[24px\\]{height:24px}#yoopta-editor .yoo-editor-h-full{height:100%}#yoopta-editor .yoo-editor-w-4{width:1rem}#yoopta-editor .yoo-editor-w-\\[18px\\]{width:18px}#yoopta-editor .yoo-editor-w-\\[22px\\]{width:22px}#yoopta-editor .yoo-editor-w-\\[24px\\]{width:24px}#yoopta-editor .yoo-editor-w-auto{width:auto}#yoopta-editor .yoo-editor-w-full{width:100%}#yoopta-editor .yoo-editor-min-w-\\[200px\\]{min-width:200px}#yoopta-editor .yoo-editor-cursor-default{cursor:default}#yoopta-editor .yoo-editor-cursor-pointer{cursor:pointer}#yoopta-editor .yoo-editor-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#yoopta-editor .yoo-editor-flex-col{flex-direction:column}#yoopta-editor .yoo-editor-items-center{align-items:center}#yoopta-editor .yoo-editor-justify-start{justify-content:flex-start}#yoopta-editor .yoo-editor-justify-center{justify-content:center}#yoopta-editor .yoo-editor-justify-between{justify-content:space-between}#yoopta-editor .yoo-editor-overflow-hidden{overflow:hidden}#yoopta-editor .yoo-editor-rounded{border-radius:.25rem}#yoopta-editor .yoo-editor-rounded-\\[2px\\]{border-radius:2px}#yoopta-editor .yoo-editor-rounded-\\[6px\\]{border-radius:6px}#yoopta-editor .yoo-editor-rounded-md{border-radius:.375rem}#yoopta-editor .yoo-editor-rounded-sm{border-radius:.125rem}#yoopta-editor .yoo-editor-border{border-width:1px}#yoopta-editor .yoo-editor-border-none{border-style:none}#yoopta-editor .yoo-editor-bg-\\[\\#2383e224\\]{background-color:#2383e224}#yoopta-editor .yoo-editor-bg-\\[\\#37352f14\\]{background-color:#37352f14}#yoopta-editor .yoo-editor-bg-\\[\\#FFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}#yoopta-editor .yoo-editor-bg-\\[\\#eee\\]{--tw-bg-opacity:1;background-color:rgb(238 238 238/var(--tw-bg-opacity))}#yoopta-editor .yoo-editor-bg-inherit{background-color:inherit}#yoopta-editor .yoo-editor-bg-transparent{background-color:transparent}#yoopta-editor .yoo-editor-p-0{padding:0}#yoopta-editor .yoo-editor-p-\\[0_4px\\]{padding:0 4px}#yoopta-editor .yoo-editor-px-0{padding-left:0;padding-right:0}#yoopta-editor .yoo-editor-px-2{padding-left:.5rem;padding-right:.5rem}#yoopta-editor .yoo-editor-px-\\[2px\\]{padding-left:2px;padding-right:2px}#yoopta-editor .yoo-editor-py-0{padding-bottom:0;padding-top:0}#yoopta-editor .yoo-editor-py-1{padding-bottom:.25rem;padding-top:.25rem}#yoopta-editor .yoo-editor-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}#yoopta-editor .yoo-editor-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}#yoopta-editor .yoo-editor-text-sm{font-size:.875rem;line-height:1.25rem}#yoopta-editor .yoo-editor-leading-\\[120\\%\\]{line-height:120%}#yoopta-editor .yoo-editor-text-\\[rgba\\(55\\,53\\,47\\,0\\.35\\)\\]{color:rgba(55,53,47,.35)}#yoopta-editor .yoo-editor-opacity-0{opacity:0}#yoopta-editor .yoo-editor-opacity-100{opacity:1}#yoopta-editor .yoo-editor-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)}#yoopta-editor .yoo-editor-outline-none{outline:2px solid transparent;outline-offset:2px}#yoopta-editor .yoo-editor-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)}#yoopta-editor .yoo-editor-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-editor-duration-150{transition-duration:.15s}#yoopta-editor .yoo-editor-duration-\\[180ms\\]{transition-duration:.18s}#yoopta-editor .yoo-editor-ease-\\[cubic-bezier\\(0\\.4\\,0\\,0\\.2\\,1\\)\\]{transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-editor-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}#yoopta-editor ::-moz-selection{background:#c6ddf8}#yoopta-editor ::selection{background:#c6ddf8}#yoopta-editor #yoopta-editor{height:auto;min-width:400px}#yoopta-editor .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}#yoopta-editor .hover\\:yoo-editor-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}#yoopta-editor .focus\\:yoo-editor-bg-\\[rgba\\(55\\2c 54\\2c 47\\2c 0\\.08\\)\\]:focus,#yoopta-editor .hover\\:yoo-editor-bg-\\[rgba\\(55\\2c 54\\2c 47\\2c 0\\.08\\)\\]:hover{background-color:rgba(55,54,47,.08)}#yoopta-editor .focus\\:yoo-editor-outline-none:focus{outline:2px solid transparent;outline-offset:2px}#yoopta-editor .focus-visible\\:yoo-editor-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}#yoopta-editor .active\\:yoo-editor-bg-\\[rgba\\(55\\2c 54\\2c 47\\2c 0\\.08\\)\\]:active{background-color:rgba(55,54,47,.08)}#yoopta-editor .data-\\[disabled\\]\\:yoo-editor-pointer-events-none[data-disabled]{pointer-events:none}#yoopta-editor .data-\\[disabled\\]\\:yoo-editor-opacity-50[data-disabled]{opacity:.5}#yoopta-editor .data-\\[hovered-state\\=\\"true\\"\\]\\:yoo-editor-opacity-100[data-hovered-state=true]{opacity:1}');export{Ai as HOTKEYS,il as UI,M as YooptaPlugin,J as buildBlockData,G as buildBlockElement,pl as createYooptaEditor,qa as createYooptaMark,rl as default,L as findPluginBlockBySelectionPath,al as findPluginBlockByType,Lo as findSlateBySelectionPath,q as generateId,ri as getRootBlockElement,ni as getRootBlockElementType,F as useBlockData,W as useBlockSelected,U as useYooptaBlock,z as useYooptaEditor,H as useYooptaPlugin,K as useYooptaPluginOptions,V as useYooptaReadOnly,li as useYooptaTools};
6
+ var Xo=["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(","),Zo="undefined"==typeof Element,qo=Zo?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Go=!Zo&&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},Jo=function e(t,n){var o;void 0===n&&(n=!0);var r=null==t||null===(o=t.getAttribute)||void 0===o?void 0:o.call(t,"inert");return""===r||"true"===r||n&&t&&e(t.parentNode)},Qo=function e(t,n,o){for(var r=[],i=Array.from(t);i.length;){var a=i.shift();if(!Jo(a,!1))if("SLOT"===a.tagName){var l=a.assignedElements(),c=e(l.length?l:a.children,!0,o);o.flatten?r.push.apply(r,c):r.push({scopeParent:a,candidates:c})}else{qo.call(a,Xo)&&o.filter(a)&&(n||!t.includes(a))&&r.push(a);var s=a.shadowRoot||"function"==typeof o.getShadowRoot&&o.getShadowRoot(a),d=!Jo(s,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(a));if(s&&d){var u=e(!0===s?a.children:s.children,!0,o);o.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},er=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},tr=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))&&!er(e)?0:e.tabIndex},nr=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},or=function(e){return"INPUT"===e.tagName},rr=function(e){return function(e){return or(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Go(e),o=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=o(window.CSS.escape(e.name));else try{t=o(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 r=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!r||r===e}(e)},ir=function(e){var t=e.getBoundingClientRect(),n=t.width,o=t.height;return 0===n&&0===o},ar=function(e,t){var n=t.displayCheck,o=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var r=qo.call(e,"details>summary:first-of-type")?e.parentElement:e;if(qo.call(r,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ir(e)}else{if("function"==typeof o){for(var i=e;e;){var a=e.parentElement,l=Go(e);if(a&&!a.shadowRoot&&!0===o(a))return ir(e);e=e.assignedSlot?e.assignedSlot:a||l===e.ownerDocument?a:l.host}e=i}if(function(e){var t,n,o,r,i=e&&Go(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!==(o=n.ownerDocument)&&void 0!==o&&o.contains(a)||null!=e&&null!==(r=e.ownerDocument)&&void 0!==r&&r.contains(e));!l&&a;){var c,s,d;l=!(null===(s=a=null===(c=i=Go(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},lr=function(e,t){return!(t.disabled||Jo(t)||function(e){return or(e)&&"hidden"===e.type}(t)||ar(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 o=t.children.item(n);if("LEGEND"===o.tagName)return!!qo.call(t,"fieldset[disabled] *")||!o.contains(e)}return!0}t=t.parentElement}return!1}(t))},cr=function(e,t){return!(rr(t)||tr(t)<0||!lr(e,t))},sr=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},dr=function e(t){var n=[],o=[];return t.forEach((function(t,r){var i=!!t.scopeParent,a=i?t.scopeParent:t,l=function(e,t){var n=tr(e);return n<0&&t&&!er(e)?0:n}(a,i),c=i?e(t.candidates):a;0===l?i?n.push.apply(n,c):n.push(a):o.push({documentOrder:r,tabIndex:l,item:t,isScope:i,content:c})})),o.sort(nr).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},ur=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Qo([e],t.includeContainer,{filter:cr.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:sr}):function(e,t,n){if(Jo(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(Xo));return t&&qo.call(e,Xo)&&o.unshift(e),o.filter(n)}(e,t.includeContainer,cr.bind(null,t)),dr(n)};const fr=o["useInsertionEffect".toString()]||(e=>e());var pr="undefined"!=typeof document?c:s;function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},hr.apply(this,arguments)}let yr=!1,gr=0;const vr=()=>"floating-ui-"+gr++;const mr=o["useId".toString()]||function(){const[e,t]=o.useState((()=>yr?vr():void 0));return pr((()=>{null==e&&t(vr())}),[]),o.useEffect((()=>{yr||(yr=!0)}),[]),e};const br=o.createContext(null),wr=o.createContext(null);function xr(e){return"data-floating-ui-"+e}function kr(e){const t=l(e);return pr((()=>{t.current=e})),t}const Er=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Cr(e,t){const n=ur(e,Er());"prev"===t&&n.reverse();const o=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==(r=e)?void 0:r.ownerDocument)||document));var r;return n.slice(o+1)[0]}function Or(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!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&&Hn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}(n,o)}function Sr(e){ur(e,Er()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Dr(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 _r={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 Rr(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const jr=o.forwardRef((function(e,t){const[n,r]=o.useState();pr((()=>(/apple/i.test(navigator.vendor)&&r("button"),document.addEventListener("keydown",Rr),()=>{document.removeEventListener("keydown",Rr)})),[]);const i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[xr("focus-guard")]:"",style:_r};return o.createElement("span",hr({},e,i))})),Br=o.createContext(null),Ar=xr("portal");function Tr(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const a=function(e){let{id:t,root:n}=void 0===e?{}:e;const[r,i]=o.useState(null),a=mr(),l=Lr(),c=o.useRef(null);return pr((()=>()=>{null==r||r.remove(),queueMicrotask((()=>{c.current=null}))}),[r]),pr((()=>{if(c.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=a,n.setAttribute(Ar,""),e.appendChild(n),c.current=n,i(n)}),[t,a]),pr((()=>{if(c.current)return;let e=n||(null==l?void 0:l.portalNode);e&&!zn(e)&&(e=e.current),e=e||document.body;let o=null;t&&(o=document.createElement("div"),o.id=t,e.appendChild(o));const r=document.createElement("div");r.id=a,r.setAttribute(Ar,""),e=o||e,e.appendChild(r),c.current=r,i(r)}),[t,n,a,l]),r}({id:n,root:r}),[l,c]=o.useState(null),s=o.useRef(null),d=o.useRef(null),u=o.useRef(null),f=o.useRef(null),p=!!l&&!l.modal&&l.open&&i&&!(!r&&!a);return o.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&&Or(e)){("focusin"===e.type?Dr:Sr)(a)}}}),[a,i,null==l?void 0:l.modal]),o.createElement(Br.Provider,{value:o.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:s,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:c})),[i,a])},p&&a&&o.createElement(jr,{"data-type":"outside",ref:s,onFocus:e=>{if(Or(e,a)){var t;null==(t=u.current)||t.focus()}else{const e=Cr(document.body,"prev")||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),p&&a&&o.createElement("span",{"aria-owns":a.id,style:_r}),a&&b(t,a),p&&a&&o.createElement(jr,{"data-type":"outside",ref:d,onFocus:e=>{if(Or(e,a)){var t;null==(t=f.current)||t.focus()}else{const t=Cr(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 Lr=()=>o.useContext(Br),Nr=new Set,Mr=o.forwardRef((function(e,t){let{lockScroll:n=!1,...r}=e;const i=mr();return pr((()=>{if(!n)return;Nr.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,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=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",r&&(t[o]=r+"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()=>{Nr.delete(i),0===Nr.size&&(Object.assign(t,{overflow:"",[o]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(a,l)))}}),[i,n]),o.createElement("div",hr({ref:t},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))}));function Ir(e){var t;void 0===e&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e,[a,l]=o.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:r=[],platform:i,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:s,open:d}=e,[u,f]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=o.useState(r);Ko(p,r)||h(r);const[y,g]=o.useState(null),[m,b]=o.useState(null),w=o.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),x=o.useCallback((e=>{e!==O.current&&(O.current=e,b(e))}),[]),k=a||y,E=l||m,C=o.useRef(null),O=o.useRef(null),S=o.useRef(u),D=null!=s,_=$o(s),R=$o(i),j=o.useCallback((()=>{if(!C.current||!O.current)return;const e={placement:t,strategy:n,middleware:p};R.current&&(e.platform=R.current),Ho(C.current,O.current,e).then((e=>{const t={...e,isPositioned:!0};B.current&&!Ko(S.current,t)&&(S.current=t,v.flushSync((()=>{f(t)})))}))}),[p,t,n,R]);Vo((()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const B=o.useRef(!1);Vo((()=>(B.current=!0,()=>{B.current=!1})),[]),Vo((()=>{if(k&&(C.current=k),E&&(O.current=E),k&&E){if(_.current)return _.current(k,E,j);j()}}),[k,E,j,_,D]);const A=o.useMemo((()=>({reference:C,floating:O,setReference:w,setFloating:x})),[w,x]),T=o.useMemo((()=>({reference:k,floating:E})),[k,E]),L=o.useMemo((()=>{const e={position:n,left:0,top:0};if(!T.floating)return e;const t=Yo(T.floating,u.x),o=Yo(T.floating,u.y);return c?{...e,transform:"translate("+t+"px, "+o+"px)",...Wo(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:o}}),[n,c,T.floating,u.x,u.y]);return o.useMemo((()=>({...u,update:j,refs:A,elements:T,floatingStyles:L})),[u,j,A,T,L])}(e),d=o.useContext(wr),u=null!=((null==(f=o.useContext(br))?void 0:f.id)||null);var f;const p=function(e){const t=o.useRef((()=>{}));return fr((()=>{t.current=e})),o.useCallback((function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)}),[])}(((e,t,n)=>{e&&(y.current.openEvent=t),g.emit("openchange",{open:e,event:t,reason:n,nested:u}),null==r||r(e,t,n)})),h=o.useRef(null),y=o.useRef({}),g=o.useState((()=>function(){const e=new Map;return{emit(t,n){var o;null==(o=e.get(t))||o.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var o;e.set(t,(null==(o=e.get(t))?void 0:o.filter((e=>e!==n)))||[])}}}()))[0],m=mr(),b=o.useCallback((e=>{const t=zn(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s.refs.setReference(t)}),[s.refs]),w=o.useCallback((e=>{(zn(e)||null===e)&&(h.current=e,l(e)),(zn(s.refs.reference.current)||null===s.refs.reference.current||null!==e&&!zn(e))&&s.refs.setReference(e)}),[s.refs]),x=o.useMemo((()=>({...s.refs,setReference:w,setPositionReference:b,domReference:h})),[s.refs,w,b]),k=o.useMemo((()=>({...s.elements,domReference:c})),[s.elements,c]),E=o.useMemo((()=>({...s,refs:x,elements:k,dataRef:y,nodeId:i,floatingId:m,events:g,open:n,onOpenChange:p})),[s,i,m,g,n,p,x,k]);return pr((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===i));e&&(e.context=E)})),o.useMemo((()=>({...s,context:E,refs:x,elements:k})),[s,x,k,E])}const Pr=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function Fr(e,t){return"function"==typeof e?e(t):e}function zr(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,a=("number"==typeof i?i:i.close)||0,[l,c]=o.useState(!1),[s,d]=o.useState("unmounted"),u=function(e,t){const[n,r]=o.useState(e);return e&&!n&&r(!0),o.useEffect((()=>{if(!e){const e=setTimeout((()=>r(!1)),t);return()=>clearTimeout(e)}}),[e,t]),n}(n,a);return pr((()=>{l&&!u&&d("unmounted")}),[l,u]),pr((()=>{if(r){if(n){d("initial");const e=requestAnimationFrame((()=>{d("open")}));return()=>{cancelAnimationFrame(e)}}c(!0),d("close")}}),[n,r]),{isMounted:u,status:s}}function Ur(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:i,common:a,duration:l=250}=t,c=e.placement,s=c.split("-")[0],d=o.useMemo((()=>({side:s,placement:c})),[s,c]),u="number"==typeof l,f=(u?l:l.open)||0,p=(u?l:l.close)||0,[h,y]=o.useState((()=>({...Fr(a,d),...Fr(n,d)}))),{isMounted:g,status:v}=zr(e,{duration:l}),m=kr(n),b=kr(r),w=kr(i),x=kr(a);return pr((()=>{const e=Fr(m.current,d),t=Fr(w.current,d),n=Fr(x.current,d),o=Fr(b.current,d)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===v&&y((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===v&&y({transitionProperty:Object.keys(o).map(Pr).join(","),transitionDuration:f+"ms",...n,...o}),"close"===v){const o=t||e;y({transitionProperty:Object.keys(o).map(Pr).join(","),transitionDuration:p+"ms",...n,...o})}}),[p,w,m,b,x,f,v,d]),{isMounted:g,styles:h}}var Hr;function Vr(){return Vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Vr.apply(this,arguments)}var Kr=function(e){return o.createElement("svg",Vr({viewBox:"0 0 16 16",className:"turn_svg__loop",style:{width:16,height:16,display:"block",fill:"currentcolor",flexShrink:0,backfaceVisibility:"hidden"}},e),Hr||(Hr=o.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 Wr(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}var Yr=["color"],$r=y((function(e,t){var n=e.color,o=void 0===n?"currentColor":n,r=Wr(e,Yr);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),g("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:o,fillRule:"evenodd",clipRule:"evenodd"}))})),Xr=["color"],Zr=y((function(e,t){var n=e.color,o=void 0===n?"currentColor":n,r=Wr(e,Xr);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),g("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:o,fillRule:"evenodd",clipRule:"evenodd"}))})),qr=["color"],Gr=y((function(e,t){var n=e.color,o=void 0===n?"currentColor":n,r=Wr(e,qr);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),g("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:o,fillRule:"evenodd",clipRule:"evenodd"}))})),Jr=["color"],Qr=y((function(e,t){var n=e.color,o=void 0===n?"currentColor":n,r=Wr(e,Jr);return g("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),g("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:o,fillRule:"evenodd",clipRule:"evenodd"}))})),ei=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],o=0;o<e.rangeCount;o++)n.push(e.getRangeAt(o));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()}},ti={"text/plain":"Text","text/html":"Url",default:"Text"};var ni=function(e,t){var n,o,r,i,a,l,c=!1;t||(t={}),n=t.debug||!1;try{if(r=ei(),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(o){if(o.stopPropagation(),t.format)if(o.preventDefault(),void 0===o.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var r=ti[t.format]||ti.default;window.clipboardData.setData(r,e)}else o.clipboardData.clearData(),o.clipboardData.setData(t.format,e);t.onCopy&&(o.preventDefault(),t.onCopy(o.clipboardData))})),document.body.appendChild(l),i.selectNodeContents(l),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),o=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(o,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),l&&document.body.removeChild(l),r()}return c};function oi(e){if(!e)return;const t=Object.keys(e);return 1===t.length?t[0]:t.find((t=>e[t].asRoot))}function ri(e){if(!e)return;const t=oi(e);return t?e[t]:void 0}const ii=i(void 0),ai=({children:o,tools:r})=>{const i=V(),a=d((()=>r?Object.keys(r).reduce(((e,t)=>{var n;return Object.assign(Object.assign({},e),{[t]:null===(n=r[t])||void 0===n?void 0:n.render})}),{}):{}),[r]),l=d((()=>!r||i?null:Object.keys(r).map((t=>{var n,o,i;const a=null===(n=null==r?void 0:r[t])||void 0===n?void 0:n.tool,l=null===(o=null==r?void 0:r[t])||void 0===o?void 0:o.render,c=null===(i=null==r?void 0:r[t])||void 0===i?void 0:i.props;return a?e(a,Object.assign({render:l},c),t):null}))),[d]);return e(ii.Provider,Object.assign({value:a},{children:t(n,{children:[l,o]})}))},li=()=>{const e=a(ii);if(void 0===e)throw new Error("useYooptaTools must be used within a ToolsProvider");return e},ci=({children:t})=>e("div",Object.assign({className:"yoo-editor-flex yoo-editor-flex-col"},{children:t})),si=({children:t})=>e("div",Object.assign({onClick:e=>e.stopPropagation(),className:"yoo-editor-bg-[#FFF] yoo-editor-relative yoo-editor-min-w-[200px] yoo-editor-w-auto yoo-editor-overflow-hidden yoo-editor-rounded-md yoo-editor-border yoo-editor-border-solid yoo-editor-border-[#e5e7eb] yoo-editor-bg-popover yoo-editor-py-[6px] yoo-editor-px-0 yoo-editor-text-popover-foreground yoo-editor-shadow-md data-[state=open]:yoo-editor-animate-in data-[state=closed]:yoo-editor-animate-out data-[state=closed]:yoo-editor-fade-out-0 data-[state=open]:yoo-editor-fade-in-0 data-[state=closed]:yoo-editor-zoom-out-95 data-[state=open]:yoo-editor-zoom-in-95 data-[side=bottom]:yoo-editor-slide-in-from-top-2 data-[side=left]:yoo-editor-slide-in-from-right-2 data-[side=right]:yoo-editor-slide-in-from-left-2 data-[side=top]:yoo-editor-slide-in-from-bottom-2"},{children:t})),di=({children:t})=>e("div",Object.assign({className:"yoo-editor-relative yoo-editor-flex yoo-editor-cursor-default yoo-editor-select-none yoo-editor-items-center yoo-editor-text-sm yoo-editor-outline-none yoo-editor-transition-colors focus:yoo-editor-bg-accent focus:yoo-editor-text-accent-foreground data-[disabled]:yoo-editor-pointer-events-none data-[disabled]:yoo-editor-opacity-50"},{children:t})),ui=({isOpen:n,onClose:o,refs:r,style:i,children:a})=>{var l,c;const s=F(),d=li(),[u,p]=f(!1),{refs:h,floatingStyles:y,context:g}=Ir({placement:"right",open:u,onOpenChange:p,middleware:[Uo(),zo(),Fo(),ko(10)],whileElementsMounted:Po}),{isMounted:v,styles:m}=Ur(g,{duration:100});if(!n)return null;const b=N(s,{at:s.selection}),w=ri(s.blocks[(null==b?void 0:b.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({},y),m);return e(Tr,Object.assign({id:"yoo-block-options-portal",root:document.getElementById("yoopta-editor")},{children:e(Mr,Object.assign({lockScroll:!0,className:"yoo-editor-z-[100]",onClick:o},{children:e("div",Object.assign({style:i,ref:r.setFloating},{children:t(si,{children:[t(ci,{children:[e(di,{children:t("button",Object.assign({type:"button",className:"yoo-editor-rounded-sm hover:yoo-editor-bg-[#37352f14] yoo-editor-leading-[120%] yoo-editor-px-2 yoo-editor-py-1.5 yoo-editor-mx-[4px] yoo-editor-cursor-pointer yoo-editor-w-full yoo-editor-flex yoo-editor-justify-start",onClick:()=>{const e=s.selection;s.deleteBlock({at:e}),s.setBlockSelected(null),s.setSelection(null),o()}},{children:[e(Qr,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Delete"]}))}),e(di,{children:t("button",Object.assign({type:"button",className:"yoo-editor-rounded-sm hover:yoo-editor-bg-[#37352f14] yoo-editor-leading-[120%] yoo-editor-px-2 yoo-editor-py-1.5 yoo-editor-mx-[4px] yoo-editor-cursor-pointer yoo-editor-w-full yoo-editor-flex yoo-editor-justify-start",onClick:()=>{s.duplicateBlock({at:s.selection,focus:!0}),s.setBlockSelected(null),o()}},{children:[e($r,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Duplicate"]}))}),!x&&!(null===(c=s.blocks[(null==b?void 0:b.type)||""])||void 0===c?void 0:c.hasCustomEditor)&&t(di,{children:[v&&!!k&&e(Tr,Object.assign({id:"yoo-block-options-portal",root:document.getElementById("yoopta-editor")},{children:e(Mr,Object.assign({lockScroll:!0,className:"yoo-editor-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),o()},empty:!1,onMouseEnter:()=>{},mode:"toggle",view:"small"})}))}))})),t("button",Object.assign({type:"button",className:"yoo-editor-rounded-sm hover:yoo-editor-bg-[#37352f14] yoo-editor-leading-[120%] yoo-editor-px-2 yoo-editor-py-1.5 yoo-editor-mx-[4px] yoo-editor-cursor-pointer yoo-editor-w-full yoo-editor-flex yoo-editor-justify-start",ref:h.setReference,onClick:()=>p((e=>!e))},{children:[e(Kr,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Turn into"]}))]}),e(di,{children:t("button",Object.assign({type:"button",className:"yoo-editor-rounded-sm hover:yoo-editor-bg-[#37352f14] yoo-editor-leading-[120%] yoo-editor-px-2 yoo-editor-py-1.5 yoo-editor-mx-[4px] yoo-editor-cursor-pointer yoo-editor-w-full yoo-editor-flex yoo-editor-justify-start",onClick:()=>{const e=N(s);e&&(ni(`${window.location.origin}${window.location.pathname}#${e.id}`),s.emit("block:copy",e)),o()}},{children:[e(Gr,{className:"yoo-editor-w-4 yoo-editor-h-4 yoo-editor-mr-2"}),"Copy link to block"]}))})]}),a]})}))}))}))};var fi=Object.freeze({__proto__:null,BlockOptions:ui,BlockOptionsMenuContent:si,BlockOptionsMenuGroup:ci,BlockOptionsMenuItem:di,BlockOptionsSeparator:({className:t})=>e("div",{className:`yoo-editor-h-[1px] yoo-editor-bg-[#37352f14] yoo-editor-my-[4px] yoo-editor-w-full ${t}`})});const pi=({block:n,editor:o,dragHandleProps:r,showActions:i,onChangeActiveBlock:a})=>{const[l,c]=f(!1),{refs:s,floatingStyles:d,context:u}=Ir({placement:"right-start",open:l,onOpenChange:c,middleware:[Uo(),zo(),Fo(),ko()]}),{isMounted:p,styles:h}=Ur(u,{duration:100}),{setActivatorNodeRef:y,attributes:g,listeners:v}=r,m=Object.assign(Object.assign({},d),h);return t("div",Object.assign({contentEditable:!1,"data-hovered-state":i,className:'yoo-editor-flex yoo-editor-absolute -yoo-editor-left-[50px] yoo-editor-top-[2px] yoo-editor-opacity-0 yoo-editor-transition-opacity yoopta-element-actions data-[hovered-state="true"]:yoo-editor-opacity-100'},{children:[e("button",Object.assign({type:"button",onClick:()=>{const e=J({id:q()}),t=[n.meta.order+1];o.setSelection([n.meta.order]),o.insertBlock(e,{at:t,focus:!0})},className:"yoo-editor-cursor-pointer yoo-editor-rounded-[6px] yoo-editor-h-[24px] yoo-editor-flex yoo-editor-items-center yoo-editor-justify-center yoo-editor-bg-inherit yoo-editor-bg-transparent yoo-editor-transition-colors yoo-editor-duration-[180ms] yoo-editor-ease-[cubic-bezier(0.4,0,0.2,1)] yoo-editor-relative yoo-editor-w-[18px] yoo-editor-p-0 yoo-editor-text-[rgba(55,53,47,0.35)] yoo-editor-m-[0_1px] hover:yoo-editor-bg-[rgba(55,54,47,0.08)] focus:yoo-editor-bg-[rgba(55,54,47,0.08)] active:yoo-editor-bg-[rgba(55,54,47,0.08)] yoo-editor-w-[24px] yoopta-element-actions-plus"},{children:e(Ln,{})})),e("button",Object.assign({type:"button",className:"yoo-editor-cursor-pointer yoo-editor-rounded-[6px] yoo-editor-h-[24px] yoo-editor-flex yoo-editor-items-center yoo-editor-justify-center yoo-editor-bg-inherit yoo-editor-bg-transparent yoo-editor-transition-colors yoo-editor-duration-[180ms] yoo-editor-ease-[cubic-bezier(0.4,0,0.2,1)] yoo-editor-relative yoo-editor-w-[18px] yoo-editor-p-0 yoo-editor-text-[rgba(55,53,47,0.35)] yoo-editor-m-[0_1px] hover:yoo-editor-bg-[rgba(55,54,47,0.08)] focus:yoo-editor-bg-[rgba(55,54,47,0.08)] active:yoo-editor-bg-[rgba(55,54,47,0.08)] yoopta-element-actions-drag",ref:e=>{y(e),s.setReference(e)}},g,v,{onClick:e=>{e.stopPropagation(),a(n.id);const t=Nn(o,{at:[n.meta.order]});o.focusBlock(n.id),t&&setTimeout((()=>{o.blocks[n.type].hasCustomEditor||(w.blur(t),w.deselect(t),R.deselect(t)),o.setBlockSelected([n.meta.order],{only:!0}),o.setSelection([n.meta.order]),c(!0)}),10)}},{children:e(An,{})})),e(ui,{isOpen:p,refs:s,style:m,onClose:()=>c(!1)})]}))},hi=({children:n,block:o,blockId:r})=>{var i;const a=F(),[l,c]=f(null),{attributes:s,listeners:d,setNodeRef:u,setActivatorNodeRef:p,transform:h,transition:y,isOver:g,isDragging:v}=Cn({id:r,disabled:a.readOnly}),m={transform:h?`translate3d(${h.x}px, ${h.y}px, 0)`:"none",transition:y,opacity:v?.7:1,marginLeft:20*o.meta.depth+"px"},b=null===(i=a.selectedBlocks)||void 0===i?void 0:i.includes(o.meta.order),w=l===r,x={borderBottom:g&&!v?"2px solid #007aff":"none"};return t("div",Object.assign({ref:u,className:"yoo-editor-relative yoo-editor-py-0 yoo-editor-px-[2px] yoo-editor-mt-[2px] yoo-editor-mb-[1px] yoo-editor-rounded yoopta-block-wrapper",onMouseEnter:()=>{a.readOnly||c(r)},onMouseLeave:()=>{a.readOnly||c(null)},style:m,"data-hovered-block":w,"data-yoopta-block":!0,"data-yoopta-block-id":r},{children:[!a.readOnly&&e(pi,{block:o,editor:a,dragHandleProps:{setActivatorNodeRef:p,attributes:s,listeners:d},showActions:w,onChangeActiveBlock:e=>c(e)}),e("div",Object.assign({style:x},{children:n})),b&&!a.readOnly&&e("div",{className:"yoo-editor-absolute yoo-editor-left-0 yoo-editor-top-0 yoo-editor-bg-[#2383e224] yoo-editor-z-[90] yoo-editor-rounded yoo-editor-opacity-100 yoo-editor-h-full yoo-editor-w-full yoo-editor-pointer-events-none yoopta-selection-block"})]}))};function yi(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}"function"==typeof SuppressedError&&SuppressedError;var gi={};Object.defineProperty(gi,"__esModule",{value:!0});for(var vi="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),mi={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},bi={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:vi?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},wi={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},xi=1;xi<20;xi++)wi["f"+xi]=111+xi;function ki(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var o=e.map((function(e){return Ei(e,t)})),r=function(e){return o.some((function(t){return Ci(t,e)}))};return null==n?r:r(n)}function Ei(e,t){var n=t&&t.byKey,o={},r=(e=e.replace("++","+add")).split("+"),i=r.length;for(var a in mi)o[mi[a]]=!1;var l=!0,c=!1,s=void 0;try{for(var d,u=r[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=Si(f),y=mi[h];if(f.length>1&&!y&&!bi[f]&&!wi[h])throw new TypeError('Unknown modifier: "'+f+'"');1!==i&&y||(n?o.key=h:o.which=Oi(f)),y&&(o[y]=!p||null)}}catch(e){c=!0,s=e}finally{try{!l&&u.return&&u.return()}finally{if(c)throw s}}return o}function Ci(e,t){for(var n in e){var o=e[n],r=void 0;if(null!=o&&((null!=(r="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===o&&93===t.which?91:t.which:t[n])||!1!==o)&&r!==o))return!1}return!0}function Oi(e){return e=Si(e),wi[e]||e.toUpperCase().charCodeAt(0)}function Si(e){return e=e.toLowerCase(),e=bi[e]||e}gi.default=ki,gi.isHotkey=ki,gi.isCodeHotkey=function(e,t){return ki(e,t)};var Di=gi.isKeyHotkey=function(e,t){return ki(e,{byKey:!0},t)};gi.parseHotkey=Ei,gi.compareHotkey=Ci,gi.toKeyCode=Oi,gi.toKeyName=Si;const _i={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"},Ri={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"},ji={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Bi=e=>{const t=_i[e],n=Ri[e],o=ji[e],r=t&&Di(t),i=n&&Di(n),a=o&&Di(o);return e=>!(!r||!r(e))||(!(!i||!i(e))||!(!a||!a(e)))},Ai={isBold:Bi("bold"),isCompose:Bi("compose"),isArrowLeft:Bi("arrowLeft"),isArrowRight:Bi("arrowRight"),isArrowUp:Bi("arrowUp"),isArrowDown:Bi("arrowDown"),isDeleteBackward:Bi("deleteBackward"),isDeleteForward:Bi("deleteForward"),isDeleteLineBackward:Bi("deleteLineBackward"),isDeleteLineForward:Bi("deleteLineForward"),isDeleteWordBackward:Bi("deleteWordBackward"),isDeleteWordForward:Bi("deleteWordForward"),isExtendBackward:Bi("extendBackward"),isExtendForward:Bi("extendForward"),isExtendLineBackward:Bi("extendLineBackward"),isExtendLineForward:Bi("extendLineForward"),isItalic:Bi("italic"),isMoveLineBackward:Bi("moveLineBackward"),isMoveLineForward:Bi("moveLineForward"),isCtrlLeft:Bi("ctrlLeft"),isCtrlRight:Bi("ctrlRight"),isRedo:Bi("redo"),isShiftEnter:Bi("shiftEnter"),isEnter:Bi("enter"),isTransposeCharacter:Bi("transposeCharacter"),isUndo:Bi("undo"),isSpace:Bi("space"),isSelect:Bi("select"),isTab:Bi("tab"),isShiftTab:Bi("shiftTab"),isBackspace:Bi("backspace"),isCmdEnter:Bi("cmdEnter"),isCmd:Bi("cmd"),isEscape:Bi("escape"),isSlashCommand:Bi("slashCommand"),isShiftArrowUp:Bi("shiftArrowUp"),isShiftArrowDown:Bi("shiftArrowDown"),isKekceburek:Bi("kekCeburek")};const Ti={onKeyDown:function(e){return t=>{const n=Nn(e,{at:e.selection});if(!n||!n.selection)return;const o=S.parent(n.selection.anchor.path);if(Ai.isShiftEnter(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void n.insertText("\n")}if(Ai.isEnter(t)){if(t.isDefaultPrevented())return;t.preventDefault();const r=D.isStart(n,n.selection.anchor,o),i=D.isEnd(n,n.selection.anchor,o);if(!r&&!i)return void e.splitBlock({slate:n,focus:!0});const a=J({id:q()}),l=e.selection?[e.selection[0]+1]:[0];e.insertBlock(a,{at:l,slate:n,focus:!0})}else if(Ai.isBackspace(t)){if(t.isDefaultPrevented())return;const o=N(e,{at:e.selection}),r=e.blocks[(null==o?void 0:o.type)||""],i=S.parent(n.selection.anchor.path);if(D.isStart(n,n.selection.anchor,i)){t.preventDefault();const o=D.string(n,i),a=e.selection?e.selection[0]-1:0,l=Nn(e,{at:[a]});let c;if(l&&!r.hasCustomEditor&&(c=function(e,t){const[,n]=D.last(e,t);return{path:n,offset:D.string(e,n).length}}(l,i)),0===o.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===D.string(l,[0,0]).length)return e.deleteBlock({at:[a],focus:!0,focusAt:c});const t=Array.from(D.nodes(n,{at:[0],match:e=>!D.isEditor(e)&&(B.isText(e)||D.isInline(n,e)),mode:"highest"})).map((([e])=>e));return R.insertNodes(l,t,{at:D.end(l,[])}),e.deleteBlock({at:e.selection,focus:!0,focusAt:c})}}}else{if(Ai.isSelect(t)){if(t.isDefaultPrevented())return;const[,o]=D.first(n,[0]),[,r]=D.last(n,[n.children.length-1]),i=D.range(n,o,r),a=j.equals(n.selection,i);if(j.isExpanded(n.selection)&&a)return t.preventDefault(),w.blur(n),w.deselect(n),R.deselect(n),void e.setBlockSelected([],{allSelected:!0})}if(Ai.isShiftTab(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void e.decreaseBlockDepth()}if(Ai.isTab(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void e.increaseBlockDepth()}if(Ai.isArrowUp(t)){if(t.isDefaultPrevented())return;const o=S.parent(n.selection.anchor.path);if(D.isStart(n,n.selection.anchor,o)){const n=e.selection?[e.selection[0]-1]:null,o=Nn(e,{at:n}),r=N(e,{at:n});if(o&&r){const[,n]=D.last(o,[0]),i={path:n,offset:D.string(o,n).length};return t.preventDefault(),void e.focusBlock(r.id,{focusAt:i,waitExecution:!1,shouldUpdateBlockSelection:!0})}}}if(Ai.isArrowDown(t)){if(t.isDefaultPrevented())return;const o=S.parent(n.selection.anchor.path);if(D.isEnd(n,n.selection.anchor,o)){const n=e.selection?[e.selection[0]+1]:null,r=Nn(e,{at:n}),i=N(e,{at:n});if(r&&i){const n=function(e,t){const[,n]=D.first(e,t);return{path:n,offset:0}}(r,o);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&&Di(n.hotkey)(t)){t.preventDefault(),e.formats[n.type].toggle();break}}}}}},Li=({children:t,attributes:n,placeholder:o})=>{const r=x(),i=Object.assign({},n);return r&&o&&(i["data-placeholder"]=o,i.className="yoopta-placeholder"),e("span",Object.assign({},i,{children:t}))};function Ni(e){try{return new URL(e),!0}catch(e){return!1}}const Mi=(e,t)=>{(e=>{const[t]=D.nodes(e,{match:e=>!D.isEditor(e)&&_.isElement(e)&&"link"===e.type});return!!t})(e)&&(e=>{R.unwrapNodes(e,{match:e=>!D.isEditor(e)&&_.isElement(e)&&"link"===e.type})})(e);const{selection:n}=e,o=n&&j.isCollapsed(n),r={type:"link",children:o?[{text:t}]:[],props:{url:t,target:"_blank",rel:"noreferrer"}};o?R.insertNodes(e,r):(R.wrapNodes(e,r,{split:!0}),R.collapse(e,{edge:"end"}))};function Ii(e){return!!(e&&e.id&&e.type&&e.value&&e.meta)}const Pi={B:{type:"bold"},STRONG:{type:"bold"},I:{type:"italic"},U:{type:"underline"},S:{type:"strike"},CODE:{type:"code"},EM:{type:"code"}};function Fi(e,t,n){var o,r,i;if(3===n.nodeType){return null===(o=n.textContent)||void 0===o?void 0:o.replace(/[\t\n\r\f\v]+/g," ")}if(1!==n.nodeType)return null;if("BR"===n.nodeName)return"\n";const a=n;let l=Array.from(a.childNodes).map((n=>Fi(e,t,n))).flat();if(Pi[n.nodeName]){return{[Pi[n.nodeName].type]:!0,text:null===(r=n.textContent)||void 0===r?void 0:r.replace(/[\t\n\r\f\v]+/g," ")}}if(t[n.nodeName]){const o=t[n.nodeName],r=e.blocks[o.type],a=oi(r.elements)||"",c=r.elements[a],s="void"===(null===(i=c.props)||void 0===i?void 0:i.nodeType);let d={id:q(),type:a,children:s&&!r.hasCustomEditor?[{text:""}]:l.map(zi),props:Object.assign({nodeType:"block"},c.props)};if(o.parse){const e=o.parse(n);if(e)if(_.isElement(e))d=e;else if(Array.isArray(e)){return e}}0===d.children.length&&(d.children=[{text:""}]);return J({id:q(),type:o.type,value:[d],meta:{order:0,depth:0}})}return l}function zi(e){if("string"==typeof e)return{text:e};if(Array.isArray(e))return{text:e[0]};if(e.text)return e;if(Ii(e)){let t="";return e.value[0].children.forEach((e=>{t+=`${e.text}`})),{text:t}}return{text:""}}const Ui={html:{deserialize:function(e,t){console.log("pasted html",t);const n=function(e){const t={};return Object.keys(e.plugins).forEach((n=>{const o=e.plugins[n],{parsers:r}=o;if(r){const{html:e}=r;if(e){const{deserialize:o}=e;if(o){const{nodeNames:e}=o;e&&e.forEach((e=>{t[e]={type:n,parse:o.parse}}))}}}})),t}(e);return Fi(e,n,t).filter(Ii)},serialize:function(){}},markdown:{}},Hi=({id:t,customEditor:n,elements:o,marks:r,events:i,options:a,placeholder:c="Type '/' for commands"})=>{var s,f;const p=F(),h=z(t),y=l(h.value).current,g=h.type,v=d((()=>(e=>{const t={};return Object.keys(e).forEach((n=>t[n]=e[n].render)),t})(o)),[o]),m=d((()=>(e=>{const t={};return e?(e.forEach((e=>t[e.type]=e)),t):t})(r)),[r]),b=d((()=>{let e=p.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&&Ni(t)?Mi(e,t):n(t)},e.insertData=n=>{const o=n.getData("text/plain");o&&Ni(o)?Mi(e,o):t(n)},e})(e))})),e}),[]),w=d((()=>{if(!i||p.readOnly)return{};const e={hotkeys:Ai,currentBlock:h,defaultBlock:J({id:q()})},t={};return Object.keys(i).forEach((n=>{t[n]=function(t){if(i[n]){i[n](p,b,e)(t)}}})),t}),[i,p,h]),x=u((e=>p.updateBlock(t,{value:e})),[t]),k=u((n=>{const o=v[n.element.type];return o?e(o,Object.assign({},n,{blockId:t,HTMLAttributes:null==a?void 0:a.HTMLAttributes})):e(C,Object.assign({},n))}),[o]),E=u((t=>{var n,o,r,i,a;let{children:l,leaf:s,attributes:d}=t;const u=yi(s,["text"]),f=(null===(n=p.selection)||void 0===n?void 0:n[0])===h.meta.order;u&&Object.keys(u).forEach((e=>{const t=m[e];t&&(l=t.render({children:l,leaf:s}))}));const y=!("void"===(null===(a=null===(i=null===(r=null===(o=t.children)||void 0===o?void 0:o.props)||void 0===r?void 0:r.parent)||void 0===i?void 0:i.props)||void 0===a?void 0:a.nodeType))&&f&&s.withPlaceholder;return e(Li,Object.assign({attributes:d,placeholder:y?c:void 0},{children:l}))}),[r]),O=u((e=>{var t;p.readOnly||(null===(t=w.onKeyDown)||void 0===t||t.call(w,e),Ti.onKeyDown(p)(e))}),[w.onKeyDown,p.readOnly]),S=u((e=>{var t;p.readOnly||null===(t=null==w?void 0:w.onKeyUp)||void 0===t||t.call(w,e)}),[w.onKeyUp,p.readOnly]),_=u((e=>{var t,n;p.readOnly||((null===(t=p.selection)||void 0===t?void 0:t[0])!==h.meta.order&&p.setSelection([h.meta.order]),null===(n=null==w?void 0:w.onClick)||void 0===n||n.call(w,e))}),[w.onClick,p.readOnly,null===(s=p.selection)||void 0===s?void 0:s[0]]),R=u((e=>{var t;p.readOnly||(e.preventDefault(),null===(t=null==w?void 0:w.onBlur)||void 0===t||t.call(w,e))}),[w.onBlur,p.readOnly]),B=u((e=>{var t;p.readOnly||null===(t=null==w?void 0:w.onFocus)||void 0===t||t.call(w,e)}),[w.onFocus,p.readOnly]),A=u((e=>{var t;if(p.readOnly)return;null===(t=null==w?void 0:w.onPaste)||void 0===t||t.call(w,e);const n=e.clipboardData.getData("text/html"),o=(new DOMParser).parseFromString(n,"text/html");if(o.body.childNodes.length>0){const e=Ui.html.deserialize(p,o.body);if(e.length>0)return void p.insertBlocks(e,{at:p.selection,focus:!0})}}),[w.onPaste,p.readOnly]),T=u((e=>{var t;const n=[];if(p.readOnly)return n;const[o,r]=e,i=(null===(t=p.selection)||void 0===t?void 0:t[0])===h.meta.order;return b.selection&&i&&!D.isEditor(o)&&""===D.string(b,[r[0]])&&j.includes(b.selection,r)&&j.isCollapsed(b.selection)&&n.push(Object.assign(Object.assign({},b.selection),{withPlaceholder:!0})),n}),[p.readOnly,null===(f=p.selection)||void 0===f?void 0:f[0]]);return e("div",Object.assign({"data-plugin-id":t,"data-plugin-type":g},{children:e(Vi,{id:t,slate:b,initialValue:y,onChange:x,decorate:T,renderLeaf:E,renderElement:k,eventHandlers:w,onKeyDown:O,onKeyUp:S,onFocus:B,onClick:_,onBlur:R,customEditor:n,readOnly:p.readOnly,onPaste:A})}))},Vi=p((({id:t,slate:n,initialValue:o,onChange:r,renderLeaf:i,renderElement:a,eventHandlers:l,onKeyDown:c,onKeyUp:s,onFocus:d,onClick:u,onBlur:f,onPaste:p,customEditor:h,decorate:y,readOnly:g})=>"function"==typeof h?h({blockId:t}):e(k,Object.assign({editor:n,initialValue:o,onChange:r},{children:e(E,Object.assign({id:`yoopta-slate-editor-${t}`,renderElement:a,renderLeaf:i,className:"focus-visible:yoo-editor-outline-none focus:yoo-editor-outline-none",spellCheck:!0},l,{onKeyDown:c,onKeyUp:s,onFocus:d,onClick:u,decorate:y,onBlur:f,readOnly:g,onPaste:p}),`editable-${t}`)}),`slate-${t}`)));Vi.displayName="SlateEditorInstance";const Ki=({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])}(Ae(Et,{activationConstraint:{delay:100,tolerance:0}}),Ae(mt,{coordinateGetter:Dn})),handleDragEnd:u((t=>{const{active:n,over:o}=t;if(n&&o&&n.id!==o.id){const t=e.children[o.id].meta.order;e.moveBlock(n.id,[t])}}),[]),handleDragStart:u((t=>{e.setBlockSelected(null)}),[])}),Wi=[],Yi=({editor:t,marks:o,placeholder:r})=>{const i=V(),{sensors:a,handleDragEnd:l,handleDragStart:c}=Ki({editor:t}),s=Object.keys(t.children),u=d((()=>0===s.length?Wi: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(hi,Object.assign({block:a,blockId:i},{children:e(Hi,{type:a.type,id:i,marks:o,customEditor:l.customEditor,events:l.events,elements:l.elements,options:l.options,placeholder:r},i)}),i)):console.error(`Plugin ${a.type} not found`)}return i?e(n,{children:f}):e(tn,Object.assign({sensors:a,collisionDetection:ze,onDragStart:c,onDragEnd:l},{children:e(vn,Object.assign({disabled:i,items:u,strategy:hn},{children:f}))}))},$i=({editor:e,yooptaEditorRef:t,root:n})=>{const[o,r]=f({origin:[0,0],coords:[0,0],selection:!1}),i=i=>{var a;if(e.readOnly||!1===n)return;const l=null===(a=t.current)||void 0===a?void 0:a.contains(i.target);if(!l&&!o.selection&&Array.isArray(e.selectedBlocks)&&e.selectedBlocks.length>0)return e.setBlockSelected(null),c();l||r({origin:[i.pageX,i.pageY-window.pageYOffset],coords:[i.pageX,i.pageY-window.pageYOffset],selection:!0})},a=t=>{if(!o.selection||e.readOnly||!1===n)return;r((e=>Object.assign(Object.assign({},e),{coords:[t.pageX,t.pageY-window.pageYOffset]})));const i=((e,t)=>{const n=[];return document.querySelectorAll("[data-yoopta-block]").forEach(((o,r)=>{if(!o)return;const i=o.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(r)})),n})(o.origin,[t.pageX,t.pageY-window.pageYOffset]);e.setBlockSelected(i,{only:!0})},l=()=>{e.readOnly||c()};s((()=>{var o;if(e.readOnly||!1===n)return;const r=n&&"current"in n?n.current:n||document;if(!r)throw new Error("Root element not found. Please check the `selectionBoxRoot` prop");if(!("nodeType"in r))throw new Error("Root element should be a DOM element or a ref object. Please check the `selectionBoxRoot` prop");if(null===(o=t.current)||void 0===o?void 0:o.contains(r))throw new Error("Root element should not be a child of the editor. Please check the `selectionBoxRoot` prop");return r.addEventListener("mousedown",i),r.addEventListener("mousemove",a),r.addEventListener("mouseup",l),()=>{r.removeEventListener("mousedown",i),r.removeEventListener("mousemove",a),r.removeEventListener("mouseup",l)}}),[e.selectedBlocks,o,n,e.readOnly]);const c=()=>{r({origin:[0,0],coords:[0,0],selection:!1})};return Object.assign(Object.assign({},o),{onClose:c})},Xi=({origin:t,coords:n,isOpen:o})=>{if(!o)return null;const r={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:r})},Zi={selectionStarted:!1,indexToSelect:null,startedIndexToSelect:null},qi=({placeholder:n,marks:o,className:r,selectionBoxRoot:i,width:a,autoFocus:c=!0})=>{const d=F(),u=V(),f=l(null),p=$i({editor:d,yooptaEditorRef:f,root:i});let h=l(Zi).current;s((()=>{if(!c||u)return;const e=N(d,{at:[0]});e&&d.focusBlock(e.id,{waitExecution:!0})}),[c,u]),s((()=>{if(!u)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)}),[d.selectedBlocks,u]);const y=()=>{u||Array.isArray(d.selectedBlocks)&&d.selectedBlocks.length>0&&d.setBlockSelected(null)},g=()=>{h.indexToSelect=null,h.startedIndexToSelect=null,h.selectionStarted=!1},v=e=>{var t,n,o,r,i;if(!u){if(Ai.isSelect(e)){if((null===(t=d.selectedBlocks)||void 0===t?void 0:t.length)===Object.keys(d.children).length)return void e.preventDefault();if(h.selectionStarted)return e.preventDefault(),void d.setBlockSelected([],{allSelected:!0})}if(Ai.isBackspace(e)){e.stopPropagation();if(Array.isArray(d.selectedBlocks)&&(null===(n=d.selectedBlocks)||void 0===n?void 0:n.length)===Object.keys(d.children).length)return e.preventDefault(),d.deleteBlock({deleteAll:!0}),d.setBlockSelected(null),void g();if(Array.isArray(d.selectedBlocks)&&(null===(o=d.selectedBlocks)||void 0===o?void 0:o.length)>0)return e.preventDefault(),d.deleteBlock({fromPaths:d.selectedBlocks}),d.setBlockSelected(null),void g()}if(Ai.isShiftArrowUp(e)){if("function"==typeof e.isDefaultPrevented&&e.isDefaultPrevented())return;if(h.selectionStarted&&null!==h.startedIndexToSelect&&null!==h.indexToSelect){const e=h.indexToSelect,t=e-1;if(0===e)return;if(e===h.startedIndexToSelect)return d.setBlockSelected([t]),void(h.indexToSelect=t);if(t<h.startedIndexToSelect)return d.setBlockSelected([t]),void(h.indexToSelect=t);if((null===(r=d.selectedBlocks)||void 0===r?void 0:r.includes(e))&&e!==h.startedIndexToSelect){const n=d.selectedBlocks.filter((t=>t!==e));return d.setBlockSelected(n,{only:!0}),void(h.indexToSelect=t)}return}const t=N(d),n=Nn(d);if(!n||!n.selection||!t)return;const o=S.parent(n.selection.anchor.path),i=D.isStart(n,n.selection.focus,o);if(j.isExpanded(n.selection)&&i){const o=d.selection?[d.selection[0]-1]:[0],r=N(d,{at:o});t&&r&&(e.preventDefault(),w.blur(n),w.deselect(n),R.deselect(n),d.setSelection(null),d.setBlockSelected([null==t?void 0:t.meta.order,t.meta.order-1]),h.startedIndexToSelect=t.meta.order,h.indexToSelect=t.meta.order-1,h.selectionStarted=!0)}}if(Ai.isShiftArrowDown(e)){if(h.selectionStarted&&null!==h.indexToSelect&&null!==h.startedIndexToSelect){const e=h.indexToSelect,t=e+1;if(t===Object.keys(d.children).length)return;if(e===h.startedIndexToSelect)return d.setBlockSelected([t]),void(h.indexToSelect=t);if(t>h.startedIndexToSelect)return d.setBlockSelected([t]),void(h.indexToSelect=t);if((null===(i=d.selectedBlocks)||void 0===i?void 0:i.includes(e))&&e!==h.startedIndexToSelect){const n=d.selectedBlocks.filter((t=>t!==e));return d.setBlockSelected(n,{only:!0}),void(h.indexToSelect=t)}return}const t=N(d),n=Nn(d);if(!n||!n.selection||!t)return;const o=S.parent(n.selection.anchor.path),r=D.isEnd(n,n.selection.focus,o);if(j.isExpanded(n.selection)&&r){const o=d.selection?[d.selection[0]+1]:[0],r=N(d,{at:o});t&&r&&(e.preventDefault(),w.blur(n),w.deselect(n),R.deselect(n),d.setSelection(null),d.setBlockSelected([null==t?void 0:t.meta.order,(null==t?void 0:t.meta.order)+1]),h.startedIndexToSelect=t.meta.order,h.indexToSelect=t.meta.order+1,h.selectionStarted=!0)}}}},m=(b={userSelect:p.selection?"none":"auto",pointerEvents:p.selection?"none":"auto",width:a},Object.assign({paddingBottom:150},b));var b;return t("div",Object.assign({id:"yoopta-editor",className:r,style:m,ref:f,onClick:e=>{u||(g(),(e=>{var t;const n=f.current;if(!n)return;const{bottom:o}=n.getBoundingClientRect(),r=o-parseInt(getComputedStyle(n).paddingBottom,10),i=J({id:q()});if(e.clientY>=r){const e=Object.keys(d.children).length-1,n=N(d,{at:[e]}),o=Nn(d,{at:[e]});if(n&&o&&o.selection){const e=D.string(o,o.selection.anchor.path),r=S.parent(o.selection.anchor.path),[a]=D.node(o,r);if(n.type===i.type&&_.isElement(a)&&"void"!==(null===(t=a.props)||void 0===t?void 0:t.nodeType)&&0===e.trim().length)return void d.focusBlock(n.id,{slate:o})}const r=e+1;d.insertBlock(i,{at:[r],focus:!0})}})(e),y())},onBlur:e=>{var t;(null===(t=f.current)||void 0===t?void 0:t.contains(e.relatedTarget))||u||(g(),y())}},{children:[e(Yi,{editor:d,marks:o,placeholder:n}),!1!==i&&e(Xi,{origin:p.origin,coords:p.coords,isOpen:p.selection&&!u})]}))},Gi=({children:e,fallback:t=null})=>{const[n,o]=f(!1);return s((()=>o(!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 oa(e){return!!e&&!!e[ea]}function ra(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,o)=>t(o,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 o=ca(e);2===o?e.set(t,n):3===o?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 o=Reflect.ownKeys(n);for(let t=0;t<o.length;t++){const r=o[t],i=n[r];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[r]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[r]})}return Object.create(na(e),n)}function ya(e,t=!1){return va(e)||oa(e)||!ra(e)||(ca(e)>1&&(e.set=e.add=e.clear=e.delete=ga),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>ya(t,!0)))),e}function ga(){ta(2)}function va(e){return Object.isFrozen(e)}var ma,ba={};function wa(e){const t=ba[e];return t||ta(0),t}function xa(){return ma}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===ma&&(ma=e.parent_)}function Oa(e){return ma={drafts_:[],parent_:ma,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 Da(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)),ra(e)&&(e=_a(t,e),t.parent_||ja(t,e)),t.patches_&&wa("Patches").generateReplacementPatches_(n[ea].base_,e,t.patches_,t.inversePatches_)):e=_a(t,n,[]),Ea(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ji?e:void 0}function _a(e,t,n){if(va(t))return t;const o=t[ea];if(!o)return la(t,((r,i)=>Ra(e,o,t,r,i,n))),t;if(o.scope_!==e)return t;if(!o.modified_)return ja(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const t=o.copy_;let r=t,i=!1;3===o.type_&&(r=new Set(t),t.clear(),i=!0),la(r,((r,a)=>Ra(e,o,t,r,a,n,i))),ja(e,t,!1),n&&e.patches_&&wa("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function Ra(e,t,n,o,r,i,a){if(oa(r)){const a=_a(e,r,i&&t&&3!==t.type_&&!sa(t.assigned_,o)?i.concat(o):void 0);if(da(n,o,a),!oa(a))return;e.canAutoFreeze_=!1}else a&&n.add(r);if(ra(r)&&!va(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;_a(e,r),t&&t.scope_.parent_||"symbol"==typeof o||!Object.prototype.propertyIsEnumerable.call(n,o)||ja(e,r)}}function ja(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ya(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 o=La(t,n);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}(e,n,t);const o=n[t];return e.finalized_||!ra(o)?o:o===Ta(e.base_,t)?(Ma(e),e.copy_[t]=Ia(o,e)):o},has:(e,t)=>t in pa(e),ownKeys:e=>Reflect.ownKeys(pa(e)),set(e,t,n){const o=La(pa(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const o=Ta(pa(e),t),a=o?.[ea];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((r=n)===(i=o)?0!==r||1/r==1/i:r!=r&&i!=i)&&(void 0!==n||sa(e.base_,t)))return!0;Ma(e),Na(e)}var r,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,Ma(e),Na(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=pa(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:o.enumerable,value:n[t]}:o},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 Na(e){e.modified_||(e.modified_=!0,e.parent_&&Na(e.parent_))}function Ma(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),o={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 r=o,i=Ba;n&&(r=[o],i=Aa);const{revoke:a,proxy:l}=Proxy.revocable(r,i);return o.draft_=l,o.revoke_=a,l}(e,t);return(t?t.scope_:xa()).drafts_.push(n),n}function Pa(e){if(!ra(e)||va(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 Fa=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 o=this;return function(e=n,...r){return o.produce(e,(e=>t.call(this,e,...r)))}}let o;if("function"!=typeof t&&ta(6),void 0!==n&&"function"!=typeof n&&ta(7),ra(e)){const r=Oa(this),i=Ia(e,void 0);let a=!0;try{o=t(i),a=!1}finally{a?Ea(r):Ca(r)}return ka(r,n),Da(o,r)}if(!e||"object"!=typeof e){if(o=t(e),void 0===o&&(o=e),o===Ji&&(o=void 0),this.autoFreeze_&&ya(o,!0),n){const t=[],r=[];wa("Patches").generateReplacementPatches_(e,o,t,r),n(t,r)}return o}ta(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,o;return[this.produce(e,t,((e,t)=>{n=e,o=t})),n,o]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ra(e)||ta(8),oa(e)&&(e=function(e){oa(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_:o}=n;return ka(o,t),Da(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}n>-1&&(t=t.slice(n+1));const o=wa("Patches").applyPatches_;return oa(e)?o(e,t):this.produce(e,(e=>o(e,t)))}};Fa.produce,Fa.produceWithPatches.bind(Fa),Fa.setAutoFreeze.bind(Fa),Fa.setUseStrictShallowCopy.bind(Fa),Fa.applyPatches.bind(Fa);var za=Fa.createDraft.bind(Fa),Ua=Fa.finishDraft.bind(Fa);function Ha(e,t){const n=Nn(e);if(!n)return!1;const o=D.marks(n);return!!(null==o?void 0:o[t])}const Va=(e,t)=>{const{insertText:n}=t;return t.insertText=o=>{var r;const{selection:i}=t;if(" "===o&&i&&j.isCollapsed(i)){const{anchor:a}=i,l=D.above(t,{match:e=>_.isElement(e)&&D.isBlock(t,e),mode:"lowest"});if(!l)return;const[,c]=l,s=D.parent(t,c),[d]=s;if(_.isElement(d)&&!B.isText(d.children[0]))return n(o);const u=l?c:[],f={anchor:a,focus:D.start(t,u)},p=D.string(t,f),h=null===(r=e.shortcuts)||void 0===r?void 0:r[p];if(!!h&&!h.isActive())return R.select(t,f),R.delete(t),void h.create({deleteText:!1})}n(o)},t};function Ka(e,t,n){e.children=za(e.children);let o=!1;const r=e.children[t];if(!r)throw Error(`Block with id ${t} not found`);n.id&&(r.id=n.id,o=!0),n.type&&(r.type=n.type,o=!0),n.meta&&(r.meta=n.meta,o=!0),n.value&&(r.value=n.value),e.children=Ua(e.children),o&&e.applyChanges(),e.emit("change",e.children)}function Wa(e,t,n){e.children=za(e.children);const o=N(e,{at:e.selection});if(!o)throw new Error("Block from not found at current selection");const r=oi(e.blocks[o.type].elements);if(o.type===t)return void(e.children=Ua(e.children));const i=Nn(e,{at:[o.meta.order]});if(!i)throw new Error(`Slate not found for block in position ${o.meta.order}`);const a=oi(e.blocks[t].elements);D.withoutNormalizing(i,(()=>{!function(e,t={}){var n;const{at:o,elementType:r}=t,i=o||(null===(n=e.selection)||void 0===n?void 0:n.anchor.path);if(!i)return;let a=e=>!D.isEditor(e)&&_.isElement(e);r&&(a=e=>!D.isEditor(e)&&_.isElement(e)&&e.type===r);const l=S.parent(i),c=D.nodes(e,{at:l,match:a,mode:"lowest"});if(c){const[e]=c}}(i,{elementType:r}),R.setNodes(i,{type:a},{at:[0],mode:"lowest",match:e=>_.isElement(e)&&!D.isInline(i,e)});const n={id:o.id,type:t,meta:Object.assign(Object.assign({},o.meta),{order:o.meta.order}),value:i.children};e.blockEditorsMap[o.id]=i,e.children[o.id]=n,e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children)}))}function Ya(e,t={}){const{at:n=e.selection,deleteAll:o=!1,fromPaths:r,focus:i}=t;if(Array.isArray(r)&&r.length>0){e.children=za(e.children),r.forEach((t=>{const n=N(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(o||1===Object.keys(e.children).length){e.children={},e.blockEditorsMap={};const t=J({id:q()}),n=Za(e);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=za(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,o=N(e,{at:[n]});o&&e.focusBlock(o.id,{focusAt:t.focusAt})}}function $a(e,t){const n={};return t.forEach((t=>{const o=t.type;n[o]={hotkey:t.hotkey,type:o,getValue:()=>function(e,t){const n=Nn(e);if(!n)return null;const o=D.marks(n);return null==o?void 0:o[t]}(e,o),isActive:()=>Ha(e,o),toggle:()=>function(e,t){const n=Nn(e),o=Ha(e,t);n&&(o?D.removeMark(n,t):D.addMark(n,t,!0),e.applyChanges(),e.emit("change",e.children))}(e,o),update:t=>function(e,t,n){const o=Nn(e);o&&o.selection&&j.isExpanded(o.selection)&&(D.addMark(o,t,n),e.applyChanges(),e.emit("change",e.children))}(e,o,t)}})),n}function Xa(e,t){const n={};return t.forEach(((t,o)=>{var r;const i=ri(t.elements),a=null===(r=null==i?void 0:i.props)||void 0===r?void 0:r.nodeType;if(!("inline"===a||"inlineVoid"===a)){const o={};Object.keys(t.elements).forEach((e=>{const n=yi(t.elements[e],["render"]);o[e]=n}));const{display:r,placeholder:i,align:a,shortcuts:l}=t.options||{};n[t.type]={type:t.type,elements:o,hasCustomEditor:!!t.customEditor,options:{display:r,placeholder:i,align:a,shortcuts:l},isActive:()=>{const n=N(e,{at:e.selection});return(null==n?void 0:n.type)===t.type},toggle:(t,n)=>{Wa(e,t)},create:n=>{!function(e,t,n){var o;e.children=za(e.children);const r=N(e);if(!r)throw new Error(`No block found in the current selection path. Passed path: ${e.selection}`);const i=(null==n?void 0:n.slate)||Nn(e,{at:[null==r?void 0:r.meta.order]});if(!i||!i.selection)return;const a=e.blocks[t],l=oi(a.elements),c=a.elements[l];if(!c)return;const s=Object.assign({nodeType:(null===(o=c.props)||void 0===o?void 0:o.nodeType)||"block"},c.props),d=G({id:q(),type:l,props:s});R.setNodes(i,d,{at:[0,0],match:e=>_.isElement(e),mode:"highest"}),(null==n?void 0:n.deleteText)&&R.delete(i,{at:[0,0]});const u=J({id:r.id,type:a.type,meta:{order:r.meta.order,depth:r.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)=>{Ka(e,t,n)},updateElement:(t,n,o)=>{!function(e,t,n,o){const r=e.children[t];if(!r)throw new Error(`Block with id ${t} not found`);const i=Nn(e,{at:[r.meta.order]});i?D.withoutNormalizing(i,(()=>{const[t]=D.nodes(i,{at:[0],match:e=>_.isElement(e)&&e.type===n}),r=null==t?void 0:t[0],a=(null==r?void 0:r.props)||{},l={props:Object.assign(Object.assign({},a),o)};R.setNodes(i,l,{at:[0],match:e=>_.isElement(e)&&e.type===n,mode:"lowest"}),e.applyChanges(),e.emit("change",e.children)})):console.warn("No slate found")}(e,t,n,o)},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=q();return{[e]:J({id:e})}})(),Qa=new X,el=(e,t)=>Qa.on(e,t),tl=(e,t)=>Qa.once(e,t),nl=(e,t)=>Qa.off(e,t),ol=(e,t)=>Qa.emit(e,t);const rl=({editor:n,value:o,marks:r,plugins:i,autoFocus:a,className:l,tools:c,selectionBoxRoot:s,children:u,placeholder:p,readOnly:h,width:y})=>{const g=()=>{w((e=>Object.assign(Object.assign({},e),{version:e.version+1})))},v=d((()=>r?[Ga,...r]:[Ga]),[r]),m=d((()=>i.map((e=>e.getPlugin))),[i]),[b,w]=f((()=>(n.applyChanges=g,n.readOnly=h||!1,v&&(n.formats=$a(n,v)),n.blocks=Xa(n,m),n.children=function(e){return!!e&&"object"==typeof e&&0!==Object.keys(e).length}(o)?o:Ja,n.blockEditorsMap=function(e){const t={};return Object.keys(e.children).forEach((n=>{const o=Za(e);t[n]=o})),t}(n),n.shortcuts=function(e){const t={};return Object.values(e.blocks).forEach((e=>{var n,o,r,i;e.options&&Array.isArray(null===(n=e.options)||void 0===n?void 0:n.shortcuts)&&(null===(o=e.options)||void 0===o?void 0:o.shortcuts.length)>0&&(null===(i=null===(r=e.options)||void 0===r?void 0:r.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 o;const r=e.elements[t],i=null===(o=r.props)||void 0===o?void 0:o.nodeType;"inline"!==i&&"inlineVoid"!==i||(n[t]=r)})),t[e.type]=e})),e.forEach((e=>{if(e.elements){const o=Object.assign(Object.assign({},e.elements),n);t[e.type]=Object.assign(Object.assign({},e),{elements:o})}})),t}(m),n.on=el,n.once=tl,n.off=nl,n.emit=ol,{editor:n,version:0})));return e(Gi,{children:e(P,Object.assign({editorState:b},{children:t(ai,Object.assign({tools:c},{children:[e(qi,{placeholder:p,marks:v,autoFocus:a,className:l,selectionBoxRoot:s,width:y}),u]}))}))})},il=Object.assign(Object.assign({},fi),{ExtendedBlockActions:({className:o,style:r,onClick:i,children:a})=>{const l=V(),[c,s]=f(!1),{refs:d,floatingStyles:u,context:p}=Ir({placement:"bottom-start",open:c,onOpenChange:s,middleware:[Uo(),zo(),Fo(),ko(10)],whileElementsMounted:Po}),{isMounted:h,styles:y}=Ur(p,{duration:100}),g=Object.assign(Object.assign({},y),u);return l?null:t(n,{children:[h&&e(ui,Object.assign({isOpen:!0,onClose:()=>s(!1),refs:d,style:g},{children:a})),e("button",Object.assign({type:"button",ref:d.setReference,className:`yoo-editor-absolute yoo-editor-right-[8px] yoo-editor-top-[8px] yoo-editor-flex yoo-editor-items-center yoo-editor-justify-between yoo-editor-z-10 yoo-editor-opacity-1 yoo-editor-bg-[#eee] yoo-editor-w-[22px] yoo-editor-h-[22px] yoo-editor-transition-opacity yoo-editor-duration-150 yoo-editor-ease-in yoo-editor-border-none yoo-editor-cursor-pointer yoo-editor-rounded-[2px] yoo-editor-p-[0_4px] ${o||""} yoopta-extended-block-actions`,onClick:()=>{null==i||i(),s(!0)},style:c?Object.assign(Object.assign({},r),{opacity:1}):r},{children:e(Zr,{})}))]})}});function al(e,t){const n=Object.keys(e.children),{type:o}=t||{},r=n.find((t=>e.children[t].type===o));return r?e.children[r]:null}function ll(e,t,n={}){try{const{focusAt:o,waitExecution:r=!0,waitExecutionMs:i=0,shouldUpdateBlockSelection:a=!0}=n,l=()=>{const r=n.slate||e.blockEditorsMap[t],i=e.children[t];if(!r||!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]=D.first(e,[0]);return{path:n||[0,0],offset:0}}(r,o);R.select(r,e),w.focus(r)}a&&setTimeout((()=>{e.setSelection([i.meta.order])}),0)};r?setTimeout((()=>l()),i):l()}catch(e){}}function cl(e){return Array.from(new Set(e))}var sl={};!function(e,t){var n="__lodash_hash_undefined__",o=9007199254740991,r="[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]",y="[object String]",g="[object Symbol]",v="[object WeakMap]",m="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",k="[object Int8Array]",E="[object Int16Array]",C="[object Int32Array]",O="[object Uint8Array]",S="[object Uint8ClampedArray]",D="[object Uint16Array]",_="[object Uint32Array]",R=/\w*$/,j=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,A={};A[r]=A["[object Array]"]=A[m]=A[b]=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[y]=A[g]=A[O]=A[S]=A[D]=A[_]=!0,A["[object Error]"]=A[l]=A[v]=!1;var T="object"==typeof Y&&Y&&Y.Object===Object&&Y,L="object"==typeof self&&self&&self.Object===Object&&self,N=T||L||Function("return this")(),M=t&&!t.nodeType&&t,I=M&&e&&!e.nodeType&&e,P=I&&I.exports===M;function F(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function U(e,t,n,o){var r=-1,i=e?e.length:0;for(o&&i&&(n=e[++r]);++r<i;)n=t(n,e[r],r,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,o){n[++t]=[o,e]})),n}function K(e,t){return function(n){return e(t(n))}}function W(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=N["__core-js_shared__"],J=($=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",Q=Z.toString,ee=q.hasOwnProperty,te=q.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oe=P?N.Buffer:void 0,re=N.Symbol,ie=N.Uint8Array,ae=K(Object.getPrototypeOf,Object),le=Object.create,ce=q.propertyIsEnumerable,se=X.splice,de=Object.getOwnPropertySymbols,ue=oe?oe.isBuffer:void 0,fe=K(Object.keys,Object),pe=Pe(N,"DataView"),he=Pe(N,"Map"),ye=Pe(N,"Promise"),ge=Pe(N,"Set"),ve=Pe(N,"WeakMap"),me=Pe(Object,"create"),be=Ve(pe),we=Ve(he),xe=Ve(ye),ke=Ve(ge),Ee=Ve(ve),Ce=re?re.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 o=e[t];this.set(o[0],o[1])}}function De(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function _e(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function Re(e){this.__data__=new De(e)}function je(e,t){var n=We(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)==r)}(e)?function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}(e.length,String):[],o=n.length,i=!!o;for(var a in e)!t&&!ee.call(e,a)||i&&("length"==a||Ue(a,o))||n.push(a);return n}function Be(e,t,n){var o=e[t];ee.call(e,t)&&Ke(o,n)&&(void 0!==n||t in e)||(e[t]=n)}function Ae(e,t){for(var n=e.length;n--;)if(Ke(e[n][0],t))return n;return-1}function Te(e,t,n,o,f,v,j){var B;if(o&&(B=v?o(e,f,v,j):o(e)),void 0!==B)return B;if(!Ze(e))return e;var T=We(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,o=e.length;t||(t=Array(o));for(;++n<o;)t[n]=e[n];return t}(e,B)}else{var L=ze(e),N=L==l||L==c;if($e(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==r||N&&!v){if(H(e))return v?e:{};if(B=function(e){return"function"!=typeof e.constructor||He(e)?{}:(t=ae(e),Ze(t)?le(t):{});var t}(N?{}:e),!t)return function(e,t){return Me(e,Fe(e),t)}(e,function(e,t){return e&&Me(t,qe(t),e)}(B,e))}else{if(!A[L])return v?e:{};B=function(e,t,n,o){var r=e.constructor;switch(t){case m:return Ne(e);case i:case a:return new r(+e);case b:return function(e,t){var n=t?Ne(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,o);case w:case x:case k:case E:case C:case O:case S:case D:case _:return function(e,t){var n=t?Ne(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,o);case s:return function(e,t,n){var o=t?n(V(e),!0):V(e);return U(o,F,new e.constructor)}(e,o,n);case d:case y:return new r(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 o=t?n(W(e),!0):W(e);return U(o,z,new e.constructor)}(e,o,n);case g:return l=e,Oe?Object(Oe.call(l)):{}}var l}(e,L,Te,t)}}j||(j=new Re);var M=j.get(e);if(M)return M;if(j.set(e,B),!T)var I=n?function(e){return function(e,t,n){var o=t(e);return We(e)?o:function(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}(o,n(e))}(e,qe,Fe)}(e):qe(e);return function(e,t){for(var n=-1,o=e?e.length:0;++n<o&&!1!==t(e[n],n,e););}(I||e,(function(r,i){I&&(r=e[i=r]),Be(B,i,Te(r,t,n,o,i,e,j))})),B}function Le(e){return!(!Ze(e)||(t=e,J&&J in t))&&(Xe(e)||H(e)?ne:j).test(Ve(e));var t}function Ne(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function Me(e,t,n,o){n||(n={});for(var r=-1,i=t.length;++r<i;){var a=t[r],l=o?o(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,o,r=e.__data__;return("string"==(o=typeof(n=t))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.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__=me?me(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(me){var o=t[e];return o===n?void 0:o}return ee.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},De.prototype.clear=function(){this.__data__=[]},De.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)},De.prototype.get=function(e){var t=this.__data__,n=Ae(t,e);return n<0?void 0:t[n][1]},De.prototype.has=function(e){return Ae(this.__data__,e)>-1},De.prototype.set=function(e,t){var n=this.__data__,o=Ae(n,e);return o<0?n.push([e,t]):n[o][1]=t,this},_e.prototype.clear=function(){this.__data__={hash:new Se,map:new(he||De),string:new Se}},_e.prototype.delete=function(e){return Ie(this,e).delete(e)},_e.prototype.get=function(e){return Ie(this,e).get(e)},_e.prototype.has=function(e){return Ie(this,e).has(e)},_e.prototype.set=function(e,t){return Ie(this,e).set(e,t),this},Re.prototype.clear=function(){this.__data__=new De},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 De){var o=n.__data__;if(!he||o.length<199)return o.push([e,t]),this;n=this.__data__=new _e(o)}return n.set(e,t),this};var Fe=de?K(de,Object):function(){return[]},ze=function(e){return te.call(e)};function Ue(e,t){return!!(t=null==t?o: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 Ke(e,t){return e===t||e!=e&&t!=t}(pe&&ze(new pe(new ArrayBuffer(1)))!=b||he&&ze(new he)!=s||ye&&ze(ye.resolve())!=f||ge&&ze(new ge)!=h||ve&&ze(new ve)!=v)&&(ze=function(e){var t=te.call(e),n=t==u?e.constructor:void 0,o=n?Ve(n):void 0;if(o)switch(o){case be:return b;case we:return s;case xe:return f;case ke:return h;case Ee:return v}return t});var We=Array.isArray;function Ye(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}(e.length)&&!Xe(e)}var $e=ue||function(){return!1};function Xe(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:o}=t;if(!n&&!t.at)throw new Error("blockId or path should be provided");let r=null;if(n&&(r=e.children[n],!r))throw new Error(`Block not with blockId: ${n} found`);if(t.at&&(r=N(e,{at:t.at}),!r))throw new Error(`Block in path ${t.at} not found`);if(!r)throw new Error("Block not found");e.children=za(e.children);Object.values(e.children).forEach((e=>{e.meta.order>r.meta.order&&(e.meta.order+=1)}));const i=(a=r,"function"==typeof window.structuredClone?window.structuredClone(a):dl(a));var a;const l=Za(e);i.id=q(),i.meta.order=r.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),o&&e.focusBlock(c,{waitExecution:!0})}function fl(e,t){w.blur(t),w.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=za(e.children);const{at:o=null,focus:r=!1,slate:i=null}=n,a=N(e),l=o,c={id:q(),value:t.value,type:t.type,meta:Object.assign(Object.assign({},t.meta),{order:0})};let s=!1;if(i&&i.selection){const e=D.string(i,i.selection.anchor.path);s=D.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),r&&e.focusBlock(s&&u?u:c.id)}(e,...t),insertBlocks:(...t)=>function(e,t,n={}){e.children=za(e.children);const{at:o,focus:r}=n;let i=o||[0];const a=N(e),l=Nn(e);let c=!1,s=!1;if(l&&l.selection){const t=S.parent(l.selection.anchor.path),n=D.string(l,t).trim(),o=D.isStart(l,l.selection.anchor,t);c=""===n&&o,s=!o||n.length>0,w.blur(l),e.setSelection(null)}s&&(i=[i[0]+1]),Object.values(e.children).forEach((e=>{e.meta.order>=i[0]&&(e.meta.order+=t.length)}));const d=[];if(t.forEach(((t,n)=>{const o={id:t.id,value:t.value,type:t.type,meta:Object.assign(Object.assign({},t.meta),{order:i[0]+n})};d.push(o.meta.order),e.children[o.id]=o;const r=Za(e);e.blockEditorsMap[o.id]=r})),a&&c){const t=a.meta.order;delete e.children[a.id],delete e.blockEditorsMap[a.id],Object.keys(e.children).forEach((n=>{const o=e.children[n];o.meta.order>t&&(o.meta.order-=1)}))}e.children=Ua(e.children),e.applyChanges(),e.emit("change",e.children),r&&e.setBlockSelected(d)}(e,...t),deleteBlock:(...t)=>Ya(e,...t),duplicateBlock:(...t)=>ul(e,...t),toggleBlock:(...t)=>Wa(e,...t),increaseBlockDepth:(...t)=>function(e,t={}){const{at:n=e.selection}=t;if(!n)return;e.children=za(e.children);const o=N(e);o&&(o.meta.depth=o.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=za(e.children);const o=N(e);o&&(o.meta.depth=0===o.meta.depth?0:o.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=za(e.children);const[o]=n,r=e.children[t],i=Object.values(e.children).find((e=>e.meta.order===o)),a=r.meta.order<i.meta.order,l=r.meta.order>i.meta.order;Object.values(e.children).forEach((e=>{a?e.meta.order>r.meta.order&&e.meta.order<=i.meta.order&&e.meta.order--:l&&e.meta.order<r.meta.order&&e.meta.order>=i.meta.order&&e.meta.order++})),r.meta.order=o,r.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)=>Ka(e,...t),splitBlock:(...t)=>function(e,t={}){const{slate:n,focus:o=!0}=t,r=N(e);n&&n.selection&&r&&D.withoutNormalizing(n,(()=>{e.children=za(e.children);const t=S.parent(n.selection.anchor.path);R.splitNodes(n,{at:n.selection,match:e=>_.isElement(e),always:!0,mode:"highest"});const i=t[0]+1,a=n.children.slice()[i];R.removeNodes(n,{at:[i],match:e=>_.isElement(e),mode:"highest"});const l={id:q(),type:r.type,meta:{order:r.meta.order+1,depth:r.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),o&&e.focusBlock(l.id,{slate:c})}))}(e,...t),setSelection:(...t)=>function(e,t,n={}){const{applyChanges:o=!0}=n;e.selection=t,o&&e.applyChanges()}(e,...t),setBlockSelected:(...t)=>function(e,t,n={}){const{only:o=!1,allSelected:r=!1}=n,i=e.selectedBlocks||[];if(null===t)e.selectedBlocks=null;else if(t.length>1)e.selectedBlocks=t;else if(o)e.selectedBlocks=t;else if(r){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 o=null!==(n=t.slate)&&void 0!==n?n:Nn(e);if(!o)return;const{waitExecution:r,waitExecutionMs:i}=t;r?setTimeout((()=>fl(e,o)),i):(fl(e,o),e.applyChanges())}(e,...t),blockEditorsMap:{},blocks:{},formats:{},shortcuts:{},plugins:{},on:(e,t)=>{},off:(e,t)=>{},emit:(e,...t)=>{},once:(e,t)=>{}};return e};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('#yoopta-editor .yoo-editor-pointer-events-none{pointer-events:none}#yoopta-editor .yoo-editor-absolute{position:absolute}#yoopta-editor .yoo-editor-relative{position:relative}#yoopta-editor .-yoo-editor-left-\\[50px\\]{left:-50px}#yoopta-editor .yoo-editor-left-0{left:0}#yoopta-editor .yoo-editor-right-\\[8px\\]{right:8px}#yoopta-editor .yoo-editor-top-0{top:0}#yoopta-editor .yoo-editor-top-\\[2px\\]{top:2px}#yoopta-editor .yoo-editor-top-\\[8px\\]{top:8px}#yoopta-editor .yoo-editor-z-10{z-index:10}#yoopta-editor .yoo-editor-z-\\[100\\]{z-index:100}#yoopta-editor .yoo-editor-z-\\[90\\]{z-index:90}#yoopta-editor .yoo-editor-m-\\[0_1px\\]{margin:0 1px}#yoopta-editor .yoo-editor-mx-\\[4px\\]{margin-left:4px;margin-right:4px}#yoopta-editor .yoo-editor-my-\\[4px\\]{margin-bottom:4px;margin-top:4px}#yoopta-editor .yoo-editor-mb-\\[1px\\]{margin-bottom:1px}#yoopta-editor .yoo-editor-mr-2{margin-right:.5rem}#yoopta-editor .yoo-editor-mt-\\[2px\\]{margin-top:2px}#yoopta-editor .yoo-editor-flex{display:flex}#yoopta-editor .yoo-editor-h-4{height:1rem}#yoopta-editor .yoo-editor-h-\\[1px\\]{height:1px}#yoopta-editor .yoo-editor-h-\\[22px\\]{height:22px}#yoopta-editor .yoo-editor-h-\\[24px\\]{height:24px}#yoopta-editor .yoo-editor-h-full{height:100%}#yoopta-editor .yoo-editor-w-4{width:1rem}#yoopta-editor .yoo-editor-w-\\[18px\\]{width:18px}#yoopta-editor .yoo-editor-w-\\[22px\\]{width:22px}#yoopta-editor .yoo-editor-w-\\[24px\\]{width:24px}#yoopta-editor .yoo-editor-w-auto{width:auto}#yoopta-editor .yoo-editor-w-full{width:100%}#yoopta-editor .yoo-editor-min-w-\\[200px\\]{min-width:200px}#yoopta-editor .yoo-editor-cursor-default{cursor:default}#yoopta-editor .yoo-editor-cursor-pointer{cursor:pointer}#yoopta-editor .yoo-editor-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#yoopta-editor .yoo-editor-flex-col{flex-direction:column}#yoopta-editor .yoo-editor-items-center{align-items:center}#yoopta-editor .yoo-editor-justify-start{justify-content:flex-start}#yoopta-editor .yoo-editor-justify-center{justify-content:center}#yoopta-editor .yoo-editor-justify-between{justify-content:space-between}#yoopta-editor .yoo-editor-overflow-hidden{overflow:hidden}#yoopta-editor .yoo-editor-rounded{border-radius:.25rem}#yoopta-editor .yoo-editor-rounded-\\[2px\\]{border-radius:2px}#yoopta-editor .yoo-editor-rounded-\\[6px\\]{border-radius:6px}#yoopta-editor .yoo-editor-rounded-md{border-radius:.375rem}#yoopta-editor .yoo-editor-rounded-sm{border-radius:.125rem}#yoopta-editor .yoo-editor-border{border-width:1px}#yoopta-editor .yoo-editor-border-solid{border-style:solid}#yoopta-editor .yoo-editor-border-none{border-style:none}#yoopta-editor .yoo-editor-border-\\[\\#e5e7eb\\]{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}#yoopta-editor .yoo-editor-bg-\\[\\#2383e224\\]{background-color:#2383e224}#yoopta-editor .yoo-editor-bg-\\[\\#37352f14\\]{background-color:#37352f14}#yoopta-editor .yoo-editor-bg-\\[\\#FFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}#yoopta-editor .yoo-editor-bg-\\[\\#eee\\]{--tw-bg-opacity:1;background-color:rgb(238 238 238/var(--tw-bg-opacity))}#yoopta-editor .yoo-editor-bg-inherit{background-color:inherit}#yoopta-editor .yoo-editor-bg-transparent{background-color:transparent}#yoopta-editor .yoo-editor-p-0{padding:0}#yoopta-editor .yoo-editor-p-\\[0_4px\\]{padding:0 4px}#yoopta-editor .yoo-editor-px-0{padding-left:0;padding-right:0}#yoopta-editor .yoo-editor-px-2{padding-left:.5rem;padding-right:.5rem}#yoopta-editor .yoo-editor-px-\\[2px\\]{padding-left:2px;padding-right:2px}#yoopta-editor .yoo-editor-py-0{padding-bottom:0;padding-top:0}#yoopta-editor .yoo-editor-py-1{padding-bottom:.25rem;padding-top:.25rem}#yoopta-editor .yoo-editor-py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}#yoopta-editor .yoo-editor-py-\\[6px\\]{padding-bottom:6px;padding-top:6px}#yoopta-editor .yoo-editor-text-sm{font-size:.875rem;line-height:1.25rem}#yoopta-editor .yoo-editor-leading-\\[120\\%\\]{line-height:120%}#yoopta-editor .yoo-editor-text-\\[rgba\\(55\\,53\\,47\\,0\\.35\\)\\]{color:rgba(55,53,47,.35)}#yoopta-editor .yoo-editor-opacity-0{opacity:0}#yoopta-editor .yoo-editor-opacity-100{opacity:1}#yoopta-editor .yoo-editor-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)}#yoopta-editor .yoo-editor-outline-none{outline:2px solid transparent;outline-offset:2px}#yoopta-editor .yoo-editor-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)}#yoopta-editor .yoo-editor-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-editor-duration-150{transition-duration:.15s}#yoopta-editor .yoo-editor-duration-\\[180ms\\]{transition-duration:.18s}#yoopta-editor .yoo-editor-ease-\\[cubic-bezier\\(0\\.4\\,0\\,0\\.2\\,1\\)\\]{transition-timing-function:cubic-bezier(.4,0,.2,1)}#yoopta-editor .yoo-editor-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}#yoopta-editor *,#yoopta-editor :after,#yoopta-editor :before{box-sizing:border-box}#yoopta-editor button{background-color:transparent;border:none;cursor:pointer}#yoopta-editor blockquote,#yoopta-editor dd,#yoopta-editor dl,#yoopta-editor figure,#yoopta-editor h1,#yoopta-editor h2,#yoopta-editor h3,#yoopta-editor h4,#yoopta-editor h5,#yoopta-editor h6,#yoopta-editor hr,#yoopta-editor p,#yoopta-editor pre{margin:0}#yoopta-editor ::-moz-selection{background:#c6ddf8}#yoopta-editor ::selection{background:#c6ddf8}#yoopta-editor #yoopta-editor{height:auto;min-width:400px}#yoopta-editor .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}#yoopta-editor .hover\\:yoo-editor-bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}#yoopta-editor .focus\\:yoo-editor-bg-\\[rgba\\(55\\2c 54\\2c 47\\2c 0\\.08\\)\\]:focus,#yoopta-editor .hover\\:yoo-editor-bg-\\[rgba\\(55\\2c 54\\2c 47\\2c 0\\.08\\)\\]:hover{background-color:rgba(55,54,47,.08)}#yoopta-editor .focus\\:yoo-editor-outline-none:focus{outline:2px solid transparent;outline-offset:2px}#yoopta-editor .focus-visible\\:yoo-editor-outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}#yoopta-editor .active\\:yoo-editor-bg-\\[rgba\\(55\\2c 54\\2c 47\\2c 0\\.08\\)\\]:active{background-color:rgba(55,54,47,.08)}#yoopta-editor .data-\\[disabled\\]\\:yoo-editor-pointer-events-none[data-disabled]{pointer-events:none}#yoopta-editor .data-\\[disabled\\]\\:yoo-editor-opacity-50[data-disabled]{opacity:.5}#yoopta-editor .data-\\[hovered-state\\=\\"true\\"\\]\\:yoo-editor-opacity-100[data-hovered-state=true]{opacity:1}');export{Ai as HOTKEYS,il as UI,L as YooptaPlugin,J as buildBlockData,G as buildBlockElement,pl as createYooptaEditor,qa as createYooptaMark,rl as default,N as findPluginBlockBySelectionPath,al as findPluginBlockByType,Nn as findSlateBySelectionPath,q as generateId,ri as getRootBlockElement,oi as getRootBlockElementType,z as useBlockData,W as useBlockSelected,U as useYooptaBlock,F as useYooptaEditor,H as useYooptaPlugin,K as useYooptaPluginOptions,V as useYooptaReadOnly,li as useYooptaTools};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoopta/editor",
3
- "version": "4.0.0-rc.30",
3
+ "version": "4.0.0-rc.31",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -67,5 +67,5 @@
67
67
  "url": "https://github.com/Darginec05/Yoopta-Editor/issues"
68
68
  },
69
69
  "homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
70
- "gitHead": "47486295e1f53b2033ef0c859d1e4c831832b1e3"
70
+ "gitHead": "9e69d54d6822b1e76f4218510f07be46bf910756"
71
71
  }