@yoopta/editor 4.0.0-rc.12 → 4.0.0-rc.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/YooptaEditor.d.ts +1 -1
- package/dist/YooptaEditor.d.ts.map +1 -1
- package/dist/components/Block/Block.d.ts.map +1 -1
- package/dist/contexts/YooptaContext/ToolsContext.d.ts.map +1 -0
- package/dist/contexts/{UltraYooptaContext/UltraYooptaContext.d.ts → YooptaContext/YooptaContext.d.ts} +1 -1
- package/dist/contexts/YooptaContext/YooptaContext.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/dist/contexts/UltraYooptaContext/ToolsContext.d.ts.map +0 -1
- package/dist/contexts/UltraYooptaContext/UltraYooptaContext.d.ts.map +0 -1
- /package/dist/contexts/{UltraYooptaContext → YooptaContext}/ToolsContext.d.ts +0 -0
package/dist/YooptaEditor.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { YooEditor, YooptaChildrenValue } from './editor/types';
|
|
3
|
-
import { Tools } from './contexts/
|
|
3
|
+
import { Tools } from './contexts/YooptaContext/ToolsContext';
|
|
4
4
|
import { YooptaPlugin } from './plugins';
|
|
5
5
|
import { YooptaMark } from './marks';
|
|
6
6
|
type Props = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YooptaEditor.d.ts","sourceRoot":"","sources":["../src/YooptaEditor.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,SAAS,EAAmB,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAGjF,OAAO,EAAE,KAAK,EAAiB,MAAM,
|
|
1
|
+
{"version":3,"file":"YooptaEditor.d.ts","sourceRoot":"","sources":["../src/YooptaEditor.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,SAAS,EAAmB,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAGjF,OAAO,EAAE,KAAK,EAAiB,MAAM,uCAAuC,CAAC;AAQ7E,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACnF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACxB,CAAC;AAoBF,QAAA,MAAM,YAAY,0HAUf,KAAK,4CA0CP,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../src/components/Block/Block.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,KAAK;;;;
|
|
1
|
+
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../src/components/Block/Block.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,KAAK;;;;6CA8DV,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolsContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/YooptaContext/ToolsContext.tsx"],"names":[],"mappings":";AAEA,MAAM,MAAM,SAAS,CAAC,WAAW,GAAG,GAAG,EAAE,SAAS,GAAG,GAAG,IAAI;IAC1D,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACzC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,UAAU,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;CACpC,CAAC;AAIF,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,aAAa,wBAAyB,KAAK,4CAgCvD,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,gBAOjC,CAAC"}
|
|
@@ -28,4 +28,4 @@ type UseBlockSelectedProps = {
|
|
|
28
28
|
};
|
|
29
29
|
declare const useBlockSelected: ({ blockId, path }: UseBlockSelectedProps) => boolean;
|
|
30
30
|
export { useYooptaEditor, useBlockData, useYooptaPlugin, useYooptaPluginOptions, useYooptaBlock, useBlockSelected, UltraYooptaContextProvider, };
|
|
31
|
-
//# sourceMappingURL=
|
|
31
|
+
//# sourceMappingURL=YooptaContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YooptaContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/YooptaContext/YooptaContext.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,MAAM,MAAM,kCAAkC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAExE,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAmCF,eAAO,MAAM,kBAAkB,8CAAuD,CAAC;AAEvF;;GAEG;AACH,QAAA,MAAM,0BAA0B;;;6CAQ/B,CAAC;AAEF,QAAA,MAAM,eAAe,QAAO,SAQ3B,CAAC;AACF,QAAA,MAAM,YAAY,YAAa,MAAM,6EAAwC,CAAC;AAC9E,QAAA,MAAM,cAAc,cAAe,MAAM,6CAAwC,CAAC;AAClF,QAAA,MAAM,eAAe,SAAU,MAAM,yFAAoC,CAAC;AAC1E,QAAA,MAAM,sBAAsB,sBAAwB,MAAM,4BACvB,CAAC;AAEpC,KAAK,qBAAqB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,eAAe,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACvH,QAAA,MAAM,gBAAgB,sBAAuB,qBAAqB,YAkBjE,CAAC;AAEF,OAAO,EACL,eAAe,EACf,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,0BAA0B,GAC3B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { YooptaPlugin } from './plugins';
|
|
2
|
-
export { useYooptaEditor, useBlockData, useYooptaBlock, useYooptaPlugin, useYooptaPluginOptions, useBlockSelected, } from './contexts/
|
|
2
|
+
export { useYooptaEditor, useBlockData, useYooptaBlock, useYooptaPlugin, useYooptaPluginOptions, useBlockSelected, } from './contexts/YooptaContext/YooptaContext';
|
|
3
3
|
import { YooptaEditor } from './YooptaEditor';
|
|
4
4
|
export { UI } from './UI';
|
|
5
|
-
export { useYooptaTools, Tools } from './contexts/
|
|
5
|
+
export { useYooptaTools, Tools } from './contexts/YooptaContext/ToolsContext';
|
|
6
6
|
export { generateId } from './utils/generateId';
|
|
7
7
|
export { HOTKEYS } from './utils/hotkeys';
|
|
8
8
|
export { getRootBlockElementType, getRootBlockElement } from './utils/blockElements';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,eAAe,EACf,YAAY,EACZ,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,eAAe,EACf,YAAY,EACZ,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,uCAAuC,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9E,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvG,OAAO,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import o,{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 g,createElement as v}from"react";import{randomFillSync as m}from"crypto";import*as b from"react-dom";import{unstable_batchedUpdates as y,createPortal as w}from"react-dom";import{ReactEditor as x,useSelected as k,Slate as E,Editable as C,withReact as S}from"slate-react";import{Path as O,Editor as _,Element as D,Transforms as R,Range as j,Text as B,createEditor as T,Point as A}from"slate";class L{constructor(e){this.plugin=e}get getPlugin(){return this.plugin}extend(e){const{renders:t,options:n}=e,r=Object.assign(Object.assign({},this.plugin.options),n),o=Object.assign({},this.plugin.elements);return t&&Object.keys(t).forEach((e=>{const n=o[e];n&&n.render&&(o[e].render=n=>t[e](n))})),new L({type:this.plugin.type,elements:o,events:this.plugin.events,options:r})}}function N(e,t={}){const n=Object.keys(e.children),{at:r=e.selection}=t,o=n.find((t=>e.children[t].meta.order===(null==r?void 0:r[0])));return o?e.children[o]:null}const M={editor:{getBlock:()=>{},insertBlock:()=>{},updateBlock:()=>{},moveBlock:()=>{},splitBlock:()=>{},deleteBlock:()=>{},toggleBlock:()=>{},focusBlock:()=>{},setSelection:()=>{},applyChanges:()=>{},decreaseBlockDepth:()=>{},increaseBlockDepth:()=>{},setBlockSelected:()=>{},selectedBlocks:[],duplicateBlock:()=>{},getEditorValue:()=>{},blur:()=>{},blocks:{},shortcuts:{},plugins:{},formats:{},selection:null,blockEditorsMap:{},children:{},emit:()=>{},on:()=>{},off:()=>{},once:()=>{}}},P=i(M),I=({children:t,editorState:n})=>{const r=l(M);return r.current={editor:n.editor},e(P.Provider,Object.assign({value:r.current},{children:t}))},z=()=>{const e=a(P);if(!e)throw new Error("useYooptaEditor must be used within a YooptaEditorContext");return e.editor},F=e=>z().children[e],H=e=>z().blocks[e],V=e=>z().plugins[e],U=e=>{var t;return null===(t=V(e))||void 0===t?void 0:t.options},W=({blockId:e,path:t})=>{var n;const r=z();if(!e&&!t)throw new Error("useBlockSelected must receive either blockId or path");let o;return e&&(o=r.children[e]),t&&(o=N(r,{at:t})),(null===(n=r.selection)||void 0===n?void 0:n[0])===(null==o?void 0:o.meta.order)};var X="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},K={};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var l=new o(r,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 r:delete e._events[t]}function l(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),l.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},l.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},l.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},l.prototype.emit=function(e,t,r,o,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,r),!0;case 4:return d.fn.call(d.context,t,r,o),!0;case 5:return d.fn.call(d.context,t,r,o,i),!0;case 6:return d.fn.call(d.context,t,r,o,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,r);break;case 4:d[s].fn.call(d[s].context,t,r,o);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,r,o){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||o&&!l.once||r&&l.context!==r||a(this,i);else{for(var c=0,s=[],d=l.length;c<d;c++)(l[c].fn!==t||o&&!l[c].once||r&&l[c].context!==r)&&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 r,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 K},set exports(e){K=e}});var Y=K;let Z,q,$=(e=21)=>{var t;t=e-=0,!Z||Z.length<t?(Z=Buffer.allocUnsafe(128*t),m(Z),q=0):q+t>Z.length&&(m(Z),q=0),q+=t;let n="";for(let t=q-e;t<q;t++)n+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&Z[t]];return n};const G=()=>{var e;return"undefined"==typeof window?$():"function"!=typeof(null===(e=window.crypto)||void 0===e?void 0:e.randomUUID)?function(){let e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}():$()},J=e=>({id:G(),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)}),Q=e=>({id:(null==e?void 0:e.id)||G(),value:(null==e?void 0:e.value)||[J()],type:(null==e?void 0:e.type)||"Paragraph",meta:Object.assign({order:0,depth:0},null==e?void 0:e.meta)});const ee="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function te(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function ne(e){return"nodeType"in e}function re(e){var t,n;return e?te(e)?e:ne(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function oe(e){const{Document:t}=re(e);return e instanceof t}function ie(e){return!te(e)&&e instanceof re(e).HTMLElement}function ae(e){return e instanceof re(e).SVGElement}function le(e){return e?te(e)?e.document:ne(e)?oe(e)?e:ie(e)||ae(e)?e.ownerDocument:document:document:document}const ce=ee?c:s;function se(e){const t=l(e);return ce((()=>{t.current=e})),u((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function de(e,t){void 0===t&&(t=[e]);const n=l(e);return ce((()=>{n.current!==e&&(n.current=e)}),t),n}function ue(e,t){const n=l();return d((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function fe(e){const t=se(e),n=l(null),r=u((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function pe(e){const t=l();return s((()=>{t.current=e}),[e]),t.current}let he={};function ge(e,t){return d((()=>{if(t)return t;const n=null==he[e]?0:he[e]+1;return he[e]=n,e+"-"+n}),[e,t])}function ve(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const me=ve(1),be=ve(-1);function ye(e){if(!e)return!1;const{KeyboardEvent:t}=re(e.target);return t&&e instanceof t}function we(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=re(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 xe=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[xe.Translate.toString(e),xe.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),ke="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ee(e){return e.matches(ke)?e:e.querySelector(ke)}const Ce={display:"none"};function Se(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:Ce},n)}function Oe(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return o.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":r,"aria-atomic":!0},n)}const _e=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 "},Re={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 je(e){let{announcements:t=Re,container:n,hiddenTextDescribedById:r,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=ge("DndLiveRegion"),[h,g]=f(!1);if(s((()=>{g(!0)}),[]),function(e){const t=a(_e);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:r}=e;t.onDragMove&&l(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;l(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;l(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;l(t.onDragCancel({active:n,over:r}))}})),[l,t])),!h)return null;const v=o.createElement(o.Fragment,null,o.createElement(Se,{id:r,value:i.draggable}),o.createElement(Oe,{id:p,announcement:c}));return n?w(v,n):v}var Be;function Te(){}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"}(Be||(Be={}));const Le=Object.freeze({x:0,y:0});function Ne(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Me(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Pe(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Ie(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function ze(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 He=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Fe(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Ne(Fe(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(Me)};function Ve(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const Ue=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=Ve(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(Pe)};function We(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Le}function Xe(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.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 Ke=Xe(1);const Ye={ignoreTransform:!1};function Ze(e,t){void 0===t&&(t=Ye);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=re(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=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(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,c=e.left-a-(1-o)*parseFloat(n),s=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o: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,r))}const{top:r,left:o,width:i,height:a,bottom:l,right:c}=n;return{top:r,left:o,width:i,height:a,bottom:l,right:c}}function qe(e){return Ze(e,{ignoreTransform:!0})}function $e(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(oe(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!ie(o)||ae(o))return n;if(n.includes(o))return n;const i=re(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=re(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=re(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function Ge(e){const[t]=$e(e,1);return null!=t?t:null}function Je(e){return ee&&e?te(e)?e:ne(e)?oe(e)||e===le(e).scrollingElement?window:ie(e)?e:null:null:null}function Qe(e){return te(e)?e.scrollX:e.scrollLeft}function et(e){return te(e)?e.scrollY:e.scrollTop}function tt(e){return{x:Qe(e),y:et(e)}}var nt;function rt(e){return!(!ee||!e)&&e===document.scrollingElement}function ot(e){const t={x:0,y:0},n=rt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(nt||(nt={}));const it={x:.2,y:.2};function at(e,t,n,r,o){let{top:i,left:a,right:l,bottom:c}=n;void 0===r&&(r=10),void 0===o&&(o=it);const{isTop:s,isBottom:d,isLeft:u,isRight:f}=ot(e),p={x:0,y:0},h={x:0,y:0},g=t.height*o.y,v=t.width*o.x;return!s&&i<=t.top+g?(p.y=nt.Backward,h.y=r*Math.abs((t.top+g-i)/g)):!d&&c>=t.bottom-g&&(p.y=nt.Forward,h.y=r*Math.abs((t.bottom-g-c)/g)),!f&&l>=t.right-v?(p.x=nt.Forward,h.x=r*Math.abs((t.right-v-l)/v)):!u&&a<=t.left+v&&(p.x=nt.Backward,h.x=r*Math.abs((t.left+v-a)/v)),{direction:p,speed:h}}function lt(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:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ct(e){return e.reduce(((e,t)=>me(e,tt(t))),Le)}const st=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Qe(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+et(t)),0)}]];class dt{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=$e(t),r=ct(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of st)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ut{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 r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ft(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var pt,ht;function gt(e){e.preventDefault()}function vt(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"}(pt||(pt={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(ht||(ht={}));const mt={start:[ht.Space,ht.Enter],cancel:[ht.Esc],end:[ht.Space,ht.Enter]},bt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ht.Right:return{...n,x:n.x+25};case ht.Left:return{...n,x:n.x-25};case ht.Down:return{...n,y:n.y+25};case ht.Up:return{...n,y:n.y-25}}};class yt{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 ut(le(t)),this.windowListeners=new ut(re(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(pt.Resize,this.handleCancel),this.windowListeners.add(pt.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(pt.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=Ze),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);Ge(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Le)}handleKeyDown(e){if(ye(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=mt,coordinateGetter:i=bt,scrollBehavior:a="smooth"}=r,{code:l}=e;if(o.end.includes(l))return void this.handleEnd(e);if(o.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:c}=n.current,s=c?{x:c.left,y:c.top}:Le;this.referenceCoordinates||(this.referenceCoordinates=s);const d=i(e,{active:t,context:n.current,currentCoordinates:s});if(d){const t=be(d,s),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:l,isLeft:c,isBottom:s,maxScroll:u,minScroll:f}=ot(n),p=lt(n),h={x:Math.min(o===ht.Right?p.right-p.width/2:p.right,Math.max(o===ht.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(o===ht.Down?p.bottom-p.height/2:p.bottom,Math.max(o===ht.Down?p.top:p.top+p.height/2,d.y))},g=o===ht.Right&&!l||o===ht.Left&&!c,v=o===ht.Down&&!s||o===ht.Up&&!i;if(g&&h.x!==d.x){const e=n.scrollLeft+t.x,i=o===ht.Right&&e<=u.x||o===ht.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===ht.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(v&&h.y!==d.y){const e=n.scrollTop+t.y,i=o===ht.Down&&e<=u.y||o===ht.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===ht.Down?n.scrollTop-u.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,me(be(d,this.referenceCoordinates),r))}}}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 wt(e){return Boolean(e&&"distance"in e)}function xt(e){return Boolean(e&&"delay"in e)}yt.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=mt,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==o||o({event:e.nativeEvent}),!0)}return!1}}];class kt{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=re(e);return e instanceof t?e:le(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:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=le(i),this.documentListeners=new ut(this.document),this.listeners=new ut(n),this.windowListeners=new ut(re(i)),this.initialCoordinates=null!=(r=we(o))?r:Le,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(pt.Resize,this.handleCancel),this.windowListeners.add(pt.DragStart,gt),this.windowListeners.add(pt.VisibilityChange,this.handleCancel),this.windowListeners.add(pt.ContextMenu,gt),this.documentListeners.add(pt.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(xt(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(wt(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(pt.Click,vt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(pt.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const l=null!=(t=we(e))?t:Le,c=be(r,l);if(!n&&a){if(wt(a)){if(null!=a.tolerance&&ft(c,a.tolerance))return this.handleCancel();if(ft(c,a.distance))return this.handleStart()}return xt(a)&&ft(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===ht.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Et={move:{name:"pointermove"},end:{name:"pointerup"}};class Ct extends kt{constructor(e){const{event:t}=e,n=le(t.target);super(e,Et,n)}}Ct.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const St={move:{name:"mousemove"},end:{name:"mouseup"}};var Ot;!function(e){e[e.RightClick=2]="RightClick"}(Ot||(Ot={}));(class extends kt{constructor(e){super(e,St,le(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Ot.RightClick&&(null==r||r({event:n}),!0)}}];const _t={move:{name:"touchmove"},end:{name:"touchend"}};var Dt,Rt;function jt(e){let{acceleration:t,activator:n=Dt.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:c=Rt.TreeOrder,pointerCoordinates:f,scrollableAncestors:p,scrollableAncestorRects:h,delta:g,threshold:v}=e;const m=function(e){let{delta:t,disabled:n}=e;const r=pe(t);return ue((e=>{if(n||!r||!e)return Bt;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[nt.Backward]:e.x[nt.Backward]||-1===o.x,[nt.Forward]:e.x[nt.Forward]||1===o.x},y:{[nt.Backward]:e.y[nt.Backward]||-1===o.y,[nt.Forward]:e.y[nt.Forward]||1===o.y}}}),[n,t,r])}({delta:g,disabled:!i}),[b,y]=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 o}}),[n,o,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)}),[]),S=d((()=>c===Rt.TreeOrder?[...p].reverse():p),[c,p]);s((()=>{if(i&&p.length&&k){for(const e of S){if(!1===(null==r?void 0:r(e)))continue;const n=p.indexOf(e),o=h[n];if(!o)continue;const{direction:i,speed:l}=at(e,o,k,t,v);for(const e of["x","y"])m[e][i[e]]||(l[e]=0,i[e]=0);if(l.x>0||l.y>0)return y(),E.current=e,b(C,a),w.current=l,void(x.current=i)}w.current={x:0,y:0},x.current={x:0,y:0},y()}else y()}),[t,C,r,y,i,a,JSON.stringify(k),JSON.stringify(m),b,p,S,h,JSON.stringify(v)])}(class extends kt{constructor(e){super(e,_t)}static setup(){return window.addEventListener(_t.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(_t.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(null==r||r({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"}(Rt||(Rt={}));const Bt={x:{[nt.Backward]:!1,[nt.Forward]:!1},y:{[nt.Backward]:!1,[nt.Forward]:!1}};var Tt,At;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Tt||(Tt={})),function(e){e.Optimized="optimized"}(At||(At={}));const Lt=new Map;function Nt(e,t){return ue((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Mt(e){let{callback:t,disabled:n}=e;const r=se(t),o=d((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return s((()=>()=>null==o?void 0:o.disconnect()),[o]),o}function Pt(e){return new dt(Ze(e),e)}function It(e,t,n){void 0===t&&(t=Pt);const[r,o]=h((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);if(JSON.stringify(r)===JSON.stringify(i))return r;return i}),null),i=function(e){let{callback:t,disabled:n}=e;const r=se(t),o=d((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return s((()=>()=>null==o?void 0:o.disconnect()),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),a=Mt({callback:o});return ce((()=>{o(),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]),r}const zt=[];function Ft(e,t){void 0===t&&(t=[]);const n=l(null);return s((()=>{n.current=null}),t),s((()=>{const t=e!==Le;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?be(e,n.current):Le}function Ht(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 Vt=[];function Ut(e){let{measure:t}=e;const[n,r]=f(null),o=u((e=>{for(const{target:n}of e)if(ie(n)){r((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t]),i=Mt({callback:o}),a=u((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ie(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)}),[t,i]),[l,c]=fe(a);return d((()=>({nodeRef:l,rect:n,setRef:c})),[n,l,c])}const Wt=[{sensor:Ct,options:{}},{sensor:yt,options:{}}],Xt={current:{}},Kt={draggable:{measure:qe},droppable:{measure:qe,strategy:Tt.WhileDragging,frequency:At.Optimized},dragOverlay:{measure:Ze}};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 Zt={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:Te},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Kt,measureDroppableContainers:Te,windowRect:null,measuringScheduled:!1},qt=i({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Te,draggableNodes:new Map,over:null,measureDroppableContainers:Te}),$t=i(Zt);function Gt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Yt}}}function Jt(e,t){switch(t.type){case Be.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Be.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 Be.DragEnd:case Be.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Be.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Yt(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Be.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Yt(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Be.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Yt(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Qt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=a(qt),i=pe(r),l=pe(null==n?void 0:n.id);return s((()=>{if(!t&&!r&&i&&null!=l){if(!ye(i))return;if(document.activeElement===i.target)return;const e=o.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=Ee(e);if(t){t.focus();break}}}))}}),[r,t,o,l,i]),null}const en=i({...Le,scaleX:1,scaleY:1});var tn;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(tn||(tn={}));const nn=p((function(e){var t,n,r,i;let{id:a,accessibility:c,autoScroll:p=!0,children:g,sensors:v=Wt,collisionDetection:m=Ue,measuring:b,modifiers:w,...x}=e;const k=h(Jt,void 0,Gt),[E,C]=k,[S,O]=function(){const[e]=f((()=>new Set)),t=u((t=>(e.add(t),()=>e.delete(t))),[e]);return[u((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[_,D]=f(tn.Uninitialized),R=_===tn.Initialized,{draggable:{active:j,nodes:B,translate:T},droppable:{containers:A}}=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:Xt,rect:N}:null}),[j,L]),P=l(null),[I,z]=f(null),[F,H]=f(null),V=de(x,Object.values(x)),U=ge("DndDescribedBy",a),W=d((()=>A.getEnabled()),[A]),X=d((()=>({draggable:{...Kt.draggable,...null==K?void 0:K.draggable},droppable:{...Kt.droppable,...null==K?void 0:K.droppable},dragOverlay:{...Kt.dragOverlay,...null==K?void 0:K.dragOverlay}})),[null==(K=b)?void 0:K.draggable,null==K?void 0:K.droppable,null==K?void 0:K.dragOverlay]);var K;const{droppableRects:Y,measureDroppableContainers:Z,measuringScheduled:q}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=f(null),{frequency:c,measure:d,strategy:p}=o,h=l(e),g=function(){switch(p){case Tt.Always:return!1;case Tt.BeforeDragging:return n;default:return!n}}(),v=de(g),m=u((function(e){void 0===e&&(e=[]),v.current||a((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[v]),b=l(null),y=ue((t=>{if(g&&!n)return Lt;if(!t||t===Lt||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,r=e?new dt(d(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,i,n,g,d]);return s((()=>{h.current=e}),[e]),s((()=>{g||m()}),[n,g]),s((()=>{i&&i.length>0&&a(null)}),[JSON.stringify(i)]),s((()=>{g||"number"!=typeof c||null!==b.current||(b.current=setTimeout((()=>{m(),b.current=null}),c))}),[c,g,m,...r]),{droppableRects:y,measureDroppableContainers:m,measuringScheduled:null!=i}}(W,{dragging:R,dependencies:[T.x,T.y],config:X.droppable}),$=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return ue((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(B,j),G=d((()=>F?we(F):null),[F]),J=function(){const e=!1===(null==I?void 0:I.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}}(),Q=function(e,t){return Nt(e,t)}($,X.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=l(!1),{x:a,y:c}="boolean"==typeof o?{x:o,y:o}:o;ce((()=>{if(!a&&!c||!t)return void(i.current=!1);if(i.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=We(n(e),r);if(a||(o.x=0),c||(o.y=0),i.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=Ge(e);t&&t.scrollBy({top:o.y,left:o.x})}}),[t,a,c,r,n])}({activeNode:j?B.get(j):null,config:J.layoutShiftCompensation,initialRect:Q,measure:X.draggable.measure});const te=It($,X.draggable.measure,Q),ne=It($?$.parentElement:null),oe=l({activatorEvent:null,active:null,activeNode:$,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:B,draggingNode:null,draggingNodeRect:null,droppableContainers:A,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=A.getNodeFor(null==(t=oe.current.over)?void 0:t.id),ae=Ut({measure:X.dragOverlay.measure}),le=null!=(n=ae.nodeRef.current)?n:$,se=R?null!=(r=ae.rect)?r:te:null,fe=Boolean(ae.nodeRef.current&&ae.rect),pe=We(he=fe?null:te,Nt(he));var he;const ve=Ht(le?re(le):null),be=function(e){const t=l(e),n=ue((n=>e?n&&n!==zt&&e&&t.current&&e.parentNode===t.current.parentNode?n:$e(e):zt),[e]);return s((()=>{t.current=e}),[e]),n}(R?null!=ie?ie:$:null),ye=function(e,t){void 0===t&&(t=Ze);const[n]=e,r=Ht(n?re(n):null),[o,i]=h((function(){return e.length?e.map((e=>rt(e)?r:new dt(t(e),e))):Vt}),Vt),a=Mt({callback:i});return e.length>0&&o===Vt&&i(),ce((()=>{e.length?e.forEach((e=>null==a?void 0:a.observe(e))):(null==a||a.disconnect(),i())}),[e]),o}(be),xe=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}(w,{transform:{x:T.x-pe.x,y:T.y-pe.y,scaleX:1,scaleY:1},activatorEvent:F,active:M,activeNodeRect:te,containerNodeRect:ne,draggingNodeRect:se,over:oe.current.over,overlayNodeRect:ae.rect,scrollableAncestors:be,scrollableAncestorRects:ye,windowRect:ve}),ke=G?me(G,T):null,Ee=function(e){const[t,n]=f(null),r=l(e),o=u((e=>{const t=Je(e.target);t&&n((e=>e?(e.set(t,tt(t)),new Map(e)):null))}),[]);return s((()=>{const t=r.current;if(e!==t){i(t);const a=e.map((e=>{const t=Je(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,tt(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(t)};function i(e){e.forEach((e=>{const t=Je(e);null==t||t.removeEventListener("scroll",o)}))}}),[o,e]),d((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>me(e,t)),Le):ct(e):Le),[e,t])}(be),Ce=Ft(Ee),Se=Ft(Ee,[te]),Oe=me(xe,Ce),De=se?Ke(se,xe):null,Re=M&&De?m({active:M,collisionRect:De,droppableRects:Y,droppableContainers:W,pointerCoordinates:ke}):null,Te=ze(Re,"id"),[Ae,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:me(xe,Se),null!=(i=null==Ae?void 0:Ae.rect)?i:null,te),Pe=u(((e,t)=>{let{sensor:n,options:r}=t;if(null==P.current)return;const o=B.get(P.current);if(!o)return;const i=e.nativeEvent,a=new n({active:P.current,activeNode:o,event:i,options:r,context:oe,onStart(e){const t=P.current;if(null==t)return;const n=B.get(t);if(!n)return;const{onDragStart:r}=V.current,o={active:{id:t,data:n.data,rect:N}};y((()=>{null==r||r(o),D(tn.Initializing),C({type:Be.DragStart,initialCoordinates:e,active:t}),S({type:"onDragStart",event:o})}))},onMove(e){C({type:Be.DragMove,coordinates:e})},onEnd:l(Be.DragEnd),onCancel:l(Be.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=oe.current;let a=null;if(t&&o){const{cancelDrop:l}=V.current;if(a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===Be.DragEnd&&"function"==typeof l){await Promise.resolve(l(a))&&(e=Be.DragCancel)}}P.current=null,y((()=>{C({type:e}),D(tn.Uninitialized),Ne(null),z(null),H(null);const t=e===Be.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=V.current[t];null==e||e(a),S({type:t,event:a})}}))}}y((()=>{z(a),H(e.nativeEvent)}))}),[B]),Ie=u(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=B.get(r);if(null!==P.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},P.current=r,Pe(n,t))}),[B,Pe]),Fe=function(e,t){return d((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(v,Ie);!function(e){s((()=>{if(!ee)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})))}(v),ce((()=>{te&&_===tn.Initializing&&D(tn.Initialized)}),[te,_]),s((()=>{const{onDragMove:e}=V.current,{active:t,activatorEvent:n,collisions:r,over:o}=oe.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:Oe.x,y:Oe.y},over:o};y((()=>{null==e||e(i),S({type:"onDragMove",event:i})}))}),[Oe.x,Oe.y]),s((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=oe.current;if(!e||null==P.current||!t||!o)return;const{onDragOver:i}=V.current,a=r.get(Te),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:o.x,y:o.y},over:l};y((()=>{Ne(l),null==i||i(c),S({type:"onDragOver",event:c})}))}),[Te]),ce((()=>{oe.current={activatorEvent:F,active:M,activeNode:$,collisionRect:De,collisions:Re,droppableRects:Y,draggableNodes:B,draggingNode:le,draggingNodeRect:se,droppableContainers:A,over:Ae,scrollableAncestors:be,scrollAdjustedTranslate:Oe},N.current={initial:se,translated:De}}),[M,$,Re,De,B,le,se,Y,A,Ae,be,Oe]),jt({...J,delta:T,draggingRect:De,pointerCoordinates:ke,scrollableAncestors:be,scrollableAncestorRects:ye});const He=d((()=>({active:M,activeNode:$,activeNodeRect:te,activatorEvent:F,collisions:Re,containerNodeRect:ne,dragOverlay:ae,draggableNodes:B,droppableContainers:A,droppableRects:Y,over:Ae,measureDroppableContainers:Z,scrollableAncestors:be,scrollableAncestorRects:ye,measuringConfiguration:X,measuringScheduled:q,windowRect:ve})),[M,$,te,F,Re,ne,ae,B,A,Y,Ae,Z,be,ye,X,q,ve]),Ve=d((()=>({activatorEvent:F,activators:Fe,active:M,activeNodeRect:te,ariaDescribedById:{draggable:U},dispatch:C,draggableNodes:B,over:Ae,measureDroppableContainers:Z})),[F,Fe,M,te,C,U,B,Ae,Z]);return o.createElement(_e.Provider,{value:O},o.createElement(qt.Provider,{value:Ve},o.createElement($t.Provider,{value:He},o.createElement(en.Provider,{value:Me},g)),o.createElement(Qt,{disabled:!1===(null==c?void 0:c.restoreFocus)})),o.createElement(je,{...c,hiddenTextDescribedById:U}))})),rn=i(null),on="button",an="Droppable";function ln(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=ge(an),{activators:l,activatorEvent:c,active:s,activeNodeRect:u,ariaDescribedById:f,draggableNodes:p,over:h}=a(qt),{role:g=on,roleDescription:v="draggable",tabIndex:m=0}=null!=o?o:{},b=(null==s?void 0:s.id)===t,y=a(b?en:rn),[w,x]=fe(),[k,E]=fe(),C=function(e,t){return d((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(l,t),S=de(n);ce((()=>(p.set(t,{id:t,key:i,node:w,activatorNode:k,data:S}),()=>{const e=p.get(t);e&&e.key===i&&p.delete(t)})),[p,t]);return{active:s,activatorEvent:c,activeNodeRect:u,attributes:d((()=>({role:g,tabIndex:m,"aria-disabled":r,"aria-pressed":!(!b||g!==on)||void 0,"aria-roledescription":v,"aria-describedby":f.draggable})),[r,g,m,b,v,f.draggable]),isDragging:b,listeners:r?void 0:C,node:w,over:h,setNodeRef:x,setActivatorNodeRef:E,transform:y}}const cn="Droppable",sn={timeout:25};function dn(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function un(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function fn(e){return null!==e&&e>=0}const pn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=dn(t,r,n),a=t[o],l=i[o];return l&&a?{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}:null},hn={scaleX:1,scaleY:1},gn=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:a}=e;const l=null!=(t=i[n])?t:r;if(!l)return null;if(o===n){const e=i[a];return e?{x:0,y:n<a?e.top+e.height-(l.top+l.height):e.top-l.top,...hn}:null}const c=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];if(!r)return 0;if(n<t)return o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0;return i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0}(i,o,n);return o>n&&o<=a?{x:0,y:-l.height-c,...hn}:o<n&&o>=a?{x:0,y:l.height+c,...hn}:{x:0,y:0,...hn}};const vn="Sortable",mn=o.createContext({activeIndex:-1,containerId:vn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:pn,disabled:{draggable:!1,droppable:!1}});function bn(e){let{children:t,id:n,items:r,strategy:i=pn,disabled:c=!1}=e;const{active:u,dragOverlay:f,droppableRects:p,over:h,measureDroppableContainers:g}=a($t),v=ge(vn,n),m=Boolean(null!==f.rect),b=d((()=>r.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[r]),y=null!=u,w=u?b.indexOf(u.id):-1,x=h?b.indexOf(h.id):-1,k=l(b),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}(b,k.current),C=-1!==x&&-1===w||E,S=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(c);ce((()=>{E&&y&&g(b)}),[E,b,y,g]),s((()=>{k.current=b}),[b]);const O=d((()=>({activeIndex:w,containerId:v,disabled:S,disableTransforms:C,items:b,overIndex:x,useDragOverlay:m,sortedRects:un(b,p),strategy:i})),[w,v,S.draggable,S.droppable,C,b,x,p,m,i]);return o.createElement(mn.Provider,{value:O},t)}const yn=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return dn(n,r,o).indexOf(t)},wn=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:l,previousContainerId:c,transition:s}=e;return!(!s||!r)&&((l===i||o!==a)&&(!!n||a!==o&&t===c))},xn={duration:200,easing:"ease"},kn="transform",En=xe.Transition.toString({property:kn,duration:0,easing:"linear"}),Cn={roleDescription:"sortable"};function Sn(e){let{animateLayoutChanges:t=wn,attributes:n,disabled:r,data:o,getNewIndex:i=yn,id:c,strategy:p,resizeObserverConfig:h,transition:g=xn}=e;const{items:v,containerId:m,activeIndex:b,disabled:y,disableTransforms:w,sortedRects:x,overIndex:k,useDragOverlay:E,strategy:C}=a(mn),S=function(e,t){var n,r;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,y),O=v.indexOf(c),_=d((()=>({sortable:{containerId:m,index:O,items:v},...o})),[m,o,O,v]),D=d((()=>v.slice(v.indexOf(c))),[v,c]),{rect:R,node:j,isOver:B,setNodeRef:T}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=ge(cn),{active:c,dispatch:d,over:f,measureDroppableContainers:p}=a(qt),h=l({disabled:n}),g=l(!1),v=l(null),m=l(null),{disabled:b,updateMeasurementsFor:y,timeout:w}={...sn,...o},x=de(null!=y?y:r),k=Mt({callback:u((()=>{g.current?(null!=m.current&&clearTimeout(m.current),m.current=setTimeout((()=>{p(Array.isArray(x.current)?x.current:[x.current]),m.current=null}),w)):g.current=!0}),[w]),disabled:b||!c}),E=u(((e,t)=>{k&&(t&&(k.unobserve(t),g.current=!1),e&&k.observe(e))}),[k]),[C,S]=fe(E),O=de(t);return s((()=>{k&&C.current&&(k.disconnect(),g.current=!1,k.observe(C.current))}),[C,k]),ce((()=>(d({type:Be.RegisterDroppable,element:{id:r,key:i,disabled:n,node:C,rect:v,data:O}}),()=>d({type:Be.UnregisterDroppable,key:i,id:r}))),[r]),s((()=>{n!==h.current.disabled&&(d({type:Be.SetDroppableDisabled,id:r,key:i,disabled:n}),h.current.disabled=n)}),[r,i,n,d]),{active:c,rect:v,isOver:(null==f?void 0:f.id)===r,node:C,over:f,setNodeRef:S}}({id:c,data:_,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...h}}),{active:A,activatorEvent:L,activeNodeRect:N,attributes:M,setNodeRef:P,listeners:I,isDragging:z,over:F,setActivatorNodeRef:H,transform:V}=ln({id:c,data:_,attributes:{...Cn,...n},disabled:S.draggable}),U=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)}(T,P),W=Boolean(A),X=W&&!w&&fn(b)&&fn(k),K=!E&&z,Y=K&&X?V:null,Z=X?null!=Y?Y:(null!=p?p:C)({rects:x,activeNodeRect:N,activeIndex:b,overIndex:k,index:O}):null,q=fn(b)&&fn(k)?i({id:c,items:v,activeIndex:b,overIndex:k}):O,$=null==A?void 0:A.id,G=l({activeId:$,items:v,newIndex:q,containerId:m}),J=v!==G.current.items,Q=t({active:A,containerId:m,isDragging:z,isSorting:W,id:c,index:O,items:v,newIndex:G.current.newIndex,previousItems:G.current.items,previousContainerId:G.current.containerId,transition:g,wasDragging:null!=G.current.activeId}),ee=function(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,a]=f(null),c=l(n);return ce((()=>{if(!t&&n!==c.current&&r.current){const e=o.current;if(e){const t=Ze(r.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,r,o]),s((()=>{i&&a(null)}),[i]),i}({disabled:!Q,index:O,node:j,rect:R});return s((()=>{W&&G.current.newIndex!==q&&(G.current.newIndex=q),m!==G.current.containerId&&(G.current.containerId=m),v!==G.current.items&&(G.current.items=v)}),[W,q,m,v]),s((()=>{if($===G.current.activeId)return;if($&&!G.current.activeId)return void(G.current.activeId=$);const e=setTimeout((()=>{G.current.activeId=$}),50);return()=>clearTimeout(e)}),[$]),{active:A,activeIndex:b,attributes:M,data:_,rect:R,index:O,newIndex:q,items:v,isOver:B,isSorting:W,isDragging:z,listeners:I,node:j,overIndex:k,over:F,setNodeRef:U,setActivatorNodeRef:H,setDroppableNodeRef:T,setDraggableNodeRef:P,transform:null!=ee?ee:Z,transition:function(){if(ee||J&&G.current.newIndex===O)return En;if(K&&!ye(L)||!g)return;if(W||Q)return xe.Transition.toString({...g,property:kn});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 _n=[ht.Down,ht.Right,ht.Up,ht.Left],Dn=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:i,over:a,scrollableAncestors:l}}=t;if(_n.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];i.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const i=o.get(n.id);if(i)switch(e.code){case ht.Down:r.top<i.top&&t.push(n);break;case ht.Up:r.top>i.top&&t.push(n);break;case ht.Left:r.left>i.left&&t.push(n);break;case ht.Right:r.left<i.left&&t.push(n)}}));const c=(e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Ie(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Ie(r),a=o.reduce(((e,t,r)=>e+Ne(n[r],t)),0),l=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:l}})}}return i.sort(Me)})({active:n,collisionRect:r,droppableRects:o,droppableContainers:t,pointerCoordinates:null});let s=ze(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?o.get(t.id):null,c=null==t?void 0:t.node.current;if(c&&a&&e&&t){const n=$e(c).some(((e,t)=>l[t]!==e)),o=Rn(e,t),i=function(e,t){if(!On(e)||!On(t))return!1;if(!Rn(e,t))return!1;return e.data.current.sortable.index<t.data.current.sortable.index}(e,t),s=n||!o?{x:0,y:0}:{x:i?r.width-a.width:0,y:i?r.height-a.height:0},d={x:a.left,y:a.top};return s.x&&s.y?d:be(d,s)}}}};function Rn(e,t){return!(!On(e)||!On(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}var jn;function Bn(){return Bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bn.apply(this,arguments)}var Tn,An=function(e){return r.createElement("svg",Bn({viewBox:"0 0 10 10",fill:"currentColor",style:{width:14,height:14,display:"block",flexShrink:0,backfaceVisibility:"hidden"}},e),jn||(jn=r.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 Ln(){return Ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ln.apply(this,arguments)}var Nn=function(e){return r.createElement("svg",Ln({viewBox:"0 0 16 16",fill:"currentColor",style:{width:16,height:16,display:"block",flexShrink:0,backfaceVisibility:"hidden"}},e),Tn||(Tn=r.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 Mn(e,t={}){const n=Object.keys(e.children),{at:r=e.selection}=t,o=n.find((t=>e.children[t].meta.order===(null==r?void 0:r[0])));if(o)return e.blockEditorsMap[o]}function Pn(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 zn(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 Hn(e){return e instanceof Element||e instanceof In(e).Element}function Vn(e){return e instanceof HTMLElement||e instanceof In(e).HTMLElement}function Un(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof In(e).ShadowRoot)}function Wn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Xn(e){return["table","td","th"].includes(Pn(e))}function Kn(e){const t=Yn(),n=qn(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 Zn(e){return["html","body","#document"].includes(Pn(e))}function qn(e){return In(e).getComputedStyle(e)}function $n(e){return Hn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Gn(e){if("html"===Pn(e))return e;const t=e.assignedSlot||e.parentNode||Un(e)&&e.host||zn(e);return Un(t)?t.host:t}function Jn(e){const t=Gn(e);return Zn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vn(t)&&Wn(t)?t:Jn(t)}function Qn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Jn(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=In(o);return i?t.concat(a,a.visualViewport||[],Wn(o)?o:[],a.frameElement&&n?Qn(a.frameElement):[]):t.concat(o,Qn(o,[],n))}const er=Math.min,tr=Math.max,nr=Math.round,rr=Math.floor,or=e=>({x:e,y:e}),ir={left:"right",right:"left",bottom:"top",top:"bottom"},ar={start:"end",end:"start"};function lr(e,t,n){return tr(e,er(t,n))}function cr(e,t){return"function"==typeof e?e(t):e}function sr(e){return e.split("-")[0]}function dr(e){return e.split("-")[1]}function ur(e){return"x"===e?"y":"x"}function fr(e){return"y"===e?"height":"width"}function pr(e){return["top","bottom"].includes(sr(e))?"y":"x"}function hr(e){return ur(pr(e))}function gr(e){return e.replace(/start|end/g,(e=>ar[e]))}function vr(e){return e.replace(/left|right|bottom|top/g,(e=>ir[e]))}function mr(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 br(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function yr(e,t,n){let{reference:r,floating:o}=e;const i=pr(t),a=hr(t),l=fr(a),c=sr(t),s="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(dr(t)){case"start":p[a]-=f*(n&&s?-1:1);break;case"end":p[a]+=f*(n&&s?-1:1)}return p}async function wr(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=cr(t,e),h=mr(p),g=l[f?"floating"===u?"reference":"floating":u],v=br(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:d,strategy:c})),m="floating"===u?{...a.floating,x:r,y:o}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=br(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:b,strategy:c}):m);return{top:(v.top-w.top+h.top)/y.y,bottom:(w.bottom-v.bottom+h.bottom)/y.y,left:(v.left-w.left+h.left)/y.x,right:(w.right-v.right+h.right)/y.x}}function xr(e){const t=er(...e.map((e=>e.left))),n=er(...e.map((e=>e.top)));return{x:t,y:n,width:tr(...e.map((e=>e.right)))-t,height:tr(...e.map((e=>e.bottom)))-n}}const kr=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=sr(n),l=dr(n),c="y"===pr(n),s=["left","top"].includes(a)?-1:1,d=i&&c?-1:1,u=cr(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!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}};function Er(e){const t=qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Vn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=nr(n)!==i||nr(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Cr(e){return Hn(e)?e:e.contextElement}function Sr(e){const t=Cr(e);if(!Vn(t))return or(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Er(t);let a=(i?nr(n.width):n.width)/r,l=(i?nr(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const Or=or(0);function _r(e){const t=In(e);return Yn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Or}function Dr(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Cr(e);let a=or(1);t&&(r?Hn(r)&&(a=Sr(r)):a=Sr(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==In(e))&&t}(i,n,r)?_r(i):or(0);let c=(o.left+l.x)/a.x,s=(o.top+l.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i){const e=In(i),t=r&&Hn(r)?In(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=Sr(o),t=o.getBoundingClientRect(),r=qn(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,d*=e.x,u*=e.y,c+=i,s+=a,n=In(o),o=n.frameElement}}return br({width:d,height:u,x:c,y:s})}const Rr=[":popover-open",":modal"];function jr(e){return Rr.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Br(e){return Dr(zn(e)).left+$n(e).scrollLeft}function Tr(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=In(e),r=zn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,c=0;if(o){i=o.width,a=o.height;const e=Yn();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:l,y:c}}(e,n);else if("document"===t)r=function(e){const t=zn(e),n=$n(e),r=e.ownerDocument.body,o=tr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=tr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Br(e);const l=-n.scrollTop;return"rtl"===qn(r).direction&&(a+=tr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(zn(e));else if(Hn(t))r=function(e,t){const n=Dr(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Vn(e)?Sr(e):or(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=_r(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return br(r)}function Ar(e,t){const n=Gn(e);return!(n===t||!Hn(n)||Zn(n))&&("fixed"===qn(n).position||Ar(n,t))}function Lr(e,t,n){const r=Vn(t),o=zn(t),i="fixed"===n,a=Dr(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=or(0);if(r||!r&&!i)if(("body"!==Pn(t)||Wn(o))&&(l=$n(t)),r){const e=Dr(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&(c.x=Br(o));return{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function Nr(e,t){return Vn(e)&&"fixed"!==qn(e).position?t?t(e):e.offsetParent:null}function Mr(e,t){const n=In(e);if(!Vn(e)||jr(e))return n;let r=Nr(e,t);for(;r&&Xn(r)&&"static"===qn(r).position;)r=Nr(r,t);return r&&("html"===Pn(r)||"body"===Pn(r)&&"static"===qn(r).position&&!Kn(r))?n:r||function(e){let t=Gn(e);for(;Vn(t)&&!Zn(t);){if(Kn(t))return t;t=Gn(t)}return null}(e)||n}const Pr={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=zn(r),l=!!t&&jr(t.floating);if(r===a||l&&i)return n;let c={scrollLeft:0,scrollTop:0},s=or(1);const d=or(0),u=Vn(r);if((u||!u&&!i)&&(("body"!==Pn(r)||Wn(a))&&(c=$n(r)),Vn(r))){const e=Dr(r);s=Sr(r),d.x=e.x+r.clientLeft,d.y=e.y+r.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:zn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=Qn(e,[],!1).filter((e=>Hn(e)&&"body"!==Pn(e))),o=null;const i="fixed"===qn(e).position;let a=i?Gn(e):e;for(;Hn(a)&&!Zn(a);){const t=qn(a),n=Kn(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Wn(a)&&!n&&Ar(e,a))?r=r.filter((e=>e!==a)):o=t,a=Gn(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],l=i.reduce(((e,n)=>{const r=Tr(t,n,o);return e.top=tr(r.top,e.top),e.right=er(r.right,e.right),e.bottom=er(r.bottom,e.bottom),e.left=tr(r.left,e.left),e}),Tr(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Mr,getElementRects:async function(e){const t=this.getOffsetParent||Mr,n=this.getDimensions;return{reference:Lr(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}=Er(e);return{width:t,height:n}},getScale:Sr,isElement:Hn,isRTL:function(e){return"rtl"===qn(e).direction}};function Ir(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,s=Cr(e),d=o||i?[...s?Qn(s):[],...Qn(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const u=s&&l?function(e,t){let n,r=null;const o=zn(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=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:-rr(d)+"px "+-rr(o.clientWidth-(s+u))+"px "+-rr(o.clientHeight-(d+f))+"px "+-rr(s)+"px",threshold:tr(0,er(1,c))||1};let h=!0;function g(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{r=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),i}(s,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.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 g=c?Dr(e):null;return c&&function t(){const r=Dr(e);!g||r.x===g.x&&r.y===g.y&&r.width===g.width&&r.height===g.height||n();g=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=h)||e.disconnect(),h=null,c&&cancelAnimationFrame(f)}}const zr=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=cr(e,t),s={x:n,y:r},d=await wr(t,c),u=pr(sr(o)),f=ur(u);let p=s[f],h=s[u];if(i){const e="y"===f?"bottom":"right";p=lr(p+d["y"===f?"top":"left"],p,p-d[e])}if(a){const e="y"===u?"bottom":"right";h=lr(h+d["y"===u?"top":"left"],h,h-d[e])}const g=l.fn({...t,[f]:p,[u]:h});return{...g,data:{x:g.x-n,y:g.y-r}}}}},Fr=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,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:g=!0,...v}=cr(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const m=sr(o),b=sr(l)===l,y=await(null==c.isRTL?void 0:c.isRTL(s.floating)),w=f||(b||!g?[vr(l)]:function(e){const t=vr(e);return[gr(e),t,gr(t)]}(l));f||"none"===h||w.push(...function(e,t,n,r){const o=dr(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(sr(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(gr)))),i}(l,g,h,y));const x=[l,...w],k=await wr(t,v),E=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&E.push(k[m]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=dr(e),o=hr(e),i=fr(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=vr(a)),[a,vr(a)]}(o,a,y);E.push(k[e[0]],k[e[1]])}if(C=[...C,{placement:o,overflows:E}],!E.every((e=>e<=0))){var S,O;const e=((null==(S=i.flip)?void 0:S.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(O=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:O.placement;if(!n)switch(p){case"bestFit":{var _;const e=null==(_=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:_[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Hr=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:i,strategy:a}=t,{padding:l=2,x:c,y:s}=cr(e,t),d=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(r.reference))||[]),u=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let r=null;for(let e=0;e<t.length;e++){const o=t[e];!r||o.y-r.y>r.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map((e=>br(xr(e))))}(d),f=br(xr(d)),p=mr(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"===pr(n)){const e=u[0],t=u[u.length-1],r="top"===sr(n),o=e.top,i=t.bottom,a=r?e.left:t.left,l=r?e.right:t.right;return{top:o,bottom:i,left:a,right:l,width:l-a,height:i-o,x:a,y:o}}const e="left"===sr(n),t=tr(...u.map((e=>e.right))),r=er(...u.map((e=>e.left))),o=u.filter((n=>e?n.left===r:n.right===t)),i=o[0].top,a=o[o.length-1].bottom;return{top:i,bottom:a,left:r,right:t,width:t-r,height:a-i,x:r,y:i}}return f}},floating:r.floating,strategy:a});return o.reference.x!==h.reference.x||o.reference.y!==h.reference.y||o.reference.width!==h.reference.width||o.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Vr=(e,t,n)=>{const r=new Map,o={platform:Pr,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="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:o}),{x:d,y:u}=yr(s,r,c),f=r,p={},h=0;for(let n=0;n<l.length;n++){const{name:i,fn:g}=l[n],{x:v,y:m,data:b,reset:y}=await g({x:d,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});d=null!=v?v:d,u=null!=m?m:u,p={...p,[i]:{...p[i],...b}},y&&h<=50&&(h++,"object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(s=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:d,y:u}=yr(s,f,c))),n=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Ur="undefined"!=typeof document?c:s;function Wr(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,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Wr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Wr(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Xr(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kr(e,t){const n=Xr(e);return Math.round(t*n)/n}function Yr(e){const t=r.useRef(e);return Ur((()=>{t.current=e})),t}
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import o,{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 g,createElement as v}from"react";import{randomFillSync as m}from"crypto";import*as b from"react-dom";import{unstable_batchedUpdates as y,createPortal as w}from"react-dom";import{ReactEditor as x,useSelected as k,Slate as E,Editable as C,withReact as S}from"slate-react";import{Path as O,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,r=Object.assign(Object.assign({},this.plugin.options),n),o=Object.assign({},this.plugin.elements);return t&&Object.keys(t).forEach((e=>{const n=o[e];n&&n.render&&(o[e].render=n=>t[e](n))})),new L({type:this.plugin.type,elements:o,events:this.plugin.events,options:r})}}function M(e,t={}){const n=Object.keys(e.children),{at:r=e.selection}=t,o=n.find((t=>e.children[t].meta.order===(null==r?void 0:r[0])));return o?e.children[o]:null}const N={editor:{getBlock:()=>{},insertBlock:()=>{},updateBlock:()=>{},moveBlock:()=>{},splitBlock:()=>{},deleteBlock:()=>{},toggleBlock:()=>{},focusBlock:()=>{},setSelection:()=>{},applyChanges:()=>{},decreaseBlockDepth:()=>{},increaseBlockDepth:()=>{},setBlockSelected:()=>{},selectedBlocks:[],duplicateBlock:()=>{},getEditorValue:()=>{},blur:()=>{},blocks:{},shortcuts:{},plugins:{},formats:{},selection:null,blockEditorsMap:{},children:{},emit:()=>{},on:()=>{},off:()=>{},once:()=>{}}},I=i(N),P=({children:t,editorState:n})=>{const r=l(N);return r.current={editor:n.editor},e(I.Provider,Object.assign({value:r.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=e=>{var t;return null===(t=H(e))||void 0===t?void 0:t.options},W=({blockId:e,path:t})=>{var n;const r=z();if(!e&&!t)throw new Error("useBlockSelected must receive either blockId or path");let o;return e&&(o=r.children[e]),t&&(o=M(r,{at:t})),(null===(n=r.selection)||void 0===n?void 0:n[0])===(null==o?void 0:o.meta.order)};var K="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Y={};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var l=new o(r,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 r:delete e._events[t]}function l(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),l.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},l.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},l.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},l.prototype.emit=function(e,t,r,o,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,r),!0;case 4:return d.fn.call(d.context,t,r,o),!0;case 5:return d.fn.call(d.context,t,r,o,i),!0;case 6:return d.fn.call(d.context,t,r,o,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,r);break;case 4:d[s].fn.call(d[s].context,t,r,o);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,r,o){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||o&&!l.once||r&&l.context!==r||a(this,i);else{for(var c=0,s=[],d=l.length;c<d;c++)(l[c].fn!==t||o&&!l[c].once||r&&l[c].context!==r)&&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 r,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 Y},set exports(e){Y=e}});var X=Y;let $,Z,q=(e=21)=>{var t;t=e-=0,!$||$.length<t?($=Buffer.allocUnsafe(128*t),m($),Z=0):Z+t>$.length&&(m($),Z=0),Z+=t;let n="";for(let t=Z-e;t<Z;t++)n+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&$[t]];return n};const G=()=>{var e;return"undefined"==typeof window?q():"function"!=typeof(null===(e=window.crypto)||void 0===e?void 0:e.randomUUID)?function(){let e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}():q()},J=e=>({id:G(),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)}),Q=e=>({id:(null==e?void 0:e.id)||G(),value:(null==e?void 0:e.value)||[J()],type:(null==e?void 0:e.type)||"Paragraph",meta:Object.assign({order:0,depth:0},null==e?void 0:e.meta)});const ee="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function te(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function ne(e){return"nodeType"in e}function re(e){var t,n;return e?te(e)?e:ne(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function oe(e){const{Document:t}=re(e);return e instanceof t}function ie(e){return!te(e)&&e instanceof re(e).HTMLElement}function ae(e){return e instanceof re(e).SVGElement}function le(e){return e?te(e)?e.document:ne(e)?oe(e)?e:ie(e)||ae(e)?e.ownerDocument:document:document:document}const ce=ee?c:s;function se(e){const t=l(e);return ce((()=>{t.current=e})),u((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function de(e,t){void 0===t&&(t=[e]);const n=l(e);return ce((()=>{n.current!==e&&(n.current=e)}),t),n}function ue(e,t){const n=l();return d((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function fe(e){const t=se(e),n=l(null),r=u((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,r]}function pe(e){const t=l();return s((()=>{t.current=e}),[e]),t.current}let he={};function ge(e,t){return d((()=>{if(t)return t;const n=null==he[e]?0:he[e]+1;return he[e]=n,e+"-"+n}),[e,t])}function ve(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const me=ve(1),be=ve(-1);function ye(e){if(!e)return!1;const{KeyboardEvent:t}=re(e.target);return t&&e instanceof t}function we(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=re(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 xe=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[xe.Translate.toString(e),xe.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),ke="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ee(e){return e.matches(ke)?e:e.querySelector(ke)}const Ce={display:"none"};function Se(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:Ce},n)}function Oe(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return o.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":r,"aria-atomic":!0},n)}const De=i(null);const _e={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 "},Re={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 je(e){let{announcements:t=Re,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=_e}=e;const{announce:l,announcement:c}=function(){const[e,t]=f("");return{announce:u((e=>{null!=e&&t(e)}),[]),announcement:e}}(),p=ge("DndLiveRegion"),[h,g]=f(!1);if(s((()=>{g(!0)}),[]),function(e){const t=a(De);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:r}=e;t.onDragMove&&l(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;l(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;l(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;l(t.onDragCancel({active:n,over:r}))}})),[l,t])),!h)return null;const v=o.createElement(o.Fragment,null,o.createElement(Se,{id:r,value:i.draggable}),o.createElement(Oe,{id:p,announcement:c}));return n?w(v,n):v}var Be;function Ae(){}function Te(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"}(Be||(Be={}));const Le=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 Ne(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Ie(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Pe(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function ze(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 Ue=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Fe(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Me(Fe(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(Ne)};function He(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const Ve=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=He(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(Ie)};function We(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Le}function Ke(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.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 Ye=Ke(1);const Xe={ignoreTransform:!1};function $e(e,t){void 0===t&&(t=Xe);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:r}=re(e).getComputedStyle(e);t&&(n=function(e,t,n){const r=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(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,c=e.left-a-(1-o)*parseFloat(n),s=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),d=o?e.width/o: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,r))}const{top:r,left:o,width:i,height:a,bottom:l,right:c}=n;return{top:r,left:o,width:i,height:a,bottom:l,right:c}}function Ze(e){return $e(e,{ignoreTransform:!0})}function qe(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if(oe(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!ie(o)||ae(o))return n;if(n.includes(o))return n;const i=re(e).getComputedStyle(o);return o!==e&&function(e,t){void 0===t&&(t=re(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,i)&&n.push(o),function(e,t){return void 0===t&&(t=re(e).getComputedStyle(e)),"fixed"===t.position}(o,i)?n:r(o.parentNode)}(e):n}function Ge(e){const[t]=qe(e,1);return null!=t?t:null}function Je(e){return ee&&e?te(e)?e:ne(e)?oe(e)||e===le(e).scrollingElement?window:ie(e)?e:null:null:null}function Qe(e){return te(e)?e.scrollX:e.scrollLeft}function et(e){return te(e)?e.scrollY:e.scrollTop}function tt(e){return{x:Qe(e),y:et(e)}}var nt;function rt(e){return!(!ee||!e)&&e===document.scrollingElement}function ot(e){const t={x:0,y:0},n=rt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(nt||(nt={}));const it={x:.2,y:.2};function at(e,t,n,r,o){let{top:i,left:a,right:l,bottom:c}=n;void 0===r&&(r=10),void 0===o&&(o=it);const{isTop:s,isBottom:d,isLeft:u,isRight:f}=ot(e),p={x:0,y:0},h={x:0,y:0},g=t.height*o.y,v=t.width*o.x;return!s&&i<=t.top+g?(p.y=nt.Backward,h.y=r*Math.abs((t.top+g-i)/g)):!d&&c>=t.bottom-g&&(p.y=nt.Forward,h.y=r*Math.abs((t.bottom-g-c)/g)),!f&&l>=t.right-v?(p.x=nt.Forward,h.x=r*Math.abs((t.right-v-l)/v)):!u&&a<=t.left+v&&(p.x=nt.Backward,h.x=r*Math.abs((t.left+v-a)/v)),{direction:p,speed:h}}function lt(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:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function ct(e){return e.reduce(((e,t)=>me(e,tt(t))),Le)}const st=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Qe(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+et(t)),0)}]];class dt{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=qe(t),r=ct(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of st)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ut{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 r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ft(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var pt,ht;function gt(e){e.preventDefault()}function vt(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"}(pt||(pt={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(ht||(ht={}));const mt={start:[ht.Space,ht.Enter],cancel:[ht.Esc],end:[ht.Space,ht.Enter]},bt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ht.Right:return{...n,x:n.x+25};case ht.Left:return{...n,x:n.x-25};case ht.Down:return{...n,y:n.y+25};case ht.Up:return{...n,y:n.y-25}}};class yt{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 ut(le(t)),this.windowListeners=new ut(re(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(pt.Resize,this.handleCancel),this.windowListeners.add(pt.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(pt.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:r,bottom:o,right:i}=t(e);Ge(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(Le)}handleKeyDown(e){if(ye(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=mt,coordinateGetter:i=bt,scrollBehavior:a="smooth"}=r,{code:l}=e;if(o.end.includes(l))return void this.handleEnd(e);if(o.cancel.includes(l))return void this.handleCancel(e);const{collisionRect:c}=n.current,s=c?{x:c.left,y:c.top}:Le;this.referenceCoordinates||(this.referenceCoordinates=s);const d=i(e,{active:t,context:n.current,currentCoordinates:s});if(d){const t=be(d,s),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:l,isLeft:c,isBottom:s,maxScroll:u,minScroll:f}=ot(n),p=lt(n),h={x:Math.min(o===ht.Right?p.right-p.width/2:p.right,Math.max(o===ht.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(o===ht.Down?p.bottom-p.height/2:p.bottom,Math.max(o===ht.Down?p.top:p.top+p.height/2,d.y))},g=o===ht.Right&&!l||o===ht.Left&&!c,v=o===ht.Down&&!s||o===ht.Up&&!i;if(g&&h.x!==d.x){const e=n.scrollLeft+t.x,i=o===ht.Right&&e<=u.x||o===ht.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:a});r.x=i?n.scrollLeft-e:o===ht.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:a});break}if(v&&h.y!==d.y){const e=n.scrollTop+t.y,i=o===ht.Down&&e<=u.y||o===ht.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:a});r.y=i?n.scrollTop-e:o===ht.Down?n.scrollTop-u.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:a});break}}this.handleMove(e,me(be(d,this.referenceCoordinates),r))}}}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 wt(e){return Boolean(e&&"distance"in e)}function xt(e){return Boolean(e&&"delay"in e)}yt.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=mt,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==o||o({event:e.nativeEvent}),!0)}return!1}}];class kt{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=re(e);return e instanceof t?e:le(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:o}=e,{target:i}=o;this.props=e,this.events=t,this.document=le(i),this.documentListeners=new ut(this.document),this.listeners=new ut(n),this.windowListeners=new ut(re(i)),this.initialCoordinates=null!=(r=we(o))?r:Le,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(pt.Resize,this.handleCancel),this.windowListeners.add(pt.DragStart,gt),this.windowListeners.add(pt.VisibilityChange,this.handleCancel),this.windowListeners.add(pt.ContextMenu,gt),this.documentListeners.add(pt.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(xt(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(wt(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(pt.Click,vt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(pt.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:i,options:{activationConstraint:a}}=o;if(!r)return;const l=null!=(t=we(e))?t:Le,c=be(r,l);if(!n&&a){if(wt(a)){if(null!=a.tolerance&&ft(c,a.tolerance))return this.handleCancel();if(ft(c,a.distance))return this.handleStart()}return xt(a)&&ft(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===ht.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const Et={move:{name:"pointermove"},end:{name:"pointerup"}};class Ct extends kt{constructor(e){const{event:t}=e,n=le(t.target);super(e,Et,n)}}Ct.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button)&&(null==r||r({event:n}),!0)}}];const St={move:{name:"mousemove"},end:{name:"mouseup"}};var Ot;!function(e){e[e.RightClick=2]="RightClick"}(Ot||(Ot={}));(class extends kt{constructor(e){super(e,St,le(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==Ot.RightClick&&(null==r||r({event:n}),!0)}}];const Dt={move:{name:"touchmove"},end:{name:"touchend"}};var _t,Rt;function jt(e){let{acceleration:t,activator:n=_t.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:c=Rt.TreeOrder,pointerCoordinates:f,scrollableAncestors:p,scrollableAncestorRects:h,delta:g,threshold:v}=e;const m=function(e){let{delta:t,disabled:n}=e;const r=pe(t);return ue((e=>{if(n||!r||!e)return Bt;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[nt.Backward]:e.x[nt.Backward]||-1===o.x,[nt.Forward]:e.x[nt.Forward]||1===o.x},y:{[nt.Backward]:e.y[nt.Backward]||-1===o.y,[nt.Forward]:e.y[nt.Forward]||1===o.y}}}),[n,t,r])}({delta:g,disabled:!i}),[b,y]=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 _t.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case _t.DraggableRect:return o}}),[n,o,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)}),[]),S=d((()=>c===Rt.TreeOrder?[...p].reverse():p),[c,p]);s((()=>{if(i&&p.length&&k){for(const e of S){if(!1===(null==r?void 0:r(e)))continue;const n=p.indexOf(e),o=h[n];if(!o)continue;const{direction:i,speed:l}=at(e,o,k,t,v);for(const e of["x","y"])m[e][i[e]]||(l[e]=0,i[e]=0);if(l.x>0||l.y>0)return y(),E.current=e,b(C,a),w.current=l,void(x.current=i)}w.current={x:0,y:0},x.current={x:0,y:0},y()}else y()}),[t,C,r,y,i,a,JSON.stringify(k),JSON.stringify(m),b,p,S,h,JSON.stringify(v)])}(class extends kt{constructor(e){super(e,Dt)}static setup(){return window.addEventListener(Dt.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Dt.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1)&&(null==r||r({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(_t||(_t={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(Rt||(Rt={}));const Bt={x:{[nt.Backward]:!1,[nt.Forward]:!1},y:{[nt.Backward]:!1,[nt.Forward]:!1}};var At,Tt;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(At||(At={})),function(e){e.Optimized="optimized"}(Tt||(Tt={}));const Lt=new Map;function Mt(e,t){return ue((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Nt(e){let{callback:t,disabled:n}=e;const r=se(t),o=d((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(r)}),[n]);return s((()=>()=>null==o?void 0:o.disconnect()),[o]),o}function It(e){return new dt($e(e),e)}function Pt(e,t,n){void 0===t&&(t=It);const[r,o]=h((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);if(JSON.stringify(r)===JSON.stringify(i))return r;return i}),null),i=function(e){let{callback:t,disabled:n}=e;const r=se(t),o=d((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(r)}),[r,n]);return s((()=>()=>null==o?void 0:o.disconnect()),[o]),o}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){o();break}}}}),a=Nt({callback:o});return ce((()=>{o(),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]),r}const zt=[];function Ft(e,t){void 0===t&&(t=[]);const n=l(null);return s((()=>{n.current=null}),t),s((()=>{const t=e!==Le;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?be(e,n.current):Le}function Ut(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 Ht=[];function Vt(e){let{measure:t}=e;const[n,r]=f(null),o=u((e=>{for(const{target:n}of e)if(ie(n)){r((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t]),i=Nt({callback:o}),a=u((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ie(t)?t:e}(e);null==i||i.disconnect(),n&&(null==i||i.observe(n)),r(n?t(n):null)}),[t,i]),[l,c]=fe(a);return d((()=>({nodeRef:l,rect:n,setRef:c})),[n,l,c])}const Wt=[{sensor:Ct,options:{}},{sensor:yt,options:{}}],Kt={current:{}},Yt={draggable:{measure:Ze},droppable:{measure:Ze,strategy:At.WhileDragging,frequency:Tt.Optimized},dragOverlay:{measure:$e}};class Xt 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 Xt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ae},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Yt,measureDroppableContainers:Ae,windowRect:null,measuringScheduled:!1},Zt=i({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ae,draggableNodes:new Map,over:null,measureDroppableContainers:Ae}),qt=i($t);function Gt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Xt}}}function Jt(e,t){switch(t.type){case Be.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Be.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 Be.DragEnd:case Be.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Be.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Xt(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Be.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Xt(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Be.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Xt(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Qt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=a(Zt),i=pe(r),l=pe(null==n?void 0:n.id);return s((()=>{if(!t&&!r&&i&&null!=l){if(!ye(i))return;if(document.activeElement===i.target)return;const e=o.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=Ee(e);if(t){t.focus();break}}}))}}),[r,t,o,l,i]),null}const en=i({...Le,scaleX:1,scaleY:1});var tn;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(tn||(tn={}));const nn=p((function(e){var t,n,r,i;let{id:a,accessibility:c,autoScroll:p=!0,children:g,sensors:v=Wt,collisionDetection:m=Ve,measuring:b,modifiers:w,...x}=e;const k=h(Jt,void 0,Gt),[E,C]=k,[S,O]=function(){const[e]=f((()=>new Set)),t=u((t=>(e.add(t),()=>e.delete(t))),[e]);return[u((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[D,_]=f(tn.Uninitialized),R=D===tn.Initialized,{draggable:{active:j,nodes:B,translate:A},droppable:{containers:T}}=E,L=j?B.get(j):null,M=l({initial:null,translated:null}),N=d((()=>{var e;return null!=j?{id:j,data:null!=(e=null==L?void 0:L.data)?e:Kt,rect:M}:null}),[j,L]),I=l(null),[P,z]=f(null),[F,U]=f(null),H=de(x,Object.values(x)),V=ge("DndDescribedBy",a),W=d((()=>T.getEnabled()),[T]),K=d((()=>({draggable:{...Yt.draggable,...null==Y?void 0:Y.draggable},droppable:{...Yt.droppable,...null==Y?void 0:Y.droppable},dragOverlay:{...Yt.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:X,measureDroppableContainers:$,measuringScheduled:Z}=function(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=f(null),{frequency:c,measure:d,strategy:p}=o,h=l(e),g=function(){switch(p){case At.Always:return!1;case At.BeforeDragging:return n;default:return!n}}(),v=de(g),m=u((function(e){void 0===e&&(e=[]),v.current||a((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[v]),b=l(null),y=ue((t=>{if(g&&!n)return Lt;if(!t||t===Lt||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,r=e?new dt(d(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t}),[e,i,n,g,d]);return s((()=>{h.current=e}),[e]),s((()=>{g||m()}),[n,g]),s((()=>{i&&i.length>0&&a(null)}),[JSON.stringify(i)]),s((()=>{g||"number"!=typeof c||null!==b.current||(b.current=setTimeout((()=>{m(),b.current=null}),c))}),[c,g,m,...r]),{droppableRects:y,measureDroppableContainers:m,measuringScheduled:null!=i}}(W,{dragging:R,dependencies:[A.x,A.y],config:K.droppable}),q=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return ue((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(B,j),G=d((()=>F?we(F):null),[F]),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}}(),Q=function(e,t){return Mt(e,t)}(q,K.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=l(!1),{x:a,y:c}="boolean"==typeof o?{x:o,y:o}:o;ce((()=>{if(!a&&!c||!t)return void(i.current=!1);if(i.current||!r)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const o=We(n(e),r);if(a||(o.x=0),c||(o.y=0),i.current=!0,Math.abs(o.x)>0||Math.abs(o.y)>0){const t=Ge(e);t&&t.scrollBy({top:o.y,left:o.x})}}),[t,a,c,r,n])}({activeNode:j?B.get(j):null,config:J.layoutShiftCompensation,initialRect:Q,measure:K.draggable.measure});const te=Pt(q,K.draggable.measure,Q),ne=Pt(q?q.parentElement:null),oe=l({activatorEvent:null,active:null,activeNode:q,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:B,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ie=T.getNodeFor(null==(t=oe.current.over)?void 0:t.id),ae=Vt({measure:K.dragOverlay.measure}),le=null!=(n=ae.nodeRef.current)?n:q,se=R?null!=(r=ae.rect)?r:te:null,fe=Boolean(ae.nodeRef.current&&ae.rect),pe=We(he=fe?null:te,Mt(he));var he;const ve=Ut(le?re(le):null),be=function(e){const t=l(e),n=ue((n=>e?n&&n!==zt&&e&&t.current&&e.parentNode===t.current.parentNode?n:qe(e):zt),[e]);return s((()=>{t.current=e}),[e]),n}(R?null!=ie?ie:q:null),ye=function(e,t){void 0===t&&(t=$e);const[n]=e,r=Ut(n?re(n):null),[o,i]=h((function(){return e.length?e.map((e=>rt(e)?r:new dt(t(e),e))):Ht}),Ht),a=Nt({callback:i});return e.length>0&&o===Ht&&i(),ce((()=>{e.length?e.forEach((e=>null==a?void 0:a.observe(e))):(null==a||a.disconnect(),i())}),[e]),o}(be),xe=function(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}(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:se,over:oe.current.over,overlayNodeRect:ae.rect,scrollableAncestors:be,scrollableAncestorRects:ye,windowRect:ve}),ke=G?me(G,A):null,Ee=function(e){const[t,n]=f(null),r=l(e),o=u((e=>{const t=Je(e.target);t&&n((e=>e?(e.set(t,tt(t)),new Map(e)):null))}),[]);return s((()=>{const t=r.current;if(e!==t){i(t);const a=e.map((e=>{const t=Je(e);return t?(t.addEventListener("scroll",o,{passive:!0}),[t,tt(t)]):null})).filter((e=>null!=e));n(a.length?new Map(a):null),r.current=e}return()=>{i(e),i(t)};function i(e){e.forEach((e=>{const t=Je(e);null==t||t.removeEventListener("scroll",o)}))}}),[o,e]),d((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>me(e,t)),Le):ct(e):Le),[e,t])}(be),Ce=Ft(Ee),Se=Ft(Ee,[te]),Oe=me(xe,Ce),_e=se?Ye(se,xe):null,Re=N&&_e?m({active:N,collisionRect:_e,droppableRects:X,droppableContainers:W,pointerCoordinates:ke}):null,Ae=ze(Re,"id"),[Te,Me]=f(null),Ne=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(fe?xe:me(xe,Se),null!=(i=null==Te?void 0:Te.rect)?i:null,te),Ie=u(((e,t)=>{let{sensor:n,options:r}=t;if(null==I.current)return;const o=B.get(I.current);if(!o)return;const i=e.nativeEvent,a=new n({active:I.current,activeNode:o,event:i,options:r,context:oe,onStart(e){const t=I.current;if(null==t)return;const n=B.get(t);if(!n)return;const{onDragStart:r}=H.current,o={active:{id:t,data:n.data,rect:M}};y((()=>{null==r||r(o),_(tn.Initializing),C({type:Be.DragStart,initialCoordinates:e,active:t}),S({type:"onDragStart",event:o})}))},onMove(e){C({type:Be.DragMove,coordinates:e})},onEnd:l(Be.DragEnd),onCancel:l(Be.DragCancel)});function l(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:o}=oe.current;let a=null;if(t&&o){const{cancelDrop:l}=H.current;if(a={activatorEvent:i,active:t,collisions:n,delta:o,over:r},e===Be.DragEnd&&"function"==typeof l){await Promise.resolve(l(a))&&(e=Be.DragCancel)}}I.current=null,y((()=>{C({type:e}),_(tn.Uninitialized),Me(null),z(null),U(null);const t=e===Be.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=H.current[t];null==e||e(a),S({type:t,event:a})}}))}}y((()=>{z(a),U(e.nativeEvent)}))}),[B]),Pe=u(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=B.get(r);if(null!==I.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},I.current=r,Ie(n,t))}),[B,Ie]),Fe=function(e,t){return d((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(v,Pe);!function(e){s((()=>{if(!ee)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})))}(v),ce((()=>{te&&D===tn.Initializing&&_(tn.Initialized)}),[te,D]),s((()=>{const{onDragMove:e}=H.current,{active:t,activatorEvent:n,collisions:r,over:o}=oe.current;if(!t||!n)return;const i={active:t,activatorEvent:n,collisions:r,delta:{x:Oe.x,y:Oe.y},over:o};y((()=>{null==e||e(i),S({type:"onDragMove",event:i})}))}),[Oe.x,Oe.y]),s((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:o}=oe.current;if(!e||null==I.current||!t||!o)return;const{onDragOver:i}=H.current,a=r.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:o.x,y:o.y},over:l};y((()=>{Me(l),null==i||i(c),S({type:"onDragOver",event:c})}))}),[Ae]),ce((()=>{oe.current={activatorEvent:F,active:N,activeNode:q,collisionRect:_e,collisions:Re,droppableRects:X,draggableNodes:B,draggingNode:le,draggingNodeRect:se,droppableContainers:T,over:Te,scrollableAncestors:be,scrollAdjustedTranslate:Oe},M.current={initial:se,translated:_e}}),[N,q,Re,_e,B,le,se,X,T,Te,be,Oe]),jt({...J,delta:A,draggingRect:_e,pointerCoordinates:ke,scrollableAncestors:be,scrollableAncestorRects:ye});const Ue=d((()=>({active:N,activeNode:q,activeNodeRect:te,activatorEvent:F,collisions:Re,containerNodeRect:ne,dragOverlay:ae,draggableNodes:B,droppableContainers:T,droppableRects:X,over:Te,measureDroppableContainers:$,scrollableAncestors:be,scrollableAncestorRects:ye,measuringConfiguration:K,measuringScheduled:Z,windowRect:ve})),[N,q,te,F,Re,ne,ae,B,T,X,Te,$,be,ye,K,Z,ve]),He=d((()=>({activatorEvent:F,activators:Fe,active:N,activeNodeRect:te,ariaDescribedById:{draggable:V},dispatch:C,draggableNodes:B,over:Te,measureDroppableContainers:$})),[F,Fe,N,te,C,V,B,Te,$]);return o.createElement(De.Provider,{value:O},o.createElement(Zt.Provider,{value:He},o.createElement(qt.Provider,{value:Ue},o.createElement(en.Provider,{value:Ne},g)),o.createElement(Qt,{disabled:!1===(null==c?void 0:c.restoreFocus)})),o.createElement(je,{...c,hiddenTextDescribedById:V}))})),rn=i(null),on="button",an="Droppable";function ln(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=ge(an),{activators:l,activatorEvent:c,active:s,activeNodeRect:u,ariaDescribedById:f,draggableNodes:p,over:h}=a(Zt),{role:g=on,roleDescription:v="draggable",tabIndex:m=0}=null!=o?o:{},b=(null==s?void 0:s.id)===t,y=a(b?en:rn),[w,x]=fe(),[k,E]=fe(),C=function(e,t){return d((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(l,t),S=de(n);ce((()=>(p.set(t,{id:t,key:i,node:w,activatorNode:k,data:S}),()=>{const e=p.get(t);e&&e.key===i&&p.delete(t)})),[p,t]);return{active:s,activatorEvent:c,activeNodeRect:u,attributes:d((()=>({role:g,tabIndex:m,"aria-disabled":r,"aria-pressed":!(!b||g!==on)||void 0,"aria-roledescription":v,"aria-describedby":f.draggable})),[r,g,m,b,v,f.draggable]),isDragging:b,listeners:r?void 0:C,node:w,over:h,setNodeRef:x,setActivatorNodeRef:E,transform:y}}const cn="Droppable",sn={timeout:25};function dn(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function un(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function fn(e){return null!==e&&e>=0}const pn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=dn(t,r,n),a=t[o],l=i[o];return l&&a?{x:l.left-a.left,y:l.top-a.top,scaleX:l.width/a.width,scaleY:l.height/a.height}:null},hn={scaleX:1,scaleY:1},gn=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:a}=e;const l=null!=(t=i[n])?t:r;if(!l)return null;if(o===n){const e=i[a];return e?{x:0,y:n<a?e.top+e.height-(l.top+l.height):e.top-l.top,...hn}:null}const c=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];if(!r)return 0;if(n<t)return o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0;return i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0}(i,o,n);return o>n&&o<=a?{x:0,y:-l.height-c,...hn}:o<n&&o>=a?{x:0,y:l.height+c,...hn}:{x:0,y:0,...hn}};const vn="Sortable",mn=o.createContext({activeIndex:-1,containerId:vn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:pn,disabled:{draggable:!1,droppable:!1}});function bn(e){let{children:t,id:n,items:r,strategy:i=pn,disabled:c=!1}=e;const{active:u,dragOverlay:f,droppableRects:p,over:h,measureDroppableContainers:g}=a(qt),v=ge(vn,n),m=Boolean(null!==f.rect),b=d((()=>r.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[r]),y=null!=u,w=u?b.indexOf(u.id):-1,x=h?b.indexOf(h.id):-1,k=l(b),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}(b,k.current),C=-1!==x&&-1===w||E,S=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(c);ce((()=>{E&&y&&g(b)}),[E,b,y,g]),s((()=>{k.current=b}),[b]);const O=d((()=>({activeIndex:w,containerId:v,disabled:S,disableTransforms:C,items:b,overIndex:x,useDragOverlay:m,sortedRects:un(b,p),strategy:i})),[w,v,S.draggable,S.droppable,C,b,x,p,m,i]);return o.createElement(mn.Provider,{value:O},t)}const yn=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return dn(n,r,o).indexOf(t)},wn=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:l,previousContainerId:c,transition:s}=e;return!(!s||!r)&&((l===i||o!==a)&&(!!n||a!==o&&t===c))},xn={duration:200,easing:"ease"},kn="transform",En=xe.Transition.toString({property:kn,duration:0,easing:"linear"}),Cn={roleDescription:"sortable"};function Sn(e){let{animateLayoutChanges:t=wn,attributes:n,disabled:r,data:o,getNewIndex:i=yn,id:c,strategy:p,resizeObserverConfig:h,transition:g=xn}=e;const{items:v,containerId:m,activeIndex:b,disabled:y,disableTransforms:w,sortedRects:x,overIndex:k,useDragOverlay:E,strategy:C}=a(mn),S=function(e,t){var n,r;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(r,y),O=v.indexOf(c),D=d((()=>({sortable:{containerId:m,index:O,items:v},...o})),[m,o,O,v]),_=d((()=>v.slice(v.indexOf(c))),[v,c]),{rect:R,node:j,isOver:B,setNodeRef:A}=function(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=ge(cn),{active:c,dispatch:d,over:f,measureDroppableContainers:p}=a(Zt),h=l({disabled:n}),g=l(!1),v=l(null),m=l(null),{disabled:b,updateMeasurementsFor:y,timeout:w}={...sn,...o},x=de(null!=y?y:r),k=Nt({callback:u((()=>{g.current?(null!=m.current&&clearTimeout(m.current),m.current=setTimeout((()=>{p(Array.isArray(x.current)?x.current:[x.current]),m.current=null}),w)):g.current=!0}),[w]),disabled:b||!c}),E=u(((e,t)=>{k&&(t&&(k.unobserve(t),g.current=!1),e&&k.observe(e))}),[k]),[C,S]=fe(E),O=de(t);return s((()=>{k&&C.current&&(k.disconnect(),g.current=!1,k.observe(C.current))}),[C,k]),ce((()=>(d({type:Be.RegisterDroppable,element:{id:r,key:i,disabled:n,node:C,rect:v,data:O}}),()=>d({type:Be.UnregisterDroppable,key:i,id:r}))),[r]),s((()=>{n!==h.current.disabled&&(d({type:Be.SetDroppableDisabled,id:r,key:i,disabled:n}),h.current.disabled=n)}),[r,i,n,d]),{active:c,rect:v,isOver:(null==f?void 0:f.id)===r,node:C,over:f,setNodeRef:S}}({id:c,data:D,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:_,...h}}),{active:T,activatorEvent:L,activeNodeRect:M,attributes:N,setNodeRef:I,listeners:P,isDragging:z,over:F,setActivatorNodeRef:U,transform:H}=ln({id:c,data:D,attributes:{...Cn,...n},disabled:S.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),W=Boolean(T),K=W&&!w&&fn(b)&&fn(k),Y=!E&&z,X=Y&&K?H:null,$=K?null!=X?X:(null!=p?p:C)({rects:x,activeNodeRect:M,activeIndex:b,overIndex:k,index:O}):null,Z=fn(b)&&fn(k)?i({id:c,items:v,activeIndex:b,overIndex:k}):O,q=null==T?void 0:T.id,G=l({activeId:q,items:v,newIndex:Z,containerId:m}),J=v!==G.current.items,Q=t({active:T,containerId:m,isDragging:z,isSorting:W,id:c,index:O,items:v,newIndex:G.current.newIndex,previousItems:G.current.items,previousContainerId:G.current.containerId,transition:g,wasDragging:null!=G.current.activeId}),ee=function(e){let{disabled:t,index:n,node:r,rect:o}=e;const[i,a]=f(null),c=l(n);return ce((()=>{if(!t&&n!==c.current&&r.current){const e=o.current;if(e){const t=$e(r.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,r,o]),s((()=>{i&&a(null)}),[i]),i}({disabled:!Q,index:O,node:j,rect:R});return s((()=>{W&&G.current.newIndex!==Z&&(G.current.newIndex=Z),m!==G.current.containerId&&(G.current.containerId=m),v!==G.current.items&&(G.current.items=v)}),[W,Z,m,v]),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:b,attributes:N,data:D,rect:R,index:O,newIndex:Z,items:v,isOver:B,isSorting:W,isDragging:z,listeners:P,node:j,overIndex:k,over:F,setNodeRef:V,setActivatorNodeRef:U,setDroppableNodeRef:A,setDraggableNodeRef:I,transform:null!=ee?ee:$,transition:function(){if(ee||J&&G.current.newIndex===O)return En;if(Y&&!ye(L)||!g)return;if(W||Q)return xe.Transition.toString({...g,property:kn});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 Dn=[ht.Down,ht.Right,ht.Up,ht.Left],_n=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:i,over:a,scrollableAncestors:l}}=t;if(Dn.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];i.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const i=o.get(n.id);if(i)switch(e.code){case ht.Down:r.top<i.top&&t.push(n);break;case ht.Up:r.top>i.top&&t.push(n);break;case ht.Left:r.left>i.left&&t.push(n);break;case ht.Right:r.left<i.left&&t.push(n)}}));const c=(e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Pe(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=Pe(r),a=o.reduce(((e,t,r)=>e+Me(n[r],t)),0),l=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:l}})}}return i.sort(Ne)})({active:n,collisionRect:r,droppableRects:o,droppableContainers:t,pointerCoordinates:null});let s=ze(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?o.get(t.id):null,c=null==t?void 0:t.node.current;if(c&&a&&e&&t){const n=qe(c).some(((e,t)=>l[t]!==e)),o=Rn(e,t),i=function(e,t){if(!On(e)||!On(t))return!1;if(!Rn(e,t))return!1;return e.data.current.sortable.index<t.data.current.sortable.index}(e,t),s=n||!o?{x:0,y:0}:{x:i?r.width-a.width:0,y:i?r.height-a.height:0},d={x:a.left,y:a.top};return s.x&&s.y?d:be(d,s)}}}};function Rn(e,t){return!(!On(e)||!On(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}var jn;function Bn(){return Bn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bn.apply(this,arguments)}var An,Tn=function(e){return r.createElement("svg",Bn({viewBox:"0 0 10 10",fill:"currentColor",style:{width:14,height:14,display:"block",flexShrink:0,backfaceVisibility:"hidden"}},e),jn||(jn=r.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 Ln(){return Ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ln.apply(this,arguments)}var Mn=function(e){return r.createElement("svg",Ln({viewBox:"0 0 16 16",fill:"currentColor",style:{width:16,height:16,display:"block",flexShrink:0,backfaceVisibility:"hidden"}},e),An||(An=r.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:r=e.selection}=t,o=n.find((t=>e.children[t].meta.order===(null==r?void 0:r[0])));if(o)return e.blockEditorsMap[o]}function In(e){return Fn(e)?(e.nodeName||"").toLowerCase():"#document"}function Pn(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function zn(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 Pn(e).Node}function Un(e){return e instanceof Element||e instanceof Pn(e).Element}function Hn(e){return e instanceof HTMLElement||e instanceof Pn(e).HTMLElement}function Vn(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Pn(e).ShadowRoot)}function Wn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Zn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Kn(e){return["table","td","th"].includes(In(e))}function Yn(e){const t=Xn(),n=Zn(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 Xn(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function $n(e){return["html","body","#document"].includes(In(e))}function Zn(e){return Pn(e).getComputedStyle(e)}function qn(e){return Un(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Gn(e){if("html"===In(e))return e;const t=e.assignedSlot||e.parentNode||Vn(e)&&e.host||zn(e);return Vn(t)?t.host:t}function Jn(e){const t=Gn(e);return $n(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hn(t)&&Wn(t)?t:Jn(t)}function Qn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Jn(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Pn(o);return i?t.concat(a,a.visualViewport||[],Wn(o)?o:[],a.frameElement&&n?Qn(a.frameElement):[]):t.concat(o,Qn(o,[],n))}const er=Math.min,tr=Math.max,nr=Math.round,rr=Math.floor,or=e=>({x:e,y:e}),ir={left:"right",right:"left",bottom:"top",top:"bottom"},ar={start:"end",end:"start"};function lr(e,t,n){return tr(e,er(t,n))}function cr(e,t){return"function"==typeof e?e(t):e}function sr(e){return e.split("-")[0]}function dr(e){return e.split("-")[1]}function ur(e){return"x"===e?"y":"x"}function fr(e){return"y"===e?"height":"width"}function pr(e){return["top","bottom"].includes(sr(e))?"y":"x"}function hr(e){return ur(pr(e))}function gr(e){return e.replace(/start|end/g,(e=>ar[e]))}function vr(e){return e.replace(/left|right|bottom|top/g,(e=>ir[e]))}function mr(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 br(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function yr(e,t,n){let{reference:r,floating:o}=e;const i=pr(t),a=hr(t),l=fr(a),c=sr(t),s="y"===i,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(dr(t)){case"start":p[a]-=f*(n&&s?-1:1);break;case"end":p[a]+=f*(n&&s?-1:1)}return p}async function wr(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=cr(t,e),h=mr(p),g=l[f?"floating"===u?"reference":"floating":u],v=br(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:s,rootBoundary:d,strategy:c})),m="floating"===u?{...a.floating,x:r,y:o}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=br(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:b,strategy:c}):m);return{top:(v.top-w.top+h.top)/y.y,bottom:(w.bottom-v.bottom+h.bottom)/y.y,left:(v.left-w.left+h.left)/y.x,right:(w.right-v.right+h.right)/y.x}}function xr(e){const t=er(...e.map((e=>e.left))),n=er(...e.map((e=>e.top)));return{x:t,y:n,width:tr(...e.map((e=>e.right)))-t,height:tr(...e.map((e=>e.bottom)))-n}}const kr=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=sr(n),l=dr(n),c="y"===pr(n),s=["left","top"].includes(a)?-1:1,d=i&&c?-1:1,u=cr(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!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}};function Er(e){const t=Zn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Hn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=nr(n)!==i||nr(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Cr(e){return Un(e)?e:e.contextElement}function Sr(e){const t=Cr(e);if(!Hn(t))return or(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Er(t);let a=(i?nr(n.width):n.width)/r,l=(i?nr(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const Or=or(0);function Dr(e){const t=Pn(e);return Xn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Or}function _r(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Cr(e);let a=or(1);t&&(r?Un(r)&&(a=Sr(r)):a=Sr(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Pn(e))&&t}(i,n,r)?Dr(i):or(0);let c=(o.left+l.x)/a.x,s=(o.top+l.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i){const e=Pn(i),t=r&&Un(r)?Pn(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=Sr(o),t=o.getBoundingClientRect(),r=Zn(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,d*=e.x,u*=e.y,c+=i,s+=a,n=Pn(o),o=n.frameElement}}return br({width:d,height:u,x:c,y:s})}const Rr=[":popover-open",":modal"];function jr(e){return Rr.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Br(e){return _r(zn(e)).left+qn(e).scrollLeft}function Ar(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Pn(e),r=zn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,c=0;if(o){i=o.width,a=o.height;const e=Xn();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:l,y:c}}(e,n);else if("document"===t)r=function(e){const t=zn(e),n=qn(e),r=e.ownerDocument.body,o=tr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=tr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Br(e);const l=-n.scrollTop;return"rtl"===Zn(r).direction&&(a+=tr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}(zn(e));else if(Un(t))r=function(e,t){const n=_r(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Hn(e)?Sr(e):or(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Dr(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return br(r)}function Tr(e,t){const n=Gn(e);return!(n===t||!Un(n)||$n(n))&&("fixed"===Zn(n).position||Tr(n,t))}function Lr(e,t,n){const r=Hn(t),o=zn(t),i="fixed"===n,a=_r(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=or(0);if(r||!r&&!i)if(("body"!==In(t)||Wn(o))&&(l=qn(t)),r){const e=_r(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&(c.x=Br(o));return{x:a.left+l.scrollLeft-c.x,y:a.top+l.scrollTop-c.y,width:a.width,height:a.height}}function Mr(e,t){return Hn(e)&&"fixed"!==Zn(e).position?t?t(e):e.offsetParent:null}function Nr(e,t){const n=Pn(e);if(!Hn(e)||jr(e))return n;let r=Mr(e,t);for(;r&&Kn(r)&&"static"===Zn(r).position;)r=Mr(r,t);return r&&("html"===In(r)||"body"===In(r)&&"static"===Zn(r).position&&!Yn(r))?n:r||function(e){let t=Gn(e);for(;Hn(t)&&!$n(t);){if(Yn(t))return t;t=Gn(t)}return null}(e)||n}const Ir={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=zn(r),l=!!t&&jr(t.floating);if(r===a||l&&i)return n;let c={scrollLeft:0,scrollTop:0},s=or(1);const d=or(0),u=Hn(r);if((u||!u&&!i)&&(("body"!==In(r)||Wn(a))&&(c=qn(r)),Hn(r))){const e=_r(r);s=Sr(r),d.x=e.x+r.clientLeft,d.y=e.y+r.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:zn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=Qn(e,[],!1).filter((e=>Un(e)&&"body"!==In(e))),o=null;const i="fixed"===Zn(e).position;let a=i?Gn(e):e;for(;Un(a)&&!$n(a);){const t=Zn(a),n=Yn(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Wn(a)&&!n&&Tr(e,a))?r=r.filter((e=>e!==a)):o=t,a=Gn(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],l=i.reduce(((e,n)=>{const r=Ar(t,n,o);return e.top=tr(r.top,e.top),e.right=er(r.right,e.right),e.bottom=er(r.bottom,e.bottom),e.left=tr(r.left,e.left),e}),Ar(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Nr,getElementRects:async function(e){const t=this.getOffsetParent||Nr,n=this.getDimensions;return{reference:Lr(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}=Er(e);return{width:t,height:n}},getScale:Sr,isElement:Un,isRTL:function(e){return"rtl"===Zn(e).direction}};function Pr(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,s=Cr(e),d=o||i?[...s?Qn(s):[],...Qn(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const u=s&&l?function(e,t){let n,r=null;const o=zn(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=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:-rr(d)+"px "+-rr(o.clientWidth-(s+u))+"px "+-rr(o.clientHeight-(d+f))+"px "+-rr(s)+"px",threshold:tr(0,er(1,c))||1};let h=!0;function g(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{r=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),i}(s,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.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 g=c?_r(e):null;return c&&function t(){const r=_r(e);!g||r.x===g.x&&r.y===g.y&&r.width===g.width&&r.height===g.height||n();g=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=h)||e.disconnect(),h=null,c&&cancelAnimationFrame(f)}}const zr=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=cr(e,t),s={x:n,y:r},d=await wr(t,c),u=pr(sr(o)),f=ur(u);let p=s[f],h=s[u];if(i){const e="y"===f?"bottom":"right";p=lr(p+d["y"===f?"top":"left"],p,p-d[e])}if(a){const e="y"===u?"bottom":"right";h=lr(h+d["y"===u?"top":"left"],h,h-d[e])}const g=l.fn({...t,[f]:p,[u]:h});return{...g,data:{x:g.x-n,y:g.y-r}}}}},Fr=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,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:g=!0,...v}=cr(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const m=sr(o),b=sr(l)===l,y=await(null==c.isRTL?void 0:c.isRTL(s.floating)),w=f||(b||!g?[vr(l)]:function(e){const t=vr(e);return[gr(e),t,gr(t)]}(l));f||"none"===h||w.push(...function(e,t,n,r){const o=dr(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(sr(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(gr)))),i}(l,g,h,y));const x=[l,...w],k=await wr(t,v),E=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&E.push(k[m]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=dr(e),o=hr(e),i=fr(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=vr(a)),[a,vr(a)]}(o,a,y);E.push(k[e[0]],k[e[1]])}if(C=[...C,{placement:o,overflows:E}],!E.every((e=>e<=0))){var S,O;const e=((null==(S=i.flip)?void 0:S.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(O=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:O.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(o!==n)return{reset:{placement:n}}}return{}}}},Ur=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:o,platform:i,strategy:a}=t,{padding:l=2,x:c,y:s}=cr(e,t),d=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(r.reference))||[]),u=function(e){const t=e.slice().sort(((e,t)=>e.y-t.y)),n=[];let r=null;for(let e=0;e<t.length;e++){const o=t[e];!r||o.y-r.y>r.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map((e=>br(xr(e))))}(d),f=br(xr(d)),p=mr(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"===pr(n)){const e=u[0],t=u[u.length-1],r="top"===sr(n),o=e.top,i=t.bottom,a=r?e.left:t.left,l=r?e.right:t.right;return{top:o,bottom:i,left:a,right:l,width:l-a,height:i-o,x:a,y:o}}const e="left"===sr(n),t=tr(...u.map((e=>e.right))),r=er(...u.map((e=>e.left))),o=u.filter((n=>e?n.left===r:n.right===t)),i=o[0].top,a=o[o.length-1].bottom;return{top:i,bottom:a,left:r,right:t,width:t-r,height:a-i,x:r,y:i}}return f}},floating:r.floating,strategy:a});return o.reference.x!==h.reference.x||o.reference.y!==h.reference.y||o.reference.width!==h.reference.width||o.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Hr=(e,t,n)=>{const r=new Map,o={platform:Ir,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="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:o}),{x:d,y:u}=yr(s,r,c),f=r,p={},h=0;for(let n=0;n<l.length;n++){const{name:i,fn:g}=l[n],{x:v,y:m,data:b,reset:y}=await g({x:d,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:s,platform:a,elements:{reference:e,floating:t}});d=null!=v?v:d,u=null!=m?m:u,p={...p,[i]:{...p[i],...b}},y&&h<=50&&(h++,"object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(s=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:d,y:u}=yr(s,f,c))),n=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Vr="undefined"!=typeof document?c:s;function Wr(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,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Wr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Wr(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Kr(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yr(e,t){const n=Kr(e);return Math.round(t*n)/n}function Xr(e){const t=r.useRef(e);return Vr((()=>{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 Zr=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),qr="undefined"==typeof Element,$r=qr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gr=!qr&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Jr=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Qr=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Jr(a,!1))if("SLOT"===a.tagName){var l=a.assignedElements(),c=e(l.length?l:a.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{$r.call(a,Zr)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var s=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),d=!Jr(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(s&&d){var u=e(!0===s?a.children:s.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return o},eo=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},to=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))&&!eo(e)?0:e.tabIndex},no=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ro=function(e){return"INPUT"===e.tagName},oo=function(e){return function(e){return ro(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Gr(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},io=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},ao=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=$r.call(e,"details>summary:first-of-type")?e.parentElement:e;if($r.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return io(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,l=Gr(e);if(a&&!a.shadowRoot&&!0===r(a))return io(e);e=e.assignedSlot?e.assignedSlot:a||l===e.ownerDocument?a:l.host}e=i}if(function(e){var t,n,r,o,i=e&&Gr(e),a=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&a;){var c,s,d;l=!(null===(s=a=null===(c=i=Gr(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},lo=function(e,t){return!(t.disabled||Jr(t)||function(e){return ro(e)&&"hidden"===e.type}(t)||ao(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!$r.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},co=function(e,t){return!(oo(t)||to(t)<0||!lo(e,t))},so=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},uo=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,l=function(e,t){var n=to(e);return n<0&&t&&!eo(e)?0:n}(a,i),c=i?e(t.candidates):a;0===l?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:c})})),r.sort(no).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},fo=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Qr([e],t.includeContainer,{filter:co.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:so}):function(e,t,n){if(Jr(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Zr));return t&&$r.call(e,Zr)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,co.bind(null,t)),uo(n)};const po=r["useInsertionEffect".toString()]||(e=>e());var ho="undefined"!=typeof document?c:s;function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},go.apply(this,arguments)}let vo=!1,mo=0;const bo=()=>"floating-ui-"+mo++;const yo=r["useId".toString()]||function(){const[e,t]=r.useState((()=>vo?bo():void 0));return ho((()=>{null==e&&t(bo())}),[]),r.useEffect((()=>{vo||(vo=!0)}),[]),e};const wo=r.createContext(null),xo=r.createContext(null);function ko(e){return"data-floating-ui-"+e}function Eo(e){const t=l(e);return ho((()=>{t.current=e})),t}const Co=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function So(e,t){const n=fo(e,Co());"prev"===t&&n.reverse();const r=n.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}((null==(o=e)?void 0:o.ownerDocument)||document));var o;return n.slice(r+1)[0]}function Oo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!function(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Un(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}(n,r)}function _o(e){fo(e,Co()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Do(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 Ro={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 jo(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Bo=r.forwardRef((function(e,t){const[n,o]=r.useState();ho((()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",jo),()=>{document.removeEventListener("keydown",jo)})),[]);const i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[ko("focus-guard")]:"",style:Ro};return r.createElement("span",go({},e,i))})),To=r.createContext(null),Ao=ko("portal");function Lo(e){let{children:t,id:n,root:o=null,preserveTabOrder:i=!0}=e;const a=function(e){let{id:t,root:n}=void 0===e?{}:e;const[o,i]=r.useState(null),a=yo(),l=No(),c=r.useRef(null);return ho((()=>()=>{null==o||o.remove(),queueMicrotask((()=>{c.current=null}))}),[o]),ho((()=>{if(c.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=a,n.setAttribute(Ao,""),e.appendChild(n),c.current=n,i(n)}),[t,a]),ho((()=>{if(c.current)return;let e=n||(null==l?void 0:l.portalNode);e&&!Hn(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const o=document.createElement("div");o.id=a,o.setAttribute(Ao,""),e=r||e,e.appendChild(o),c.current=o,i(o)}),[t,n,a,l]),o}({id:n,root:o}),[l,c]=r.useState(null),s=r.useRef(null),d=r.useRef(null),u=r.useRef(null),f=r.useRef(null),p=!!l&&!l.modal&&l.open&&i&&!(!o&&!a);return r.useEffect((()=>{if(a&&i&&(null==l||!l.modal))return a.addEventListener("focusin",e,!0),a.addEventListener("focusout",e,!0),()=>{a.removeEventListener("focusin",e,!0),a.removeEventListener("focusout",e,!0)};function e(e){if(a&&Oo(e)){("focusin"===e.type?Do:_o)(a)}}}),[a,i,null==l?void 0:l.modal]),r.createElement(To.Provider,{value:r.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:s,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:c})),[i,a])},p&&a&&r.createElement(Bo,{"data-type":"outside",ref:s,onFocus:e=>{if(Oo(e,a)){var t;null==(t=u.current)||t.focus()}else{const e=So(document.body,"prev")||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),p&&a&&r.createElement("span",{"aria-owns":a.id,style:Ro}),a&&w(t,a),p&&a&&r.createElement(Bo,{"data-type":"outside",ref:d,onFocus:e=>{if(Oo(e,a)){var t;null==(t=f.current)||t.focus()}else{const t=So(document.body,"next")||(null==l?void 0:l.refs.domReference.current);null==t||t.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent))}}}))}const No=()=>r.useContext(To),Mo=new Set,Po=r.forwardRef((function(e,t){let{lockScroll:n=!1,...o}=e;const i=yo();return ho((()=>{if(!n)return;Mo.add(i);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,a=t.left?parseFloat(t.left):window.pageXOffset,l=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",o&&(t[r]=o+"px"),e){var c,s;const e=(null==(c=window.visualViewport)?void 0:c.offsetLeft)||0,n=(null==(s=window.visualViewport)?void 0:s.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(l-Math.floor(n))+"px",left:-(a-Math.floor(e))+"px",right:"0"})}return()=>{Mo.delete(i),0===Mo.size&&(Object.assign(t,{overflow:"",[r]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(a,l)))}}),[i,n]),r.createElement("div",go({ref:t},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))}));function Io(e){var t;void 0===e&&(e={});const{open:n=!1,onOpenChange:o,nodeId:i}=e,[a,l]=r.useState(null),c=(null==(t=e.elements)?void 0:t.reference)||a,s=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:s,open:d}=e,[u,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(o);Wr(p,o)||h(o);const[g,v]=r.useState(null),[m,y]=r.useState(null),w=r.useCallback((e=>{e!==C.current&&(C.current=e,v(e))}),[]),x=r.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),k=a||g,E=l||m,C=r.useRef(null),S=r.useRef(null),O=r.useRef(u),_=null!=s,D=Yr(s),R=Yr(i),j=r.useCallback((()=>{if(!C.current||!S.current)return;const e={placement:t,strategy:n,middleware:p};R.current&&(e.platform=R.current),Vr(C.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};B.current&&!Wr(O.current,t)&&(O.current=t,b.flushSync((()=>{f(t)})))}))}),[p,t,n,R]);Ur((()=>{!1===d&&O.current.isPositioned&&(O.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const B=r.useRef(!1);Ur((()=>(B.current=!0,()=>{B.current=!1})),[]),Ur((()=>{if(k&&(C.current=k),E&&(S.current=E),k&&E){if(D.current)return D.current(k,E,j);j()}}),[k,E,j,D,_]);const T=r.useMemo((()=>({reference:C,floating:S,setReference:w,setFloating:x})),[w,x]),A=r.useMemo((()=>({reference:k,floating:E})),[k,E]),L=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!A.floating)return e;const t=Kr(A.floating,u.x),r=Kr(A.floating,u.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...Xr(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,A.floating,u.x,u.y]);return r.useMemo((()=>({...u,update:j,refs:T,elements:A,floatingStyles:L})),[u,j,T,A,L])}(e),d=r.useContext(xo),u=null!=((null==(f=r.useContext(wo))?void 0:f.id)||null);var f;const p=function(e){const t=r.useRef((()=>{}));return po((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}(((e,t,n)=>{e&&(g.current.openEvent=t),v.emit("openchange",{open:e,event:t,reason:n,nested:u}),null==o||o(e,t,n)})),h=r.useRef(null),g=r.useRef({}),v=r.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}()))[0],m=yo(),y=r.useCallback((e=>{const t=Hn(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s.refs.setReference(t)}),[s.refs]),w=r.useCallback((e=>{(Hn(e)||null===e)&&(h.current=e,l(e)),(Hn(s.refs.reference.current)||null===s.refs.reference.current||null!==e&&!Hn(e))&&s.refs.setReference(e)}),[s.refs]),x=r.useMemo((()=>({...s.refs,setReference:w,setPositionReference:y,domReference:h})),[s.refs,w,y]),k=r.useMemo((()=>({...s.elements,domReference:c})),[s.elements,c]),E=r.useMemo((()=>({...s,refs:x,elements:k,dataRef:g,nodeId:i,floatingId:m,events:v,open:n,onOpenChange:p})),[s,i,m,v,n,p,x,k]);return ho((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===i));e&&(e.context=E)})),r.useMemo((()=>({...s,context:E,refs:x,elements:k})),[s,x,k,E])}const zo=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function Fo(e,t){return"function"==typeof e?e(t):e}function Ho(e,t){void 0===t&&(t={});const{open:n,elements:{floating:o}}=e,{duration:i=250}=t,a=("number"==typeof i?i:i.close)||0,[l,c]=r.useState(!1),[s,d]=r.useState("unmounted"),u=function(e,t){const[n,o]=r.useState(e);return e&&!n&&o(!0),r.useEffect((()=>{if(!e){const e=setTimeout((()=>o(!1)),t);return()=>clearTimeout(e)}}),[e,t]),n}(n,a);return ho((()=>{l&&!u&&d("unmounted")}),[l,u]),ho((()=>{if(o){if(n){d("initial");const e=requestAnimationFrame((()=>{d("open")}));return()=>{cancelAnimationFrame(e)}}c(!0),d("close")}}),[n,o]),{isMounted:u,status:s}}function Vo(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:o,close:i,common:a,duration:l=250}=t,c=e.placement,s=c.split("-")[0],d=r.useMemo((()=>({side:s,placement:c})),[s,c]),u="number"==typeof l,f=(u?l:l.open)||0,p=(u?l:l.close)||0,[h,g]=r.useState((()=>({...Fo(a,d),...Fo(n,d)}))),{isMounted:v,status:m}=Ho(e,{duration:l}),b=Eo(n),y=Eo(o),w=Eo(i),x=Eo(a);return ho((()=>{const e=Fo(b.current,d),t=Fo(w.current,d),n=Fo(x.current,d),r=Fo(y.current,d)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===m&&g((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===m&&g({transitionProperty:Object.keys(r).map(zo).join(","),transitionDuration:f+"ms",...n,...r}),"close"===m){const r=t||e;g({transitionProperty:Object.keys(r).map(zo).join(","),transitionDuration:p+"ms",...n,...r})}}),[p,w,b,y,x,f,m,d]),{isMounted:v,styles:h}}var Uo;function Wo(){return Wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wo.apply(this,arguments)}var Xo=function(e){return r.createElement("svg",Wo({viewBox:"0 0 16 16",className:"turn_svg__loop",style:{width:16,height:16,display:"block",fill:"currentcolor",flexShrink:0,backfaceVisibility:"hidden"}},e),Uo||(Uo=r.createElement("path",{d:"M5.804 3.123c.006.38.254.622.673.622h4.887c.59 0 .914.305.914.92v6.628l-.901-.978-.514-.514c-.267-.254-.629-.273-.895-.013-.254.26-.248.635.012.895l2.165 2.158c.476.47 1.022.47 1.498 0l2.165-2.158c.26-.26.266-.635.012-.895-.266-.26-.628-.241-.895.013l-.514.514-.895.971V4.564c0-1.358-.71-2.063-2.082-2.063H6.477c-.42 0-.68.241-.673.622ZM.186 7.06c.26.266.622.247.889-.013l.52-.508.889-.971v6.722c0 1.359.71 2.063 2.082 2.063h4.957c.42 0 .68-.241.673-.622-.006-.387-.254-.622-.673-.622h-4.88c-.591 0-.915-.311-.915-.927V5.554l.895.984.52.508c.26.26.629.28.89.013.26-.26.253-.629-.013-.89L3.855 4.013c-.476-.476-1.016-.476-1.492 0L.2 6.17c-.267.26-.273.628-.013.889Z"})))};function Ko(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var Yo=["color"],Zo=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Ko(e,Yo);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),qo=["color"],$o=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Ko(e,qo);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),Go=["color"],Jo=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Ko(e,Go);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M8.51194 3.00541C9.18829 2.54594 10.0435 2.53694 10.6788 2.95419C10.8231 3.04893 10.9771 3.1993 11.389 3.61119C11.8009 4.02307 11.9513 4.17714 12.046 4.32141C12.4633 4.95675 12.4543 5.81192 11.9948 6.48827C11.8899 6.64264 11.7276 6.80811 11.3006 7.23511L10.6819 7.85383C10.4867 8.04909 10.4867 8.36567 10.6819 8.56093C10.8772 8.7562 11.1938 8.7562 11.389 8.56093L12.0077 7.94221L12.0507 7.89929C12.4203 7.52976 12.6568 7.2933 12.822 7.0502C13.4972 6.05623 13.5321 4.76252 12.8819 3.77248C12.7233 3.53102 12.4922 3.30001 12.1408 2.94871L12.0961 2.90408L12.0515 2.85942C11.7002 2.508 11.4692 2.27689 11.2277 2.11832C10.2377 1.46813 8.94398 1.50299 7.95001 2.17822C7.70691 2.34336 7.47044 2.57991 7.1009 2.94955L7.058 2.99247L6.43928 3.61119C6.24401 3.80645 6.24401 4.12303 6.43928 4.31829C6.63454 4.51355 6.95112 4.51355 7.14638 4.31829L7.7651 3.69957C8.1921 3.27257 8.35757 3.11027 8.51194 3.00541ZM4.31796 7.14672C4.51322 6.95146 4.51322 6.63487 4.31796 6.43961C4.12269 6.24435 3.80611 6.24435 3.61085 6.43961L2.99213 7.05833L2.94922 7.10124C2.57957 7.47077 2.34303 7.70724 2.17788 7.95035C1.50265 8.94432 1.4678 10.238 2.11799 11.2281C2.27656 11.4695 2.50766 11.7005 2.8591 12.0518L2.90374 12.0965L2.94837 12.1411C3.29967 12.4925 3.53068 12.7237 3.77214 12.8822C4.76219 13.5324 6.05589 13.4976 7.04986 12.8223C7.29296 12.6572 7.52943 12.4206 7.89896 12.051L7.89897 12.051L7.94188 12.0081L8.5606 11.3894C8.75586 11.1941 8.75586 10.8775 8.5606 10.6823C8.36533 10.487 8.04875 10.487 7.85349 10.6823L7.23477 11.301C6.80777 11.728 6.6423 11.8903 6.48794 11.9951C5.81158 12.4546 4.95642 12.4636 4.32107 12.0464C4.17681 11.9516 4.02274 11.8012 3.61085 11.3894C3.19896 10.9775 3.0486 10.8234 2.95385 10.6791C2.53661 10.0438 2.54561 9.18863 3.00507 8.51227C3.10993 8.35791 3.27224 8.19244 3.69924 7.76544L4.31796 7.14672ZM9.62172 6.08558C9.81698 5.89032 9.81698 5.57373 9.62172 5.37847C9.42646 5.18321 9.10988 5.18321 8.91461 5.37847L5.37908 8.91401C5.18382 9.10927 5.18382 9.42585 5.37908 9.62111C5.57434 9.81637 5.89092 9.81637 6.08619 9.62111L9.62172 6.08558Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),Qo=["color"],ei=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Ko(e,Qo);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),ti=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}},ni={"text/plain":"Text","text/html":"Url",default:"Text"};var ri=function(e,t){var n,r,o,i,a,l,c=!1;t||(t={}),n=t.debug||!1;try{if(o=ti(),i=document.createRange(),a=document.getSelection(),(l=document.createElement("span")).textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=ni[t.format]||ni.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),i.selectNodeContents(l),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),l&&document.body.removeChild(l),o()}return c};function oi(e){if(!e)return;const t=Object.keys(e);return 1===t.length?t[0]:t.find((t=>e[t].asRoot))}function ii(e){if(!e)return;const t=oi(e);return t?e[t]:void 0}const ai=i(void 0),li=({children:r,tools:o})=>{const i=d((()=>o?Object.keys(o).reduce(((e,t)=>{var n;return Object.assign(Object.assign({},e),{[t]:null===(n=o[t])||void 0===n?void 0:n.render})}),{}):{}),[o]),a=d((()=>o?Object.keys(o).map((t=>{var n,r,i;const a=null===(n=null==o?void 0:o[t])||void 0===n?void 0:n.tool,l=null===(r=null==o?void 0:o[t])||void 0===r?void 0:r.render,c=null===(i=null==o?void 0:o[t])||void 0===i?void 0:i.props;return a?e(a,Object.assign({render:l},c),t):null})):null),[d]);return e(ai.Provider,Object.assign({value:i},{children:t(n,{children:[a,r]})}))},ci=()=>{const e=a(ai);if(void 0===e)throw new Error("useYooptaTools must be used within a ToolsProvider");return e},si=({children:t})=>e("div",Object.assign({className:"flex flex-col"},{children:t})),di=({children:t})=>e("div",Object.assign({onClick:e=>e.stopPropagation(),className:"bg-[#FFF] relative min-w-[200px] w-auto overflow-hidden rounded-md border bg-popover py-[6px] px-0 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"},{children:t})),ui=({children:t})=>e("div",Object.assign({className:"relative flex cursor-default select-none items-center text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50"},{children:t})),fi=({isOpen:n,onClose:r,refs:o,style:i,children:a})=>{var l;const c=z(),s=ci(),[d,u]=f(!1),{refs:p,floatingStyles:h,context:g}=Io({placement:"right",open:d,onOpenChange:u,middleware:[Hr(),Fr(),zr(),kr(10)],whileElementsMounted:Ir}),{isMounted:v,styles:m}=Vo(g,{duration:100});if(!n)return null;const b=N(c,{at:c.selection}),y=ii(c.blocks[(null==b?void 0:b.type)||""].elements),w="void"===(null===(l=null==y?void 0:y.props)||void 0===l?void 0:l.nodeType),x=s.ActionMenu,k=Object.assign(Object.assign({},h),m);return e(Lo,Object.assign({root:document.getElementById("yoopta-editor")},{children:e(Po,Object.assign({lockScroll:!0,className:"z-[100]",onClick:r},{children:e("div",Object.assign({style:i,ref:o.setFloating},{children:t(di,{children:[t(si,{children:[e(ui,{children:t("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>{const e=c.selection;c.deleteBlock({at:e}),c.setBlockSelected(null),c.setSelection(null),r()}},{children:[e(ei,{className:"w-4 h-4 mr-2"}),"Delete"]}))}),e(ui,{children:t("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>{c.duplicateBlock({at:c.selection,focus:!0}),c.setBlockSelected(null),r()}},{children:[e(Zo,{className:"w-4 h-4 mr-2"}),"Duplicate"]}))}),!w&&t(ui,{children:[v&&!!x&&e(Lo,Object.assign({root:document.getElementById("yoopta-editor")},{children:e(Po,Object.assign({lockScroll:!0,className:"z-[100]",onClick:()=>u(!1)},{children:e("div",Object.assign({style:k,ref:p.setFloating},{children:e(x,{actions:Object.keys(c.blocks),editor:c,selectedAction:"",onClose:()=>{u(!1),r()},empty:!1,onMouseEnter:()=>{},mode:"toggle"})}))}))})),t("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",ref:p.setReference,onClick:()=>u((e=>!e))},{children:[e(Xo,{className:"w-4 h-4 mr-2"}),"Turn into"]}))]}),e(ui,{children:t("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>{const e=N(c);e&&ri(`${window.location.origin}${window.location.pathname}#${e.id}`),r()}},{children:[e(Jo,{className:"w-4 h-4 mr-2"}),"Copy link to block"]}))})]}),a]})}))}))}))};var pi=Object.freeze({__proto__:null,BlockOptions:fi,BlockOptionsMenuContent:di,BlockOptionsMenuGroup:si,BlockOptionsMenuItem:ui,BlockOptionsSeparator:({className:t})=>e("div",{className:`h-[1px] bg-[#37352f14] my-[4px] w-full ${t}`})});function hi(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var gi={actions:"vuZgncnq",hovered:"_8Eqjiv7m",actionButton:"WabGEp54",plusButton:"_0C8RpLmz"};function vi(...e){return e.filter(Boolean).join(" ")}hi(".vuZgncnq{display:flex;left:-50px;opacity:0;position:absolute;top:2px;transition:opacity .18s ease-in}._8Eqjiv7m{opacity:1}.WabGEp54{all:unset;align-items:center;background-color:inherit;background-color:transparent;border-radius:6px;color:rgba(55,53,47,.35);cursor:pointer;display:flex;height:24px;justify-content:center;margin:0 1px;padding:0;position:relative;transition:background-color .18s cubic-bezier(.4,0,.2,1);width:auto;width:18px}.WabGEp54:active,.WabGEp54:focus,.WabGEp54:hover{background-color:rgba(55,54,47,.08)}._0C8RpLmz{width:24px}");const mi=({block:n,editor:r,dragHandleProps:o,showActions:i,onChangeActiveBlock:a})=>{const[l,c]=f(!1),{refs:s,floatingStyles:d,context:u}=Io({placement:"right-start",open:l,onOpenChange:c,middleware:[Hr(),Fr(),zr(),kr()]}),{isMounted:p,styles:h}=Vo(u,{duration:100}),{setActivatorNodeRef:g,attributes:v,listeners:m}=o,b=Object.assign(Object.assign({},d),h);return t("div",Object.assign({contentEditable:!1,className:vi(gi.actions,i&&gi.hovered,"yoopta-element-actions")},{children:[e("button",Object.assign({type:"button",onClick:()=>{const e=Q({id:G()}),t=[n.meta.order+1];r.setSelection([n.meta.order]),r.insertBlock(e,{at:t,focus:!0})},className:vi(gi.actionButton,gi.plusButton,"yoopta-element-actions-plus")},{children:e(Nn,{})})),e("button",Object.assign({type:"button",className:vi(gi.actionButton,"yoopta-element-actions-drag"),ref:e=>{g(e),s.setReference(e)}},v,m,{onClick:e=>{e.stopPropagation(),a(n.id);const t=Mn(r,{at:[n.meta.order]});r.focusBlock(n.id),t&&setTimeout((()=>{x.blur(t),x.deselect(t),R.deselect(t),r.setBlockSelected([n.meta.order],{only:!0}),r.setSelection([n.meta.order]),c(!0)}),10)}},{children:e(An,{})})),e(fi,{isOpen:p,refs:s,style:b,onClose:()=>c(!1)})]}))},bi=({children:n,block:r,blockId:o})=>{var i;const a=z(),[l,c]=f(null),{attributes:s,listeners:d,setNodeRef:u,setActivatorNodeRef:p,transform:h,transition:g,active:v,over:m,isOver:b,isDragging:y}=Sn({id:o}),w={transform:h?`translate3d(${h.x}px, ${h.y}px, 0)`:"none",transition:g,opacity:y?.7:1,marginLeft:20*r.meta.depth+"px"},x=null===(i=a.selectedBlocks)||void 0===i?void 0:i.includes(r.meta.order),k=l===o,E=e=>c(e);return t("div",Object.assign({className:"relative py-0 px-[2px] mt-[2px] mb-[1px] rounded yoopta-block-wrapper",onMouseEnter:()=>E(o),onMouseLeave:()=>c(null),"data-yoopta-block-id":o,style:w,"data-yoopta-block":!0,ref:u},{children:[e(mi,{block:r,editor:a,dragHandleProps:{setActivatorNodeRef:p,attributes:s,listeners:d},showActions:k,onChangeActiveBlock:E}),e("div",Object.assign({className:gi.content,style:{borderBottom:b&&!y?"2px solid #007aff":"none"}},{children:n})),x&&e("div",{className:"absolute left-0 top-0 bg-[#2383e224] z-[90] rounded opacity-100 h-full w-full pointer-events-none yoopta-selection-block"})]}))};function yi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var wi={};Object.defineProperty(wi,"__esModule",{value:!0});for(var xi="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),ki={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Ei={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:xi?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Ci={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},Si=1;Si<20;Si++)Ci["f"+Si]=111+Si;function Oi(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return _i(e,t)})),o=function(e){return r.some((function(t){return Di(t,e)}))};return null==n?o:o(n)}function _i(e,t){var n=t&&t.byKey,r={},o=(e=e.replace("++","+add")).split("+"),i=o.length;for(var a in ki)r[ki[a]]=!1;var l=!0,c=!1,s=void 0;try{for(var d,u=o[Symbol.iterator]();!(l=(d=u.next()).done);l=!0){var f=d.value,p=f.endsWith("?")&&f.length>1;p&&(f=f.slice(0,-1));var h=ji(f),g=ki[h];if(f.length>1&&!g&&!Ei[f]&&!Ci[h])throw new TypeError('Unknown modifier: "'+f+'"');1!==i&&g||(n?r.key=h:r.which=Ri(f)),g&&(r[g]=!p||null)}}catch(e){c=!0,s=e}finally{try{!l&&u.return&&u.return()}finally{if(c)throw s}}return r}function Di(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function Ri(e){return e=ji(e),Ci[e]||e.toUpperCase().charCodeAt(0)}function ji(e){return e=e.toLowerCase(),e=Ei[e]||e}wi.default=Oi,wi.isHotkey=Oi,wi.isCodeHotkey=function(e,t){return Oi(e,t)};var Bi=wi.isKeyHotkey=function(e,t){return Oi(e,{byKey:!0},t)};wi.parseHotkey=_i,wi.compareHotkey=Di,wi.toKeyCode=Ri,wi.toKeyName=ji;const Ti={bold:"mod+b",italic:"mod+i",compose:["down","left","right","up","backspace","enter"],arrowLeft:"left",arrowUp:"up",arrowDown:"down",arrowRight:"right",ctrlLeft:"ctrl+left",escape:"esc",ctrlRight:"ctrl+right",deleteBackward:"shift?+backspace",backspace:"backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",shiftEnter:"shift+enter",enter:"enter",space:"space",undo:"mod+z",select:"mod+a",shiftTab:"shift+tab",shiftArrowUp:"shift+up",shiftArrowDown:"shift+down",tab:"tab",cmd:"mod",cmdEnter:"mod+enter",slashCommand:"/",kekCeburek:"mod+enter"},Ai={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"},Li={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ni=e=>{const t=Ti[e],n=Ai[e],r=Li[e],o=t&&Bi(t),i=n&&Bi(n),a=r&&Bi(r);return e=>!(!o||!o(e))||(!(!i||!i(e))||!(!a||!a(e)))},Mi={isBold:Ni("bold"),isCompose:Ni("compose"),isArrowLeft:Ni("arrowLeft"),isArrowRight:Ni("arrowRight"),isArrowUp:Ni("arrowUp"),isArrowDown:Ni("arrowDown"),isDeleteBackward:Ni("deleteBackward"),isDeleteForward:Ni("deleteForward"),isDeleteLineBackward:Ni("deleteLineBackward"),isDeleteLineForward:Ni("deleteLineForward"),isDeleteWordBackward:Ni("deleteWordBackward"),isDeleteWordForward:Ni("deleteWordForward"),isExtendBackward:Ni("extendBackward"),isExtendForward:Ni("extendForward"),isExtendLineBackward:Ni("extendLineBackward"),isExtendLineForward:Ni("extendLineForward"),isItalic:Ni("italic"),isMoveLineBackward:Ni("moveLineBackward"),isMoveLineForward:Ni("moveLineForward"),isCtrlLeft:Ni("ctrlLeft"),isCtrlRight:Ni("ctrlRight"),isRedo:Ni("redo"),isShiftEnter:Ni("shiftEnter"),isEnter:Ni("enter"),isTransposeCharacter:Ni("transposeCharacter"),isUndo:Ni("undo"),isSpace:Ni("space"),isSelect:Ni("select"),isTab:Ni("tab"),isShiftTab:Ni("shiftTab"),isBackspace:Ni("backspace"),isCmdEnter:Ni("cmdEnter"),isCmd:Ni("cmd"),isEscape:Ni("escape"),isSlashCommand:Ni("slashCommand"),isShiftArrowUp:Ni("shiftArrowUp"),isShiftArrowDown:Ni("shiftArrowDown"),isKekceburek:Ni("kekCeburek")};const Pi={onKeyDown:function(e){return t=>{const n=Mn(e,{at:e.selection});if(!n||!n.selection)return;const r=O.parent(n.selection.anchor.path);if(Mi.isShiftEnter(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void n.insertText("\n")}if(Mi.isEnter(t)){if(t.isDefaultPrevented())return;t.preventDefault();const o=_.isStart(n,n.selection.anchor,r),i=_.isEnd(n,n.selection.anchor,r);if(!o&&!i)return void e.splitBlock({slate:n,focus:!0});const a=Q({id:G()}),l=e.selection?[e.selection[0]+1]:[0];e.insertBlock(a,{at:l,slate:n,focus:!0})}else if(Mi.isBackspace(t)){if(t.isDefaultPrevented())return;const r=O.parent(n.selection.anchor.path);if(_.isStart(n,n.selection.anchor,r)){t.preventDefault();const o=_.string(n,r),i=e.selection?e.selection[0]-1:0,a=Mn(e,{at:[i]});let l;if(a&&(l=function(e,t){const[,n]=_.last(e,t);return{path:n,offset:_.string(e,n).length}}(a,r)),0===o.trim().length)return e.deleteBlock({at:e.selection,focus:!0,focusAt:l});{if(j.isExpanded(n.selection))return R.delete(n,{at:n.selection});if(!a)return;if(0===_.string(a,[0,0]).length)return e.deleteBlock({at:[i],focus:!0,focusAt:l});const t=Array.from(_.nodes(n,{at:[0],match:e=>!_.isEditor(e)&&(B.isText(e)||_.isInline(n,e)),mode:"highest"})).map((([e])=>e));return R.insertNodes(a,t,{at:_.end(a,[])}),e.deleteBlock({at:e.selection,focus:!0,focusAt:l})}}}else{if(Mi.isSelect(t)){if(t.isDefaultPrevented())return;const[,r]=_.first(n,[0]),[,o]=_.last(n,[n.children.length-1]),i=_.range(n,r,o),a=j.equals(n.selection,i);if(j.isExpanded(n.selection)&&a)return t.preventDefault(),x.blur(n),x.deselect(n),R.deselect(n),void e.setBlockSelected([],{allSelected:!0})}if(Mi.isShiftTab(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void e.decreaseBlockDepth()}if(Mi.isTab(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void e.increaseBlockDepth()}if(Mi.isArrowUp(t)){if(t.isDefaultPrevented())return;const r=O.parent(n.selection.anchor.path);if(_.isStart(n,n.selection.anchor,r)){const n=e.selection?[e.selection[0]-1]:null,r=Mn(e,{at:n}),o=N(e,{at:n});if(r&&o){const[,n]=_.last(r,[0]),i={path:n,offset:_.string(r,n).length};return t.preventDefault(),void e.focusBlock(o.id,{focusAt:i,waitExecution:!1,shouldUpdateBlockSelection:!0})}}}if(Mi.isArrowDown(t)){const r=O.parent(n.selection.anchor.path);if(_.isEnd(n,n.selection.anchor,r)){const n=e.selection?[e.selection[0]+1]:null,o=Mn(e,{at:n}),i=N(e,{at:n});if(o&&i){const n=function(e,t){const[,n]=_.first(e,t);return{path:n,offset:0}}(o,r);return t.preventDefault(),void e.focusBlock(i.id,{focusAt:n,waitExecution:!1})}}}if(j.isExpanded(n.selection)){if(Object.values(e.formats).length>0)for(const n of Object.values(e.formats))if(n.hotkey&&Bi(n.hotkey)(t)){t.preventDefault(),e.formats[n.type].toggle();break}}}}}},Ii=({children:t,attributes:n,placeholder:r})=>{const o=k(),i=Object.assign({},n);return o&&r&&(i["data-placeholder"]=r,i.className="yoopta-placeholder"),e("span",Object.assign({},i,{children:t}))},zi=({id:t,customEditor:r,elements:o,marks:i,events:a,options:c,placeholder:s="Type '/' for commands"})=>{const u=z(),f=F(t),p=l(f.value).current,h=f.type,g=d((()=>(e=>{const t={};return Object.keys(e).forEach((n=>t[n]=e[n].render)),t})(o)),[o]),v=d((()=>(e=>{const t={};return e?(e.forEach((e=>t[e.type]=e)),t):t})(i)),[i]),m=d((()=>{let e=u.blockEditorsMap[t];return Object.keys(o).forEach((t=>{var n;const r=null===(n=o[t].props)||void 0===n?void 0:n.nodeType,i="inline"===r,a="void"===r,l="inlineVoid"===r;l&&(e.markableVoid=e=>e.type===t),(a||l)&&(e.isVoid=e=>e.type===t),(i||l)&&(e.isInline=e=>e.type===t)})),e}),[]),b=d((()=>{if(!a)return{};const e={hotkeys:Mi,currentBlock:f,defaultBlock:Q({id:G()})},t={};return Object.keys(a).forEach((n=>{t[n]=function(t){if(a[n]){a[n](u,m,e)(t)}}})),t}),[a,u,f]);return e("div",Object.assign({"data-plugin-id":t,"data-plugin-type":h},{children:e(Fi,{id:t,slate:m,initialValue:p,onChange:e=>u.updateBlock(t,{value:e}),decorate:e=>{var t;const n=[],[r,o]=e,i=(null===(t=u.selection)||void 0===t?void 0:t[0])===f.meta.order;return m.selection&&i&&!_.isEditor(r)&&""===_.string(m,[o[0]])&&j.includes(m.selection,o)&&j.isCollapsed(m.selection)&&n.push(Object.assign(Object.assign({},m.selection),{withPlaceholder:!0})),n},renderLeaf:t=>{var n,r,o,i,a;let{children:l,leaf:c,attributes:d}=t;const p=yi(c,["text"]),h=(null===(n=u.selection)||void 0===n?void 0:n[0])===f.meta.order;p&&Object.keys(p).forEach((e=>{const t=v[e];t&&(l=t.render({children:l,leaf:c}))}));const g=!("void"===(null===(a=null===(i=null===(o=null===(r=t.children)||void 0===r?void 0:r.props)||void 0===o?void 0:o.parent)||void 0===i?void 0:i.props)||void 0===a?void 0:a.nodeType))&&h&&c.withPlaceholder;return e(Ii,Object.assign({attributes:d,placeholder:g?s:void 0},{children:l}))},renderElement:r=>{const o=g[r.element.type];return o?e(o,Object.assign({},r,{blockId:t,options:c})):e(n,{})},eventHandlers:b,onKeyDown:e=>{var t;null===(t=b.onKeyDown)||void 0===t||t.call(b,e),Pi.onKeyDown(u)(e)},onKeyUp:e=>{var t;null===(t=null==b?void 0:b.onKeyUp)||void 0===t||t.call(b,e)},onFocus:e=>{var t;null===(t=null==b?void 0:b.onFocus)||void 0===t||t.call(b,e)},onMouseDown:e=>{var t,n;(null===(t=u.selection)||void 0===t?void 0:t[0])!==f.meta.order&&u.setSelection([f.meta.order]),null===(n=null==b?void 0:b.onMouseDown)||void 0===n||n.call(b,e)},onBlur:e=>{var t;e.preventDefault(),null===(t=null==b?void 0:b.onBlur)||void 0===t||t.call(b,e)},customEditor:r})}))},Fi=p((({id:t,slate:n,initialValue:r,onChange:o,renderLeaf:i,renderElement:a,eventHandlers:l,onKeyDown:c,onKeyUp:s,onFocus:d,onMouseDown:u,onBlur:f,customEditor:p,decorate:h})=>e(E,Object.assign({editor:n,initialValue:r,onChange:o},{children:e(C,Object.assign({renderElement:a,renderLeaf:i,className:"focus-visible:outline-none focus:outline-none",spellCheck:!0},l,{onKeyDown:c,onKeyUp:s,onFocus:d,onMouseDown:u,decorate:h,onBlur:f,onPaste:e=>{const t=e.clipboardData.getData("text/html"),n=(new DOMParser).parseFromString(t,"text/html");if(n.body.childNodes.length>0){e.preventDefault();const t={H1:"HeadingOne",H2:"HeadingTwo",H3:"HeadingThree",P:"Paragraph",OL:"NumberedList",UL:"BulletedList",BLOCKQUOTE:"Blockquote"},r=Array.from(n.body.childNodes).map(((e,n)=>{if(t[e.nodeName]){const r=t[e.nodeName];return Q({id:G(),type:r,value:[],meta:{order:n,depth:0}})}})).filter(Boolean);console.log("nodes",r),console.log("parsetHTML.body",n.body)}}}),`editable-${t}`)}),`slate-${t}`)));Fi.displayName="SlateEditorInstance";const Hi=({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(Ct,{activationConstraint:{delay:100,tolerance:0}}),Ae(yt,{coordinateGetter:Dn})),handleDragEnd:u((t=>{const{active:n,over:r}=t;if(n&&r&&n.id!==r.id){const t=e.children[r.id].meta.order;e.moveBlock(n.id,[t])}}),[]),handleDragStart:u((t=>{e.setBlockSelected(null)}),[])}),Vi=[],Ui=({editor:t,marks:n})=>{const{sensors:r,handleDragEnd:o,handleDragStart:i}=Hi({editor:t}),a=Object.keys(t.children),l=d((()=>0===a.length?Vi:a.sort(((e,n)=>t.children[e].meta.order-t.children[n].meta.order))),[a]),c=[];for(let r=0;r<l.length;r++){const o=l[r],i=t.children[o],a=t.plugins[i.type];i&&a?c.push(e(bi,Object.assign({block:i,blockId:o},{children:e(zi,{type:i.type,id:o,marks:n,events:a.events,elements:a.elements,options:a.options},o)}),o)):console.error(`Plugin ${i.type} not found`)}return e(nn,Object.assign({sensors:r,collisionDetection:He,onDragStart:i,onDragEnd:o},{children:e(bn,Object.assign({items:l,strategy:gn},{children:c}))}))},Wi=({editor:e,yooptaEditorRef:t,root:n})=>{const[r,o]=f({origin:[0,0],coords:[0,0],selection:!1}),i=n=>{var i;const a=null===(i=t.current)||void 0===i?void 0:i.contains(n.target);if(!a&&!r.selection&&Array.isArray(e.selectedBlocks)&&e.selectedBlocks.length>0)return e.setBlockSelected(null),c();a||o({origin:[n.pageX,n.pageY-window.pageYOffset],coords:[n.pageX,n.pageY-window.pageYOffset],selection:!0})},a=t=>{if(!r.selection)return;o((e=>Object.assign(Object.assign({},e),{coords:[t.pageX,t.pageY-window.pageYOffset]})));const n=((e,t)=>{const n=[];return document.querySelectorAll("[data-yoopta-block]").forEach(((r,o)=>{if(!r)return;const i=r.getBoundingClientRect(),a=Math.min(e[1],t[1]),l=Math.min(e[0],t[0]),c=Math.max(e[1],t[1]),s=Math.max(e[0],t[0]);a<i.bottom&&c>i.top&&l<i.right&&s>i.left&&n.push(o)})),n})(r.origin,[t.pageX,t.pageY-window.pageYOffset]);e.setBlockSelected(n,{only:!0})},l=()=>{c()};s((()=>{var e;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===(e=t.current)||void 0===e?void 0:e.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,r,n]);const c=()=>{o({origin:[0,0],coords:[0,0],selection:!1})};return Object.assign(Object.assign({},r),{onClose:c})},Xi=({origin:t,coords:n,isOpen:r})=>{if(!r)return null;const o={zIndex:10,left:t[0],top:t[1],height:Math.abs(n[1]-t[1]-1),width:Math.abs(n[0]-t[0]-1),userSelect:"none",transformOrigin:"top left",transform:t[1]>n[1]&&t[0]>n[0]?"scaleY(-1) scaleX(-1)":t[1]>n[1]?"scaleY(-1)":t[0]>n[0]?"scaleX(-1)":void 0,position:"fixed",backgroundColor:"rgba(35, 131, 226, 0.14)"};return e("div",{style:o})},Ki={selectionStarted:!1,indexToSelect:null,startedIndexToSelect:null},Yi=({marks:n,className:r,autoFocus:o=!0,selectionBoxRoot:i})=>{const a=z(),c=l(null),d=Wi({editor:a,yooptaEditorRef:c,root:i});let u=l(Ki).current;s((()=>{if(!o)return;const e=N(a,{at:[0]});e&&a.focusBlock(e.id,{waitExecution:!0})}),[o]),s((()=>(document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h))),[a.selectedBlocks]);const f=()=>{Array.isArray(a.selectedBlocks)&&a.selectedBlocks.length>0&&a.setBlockSelected(null)},p=()=>{u.indexToSelect=null,u.startedIndexToSelect=null,u.selectionStarted=!1},h=e=>{var t,n,r,o,i;if(Mi.isSelect(e)){if((null===(t=a.selectedBlocks)||void 0===t?void 0:t.length)===Object.keys(a.children).length)return void e.preventDefault();if(u.selectionStarted)return e.preventDefault(),void a.setBlockSelected([],{allSelected:!0})}if(Mi.isBackspace(e)){e.stopPropagation();if(Array.isArray(a.selectedBlocks)&&(null===(n=a.selectedBlocks)||void 0===n?void 0:n.length)===Object.keys(a.children).length)return e.preventDefault(),a.deleteBlock({deleteAll:!0}),a.setBlockSelected(null),void p();if(Array.isArray(a.selectedBlocks)&&(null===(r=a.selectedBlocks)||void 0===r?void 0:r.length)>0)return e.preventDefault(),a.deleteBlock({fromPaths:a.selectedBlocks}),a.setBlockSelected(null),void p()}if(Mi.isShiftArrowUp(e)){if("function"==typeof e.isDefaultPrevented&&e.isDefaultPrevented())return;if(u.selectionStarted&&null!==u.startedIndexToSelect&&null!==u.indexToSelect){const e=u.indexToSelect,t=e-1;if(0===e)return;if(e===u.startedIndexToSelect)return a.setBlockSelected([t]),void(u.indexToSelect=t);if(t<u.startedIndexToSelect)return a.setBlockSelected([t]),void(u.indexToSelect=t);if((null===(o=a.selectedBlocks)||void 0===o?void 0:o.includes(e))&&e!==u.startedIndexToSelect){const n=a.selectedBlocks.filter((t=>t!==e));return a.setBlockSelected(n,{only:!0}),void(u.indexToSelect=t)}return}const t=N(a),n=Mn(a);if(!n||!n.selection||!t)return;const r=O.parent(n.selection.anchor.path),i=_.isStart(n,n.selection.focus,r);if(j.isExpanded(n.selection)&&i){const r=a.selection?[a.selection[0]-1]:[0],o=N(a,{at:r});t&&o&&(e.preventDefault(),x.blur(n),x.deselect(n),R.deselect(n),a.setSelection(null),a.setBlockSelected([null==t?void 0:t.meta.order,(null==t?void 0:t.meta.order)-1]),u.startedIndexToSelect=t.meta.order,u.indexToSelect=t.meta.order-1,u.selectionStarted=!0)}}if(Mi.isShiftArrowDown(e)){if(u.selectionStarted&&null!==u.indexToSelect&&null!==u.startedIndexToSelect){const e=u.indexToSelect,t=e+1;if(t===Object.keys(a.children).length)return;if(e===u.startedIndexToSelect)return a.setBlockSelected([t]),void(u.indexToSelect=t);if(t>u.startedIndexToSelect)return a.setBlockSelected([t]),void(u.indexToSelect=t);if((null===(i=a.selectedBlocks)||void 0===i?void 0:i.includes(e))&&e!==u.startedIndexToSelect){const n=a.selectedBlocks.filter((t=>t!==e));return a.setBlockSelected(n,{only:!0}),void(u.indexToSelect=t)}return}const t=N(a),n=Mn(a);if(!n||!n.selection||!t)return;const r=O.parent(n.selection.anchor.path),o=_.isEnd(n,n.selection.focus,r);if(j.isExpanded(n.selection)&&o){const r=a.selection?[a.selection[0]+1]:[0],o=N(a,{at:r});t&&o&&(e.preventDefault(),x.blur(n),x.deselect(n),R.deselect(n),a.setSelection(null),a.setBlockSelected([null==t?void 0:t.meta.order,(null==t?void 0:t.meta.order)+1]),u.startedIndexToSelect=t.meta.order,u.indexToSelect=t.meta.order+1,u.selectionStarted=!0)}}},g=(v={userSelect:d.selection?"none":"auto",pointerEvents:d.selection?"none":"auto"},Object.assign({paddingBottom:150},v));var v;return t("div",Object.assign({id:"yoopta-editor",className:r,style:g,ref:c,onClick:e=>{p(),(e=>{var t;const n=c.current;if(!n)return;const{bottom:r}=n.getBoundingClientRect(),o=r-parseInt(getComputedStyle(n).paddingBottom,10);if(e.clientY>=o){const e=Object.keys(a.children).length-1,n=N(a,{at:[e]}),r=Mn(a,{at:[e]});if(n&&r&&r.selection){const e=_.string(r,r.selection.anchor.path),o=O.parent(r.selection.anchor.path),[i]=_.node(r,o);if(D.isElement(i)&&"void"!==(null===(t=i.props)||void 0===t?void 0:t.nodeType)&&0===e.trim().length)return void a.focusBlock(n.id,{slate:r})}const o=Q({id:G()}),i=e+1;a.insertBlock(o,{at:[i],focus:!0})}})(e),f()},onBlur:e=>{var t;(null===(t=c.current)||void 0===t?void 0:t.contains(e.relatedTarget))||(p(),f())}},{children:[e(Ui,{editor:a,marks:n}),e(Xi,{origin:d.origin,coords:d.coords,isOpen:d.selection})]}))},Zi=({children:e,fallback:t=null})=>{const[n,r]=f(!1);return s((()=>r(!0)),[]),n?e:t};var qi=Symbol.for("immer-nothing"),$i=Symbol.for("immer-draftable"),Gi=Symbol.for("immer-state");function Ji(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Qi=Object.getPrototypeOf;function ea(e){return!!e&&!!e[Gi]}function ta(e){return!!e&&(ra(e)||Array.isArray(e)||!!e[$i]||!!e.constructor?.[$i]||ca(e)||sa(e))}var na=Object.prototype.constructor.toString();function ra(e){if(!e||"object"!=typeof e)return!1;const t=Qi(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)===na}function oa(e,t){0===ia(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function ia(e){const t=e[Gi];return t?t.type_:Array.isArray(e)?1:ca(e)?2:sa(e)?3:0}function aa(e,t){return 2===ia(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function la(e,t,n){const r=ia(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function ca(e){return e instanceof Map}function sa(e){return e instanceof Set}function da(e){return e.copy_||e.base_}function ua(e,t){if(ca(e))return new Map(e);if(sa(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&ra(e)){if(!Qi(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const n=Object.getOwnPropertyDescriptors(e);delete n[Gi];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],i=n[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Qi(e),n)}function fa(e,t=!1){return ha(e)||ea(e)||!ta(e)||(ia(e)>1&&(e.set=e.add=e.clear=e.delete=pa),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>fa(t,!0)))),e}function pa(){Ji(2)}function ha(e){return Object.isFrozen(e)}var ga,va={};function ma(e){const t=va[e];return t||Ji(0),t}function ba(){return ga}function ya(e,t){t&&(ma("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function wa(e){xa(e),e.drafts_.forEach(Ea),e.drafts_=null}function xa(e){e===ga&&(ga=e.parent_)}function ka(e){return ga={drafts_:[],parent_:ga,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ea(e){const t=e[Gi];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Ca(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Gi].modified_&&(wa(t),Ji(4)),ta(e)&&(e=Sa(t,e),t.parent_||_a(t,e)),t.patches_&&ma("Patches").generateReplacementPatches_(n[Gi].base_,e,t.patches_,t.inversePatches_)):e=Sa(t,n,[]),wa(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qi?e:void 0}function Sa(e,t,n){if(ha(t))return t;const r=t[Gi];if(!r)return oa(t,((o,i)=>Oa(e,r,t,o,i,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return _a(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,i=!1;3===r.type_&&(o=new Set(t),t.clear(),i=!0),oa(o,((o,a)=>Oa(e,r,t,o,a,n,i))),_a(e,t,!1),n&&e.patches_&&ma("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Oa(e,t,n,r,o,i,a){if(ea(o)){const a=Sa(e,o,i&&t&&3!==t.type_&&!aa(t.assigned_,r)?i.concat(r):void 0);if(la(n,r,a),!ea(a))return;e.canAutoFreeze_=!1}else a&&n.add(o);if(ta(o)&&!ha(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Sa(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||_a(e,o)}}function _a(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&fa(t,n)}var Da={get(e,t){if(t===Gi)return e;const n=da(e);if(!aa(n,t))return function(e,t,n){const r=Ba(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!ta(r)?r:r===ja(e.base_,t)?(Aa(e),e.copy_[t]=La(r,e)):r},has:(e,t)=>t in da(e),ownKeys:e=>Reflect.ownKeys(da(e)),set(e,t,n){const r=Ba(da(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=ja(da(e),t),a=r?.[Gi];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((o=n)===(i=r)?0!==o||1/o==1/i:o!=o&&i!=i)&&(void 0!==n||aa(e.base_,t)))return!0;Aa(e),Ta(e)}var o,i;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==ja(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Aa(e),Ta(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=da(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){Ji(11)},getPrototypeOf:e=>Qi(e.base_),setPrototypeOf(){Ji(12)}},Ra={};function ja(e,t){const n=e[Gi];return(n?da(n):e)[t]}function Ba(e,t){if(!(t in e))return;let n=Qi(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Qi(n)}}function Ta(e){e.modified_||(e.modified_=!0,e.parent_&&Ta(e.parent_))}function Aa(e){e.copy_||(e.copy_=ua(e.base_,e.scope_.immer_.useStrictShallowCopy_))}oa(Da,((e,t)=>{Ra[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ra.deleteProperty=function(e,t){return Ra.set.call(this,e,t,void 0)},Ra.set=function(e,t,n){return Da.set.call(this,e[0],t,n,e[0])};function La(e,t){const n=ca(e)?ma("MapSet").proxyMap_(e,t):sa(e)?ma("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ba(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=Da;n&&(o=[r],i=Ra);const{revoke:a,proxy:l}=Proxy.revocable(o,i);return r.draft_=l,r.revoke_=a,l}(e,t);return(t?t.scope_:ba()).drafts_.push(n),n}function Na(e){if(!ta(e)||ha(e))return e;const t=e[Gi];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ua(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ua(e,!0);return oa(n,((e,t)=>{la(n,e,Na(t))})),t&&(t.finalized_=!1),n}var Ma=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&Ji(6),void 0!==n&&"function"!=typeof n&&Ji(7),ta(e)){const o=ka(this),i=La(e,void 0);let a=!0;try{r=t(i),a=!1}finally{a?wa(o):xa(o)}return ya(o,n),Ca(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===qi&&(r=void 0),this.autoFreeze_&&fa(r,!0),n){const t=[],o=[];ma("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}Ji(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ta(e)||Ji(8),ea(e)&&(e=function(e){ea(e)||Ji(10);return Na(e)}(e));const t=ka(this),n=La(e,void 0);return n[Gi].isManual_=!0,xa(t),n}finishDraft(e,t){const n=e&&e[Gi];n&&n.isManual_||Ji(9);const{scope_:r}=n;return ya(r,t),Ca(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=ma("Patches").applyPatches_;return ea(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};Ma.produce,Ma.produceWithPatches.bind(Ma),Ma.setAutoFreeze.bind(Ma),Ma.setUseStrictShallowCopy.bind(Ma),Ma.applyPatches.bind(Ma);var Pa=Ma.createDraft.bind(Ma),Ia=Ma.finishDraft.bind(Ma);function za(e,t){const n=Mn(e);if(!n)return!1;const r=_.marks(n);return!!(null==r?void 0:r[t])}const Fa=(e,t)=>{const{insertText:n}=t;return t.insertText=r=>{var o;const{selection:i}=t;if(" "===r&&i&&j.isCollapsed(i)){const{anchor:a}=i,l=_.above(t,{match:e=>D.isElement(e)&&_.isBlock(t,e),mode:"lowest"});if(!l)return;const[,c]=l,s=_.parent(t,c),[d]=s;if(D.isElement(d)&&!B.isText(d.children[0]))return n(r);const u=l?c:[],f={anchor:a,focus:_.start(t,u)},p=_.string(t,f),h=null===(o=e.shortcuts)||void 0===o?void 0:o[p];if(!!h&&!h.isActive())return R.select(t,f),R.delete(t),void h.create({deleteText:!1})}n(r)},t};function Ha(e,t,n){e.children=Pa(e.children);let r=!1;const o=e.children[t];if(!o)throw Error(`Block with id ${t} not found`);n.id&&(o.id=n.id,r=!0),n.type&&(o.type=n.type,r=!0),n.meta&&(o.meta=n.meta,r=!0),n.value&&(o.value=n.value),e.children=Ia(e.children),r&&e.applyChanges(),e.emit("change",e.children)}function Va(e,t,n){e.children=Pa(e.children);const r=N(e,{at:e.selection});if(!r)throw new Error("Block from not found at current selection");const o=oi(e.blocks[r.type].elements);if(r.type===t)return void(e.children=Ia(e.children));const i=Mn(e,{at:[r.meta.order]});if(!i)throw new Error(`Slate not found for block in position ${r.meta.order}`);const a=oi(e.blocks[t].elements);_.withoutNormalizing(i,(()=>{const n=function(e,t={}){var n;const{at:r,elementType:o}=t,i=r||(null===(n=e.selection)||void 0===n?void 0:n.anchor.path);if(!i)return;let a=e=>!_.isEditor(e)&&D.isElement(e);o&&(a=e=>!_.isEditor(e)&&D.isElement(e)&&e.type===o);const l=O.parent(i),c=_.nodes(e,{at:l,match:a,mode:"lowest"});if(c){const[e]=c;return e}}(i,{elementType:o});console.log({fromBlockRootElementType:o,node:n}),R.setNodes(i,{type:a},{at:[0],mode:"lowest",match:e=>D.isElement(e)&&!_.isInline(i,e)});const l={id:r.id,type:t,meta:Object.assign(Object.assign({},r.meta),{order:r.meta.order}),value:i.children};e.blockEditorsMap[r.id]=i,e.children[r.id]=l,e.children=Ia(e.children),e.applyChanges(),e.emit("change",e.children)}))}function Ua(e,t={}){const{at:n=e.selection,deleteAll:r=!1,fromPaths:o,focus:i}=t;if(console.log("BEFORE options.focusAt",t.focusAt),Array.isArray(o)&&o.length>0){e.children=Pa(e.children),o.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=Ia(e.children),e.applyChanges(),void e.emit("change",e.children)}if(r||1===Object.keys(e.children).length){e.children={},e.blockEditorsMap={};const t=Q({id:G()}),n=Fa(e,S(T()));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=Pa(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=Ia(e.children),e.applyChanges(),e.emit("change",e.children),i){const n=e.selection?e.selection[0]-1:0,r=N(e,{at:[n]});r&&e.focusBlock(r.id,{focusAt:t.focusAt})}}function Wa(e,t){const n={};return t.forEach((t=>{const r=t.type;n[r]={hotkey:t.hotkey,type:r,getValue:()=>function(e,t){const n=Mn(e);if(!n)return null;const r=_.marks(n);return null==r?void 0:r[t]}(e,r),isActive:()=>za(e,r),toggle:()=>function(e,t){const n=Mn(e),r=za(e,t);n&&(r?_.removeMark(n,t):_.addMark(n,t,!0),e.applyChanges(),e.emit("change",e.children))}(e,r),update:t=>function(e,t,n){const r=Mn(e);r&&r.selection&&j.isExpanded(r.selection)&&(_.addMark(r,t,n),e.applyChanges(),e.emit("change",e.children))}(e,r,t)}})),n}function Xa(e,t){const n={};return t.forEach(((t,r)=>{var o;const i=ii(t.elements),a=null===(o=null==i?void 0:i.props)||void 0===o?void 0:o.nodeType;if(!("inline"===a||"inlineVoid"===a)){const r={};Object.keys(t.elements).forEach((e=>{const n=yi(t.elements[e],["render"]);r[e]=n}));const{display:o,placeholder:i,align:a,shortcuts:l}=t.options||{};n[t.type]={type:t.type,elements:r,options:{display:o,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)=>{Va(e,t)},create:n=>{!function(e,t,n){var r;e.children=Pa(e.children);const o=N(e);if(!o)throw new Error(`No block found in the current selection path. Passed path: ${e.selection}`);const i=(null==n?void 0:n.slate)||Mn(e,{at:[null==o?void 0:o.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===(r=c.props)||void 0===r?void 0:r.nodeType)||"block"},c.props),d=J({id:G(),type:l,props:s});R.setNodes(i,d,{at:[0,0],match:e=>D.isElement(e),mode:"highest"}),(null==n?void 0:n.deleteText)&&R.delete(i,{at:[0,0]});const u=Q({id:o.id,type:a.type,meta:{order:o.meta.order,depth:o.meta.depth},value:[d]}),f=u.id;e.children[f]=u,e.blockEditorsMap[f]=i,e.children=Ia(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)=>{Ha(e,t,n)},updateElement:(t,n,r)=>{!function(e,t,n,r){const o=e.children[t];if(!o)throw new Error(`Block with id ${t} not found`);const i=Mn(e,{at:[o.meta.order]});i?_.withoutNormalizing(i,(()=>{const[t]=_.nodes(i,{at:[0],match:e=>D.isElement(e)&&e.type===n}),o=null==t?void 0:t[0],a=(null==o?void 0:o.props)||{},l={props:Object.assign(Object.assign({},a),r)};R.setNodes(i,l,{at:[0],match:e=>D.isElement(e)&&e.type===n,mode:"lowest"}),e.applyChanges(),e.emit("change",e.children)})):console.warn("No slate found")}(e,t,n,r)},delete:t=>{Ua(e,t)}}}})),n}function Ka(e){return Fa(e,S(T()))}function Ya({type:e,hotkey:t,render:n}){return{type:e,hotkey:t,render:n}}const Za=Ya({type:"fakeSelection",render:t=>e("span",Object.assign({style:{backgroundColor:"#d7e6fa"}},{children:t.children}))});(()=>{const e=G();Q({id:e})})();const qa=new Y,$a=(e,t)=>qa.on(e,t),Ga=(e,t)=>qa.once(e,t),Ja=(e,t)=>qa.off(e,t),Qa=(e,t)=>qa.emit(e,t),el={KHF9aakNp1INUmXAKS4JE:{id:"KHF9aakNp1INUmXAKS4JE",value:[{id:"fd3_68eQjOTABJOZr8yzt",type:"paragraph",children:[{text:"s asdadsa das dsaa sadasasddas s"}],props:{nodeType:"block"}}],type:"Paragraph",meta:{order:0,depth:0}},cDa2jUsaTFieliDawr4ii:{id:"cDa2jUsaTFieliDawr4ii",value:[{id:"NuQr2bCo1JS-eV_TltZO0",type:"paragraph",children:[{text:"as ddassadasdsaddsasadasdsadsadsda dasd sadsadadsdsdsadsa as das "}],props:{nodeType:"block"}}],type:"Paragraph",meta:{order:1,depth:0}},lO4Rk_pd3De0UEbCLX0qP:{id:"lO4Rk_pd3De0UEbCLX0qP",value:[{id:"RbZHT0TSjCrEQBqS2xvNC",type:"paragraph",children:[{text:"asdas dsadasd asd sad"}],props:{nodeType:"block"}}],type:"Paragraph",meta:{order:2,depth:0}},"3BCXlvVkaVsyeUVdPJcSn":{id:"3BCXlvVkaVsyeUVdPJcSn",value:[{id:"hWVTg1VzeYVTw6qVh4waH",type:"heading-one",children:[{text:"asdasdasddasdas"}],props:{nodeType:"block"}}],type:"HeadingOne",meta:{order:3,depth:0}},"vz2sYqpml0-QGtMeK3J1q":{id:"vz2sYqpml0-QGtMeK3J1q",value:[{id:"SpoDyAyXqRX4sLe_Ula-t",type:"paragraph",children:[{text:"d asdsad"}],props:{nodeType:"block"}}],type:"Paragraph",meta:{order:4,depth:0}},mL0d98QC_RAkI_v7TNvlp:{id:"mL0d98QC_RAkI_v7TNvlp",value:[{id:"yjyxpj4xgXpK-KZGWxRIu",type:"paragraph",children:[{text:""}],props:{nodeType:"block"}}],type:"Paragraph",meta:{order:5,depth:0}},V7ivNvNhp9Wnb_aRz_hyf:{id:"V7ivNvNhp9Wnb_aRz_hyf",value:[{id:"BqWmQwCWHFoh9m1CZ7rJN",type:"heading-two",children:[{text:"asdasdasasd ad as dsad asd "}],props:{nodeType:"block"}}],type:"HeadingTwo",meta:{order:6,depth:0}},"79uvnCSHTT4Syf9kPcENo":{id:"79uvnCSHTT4Syf9kPcENo",value:[{id:"nvDbGtJTxWGVmlGAV2LLA",type:"paragraph",children:[{text:"asdsad asd as"}],props:{nodeType:"block"}}],type:"Paragraph",meta:{order:7,depth:0}},"2J7-d1xW5oQvXmwhMY44p":{id:"2J7-d1xW5oQvXmwhMY44p",value:[{id:"SwDKXkSPfz-wFNuK6sFZ0",type:"paragraph",children:[{text:"d a"}],props:{nodeType:"block"}}],type:"Paragraph",meta:{order:8,depth:0}},wYXX5rafQ9ceGDHodhHkZ:{id:"wYXX5rafQ9ceGDHodhHkZ",value:[{id:"HBjVWhtrXhScFw2J8nIXr",type:"paragraph",children:[{text:""}],props:{nodeType:"block"}}],type:"Paragraph",meta:{order:9,depth:0}},Th9d5lRAfnWkXNMTQHunk:{id:"Th9d5lRAfnWkXNMTQHunk",value:[{id:"54Ifw1xOvMihNJG-77PHB",type:"heading-one",children:[{text:"asdasddasddsaddas asdasdsad sad sa asdsadasa dasd"}],props:{nodeType:"block"}}],type:"HeadingOne",meta:{order:10,depth:0}},b5rXRmlvFdcp3da5Bl5t7:{id:"b5rXRmlvFdcp3da5Bl5t7",value:[{id:"_PGl9JKSC55g-cCBytHtH",type:"paragraph",children:[{text:"as dasdasdass"}],props:{nodeType:"block"}}],type:"Paragraph",meta:{order:11,depth:0}},seED1w6VEHyZYt3PYatR6:{id:"seED1w6VEHyZYt3PYatR6",value:[{id:"51C_3iCoAZS_p82uIEW38",type:"paragraph",children:[{text:"sa dasdasdsadsadasdas"}],props:{nodeType:"block"}}],type:"Paragraph",meta:{order:12,depth:0}},"01bb1-l1__SjLGHkyCFEu":{id:"01bb1-l1__SjLGHkyCFEu",value:[{id:"vZ1fkciKTMVz6jl0YfGBc",type:"paragraph",children:[{text:"das as"}],props:{nodeType:"block"}}],type:"Paragraph",meta:{order:13,depth:0}},"yGkXojWZCX-yO8gDTZ_-o":{id:"yGkXojWZCX-yO8gDTZ_-o",value:[{id:"1dyj2k6kj4I3fyZr2VtLs",type:"paragraph",children:[{text:""}],props:{nodeType:"block"}}],type:"Paragraph",meta:{order:14,depth:0}}},tl=({editor:n,value:r,marks:o,plugins:i,autoFocus:a,className:l,tools:c,selectionBoxRoot:s,children:u})=>{const p=()=>{m((e=>Object.assign(Object.assign({},e),{version:e.version+1})))},h=d((()=>o?[Za,...o]:[Za]),[o]),g=d((()=>i.map((e=>e.getPlugin))),[i]),[v,m]=f((()=>(n.applyChanges=p,h&&(n.formats=Wa(n,h)),n.blocks=Xa(n,g),n.children=el,n.blockEditorsMap=function(e){const t={};return Object.keys(e.children).forEach((n=>{const r=Ka(e);t[n]=r})),t}(n),n.shortcuts=function(e){const t={};return Object.values(e.blocks).forEach((e=>{var n,r,o,i;e.options&&Array.isArray(null===(n=e.options)||void 0===n?void 0:n.shortcuts)&&(null===(r=e.options)||void 0===r?void 0:r.shortcuts.length)>0&&(null===(i=null===(o=e.options)||void 0===o?void 0:o.shortcuts)||void 0===i||i.forEach((n=>{t[n]=e})))})),t}(n),n.plugins=function(e){const t={},n={};return e.forEach((e=>{e.elements&&Object.keys(e.elements).forEach((t=>{var r;const o=e.elements[t],i=null===(r=o.props)||void 0===r?void 0:r.nodeType;"inline"!==i&&"inlineVoid"!==i||(n[t]=o)})),t[e.type]=e})),e.forEach((e=>{if(e.elements){const r=Object.assign(Object.assign({},e.elements),n);t[e.type]=Object.assign(Object.assign({},e),{elements:r})}})),t}(g),n.on=$a,n.once=Ga,n.off=Ja,n.emit=Qa,{editor:n,version:0})));return e(Zi,{children:e(I,Object.assign({editorState:v},{children:t(li,Object.assign({tools:c},{children:[e(Yi,{marks:h,autoFocus:a,className:l,selectionBoxRoot:s}),u]}))}))})},nl=Object.assign(Object.assign({},pi),{ExtendedBlockActions:({className:r,style:o,onClick:i,children:a})=>{const[l,c]=f(!1),{refs:s,floatingStyles:d,context:u}=Io({placement:"bottom-start",open:l,onOpenChange:c,middleware:[Hr(),Fr(),zr(),kr(10)],whileElementsMounted:Ir}),{isMounted:p,styles:h}=Vo(u,{duration:100}),g=Object.assign(Object.assign({},h),d);return t(n,{children:[p&&e(fi,Object.assign({isOpen:!0,onClose:()=>c(!1),refs:s,style:g},{children:a})),e("button",Object.assign({type:"button",ref:s.setReference,className:`absolute right-[10px] top-[10px] flex items-center justify-between z-10 opacity-1 bg-[#eee] w-[22px] h-[22px] transition-opacity duration-150 ease-in border-none cursor-pointer rounded-[2px] p-[0_4px] ${r}`,onClick:()=>{null==i||i(),c(!0)},style:o},{children:e($o,{})}))]})}});function rl(e,t){const n=Object.keys(e.children),{type:r}=t||{},o=n.find((t=>e.children[t].type===r));return o?e.children[o]:null}function ol(e,t,n={}){const{focusAt:r,waitExecution:o=!0,waitExecutionMs:i=0,shouldUpdateBlockSelection:a=!0}=n,l=()=>{const o=n.slate||e.blockEditorsMap[t],i=e.children[t];if(!o||!i)return;const l=function(e,t){if(A.isPoint(t))return t;if(O.isPath(t))return{path:t,offset:0};const[,n]=_.first(e,[0]);return{path:n||[0,0],offset:0}}(o,r);R.select(o,l),x.focus(o),a&&setTimeout((()=>{e.setSelection([i.meta.order])}),0)};o?setTimeout((()=>l()),i):l()}function il(e){return Array.from(new Set(e))}var al={};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",l="[object Function]",c="[object GeneratorFunction]",s="[object Map]",d="[object Number]",u="[object Object]",f="[object Promise]",p="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",b="[object ArrayBuffer]",y="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",k="[object Int8Array]",E="[object Int16Array]",C="[object Int32Array]",S="[object Uint8Array]",O="[object Uint8ClampedArray]",_="[object Uint16Array]",D="[object Uint32Array]",R=/\w*$/,j=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,T={};T[o]=T["[object Array]"]=T[b]=T[y]=T[i]=T[a]=T[w]=T[x]=T[k]=T[E]=T[C]=T[s]=T[d]=T[u]=T[p]=T[h]=T[g]=T[v]=T[S]=T[O]=T[_]=T[D]=!0,T["[object Error]"]=T[l]=T[m]=!1;var A="object"==typeof X&&X&&X.Object===Object&&X,L="object"==typeof self&&self&&self.Object===Object&&self,N=A||L||Function("return this")(),M=t&&!t.nodeType&&t,P=M&&e&&!e.nodeType&&e,I=P&&P.exports===M;function z(e,t){return e.set(t[0],t[1]),e}function F(e,t){return e.add(t),e}function H(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function V(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function U(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e,t){return function(n){return e(t(n))}}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Y,Z=Array.prototype,q=Function.prototype,$=Object.prototype,G=N["__core-js_shared__"],J=(Y=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"",Q=q.toString,ee=$.hasOwnProperty,te=$.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=I?N.Buffer:void 0,oe=N.Symbol,ie=N.Uint8Array,ae=W(Object.getPrototypeOf,Object),le=Object.create,ce=$.propertyIsEnumerable,se=Z.splice,de=Object.getOwnPropertySymbols,ue=re?re.isBuffer:void 0,fe=W(Object.keys,Object),pe=Ie(N,"DataView"),he=Ie(N,"Map"),ge=Ie(N,"Promise"),ve=Ie(N,"Set"),me=Ie(N,"WeakMap"),be=Ie(Object,"create"),ye=Ue(pe),we=Ue(he),xe=Ue(ge),ke=Ue(ve),Ee=Ue(me),Ce=oe?oe.prototype:void 0,Se=Ce?Ce.valueOf:void 0;function Oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _e(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function De(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Re(e){this.__data__=new _e(e)}function je(e,t){var n=Xe(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Ke(e)}(e)&&ee.call(e,"callee")&&(!ce.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!ee.call(e,a)||i&&("length"==a||He(a,r))||n.push(a);return n}function Be(e,t,n){var r=e[t];ee.call(e,t)&&We(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Te(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function Ae(e,t,n,r,f,m,j){var B;if(r&&(B=m?r(e,f,m,j):r(e)),void 0!==B)return B;if(!qe(e))return e;var A=Xe(e);if(A){if(B=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(e,B)}else{var L=Fe(e),N=L==l||L==c;if(Ye(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(L==u||L==o||N&&!m){if(V(e))return m?e:{};if(B=function(e){return"function"!=typeof e.constructor||Ve(e)?{}:(t=ae(e),qe(t)?le(t):{});var t}(N?{}:e),!t)return function(e,t){return Me(e,ze(e),t)}(e,function(e,t){return e&&Me(t,$e(t),e)}(B,e))}else{if(!T[L])return m?e:{};B=function(e,t,n,r){var o=e.constructor;switch(t){case b:return Ne(e);case i:case a:return new o(+e);case y:return function(e,t){var n=t?Ne(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case w:case x:case k:case E:case C:case S:case O:case _:case D:return function(e,t){var n=t?Ne(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case s:return function(e,t,n){var r=t?n(U(e),!0):U(e);return H(r,z,new e.constructor)}(e,r,n);case d:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,R.exec(e));return t.lastIndex=e.lastIndex,t}(e);case h:return function(e,t,n){var r=t?n(K(e),!0):K(e);return H(r,F,new e.constructor)}(e,r,n);case v:return l=e,Se?Object(Se.call(l)):{}}var l}(e,L,Ae,t)}}j||(j=new Re);var M=j.get(e);if(M)return M;if(j.set(e,B),!A)var P=n?function(e){return function(e,t,n){var r=t(e);return Xe(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,$e,ze)}(e):$e(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(P||e,(function(o,i){P&&(o=e[i=o]),Be(B,i,Ae(o,t,n,r,i,e,j))})),B}function Le(e){return!(!qe(e)||(t=e,J&&J in t))&&(Ze(e)||V(e)?ne:j).test(Ue(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,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;Be(n,a,void 0===l?e[a]:l)}return n}function Pe(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Ie(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Le(n)?n:void 0}Oe.prototype.clear=function(){this.__data__=be?be(null):{}},Oe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Oe.prototype.get=function(e){var t=this.__data__;if(be){var r=t[e];return r===n?void 0:r}return ee.call(t,e)?t[e]:void 0},Oe.prototype.has=function(e){var t=this.__data__;return be?void 0!==t[e]:ee.call(t,e)},Oe.prototype.set=function(e,t){return this.__data__[e]=be&&void 0===t?n:t,this},_e.prototype.clear=function(){this.__data__=[]},_e.prototype.delete=function(e){var t=this.__data__,n=Te(t,e);return!(n<0)&&(n==t.length-1?t.pop():se.call(t,n,1),!0)},_e.prototype.get=function(e){var t=this.__data__,n=Te(t,e);return n<0?void 0:t[n][1]},_e.prototype.has=function(e){return Te(this.__data__,e)>-1},_e.prototype.set=function(e,t){var n=this.__data__,r=Te(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},De.prototype.clear=function(){this.__data__={hash:new Oe,map:new(he||_e),string:new Oe}},De.prototype.delete=function(e){return Pe(this,e).delete(e)},De.prototype.get=function(e){return Pe(this,e).get(e)},De.prototype.has=function(e){return Pe(this,e).has(e)},De.prototype.set=function(e,t){return Pe(this,e).set(e,t),this},Re.prototype.clear=function(){this.__data__=new _e},Re.prototype.delete=function(e){return this.__data__.delete(e)},Re.prototype.get=function(e){return this.__data__.get(e)},Re.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof _e){var r=n.__data__;if(!he||r.length<199)return r.push([e,t]),this;n=this.__data__=new De(r)}return n.set(e,t),this};var ze=de?W(de,Object):function(){return[]},Fe=function(e){return te.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||B.test(e))&&e>-1&&e%1==0&&e<t}function Ve(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$)}function Ue(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(pe&&Fe(new pe(new ArrayBuffer(1)))!=y||he&&Fe(new he)!=s||ge&&Fe(ge.resolve())!=f||ve&&Fe(new ve)!=h||me&&Fe(new me)!=m)&&(Fe=function(e){var t=te.call(e),n=t==u?e.constructor:void 0,r=n?Ue(n):void 0;if(r)switch(r){case ye:return y;case we:return s;case xe:return f;case ke:return h;case Ee:return m}return t});var Xe=Array.isArray;function Ke(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Ze(e)}var Ye=ue||function(){return!1};function Ze(e){var t=qe(e)?te.call(e):"";return t==l||t==c}function qe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function $e(e){return Ke(e)?je(e):function(e){if(!Ve(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 Ae(e,!0,!0)}}({get exports(){return al},set exports(e){al=e}},al);var ll=al;function cl(e,t={}){const{blockId:n,focus:r}=t;if(!n&&!t.at)throw new Error("blockId or path should be provided");let o=null;if(n&&(o=e.children[n],!o))throw new Error(`Block not with blockId: ${n} found`);if(t.at&&(o=N(e,{at:t.at}),!o))throw new Error(`Block in path ${t.at} not found`);if(!o)throw new Error("Block not found");e.children=Pa(e.children);Object.values(e.children).forEach((e=>{e.meta.order>o.meta.order&&(e.meta.order+=1)}));const i=(a=o,"function"==typeof window.structuredClone?window.structuredClone(a):ll(a));var a;const l=Ka(e);i.id=G(),i.meta.order=o.meta.order+1,e.children[i.id]=i,e.blockEditorsMap[i.id]=l;const c=i.id;e.children=Ia(e.children),e.applyChanges(),e.emit("change",e.children),r&&e.focusBlock(c,{waitExecution:!0})}function sl(e,t){x.blur(t),x.deselect(t),R.deselect(t),e.setBlockSelected(null),e.setSelection(null)}const dl=()=>{const e={children:{},selection:null,selectedBlocks:null,getEditorValue:()=>function(e){return e.applyChanges(),e.children}(e),applyChanges:()=>{},insertBlock:(...t)=>function(e,t,n={}){e.children=Pa(e.children);const{at:r=null,focus:o=!1,slate:i=null}=n,a=N(e),l=r,c={id:G(),value:t.value,type:t.type,meta:Object.assign(Object.assign({},t.meta),{order:0})};let s=!1;if(i&&i.selection){const e=_.string(i,i.selection.anchor.path);s=_.isStart(i,i.selection.anchor,i.selection.anchor.path)&&e.length>0}if(l){const[t]=l;Object.values(e.children).forEach((e=>{e.meta.order>=t&&(e.meta.order+=1)})),c.meta.order=t}else{const t=Object.keys(e.children).length;c.meta.order=t}const d=Ka(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=Ia(e.children),e.applyChanges(),e.emit("change",e.children),o&&e.focusBlock(s&&u?u:c.id)}(e,...t),deleteBlock:(...t)=>Ua(e,...t),duplicateBlock:(...t)=>cl(e,...t),toggleBlock:(...t)=>Va(e,...t),increaseBlockDepth:(...t)=>function(e,t={}){const{at:n=e.selection}=t;if(!n)return;e.children=Pa(e.children);const r=N(e);r&&(r.meta.depth=r.meta.depth+1,e.children=Ia(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=Pa(e.children);const r=N(e);r&&(r.meta.depth=0===r.meta.depth?0:r.meta.depth-1,e.children=Ia(e.children),e.applyChanges(),e.emit("change",e.children))}(e,...t),moveBlock:(...t)=>function(e,t,n){e.children=Pa(e.children);const[r]=n,o=e.children[t],i=Object.values(e.children).find((e=>e.meta.order===r));console.log("blockInNewPosition meta",Object.assign({},i).meta.depth);const a=o.meta.order<i.meta.order,l=o.meta.order>i.meta.order;Object.values(e.children).forEach((e=>{a?e.meta.order>o.meta.order&&e.meta.order<=i.meta.order&&e.meta.order--:l&&e.meta.order<o.meta.order&&e.meta.order>=i.meta.order&&e.meta.order++})),o.meta.order=r,o.meta.depth=i.meta.depth,e.children=Ia(e.children),e.applyChanges(),e.emit("change",e.children)}(e,...t),focusBlock:(...t)=>ol(e,...t),getBlock:(...e)=>{},updateBlock:(...t)=>Ha(e,...t),splitBlock:(...t)=>function(e,t={}){const{slate:n,focus:r=!0}=t,o=N(e);n&&n.selection&&o&&_.withoutNormalizing(n,(()=>{e.children=Pa(e.children);const t=O.parent(n.selection.anchor.path);R.splitNodes(n,{at:n.selection,match:e=>D.isElement(e),always:!0,mode:"highest"});const i=t[0]+1,a=n.children.slice()[i];R.removeNodes(n,{at:[i],match:e=>D.isElement(e),mode:"highest"});const l={id:G(),type:o.type,meta:{order:o.meta.order+1,depth:o.meta.depth},value:[a]};Object.values(e.children).forEach((e=>{e.meta.order>=l.meta.order&&(e.meta.order+=1)}));const c=Ka(e);e.blockEditorsMap[l.id]=c,e.children[l.id]=l,e.children=Ia(e.children),e.applyChanges(),e.emit("change",e.children),r&&e.focusBlock(l.id,{slate:c})}))}(e,...t),setSelection:(...t)=>function(e,t,n={}){const{applyChanges:r=!0}=n;e.selection=t,r&&e.applyChanges()}(e,...t),setBlockSelected:(...t)=>function(e,t,n={}){const{only:r=!1,allSelected:o=!1}=n,i=e.selectedBlocks||[];if(null===t)e.selectedBlocks=null;else if(r)e.selectedBlocks=t;else if(o){const t=Object.keys(e.children).map(((e,t)=>t));e.selectedBlocks=il(t)}else e.selectedBlocks=il(i.concat(t));e.applyChanges()}(e,...t),blur:(...t)=>function(e,t={}){var n;const r=null!==(n=t.slate)&&void 0!==n?n:Mn(e);if(!r)return;const{waitExecution:o,waitExecutionMs:i}=t;o?setTimeout((()=>sl(e,r)),i):(sl(e,r),e.applyChanges())}(e,...t),blockEditorsMap:{},blocks:{},formats:{},shortcuts:{},plugins:{},on:(e,t)=>{},off:(e,t)=>{},emit:(e,...t)=>{},once:(e,t)=>{}};return e};hi('/*! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.right-\\[10px\\]{right:10px}.top-0{top:0}.top-\\[10px\\]{top:10px}.z-10{z-index:10}.z-\\[100\\]{z-index:100}.z-\\[90\\]{z-index:90}.mx-\\[4px\\]{margin-left:4px;margin-right:4px}.my-\\[4px\\]{margin-bottom:4px;margin-top:4px}.mb-\\[1px\\]{margin-bottom:1px}.mr-2{margin-right:.5rem}.mt-\\[2px\\]{margin-top:2px}.\\!block{display:block!important}.block{display:block}.inline{display:inline}.flex{display:flex}.h-4{height:1rem}.h-\\[1px\\]{height:1px}.h-\\[22px\\]{height:22px}.h-full{height:100%}.w-4{width:1rem}.w-\\[22px\\]{width:22px}.w-auto{width:auto}.w-full{width:100%}.min-w-\\[200px\\]{min-width:200px}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-none{border-style:none}.bg-\\[\\#2383e224\\]{background-color:#2383e224}.bg-\\[\\#37352f14\\]{background-color:#37352f14}.bg-\\[\\#FFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-\\[\\#eee\\]{--tw-bg-opacity:1;background-color:rgb(238 238 238/var(--tw-bg-opacity))}.p-\\[0_4px\\]{padding:0 4px}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-\\[2px\\]{padding-left:2px;padding-right:2px}.py-0{padding-bottom:0;padding-top:0}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.text-sm{font-size:.875rem;line-height:1.25rem}.italic{font-style:italic}.leading-\\[120\\%\\]{line-height:120%}.opacity-100{opacity:1}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-opacity{transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}::-moz-selection{background:#c6ddf8}::selection{background:#c6ddf8}.yoopta-placeholder:after{color:inherit;content:attr(data-placeholder);font-size:75%;font-style:inherit;font-weight:inherit;opacity:.5;padding-left:5px;position:absolute;text-indent:2px;top:50%;transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;user-select:none}.hover\\:bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}');export{Mi as HOTKEYS,nl as UI,L as YooptaPlugin,Q as buildBlockData,J as buildBlockElement,dl as createYooptaEditor,Ya as createYooptaMark,tl as default,N as findPluginBlockBySelectionPath,rl as findPluginBlockByType,Mn as findSlateBySelectionPath,G as generateId,ii as getRootBlockElement,oi as getRootBlockElementType,F as useBlockData,W as useBlockSelected,H as useYooptaBlock,z as useYooptaEditor,V as useYooptaPlugin,U as useYooptaPluginOptions,ci as useYooptaTools};
|
|
6
|
+
var $r=["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(","),Zr="undefined"==typeof Element,qr=Zr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gr=!Zr&&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},Jr=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Qr=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Jr(a,!1))if("SLOT"===a.tagName){var l=a.assignedElements(),c=e(l.length?l:a.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{qr.call(a,$r)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var s=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),d=!Jr(s,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(s&&d){var u=e(!0===s?a.children:s.children,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return o},eo=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},to=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))&&!eo(e)?0:e.tabIndex},no=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ro=function(e){return"INPUT"===e.tagName},oo=function(e){return function(e){return ro(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Gr(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},io=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},ao=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=qr.call(e,"details>summary:first-of-type")?e.parentElement:e;if(qr.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return io(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,l=Gr(e);if(a&&!a.shadowRoot&&!0===r(a))return io(e);e=e.assignedSlot?e.assignedSlot:a||l===e.ownerDocument?a:l.host}e=i}if(function(e){var t,n,r,o,i=e&&Gr(e),a=null===(t=i)||void 0===t?void 0:t.host,l=!1;if(i&&i!==e)for(l=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&a;){var c,s,d;l=!(null===(s=a=null===(c=i=Gr(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},lo=function(e,t){return!(t.disabled||Jr(t)||function(e){return ro(e)&&"hidden"===e.type}(t)||ao(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!qr.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},co=function(e,t){return!(oo(t)||to(t)<0||!lo(e,t))},so=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},uo=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,l=function(e,t){var n=to(e);return n<0&&t&&!eo(e)?0:n}(a,i),c=i?e(t.candidates):a;0===l?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:c})})),r.sort(no).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},fo=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Qr([e],t.includeContainer,{filter:co.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:so}):function(e,t,n){if(Jr(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll($r));return t&&qr.call(e,$r)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,co.bind(null,t)),uo(n)};const po=r["useInsertionEffect".toString()]||(e=>e());var ho="undefined"!=typeof document?c:s;function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},go.apply(this,arguments)}let vo=!1,mo=0;const bo=()=>"floating-ui-"+mo++;const yo=r["useId".toString()]||function(){const[e,t]=r.useState((()=>vo?bo():void 0));return ho((()=>{null==e&&t(bo())}),[]),r.useEffect((()=>{vo||(vo=!0)}),[]),e};const wo=r.createContext(null),xo=r.createContext(null);function ko(e){return"data-floating-ui-"+e}function Eo(e){const t=l(e);return ho((()=>{t.current=e})),t}const Co=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function So(e,t){const n=fo(e,Co());"prev"===t&&n.reverse();const r=n.indexOf(function(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}((null==(o=e)?void 0:o.ownerDocument)||document));var o;return n.slice(r+1)[0]}function Oo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!function(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Vn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}(n,r)}function Do(e){fo(e,Co()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function _o(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 Ro={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 jo(e){"Tab"===e.key&&(e.target,clearTimeout(undefined))}const Bo=r.forwardRef((function(e,t){const[n,o]=r.useState();ho((()=>(/apple/i.test(navigator.vendor)&&o("button"),document.addEventListener("keydown",jo),()=>{document.removeEventListener("keydown",jo)})),[]);const i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[ko("focus-guard")]:"",style:Ro};return r.createElement("span",go({},e,i))})),Ao=r.createContext(null),To=ko("portal");function Lo(e){let{children:t,id:n,root:o=null,preserveTabOrder:i=!0}=e;const a=function(e){let{id:t,root:n}=void 0===e?{}:e;const[o,i]=r.useState(null),a=yo(),l=Mo(),c=r.useRef(null);return ho((()=>()=>{null==o||o.remove(),queueMicrotask((()=>{c.current=null}))}),[o]),ho((()=>{if(c.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=a,n.setAttribute(To,""),e.appendChild(n),c.current=n,i(n)}),[t,a]),ho((()=>{if(c.current)return;let e=n||(null==l?void 0:l.portalNode);e&&!Un(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const o=document.createElement("div");o.id=a,o.setAttribute(To,""),e=r||e,e.appendChild(o),c.current=o,i(o)}),[t,n,a,l]),o}({id:n,root:o}),[l,c]=r.useState(null),s=r.useRef(null),d=r.useRef(null),u=r.useRef(null),f=r.useRef(null),p=!!l&&!l.modal&&l.open&&i&&!(!o&&!a);return r.useEffect((()=>{if(a&&i&&(null==l||!l.modal))return a.addEventListener("focusin",e,!0),a.addEventListener("focusout",e,!0),()=>{a.removeEventListener("focusin",e,!0),a.removeEventListener("focusout",e,!0)};function e(e){if(a&&Oo(e)){("focusin"===e.type?_o:Do)(a)}}}),[a,i,null==l?void 0:l.modal]),r.createElement(Ao.Provider,{value:r.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:s,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:c})),[i,a])},p&&a&&r.createElement(Bo,{"data-type":"outside",ref:s,onFocus:e=>{if(Oo(e,a)){var t;null==(t=u.current)||t.focus()}else{const e=So(document.body,"prev")||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),p&&a&&r.createElement("span",{"aria-owns":a.id,style:Ro}),a&&w(t,a),p&&a&&r.createElement(Bo,{"data-type":"outside",ref:d,onFocus:e=>{if(Oo(e,a)){var t;null==(t=f.current)||t.focus()}else{const t=So(document.body,"next")||(null==l?void 0:l.refs.domReference.current);null==t||t.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent))}}}))}const Mo=()=>r.useContext(Ao),No=new Set,Io=r.forwardRef((function(e,t){let{lockScroll:n=!1,...o}=e;const i=yo();return ho((()=>{if(!n)return;No.add(i);const e=/iP(hone|ad|od)|iOS/.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}()),t=document.body.style,r=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",o=window.innerWidth-document.documentElement.clientWidth,a=t.left?parseFloat(t.left):window.pageXOffset,l=t.top?parseFloat(t.top):window.pageYOffset;if(t.overflow="hidden",o&&(t[r]=o+"px"),e){var c,s;const e=(null==(c=window.visualViewport)?void 0:c.offsetLeft)||0,n=(null==(s=window.visualViewport)?void 0:s.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(l-Math.floor(n))+"px",left:-(a-Math.floor(e))+"px",right:"0"})}return()=>{No.delete(i),0===No.size&&(Object.assign(t,{overflow:"",[r]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(a,l)))}}),[i,n]),r.createElement("div",go({ref:t},o,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}}))}));function Po(e){var t;void 0===e&&(e={});const{open:n=!1,onOpenChange:o,nodeId:i}=e,[a,l]=r.useState(null),c=(null==(t=e.elements)?void 0:t.reference)||a,s=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:s,open:d}=e,[u,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(o);Wr(p,o)||h(o);const[g,v]=r.useState(null),[m,y]=r.useState(null),w=r.useCallback((e=>{e!==C.current&&(C.current=e,v(e))}),[]),x=r.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),k=a||g,E=l||m,C=r.useRef(null),S=r.useRef(null),O=r.useRef(u),D=null!=s,_=Xr(s),R=Xr(i),j=r.useCallback((()=>{if(!C.current||!S.current)return;const e={placement:t,strategy:n,middleware:p};R.current&&(e.platform=R.current),Hr(C.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};B.current&&!Wr(O.current,t)&&(O.current=t,b.flushSync((()=>{f(t)})))}))}),[p,t,n,R]);Vr((()=>{!1===d&&O.current.isPositioned&&(O.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[d]);const B=r.useRef(!1);Vr((()=>(B.current=!0,()=>{B.current=!1})),[]),Vr((()=>{if(k&&(C.current=k),E&&(S.current=E),k&&E){if(_.current)return _.current(k,E,j);j()}}),[k,E,j,_,D]);const A=r.useMemo((()=>({reference:C,floating:S,setReference:w,setFloating:x})),[w,x]),T=r.useMemo((()=>({reference:k,floating:E})),[k,E]),L=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!T.floating)return e;const t=Yr(T.floating,u.x),r=Yr(T.floating,u.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...Kr(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,c,T.floating,u.x,u.y]);return r.useMemo((()=>({...u,update:j,refs:A,elements:T,floatingStyles:L})),[u,j,A,T,L])}(e),d=r.useContext(xo),u=null!=((null==(f=r.useContext(wo))?void 0:f.id)||null);var f;const p=function(e){const t=r.useRef((()=>{}));return po((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}(((e,t,n)=>{e&&(g.current.openEvent=t),v.emit("openchange",{open:e,event:t,reason:n,nested:u}),null==o||o(e,t,n)})),h=r.useRef(null),g=r.useRef({}),v=r.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}()))[0],m=yo(),y=r.useCallback((e=>{const t=Un(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;s.refs.setReference(t)}),[s.refs]),w=r.useCallback((e=>{(Un(e)||null===e)&&(h.current=e,l(e)),(Un(s.refs.reference.current)||null===s.refs.reference.current||null!==e&&!Un(e))&&s.refs.setReference(e)}),[s.refs]),x=r.useMemo((()=>({...s.refs,setReference:w,setPositionReference:y,domReference:h})),[s.refs,w,y]),k=r.useMemo((()=>({...s.elements,domReference:c})),[s.elements,c]),E=r.useMemo((()=>({...s,refs:x,elements:k,dataRef:g,nodeId:i,floatingId:m,events:v,open:n,onOpenChange:p})),[s,i,m,v,n,p,x,k]);return ho((()=>{const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===i));e&&(e.context=E)})),r.useMemo((()=>({...s,context:E,refs:x,elements:k})),[s,x,k,E])}const zo=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function Fo(e,t){return"function"==typeof e?e(t):e}function Uo(e,t){void 0===t&&(t={});const{open:n,elements:{floating:o}}=e,{duration:i=250}=t,a=("number"==typeof i?i:i.close)||0,[l,c]=r.useState(!1),[s,d]=r.useState("unmounted"),u=function(e,t){const[n,o]=r.useState(e);return e&&!n&&o(!0),r.useEffect((()=>{if(!e){const e=setTimeout((()=>o(!1)),t);return()=>clearTimeout(e)}}),[e,t]),n}(n,a);return ho((()=>{l&&!u&&d("unmounted")}),[l,u]),ho((()=>{if(o){if(n){d("initial");const e=requestAnimationFrame((()=>{d("open")}));return()=>{cancelAnimationFrame(e)}}c(!0),d("close")}}),[n,o]),{isMounted:u,status:s}}function Ho(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:o,close:i,common:a,duration:l=250}=t,c=e.placement,s=c.split("-")[0],d=r.useMemo((()=>({side:s,placement:c})),[s,c]),u="number"==typeof l,f=(u?l:l.open)||0,p=(u?l:l.close)||0,[h,g]=r.useState((()=>({...Fo(a,d),...Fo(n,d)}))),{isMounted:v,status:m}=Uo(e,{duration:l}),b=Eo(n),y=Eo(o),w=Eo(i),x=Eo(a);return ho((()=>{const e=Fo(b.current,d),t=Fo(w.current,d),n=Fo(x.current,d),r=Fo(y.current,d)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===m&&g((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===m&&g({transitionProperty:Object.keys(r).map(zo).join(","),transitionDuration:f+"ms",...n,...r}),"close"===m){const r=t||e;g({transitionProperty:Object.keys(r).map(zo).join(","),transitionDuration:p+"ms",...n,...r})}}),[p,w,b,y,x,f,m,d]),{isMounted:v,styles:h}}var Vo;function Wo(){return Wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wo.apply(this,arguments)}var Ko=function(e){return r.createElement("svg",Wo({viewBox:"0 0 16 16",className:"turn_svg__loop",style:{width:16,height:16,display:"block",fill:"currentcolor",flexShrink:0,backfaceVisibility:"hidden"}},e),Vo||(Vo=r.createElement("path",{d:"M5.804 3.123c.006.38.254.622.673.622h4.887c.59 0 .914.305.914.92v6.628l-.901-.978-.514-.514c-.267-.254-.629-.273-.895-.013-.254.26-.248.635.012.895l2.165 2.158c.476.47 1.022.47 1.498 0l2.165-2.158c.26-.26.266-.635.012-.895-.266-.26-.628-.241-.895.013l-.514.514-.895.971V4.564c0-1.358-.71-2.063-2.082-2.063H6.477c-.42 0-.68.241-.673.622ZM.186 7.06c.26.266.622.247.889-.013l.52-.508.889-.971v6.722c0 1.359.71 2.063 2.082 2.063h4.957c.42 0 .68-.241.673-.622-.006-.387-.254-.622-.673-.622h-4.88c-.591 0-.915-.311-.915-.927V5.554l.895.984.52.508c.26.26.629.28.89.013.26-.26.253-.629-.013-.89L3.855 4.013c-.476-.476-1.016-.476-1.492 0L.2 6.17c-.267.26-.273.628-.013.889Z"})))};function Yo(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var Xo=["color"],$o=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Yo(e,Xo);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),Zo=["color"],qo=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Yo(e,Zo);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),Go=["color"],Jo=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Yo(e,Go);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M8.51194 3.00541C9.18829 2.54594 10.0435 2.53694 10.6788 2.95419C10.8231 3.04893 10.9771 3.1993 11.389 3.61119C11.8009 4.02307 11.9513 4.17714 12.046 4.32141C12.4633 4.95675 12.4543 5.81192 11.9948 6.48827C11.8899 6.64264 11.7276 6.80811 11.3006 7.23511L10.6819 7.85383C10.4867 8.04909 10.4867 8.36567 10.6819 8.56093C10.8772 8.7562 11.1938 8.7562 11.389 8.56093L12.0077 7.94221L12.0507 7.89929C12.4203 7.52976 12.6568 7.2933 12.822 7.0502C13.4972 6.05623 13.5321 4.76252 12.8819 3.77248C12.7233 3.53102 12.4922 3.30001 12.1408 2.94871L12.0961 2.90408L12.0515 2.85942C11.7002 2.508 11.4692 2.27689 11.2277 2.11832C10.2377 1.46813 8.94398 1.50299 7.95001 2.17822C7.70691 2.34336 7.47044 2.57991 7.1009 2.94955L7.058 2.99247L6.43928 3.61119C6.24401 3.80645 6.24401 4.12303 6.43928 4.31829C6.63454 4.51355 6.95112 4.51355 7.14638 4.31829L7.7651 3.69957C8.1921 3.27257 8.35757 3.11027 8.51194 3.00541ZM4.31796 7.14672C4.51322 6.95146 4.51322 6.63487 4.31796 6.43961C4.12269 6.24435 3.80611 6.24435 3.61085 6.43961L2.99213 7.05833L2.94922 7.10124C2.57957 7.47077 2.34303 7.70724 2.17788 7.95035C1.50265 8.94432 1.4678 10.238 2.11799 11.2281C2.27656 11.4695 2.50766 11.7005 2.8591 12.0518L2.90374 12.0965L2.94837 12.1411C3.29967 12.4925 3.53068 12.7237 3.77214 12.8822C4.76219 13.5324 6.05589 13.4976 7.04986 12.8223C7.29296 12.6572 7.52943 12.4206 7.89896 12.051L7.89897 12.051L7.94188 12.0081L8.5606 11.3894C8.75586 11.1941 8.75586 10.8775 8.5606 10.6823C8.36533 10.487 8.04875 10.487 7.85349 10.6823L7.23477 11.301C6.80777 11.728 6.6423 11.8903 6.48794 11.9951C5.81158 12.4546 4.95642 12.4636 4.32107 12.0464C4.17681 11.9516 4.02274 11.8012 3.61085 11.3894C3.19896 10.9775 3.0486 10.8234 2.95385 10.6791C2.53661 10.0438 2.54561 9.18863 3.00507 8.51227C3.10993 8.35791 3.27224 8.19244 3.69924 7.76544L4.31796 7.14672ZM9.62172 6.08558C9.81698 5.89032 9.81698 5.57373 9.62172 5.37847C9.42646 5.18321 9.10988 5.18321 8.91461 5.37847L5.37908 8.91401C5.18382 9.10927 5.18382 9.42585 5.37908 9.62111C5.57434 9.81637 5.89092 9.81637 6.08619 9.62111L9.62172 6.08558Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),Qo=["color"],ei=g((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=Yo(e,Qo);return v("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),v("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))})),ti=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}},ni={"text/plain":"Text","text/html":"Url",default:"Text"};var ri=function(e,t){var n,r,o,i,a,l,c=!1;t||(t={}),n=t.debug||!1;try{if(o=ti(),i=document.createRange(),a=document.getSelection(),(l=document.createElement("span")).textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=ni[t.format]||ni.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(l),i.selectNodeContents(l),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),l&&document.body.removeChild(l),o()}return c};function oi(e){if(!e)return;const t=Object.keys(e);return 1===t.length?t[0]:t.find((t=>e[t].asRoot))}function ii(e){if(!e)return;const t=oi(e);return t?e[t]:void 0}const ai=i(void 0),li=({children:r,tools:o})=>{const i=d((()=>o?Object.keys(o).reduce(((e,t)=>{var n;return Object.assign(Object.assign({},e),{[t]:null===(n=o[t])||void 0===n?void 0:n.render})}),{}):{}),[o]),a=d((()=>o?Object.keys(o).map((t=>{var n,r,i;const a=null===(n=null==o?void 0:o[t])||void 0===n?void 0:n.tool,l=null===(r=null==o?void 0:o[t])||void 0===r?void 0:r.render,c=null===(i=null==o?void 0:o[t])||void 0===i?void 0:i.props;return a?e(a,Object.assign({render:l},c),t):null})):null),[d]);return e(ai.Provider,Object.assign({value:i},{children:t(n,{children:[a,r]})}))},ci=()=>{const e=a(ai);if(void 0===e)throw new Error("useYooptaTools must be used within a ToolsProvider");return e},si=({children:t})=>e("div",Object.assign({className:"flex flex-col"},{children:t})),di=({children:t})=>e("div",Object.assign({onClick:e=>e.stopPropagation(),className:"bg-[#FFF] relative min-w-[200px] w-auto overflow-hidden rounded-md border bg-popover py-[6px] px-0 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"},{children:t})),ui=({children:t})=>e("div",Object.assign({className:"relative flex cursor-default select-none items-center text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50"},{children:t})),fi=({isOpen:n,onClose:r,refs:o,style:i,children:a})=>{var l;const c=z(),s=ci(),[d,u]=f(!1),{refs:p,floatingStyles:h,context:g}=Po({placement:"right",open:d,onOpenChange:u,middleware:[Ur(),Fr(),zr(),kr(10)],whileElementsMounted:Pr}),{isMounted:v,styles:m}=Ho(g,{duration:100});if(!n)return null;const b=M(c,{at:c.selection}),y=ii(c.blocks[(null==b?void 0:b.type)||""].elements),w="void"===(null===(l=null==y?void 0:y.props)||void 0===l?void 0:l.nodeType),x=s.ActionMenu,k=Object.assign(Object.assign({},h),m);return e(Lo,Object.assign({root:document.getElementById("yoopta-editor")},{children:e(Io,Object.assign({lockScroll:!0,className:"z-[100]",onClick:r},{children:e("div",Object.assign({style:i,ref:o.setFloating},{children:t(di,{children:[t(si,{children:[e(ui,{children:t("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>{const e=c.selection;c.deleteBlock({at:e}),c.setBlockSelected(null),c.setSelection(null),r()}},{children:[e(ei,{className:"w-4 h-4 mr-2"}),"Delete"]}))}),e(ui,{children:t("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>{c.duplicateBlock({at:c.selection,focus:!0}),c.setBlockSelected(null),r()}},{children:[e($o,{className:"w-4 h-4 mr-2"}),"Duplicate"]}))}),!w&&t(ui,{children:[v&&!!x&&e(Lo,Object.assign({root:document.getElementById("yoopta-editor")},{children:e(Io,Object.assign({lockScroll:!0,className:"z-[100]",onClick:()=>u(!1)},{children:e("div",Object.assign({style:k,ref:p.setFloating},{children:e(x,{actions:Object.keys(c.blocks),editor:c,selectedAction:"",onClose:()=>{u(!1),r()},empty:!1,onMouseEnter:()=>{},mode:"toggle"})}))}))})),t("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",ref:p.setReference,onClick:()=>u((e=>!e))},{children:[e(Ko,{className:"w-4 h-4 mr-2"}),"Turn into"]}))]}),e(ui,{children:t("button",Object.assign({type:"button",className:"rounded-sm hover:bg-[#37352f14] leading-[120%] px-2 py-1.5 mx-[4px] cursor-pointer w-full flex justify-start",onClick:()=>{const e=M(c);e&&ri(`${window.location.origin}${window.location.pathname}#${e.id}`),r()}},{children:[e(Jo,{className:"w-4 h-4 mr-2"}),"Copy link to block"]}))})]}),a]})}))}))}))};var pi=Object.freeze({__proto__:null,BlockOptions:fi,BlockOptionsMenuContent:di,BlockOptionsMenuGroup:si,BlockOptionsMenuItem:ui,BlockOptionsSeparator:({className:t})=>e("div",{className:`h-[1px] bg-[#37352f14] my-[4px] w-full ${t}`})});function hi(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var gi={actions:"vuZgncnq",hovered:"_8Eqjiv7m",actionButton:"WabGEp54",plusButton:"_0C8RpLmz"};function vi(...e){return e.filter(Boolean).join(" ")}hi(".vuZgncnq{display:flex;left:-50px;opacity:0;position:absolute;top:2px;transition:opacity .18s ease-in}._8Eqjiv7m{opacity:1}.WabGEp54{all:unset;align-items:center;background-color:inherit;background-color:transparent;border-radius:6px;color:rgba(55,53,47,.35);cursor:pointer;display:flex;height:24px;justify-content:center;margin:0 1px;padding:0;position:relative;transition:background-color .18s cubic-bezier(.4,0,.2,1);width:auto;width:18px}.WabGEp54:active,.WabGEp54:focus,.WabGEp54:hover{background-color:rgba(55,54,47,.08)}._0C8RpLmz{width:24px}");const mi=({block:n,editor:r,dragHandleProps:o,showActions:i,onChangeActiveBlock:a})=>{const[l,c]=f(!1),{refs:s,floatingStyles:d,context:u}=Po({placement:"right-start",open:l,onOpenChange:c,middleware:[Ur(),Fr(),zr(),kr()]}),{isMounted:p,styles:h}=Ho(u,{duration:100}),{setActivatorNodeRef:g,attributes:v,listeners:m}=o,b=Object.assign(Object.assign({},d),h);return t("div",Object.assign({contentEditable:!1,className:vi(gi.actions,i&&gi.hovered,"yoopta-element-actions")},{children:[e("button",Object.assign({type:"button",onClick:()=>{const e=Q({id:G()}),t=[n.meta.order+1];r.setSelection([n.meta.order]),r.insertBlock(e,{at:t,focus:!0})},className:vi(gi.actionButton,gi.plusButton,"yoopta-element-actions-plus")},{children:e(Mn,{})})),e("button",Object.assign({type:"button",className:vi(gi.actionButton,"yoopta-element-actions-drag"),ref:e=>{g(e),s.setReference(e)}},v,m,{onClick:e=>{e.stopPropagation(),a(n.id);const t=Nn(r,{at:[n.meta.order]});r.focusBlock(n.id),t&&setTimeout((()=>{x.blur(t),x.deselect(t),R.deselect(t),r.setBlockSelected([n.meta.order],{only:!0}),r.setSelection([n.meta.order]),c(!0)}),10)}},{children:e(Tn,{})})),e(fi,{isOpen:p,refs:s,style:b,onClose:()=>c(!1)})]}))},bi=({children:n,block:r,blockId:o})=>{var i;const a=z(),[l,c]=f(null),{attributes:s,listeners:d,setNodeRef:u,setActivatorNodeRef:p,transform:h,transition:g,active:v,over:m,isOver:b,isDragging:y}=Sn({id:o}),w={transform:h?`translate3d(${h.x}px, ${h.y}px, 0)`:"none",transition:g,opacity:y?.7:1,marginLeft:20*r.meta.depth+"px"},x=null===(i=a.selectedBlocks)||void 0===i?void 0:i.includes(r.meta.order),k=l===o,E=e=>c(e);return t("div",Object.assign({className:"relative py-0 px-[2px] mt-[2px] mb-[1px] rounded yoopta-block-wrapper",onMouseEnter:()=>E(o),onMouseLeave:()=>c(null),"data-yoopta-block-id":o,style:w,"data-yoopta-block":!0,ref:u},{children:[e(mi,{block:r,editor:a,dragHandleProps:{setActivatorNodeRef:p,attributes:s,listeners:d},showActions:k,onChangeActiveBlock:E}),e("div",Object.assign({className:gi.content,style:{borderBottom:b&&!y?"2px solid #007aff":"none"}},{children:n})),x&&e("div",{className:"absolute left-0 top-0 bg-[#2383e224] z-[90] rounded opacity-100 h-full w-full pointer-events-none yoopta-selection-block"})]}))};function yi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var wi={};Object.defineProperty(wi,"__esModule",{value:!0});for(var xi="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),ki={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Ei={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:xi?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Ci={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},Si=1;Si<20;Si++)Ci["f"+Si]=111+Si;function Oi(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return Di(e,t)})),o=function(e){return r.some((function(t){return _i(t,e)}))};return null==n?o:o(n)}function Di(e,t){var n=t&&t.byKey,r={},o=(e=e.replace("++","+add")).split("+"),i=o.length;for(var a in ki)r[ki[a]]=!1;var l=!0,c=!1,s=void 0;try{for(var d,u=o[Symbol.iterator]();!(l=(d=u.next()).done);l=!0){var f=d.value,p=f.endsWith("?")&&f.length>1;p&&(f=f.slice(0,-1));var h=ji(f),g=ki[h];if(f.length>1&&!g&&!Ei[f]&&!Ci[h])throw new TypeError('Unknown modifier: "'+f+'"');1!==i&&g||(n?r.key=h:r.which=Ri(f)),g&&(r[g]=!p||null)}}catch(e){c=!0,s=e}finally{try{!l&&u.return&&u.return()}finally{if(c)throw s}}return r}function _i(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function Ri(e){return e=ji(e),Ci[e]||e.toUpperCase().charCodeAt(0)}function ji(e){return e=e.toLowerCase(),e=Ei[e]||e}wi.default=Oi,wi.isHotkey=Oi,wi.isCodeHotkey=function(e,t){return Oi(e,t)};var Bi=wi.isKeyHotkey=function(e,t){return Oi(e,{byKey:!0},t)};wi.parseHotkey=Di,wi.compareHotkey=_i,wi.toKeyCode=Ri,wi.toKeyName=ji;const Ai={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"},Ti={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"},Li={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Mi=e=>{const t=Ai[e],n=Ti[e],r=Li[e],o=t&&Bi(t),i=n&&Bi(n),a=r&&Bi(r);return e=>!(!o||!o(e))||(!(!i||!i(e))||!(!a||!a(e)))},Ni={isBold:Mi("bold"),isCompose:Mi("compose"),isArrowLeft:Mi("arrowLeft"),isArrowRight:Mi("arrowRight"),isArrowUp:Mi("arrowUp"),isArrowDown:Mi("arrowDown"),isDeleteBackward:Mi("deleteBackward"),isDeleteForward:Mi("deleteForward"),isDeleteLineBackward:Mi("deleteLineBackward"),isDeleteLineForward:Mi("deleteLineForward"),isDeleteWordBackward:Mi("deleteWordBackward"),isDeleteWordForward:Mi("deleteWordForward"),isExtendBackward:Mi("extendBackward"),isExtendForward:Mi("extendForward"),isExtendLineBackward:Mi("extendLineBackward"),isExtendLineForward:Mi("extendLineForward"),isItalic:Mi("italic"),isMoveLineBackward:Mi("moveLineBackward"),isMoveLineForward:Mi("moveLineForward"),isCtrlLeft:Mi("ctrlLeft"),isCtrlRight:Mi("ctrlRight"),isRedo:Mi("redo"),isShiftEnter:Mi("shiftEnter"),isEnter:Mi("enter"),isTransposeCharacter:Mi("transposeCharacter"),isUndo:Mi("undo"),isSpace:Mi("space"),isSelect:Mi("select"),isTab:Mi("tab"),isShiftTab:Mi("shiftTab"),isBackspace:Mi("backspace"),isCmdEnter:Mi("cmdEnter"),isCmd:Mi("cmd"),isEscape:Mi("escape"),isSlashCommand:Mi("slashCommand"),isShiftArrowUp:Mi("shiftArrowUp"),isShiftArrowDown:Mi("shiftArrowDown"),isKekceburek:Mi("kekCeburek")};const Ii={onKeyDown:function(e){return t=>{const n=Nn(e,{at:e.selection});if(!n||!n.selection)return;const r=O.parent(n.selection.anchor.path);if(Ni.isShiftEnter(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void n.insertText("\n")}if(Ni.isEnter(t)){if(t.isDefaultPrevented())return;t.preventDefault();const o=D.isStart(n,n.selection.anchor,r),i=D.isEnd(n,n.selection.anchor,r);if(!o&&!i)return void e.splitBlock({slate:n,focus:!0});const a=Q({id:G()}),l=e.selection?[e.selection[0]+1]:[0];e.insertBlock(a,{at:l,slate:n,focus:!0})}else if(Ni.isBackspace(t)){if(t.isDefaultPrevented())return;const r=O.parent(n.selection.anchor.path);if(D.isStart(n,n.selection.anchor,r)){t.preventDefault();const o=D.string(n,r),i=e.selection?e.selection[0]-1:0,a=Nn(e,{at:[i]});let l;if(a&&(l=function(e,t){const[,n]=D.last(e,t);return{path:n,offset:D.string(e,n).length}}(a,r)),0===o.trim().length)return e.deleteBlock({at:e.selection,focus:!0,focusAt:l});{if(j.isExpanded(n.selection))return R.delete(n,{at:n.selection});if(!a)return;if(0===D.string(a,[0,0]).length)return e.deleteBlock({at:[i],focus:!0,focusAt:l});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(a,t,{at:D.end(a,[])}),e.deleteBlock({at:e.selection,focus:!0,focusAt:l})}}}else{if(Ni.isSelect(t)){if(t.isDefaultPrevented())return;const[,r]=D.first(n,[0]),[,o]=D.last(n,[n.children.length-1]),i=D.range(n,r,o),a=j.equals(n.selection,i);if(j.isExpanded(n.selection)&&a)return t.preventDefault(),x.blur(n),x.deselect(n),R.deselect(n),void e.setBlockSelected([],{allSelected:!0})}if(Ni.isShiftTab(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void e.decreaseBlockDepth()}if(Ni.isTab(t)){if(t.isDefaultPrevented())return;return t.preventDefault(),void e.increaseBlockDepth()}if(Ni.isArrowUp(t)){if(t.isDefaultPrevented())return;const r=O.parent(n.selection.anchor.path);if(D.isStart(n,n.selection.anchor,r)){const n=e.selection?[e.selection[0]-1]:null,r=Nn(e,{at:n}),o=M(e,{at:n});if(r&&o){const[,n]=D.last(r,[0]),i={path:n,offset:D.string(r,n).length};return t.preventDefault(),void e.focusBlock(o.id,{focusAt:i,waitExecution:!1,shouldUpdateBlockSelection:!0})}}}if(Ni.isArrowDown(t)){const r=O.parent(n.selection.anchor.path);if(D.isEnd(n,n.selection.anchor,r)){const n=e.selection?[e.selection[0]+1]:null,o=Nn(e,{at:n}),i=M(e,{at:n});if(o&&i){const n=function(e,t){const[,n]=D.first(e,t);return{path:n,offset:0}}(o,r);return t.preventDefault(),void e.focusBlock(i.id,{focusAt:n,waitExecution:!1})}}}if(j.isExpanded(n.selection)){if(Object.values(e.formats).length>0)for(const n of Object.values(e.formats))if(n.hotkey&&Bi(n.hotkey)(t)){t.preventDefault(),e.formats[n.type].toggle();break}}}}}},Pi=({children:t,attributes:n,placeholder:r})=>{const o=k(),i=Object.assign({},n);return o&&r&&(i["data-placeholder"]=r,i.className="yoopta-placeholder"),e("span",Object.assign({},i,{children:t}))};function zi(e){try{return new URL(e),!0}catch(e){return!1}}const Fi=(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,r=n&&j.isCollapsed(n),o={type:"link",children:r?[{text:t}]:[],props:{url:t,target:"_blank",rel:"noreferrer"}};r?R.insertNodes(e,o):(R.wrapNodes(e,o,{split:!0}),R.collapse(e,{edge:"end"}))},Ui=({id:t,customEditor:r,elements:o,marks:i,events:a,options:c,placeholder:s="Type '/' for commands"})=>{const u=z(),f=F(t),p=l(f.value).current,h=f.type,g=d((()=>(e=>{const t={};return Object.keys(e).forEach((n=>t[n]=e[n].render)),t})(o)),[o]),v=d((()=>(e=>{const t={};return e?(e.forEach((e=>t[e.type]=e)),t):t})(i)),[i]),m=d((()=>{let e=u.blockEditorsMap[t];return Object.keys(o).forEach((t=>{var n;const r=null===(n=o[t].props)||void 0===n?void 0:n.nodeType,i="inline"===r,a="void"===r,l="inlineVoid"===r;l&&(e.markableVoid=e=>e.type===t),(a||l)&&(e.isVoid=e=>e.type===t),(i||l)&&(e.isInline=e=>e.type===t,e=(e=>{const{insertData:t,insertText:n}=e;return e.insertText=t=>{t&&zi(t)?Fi(e,t):n(t)},e.insertData=n=>{const r=n.getData("text/plain");r&&zi(r)?Fi(e,r):t(n)},e})(e))})),e}),[]),b=d((()=>{if(!a)return{};const e={hotkeys:Ni,currentBlock:f,defaultBlock:Q({id:G()})},t={};return Object.keys(a).forEach((n=>{t[n]=function(t){if(a[n]){a[n](u,m,e)(t)}}})),t}),[a,u,f]);return e("div",Object.assign({"data-plugin-id":t,"data-plugin-type":h},{children:e(Hi,{id:t,slate:m,initialValue:p,onChange:e=>u.updateBlock(t,{value:e}),decorate:e=>{var t;const n=[],[r,o]=e,i=(null===(t=u.selection)||void 0===t?void 0:t[0])===f.meta.order;return m.selection&&i&&!D.isEditor(r)&&""===D.string(m,[o[0]])&&j.includes(m.selection,o)&&j.isCollapsed(m.selection)&&n.push(Object.assign(Object.assign({},m.selection),{withPlaceholder:!0})),n},renderLeaf:t=>{var n,r,o,i,a;let{children:l,leaf:c,attributes:d}=t;const p=yi(c,["text"]),h=(null===(n=u.selection)||void 0===n?void 0:n[0])===f.meta.order;p&&Object.keys(p).forEach((e=>{const t=v[e];t&&(l=t.render({children:l,leaf:c}))}));const g=!("void"===(null===(a=null===(i=null===(o=null===(r=t.children)||void 0===r?void 0:r.props)||void 0===o?void 0:o.parent)||void 0===i?void 0:i.props)||void 0===a?void 0:a.nodeType))&&h&&c.withPlaceholder;return e(Pi,Object.assign({attributes:d,placeholder:g?s:void 0},{children:l}))},renderElement:r=>{const o=g[r.element.type];return o?e(o,Object.assign({},r,{blockId:t,options:c})):e(n,{})},eventHandlers:b,onKeyDown:e=>{var t;null===(t=b.onKeyDown)||void 0===t||t.call(b,e),Ii.onKeyDown(u)(e)},onKeyUp:e=>{var t;null===(t=null==b?void 0:b.onKeyUp)||void 0===t||t.call(b,e)},onFocus:e=>{var t;null===(t=null==b?void 0:b.onFocus)||void 0===t||t.call(b,e)},onMouseDown:e=>{var t,n;(null===(t=u.selection)||void 0===t?void 0:t[0])!==f.meta.order&&u.setSelection([f.meta.order]),null===(n=null==b?void 0:b.onMouseDown)||void 0===n||n.call(b,e)},onBlur:e=>{var t;e.preventDefault(),null===(t=null==b?void 0:b.onBlur)||void 0===t||t.call(b,e)},customEditor:r})}))},Hi=p((({id:t,slate:n,initialValue:r,onChange:o,renderLeaf:i,renderElement:a,eventHandlers:l,onKeyDown:c,onKeyUp:s,onFocus:d,onMouseDown:u,onBlur:f,customEditor:p,decorate:h})=>e(E,Object.assign({editor:n,initialValue:r,onChange:o},{children:e(C,Object.assign({renderElement:a,renderLeaf:i,className:"focus-visible:outline-none focus:outline-none",spellCheck:!0},l,{onKeyDown:c,onKeyUp:s,onFocus:d,onMouseDown:u,decorate:h,onBlur:f,onPaste:e=>{const t=e.clipboardData.getData("text/html"),n=(new DOMParser).parseFromString(t,"text/html");if(n.body.childNodes.length>0){e.preventDefault();const t={H1:"HeadingOne",H2:"HeadingTwo",H3:"HeadingThree",P:"Paragraph",OL:"NumberedList",UL:"BulletedList",BLOCKQUOTE:"Blockquote"},r=Array.from(n.body.childNodes).map(((e,n)=>{if(t[e.nodeName]){const r=t[e.nodeName];return Q({id:G(),type:r,value:[],meta:{order:n,depth:0}})}})).filter(Boolean);console.log("nodes",r),console.log("parsetHTML.body",n.body)}}}),`editable-${t}`)}),`slate-${t}`)));Hi.displayName="SlateEditorInstance";const Vi=({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])}(Te(Ct,{activationConstraint:{delay:100,tolerance:0}}),Te(yt,{coordinateGetter:_n})),handleDragEnd:u((t=>{const{active:n,over:r}=t;if(n&&r&&n.id!==r.id){const t=e.children[r.id].meta.order;e.moveBlock(n.id,[t])}}),[]),handleDragStart:u((t=>{e.setBlockSelected(null)}),[])}),Wi=[],Ki=({editor:t,marks:n})=>{const{sensors:r,handleDragEnd:o,handleDragStart:i}=Vi({editor:t}),a=Object.keys(t.children),l=d((()=>0===a.length?Wi:a.sort(((e,n)=>t.children[e].meta.order-t.children[n].meta.order))),[a]),c=[];for(let r=0;r<l.length;r++){const o=l[r],i=t.children[o],a=t.plugins[i.type];i&&a?c.push(e(bi,Object.assign({block:i,blockId:o},{children:e(Ui,{type:i.type,id:o,marks:n,events:a.events,elements:a.elements,options:a.options},o)}),o)):console.error(`Plugin ${i.type} not found`)}return e(nn,Object.assign({sensors:r,collisionDetection:Ue,onDragStart:i,onDragEnd:o},{children:e(bn,Object.assign({items:l,strategy:gn},{children:c}))}))},Yi=({editor:e,yooptaEditorRef:t,root:n})=>{const[r,o]=f({origin:[0,0],coords:[0,0],selection:!1}),i=n=>{var i;const a=null===(i=t.current)||void 0===i?void 0:i.contains(n.target);if(!a&&!r.selection&&Array.isArray(e.selectedBlocks)&&e.selectedBlocks.length>0)return e.setBlockSelected(null),c();a||o({origin:[n.pageX,n.pageY-window.pageYOffset],coords:[n.pageX,n.pageY-window.pageYOffset],selection:!0})},a=t=>{if(!r.selection)return;o((e=>Object.assign(Object.assign({},e),{coords:[t.pageX,t.pageY-window.pageYOffset]})));const n=((e,t)=>{const n=[];return document.querySelectorAll("[data-yoopta-block]").forEach(((r,o)=>{if(!r)return;const i=r.getBoundingClientRect(),a=Math.min(e[1],t[1]),l=Math.min(e[0],t[0]),c=Math.max(e[1],t[1]),s=Math.max(e[0],t[0]);a<i.bottom&&c>i.top&&l<i.right&&s>i.left&&n.push(o)})),n})(r.origin,[t.pageX,t.pageY-window.pageYOffset]);e.setBlockSelected(n,{only:!0})},l=()=>{c()};s((()=>{var e;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===(e=t.current)||void 0===e?void 0:e.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,r,n]);const c=()=>{o({origin:[0,0],coords:[0,0],selection:!1})};return Object.assign(Object.assign({},r),{onClose:c})},Xi=({origin:t,coords:n,isOpen:r})=>{if(!r)return null;const o={zIndex:10,left:t[0],top:t[1],height:Math.abs(n[1]-t[1]-1),width:Math.abs(n[0]-t[0]-1),userSelect:"none",transformOrigin:"top left",transform:t[1]>n[1]&&t[0]>n[0]?"scaleY(-1) scaleX(-1)":t[1]>n[1]?"scaleY(-1)":t[0]>n[0]?"scaleX(-1)":void 0,position:"fixed",backgroundColor:"rgba(35, 131, 226, 0.14)"};return e("div",{style:o})},$i={selectionStarted:!1,indexToSelect:null,startedIndexToSelect:null},Zi=({marks:n,className:r,autoFocus:o=!0,selectionBoxRoot:i})=>{const a=z(),c=l(null),d=Yi({editor:a,yooptaEditorRef:c,root:i});let u=l($i).current;s((()=>{if(!o)return;const e=M(a,{at:[0]});e&&a.focusBlock(e.id,{waitExecution:!0})}),[o]),s((()=>(document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h))),[a.selectedBlocks]);const f=()=>{Array.isArray(a.selectedBlocks)&&a.selectedBlocks.length>0&&a.setBlockSelected(null)},p=()=>{u.indexToSelect=null,u.startedIndexToSelect=null,u.selectionStarted=!1},h=e=>{var t,n,r,o,i;if(Ni.isSelect(e)){if((null===(t=a.selectedBlocks)||void 0===t?void 0:t.length)===Object.keys(a.children).length)return void e.preventDefault();if(u.selectionStarted)return e.preventDefault(),void a.setBlockSelected([],{allSelected:!0})}if(Ni.isBackspace(e)){e.stopPropagation();if(Array.isArray(a.selectedBlocks)&&(null===(n=a.selectedBlocks)||void 0===n?void 0:n.length)===Object.keys(a.children).length)return e.preventDefault(),a.deleteBlock({deleteAll:!0}),a.setBlockSelected(null),void p();if(Array.isArray(a.selectedBlocks)&&(null===(r=a.selectedBlocks)||void 0===r?void 0:r.length)>0)return e.preventDefault(),a.deleteBlock({fromPaths:a.selectedBlocks}),a.setBlockSelected(null),void p()}if(Ni.isShiftArrowUp(e)){if("function"==typeof e.isDefaultPrevented&&e.isDefaultPrevented())return;if(u.selectionStarted&&null!==u.startedIndexToSelect&&null!==u.indexToSelect){const e=u.indexToSelect,t=e-1;if(0===e)return;if(e===u.startedIndexToSelect)return a.setBlockSelected([t]),void(u.indexToSelect=t);if(t<u.startedIndexToSelect)return a.setBlockSelected([t]),void(u.indexToSelect=t);if((null===(o=a.selectedBlocks)||void 0===o?void 0:o.includes(e))&&e!==u.startedIndexToSelect){const n=a.selectedBlocks.filter((t=>t!==e));return a.setBlockSelected(n,{only:!0}),void(u.indexToSelect=t)}return}const t=M(a),n=Nn(a);if(!n||!n.selection||!t)return;const r=O.parent(n.selection.anchor.path),i=D.isStart(n,n.selection.focus,r);if(j.isExpanded(n.selection)&&i){const r=a.selection?[a.selection[0]-1]:[0],o=M(a,{at:r});t&&o&&(e.preventDefault(),x.blur(n),x.deselect(n),R.deselect(n),a.setSelection(null),a.setBlockSelected([null==t?void 0:t.meta.order,(null==t?void 0:t.meta.order)-1]),u.startedIndexToSelect=t.meta.order,u.indexToSelect=t.meta.order-1,u.selectionStarted=!0)}}if(Ni.isShiftArrowDown(e)){if(u.selectionStarted&&null!==u.indexToSelect&&null!==u.startedIndexToSelect){const e=u.indexToSelect,t=e+1;if(t===Object.keys(a.children).length)return;if(e===u.startedIndexToSelect)return a.setBlockSelected([t]),void(u.indexToSelect=t);if(t>u.startedIndexToSelect)return a.setBlockSelected([t]),void(u.indexToSelect=t);if((null===(i=a.selectedBlocks)||void 0===i?void 0:i.includes(e))&&e!==u.startedIndexToSelect){const n=a.selectedBlocks.filter((t=>t!==e));return a.setBlockSelected(n,{only:!0}),void(u.indexToSelect=t)}return}const t=M(a),n=Nn(a);if(!n||!n.selection||!t)return;const r=O.parent(n.selection.anchor.path),o=D.isEnd(n,n.selection.focus,r);if(j.isExpanded(n.selection)&&o){const r=a.selection?[a.selection[0]+1]:[0],o=M(a,{at:r});t&&o&&(e.preventDefault(),x.blur(n),x.deselect(n),R.deselect(n),a.setSelection(null),a.setBlockSelected([null==t?void 0:t.meta.order,(null==t?void 0:t.meta.order)+1]),u.startedIndexToSelect=t.meta.order,u.indexToSelect=t.meta.order+1,u.selectionStarted=!0)}}},g=(v={userSelect:d.selection?"none":"auto",pointerEvents:d.selection?"none":"auto"},Object.assign({paddingBottom:150},v));var v;return t("div",Object.assign({id:"yoopta-editor",className:r,style:g,ref:c,onClick:e=>{p(),(e=>{var t;const n=c.current;if(!n)return;const{bottom:r}=n.getBoundingClientRect(),o=r-parseInt(getComputedStyle(n).paddingBottom,10);if(e.clientY>=o){const e=Object.keys(a.children).length-1,n=M(a,{at:[e]}),r=Nn(a,{at:[e]});if(n&&r&&r.selection){const e=D.string(r,r.selection.anchor.path),o=O.parent(r.selection.anchor.path),[i]=D.node(r,o);if(_.isElement(i)&&"void"!==(null===(t=i.props)||void 0===t?void 0:t.nodeType)&&0===e.trim().length)return void a.focusBlock(n.id,{slate:r})}const o=Q({id:G()}),i=e+1;a.insertBlock(o,{at:[i],focus:!0})}})(e),f()},onBlur:e=>{var t;(null===(t=c.current)||void 0===t?void 0:t.contains(e.relatedTarget))||(p(),f())}},{children:[e(Ki,{editor:a,marks:n}),e(Xi,{origin:d.origin,coords:d.coords,isOpen:d.selection})]}))},qi=({children:e,fallback:t=null})=>{const[n,r]=f(!1);return s((()=>r(!0)),[]),n?e:t};var Gi=Symbol.for("immer-nothing"),Ji=Symbol.for("immer-draftable"),Qi=Symbol.for("immer-state");function ea(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ta=Object.getPrototypeOf;function na(e){return!!e&&!!e[Qi]}function ra(e){return!!e&&(ia(e)||Array.isArray(e)||!!e[Ji]||!!e.constructor?.[Ji]||da(e)||ua(e))}var oa=Object.prototype.constructor.toString();function ia(e){if(!e||"object"!=typeof e)return!1;const t=ta(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)===oa}function aa(e,t){0===la(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function la(e){const t=e[Qi];return t?t.type_:Array.isArray(e)?1:da(e)?2:ua(e)?3:0}function ca(e,t){return 2===la(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function sa(e,t,n){const r=la(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function da(e){return e instanceof Map}function ua(e){return e instanceof Set}function fa(e){return e.copy_||e.base_}function pa(e,t){if(da(e))return new Map(e);if(ua(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&ia(e)){if(!ta(e)){const t=Object.create(null);return Object.assign(t,e)}return{...e}}const n=Object.getOwnPropertyDescriptors(e);delete n[Qi];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],i=n[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(ta(e),n)}function ha(e,t=!1){return va(e)||na(e)||!ra(e)||(la(e)>1&&(e.set=e.add=e.clear=e.delete=ga),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>ha(t,!0)))),e}function ga(){ea(2)}function va(e){return Object.isFrozen(e)}var ma,ba={};function ya(e){const t=ba[e];return t||ea(0),t}function wa(){return ma}function xa(e,t){t&&(ya("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ka(e){Ea(e),e.drafts_.forEach(Sa),e.drafts_=null}function Ea(e){e===ma&&(ma=e.parent_)}function Ca(e){return ma={drafts_:[],parent_:ma,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Sa(e){const t=e[Qi];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Oa(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Qi].modified_&&(ka(t),ea(4)),ra(e)&&(e=Da(t,e),t.parent_||Ra(t,e)),t.patches_&&ya("Patches").generateReplacementPatches_(n[Qi].base_,e,t.patches_,t.inversePatches_)):e=Da(t,n,[]),ka(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Gi?e:void 0}function Da(e,t,n){if(va(t))return t;const r=t[Qi];if(!r)return aa(t,((o,i)=>_a(e,r,t,o,i,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Ra(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,i=!1;3===r.type_&&(o=new Set(t),t.clear(),i=!0),aa(o,((o,a)=>_a(e,r,t,o,a,n,i))),Ra(e,t,!1),n&&e.patches_&&ya("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function _a(e,t,n,r,o,i,a){if(na(o)){const a=Da(e,o,i&&t&&3!==t.type_&&!ca(t.assigned_,r)?i.concat(r):void 0);if(sa(n,r,a),!na(a))return;e.canAutoFreeze_=!1}else a&&n.add(o);if(ra(o)&&!va(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Da(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||Ra(e,o)}}function Ra(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ha(t,n)}var ja={get(e,t){if(t===Qi)return e;const n=fa(e);if(!ca(n,t))return function(e,t,n){const r=Ta(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!ra(r)?r:r===Aa(e.base_,t)?(Ma(e),e.copy_[t]=Na(r,e)):r},has:(e,t)=>t in fa(e),ownKeys:e=>Reflect.ownKeys(fa(e)),set(e,t,n){const r=Ta(fa(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Aa(fa(e),t),a=r?.[Qi];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((o=n)===(i=r)?0!==o||1/o==1/i:o!=o&&i!=i)&&(void 0!==n||ca(e.base_,t)))return!0;Ma(e),La(e)}var o,i;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Aa(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Ma(e),La(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=fa(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){ea(11)},getPrototypeOf:e=>ta(e.base_),setPrototypeOf(){ea(12)}},Ba={};function Aa(e,t){const n=e[Qi];return(n?fa(n):e)[t]}function Ta(e,t){if(!(t in e))return;let n=ta(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=ta(n)}}function La(e){e.modified_||(e.modified_=!0,e.parent_&&La(e.parent_))}function Ma(e){e.copy_||(e.copy_=pa(e.base_,e.scope_.immer_.useStrictShallowCopy_))}aa(ja,((e,t)=>{Ba[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ba.deleteProperty=function(e,t){return Ba.set.call(this,e,t,void 0)},Ba.set=function(e,t,n){return ja.set.call(this,e[0],t,n,e[0])};function Na(e,t){const n=da(e)?ya("MapSet").proxyMap_(e,t):ua(e)?ya("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:wa(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=ja;n&&(o=[r],i=Ba);const{revoke:a,proxy:l}=Proxy.revocable(o,i);return r.draft_=l,r.revoke_=a,l}(e,t);return(t?t.scope_:wa()).drafts_.push(n),n}function Ia(e){if(!ra(e)||va(e))return e;const t=e[Qi];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=pa(e,t.scope_.immer_.useStrictShallowCopy_)}else n=pa(e,!0);return aa(n,((e,t)=>{sa(n,e,Ia(t))})),t&&(t.finalized_=!1),n}var Pa=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&ea(6),void 0!==n&&"function"!=typeof n&&ea(7),ra(e)){const o=Ca(this),i=Na(e,void 0);let a=!0;try{r=t(i),a=!1}finally{a?ka(o):Ea(o)}return xa(o,n),Oa(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Gi&&(r=void 0),this.autoFreeze_&&ha(r,!0),n){const t=[],o=[];ya("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}ea(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ra(e)||ea(8),na(e)&&(e=function(e){na(e)||ea(10);return Ia(e)}(e));const t=Ca(this),n=Na(e,void 0);return n[Qi].isManual_=!0,Ea(t),n}finishDraft(e,t){const n=e&&e[Qi];n&&n.isManual_||ea(9);const{scope_:r}=n;return xa(r,t),Oa(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=ya("Patches").applyPatches_;return na(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};Pa.produce,Pa.produceWithPatches.bind(Pa),Pa.setAutoFreeze.bind(Pa),Pa.setUseStrictShallowCopy.bind(Pa),Pa.applyPatches.bind(Pa);var za=Pa.createDraft.bind(Pa),Fa=Pa.finishDraft.bind(Pa);function Ua(e,t){const n=Nn(e);if(!n)return!1;const r=D.marks(n);return!!(null==r?void 0:r[t])}const Ha=(e,t)=>{const{insertText:n}=t;return t.insertText=r=>{var o;const{selection:i}=t;if(" "===r&&i&&j.isCollapsed(i)){const{anchor:a}=i,l=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(r);const u=l?c:[],f={anchor:a,focus:D.start(t,u)},p=D.string(t,f),h=null===(o=e.shortcuts)||void 0===o?void 0:o[p];if(!!h&&!h.isActive())return R.select(t,f),R.delete(t),void h.create({deleteText:!1})}n(r)},t};function Va(e,t,n){e.children=za(e.children);let r=!1;const o=e.children[t];if(!o)throw Error(`Block with id ${t} not found`);n.id&&(o.id=n.id,r=!0),n.type&&(o.type=n.type,r=!0),n.meta&&(o.meta=n.meta,r=!0),n.value&&(o.value=n.value),e.children=Fa(e.children),r&&e.applyChanges(),e.emit("change",e.children)}function Wa(e,t,n){e.children=za(e.children);const r=M(e,{at:e.selection});if(!r)throw new Error("Block from not found at current selection");const o=oi(e.blocks[r.type].elements);if(r.type===t)return void(e.children=Fa(e.children));const i=Nn(e,{at:[r.meta.order]});if(!i)throw new Error(`Slate not found for block in position ${r.meta.order}`);const a=oi(e.blocks[t].elements);D.withoutNormalizing(i,(()=>{const n=function(e,t={}){var n;const{at:r,elementType:o}=t,i=r||(null===(n=e.selection)||void 0===n?void 0:n.anchor.path);if(!i)return;let a=e=>!D.isEditor(e)&&_.isElement(e);o&&(a=e=>!D.isEditor(e)&&_.isElement(e)&&e.type===o);const l=O.parent(i),c=D.nodes(e,{at:l,match:a,mode:"lowest"});if(c){const[e]=c;return e}}(i,{elementType:o});console.log({fromBlockRootElementType:o,node:n}),R.setNodes(i,{type:a},{at:[0],mode:"lowest",match:e=>_.isElement(e)&&!D.isInline(i,e)});const l={id:r.id,type:t,meta:Object.assign(Object.assign({},r.meta),{order:r.meta.order}),value:i.children};e.blockEditorsMap[r.id]=i,e.children[r.id]=l,e.children=Fa(e.children),e.applyChanges(),e.emit("change",e.children)}))}function Ka(e,t={}){const{at:n=e.selection,deleteAll:r=!1,fromPaths:o,focus:i}=t;if(console.log("BEFORE options.focusAt",t.focusAt),Array.isArray(o)&&o.length>0){e.children=za(e.children),o.forEach((t=>{const n=M(e,{at:[t]});n&&(delete e.children[n.id],delete e.blockEditorsMap[n.id])}));return Object.keys(e.children).forEach(((t,n)=>{e.children[t].meta.order=n})),e.children=Fa(e.children),e.applyChanges(),void e.emit("change",e.children)}if(r||1===Object.keys(e.children).length){e.children={},e.blockEditorsMap={};const t=Q({id:G()}),n=Ha(e,S(A()));return e.children[t.id]=t,e.blockEditorsMap[t.id]=n,e.setSelection([0]),e.setBlockSelected(null),e.focusBlock(t.id,{slate:n,waitExecution:!0}),e.applyChanges(),void e.emit("change",e.children)}if(!n)return;e.children=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=Fa(e.children),e.applyChanges(),e.emit("change",e.children),i){const n=e.selection?e.selection[0]-1:0,r=M(e,{at:[n]});r&&e.focusBlock(r.id,{focusAt:t.focusAt})}}function Ya(e,t){const n={};return t.forEach((t=>{const r=t.type;n[r]={hotkey:t.hotkey,type:r,getValue:()=>function(e,t){const n=Nn(e);if(!n)return null;const r=D.marks(n);return null==r?void 0:r[t]}(e,r),isActive:()=>Ua(e,r),toggle:()=>function(e,t){const n=Nn(e),r=Ua(e,t);n&&(r?D.removeMark(n,t):D.addMark(n,t,!0),e.applyChanges(),e.emit("change",e.children))}(e,r),update:t=>function(e,t,n){const r=Nn(e);r&&r.selection&&j.isExpanded(r.selection)&&(D.addMark(r,t,n),e.applyChanges(),e.emit("change",e.children))}(e,r,t)}})),n}function Xa(e,t){const n={};return t.forEach(((t,r)=>{var o;const i=ii(t.elements),a=null===(o=null==i?void 0:i.props)||void 0===o?void 0:o.nodeType;if(!("inline"===a||"inlineVoid"===a)){const r={};Object.keys(t.elements).forEach((e=>{const n=yi(t.elements[e],["render"]);r[e]=n}));const{display:o,placeholder:i,align:a,shortcuts:l}=t.options||{};n[t.type]={type:t.type,elements:r,options:{display:o,placeholder:i,align:a,shortcuts:l},isActive:()=>{const n=M(e,{at:e.selection});return(null==n?void 0:n.type)===t.type},toggle:(t,n)=>{Wa(e,t)},create:n=>{!function(e,t,n){var r;e.children=za(e.children);const o=M(e);if(!o)throw new Error(`No block found in the current selection path. Passed path: ${e.selection}`);const i=(null==n?void 0:n.slate)||Nn(e,{at:[null==o?void 0:o.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===(r=c.props)||void 0===r?void 0:r.nodeType)||"block"},c.props),d=J({id:G(),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=Q({id:o.id,type:a.type,meta:{order:o.meta.order,depth:o.meta.depth},value:[d]}),f=u.id;e.children[f]=u,e.blockEditorsMap[f]=i,e.children=Fa(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)=>{Va(e,t,n)},updateElement:(t,n,r)=>{!function(e,t,n,r){const o=e.children[t];if(!o)throw new Error(`Block with id ${t} not found`);const i=Nn(e,{at:[o.meta.order]});i?D.withoutNormalizing(i,(()=>{const[t]=D.nodes(i,{at:[0],match:e=>_.isElement(e)&&e.type===n}),o=null==t?void 0:t[0],a=(null==o?void 0:o.props)||{},l={props:Object.assign(Object.assign({},a),r)};R.setNodes(i,l,{at:[0],match:e=>_.isElement(e)&&e.type===n,mode:"lowest"}),e.applyChanges(),e.emit("change",e.children)})):console.warn("No slate found")}(e,t,n,r)},delete:t=>{Ka(e,t)}}}})),n}function $a(e){return Ha(e,S(A()))}function Za({type:e,hotkey:t,render:n}){return{type:e,hotkey:t,render:n}}const qa=Za({type:"fakeSelection",render:t=>e("span",Object.assign({style:{backgroundColor:"#d7e6fa"}},{children:t.children}))}),Ga=(()=>{const e=G();return{[e]:Q({id:e})}})(),Ja=new X,Qa=(e,t)=>Ja.on(e,t),el=(e,t)=>Ja.once(e,t),tl=(e,t)=>Ja.off(e,t),nl=(e,t)=>Ja.emit(e,t);const rl=({editor:n,value:r,marks:o,plugins:i,autoFocus:a,className:l,tools:c,selectionBoxRoot:s,children:u})=>{const p=()=>{m((e=>Object.assign(Object.assign({},e),{version:e.version+1})))},h=d((()=>o?[qa,...o]:[qa]),[o]),g=d((()=>i.map((e=>e.getPlugin))),[i]),[v,m]=f((()=>(n.applyChanges=p,h&&(n.formats=Ya(n,h)),n.blocks=Xa(n,g),n.children=function(e){return!!e&&"object"==typeof e&&0!==Object.keys(e).length}(r)?r:Ga,n.blockEditorsMap=function(e){const t={};return Object.keys(e.children).forEach((n=>{const r=$a(e);t[n]=r})),t}(n),n.shortcuts=function(e){const t={};return Object.values(e.blocks).forEach((e=>{var n,r,o,i;e.options&&Array.isArray(null===(n=e.options)||void 0===n?void 0:n.shortcuts)&&(null===(r=e.options)||void 0===r?void 0:r.shortcuts.length)>0&&(null===(i=null===(o=e.options)||void 0===o?void 0:o.shortcuts)||void 0===i||i.forEach((n=>{t[n]=e})))})),t}(n),n.plugins=function(e){const t={},n={};return e.forEach((e=>{e.elements&&Object.keys(e.elements).forEach((t=>{var r;const o=e.elements[t],i=null===(r=o.props)||void 0===r?void 0:r.nodeType;"inline"!==i&&"inlineVoid"!==i||(n[t]=o)})),t[e.type]=e})),e.forEach((e=>{if(e.elements){const r=Object.assign(Object.assign({},e.elements),n);t[e.type]=Object.assign(Object.assign({},e),{elements:r})}})),t}(g),n.on=Qa,n.once=el,n.off=tl,n.emit=nl,{editor:n,version:0})));return e(qi,{children:e(P,Object.assign({editorState:v},{children:t(li,Object.assign({tools:c},{children:[e(Zi,{marks:h,autoFocus:a,className:l,selectionBoxRoot:s}),u]}))}))})},ol=Object.assign(Object.assign({},pi),{ExtendedBlockActions:({className:r,style:o,onClick:i,children:a})=>{const[l,c]=f(!1),{refs:s,floatingStyles:d,context:u}=Po({placement:"bottom-start",open:l,onOpenChange:c,middleware:[Ur(),Fr(),zr(),kr(10)],whileElementsMounted:Pr}),{isMounted:p,styles:h}=Ho(u,{duration:100}),g=Object.assign(Object.assign({},h),d);return t(n,{children:[p&&e(fi,Object.assign({isOpen:!0,onClose:()=>c(!1),refs:s,style:g},{children:a})),e("button",Object.assign({type:"button",ref:s.setReference,className:`absolute right-[10px] top-[10px] flex items-center justify-between z-10 opacity-1 bg-[#eee] w-[22px] h-[22px] transition-opacity duration-150 ease-in border-none cursor-pointer rounded-[2px] p-[0_4px] ${r}`,onClick:()=>{null==i||i(),c(!0)},style:o},{children:e(qo,{})}))]})}});function il(e,t){const n=Object.keys(e.children),{type:r}=t||{},o=n.find((t=>e.children[t].type===r));return o?e.children[o]:null}function al(e,t,n={}){const{focusAt:r,waitExecution:o=!0,waitExecutionMs:i=0,shouldUpdateBlockSelection:a=!0}=n,l=()=>{const o=n.slate||e.blockEditorsMap[t],i=e.children[t];if(!o||!i)return;const l=function(e,t){if(T.isPoint(t))return t;if(O.isPath(t))return{path:t,offset:0};const[,n]=D.first(e,[0]);return{path:n||[0,0],offset:0}}(o,r);R.select(o,l),x.focus(o),a&&setTimeout((()=>{e.setSelection([i.meta.order])}),0)};o?setTimeout((()=>l()),i):l()}function ll(e){return Array.from(new Set(e))}var cl={};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",l="[object Function]",c="[object GeneratorFunction]",s="[object Map]",d="[object Number]",u="[object Object]",f="[object Promise]",p="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",b="[object ArrayBuffer]",y="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",k="[object Int8Array]",E="[object Int16Array]",C="[object Int32Array]",S="[object Uint8Array]",O="[object Uint8ClampedArray]",D="[object Uint16Array]",_="[object Uint32Array]",R=/\w*$/,j=/^\[object .+?Constructor\]$/,B=/^(?:0|[1-9]\d*)$/,A={};A[o]=A["[object Array]"]=A[b]=A[y]=A[i]=A[a]=A[w]=A[x]=A[k]=A[E]=A[C]=A[s]=A[d]=A[u]=A[p]=A[h]=A[g]=A[v]=A[S]=A[O]=A[D]=A[_]=!0,A["[object Error]"]=A[l]=A[m]=!1;var T="object"==typeof K&&K&&K.Object===Object&&K,L="object"==typeof self&&self&&self.Object===Object&&self,M=T||L||Function("return this")(),N=t&&!t.nodeType&&t,I=N&&e&&!e.nodeType&&e,P=I&&I.exports===N;function z(e,t){return e.set(t[0],t[1]),e}function F(e,t){return e.add(t),e}function U(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function H(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function V(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e,t){return function(n){return e(t(n))}}function Y(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var X,$=Array.prototype,Z=Function.prototype,q=Object.prototype,G=M["__core-js_shared__"],J=(X=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+X:"",Q=Z.toString,ee=q.hasOwnProperty,te=q.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=P?M.Buffer:void 0,oe=M.Symbol,ie=M.Uint8Array,ae=W(Object.getPrototypeOf,Object),le=Object.create,ce=q.propertyIsEnumerable,se=$.splice,de=Object.getOwnPropertySymbols,ue=re?re.isBuffer:void 0,fe=W(Object.keys,Object),pe=Pe(M,"DataView"),he=Pe(M,"Map"),ge=Pe(M,"Promise"),ve=Pe(M,"Set"),me=Pe(M,"WeakMap"),be=Pe(Object,"create"),ye=Ve(pe),we=Ve(he),xe=Ve(ge),ke=Ve(ve),Ee=Ve(me),Ce=oe?oe.prototype:void 0,Se=Ce?Ce.valueOf:void 0;function Oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function De(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _e(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Re(e){this.__data__=new De(e)}function je(e,t){var n=Ke(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Ye(e)}(e)&&ee.call(e,"callee")&&(!ce.call(e,"callee")||te.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!t&&!ee.call(e,a)||i&&("length"==a||Ue(a,r))||n.push(a);return n}function Be(e,t,n){var r=e[t];ee.call(e,t)&&We(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Ae(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function Te(e,t,n,r,f,m,j){var B;if(r&&(B=m?r(e,f,m,j):r(e)),void 0!==B)return B;if(!Ze(e))return e;var T=Ke(e);if(T){if(B=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(e,B)}else{var L=Fe(e),M=L==l||L==c;if(Xe(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(L==u||L==o||M&&!m){if(H(e))return m?e:{};if(B=function(e){return"function"!=typeof e.constructor||He(e)?{}:(t=ae(e),Ze(t)?le(t):{});var t}(M?{}:e),!t)return function(e,t){return Ne(e,ze(e),t)}(e,function(e,t){return e&&Ne(t,qe(t),e)}(B,e))}else{if(!A[L])return m?e:{};B=function(e,t,n,r){var o=e.constructor;switch(t){case b:return Me(e);case i:case a:return new o(+e);case y:return function(e,t){var n=t?Me(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case w:case x:case k:case E:case C:case S:case O:case D:case _:return function(e,t){var n=t?Me(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case s:return function(e,t,n){var r=t?n(V(e),!0):V(e);return U(r,z,new e.constructor)}(e,r,n);case d:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,R.exec(e));return t.lastIndex=e.lastIndex,t}(e);case h:return function(e,t,n){var r=t?n(Y(e),!0):Y(e);return U(r,F,new e.constructor)}(e,r,n);case v:return l=e,Se?Object(Se.call(l)):{}}var l}(e,L,Te,t)}}j||(j=new Re);var N=j.get(e);if(N)return N;if(j.set(e,B),!T)var I=n?function(e){return function(e,t,n){var r=t(e);return Ke(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,qe,ze)}(e):qe(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(I||e,(function(o,i){I&&(o=e[i=o]),Be(B,i,Te(o,t,n,r,i,e,j))})),B}function Le(e){return!(!Ze(e)||(t=e,J&&J in t))&&($e(e)||H(e)?ne:j).test(Ve(e));var t}function Me(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function Ne(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],l=r?r(n[a],e[a],a,n,e):void 0;Be(n,a,void 0===l?e[a]:l)}return n}function Ie(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Pe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Le(n)?n:void 0}Oe.prototype.clear=function(){this.__data__=be?be(null):{}},Oe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Oe.prototype.get=function(e){var t=this.__data__;if(be){var r=t[e];return r===n?void 0:r}return ee.call(t,e)?t[e]:void 0},Oe.prototype.has=function(e){var t=this.__data__;return be?void 0!==t[e]:ee.call(t,e)},Oe.prototype.set=function(e,t){return this.__data__[e]=be&&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__,r=Ae(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},_e.prototype.clear=function(){this.__data__={hash:new Oe,map:new(he||De),string:new Oe}},_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 r=n.__data__;if(!he||r.length<199)return r.push([e,t]),this;n=this.__data__=new _e(r)}return n.set(e,t),this};var ze=de?W(de,Object):function(){return[]},Fe=function(e){return te.call(e)};function Ue(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||B.test(e))&&e>-1&&e%1==0&&e<t}function He(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||q)}function Ve(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(pe&&Fe(new pe(new ArrayBuffer(1)))!=y||he&&Fe(new he)!=s||ge&&Fe(ge.resolve())!=f||ve&&Fe(new ve)!=h||me&&Fe(new me)!=m)&&(Fe=function(e){var t=te.call(e),n=t==u?e.constructor:void 0,r=n?Ve(n):void 0;if(r)switch(r){case ye:return y;case we:return s;case xe:return f;case ke:return h;case Ee:return m}return t});var Ke=Array.isArray;function Ye(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!$e(e)}var Xe=ue||function(){return!1};function $e(e){var t=Ze(e)?te.call(e):"";return t==l||t==c}function Ze(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function qe(e){return Ye(e)?je(e):function(e){if(!He(e))return fe(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Te(e,!0,!0)}}({get exports(){return cl},set exports(e){cl=e}},cl);var sl=cl;function dl(e,t={}){const{blockId:n,focus:r}=t;if(!n&&!t.at)throw new Error("blockId or path should be provided");let o=null;if(n&&(o=e.children[n],!o))throw new Error(`Block not with blockId: ${n} found`);if(t.at&&(o=M(e,{at:t.at}),!o))throw new Error(`Block in path ${t.at} not found`);if(!o)throw new Error("Block not found");e.children=za(e.children);Object.values(e.children).forEach((e=>{e.meta.order>o.meta.order&&(e.meta.order+=1)}));const i=(a=o,"function"==typeof window.structuredClone?window.structuredClone(a):sl(a));var a;const l=$a(e);i.id=G(),i.meta.order=o.meta.order+1,e.children[i.id]=i,e.blockEditorsMap[i.id]=l;const c=i.id;e.children=Fa(e.children),e.applyChanges(),e.emit("change",e.children),r&&e.focusBlock(c,{waitExecution:!0})}function ul(e,t){x.blur(t),x.deselect(t),R.deselect(t),e.setBlockSelected(null),e.setSelection(null)}const fl=()=>{const e={children:{},selection:null,selectedBlocks:null,getEditorValue:()=>function(e){return e.applyChanges(),e.children}(e),applyChanges:()=>{},insertBlock:(...t)=>function(e,t,n={}){e.children=za(e.children);const{at:r=null,focus:o=!1,slate:i=null}=n,a=M(e),l=r,c={id:G(),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=$a(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=Fa(e.children),e.applyChanges(),e.emit("change",e.children),o&&e.focusBlock(s&&u?u:c.id)}(e,...t),deleteBlock:(...t)=>Ka(e,...t),duplicateBlock:(...t)=>dl(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 r=M(e);r&&(r.meta.depth=r.meta.depth+1,e.children=Fa(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 r=M(e);r&&(r.meta.depth=0===r.meta.depth?0:r.meta.depth-1,e.children=Fa(e.children),e.applyChanges(),e.emit("change",e.children))}(e,...t),moveBlock:(...t)=>function(e,t,n){e.children=za(e.children);const[r]=n,o=e.children[t],i=Object.values(e.children).find((e=>e.meta.order===r));console.log("blockInNewPosition meta",Object.assign({},i).meta.depth);const a=o.meta.order<i.meta.order,l=o.meta.order>i.meta.order;Object.values(e.children).forEach((e=>{a?e.meta.order>o.meta.order&&e.meta.order<=i.meta.order&&e.meta.order--:l&&e.meta.order<o.meta.order&&e.meta.order>=i.meta.order&&e.meta.order++})),o.meta.order=r,o.meta.depth=i.meta.depth,e.children=Fa(e.children),e.applyChanges(),e.emit("change",e.children)}(e,...t),focusBlock:(...t)=>al(e,...t),getBlock:(...e)=>{},updateBlock:(...t)=>Va(e,...t),splitBlock:(...t)=>function(e,t={}){const{slate:n,focus:r=!0}=t,o=M(e);n&&n.selection&&o&&D.withoutNormalizing(n,(()=>{e.children=za(e.children);const t=O.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:G(),type:o.type,meta:{order:o.meta.order+1,depth:o.meta.depth},value:[a]};Object.values(e.children).forEach((e=>{e.meta.order>=l.meta.order&&(e.meta.order+=1)}));const c=$a(e);e.blockEditorsMap[l.id]=c,e.children[l.id]=l,e.children=Fa(e.children),e.applyChanges(),e.emit("change",e.children),r&&e.focusBlock(l.id,{slate:c})}))}(e,...t),setSelection:(...t)=>function(e,t,n={}){const{applyChanges:r=!0}=n;e.selection=t,r&&e.applyChanges()}(e,...t),setBlockSelected:(...t)=>function(e,t,n={}){const{only:r=!1,allSelected:o=!1}=n,i=e.selectedBlocks||[];if(null===t)e.selectedBlocks=null;else if(r)e.selectedBlocks=t;else if(o){const t=Object.keys(e.children).map(((e,t)=>t));e.selectedBlocks=ll(t)}else e.selectedBlocks=ll(i.concat(t));e.applyChanges()}(e,...t),blur:(...t)=>function(e,t={}){var n;const r=null!==(n=t.slate)&&void 0!==n?n:Nn(e);if(!r)return;const{waitExecution:o,waitExecutionMs:i}=t;o?setTimeout((()=>ul(e,r)),i):(ul(e,r),e.applyChanges())}(e,...t),blockEditorsMap:{},blocks:{},formats:{},shortcuts:{},plugins:{},on:(e,t)=>{},off:(e,t)=>{},emit:(e,...t)=>{},once:(e,t)=>{}};return e};hi('/*! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.right-\\[10px\\]{right:10px}.top-0{top:0}.top-\\[10px\\]{top:10px}.z-10{z-index:10}.z-\\[100\\]{z-index:100}.z-\\[90\\]{z-index:90}.mx-\\[4px\\]{margin-left:4px;margin-right:4px}.my-\\[4px\\]{margin-bottom:4px;margin-top:4px}.mb-\\[1px\\]{margin-bottom:1px}.mr-2{margin-right:.5rem}.mt-\\[2px\\]{margin-top:2px}.\\!block{display:block!important}.block{display:block}.inline{display:inline}.flex{display:flex}.h-4{height:1rem}.h-\\[1px\\]{height:1px}.h-\\[22px\\]{height:22px}.h-full{height:100%}.w-4{width:1rem}.w-\\[22px\\]{width:22px}.w-auto{width:auto}.w-full{width:100%}.min-w-\\[200px\\]{min-width:200px}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-none{border-style:none}.bg-\\[\\#2383e224\\]{background-color:#2383e224}.bg-\\[\\#37352f14\\]{background-color:#37352f14}.bg-\\[\\#FFF\\]{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-\\[\\#eee\\]{--tw-bg-opacity:1;background-color:rgb(238 238 238/var(--tw-bg-opacity))}.p-\\[0_4px\\]{padding:0 4px}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-\\[2px\\]{padding-left:2px;padding-right:2px}.py-0{padding-bottom:0;padding-top:0}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-1\\.5{padding-bottom:.375rem;padding-top:.375rem}.py-\\[6px\\]{padding-bottom:6px;padding-top:6px}.text-sm{font-size:.875rem;line-height:1.25rem}.italic{font-style:italic}.leading-\\[120\\%\\]{line-height:120%}.opacity-100{opacity:1}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-opacity{transition-duration:.15s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}::-moz-selection{background:#c6ddf8}::selection{background:#c6ddf8}.yoopta-placeholder:after{color:inherit;content:attr(data-placeholder);font-size:75%;font-style:inherit;font-weight:inherit;opacity:.5;padding-left:5px;position:absolute;text-indent:2px;top:50%;transform:translateY(-50%);-webkit-user-select:none;-moz-user-select:none;user-select:none}.hover\\:bg-\\[\\#37352f14\\]:hover{background-color:#37352f14}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}');export{Ni as HOTKEYS,ol as UI,L as YooptaPlugin,Q as buildBlockData,J as buildBlockElement,fl as createYooptaEditor,Za as createYooptaMark,rl as default,M as findPluginBlockBySelectionPath,il as findPluginBlockByType,Nn as findSlateBySelectionPath,G as generateId,ii as getRootBlockElement,oi as getRootBlockElementType,F as useBlockData,W as useBlockSelected,U as useYooptaBlock,z as useYooptaEditor,H as useYooptaPlugin,V as useYooptaPluginOptions,ci as useYooptaTools};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoopta/editor",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"url": "https://github.com/Darginec05/Yoopta-Editor/issues"
|
|
69
69
|
},
|
|
70
70
|
"homepage": "https://github.com/Darginec05/Yoopta-Editor#readme",
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "eaa3e43ef9f717033c04f4615e256c3b5fb3fb14"
|
|
72
72
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToolsContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/UltraYooptaContext/ToolsContext.tsx"],"names":[],"mappings":";AAEA,MAAM,MAAM,SAAS,CAAC,WAAW,GAAG,GAAG,EAAE,SAAS,GAAG,GAAG,IAAI;IAC1D,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACzC,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG;IAClB,UAAU,EAAE,SAAS,CAAC;IACtB,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;CACpC,CAAC;AAIF,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,aAAa,wBAAyB,KAAK,4CAgCvD,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,gBAOjC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UltraYooptaContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/UltraYooptaContext/UltraYooptaContext.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,MAAM,MAAM,kCAAkC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAExE,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAmCF,eAAO,MAAM,kBAAkB,8CAAuD,CAAC;AAEvF;;GAEG;AACH,QAAA,MAAM,0BAA0B;;;6CAQ/B,CAAC;AAEF,QAAA,MAAM,eAAe,QAAO,SAQ3B,CAAC;AACF,QAAA,MAAM,YAAY,YAAa,MAAM,6EAAwC,CAAC;AAC9E,QAAA,MAAM,cAAc,cAAe,MAAM,6CAAwC,CAAC;AAClF,QAAA,MAAM,eAAe,SAAU,MAAM,yFAAoC,CAAC;AAC1E,QAAA,MAAM,sBAAsB,sBAAwB,MAAM,4BACvB,CAAC;AAEpC,KAAK,qBAAqB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,eAAe,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACvH,QAAA,MAAM,gBAAgB,sBAAuB,qBAAqB,YAkBjE,CAAC;AAEF,OAAO,EACL,eAAe,EACf,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,0BAA0B,GAC3B,CAAC"}
|
|
File without changes
|